Skip to content

Commit

Permalink
Merge branch 'main' into nox
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jan 11, 2024
2 parents a5a69ae + 86f6fe7 commit 0b79a61
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 16 deletions.
1 change: 1 addition & 0 deletions .config/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pluggy
pygments
pyyaml
rich >= 9.0
setuptools # py_package due to running setup.py
shellingham
subprocess-tee >= 0.3.1
tomli >= 1.1.0 ; python_version < "3.11"
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ build:
- pip install --user tox
- python3 -m tox -e docs -- --strict --site-dir=_readthedocs/html/
python:
system_packages: false
install:
- method: pip
path: tox
Expand Down
1 change: 0 additions & 1 deletion playbooks/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
repos:
- name: podman
url: https://github.com/containers/podman
branch: my-branch
- name: ansible-lint
url: https://github.com/ansible/ansible-lint
- name: cookiecutter
Expand Down
3 changes: 3 additions & 0 deletions samples/integration/ansible-lint.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
build
docs
eco
generate_docs
get-version
hook
install
install-reqs
lint
lint2
pkg
pre
py
py-devel
schemas
test
test-eco
test-hook
test-setup
uninstall
Expand Down
5 changes: 4 additions & 1 deletion samples/integration/cookiecutter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ build
clean-build
clean-coverage
clean-docs-build
clean-nox
clean-pyc
clean-pytest
clean-tox
coverage
docs
docs2
install
lint
lint2
lint23
py310
py311
py312
py37
py38
py39
release
safety
sdist
servedocs
submodules
Expand Down
6 changes: 3 additions & 3 deletions samples/integration/podman.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
binaries
binaries2
binaries23
clean
clean-binaries
docker
Expand All @@ -8,8 +9,7 @@ help
install
lint
local-cross
package
package-install
podman-mac-helper
rpm
rpm-install
test
up
1 change: 1 addition & 0 deletions samples/integration/typeshed.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
create_baseline_stubs
generate_proto_stubs
lint
runtests
sync_tensorflow_protobuf_stubs
33 changes: 23 additions & 10 deletions src/mk/tools/taskfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,29 @@ def __init__(self, path=".") -> None:
self.executable = ""

def is_present(self, path: Path) -> bool:
if os.path.isfile(os.path.join(path, "taskfile.yml")):
# On some Linux distros might be exposed as taskfile in order to
# avoid clashing with the other Task Warrior executable https://taskwarrior.org/
self.executable = shutil.which("taskfile") or shutil.which("task") or ""
if not self.executable:
logging.error(
"taskfile.yml config found but the tool is not installed. See https://taskfile.dev/installation/",
)
sys.exit(1)
return True
valid_taskfiles = [
"Taskfile.yml"
"taskfile.yml"
"Taskfile.yaml"
"taskfile.yaml"
"Taskfile.dist.yml"
"taskfile.dist.yml"
"Taskfile.dist.yaml"
"taskfile.dist.yaml",
]

for taskfile in valid_taskfiles:
if os.path.isfile(os.path.join(path, taskfile)):
# On some Linux distros might be exposed as taskfile in order to
# avoid clashing with the other Task Warrior executable https://taskwarrior.org/
self.executable = shutil.which(taskfile) or shutil.which("task") or ""
if not self.executable:
logging.error(
"%s config found but the tool is not installed. See https://taskfile.dev/installation/",
taskfile,
)
sys.exit(1)
return True
return False

def actions(self) -> list[Action]:
Expand Down

0 comments on commit 0b79a61

Please sign in to comment.