Skip to content

Commit

Permalink
Add Quick Start Documentation to use Conda Package (#24)
Browse files Browse the repository at this point in the history
This commit updates the README documentation to include a quick start guide for normal users that installs the conda package, rather than from source. The old installation documentation is now moved to a new "Development" section. Additional changes are:

1. Pinning dependency package numbers to minor versions in attempt to avoid dependency driven failures.
1. Using python-semantic-release (https://python-semantic-release.readthedocs.io/en/latest/) for updating version numbers in the source code.
1. Including all development dependencies in `environment.yaml`
1. Add a badge for the conda package
1. Bump to version 0.4.3
  • Loading branch information
H0R5E authored Jan 31, 2022
1 parent 93ed5af commit b3bfaef
Show file tree
Hide file tree
Showing 10 changed files with 200 additions and 100 deletions.
38 changes: 26 additions & 12 deletions .conda/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,30 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python>=3.9.9,<3.10
# Packaging
- pip
- brotlipy
- geopandas-base
- jinja2
- netCDF4
- numpy>=1.21
- pandas
- pyyaml
- scipy
- shapely
- tabulate
- xarray>=0.20.1
- python-semantic-release
# Package
- python >=3.9.9,<3.10
- brotlipy =0.7.*
- geopandas-base =0.10.*
- jinja2 =3.0.*
- netCDF4 =1.5.*
- numpy =1.22.*
- pandas =1.3.*
- pyyaml =6.*
- scipy =1.7.*
- shapely =1.7.*
- tabulate =0.8.*
- xarray =0.20.*,>=0.20.1
# Testing
- mypy
- pytest
- pytest-cov
- pytest-mock
- tox-conda
# Documentation
- sphinx
- sphinx-autodoc-typehints
- pip:
- insipid-sphinx-theme
24 changes: 12 additions & 12 deletions .conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "0.4.2" %}
{% set version = "0.4.3" %}

package:
name: snl-delft3d-cec-verify
Expand Down Expand Up @@ -29,17 +29,17 @@ requirements:
- setuptools
run:
- python >=3.9.9,<3.10
- brotlipy
- geopandas-base
- jinja2
- netCDF4
- numpy >=1.21
- pandas
- pyyaml
- scipy
- shapely
- tabulate
- xarray >=0.20.1
- brotlipy =0.7.*
- geopandas-base =0.10.*
- jinja2 =3.0.*
- netCDF4 =1.5.*
- numpy =1.22.*
- pandas =1.3.*
- pyyaml =6.*
- scipy =1.7.*
- shapely =1.7.*
- tabulate =0.8.*
- xarray =0.20.*,>=0.20.1

test:
imports:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ jobs:
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- run: |
conda config --env --add channels conda-forge
conda info
- name: Install package
run: |
pip install --no-deps -e .
- name: Run tests
run: |
conda install -y pytest
pytest --doctest-modules src
build:
runs-on: ubuntu-latest
Expand All @@ -48,7 +46,6 @@ jobs:
python-version: '3.9'
auto-activate-base: false
- run: |
conda config --env --add channels conda-forge
conda info
- name: Install package
run: |
Expand All @@ -57,8 +54,6 @@ jobs:
run: echo "BUILD_DIR=$(mktemp -d -t pages-XXXXXXXXXX)" >> $GITHUB_ENV
- name: Build docs
run: |
conda install sphinx sphinx-autodoc-typehints
pip install insipid-sphinx-theme
sphinx-build -b html -W --keep-going ./docs ${{ env.BUILD_DIR }}
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/static_type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- run: |
conda config --env --add channels conda-forge
conda info
- name: Install package
run: |
pip install --no-deps -e .
- name: Run checks
run: |
conda install -y mypy
mypy --install-types --non-interactive src
status:
name: Static Type Checks
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ jobs:
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- run: |
conda config --env --add channels conda-forge
conda info
- name: Install package
run: |
pip install --no-deps -e .
- name: Run tests
run: |
conda install -y pytest pytest-cov pytest-mock
pytest --cov --cov-config=setup.cfg --cov-report=xml tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
Loading

0 comments on commit b3bfaef

Please sign in to comment.