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

Add copyright headers along with Furo license #464

Merged
merged 5 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ We try to keep changes to a minimum because every divergence we make from base F
Copy the HTML template from Furo and save it in the same file path. Then, at the top of the file, add this header:

```
{#- This file is vendored from Furo. When adding custom Qiskit code, surround it with
`QISKIT CHANGE: start` and `QISKIT CHANGE: end` Jinja-style comments. -#}
{#-
This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license.
When adding custom Qiskit code, surround it with `QISKIT CHANGE: start` and
`QISKIT CHANGE: end` Jinja-style comments.
-#}
```

When making changes, use those comments to make clear where and what we changed. For example:
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

# This Dockerfile is used to preview the docs in pull requests via GitHub Actions.
#
# To test it out locally:
Expand Down
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,26 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


The MIT License (MIT)

Copyright (c) 2020 Pradyun Gedam <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
13 changes: 13 additions & 0 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there has been some discussion recently about the statement that this code is part of Qiskit, and maybe it's better to say part of the Qiskit Ecosystem or something. I'm not sure what the decision was and I can't find where I saw the conversation. Maybe @1ucian0 can weigh in?

I'm happy to keep it as is for now so long as we update it to the correct format when we can.

Copy link
Member

Choose a reason for hiding this comment

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

We are usually going with "This code is a Qiskit project", to distinguish it from the message that Qiskit has.

*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

import { defineConfig } from "@playwright/test";

const baseURL = "http://127.0.0.1:8080";
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "qiskit-sphinx-theme"
description = "A Sphinx theme for Qiskit and Qiskit Ecosystem projects"
dynamic = ["version"]

license = { text = "Apache 2" }
license = { file = "LICENSE" }
authors = [{ name = "Qiskit Development Team", email = "[email protected]" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion src/qiskit_sphinx_theme/assets/scripts/gumshoe-patched.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vendored exactly from Furo's `assets/scripts/gumshoe-patched.js`.
/*! This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. */
/*!
* gumshoejs v5.1.2 (patched by @pradyunsg)
* A simple, framework-agnostic scrollspy script.
Expand Down
4 changes: 2 additions & 2 deletions src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is vendored from Furo's `assets/scripts/furo.js`. When adding custom Qiskit code,
// surround it with `QISKIT CHANGE: start` and `QISKIT CHANGE: end` comments.
/*! This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. */
// When making changes, surround it with `QISKIT CHANGE: start` and `QISKIT CHANGE: end` comments.

import Gumshoe from "./gumshoe-patched.js";

Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_admonitions.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// We use https://carbondesignsystem.com/components/notification/style/ for admonitions
// (e.g. warning boxes. We don't use the Success admonition though.

Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_api.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// By default, Furo uses an aggressive red color for API docs. We use a more muted black and gray.
body {
--color-api-name: var(--color-foreground-primary);
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_custom-directives.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// This creates a purple border at the bottom. We set the width to 0. The relevant rule
// should change the width to 100% on hover so that it transitions in.
@mixin purple-underline {
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_drop-shadows.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// We use a flat design with Carbon, so disable box-shadows and rounded borders.
//
// `:not(#specifity-war)` is to work around specifity wars.
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

.qiskit-analytics-container {
display: inline-flex;
border-top: 1px solid var(--color-background-border);
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_icons.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// We must use Carbon for all icons: https://carbondesignsystem.com/guidelines/icons/library/.
// To use an icon, download it and format it to one line.
//
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// By default, Furo expands the left and right sidebars when the page width increases, but it
// doesn't increase the entry size. It also keeps the page contents fixed at 46em.
//
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_left-sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// ------------------------------------------------------------------------------
// Colors
// ------------------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_sphinx-extensions.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// ---------------------------------------------------------------------------
// nbsphinx (tutorials)
// ---------------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

body {
// Use the same table header color as qiskit.org.
--color-table-header-background: #dde1e6;
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_top-nav-bar.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

// This value is duplicated from `top-nav-bar.js`. Its definition of the variable is not
// exposed globally. Keep in sync.
//
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

body {
--font-stack: 'IBM Plex Sans', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
--font-stack--monospace: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;
Expand Down
13 changes: 13 additions & 0 deletions src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/* This code is part of Qiskit.
*
* (C) Copyright IBM 2023.
*
* This code is licensed under the Apache License, Version 2.0. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

@import "admonitions";
@import "api";
@import "custom-directives";
Expand Down
14 changes: 14 additions & 0 deletions src/qiskit_sphinx_theme/pytorch/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{#-
This code is part of Qiskit.

(C) Copyright IBM 2023.

This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.

Any modifications or derivative works of this code must retain this
copyright notice, and modified files need to carry a notice indicating
that they have been altered from the originals.
-#}

<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="pytorch-breadcrumbs">
Expand Down
14 changes: 14 additions & 0 deletions src/qiskit_sphinx_theme/pytorch/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{#-
This code is part of Qiskit.

(C) Copyright IBM 2023.

This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.

Any modifications or derivative works of this code must retain this
copyright notice, and modified files need to carry a notice indicating
that they have been altered from the originals.
-#}

<footer>
<!-- USER FEEDBACK -->
{% if analytics_enabled %}
Expand Down
14 changes: 14 additions & 0 deletions src/qiskit_sphinx_theme/pytorch/languages.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{#-
This code is part of Qiskit.

(C) Copyright IBM 2023.

This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.

Any modifications or derivative works of this code must retain this
copyright notice, and modified files need to carry a notice indicating
that they have been altered from the originals.
-#}

{% if translations_list %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
Expand Down
14 changes: 14 additions & 0 deletions src/qiskit_sphinx_theme/pytorch/layout.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{#-
This code is part of Qiskit.

(C) Copyright IBM 2023.

This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.

Any modifications or derivative works of this code must retain this
copyright notice, and modified files need to carry a notice indicating
that they have been altered from the originals.
-#}

{# Sphinx template variable setup #}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
Expand Down
Loading