-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switch from makefile to taskfile
- Loading branch information
Showing
7 changed files
with
129 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# EditorConfig is awesome: https://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
|
||
[*.py] | ||
indent_size = 4 | ||
|
||
[Makefile] | ||
indent_style = tab |
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ wheels/ | |
.venv/ | ||
.python-version | ||
.sl/ | ||
.task/ |
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,83 @@ | ||
version: '3' | ||
|
||
set: [errexit, nounset, pipefail] | ||
shopt: [globstar] | ||
|
||
includes: | ||
lint: | ||
taskfile: https://github.com/nikaro/meta/raw/main/taskfiles/lint.yml | ||
internal: true | ||
format: | ||
taskfile: https://github.com/nikaro/meta/raw/main/taskfiles/format.yml | ||
internal: true | ||
|
||
tasks: | ||
init: | ||
desc: Initialize repositry | ||
cmds: | ||
- git config core.hooksPath .githooks | ||
- git config commit.template .gitmessage | ||
|
||
lock: | ||
desc: Update lockfile | ||
cmd: rye lock --all-features --update-all | ||
|
||
sync: | ||
desc: Synchronize virtualenv with lockfile | ||
cmd: rye sync --all-features --no-lock || rye sync --all-features --no-lock --force | ||
|
||
lint: | ||
desc: Run linters | ||
cmds: | ||
- task: lint:default | ||
- task: lint:python | ||
|
||
lint:python: | ||
desc: Lint Python code | ||
sources: | ||
- ./src/**/*.py | ||
cmds: | ||
- rye fmt --check | ||
- rye lint | ||
- rye run type-check | ||
|
||
format: | ||
desc: Run formatters | ||
cmds: | ||
- task: format:default | ||
- task: format:python | ||
|
||
format:python: | ||
desc: Format Python code | ||
sources: | ||
- ./src/**/*.py | ||
- ./tests/**/*.py | ||
cmds: | ||
- rye fmt | ||
|
||
test: | ||
desc: Run tests | ||
sources: | ||
- ./src/**/*.py | ||
- ./tests/**/*.py | ||
cmd: rye test | ||
|
||
build: | ||
desc: Build project | ||
sources: | ||
- ./src/**/*.py | ||
- ./tests/**/*.py | ||
- ./pyproject.toml | ||
- ./requirements.lock | ||
generates: | ||
- ./dist/*.whl | ||
- ./dist/*.tar.gz | ||
cmd: rye build | ||
|
||
clean: | ||
desc: Cleanup workspace | ||
cmds: | ||
- rm -rf ./dist/ | ||
- rm -rf ./.ruff_cache/ | ||
- rm -rf ./.pytest_cache/ | ||
- fd --type directory --no-ignore __pycache__ | xargs rm -rf |