-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be983a6
commit 6ff0ead
Showing
29 changed files
with
129 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "world" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"statistics": { | ||
"message": "Hello, world" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package mip | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/nextmv-io/sdk/golden" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
code := m.Run() | ||
os.Exit(code) | ||
} | ||
|
||
func TestGolden(t *testing.T) { | ||
golden.FileTests( | ||
t, | ||
"inputs", | ||
golden.Config{ | ||
Args: []string{}, | ||
TransientFields: []golden.TransientField{}, | ||
Thresholds: golden.Tresholds{ | ||
Float: 0.01, | ||
}, | ||
ExecutionConfig: &golden.ExecutionConfig{ | ||
Command: "go", | ||
Args: []string{"run", "."}, | ||
InputFlag: "-runner.input.path", | ||
OutputFlag: "-runner.output.path", | ||
WorkDir: "../../../go-hello-world", | ||
}, | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cat input.json | go run . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"options":{},"solution":{},"statistics":{"message":"Hello, world"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mvn package |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cat input.json | java -jar main.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"options":{},"solution":{},"statistics":{"message":"Hello, world"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -provider cbc | ||
-duration 30 -provider highs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
echo '{"name":"world"}' | python3 main.py | ||
cat input.json | python3 main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -penalty 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -penalty 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Requirement already satisfied: ortools==9.8.3296 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from -r requirements.txt (line 1)) (9.8.3296) | ||
Requirement already satisfied: nextmv==VERSION.dev0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from -r requirements.txt (line 2)) (0.10.3.dev0) | ||
Requirement already satisfied: absl-py>=2.0.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from ortools==9.8.3296->-r requirements.txt (line 1)) (2.1.0) | ||
Requirement already satisfied: numpy>=1.13.3 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from ortools==9.8.3296->-r requirements.txt (line 1)) (1.26.4) | ||
Requirement already satisfied: pandas>=2.0.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from ortools==9.8.3296->-r requirements.txt (line 1)) (2.2.2) | ||
Requirement already satisfied: protobuf>=4.25.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from ortools==9.8.3296->-r requirements.txt (line 1)) (4.25.3) | ||
Requirement already satisfied: pydantic>=2.5.2 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from nextmv==VERSION.dev0->-r requirements.txt (line 2)) (2.6.1) | ||
Requirement already satisfied: pyyaml>=6.0.1 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from nextmv==VERSION.dev0->-r requirements.txt (line 2)) (6.0.2) | ||
Requirement already satisfied: requests>=2.31.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from nextmv==VERSION.dev0->-r requirements.txt (line 2)) (2.31.0) | ||
Requirement already satisfied: urllib3>=2.1.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from nextmv==VERSION.dev0->-r requirements.txt (line 2)) (2.2.2) | ||
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pandas>=2.0.0->ortools==9.8.3296->-r requirements.txt (line 1)) (2.8.2) | ||
Requirement already satisfied: pytz>=2020.1 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pandas>=2.0.0->ortools==9.8.3296->-r requirements.txt (line 1)) (2024.1) | ||
Requirement already satisfied: tzdata>=2022.7 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pandas>=2.0.0->ortools==9.8.3296->-r requirements.txt (line 1)) (2024.1) | ||
Requirement already satisfied: annotated-types>=0.4.0 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pydantic>=2.5.2->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (0.6.0) | ||
Requirement already satisfied: pydantic-core==2.16.2 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pydantic>=2.5.2->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (2.16.2) | ||
Requirement already satisfied: typing-extensions>=4.6.1 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from pydantic>=2.5.2->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (4.9.0) | ||
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from requests>=2.31.0->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (3.3.2) | ||
Requirement already satisfied: idna<4,>=2.5 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from requests>=2.31.0->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (3.6) | ||
Requirement already satisfied: certifi>=2017.4.17 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from requests>=2.31.0->nextmv==VERSION.dev0->-r requirements.txt (line 2)) (2024.2.2) | ||
Requirement already satisfied: six>=1.5 in /Users/sebastian-quintero/github/community-apps/venv/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas>=2.0.0->ortools==9.8.3296->-r requirements.txt (line 1)) (1.16.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
python3 main.py -duration 30 | ||
python3 main.py -input input -output output -duration 30 -provider SCIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
.nextmv/readme/python-ortools-knapsack-multicsv/2.sh.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"options": { | ||
"input": "", | ||
"output": "", | ||
"duration": 30, | ||
"provider": "SCIP" | ||
}, | ||
"statistics": { | ||
"run": { | ||
"duration": 0.123 | ||
}, | ||
"result": { | ||
"duration": 0.123, | ||
"value": 444.0, | ||
"custom": { | ||
"status": "optimal", | ||
"variables": 11, | ||
"constraints": 1 | ||
} | ||
}, | ||
"schema": "v1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input inputs/input.json -output output.json -duration 30 | ||
python3 main.py -input inputs/input.json -output output.json \ | ||
-duration 30 -provider SCIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -provider SCIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -provider SCIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -provider cbc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -provider cbc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
python3 main.py -input input.json -output output.json \ | ||
-duration 30 -exploration_level 4 -threads 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
cat input.json | docker run -i --rm \ | ||
-v $(pwd):/app ghcr.io/nextmv-io/runtime/python:3.11 \ | ||
sh -c 'pip install -r requirements.txt > /dev/null && python3 /app/main.py' | ||
-v $(pwd):/app ghcr.io/nextmv-io/runtime/pyomo:latest \ | ||
sh -c 'python3 /app/main.py' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters