Skip to content
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

DM-41209: Switch to pyproject.toml #5

Merged
merged 7 commits into from
Nov 21, 2023
Merged

DM-41209: Switch to pyproject.toml #5

merged 7 commits into from
Nov 21, 2023

Conversation

taranu
Copy link
Collaborator

@taranu taranu commented Nov 9, 2023

This also adds the lsst namespace prefix to multiprofit imports.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

Looks okay (given that this can't be built with pip so some of this stuff is hard to validate)

"matplotlib",
"numpy",
"pydantic",
"pytest",
Copy link
Member

Choose a reason for hiding this comment

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

pytest is presumably not a run time dependency? You can add a separate optional dependencies entry in the the file and declare test dependencies in there.

[project.optional-dependencies]
test = [
    "pytest >= 3.2",
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is that v3.2 minimum from a feature we're using in the stack or a compatibility issue?

More generally I couldn't figure out how to set minimum versions of anything for standalone packages like multiprofit, beyond that I made a py3.8 conda env and confirmed that it wouldn't work. Is there anything else I could/should do other than follow changes to other stack packages like resources/daf_butler?

Copy link
Member

Choose a reason for hiding this comment

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

The 3.2 was just an example. It's likely wildly out of date. The point is to separate runtime deps from testing deps. Minimum versions are done the same way pytest <5,>=3.2 or something.

"galsim",
"gauss2d",
"gauss2dfit",
"lsst-multiprofit",
Copy link
Member

Choose a reason for hiding this comment

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

This implies you are putting lsst-multiprofit on PyPI. Are you? I know this package itself can't go on PyPI because of the meas_base dependency.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does it imply availability on PyPI? Once multiprofit is scons-built, it shows up on pip list with the same version as it would if pip-installed. On the other hand, gauss2d(fit) don't when eups-built because I skipped the pip install step, figuring it would be unnecessary. But perhaps none of this matters because presumably this package won't be pip-installable until all of the dependencies like meas_base are too...

Copy link
Member

@timj timj Nov 20, 2023

Choose a reason for hiding this comment

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

pip will read this dependency list. It will, I think, just try to see if they are installed before trying to check on PyPI so if everything has happened beforehand if will be fine. One issue you will have is that lsst-multiprofit is the name here but EUPS thinks it's called multiprofit and we don't yet install the proper egg information to allow importlib.metadata to work out the right answer -- that's something I'd like to fix though.

Yes, none of this matters because meas_base is not going to be pip installable.

requires-python = ">=3.10"
keywords = ["astronomy", "lsst", "galaxy"]
license = {file = "LICENSE"}
classifiers = [
Copy link
Member

Choose a reason for hiding this comment

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

In theory there should be the GPL license classifier here.

@taranu taranu merged commit 76fac5b into main Nov 21, 2023
1 check passed
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.

2 participants