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

Updates for tox and sphinx #157

Merged
merged 10 commits into from Jan 20, 2023
Merged

Updates for tox and sphinx #157

merged 10 commits into from Jan 20, 2023

Conversation

saimn
Copy link
Contributor

@saimn saimn commented Jan 6, 2023

While trying to make a release I found a few issues with recent version of tox and sphinx ...

@saimn saimn added this to the 0.15.0 milestone Jan 6, 2023
@saimn
Copy link
Contributor Author

saimn commented Jan 6, 2023

Sphinx 6.1 deprecates sphinx.util.progress_message and I'm not sure how to get rid of that one:

Exception occurred:
  File "/home/simon/.pyenv/versions/3.11.0/lib/python3.11/site-packages/sphinx/deprecation.py", line 46, in __getattr__
    warnings.warn(f"The alias '{self._modname}.{name}' is deprecated, "
sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.

edit: it is raised in our tests where we run sphinx with -W, I don't know if there is a way to ignore warnings there other than removing -W

@pllim
Copy link
Member

pllim commented Jan 17, 2023

What is the future of automodapi ? Is it time we retire it in favor of something else that the wider ecosystem uses? If so, then maybe it is ok to ignore the warning.

@pllim
Copy link
Member

pllim commented Jan 20, 2023

Where is progress_message even called? I cannot find it here. If it is not our problem, let's ignore.

@saimn
Copy link
Contributor Author

saimn commented Jan 20, 2023

What is the future of automodapi ? Is it time we retire it in favor of something else that the wider ecosystem uses? If so, then maybe it is ok to ignore the warning.

There is https://github.com/readthedocs/sphinx-autoapi but I don't know how it compares to automodapi

@saimn
Copy link
Contributor Author

saimn commented Jan 20, 2023

Where is progress_message even called? I cannot find it here. If it is not our problem, let's ignore.

I don't remember exactly but it's called in some Sphinx extension I think. The problem is that in our tests we are calling sphinx-build with -W and there is no way that I know to tell Sphinx to ignore some specific warning:

argv = ['-W', '-b', 'html', src_dir, '_build/html']
try:
os.chdir(docs_dir)
status = build_main(argv=argv)
finally:
os.chdir(start_dir)

@pllim
Copy link
Member

pllim commented Jan 20, 2023

I ignored that warning in setup.cfg and now there are 3 assert errors. Do you know what is happening there?

@pllim
Copy link
Member

pllim commented Jan 20, 2023

Might have to put that -W back?

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #157 (941f641) into main (6e476f2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   89.90%   89.90%           
=======================================
  Files          27       27           
  Lines        1139     1139           
=======================================
  Hits         1024     1024           
  Misses        115      115           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pllim
Copy link
Member

pllim commented Jan 20, 2023

Now the Windows job failed...

@saimn
Copy link
Contributor Author

saimn commented Jan 20, 2023

The warning ignores in setup.cfg are for pytest, not sphinx.
But it works now because the warning has been fixed : sphinx-doc/sphinxcontrib-applehelp#10 ;)

@pllim
Copy link
Member

pllim commented Jan 20, 2023

LoL I cannot keep up. Doesn't explain the Windows failure though.

@pllim
Copy link
Member

pllim commented Jan 20, 2023

@saimn , does this mean we can remove the changes to setup.cfg?

@pllim
Copy link
Member

pllim commented Jan 20, 2023

We don't do backports here, so I am just gonna "squash and merge" when CI passes. Thanks!

@pllim
Copy link
Member

pllim commented Jan 20, 2023

homebrew complained about the py37-test-sphinx24 job. Something about something unavailable. I cannot care less, so I commented it out and we can move on with our lives by not buying Apple products.

@pllim pllim merged commit 0479bd4 into astropy:main Jan 20, 2023
@pllim
Copy link
Member

pllim commented Jan 20, 2023

Thanks, @saimn !

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