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

Update cookiecutter #260

Merged
merged 21 commits into from
Oct 22, 2024
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
6 changes: 3 additions & 3 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
engines:
pylint:
enabled: true
python_version: 3
pylint:
enabled: true
python_version: 3
exclude_paths:
- 'tests/**'
- 'docs/source/conf.py'
45 changes: 25 additions & 20 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
{
"template": "https://github.com/bird-house/cookiecutter-birdhouse.git",
"commit": "be4eeb281ac2a027c2128c4ef84894ba559c8c24",
"context": {
"cookiecutter": {
"full_name": "Carsten Ehbrecht",
"email": "[email protected]",
"github_username": "roocs",
"project_name": "rook",
"project_slug": "rook",
"project_repo_name": "rook",
"project_readthedocs_name": "rook",
"project_short_description": "A WPS service for roocs.",
"version": "0.13.1",
"open_source_license": "Apache Software License 2.0",
"http_port": "5000",
"_copy_without_render": [
"{{cookiecutter.project_slug}}/templates/*.cfg"
],
"_template": "https://github.com/bird-house/cookiecutter-birdhouse.git"
}
"template": "https://github.com/bird-house/cookiecutter-birdhouse.git",
"commit": "d25191ecc41c091d9b4a392f0ac89d70ff27db55",
"context": {
"cookiecutter": {
"full_name": "Carsten Ehbrecht",
"email": "[email protected]",
"github_username": "roocs",
"project_name": "rook",
"project_slug": "rook",
"project_repo_name": "rook",
"project_readthedocs_name": "rook",
"project_short_description": "A WPS service for roocs.",
"version": "0.13.1",
"open_source_license": "Apache Software License 2.0",
"http_port": "5000",
"use_pytest": "y",
"use_black": "n",
"create_author_file": "y",
"_copy_without_render": [
"{{cookiecutter.project_slug}}/templates/*.cfg"
],
"__gh_slug": "roocs/rook",
"_template": "https://github.com/bird-house/cookiecutter-birdhouse.git"
}
},
"checkout": null
}
5 changes: 5 additions & 0 deletions .github/workflows/docker-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
egress-policy: audit
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build Docker image (no push)
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install flake8
- name: Install linting libraries
run: |
python -m pip install flake8
- name: Run Lint 📦
Expand All @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11" ] # "3.12"
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
defaults:
run:
shell: bash -l {0}
Expand All @@ -70,13 +70,13 @@ jobs:
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
micromamba-version: 1.5.10-0 # Pin micromamba version because of following issue: https://github.com/mamba-org/setup-micromamba/issues/225
- name: Install requirements 📦
run: |
python -m pip install -e .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
python -m pip install -e ".[dev]"
- name: Test with pytest ⚙️
run: make test
run: |
pytest -v -m "not slow and not online" tests

docs:
name: Docs (Python${{ matrix.python-version }})
Expand All @@ -103,9 +103,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dev requirements 📦
- name: Install rook with dev requirements 📦
run: |
python -m pip install -r requirements_dev.txt
python -m pip install -e ".[dev]"
- name: Build Docs 📚
run: |
make docs
143 changes: 110 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# installer
#Makefile

# Docker
#Dockerfile
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# PyWPS
custom.cfg
.custom.cfg
*.pid
.custom.cfg
custom.cfg

# C extensions
*.so

# Python / Extensions etc.
*~
*.mo
*.so
*.pyc
*.pyo
*.egg
Expand All @@ -21,26 +21,57 @@ custom.cfg
*.bak
__pycache__

# Unit test / Coverage reports
# Distribution / packaging
*.egg-info/
.Python
.eggs/
build/
develop-eggs/
dist/
downloads/
eggs/
env/
lib/
lib64/
parts/
sdist/
var/
wheels/

# Translations
*.mo
*.pot

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
*.cover
*.lock
*.log
.cache
.pytest_cache
.coverage
.tox
nosetests.xml
unit_tests/testdata.json
.coverage.*
.hypothesis/
.pytest_cache/
.tox/
coverage.xml
coverage/
htmlcov/
nosetests.xml
testdata.json


# R
*.Rhistory

# Eclipse / PyDev
.project
.pydevproject
.settings

# PyCharm
*.idea

# Kate
*.kate-swp

Expand All @@ -62,26 +93,48 @@ downloads
.mr.developer.cfg
bootstrap-buildout.py
bootstrap.py
#generated by buildout

*.pid

# sphinx
#docs/Makefile
docs/make.bat
# Sphinx documentation
docs/Makefile
docs/_build
docs/_html/
docs/doctrees/
docs/html/
docs/build/
docs/make.bat
docs/source/output-sanitize.cfg

# External Sources
#src/external
src/

# Django stuff:
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# PyBuilder
target/

# pyenv
.python-version

# Dask worker cache
dask-worker-space/

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# tests
*.log
*.lock
testdata.json
output_*.nc

# IPython
Expand All @@ -95,3 +148,27 @@ output_*.nc

# Merge conflict
*.orig

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# VSCode
.vscode/

# Eclipse / PyDev
.project
.pydevproject
.settings

# PyCharm
*.idea
48 changes: 20 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
default_language_version:
python: python3
python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
language_version: python3
- id: trailing-whitespace
exclude: setup.cfg
- id: end-of-file-fixer
language_version: python3
- id: end-of-file-fixer
exclude: setup.cfg
- id: check-yaml
language_version: python3
- id: debug-statements
language_version: python3
- repo: https://github.com/ambv/black
rev: 22.3.0
- id: check-yaml
- id: debug-statements
- repo: https://github.com/ambv/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
args: ["--target-version", "py37"]
- repo: https://github.com/pycqa/flake8
rev: 3.9.1
- id: black
args: ["--target-version", "py39"]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
language_version: python3
- id: flake8
args: ['--config=setup.cfg']
#- repo: https://github.com/pre-commit/mirrors-autopep8
# rev: v1.4.4
Expand All @@ -36,22 +30,20 @@ repos:
# rev: 5.6.4
# hooks:
# - id: isort
# language_version: python3
# args: ['--profile', 'black']
#- repo: https://github.com/pycqa/pydocstyle
# rev: 5.0.2
# hooks:
# - id: pydocstyle
# args: ["--conventions=numpy"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.14.0
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
language_version: python3
- repo: meta
- id: pyupgrade
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- id: check-hooks-apply
- id: check-useless-excludes
# - repo: https://github.com/kynan/nbstripout
# rev: 0.3.9
# hooks:
Expand Down
Loading