Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ this project adheres to `Semantic Versioning <https://semver.org/>`_.
Unreleased_
------------

0.10.0_ - 2025-02-25
-------------------

Added
^^^^^
Expand Down Expand Up @@ -394,9 +396,10 @@ Initial release of MiniZinc Python. This release contains an initial
functionality to use MiniZinc directly from Python using an interface to the
``minizinc`` command line application. The exact functionality available in this
release is best described in the `documentation
<https://minizinc-python.readthedocs.io/en/0.1.0/>`_.
<https://python.minizinc.dev/en/0.1.0/>`_.


.. _0.10.0: https://github.com/MiniZinc/minizinc-python/compare/0.9.0...0.10.0
.. _0.9.0: https://github.com/MiniZinc/minizinc-python/compare/0.8.0...0.9.0
.. _0.8.0: https://github.com/MiniZinc/minizinc-python/compare/0.7.0...0.8.0
.. _0.7.0: https://github.com/MiniZinc/minizinc-python/compare/0.6.0...0.7.0
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ keywords:
- Constraint Programming
- Optimisation
license: MPL-2.0
version: 0.9.0
date-released: '2023-04-04'
version: 0.10.0
date-released: '2025-02-25'
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p align="center">
The python package that allows you to access all of MiniZinc's functionalities directly from Python.
<br />
<a href="https://minizinc-python.readthedocs.io/en/latest/"><strong>Explore the docs »</strong></a>
<a href="https://python.minizinc.dev/en/latest/"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://github.com/MiniZinc/minizinc-python/issues">Report Bug</a>
Expand Down Expand Up @@ -61,7 +61,7 @@ python expects the `minizinc` executable to be available on the executable path,
the `$PATH` environmental variable, or in a default installation location.

_For more information, please refer to the
[Documentation](https://minizinc-python.readthedocs.io/en/latest/)_
[Documentation](https://python.minizinc.dev/en/latest/)_


### Usage
Expand Down Expand Up @@ -96,7 +96,7 @@ for i in range(len(result)):
```

_For more examples, please refer to the
[Documentation](https://minizinc-python.readthedocs.io/en/latest/)_
[Documentation](https://python.minizinc.dev/en/latest/)_

<!-- TESTING INSTRUCTIONS -->
## Testing
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "minizinc"
version = "0.9.1"
version = "0.10.0"
description = "Access MiniZinc directly from Python"
readme = "README.md"
authors = [{ name = "Jip J. Dekker", email = "[email protected]" }]
Expand Down
2 changes: 1 addition & 1 deletion src/minizinc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .solver import Solver
from .types import AnonEnum, ConstrEnum

__version__ = "0.9.1"
__version__ = "0.10.0"

logger = logging.getLogger("minizinc")

Expand Down
8 changes: 4 additions & 4 deletions src/minizinc/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _run(
str(arg) for arg in args
]
minizinc.logger.debug(
f"CLIDriver:run -> command: \"{' '.join(cmd)}\""
f'CLIDriver:run -> command: "{" ".join(cmd)}"'
)
output = subprocess.run(
cmd,
Expand All @@ -231,7 +231,7 @@ def _run(
"--allow-multiple-assignments",
] + [str(arg) for arg in args]
minizinc.logger.debug(
f"CLIDriver:run -> command: \"{' '.join(cmd)}\""
f'CLIDriver:run -> command: "{" ".join(cmd)}"'
)
output = subprocess.run(
cmd,
Expand Down Expand Up @@ -275,7 +275,7 @@ async def _create_process(
minizinc.logger.debug(
f"CLIDriver:create_process -> program: {str(self._executable)} "
f'args: "--allow-multiple-assignments '
f"{' '.join(str(arg) for arg in args)}\""
f'{" ".join(str(arg) for arg in args)}"'
)
proc = await create_subprocess_exec(
str(self._executable),
Expand All @@ -290,7 +290,7 @@ async def _create_process(
minizinc.logger.debug(
f"CLIDriver:create_process -> program: {str(self._executable)} "
f'args: "--solver {solver} --allow-multiple-assignments '
f"{' '.join(str(arg) for arg in args)}\""
f'{" ".join(str(arg) for arg in args)}"'
)
proc = await create_subprocess_exec(
str(self._executable),
Expand Down
2 changes: 1 addition & 1 deletion src/minizinc/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _add_diversity_to_div_model(

# Add new objective: maximize diversity.
div_combinator = ", ".join(
[f'{var["coef"]} * dist_{var["name"]}[sol]' for var in vars]
[f"{var['coef']} * dist_{var['name']}[sol]" for var in vars]
)
dist_total = f"{aggregator}([{combinator}([{div_combinator}]) | sol in 1..{len(prevsol)}])"
inst.add_string(f"solve maximize {dist_total};\n")
Expand Down
866 changes: 664 additions & 202 deletions uv.lock

Large diffs are not rendered by default.

Loading