Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 0 additions & 21 deletions .github/workflows/black.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check

on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]

jobs:
check-changelog-entry:
name: changelog entry
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
# `towncrier check` runs `git diff --name-only origin/main...`, which
# needs a non-shallow clone.
fetch-depth: 0

- name: Check changelog
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')"
run: |
if ! pipx run towncrier check --compare-with origin/${{ github.base_ref }}; then
echo "Please see https://landlab.readthedocs.io/en/master/development/contribution/index.html?highlight=towncrier#news-entries for guidance."
false
fi
11 changes: 5 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}
Expand All @@ -44,11 +44,10 @@ jobs:

- name: Show conda installation info
run: conda info

- name: Install dependencies
run: |
conda install --file=requirements.txt
pip install -e ".[doc]"
pip install nox

- name: Build documentation
run: make -C docs clean html
run: nox -s build-docs
7 changes: 4 additions & 3 deletions .github/workflows/flake8.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Flake8
name: Lint

on: [push, pull_request]

jobs:

lint:
name: Check for lint
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
Expand All @@ -22,5 +23,5 @@ jobs:

- name: Lint
run: |
pip install flake8
flake8 sequence tests
pip install nox
nox -s lint
13 changes: 6 additions & 7 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}
Expand All @@ -29,10 +29,9 @@ jobs:

- name: Show conda installation info
run: conda info

- name: Install dependencies
run: |
pip install -e ".[notebook,dev]"
run: pip install nox

- name: Test notebooks
run: pytest --nbmake notebooks/*ipynb
- name: Build documentation
run: nox -s test-notebooks
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.9"

- name: Install twine
run: |
pip install --upgrade pip wheel setuptools
pip install twine
python --version
pip --version
twine --version

- name: Create source distribution
run: |
python setup.py sdist --dist-dir wheelhouse

- name: Upload source distribution
run: |
twine upload --skip-existing wheelhouse/*.tar.gz
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.9"

- name: Install twine
run: |
pip install --upgrade pip wheel setuptools
pip install twine
python --version
pip --version
twine --version

- name: Create source distribution
run: |
python setup.py sdist --dist-dir wheelhouse

- name: Upload source distribution
run: |
twine upload --skip-existing wheelhouse/*.tar.gz
25 changes: 5 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,11 @@ jobs:
- name: Show conda installation info
run: conda info

- name: Build and install package
run: |
conda install rasterio richdem -c conda-forge
pip install .

- name: Install testing dependencies
run: pip install ".[dev]"

- name: Test package
run: |
python -c 'import sequence; print(sequence.__version__)'
pytest --cov=sequence --cov-report= --cov-report=xml -vvv

- name: Test command line
run: |
sequence --version
mkdir example
sequence --cd=example setup --set clock.stop=60000
sequence --cd=example --silent run
sequence --cd=data/marmara --silent run
- name: Install dependencies
run: pip install nox

- name: Build documentation
run: nox -s test

- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
Expand Down
33 changes: 32 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ repos:
require_serial: true
types_or: [python, pyi, jupyter]
additional_dependencies: [".[jupyter]"]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
# additional_dependencies: [flake8-bugbear]

- repo: https://gitlab.com/iamlikeme/nbhooks
rev: 1.0.0
hooks:
Expand All @@ -35,9 +37,38 @@ repos:
entry: nb-ensure-clean
files: \.ipynb$
language: python
language_version: python3
language_version: python3.8

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
files: \.py$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-builtin-literals
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: trailing-whitespace

# - repo: https://github.com/PyCQA/pydocstyle
# rev: 6.1.1
# hooks:
# - id: pydocstyle
# files: sequence/.*\.py$
# args:
# - --convention=numpy
# - --add-select=D417
7 changes: 3 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Other Changes and Additions


0.1.2 (2020-03-04)
------------------
------------------

- Added sediment compaction

Expand Down Expand Up @@ -206,12 +206,11 @@ Other Changes and Additions


0.1.1 (2018-08-24)
------------------
------------------
- Added versioneer for version management


0.1.0 (2018-08-24)
------------------
------------------

- Initial release

1 change: 0 additions & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ recursive-exclude docs *
recursive-exclude news *
recursive-exclude notebooks *
recursive-exclude tests *

Loading