Skip to content

feat: add publish-to-test-pypi.yml - #55

Merged
Dexter9532 merged 1 commit into
mainfrom
test_pypi
Nov 22, 2025
Merged

feat: add publish-to-test-pypi.yml#55
Dexter9532 merged 1 commit into
mainfrom
test_pypi

Conversation

@MiladMakdesi

Copy link
Copy Markdown
Contributor

No description provided.

@Dexter9532

Copy link
Copy Markdown
Contributor

should it be empty?

@Dexter9532 Dexter9532 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be on merge with main not on push

Comment thread .github/workflows/publish-to-test-pypi.yml
@mirzak

mirzak commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

For this to work, we also need to do the following:

We only do it for testpypi for now.

Comment thread .github/workflows/publish-to-test-pypi.yml Outdated
@mirzak

mirzak commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

You have an error in your yaml syntax on line 48

https://github.com/id8-engineering/python-em511/actions/runs/19363001803

@mirzak

mirzak commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Some bookkeeping. We had a goal, that on each merge to main we would like to publish to Test PyPi. Ideally without needing to modify the version string, but this does not seem to be possible.

PyPi does not allow reuse of filenames with the following contains:

Filename has been used and file exists
Filename has been used but file no longer exists
A file with the exact same content exists

From https://test.pypi.org/help/#file-name-reuse.

We can workaround the first two by using build tag information in the file name according to https://peps.python.org/pep-0427/#file-name-convention. But the `build tag' information is just in the filename, meaning that the resulting file will have the same content, and will not pass the third constraint.

There is a lengthy discussion on this topic and attempts at possible workarounds in pypa/packaging-problems#74.

Conclusion is we MUST modify the version tag if we want to be able to upload different builds. This means that we must modify the version tag prior to building the distribution package.

This document is also a good resource on the different version specifiers, https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers.

Development releases seem appropriate for our use case, https://packaging.python.org/en/latest/specifications/version-specifiers/#developmental-releases, even though it is discouraged to use a development release on PyPi I think it is fine to use in Test PyPi.

@MiladMakdesi @Dexter9532 , let me know if I missed something.

Comment thread .github/workflows/publish-to-test-pypi.yml Outdated
Comment thread src/em511/__init__.py Outdated
Comment thread pyproject.toml
@Dexter9532

Copy link
Copy Markdown
Contributor

This is not exactly how you described that you wanted it, but is is easier and cleaner!

Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread .github/workflows/publish-to-test-pypi.yml Outdated
Signed-off-by: Milad Makdesi <milad@id8-engineering.io>
Signed-off-by: Bobo Bäck Engström <bobo@id8-engineering.io>
@mirzak

mirzak commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

@Dexter9532, you also need to approve this before we can merge.

@mirzak

mirzak commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Also just an FYI, you can connect a pull-request to a GitHub project and it will also show up on the Kanban board. It is to the menu on the right. I did this for pull-request.

It is also good to reference the issue from the pull-request or commit, e.g https://github.com/id8-engineering/lia-2025/issues/11. This will automatically create visible bi directional references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants