Skip to content

Commit

Permalink
Model parsing from JSON (#32)
Browse files Browse the repository at this point in the history
* Add parsers directory

* Initial parser code

* Compact syntax and supporting Model constructor

* Format code

* Update crate structure and imports

* Add Conjure Error and edit crate structure (broken)

* Possible import fix (@niklasdewally)

Co-authored-by: Niklas Dewally <niklas@dewally.com>

* Clearly separate packages and workspace

* Add default run target

* Merge refactoring of project structure

* Resolve import conflicts

* Update Error code to use thiserror

* Parse JSON in main

* Assert manual and parsed models are equal

* Format model output strings

* Update output formatting

* Fix format fails

* Use thiserror to create From<> impl

* Update gitignore

* Update error and clean parsing code

* Parse variable domains

* Add integration test foundation

* Cargo format

* Parser syntax tweaks

* Complete integration tests

* Attempt CI fix

* Silence test failures (for now)

* Cargo format

* Fix i32/i64 discrepancy

* Fix build dependency versions

---------

Co-authored-by: Niklas Dewally <niklas@dewally.com>
  • Loading branch information
lixitrixi and niklasdewally authored Nov 21, 2023
1 parent ec21ebd commit 23322aa
Show file tree
Hide file tree
Showing 19 changed files with 856 additions and 32 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/oxide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ jobs:

- working-directory: ./conjure_oxide
run: rustup update stable && rustup default stable

- working-directory: ./conjure_oxide
run: |
wget https://github.com/conjure-cp/conjure/releases/download/v2.5.1/conjure-v2.5.1-linux-with-solvers.zip
unzip conjure-v2.5.1-linux-with-solvers.zip
echo "$(pwd)/conjure-v2.5.1-linux-with-solvers" >> ${GITHUB_PATH}
- working-directory: ./conjure_oxide
run: cargo test
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"rust": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
}
Loading

0 comments on commit 23322aa

Please sign in to comment.