Skip to content

Update pyproject.toml - #203

Merged
ns-rse merged 8 commits into
mainfrom
ns-rse/201-pyproject-dependency-group
Oct 16, 2026
Merged

ns-rse merged 8 commits into
mainfrom
ns-rse/201-pyproject-dependency-group

Conversation

@ns-rse

@ns-rse ns-rse commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #201

  • Moves package.optional-dependencies to dependency-groups
  • Adds uv.lock file should people wish to use uv to manage virtual environments whilst working on this package.
  • Adds pytest-xdist to test packages
  • Adds the following .pre-commit hooks.
    • ruff > ruff-check
    • ruff-format
    • validate-pyproject
    • uv-lock

The package would benefit from using [`uv`](https://docs.astral.sh/uv) to ease installation and management of virtual
environments if users require to use it so including the `uv.lock` file. A pre-commit hook is included which checks it
is up-to-date.
Closes #200

- Updates `uv.lock` to reflect these changes in structure.
- Adds `pytest-xdist` as a dev dependency should users wish to use it.
- Removes duplications from the `depenency-groups` (nee `project.optional-dependencies`).
The width of images was extracted along with the length and the pixel to nanometre scaling calculated on both axes
within a tuple, but only the length scaling was ever used, this means the extraction and calculation is on the width
axis is redundant and has therefore been removed.

Tests still pass.
- Ruff pre-commit hooks have changed names and been split into `ruff-check` and `ruff-format`
- Adds the `validate-pyproject` hook to check `pyproject.toml` is valid.
@ns-rse ns-rse added jpk ci Continuous Integration labels Oct 16, 2026
`validate-pyproject` hook identified issues with the config (things move on!)

Means there are some changes to the code after linting with `ruff` but will include those in a separate commit.
@ns-rse
ns-rse force-pushed the ns-rse/201-pyproject-dependency-group branch 2 times, most recently from 79b2294 to ea8f318 Compare October 16, 2026 13:10
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.11688% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.52%. Comparing base (d65d297) to head (85ee420).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
AFMReader/top.py 80.30% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
- Coverage   79.84%   79.52%   -0.33%     
==========================================
  Files          12       12              
  Lines         928      928              
==========================================
- Hits          741      738       -3     
- Misses        187      190       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Updating `ruff` configuration identified lots of small changes that could be improved both in `pyproject.toml` for
configuration of the tool and also in the code.

- `dos2unix AFMReader/top.py` to remove `^M` from the file.
- Enable more `ruff` checks
- Explicitly disable a few `ruff` checks

**NB** Tests fail but not because of changes introduced here, they were already failing, see #200
@ns-rse
ns-rse force-pushed the ns-rse/201-pyproject-dependency-group branch from d79d783 to 39f54bd Compare October 16, 2026 13:22
@ns-rse
ns-rse merged commit 9e525b4 into main Oct 16, 2026
12 checks passed
@ns-rse
ns-rse deleted the ns-rse/201-pyproject-dependency-group branch October 16, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration jpk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to dependency groups

2 participants