Skip to content

Commit

Permalink
Now Using pycommons 0.8.44
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Sep 20, 2024
1 parent 17a9af3 commit 11c73f2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
1 change: 0 additions & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Now trying to install pycommons."
"$pythonInterpreter" -m pip install --no-input --timeout 360 --retries 100 -v "$currentDir"
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Successfully installed pycommons."


echo "$(date +'%0Y-%0m-%0d %0R:%0S'): We have finished the build process."
2 changes: 1 addition & 1 deletion moptipy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from typing import Final

#: the version string of `moptipy`
__version__: Final[str] = "0.9.114"
__version__: Final[str] = "0.9.115"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
#

# pycommons provides lots of utilities
pycommons[dev] >= 0.8.43
pycommons[dev] >= 0.8.44
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ psutil == 6.0.0

# pycommons offers many of the tools and utilities used in moptipy that are
# not related to optimization.
pycommons == 0.8.43
pycommons == 0.8.44

# scikit-learn is used to obtain some clusters of JSSP instances for our
# experiments.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install_requires =
matplotlib >= 3.9.2
pdfo >= 2.2.0
psutil >= 6.0.0
pycommons >= 0.8.43
pycommons >= 0.8.44
scikit-learn >= 1.5.2
scipy >= 1.14.1
packages = find:
Expand Down
15 changes: 10 additions & 5 deletions tests/api/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def solve(self, process: Process) -> None:
fes = z.get_consumed_fes()
assert fes > 0
assert (fnew == 0) or (fes == 100)
assert (fnew >= 0) and (fes <= 100)
assert fnew >= 0
assert fes <= 100
assert z.has_best()
z.get_copy_of_best_x(x1)
assert process.has_best()
Expand Down Expand Up @@ -106,7 +107,8 @@ def solve(self, process: Process) -> None:
fes2 = z.get_consumed_fes()
assert fes2 > 0
assert (fnew2 == 0) or (fes2 == 100)
assert (fnew2 >= 0) and (fes2 <= 100)
assert fnew2 >= 0
assert fes2 <= 100
assert fnew2 <= fnew
assert fes2 + get_remaining_fes(z) == 100

Expand All @@ -131,7 +133,8 @@ def test_from_start_for_fes_with_drift() -> None:
assert p.has_best()
assert p.get_best_f() >= 0
assert (p.get_best_f() == 0) or (p.get_consumed_fes() == 200)
assert (p.get_best_f() >= 0) and (p.get_consumed_fes() <= 200)
assert p.get_best_f() >= 0
assert p.get_consumed_fes() <= 200


class MyAlgorithm2(Algorithm2):
Expand Down Expand Up @@ -185,9 +188,11 @@ def test_without_should_terminate() -> None:
assert p.has_best()
assert p.get_best_f() >= 0
assert (p.get_best_f() == 0) or (p.get_consumed_fes() == 100)
assert (p.get_best_f() >= 0) and (p.get_consumed_fes() <= 100)
assert p.get_best_f() >= 0
assert p.get_consumed_fes() <= 100
assert (p.get_best_f() == 0) or (get_remaining_fes(p) == 0)
assert (p.get_best_f() >= 0) and (get_remaining_fes(p) >= 0)
assert p.get_best_f() >= 0
assert get_remaining_fes(p) >= 0


class _OneMaxRegAlgo(Algorithm0):
Expand Down

0 comments on commit 11c73f2

Please sign in to comment.