Improve open source readiness - #16
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive community and project health files, including a contributing guide, code of conduct, security policy, roadmap, changelog, and GitHub issue templates. It also updates PyPI package metadata in pyproject.toml and adds a test to verify these metadata fields. Feedback on the test suite points out that resolving pyproject.toml using a relative path from the current working directory can cause FileNotFoundError if tests are run from a different directory, and suggests resolving the path relative to the test file's location instead.
| self.assertIn("torchcodec>=0.11.1", mlx_dependencies) | ||
|
|
||
| def test_package_metadata_includes_discovery_fields(self) -> None: | ||
| pyproject = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8")) |
There was a problem hiding this comment.
Using Path("pyproject.toml") assumes that the current working directory of the test runner is always the repository root. If the tests are executed from another directory (e.g., from within the tests directory), this will raise a FileNotFoundError. It is more robust to resolve the path relative to the test file's location using __file__.
| pyproject = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8")) | |
| pyproject = tomllib.loads((Path(__file__).parent.parent / "pyproject.toml").read_text(encoding="utf-8")) |
There was a problem hiding this comment.
Fixed in 8b5205b. tests/test_package.py now resolves pyproject.toml relative to the test file via Path(__file__).resolve().parents[1], and both metadata tests use the shared helper. Verified from the repo root and from the tests/ directory.
Summary
Test Plan
PYTHONPATH=src uv run --python 3.14 python -m unittest discover -s tests -p 'test_*.py'uv builduv run --python 3.14 --with twine python -m twine check dist/echoalign_asr_mlx-0.5.1.dev0+gb77713fee.d20260526*