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

Modernise the conf.py file #1362

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

pradyunsg
Copy link
Member

For anyone curious about what keys have changed in this PR, you can use python -i source/conf.py followed by locals() to capture the assignments made.

Based on that, below is the diff between {str(k): str(v) for k,v in locals()} with the old conf.py (i.e. main) and new conf.py (i.e. this PR).

>>> set(old_conf_py.items()) - set(new_conf_py.items())
{('master_doc', 'index'), ('templates_path', "['_templates']"), ('release', ''), ('version', ''), ('source_suffix', '.rst')}
>>> set(new_conf_py.items()) - set(old_conf_py.items())
{('root_doc', 'index')}

The keys removed were set to values that influenced ~no relevant part of the build output.

@pradyunsg
Copy link
Member Author

This builds upon #1361 (it's what motivated me filing that PR) so I'll keep this as a draft until that one is resolved.

source/conf.py Show resolved Hide resolved
source/conf.py Outdated Show resolved Hide resolved
This follows the style of the Sphinx 5+ configuration file template,
removing commented out sections and content duplicated from the
documentation.

This also removes a few unused values and uses the newer `root_doc`
name.
This raises a SyntaxWarning on new-enough Python versions.
@pradyunsg pradyunsg marked this pull request as ready for review November 8, 2023 18:33
This makes the homepage accessible via the sidebar.
@pradyunsg
Copy link
Member Author

This is good to go, and only need a review from another editor. :)

source/conf.py Show resolved Hide resolved
@chrysle
Copy link
Contributor

chrysle commented Nov 8, 2023

BTW, could we somehow allow the footer to hold the donations link and license (via template)?

@jeanas
Copy link
Contributor

jeanas commented Nov 8, 2023

BTW, could we somehow allow the footer to hold the donations link and license (via template)?

Let's leave that for a separate PR?

@pradyunsg
Copy link
Member Author

BTW, could we somehow allow the footer to hold the donations link and license (via template)?

I don't know. 😅

@pradyunsg pradyunsg added this pull request to the merge queue Nov 9, 2023
@chrysle
Copy link
Contributor

chrysle commented Nov 9, 2023

Let's leave that for a separate PR?

Yes, I'll have a look now.

Merged via the queue into pypa:main with commit 9ff4d5b Nov 9, 2023
4 checks passed
@pradyunsg pradyunsg deleted the modernise-conf-py branch November 9, 2023 16:06
@chrysle
Copy link
Contributor

chrysle commented Nov 9, 2023

@pradyunsg Umm, unsure if you could arrange yourself with the idea of.... two footers?

image

@chrysle
Copy link
Contributor

chrysle commented Nov 13, 2023

@pradyunsg ?

@pradyunsg
Copy link
Member Author

I'm not sure what you're suggesting here. 😅

@chrysle
Copy link
Contributor

chrysle commented Nov 24, 2023

@pradyunsg I've created a Sphinx template based on your Furo HTML classes, unfortunately the only way I've found to do this implies having a second footer below the standard one. Or would you prefer extending your page.html layout, including an option for conf.py to add custom text?

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.

5 participants