-
Notifications
You must be signed in to change notification settings - Fork 8
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
Switch to pyproject.toml #80
Conversation
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 very nice! I may steal much of it for pytorch-tensor-tracker sometime soon!
@@ -31,7 +31,7 @@ ENV PATH="$PATH:/home/$USERNAME/.local/bin" \ | |||
|
|||
# Install Python dependencies | |||
COPY requirements-dev.txt . | |||
RUN pip install -r requirements-dev.txt | |||
RUN pip install --user -r requirements-dev.txt |
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.
Why install --user
in a Dockerfile - I usually assume everything can go system-wide within the image..?
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.
At one point I was having some nasty ownership issues so I shifted to this, though I'm not sure if this was actually the fix in the end. Docker ownership stuff scares me, so this does make me feel a little safer even if it's not necessary 🤷 unless you think this could cause issues...
[options] | ||
packages = | ||
unit_scaling | ||
|
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 guess most of this file could go into pyproject.toml, but perhaps still not flake8.
That said, unless you can delete this file entirely, I don't see much benefit in moving.
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.
Yeah, that was my thinking entirely - looking at Paul's stuff it seemed like he could move everything except flake8, which made me not bother. Though switching to better tools should fix this 🙃
We're now on PyPI! https://pypi.org/project/unit-scaling/
Some things I've changed to make this work (working from the stuff Paul did in jax-scalify):
setup.py
topyproject.toml
and put in various info there that PyPI needsrequirements.txt
; everything is inpyproject.toml
which you get viapip install -e .
(developers can stillpip install -r requirements-dev.txt
)setuptools-scm
). The way this works is that to increment the version you're expected to tag a commit with the version number and then create a github release based on this tag. This should trigger the new CI action which publishes to PyPI.This should be all the changes for now. With these fixes made it should hopefully be very easy for us to develop and publish future features to the library.