- Add a GitHub action to publish a source distribution (sdist) + wheel (binary package) to PyPI
- PyPI will create the package on upload unlike Docker Hub
This will need a PYPI_TOKEN secret added. Please go register @ pypi.org make a token please + add to GitHub secrets
- Later on you could swap the token locked to this one module if you want to be security concious
- (Please do this before merging)
- Upload latest + git commit has on ever push to main
- Upload latest_relesae when we do a github release
Need secrets added and potentially change of the Docker Hub image name etc.
- Add a pyproject.toml to install all modules and packages
- Use hatch to build + install
- Still only claim support for 3.9
- We don't specify versions in pyproject.toml on purpose so people can have some flexibility there
- If they want the tested pinned versions they can use requirements.txt like Docker + CI does ...
- This will allow the package to be uploaded to PyPI if you'd like now :)
- `git mv main.py gpt3discord.py` as main.py is to common (incase someone installs to shared python env)
- Move initalization code into a init() function to have entry point script call
- Update `Dockerfile` to install via pyproject.toml
- Both docker + build CI install requirements.txt so we get the known versions of dependencies that work
- Update README for less steps now in installing
- Side note, we will have to track versions now and increment as we see fit - I'd like to discuss using GitHub releases here ...
- Sort requirements.txt to be alphabetical ...
Test:
- Add python 3.9 CI to install our module
- Paves the way to add more CI to help me test the module works in 3.11
- Build in a local venv
- `python3.9 -m venv /tmp/foovenv`
- `/tmp/foovenv/bin/pip install -r requirements.txt`
- `/tmp/foovenv/bin/pip install .`
- Build in docker
- `docker build -t gpt3discord .`