Skip to content

Commit

Permalink
Remove unused uv_requirement_params now that uv has the sync subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Nov 3, 2024
1 parent 5cafff6 commit 87de66a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
outputs:
python_files: ${{ steps.project-metadata.outputs.python_files }}
is_python_project: ${{ steps.project-metadata.outputs.is_python_project }}
uv_requirement_params: ${{ steps.project-metadata.outputs.uv_requirement_params }}
mypy_params: ${{ steps.project-metadata.outputs.mypy_params }}
steps:
- uses: actions/checkout@v4.2.2
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fix upload to PyPi on release.
- Check for built package through `uv`.
- Remove unused `uv_requirement_params` in metadata.

## [4.7.0 (2024-11-03)](https://github.com/kdeldycke/workflows/compare/v4.6.1...v4.7.0)

Expand Down
13 changes: 0 additions & 13 deletions gha_utils/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
python_files=".github/update_mailmap.py" ".github/metadata.py" "setup.py"
doc_files="changelog.md" "readme.md" "docs/license.md"
is_python_project=true
uv_requirement_params=--requirement pyproject.toml
package_name=click-extra
blacken_docs_params=--target-version py37 --target-version py38
ruff_py_version=py37
Expand Down Expand Up @@ -620,22 +619,11 @@ def python_files(self) -> Iterator[str]:
"""Returns a list of python files."""
yield from self.glob_files("**/*.py", "!.venv/**")

@cached_property
def requirement_files(self) -> Iterator[str]:
"""Returns a list of requirement files supported by uv."""
yield from self.glob_files(
"**/pyproject.toml", "*requirements.txt", "requirements/*.txt"
)

@cached_property
def doc_files(self) -> Iterator[str]:
"""Returns a list of doc files."""
yield from self.glob_files("**/*.{md,markdown,rst,tex}", "!.venv/**")

@cached_property
def uv_requirement_params(self) -> Iterator[str]:
return (f"--requirement {req}" for req in self.requirement_files)

@property
def is_python_project(self):
"""Returns ``True`` if repository is a Python project.
Expand Down Expand Up @@ -1223,7 +1211,6 @@ def dump(
"python_files": self.python_files,
"doc_files": self.doc_files,
"is_python_project": self.is_python_project,
"uv_requirement_params": self.uv_requirement_params,
"package_name": self.package_name,
"blacken_docs_params": self.blacken_docs_params,
"ruff_py_version": self.ruff_py_version,
Expand Down

0 comments on commit 87de66a

Please sign in to comment.