diff --git a/.github/actions/set-versions/action.yml b/.github/actions/set-versions/action.yml index 1a84734..55d9df4 100644 --- a/.github/actions/set-versions/action.yml +++ b/.github/actions/set-versions/action.yml @@ -10,6 +10,6 @@ runs: - name: "set Julia version" shell: bash - run: echo "VERSION_JULIA=1.11.2" >> $GITHUB_ENV + run: echo "VERSION_JULIA=1.11.3" >> $GITHUB_ENV diff --git a/pyproject.toml b/pyproject.toml index 1563cc2..6d04db7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,8 @@ dependencies = [ "pydantic >= 2.7.4", "python-dotenv >= 1.0.1", # the Julia dependencies are intentionally pinned! - "juliacall == 0.9.20", - "juliapkg == 0.1.13", + "juliacall == 0.9.24", + "juliapkg == 0.1.15", ] [project.urls] diff --git a/src/iesopt/config.py b/src/iesopt/config.py index 307a65f..39edb90 100644 --- a/src/iesopt/config.py +++ b/src/iesopt/config.py @@ -12,9 +12,9 @@ def _strtobool(val: str): class Config: DEFAULTS = { - "IESOPT_JULIA": "1.11.2", - "IESOPT_CORE": "2.4.0", - "IESOPT_JUMP": "1.23.6", + "IESOPT_JULIA": "1.11.3", + "IESOPT_CORE": "2.5.0", + "IESOPT_JUMP": "1.24.0", "IESOPT_SOLVER_HIGHS": "1.13.0", "IESOPT_MULTITHREADED": "no", # yes, no "IESOPT_OPTIMIZATION": "latency", # rapid, latency, normal, performance diff --git a/src/iesopt/julia/setup.py b/src/iesopt/julia/setup.py index 93c4bb1..7860d82 100644 --- a/src/iesopt/julia/setup.py +++ b/src/iesopt/julia/setup.py @@ -1,7 +1,7 @@ import os import sys from pathlib import Path -# import ssl +import ssl from ..util import logger from .util import jl_import @@ -55,22 +55,26 @@ def setup_julia(): if (Path(__file__).parent / ".." / "juliapkg.json").exists(): (Path(__file__).parent / ".." / "juliapkg.json").unlink() - # # Check for local SSL certificate file, that can interfere with Julia setup. - # _ssl = None - # if "SSL_CERT_FILE" in os.environ: - # logger.info("Detected local `SSL_CERT_FILE`; disabling it during Julia setup") - # _ssl = os.environ.pop("SSL_CERT_FILE") + # Check for local SSL certificate file, that can interfere with Julia setup. + _ssl = None + if "SSL_CERT_FILE" in os.environ: + logger.debug("Detected local `SSL_CERT_FILE`; disabling it during Julia setup") + _ssl = os.environ.pop("SSL_CERT_FILE") - # ssl._create_default_https_context = ssl._create_unverified_context - # logger.warn("Disabling SSL verification to prevent problems; this may be unsafe") + ssl._create_default_https_context = ssl._create_unverified_context + logger.info("Disabling SSL verification to prevent problems; this may be unsafe") # Set `JULIA_SSL_CA_ROOTS_PATH` to prevent various SSL related issues (with Julia setup; LibGit2; etc.). if "JULIA_SSL_CA_ROOTS_PATH" in os.environ: - logger.warn( - "Overwriting the env. variable `JULIA_SSL_CA_ROOTS_PATH` (current: `%s`) to prevent SSL issues during the Julia setup" - % str(os.environ["JULIA_SSL_CA_ROOTS_PATH"]) - ) - os.environ["JULIA_SSL_CA_ROOTS_PATH"] = "" + if os.environ["JULIA_SSL_CA_ROOTS_PATH"] != "": + logger.info( + "Overwriting the env. variable `JULIA_SSL_CA_ROOTS_PATH` (current: `%s`) to prevent SSL issues during the Julia setup" + % str(os.environ["JULIA_SSL_CA_ROOTS_PATH"]) + ) + os.environ["JULIA_SSL_CA_ROOTS_PATH"] = "" + else: + logger.debug('Setting `JULIA_SSL_CA_ROOTS_PATH = ""` to prevent SSL issues during the Julia setup') + os.environ["JULIA_SSL_CA_ROOTS_PATH"] = "" # Setup Julia (checking if it "looks" valid). import juliapkg @@ -146,10 +150,10 @@ def setup_julia(): except Exception as e: logger.error(f"Failed to install custom package '{name}': {e}") - # # Restoring potential SSL certificate. - # if _ssl is not None: - # logger.info("Restoring local `SSL_CERT_FILE`") - # os.environ["SSL_CERT_FILE"] = _ssl + # Restoring potential SSL certificate. + if _ssl is not None: + logger.debug("Restoring local `SSL_CERT_FILE`") + os.environ["SSL_CERT_FILE"] = _ssl return juliacall diff --git a/uv.lock b/uv.lock index ebe3674..a4a9476 100644 --- a/uv.lock +++ b/uv.lock @@ -512,8 +512,8 @@ dev = [ [package.metadata] requires-dist = [ - { name = "juliacall", specifier = "==0.9.20" }, - { name = "juliapkg", specifier = "==0.1.13" }, + { name = "juliacall", specifier = "==0.9.24" }, + { name = "juliapkg", specifier = "==0.1.15" }, { name = "pandas", specifier = ">=2.0.0" }, { name = "pathlib", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.7.4" }, @@ -682,26 +682,26 @@ wheels = [ [[package]] name = "juliacall" -version = "0.9.20" +version = "0.9.24" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "juliapkg" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/91/15/3c02061dd751f46aaf1a5f97af07bd82886d710a9b9e44e5d66b4f72f2b4/juliacall-0.9.20.tar.gz", hash = "sha256:d67e399777c368858051f600c39fd8ed5d79d601a11d6336f103a9748ed69ded", size = 12686 } +sdist = { url = "https://files.pythonhosted.org/packages/cb/4b/63965b6ebc97c861b5b565bdfc5fbe942aaf6ac99b1b17427e1369fb4bec/juliacall-0.9.24.tar.gz", hash = "sha256:31bed223489b535e4e8db46bfff4596350c24f757b9c2d17296c07397f75948b", size = 470319 } wheels = [ - { url = "https://files.pythonhosted.org/packages/d3/35/77fc66c70f604b2e03249c77bd1a7d10f950c6037b5264af150d914344c3/juliacall-0.9.20-py3-none-any.whl", hash = "sha256:1debce8c332ed4973b1a5e1b456d7561735965b64e8964fdd8f9d274a24bc395", size = 12109 }, + { url = "https://files.pythonhosted.org/packages/2b/88/bc544390a0bbf1eb425540b2ba2abe0d478c31d3002a703fdb640f4abc2a/juliacall-0.9.24-py3-none-any.whl", hash = "sha256:f1d7b718228c477aeba770290647f3b2d0052f683da891b4e9f88c1e1da0a394", size = 11950 }, ] [[package]] name = "juliapkg" -version = "0.1.13" +version = "0.1.15" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "semver" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7f/c3/f52ad2434f06a368e02a298186fabe6859a3b95ca6018aee719bd0abf35f/juliapkg-0.1.13.tar.gz", hash = "sha256:4273ac66ef4b4d6832b995af2c7a80d5e8a1c22567cba1846d61bf23dd9335c3", size = 16118 } +sdist = { url = "https://files.pythonhosted.org/packages/8e/15/f3a172409d41cdf1a8c4289cfaab3fadfcce21fbe53d9730b5c7754da4b9/juliapkg-0.1.15.tar.gz", hash = "sha256:a36096fed2ddfe6fbd1af9bfd1b182136d84a660d0c4187539194229fb383720", size = 16065 } wheels = [ - { url = "https://files.pythonhosted.org/packages/66/c1/b0b7da9df3f9125c06fe85ef02ce7549c91fb4e221a9c2f282650a6908d9/juliapkg-0.1.13-py3-none-any.whl", hash = "sha256:2a629fe393bccdf024c675380c98271c42998dcd3601101bc6dc997f10595ac9", size = 16040 }, + { url = "https://files.pythonhosted.org/packages/a1/87/05a0d9acd2172516480e384bd66f269e97c61b7b5412deaceca0db3e43be/juliapkg-0.1.15-py3-none-any.whl", hash = "sha256:47b3ebb5bc200b31252e3be0e740a37925ff472919cac84f32b7bd4afa3a1a53", size = 16137 }, ] [[package]]