-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize the Xanadu Sphinx Theme (#2)
* Delete obsolete files * Use Python .gitignore from GitHub * Fill in year and owner in Apache License 2.0 template * Remove old examples and Sphinx build files * Update setup.py fields and supported Python versions * Set current version to v0.1.0 * Remove extra code from `__init__.py` * Reduce and rename theme options * Update Xanadu Quantum Technologies copyright year * Add header and footer HTML templates * Remove unused sourcelink HTML template * Copy and adapt HTML templates from the XCC Sphinx documentation * Remove unused `gallery.css` file * Format and update CSS theme with new option names * Add Xanadu (X) icon SVG template * Update README * Fix link to XST title SVG in README * Use local link to XST title SVG in README * Remove duplicate title from README * Update description of _Cohesive Design_ feature * Achieve parity with the XIR Sphinx documentation * Reduce XL gap between `<h1>` and `<h2>` text * Add support for navbar link customization * Add support for additional copyright notices, such as for TensorFlow * Remove white background from inline code blocks * Change 'Note' colours to match QML repository * Add custom Sphinx directives from Xanadu OSS repositories * Remove blank 'Contents' local ToC * Add CSS styles for gallery items * Add theme.conf, HTML files, and static files to package data * Rename x.svg_t to xanadu_logo.svg_t * Update references to `comment-container` * Update more references to `comment-container` * Add `.. index-card` directive for index.html cards * Add indentation from anchor tag * Add support for JS syntax highlighting * Add CSS support for FlamingPy 'Install' page * Improve 'See also' colours and gallery item padding * Revert unintended change to breadcrumb `<div>` role * Ensure clicking on gallery item thumbnail opens link * Ensure gallery item text top margin adds visible padding * Make gallery item tags and tooltips truly optional * Add option to customize navbar name/logo link * Fix bug where autosummary tables are too narrow * Add support for wordmarks in the navigation bar * Resolves #3 by accounting for navbar when scrolling to element * Hide the rendering of `:orphan:` metadata * Fix whitespace issues * Fix more whitespace issues * Add changelog, issue templates, and GitHub Actions workflows * Ensure the Formatting Check passes * Delete reference to `make test` * Add missing theme options and directives scaffolding to README * Populate directives in README with examples * Make image links in README compatible with PyPI * Add image suggestion to PR template * Revert change to local ToC display content
- Loading branch information
1 parent
c366996
commit 708e1b9
Showing
159 changed files
with
3,318 additions
and
7,978 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Release 0.1.0 | ||
|
||
### New features since last release | ||
|
||
* This is the initial public release. | ||
|
||
### Contributors | ||
|
||
This release contains contributions from (in alphabetical order): | ||
|
||
[Mikhail Andrenkov](https://github.com/Mandrenkov), | ||
[Tom Bromley](https://github.com/trbromley), | ||
[Josh Izaac](https://github.com/josh146). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, or to ban temporarily or permanently any | ||
contributor for other behaviors that they deem inappropriate, threatening, | ||
offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abuse, harassment, or other unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. The project team | ||
will review and investigate all complaints, and will respond in a way that they | ||
deem appropriate to the circumstances. The project team is obligated to | ||
maintain confidentiality with regard to the reporter of an incident. Further | ||
details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]. | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Contributing to the Xanadu Sphinx Theme | ||
|
||
Thank you for taking the time to contribute to the Xanadu Sphinx Theme (XST)! | ||
:confetti_ball: :tada: :fireworks: :art: | ||
|
||
While we will continue working on adding new and exciting features to the Xanadu | ||
Sphinx Theme, we invite you to join us and suggest improvements or even just to | ||
discuss how the XST fits into your workflow. | ||
|
||
## How can I contribute? | ||
|
||
It's up to you! | ||
|
||
* **Test the cutting-edge XST releases** - clone our GitHub repository, and keep | ||
up to date with the latest features. If you run into any bugs, make a bug | ||
report on our | ||
[issue tracker](https://github.com/XanaduAI/xanadu-sphinx-theme/issues). | ||
|
||
* **Report bugs** - even if you are not using the development branch of the XST, | ||
if you come across any bugs or issues, make a bug report. See the next section | ||
for more details on the bug reporting procedure. | ||
|
||
* **Suggest new features and enhancements** - use the GitHub issue tracker and | ||
let us know what will make the XST even better for your workflow. | ||
|
||
* **Contribute to our documentation** - if there is something you would like to | ||
add to our documentation or you have an idea for an improvement or change, let | ||
us know - or even submit a pull request directly. All authors who have | ||
contributed to the XST codebase will be listed alongside the latest release. | ||
|
||
* **Build an application on top of the XST** - have an idea for an application | ||
where the XST is a good match? Consider making a Sphinx documentation website | ||
that builds upon XST as a base. Ask us if you have any questions, and send a | ||
link to your application to [email protected] so we can highlight it in our | ||
future documentation! | ||
|
||
Appetite whetted? Keep reading below for all the nitty-gritty on reporting bugs, | ||
contributing to the documentation, and submitting pull requests. | ||
|
||
## Reporting bugs | ||
|
||
We use the | ||
[GitHub issue tracker](https://github.com/XanaduAI/xanadu-sphinx-theme/issues) | ||
to keep track of all reported bugs and issues. If you find a bug, or have a | ||
problem with the XST, please submit a bug report! User reports help us make the | ||
client better on all fronts. | ||
|
||
To submit a bug report, please work your way through the following checklist: | ||
|
||
* **Search the issue tracker to make sure the bug wasn't previously reported**. | ||
If it was, you can add a comment to expand on the issue and share your | ||
experience. | ||
|
||
* **Fill out the issue template**. If you cannot find an existing issue | ||
addressing the problem, create a new issue by filling out the | ||
[bug issue template](ISSUE_TEMPLATE/bug-report.yml). This template is added | ||
automatically to the comment box when you create a new issue. Please try and | ||
add as many details as possible! | ||
|
||
* Try and make your issue as **clear, concise, and descriptive** as possible. | ||
Include a clear and descriptive title, and include all code snippets and | ||
commands required to reproduce the problem. If you're not sure what caused the | ||
issue, describe what you were doing when the issue occurred. | ||
|
||
## Suggesting features, document additions, and enhancements | ||
|
||
To suggest features and enhancements, use the | ||
[feature request template](ISSUE_TEMPLATE/feature-request.yml). Be sure to: | ||
|
||
* **Use a clear and descriptive title** | ||
|
||
* **Provide a step-by-step description of the suggested feature**. | ||
|
||
Explain why the enhancement would be useful as well as where and how you | ||
would like to use it. | ||
|
||
## Pull requests | ||
|
||
If you would like to contribute directly to the XST codebase, simply make a | ||
fork of the main branch and submit a | ||
[pull request](https://help.github.com/articles/about-pull-requests). We | ||
encourage everyone to have a go forking and modifying the XST source code; | ||
however, we have a couple of guidelines on pull requests to ensure the main | ||
branch conforms to existing standards and quality. | ||
|
||
### General guidelines | ||
|
||
* **Do not make a pull request for minor typos/cosmetic code changes** - create | ||
an issue instead. | ||
* **For major features, consider making an independent package** that runs | ||
on top of the XST (rather than modifying the XST directly). | ||
|
||
### Before submitting | ||
|
||
Before submitting a pull request, please make sure the following is done: | ||
|
||
* **All new classes, functions, and members must be clearly commented and | ||
documented**. | ||
* **Ensure that the modified code is formatted correctly.** Verify that | ||
`make lint` and `make format` pass. | ||
|
||
### Submitting the pull request | ||
* When ready, submit your fork as a | ||
[pull request](https://help.github.com/articles/about-pull-requests) to the | ||
XST repository, filling out the | ||
[pull request template](PULL_REQUEST_TEMPLATE.md). This template is added | ||
automatically to the comment box when you create a new PR. | ||
|
||
* When describing the pull request, please include as much detail as possible | ||
regarding the changes made, new features, and performance improvements. If | ||
including any bug fixes, mention the issue numbers associated with the bugs. | ||
|
||
* Once you have submitted the pull request, two things will automatically occur: | ||
|
||
- The **formatter** will automatically run on | ||
[GitHub Actions](https://github.com/XanaduAI/xanadu-sphinx-theme/actions) to | ||
ensure that all the code is properly formatted. | ||
|
||
Based on these results, we may ask you to make small changes to your branch | ||
before merging the pull request into the main branch. Alternatively, you can | ||
[grant us permission to make changes to your pull request branch](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/). | ||
|
||
Thank you for contributing to the Xanadu Sphinx Theme! | ||
|
||
\- The XST team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Bug report | ||
description: File a bug report | ||
title: '[BUG]' | ||
labels: "bug :bug:" | ||
|
||
body: | ||
- type: markdown | ||
id: description | ||
attributes: | ||
value: | | ||
## Before posting a bug report | ||
Search existing GitHub issues to make sure the issue does not already exist: | ||
https://github.com/XanaduAI/xanadu-sphinx-theme/issues | ||
# Issue description | ||
Description of the issue - include code snippets in the Source code section below and screenshots if relevant. | ||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected behavior | ||
description: | | ||
What do you expect to happen? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: actual | ||
attributes: | ||
label: Actual behavior | ||
description: | | ||
What actually happens? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: info | ||
attributes: | ||
label: Additional information | ||
description: | | ||
Please provide any additional information here that might be necessary to reproduce the issue. This includes the XST version, system information, and any other relevant details about reproducibility (e.g., percentage of the time the bug reproduces). | ||
- type: textarea | ||
id: sourcecode | ||
attributes: | ||
label: Source code | ||
description: Please include a minimal non-working example, or any other code related to the issue, here. This will be automatically formatted into code, so no need for backticks. | ||
render: shell | ||
- type: textarea | ||
id: tracebacks | ||
attributes: | ||
label: Tracebacks | ||
description: Please include the error tracebacks related to the issue here. This will be automatically formatted into code, so no need for backticks. | ||
render: shell | ||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
options: | ||
- label: I have searched exisisting GitHub issues to make sure the issue does not already exist. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Feature request | ||
description: Suggest a new feature | ||
labels: "enhancement :sparkles:" | ||
|
||
body: | ||
- type: markdown | ||
id: description | ||
attributes: | ||
value: | | ||
## Before posting a feature request | ||
Search existing GitHub issues to make sure the issue does not already exist: | ||
https://github.com/XanaduAI/xanadu-sphinx-theme/issues | ||
# Feature description | ||
Description of the feature request - include code snippets and screenshots here if relevant. | ||
- type: textarea | ||
id: details | ||
attributes: | ||
label: Feature details | ||
description: | | ||
What feature would you like to have? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: implementation | ||
attributes: | ||
label: Implementation | ||
description: | | ||
Do you have an idea for how this could be implemented? Please include those details here. | ||
- type: dropdown | ||
id: urgency | ||
attributes: | ||
label: How important would you say this feature is? | ||
options: | ||
- "1: Not important. Would be nice to have." | ||
- "2: Somewhat important. Needed this quarter." | ||
- "3: Very important! Blocking work." | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: info | ||
attributes: | ||
label: Additional information | ||
description: | | ||
Please provide any additional information here. Include potential alternative solutions, or workarounds, as well as references, if any. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### Before submitting | ||
|
||
Please complete the following checklist when submitting a PR: | ||
|
||
- [ ] All new classes, functions, and members must be clearly commented and documented. | ||
|
||
- [ ] Ensure that code is properly formatted by running `make format lint`. | ||
|
||
- [ ] Add a new entry to [`CHANGELOG.md`](.github/CHANGELOG.md), summarizing the | ||
change and including a link back to the PR. | ||
|
||
- [ ] If applicable, include a screenshot or GIF to illustrate visual changes. | ||
|
||
When all the above are checked, delete everything above the dashed | ||
line and fill in the pull request template. | ||
|
||
------------------------------------------------------------------------------------------------------------ | ||
|
||
**Context:** | ||
|
||
**Description of the Change:** | ||
|
||
**Benefits:** | ||
|
||
**Possible Drawbacks:** | ||
|
||
**Related GitHub Issues:** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Changelog Reminder | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- ready_for_review | ||
|
||
jobs: | ||
remind: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Changelog Reminder | ||
uses: peterjgrainger/[email protected] | ||
with: | ||
changelog_regex: .github/CHANGELOG.md | ||
customPrMessage: | | ||
Hello. You may have forgotten to update the changelog! | ||
Please edit [.github/CHANGELOG.md](/XanaduAI/xanadu-sphinx-theme/blob/master/.github/CHANGELOG.md) with: | ||
* A one-to-two sentence description of the change. You may include a small working example for new features. | ||
* A link back to this PR. | ||
* Your name and GitHub username in the contributors section. | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
Oops, something went wrong.