From cfcc86ea12aaeb984472f83debf9e952e6256045 Mon Sep 17 00:00:00 2001 From: malmans2 <mattia.almansi@jhu.edu> Date: Tue, 4 Oct 2022 08:25:39 +0200 Subject: [PATCH 1/3] pin xarray --- .pre-commit-config.yaml | 6 +++--- docs/api.md | 16 ++++++++-------- environment.yml | 2 +- nsv/standardizer.py | 2 +- setup.cfg | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a243aa6..a7ea46b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autofix_prs: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.3.0 hooks: - id: check-added-large-files - id: check-yaml @@ -14,12 +14,12 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 22.1.0 + rev: 22.8.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 5.0.4 hooks: - id: flake8 diff --git a/docs/api.md b/docs/api.md index 053c3df..2c5888d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2,6 +2,14 @@ # nsv +<a id="nsv._version"></a> + +# nsv.\_version + +<a id="nsv.utils"></a> + +# nsv.utils + <a id="nsv.standardizer"></a> # nsv.standardizer @@ -181,14 +189,6 @@ Standardized Meteor cruise POS503 - `Dataset` - Standardized dataset -<a id="nsv.utils"></a> - -# nsv.utils - -<a id="nsv._version"></a> - -# nsv.\_version - <a id="nsv.section_finder"></a> # nsv.section\_finder diff --git a/environment.yml b/environment.yml index 4bde3a3..b0bc870 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - pandas - pooch - scipy - - xarray + - xarray<=2022.03.0 - numpy - matplotlib - ipython diff --git a/nsv/standardizer.py b/nsv/standardizer.py index 1c82c19..cbd8a3f 100644 --- a/nsv/standardizer.py +++ b/nsv/standardizer.py @@ -145,7 +145,7 @@ def _interpolate_latrabjarg_bathymetry(self, dist_coord: DataArray) -> Dataset: ds = ds.interp(**{dist_coord.name: dist_coord.values}) ds = ds.rename_dims({dist_coord.name: "station"}) ds = ds.reset_index(["X"]).reset_coords(["X"]) - + return ds def _initialize_latrabjarg(self, mat) -> Dataset: diff --git a/setup.cfg b/setup.cfg index 80987d1..6ab59fb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ install_requires = pandas pooch scipy - xarray + xarray<=2022.03.0 geopy xoak python_requires = >=3.8 From dc6b30c4b42485952f84cdd0b4da8c99e88aa5b1 Mon Sep 17 00:00:00 2001 From: malmans2 <mattia.almansi@jhu.edu> Date: Tue, 4 Oct 2022 08:40:00 +0200 Subject: [PATCH 2/3] update actions --- .github/workflows/pre-commit.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c77de30..c3d4f21 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -10,6 +10,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.0 From 1e1b56c87d316f680cc8329c7335d0a28af85b14 Mon Sep 17 00:00:00 2001 From: malmans2 <mattia.almansi@jhu.edu> Date: Tue, 4 Oct 2022 08:47:38 +0200 Subject: [PATCH 3/3] try to fix pre-commit --- .github/workflows/pre-commit.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c3d4f21..296dae5 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -11,5 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Install Conda environment with Micromamba + uses: mamba-org/provision-with-micromamba@v13 + with: + environment-file: environment.yml + channels: conda-forge + cache-env: true + - name: Install package + run: | + python -m pip install --no-deps -e . - uses: pre-commit/action@v3.0.0