Closed kddubey closed 2 months ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.07%. Comparing base (
b6505ff
) to head (9f90ea1
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Great work as always @kddubey! Thank you!
The goal of this PR is to make tap's structure a bit safer. Here are the changes:
setup.py
w/ a staticpyproject.toml
. See docstap
tosrc/tap
. See docstap.__version__
as a literal stringFrom the user's perspective, I believe there aren't any breaking changes. But in case you prefer making the most minimal change to fix #141, it would be to add a
pyproject.toml
which looks like this:How has this been tested?
Install the fork
1. Make and activate a fresh venv (I use virtualenvwrapper) ``` mkvirtualenv temp ``` 2. Uninstall `wheel`, `setuptools` ``` python -m pip uninstall wheel setuptools --upgrade pip ``` 4. Install the package from the fork ``` python -m pip install git+https://github.com/kddubey/typed-argument-parser.git@pyprojecttoml ``` 5. Install `pytest` and `pydantic`, and run `pytest` ``` python -m pip install pytest "pydantic>=2" ``` ``` pytest ``` 6. rm temp ``` rmvirtualenv temp ```Build, test-upload, install, and test the package
1. Checkout this branch: ``` git pull ``` ``` git checkout pyprojecttoml ``` 2. Make and activate a fresh venv (I use virtualenvwrapper) ``` mkvirtualenv temp ``` 3. Install some packaging things ``` python -m pip install build twine ``` 4. Build the package ``` python -m build ``` `dist/` should have: ``` typed_argument_parser-1.10.0-py3-none-any.whl typed_argument_parser-1.10.0.tar.gz ``` 5. Test the contents of `dist/` ``` python -m twine check dist/* ``` 6. Test that [fake-uploading to PyPI works](https://packaging.python.org/en/latest/guides/using-testpypi/#using-testpypi-with-twine) (I haven't actually ran this step onwards) ``` python -m twine upload --repository testpypi dist/* ``` You may wanna also check that https://test.pypi.org/project/typed-argument-parser looks good 7. Test that installing from this test PyPI repo works ``` python -m pip install \ --index-url https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ \ typed-argument-parser ``` 8. Install `pytest` and `pydantic`, and run `pytest` ``` python -m pip install pytest "pydantic>=2" ``` ``` pytest ``` 9. Maybe run some of the demo scripts in the repo in case you wanna double check 10. rm temp ``` rmvirtualenv temp ```