Skip to content

Commit

Permalink
Update the installation instructions (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Jan 19, 2022
1 parent ddbef5d commit f211295
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
39 changes: 18 additions & 21 deletions openentrance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,52 @@ Coming soon - for now, please have a look at [__init__.py](__init__.py)!

## Installation instructions

### Option 1: Clone the repo and install from source (recommended)
### Clone the repo and install from source

This approach requires git to be installed on your machine.

Clone this repository to your machine by opening a command prompt and
directing it to the folder where you want to have the files, then run:

```
$ git clone [email protected]:openENTRANCE/nomenclature.git
$ git clone [email protected]:openENTRANCE/openentrance.git
```

Then navigate the command prompt to the new folder and install using pip.

```
$ cd nomenclature
$ cd openentrance
$ pip install -r requirements.txt
$ pip install --editable .
```

> Pulling new commits in the cloned folder will immediately
> make the latest version of the nomenclature available on your machine.
You can test whether the installation worked successfully by running
You can test whether the installation worked successfully by install **pytest** using

```
$ pytest openentrance/tests/
$ pip install pytest
```

The result should look similar to the following snippet:
and then running

```
============================= test session starts ==============================
platform darwin -- Python 3.7.7, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: ...
collected 4 items
openentrance/tests/test_core.py .... [100%]
============================== 4 passed in 30.00s ==============================
$ pytest openentrance/tests/
```
If you see a few warnings, this is (probably) also ok...

The result should look similar to the following snippet:

### Option 2: Install directly from GitHub
```
============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-5.4.3, py-1.10.0, pluggy-0.13.1
collected 20 items
Open a command prompt and run
tests/test_core.py .. [ 10%]
tests/test_definitions.py ...... [ 40%]
tests/test_validate.py ............ [100%]
```
pip install git+https://github.com/openENTRANCE/nomenclature
============================= 20 passed in 40.83s ==============================
```

> :warning: You will have to repeat this step whenever you want
> to update the `openentrance` package on your machine.
If you see a few warnings, this is (probably) also ok...
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name = openentrance
author = openENTRANCE consortium
author_email = [email protected]
license = APACHE-2.0
description = Nomenclature for the openENTRANCE project: variables, units, regions, ...
description = Nomenclature and utility methods for the Horizon 2020 openENTRANCE project
long_description = file: README.md
long_description_content_type = text/x-md
url = https://github.com/openENTRANCE/nomenclature
url = https://github.com/openENTRANCE/openentrance

[options]
packages = openentrance
install_requires =
setuptools >= 41
pyyaml
nomenclature
nomenclature-iamc
pyam-iamc >= 1.0 # the pyam package is released on pypi under this name
iam-units >= 2021.11.12
setup_requires =
Expand Down

0 comments on commit f211295

Please sign in to comment.