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

Adaptation to blueprint + Update to Python 3.10 #27

Merged
merged 28 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
04f8275
Switched to copier template.
pirmink Feb 23, 2023
e25cf11
Adapted linter config.
pirmink Feb 23, 2023
5b5dc31
Fix some linter issues and temporarily disable pylint.
pirmink Feb 23, 2023
d3b5bec
Removed obsolete Makefile.
pirmink Feb 23, 2023
302a0dd
Updated environment.
pirmink Feb 23, 2023
98f9c10
Updated pyproject.toml to use Python 3.9 as required by pyflexplot. R…
pirmink Apr 6, 2023
ab4d724
First step towards newer Python with unpinned requirements.
pirmink May 30, 2023
f2c7d10
fix on dataclasses wrapper
twicki Jun 1, 2023
c5477f6
Merge pull request #24 from twicki/new-blueprint
pirmink Jun 2, 2023
872adf0
Added working environment.yml: using unpinned installation does curre…
pirmink Jun 8, 2023
2e9d6c6
Updated to new blueprint using copier.
pirmink Jun 8, 2023
382bb87
Merge branch 'new-blueprint' into new-blueprint-updated.
pirmink Jun 8, 2023
ca91e3c
Updated reference for slow tests.
pirmink Jun 9, 2023
f4310b2
Changed function, so it is covers the inversion of both coordinates i…
Jul 10, 2023
040ee5a
Changed type hint comparison for the casting and Properties of the Te…
Jul 14, 2023
40c2288
Removed obsolete class in the Textbox Test
Karko93 Jul 17, 2023
125729d
Removed obsolete class in the textbox axes tests
Karko93 Jul 17, 2023
0c005b1
Removed obsolete code
Karko93 Jul 24, 2023
797ed2a
Removed DeprecationWarning coming from new matplotlib version due to …
Karko93 Jul 24, 2023
7950291
Updated the references in the slow test of the different models
Karko93 Jul 24, 2023
2eba1ae
Formatted Code
Karko93 Jul 25, 2023
c91ce0a
Updated to pypdf because pyPDF2 is deprecated
Karko93 Jul 26, 2023
103b0c7
Updated environment and version information
Karko93 Jul 27, 2023
3f3cc5c
Merge pull request #25 from Karko93/new-blueprint
pirmink Aug 2, 2023
01654a2
Update Readme
Karko93 Oct 5, 2023
f49290d
Merge pull request #26 from Karko93/environment-update
Karko93 Oct 5, 2023
28a1c80
Delete environment.yml
Karko93 Oct 13, 2023
d01db16
Update README, Added Quick start section
Karko93 Oct 13, 2023
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
29 changes: 0 additions & 29 deletions .bumpversion.cfg

This file was deleted.

17 changes: 17 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: cc8b3de
_src_path: [email protected]:MeteoSwiss-APN/mch-python-blueprint.git
email: [email protected]
full_name: Stefan Ruedisuehli
github_username: MeteoSwiss-APN
module_name: pyflexplot
project_doc_url: https://github.io/MeteoSwiss-APN/pyflexplot
project_github: https://github.com/MeteoSwiss-APN/pyflexplot
project_keywords: Dispersion, Flexpart, COSMO, mapping, visualization
project_name: PyFlexPlot
project_short_description: Stefan Ruedisuehli's PyFlexPlot
project_slug: pyflexplot
project_ssh_url: git+ssh://[email protected]/MeteoSwiss-APN/pyflexplot.git
python_version: '3.10'
version: 1.0.10
year: '2023'
40 changes: 40 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run pre-commit in blueprint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
blueprint-pre-commit:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.0
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge
channel-priority: flexible
show-channel-urls: true
- name: Create env from unpinned reqs
run: |
conda env create --name dev_env --file requirements/requirements.yml
- name: Install project into env
run: |
conda run --name dev_env pip install --no-deps .
- name: Install pre-commit hooks
run: |
conda run --name dev_env pre-commit install-hooks
- name: Run pre-commit hooks
run: |
conda run --name dev_env pre-commit run --all-files
19 changes: 6 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Local files
local/

# Default test data link
data

# Non-permanent data, e.g. test output
scratch/

# Batch processing log files
log/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -58,7 +46,6 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
junit-*.xml
.pytest_cache/

# Translations
Expand All @@ -85,6 +72,9 @@ target/
# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

Expand All @@ -96,6 +86,7 @@ celerybeat-schedule

# virtualenv
.venv
.venvs
venv/
venvs/
venv_*/
Expand All @@ -112,6 +103,8 @@ venv_*/

# mypy
.mypy_cache/

# Eclipse
.project

# VS Code
Expand Down
91 changes: 82 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,91 @@ repos:
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.1.0
- repo: local
hooks:
- id: forbidden-files-copier-rej
name: find copier rejection files
language: fail
entry: "Found copier update rejection file(s): review and remove them"
files: "\\.rej$"
- id: forbidden-files-git-orig
name: find git merge backup files
language: fail
entry: "Found git merge backup file(s): review and remove them"
files: "\\.orig$"
- repo: local
hooks:
- id: rstcheck
name: rstcheck
description: Check REST files for correctness
language: system
entry: rstcheck
types: [rst]
- repo: local
hooks:
- id: codespell
name: codespell
description: Check for spelling errors
language: system
entry: codespell
- repo: local
hooks:
- id: black
files: ^(.*\.py|(src|tests|docs)/(.*/)*.*\.py)$
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
name: black
description: Format Python code
language: system
entry: black
types_or: [python, pyi]
- repo: local
hooks:
- id: isort
files: ^(.*\.py|(src|tests|docs)/(.*/)*.*\.py)$
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
name: isort
description: Group and sort Python imports
language: system
entry: isort
types_or: [python, pyi, cython]
- repo: local
hooks:
- id: pydocstyle
files: ^src/(.*/)*.*\.py$
name: pydocstyle
description: Check docstrings in Python code for compliance with conventions
language: system
entry: pydocstyle
types: [python]
files: ^src/
# SR It would be handy to abort if one linter fails b/c the same error often
# SR triggers multiple linters. That way, if flake8 fails, pylint and mypy
# SR (which in large code bases can take some time to run) could be skipped
# SR before fixing the error. Unfortunately, pre-commit only provides the global
# SR option fail_fast, which would abort even after the small fixers and
# SR formatters changed something. A potential solution could be to write a
# SR small bash script run-linters.sh that runs flake8, pylint and run-mypy.sh
# SR in that order and aborts on error.
#- repo: local
# hooks:
# - id: pylint
# name: pylint
# description: Check Python code for correctness, consistency and adherence to best practices
# language: system
# entry: pylint
# types: [python]
- repo: local
hooks:
- id: flake8
name: flake8
description: Check Python code for correctness, consistency and adherence to best practices
language: system
entry: flake8
types: [python]
- repo: local
hooks:
- id: mypy
name: mypy
description: Perform static type analysis of Python code
language: system
entry: bash tools/run-mypy.sh
require_serial: true
pass_filenames: false
verbose: true
types: [python]
files: ^(src|tests)/
9 changes: 9 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Credits

## Development Lead

- Stefan Ruedisuehli <[email protected]>

## Contributors

None yet. Why not be the first?
13 changes: 0 additions & 13 deletions AUTHORS.rst

This file was deleted.

Loading
Loading