Skip to content

Commit 254ee10

Browse files
authored
Merge pull request #1138 from OSOceanAcoustics/dev
Release/v0.8.0
2 parents b33eb74 + 11d6504 commit 254ee10

File tree

79 files changed

+20695
-8049
lines changed

Some content is hidden

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

79 files changed

+20695
-8049
lines changed

.ci_helpers/py3.11.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: echopype
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.11
6+
- pip
7+
- pip:
8+
- -r ../requirements.txt

.ci_helpers/run-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"echodata": {},
3434
"mask": {},
3535
"metrics": {},
36-
"preprocess": {},
36+
"qc": {},
3737
"utils": {},
3838
"visualize": {},
3939
}

.github/workflows/build.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ jobs:
1616
test:
1717
name: ${{ matrix.python-version }}-build
1818
runs-on: ubuntu-20.04
19-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
19+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
2020
continue-on-error: ${{ matrix.experimental }}
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
include:
25-
- python-version: 3.8
26-
experimental: false
27-
- python-version: 3.9
28-
experimental: false
29-
- python-version: "3.10"
30-
experimental: true
24+
python-version: ["3.8", "3.9", "3.10"]
25+
runs-on: [ubuntu-latest]
26+
experimental: [false]
27+
# TODO: Uncomment when netcdf is unpinned
28+
# include:
29+
# - runs-on: ubuntu-latest
30+
# python-version: "3.11"
31+
# experimental: true
3132
services:
3233
# TODO: figure out how to update tag when there's a new one
3334
minio:
@@ -47,19 +48,19 @@ jobs:
4748
run: |
4849
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
4950
- name: Setup micromamba
50-
uses: mamba-org/provision-with-micromamba@v16
51+
uses: mamba-org/setup-micromamba@v1
5152
with:
5253
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
5354
environment-name: ${{ env.CONDA_ENV }}
54-
cache-env: true
55-
cache-env-key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(format('.ci_helpers/py{0}.yaml', matrix.python-version)) }}
56-
- name: Print conda env
55+
cache-environment: true
56+
post-cleanup: 'all'
57+
- name: Print conda environment
5758
shell: bash -l {0}
5859
run: |
59-
conda info
60-
conda list
60+
micromamba info
61+
micromamba list
6162
- name: Remove docker-compose python
62-
if: ${{ matrix.python-version == '3.10' }}
63+
if: ${{ matrix.python-version == '3.10' || matrix.python-version == '3.11' }}
6364
shell: bash -l {0}
6465
run: sed -i "/docker-compose/d" requirements-dev.txt
6566
- name: Install dev tools
@@ -86,7 +87,7 @@ jobs:
8687
uses: actions/upload-artifact@v3
8788
with:
8889
name: ci_test_log
89-
path: ci_test_log.log
90+
path: ci_${{ matrix.python-version }}_test_log.log
9091
- name: Upload code coverage to Codecov
9192
uses: codecov/codecov-action@v3
9293
with:

.github/workflows/pr.yaml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ env:
1010

