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

Merge development to main branch #60

Merged
merged 673 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
673 commits
Select commit Hold shift + click to select a range
e9d7d8c
add git to version bump action
JessyBarrette Aug 4, 2023
2627f83
fix git
JessyBarrette Aug 4, 2023
1b6aed3
compare git origin
JessyBarrette Aug 4, 2023
56d472f
add some asserts
JessyBarrette Aug 4, 2023
a7c7db8
drop shell
JessyBarrette Aug 4, 2023
e1763b6
stop pytest runs when another run is triggered after
JessyBarrette Aug 4, 2023
b209c84
rename action
JessyBarrette Aug 4, 2023
f57951d
output error if version change failed
JessyBarrette Aug 4, 2023
77fa00e
drop version bump check
JessyBarrette Aug 4, 2023
8dd90ca
add more potential inputs to odpy.convert to avoid config if wanted
JessyBarrette Aug 4, 2023
72a21a5
make input_path glob always recursive
JessyBarrette Aug 4, 2023
d0d1121
add parser and output_file_name_suffix parameter inputs
JessyBarrette Aug 4, 2023
2827b73
fix logic to input
JessyBarrette Aug 4, 2023
a5aac80
fix standardize_datasets casting of np.ndarrays
JessyBarrette Aug 4, 2023
ec8491f
output error table only when there' errors
JessyBarrette Aug 4, 2023
c1cd639
always output files
JessyBarrette Aug 4, 2023
3a8061d
drop database connection and upload inputs which aren't used yet
JessyBarrette Aug 4, 2023
d5c7503
add the ability to not save a registry
JessyBarrette Aug 4, 2023
a3cc2be
default to no registry
JessyBarrette Aug 4, 2023
d15567a
ignore registry hashing if no registry is saved
JessyBarrette Aug 4, 2023
91e9afe
black .
JessyBarrette Aug 5, 2023
4c25896
add a _get_config mehot to BatchConrsion object
JessyBarrette Aug 5, 2023
9efadb1
batch conversion tests
JessyBarrette Aug 5, 2023
3cd9154
add comments to config
JessyBarrette Aug 5, 2023
56d7e0d
cleanup logging of get_source_files_to_parse
JessyBarrette Aug 5, 2023
2310a9c
black .
JessyBarrette Aug 5, 2023
161dbc6
give the ability to input a list of arguments which is a file list an…
JessyBarrette Aug 5, 2023
8046ae1
fix docs build and add tests
JessyBarrette Aug 5, 2023
0dd7209
black .
JessyBarrette Aug 8, 2023
fce3aa1
fix odf timestamp parser with None inputs
JessyBarrette Aug 8, 2023
2cd3595
isort black
JessyBarrette Aug 8, 2023
5b53a2e
refactor cli tests and rely only get_source_files_to_parse from regis…
JessyBarrette Aug 8, 2023
8f5d106
ignore version bumb check for now
JessyBarrette Aug 8, 2023
ab34103
add IML regex for stations and add tests
JessyBarrette Aug 8, 2023
9bd304d
black .
JessyBarrette Aug 8, 2023
aac1bd2
review condition if no station dectected
JessyBarrette Aug 8, 2023
01e4895
fix regex for station to make sure it catptures a station
JessyBarrette Aug 8, 2023
155195c
refactor some of the logging to fix some linter issues
JessyBarrette Aug 8, 2023
e507102
add .loc to drop deprecation issues
JessyBarrette Aug 8, 2023
808c4ee
make BIO station regexp looks specifically for ASD02 station names
JessyBarrette Aug 8, 2023
cb0dbef
move netcdf parser test to it's own module
JessyBarrette Aug 8, 2023
0ccf186
fix odf bio station regexp
JessyBarrette Aug 8, 2023
d300c91
Merge pull request #45 from cioos-siooc/add-latest-odf
JessyBarrette Aug 8, 2023
edbbab3
drop argument inputs to simplify api
JessyBarrette Aug 8, 2023
d7c6ea6
rename registry method
JessyBarrette Aug 8, 2023
f858c9b
drop since concept from registry
JessyBarrette Aug 8, 2023
f2308e3
drop commented code
JessyBarrette Aug 9, 2023
8839e44
black .
JessyBarrette Aug 9, 2023
5ca177f
fix some input_path and add pytest
JessyBarrette Aug 9, 2023
a1a95b4
add "None" in cli for multiprocessing and registry_path
JessyBarrette Aug 9, 2023
4135ca5
add batch input_path and exclude tests
JessyBarrette Aug 9, 2023
7672fd2
drop unused imports
JessyBarrette Aug 9, 2023
d607e41
Merge pull request #47 from cioos-siooc/clean-up-cli
JessyBarrette Aug 9, 2023
97d130d
drop pandas denpendencies <2.0 now compatible
JessyBarrette Aug 9, 2023
c8d8877
Merge remote-tracking branch 'origin/development' into development
JessyBarrette Aug 9, 2023
a5acc1c
fix some linter issues
JessyBarrette Aug 9, 2023
8a7343e
use click.callback for odpy.convert --new_config
JessyBarrette Aug 9, 2023
3ecc7ed
add parser list page to docs
JessyBarrette Aug 9, 2023
091c62e
add more tests to new_config
JessyBarrette Aug 9, 2023
04499cb
run action on push to development
JessyBarrette Aug 9, 2023
38b1929
add parser check and parser_list output
JessyBarrette Aug 9, 2023
8eba447
set dev docs as default for now
JessyBarrette Aug 9, 2023
39c3d86
fix linter workflow on push to development branch
JessyBarrette Aug 9, 2023
5af073b
combine testing and docs within a single workflow. Avoid updating doc…
JessyBarrette Aug 9, 2023
49b8f6c
accept parser=None
JessyBarrette Aug 9, 2023
2563bd1
fix tests and drop unsued imports
JessyBarrette Aug 9, 2023
68ccb13
move o2 conversion module to its own repo
JessyBarrette Aug 9, 2023
70f18f3
Merge pull request #48 from cioos-siooc/move-o2conversion
JessyBarrette Aug 9, 2023
99602fd
initial commit of the cli docs and add a top group
JessyBarrette Aug 11, 2023
b4620a9
isort . black .
JessyBarrette Aug 11, 2023
b01eb46
black .
JessyBarrette Aug 11, 2023
5ffc041
move logger parameters to main cli command and add inputs to it
JessyBarrette Aug 11, 2023
58e0898
parser list load
JessyBarrette Aug 11, 2023
b93fce1
improve netcdf compile variable module
JessyBarrette Aug 11, 2023
d7129e5
replace glob by pathlib.Path object
JessyBarrette Aug 11, 2023
e520552
add mkdocs dependancy
JessyBarrette Aug 11, 2023
91c749f
add mkdocs-click to workflow
JessyBarrette Aug 11, 2023
c43f2fa
add mkdocs dependancy
JessyBarrette Aug 11, 2023
b86e1bf
add mkdocs-click to workflow
JessyBarrette Aug 11, 2023
9c04e70
Revert "replace glob by pathlib.Path object"
JessyBarrette Aug 11, 2023
53e17e8
bring back glob since Path().glob(...) works only with relative paths
JessyBarrette Aug 11, 2023
49e8f4f
group compile netcdf variable in one function
JessyBarrette Aug 12, 2023
0407c91
add multiprocessing option to odpy.compile and improve logging
JessyBarrette Aug 12, 2023
5d913b1
add env variable ability to odpy
JessyBarrette Aug 12, 2023
43deb21
fix console_scripts
JessyBarrette Aug 14, 2023
27bf5e5
fix some typos in cli.py
JessyBarrette Aug 14, 2023
c88f501
fix group
JessyBarrette Aug 14, 2023
b1a2b80
drop auto_envvar_prefix
JessyBarrette Aug 14, 2023
f232f5e
add show-arguments input to odpy
JessyBarrette Aug 14, 2023
5cb41c4
add ENV variables and show-arguments inputs to odpy convert
JessyBarrette Aug 14, 2023
16d4d24
add ODPY_* env variables to odpy
JessyBarrette Aug 14, 2023
e1c6b2b
add more tests
JessyBarrette Aug 14, 2023
fe55c9b
accept odpy convert --input_path
JessyBarrette Aug 14, 2023
acd7f51
test input prevails over env variable
JessyBarrette Aug 14, 2023
02ff845
replace underscore in arguments by dashes
JessyBarrette Aug 14, 2023
fccd6f3
add ODPY_COMPILE_* env variable inputs
JessyBarrette Aug 14, 2023
c0ead25
add more tests, replace all api inputs underscores by dashes
JessyBarrette Aug 14, 2023
2d84925
force compile testing input to be a str
JessyBarrette Aug 14, 2023
900cc71
fix argument underscores
JessyBarrette Aug 14, 2023
a25f92b
restructure the code and docs dependencies
JessyBarrette Aug 14, 2023
479939b
fix cli click inputs
JessyBarrette Aug 14, 2023
97b617d
isort . black .
JessyBarrette Aug 14, 2023
f4fe857
Merge branch 'development' into cli-docs
JessyBarrette Aug 14, 2023
0dec619
refactor inspect module
JessyBarrette Aug 15, 2023
4515827
Merge remote-tracking branch 'origin/cli-docs' into cli-docs
JessyBarrette Aug 15, 2023
ad5b2f1
improve main page and parser lists
JessyBarrette Aug 15, 2023
fc78350
ios-header odf-header missing extra line
JessyBarrette Aug 15, 2023
37f09f9
split install in regular and development
JessyBarrette Aug 15, 2023
9d7f3de
match cioos national color
JessyBarrette Aug 15, 2023
47e0717
remove navigation from welcome page
JessyBarrette Aug 15, 2023
1f65be6
use check boxes on welcome page
JessyBarrette Aug 15, 2023
b211e25
add configuration example in docs and improve how-to section
JessyBarrette Aug 15, 2023
784d8eb
split workflows
JessyBarrette Aug 15, 2023
020c56c
add missing jobs
JessyBarrette Aug 15, 2023
300dc49
install local code
JessyBarrette Aug 15, 2023
753d87b
do not install package with docs
JessyBarrette Aug 15, 2023
d997e9b
fix utils.convert_datetime_str when None
JessyBarrette Aug 15, 2023
9cf55f4
run pytests only on tests to package and tests
JessyBarrette Aug 15, 2023
12e5c6a
fix doc build to python 3.10
JessyBarrette Aug 15, 2023
c78fcbc
fix paths workflow
JessyBarrette Aug 15, 2023
f8de6e2
set python version '3.10'
JessyBarrette Aug 15, 2023
178fd16
quote pytest paths workflow
JessyBarrette Aug 15, 2023
3093bcc
add pandas requirement
JessyBarrette Aug 15, 2023
f8805de
fix docs prebuild
JessyBarrette Aug 15, 2023
0488cae
pip install package
JessyBarrette Aug 15, 2023
889989d
fix install package
JessyBarrette Aug 15, 2023
3cf7094
fix pytest tests workflow
JessyBarrette Aug 15, 2023
cff678a
Merge branch 'development' into cli-docs
JessyBarrette Aug 15, 2023
018d947
Merge pull request #49 from cioos-siooc/cli-docs
JessyBarrette Aug 15, 2023
6a8af6b
fix docs build workflow
JessyBarrette Aug 15, 2023
fe5f58a
add --push flag to mike deploy
JessyBarrette Aug 15, 2023
7a240fb
force push docs deployments
JessyBarrette Aug 15, 2023
3d46e64
workflow docs
JessyBarrette Aug 15, 2023
e1ed32d
fix workflow and call main page home
JessyBarrette Aug 15, 2023
bb2a6e4
black .
JessyBarrette Aug 15, 2023
ef6ce53
add a global_attributes input to the odf parsers
JessyBarrette Aug 15, 2023
ba4314f
reduce readme since we have the docs now and add --push flag to deplo…
JessyBarrette Aug 15, 2023
fa3d00e
fix convert_datetime_str warning
JessyBarrette Aug 16, 2023
b9cd4ee
fix typo on odf event_number
JessyBarrette Aug 16, 2023
2e0147d
simplify example notebooks
JessyBarrette Aug 16, 2023
fdaddd7
simplify nmea parser notebook
JessyBarrette Aug 16, 2023
76c20c4
rename notebooks
JessyBarrette Aug 16, 2023
5339e3e
black .
JessyBarrette Aug 16, 2023
4e873a9
add nav_status dtype = str to nmea parser
JessyBarrette Aug 17, 2023
17e7af5
add time variable to seabird vocabulary and ignore warning for some d…
JessyBarrette Aug 17, 2023
63cbb28
improve notebooks looks
JessyBarrette Aug 17, 2023
314b266
update dfo.odf.bio reference files to match the latest fixes
JessyBarrette Aug 17, 2023
1795396
.gitignore
JessyBarrette Aug 17, 2023
c46f783
Add a different home page
JessyBarrette Aug 17, 2023
d3dabfb
restructure docs
JessyBarrette Aug 17, 2023
40a2002
fix file references
JessyBarrette Aug 17, 2023
b0c002d
fix hook and ignore vocabularies md folder
JessyBarrette Aug 17, 2023
6e99c74
improve vocabulary tables look
JessyBarrette Aug 17, 2023
12f1a5b
add some docstrings and black issues
JessyBarrette Aug 17, 2023
ea59ded
add docstrings to seabird parsers and remove kwargs
JessyBarrette Aug 17, 2023
07e7ea2
add _ to seabird subfunctions
JessyBarrette Aug 17, 2023
12b7aee
rename odf institution to vocabulary variables
JessyBarrette Aug 17, 2023
4a00b08
update odf reference files
JessyBarrette Aug 17, 2023
82e5ec8
improve dfo parsers docs
JessyBarrette Aug 17, 2023
8bb97b9
force push docs deployment
JessyBarrette Aug 17, 2023
d593b19
adapt readme logo base on gh-dark-mode
JessyBarrette Aug 17, 2023
97f5cdc
sync contributions
JessyBarrette Aug 17, 2023
a32788f
fix home page darkmode
JessyBarrette Aug 18, 2023
266011a
drop local icons and use bootstrap icons
JessyBarrette Aug 18, 2023
7948165
drop site from gitignore
JessyBarrette Aug 18, 2023
2890bdb
add footer and navigation
JessyBarrette Aug 18, 2023
12539dd
try to implement site analytics with plausible
JessyBarrette Aug 18, 2023
5a3c0d5
push set default site in action
JessyBarrette Aug 18, 2023
e731158
add https to src analytics
JessyBarrette Aug 18, 2023
a1305f3
improve hook for parser generation to add link to parser page too
JessyBarrette Aug 18, 2023
6384cdf
reorder docs requirements
JessyBarrette Aug 18, 2023
dcecc31
improve xarray css
JessyBarrette Aug 18, 2023
217c20d
improve docs
JessyBarrette Aug 18, 2023
352ba3c
fix import of read
JessyBarrette Aug 18, 2023
fa8e9ba
fix parsers link
JessyBarrette Aug 18, 2023
0914725
fix link to test files folder
JessyBarrette Aug 18, 2023
94c9ae9
refactor onset parser
JessyBarrette Aug 21, 2023
95a0427
refactor onset parser
JessyBarrette Aug 21, 2023
2f05159
Merge remote-tracking branch 'origin/development' into development
JessyBarrette Aug 21, 2023
a79bd6f
Merge remote-tracking branch 'origin/development' into development
JessyBarrette Aug 21, 2023
e5cc82d
Merge remote-tracking branch 'origin/development' into development
JessyBarrette Aug 21, 2023
bb3c75e
restructure test_parsers.py
JessyBarrette Aug 21, 2023
1d5c86b
fix a few parsers issues and refactor test_parser
JessyBarrette Aug 21, 2023
3cfa962
fix time variables encoding
JessyBarrette Aug 22, 2023
9ce633b
bring up standardize_dataset to van_essen_instruments.mon parser
JessyBarrette Aug 22, 2023
50f758e
refactor ocean_data_parser.parsers.utils module
JessyBarrette Aug 22, 2023
db17f76
fix process.to_netcdf and standardize methods
JessyBarrette Aug 22, 2023
b5cedd9
Merge pull request #51 from cioos-siooc/improve-parsers-testing
JessyBarrette Aug 22, 2023
729cf21
Add cioos logo to docs footer
JessyBarrette Aug 24, 2023
47cdb85
remove copyrights
JessyBarrette Aug 24, 2023
2cfaa23
Merge pull request #52 from cioos-siooc/add-cioos-logo-footer
JessyBarrette Aug 24, 2023
372a108
move footer css to partial/footer.html
JessyBarrette Aug 24, 2023
be50c9a
Merge branch 'add-cioos-logo-footer' into development
JessyBarrette Aug 24, 2023
e350cc2
remove metadata docs section, fix links and add vovabularies section …
JessyBarrette Aug 24, 2023
e6f7f42
format tables css
JessyBarrette Aug 24, 2023
ab7cbd6
remove parser list from how-to section for which the links do not work
JessyBarrette Aug 24, 2023
d841b61
Use converters in pd.read_csv instead of the deprecated parse_dates a…
JessyBarrette Aug 24, 2023
855d811
drop amundsen conversion script which is now available as a gist:
JessyBarrette Aug 24, 2023
584c6d7
fix electric-blue parser
JessyBarrette Aug 24, 2023
0c992af
Use converters in pd.read_csv instead of the deprecated parse_dates a…
JessyBarrette Aug 25, 2023
5480d56
Merge remote-tracking branch 'origin/pandas-2.0' into pandas-2.0
JessyBarrette Aug 25, 2023
173d987
Merge branch 'development' into pandas-2.0
JessyBarrette Aug 25, 2023
b4dff0d
Merge pull request #54 from cioos-siooc/pandas-2.0
JessyBarrette Aug 25, 2023
6087594
delete vocabularies that are automatically generated on docs deployment
JessyBarrette Aug 25, 2023
672b0db
fix some typos in ocean_data_parser.read and rename importing_parser …
JessyBarrette Aug 25, 2023
e27de1a
show code on docs
JessyBarrette Aug 25, 2023
6c5f24b
.gitignore site generated and docs automcatically generated files
JessyBarrette Aug 25, 2023
0931589
Merge branch 'pandas-2.0' into development
JessyBarrette Aug 25, 2023
dc440a7
fix import parser
JessyBarrette Aug 25, 2023
649842b
add seabird cnv btl benchmark
JessyBarrette Aug 28, 2023
6048f6a
initial commit of the ios.shell parser migration
JessyBarrette Aug 29, 2023
a6e204d
move GenFile import_data method to the main class and ignore the olde…
JessyBarrette Aug 29, 2023
5b1e468
use vocabulary directely
JessyBarrette Aug 29, 2023
7e36ddd
add fix to some variable names
JessyBarrette Aug 29, 2023
6b7ec59
linter issues
JessyBarrette Aug 29, 2023
633c51f
standardize xarrray output
JessyBarrette Aug 29, 2023
0a2b6ad
remove small import
JessyBarrette Aug 29, 2023
d65f3bc
remove some unused code
JessyBarrette Aug 29, 2023
fff6902
generate time,latitude,longitude from attributes if no variables exists
JessyBarrette Aug 29, 2023
273dc1c
black .
JessyBarrette Aug 29, 2023
6036848
swap dimension to time if time has a dimension
JessyBarrette Aug 29, 2023
5181f50
black .
JessyBarrette Aug 29, 2023
499f1e7
split methods to generate obs_time
JessyBarrette Aug 29, 2023
21d9d85
refactor IosFile methods
JessyBarrette Aug 30, 2023
afbb094
capture files with encoding issues
JessyBarrette Aug 30, 2023
89d0519
add more refactoring
JessyBarrette Aug 30, 2023
6cc5b20
add more to ios shell global attributes
JessyBarrette Aug 30, 2023
3ef38b5
add ios-shell test files
JessyBarrette Aug 30, 2023
e06882c
black .
JessyBarrette Aug 30, 2023
fd580e4
retrieve ios vocabulary from present repo
JessyBarrette Aug 30, 2023
4ee7bb3
drop geojson from ocean_data_parser.read
JessyBarrette Aug 30, 2023
b41b956
Improve van_essen_instruments docs and drop some of the inputs
JessyBarrette Aug 30, 2023
3e705c3
drop cioos data transform dependancies
JessyBarrette Aug 30, 2023
5c8eb1b
drop cioos-siooc-data-transform from odf parser
JessyBarrette Aug 31, 2023
4f46ee7
fix vocabulary indexing issue
JessyBarrette Aug 31, 2023
e3a0e51
fix variables with % in them
JessyBarrette Aug 31, 2023
535ff6f
fix reference file version name
JessyBarrette Aug 31, 2023
de5f7e2
drop geojson test file
JessyBarrette Aug 31, 2023
6ad7ccf
remove deprecated to_pydatetime
JessyBarrette Aug 31, 2023
acd1dd3
doc test workflow install ".dev"
JessyBarrette Aug 31, 2023
080ed72
bring back test geojson file outside test files area
JessyBarrette Aug 31, 2023
e96dab8
fix some deprecated issues
JessyBarrette Aug 31, 2023
adfa229
keep file extension with default file output
JessyBarrette Oct 4, 2023
a873b05
Merge branch 'development' into migrate-ios-shell
JessyBarrette Oct 4, 2023
5ae22f5
add dfo ios bot file
JessyBarrette Oct 4, 2023
4507711
keep file extension with default file output
JessyBarrette Oct 4, 2023
554cb5b
Merge pull request #56 from cioos-siooc/migrate-ios-shell
JessyBarrette Oct 17, 2023
f985058
update pip through workflows
JessyBarrette Oct 25, 2023
d51e213
install the whole dev suite on deploy-docs
JessyBarrette Oct 25, 2023
8ad76fe
upgrade readme
JessyBarrette Nov 10, 2023
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
40 changes: 40 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build documentation

