-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
109 lines (71 loc) · 3 KB
/
justfile
File metadata and controls
109 lines (71 loc) · 3 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
105
106
107
108
109
# https://github.com/casey/just
set dotenv-load := true
uv := "PYTHONPATH=. uv"
################################################################################
## Recipes
################################################################################
default:
@just --list
################################################################################
### Imports
import-all: import-food import-ecoinvent import-method create-activities sync-datapackages
import-food:
{{uv}} run python import_food.py
import-ecoinvent:
{{uv}} run python import_ecoinvent.py
import-method:
{{uv}} run python import_method.py
create-activities:
{{uv}} run python create_activities.py
sync-datapackages:
{{uv}} run python common/sync_datapackages.py
################################################################################
### Exports
export-all:
{{uv}} run python ./bin/export.py processes
{{uv}} run python ./bin/export.py metadata
export-food:
{{uv}} run python ./bin/export.py processes --scopes food --merge
{{uv}} run python ./bin/export.py metadata --scopes food
export-generic:
{{uv}} run python ./bin/export.py processes --scopes object --merge
{{uv}} run python ./bin/export.py metadata --scopes generic
export-textile:
{{uv}} run python ./bin/export.py processes --scopes textile --merge
{{uv}} run python ./bin/export.py metadata --scopes textile
export-veli:
{{uv}} run python ./bin/export.py processes --scopes veli --merge
export-transports:
{{ uv }} run python -m common.distances.transports
################################################################################
### Cleaning
delete-database db:
{{uv}} run python -m common.delete_database {{db}}
delete-methods:
{{uv}} run python -m common.delete_methods
################################################################################
### Linting & formatting
check-activities:
{{uv}} run check-jsonschema --schemafile schemas/lci-schema.json tests/fixtures/lci_catalog/*/* lci_catalog/*/*
check-processes *target:
{{uv}} run check-jsonschema --schemafile tests/processes-schema.json public/data/processes*.json tests/fixtures/processes_impacts_output.json tests/snapshots/processes_impacts.json
check-json +target=".":
{{uv}} run python ./bin/json_formatter.py {{target}}
fix-json +target=".":
{{uv}} run python ./bin/json_formatter.py --fix {{target}}
check-python +target=".":
{{uv}} run ruff check --force-exclude --extend-select I {{target}}
{{uv}} run ruff format --force-exclude --check {{target}}
fix-python +target=".":
{{uv}} run ruff check --force-exclude --extend-select I --fix {{target}}
{{uv}} run ruff format --force-exclude {{target}}
check-all: check-activities check-processes check-json check-python
fix-all: fix-json fix-python
################################################################################
### Testing
test:
{{uv}} run pytest
################################################################################
### Jupyter lab
jupyter:
{{uv}} run --group jupyter jupyter lab