Skip to content

Commit 1410b52

Browse files
authored
Merge pull request #205 from raphaelquast/dev
Merge for v8.0
2 parents a285226 + b68c7df commit 1410b52

File tree

133 files changed

+14326
-7895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+14326
-7895
lines changed

.github/workflows/Publish_to_PyPi.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@ jobs:
1616
# Sets up python3
1717
- uses: actions/setup-python@v4
1818
with:
19-
python-version: 3.7
19+
python-version: 3.11
2020

2121
- name: Upgrade pip, install setuptools, wheel and twine
2222
run: |
23-
# Upgrade pip
24-
python -m pip install --upgrade pip
25-
# Install build dependencies
23+
python -m pip install --upgrade pip build
2624
python -m pip install setuptools wheel twine
2725
28-
# Upload to TestPyPI
2926
- name: Build and Upload to PyPI
3027
run: |
31-
python setup.py sdist bdist_wheel
28+
python -m build
3229
python -m twine upload dist/*
3330
env:
3431
TWINE_USERNAME: __token__

.github/workflows/testMaps.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,28 @@ jobs:
1313
# set operating systems to test
1414
os: [ubuntu-latest]
1515
# set python versions to test
16-
python-version: ["3.8", "3.9", "3.10"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1717

1818
name: test_Maps ${{ matrix.os }} ${{ matrix.python-version }}
1919
steps:
2020
# checkout repository
2121
- uses: actions/checkout@v3
2222
# install miniconda environment
23-
- uses: conda-incubator/setup-miniconda@v2
23+
24+
- uses: mamba-org/setup-micromamba@v1
2425
with:
2526
environment-file: tests/test_env.yml
26-
27-
# use mamba to speed up installation
28-
#mamba-version: "*"
29-
#channels: conda-forge
30-
#channel-priority: true
31-
32-
miniforge-variant: Mambaforge
33-
miniforge-version: latest
34-
35-
activate-environment: eomaps
36-
37-
show-channel-urls: true
38-
use-only-tar-bz2: true
39-
40-
python-version: ${{ matrix.python-version }}
41-
42-
auto-activate-base: false
43-
auto-update-conda: true
44-
# run pytest
45-
- name: test Maps
46-
# do this to ensure proper activation of conda environment
27+
init-shell: >-
28+
bash
29+
cache-environment: true
30+
post-cleanup: 'all'
31+
create-args: >-
32+
python=${{ matrix.python-version }}
33+
- name: Test Maps
4734
shell: bash -l {0}
4835
run: |
49-
python -m pytest --cov=eomaps --cov-report=xml
36+
pip install -e .[all]
37+
python -m pytest -v --cov=eomaps --cov-report=xml
5038
- name: Upload coverage to Codecov
5139
uses: codecov/codecov-action@v3
5240
with:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ docs/_build
88
docs/debug.log
99
docs/.vscode
1010
docs/generated
11+
docs/api/autodoc_additional_props.rst
12+
1113
docs/_tables
1214
docs/_static/example_gifs_very_old
1315

@@ -26,3 +28,7 @@ tests/.ipynb_checkpoints
2628
tests/.pylint.d
2729

2830
_exclude*
31+
32+
docs/jupyter_execute/*
33+
docs/.jupyter_cache/*
34+
docs/.virtual_documents/*

.readthedocs.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ version: 2
33
build:
44
os: "ubuntu-20.04"
55
tools:
6-
python: "mambaforge-4.10"
6+
python: "mambaforge-22.9"
77

88
conda:
9-
environment: tests/test_env.yml
9+
environment: docs/docs_env.yml
10+
11+
python:
12+
install:
13+
- method: pip
14+
path: .

CONTRIBUTING.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#
2-
31
# Contributing to EOmaps
42

53
Interested in contributing to EOmaps? Awesome! Any contributions are welcome!
@@ -13,12 +11,8 @@ We greatly appreciate any ideas how we can improve the code and documentation.
1311

1412
EOmaps aims to be a feature-rich, performant and user-friendly tool for geographic data visualization and analysis. We highly welcome pull-requests for bug-fixes, improvements or entirely new features to improve the package!
1513

16-
A detailed introduction on how to setup a development environment to contribute code to EOmaps is provided in the [Contribution Guide](https://eomaps.readthedocs.io/en/latest/contribute.html) of the documentation.
17-
1814
If you got some questions or need help to get started, don't hesitate to get in touch by opening a new [issue](https://github.com/raphaelquast/EOmaps/issues), or [discussion](https://github.com/raphaelquast/EOmaps/discussions) on GitHub!
1915

20-
21-
2216
## General infos
2317

2418
- All of the `EOmaps` codebase is hosted on [GitHub](https://github.com/)
@@ -32,3 +26,57 @@ If you got some questions or need help to get started, don't hesitate to get in
3226
- The documentation is generated with [sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [ReadTheDocs](https://docs.readthedocs.io)
3327

3428
- Releases are hosted on [pypi](https://pypi.org/project/EOmaps/) and [conda-forge](https://anaconda.org/conda-forge/eomaps)
29+
30+
## Development Practices
31+
32+
This section provides a **quick overview** how we conduct development in the EOmaps repository.
33+
34+
**More detailed instructions** on how to setup a development environment and contribute code to EOmaps are provided in the [Contribution Guide](https://eomaps.readthedocs.io/en/latest/contribute.html) of the documentation!
35+
36+
37+
### Testing
38+
39+
After making changes, please test changes locally before creating a pull request. The following tests will be executed after any commit or pull request, so we ask that you perform the following sequence locally to track down any new issues from your changes.
40+
41+
Run the primary test suite and generate coverage report:
42+
43+
```bash
44+
python -m pytest -v --cov eomaps
45+
```
46+
47+
Unit testing can take some time, if you wish to speed it up, set the
48+
number of processors with the ``-n`` flag. This uses [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to leverage multiple processes. Example usage:
49+
50+
```bash
51+
python -m pytest -n <NUMCORE> --cov eomaps
52+
```
53+
54+
> NOTE: During the tests, a lot of figures will be created and destroyed!
55+
56+
### Style Checking
57+
58+
To ensure your code meets minimum code styling standards, run:
59+
60+
```bash
61+
pip install pre-commit
62+
pre-commit run --all-files
63+
```
64+
65+
You can also install this as a pre-commit hook by running::
66+
67+
```bash
68+
pre-commit install
69+
```
70+
71+
This way, pre-commits will run automatically before each commit to ensure that you do not push code that fails the style checks.
72+
73+
## Building the Documentation
74+
75+
Build the documentation, navigate to the `eomaps/docs` directory (containing the `make.bat`) file and then run:
76+
77+
```bash
78+
make html
79+
```
80+
81+
The generated documentation can be found in the ``doc/build/html``
82+
directory.

0 commit comments

Comments
 (0)