-
Notifications
You must be signed in to change notification settings - Fork 6
Adds python multi-file with excel example #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
An example application demonstrating how to use the Nextmv multi-file format with Excel I/O to solve a multi-knapsack problem using OR-Tools.
- Adds a self-contained Python example app with Excel input/output and Nextmv multi-file loading.
- Implements a decision model that reads “items” and “knapsacks” from separate sheets, solves the MIP, and writes assignments to Excel/CSV.
- Includes configuration (app.yaml), installation/workflow scripts, README, and licensing.
Reviewed Changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
python-ortools-multiknapsack-multiexcel/requirements.txt | Pins nextmv and ortools dependencies |
python-ortools-multiknapsack-multiexcel/outputs/.keep | Placeholder to ensure outputs/ directory exists |
python-ortools-multiknapsack-multiexcel/main.py | Core solver example using multi-file Excel I/O |
python-ortools-multiknapsack-multiexcel/app.yaml | Nextmv Cloud runtime manifest |
python-ortools-multiknapsack-multiexcel/README.md | Usage instructions and links |
python-ortools-multiknapsack-multiexcel/LICENSE | Apache 2.0 license text |
.nextmv/readme/workflow-configuration.yml | Adds CI workflow entry for the new example app |
.nextmv/readme/python-ortools-multiknapsack-multiexcel/1.sh.golden | Golden output for the example run |
.nextmv/readme/python-ortools-multiknapsack-multiexcel/1.sh | Example run command |
.nextmv/readme/python-ortools-multiknapsack-multiexcel/0.sh | Install dependencies script |
Comments suppressed due to low confidence (3)
python-ortools-multiknapsack-multiexcel/main.py:29
- [nitpick] The variable name
input
shadows the built-ininput()
function; consider renaming toinput_data
or similar to avoid confusion.
input = nextmv.load(
python-ortools-multiknapsack-multiexcel/README.md:13
- [nitpick] The second step is also numbered
1.
; updating it to2.
would improve clarity of the instructions.
1. Run the app.
python-ortools-multiknapsack-multiexcel/README.md:3
- [nitpick] It would be helpful to include a note or sample template for
input.xlsx
describing required sheet names (items
,knapsacks
) and column format so users know how to prepare their Excel file.
Example for running a Python application on the Nextmv Platform using the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nits, and the nextmv version can be set now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: call this multi-file
as opposed to multiexcel
to better reflect the actual file type handled by Nextmv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought the same, but we used multicsv
in the repo before, so, I wanted to stay consistent. 🤷
We could think about aligning this in general though, i.e., switch multicsv to multi-file
too and align the app names. Though, the mention of Excel makes it a little easier to see whether it's a relevant example, I think.
All in all, I don't have a strong opinion here, but would punt it for now if ok.
Tests failing is curious as it passes everywhere else. I'll have to look into this later. 😊 |
Description
Adds an example app that uses the new
multi-file
format with Excel files as the I/O.Changes
python-ortools-multiknapsack-multiexcel
showcasing use ofmulti-file
format with Excel (.xlsx) files.java-gurobi-multiknapsack-multiexcel
.java-gurobi-multiknapsack-multiexcel
.nextmv
andnextpipe
Python dependencies to their latest version.Resolves ENG-6240