Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7a9d15c
WIP - major refactoring of ECCC
Zeitsperre Jun 19, 2023
d1a8c67
WIP - more units handling
Zeitsperre Jun 20, 2023
94fe866
WIP - more refactoring - AHCCD incomplete
Zeitsperre Jun 20, 2023
d63523b
broken - refactoring of station writer
Zeitsperre Jun 21, 2023
500ae2a
broken - more refactoring
Zeitsperre Jul 6, 2023
c781287
broken - more refactoring
Zeitsperre Jul 6, 2023
8cf4368
Merge branch 'main' into fix_eccc
Zeitsperre Jul 31, 2023
ce2f6d9
significant refactoring - WIP
Zeitsperre Aug 2, 2023
9baaad5
working version of ahccd conversion
Zeitsperre Aug 3, 2023
53fc8f0
working version of ahccd conversion
Zeitsperre Aug 7, 2023
f454cb6
naming and more dynamic handling of variables
Zeitsperre Aug 7, 2023
9339f30
working version
Zeitsperre Aug 7, 2023
e096824
begin work on obs-summaries
Zeitsperre Aug 7, 2023
268cca1
finishing touches on ahccd
Zeitsperre Aug 9, 2023
8728c66
significant refactoring
Zeitsperre Aug 9, 2023
010d3ea
reduce amount of unit conversions
Zeitsperre Aug 10, 2023
7d8fdf9
refactoring - move treatments to new module, load_json_data_mappings …
Zeitsperre Aug 14, 2023
318957e
more refactoring
Zeitsperre Aug 14, 2023
42b8056
merge main into fix-eccc
Zeitsperre Feb 29, 2024
f5ca682
fix metadata, adjust tests
Zeitsperre Feb 29, 2024
412681c
Merge branch 'main' into fix_eccc
Zeitsperre Mar 4, 2024
c2e442a
error handling
Zeitsperre Mar 6, 2024
f5fce92
better error handling
Zeitsperre Mar 6, 2024
75e8015
import fixes
Zeitsperre Mar 6, 2024
70e5145
WIP - add nrcan-gridded-obs_cf_attrs.json
Zeitsperre Mar 18, 2024
1190b75
fix some checking logic
Zeitsperre Mar 18, 2024
c41e687
Merge branch 'main' into fix_eccc
Zeitsperre Mar 18, 2024
4bdd9c3
correct variable transform and metadata
Zeitsperre Mar 18, 2024
8c4ffcc
fix logic
Zeitsperre Mar 18, 2024
448ba07
fix logic
Zeitsperre Mar 18, 2024
53b9c35
fix logic
Zeitsperre Mar 18, 2024
159fc94
add files to sdist
Zeitsperre Mar 18, 2024
586f4e6
synchronize dependencies
Zeitsperre Mar 18, 2024
6c5586b
debugging
Zeitsperre Mar 18, 2024
e2762d3
chase down bug
Zeitsperre Mar 18, 2024
d20be40
update attr treatments
Zeitsperre Mar 19, 2024
74e7949
fixes
Zeitsperre Mar 19, 2024
4c872c3
Merge branch 'fix_eccc' into add-nrcan
Zeitsperre Mar 19, 2024
42b957d
fix folder name
Zeitsperre Mar 19, 2024
288582f
add support for new `h` freq
Zeitsperre Mar 27, 2024
55ee882
dependencies
Zeitsperre Mar 27, 2024
66a2006
restructure
Zeitsperre Jan 6, 2025
3a2b4c6
ignore excluded
Zeitsperre Jan 6, 2025
264ba2c
ignore downloaded
Zeitsperre Jan 6, 2025
d672ed2
Merge branch 'fix_eccc' into add-nrcan
Zeitsperre Jan 6, 2025
13875cd
update deps
Zeitsperre Jan 6, 2025
6d35a9a
try to negotiate merge
Zeitsperre Jan 6, 2025
fa7be57
remove artifacts
Zeitsperre Jan 6, 2025
8cf5c33
fix style violations
Zeitsperre Jan 6, 2025
e763227
fix bad imports
Zeitsperre Jan 6, 2025
b8756b2
update cookiecutter template
Zeitsperre Jan 6, 2025
0e11f16
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 6, 2025
6e8d062
update conventions
Zeitsperre Jan 6, 2025
bffa6d8
Merge branch 'fix_eccc' into add-nrcan
Zeitsperre Mar 12, 2025
561b593
Merge branch 'main' into fix_eccc
Zeitsperre Mar 17, 2025
0a54661
remove logging config calls, remove calls to deleted modules
Zeitsperre Mar 17, 2025
a8c6944
Merge branch 'fix_eccc' into add-nrcan
Zeitsperre Mar 17, 2025
4aa162e
Apply suggestions from code review
Zeitsperre Mar 21, 2025
1f47036
move nrcan-gridded-obs_cf_attrs.json to new place, remove realm
Zeitsperre Mar 21, 2025
d59c4e6
update CHANGELOG.rst
Zeitsperre Mar 21, 2025
f0aa5cc
Add NRCan Gridded support (#172)
Zeitsperre Mar 21, 2025
54356c4
Merge branch 'main' into fix_eccc
tlogan2000 Mar 27, 2025
02a770e
Merge branch 'main' into fix_eccc
Zeitsperre Apr 17, 2025
234c16a
update pre-commit and readthedocs configurations
Zeitsperre Apr 17, 2025
b986fdb
update CHANGELOG.rst
Zeitsperre Apr 17, 2025
0049f7e
Merge remote-tracking branch 'origin/fix_eccc' into fix_eccc
Zeitsperre Apr 17, 2025
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
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage",
"commit": "1d9ee5f08d3e8e4f78a4aabb75e2ce4eff8750bf",
"commit": "63f44fcbfe2e16118a4fa6b09fe847aa44e0715a",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cache-cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
objects.githubusercontent.com:443

- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Cleanup
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches:
- main
paths-ignore:
- ../../CHANGELOG.rst
- pyproject.toml
Expand Down Expand Up @@ -43,6 +44,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
github.com:443

- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Dependency Review
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
27 changes: 21 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
disable-sudo: true
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
Expand All @@ -61,15 +63,22 @@ jobs:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ] # "3.13"
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
# - "3.13"
steps:
- name: Harden Runner
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
with:
disable-sudo: true
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
Expand Down Expand Up @@ -104,7 +113,12 @@ jobs:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
# - "3.13"
defaults:
run:
shell: bash -l {0}
Expand All @@ -115,15 +129,16 @@ jobs:
disable-sudo: true
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2.0.4
with:
cache-downloads: true
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
micromamba-version: 1.5.10-0 # Pin micromamba version because of following issue: https://github.com/mamba-org/setup-micromamba/issues/225
- name: Install miranda
run: |
python -m pip install --no-deps .
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
pypi.org:443
upload.pypi.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ on:
- main

