Skip to content

Commit

Permalink
migrate from task to just (#76)
Browse files Browse the repository at this point in the history
* migrate from task to just
  • Loading branch information
lesnik512 authored Sep 1, 2024
1 parent cbc816f commit c3f27ff
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 51 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: arduino/setup-task@v1
with:
repo-token: ${{ github.token }}
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: task install lint-ci
- run: just install lint-ci

pytest:
runs-on: ubuntu-latest
Expand All @@ -38,8 +36,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: arduino/setup-task@v1
with:
repo-token: ${{ github.token }}
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: task install tests
- run: just install tests
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
with:
path: ~/.cache/uv
key: publish-${{ hashFiles('pyproject.toml') }}
- uses: arduino/setup-task@v1
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: task publish
- run: just publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
24 changes: 24 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: install lint tests

install:
uv lock --upgrade
uv sync --all-extras --frozen

lint:
uv run ruff format .
uv run ruff check . --fix
uv run mypy .

lint-ci:
uv run ruff format . --check
uv run ruff check . --no-fix
uv run mypy .

tests *args:
uv run pytest {{ args }}

publish:
rm -rf dist/*
uv tool run --from build python -m build --installer uv
uv tool run twine check dist/*
uv tool run twine upload dist/* --username __token__ --password $PYPI_TOKEN
34 changes: 0 additions & 34 deletions Taskfile.yml

This file was deleted.

8 changes: 4 additions & 4 deletions docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
`that-depends` is an opensource project, and we are opened to new contributors.

## Getting started
1. Make sure that you have [poetry](https://python-poetry.org/) and [task](https://taskfile.dev/) installed.
1. Make sure that you have [poetry](https://python-poetry.org/) and [just](https://github.com/vitorbritto/just) installed.
2. Clone project:
```
[email protected]:modern-python/that-depends.git
cd that-depends
```
3. Install dependencies running `task install`
3. Install dependencies running `just install`

## Running linters
`Ruff` and `mypy` are used for static analysis.

Run all checks by command `task lint`
Run all checks by command `just lint`

## Running tests
Run all tests by command `task tests`
Run all tests by command `just tests`
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c3f27ff

Please sign in to comment.