diff --git a/.envrc b/.envrc index 56de242a59f9015471025eda0492854d9fa6909f..ee97dbab7bfa47b67f4ea314c6c0983bb440f217 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,2 @@ -layout python python3.9 +layout python python3.11 export PS1= diff --git a/ogscm/cli.py b/ogscm/cli.py index 942e604b1c125391cb9a81760682a3cff7e40a22..63c3cec4a006cd5604917ef7204b5da9c7772b05 100644 --- a/ogscm/cli.py +++ b/ogscm/cli.py @@ -217,6 +217,7 @@ def main(): # pragma: no cover out_dir = f"{args.out}/{args.format}" toolchain = None versions = None # versions.json + pip_requirements = None for recipe in recipe_args_parser.parse_known_args()[0].recipe: import importlib.resources as pkg_resources diff --git a/ogscm/recipes/ogs.py b/ogscm/recipes/ogs.py index 50058bb612fa53bfb354d175e7a944043e702b62..f3b44a2ba9630688c94d795d69468a886b02e7d8 100644 --- a/ogscm/recipes/ogs.py +++ b/ogscm/recipes/ogs.py @@ -189,6 +189,8 @@ if local_args.ogs not in ["off", "clean"]: # != "off" and local_args.ogs != "cl ).stdout.rstrip() with open(f"{local_args.ogs}/web/data/versions.json") as fp: versions = json.load(fp) + with open(f"{local_args.ogs}/Tests/Data/requirements.txt") as fp: + pip_requirements = fp.readlines() if "GITLAB_CI" in os.environ: if "CI_COMMIT_TAG" in os.environ: branch = "master" @@ -227,6 +229,9 @@ if local_args.ogs not in ["off", "clean"]: # != "off" and local_args.ogs != "cl f"https://gitlab.opengeosys.org/{repo}/-/raw/{commit_hash}/web/data/versions.json" ).text ) + pip_requirements = requests.get( + f"https://gitlab.opengeosys.org/{repo}/-/raw/{commit_hash}/Tests/Data/requirements.txt" + ).text else: if re.search(r"[\d.]+", branch): branch_is_release = True @@ -242,6 +247,9 @@ if local_args.ogs not in ["off", "clean"]: # != "off" and local_args.ogs != "cl f"https://gitlab.opengeosys.org/{repo}/-/raw/{branch}/web/data/versions.json" ).text ) + pip_requirements = requests.get( + f"https://gitlab.opengeosys.org/{repo}/-/raw/{branch}/Tests/Data/requirements.txt" + ).text if branch_is_release: name_start = f"ogs-{branch}" diff --git a/ogscm/recipes/ogs_jupyter.py b/ogscm/recipes/ogs_jupyter.py index 8703ac1dba00702543752c50b62964dec8f2c778..efbbd12eeab42371813ae1872e64e1b14861baac 100644 --- a/ogscm/recipes/ogs_jupyter.py +++ b/ogscm/recipes/ogs_jupyter.py @@ -41,9 +41,7 @@ conda_packages = [] for package in versions["python"]["jupyter_image"]["conda_packages"]: conda_packages.append(package) -pip_packages = [] -for package in versions["python"]["jupyter_image"]["pip_packages"]: - pip_packages.append(package) +pip_packages = pip_requirements vtk_rendering_backend = "osmesa" if local_args.pyvista_gpu: