From 16adc3808d56bb605493625adc84c4fa1156fba0 Mon Sep 17 00:00:00 2001 From: Simon Dirmeier Date: Sat, 20 Jul 2024 10:41:48 +0200 Subject: [PATCH] Thin out some unnecessary files --- .pre-commit-config.yaml | 57 +++++----------------------------------- Makefile | 5 ---- pyproject.toml | 58 +++++++++++------------------------------ 3 files changed, 21 insertions(+), 99 deletions(-) delete mode 100644 Makefile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9f3c50..4043440 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,61 +13,16 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace -- repo: https://github.com/asottile/pyupgrade - rev: v2.29.1 - hooks: - - id: pyupgrade - args: [--py38-plus] - -- repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black - args: ["--config=pyproject.toml"] - files: "(reconcile|examples)" - -- repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - args: ["--settings-path=pyproject.toml"] - files: "(reconcile|examples)" - -- repo: https://github.com/pycqa/bandit - rev: 1.7.1 - hooks: - - id: bandit - language: python - language_version: python3 - types: [python] - args: ["-c", "pyproject.toml"] - additional_dependencies: ["toml"] - files: "(reconcile|examples)" - -- repo: https://github.com/PyCQA/flake8 - rev: 5.0.1 - hooks: - - id: flake8 - additional_dependencies: [ - flake8-typing-imports==1.14.0, - flake8-pyproject==1.1.0.post0 - ] - - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.910-1 hooks: - id: mypy args: ["--ignore-missing-imports"] - files: "(reconcile|examples)" - -- repo: https://github.com/jorisroovers/gitlint - rev: v0.19.1 - hooks: - - id: gitlint - - id: gitlint-ci + files: "(reconcile|examples" -- repo: https://github.com/pycqa/pydocstyle - rev: 6.1.1 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.0 hooks: - - id: pydocstyle - additional_dependencies: ["toml"] + - id: ruff + args: [ --fix ] + - id: ruff-format \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index f8802c2..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -PKG_VERSION=`hatch version` - -tag: - git tag -a v${PKG_VERSION} -m v${PKG_VERSION} - git push --tag diff --git a/pyproject.toml b/pyproject.toml index 51dbab3..47268d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ license = "Apache-2.0" homepage = "https://github.com/dirmeier/reconcile" keywords = ["probabilistic reconciliation", "forecasting", "timeseries", "hierarchical time series"] classifiers=[ - "Development Status :: 1 - Planning", + "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", @@ -33,11 +33,13 @@ dependencies = [ "pandas>=1.5.1" ] dynamic = ["version"] -packages = [{include = "reconcile"}] [project.urls] homepage = "https://github.com/dirmeier/reconcile" +[tool.hatch.build.targets.wheel] +packages = ["reconcile"] + [tool.hatch.version] path = "reconcile/__init__.py" @@ -58,7 +60,7 @@ dependencies = [ ] [tool.hatch.envs.test.scripts] -lint = 'pylint reconcile' +lint = 'ruff check reconcile examples' test = 'pytest -v --doctest-modules --cov=./reconcile --cov-report=xml reconcile' [tool.hatch.envs.examples] @@ -70,47 +72,17 @@ dependencies = [ [tool.hatch.envs.examples.scripts] reconciliation = 'python examples/reconciliation.py' -[tool.black] -line-length = 80 -extend-ignore = "E203" -target-version = ['py39'] -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist -)/ -''' - - -[tool.isort] -profile = "black" -line_length = 80 -include_trailing_comma = true - - -[tool.flake8] -max-line-length = 80 -extend-ignore = ["E203", "W503", "E731"] -per-file-ignores = [ - '__init__.py:F401', -] - -[tool.pylint.messages_control] -disable = """ -invalid-name,missing-module-docstring,R0801,E0633 -""" - [tool.bandit] skips = ["B101"] -[tool.pydocstyle] +[tool.ruff] +fix = true +line-length = 80 + +[tool.ruff.lint] +select = ["E4", "E7", "E9", "F"] +extend-select = ["UP", "I", "PL", "S"] +ignore =["S101", "PLR2004", "PLR0913", "E2"] + +[tool.ruff.lint.pydocstyle] convention= 'google' -match = '^reconcile/*((?!test).)*\.py'