Skip to content

Commit

Permalink
Merge branch 'dev' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
leewujung committed Mar 14, 2023
2 parents ca24ad1 + 739beb0 commit a806a77
Show file tree
Hide file tree
Showing 92 changed files with 8,527 additions and 2,406 deletions.
1 change: 1 addition & 0 deletions .ci_helpers/docker/http.dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM httpd:2.4
ARG TARGETPLATFORM

COPY echopype/test_data /usr/local/apache2/htdocs/data
1 change: 1 addition & 0 deletions .ci_helpers/docker/minioci.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM minio/minio
ARG TARGETPLATFORM

# Install git
RUN microdnf install git
Expand Down
1 change: 0 additions & 1 deletion .ci_helpers/py3.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ dependencies:
- s3fs==2022.5.0
- matplotlib-base
- cmocean
- mamba=0.20.0
1 change: 0 additions & 1 deletion .ci_helpers/py3.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ dependencies:
- s3fs==2022.5.0
- matplotlib-base
- cmocean
- mamba=0.20.0
1 change: 0 additions & 1 deletion .ci_helpers/py3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ dependencies:
- s3fs==2022.5.0
- matplotlib-base
- cmocean
- mamba=0.20.0
4 changes: 3 additions & 1 deletion .ci_helpers/run-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"utils": {},
"visualize": {},
"metrics": {},
"mask": {},
"consolidate": {},
}

if __name__ == "__main__":
Expand All @@ -57,7 +59,7 @@
)
args = parser.parse_args()
if args.local:
temp_path = Path("temp_echopype_output")
temp_path = Path("~/.echopype/temp_output")
dump_path = Path("echopype/test_data/dump")
if temp_path.exists():
shutil.rmtree(temp_path)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v13
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
environment-name: ${{ env.CONDA_ENV }}
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Install dev tools
shell: bash -l {0}
run: |
mamba install -c conda-forge --yes --file requirements-dev.txt
micromamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt
- name: Install echopype
shell: bash -l {0}
run: |
Expand All @@ -83,12 +83,12 @@ jobs:
pytest -vv -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
- name: Upload ci test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ci_test_log
path: ci_test_log.log
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
image_name: ["minioci", "http"]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Retrieve test data
if: matrix.image_name == 'http'
uses: ./.github/actions/gdrive-rclone
Expand All @@ -32,21 +32,22 @@ jobs:
echo "IMAGE_SPEC=${IMAGE_SPEC}" >> $GITHUB_ENV
echo "DATE_TAG=${DATE_TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
id: docker_build_push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./
file: ./.ci_helpers/docker/${{ matrix.image_name }}.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.IMAGE_SPEC }}:${{ env.DATE_TAG }}
${{ env.IMAGE_SPEC }}:latest
2 changes: 1 addition & 1 deletion .github/workflows/ep-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
if: github.repository == 'OSOceanAcoustics/echopype'
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2.2.1
uses: actions/setup-python@v4.5.0
with:
python-version: 3.9

Expand All @@ -42,7 +42,7 @@ jobs:
echo ""
echo "Generated files:"
ls -lh dist/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: releases
path: dist
Expand All @@ -52,11 +52,11 @@ jobs:
needs: build-artifact
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4.5.0
name: Install Python
with:
python-version: 3.9
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v13
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
environment-name: ${{ env.CONDA_ENV }}
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Install dev tools
shell: bash -l {0}
run: |
mamba install -c conda-forge --yes --file requirements-dev.txt
micromamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt
- name: Install echopype
shell: bash -l {0}
run: |
Expand Down Expand Up @@ -93,12 +93,12 @@ jobs:
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
- name: Upload ci test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ci_test_log
path: ci_test_log.log
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
if: github.repository == 'OSOceanAcoustics/echopype'
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2.2.1
uses: actions/setup-python@v4.5.0
with:
python-version: 3.9

Expand All @@ -46,7 +46,7 @@ jobs:
echo ""
echo "Generated files:"
ls -lh dist/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: releases
path: dist
Expand All @@ -56,11 +56,11 @@ jobs:
needs: build-artifact
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4.5.0
name: Install Python
with:
python-version: 3.9
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
Expand All @@ -69,7 +69,7 @@ jobs:
ls -ltrh
ls -ltrh dist
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
Expand Down Expand Up @@ -99,11 +99,11 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
69 changes: 69 additions & 0 deletions .github/workflows/windows-utils.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: windows-utils-test

on:
push:
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"]
pull_request:
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"]
pull_request_target:
paths-ignore: [".ci_helpers/docker/**", "**/docker.yaml"]
workflow_dispatch:

env:
CONDA_ENV: echopype

jobs:
windows-test:
name: windows-${{ matrix.python-version }}-build
runs-on: "windows-latest"
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.9
experimental: false
defaults:
run:
shell: powershell
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup miniconda w/mamba
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: ${{ env.CONDA_ENV }}
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
# Currently problematic! See https://github.com/mamba-org/mamba/issues/2157
# - name: Setup micromamba
# uses: mamba-org/provision-with-micromamba@v15
# with:
# environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
# environment-name: ${{ env.CONDA_ENV }}
# cache-env: true
# cache-env-key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(format('.ci_helpers/py{0}.yaml', matrix.python-version)) }}
- name: Print conda info
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Install dev tools
run: |
mamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt
- name: Install echopype
run: |
python -m pip install -e .
- name: Running all Tests
run: |
pytest -vvv -rx --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings echopype/tests/utils |& tee ci_${{ matrix.python-version }}_test_log.log
6 changes: 3 additions & 3 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- 8080:80
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Copying test data to http server
run: |
rm .\echopype\test_data -r -fo
Expand All @@ -46,12 +46,12 @@ jobs:
# Check data endpoint
curl http://localhost:8080/data/
- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3.2.5
env:
# Increase this value to reset cache if '.ci_helpers/py{0}.yaml' has not changed
CACHE_NUMBER: 0
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ toolbox
*.mat
ek60/
azfp/
temp_echopype_output/
notebooks/*_dev/
_echopype_version.py
!echopype/test_data
Expand Down

0 comments on commit a806a77

Please sign in to comment.