Closed h-vetinari closed 5 months ago
I didn't follow why a token was needed or w/e with the tests. However, LGTM!
I didn't follow why a token was needed or w/e with the tests.
Calling run_conda_forge_specific
immediately runs into
https://github.com/conda-forge/conda-smithy/blob/4006d83ee032f3440dcbb9baf0f5a46619c3586e/conda_smithy/lint_recipe.py#L851-L852
(and faking that token is no use because it is soon after used to fetch info from GH).
Hence testing run_conda_forge_specific
needs a valid token, whereas "just" calling lintify_forge_yaml
does not run into this constraint.
We could guard those lines and calls to enable things to be run easily without tokens.
We could guard those lines and calls to enable things to be run easily without tokens.
Sure. Not sure though if it's worth the effort? For now it seems to work OK as is and doesn't seem tooooo ugly? (then again, perhaps I also haven't understood where exactly the split between run_conda_forge_specific
and lintify_forge_yaml
should be). How about a follow-up issue?
OK, now that we have some basic documentation for stdlib up, let's put this one in. :)
@h-vetinari @beckermr I suggest not introducing any new code that uses io.open
. In Python 3, the preferred way should be just open
, which is equivalent to io.open
.
Maybe someone can add an appropriate ruff
configuration to the linters here
I suggest not introducing any new code that uses
io.open
. In Python 3, the preferred way should be justopen
, which is equivalent toio.open
.
Yeah, completely fine by me, I just happened to overlook this while C&P-ing from pre-existing smithy code.
Maybe someone can add an appropriate
ruff
configuration to the linters here
Done. See #1919
As discussed in core call today; I wanted to add this into
run_conda_forge_specific
originally (where the other hint logic from https://github.com/conda-forge/conda-smithy/pull/1772 lives[^1], but it's a pain to run that in testing becauserun_conda_forge_specific
requires aGH_TOKEN
. If desired, I can still move it there, especially now that the tests have been debugged (and assuming CI here has a valid token). 🤷[^1]: which we cannot reuse because it currently only works for plain package names, no patterns, versions etc.
Note: I'd also want to wait before ~merging~ releasing this until we have updated the stdlib docs in the knowledge base, to avoid people getting confused.