1111
jobs:
1212
test:
13-
name: ${{ matrix.python-version }}-build
14-
runs-on: ubuntu-20.04
15-
if: "!contains(github.event.pull_request.title, '[skip ci]')"
13+
name: ${{ matrix.python-version }}--${{ matrix.runs-on }}
14+
runs-on: ${{ matrix.runs-on }}
15+
if: ${{ !contains(github.event.pull_request.title, '[skip ci]') }}
1616
continue-on-error: ${{ matrix.experimental }}
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
include:
21-
- python-version: 3.8
22-
experimental: false
23-
- python-version: 3.9
24-
experimental: false
25-
- python-version: "3.10"
26-
experimental: true
20+
python-version: ["3.8", "3.9", "3.10"]
21+
runs-on: [ubuntu-latest]
22+
experimental: [false]
23+
# TODO: Uncomment when netcdf is unpinned
24+
# include:
25+
# - runs-on: ubuntu-latest
26+
# python-version: "3.11"
27+
# experimental: true
28+
defaults:
29+
run:
30+
shell: bash -l {0}
2731
services:
2832
# TODO: figure out how to update tag when there's a new one
2933
minio:
@@ -43,60 +47,58 @@ jobs:
4347
run: |
4448
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
4549
- name: Setup micromamba
46-
uses: mamba-org/provision-with-micromamba@v16
50+
uses: mamba-org/setup-micromamba@v1
4751
with:
4852
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
4953
environment-name: ${{ env.CONDA_ENV }}
50-
cache-env: true
51-
cache-env-key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(format('.ci_helpers/py{0}.yaml', matrix.python-version)) }}
52-
- name: Print conda env
53-
shell: bash -l {0}
54+
cache-environment: true
55+
post-cleanup: 'all'
56+
- name: Print conda environment
5457
run: |
55-
conda info
56-
conda list
58+
micromamba info
59+
micromamba list
5760
- name: Remove docker-compose python
58-
if: ${{ matrix.python-version == '3.10' }}
59-
shell: bash -l {0}
61+
if: ${{ matrix.python-version == '3.10' || matrix.python-version == '3.11' }}
6062
run: sed -i "/docker-compose/d" requirements-dev.txt
6163
- name: Install dev tools
62-
shell: bash -l {0}
6364
run: |
6465
micromamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt
66+
# We only want to install this on one run, because otherwise we'll have
67+
# duplicate annotations.
68+
- name: Install error reporter
69+
if: ${{ matrix.python-version == '3.9' }}
70+
run: |
71+
python -m pip install pytest-github-actions-annotate-failures
6572
- name: Install echopype
66-
shell: bash -l {0}
6773
run: |
6874
python -m pip install -e .[plot]
6975
- name: Copying test data to services
70-
shell: bash -l {0}
7176
run: |
7277
python .ci_helpers/docker/setup-services.py --deploy --data-only --http-server ${{ job.services.httpserver.id }}
7378
7479
# Check data endpoint
7580
curl http://localhost:8080/data/
7681
- name: Finding changed files
7782
id: files
78-
uses: lsetiawan/get-changed-files@pr_target
83+
uses: Ana06/get-changed-files@v2.2.0
7984
with:
8085
format: 'csv'
8186
- name: Print Changed files
82-
shell: bash -l {0}
8387
run: echo "${{ steps.files.outputs.added_modified_renamed }}"
8488
- name: Running all Tests
8589
if: contains(github.event.pull_request.title, '[all tests ci]')
86-
shell: bash -l {0}
8790
run: |
8891
pytest -vvv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
8992
- name: Running Tests
90-
if: "!contains(github.event.pull_request.title, '[all tests ci]')"
91-
shell: bash -l {0}
93+
if: ${{ !contains(github.event.pull_request.title, '[all tests ci]') }}
9294
run: |
93-
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vvv,-rx,--numprocesses=${{ env.NUM_WORKERS }},--max-worker-restart=3,--disable-warnings" --include-cov ${{ steps.files.outputs.added_modified_renamed }} |& tee ci_test_log.log
95+
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vvv,-rx,--numprocesses=${{ env.NUM_WORKERS }},--max-worker-restart=3,--disable-warnings" --include-cov ${{ steps.files.outputs.added_modified_renamed }} |& tee ci_${{ matrix.python-version }}_test_log.log
9496
- name: Upload ci test log
9597
if: ${{ success() || failure() }}
9698
uses: actions/upload-artifact@v3
9799
with:
98100
name: ci_test_log
99-
path: ci_test_log.log
101+
path: ci_${{ matrix.python-version }}_test_log.log
100102
- name: Upload code coverage to Codecov
101103
uses: codecov/codecov-action@v3
102104
with:

docs/source/_config.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ execute:
1818
# targetname: book.tex
1919

2020
# Add a bibtex file so that we can create citations
21-
# bibtex_bibfiles:
22-
# - references.bib
21+
bibtex_bibfiles:
22+
- references.bib
2323

2424
# Information about where the book exists on the web
2525
repository:
@@ -39,13 +39,15 @@ sphinx:
3939
'sphinx_automodapi.automodapi',
4040
'numpydoc',
4141
# 'sphinx.ext.autodoc',
42+
'sphinxcontrib.bibtex',
4243
'sphinx.ext.intersphinx',
4344
'sphinx.ext.mathjax',
4445
'sphinx.ext.ifconfig',
4546
'sphinx.ext.githubpages',
4647
'sphinxcontrib.mermaid'
4748
]
48-
# config:
49+
config:
50+
bibtex_reference_style: label
4951
# # https://github.com/executablebooks/jupyter-book/issues/1186
5052
# # https://sphinx-book-theme.readthedocs.io/en/latest/customize/sidebar-secondary.html
5153
# html_theme_options:

