Skip to content

Commit

Permalink
release v0.6.0 (#109)
Browse files Browse the repository at this point in the history
* fix documentation build
* fix deprecation in nafc metqa parser
* Add-convert-input-table (#103)
* add input_table input to configuration
* add another onset timestamp format
* use ruff for linter testing (#106)
* update dependancies
* run all ruff tests and report any failure  right after
* fix nafc ruff check issues
* fix seabird imports
* add input-path-list (#108)
* add input-path-list
* add os path separator compatibility to both cli and configuration
* add test_version module
* fix version to 0.6.0
* fix base and ref in CHANGELOG workflow
  • Loading branch information
JessyBarrette authored Aug 20, 2024
1 parent 2168231 commit 3fce6b2
Show file tree
Hide file tree
Showing 32 changed files with 1,806 additions and 1,381 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -32,8 +34,8 @@ jobs:
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
if [[ "${{github.ref_name}}" == "main" ]]; then
poetry run mike deploy main --push --force
poetry run mike deploy main --push
else
poetry run mike deploy dev --push --force
poetry run mike deploy dev --push
fi
poetry run mike set-default dev --push
poetry run mike set-default main --push
41 changes: 30 additions & 11 deletions .github/workflows/test-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,44 @@ jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev,geo
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run ruff
- name: ruff check
id: ruff_check
run: poetry run ruff check --output-format=github .
continue-on-error: true
- name: ruff import sorting check
id: ruff_imports
run: poetry run ruff check --select I --output-format=github .
continue-on-error: true
- name: ruff format
id: ruff_format
run: poetry run ruff format --check .
continue-on-error: true
- name: Check for ruff issues
if: steps.ruff_check.outcome == 'failure' || steps.ruff_imports.outcome == 'failure' || steps.ruff_format.outcome == 'failure'
run: |
echo "Some ruff steps failed. Please check the logs for more information.\n"
echo "Some of the issues can be fixed by running the following commands:\n"
echo " poetry run ruff check --fix . # for fixing all default issues"
echo " poetry run ruff check --fix --select I . # for fixing import sorting issues"
echo " poetry run ruff format . # for formatting the code"
exit 1
- name: Review if metadata is updated
uses: dorny/paths-filter@v3
continue-on-error: true
id: changes
with:
base: ${{ github.base_ref }}
ref: ${{ github.ref }}
filters: |
vocabularies:
- 'ocean_data_parser/vocabularies/**'
Expand All @@ -62,7 +79,9 @@ jobs:
run: poetry run pytest -W error::UserWarning -k "not test_metadata" -n auto
- name: Run benchmark
run: poetry run pytest tests/run_benchmark.py --benchmark-json output.json
- name: Update CHANGELOG
- name: CHANGELOG updated check
if: steps.changes.outputs.changelog == 'false'
run: exit 1
run: |
echo "CHANGELOG.md update is required."
exit 1
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## `0.6.0` - 2024-08-20

### Added

- Add odpy convert `input_table` input through config file, which gives the
ability to list multiple file glob expression and associated metadata.
- Add Onset.csv timestamp format: "\d+\/\d+\/\d\d\d\d\s+\d+\:\d+\:\d+" = "%m/%d/%Y %H:%M:%S"
- Rely on ruff for format and linter testing
- Add option to pass a list of input_path paths via the configuration file or a
os path seperator list via the command line interface or the configuration
- Add test to test version within package `__init__.py`, `CHANGELOG.md`, and `pyproject.tom`

### Fixed

- seabird parsers module import sorting
- nafc ruff check issues

## `0.5.2` - 2024-06-22

### Fixed

- Docs build

## `0.5.1` - 2024-06-20

### Fixed

- Remove default sentry dsn from convert default configuration file.
- Fix deprecation issue in nafc.metqa loader

## `0.5.0` - 2024-06-20

Expand Down Expand Up @@ -50,4 +74,4 @@ defined via string expression.

### Removed

- Historical ODF platform vocabulary which wasn't used anywhere.
- Historical ODF platform vocabulary which wasn't used anywhere.
15 changes: 15 additions & 0 deletions docs/user_guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,18 @@ title: odpy CLI
Example:
- `ODPY_LOG_LEVEL=WARNING` will force `odpy` to log only the warning events.
- `ODPY_CONVERT_OUTPUT_PATH=output` will force `odpy convert` to output to the the local directory `./output/`


## Configuration

`odpy convert` can handle a configuration file which also integrates a number of other features. To generate a new configuration, you can use the `--new-config` flag:

```shell
odpy convert --new-config new_config_file_path.yaml
```

Or copy the following yaml:

```yaml
--8<-- "ocean_data_parser/batch/default-batch-config.yaml"
```
4 changes: 2 additions & 2 deletions docs/user_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The ocean-data-parser can be used different ways:

- [ ] Python Import

- [`from ocean_data_parser import read.file`](read.md)
- [`from ocean_data_parser.parsers import ...`](parsers/index.md)
- [`from ocean_data_parser import read.file`](read.md)
- [`from ocean_data_parser.parsers import ...`](parsers/index.md)

## Installation

Expand Down
3 changes: 1 addition & 2 deletions docs/user_guide/parsers/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ocean Data Parsers
# Ocean Data Parsers

Each parser can also be imported by itself:

Expand Down Expand Up @@ -75,4 +75,3 @@ Ocean Data Parser includes the following data format parsers:

- [van_essen_instruments.mon](van-essen-instruments.md#ocean_data_parser.parsers.van_essen_instruments.mon)


2 changes: 1 addition & 1 deletion ocean_data_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from pathlib import Path

PARSERS = re.findall('parser = "(.*)"', (Path(__file__).parent / "read.py").read_text())
__version__ = "0.5.0"
__version__ = "0.6.0"
Loading

0 comments on commit 3fce6b2

Please sign in to comment.