-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from qartik/updates-23-oct
Updates, add Makefile, typos and ruff.toml
- Loading branch information
Showing
14 changed files
with
200 additions
and
61 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ __pycache__ | |
*.pyd | ||
*.egg-info | ||
dist | ||
build | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ __pypackages__/ | |
*.swp | ||
.DS_Store | ||
.qtmlib/ | ||
*.venv/ | ||
*.venv/ |
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,23 +1,34 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: black | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
# Python-specific | ||
- id: check-ast | ||
- id: check-docstring-first | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/RobertCraigie/pyright-python | ||
rev: v1.1.317 | ||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.16.17 | ||
hooks: | ||
- id: pyright | ||
- id: typos | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.278 | ||
rev: v0.0.292 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
# Building docs on precommit seems like this will be slow. | ||
# - repo: https://github.com/pre-commit/mirrors-sphinx | ||
# rev: v4.2.0 | ||
# hooks: | ||
# - id: sphinx | ||
# stages: [commit] | ||
# language_version: python3.11 | ||
- repo: https://github.com/RobertCraigie/pyright-python | ||
rev: v1.1.329 | ||
hooks: | ||
- id: pyright |
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,22 @@ | ||
.PHONY: install dev tests lint docs clean build | ||
|
||
install: | ||
pip install . | ||
|
||
dev: | ||
pip install -e . | ||
|
||
tests: | ||
pytest . | ||
|
||
lint: | ||
pre-commit run --all-files | ||
|
||
docs: | ||
sphinx-build -M html docs/source/ docs/build/ | ||
|
||
clean: | ||
rm -rf *.egg-info dist build | ||
|
||
build: clean | ||
python -m build --sdist -n |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "qtmlib" | ||
project_copyright = "2023, Author" | ||
author = "Author" | ||
release = "0.0.1" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [] | ||
|
||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "alabaster" |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
black | ||
build | ||
pre-commit | ||
pyright | ||
pytest | ||
pytest-lazy-fixture | ||
sphinx | ||
wheel |
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,60 @@ | ||
# See https://docs.astral.sh/ruff/rules/ | ||
target-version = "py311" | ||
|
||
line-length = 88 | ||
|
||
select = [ | ||
"E", # pycodestyle Errors | ||
"W", # pycodestyle Warnings | ||
|
||
"A", # flake8-builtins | ||
"B", # flake8-Bugbear | ||
"BLE", # flake8-blind-except | ||
"C4", # flake8-comprehensions | ||
"COM", # flake8-commas | ||
"D", # pydocstyle | ||
"EM", # flake8-errmsg | ||
"EXE", # flake8-executable | ||
"F", # pyFlakes | ||
"FA", # flake8-future-annotations | ||
"FIX", # flake8-fixme | ||
"FLY", # flynt | ||
"G", # flake8-logging-format | ||
"I", # isort | ||
"INP", # flake8-no-pep420 | ||
"ISC", # flake8-implicit-str-concat | ||
"N", # pep8-Naming | ||
"NPY", # NumPy-specific | ||
"PERF", # Perflint | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PL", # pylint | ||
"PT", # flake8-pytest-style | ||
"RSE", # flake8-raise | ||
"RUF", # Ruff-specific | ||
"S", # flake8-bandit (Security) | ||
"SIM", # flake8-simplify | ||
"SLF", # flake8-self | ||
"SLOT", # flake8-slots | ||
"T10", # flake8-debugger | ||
# "T20", # flake8-print | ||
"TD", # flake8-todos | ||
"TRY", # tryceratops | ||
"UP", # pyupgrade | ||
"YTT", # flake8-2020 | ||
] | ||
|
||
[per-file-ignores] | ||
"__init__.py" = ["F401"] # module imported but unused | ||
"docs/*" = [ | ||
"D100", # Missing docstring in public module | ||
"INP001", # File * is part of an implicit namespace package. Add an `__init__.py`. | ||
] | ||
"tests/*" = [ | ||
"INP001", | ||
"S101", # Use of `assert` detected | ||
"PLR2004", # Magic value used in comparison, consider replacing * with a constant variable | ||
] | ||
|
||
[pydocstyle] | ||
convention = "google" |