Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the latest changes to main branch #75

Merged
merged 259 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
2ad9ab7
fix typo
JessyBarrette Nov 16, 2023
5fa4c13
isort . black .
JessyBarrette Nov 16, 2023
9a43694
drop seabird code from process module
JessyBarrette Nov 16, 2023
f0daed7
fix registry types
JessyBarrette Nov 16, 2023
63d79d7
define registry dtypes
JessyBarrette Nov 16, 2023
559a655
fix registry tests hash and mtime placeholders
JessyBarrette Nov 16, 2023
862f959
ignore self.data if empty when registry.add
JessyBarrette Nov 16, 2023
d453dd4
fix file registry data type
JessyBarrette Nov 16, 2023
766064a
isort . black .
JessyBarrette Nov 16, 2023
81d9c43
Merge branch 'development' into fix-pydatetime
JessyBarrette Nov 16, 2023
c9809fa
fix regsitry dtypes
JessyBarrette Nov 20, 2023
652b395
fix test path handling
JessyBarrette Nov 20, 2023
b03fbdd
Fix pydatetime deprecation (#64)
JessyBarrette Nov 20, 2023
4a9fb33
Merge branch 'fix-pydatetime' into development
JessyBarrette Nov 20, 2023
8bcd74b
test mkdocs build strick (#65)
JessyBarrette Nov 20, 2023
0ad2ecf
Fix odpy read file kwargs typehint
JessyBarrette Nov 21, 2023
9c839a5
add cli test for bad inputs
JessyBarrette Nov 21, 2023
d9f4cbf
fix geo RuntimeError comments
JessyBarrette Nov 21, 2023
0186fda
make geographicLib package optional and only loaded when get_neast_st…
JessyBarrette Nov 21, 2023
65c21b6
add FILE and LOCATION to IOS shell known sections
JessyBarrette Nov 21, 2023
516d33b
make cli accessible through ocean_data_parser.cli
JessyBarrette Nov 24, 2023
9c05fac
convert registry paths to Path objects
JessyBarrette Nov 24, 2023
1f5060a
fix registry save
JessyBarrette Nov 24, 2023
0150f7d
add isort to pyproject.toml
JessyBarrette Nov 24, 2023
0bab7fc
add .vscode
JessyBarrette Nov 24, 2023
7aa8691
pyest replace tmp_path by tmpdir
JessyBarrette Nov 27, 2023
8da167c
move import geographiclib from if
JessyBarrette Nov 27, 2023
ab0f0ae
add geo group to test workflow
JessyBarrette Nov 27, 2023
869f16d
use tmp_path for failed tests
JessyBarrette Nov 27, 2023
e50ddcb
Delete .vscode/settings.json
JessyBarrette Nov 27, 2023
0e46f94
Delete .vscode/launch.json
JessyBarrette Nov 27, 2023
e2f9f28
Merge branch 'fix-registry' into development
JessyBarrette Nov 27, 2023
36e4f5b
Add some minor changes to IOS parser (#67)
JessyBarrette Nov 28, 2023
e65f6e9
make xarray_pipe option in configuration optional
JessyBarrette Nov 28, 2023
db4b27a
Merge remote-tracking branch 'origin/development' into development
JessyBarrette Nov 28, 2023
9f2cca5
make registry summary log error level
JessyBarrette Nov 28, 2023
1756253
make config input variable_attributes optional
JessyBarrette Nov 29, 2023
2869c36
make reference station config input optionnal
JessyBarrette Nov 29, 2023
555fb92
isort . black .
JessyBarrette Nov 29, 2023
b7b825a
Improve logging and batch convert configuration (#68)
JessyBarrette Nov 29, 2023
e60ef69
initial commit of the pcnv parser
JessyBarrette Dec 1, 2023
af75770
fix registry summary
JessyBarrette Dec 4, 2023
8c6ccee
handle more seabird header lines
JessyBarrette Dec 4, 2023
1d61543
handle empty list attributes
JessyBarrette Dec 4, 2023
5343bb8
add more nafc attribute mappings and use loguru
JessyBarrette Dec 4, 2023
42a19b5
map seabird sigma-t11 to SIGTEQST2 name
JessyBarrette Dec 4, 2023
f524ae2
add -p -o options to odpy convert
JessyBarrette Dec 4, 2023
0a74139
improve error output within nafc pfile parser and add test file
JessyBarrette Dec 8, 2023
70883c6
add .vscode/launch.json to .gitignore
JessyBarrette Dec 8, 2023
b22ad5c
Revert "add .vscode/launch.json to .gitignore"
JessyBarrette Dec 8, 2023
df76454
.gitignore .vscode/launch.json
JessyBarrette Dec 8, 2023
3746dd3
Merge branch 'development' into add-nafc-pcnv
JessyBarrette Dec 11, 2023
964a681
add tqdm to mtime and hash retrieval
JessyBarrette Dec 11, 2023
3222183
make registry in config optional
JessyBarrette Dec 11, 2023
3fd686a
add to vocabulary
JessyBarrette Dec 11, 2023
f13c491
ignore ship,trip,code from the 2nd and 3rd lines
JessyBarrette Dec 11, 2023
ac3be6e
ignore SET from set
JessyBarrette Dec 11, 2023
13aaa7e
generate an error when ship-trip-stn are not matching but still gener…
JessyBarrette Dec 11, 2023
6137393
add pcnv vocabulary mapping and generate optional variable if desired
JessyBarrette Dec 11, 2023
c999c46
add timeout decorator to limit time related to file hashing to 20s an…
JessyBarrette Dec 11, 2023
bba4a37
add more vocabularies to nafc
JessyBarrette Dec 11, 2023
8335e15
streamline vocabulary mapping
JessyBarrette Dec 11, 2023
77914d6
add more nafc vocabulary and fix seabird equivalent
JessyBarrette Dec 11, 2023
dd73e67
add pcnv test file
JessyBarrette Dec 11, 2023
190ef98
drop dulicated vocabularies
JessyBarrette Dec 11, 2023
9a0e29b
fix more to vocabulary
JessyBarrette Dec 11, 2023
5306e20
drop flag as integer for seabird data
JessyBarrette Dec 11, 2023
ea0b1f8
move some logging to debug level
JessyBarrette Dec 11, 2023
ff8b6e3
fix SET na value
JessyBarrette Dec 11, 2023
2a37213
add test p file
JessyBarrette Dec 11, 2023
7d85c23
fix logging
JessyBarrette Dec 11, 2023
a1bd121
clean up duplicated vocabulary
JessyBarrette Dec 11, 2023
3c94ed4
add Depth vocabulary
JessyBarrette Dec 11, 2023
2223e68
lower all pfile codes
JessyBarrette Dec 11, 2023
87784f7
fix timout decorator
JessyBarrette Dec 12, 2023
5160e71
isort . black .
JessyBarrette Dec 12, 2023
ed48e2b
nafc log to different level the different header items that failed to…
JessyBarrette Dec 12, 2023
572ace9
make test_parser compatible with loguru logger
JessyBarrette Dec 12, 2023
5c62bf2
add more p test files
JessyBarrette Dec 12, 2023
a61622c
ignore attributes with pd.NA
JessyBarrette Dec 12, 2023
96d17e9
add ship_code metadata to pcnv
JessyBarrette Dec 12, 2023
c36dc5d
add to setting.json
JessyBarrette Dec 12, 2023
c1d3b77
drop timeout decorator
JessyBarrette Dec 12, 2023
b57713f
ignore attribute if None
JessyBarrette Dec 12, 2023
3987f65
ignore depth variable generation if depSM exists
JessyBarrette Dec 12, 2023
1a4ac00
add pytest for standardize attributes
JessyBarrette Dec 13, 2023
9b3dede
add dfo_nafc_platform_names, refactor code, add test
JessyBarrette Dec 13, 2023
859178f
improve nafc.pcnv docstring
JessyBarrette Dec 13, 2023
dfe0081
replace seq by year
JessyBarrette Dec 13, 2023
2e4852e
ignore dfo_nafc_platoform_code attributes
JessyBarrette Dec 13, 2023
2234509
black
JessyBarrette Dec 13, 2023
e36fd80
ignore nafc attributes in odf
JessyBarrette Dec 13, 2023
7e79d48
fix reference odf files check
JessyBarrette Dec 13, 2023
d1fb6c2
ignore warning for missing comment field
JessyBarrette Dec 13, 2023
f7d0e0d
isort . black .
JessyBarrette Dec 13, 2023
a2edc2e
Merge pull request #70 from cioos-siooc/add-nafc-pcnv
JessyBarrette Dec 15, 2023
2cc3785
Update dfo_nafc_p_file_parser_example.ipynb
JessyBarrette Dec 15, 2023
158d814
add IOS tob missing vocabularies related to https://github.com/cioos-…
JessyBarrette Jan 9, 2024
d15e036
fix dfo.nafc.pfile lat/long conversion
JessyBarrette Jan 19, 2024
9e5358f
fix dfo.nafc.pcnv set_number and add global_attributes input to method
JessyBarrette Jan 19, 2024
c5acc2c
fix dfo.nafc.pcnv set_number and add global_attributes input to method
JessyBarrette Jan 19, 2024
57f8152
Merge branch 'development' of https://github.com/cioos-siooc/ocean-da…
JessyBarrette Jan 19, 2024
f1d7fc6
Merge branch 'development' of https://github.com/cioos-siooc/ocean-da…
JessyBarrette Jan 19, 2024
e87d0f0
Merge branch 'development' of https://github.com/cioos-siooc/ocean-da…
JessyBarrette Jan 19, 2024
84bcbd1
fix dfo.nafc.pfile parser handle missing lat/long case
JessyBarrette Jan 19, 2024
072f1ce
fix dfo.nafc.pfile parser handle missing lat/long case
JessyBarrette Jan 19, 2024
00d5b24
Merge branch 'development' of https://github.com/cioos-siooc/ocean-da…
JessyBarrette Jan 19, 2024
40041fc
review nafc check if lat/long are missing and add test file
JessyBarrette Jan 19, 2024
8eb0ae0
isort . black .
JessyBarrette Feb 1, 2024
3fa81da
add more output path pytests to confirm present expectations
JessyBarrette Feb 1, 2024
1915aa0
add dependancy
JessyBarrette Mar 28, 2024
0435643
drop unused imports
JessyBarrette Mar 28, 2024
f432591
fix manual qc test
JessyBarrette Mar 28, 2024
b369fa2
fix duplicated parser tests
JessyBarrette Mar 28, 2024
cb3a88b
drop duplicated tests
JessyBarrette Mar 28, 2024
2052294
fix some init
JessyBarrette Mar 28, 2024
a4aea90
fix some linter issues
JessyBarrette Mar 28, 2024
2d3526e
drop timeout decorator which fails tests
JessyBarrette Mar 28, 2024
e993205
fix dfo import
JessyBarrette Mar 28, 2024
fa74708
rename test action and add ruff test
JessyBarrette Mar 28, 2024
fbaac37
use ruff github format
JessyBarrette Apr 1, 2024
0f7e924
Merge branch 'fix-ruff-issues' into development
JessyBarrette Apr 1, 2024
ba888ff
add summary output to config
JessyBarrette Apr 1, 2024
449e1e1
split convert cli from main function
JessyBarrette Apr 1, 2024
97437b9
fix convert
JessyBarrette Apr 1, 2024
e18f1dd
fix linter config
JessyBarrette Apr 1, 2024
4eec971
handle duplicated pfiles columns
JessyBarrette Apr 1, 2024
25a12a8
add a platform place-holder for 2,3, and 4 platforms
JessyBarrette Apr 1, 2024
7e60c46
ignore swell period XX
JessyBarrette Apr 1, 2024
3b62883
handle pfiles with no history
JessyBarrette Apr 1, 2024
fa52913
handle set_numbers. st\d+ s\d+ #\d+
JessyBarrette Apr 1, 2024
06cd34c
black .
JessyBarrette Apr 1, 2024
9d705c9
add stacktrace limits
JessyBarrette Apr 1, 2024
8f43041
make xml parsing error of pcnv warning
JessyBarrette Apr 1, 2024
e7ce6f1
fix set_numbers flag
JessyBarrette Apr 1, 2024
53b3ba4
fix some set_number of and wave_period values
JessyBarrette Apr 1, 2024
8963dbf
retry files with encoding issues by replacing encodeing character
JessyBarrette Apr 1, 2024
1d7afb3
fix nafc platform mapping
JessyBarrette Apr 1, 2024
07449dd
isort . black .
JessyBarrette Apr 1, 2024
f79baaf
add missing platforms
JessyBarrette Apr 1, 2024
d9c6e3b
lower logging
JessyBarrette Apr 1, 2024
86ea9ee
include metadata from metqa files for pcnvs
JessyBarrette Apr 1, 2024
5195fad
force nafc path as Path object
JessyBarrette Apr 2, 2024
4bc17fb
use lru_cache
JessyBarrette Apr 2, 2024
d94dbaf
drop caching
JessyBarrette Apr 2, 2024
552a7cb
bring back caching and drop encoding error wrapper
JessyBarrette Apr 2, 2024
9e65da1
fix wave_period match
JessyBarrette Apr 2, 2024
d3d3ed1
add DFO platform info
JessyBarrette Apr 2, 2024
6754edd
handle pcnv "LATITUDE XX XX.XX N"
JessyBarrette Apr 2, 2024
471b83b
add parser_kwargs option to convert config
JessyBarrette Apr 2, 2024
a6cb364
improve cli optional inputs and defaults
JessyBarrette Apr 2, 2024
2e7ff3d
black .
JessyBarrette Apr 2, 2024
8b2107f
add test to match nafc pcnv metqa match
JessyBarrette Apr 2, 2024
5687bb9
isort black
JessyBarrette Apr 2, 2024
c91c033
rely on nafc pfiles ship trip station values, add a few null_values
JessyBarrette Apr 2, 2024
a822b83
add more int mapping and streamline _int logic
JessyBarrette Apr 2, 2024
4b59507
drop to_datetime use the command directely and fail file if time isn'…
JessyBarrette Apr 2, 2024
f0357c4
fix _int match option when multiple
JessyBarrette Apr 2, 2024
40b070d
add paltform
JessyBarrette Apr 2, 2024
56b7683
ignore error if folder exists
JessyBarrette Apr 2, 2024
5bb2fad
ignore missing or empty comments
JessyBarrette Apr 2, 2024
281b3fd
improve logging
JessyBarrette Apr 2, 2024
2206f81
fix pfile line parser exception test
JessyBarrette Apr 3, 2024
1b11d4d
move match metqa table after checking missing attributes from pcnv
JessyBarrette Apr 3, 2024
f1f492c
add light and trans variable from pfiles vocabularies, add tests and …
JessyBarrette Apr 3, 2024
b9c842b
make NAFC platform code mapping upper case
JessyBarrette Apr 4, 2024
f2d35fe
add more null values to pfiles 3line parsers
JessyBarrette Apr 4, 2024
c0f85be
add pcnv test file with partial xml
JessyBarrette Apr 4, 2024
3107256
remove timeout-decorator dependancy
JessyBarrette Apr 4, 2024
5c02517
stop testing for empty attributes
JessyBarrette Apr 4, 2024
cef7d1e
pfile vocabulary map trans -> trp and light -> par
JessyBarrette Apr 4, 2024
b134708
add Katsheshuk II platform
JessyBarrette Apr 4, 2024
c23144e
fix convert cli tests
JessyBarrette Apr 11, 2024
d922d34
add. metqa file to ignore from tests
JessyBarrette Apr 11, 2024
caeccdb
make test cli convertion independant of the log-level
JessyBarrette Apr 11, 2024
a203c3d
upgrade version to 0.3.1
JessyBarrette Apr 11, 2024
1957f7c
Merge pull request #77 from cioos-siooc/update-nafc-parsers
JessyBarrette Apr 11, 2024
e27875d
Merge branch 'update-nafc-parsers' into development
JessyBarrette Apr 18, 2024
ffd1913
add netcdf file to ocean_data_parser.read.file
JessyBarrette Apr 18, 2024
b8e4085
improve errors and add error if input is directory
JessyBarrette Apr 18, 2024
376eaa6
fix cli odpy convert function name
JessyBarrette Apr 18, 2024
b397cfc
isort . black .
JessyBarrette Apr 18, 2024
69a6cb0
improve cli convert documentation
JessyBarrette Apr 18, 2024
6cb94ca
improve docs
JessyBarrette Apr 18, 2024
8cd386a
refactor development installation section
JessyBarrette Apr 18, 2024
f030cf2
fix broken link
JessyBarrette Apr 18, 2024
83e037e
run markdownlinter . --fixx
JessyBarrette Apr 18, 2024
f22f276
fix readme example
JessyBarrette Apr 18, 2024
9be5b35
Merge pull request #78 from cioos-siooc/add-netcdf-to-read
JessyBarrette Apr 18, 2024
2a79124
fix css colors
JessyBarrette Apr 19, 2024
265c3bc
improve main page look
JessyBarrette Apr 19, 2024
8c71cbd
Merge branch 'add-netcdf-to-read' into development
JessyBarrette Apr 19, 2024
c18f73c
move all development to one page
JessyBarrette Apr 19, 2024
fe1cb00
add icons and improve home
JessyBarrette Apr 19, 2024
e74b253
improve documentation of the different parsers
JessyBarrette Apr 19, 2024
2772f70
reorder dfo parsers
JessyBarrette Apr 19, 2024
5c7601e
improve parsers list
JessyBarrette Apr 19, 2024
861051e
fix some links issues
JessyBarrette Apr 19, 2024
09b89d5
fix star_oddi parser
JessyBarrette Apr 24, 2024
0245f25
fix mkdocs linter yaml issues
JessyBarrette Apr 24, 2024
9487f70
fix seabird deprecation issue
JessyBarrette Apr 24, 2024
fb457a5
fix some ruff/isort black issues
JessyBarrette Apr 24, 2024
c1747b6
Merge pull request #79 from cioos-siooc/improve-docs
JessyBarrette Apr 24, 2024
62b1ea2
lower create new dir to debug
JessyBarrette Apr 29, 2024
56caec4
make spatial attributes compatible with empty variables
JessyBarrette Apr 29, 2024
71ce35d
handle pfiles with 60minutes timestamps
JessyBarrette Apr 29, 2024
0852efb
add a error log when no data is available within pfile
JessyBarrette Apr 29, 2024
dc97bca
add test file
JessyBarrette Apr 29, 2024
cb8d1f1
Make sure that generate_extra_variables do not overwrite already exis…
JessyBarrette Apr 29, 2024
de19f35
isort. black
JessyBarrette Apr 29, 2024
5fb3bde
add more test and parse out QA applied rows to history
JessyBarrette Apr 29, 2024
9298ae7
add range when at least one value exist
JessyBarrette Apr 29, 2024
bf70f18
isort black
JessyBarrette Apr 29, 2024
45613be
Merge pull request #80 from cioos-siooc/update-nafc-parser
JessyBarrette Apr 30, 2024
d5f9d7e
make onset/pme/van_essen_instruments encoding and encoding errors inp…
JessyBarrette May 1, 2024
591b286
Merge branch 'development' of https://github.com/cioos-siooc/ocean-da…
JessyBarrette May 1, 2024
0df684c
add one more timestamp format for onset
JessyBarrette May 1, 2024
dfd990a
fix PME variable attributes mapping
JessyBarrette May 3, 2024
e25544f
add attribute checker
JessyBarrette May 3, 2024
2e61864
standardize attributes from seabird parser and make nafc compatible
JessyBarrette May 3, 2024
6970946
isort black
JessyBarrette May 3, 2024
f615e82
standarize electricblue attribues
JessyBarrette May 3, 2024
1420b36
improve onset parser and assume only date format exist within a file
JessyBarrette May 3, 2024
d745d44
drop unused imports
JessyBarrette May 6, 2024
f3d279a
Merge pull request #86 from cioos-siooc/85-fix-seabird-parser-attributes
JessyBarrette May 6, 2024
ead282e
fix auto dection of some onset format
JessyBarrette May 6, 2024
60972f8
make test action ignore test_metadata module results
JessyBarrette May 6, 2024
b734ebd
Merge pull request #87 from cioos-siooc/fix-onset-parser
JessyBarrette May 6, 2024
d455b51
Fix-seabird (#89)
JessyBarrette May 9, 2024
eb85d77
fix handle cases where onset csv contains multiple time format (#91)
JessyBarrette May 9, 2024
af3bec3
Add platform vocabulary tests (#90)
JessyBarrette May 9, 2024
5197980
Fix onset parser to handle more historical formats, add more test files
JessyBarrette May 10, 2024
c2bb8e9
fix autodetect
JessyBarrette May 10, 2024
6aa037a
fix onset parser which was missing the very first row
JessyBarrette May 13, 2024
0e7bda7
isort black
JessyBarrette May 13, 2024
f3d31f5
handle time variable in pme parser as a index column and fix issue wh…
JessyBarrette May 13, 2024
88c3842
add test file
JessyBarrette May 13, 2024
83d9858
add timezone attribute
JessyBarrette May 13, 2024
1bcd4cc
fix pme parser attributes
JessyBarrette May 13, 2024
cfecd4b
Fix-generate-file-path (#92)
JessyBarrette May 14, 2024
fda63c2
Improve documentation for deploying ocean-data-parser within your own…
JessyBarrette May 15, 2024
1db6db9
Merge branch 'main' into development
JessyBarrette May 15, 2024
70fd603
Fix typo in onset parser
JessyBarrette May 21, 2024
9ca722f
Avoid reimporting module if already imported while running read.file …
JessyBarrette May 21, 2024
a723fcb
add more fixes to the onset parser (#96)
JessyBarrette May 28, 2024
5672ad7
fix unused import
JessyBarrette May 29, 2024
78480fb
add pytest-xdist dependancy to dev to speed up tests locally or on ac…
JessyBarrette May 29, 2024
2f200f0
specify amundsen timestamp date format (#98)
JessyBarrette Jun 14, 2024
09f2616
add parser_kwargs to odpy convert (#100)
JessyBarrette Jun 20, 2024
296f2b0
upgrade to version 0.5.0
JessyBarrette Jun 20, 2024
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
11 changes: 5 additions & 6 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ jobs:
restore-keys: |
mkdocs-material-
- run: |
python -m pip install --upgrade pip
pip install ".[dev]"
pip install -r docs-requirements.txt
pip install poetry
poetry install --with docs,geo
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
if [[ "${{github.ref_name}}" == "main" ]]; then
mike deploy main --push --force
poetry run mike deploy main --push --force
else
mike deploy dev --push --force
poetry run mike deploy dev --push --force
fi
mike set-default dev --push
poetry run mike set-default dev --push
7 changes: 3 additions & 4 deletions .github/workflows/test-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ jobs:
restore-keys: |
mkdocs-material-
- run: |
python -m pip install --upgrade pip
pip install -r docs-requirements.txt
pip install ".[dev]"
pip install poetry
poetry install --with docs,geo
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
mike deploy test
poetry run mkdocs build -s -d test
68 changes: 68 additions & 0 deletions .github/workflows/test-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Test package for linter issues and run tests

on:
pull_request:
branches:
- main
- development
paths:
- .github/workflows/test-package.yaml
- setup.py
- MANIFEST.in
- ocean_data_parser/**
- tests/**

push:
branches:
- main
- development
paths:
- setup.py
- MANIFEST.in
- ocean_data_parser/**
- tests/**

jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
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
run: poetry run ruff check --output-format=github .
- name: Review if metadata is updated
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
vocabularies:
- 'ocean_data_parser/vocabularies/**'
- 'ocean_data_parser/metatadata/**'
- 'tests/test_metadata.py'
changelog:
- 'CHANGELOG.md'
- name: Run tests with metadata tests
if: steps.changes.outputs.vocabularies == 'true'
run: poetry run pytest -W error::UserWarning --nerc-vocab -n auto
- name: Run tests without metadata tests
if: steps.changes.outputs.vocabularies == 'false'
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
if: steps.changes.outputs.changelog == 'false'
run: exit 1

45 changes: 0 additions & 45 deletions .github/workflows/test-pytest.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ dist/
/pycurrents
.DS_Store

.vscode/launch.json

.vscode/settings.json
/**/local_tests/*
/tests/**/*_test.nc
pdc-amundsen-conversion.log
Expand Down Expand Up @@ -45,3 +42,6 @@ docs/user_guide/vocabularies/*.md
docs/user_guide/parsers/parser-list.md

site/**
.python-version

.vscode/launch.json
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
}
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

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.5.0` - 2024-06-20

### Added

- Test get_path_generation_input on all test files and parsers
- Run all tests in parallel with pytest-xdist
- Add --parser-kwargs option to odpy convert command line interface to pass
inputs to parser

### Fixed

- Fix star_oddi parser time variable to output a datetime dataarray.
- Fix onset parser date time handling.
- Avoid reimporting parser if already imported in read.file with parser
defined via string expression.
- Fix Amundsen int timestamp format
- Drop trip_tag attribute from dfo.nafc.pcnv parser
- Make dfo.nafc.pcnv parser attempt to retrieve metqa file info by default.

## `v0.4.0` - 2024-05-04

### Added

- Test platforms vocabulary items and match them to NERC C17 vocabulary.

### Changed

- Refactor Seabird Parser
- Handle better processing related attributes
- On-platform processing
- SBE Data Processing modules
- Post processing (NAFC pcnv Format `* QA Applied:`)
- Retrieve more of the information available stored within Seabird header as attributes
- Structure history
- Upgrade odf.bio reference NetCDF to reflect the changes.
- Upgrate dfo platforms for the odf and nafc parsers.

### Removed

- Historical ODF platform vocabulary which wasn't used anywhere.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ notice like this when it starts in an interactive mode:
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
The hypothetical commands `show w' and`show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
<!-- NOTE: All sections are placeholders. Use the relevant ones-->

![Logo](docs/images/logo_EN_FR-1024x208.png#gh-light-mode-only)
![Logo](docs/images/cioos-national_EN_FR_W-01.png#gh-dark-mode-only)

<!-- Make a favicon/logo using something like:

* https://favicon.io/
* https://www.shopify.com/tools/logo-maker/open-source-software
* https://primitive.lol/ -->

# ocean-data-parser

<!-- You can get project-relevant badges from: [shields.io](https://shields.io/) -->

[![Build documentation](https://github.com/cioos-siooc/ocean-data-parser/actions/workflows/deploy-docs.yaml/badge.svg)](https://github.com/cioos-siooc/ocean-data-parser/actions/workflows/deploy-docs.yaml)


`ocean-data-parser` - a Python package for parsing oceanographic proprietary data formats to [xarray Dataset](https://docs.xarray.dev/en/stable/). Documentation [here](https://cioos-siooc.github.io/ocean-data-parser/).

## Installation

Install the package with the following command, ideally within a virtual environment:

```console
pip install git+https://github.com/cioos-siooc/ocean-data-parser.git
```

### How to

#### odpy cli

Once installed, the package is usable via the command line interface:

```console
odpy --help
```

To batch convert a series of files to NetCDF:

```
odpy convert -i '**/*.cnv' -p 'seabird.cnv'
```

#### Format auto-detection

Load a compatible file with the automated parser detection method:

```python
import ocean_data_parser.parsers
import ocean_data_parser.read

# Load a file to an xarray object
ds = ocean_data_parser.parsers.file('Path to file')
ds = ocean_data_parser.read.file('Path to file')

# Save to netcdf
ds.to_netcdf('save-path.nc')
```

!!!warning
The parser detection method relies on the file extension and the first few lines present within the given file.

Or specify the specific parser to use for this file format:

``` python
from ocean_data_parser.parsers import seabird

Expand All @@ -61,10 +62,11 @@ ds = seabird.cnv('Path to seabird cnv file')
# Save to netcdf
ds.to_netcdf('save-path.nc')
```

The `ocean-data-parser` can then be used within either a Python package, script or jupyter notebook. See the [documentation Notebook section](https://cioos-siooc.github.io/ocean-data-parser) for examples of how to use the package within a jupyter notebook.

## Contributions

All contributions are welcome!
All contributions are welcome!

Please create a new [discussion](https://github.com/cioos-siooc/ocean-data-parser/discussions) or [issue](https://github.com/cioos-siooc/ocean-data-parser/issues) within the GitHub repository for any questions, ideas and suggestions.
Please create a new [discussion](https://github.com/cioos-siooc/ocean-data-parser/discussions) or [issue](https://github.com/cioos-siooc/ocean-data-parser/issues) within the GitHub repository for any questions, ideas and suggestions.
12 changes: 0 additions & 12 deletions docs-requirements.txt

This file was deleted.

Loading
Loading