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

Modernize the Xanadu Sphinx Theme #2

Merged
merged 57 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
eaff158
Delete obsolete files
Mandrenkov Mar 29, 2022
e16e56a
Use Python .gitignore from GitHub
Mandrenkov Mar 29, 2022
68e534a
Fill in year and owner in Apache License 2.0 template
Mandrenkov Mar 29, 2022
431e1e4
Remove old examples and Sphinx build files
Mandrenkov Mar 29, 2022
5222cae
Update setup.py fields and supported Python versions
Mandrenkov Mar 29, 2022
b811391
Set current version to v0.1.0
Mandrenkov Mar 29, 2022
66e678f
Remove extra code from `__init__.py`
Mandrenkov Mar 29, 2022
4daad6c
Reduce and rename theme options
Mandrenkov Mar 29, 2022
008a631
Update Xanadu Quantum Technologies copyright year
Mandrenkov Mar 29, 2022
594448f
Add header and footer HTML templates
Mandrenkov Mar 29, 2022
bd39082
Remove unused sourcelink HTML template
Mandrenkov Mar 29, 2022
7b45e5e
Copy and adapt HTML templates from the XCC Sphinx documentation
Mandrenkov Mar 29, 2022
143477a
Remove unused `gallery.css` file
Mandrenkov Mar 29, 2022
49eccd8
Format and update CSS theme with new option names
Mandrenkov Mar 29, 2022
30270ec
Add Xanadu (X) icon SVG template
Mandrenkov Mar 29, 2022
3855299
Update README
Mandrenkov Mar 29, 2022
a08d856
Fix link to XST title SVG in README
Mandrenkov Mar 29, 2022
76a02a1
Use local link to XST title SVG in README
Mandrenkov Mar 29, 2022
73f7f02
Remove duplicate title from README
Mandrenkov Mar 29, 2022
58ec468
Update description of _Cohesive Design_ feature
Mandrenkov Mar 29, 2022
0dfe894
Achieve parity with the XIR Sphinx documentation
Mandrenkov Mar 30, 2022
cfc0721
Reduce XL gap between `<h1>` and `<h2>` text
Mandrenkov Mar 30, 2022
6bb3e3e
Add support for navbar link customization
Mandrenkov Mar 31, 2022
3ad393b
Add support for additional copyright notices, such as for TensorFlow
Mandrenkov Mar 31, 2022
be45d1a
Remove white background from inline code blocks
Mandrenkov Mar 31, 2022
e212c8b
Change 'Note' colours to match QML repository
Mandrenkov Mar 31, 2022
6d88ea4
Add custom Sphinx directives from Xanadu OSS repositories
Mandrenkov Apr 5, 2022
5d62046
Remove blank 'Contents' local ToC
Mandrenkov Apr 5, 2022
ffeeaf0
Add CSS styles for gallery items
Mandrenkov Apr 5, 2022
aa59431
Add theme.conf, HTML files, and static files to package data
Mandrenkov Apr 11, 2022
6d9cc57
Rename x.svg_t to xanadu_logo.svg_t
Mandrenkov Apr 11, 2022
c234fe4
Update references to `comment-container`
Mandrenkov Apr 12, 2022
1e3b663
Update more references to `comment-container`
Mandrenkov Apr 12, 2022
deaaabf
Add `.. index-card` directive for index.html cards
Mandrenkov Apr 12, 2022
c6c3b17
Add indentation from anchor tag
Mandrenkov Apr 12, 2022
129b1cc
Add support for JS syntax highlighting
Mandrenkov Apr 13, 2022
f81c47a
Add CSS support for FlamingPy 'Install' page
Mandrenkov Apr 13, 2022
114aa1d
Improve 'See also' colours and gallery item padding
Mandrenkov Apr 14, 2022
2452ca6
Revert unintended change to breadcrumb `<div>` role
Mandrenkov Apr 14, 2022
cf0db39
Ensure clicking on gallery item thumbnail opens link
Mandrenkov Apr 14, 2022
59c3bb2
Ensure gallery item text top margin adds visible padding
Mandrenkov Apr 14, 2022
7058786
Make gallery item tags and tooltips truly optional
Mandrenkov Apr 14, 2022
4cbc013
Add option to customize navbar name/logo link
Mandrenkov Apr 14, 2022
49e2333
Fix bug where autosummary tables are too narrow
Mandrenkov Apr 14, 2022
870a8f3
Add support for wordmarks in the navigation bar
Mandrenkov Apr 14, 2022
cf25089
Resolves #3 by accounting for navbar when scrolling to element
Mandrenkov Apr 26, 2022
33b63a6
Hide the rendering of `:orphan:` metadata
Mandrenkov Apr 26, 2022
b8a9e70
Fix whitespace issues
Mandrenkov Apr 26, 2022
4e89a81
Fix more whitespace issues
Mandrenkov Apr 26, 2022
3e300af
Add changelog, issue templates, and GitHub Actions workflows
Mandrenkov Apr 26, 2022
6545e27
Ensure the Formatting Check passes
Mandrenkov Apr 26, 2022
498fe64
Delete reference to `make test`
Mandrenkov Apr 27, 2022
1c37d5d
Add missing theme options and directives scaffolding to README
Mandrenkov Apr 27, 2022
f9142ac
Populate directives in README with examples
Mandrenkov Apr 27, 2022
7acc081
Make image links in README compatible with PyPI
Mandrenkov Apr 27, 2022
a440ee1
Add image suggestion to PR template
Mandrenkov Apr 27, 2022
117676f
Revert change to local ToC display content
Mandrenkov Apr 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/CHANGELOG.md
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).
Mandrenkov marked this conversation as resolved.
Show resolved Hide resolved
73 changes: 73 additions & 0 deletions .github/CODE_OF_CONDUCT.md
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 software@xanadu.ai. 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/
125 changes: 125 additions & 0 deletions .github/CONTRIBUTING.md
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 support@xanadu.ai 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
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
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
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
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.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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:**
26 changes: 26 additions & 0 deletions .github/workflows/changelog.yml
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/action-changelog-reminder@v1.3.0
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 }}"
Loading