Skip to content
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

Unify requirements files #3989

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/requirements.txt → .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/requirements.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
#
ansible-compat==4.1.11
ansible-core==2.16.2
Expand Down
46 changes: 0 additions & 46 deletions .config/lock-requirements.txt

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion .config/requirements-lock.txt

This file was deleted.

41 changes: 41 additions & 0 deletions .config/requirements-lock.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
#
ansible-compat==4.1.11
ansible-core==2.16.2
attrs==23.2.0
black==23.12.1
bracex==2.4
cffi==1.16.0
click==8.1.7
cryptography==41.0.7
filelock==3.13.1
jinja2==3.1.3
jsonschema==4.21.0
jsonschema-specifications==2023.12.1
markdown-it-py==3.0.0
markupsafe==2.1.3
mdurl==0.1.2
mypy-extensions==1.0.0
packaging==23.2
pathspec==0.12.1
platformdirs==4.1.0
pycparser==2.21
pygments==2.17.2
pyyaml==6.0.1
referencing==0.32.1
rich==13.7.0
rpds-py==0.17.1
ruamel-yaml==0.18.5
subprocess-tee==0.4.1
tomli==2.0.1
typing-extensions==4.9.0
wcmatch==8.5
yamllint==1.33.0

# The following packages are considered to be unsafe in a requirements file:
# resolvelib
# ruamel-yaml-clib
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ci:
submodules: true
exclude: >
(?x)^(
.config/constraints.txt|
.config/.*requirements.*|
.vscode/extensions.json|
.vscode/settings.json|
Expand Down Expand Up @@ -64,9 +65,9 @@ repos:
)$
always_run: true
additional_dependencies:
- prettier
- prettier-plugin-toml
- prettier-plugin-sort-json
- prettier@3.2.4
- prettier-plugin-toml@2.0.1
- prettier-plugin-sort-json@3.1.0
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
Expand Down Expand Up @@ -135,7 +136,7 @@ repos:
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.11"
rev: "v0.1.13"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down Expand Up @@ -204,7 +205,7 @@ repos:
name: lock
alias: lock
always_run: true
entry: pip-compile --upgrade -q --no-annotate --output-file=.config/lock-requirements.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib
entry: pip-compile --upgrade -q --no-annotate --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib
files: ^.config\/.*requirements.*$
language: python
language_version: "3.10" # minimal we support officially
Expand All @@ -216,15 +217,15 @@ repos:
name: deps
alias: deps
always_run: true
entry: pip-compile -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib
entry: pip-compile -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib
files: ^.config\/.*requirements.*$
language: python
language_version: "3.10" # minimal we support officially
pass_filenames: false
additional_dependencies:
- pip>=22.3.1
- id: pip-compile
entry: pip-compile -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade
entry: pip-compile -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade
language: python
always_run: true
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dictionaries:
ignorePaths:
- cspell.config.yaml
# The requirements file
- .config/requirements.txt
- .config/constraints.txt
- docs/requirements.txt
- docs/requirements.in
# Test fixtures generated from outside
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,9 @@ max-complexity = 20
]

[tool.setuptools.dynamic]
dependencies = {file = [".config/runtime-requirements.txt"]}
optional-dependencies.docs = {file = [".config/docs-requirements.txt"]}
optional-dependencies.test = {file = [".config/test-requirements.txt"]}
optional-dependencies.lock = {file = [".config/lock-requirements.txt"]}
dependencies = {file = [".config/requirements.in"]}
optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
optional-dependencies.test = {file = [".config/requirements-test.in"]}

[tool.setuptools_scm]
local_scheme = "no-local-version"
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/_internal/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BaseRule:
_collection: RulesCollection | None = None

@property
def help(self) -> str: # noqa: A003
def help(self) -> str:
"""Return a help markdown string for the rule."""
if self._help is None:
self._help = ""
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Options: # pylint: disable=too-many-instance-attributes
cwd: Path = Path(".")
display_relative_path: bool = True
exclude_paths: list[str] = field(default_factory=list)
format: str = "brief" # noqa: A003
format: str = "brief"
lintables: list[str] = field(default_factory=list)
list_rules: bool = False
list_tags: bool = False
Expand Down
4 changes: 2 additions & 2 deletions test/schemas/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"sourceMap": true,
"strict": true,
"stripInternal": true,
"target": "es5"
"target": "es5",
},
"exclude": ["node_modules"],
"include": ["src/**/*"]
"include": ["src/**/*"],
}
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ setenv =
devel: ANSIBLE_DEVEL_WARNING = false
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
devel,pkg,pre,py39: PIP_CONSTRAINT = /dev/null
PIP_DISABLE_PIP_VERSION_CHECK = 1
PRE_COMMIT_COLOR = always
Expand Down
Loading