File tree Expand file tree Collapse file tree 8 files changed +77
-139
lines changed Expand file tree Collapse file tree 8 files changed +77
-139
lines changed Original file line number Diff line number Diff line change 50
50
shell : bash -l {0}
51
51
strategy :
52
52
matrix :
53
- python-version : ["3.8 ", "3.9 ", "3.10 "]
53
+ python-version : ["3.9 ", "3.10 ", "3.11 "]
54
54
steps :
55
55
- id : skip_check
56
56
uses : fkirc/skip-duplicate-actions@master
98
98
99
99
- if : $${{ steps.skip_check.outputs.should_skip != 'true' || steps.cache.outputs.cache-hit != 'true' }}
100
100
name : Update environment
101
- run : mamba env update -n xcdat_ci -f conda-env/ci.yml
101
+ run : |
102
+ mamba env update -n xcdat_ci -f conda-env/ci.yml
103
+ # Make sure the Python version in the env matches the current matrix version.
104
+ mamba install -c conda-forge python=${{ matrix.python-version }}
102
105
103
106
- if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
104
107
name : Install xcdat
Original file line number Diff line number Diff line change 11
11
- id : check-yaml
12
12
13
13
- repo : https://github.com/psf/black
14
- rev : 23.1 .0
14
+ rev : 23.3 .0
15
15
hooks :
16
16
- id : black
17
17
@@ -30,15 +30,15 @@ repos:
30
30
additional_dependencies : [flake8-isort]
31
31
32
32
- repo : https://github.com/pre-commit/mirrors-mypy
33
- rev : v1.1.1
33
+ rev : v1.4.0
34
34
hooks :
35
35
- id : mypy
36
- args : ["--config=setup.cfg "]
36
+ args : ["--config=pyproject.toml "]
37
37
additional_dependencies :
38
38
[
39
- dask==2023.3.2 ,
40
- numpy== 1.23.5 ,
41
- pandas==1.5.3 ,
42
- xarray== 2023.3 .0,
43
- types-python-dateutil==2.8.19 ,
39
+ dask,
40
+ numpy>= 1.23.0 ,
41
+ pandas,
42
+ xarray>= 2023.2 .0,
43
+ types-python-dateutil,
44
44
]
Original file line number Diff line number Diff line change 6
6
version : 2
7
7
8
8
build :
9
- os : " ubuntu-20.04"
10
- tools :
11
- python : " mambaforge-4.10"
9
+ os : " ubuntu-20.04"
10
+ tools :
11
+ python : " mambaforge-4.10"
12
12
13
13
# Build documentation in the docs/ directory with Sphinx
14
14
sphinx :
@@ -19,4 +19,4 @@ formats:
19
19
- pdf
20
20
21
21
conda :
22
- environment : conda-env/readthedocs .yml
22
+ environment : conda-env/dev .yml
Original file line number Diff line number Diff line change 1
- # Conda xcdat CI/CD environment (used in GH Actions)
1
+ # Conda xcdat CI/CD environment (used in GH Actions).
2
2
name : xcdat_ci
3
3
channels :
4
4
- conda-forge
5
5
- defaults
6
6
dependencies :
7
- # ==================
8
- # Base
9
- # ==================
10
- - python >=3.8
11
- - pip
7
+ # Base - required for building the package.
8
+ # =========================================
9
+ - python >=3.9
12
10
- cf_xarray
13
11
- cftime
14
12
- dask
15
- - esmpy
16
13
- lxml
17
14
- netcdf4
18
- - numpy
15
+ - numpy >=1.23.0 # This version of numpy includes support for Python 3.11.
19
16
- pandas
20
17
- python-dateutil
21
- - xarray
22
- # Constrained because 0.6.3 breaks with import ESMF
23
- # Source: https://github.com/pangeo-data/xESMF/issues/212
24
- - xesmf >0.6.3
18
+ - xarray >=2022.02.0 # This version of Xarray drops support for Python 3.9.
25
19
- xgcm
20
+ # Optional - enables additional features.
21
+ # =========================================
22
+ - xesmf >=0.7.0 # Constrained because https://github.com/pangeo-data/xESMF/issues/212.
26
23
# Quality Assurance
27
24
# ==================
28
25
- types-python-dateutil
Original file line number Diff line number Diff line change @@ -4,29 +4,24 @@ channels:
4
4
- conda-forge
5
5
- defaults
6
6
dependencies :
7
- # ==================
8
- # Base
9
- # ==================
10
- # NOTE: If versions are updated, also `additional_dependencies` list for mypy in `.pre-commit-config.yaml`
11
- - python=3.10.10
12
- - pip=23.0.1
13
- - cf_xarray=0.8.0
14
- - cftime=1.6.2
15
- - dask=2023.3.2
16
- - lxml=4.9.2
17
- - netcdf4=1.6.3
18
- - numpy=1.23.5
19
- - pandas=1.5.3
20
- - python-dateutil=2.8.2
21
- - xarray=2023.4.2
22
- - xgcm=0.8.0
23
- # ==================
24
- # Optional
25
- # ==================
26
- - xesmf=0.7.0
27
- - matplotlib-base=3.7.1
7
+ # Base - required for building the package.
8
+ # =========================================
9
+ - python >=3.9
10
+ - cf_xarray
11
+ - cftime
12
+ - dask
13
+ - lxml
14
+ - netcdf4
15
+ - numpy >=1.23.0 # This version of numpy includes support for Python 3.11.
16
+ - pandas
17
+ - python-dateutil
18
+ - xarray >=2022.02.0 # This version of Xarray drops support for Python 3.9.
19
+ - xgcm
20
+ # Optional - enables additional features.
21
+ # =========================================
22
+ - xesmf >=0.7.0 # Constrained because https://github.com/pangeo-data/xESMF/issues/212.
23
+ - matplotlib-base >=3.7.0
28
24
- nc-time-axis=1.4.1
29
- # ==================
30
25
# Documentation
31
26
# ==================
32
27
- sphinx=5.3.0
@@ -37,25 +32,22 @@ dependencies:
37
32
- pandoc=3.1.1
38
33
- ipython=8.11.0 # Required for nbsphinx syntax highlighting
39
34
- gsw-xarray=0.3.0 # Required for vertical regridding example
40
- # ==================
41
35
# Quality Assurance
42
36
# ==================
43
- # NOTE: If versions are updated, also update 'rev' in `.pre-commit.config.yaml`
44
- - black=23.1.0
37
+ - types-python-dateutil
38
+ # NOTE: If the tools below are updated, also update their 'rev' in `.pre-commit.config.yaml`
39
+ - black=23.3.0
45
40
- flake8=6.0.0
46
41
- flake8-isort=6.0.0
47
42
- isort=5.12.0
48
- - mypy=1.1.1
43
+ - mypy=1.4.0
49
44
- pre-commit=3.2.0
50
- - types-python-dateutil=2.8.19
51
- # ==================
52
45
# Testing
53
46
# ==================
54
- - pytest=7.2.2
55
- - pytest-cov=4.0.0
56
- # ==================
47
+ - pytest
48
+ - pytest-cov
57
49
# Developer Tools
58
50
# ==================
59
- - jupyterlab=3.6.2
60
- - tbump=6.9.0
51
+ - jupyterlab
52
+ - tbump
61
53
prefix : /opt/miniconda3/envs/xcdat_dev
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -21,3 +21,28 @@ exclude = '''
21
21
)/
22
22
)
23
23
'''
24
+
25
+ [tool .isort ]
26
+ # Docs: https://pycqa.github.io/isort/docs/configuration/options.html#example-pyprojecttoml_4
27
+ multi_line_output = 3
28
+ include_trailing_comma = true
29
+ force_grid_wrap = 0
30
+ use_parentheses = true
31
+ line_length = 88
32
+
33
+ [tool .pytest .ini_options ]
34
+ # Docs: https://docs.pytest.org/en/7.2.x/reference/customize.html#configuration
35
+ junit_family = " xunit2"
36
+ addopts = " --cov=xcdat --cov-report term --cov-report html:tests_coverage_reports/htmlcov --cov-report xml:tests_coverage_reports/coverage.xml -s"
37
+ python_files = [" tests.py" , " test_*.py" ]
38
+ # These markers are defined in `xarray.tests` and must be included to avoid warnings when importing from this module.
39
+ markers = [" flaky" , " network" ]
40
+
41
+ [tool .mypy ]
42
+ # Docs: https://mypy.readthedocs.io/en/stable/config_file.html
43
+ python_version = 3.10
44
+ check_untyped_defs = true
45
+ ignore_missing_imports = true
46
+ warn_unused_ignores = true
47
+ warn_redundant_casts = true
48
+ warn_unused_configs = true
Original file line number Diff line number Diff line change 1
1
[flake8]
2
2
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
3
+ # flake8 dooes not support pyproject.toml yet: https://github.com/PyCQA/flake8/issues/234
3
4
ignore =
4
5
# whitespace before ‘:’
5
6
E203
@@ -23,45 +24,6 @@ exclude =
23
24
*__init__.py
24
25
venv
25
26
26
- [isort]
27
- multi_line_output =3
28
- include_trailing_comma =True
29
- force_grid_wrap =0
30
- use_parentheses =True
31
- line_length =88
32
-
33
- [pycodestyle]
34
- max-line-length = 119
35
- exclude =
36
- .tox
37
- .git
38
- */migrations/*
39
- */static/CACHE/*
40
- docs
41
- node_modules
42
- .idea
43
- .mypy_cache
44
- .pytest_cache
45
- *__init__.py
46
- venv
47
-
48
- [mypy]
49
- python_version = 3.10
50
- check_untyped_defs = True
51
- ignore_missing_imports = True
52
- warn_unused_ignores = True
53
- warn_redundant_casts = True
54
- warn_unused_configs = True
55
-
56
27
[aliases]
57
28
# Define setup.py command aliases here
58
29
test = pytest
59
-
60
- [tool:pytest]
61
- junit_family =xunit2
62
- addopts = --cov =xcdat --cov-report term --cov-report html:tests_coverage_reports/htmlcov --cov-report xml:tests_coverage_reports/coverage.xml -s
63
- python_files = tests.py test_*.py
64
- # These markers are defined in `xarray.tests` and must be included to avoid warnings when importing from this module.
65
- markers =
66
- flaky
67
- network
You can’t perform that action at this time.
0 commit comments