Skip to content

Conversation

@sdn4z
Copy link
Collaborator

@sdn4z sdn4z commented Aug 18, 2025

This PR includes all the necessary changes to migrate our project from poetry to uv.

It is a big PR, but the changes had to be made all at once, and it is based on the structure in https://github.com/elementsinteractive/lightman-ai.

The changes include:

  • Update Dockerfile.
  • Build a docker image for both amd64 and arm64 architectures.
  • Adapt the pipelines to use uv. Also, added some caching mechanisms when running lint job and while building the Docker image.
  • Update justfile.
  • Publish the package with uv.

Closes #242
Closes #246

@sdn4z sdn4z force-pushed the uv3 branch 7 times, most recently from 4d7f099 to e517cbb Compare August 18, 2025 14:35
@github-actions github-actions bot added feature and removed feature labels Aug 18, 2025
# Test that the CLI is available and --version works
uv run twyn --version

should-test-docker-build:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Always testing if the docker image can be built would result in very slow builds. Instead, we only try to build it if there were any changes in the Dockerfile or .dockerignore files (the latter does not exist yet, but it's more future proof this way).

platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We'll try to use cache in case it exists. This cache is ONLY created when publishing the package. We should never override this cache from a PR.

@@ -0,0 +1,97 @@

[tool.commitizen]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved commitizen logic to this file

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does cz.toml require a [tool.commitizen] section? isn't that a pyproject.toml thing? I would expect options here to be flat.

Copy link
Collaborator Author

@sdn4z sdn4z Aug 19, 2025

Choose a reason for hiding this comment

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

It'd make sense yeah. Based on the docs it is expected this way though.

@github-actions github-actions bot added feature and removed feature labels Aug 18, 2025
@sdn4z sdn4z marked this pull request as ready for review August 18, 2025 14:55
@sdn4z sdn4z requested a review from scastlara as a code owner August 18, 2025 14:55
@sdn4z
Copy link
Collaborator Author

sdn4z commented Aug 18, 2025

Once it is merged, I'll run the publish workflows, to verify that everything's working as expected.

@sdn4z sdn4z mentioned this pull request Aug 18, 2025
Copy link
Collaborator

@scastlara scastlara left a comment

Choose a reason for hiding this comment

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

Just a question

@@ -0,0 +1,97 @@

[tool.commitizen]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does cz.toml require a [tool.commitizen] section? isn't that a pyproject.toml thing? I would expect options here to be flat.

@sdn4z sdn4z merged commit c0cdf6e into main Aug 19, 2025
11 checks passed
@sdn4z sdn4z deleted the uv3 branch August 19, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace poetry with uv Pin actions and images in CI using their hashes

3 participants