Skip to content

Commit b614ebe

Browse files
authored
Merge pull request #3 from ecmwf-projects/feature/action_fixes
Feature/action fixes
2 parents 1e41b99 + 85ac17e commit b614ebe

File tree

8 files changed

+25
-10
lines changed

8 files changed

+25
-10
lines changed

.cruft.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"project_short_description": "Polymorphism and duck-typing for geospatial data",
1010
"copyright_holder": "European Centre for Medium Range Weather Forecasts",
1111
"copyright_year": "2022",
12+
"mypy_strict": "False",
1213
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package"
1314
}
1415
},

.github/workflows/on-push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
python -m pip install --no-deps -e .
4949
- name: Run tests
5050
run: |
51-
make test
51+
make unit-tests
5252
5353
type-check:
5454
needs: [unit-tests]
@@ -74,7 +74,7 @@ jobs:
7474
python -m pip install --no-deps -e .
7575
- name: Run code quality checks
7676
run: |
77-
make type-check
77+
echo type-check not used
7878
7979
documentation:
8080
needs: [unit-tests]
@@ -100,7 +100,7 @@ jobs:
100100
python -m pip install --no-deps -e .
101101
- name: Build documentation
102102
run: |
103-
make build-docs
103+
make docs-build
104104
105105
integration-tests:
106106
needs: [unit-tests]
@@ -132,7 +132,7 @@ jobs:
132132
python -m pip install --no-deps -e .
133133
- name: Run tests
134134
run: |
135-
make test
135+
make unit-tests
136136
137137
distribution:
138138
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
rev: v2.4.0
3737
hooks:
3838
- id: pretty-format-yaml
39-
args: [--autofix]
39+
args: [--autofix, --preserve-quotes]
4040
- id: pretty-format-toml
4141
args: [--autofix]
4242
- repo: https://github.com/PyCQA/pydocstyle.git

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ CONDA := conda
33
CONDAFLAGS :=
44
COV_REPORT := html
55

6-
default: qa test type-check
6+
default: qa unit-tests type-check
77

88
qa:
99
pre-commit run --all-files
1010

11-
test:
11+
unit-tests:
1212
python -m pytest -vv --cov=. --cov-report=$(COV_REPORT)
1313

1414
type-check:
15-
python -m mypy --strict .
15+
python -m mypy .
1616

1717
conda-env-update:
1818
$(CONDA) env update $(CONDAFLAGS) -f environment.yml
@@ -26,5 +26,9 @@ docker-run:
2626
template-update:
2727
pre-commit run --all-files cruft -c .pre-commit-config-weekly.yaml
2828

29-
build-docs:
29+
docs-build:
3030
cd docs && rm -fr _api && make clean && make html
31+
32+
#integration-tests:
33+
# python -m pytest -vv --cov=. --cov-report=$(COV_REPORT) tests/integration*.py
34+
# python -m pytest -vv --doctest-glob='*.md'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before pushing to GitHub, run the following commands:
2424
1. Run quality assurance checks: `make qa`
2525
1. Run tests: `make test`
2626
1. Run the static type checker: `make type-check`
27-
1. Build the documentation (see [Sphinx tutorial](https://www.sphinx-doc.org/en/master/tutorial/)): `make build-docs`
27+
1. Build the documentation (see [Sphinx tutorial](https://www.sphinx-doc.org/en/master/tutorial/)): `make docs-build`
2828

2929
## License
3030

environment-minver.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dependencies:
55
- make
66
- pytest
77
- pytest-cov
8+
- numpy

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ channels:
33
- nodefaults
44
dependencies:
55
- make
6+
- mypy
67
- myst-parser
78
- pre-commit
89
- pydata-sphinx-theme

setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ long_description = file: README.md
1616

1717
[options]
1818
packages = find:
19+
install_requires =
20+
numpy
21+
xarray
22+
1923

2024
[flake8]
2125
max-line-length = 110
2226
extend-ignore = E203, W503
27+
28+
[mypy]
29+
strict = False
30+
ignore_missing_imports = True

0 commit comments

Comments
 (0)