Skip to content

Commit

Permalink
chore: Add justfile for common recipes.
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Jan 24, 2024
1 parent 0e4052c commit d9dc6fb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

PYTHONPATH=planning/unified/plugin:${PYTHONPATH}
UP_ARIES_DEV=true # enable automatic recompilation of the server

# Use the python modules of the unified planning library and test cases directly from the git submodules of this repository
PYTHONPATH=planning/unified/deps/unified-planning/up_test_cases:${PYTHONPATH}
PYTHONPATH=planning/unified/deps/unified-planning:${PYTHONPATH}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ examples/sat/instances/*.cnf
__pycache__/
*.profraw
lcov.info
.env
21 changes: 21 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

set dotenv-load := true


ci: ci-up-solve ci-up-val

# Run planning tests for UP integration
ci-up-solve:
python3 planning/unified/deps/unified-planning/up_test_cases/report.py aries

# Run validation tests for UP integration
ci-up-val:
python3 planning/unified/deps/unified-planning/up_test_cases/report.py aries-val

# Solve a UP test case
up-solve problem:
python3 planning/unified/scripts/cli.py {{problem}}

# Export a UP test case to a protobuf binary file (/tmp/problem.upp)
up-export problem:
python3 planning/unified/scripts/cli.py {{problem}} -m dump
1 change: 1 addition & 0 deletions planning/unified/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

elif args.mode == "dump":
print(f"Dumping problem to {args.outfile}")
print(test_case.problem)

writer = ProtobufWriter()
msg = writer.convert(test_case.problem)
Expand Down

0 comments on commit d9dc6fb

Please sign in to comment.