Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.13" ]
python-version: [ "3.14" ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
Expand All @@ -69,11 +69,12 @@ jobs:
cache-downloads: true
cache-environment: true
environment-file: environment.yml
environment-name: finch
create-args: >-
python=${{ matrix.python-version }}
- name: Install finch-wps
run: |
make develop
make install
- name: Check versions
run: |
python -m pip check
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build:
python: "mambaforge-23.11"

conda:
environment: environment-docs.yml
environment: environment.yml

# Optionally set the version of Python and requirements required to build your docs
python:
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ help: ## print this help message. (Default)
.PHONY: install
install: ## install finch application
@echo "Installing application ..."
@-bash -c 'pip install -e .'
@-bash -c 'python -m pip install --editable .'
@echo "\nStart service with \`make start\` and stop with \`make stop\`."

develop: ## install finch application with development libraries
@echo "Installing development requirements for tests and docs ..."
@-bash -c 'pip install -e ".[dev]"'
Comment thread
aulemahal marked this conversation as resolved.
@-bash -c 'test "${CONDA_PREFIX:-''} == $(dirname $(dirname $(which python)))" && echo "You are installing deps with pip inside a conda environment, this could lead to broken conda environments."'
@-bash -c 'python -m pip install --editable ".[dev]"'

start: ## start finch service as daemon (background process)
@echo "Starting application ..."
Expand Down
52 changes: 1 addition & 51 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,51 +53,6 @@
"sphinxcontrib.bibtex",
]

# To avoid having to install these and burst memory limit on ReadTheDocs.
# List of all tested working mock imports from all birds so new birds can
# inherit without having to test which work which do not.
if os.environ.get("READTHEDOCS") == "True":
autodoc_mock_imports = [
"affine",
"bottleneck",
"cairo",
"cartopy",
"cftime",
"cf_xarray",
"clisops",
"dask",
"fiona",
"gdal",
"geopandas",
"geos",
"geotiff",
"hdf4",
"hdf5",
"matplotlib",
"netCDF4",
"numba",
"numpy",
"ocgis",
"osgeo",
"pandas",
"parse",
"proj",
"pyproj",
"rasterio",
"rasterstats",
"scikit-learn",
"scipy",
"sentry_sdk",
"shapely",
"siphon",
"sklearn",
"slugify",
"spotpy",
"statsmodels",
"unidecode",
"xarray",
"zlib",
]

# Bibliography stuff, for correct xclim docstring formatting
# We need to download the reference file from xclim for the correct version.
Expand All @@ -124,12 +79,7 @@
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
}

# Monkeypatch constant because the following are mock imports.
# Only works if numpy is actually installed and at the same time being mocked.
# import numpy
# numpy.pi = 3.1416

# We are using mock imports in readthedocs, so probably safer to not run the notebooks
# Probably safer to not run the notebooks
nbsphinx_execute = "never"

# Add any paths that contain templates here, relative to this directory.
Expand Down
23 changes: 12 additions & 11 deletions docs/source/dev_guide.rst
Comment thread
aulemahal marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Developer Guide
Building the docs
-----------------

First install dependencies for the documentation:
First install an environment with conda/mamba and finch within it.

.. code-block:: shell

$ make develop
$ mamba env create -f environment.yml
$ mamba activate finch
$ pip install -e .

Run the Sphinx docs generator:

Expand All @@ -33,14 +35,13 @@ Running tests

Run tests using pytest_.

First activate the ``finch`` Conda environment and install ``pytest``.
First install an environment with conda/mamba and finch within it.

.. code-block:: shell

$ source activate finch
$ pip install -e ".[dev]" # if not already installed
# or
$ make develop
$ mamba env create -f environment.yml
$ mamba activate finch
$ pip install -e .

Run quick tests (skip slow and online):

Expand Down Expand Up @@ -82,11 +83,11 @@ To update the `conda` specification file for building identical environments_ on

.. code-block:: console

$ conda env create -f environment.yml
$ source activate finch
$ mamba env create -f environment.yml
$ mamba activate finch
$ make clean
$ make install
$ conda list -n finch --explicit > spec-file.txt
$ pip install -e .
$ mamba list -n finch --explicit > spec-file.txt

.. _environments: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments

Expand Down
13 changes: 3 additions & 10 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ Check out code from the Finch GitHub repo and start the installation:
$ git clone https://github.com/bird-house/finch.git
$ cd finch

Create Conda environment named `finch`:
Create Conda environment named `finch` (including the development and documentation dependencies):

.. code-block:: console

$ conda env create -f environment.yml
$ source activate finch
$ conda activate finch

Install `finch` app:

Expand All @@ -54,17 +54,10 @@ Install `finch` app:
OR
$ make install

For development you can use this command:

.. code-block:: console

$ pip install -e .[dev]
OR
$ make develop

Install from Conda
------------------

.. note::

`finch` is not yet available on conda-forge. But we are working on making this package available soon!
There are no plans to make `finch` available on conda-forge.
34 changes: 0 additions & 34 deletions environment-dev.yml

This file was deleted.

18 changes: 0 additions & 18 deletions environment-docs.yml

This file was deleted.

46 changes: 37 additions & 9 deletions environment.yml
Comment thread
aulemahal marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python >=3.10,<3.13
- pip >=25.3.0
- python >=3.11,<3.15
- pip >=26.1.0
- anyascii >=0.3.0
- cftime >=1.4.1
- cf_xarray >=0.9.3
- click >=8.0.0
- click >=8.1.7
- clisops >=0.16.2
- dask >=2023.5.1,<2025.3.0
- dask >=2023.5.1
- distributed
- geopandas >=1.0
- jinja2 >=3.1.4
- netcdf4 <=1.7.2
- numcodecs <0.16.0
- netcdf4
- numpy >=1.25.0
- pandas >=2.2.0,<3.0
- parse >=1.20
Expand All @@ -28,9 +27,38 @@ dependencies:
- setuptools >=78.1.1
- siphon >=0.10.0
- werkzeug >=3.0.6
- xarray >=2023.11.0,<2025.03.0
- xclim =0.52.2 # remember to match xclim version in requirements_docs.txt as well
- xarray >=2023.11.0
- xclim >=0.61,<0.62 # remember to match xclim version in pyproject.toml as well
- xesmf >=0.8.2,!=0.8.8
- xscen =0.10.0 # remember to match xscen version in environment.yml as well
- xsdba =0.6.1 # remember to match xsdba version in pyproject.toml as well
- xscen >=0.15,<0.16 # remember to match xscen version in pyproject.toml as well
# Temporary fixes
- fastprogress <1.1 # FIXME: Temporary fix following https://github.com/intake/intake-esm/pull/773. Remove when intake-esm is updated in xscen.
# Dev
Comment thread
aulemahal marked this conversation as resolved.
- birdy >=0.8.1
- black >=26.1.0
- bump-my-version >=1.2.6
- coverage >=7.5.0
- cruft >=2.15.0
- flake8 >=7.3.0
- flake8-rst-docstrings >=0.4.0
- flit >=3.11.0,<4.0
- geojson
- lxml
- nbsphinx >=0.9.8
- nbval >=0.10.0
- owslib
- pip >=25.3.0
- pre-commit >=3.5.0
- pylint >=3.3.3
- pytest >=8.0.0
- pytest-cov >=5.0.0
- pytest-flake8
- ruff >=0.14.0
- watchdog >=4.0.0
- yamllint >=1.26.0
# Docs
- ipython >=8.5.0
- matplotlib-base >=3.5.0
- sphinx >=9.0.0
- sphinxcontrib-bibtex >=2.6.0
Loading
Loading