Skip to content

Commit

Permalink
Merge pull request OSOceanAcoustics#560 from OSOceanAcoustics/dev
Browse files Browse the repository at this point in the history
Release/v0.5.6
  • Loading branch information
leewujung authored Feb 10, 2022
2 parents 6adb10b + 8c7eda2 commit 17a86e4
Show file tree
Hide file tree
Showing 65 changed files with 2,915 additions and 5,548 deletions.
19 changes: 19 additions & 0 deletions .ci_helpers/py3.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: echopype
channels:
- conda-forge
dependencies:
- python=3.10
- dask
- matplotlib
- netCDF4
- numpy
- pynmea2
- pytz
- scipy
- xarray
- zarr
- fsspec
- requests
- aiohttp
- s3fs
- mamba=0.20.0
2 changes: 1 addition & 1 deletion .ci_helpers/py3.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dependencies:
- requests
- aiohttp
- s3fs
- mamba
- mamba=0.20.0
2 changes: 1 addition & 1 deletion .ci_helpers/py3.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dependencies:
- requests
- aiohttp
- s3fs
- mamba
- mamba=0.20.0
2 changes: 1 addition & 1 deletion .ci_helpers/py3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dependencies:
- requests
- aiohttp
- s3fs
- mamba
- mamba=0.20.0
18 changes: 11 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
experimental: [false]
include:
- python-version: 3.7
experimental: false
- python-version: 3.8
experimental: false
- python-version: 3.9
experimental: true
- python-version: "3.10"
experimental: true
services:
# TODO: figure out how to update tag when there's a new one
minio:
Expand Down Expand Up @@ -71,15 +75,15 @@ jobs:
use-mamba: true
auto-activate-base: false
use-only-tar-bz2: true
- name: Update mamba
shell: bash -l {0}
run: |
conda update -c conda-forge --yes mamba
- name: Print conda env
shell: bash -l {0}
run: |
conda info
conda list
- name: Remove docker-compose python
if: ${{ matrix.python-version == '3.10' }}
shell: bash -l {0}
run: sed -i "/docker-compose/d" requirements-dev.txt
- name: Install dev tools
shell: bash -l {0}
run: |
Expand All @@ -91,7 +95,7 @@ jobs:
- name: Running All Tests
shell: bash -l {0}
run: |
pytest -vv -rx --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
pytest -vv -rx --numprocesses=4 --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
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Packaging

# Only run for tagged releases
on:
push:
branches:
- dev
workflow_dispatch:

jobs:
build-artifact:
name: Build echopype package
runs-on: ubuntu-20.04
if: github.repository == 'OSOceanAcoustics/echopype'
steps:
- name: Checkout
uses: actions/[email protected]
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0

- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9

- name: Install dependencies
run: python -m pip install setuptools wheel

# This step is only necessary for testing purposes and for TestPyPI
- name: Fix up version string for TestPyPI
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
# Change setuptools-scm local_scheme to "no-local-version" so the
# local part of the version isn't included, making the version string
# compatible with PyPI.
sed --in-place "s/node-and-date/no-local-version/g" setup.py
- name: Build source and wheel distributions
run: |
python setup.py sdist bdist_wheel
echo ""
echo "Generated files:"
ls -lh dist/
- uses: actions/upload-artifact@v2
with:
name: releases
path: dist

test-built-dist:
name: Test echopype package
needs: build-artifact
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.9
- uses: actions/download-artifact@v2
with:
name: releases
path: dist
- name: List contents of built dist
run: |
ls -ltrh
ls -ltrh dist
- name: Upgrade pip
run: |
sleep 3
python -m pip install --upgrade pip
- name: Check wheel file
run: |
python -m pip uninstall --yes echopype
echo "=== Testing wheel file ==="
# Install wheel to get dependencies and check import
wheel_file=$(ls ./dist | grep ".whl")
python -m pip install ./dist/$wheel_file
python -c "import echopype; print(echopype.__version__)"
echo "=== Done testing wheel file ==="
- name: Check source tar
run: |
python -m pip uninstall --yes echopype
echo "=== Testing source tar file ==="
# Install tar gz and check import
source_file=$(ls ./dist | grep ".tar.gz")
python -m pip install ./dist/$source_file
python -c "import echopype; print(echopype.__version__)"
echo "=== Done testing source tar file ==="
22 changes: 13 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test PR

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