# Declare default permissions as read only.
permissions: read-all
# Read-all permission is not technically needed for this workflow.
permissions:
contents: read

jobs:
analysis:
Expand Down Expand Up @@ -47,7 +49,7 @@ jobs:
www.bestpractices.dev:443

- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
with:
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Create Release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # 2.2.1
env:
Expand Down Expand Up @@ -52,7 +54,9 @@ jobs:
pypi.org:443
test.pypi.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@ ENV/
# IDE settings
.vscode/
.idea/

# Manually excluded folders
excluded/
templates/downloaded/
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
rev: v3.19.1
hooks:
- id: pyupgrade
args: [ '--py38-plus' ]
args: [ '--py39-plus' ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down Expand Up @@ -41,7 +41,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
rev: v0.11.6
hooks:
- id: ruff
args: [ '--fix' ]
Expand Down Expand Up @@ -74,10 +74,15 @@ repos:
- id: detect-secrets
args: [ '--baseline=.secrets.baseline' ]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.32.1
rev: 0.33.0
hooks:
- id: check-github-workflows
- id: check-readthedocs
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.5.2
hooks:
- id: zizmor
args: [ '--config=.zizmor.yml' ]
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ sphinx:
fail_on_warning: true

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "mambaforge-22.9"
python: "mambaforge-23.11"
jobs:
pre_build:
- sphinx-apidoc -o docs/apidoc --private --module-first src/miranda
Expand Down
6 changes: 6 additions & 0 deletions .zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rules:
dangerous-triggers:
ignore:
- label.yml:9
- first-pull-request.yml:3
- workflow-warning.yml:3
18 changes: 14 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,37 @@
Changelog
=========

.. _changes_0.6.0:

v0.6.0 (unreleased)
-------------------
Contributors to this version: Travis Logan (:user:`tlogan2000`), Trevor James Smith (:user:`Zeitsperre`).
Contributors to this version: Travis Logan (:user:`tlogan2000`), Trevor James Smith (:user:`Zeitsperre`), Aslı Beşe (:user:`aslibese`).

Announcements
^^^^^^^^^^^^^
* `miranda` boilerplate code is now versioned with `cruft <https://cruft.github.io/cruft>`_ and the `Ouranosinc/cookiecutter-pypackage <https://github.com/Ouranosinc/cookiecutter-pypackage>`_ template.
* Python3.8 support has been dropped in favor of Python3.9+.
* The `miranda` library has undergone a significant refactoring to remove unused code and modules that were out of scope for the library.
* The modules `miranda.archive` and `miranda.remote` have been removed and will be moved to a separate project.
* Data treatment functions have been moved to `miranda.treatments`.
* Pre-processing logic and functions have been moved to `miranda.preprocess`.

New features
^^^^^^^^^^^^
* weather station GHCN-D dataset conversion is now supported.
* Conversions for variables in the `GHCN-D` weather station network dataset are now supported.
* Conversion support has been added for the `ORRC`, `CaSR v3.1`, and `RDRS v2.1` datasets.
* ECMWF: Added support for the `era5-single-levels-monthly-means` project.
* ECMWF: Added support for ocean variables (`sst`, `siconc`), convective precipitation variables (`cp`, `cape`), and wind speed (`u`, `v`).
* Aggregation operations now support more variables (`hur`, `hurs`, `huss`, `rlds`, `ta`, `tdp`, `ua`, `uas`, `va`, `vas`)
* `RDRSv21` has been added as a dataset to be converted.
* Minimum values of `0 kg m2 s-1` has been set for both `tp` and `sf` variables in ERA5 and ERA5-Land projects.
* Project user and developer documentation has been greatly expanded. All public functions and modules now have `numpy`-based docstrings.
* The `miranda` library now uses a `src` layout for better packaging and distribution.
* `ruff` checks and formatting standards have been adopted for the entire codebase.
* Added a new configuration for converting the NRCAN gridded climate dataset (`NRCANmet`).

Breaking changes
^^^^^^^^^^^^^^^^
* Removed modules ``miranda.archive`` and ``miranda.remote`` (split into separate project to be announced).
* Removed modules ``miranda.archive`` and ``miranda.remote`` (split into a separate project yet to be published).

Bug fixes
^^^^^^^^^
Expand All @@ -38,6 +47,7 @@ Internal changes
* GitHub Workflows now use commit hashes for both running GitHub Actions and installing Python dependencies from PyPI.
* `miranda` now has a `CODE_OF_CONDUCT.md` file for setting community standards and expectations.
* Now using the GitHub Ouranos bot for automatic version bumping via `bump-version.yml`.
* Adjusted calls using `os.path` to use `pathlib` for better cross-platform compatibility.

.. _changes_0.5.0:

Expand Down
22 changes: 11 additions & 11 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ dependencies:
- xesmf
- zarr
# Dev tools and testing
- pip >=24.2.0
- bump-my-version >=0.25.1
- watchdog >=4.0.0
- pip >=24.3.1
- black ==24.10.0
- blackdoc ==0.3.9
- bump-my-version >=0.28.0
- coverage >=7.5.0
- coveralls >=4.0.1
- flake8 >=7.1.1
- flake8-rst-docstrings >=0.3.0
- flit >=3.9.0,<4.0
- tox >=4.17.1
- coverage >=7.5.0
- coveralls >=4.0.1
- pytest >=8.3.2
- pytest-cov >=5.0.0
- black ==24.8.0
- blackdoc ==0.3.9
- isort ==5.13.2
- numpydoc >=1.8.0
- pre-commit >=3.5.0
- ruff >=0.5.7
- pytest >=8.3.2
- pytest-cov >=5.0.0
- ruff >=0.8.2
- tox >=4.23.2
- watchdog >=4.0.0
7 changes: 3 additions & 4 deletions environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: miranda
channels:
- conda-forge
dependencies:
- python >=3.12,<3.13
- sphinx >=7.0.0
- pandoc
- python >=3.9,<3.13
# Docs
- furo >=2023.07.26
- ipython
- ipykernel
- nbsphinx
- sphinx >=7.1.0
- sphinx-codeautolink
- sphinx-copybutton
- sphinx-intl
- sphinx-mdinclude
- sphinxcontrib-napoleon
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,20 @@ dev = [
# Dev tools and testing
"black ==25.1.0",
"blackdoc ==0.3.9",
"bump-my-version >=0.26.0",
"bump-my-version >=0.28.0",
"coverage >=7.5.0",
"coveralls >=4.0.1",
"flake8 >=7.1.1",
"flake8-rst-docstrings >=0.3.0",
"flit >=3.9.0,<4.0",
"isort ==6.0.1",
"mypy",
"numpydoc >=1.8.0",
"pip >=24.2.0",
"pip >=25.0",
"pre-commit >=3.5.0",
"pytest >=8.3.2",
"pytest-cov >=5.0.0",
"ruff >=0.5.7",
"tox >=4.18.0",
"ruff >=0.9.0",
"tox >=4.24.1",
"watchdog >=4.0.0"
]
docs = [
Expand All @@ -78,7 +77,6 @@ docs = [
"ipython",
"jupyter_client",
"nbsphinx",
"pygments",
"sphinx >=7.0.0,<8.2.0",
"sphinx-intl",
"sphinx-mdinclude",
Expand Down Expand Up @@ -230,6 +228,7 @@ exclude = [
".pre-commit-config.yaml",
".readthedocs.yml",
".yamllint.yaml",
".zizmor.yml",
"docs/_*",
"docs/apidoc/modules.rst",
"docs/apidoc/miranda*.rst",
Expand Down
Loading