docs/source/_toc.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@ parts:
1212
chapters:
1313
- file: convert
1414
- file: open-converted
15-
- file: process
1615
- file: data-format
17-
title: Data formats
16+
title: Raw data formats
1817
sections:
18+
- file: data-format-sonarnetcdf4
1919
- file: data-format-raw
20-
- file: data-format-processed
21-
- file: data-format-5to6
20+
- file: data-format-changes
21+
- file: data-proc
22+
title: Data processing
23+
sections:
24+
- file: data-proc-func
25+
- file: data-proc-additional
2226
- file: viz
2327
- file: processing-levels
2428
title: Processing levels
25-
- caption: Help & reference
29+
- caption: Help & references
2630
chapters:
27-
- file: api
2831
- file: whats-new
29-
- file: roadmap
3032
- file: contributing
33+
- file: api
34+
- file: zbibliography
35+
- file: roadmap
3136
- file: resources

docs/source/api.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ API components that most users will interact with.
88
In echopype versions prior to 0.5.0, the API in this page focused
99
on the ``convert`` and ``process`` subpackages. See the
1010
`0.4.1 API page <https://echopype.readthedocs.io/en/v0.4.1/api.html>`_
11-
if you're using a previous release. That workflow is being deprecated.
11+
if you're using a previous release. That workflow is now removed.
1212

1313
**Content**
1414

@@ -58,10 +58,24 @@ calibrate
5858
:no-inheritance-diagram:
5959
:no-heading:
6060

61-
preprocess
61+
clean
62+
^^^^^
63+
64+
.. automodapi:: echopype.clean
65+
:no-inheritance-diagram:
66+
:no-heading:
67+
68+
commongrid
69+
^^^^^^^^^^
70+
71+
.. automodapi:: echopype.commongrid
72+
:no-inheritance-diagram:
73+
:no-heading:
74+
75+
consolidate
6276
^^^^^^^^^^
6377

64-
.. automodapi:: echopype.preprocess
78+
.. automodapi:: echopype.consolidate
6579
:no-inheritance-diagram:
6680
:no-heading:
6781

@@ -79,6 +93,14 @@ mask
7993
:no-inheritance-diagram:
8094
:no-heading:
8195

96+
metrics
97+
^^^^^^^
98+
99+
.. automodapi:: echopype.metrics
100+
:no-inheritance-diagram:
101+
:no-heading:
102+
103+
82104
Utilities
83105
---------
84106

docs/source/contributing.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,20 @@ then set the source repository as the ``upstream`` git remote:
7272
cd echopype
7373
git remote add upstream https://github.com/OSOceanAcoustics/echopype.git
7474
75-
Create a `conda <https://docs.conda.io>`_ environment for echopype development
76-
(replace the Python version with your preferred version):
75+
Below shows the steps to create a `conda <https://docs.conda.io>`_
76+
environment for echopype development
77+
(replace the Python version with your preferred version).
78+
79+
.. attention::
80+
We recommend using the ``libmamba`` solver instead of the classic solver,
81+
since the ``conda create`` and ``conda install`` step could take very long or fail.
82+
See instructions `here <https://conda.github.io/conda-libmamba-solver/getting-started/>`_
83+
for installation and usage.
84+
7785

7886
.. code-block:: bash
7987
80-
# create conda environment using the supplied requirements files
88+
# create a conda environment using the supplied requirements files
8189
# note the last one docs/requirements.txt is only required for building docs
8290
conda create -c conda-forge -n echopype --yes python=3.9 --file requirements.txt --file requirements-dev.txt --file docs/requirements.txt
8391
@@ -93,13 +101,6 @@ Create a `conda <https://docs.conda.io>`_ environment for echopype development
93101
# the command will install all the dependencies along with plotting dependencies.
94102
pip install -e ".[plot]"
95103
96-
.. note::
97-
98-
Try using `mamba <https://mamba.readthedocs.io>`_ instead of ``conda``
99-
if the ``conda create`` and ``conda install`` step fail or take too long.
100-
``Mamba`` is a drop-in replacement for conda environment creation and package
101-
installation that is typically faster than conda.
102-
103104
See the :doc:`installation` page to simply install the latest echopype release from conda or PyPI.
104105

105106

0 commit comments

Comments
 (0)