Skip to content

Commit

Permalink
bump: version 0.3.0 → 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
znichollscr committed Jun 9, 2023
1 parent 25c6b87 commit e32e3a3
Show file tree
Hide file tree
Showing 45 changed files with 3,905 additions and 107 deletions.
6 changes: 2 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ inputs:
required: false
default: true

env:
POETRY_NO_INTERACTION: 1
POETRY_VIRTUALENVS_IN_PROJECT: true

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -49,6 +45,8 @@ runs:
if: ${{ inputs.run-poetry-install == 'true' }}
shell: bash
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
poetry install --no-interaction --no-root ${{ inputs.poetry-dependency-install-flags }}
# Now run same command but let the package install too
- name: Install package
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,13 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
- uses: ./.github/actions/setup
with:
python-version: "3.9"
- name: Load pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-mypy-pip
restore-keys: ${{ runner.os }}-mypy-pip
- name: Install mypy
run: pip install mypy
venv-id: "docs"
poetry-dependency-install-flags: "--all-extras --only 'main,dev'"
- name: mypy
run: mypy src
run: MYPYPATH=stubs poetry run mypy src

docs:
if: ${{ !github.event.pull_request.draft }}
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Changelog

## v0.4.0 (2023-06-07)

### Feat

- **Makefile**: add licence-check target

## v0.3.0 (2023-05-27)

### BREAKING CHANGE

- Removed {py:mod}`carpet_concentrations.unit_registry`

### Feat

- **unit_registry**: remove {py:mod}`carpet_concentrations.unit_registry`

## v0.2.1 (2023-05-27)

### Fix

- **src/carpet_concentrations/input4MIPs/dataset.py**: fix up type hint

### Refactor

- remove unused type: ignore

## v0.2.0 (2023-05-22)

### Feat

- **src/carpet_concentrations/input4MIPs**: add {py:mod}`carpet_concentrations.input4MIPs` to handle dataset writing
- **LatitudeSeasonalityGridder**: add {py:class}`carpet_concentrations.gridders.latitude_seasonality_gridder.LatitudeSeasonalityGridder`
- **src/carpet_concentrations/time.py**: add {py:mod}`carpet_concentrations.time`
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, CSIRO [TODO check name with CSIRO #3]

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile to help automate key steps

.DEFAULT_GOAL := help

TEMP_FILE := $(shell mktemp)

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

.PHONY: black
Expand All @@ -44,12 +44,14 @@ docs: ## build the docs

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

.PHONY: licence-check
licence-check: ## Check that licences of the dependencies are suitable
poetry export --only=main --extras=cfxarray --extras=netcdf --extras=notebooks --extras=plots > $(TEMP_FILE)
poetry run liccheck -r $(TEMP_FILE) -R licence-check.txt
rm -f $(TEMP_FILE)

.PHONY: virtual-environment
virtual-environment: ## update virtual environment, create a new one if it doesn't already exist
poetry lock
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--- sec-begin-description -->

[#5 badges here]
[TODO badges here]

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

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

<!--- sec-end-description -->

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

## Installation

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

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

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

<!--- sec-end-installation-dev -->
27 changes: 27 additions & 0 deletions docs/source/api/carpet_concentrations.attrs_utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
carpet\_concentrations.attrs\_utils
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.attrs_utils

.. currentmodule:: carpet_concentrations.attrs_utils



add\_attrs\_context
===================

.. autofunction:: add_attrs_context


make\_attrs\_validator\_compatible\_single\_input
=================================================

.. autofunction:: make_attrs_validator_compatible_single_input


make\_attrs\_validator\_compatible\_value\_instance\_input
==========================================================

.. autofunction:: make_attrs_validator_compatible_value_instance_input

.. footbibliography::
30 changes: 30 additions & 0 deletions docs/source/api/carpet_concentrations.exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
carpet\_concentrations.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.exceptions

.. currentmodule:: carpet_concentrations.exceptions



CoordinateError
===============

.. autoclass:: CoordinateError
:members:


NotPintQuantifiedError
======================

.. autoclass:: NotPintQuantifiedError
:members:


DatasetIncompatibleUnitsError
=============================

.. autoclass:: DatasetIncompatibleUnitsError
:members:

.. footbibliography::
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
carpet\_concentrations.gridders.latitude\_seasonality\_gridder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.gridders.latitude_seasonality_gridder

.. currentmodule:: carpet_concentrations.gridders.latitude_seasonality_gridder



LatitudeSeasonalityGridder
==========================

.. autoclass:: LatitudeSeasonalityGridder
:members:

.. footbibliography::
13 changes: 13 additions & 0 deletions docs/source/api/carpet_concentrations.gridders.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
carpet\_concentrations.gridders
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.gridders

.. currentmodule:: carpet_concentrations.gridders


.. autosummary::
:toctree: ./

carpet_concentrations.gridders.latitude_seasonality_gridder
.. footbibliography::
66 changes: 66 additions & 0 deletions docs/source/api/carpet_concentrations.input4MIPs.dataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
carpet\_concentrations.input4MIPs.dataset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.input4MIPs.dataset

.. currentmodule:: carpet_concentrations.input4MIPs.dataset



Input4MIPsMetadata
==================

.. autoclass:: Input4MIPsMetadata
:members:


Input4MIPsMetadataOptional
==========================

.. autoclass:: Input4MIPsMetadataOptional
:members:


Input4MIPsDataset
=================

.. autoclass:: Input4MIPsDataset
:members:


format\_date
============

.. autofunction:: format_date


get\_version
============

.. autofunction:: get_version


add\_time\_bounds
=================

.. autofunction:: add_time_bounds


verify\_disk\_ready
===================

.. autofunction:: verify_disk_ready


generate\_tracking\_id
======================

.. autofunction:: generate_tracking_id


generate\_creation\_timestamp
=============================

.. autofunction:: generate_creation_timestamp

.. footbibliography::
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
carpet\_concentrations.input4MIPs.metadata\_options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.input4MIPs.metadata_options

.. currentmodule:: carpet_concentrations.input4MIPs.metadata_options



ACTIVITY\_ID\_OPTIONS
=====================

.. autodata:: ACTIVITY_ID_OPTIONS


CONVENTION\_OPTIONS
===================

.. autodata:: CONVENTION_OPTIONS


DATASET\_CATEGORY\_OPTIONS
==========================

.. autodata:: DATASET_CATEGORY_OPTIONS


INCLUDES\_EMAIL\_REGEX
======================

.. autodata:: INCLUDES_EMAIL_REGEX


CREATION\_DATE\_REGEX
=====================

.. autodata:: CREATION_DATE_REGEX


UUID\_REGEX
===========

.. autodata:: UUID_REGEX

.. footbibliography::
14 changes: 14 additions & 0 deletions docs/source/api/carpet_concentrations.input4MIPs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
carpet\_concentrations.input4MIPs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: carpet_concentrations.input4MIPs

.. currentmodule:: carpet_concentrations.input4MIPs


.. autosummary::
:toctree: ./

carpet_concentrations.input4MIPs.dataset
carpet_concentrations.input4MIPs.metadata_options
.. footbibliography::
Loading

0 comments on commit e32e3a3

Please sign in to comment.