env:
CONDA_ENV: echopype
Expand All @@ -16,11 +16,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
experimental: [false]
include:
- python-version: 3.7
experimental: false
- python-version: 3.8
experimental: false
- python-version: 3.9
experimental: true
- python-version: "3.10"
experimental: true
services:
# TODO: figure out how to update tag when there's a new one
minio:
Expand Down Expand Up @@ -67,15 +71,15 @@ jobs:
use-mamba: true
auto-activate-base: false
use-only-tar-bz2: true
- name: Update mamba
shell: bash -l {0}
run: |
conda update -c conda-forge --yes mamba
- name: Print conda env
shell: bash -l {0}
run: |
conda info
conda list
- name: Remove docker-compose python
if: ${{ matrix.python-version == '3.10' }}
shell: bash -l {0}
run: sed -i "/docker-compose/d" requirements-dev.txt
- name: Install dev tools
shell: bash -l {0}
run: |
Expand All @@ -96,12 +100,12 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'Needs Complete Testing')
shell: bash -l {0}
run: |
pytest -vv -rx --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
pytest -vvv -rx --numprocesses=4 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
- name: Running Tests
if: "!contains(github.event.pull_request.labels.*.name, 'Needs Complete Testing')"
shell: bash -l {0}
run: |
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vv,-rx,--disable-warnings" --include-cov ${{ steps.files.outputs.added_modified_renamed }} |& tee ci_test_log.log
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vvv,-rx,--numprocesses=4,--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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
skip_existing: true
- name: Check pypi packages
run: |
sleep 3
Expand Down
16 changes: 14 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
exclude: |
(?x)^(
docs/|
echopype/tests/|
echopype/test_data/|
echopype/process/|
echopype/visualize/|
echopype/convert/add_ancillary.py|
echopype/convert/convert_combine.py
echopype/convert/convert_combine.py|
docs/source/conf.py
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -35,3 +35,15 @@ repos:
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/executablebooks/jupyter-book
rev: v0.12.1
hooks:
- id: jb-to-sphinx
args: ["docs/source"]

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ["-w", "docs/source", "echopype"]
4 changes: 4 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ python:
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- plot
- method: setuptools
path: .
# system_packages: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Echopype is licensed under the open source [Apache 2.0 license](https://opensour

---------------

Copyright (c) 2018-2021, echopype Developers.
Copyright (c) 2018-2022, echopype Developers.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sphinx_rtd_theme
sphinx-automodapi
sphinxcontrib-mermaid
jupyter-book
numpydoc
docutils<0.18
docutils<0.18
47 changes: 47 additions & 0 deletions docs/source/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Book settings
# Learn more at https://jupyterbook.org/customize/config.html

title: ""
author: Echopype Developers
copyright: "2022"
logo: _static/echopype_logo_square.png

# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: 'off'
timeout: -1

# Define the name of the latex output file for PDF builds
# latex:
# latex_documents:
# targetname: book.tex

# Add a bibtex file so that we can create citations
# bibtex_bibfiles:
# - references.bib

# Information about where the book exists on the web
repository:
url: https://github.com/OSOceanAcoustics/echopype # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
home_page_in_navbar: false
use_issues_button: true
use_repository_button: true

sphinx:
extra_extensions: [
'sphinx_automodapi.automodapi',
'numpydoc',
# 'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.githubpages',
'sphinxcontrib.mermaid'
]
Loading

0 comments on commit 17a86e4

Please sign in to comment.