-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from CQCL/develop
Check formatting
- Loading branch information
Showing
18 changed files
with
854 additions
and
487 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 @@ | ||
name: Lint python projects | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
lint: | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Update pip | ||
run: pip install --upgrade pip | ||
- name: Install black and pylint | ||
run: pip install black pylint | ||
- name: Check files are formatted with black | ||
run: | | ||
black --check . | ||
- name: Run pylint | ||
run: | | ||
pylint */ |
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,53 @@ | ||
[MASTER] | ||
output-format=colorized | ||
disable=all | ||
enable= | ||
anomalous-backslash-in-string, | ||
assert-on-tuple, | ||
bad-indentation, | ||
bad-option-value, | ||
bad-reversed-sequence, | ||
bad-super-call, | ||
consider-merging-isinstance, | ||
continue-in-finally, | ||
dangerous-default-value, | ||
duplicate-argument-name, | ||
expression-not-assigned, | ||
function-redefined, | ||
inconsistent-mro, | ||
init-is-generator, | ||
line-too-long, | ||
lost-exception, | ||
missing-kwoa, | ||
mixed-line-endings, | ||
not-callable, | ||
no-value-for-parameter, | ||
nonexistent-operator, | ||
not-in-loop, | ||
pointless-statement, | ||
redefined-builtin, | ||
return-arg-in-generator, | ||
return-in-init, | ||
return-outside-function, | ||
simplifiable-if-statement, | ||
syntax-error, | ||
too-many-function-args, | ||
trailing-whitespace, | ||
undefined-variable, | ||
unexpected-keyword-arg, | ||
unhashable-dict-key, | ||
unnecessary-pass, | ||
unreachable, | ||
unrecognized-inline-option, | ||
unused-import, | ||
unnecessary-semicolon, | ||
unused-variable, | ||
unused-wildcard-import, | ||
wildcard-import, | ||
wrong-import-order, | ||
wrong-import-position, | ||
yield-outside-function | ||
|
||
|
||
# Ignore long lines containing URLs or pylint. | ||
ignore-long-lines=^(.*#\w*pylint: disable.*|\s*(# )?<?https?://\S+>?)$ |
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 |
---|---|---|
@@ -1,42 +1,46 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath('..')) | ||
sys.path.insert(0, os.path.abspath("..")) # pylint: disable=wrong-import-position | ||
|
||
from qujax.version import __version__ | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'qujax' | ||
copyright = '2022, Sam Duffield' | ||
author = 'Sam Duffield' | ||
project = "qujax" | ||
project_copyright = "2022, Sam Duffield" | ||
author = "Sam Duffield" | ||
version = __version__ | ||
release = __version__ | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = ['sphinx.ext.autodoc', 'sphinx_rtd_theme', 'sphinx.ext.napoleon', 'sphinx.ext.mathjax'] | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx_rtd_theme", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.mathjax", | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_theme = "sphinx_rtd_theme" | ||
|
||
autodoc_typehints = "description" | ||
|
||
html4_writer = True | ||
|
||
autodoc_type_aliases = { | ||
'jnp.ndarray': 'ndarray', | ||
'random.PRNGKeyArray': 'jax.random.PRNGKeyArray', | ||
'UnionCallableOptionalArray': 'Union[Callable[[ndarray, Optional[ndarray]], ndarray], ' | ||
'Callable[[Optional[ndarray]], ndarray]]' | ||
|
||
"jnp.ndarray": "ndarray", | ||
"random.PRNGKeyArray": "jax.random.PRNGKeyArray", | ||
"UnionCallableOptionalArray": "Union[Callable[[ndarray, Optional[ndarray]], ndarray], " | ||
"Callable[[Optional[ndarray]], ndarray]]", | ||
} | ||
|
||
latex_engine = 'pdflatex' | ||
latex_engine = "pdflatex" |
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.