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

nox test python 3.10 and 3.11 #52

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Conversation

GenevieveBuckley
Copy link
Contributor

This is a nice library! I was trying to figure out how to extend it, and found that the nox test matrix does not include python 3.10 & 3.11.

This PR includes python 3.10 and 3.11 in the nox test matrix.

(It might also be a good idea to upgrade the python version used for the "release" "publish" "docs" & "flake8" jobs, since python 3.7 will be at end of life in June. But I haven't changed anything here yet - I want to see if the github actions workflow passes first)

@GenevieveBuckley
Copy link
Contributor Author

Ah I see, the github actions workflow needs to be approved by a maintainer before it will run, but when it does the results will be shown here.

@smarie
Copy link
Owner

smarie commented Mar 17, 2023

Thanks @GenevieveBuckley for this PR ! Indeed it seems that for first-time contributors the workflow needs approval. I just unlocked it.

Thanks for the kind words ! I like very much sphinx-gallery which is used by libraries such as scikit-learn, but I find sphinx far too heavy for small projects just wishing to show a few examples in their doc.

This is why I ported and refactored a bit the code from sphinx-gallery. the main problem is that when doing so I did not port the tests, so currently the only "test" I have is visual inspection of the generated doc for this site :D

An obvious (but demanding in reverse-engineering skills) contribution would therefore be to try to port a few of the tests from sphinx-gallery (issue #12)

Another track (longer-term) that I see is extracting the core from this project into an independent lib so that both libs can use it. I have described this work in sphinx-gallery/sphinx-gallery#933

But for now the PR has some issues, probably related with a new version of mkdocs ? If you wish to investigate please open a dedicated issue first to declare it officially, before fixing it.

Once again thanks @GenevieveBuckley for you enthusiasm !

@GenevieveBuckley
Copy link
Contributor Author

So, to summarize:

  • The existing tests in this repo aren't testing anything very substantial
  • But even so nox is failing.
    • This is because there is some incompatibility to do with _pre_validate that happened between mkdoc v1.2.4 and the latest mkdocs version. Downgrading to mkdocs version 1.2.4 makes the nox tests pass.
    • That means mkdocs-gallery will have to be updated to be compatible with the newest version of mkdocs (and maybe a restriction set on the install requirements until that happens).
  • Unrelated, I also can't run mkdocs build and build the documentation for this repository directly. I get an error about the configuration:
ERROR    -  Error importing base configuration from `base_conf_py`
            /Users/genevieb/Documents/GitHub/mkdocs-gallery/docs/gallery_conf.py

Aborted with a BuildError!

@smarie
Copy link
Owner

smarie commented Mar 22, 2023

THanks @GenevieveBuckley
I'll investigate and also tackle #55

EDIT:
Concerning the tests, this is better than what I remembered. Actually last year with @mchaaler we eventually added a few tests while debugging some features (https://github.com/smarie/mkdocs-gallery/pulls?q=is%3Apr+is%3Aclosed).
Also, he started to migrate more tests from sphinx-gallery (work in progress in #48, maybe worth asking him for an update)

@smarie
Copy link
Owner

smarie commented Apr 12, 2023

You can now pull from main branch, this should be fine.

Note that if the build is ok for these python versions, they should be added to the project description in setup.cfg in the classifiers.

Here : https://github.com/smarie/mkdocs-gallery/blob/main/setup.cfg#L28

@GenevieveBuckley
Copy link
Contributor Author

Merged main branch, and added python 3.10 & 3.11 to the setup.cfg classifiers. Thanks!

@smarie
Copy link
Owner

smarie commented Apr 24, 2023

All set, thanks @GenevieveBuckley !

@smarie smarie merged commit b6c3b04 into smarie:main Apr 24, 2023
13 checks 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.

None yet

2 participants