Skip to content

Commit

Permalink
cruft: update template
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Nov 23, 2023
1 parent 379d5fc commit 4ee5878
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 156 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "c4e24f909659b6ce9c34a1da631290f0c70ff2f2",
"commit": "15ee26df315020399731c6291d61bef81a3fc5d3",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -47,7 +47,7 @@ jobs:
run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml

- name: Upload coverage report
uses: codecov/[email protected].1
uses: codecov/[email protected].4

- name: Run benchmarks
run: nox -s bench
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update template
uses: iterative/py-template@main
33 changes: 8 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -23,35 +19,22 @@ repos:
args: ['--fix=lf']
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.5'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies: ["tomli"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-debugger==4.1.2
- flake8-string-format==0.3.0
- repo: https://github.com/pycqa/bandit
rev: 1.7.4
hooks:
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: ["toml"]
# NOTE: temporarily skipped
# - repo: https://github.com/sqlfluff/sqlfluff
# rev: 1.4.2
Expand Down
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def lint(session: nox.Session) -> None:
args = *(session.posargs or ("--show-diff-on-failure",)), "--all-files"
session.run("pre-commit", "run", *args)
session.run("python", "-m", "mypy")
session.run("python", "-m", "pylint", *locations)


@nox.session
Expand Down
93 changes: 49 additions & 44 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,55 @@ build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''

[tool.isort]
profile = "black"
known_first_party = ["sqltrie"]
line_length = 88
[project]
name = "sqltrie"
description = "SQL-based prefix tree inspired by pygtrie and python-diskcache"
readme = "README.rst"
license = {text = "Apache-2.0"}
authors = [{ name = "Ruslan Kuprieiev", email = "[email protected]" }]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 1 - Planning",
]
requires-python = ">=3.8"
dynamic = ["version"]
dependencies = [
"attrs",
# NOTE: orjson doesn't support pypy, see
# https://github.com/ijl/orjson/issues/90
"orjson; implementation_name=='cpython'",
"pygtrie",
]

[project.urls]
Issues = "https://github.com/efiop/sqltrie/issues"
Source = "https://github.com/efiop/sqltrie"

[project.optional-dependencies]
tests = [
"pytest==7.2.0",
"pytest-sugar==0.9.5",
"pytest-cov==3.0.0",
"pytest-mock==3.8.2",
"mypy==0.971",
"pytest-benchmark",
"pyinstaller",
]
dev = [
"sqltrie[tests]",
]

[project.entry-points.pyinstaller40]
hook-dirs = "sqltrie.__pyinstaller:get_hook_dirs"
tests = "sqltrie.__pyinstaller:get_PyInstaller_tests"

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.pytest.ini_options]
addopts = "-ra"
Expand Down Expand Up @@ -64,31 +91,9 @@ warn_redundant_casts = true
warn_unreachable = true
files = ["src", "tests"]

[tool.pylint.format]
max-line-length = 88

[tool.pylint.master]
load-plugins = ["pylint_pytest"]

[tool.pylint.message_control]
enable = ["c-extension-no-member", "no-else-return"]
disable = [
"fixme",
"missing-function-docstring", "missing-module-docstring",
"missing-class-docstring",
]

[tool.pylint.variables]
dummy-variables-rgx = "_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_"
ignored-argument-names = "_.*|^ignored_|^unused_|args|kwargs"

[tool.codespell]
ignore-words-list = "datas"

[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101"]

[tool.sqlfluff.core]
dialect = "sqlite"
exclude_rules = "L031"
Expand Down
81 changes: 0 additions & 81 deletions setup.cfg

This file was deleted.

0 comments on commit 4ee5878

Please sign in to comment.