1+ rust-version :
2+ @echo " Rust command-line utility versions:"
3+ rustc --version # rust compiler
4+ cargo --version # rust package manager
5+ rustfmt --version # rust code formatter
6+ rustup --version # rust toolchain manager
7+ clippy-driver --version # rust linter
8+
9+ format :
10+ cargo fmt --quiet
11+
112install :
13+ # Install if needed
14+ # @echo "Updating rust toolchain"
15+ # rustup update stable
16+ # rustup default stable
17+
18+ lint :
19+ cargo clippy --quiet
20+
21+ test :
22+ cargo test --quiet
23+
24+ run :
25+ cargo run
26+
27+ release :
28+ cargo build --release
29+
30+ all : format lint test run
31+
32+ python_install :
233 pip install --upgrade pip && \
334 pip install -r requirements.txt
435
5- test :
36+ python_test :
637 python -m pytest -vv --cov=main --cov=mylib test_* .py
738
8- format :
39+ python_format :
940 black * .py
1041
11- lint :
12- # disable comment to test speed
13- # pylint --disable=R,C --ignore-patterns=test_.*?py *.py mylib/*.py
14- # ruff linting is 10-100X faster than pylint
42+ python_lint :
1543 ruff check * .py mylib/* .py
1644
17- container -lint :
45+ python_container -lint :
1846 docker run --rm -i hadolint/hadolint < Dockerfile
1947
20- refactor : format lint
48+ python_refactor : format lint
2149
22- deploy :
50+ python_deploy :
2351 # deploy goes here
2452
25- all : install lint test format deploy
53+ python_all : install lint test format deploy
2654
2755generate_and_push :
28- # Create the markdown file
29- python test_main.py # Replace with the actual command to generate the markdown
30-
3156 # Add, commit, and push the generated files to GitHub
3257 @if [ -n " $$ (git status --porcelain)" ]; then \
3358 git config --local user.email " action@github.com" ; \
3459 git config --local user.name " GitHub Action" ; \
3560 git add . ; \
36- git commit -m "Add SQL log"; \
61+ git commit -m " Add metric log" ; \
3762 git push; \
3863 else \
3964 echo " No changes to commit. Skipping commit and push." ; \
40- fi
41-
42- extract :
43- python main.py extract
44-
45- transform_load :
46- python main.py transform_load
47-
48- query :
49- python main.py run_query " SELECT * FROM baskin_icecream WHERE Flavour='Green Tea';"
65+ fi
0 commit comments