Skip to content

Improve package management#172

Merged
cbouss merged 15 commits intomainfrom
packaging-improvements
Feb 25, 2026
Merged

Improve package management#172
cbouss merged 15 commits intomainfrom
packaging-improvements

Conversation

@skupr-anaconda
Copy link
Contributor

@skupr-anaconda skupr-anaconda commented Feb 24, 2026

Why this PR

This PR modernizes packaging and development configuration so metadata, tooling, and conda recipe behavior stay aligned.
Goal: reduce config drift and make build/test/lint flows more predictable.

Significant changes

1) Packaging + dependency alignment

  • Updated pyproject.toml runtime deps to match actual imports (click>=8.1.7, conda, conda-recipe-manager, ruamel.yaml, etc.).
  • Synced conda recipe runtime/test deps in conda-recipe/meta.yaml, including keeping user-facing recipe deps (ruamel.yaml.jinja2, conda-build, grayskull).
  • Added stronger import smoke tests in recipe tests (percy.commands.main, percy.render.*, percy.repodata.repodata, percy.updater.grayskull_sync).

Why: avoid runtime/install mismatches and improve package confidence.

2) Config migration to pyproject.toml

  • Moved mypy config from .mypy.ini to [tool.mypy].
  • Moved pytest warning filters from .pytest.ini to [tool.pytest.ini_options].
  • Updated Makefile to use pyproject.toml for make analyze.
  • Removed legacy .mypy.ini and .pytest.ini.

Why: centralize tool config in a single modern location.

3) Optional dependency structure improvements

  • Expanded optional extras with explicit groups (tests, lint) while preserving dev for compatibility.
  • Added explicit setuptools package discovery boundaries (include = ["percy", "percy.*"], exclude = ["percy.tests*"]).

Why: clearer intent and safer packaging scope.

4) Pre-commit refresh + formatter stability

  • Refreshed hooks (security, YAML/TOML/config validation, style, docs, CI checks), and updated versions.
  • Fixed darker/black churn by pinning compatible Black and aligning line-length config.

Why: broader quality coverage with stable formatter behavior.

5) Lint/type/doc cleanup in code

  • Disabled R0917 (too-many-positional-arguments) in .pylintrc.
  • Removed unused Optional imports reported by pylint.
  • Fixed D200 docstring formatting violations.
  • Replaced deprecated typing.Hashable usage in percy/types.py with collections.abc.Hashable.

Why: reduce noisy lint failures and keep compatibility with newer tool versions.

6) Repo hygiene/docs updates

  • Refreshed .gitignore with a concise Python-dev baseline.
  • Updated README to reflect current developer workflows and config locations.
  • Included recipe validation guidance (conda build --python=3.11 conda-recipe/meta.yaml).

Why: better onboarding and fewer accidental local artifact commits.


Validation performed

  • pre-commit run --all-files
  • pre-commit run pylint --all-files
  • pre-commit run pydocstyle --all-files
  • make analyze
  • conda build --python=3.11 conda-recipe/meta.yaml ✅ (build + import checks + recipe pytest passed)

Note: Cursor AI was used for validations and the PR's initial comment.

@skupr-anaconda skupr-anaconda self-assigned this Feb 24, 2026
@skupr-anaconda skupr-anaconda marked this pull request as ready for review February 24, 2026 12:21
@skupr-anaconda
Copy link
Contributor Author

I'll wait for this PR #173 because it removes grayskull.

@skupr-anaconda
Copy link
Contributor Author

I'll wait for this PR #173 because it removes grayskull.

Done.

Copy link
Collaborator

@cbouss cbouss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@cbouss cbouss merged commit 77ad546 into main Feb 25, 2026
4 checks passed
@cbouss cbouss deleted the packaging-improvements branch February 25, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants