-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix(packaging): Correctly build package for versioning #12
Conversation
@@ -25,7 +25,7 @@ | |||
|
|||
# Get package version | |||
try: | |||
__version__ = version("cloudcasting_app") | |||
__version__ = version("cloudcasting-app") |
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 is the crux of what was wrong before!
WORKDIR /opt/app | ||
COPY src /opt/app/src | ||
COPY pyproject.toml /opt/app | ||
COPY .git /opt/app/.git |
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 can never remember if you change WORKDIR
do you then copy COPY src /src
. I can never remember
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 tested the build and run locally so whatever I've done here has worked! I think you can do that if you don't use absolute paths, i.e.
WORKDIR /app
COPY src src
is equivalent to
WORKDIR /app
COPY src /app/src
I think? Either way, the above seems to work!
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.
See comment, but looks good
"torch>=2.3; sys_platform != 'darwin' or platform_machine != 'x86_64'", | ||
"typer==0.15.1", | ||
"xarray==2025.1.2", | ||
"zarr==2.18.3", |
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.
Thanks for pinning
Closes #11
Actually gets the version number correctly by specifying the project name as it occurs in
pyproject.toml
to pull the version, as opposed to the name of the package. Also pins torch according to the environment, and includes the version in the built vresion tag.