Upload Packages to PyPI#16
Conversation
Since we are now encouraging using forks, there is no need to limit the branches we run on, which needs extra maintenance. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Also don't fetch submodules, as they are not used. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
This makes it easier to add or remove items from the matrix. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
4aba93b to
4c769d3
Compare
We also remove both the setup.cfg and setup.py files as they are not required by newer versions of pip and setuptools (but for this we also need to bump the setuptools version). If you are getting this error locally after the upgrade: ERROR: Project file:///home/luca/devel/frequenz-sdk-python has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660. You might need to upgrade the dependencies in your local virtual environment (re-run `python -m pip install -e .`). We now need to depend on `pyproject.toml` too to cache dependencies in the CI. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Different Python versions could potentially have different dependencies (for example if a newer library version only works with a newer python) so it is safer to have one cache per python version. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Add the following configuration keys to have more complete and descriptive metadata: * readme * keywords * classifiers * project.authors.email * project.urls Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Exclude files used for version control, testing, benchmarking, etc. from the source distribution, which only needs the files to build a wheel. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
4c769d3 to
dd2cfc7
Compare
dd2cfc7 to
814ad35
Compare
jakub-toptal
left a comment
There was a problem hiding this comment.
LGTM (just some minor comments)
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.10" |
There was a problem hiding this comment.
Why change 3.8 to 3.10? Is it the python version for which this job will publish sdk to PyPi?
There was a problem hiding this comment.
No particular reason, it was mainly copy &paste from the channels repo. The python version is not "pinned" in the built packages so it doesn't really matter.
There was a problem hiding this comment.
I added a comment to the commit message.
| ## Upgrading | ||
|
|
||
| Even if there are no breaking changes, if when upgrading you see this error in | ||
| your local environment: |
There was a problem hiding this comment.
Even if there are no breaking changes, if when upgrading you see this error in
your local environment.
Even if there are no breaking changes, if you see this error in
your local environment while upgrading:
There was a problem hiding this comment.
Yup, it sounds weird. I will fix.
There was a problem hiding this comment.
Done
|
|
||
| ## Upgrading | ||
|
|
||
| <!-- Here goes notes on how to upgrade from previous versions, including if there are any depractions and what they should be replaced with --> |
There was a problem hiding this comment.
did you mean deprecation?
There was a problem hiding this comment.
Done
Add steps to publish distribution files to PyPI when a tag is created. The Python version used to create the wheel is updated just for consistency with other projects, it shouldn't really affect the resulting wheel because this is a pure python package, so it doesn't depend on the Python version, is just shipping text files. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Add a GitHub workflow to create the GitHub Release automatically when a version is tagged. Also use the GitHub feature to create the CHANGELOG automatically. When creating the GitHub release the contents of the file RELEASE_NOTES.md will be used as release notes, so it should only contain an explanation on the release main changes and be user-facing. Also add the release notes for the current release. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Add a CONTRIBUTING.md guide explaining how to build, test, setup a development environment and release the library. Also mention the contributing guide in the README.md and add a RELEASE_NOTES template, so when releasing new versions is easy to clear the release notes by just copying the template. Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
The labels need to be marked explicitly as strings because they have a ":". Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
814ad35 to
8ab19cc
Compare
|
Updated |
Upload packages to PyPI and improve CI:
fail-fastconfigIf when upgrading you see this error:
You might need to update the dependencies in you virtual environment (for
example
python -m pip install -U -e .)Fixes #2.