-
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.
chore: update project structure to b25684a2
- Loading branch information
Showing
17 changed files
with
286 additions
and
14 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
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,16 @@ | ||
diff a/.github/actions/python-poetry-env/action.yml b/.github/actions/python-poetry-env/action.yml (rejected hunks) | ||
@@ -5,12 +5,12 @@ inputs: | ||
python-version: | ||
required: false | ||
description: 'Python version' | ||
- default: '3.10' | ||
+ default: '3.12' | ||
outputs: {} | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- - uses: actions/setup-python@v4 | ||
+ - uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
- name: Install poetry |
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,16 @@ | ||
diff a/.github/workflows/cookiecutter.yml b/.github/workflows/cookiecutter.yml (rejected hunks) | ||
@@ -8,11 +8,11 @@ jobs: | ||
auto-update-project: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- - uses: actions/checkout@v2 | ||
+ - uses: actions/checkout@v4 | ||
- name: Set up Python | ||
- uses: actions/setup-python@v4 | ||
+ uses: actions/setup-python@v5 | ||
with: | ||
- python-version: 3.9 | ||
+ python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: python -m pip install cruft poetry jello tabulate |
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
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,21 @@ | ||
diff a/.github/workflows/test.yml b/.github/workflows/test.yml (rejected hunks) | ||
@@ -38,10 +38,17 @@ jobs: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
- python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- - uses: actions/checkout@v2 | ||
+ - uses: actions/checkout@v4 | ||
- uses: ./.github/actions/python-poetry-env | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: poetry run pytest | ||
+ | ||
+ docs: | ||
+ runs-on: ubuntu-latest | ||
+ steps: | ||
+ - uses: actions/checkout@v4 | ||
+ - uses: ./.github/actions/python-poetry-env | ||
+ - run: poetry run mkdocs 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks) | ||
@@ -11,30 +11,24 @@ repos: | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
+ exclude: 'CHANGELOG.md' | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- repo: local | ||
hooks: | ||
- - id: autoflake | ||
- name: autoflake | ||
- entry: poetry run autoflake -r -i --remove-all-unused-imports --remove-unused-variables | ||
+ - id: ruff-format | ||
+ name: ruff-format | ||
+ entry: poetry run ruff format | ||
+ require_serial: true | ||
language: system | ||
types: [ python ] | ||
- - id: isort | ||
- name: isort | ||
- entry: poetry run isort | ||
- language: system | ||
- types: [python] | ||
- - id: black | ||
- name: black | ||
- entry: poetry run black | ||
- language: system | ||
- types: [python] | ||
- - id: pyupgrade | ||
- name: pyupgrade | ||
- entry: poetry run pyupgrade --py37-plus | ||
+ - id: ruff | ||
+ name: ruff | ||
+ # Add --fix, in case you want it to autofix when this hook runs | ||
+ entry: poetry run ruff check --force-exclude | ||
+ require_serial: true | ||
language: system | ||
- types: [python] | ||
+ types: [ python ] | ||
- id: mypy | ||
name: mypy | ||
entry: poetry run mypy . |
File renamed without changes.
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,9 @@ | ||
diff a/LICENSE b/LICENSE (rejected hunks) | ||
@@ -1,6 +1,6 @@ | ||
The MIT License (MIT) | ||
|
||
-Copyright (c) 2021 Adnan M. Niazi <adnaniazi@gmail.com> | ||
+Copyright (c) 2024 Adnan M. Niazi <adnaniazi@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in |
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,31 @@ | ||
diff a/README.md b/README.md (rejected hunks) | ||
@@ -29,7 +29,7 @@ pip install capfinder | ||
* Clone this repository | ||
* Requirements: | ||
* [Poetry](https://python-poetry.org/) | ||
- * Python 3.7+ | ||
+ * Python 3.8+ | ||
* Create a virtual environment and install the dependencies | ||
|
||
```sh | ||
@@ -50,9 +50,8 @@ pytest | ||
|
||
### Documentation | ||
|
||
-The documentation is automatically generated from the content of the [docs directory](./docs) and from the docstrings | ||
- of the public signatures of the source code. The documentation is updated and published as a [Github project page | ||
- ](https://pages.github.com/) automatically as part each release. | ||
+The documentation is automatically generated from the content of the [docs directory](https://github.com/adnaniazi/capfinder/tree/master/docs) and from the docstrings | ||
+ of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release. | ||
|
||
### Releasing | ||
|
||
@@ -66,7 +65,7 @@ Find the draft release from the | ||
|
||
### Pre-commit | ||
|
||
-Pre-commit hooks run all the auto-formatters (e.g. `black`, `isort`), linters (e.g. `mypy`, `flake8`), and other quality | ||
+Pre-commit hooks run all the auto-formatting (`ruff format`), linters (e.g. `ruff` and `mypy`), and other quality | ||
checks to make sure the changeset is in good shape before a commit/push happens. | ||
|
||
You can install the hooks with (runs for each commit): |
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,12 @@ | ||
diff a/mkdocs.yml b/mkdocs.yml (rejected hunks) | ||
@@ -28,9 +28,7 @@ plugins: | ||
default_handler: python | ||
handlers: | ||
python: | ||
- rendering: | ||
+ options: | ||
show_signature_annotations: true | ||
show_source: true | ||
show_submodules: true | ||
- watch: | ||
- - src/capfinder |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,124 @@ | ||
diff a/pyproject.toml b/pyproject.toml (rejected hunks) | ||
@@ -18,9 +18,11 @@ classifiers = [ | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
- "Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
+ "Programming Language :: Python :: 3.10", | ||
+ "Programming Language :: Python :: 3.11", | ||
+ "Programming Language :: Python :: 3.12", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Typing :: Typed", | ||
] | ||
@@ -30,43 +32,54 @@ packages = [ | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
-python = ">=3.7.1, <4.0" | ||
- | ||
-[tool.poetry.dev-dependencies] | ||
-autoflake = "*" | ||
-black = "*" | ||
-flake8 = "*" | ||
-flake8-bugbear = "*" | ||
-flake8-builtins = "*" | ||
-flake8-comprehensions = "*" | ||
-flake8-debugger = "*" | ||
-flake8-eradicate = "*" | ||
-flake8-logging-format = "*" | ||
-isort = "*" | ||
-mkdocstrings = {version = ">=0.18", extras = ["python"]} | ||
+python = ">=3.8.1, <4.0" | ||
+ | ||
+[tool.poetry.group.dev.dependencies] | ||
+mkdocstrings = {version = ">=0.23", extras = ["python"]} | ||
mkdocs-material = "*" | ||
mypy = "*" | ||
-pep8-naming = "*" | ||
pre-commit = "*" | ||
pymdown-extensions = "*" | ||
pytest = "*" | ||
pytest-github-actions-annotate-failures = "*" | ||
pytest-cov = "*" | ||
python-kacl = "*" | ||
-pyupgrade = "*" | ||
-tryceratops = "*" | ||
+ruff = ">=0.2.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
-[tool.isort] | ||
-profile = "black" | ||
-src_paths = ["src", "tests"] | ||
+[tool.ruff] | ||
+target-version = "py38" # The lowest supported version | ||
+ | ||
+[tool.ruff.lint] | ||
+# By default, enable all the lint rules. | ||
+# Add to the ignore list below if you don't want some rules. | ||
+# If you need some ignores for certain modules, see tool.ruff.lint.per-file-ignores below. | ||
+# For individual ignore cases, prefer inline `# noqa`s within the code. | ||
+select = ["ALL"] | ||
+ignore = [ | ||
+ "ANN", # Type hints related, let mypy handle these. | ||
+ "D", # Docstrings related, way too strict to our taste | ||
+ ] | ||
+ | ||
+[tool.ruff.lint.per-file-ignores] | ||
+"tests/**" = [ | ||
+ "S101", # "Use of `assert` detected" | ||
+ "ARG", # "Unused function argument". Fixtures are often unused. | ||
+ "S105", # "Possible hardcoded password". | ||
+] | ||
+ | ||
+[tool.ruff.lint.mccabe] | ||
+max-complexity = 10 | ||
|
||
-[tool.black] | ||
-target-version = ["py37", "py38", "py39"] | ||
-include = '\.pyi?$' | ||
+[tool.ruff.lint.pep8-naming] | ||
+classmethod-decorators = [ | ||
+ "classmethod", | ||
+ "pydantic.validator", | ||
+ "pydantic.root_validator", | ||
+] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = """\ | ||
@@ -84,12 +97,23 @@ exclude_lines = [ | ||
] | ||
|
||
[tool.mypy] | ||
+# This is the global mypy configuration. | ||
+# Avoid changing this! | ||
+strict = true # See all the enabled flags `mypy --help | grep -A 10 'Strict mode'` | ||
disallow_any_unimported = true | ||
-disallow_untyped_defs = true | ||
-no_implicit_optional = true | ||
-strict_equality = true | ||
-warn_unused_ignores = true | ||
-warn_redundant_casts = true | ||
-warn_return_any = true | ||
-check_untyped_defs = true | ||
-show_error_codes = true | ||
+ | ||
+# If you need to ignore something for some specific module, | ||
+# add overrides for them. Avoid changing the global config! | ||
+# For example: | ||
+# [[tool.mypy.overrides]] | ||
+# module = [ | ||
+# "my_unpyted_dependency1.*", | ||
+# "my_unpyted_dependency2.*" | ||
+# ] | ||
+# ignore_missing_imports = true | ||
+ | ||
+# [[tool.mypy.overrides]] | ||
+# module = [ | ||
+# "tests/my_thing/test_my_thing", | ||
+# ] | ||
+# disallow_untyped_defs = false |
Oops, something went wrong.