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

Docs update (more extensions, new theme) #100

Merged
merged 34 commits into from
Oct 11, 2022
Merged

Docs update (more extensions, new theme) #100

merged 34 commits into from
Oct 11, 2022

Conversation

adamgayoso
Copy link
Member

@adamgayoso adamgayoso commented Oct 10, 2022

  • Use sphinx_book_theme instead of furo as it requires no custom css to look good for our purposes (and dark mode is coming soon)
  • Remove scanpydoc dependency
  • Remove nbsphinx in favor of myst-nb
  • Add typed returns custom extension like in scanpy
  • Use same autosummary class template as in scvi-tools (single page for classes with methods/attr tables)

See here for a live example.

Fixes #74 by using a different theme.

@adamgayoso adamgayoso changed the title Docs Docs update Oct 10, 2022
@github-actions
Copy link

A PR has been generated to the instance repo:
scverse/cookiecutter-scverse-instance#18

You can check out the PR to preview your changes
in an instance of the cookiecutter template. The PR will be kept in sync with
this PR automatically.

@adamgayoso adamgayoso requested a review from grst October 10, 2022 02:10
@adamgayoso adamgayoso changed the base branch from main to project_name October 10, 2022 02:38
@adamgayoso adamgayoso changed the base branch from project_name to main October 10, 2022 02:39
@adamgayoso adamgayoso changed the title Docs update Docs update (more extensions, new theme) Oct 10, 2022
@adamgayoso
Copy link
Member Author

adamgayoso commented Oct 10, 2022

@grst it should pass but I can't figure out how to make cookiecutter ignore rendering the class.rst file I added

Update: I figured it out, there are two json files.

@adamgayoso adamgayoso enabled auto-merge (squash) October 10, 2022 03:43
@adamgayoso
Copy link
Member Author

To make this PR simpler I removed linkcode

html_static_path = ["_static"]
html_title = project_name

github_repo = "https://github.com/" + html_context["github_user"] + "/" + project_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

html_context["github_user"]

Should github_user get it's own variable? Similar fields e.g. project_name, package_name do.

OTOH, the repo url is probably available in the metadata info derived from the pyproject.toml (e.g. the info url in this scope)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually not, only the docs url is there

{{cookiecutter.project_name}}/pyproject.toml Show resolved Hide resolved
{{cookiecutter.project_name}}/docs/conf.py Show resolved Hide resolved
Copy link
Collaborator

@grst grst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested the modifications suggested by @ivirshup -- Once these are resolved, feel free to merge.

{{cookiecutter.project_name}}/docs/conf.py Outdated Show resolved Hide resolved
{{cookiecutter.project_name}}/docs/conf.py Outdated Show resolved Hide resolved
@ivirshup
Copy link
Member

@adamgayoso, question about the theme:

Weren't a number of the cases that we needed CSS for related to the dark theme?

@ivirshup ivirshup mentioned this pull request Oct 11, 2022
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.

Furo theme special CSS (from scvi-tools)
3 participants