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
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
run: |
python -m pip install --upgrade pip
# Install dependencies from the requirements.txt file in the root directory
pip install -r requirements.txt
pip install -r requirements.txt "pytest>=6,<9"

- name: Run tests
run: |
pytest -o addopts="" tests/test_dependencies.py -q
pytest tests/test_wps_drought.py -s
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include Makefile
include *.txt
include *.spec
include environment.yml
include *.rst
include tox.ini
recursive-include albatross *
Expand Down
12 changes: 9 additions & 3 deletions docs/source/dev_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ First activate the ``albatross`` Conda environment and install ``pytest``.

.. code-block:: console

$ source activate albatross
$ conda activate albatross
$ pip install -r requirements_dev.txt # if not already installed
OR
$ make develop
Expand Down Expand Up @@ -79,10 +79,16 @@ Update the Conda specification file to build identical environments_ on a specif
.. code-block:: console

$ conda env create -f environment.yml
$ source activate albatross
$ conda activate albatross
$ make clean
$ make install
$ conda list -n albatross --explicit > spec-file.txt
$ conda install -c conda-forge gunicorn gevent psycopg2=2.9.12 drmaa=0.7.9 dill pytest-cov
$ conda list -n albatross --explicit --md5 > linux-64.spec

Include the current ``wps_conda_packages`` from the Ansible playbook before
exporting; the command above reflects the deployment packages at this update.
Commit ``linux-64.spec`` with any changes to ``environment.yml`` and
``requirements.txt``.

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

Expand Down
33 changes: 32 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Create Conda environment named `albatross`:
.. code-block:: console

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

Install Albatross app:

Expand Down Expand Up @@ -108,6 +108,37 @@ Use Ansible to deploy Albatross on your System
----------------------------------------------

Use the `Ansible playbook`_ for PyWPS to deploy Albatross on your system.
The Linux x86_64 deployment environment is locked in ``linux-64.spec``. It
includes the Conda runtime dependencies and the playbook's Gunicorn, gevent,
psycopg2 2.9.12, DRMAA 0.7.9, dill and test packages.

Set these inventory variables (including any overrides in ``etc/albatross_dkrz.yml``):

.. code-block:: yaml

conda_env_use_spec: true
conda_env_spec_file: linux-64.spec

The old ``spec-list.txt`` has been replaced. Run a full environment deployment
so the updated packages are installed, rather than only updating application code.

To install the same environment manually on Linux x86_64:

.. code-block:: console

$ conda create -n albatross --file linux-64.spec
$ conda activate albatross
$ python -m pip install .

Basemap 1.4.1, its data package and the compatible PyProj 3.6 wheel are
installed by ``pip install .`` through ``requirements.txt``. Basemap and its
data are not included in the Conda spec. Pip replaces the Conda PyProj package
with the version required by Basemap. The pip wheel
avoids the old Conda GEOS pin that conflicts with the deployment's GDAL stack.
``environment.yml`` installs Basemap through its pip section as well.

For other platforms, use ``environment.yml``. Both dependency definitions use
Python 3.11 and PyWPS 4.7, preserving NumPy 1.x and Basemap 1.4 compatibility.


.. _Ansible playbook: http://ansible-wps-playbook.readthedocs.io/en/latest/index.html
31 changes: 22 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
name: nipa_env
name: albatross
channels:
- conda-forge
- defaults
- anaconda
- nodefaults
dependencies:
- python=3.11
- pytest=8.3.5
- pydap
- numpy
- pandas
- matplotlib
- pip
- click
- jinja2
- psutil
- pywps>=4.7,<4.8
# Preserve the Basemap 1.4 plotting stack used by the drought process.
- numpy>=1.26,<2
- pandas>=2.2,<3
- matplotlib-base>=3.8,<3.9
- pyshp>=2.3,<2.4
- packaging>=23,<24
# Basemap's Conda GEOS pin conflicts with the deployment's newer GDAL stack.
- pip:
- -r file:requirements.txt
- basemap==1.4.1
- pyproj>=3.6,<3.7
- pydap>=3.5.4,<3.6
- scipy>=1.15,<2
- scikit-learn
- requests
- werkzeug
# tests
- pytest>=6,<9
234 changes: 234 additions & 0 deletions linux-64.spec

Large diffs are not rendered by default.

87 changes: 11 additions & 76 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,78 +1,13 @@
alabaster==1.0.0
asciitree==0.3.3
attrs==25.3.0
babel==2.17.0
click
jinja2
psutil
pywps>=4.7,<4.8
numpy>=1.26,<2
pandas>=2.2,<3
matplotlib>=3.8,<3.9
basemap==1.4.1
basemap-data==1.3.2
beautifulsoup4==4.13.3
cattrs==24.1.2
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
click-plugins==1.1.1
cligj==0.7.2
contourpy==1.3.1
cycler==0.12.1
Deprecated==1.2.18
docutils==0.21.2
fasteners==0.19
fiona==1.10.1
fonttools==4.56.0
geotiff==0.2.10
humanize==4.12.1
idna==3.10
imagesize==1.4.1
iniconfig==2.0.0
Jinja2==3.1.6
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
kiwisolver==1.4.8
lxml==5.3.1
MarkupSafe==3.0.2
matplotlib==3.8.4
mpl-tools==0.4.0
numcodecs==0.15.1
numpy==1.26.4
OWSLib==0.32.1
packaging==23.2
pandas==2.2.3
pillow==11.1.0
platformdirs==4.3.6
pluggy==1.5.0
pydap==3.5.4
Pygments==2.19.1
pyparsing==3.2.1
pyproj==3.6.1
pyshp==2.3.1
pytest==8.3.5
python-dateutil==2.9.0.post0
pytz==2025.1
pywps==4.6.0
PyYAML==6.0.2
referencing==0.36.2
requests==2.32.3
requests-cache==1.2.1
roman-numerals-py==3.1.0
rpds-py==0.23.1
scipy==1.15.2
six==1.17.0
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==8.2.3
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
SQLAlchemy==2.0.39
tifffile==2025.3.13
typing_extensions==4.12.2
tzdata==2025.1
url-normalize==1.4.3
urllib3==2.3.0
WebOb==1.8.9
Werkzeug==3.1.3
wrapt==1.17.2
zarr==2.12.0
pydap>=3.5.4,<3.6
scipy>=1.15,<2
scikit-learn
requests
werkzeug
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest>=6.0
pytest>=6,<9
pytest-runner
pytest-cov
flake8
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
REQUIRES_PYTHON = ">=3.6.0"
REQUIRES_PYTHON = ">=3.11,<3.12"

about = {}
with open(os.path.join(here, 'albatross', '__version__.py'), 'r') as f:
exec(f.read(), about)

setup_requirements = ['pytest-runner', ]

test_requirements = ['pytest>=3', ]
test_requirements = ['pytest>=6,<9', ]

requirements = [line.strip() for line in open('requirements.txt')]

Expand All @@ -32,9 +32,7 @@
'Programming Language :: Python',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Atmospheric Science',
'License :: OSI Approved :: Apache Software License',
]
Expand Down
Loading
Loading