-
Notifications
You must be signed in to change notification settings - Fork 3
Updates based repo-review report #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
0ed1939
2d706d5
b0a2ec6
7bafd28
ee6800e
2d80ebd
6f41e3d
677aa5b
02ac0bb
401e549
59a5965
70f5ce3
c14fb37
737dd5d
67985cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| # Enable version updates for GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| groups: | ||
| actions: | ||
| patterns: | ||
| - "*" | ||
| directory: "/" | ||
| schedule: | ||
| # Check for updates to GitHub Actions every week | ||
| interval: "weekly" | ||
|
|
||
| # Enable version updates for pre-commit hooks | ||
| - package-ecosystem: "pre-commit" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| pre-commit: | ||
| patterns: | ||
| - "*" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,46 @@ | ||
| files: \.py | ||
| repos: | ||
| # ruff for linting and formatting python | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.3.4 | ||
| rev: v0.12.7 | ||
| hooks: | ||
| - id: ruff | ||
| args: [ --fix, --exit-non-zero-on-fix ] | ||
| - id: ruff-check | ||
| args: [ --fix, --show-fixes, --exit-non-zero-on-fix ] | ||
| - id: ruff-format | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.3.0 | ||
| hooks: | ||
| - id: check-case-conflict | ||
| - id: check-merge-conflict | ||
| - id: check-executables-have-shebangs | ||
| - id: debug-statements | ||
| - id: end-of-file-fixer | ||
| - id: mixed-line-ending | ||
| - id: trailing-whitespace | ||
| - id: check-yaml | ||
| - id: name-tests-test | ||
| args: [--pytest-test-first] | ||
|
|
||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: v1.13.0 | ||
| hooks: | ||
| - id: mypy | ||
| additional_dependencies: [numpy] | ||
| # yamlfmt for formatting YAML files | ||
| - repo: https://github.com/google/yamlfmt | ||
| rev: v0.17.2 | ||
| hooks: | ||
| - id: yamlfmt | ||
| # Codespell for spell checking | ||
| - repo: https://github.com/codespell-project/codespell | ||
| rev: v2.4.1 | ||
| hooks: | ||
| - id: codespell | ||
| additional_dependencies: | ||
| - tomli | ||
| exclude_types: ["css", "html", "javascript", "json"] | ||
| # Validate GitHub Actions workflow files | ||
| - repo: https://github.com/mpalmer/action-validator | ||
| rev: v0.8.0 | ||
| hooks: | ||
| - id: action-validator | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ dynamic = ["version"] | |
| dependencies = [ | ||
| "lark[interegular]", | ||
| "numpy", | ||
| "convertdate", | ||
| "convertdate>=2.4,<2.4.1", # changes syntax, deprecation warning | ||
| "strenum; python_version < '3.11'", | ||
| ] | ||
| authors = [ | ||
|
|
@@ -42,7 +42,6 @@ classifiers = [ | |
| "Programming Language :: Python :: 3.13", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: Science/Research", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Operating System :: OS Independent", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "Topic :: Scientific/Engineering", | ||
|
|
@@ -51,21 +50,20 @@ classifiers = [ | |
|
|
||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| [dependency-groups] | ||
| docs = ["sphinx>=7.0.0", "alabaster", "myst-parser", "myst-parser[linkify]"] | ||
| test = ["pytest>=7.2", "pytest-ordering", "pytest-cov"] | ||
| test = ["pytest>=9", "pytest-ordering", "pytest-cov"] | ||
| notebooks = ["jupyterlab", "pandas", "treon", "altair"] | ||
| check = ["undate[docs]", "undate[notebooks]", "mypy", "ruff"] | ||
| check = [ { include-group = "docs" }, {include-group = "notebooks"}, "mypy", "ruff"] | ||
| dev = [ | ||
| "pre-commit>=2.20.0", | ||
| "twine", | ||
| "wheel", | ||
| "build", | ||
| "undate[check]", | ||
| "undate[docs]", | ||
| "undate[test]", | ||
| { include-group = "test" }, | ||
| { include-group = "check" }, | ||
| { include-group = "docs" } | ||
| ] | ||
|
rlskoeser marked this conversation as resolved.
|
||
| all = ["undate", "undate[dev]"] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/dh-tech/undate-python" | ||
|
|
@@ -87,9 +85,16 @@ dependencies = ["babel"] | |
| [tool.hatch.envs.codegen.scripts] | ||
| generate = "python scripts/generate_gregorian_grammar.py" | ||
|
|
||
| [tool.pytest.ini_options] | ||
| pythonpath = "src/" | ||
| testpaths = ["tests/"] | ||
| [tool.pytest] | ||
| minversion = "9" | ||
| log_level = "INFO" | ||
| strict = true | ||
| addopts = ["-ra"] | ||
| filterwarnings = ["error"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Combined with filterwarnings = [
"error",
"default::DeprecationWarning:convertdate.*",
"default::DeprecationWarning:lark.*",
]🤖 Prompt for AI Agents |
||
| pythonpath = [ "src/" ] | ||
| testpaths = [ | ||
| "tests", | ||
| ] | ||
| markers = [ | ||
| "last : run marked tests after all others", | ||
| "first : run marked tests before all others", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
pre-commit config top-level files regex semantics default applied to hooks💡 Result:
In pre-commit's .pre-commit-config.yaml, top-level 'files' and 'exclude' options are Python regular expressions matched against file paths relative to the repository root using re.search semantics (substring match anywhere in the path, not full path anchored unless ^/$ used). - 'files': optional global include pattern (default: empty string ''). An empty regex matches all files (re.search('', path) succeeds for any path). - 'exclude': optional global exclude pattern (default: '^$', which matches only empty strings, excluding nothing). These apply before hook-level filters. Global 'files' selects candidates, then global 'exclude' removes matches from them, then hook-specific 'files'/'exclude' etc. apply. Hook-level 'files'/'exclude' use the same regex semantics. Source: Official pre-commit docs confirm defaults and top-level application; regex section explicitly states "The patterns for files and exclude are python regular expressions and are matched with re.search." Examples show multiline (?x) regexes for complex patterns.
Citations:
🏁 Script executed:
Repository: dh-tech/undate-python
Length of output: 1716
Critical: top-level
files: \.pysilently disables every new non-Python hook.The global
filesregex on line 1 applies to every hook that does not override it.check-merge-conflict,check-yaml,yamlfmt,codespell, andaction-validatorhave no localfilesoverrides and will only match files ending in.py, rendering them no-ops—these tools are meant to validate YAML, workflows, text, and merge conflicts, not Python source.Remove the top-level filter (recommended—individual hooks already declare
types/types_orappropriately) or overridefilesper-hook that needs non-Python coverage.Proposed fix
-files: \.py repos:If a subset of existing hooks really did need to be restricted to
*.py, re-declarefiles:on those individual hooks instead of globally.📝 Committable suggestion
🤖 Prompt for AI Agents