-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
104 lines (76 loc) · 3.09 KB
/
Justfile
File metadata and controls
104 lines (76 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# =============================================================================
# ⭐ DEFAULT
# =============================================================================
# If you run `just` you should get the options available, not a full install of the package
default:
@just --list
# =============================================================================
# 🔍 CODE QUALITY & TESTING
# =============================================================================
# These commands check your code quality and run tests
# Run code quality tools
check:
echo "🚀 Checking lock file consistency with 'pyproject.toml'"
uv lock --locked
echo "🚀 Linting, formatting, and type checking code"
prek run -a
# Check for obsolete dependencies
check-deps:
echo "🚀 Checking for obsolete dependencies: Running deptry"
uv run deptry .
# Test the code with pytest
test:
echo "🚀 Testing code: Running pytest"
uv run python -m pytest --doctest-modules
# =============================================================================
# 📚 DOCUMENTATION
# =============================================================================
# These commands help you build and serve project documentation
# Test if documentation can be built without warnings or errors
docs-test:
uv run mkdocs build -s
# Build and serve the documentation
docs:
uv run mkdocs serve
# =============================================================================
# 📦 BUILD & RELEASE
# =============================================================================
# These commands build your package and publish it to PyPI
# Clean build artifacts
clean-build:
echo "🚀 Removing build artifacts"
uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
# Build wheel file
build: clean-build
echo "🚀 Creating wheel file"
uvx --from build pyproject-build --installer uv
# Publish a release to PyPI
publish:
echo "🚀 Publishing."
uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
# Build and publish
build-and-publish: build publish
# =============================================================================
# 🏗️ DEVELOPMENT ENVIRONMENT SETUP
# =============================================================================
# These commands help you set up your development environment
# Install uv, python packages, r packages, prek, and pre-commit hooks
install:
@echo "🚀 Setting up development environment\n"
@.devcontainer/install-python-deps.sh .
@.devcontainer/install-prek.sh
@.devcontainer/install-prek-deps.sh
@echo "✨ Development environment ready!\n"
# Clean generated files and caches
clean:
rm -rf .pytest_cache .ruff_cache site dist build tmp
rateacuity:
uv run python -m tariff_fetch.rateacuity.state
openei:
uv run python -m tariff_fetch.openei.utility_rates "Consolidated Edison Co-NY Inc"
arcadia:
uv run python -m tariff_fetch.genability.tariffs 2252
cli:
uv run python -m tariff_fetch.cli
cligas:
uv run python -m tariff_fetch.cli_gas