Skip to content

Commit

Permalink
Merge branch 'release/v0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wpk committed Mar 15, 2024
2 parents 2ee639e + 3ce2e14 commit 536bb94
Show file tree
Hide file tree
Showing 169 changed files with 11,563 additions and 7,030 deletions.
37 changes: 12 additions & 25 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git",
"commit": "49d100c749e6cfa2cba3460ed06e4a06be07cc63",
"checkout": "feature/nox",
"template": "https://github.com/usnistgov/cookiecutter-nist-python.git",
"commit": "61580376ae0c11b954b1d78c9812f5979bc81622",
"checkout": "develop",
"skip": [
"src/thermoextrap/__init__.py",
"docs/examples/usage/demo.ipynb",
Expand All @@ -10,34 +10,21 @@
],
"context": {
"cookiecutter": {
"project_name": "thermoextrap",
"project_slug": "thermoextrap",
"project_short_description": "Thermodynamic extrapolation",
"full_name": "William P. Krekelberg",
"email": "[email protected]",
"github_username": "usnistgov",
"pypi_username": "wpk-nist",
"conda_channel": "conda-forge",
"project_name": "thermoextrap",
"project_slug": "thermoextrap",
"_copy_without_render": [
"*.html",
"docs/_templates/*.rst",
"docs/_templates/autosummary/*.rst",
"docs/_templates/autodocsumm/*.rst",
"docs/_static/css/*",
"docs/_static/js/*",
"changelog.d/templates/*.j2",
"changelog.d/templates/auto-changelog/*.jinja2"
],
"project_short_description": "Thermodynamic extrapolation",
"version": "0.0.1",
"use_pytest": "y",
"use_pypi_deployment_with_travis": "n",
"command_line_interface": "No command-line interface",
"create_author_file": "y",
"open_source_license": "NIST license",
"sphinx_auto": "autosummary",
"sphinx_use_autodocsumm": "y",
"command_line_interface": "none",
"sphinx_use_autodocsumm": true,
"sphinx_theme": "sphinx_book_theme",
"_template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git"
"year": "2020",
"__answers": "",
"_copy_without_render": [],
"_template": "https://github.com/usnistgov/cookiecutter-nist-python.git"
}
},
"directory": null
Expand Down
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pip-delete-this-directory.txt
htmlcov/
.tox/
.nox/
envs/
.coverage
.coverage.*
.cache
Expand Down Expand Up @@ -99,18 +100,35 @@ ENV/
# mkdocs documentation
/site

# NOTE: use `/.mypy_cache/`, etc because want to flag those in other
# mypy
.mypy_cache/

# pytpe
.pytype/

# ruff
.ruff_cache

# PDF output
README.pdf

# IDE settings
.vscode/
pyrightconfig.json
.autoenv.zsh
.autoenv_leave.zsh
.noxconfig.toml
config/userconfig.toml
cruft.patch
/docs/**/generated/
/monkeytype.sqlite3
/dist-conda/
/tmp/
/thermoextrap-feedstock*/
/src/**/_version.py
tuna-loadtime.log
/requirements/py*-dev-user.yaml
/requirements/dev-user.txt
/requirements/lock/py*-dev-user-conda-lock.yml*
/requirements/lock/py*-dev-user.txt*
/README.pdf
196 changes: 110 additions & 86 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# pre-commit install
# pre-commit run --all-files
# See https://pre-commit.com for more information
Expand All @@ -7,129 +6,154 @@ default_install_hook_types:
- pre-commit
- commit-msg
repos:
#* Top level
# * Top level
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-yaml
- id: check-json
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: check-toml
#* Formatting
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
# * Sync dependencies
- repo: https://github.com/mxr/sync-pre-commit-deps
rev: v0.0.1
hooks:
- id: sync-pre-commit-deps

# * Pyproject-fmt
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
args: [--indent=4, --keep-full-version]
files: ^pyproject.toml$

# * Prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.6"
rev: v4.0.0-alpha.8
hooks:
- id: prettier
alias: markdownlint
stages: [commit]
additional_dependencies:
- prettier-plugin-toml
exclude: ^tests/lnpy_data/sample_data.json
#** markdown

# * Markdown
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.6.0
rev: v0.12.1
hooks:
- id: markdownlint-cli2
args: ["--style prettier"]
#* Linting
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.261"
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
# - id: black-jupyter
# Move to just black. use nbqa for notebook formatting
- id: black
alias: markdownlint
args: [--style, prettier]

# * Linting
# To be replace by ruff analog when I find one ...
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.13.0"
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.3.0
# exclude: ^README.md
- black==24.2.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
types_or: &ruff-types-or [python, pyi, jupyter]
args: [--fix, --show-fixes]
- id: ruff-format
types_or: *ruff-types-or

# * Spelling
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
args: [-I, docs/spelling_wordlist.txt]
exclude_types: [jupyter]

# * Notebook spelling
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.8.4
hooks:
- id: nbqa
alias: nbqa-codespell
name: nbqa-codespell
additional_dependencies: &codespell-deps [codespell==2.2.6, tomli] # make sure same as above
args:
[codespell, --ignore-words=docs/spelling_wordlist.txt, --nbqa-shell]
- id: nbqa
alias: nbqa-codespell
name: nbqa-codespell-markdown
additional_dependencies: *codespell-deps
args:
[
codespell,
--ignore-words=docs/spelling_wordlist.txt,
--nbqa-shell,
--nbqa-md,
]

# * Strip out metadata from notebooks
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbqa-ruff
additional_dependencies: [ruff]
- id: nbqa-black
additional_dependencies: [black]
- id: nbstripout
args: [
--keep-output, # keep output (needed for nbval testing)
--keep-count, # Errors with nbval without this...
--extra-keys, # strip out kernelspec. If use this, always have to reselect kernel when open a notebook...
"metadata.kernelspec metadata.kernel_spec",
]

#* Commit message
# * Commit message
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.0.1
rev: v3.18.3
hooks:
- id: commitizen
stages: [commit-msg]

#* Manual Linting
- repo: local
hooks:
- id: mypy
name: mypy
entry: tox
args: ["-e", "lint-mypy"]
language: system
pass_filenames: false
# additional_dependencies: [tox]
types: [python]
require_serial: true
stages: [manual]
- id: pyright
name: pyright
entry: pyright
args: []
language: system
pass_filenames: true
# additional_dependencies: [tox]
types: [python]
require_serial: true
stages: [manual]
# isort, pyupgrade, flake8 defer to ruff
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
stages: [manual]
# * Manual Linting ------------------------------------------------------------
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.1
hooks:
- id: pyupgrade
stages: [manual]
args: [--py38-plus]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
stages: [manual]
additional_dependencies:
- flake8-docstrings
- Flake8-pyproject
# - pep8-naming
# - flake8-rst-docstrings
exclude: ^tests/|^src/thermoextrap/tests/|^docs/conf.py|^setup.py|example/gpr_active_learning/|src/thermoextrap/legacy
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.8.4
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade]
stages: [manual]
args: [--py38-plus]
- id: nbqa-isort
additional_dependencies: [isort]

# ** typos
# Probably stick with codespell, but this might also be nice...
- repo: https://github.com/crate-ci/typos
rev: v1.19.0
hooks:
- id: typos
stages: [manual]
#** spelling
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
exclude: "[.]ipynb$"
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.4
hooks:
- id: codespell
types_or: [python, rst, markdown, cython, c]
additional_dependencies: [tomli]
args: [-I, docs/spelling_wordlist.txt]
- id: nbqa
alias: nbqa-typos
name: nbqa-typos
additional_dependencies: &typos-deps [typos==1.19.0] # make sure save version as above.
stages: [manual]
args: [typos, --nbqa-shell]
- id: nbqa
alias: nbqa-typos
name: nbqa-typos-markdown
additional_dependencies: *typos-deps
stages: [manual]
args: [typos, --nbqa-shell, --nbqa-md]
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore file for prettier
# Similar to .gitignore

# Use pyproject-fmt for pyproject.toml
pyproject.toml

# Don't fix yaml files under requirements/lock. These are created by conda-lock.
/requirements/lock/*.y*ml

# Don't fix copier answers
.copier-answers.y*ml
4 changes: 2 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Development Leads

- Jacob Monroe \<[email protected]>
- William P. Krekelberg \<[email protected]>
- Jacob Monroe <[email protected]>
- William P. Krekelberg <[email protected]>

## Contributors

Expand Down
Loading

0 comments on commit 536bb94

Please sign in to comment.