-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into paddy/issue-292
- Loading branch information
Showing
14 changed files
with
398 additions
and
55 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,11 @@ | ||
--- | ||
name: Anything Else | ||
description: | ||
Create a blank issue for anything that does not fit into the other categories | ||
body: | ||
- id: anything_else | ||
type: textarea | ||
attributes: | ||
label: Add your issue here | ||
validations: | ||
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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
--- | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Raise a GLASS Discussion | ||
url: https://github.com/orgs/glass-dev/discussions | ||
about: | ||
If you would like to start a discussion with the wider GLASS community | ||
about e.g. a design decision or API change, you can use our Discussions | ||
page. | ||
- name: Join the GLASS Slack | ||
url: https://glass-dev.github.io/slack | ||
about: We have a public Slack workspace for discussions about the project. |
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
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
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ build | |
dist | ||
.env | ||
.coverage* | ||
coverage* |
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
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,3 @@ | ||
--- | ||
proseWrap: always | ||
quoteProps: as-needed |
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,33 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
anchors: enable | ||
braces: | ||
forbid: non-empty | ||
brackets: | ||
forbid: non-empty | ||
colons: enable | ||
commas: enable | ||
comments: | ||
min-spaces-from-content: 1 | ||
comments-indentation: enable | ||
document-end: disable | ||
document-start: enable | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: enable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: enable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: enable | ||
quoted-strings: | ||
quote-type: double | ||
required: only-when-needed | ||
trailing-spaces: enable | ||
truthy: | ||
check-keys: false |
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
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,75 @@ | ||
"""Nox config.""" | ||
|
||
from __future__ import annotations | ||
|
||
import nox | ||
|
||
# Options to modify nox behaviour | ||
nox.options.default_venv_backend = "uv|virtualenv" | ||
nox.options.reuse_existing_virtualenvs = True | ||
nox.options.sessions = ["lint", "tests"] | ||
|
||
ALL_PYTHON = ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
|
||
@nox.session | ||
def lint(session: nox.Session) -> None: | ||
"""Run the linter.""" | ||
session.install("pre-commit") | ||
session.run("pre-commit", "run", "--all-files", *session.posargs) | ||
|
||
|
||
@nox.session(python=ALL_PYTHON) | ||
def tests(session: nox.Session) -> None: | ||
"""Run the unit tests.""" | ||
session.install("-c", ".github/test-constraints.txt", "-e", ".[test]") | ||
session.run( | ||
"pytest", | ||
*session.posargs, | ||
) | ||
|
||
|
||
@nox.session(python=ALL_PYTHON) | ||
def coverage(session: nox.Session) -> None: | ||
"""Run tests and compute coverage.""" | ||
session.posargs.append("--cov=glass") | ||
tests(session) | ||
|
||
|
||
@nox.session(python=ALL_PYTHON) | ||
def doctests(session: nox.Session) -> None: | ||
"""Run the doctests.""" | ||
session.posargs.append("--doctest-plus") | ||
session.posargs.append("glass") | ||
tests(session) | ||
|
||
|
||
@nox.session | ||
def examples(session: nox.Session) -> None: | ||
"""Run the example notebooks.""" | ||
session.install("-e", ".[examples]") | ||
session.run("jupyter", "execute", "examples/**/*.ipynb", *session.posargs) | ||
|
||
|
||
@nox.session | ||
def docs(session: nox.Session) -> None: | ||
"""Build the docs. Pass "serve" to serve.""" | ||
session.install("-e", ".[docs]") | ||
session.chdir("docs") | ||
session.run("sphinx-build", "-M", "html", ".", "_build") | ||
|
||
port = 8001 | ||
|
||
if session.posargs: | ||
if "serve" in session.posargs: | ||
print(f"Launching docs at http://localhost:{port}/ - use Ctrl-C to quit") | ||
session.run("python", "-m", "http.server", f"{port}", "-d", "_build/html") | ||
else: | ||
print("Unsupported argument to docs") | ||
|
||
|
||
@nox.session | ||
def build(session: nox.Session) -> None: | ||
"""Build an SDist and wheel.""" | ||
session.install("build") | ||
session.run("python", "-m", "build") |
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
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
Oops, something went wrong.