Skip to content

Commit

Permalink
ready to minor and remove rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
igormcoelho committed May 26, 2024
1 parent 6bfb34e commit d3938b0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Development repo for draft versions of Python bindings for OptFrame Functional C

Install: `python -m pip install optframe`

Version: `pyoptframe v5.0.28rc0`
Version: `pyoptframe v5.0.28`

Play on Jupyter Notebook: [BRKGA Traveling Salesman Problem Example](demo/OptFrame_BRKGA_Official.ipynb)

Expand Down
2 changes: 1 addition & 1 deletion bumpver.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpver]
current_version = "5.0.28rc0"
current_version = "5.0.28"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Igor Machado Coelho'

# The full version, including alpha/beta/rc tags
release = 'v5.0.28rc0'
release = 'v5.0.28'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion optframe/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '5.0.28rc0'
__version__ = '5.0.28'
# only useful stuff for root level here!
from optframe.engine import Engine
from optframe.engine import APILevel
Expand Down
20 changes: 20 additions & 0 deletions optframe/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,26 @@ def __init__(self, _engine: XEngine, _ev: IdGeneralEvaluator, _nsseq: IdNSSeq):
def get_id(self) -> IdLocalSearch:
return self.ls_idx

class FirstImprovement(LocalSearch):
def __init__(self, _engine: XEngine, _ev: IdGeneralEvaluator, _nsseq: IdNSSeq):
assert isinstance(_engine, XEngine)
if (isinstance(_ev, int)):
_ev = IdGeneralEvaluator(_ev)
if (not isinstance(_ev, IdGeneralEvaluator)):
print(_ev)
assert (False)
if (isinstance(_nsseq, int)):
_nsseq = IdNSSeq(_nsseq)
if (not isinstance(_nsseq, IdNSSeq)):
print(_nsseq)
assert (False)
self.engine = _engine
str_code = "OptFrame:ComponentBuilder:LocalSearch:FI"
str_args = "OptFrame:GeneralEvaluator "+str(_ev.id)+" OptFrame:NS:NSFind:NSSeq "+str(_nsseq.id)
self.ls_idx = self.engine.build_local_search(str_code, str_args)
def get_id(self) -> IdLocalSearch:
return self.ls_idx

class VariableNeighborhoodDescent(LocalSearch):
def __init__(self, _engine: XEngine, _ev: IdGeneralEvaluator, _lslist: IdListLocalSearch):
assert isinstance(_engine, XEngine)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "optframe"
version = "5.0.28rc0"
version = "5.0.28"
description = "Python bindings for OptFrame Functional Core"
readme = "README.md"
authors = [{ name = "Igor Machado Coelho", email = "[email protected]" }]
Expand All @@ -27,4 +27,4 @@ requires-python = ">=3.9"
dev = ["black", "bumpver", "isort", "pip-tools", "pytest"]

[project.urls]
Homepage = "https://github.com/optframe/pyoptframe-dev"
Homepage = "https://github.com/optframe/pyoptframe"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CTypesExtension(Extension):
class MyBuildExt(build_ext_orig):
def run(self):
subprocess.check_call(
['git', 'clone', '--depth', '1', '--branch', '5.0.18', 'https://github.com/optframe/optframe', 'optframe-git'])
['git', 'clone', '--depth', '1', '--branch', '5.1.0', 'https://github.com/optframe/optframe', 'optframe-git'])
build_ext_orig.run(self)

def build_extension(self, ext):
Expand Down Expand Up @@ -49,7 +49,7 @@ def get_ext_filename(self, ext_name):

setup(
name="optframe",
version="5.0.28rc0",
version="5.0.28",
py_modules=["optframe.components","optframe.core","optframe.engine","optframe.heuristics","optframe.protocols"],
ext_modules=[
CTypesExtension(
Expand Down

0 comments on commit d3938b0

Please sign in to comment.