Skip to content

Commit

Permalink
EDIT+REMOVE: edit taskfile + remove reference to win taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vdmitriyev committed Sep 30, 2024
1 parent 6a88e01 commit 508213e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 64 deletions.
69 changes: 41 additions & 28 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ version: '3'
vars:
PACKAGE_NAME: "pymultissher"
PACKAGE_VERSION:
sh: python -c "import importlib.metadata; print(importlib.metadata.version('{{.PACKAGE_NAME}}'))"
sh: |
python -c """
import importlib.metadata
try:
print(importlib.metadata.version('{{.PACKAGE_NAME}}'))
except ImportError:
print('0.0.0')
"""
VENV_DIR: ".venv"

includes:
win: ./Taskfile_windows.yml

tasks:

default:
silent: true
cmds:
Expand All @@ -29,10 +34,12 @@ tasks:

clean-all:
deps: [check-virtualenv]
run: once
silent: true
cmds:
- task: clean-build
- task: clean-pyc
#- task: clean-test
- task: clean-test

clean-build:
silent: true
Expand Down Expand Up @@ -63,7 +70,7 @@ tasks:
- rm -fr htmlcov/
- rm -fr .pytest_cache

package-help:
version:
deps: [check-virtualenv]
cmds:
- echo 'package version {{.PACKAGE_VERSION}}'
Expand All @@ -80,20 +87,25 @@ tasks:
cmds:
- pip uninstall {{.PACKAGE_NAME}}

pre-commit:
deps: [check-virtualenv]
build:
silent: true
deps: [check-virtualenv]
cmds:
- pre-commit run --all-files
- task: clean-build
- echo "builds source and wheel package"
- py -m build
- echo "files in dist"
- ls -lh dist

pre-commit-update:
publish-test-pypi:
deps: [check-virtualenv]
silent: true
cmds:
- pre-commit autoupdate
- pre-commit run --all-files
- echo "uploads to testpypi"
- task: build
- py -m twine upload --repository testpypi dist/*

git-tag-create:
silent: true
deps: [check-virtualenv]
cmds:
- task: build
Expand Down Expand Up @@ -121,16 +133,6 @@ tasks:
cmds:
- git push --tags origin

build:
silent: true
deps: [check-virtualenv]
cmds:
- task: clean-build
- echo "builds source and wheel package"
- py -m build
- echo "files in dist"
- ls -lh dist

pytest:
silent: true
deps: [check-virtualenv]
Expand All @@ -146,7 +148,6 @@ tasks:
- pytest
- pytest -m "with_docker"


pytest-verbose:
silent: true
deps: [check-virtualenv]
Expand All @@ -161,9 +162,21 @@ tasks:
- echo "running tox"
- tox

publish-test-pypi:
pre-commit-install:
deps: [check-virtualenv]
silent: true
cmds:
- echo "builds source and wheel package"
- task: build
- py -m twine upload --repository testpypi dist/*
- pre-commit install

pre-commit-run:
deps: [check-virtualenv]
silent: true
cmds:
- pre-commit run --all-files

pre-commit-update:
deps: [check-virtualenv]
silent: true
cmds:
- pre-commit autoupdate
- pre-commit run --all-files
36 changes: 0 additions & 36 deletions Taskfile_windows.yml

This file was deleted.

0 comments on commit 508213e

Please sign in to comment.