Feature/modernize tooling and tests#19
Open
twardoch wants to merge 6 commits into
Open
Conversation
This commit introduces a significant modernization of the project's tooling and structure.
Key changes include:
1. **Build System & Packaging:**
* Migrated from `setup.py` to `pyproject.toml` using Hatch as the build backend.
* Added `hatch-vcs` for dynamic versioning based on Git tags.
* Updated project metadata and dependencies in `pyproject.toml`.
2. **Code Quality & Formatting:**
* Integrated `ruff` for linting and formatting.
* Configured `ruff` in `pyproject.toml` and applied formatting to the codebase.
* Resolved all initial linting issues.
3. **Static Type Checking:**
* Integrated `mypy` for static type analysis.
* Configured `mypy` in `pyproject.toml`.
* Added type hints to `tags/plugin.py` and `setup.py`.
* Installed necessary type stubs (`types-PyYAML`, `types-Markdown`).
4. **Development Workflow:**
* Added `uv` to `README.md` as a recommended tool for virtual environments.
* Created convenience scripts in `pyproject.toml` using Hatch for linting, formatting, type checking, testing, and building.
5. **Testing:**
* Set up `pytest` as the test runner.
* Created `pytest.ini` for configuration.
* Added initial unit tests for `tags/plugin.py` in `tests/test_plugin.py`, covering `get_metadata` and basic `TagsPlugin` functionality.
* Configured a `test` environment in Hatch for running tests.
Work was in progress to ensure the tests run correctly via Hatch scripts, involving debugging TOML configuration for Hatch environments and scripts. The next steps would have been to confirm test execution and then proceed with GitHub Actions, pre-commit hooks, and further documentation/cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.