Skip to content

Commit e32e3a3

Browse files
committed
bump: version 0.3.0 → 0.4.0
1 parent 25c6b87 commit e32e3a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3905
-107
lines changed

.github/actions/setup/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ inputs:
1616
required: false
1717
default: true
1818

19-
env:
20-
POETRY_NO_INTERACTION: 1
21-
POETRY_VIRTUALENVS_IN_PROJECT: true
22-
2319
runs:
2420
using: "composite"
2521
steps:
@@ -49,6 +45,8 @@ runs:
4945
if: ${{ inputs.run-poetry-install == 'true' }}
5046
shell: bash
5147
run: |
48+
poetry config virtualenvs.create true
49+
poetry config virtualenvs.in-project true
5250
poetry install --no-interaction --no-root ${{ inputs.poetry-dependency-install-flags }}
5351
# Now run same command but let the package install too
5452
- name: Install package

.github/workflows/ci.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,13 @@ jobs:
2020
steps:
2121
- name: Check out repository
2222
uses: actions/checkout@v3
23-
- name: Set up python
24-
id: setup-python
25-
uses: actions/setup-python@v4
23+
- uses: ./.github/actions/setup
2624
with:
2725
python-version: "3.9"
28-
- name: Load pip cache
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/.cache/pip
32-
key: ${{ runner.os }}-mypy-pip
33-
restore-keys: ${{ runner.os }}-mypy-pip
34-
- name: Install mypy
35-
run: pip install mypy
26+
venv-id: "docs"
27+
poetry-dependency-install-flags: "--all-extras --only 'main,dev'"
3628
- name: mypy
37-
run: mypy src
29+
run: MYPYPATH=stubs poetry run mypy src
3830

3931
docs:
4032
if: ${{ !github.event.pull_request.draft }}

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
11
# Changelog
2+
3+
## v0.4.0 (2023-06-07)
4+
5+
### Feat
6+
7+
- **Makefile**: add licence-check target
8+
9+
## v0.3.0 (2023-05-27)
10+
11+
### BREAKING CHANGE
12+
13+
- Removed {py:mod}`carpet_concentrations.unit_registry`
14+
15+
### Feat
16+
17+
- **unit_registry**: remove {py:mod}`carpet_concentrations.unit_registry`
18+
19+
## v0.2.1 (2023-05-27)
20+
21+
### Fix
22+
23+
- **src/carpet_concentrations/input4MIPs/dataset.py**: fix up type hint
24+
25+
### Refactor
26+
27+
- remove unused type: ignore
28+
29+
## v0.2.0 (2023-05-22)
30+
31+
### Feat
32+
33+
- **src/carpet_concentrations/input4MIPs**: add {py:mod}`carpet_concentrations.input4MIPs` to handle dataset writing
34+
- **LatitudeSeasonalityGridder**: add {py:class}`carpet_concentrations.gridders.latitude_seasonality_gridder.LatitudeSeasonalityGridder`
35+
- **src/carpet_concentrations/time.py**: add {py:mod}`carpet_concentrations.time`

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023, CSIRO [TODO check name with CSIRO #3]
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile to help automate key steps
22

33
.DEFAULT_GOAL := help
4-
4+
TEMP_FILE := $(shell mktemp)
55

66
# A helper script to get short descriptions of each target in the Makefile
77
define PRINT_HELP_PYSCRIPT
@@ -22,7 +22,7 @@ help: ## print short description of each target
2222
.PHONY: checks
2323
checks: ## run all the linting checks of the codebase
2424
@echo "=== pre-commit ==="; poetry run pre-commit run --all-files || echo "--- pre-commit failed ---" >&2; \
25-
echo "=== mypy ==="; poetry run mypy src || echo "--- mypy failed ---" >&2; \
25+
echo "=== mypy ==="; MYPYPATH=stubs poetry run mypy src || echo "--- mypy failed ---" >&2; \
2626
echo "======"
2727

2828
.PHONY: black
@@ -44,12 +44,14 @@ docs: ## build the docs
4444

4545
.PHONY: check-commit-messages
4646
check-commit-messages: ## check commit messages
47-
# If you only want to check a certain range (e.g. we
48-
# have old commits we don't want to re-write), this
49-
# can be changed to
50-
# poetry run cz check --rev-range <commit-to-start-from-sha>..HEAD
5147
poetry run cz check --rev-range HEAD
5248

49+
.PHONY: licence-check
50+
licence-check: ## Check that licences of the dependencies are suitable
51+
poetry export --only=main --extras=cfxarray --extras=netcdf --extras=notebooks --extras=plots > $(TEMP_FILE)
52+
poetry run liccheck -r $(TEMP_FILE) -R licence-check.txt
53+
rm -f $(TEMP_FILE)
54+
5355
.PHONY: virtual-environment
5456
virtual-environment: ## update virtual environment, create a new one if it doesn't already exist
5557
poetry lock

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!--- sec-begin-description -->
44

5-
[#5 badges here]
5+
[TODO badges here]
66

77
Core tools for the development of greenhouse gas concentration input files (i.e. flying carpets).
88

@@ -13,7 +13,7 @@ https://myst-parser.readthedocs.io/en/latest/syntax/organising_content.html#inse
1313

1414
<!--- sec-end-description -->
1515

16-
Full documentation can be found at: [#6 read the docs link here]
16+
Full documentation can be found at: [TODO read the docs link here]
1717

1818
## Installation
1919

@@ -61,6 +61,6 @@ through. If not, please raise an issue in the [issue tracker][issue_tracker].
6161

6262
For the rest of our developer docs, please see [](development-reference).
6363

64-
[issue_tracker]: https://github.com/climate-resource/Carpet-Concentrations/issues
64+
[issue_tracker]: https://gitlab.com/climate-resource/carpet-concentrations/issues
6565

6666
<!--- sec-end-installation-dev -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
carpet\_concentrations.attrs\_utils
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. automodule:: carpet_concentrations.attrs_utils
5+
6+
.. currentmodule:: carpet_concentrations.attrs_utils
7+
8+
9+
10+
add\_attrs\_context
11+
===================
12+
13+
.. autofunction:: add_attrs_context
14+
15+
16+
make\_attrs\_validator\_compatible\_single\_input
17+
=================================================
18+
19+
.. autofunction:: make_attrs_validator_compatible_single_input
20+
21+
22+
make\_attrs\_validator\_compatible\_value\_instance\_input
23+
==========================================================
24+
25+
.. autofunction:: make_attrs_validator_compatible_value_instance_input
26+
27+
.. footbibliography::
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
carpet\_concentrations.exceptions
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. automodule:: carpet_concentrations.exceptions
5+
6+
.. currentmodule:: carpet_concentrations.exceptions
7+
8+
9+
10+
CoordinateError
11+
===============
12+
13+
.. autoclass:: CoordinateError
14+
:members:
15+
16+
17+
NotPintQuantifiedError
18+
======================
19+
20+
.. autoclass:: NotPintQuantifiedError
21+
:members:
22+
23+
24+
DatasetIncompatibleUnitsError
25+
=============================
26+
27+
.. autoclass:: DatasetIncompatibleUnitsError
28+
:members:
29+
30+
.. footbibliography::
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
carpet\_concentrations.gridders.latitude\_seasonality\_gridder
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. automodule:: carpet_concentrations.gridders.latitude_seasonality_gridder
5+
6+
.. currentmodule:: carpet_concentrations.gridders.latitude_seasonality_gridder
7+
8+
9+
10+
LatitudeSeasonalityGridder
11+
==========================
12+
13+
.. autoclass:: LatitudeSeasonalityGridder
14+
:members:
15+
16+
.. footbibliography::
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
carpet\_concentrations.gridders
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. automodule:: carpet_concentrations.gridders
5+
6+
.. currentmodule:: carpet_concentrations.gridders
7+
8+
9+
.. autosummary::
10+
:toctree: ./
11+
12+
carpet_concentrations.gridders.latitude_seasonality_gridder
13+
.. footbibliography::

0 commit comments

Comments
 (0)