Skip to content

Conversation

ChrisBarker-NOAA
Copy link

@ChrisBarker-NOAA ChrisBarker-NOAA commented May 27, 2025

I've moved everything from setup.py and setup.cfg to pyproject.toml.

It seems to build fine :-)

There doesn't seem to be a clear way to specify test and docs requirements, so I added:

requirements_test.txt and requirements_docs.txt

Or maybe tox takes care of that now?

I also didn't update any pinned versions....

[though I changed the min Python version to 3.9, and added 3.13 to the tox test list]

I'm not set up to properly run tox, so maybe there's something more to do there, but I kept it as it was, other than the python versions in the test matrix.

@merwok
Copy link
Contributor

merwok commented May 28, 2025

Or maybe tox takes care of that now?

Dependency groups have been standardized, you could define them.
Personally I still use pip-sync inside tox envs, so I have separate runtime / tests + lint requirements.

@robvdl
Copy link
Contributor

robvdl commented May 28, 2025

Instead of having the files requirements_docs.txt and requirements_test.txt you can add these as optional-dependencies to the pyproject.toml:

[project.optional-dependencies]
doc = [
    "Sphinx >= 3.0.0",
    # ...
]
test = [
    "webtest >= 1.3.1",
    # ...
]

@stevepiercy
Copy link
Member

Another way to declare dependencies. uv supports both this option and the one @robvdl mentioned. https://docs.astral.sh/uv/concepts/projects/dependencies/

[dependency-groups]
dev = [
    "webtest>=1.3.1",
]
docs = [
    "Sphinx>=3.0.0",
]

@ChrisBarker-NOAA
Copy link
Author

I tried to allow changes by project admins -- so feel free to go fix stuff yourselves :-)

Meanwhile, I'll address a few points now.

@ChrisBarker-NOAA
Copy link
Author

uv supports both this option and the one @robvdl mentioned.

if that's the case, then I"ll go with option (1) :)

But if the project wants to go to uv (or hatch?) rather than setuptools, then we can follow the appropriate route.

But anyway, we need something that pip understands .... it looks like option(1) works -- I'll push and see if the RTD CI script works.

@ChrisBarker-NOAA
Copy link
Author

OK -- all looking good. Note that the gitHub workflows aren't running, so could be broken -- that needs approval from a maintainer.

Also -- it looks like the docs are being built on RTD, and also in a gitHub workflow -- is one of these obsolete?

Finally -- I suspect the tox config could use some updating, but that's not my wheelhouse.

@stevepiercy
Copy link
Member

Also -- it looks like the docs are being built on RTD, and also in a gitHub workflow -- is one of these obsolete?

If I understand correctly, the workflow is for testing that docs will build, whereas the RTD config is for deployment of docs after merging the PR.

@stevepiercy
Copy link
Member

RTD pull request preview:

https://pylons--3783.org.readthedocs.build/projects/pyramid/en/3783/

Lots of failing CI checks, though.

Co-authored-by: Steve Piercy <web@stevepiercy.com>
@ChrisBarker-NOAA
Copy link
Author

Lots of failing CI checks, though.

yup -- I couldn't test until they go turned on ....

I'll see what I can figure out.

@ChrisBarker-NOAA
Copy link
Author

hmm -- looks like the workflow still needs to be approved, so I can't see if the CI will work.

But in any case, it's a tox config issue, I I really don't know tox.

I did add the test dependencies, and that has helped some (locally) -- though it seem that tox should be able to get those from the pyproject.toml,. if we can find the right configuration.

@ChrisBarker-NOAA
Copy link
Author

If I understand correctly, the workflow is for testing that docs will build, whereas the RTD config is for deployment of docs after merging the PR.

Ahh -- that makes sense, yes.

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.

4 participants