2022-06-25 14:29:09 +02:00
|
|
|
#!/usr/bin/env just --justfile
|
|
|
|
|
|
|
|
default: show_receipts
|
|
|
|
|
|
|
|
set shell := ["bash", "-uc"]
|
2024-02-01 13:59:45 +01:00
|
|
|
set dotenv-load
|
2022-06-25 14:29:09 +02:00
|
|
|
|
|
|
|
show_receipts:
|
|
|
|
@just --list
|
|
|
|
|
|
|
|
show_system_info:
|
2022-06-26 15:10:36 +02:00
|
|
|
@echo "=================================="
|
2022-06-25 14:29:09 +02:00
|
|
|
@echo "os : {{os()}}"
|
|
|
|
@echo "arch: {{arch()}}"
|
2024-02-01 13:59:45 +01:00
|
|
|
@echo "justfile dir: {{justfile_directory()}}"
|
|
|
|
@echo "invocation dir: {{invocation_directory()}}"
|
|
|
|
@echo "running dir: `pwd -P`"
|
2022-06-26 15:10:36 +02:00
|
|
|
@echo "=================================="
|
2022-06-25 14:29:09 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
setup:
|
|
|
|
@asdf install
|
|
|
|
@lefthook install
|
2022-06-25 14:29:09 +02:00
|
|
|
|
|
|
|
create_venv:
|
|
|
|
@echo "creating venv"
|
|
|
|
@python3 -m pip install --upgrade pip setuptools wheel
|
|
|
|
@python3 -m venv venv
|
|
|
|
|
2022-08-15 14:44:31 +02:00
|
|
|
install_deps:
|
2023-02-18 12:23:50 +01:00
|
|
|
@echo "installing dependencies"
|
2024-02-01 13:59:45 +01:00
|
|
|
@python3 -m hatch dep show requirements --project-only > /tmp/requirements.txt
|
|
|
|
@pip3 install -r /tmp/requirements.txt
|
2023-02-18 12:23:50 +01:00
|
|
|
|
|
|
|
install_deps_dev:
|
2024-02-01 13:59:45 +01:00
|
|
|
@echo "installing dev dependencies"
|
|
|
|
@python3 -m hatch dep show requirements --project-only > /tmp/requirements.txt
|
|
|
|
@python3 -m hatch dep show requirements --env-only >> /tmp/requirements.txt
|
|
|
|
@pip3 install -r /tmp/requirements.txt
|
2022-08-15 14:44:31 +02:00
|
|
|
|
2023-07-02 16:40:09 +02:00
|
|
|
create_reqs:
|
|
|
|
@echo "creating requirements"
|
2024-02-01 13:59:45 +01:00
|
|
|
@pipreqs --force --savepath requirements.txt src/mangadlp/
|
2023-07-02 16:40:09 +02:00
|
|
|
|
2022-06-26 15:10:36 +02:00
|
|
|
test_shfmt:
|
2023-02-18 12:23:50 +01:00
|
|
|
@find . -type f \( -name "**.sh" -and -not -path "./.**" -and -not -path "./venv**" \) -exec shfmt -d -i 4 -bn -ci -sr "{}" \+;
|
2022-06-26 15:10:36 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
format_shfmt:
|
|
|
|
@find . -type f \( -name "**.sh" -and -not -path "./.**" -and -not -path "./venv**" \) -exec shfmt -w -i 4 -bn -ci -sr "{}" \+;
|
2022-06-25 14:29:09 +02:00
|
|
|
|
2022-06-26 19:00:47 +02:00
|
|
|
lint:
|
|
|
|
just show_system_info
|
|
|
|
just test_shfmt
|
2024-02-01 13:59:45 +01:00
|
|
|
@hatch run lint:style
|
|
|
|
@hatch run lint:typing
|
2022-06-26 19:00:47 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
format:
|
2022-06-26 15:10:36 +02:00
|
|
|
just show_system_info
|
2024-02-01 13:59:45 +01:00
|
|
|
just format_shfmt
|
|
|
|
@hatch run lint:fmt
|
2022-06-26 15:10:36 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
check:
|
|
|
|
just format
|
|
|
|
just lint
|
|
|
|
|
|
|
|
test:
|
|
|
|
@hatch run default:test
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
@hatch run default:cov
|
|
|
|
|
|
|
|
build:
|
|
|
|
@hatch build --clean
|
|
|
|
|
|
|
|
run loglevel *flags:
|
|
|
|
@hatch run mangadlp --loglevel {{loglevel}} {{flags}}
|