Compare commits
6 commits
f41f8e28e5
...
1a5d552cfc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a5d552cfc | ||
|
|
9e92e0fe71 | ||
|
|
1cc6924fa6 | ||
|
|
88b22f52e9 | ||
|
|
dc9b31a5a2 | ||
|
|
86ef698219 |
2 changed files with 21 additions and 24 deletions
13
README.md
13
README.md
|
|
@ -3,12 +3,14 @@
|
||||||
This is a little TUI based on [Textual] for entering new Teilchen and for
|
This is a little TUI based on [Textual] for entering new Teilchen and for
|
||||||
searching for existing Teilchen. Data is kept in a sqlite database.
|
searching for existing Teilchen. Data is kept in a sqlite database.
|
||||||
|
|
||||||
It is not yet usable.
|
It is not yet usable. It has tests.
|
||||||
|
|
||||||
## Running tests
|
## Running tests
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
uv run pytest tests.py
|
uv run pytest tests.py
|
||||||
|
# or if you have just
|
||||||
|
just test
|
||||||
```
|
```
|
||||||
|
|
||||||
## Observing the app's console
|
## Observing the app's console
|
||||||
|
|
@ -25,15 +27,18 @@ Since we use uv, the incantation is a bit different from the [official documenat
|
||||||
|
|
||||||
In one terminal:
|
In one terminal:
|
||||||
|
|
||||||
```shell
|
```sh
|
||||||
uv run textual console
|
uv run textual console
|
||||||
|
# or if you have just
|
||||||
|
just console
|
||||||
```
|
```
|
||||||
|
|
||||||
And in the other:
|
And in the other:
|
||||||
|
|
||||||
```shell
|
```sh
|
||||||
# run,textual,run! ;)
|
|
||||||
uv run textual run --dev src/teilchensammler_cli/__init__.py
|
uv run textual run --dev src/teilchensammler_cli/__init__.py
|
||||||
|
# or if you have just
|
||||||
|
just run-console
|
||||||
```
|
```
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
|
||||||
32
justfile
32
justfile
|
|
@ -1,3 +1,6 @@
|
||||||
|
the_app := "teilchensammler_cli.main"
|
||||||
|
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
@ -15,17 +18,15 @@ build:
|
||||||
console:
|
console:
|
||||||
uv run textual console
|
uv run textual console
|
||||||
|
|
||||||
the_app := "teilchensammler_cli.main"
|
|
||||||
|
|
||||||
# run app with logs going to console
|
# run app with logs going to console
|
||||||
run-dev:
|
run-console:
|
||||||
uv run textual run --dev {{ the_app }}
|
uv run textual run --dev {{ the_app }}
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
run:
|
run:
|
||||||
uv run python -m {{ the_app }}
|
uv run python -m {{ the_app }}
|
||||||
|
|
||||||
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
|
||||||
# export dependencies into requirements files
|
# export dependencies into requirements files
|
||||||
exports-deps:
|
exports-deps:
|
||||||
uv export {{ uv_export_options }} --output-file requirements.txt
|
uv export {{ uv_export_options }} --output-file requirements.txt
|
||||||
|
|
@ -36,7 +37,7 @@ update-deps:
|
||||||
uv lock --upgrade
|
uv lock --upgrade
|
||||||
uv sync
|
uv sync
|
||||||
|
|
||||||
# Run tests, args are passed-through to pytest
|
# Run tests, ARGS are passed-through to pytest
|
||||||
test *ARGS:
|
test *ARGS:
|
||||||
uv run pytest tests.py {{ ARGS }}
|
uv run pytest tests.py {{ ARGS }}
|
||||||
|
|
||||||
|
|
@ -44,30 +45,21 @@ test *ARGS:
|
||||||
coverage:
|
coverage:
|
||||||
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
||||||
|
|
||||||
# lint python code
|
|
||||||
lint-python:
|
|
||||||
uv run ruff check .
|
|
||||||
|
|
||||||
# lint markdown documents
|
|
||||||
lint-markdown:
|
|
||||||
markdownlint-cli2 .
|
|
||||||
|
|
||||||
# run python and markdown
|
# run python and markdown
|
||||||
lint: lint-python lint-markdown
|
lint:
|
||||||
|
uv run ruff check .
|
||||||
|
markdownlint-cli2 .
|
||||||
|
|
||||||
# remove artefacts from dist/
|
# remove artefacts from dist/
|
||||||
clean:
|
clean:
|
||||||
rm dist/*.whl dist/*.tar.gz
|
rm dist/*.whl dist/*.tar.gz
|
||||||
|
# consider xargs, or something that won't explode on many files
|
||||||
|
|
||||||
# pretend we are CI
|
# pretend we are CI
|
||||||
ci: lint
|
ci: lint
|
||||||
prek run --all-files
|
prek run --all-files
|
||||||
# woodpecker-cli exec "whatever"
|
# woodpecker-cli exec "whatever"
|
||||||
|
|
||||||
# create a new realese [CURRENTLY USELESS]
|
[private]
|
||||||
release:
|
bump segment:
|
||||||
@echo remember to git tag and update pyproject.toml
|
uv version --bump {{ segment }}
|
||||||
uv build
|
|
||||||
# upload to package registry
|
|
||||||
# send newsletter
|
|
||||||
# take over the world
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue