Skip to content

Commit

Permalink
Merge pull request #205 from raphaelquast/dev
Browse files Browse the repository at this point in the history
Merge for v8.0
  • Loading branch information
raphaelquast authored Mar 15, 2024
2 parents a285226 + b68c7df commit 1410b52
Show file tree
Hide file tree
Showing 133 changed files with 14,326 additions and 7,895 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/Publish_to_PyPi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ jobs:
# Sets up python3
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.11

- name: Upgrade pip, install setuptools, wheel and twine
run: |
# Upgrade pip
python -m pip install --upgrade pip
# Install build dependencies
python -m pip install --upgrade pip build
python -m pip install setuptools wheel twine
# Upload to TestPyPI
- name: Build and Upload to PyPI
run: |
python setup.py sdist bdist_wheel
python -m build
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
Expand Down
36 changes: 12 additions & 24 deletions .github/workflows/testMaps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,28 @@ jobs:
# set operating systems to test
os: [ubuntu-latest]
# set python versions to test
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

name: test_Maps ${{ matrix.os }} ${{ matrix.python-version }}
steps:
# checkout repository
- uses: actions/checkout@v3
# install miniconda environment
- uses: conda-incubator/setup-miniconda@v2

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: tests/test_env.yml

# use mamba to speed up installation
#mamba-version: "*"
#channels: conda-forge
#channel-priority: true

miniforge-variant: Mambaforge
miniforge-version: latest

activate-environment: eomaps

show-channel-urls: true
use-only-tar-bz2: true

python-version: ${{ matrix.python-version }}

auto-activate-base: false
auto-update-conda: true
# run pytest
- name: test Maps
# do this to ensure proper activation of conda environment
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
create-args: >-
python=${{ matrix.python-version }}
- name: Test Maps
shell: bash -l {0}
run: |
python -m pytest --cov=eomaps --cov-report=xml
pip install -e .[all]
python -m pytest -v --cov=eomaps --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ docs/_build
docs/debug.log
docs/.vscode
docs/generated
docs/api/autodoc_additional_props.rst

docs/_tables
docs/_static/example_gifs_very_old

Expand All @@ -26,3 +28,7 @@ tests/.ipynb_checkpoints
tests/.pylint.d

_exclude*

docs/jupyter_execute/*
docs/.jupyter_cache/*
docs/.virtual_documents/*
9 changes: 7 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ version: 2
build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"
python: "mambaforge-22.9"

conda:
environment: tests/test_env.yml
environment: docs/docs_env.yml

python:
install:
- method: pip
path: .
60 changes: 54 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#

# Contributing to EOmaps

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

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!

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.

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!



## General infos

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

- Releases are hosted on [pypi](https://pypi.org/project/EOmaps/) and [conda-forge](https://anaconda.org/conda-forge/eomaps)

## Development Practices

This section provides a **quick overview** how we conduct development in the EOmaps repository.

**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!


### Testing

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.

Run the primary test suite and generate coverage report:

```bash
python -m pytest -v --cov eomaps
```

Unit testing can take some time, if you wish to speed it up, set the
number of processors with the ``-n`` flag. This uses [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to leverage multiple processes. Example usage:

```bash
python -m pytest -n <NUMCORE> --cov eomaps
```

> NOTE: During the tests, a lot of figures will be created and destroyed!
### Style Checking

To ensure your code meets minimum code styling standards, run:

```bash
pip install pre-commit
pre-commit run --all-files
```

You can also install this as a pre-commit hook by running::

```bash
pre-commit install
```

This way, pre-commits will run automatically before each commit to ensure that you do not push code that fails the style checks.

## Building the Documentation

Build the documentation, navigate to the `eomaps/docs` directory (containing the `make.bat`) file and then run:

```bash
make html
```

The generated documentation can be found in the ``doc/build/html``
directory.
Loading

0 comments on commit 1410b52

Please sign in to comment.