Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provision-with-micromamba is deprecated #102

Merged
merged 10 commits into from
Mar 14, 2024
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
25 changes: 12 additions & 13 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,31 @@ jobs:
fetch-depth: 0

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Build environment
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip
--file requirements.txt
--file docs/requirements.txt
--channel conda-forge
- name: Install ioos_qc
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 --file requirements.txt --file docs/requirements.txt --channel conda-forge
micromamba activate TEST
python -m pip install -e . --no-deps --force-reinstall
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(python setup.py --version)

- name: Build documentation
shell: bash -l {0}
run: |
run: >
set -e
micromamba activate TEST
pushd docs
make clean html linkcheck
popd
- name: Deploy
if: github.event_name == 'release' || github.event_name == 'push'
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Install build tools
run: |
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
python -m pip install --upgrade pip build twine
shell: bash

- name: Build binary wheel
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,38 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest]
numba: [true, false]
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
- name: Setup Micromamba ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false

- name: Python ${{ matrix.python-version }}
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} pip
--file requirements.txt
--file requirements-dev.txt
--channel conda-forge
- name: Install ioos_qc
shell: bash -l {0}
run: |
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file tests/requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall
python -m pip install -e . --no-deps --force-reinstall
- name: numba
# numba is listed in requirements.txt so we need to remove it below.
if: ${{ ! matrix.numba }}
shell: bash -l {0}
run: |
micromamba activate TEST
micromamba remove numba
- name: Debug conda
shell: bash -l {0}
run: |
micromamba activate TEST
micromamba info --all
micromamba list
- name: Tests
shell: bash -l {0}
run: |
micromamba activate TEST
python -m pytest --disable-warnings
python -m pytest --disable-warnings
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-ast
Expand All @@ -10,12 +10,12 @@ repos:
- id: file-contents-sorter

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 7.0.0
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
rev: v2.2.6
hooks:
- id: codespell
exclude: >
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/usage/storms_qc_test_1054.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@
"xs = XarrayStream(data_xr, time=\"time\", lat=\"latitude\", lon=\"longitude\")\n",
"qc_results = xs.run(c)\n",
"\n",
"# Since we may want to re-use the results in multiple\n",
"# Since we may want to reuse the results in multiple\n",
"# stores we want to evaluate the checks now so it isn't\n",
"# a generator. This is going to run all of the checks!\n",
"qc_results = list(qc_results)\n",
Expand Down Expand Up @@ -1756,7 +1756,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1770,7 +1770,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/usage/storms_qc_test_1055.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@
"xs = XarrayStream(data_xr, time=\"time\", lat=\"latitude\", lon=\"longitude\")\n",
"qc_results = xs.run(c)\n",
"\n",
"# Since we may want to re-use the results in multiple\n",
"# Since we may want to reuse the results in multiple\n",
"# stores we want to evaluate the checks now so it isn't\n",
"# a generator. This is going to run all of the checks!\n",
"qc_results = list(qc_results)"
Expand Down Expand Up @@ -1716,7 +1716,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1730,7 +1730,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/usage/storms_qc_test_ncCF_error.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@
"xs = XarrayStream(data_xr, time=\"time\", lat=\"latitude\", lon=\"longitude\")\n",
"qc_results = xs.run(c)\n",
"\n",
"# Since we may want to re-use the results in multiple\n",
"# Since we may want to reuse the results in multiple\n",
"# stores we want to evaluate the checks now so it isn't\n",
"# a generator. This is going to run all of the checks!\n",
"qc_results = list(qc_results)\n",
Expand Down Expand Up @@ -1717,7 +1717,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1731,7 +1731,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
3 changes: 3 additions & 0 deletions tests/requirements.txt → requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
bokeh
dask
erddapy
flake8
isort
nco
numba<0.57
pytest
pytest-flake8>=1.0.4 # https://github.com/tholo/pytest-flake8/pull/59
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
bokeh
geographiclib
geojson
h5netcdf
jsonschema
numba
numpy>=1.14
pandas
pyparsing
Expand Down
12 changes: 6 additions & 6 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def setUp(self):
config_str = """
region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -171,8 +171,8 @@ def setUp(self):
type: Point
coordinates: [-72, 34]
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand All @@ -188,8 +188,8 @@ def setUp(self):
type: Point
coordinates: [-80,40]
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down
32 changes: 16 additions & 16 deletions tests/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def setUp(self):
config = """
region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -146,8 +146,8 @@ def setUp(self):
config = """
region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -206,8 +206,8 @@ def setUp(self):
config = """
region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -271,8 +271,8 @@ def setUp(self):
config = """
region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-04-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-04-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -336,8 +336,8 @@ def setUp(self):
contexts:
- region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-02-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-02-01T00:00:00
streams:
variable1:
qartod:
Expand All @@ -351,8 +351,8 @@ def setUp(self):
fail_span: [22, 25]
- region: something else
window:
starting: 2020-02-01T00:00:00Z
ending: 2020-03-01T00:00:00Z
starting: 2020-02-01T00:00:00
ending: 2020-03-01T00:00:00
streams:
variable1:
qartod:
Expand Down Expand Up @@ -423,8 +423,8 @@ def setUp(self):
contexts:
- region: something
window:
starting: 2020-01-01T00:00:00Z
ending: 2020-02-01T00:00:00Z
starting: 2020-01-01T00:00:00
ending: 2020-02-01T00:00:00
streams:
variable1:
qartod:
Expand All @@ -438,8 +438,8 @@ def setUp(self):
fail_span: [22, 25]
- region: something else
window:
starting: 2020-02-01T00:00:00Z
ending: 2020-03-01T00:00:00Z
starting: 2020-02-01T00:00:00
ending: 2020-03-01T00:00:00
streams:
variable1:
qartod:
Expand Down
Loading