conda-forge / conda-smithy-feedstock

A conda-smithy repository for conda-smithy.
BSD 3-Clause "New" or "Revised" License
4 stars 27 forks source link

Run pytest tests #297

Closed baszalmstra closed 3 months ago

baszalmstra commented 3 months ago

Checklist

This PR adds running of the pytest to the recipe test section. This is useful so that we can run downstream tests from dependencies to guard against accidental breakage.

I also added pydantic >=2,<3 to the run requirements. This is also the case in the upstream environment.yaml.

conda-forge-webservices[bot] commented 3 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

baszalmstra commented 3 months ago

Ouch that is a lot of errors..

baszalmstra commented 3 months ago

I only included specific tests for now. I am unsure why a lot of tests fail but I assume its because the tests do not expect to be run from another repository?

Anyway, I think its still important to be able to run the majority of the tests for downstream tests.

baszalmstra commented 3 months ago

@conda-forge-admin, please rerender

github-actions[bot] commented 3 months ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/conda-smithy-feedstock/actions/runs/10006117311.

beckermr commented 3 months ago

Pydantic is not a runtime requirement afaik. Cc @isuruf who knows this better.

baszalmstra commented 3 months ago

There is a specific pytest invocation to use for installed packages. We should try that here.

Would be happy to! Do you know what the invocation is, a quick google didnt tell me much?

baszalmstra commented 3 months ago

Pydantic is not a runtime requirement afaik. Cc @isuruf who knows this better.

Its used here:

https://github.com/conda-forge/conda-smithy/blob/7b0b83038ae6c012c72bc13cca6641fb81dc7e08/conda_smithy/schema.py#L10

I think thats part of the package.

beckermr commented 3 months ago

We currently serialize the schema as json and don't use pydantic at runtime IIRC.

baszalmstra commented 3 months ago

We currently serialize the schema as json and don't use pydantic at runtime IIRC.

But then import conda_smithy.schema would just fail right?

beckermr commented 3 months ago

True but I don't think that module is ever impoted at runtime when using smithy.

beckermr commented 3 months ago

See here:

https://github.com/search?q=repo%3Aconda-forge%2Fconda-smithy%20conda_smithy.schema&type=code

this is by design AFAIK. Other members of @conda-forge/core should confirm or deny.

baszalmstra commented 3 months ago

See here:

github.com/search?q=repo:conda-forge/conda-smithy%20conda_smithy.schema&type=code

this is by design AFAIK. Other members of @conda-forge/core should confirm or deny.

I wonder why that would be by design because that seems like bad practice. I can imagine it is used just to generate the JSON schema but I dont think it belongs inside the package in that case.

But I would happy to remove it, Ill wait for someone from core to reply.

beckermr commented 3 months ago

I do not want to rehash the pydantic issue since it has been an ongoing thing. I doubt this PR will get merged until it is removed.

conda-forge-webservices[bot] commented 3 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

baszalmstra commented 3 months ago

I do not want to rehash the pydantic issue since it has been an ongoing thing. I doubt this PR will get merged until it is removed.

Ok! I moved it to the test section instead.

github-actions[bot] commented 3 months ago

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

Thus the PR was passing and merged! Have a great day!