Skip to content

Commit

Permalink
Update PyPI documentation and increment version to 3.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneholloman committed Oct 1, 2024
1 parent 65d01d3 commit 16d359a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 100 deletions.
103 changes: 4 additions & 99 deletions notes/pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -49,109 +46,21 @@ 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 <https://pypi.org/project/codemapper/>

## 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:

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/*
```

Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/codemapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 16d359a

Please sign in to comment.