Skip to content

Commit

Permalink
Update install instructions (#644)
Browse files Browse the repository at this point in the history
* Add new installation guide

* Remove old installation guides

* Fix links to install instructions and update FAQs

* Update CHANGELOG.md

* Tweak install instructions

* Apply suggestions from code review

Co-authored-by: Emanuel Schmid <51439563+emanuel-schmid@users.noreply.github.com>

* Use curl to download conda environment specs

* Fix indentation in install.rst

* Fix Sphinx warnings and minor issues with installation instructions

---------

Co-authored-by: Emanuel Schmid <51439563+emanuel-schmid@users.noreply.github.com>
  • Loading branch information
peanutfun and emanuel-schmid authored Feb 16, 2023
1 parent 1ba2743 commit 5d35778
Show file tree
Hide file tree
Showing 11 changed files with 526 additions and 614 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ updated:
[#615](https://github.com/CLIMADA-project/climada_python/pull/615),
[#617](https://github.com/CLIMADA-project/climada_python/pull/617),
[#622](https://github.com/CLIMADA-project/climada_python/pull/622).
- Updated installation instructions [#644](https://github.com/CLIMADA-project/climada_python/pull/644)

### Fixed

Expand Down
26 changes: 9 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,22 @@ Before you start, please have a look at our [Developer Guide][devguide].

To contribute follow these steps:

1. Install CLIMADA following the [installation instructions for developers](https://climada-python.readthedocs.io/en/stable/guide/Guide_Installation.html#Install-CLIMADA-from-sources-(for-developers)).
2. Additionally, install the packages for developers:

```bash
conda update -n climada_env -f climada_python/requirements/env_developer.yml
```

3. In the CLIMADA repository, create a new feature branch from the latest `develop` branch:
1. Install CLIMADA following the [installation instructions for developers](https://climada-python.readthedocs.io/en/latest/guide/install.html#advanced-instructions).
2. In the CLIMADA repository, create a new feature branch from the latest `develop` branch:

```bash
git checkout develop && git pull
git checkout -b feature/my-fancy-branch
```

4. Implement your changes and commit them with [meaningful and well formatted](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) commit messages.
5. Add [unit and integration tests][testing] to your code, if applicable.
6. Use [Pylint](https://pypi.org/project/pylint/) for a static code analysis of your code with CLIMADA's configuration `.pylintrc`:
3. Implement your changes and commit them with [meaningful and well formatted](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) commit messages.
4. Add [unit and integration tests][testing] to your code, if applicable.
5. Use [Pylint](https://pypi.org/project/pylint/) for a static code analysis of your code with CLIMADA's configuration `.pylintrc`:
```bash
pylint
```
7. Add your name to the [AUTHORS](AUTHORS.md) file.
8. Push your updates to the remote repository:
6. Add your name to the [AUTHORS](AUTHORS.md) file.
7. Push your updates to the remote repository:
```bash
git push --set-upstream origin feature/my-fancy-branch
Expand All @@ -47,11 +39,11 @@ To contribute follow these steps:
git push --set-upstream fork feature/my-fancy-branch
```
9. On the [CLIMADA-project/climada_python](https://github.com/CLIMADA-project/climada_python) GitHub repository, create a new pull request with target branch `develop`.
8. On the [CLIMADA-project/climada_python](https://github.com/CLIMADA-project/climada_python) GitHub repository, create a new pull request with target branch `develop`.
This also works if you pushed to a fork instead of the main repository.
Add a description and explanation of your changes and work through the pull request author checklist provided.
Feel free to request reviews from specific team members.
10. After approval of the pull request, the branch is merged into `develop` and your changes will become part of the next CLIMADA release.
9. After approval of the pull request, the branch is merged into `develop` and your changes will become part of the next CLIMADA release.
## Resources
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the Python (3.8+) version of CLIMADA - please see https://github.com/dav

## Getting started

CLIMADA runs on Windows, macOS and Linux. It can be installed from sources or - in case of climada_python - directly with pip. See the [installation guide](https://climada-python.readthedocs.io/en/latest/guide/Guide_Installation.html) for instructions.
CLIMADA runs on Windows, macOS and Linux. It can be installed from sources or - in case of climada_python - directly with pip. See the [installation guide](https://climada-python.readthedocs.io/en/latest/guide/install.html) for instructions.

Follow the [tutorial](https://climada-python.readthedocs.io/en/latest/tutorial/1_main_climada.html) `climada_python-x.y.z/doc/tutorial/1_main_climada.ipynb` in a Jupyter Notebook to see what can be done with CLIMADA and how.

Expand Down
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can switch to `latest`, which refers to the latest version of the `develop`
You can also build and browse the documentation on your machine.
This can be useful if you want to access the documentation of a particular feature branch or to check your updates to the documentation.

For building the documentation, you need to follow the [installation instructions for developers](https://climada-python.readthedocs.io/en/latest/guide/Guide_Installation.html#Install-CLIMADA-from-sources-(for-developers)).
For building the documentation, you need to follow the [advanced installation instructions](https://climada-python.readthedocs.io/en/latest/guide/install.html#advanced-instructions).
Make sure to install the developer requirements as well.

Then, activate the `climada_env` and navigate to the `doc` directory:
Expand Down
3 changes: 2 additions & 1 deletion doc/guide/Guide_Git_Development.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -310,7 +311,7 @@
" git clone https://github.com/CLIMADA-project/climada_python.git\n",
"```\n",
"2. **Install the packages** in ``climada_python/requirements/env_climada.yml`` and\n",
" ``climada_python/requirements/env_developer.yml`` (see [install](../guide/Guide_Installation.ipynb)). You\n",
" ``climada_python/requirements/env_developer.yml`` (see [Installation](install.rst)). You\n",
" might need to install additional environments contained in ``climada_python/requirements``\n",
" when using specific functionalities.\n"
]
Expand Down
Loading

0 comments on commit 5d35778

Please sign in to comment.