gecode-iris 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gecode_iris-0.1.0/LICENSE +21 -0
- gecode_iris-0.1.0/PKG-INFO +470 -0
- gecode_iris-0.1.0/README.md +455 -0
- gecode_iris-0.1.0/pyproject.toml +92 -0
- gecode_iris-0.1.0/python/CHANGELOG.md +21 -0
- gecode_iris-0.1.0/python/Cargo.lock +721 -0
- gecode_iris-0.1.0/python/Cargo.toml +32 -0
- gecode_iris-0.1.0/python/LICENSE +21 -0
- gecode_iris-0.1.0/python/README.md +455 -0
- gecode_iris-0.1.0/python/docs/reference.py +155 -0
- gecode_iris-0.1.0/python/docs/templates/frame.html.jinja2 +2 -0
- gecode_iris-0.1.0/python/docs/templates/module.html.jinja2 +37 -0
- gecode_iris-0.1.0/python/examples/access.out +7 -0
- gecode_iris-0.1.0/python/examples/access.py +11 -0
- gecode_iris-0.1.0/python/examples/arrays.out +3 -0
- gecode_iris-0.1.0/python/examples/arrays.py +13 -0
- gecode_iris-0.1.0/python/examples/build_dimacs_cnf.out +4 -0
- gecode_iris-0.1.0/python/examples/build_dimacs_cnf.py +40 -0
- gecode_iris-0.1.0/python/examples/build_jobshop.out +8 -0
- gecode_iris-0.1.0/python/examples/build_jobshop.py +80 -0
- gecode_iris-0.1.0/python/examples/build_nonogram.out +3 -0
- gecode_iris-0.1.0/python/examples/build_nonogram.py +79 -0
- gecode_iris-0.1.0/python/examples/build_sudoku.out +5 -0
- gecode_iris-0.1.0/python/examples/build_sudoku.py +47 -0
- gecode_iris-0.1.0/python/examples/build_tsplib.out +9 -0
- gecode_iris-0.1.0/python/examples/build_tsplib.py +117 -0
- gecode_iris-0.1.0/python/examples/build_tsptw.out +4 -0
- gecode_iris-0.1.0/python/examples/build_tsptw.py +48 -0
- gecode_iris-0.1.0/python/examples/cli.out +4 -0
- gecode_iris-0.1.0/python/examples/cli.sh +1 -0
- gecode_iris-0.1.0/python/examples/errors.out +7 -0
- gecode_iris-0.1.0/python/examples/errors.py +9 -0
- gecode_iris-0.1.0/python/examples/files.out +2 -0
- gecode_iris-0.1.0/python/examples/files.py +10 -0
- gecode_iris-0.1.0/python/examples/output.out +5 -0
- gecode_iris-0.1.0/python/examples/output.py +7 -0
- gecode_iris-0.1.0/python/examples/read.out +3 -0
- gecode_iris-0.1.0/python/examples/read.py +8 -0
- gecode_iris-0.1.0/python/examples/view.out +9 -0
- gecode_iris-0.1.0/python/examples/view.sh +1 -0
- gecode_iris-0.1.0/python/gecode_iris/__init__.py +15 -0
- gecode_iris-0.1.0/python/gecode_iris/_cli.py +20 -0
- gecode_iris-0.1.0/python/gecode_iris/_data.py +24 -0
- gecode_iris-0.1.0/python/gecode_iris/_error.py +89 -0
- gecode_iris-0.1.0/python/gecode_iris/_native.pyi +96 -0
- gecode_iris-0.1.0/python/gecode_iris/build/__init__.py +204 -0
- gecode_iris-0.1.0/python/gecode_iris/build/__init__.pyi +1434 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_check.py +321 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_error.py +93 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_expr.py +625 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_ops.py +171 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_pattern.py +207 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_print.py +835 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_scope.py +796 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_site.py +66 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_state.py +539 -0
- gecode_iris-0.1.0/python/gecode_iris/build/_types.py +276 -0
- gecode_iris-0.1.0/python/gecode_iris/build/gecode.py +11 -0
- gecode_iris-0.1.0/python/gecode_iris/build/gecode.pyi +8 -0
- gecode_iris-0.1.0/python/gecode_iris/py.typed +0 -0
- gecode_iris-0.1.0/python/src/cli.rs +21 -0
- gecode_iris-0.1.0/python/src/data.rs +429 -0
- gecode_iris-0.1.0/python/src/error.rs +137 -0
- gecode_iris-0.1.0/python/src/lib.rs +17 -0
- gecode_iris-0.1.0/python/src/spec.rs +229 -0
- gecode_iris-0.1.0/python/tests/conformance_driver.py +173 -0
- gecode_iris-0.1.0/python/tests/conftest.py +4 -0
- gecode_iris-0.1.0/python/tests/format_builder_driver.py +57 -0
- gecode_iris-0.1.0/python/tests/test_build_access.py +145 -0
- gecode_iris-0.1.0/python/tests/test_build_call_sites.py +624 -0
- gecode_iris-0.1.0/python/tests/test_build_checks.py +802 -0
- gecode_iris-0.1.0/python/tests/test_build_parity.py +57 -0
- gecode_iris-0.1.0/python/tests/test_build_patterns.py +73 -0
- gecode_iris-0.1.0/python/tests/test_build_printing.py +709 -0
- gecode_iris-0.1.0/python/tests/test_build_tstrings.py +36 -0
- gecode_iris-0.1.0/python/tests/test_cli.py +185 -0
- gecode_iris-0.1.0/python/tests/test_data.py +236 -0
- gecode_iris-0.1.0/python/tests/test_driver.py +75 -0
- gecode_iris-0.1.0/python/tests/test_error.py +78 -0
- gecode_iris-0.1.0/python/tests/test_examples.py +62 -0
- gecode_iris-0.1.0/python/tests/test_format_builders.py +52 -0
- gecode_iris-0.1.0/python/tests/test_package.py +143 -0
- gecode_iris-0.1.0/python/tests/test_spec.py +171 -0
- gecode_iris-0.1.0/python/tests/typecheck/build_misuse.py +42 -0
- gecode_iris-0.1.0/python/tests/typecheck/build_tstrings.py +25 -0
- gecode_iris-0.1.0/python/tests/typecheck/build_usage.py +231 -0
- gecode_iris-0.1.0/python/tests/typecheck/data_misuse.py +23 -0
- gecode_iris-0.1.0/python/tests/typecheck/data_usage.py +72 -0
- gecode_iris-0.1.0/rust/Cargo.toml +33 -0
- gecode_iris-0.1.0/rust/gecode-iris/Cargo.toml +31 -0
- gecode_iris-0.1.0/rust/gecode-iris/LICENSE +21 -0
- gecode_iris-0.1.0/rust/gecode-iris/README.md +24 -0
- gecode_iris-0.1.0/rust/gecode-iris/src/lib.rs +151 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/int_compared_with_string.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/int_compared_with_string.stderr +37 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/no_row_at_depth_one.rs +10 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/no_row_at_depth_one.stderr +11 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/optional_is_not_required.rs +11 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/optional_is_not_required.stderr +14 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/outer_scope_capture.rs +11 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/outer_scope_capture.stderr +23 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_double_brace.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_double_brace.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_ellipsis.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_ellipsis.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_missing_argument.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_missing_argument.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_not_a_name.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_not_a_name.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_unclosed.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_unclosed.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_unused_argument.rs +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/pattern_unused_argument.stderr +13 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/record_at_top_level.rs +6 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/record_at_top_level.stderr +13 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/record_used_as_field.rs +10 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/record_used_as_field.stderr +14 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_from_handle_of_other_depth.rs +8 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_from_handle_of_other_depth.stderr +28 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_with_other_depth.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_with_other_depth.stderr +28 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_with_other_type.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/set_with_other_type.stderr +16 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/store_after_eof.rs +6 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/store_after_eof.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/string_arithmetic.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/string_arithmetic.stderr +13 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/wrong_depth.rs +10 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/wrong_depth.stderr +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/wrong_value_type.rs +10 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/fail/wrong_value_type.stderr +10 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/depths.rs +23 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/escaping.rs +17 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/optional.rs +18 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/params.rs +13 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/redefined.rs +16 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/set_depths.rs +21 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build-ui/pass/value_types.rs +38 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build_corpus.rs +169 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build_jobshop.rs +208 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/build_types.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/builder_round_trip.rs +240 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/builder_round_trip_cpp.rs +340 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/builder_round_trip_java.rs +194 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/builder_round_trip_kotlin.rs +203 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/builder_round_trip_typescript.rs +239 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/cpp_build/mod.rs +176 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/cpp_views.rs +583 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/format_builders.rs +187 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/optional_is_not_required.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/optional_is_not_required.stderr +14 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/unknown_field.rs +6 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/unknown_field.stderr +11 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/wrong_value_type.rs +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/fail/wrong_value_type.stderr +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/pass/strict_lints.rs +14 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro-handles/pass/typed_access.rs +33 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro_corpus.rs +209 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro_errors.rs +9 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/macro_handles.rs +9 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/python_round_trip.rs +203 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/python_views.rs +407 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/round_trip/mod.rs +381 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/typescript_project/mod.rs +159 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/typescript_views.rs +437 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/empty.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/empty.stderr +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/include_str.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/include_str.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/literal_suffix.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/literal_suffix.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/missing_file.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/missing_file.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/name_conflict.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/name_conflict.stderr +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/number_literal.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/number_literal.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/syntax_error.rs +6 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/syntax_error.stderr +11 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/trailing_tokens.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/trailing_tokens.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/unknown_key.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/unknown_key.stderr +5 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/unknown_type.rs +3 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/ui/unknown_type.stderr +7 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/view_formats.rs +460 -0
- gecode_iris-0.1.0/rust/gecode-iris/tests/view_soundness.rs +257 -0
- gecode_iris-0.1.0/rust/iris-build/Cargo.toml +23 -0
- gecode_iris-0.1.0/rust/iris-build/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-build/README.md +69 -0
- gecode_iris-0.1.0/rust/iris-build/src/check.rs +462 -0
- gecode_iris-0.1.0/rust/iris-build/src/error.rs +173 -0
- gecode_iris-0.1.0/rust/iris-build/src/expr.rs +1018 -0
- gecode_iris-0.1.0/rust/iris-build/src/field.rs +133 -0
- gecode_iris-0.1.0/rust/iris-build/src/lib.rs +118 -0
- gecode_iris-0.1.0/rust/iris-build/src/pattern.rs +181 -0
- gecode_iris-0.1.0/rust/iris-build/src/print.rs +972 -0
- gecode_iris-0.1.0/rust/iris-build/src/scope.rs +897 -0
- gecode_iris-0.1.0/rust/iris-build/src/statement.rs +663 -0
- gecode_iris-0.1.0/rust/iris-build/src/types.rs +358 -0
- gecode_iris-0.1.0/rust/iris-build/tests/call_sites.rs +747 -0
- gecode_iris-0.1.0/rust/iris-build/tests/checks.rs +850 -0
- gecode_iris-0.1.0/rust/iris-build/tests/determinism.rs +36 -0
- gecode_iris-0.1.0/rust/iris-build/tests/printing.rs +726 -0
- gecode_iris-0.1.0/rust/iris-build/tests/reading.rs +123 -0
- gecode_iris-0.1.0/rust/iris-cli/Cargo.toml +37 -0
- gecode_iris-0.1.0/rust/iris-cli/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-cli/README.md +539 -0
- gecode_iris-0.1.0/rust/iris-cli/dist.toml +12 -0
- gecode_iris-0.1.0/rust/iris-cli/src/bin/iris.rs +5 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command/conformance.rs +61 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command/fmt.rs +193 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command/generate.rs +158 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command/list.rs +87 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command/read.rs +90 -0
- gecode_iris-0.1.0/rust/iris-cli/src/command.rs +110 -0
- gecode_iris-0.1.0/rust/iris-cli/src/lib.rs +44 -0
- gecode_iris-0.1.0/rust/iris-cli/src/protocol.rs +50 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/complete.rs +155 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/differential_generator.rs +72 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.cpp +58 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.java +62 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.kt +55 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.py +43 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.rs +48 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-builder.ts +56 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.hpp +18 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.java +18 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.kt +19 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.py +9 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.rs +14 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fixtures/jobshop-view.ts +38 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/fmt.rs +403 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/gen.rs +270 -0
- gecode_iris-0.1.0/rust/iris-cli/tests/lsp_stdio.rs +113 -0
- gecode_iris-0.1.0/rust/iris-conformance/Cargo.toml +35 -0
- gecode_iris-0.1.0/rust/iris-conformance/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-conformance/README.md +93 -0
- gecode_iris-0.1.0/rust/iris-conformance/embedded/0.1/error-codes.txt +65 -0
- gecode_iris-0.1.0/rust/iris-conformance/embedded/0.1/grammar.ebnf +214 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/canonical.rs +328 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/case.rs +431 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/compare/tests.rs +331 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/compare.rs +727 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/generate/expr.rs +256 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/generate/input.rs +413 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/generate/mod.rs +1296 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/mod.rs +702 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/mutate.rs +353 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/reduce.rs +112 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/differential/rng.rs +51 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/driver.rs +191 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/examples.rs +549 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/grammar/ebnf.rs +278 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/grammar/mod.rs +152 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/grammar/recognize.rs +998 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/grammar/source.rs +138 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/grammar/tests.rs +397 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/lib.rs +169 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/main.rs +267 -0
- gecode_iris-0.1.0/rust/iris-conformance/src/report.rs +275 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/canned-driver.py +60 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/differential-driver.py +50 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/differential.rs +207 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/embedded.rs +37 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/examples.rs +137 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/examples/02-fixture.md +74 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/malformed/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/malformed/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/malformed/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/malformed/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/malformed/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/case.toml +6 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/known/canned/alternate.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-data/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/case.toml +6 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/error.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/known/canned/alternate.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/unrelated-error/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/wrong-status/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/wrong-status/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/wrong-status/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/wrong-status/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/wrong-status/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/case.toml +6 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/known/canned/alternate.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/failing/xpass/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/case.toml +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/expected.dzn +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/known/canned/alternate.dzn +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/dzn/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/case.toml +6 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/error.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/known/canned/alternate.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/known/error-to-data/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/notation.ebnf +4 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog/canned.json +8 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog/case.toml +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog-dzn/canned.json +8 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog-dzn/case.toml +2 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog-dzn/expected.dzn +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog-dzn/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/catalog-dzn/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/dzn/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/dzn/case.toml +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/dzn/expected.dzn +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/dzn/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/dzn/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/error/canned.json +7 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/error/error.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/error/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/error/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/parse/actual.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/parse/canned.json +6 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/parse/case.toml +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/parse/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/parse/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/read/canned.json +8 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/read/expected.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/read/input.bin +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/read/params.json +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/fixtures/passing/read/spec.iris +1 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/grammar.rs +144 -0
- gecode_iris-0.1.0/rust/iris-conformance/tests/runner.rs +1012 -0
- gecode_iris-0.1.0/rust/iris-core/Cargo.toml +26 -0
- gecode_iris-0.1.0/rust/iris-core/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-core/README.md +232 -0
- gecode_iris-0.1.0/rust/iris-core/src/call_site.rs +87 -0
- gecode_iris-0.1.0/rust/iris-core/src/cancellation.rs +673 -0
- gecode_iris-0.1.0/rust/iris-core/src/dzn/float.rs +77 -0
- gecode_iris-0.1.0/rust/iris-core/src/dzn/tests.rs +175 -0
- gecode_iris-0.1.0/rust/iris-core/src/dzn.rs +279 -0
- gecode_iris-0.1.0/rust/iris-core/src/error.rs +340 -0
- gecode_iris-0.1.0/rust/iris-core/src/eval/records.rs +286 -0
- gecode_iris-0.1.0/rust/iris-core/src/eval/tests.rs +523 -0
- gecode_iris-0.1.0/rust/iris-core/src/eval.rs +808 -0
- gecode_iris-0.1.0/rust/iris-core/src/handle.rs +430 -0
- gecode_iris-0.1.0/rust/iris-core/src/input.rs +389 -0
- gecode_iris-0.1.0/rust/iris-core/src/json.rs +166 -0
- gecode_iris-0.1.0/rust/iris-core/src/lib.rs +351 -0
- gecode_iris-0.1.0/rust/iris-core/src/numeric.rs +202 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/budget_tests.rs +170 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/checks.rs +424 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/instances/tests.rs +207 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/instances.rs +281 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/params.rs +72 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/pattern.rs +537 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/performance_tests.rs +147 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/plan.rs +320 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/prepared.rs +358 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/reads.rs +511 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/repeat.rs +424 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader/sections.rs +233 -0
- gecode_iris-0.1.0/rust/iris-core/src/reader.rs +1010 -0
- gecode_iris-0.1.0/rust/iris-core/src/summary.rs +257 -0
- gecode_iris-0.1.0/rust/iris-core/src/value.rs +1131 -0
- gecode_iris-0.1.0/rust/iris-gen/Cargo.toml +20 -0
- gecode_iris-0.1.0/rust/iris-gen/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-gen/README.md +549 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp/expr.rs +813 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp/layout.rs +381 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp/names.rs +421 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp/types.rs +249 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp/view.rs +124 -0
- gecode_iris-0.1.0/rust/iris-gen/src/cpp.rs +1141 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java/expr.rs +667 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java/layout.rs +230 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java/names.rs +411 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java/types.rs +204 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java/view.rs +269 -0
- gecode_iris-0.1.0/rust/iris-gen/src/java.rs +876 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/expr.rs +788 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/imports.rs +289 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/layout.rs +184 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/names.rs +357 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/types.rs +188 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin/view.rs +255 -0
- gecode_iris-0.1.0/rust/iris-gen/src/kotlin.rs +869 -0
- gecode_iris-0.1.0/rust/iris-gen/src/lib.rs +188 -0
- gecode_iris-0.1.0/rust/iris-gen/src/lower.rs +960 -0
- gecode_iris-0.1.0/rust/iris-gen/src/program.rs +340 -0
- gecode_iris-0.1.0/rust/iris-gen/src/python/expr.rs +718 -0
- gecode_iris-0.1.0/rust/iris-gen/src/python/names.rs +376 -0
- gecode_iris-0.1.0/rust/iris-gen/src/python/types.rs +188 -0
- gecode_iris-0.1.0/rust/iris-gen/src/python/view.rs +76 -0
- gecode_iris-0.1.0/rust/iris-gen/src/python.rs +1176 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust/expr.rs +736 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust/names.rs +246 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust/shape.rs +47 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust/types.rs +243 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust/view.rs +146 -0
- gecode_iris-0.1.0/rust/iris-gen/src/rust.rs +976 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript/expr.rs +930 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript/layout.rs +261 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript/names.rs +370 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript/types.rs +252 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript/view.rs +106 -0
- gecode_iris-0.1.0/rust/iris-gen/src/typescript.rs +1243 -0
- gecode_iris-0.1.0/rust/iris-gen/src/view.rs +107 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/cpp_backend.rs +615 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/cpp_view.rs +168 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/equal_operands/mod.rs +63 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/java_backend.rs +743 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/java_view.rs +207 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/kotlin_backend.rs +821 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/kotlin_view.rs +185 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/layout_forms/mod.rs +202 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/lower.rs +121 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/python_backend.rs +645 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/python_view.rs +92 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/rust_backend.rs +563 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/rust_layout.rs +158 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/rust_view.rs +243 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/typescript_backend.rs +827 -0
- gecode_iris-0.1.0/rust/iris-gen/tests/typescript_view.rs +109 -0
- gecode_iris-0.1.0/rust/iris-lsp/Cargo.toml +28 -0
- gecode_iris-0.1.0/rust/iris-lsp/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-lsp/README.md +296 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/assist.rs +903 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/builtins.rs +130 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/diagnostic.rs +142 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/document.rs +373 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/formatting.rs +197 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/lib.rs +39 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/navigation.rs +433 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/sample.rs +543 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/sample_worker.rs +60 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/semantic_tokens.rs +188 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/server.rs +794 -0
- gecode_iris-0.1.0/rust/iris-lsp/src/structure.rs +275 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/assist.rs +514 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/diagnostics.rs +296 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/formatting.rs +415 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/navigation.rs +505 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/sample.rs +299 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/structure.rs +366 -0
- gecode_iris-0.1.0/rust/iris-lsp/tests/support/mod.rs +207 -0
- gecode_iris-0.1.0/rust/iris-macros/Cargo.toml +27 -0
- gecode_iris-0.1.0/rust/iris-macros/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-macros/README.md +72 -0
- gecode_iris-0.1.0/rust/iris-macros/src/lib.rs +561 -0
- gecode_iris-0.1.0/rust/iris-sema/Cargo.toml +19 -0
- gecode_iris-0.1.0/rust/iris-sema/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-sema/README.md +50 -0
- gecode_iris-0.1.0/rust/iris-sema/src/check.rs +388 -0
- gecode_iris-0.1.0/rust/iris-sema/src/diagnostic.rs +59 -0
- gecode_iris-0.1.0/rust/iris-sema/src/environment.rs +60 -0
- gecode_iris-0.1.0/rust/iris-sema/src/infer.rs +496 -0
- gecode_iris-0.1.0/rust/iris-sema/src/lib.rs +53 -0
- gecode_iris-0.1.0/rust/iris-sema/src/model.rs +337 -0
- gecode_iris-0.1.0/rust/iris-sema/src/output.rs +114 -0
- gecode_iris-0.1.0/rust/iris-sema/src/render.rs +70 -0
- gecode_iris-0.1.0/rust/iris-sema/src/resolve.rs +640 -0
- gecode_iris-0.1.0/rust/iris-sema/src/syntax.rs +368 -0
- gecode_iris-0.1.0/rust/iris-sema/src/targets.rs +73 -0
- gecode_iris-0.1.0/rust/iris-sema/src/work.rs +129 -0
- gecode_iris-0.1.0/rust/iris-sema/tests/errors.rs +189 -0
- gecode_iris-0.1.0/rust/iris-sema/tests/model.rs +492 -0
- gecode_iris-0.1.0/rust/iris-syntax/Cargo.toml +26 -0
- gecode_iris-0.1.0/rust/iris-syntax/LICENSE +21 -0
- gecode_iris-0.1.0/rust/iris-syntax/README.md +169 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/checks.rs +30 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/diagnostic.rs +86 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/config.rs +61 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/expressions.rs +204 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/layout.rs +294 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/mod.rs +108 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/range.rs +302 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/statements.rs +417 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/format/trivia.rs +87 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/lexer.rs +290 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/lib.rs +174 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/parser/expressions.rs +247 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/parser/mod.rs +770 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/parser/patterns.rs +246 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/parser/types.rs +139 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/parser/work.rs +60 -0
- gecode_iris-0.1.0/rust/iris-syntax/src/syntax.rs +50 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/extract-gecode.py +59 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/format/README.md +18 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/format/rules.100.txt +51 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/format/rules.40.txt +96 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/format/rules.80.txt +63 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/format/rules.iris +38 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/README.md +58 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/job-shop.iris +23 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/nonogram.iris +16 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/sat.iris +8 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/sudoku.iris +9 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/tsp.iris +34 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/fixtures/gecode/tsptw.iris +15 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/format.rs +424 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/format_range.rs +397 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/parser.rs +549 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/repository_formatting.rs +58 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/repository_losslessness.rs +57 -0
- gecode_iris-0.1.0/rust/iris-syntax/tests/support/mod.rs +69 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mikael Zayenz Lagerkvist
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gecode-iris
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Python :: 3
|
|
5
|
+
Classifier: Programming Language :: Rust
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Summary: Read text instance files with the Iris language
|
|
8
|
+
Home-Page: https://iris.gecode.dev
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
12
|
+
Project-URL: Homepage, https://iris.gecode.dev
|
|
13
|
+
Project-URL: Repository, https://github.com/Gecode/iris
|
|
14
|
+
|
|
15
|
+
# python
|
|
16
|
+
|
|
17
|
+
The Python package `gecode-iris`, imported as `gecode_iris`, binds the Rust
|
|
18
|
+
reference implementation with PyO3 and maturin. Python adds no reader
|
|
19
|
+
behavior: parsing, reading, errors, canonical JSON and dzn all come from
|
|
20
|
+
`gecode-iris-core`, so a conformance difference is a binding bug. `PLAN.md` §8.2
|
|
21
|
+
describes the package; milestone M4a builds it.
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import gecode_iris as iris
|
|
25
|
+
|
|
26
|
+
spec = iris.Spec.load("jobshop.iris")
|
|
27
|
+
data = spec.read("jobshop1.txt", params={"instance": "la01"})
|
|
28
|
+
data["n_jobs"] # int
|
|
29
|
+
data.ints("machine", 3) # list[int]
|
|
30
|
+
data.array("duration") # numpy.ndarray if numpy is installed and rectangular
|
|
31
|
+
print(data.to_json())
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
PyPI publication is planned for milestone M7. Once the package is
|
|
37
|
+
published, add it to a uv project, install it into an existing environment,
|
|
38
|
+
or run the `iris` command without installing it:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
uv add gecode-iris
|
|
42
|
+
uv pip install gecode-iris
|
|
43
|
+
uvx --from gecode-iris iris --help
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Until then, build it from a checkout, which needs the Rust toolchain. In a uv
|
|
47
|
+
project beside an Iris checkout named `iris`:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
uv add ../iris/python
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The site's [Python guide](https://iris.gecode.dev/using/python/) shows these
|
|
54
|
+
commands; its build checks that they still appear here.
|
|
55
|
+
|
|
56
|
+
## API
|
|
57
|
+
|
|
58
|
+
- `Spec.parse(text, origin="<string>")` parses a reader spec. A `str` is
|
|
59
|
+
encoded as UTF-8; `bytes` are used as given, so invalid UTF-8 raises
|
|
60
|
+
`E-SPEC-UTF8`. `Spec.load(path)` reads a file and uses the path as the
|
|
61
|
+
origin.
|
|
62
|
+
- `spec.read(source, params=None, *, origin=None)` reads one instance, and
|
|
63
|
+
`spec.catalog(...)` lists a file's instances with the same arguments.
|
|
64
|
+
`source` is either input bytes, whose origin defaults to `"<input>"`, or a
|
|
65
|
+
path as `str` or `os.PathLike`. A `str` is always a path, never input text.
|
|
66
|
+
`origin` applies only to bytes.
|
|
67
|
+
- `params` maps parameter names to string values, as the Specification
|
|
68
|
+
defines them (§9.1). Keys and values must be `str`; anything else raises
|
|
69
|
+
`TypeError`, with no conversion through `str()`. Use `{"instance": "2"}` or
|
|
70
|
+
`{"instance": "la01"}` to select an instance.
|
|
71
|
+
- `Data.to_json()` returns the canonical JSON document, ending in a newline,
|
|
72
|
+
and `Data.to_dzn()` returns the dzn text of the Specification's appendix B.
|
|
73
|
+
- `data.entries` is a tuple of `Entry` named tuples, `(name, value_type,
|
|
74
|
+
depth)`, in the order the names were defined. `value_type` is `"int"`,
|
|
75
|
+
`"float"` or `"string"`.
|
|
76
|
+
- `data["name"]` returns an entry's value, copied into Python objects: an
|
|
77
|
+
`int`, `float` or `str` at depth 0, and nested lists at greater depths. The
|
|
78
|
+
type `Value` describes these. `"name" in data` tests for an entry, and
|
|
79
|
+
`data.to_dict()` returns every entry as a `dict` in entry order. A handle
|
|
80
|
+
from `gecode_iris.build` works wherever a name does, as described below.
|
|
81
|
+
- `data.ints(name, *path)` returns the integer row that `path` selects, as
|
|
82
|
+
`list[int]`. A negative index counts from the end of its row, as in a list.
|
|
83
|
+
The selection must have depth 1 and value type `int`.
|
|
84
|
+
- `data.array(name, *path)` returns the array that `path` selects. When numpy
|
|
85
|
+
can be imported and the array is rectangular, the result is a writable
|
|
86
|
+
`numpy.ndarray` of `int64`, `float64` or `str_` elements, with one dimension
|
|
87
|
+
per level; otherwise it is the same nested lists as `data[name]`. numpy is
|
|
88
|
+
not a dependency of the package, and `array` imports it on each call. An
|
|
89
|
+
empty array has size 0 in every dimension, since an empty row does not
|
|
90
|
+
record the widths of its missing children.
|
|
91
|
+
- Access errors are built-in exceptions: `KeyError` for an unknown entry,
|
|
92
|
+
`IndexError` for an index outside its row, and `TypeError` for a path
|
|
93
|
+
through a scalar, `array` on a scalar, or `ints` on a selection that is not
|
|
94
|
+
an integer row.
|
|
95
|
+
- A language error raises `gecode_iris.Error`, with the attributes `code`,
|
|
96
|
+
`message`, `line`, `column`, `path` (the record path as a tuple) and
|
|
97
|
+
`origin`. The location is the input location when there is one, and
|
|
98
|
+
otherwise the reader spec location; any part may be `None`. `str(error)` is
|
|
99
|
+
the full diagnostic and `error.to_json()` the canonical error document.
|
|
100
|
+
`call_site` is a `CallSite(filename, line, function)` for a spec built
|
|
101
|
+
with `gecode_iris.build`, naming the code that added the failing statement,
|
|
102
|
+
and `None` otherwise. Errors pickle.
|
|
103
|
+
- Host failures raise built-in exceptions and have no error code: `OSError`
|
|
104
|
+
subclasses such as `FileNotFoundError` for file access, `ValueError` for a
|
|
105
|
+
source too large to parse, `NotImplementedError` for an unimplemented
|
|
106
|
+
feature, and `RuntimeError` otherwise.
|
|
107
|
+
|
|
108
|
+
The reader releases the GIL, and one `Spec` can be shared between threads.
|
|
109
|
+
The Rust `Spec` must stay on one thread, so the Python `Spec` keeps the spec
|
|
110
|
+
source and parses it again for each read, which takes microseconds.
|
|
111
|
+
|
|
112
|
+
## Spec builders
|
|
113
|
+
|
|
114
|
+
`gecode_iris.build`, imported as `ib` by convention, writes a reader spec
|
|
115
|
+
from Python code. It follows the [builder design brief](../docs/builders.md)
|
|
116
|
+
and the Rust `gecode_iris::build` module statement for statement:
|
|
117
|
+
`b.source()` returns the emitted text, and `b.build()` parses it into an
|
|
118
|
+
ordinary `Spec`. `examples/` holds a builder for each format of the format
|
|
119
|
+
library, such as [`examples/build_jobshop.py`](examples/build_jobshop.py),
|
|
120
|
+
which builds the job shop format and reads two of its cases.
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
import gecode_iris.build as ib
|
|
124
|
+
|
|
125
|
+
b = ib.SpecBuilder("pairs")
|
|
126
|
+
n = b.read("n", ib.at_least(0))
|
|
127
|
+
with b.repeat(n) as pair:
|
|
128
|
+
left = pair.read("left", ib.int_)
|
|
129
|
+
right = pair.read("right", ib.int_)
|
|
130
|
+
pair.check(left <= right, "a pair is ordered")
|
|
131
|
+
data = b.build().read(b"2 1 2 3 5")
|
|
132
|
+
data[right] # [2, 5], typed list[int]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- Each statement is a method of a scope, and a block is a `with` statement:
|
|
136
|
+
`repeat`, `if_`, `sections` and `instances` return a guard whose `with`
|
|
137
|
+
gives the scope of the block's body. `else_if` and `else_` follow an `if_`
|
|
138
|
+
in the same scope.
|
|
139
|
+
- Each definition returns a handle: `IntField[V]`, `FloatField[V]`,
|
|
140
|
+
`NumField[V]` or `StrField[V]`, where `V` is what `data[handle]` returns.
|
|
141
|
+
Each enclosing repeat and each dimension adds a `list[...]`, and a
|
|
142
|
+
definition that may not run, such as one inside an `if_` or an optional
|
|
143
|
+
section arm, adds `| None`. Scopes carry their depth in their class,
|
|
144
|
+
`Scope0` to `Scope3`; deeper than three repeats, `ScopeN` gives `DynField`
|
|
145
|
+
handles, whose value is `Value | None`.
|
|
146
|
+
- Handles are expressions, and Python operators build Iris expressions.
|
|
147
|
+
Iris division truncates, so `/`, `//`, `%` and `**` raise `TypeError`
|
|
148
|
+
pointing to `ib.div`, `ib.rem` and `ib.pow`. `and`, `or` and `not` cannot
|
|
149
|
+
build expressions; use `&`, `|` and `~`. Since `==` builds an expression,
|
|
150
|
+
compare handles with `is`.
|
|
151
|
+
- A line pattern is a t-string on Python 3.14 and later, `t"{n} {m}"`, and a
|
|
152
|
+
tuple of text and parts on every version, `(n, " ", m)`. A capture handle
|
|
153
|
+
appears bare; `ib.bind(handle, ty)` binds a forward or defined handle.
|
|
154
|
+
- `forward(name, ib.IntField[int])` declares a name before its definition,
|
|
155
|
+
with the handle type that its definitions must match. `set(handle, value)`
|
|
156
|
+
is `let` through a handle and keeps its type; `let(handle, value)` may
|
|
157
|
+
change the type and returns a `DynField`.
|
|
158
|
+
- A statement that breaks a builder rule raises `ib.BuildError` at once:
|
|
159
|
+
a handle used outside its scope or from another builder, a name defined
|
|
160
|
+
twice, or text that cannot be printed. `b.build()` raises that error
|
|
161
|
+
again, checks that every capture and forward handle is bound where its
|
|
162
|
+
uses can see it, and wraps a language error from parsing the emitted text
|
|
163
|
+
in a `BuildError` of kind `"spec"`. `error.call_site` names the caller's
|
|
164
|
+
line. Frames inside `gecode_iris.build` and functions decorated with
|
|
165
|
+
`@ib.track_caller` are skipped, so a helper that adds statements can
|
|
166
|
+
report its caller.
|
|
167
|
+
- `data[handle]`, `handle in data`, `data.ints(handle, ...)` and
|
|
168
|
+
`data.array(handle, ...)` read the entry the handle defined, and type
|
|
169
|
+
checkers see the type the handle promises.
|
|
170
|
+
|
|
171
|
+
Type checkers read the handle types from the stub
|
|
172
|
+
`python/gecode_iris/build/__init__.pyi`.
|
|
173
|
+
|
|
174
|
+
A text spec gets the same handles from `iris gen --lang python SPEC`, which
|
|
175
|
+
prints a module with one handle per entry, made by `ib.declared(name, handle
|
|
176
|
+
type)`:
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
machine = ib.declared("machine", ib.IntField[list[list[int]]])
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`data[jobshop.machine]` then reads and types the entry as a builder's handle
|
|
183
|
+
does. A declared handle comes from no builder, so no builder accepts it.
|
|
184
|
+
`rust/gecode-iris`'s ignored `python_views` test checks the generated views of
|
|
185
|
+
every format with ruff, ty, pyright and mypy, and reads each case through them;
|
|
186
|
+
see [gecode-iris-gen](../rust/iris-gen/README.md#views) for its command.
|
|
187
|
+
|
|
188
|
+
## The `iris` command
|
|
189
|
+
|
|
190
|
+
The package installs an `iris` console script, the same command as the Rust
|
|
191
|
+
`iris` binary: `iris check`, `read`, `list`, `fmt`, `lsp` and `conformance`
|
|
192
|
+
take the same options and produce the same output and exit statuses (2 for a
|
|
193
|
+
usage error, 1 for a spec or instance error). Installing the package into an
|
|
194
|
+
environment, or running `uvx --from gecode-iris iris`, is enough to use it
|
|
195
|
+
without a Rust toolchain.
|
|
196
|
+
|
|
197
|
+
The command line is the Rust library function `gecode_iris_cli::run`, which the
|
|
198
|
+
extension exposes as `gecode_iris._native.run_cli(argv)`. The script,
|
|
199
|
+
`gecode_iris._cli:main`, adds no command logic. It flushes Python's
|
|
200
|
+
`sys.stdout` and `sys.stderr`, restores the default `SIGINT` handler so that
|
|
201
|
+
Ctrl-C stops a long run such as `iris lsp`, and exits with the status that
|
|
202
|
+
`run_cli(sys.argv)` returns. The Rust code reads and writes the process's
|
|
203
|
+
standard streams directly, and help and usage messages take the program name
|
|
204
|
+
from `sys.argv[0]`. `tests/test_cli.py` runs the installed script and compares
|
|
205
|
+
its output with the Rust binary's recorded output.
|
|
206
|
+
|
|
207
|
+
## Layout
|
|
208
|
+
|
|
209
|
+
`python/` is a Cargo workspace of its own, with its own `Cargo.lock`. Its
|
|
210
|
+
crate, `gecode-iris-python`, depends on `rust/gecode-iris` and
|
|
211
|
+
`rust/iris-cli` by path and builds the extension module
|
|
212
|
+
`gecode_iris._native`. The Python sources are in
|
|
213
|
+
`python/python/gecode_iris`, in maturin's mixed layout, and the tests in
|
|
214
|
+
`python/tests`.
|
|
215
|
+
|
|
216
|
+
It does not join the `rust/` workspace because:
|
|
217
|
+
|
|
218
|
+
- The `cargo build`, `clippy` and `test --workspace` commands and the Rust
|
|
219
|
+
CI would then build the PyO3 crate on every platform, and cargo-dist would
|
|
220
|
+
plan it as a release package.
|
|
221
|
+
- A member outside `rust/` would need an unusual pointer back to that
|
|
222
|
+
workspace.
|
|
223
|
+
- The wheel builds compile only `python/`, inside manylinux and musllinux
|
|
224
|
+
containers.
|
|
225
|
+
|
|
226
|
+
`Cargo.lock` started as a copy of `rust/Cargo.lock`, so the crates both
|
|
227
|
+
workspaces use have the same versions. `pyproject.toml` sets `locked = true`
|
|
228
|
+
for maturin, so every build uses the lockfile as committed. When a crate in
|
|
229
|
+
`rust/` gains or updates a dependency, the Python build fails until someone
|
|
230
|
+
refreshes the lockfile from the repository root:
|
|
231
|
+
|
|
232
|
+
```sh
|
|
233
|
+
cargo update --manifest-path python/Cargo.toml --workspace
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
That command keeps the versions already in the lockfile, but it picks the
|
|
237
|
+
newest version of a crate that `python/Cargo.lock` does not list yet. Pin any
|
|
238
|
+
such crate that `rust/Cargo.lock` also lists to that version, for example
|
|
239
|
+
`cargo update --manifest-path python/Cargo.toml -p toml --precise
|
|
240
|
+
1.1.8+spec-1.1.0`.
|
|
241
|
+
|
|
242
|
+
## Minimum Python version
|
|
243
|
+
|
|
244
|
+
The package uses the stable ABI (abi3) and supports Python 3.10 and later.
|
|
245
|
+
The floor appears in two places: the `abi3-py310` feature of `pyo3` in
|
|
246
|
+
`Cargo.toml` decides the ABI, and `requires-python` in `pyproject.toml`
|
|
247
|
+
reaches the wheel metadata, since maturin does not derive it.
|
|
248
|
+
`tests/test_package.py` fails when they differ. To raise the floor, change
|
|
249
|
+
both.
|
|
250
|
+
|
|
251
|
+
## Build and test
|
|
252
|
+
|
|
253
|
+
The tools are uv for environments, interpreters, dependencies and running
|
|
254
|
+
tools; maturin 1.16.0, through `uvx`, for the extension; ruff for linting and
|
|
255
|
+
formatting; ty for type checking; and pyright and mypy for the stub checks.
|
|
256
|
+
The `lint` dependency group in `pyproject.toml` pins the exact versions of
|
|
257
|
+
ruff, ty, pyright and mypy, and CI installs the same group. The `docs` group
|
|
258
|
+
pins pdoc for the [API reference](#api-reference). ruff and ty are
|
|
259
|
+
configured in `pyproject.toml`. The Rust crate needs the stable toolchain that `rust/`
|
|
260
|
+
uses.
|
|
261
|
+
|
|
262
|
+
Set up a development environment in `python/`:
|
|
263
|
+
|
|
264
|
+
```sh
|
|
265
|
+
uv venv --python 3.15
|
|
266
|
+
uvx maturin@1.16.0 develop --uv
|
|
267
|
+
uv pip install --group test --group lint --group docs
|
|
268
|
+
uv run --no-sync pytest
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
`maturin develop` builds the extension into `python/gecode_iris/` and
|
|
272
|
+
installs the package into `.venv` in editable mode, so Python changes apply
|
|
273
|
+
at once. Run it again after a Rust change, and add `--release` before a
|
|
274
|
+
conformance run. `--no-sync` keeps `uv run` from creating a `uv.lock` and
|
|
275
|
+
reinstalling the package over the development build.
|
|
276
|
+
|
|
277
|
+
Lint, format and type-check in `python/`, after the setup above, since ty
|
|
278
|
+
resolves `pytest` and `pdoc` from `.venv`:
|
|
279
|
+
|
|
280
|
+
```sh
|
|
281
|
+
uv run --no-sync ruff format --check
|
|
282
|
+
uv run --no-sync ruff check
|
|
283
|
+
uv run --no-sync ty check
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
The package ships `py.typed` and the stub `python/gecode_iris/_native.pyi`
|
|
287
|
+
for the compiled module, so type checkers see `Spec` and `Data` with their
|
|
288
|
+
full signatures. `tests/test_package.py` fails when the stub and the module
|
|
289
|
+
declare different names. The stub names numpy's array type for
|
|
290
|
+
`Data.array`; numpy is optional, so `[tool.ty.analysis]` lets ty pass
|
|
291
|
+
without it, and treats that type as unknown. ty skips
|
|
292
|
+
`tests/typecheck/data_misuse.py`, whose errors are intended.
|
|
293
|
+
|
|
294
|
+
Run the test suite without numpy and with it. `--with` adds numpy for one
|
|
295
|
+
run without installing it into `.venv`; the tests that need numpy are
|
|
296
|
+
skipped in the first run:
|
|
297
|
+
|
|
298
|
+
```sh
|
|
299
|
+
uv run --no-sync pytest
|
|
300
|
+
uv run --no-sync --with numpy pytest
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
pyright and mypy check the stubs through two files in `tests/typecheck/`.
|
|
304
|
+
Both checkers must accept `data_usage.py`, which uses the documented API,
|
|
305
|
+
and report an error on each line of `data_misuse.py` that ends in an
|
|
306
|
+
`# error:` comment. numpy makes the `Data.array` types precise; without it,
|
|
307
|
+
pyright's strict mode reports them as unknown:
|
|
308
|
+
|
|
309
|
+
```sh
|
|
310
|
+
uv run --no-sync --with numpy mypy tests/typecheck/data_usage.py
|
|
311
|
+
uv run --no-sync --with numpy pyright tests/typecheck/data_usage.py
|
|
312
|
+
uv run --no-sync --with numpy mypy tests/typecheck/data_misuse.py
|
|
313
|
+
uv run --no-sync --with numpy pyright tests/typecheck/data_misuse.py
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
The last two commands exit with status 1. Each reports errors on every
|
|
317
|
+
marked line and on no other line.
|
|
318
|
+
|
|
319
|
+
The builder's handle types have the same pair of files, `build_usage.py`,
|
|
320
|
+
whose `assert_type` calls pin the type of each value type, depth and
|
|
321
|
+
presence, and `build_misuse.py`. `build_tstrings.py` uses t-strings, so the
|
|
322
|
+
checkers read it as Python 3.14:
|
|
323
|
+
|
|
324
|
+
```sh
|
|
325
|
+
uv run --no-sync --with numpy mypy tests/typecheck/build_usage.py
|
|
326
|
+
uv run --no-sync --with numpy pyright tests/typecheck/build_usage.py
|
|
327
|
+
uv run --no-sync --with numpy mypy tests/typecheck/build_misuse.py
|
|
328
|
+
uv run --no-sync --with numpy pyright tests/typecheck/build_misuse.py
|
|
329
|
+
uv run --no-sync --with numpy mypy --python-version 3.14 tests/typecheck/build_tstrings.py
|
|
330
|
+
uv run --no-sync --with numpy pyright --pythonversion 3.14 tests/typecheck/build_tstrings.py
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
ty skips the misuse files and the t-string files; check the t-string files
|
|
334
|
+
with `uv run --no-sync ty check --python-version 3.14
|
|
335
|
+
tests/test_build_tstrings.py tests/typecheck/build_tstrings.py`.
|
|
336
|
+
|
|
337
|
+
Check the Rust crate from the repository root:
|
|
338
|
+
|
|
339
|
+
```sh
|
|
340
|
+
cargo fmt --manifest-path python/Cargo.toml --all -- --check
|
|
341
|
+
cargo clippy --manifest-path python/Cargo.toml --all-targets --locked -- -D warnings
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
The crate has no Rust tests; pytest and the conformance suite cover it.
|
|
345
|
+
|
|
346
|
+
To test the abi3 wheel on the oldest supported Python, build it and install
|
|
347
|
+
it into a fresh environment in `python/`. uv downloads a managed Python 3.10
|
|
348
|
+
when none is installed:
|
|
349
|
+
|
|
350
|
+
```sh
|
|
351
|
+
uvx maturin@1.16.0 build --release --out target/wheels
|
|
352
|
+
uv venv --python 3.10 "$TMPDIR/iris-py3.10"
|
|
353
|
+
uv pip install --python "$TMPDIR/iris-py3.10/bin/python" target/wheels/*.whl --group test
|
|
354
|
+
"$TMPDIR/iris-py3.10/bin/python" -m pytest
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
`tests/test_cli.py` then runs the `iris` script that the wheel installed into
|
|
358
|
+
that environment.
|
|
359
|
+
|
|
360
|
+
## Guide examples
|
|
361
|
+
|
|
362
|
+
`examples/` holds the examples of the site's
|
|
363
|
+
[Python guide](https://iris.gecode.dev/using/python/), each with its recorded
|
|
364
|
+
standard output in a `.out` file. `tests/test_examples.py` runs every `.py`
|
|
365
|
+
example with the installed package, and every `.sh` example, which is one
|
|
366
|
+
`iris` command line, with the installed console script. Both run from the
|
|
367
|
+
repository root, since the examples read files under `formats/`, and the test
|
|
368
|
+
compares their output with the recording. An example whose first line is
|
|
369
|
+
`# Needs numpy.` runs only when numpy can be imported, so run pytest with and
|
|
370
|
+
without numpy as above.
|
|
371
|
+
|
|
372
|
+
The site renders each file with its recorded output, and its build fails when
|
|
373
|
+
a file in `examples/` does not appear in the guide or a `.sh` recording
|
|
374
|
+
differs from the Rust CLI. After changing an example, run it from the
|
|
375
|
+
repository root and update its `.out` file.
|
|
376
|
+
|
|
377
|
+
The `build_*.py` examples are the format builders, one per directory in
|
|
378
|
+
`formats/`. `tests/test_format_builders.py` (part of pytest) runs the installed
|
|
379
|
+
`iris conformance` on each format directory with
|
|
380
|
+
`tests/format_builder_driver.py`, a conformance driver that answers with the
|
|
381
|
+
spec the format's builder builds in place of the case's own. The runner judges
|
|
382
|
+
every case as it judges any driver, so the builder must give each case's
|
|
383
|
+
expected data or error with its parameters and operation, as the Rust test
|
|
384
|
+
`rust/gecode-iris/tests/format_builders.rs` requires of the Rust builders.
|
|
385
|
+
Run it alone with `uv run --no-sync pytest tests/test_format_builders.py`.
|
|
386
|
+
|
|
387
|
+
## API reference
|
|
388
|
+
|
|
389
|
+
The site hosts an API reference at
|
|
390
|
+
[`/using/python/api/`](https://iris.gecode.dev/using/python/api/), generated
|
|
391
|
+
from the stubs and docstrings by pdoc, which the `docs` group pins. pdoc was
|
|
392
|
+
chosen over mkdocstrings because it is a library without a site generator:
|
|
393
|
+
`docs/reference.py` renders the package into an HTML fragment with the
|
|
394
|
+
templates in `docs/templates/`, and the Astro site places the fragment in a
|
|
395
|
+
Starlight page with its own outline and Tailwind styles. mkdocstrings runs
|
|
396
|
+
inside MkDocs, a second site with its own theme, navigation and build.
|
|
397
|
+
|
|
398
|
+
pdoc imports the package and reads a `.pyi` stub only for the module it
|
|
399
|
+
documents. `Spec` and `Data` come from `_native` but are documented in the
|
|
400
|
+
package, so `reference.py` applies `_native.pyi` to them itself. It also names
|
|
401
|
+
the `Value` and `NDArray` aliases in signatures instead of expanding them, and
|
|
402
|
+
reads `Entry` and `Error` from the modules that define them, since the
|
|
403
|
+
package sets their `__module__` to `gecode_iris`. The output does not depend
|
|
404
|
+
on whether numpy is installed.
|
|
405
|
+
|
|
406
|
+
`npm run build` in `site/` runs `site/scripts/prepare-python-api.mjs`, which
|
|
407
|
+
builds a wheel with `uvx maturin@1.16.0 build`, installs it with the `docs`
|
|
408
|
+
group into a temporary Python 3.15 environment, and runs `reference.py`. The
|
|
409
|
+
output, `site/src/generated/python-api.json`, is an ignored build output. To
|
|
410
|
+
render it from the development environment, run
|
|
411
|
+
`uv run --no-sync python docs/reference.py OUTPUT.json` in `python/`.
|
|
412
|
+
|
|
413
|
+
## Conformance
|
|
414
|
+
|
|
415
|
+
`tests/conformance_driver.py` is the conformance driver. It speaks the
|
|
416
|
+
[driver protocol](../conformance/README.md#four-driver-commands) through the
|
|
417
|
+
public API only. Run the suite from the repository root, with `PY` set to the
|
|
418
|
+
interpreter of an environment where the package is installed. `-I` keeps the
|
|
419
|
+
source tree off `sys.path`, so the installed package is what runs:
|
|
420
|
+
|
|
421
|
+
```sh
|
|
422
|
+
PY="$PWD/python/.venv/bin/python"
|
|
423
|
+
(cd rust && cargo run --locked -p gecode-iris-conformance -- run --driver "\"$PY\" -I \"$PWD/../python/tests/conformance_driver.py\"" ../conformance/cases/0.1)
|
|
424
|
+
(cd rust && cargo run --locked -p gecode-iris-conformance -- run --driver "\"$PY\" -I \"$PWD/../python/tests/conformance_driver.py\"" ../formats)
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Every case passes with no `--driver-id` and no exemptions.
|
|
428
|
+
|
|
429
|
+
## Source distribution
|
|
430
|
+
|
|
431
|
+
The crates in `rust/` that the package depends on are outside `python/`, and
|
|
432
|
+
`maturin sdist` copies them into the source distribution. A crate must
|
|
433
|
+
therefore not read files outside its own directory at build time;
|
|
434
|
+
`gecode-iris-conformance` embeds copies of the two Specification files it needs for
|
|
435
|
+
this reason (see [its README](../rust/iris-conformance/README.md)). To check
|
|
436
|
+
that the source distribution builds, build a wheel from it outside the
|
|
437
|
+
checkout, in `python/`:
|
|
438
|
+
|
|
439
|
+
```sh
|
|
440
|
+
uvx maturin@1.16.0 sdist --out dist
|
|
441
|
+
uv build --wheel --out-dir "$TMPDIR/iris-sdist" dist/*.tar.gz
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
## Continuous integration
|
|
445
|
+
|
|
446
|
+
[`.github/workflows/python.yml`](../.github/workflows/python.yml) runs on
|
|
447
|
+
changes to `python/`, `rust/`, `conformance/`, `formats/` and the workflow
|
|
448
|
+
itself. It publishes nothing. For a `python-vVERSION` tag,
|
|
449
|
+
[`python-release.yml`](../.github/workflows/python-release.yml) runs it and uploads
|
|
450
|
+
what it built; see [RELEASING.md](../RELEASING.md#python).
|
|
451
|
+
|
|
452
|
+
- `lint` installs the `test`, `lint` and `docs` groups and runs the
|
|
453
|
+
formatter, linter and type checks above, the pyright and mypy stub checks,
|
|
454
|
+
and `cargo fmt` and `clippy` for the crate. For `data_misuse.py` it
|
|
455
|
+
compares the lines each checker reports with the lines marked `# error:`.
|
|
456
|
+
- `wheel` builds one abi3 wheel per platform with `PyO3/maturin-action` and
|
|
457
|
+
maturin 1.16.0, using
|
|
458
|
+
the committed `Cargo.lock`: manylinux and musllinux for x86_64 and aarch64,
|
|
459
|
+
macOS for arm64 and x86_64, and Windows for x86_64.
|
|
460
|
+
- `sdist` builds the source distribution, then builds a wheel from it outside
|
|
461
|
+
the checkout and imports it.
|
|
462
|
+
- `test` installs each wheel into a new uv environment, on Python 3.10 and
|
|
463
|
+
3.15, and runs pytest without and with numpy, and the `iris` script. The
|
|
464
|
+
musllinux wheels run in an Alpine container. On Linux x86_64, macOS arm64
|
|
465
|
+
and Windows, Python 3.15 also runs the conformance suite through the
|
|
466
|
+
installed `iris conformance`, against `conformance/cases/0.1` and `formats`.
|
|
467
|
+
|
|
468
|
+
The [site workflow](../.github/workflows/site.yml) also runs on changes to
|
|
469
|
+
`python/`, since its build renders the API reference from the package.
|
|
470
|
+
|