From 16d359afd6421c532981674ce921df10ff3707ac Mon Sep 17 00:00:00 2001 From: Shane Holloman Date: Wed, 2 Oct 2024 02:43:00 +1300 Subject: [PATCH] Update PyPI documentation and increment version to 3.5.2 --- notes/pypi.md | 103 ++----------------------------------- src/codemapper/__init__.py | 2 +- 2 files changed, 5 insertions(+), 100 deletions(-) diff --git a/notes/pypi.md b/notes/pypi.md index 997fc4a..1936854 100644 --- a/notes/pypi.md +++ b/notes/pypi.md @@ -8,9 +8,6 @@ How to prepare the CodeMapper project for publication on PyPI, including testing - [Table of Contents](#table-of-contents) - [Local Testing](#local-testing) - [Building the Package](#building-the-package) - - [Publishing to PyPI](#publishing-to-pypi) - - [Post-Publication Steps](#post-publication-steps) - - [Updating the Package](#updating-the-package) - [Troubleshooting](#troubleshooting) ## Local Testing @@ -39,7 +36,7 @@ pip install -e . Test the package: ```bash -codemapper /path/to/test/directory +codemapper /path/to/test/directory or URL ``` If any issues arise, fix them and repeat steps 7.2 and 7.3 @@ -49,96 +46,7 @@ If any issues arise, fix them and repeat steps 7.2 and 7.3 Install build tools: ```bash -pip install --upgrade setuptools wheel twine -``` - -Build the package: - -```bash -python setup.py sdist bdist_wheel -``` - -## Publishing to PyPI - -Upload the package to PyPI: - -```bash -python -m twine upload dist/* -``` - -Enter your PyPI credentials when prompted. - -Verify the package is available on PyPI by visiting - -## Post-Publication Steps - -Commit your changes: - -```bash -git add . -git commit -m "Prepare CodeMapper for PyPI publication" -``` - -Push the branch to GitHub: - -```bash -git push -u origin pypi-prep -``` - -Create a pull request on GitHub: - -- Go to your repository on GitHub -- Click "Compare & pull request" -- Review the changes and create the pull request - -Merge the pull request: - -- After review, click "Merge pull request" -- Confirm the merge - -Switch back to the main branch and pull changes: - -```bash -git checkout main -git pull origin main -``` - -Create a new release on GitHub: - -- Go to your repository on GitHub -- Click "Releases" > "Create a new release" -- Tag version: v3.2.1 -- Release title: CodeMapper 3.2.1 -- Describe the release and click "Publish release" - -## Updating the Package - -When you need to update the package: - -Create a new branch for the update: - -```bash -git checkout -b update-vX.X.X -``` - -Make necessary changes to your code. - -Update the version number in `setup.py` and `src/codemapper/__init__.py`. - -Commit the changes: - -```bash -git add . -git commit -m "Update to version X.X.X" -``` - -Push the branch and create a pull request as in steps 10.2-10.4. - -After merging, checkout and pull the main branch: - -```bash -git checkout main -git pull origin main +pip install --upgrade setuptools wheel twine build installer ``` Rebuild the package: @@ -146,12 +54,13 @@ Rebuild the package: I typically delete to the old build files before rebuilding. ```bash -python setup.py sdist bdist_wheel +python -m build ``` Upload the new version: ```bash +# have you pypi credentials ready python -m twine upload dist/* ``` @@ -186,7 +95,3 @@ Create a new release on GitHub as in step 10.6. - Double-check the package name and version on PyPI. Remember to always test your package locally in a fresh virtual environment before uploading to PyPI. This ensures that your package works as expected when installed by other users. - ---- - -By following this detailed guide, you should be able to successfully prepare your CodeMapper project for PyPI, publish it, and manage updates. Always remember to increment the version number for each new release and keep your README and documentation up to date. diff --git a/src/codemapper/__init__.py b/src/codemapper/__init__.py index a932091..6d6c341 100644 --- a/src/codemapper/__init__.py +++ b/src/codemapper/__init__.py @@ -6,6 +6,6 @@ creating detailed Markdown documentation of their structure and contents. """ -__version__ = "3.5.0" +__version__ = "3.5.2" # Any other necessary imports or package-level code can go here