Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload packages to PyPI #8

Merged
merged 7 commits into from
Sep 5, 2022
Merged

Upload packages to PyPI #8

merged 7 commits into from
Sep 5, 2022

Conversation

leandro-lucarella-frequenz

This PR does a bit of cleanup and modernization of the project and upload
packages to PyPI when new tags are pushed.

  • Exclude GitHub and test files from MANIFEST.in
  • Move project metadata/config to pyproject.toml
  • Add extra metadata to pyproject.toml
  • Move build-py-proto to setup.py
  • Don't run the CI GitHub workflow on release
  • Publish distribution files to PyPI

@leandro-lucarella-frequenz leandro-lucarella-frequenz added this to the v0.11.0 milestone Sep 1, 2022
@leandro-lucarella-frequenz leandro-lucarella-frequenz added part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:enhancement New feature or enhancement visitble to users labels Sep 1, 2022
@github-actions github-actions bot added part:docs Affects the documentation part:python Affects the Python bindings labels Sep 1, 2022
@leandro-lucarella-frequenz leandro-lucarella-frequenz linked an issue Sep 1, 2022 that may be closed by this pull request
The source distribution of the package doesn't need those files.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
This cleans up the setup.py file to only have the build hook to compile
the proto files.

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>
Now proto files can be compiled via `setup.py compile_proto`. This
removes the dependency on shell scripts, which helps with portability.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Release is triggered on creating GitHub releases, as well as updating,
etc. We generally don't want to re-run the CI if there are no code
changes.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
@leandro-lucarella-frequenz
Copy link
Author

I already tested this in my fork, here are the produced packages: https://pypi.org/project/frequenz-api-microgrid/#history (these are tags I created in my forks for testing purposes).

Add steps to publish distribution files to PyPI when a tag is created.

We also split the step of building the package distribution as we don't
need to do that for every Python version, so there is no much use to
have it inside a matrix.

This also parallelize jobs as much as possible, so protolint, tests and
building the distribution packages are done in parallel.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
@leandro-lucarella-frequenz
Copy link
Author

I added one commit to update to the new repository name.

Copy link
Contributor

@tiyash-basu-frequenz tiyash-basu-frequenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:docs Affects the documentation part:python Affects the Python bindings part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:enhancement New feature or enhancement visitble to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uploads packages to pypi
3 participants