on:
push:
branches:
- main
- development

jobs:
deploy_docs:
environment:
name: ${{github.ref_name}}
url: ${{ github.ref == 'main' && 'https://cioos-siooc.github.io/ocean-data-parser/main/' || 'https://cioos-siooc.github.io/ocean-data-parser/dev/' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: |
python -m pip install --upgrade pip
pip install ".[dev]"
pip install -r docs-requirements.txt
- 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
else
mike deploy dev --push --force
fi
mike set-default dev --push
32 changes: 32 additions & 0 deletions .github/workflows/test-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test docs generation

on:
pull_request:
branches:
- main
- development

jobs:
test_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: |
python -m pip install --upgrade pip
pip install -r docs-requirements.txt
pip install ".[dev]"
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
mike deploy test
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
name: Python package
name: Test linter and full pytest

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

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

jobs:
build:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install .[dev]
pip install ".[dev]"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest parsers
run: pytest
run: pytest -W error::UserWarning
- name: Run benchmark
run: pytest tests/run_benchmark.py --benchmark-json output.json
run: pytest tests/run_benchmark.py --benchmark-json output.json
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,29 @@ dist/
pdc-amundsen-conversion.log

tests/parsers_test_files/amundsen/12713/**/*
output/
output/
docs/read/**/*-hook.md
*.log
file_registry.csv
temp/**
tests/test_file_registry_temp.csv

temp/**
*.log
.env
docs/notebooks/*.ipynb
docs/user_guide/vocabularies/**

# test files generated by notebooks to ignore
notebooks/CTD_HUD2018030_017_01_UP.ODF
notebooks/NAV_20130726.int
notebooks/1801_001.int
notebooks/nmeadata-*.txt
notebooks/MI18MHDR.btl
notebooks/56001001.p2022

#ignore docs that are automatically generated
docs/user_guide/vocabularies/*.md
docs/user_guide/parsers/parser-list.md

site/**
2 changes: 1 addition & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
repositoryUrl: https://github.com/HakaiInstitute/ocean-data-parser.git
repositoryUrl: https://github.com/cioos-siooc/ocean-data-parser.git
branches:
- main
- name: development
Expand Down
9 changes: 5 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
recursive-include ocean_data_parser/read/vocabularies *
include ocean_data_parser/read/dfo/odf_source/config.json
recursive-include ocean_data_parser/read/dfo/odf_source/references *
recursive-include ocean_data_parser/read/dfo/odf_source/references/geographical_areas *
recursive-include ocean_data_parser/vocabularies *
include ocean_data_parser/parsers/dfo/odf_source/*config.json
recursive-include ocean_data_parser/parsers/dfo/odf_source/references *
recursive-include ocean_data_parser/parsers/dfo/odf_source/references/geographical_areas *
include ocean_data_parser/batch/default-batch-config.yaml
82 changes: 56 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,70 @@
# Ocean Data Parser
<!-- 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
With miniconda, create a new environement:
```console
conda create --name ocean_parser
````
Install the package with the following command, ideally within a virtual environment:

Get in the environment:
```console
conda activate ocean_parser
pip install git+https://github.com/cioos-siooc/ocean-data-parser.git
```

Install the present package:
### How to
#### odpy cli
Once installed, the package is usable via the command line interface:
```console
pip install git+https://github.com/HakaiInstitute/ocean-data-parser.git
odpy --help
```


For development, clone locally the package :
```console
git clone git+https://github.com/HakaiInstitute/ocean-data-parser.git
To batch convert a series of files to NetCDF:
```
and install the package:
```console
cd ocean-data-parser
pip install -e .
```
For development purposes, it is recommended to install the development requirements:
```console
pip install -e ".[dev]"
odpy convert -i '**/*.cnv' -p 'seabird.cnv'
```
#### Format auto-detection
Load a compatible file with the automated parser detection method:

## How to
To parse seabird file:
```python
from ocean_data_parser.read import searbird
import ocean_data_parser.parsers

PATH_TO_SEABIRD_CNV = "PATH_TO_SEABIRD_CNV"
ds = seabird.cnv(PATH_TO_SEABIRD_CNV)
# Load a file to an xarray object
ds = ocean_data_parser.parsers.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

# Load a seabird cnv file as an xarray dataset
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!

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: 12 additions & 0 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mkdocs
mkdocs-click
mkdocs-gen-files
mkdocs-jupyter
mkdocs-material
mkdocs-simple-hooks
mkdocstrings[python]
mkdocs-section-index
mike
tabulate
pandas
material-plausible-plugin
3 changes: 3 additions & 0 deletions docs/get_started/contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.
45 changes: 45 additions & 0 deletions docs/get_started/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

### Installation
Clone the project locally

```shell
git clone git+https://github.com/cioos-siooc/ocean-data-parser.git
```

Go to the project directory

```shell
cd ocean-data-parser
```

Install dependencies

```shell
pip install -e ".[dev]"
```

### Testing
The package use pytest to run a series of tests in order to help the development of the different aspect of the package. Within a developping environment, to run the different tests, run the pytest commmand through your terminal within the base directory of the repository. Pytest can also be integrated with different IDE and is run on any pushes and PR to the `main` and `development` branches.

### Parsers Tests
The package contains a number of different parsers compatible with different standard file formats. Each parser is tested on a series of test files made available within the [test file directory](https://github.com/cioos-siooc/ocean-data-parser/blob/main/tests/parsers_test_files) The different tests executed on each individual parsers can be subdivided in 3 main categories:
1. Parse test file to an xarray dataset
2. Parse test file to an xarray dataset and save to a NetCDF4 file.
3. Parse test file to an xarray dataset and compare to a reference file ('*_reference.nc) if made available. Any differences are flagged
4. *(in development)* Assess parsed xarray object compliance with the different convention by using the ioos-compliance checker, resulting objects should be to a minimum compliante to ACDD 1.3 and CF 1.6. Other conventions can be added by adding them to the xarray object global attribute `Convention`.


### Documentation
To run a local instance of the documentation webpage. Install the dependancies:
```console
pip install -r docs-requirements.txt
```

And run the command:

```shell
mike serve
```

Any documentation changes to the main and development branches will automatically update respectively the main and dev document pages.

Loading
Loading