-
Notifications
You must be signed in to change notification settings - Fork 3
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
Migrate to Hatch and add a _legacy dependencies_ flavour #54
base: main
Are you sure you want to change the base?
Conversation
…age generation documented and configured in CI
!pyproject.toml | ||
!README.md | ||
!MANIFEST.in | ||
!tests | ||
!tox.ini | ||
.dockerignore | ||
|
||
# Reexclude protos | ||
src/dataclay/proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't it prevent dataClay running out of the box without having to generate protos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, the [tool.hatch.build.hooks.custom] section of pyproject.toml is responsible of calling the compile_protos script on build time.
This "build time" should be:
- when doing a
pip install -e .
for development - when doing a build process and generating the wheel
- when doing a
pip install git+https://
also for development-adjacent
Am I wrong? Could you confirm if that's the case?
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=edge,suffix=-legacydeps-py${{ matrix.python-version }},branch=main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will create all tags with -legacydeps
suffix. Is it correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two sections, the id: meta
and the id: legacy-deps-meta
, and there are two build, build-and-push
and build-and-push-legacy-deps
. If I didn't do anything wrong, they should be separate images and we should obtain both the historical regular tags, and the one with -legacydeps that configure legacy dependencies. At least, that is what I intended.
@@ -3,11 +3,11 @@ | |||
# Define which Python versions to test with | |||
PYPROJECT = nox.project.load_toml("pyproject.toml") | |||
PYTHON_VERSIONS = nox.project.python_versions(PYPROJECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the following error when running nox
:
AttributeError: module 'nox.project' has no attribute 'python_versions'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a feature that was added on october lol.
Upgrade your nox. Given that nox is for developers only, I think that we can be a little bit early adopter on that 🙃
This branch uses Hatch as the build engine for the dataClay project, and that allows some fancy
--config-settings=LEGACY_DEPS=True
that can be used to force a set of dependencies in the past (needed for compatibility with certain 3rd party libraries, AI frameworks, etc.).Given that I was already there, some cleanup on the build infrastructure and building protos during build process and streamlined docker image generation.