fix: make fitting test self-contained#201
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
- Coverage 77.50% 74.28% -3.22%
==========================================
Files 3 3
Lines 40 35 -5
==========================================
- Hits 31 26 -5
Misses 9 9
🚀 New features to boost your workflow:
|
sbillinge
left a comment
There was a problem hiding this comment.
@john-halloran please see my comment below.
| @@ -1,5 +1,5 @@ | |||
| default_language_version: | |||
| python: python3 | |||
| python: python3.13 | |||
There was a problem hiding this comment.
If we make this change we need to make an issue to change it back. The fix I think though is to include the change from docformatter to ruff. Please look at the scikit-package code to see the changes that are needed. There is an update to this yaml file and then also to the pyproject.toml. Then the pre-commit will work on 3.14.
| @@ -1,5 +1,5 @@ | |||
| default_language_version: | |||
| python: python3 | |||
| python: python3.13 | |||
There was a problem hiding this comment.
please remove this. We don't want this, but update all the pre-commit versions, e.g. the below is copied from diffpy.utils:
default_language_version:
python: python3
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: "pre-commit-autoupdate"
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 9.0.0a3
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/kynan/nbstripout
rev: 0.9.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: no-commit-to-branch
name: Prevent Commit to Main Branch
args: ["--branch", "main"]
stages: [pre-commit]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies:
- tomli
# prettier - multi formatter for .json, .yml, and .md files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- "prettier@^3.2.4"
# docformatter - PEP 257 compliant docstring formatter
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.8
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
and the relevant block in pyproject.toml is
[tool.docformatter]
recursive = true
wrap-summaries = 72
wrap-descriptions = 72
please adapt as needed here.
@sbillinge This PR was made with your comments here in mind. All test data is now self-contained. If we want to run on the real data, that can be something we do as part of the release process, but we no longer need to distribute large data files with the sdist.