From d8e588e1c51a655e605e7388a366009de4f50a64 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:09:25 -0500 Subject: [PATCH 01/10] default argparse option to build-type=Release --- docker/Dockerfile | 2 +- install.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 1da46f1cb..07d439b69 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ ARG make_cores=2 COPY . /cycamore WORKDIR /cycamore -RUN python install.py -j ${make_cores} --build-type=Release --allow-milps +RUN python install.py -j ${make_cores} --allow-milps FROM cycamore as deb-generation WORKDIR /cycamore/build diff --git a/install.py b/install.py index f476c575f..1809c8954 100755 --- a/install.py +++ b/install.py @@ -184,7 +184,8 @@ def main(): parser.add_argument('--cmake_prefix_path', help=cmake_prefix_path) build_type = "the CMAKE_BUILD_TYPE" - parser.add_argument('--build-type', '--build_type', help=build_type) + parser.add_argument('--build-type', '--build_type', help=build_type, + default='Release') parser.add_argument('-D', metavar='VAR', action='append', help='Set enviornment variable(s).') From e18ec4271712c8431e7631af26ce1160bcdfdc8c Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:11:11 -0500 Subject: [PATCH 02/10] update CHANGELOG --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dc8c1ca89..4f3dbc1de 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,7 @@ cycamore Change Log * Update build procedure to link against Cyclus' cython generated libraries if needed (#596) * Minor modifications for compatibility with the latest GTest library (#598) * Remove FindCyclus.cmake from this repo since it is installed with Cyclus (#597) +* Default to a Release build when installing via python script (#600) v1.5.5 ==================== From 2255b79e28668494c614e43666c2c84592947a57 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:44:16 -0500 Subject: [PATCH 03/10] udpate test classes to skip if no coin --- tests/test_regression.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_regression.py b/tests/test_regression.py index 1c35b3e86..9f7aab0fb 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -13,7 +13,7 @@ from pytest import skip import helper -from helper import check_cmd, run_cyclus, table_exist, cyclus_has_coin +from helper import run_cyclus ALLOW_MILPS = Env().allow_milps @@ -276,9 +276,8 @@ class TestDynamicCapacitated(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestDynamicCapacitated, cls).setup_class("./input/dynamic_capacitated.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') # Find agent ids of source and sink facilities cls.agent_ids = cls.to_ary(cls.agent_entry, "AgentId") @@ -380,9 +379,8 @@ class TestGrowth1(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestGrowth1, cls).setup_class("./input/growth.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): @@ -425,9 +423,8 @@ class TestGrowth2(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestGrowth2, cls).setup_class("../input/growth/deploy_and_manager_insts.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): @@ -465,9 +462,8 @@ class TestDeployInst(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestDeployInst, cls).setup_class("../input/deploy_inst.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): From a783156bdf3a3d7473cd14c59cab72d3dc1d020f Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:56:54 -0500 Subject: [PATCH 04/10] update changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4f3dbc1de..f0711eb7b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,7 @@ cycamore Change Log * Minor modifications for compatibility with the latest GTest library (#598) * Remove FindCyclus.cmake from this repo since it is installed with Cyclus (#597) * Default to a Release build when installing via python script (#600) +* Update pytests to skip appropriately when COIN is not supported (#601) v1.5.5 ==================== From 8d6a3e82ea5209c69e31857c5604161e1a79ed51 Mon Sep 17 00:00:00 2001 From: Paul Wilson Date: Mon, 29 Apr 2024 14:57:44 -0500 Subject: [PATCH 05/10] Update CHANGELOG.rst --- CHANGELOG.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f0711eb7b..0cedc4b82 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,21 @@ cycamore Change Log ================= -.. current developments +Since last release +====================== + +**Added:** + +**Changed:** + +**Fixed:** + +**Removed:** + + +v1.6.0 +==================== + **Added:** * Downstream testing in CI workflows (#573, #580, #582, #583) @@ -48,8 +62,6 @@ v1.5.4 - All cycamore archetypes have been edited to now include Cyclus::toolkit::Position. - - v1.5.3 ==================== From 7ed84f386638bb9ad24f01756ea027cff826bd52 Mon Sep 17 00:00:00 2001 From: Paul Wilson Date: Mon, 29 Apr 2024 14:58:28 -0500 Subject: [PATCH 06/10] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f17b6854..18a7a1ab5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) ENDIF() # This project name is cycamore. -PROJECT(CYCAMORE VERSION 1.5.5) +PROJECT(CYCAMORE VERSION 1.6.0) # check for and enable c++11 support (required for cyclus) INCLUDE(CheckCXXCompilerFlag) From 95a357e05c698750c8a97b0be407c0e61093415d Mon Sep 17 00:00:00 2001 From: Paul Wilson Date: Mon, 29 Apr 2024 16:40:13 -0500 Subject: [PATCH 07/10] Update INSTALL.rst --- INSTALL.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.rst b/INSTALL.rst index f4fb77ca4..2effce053 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -17,7 +17,7 @@ Cycamore's only dependency is the Cyclus Core. ==================== ================== Package Minimum Version ==================== ================== -`Cyclus` 1.5 +`Cyclus` 1.6 ==================== ================== There are a number of ways to install the Cyclus core: From 68c223ccd4a6c66415211f89f3a1d09a45eaa001 Mon Sep 17 00:00:00 2001 From: Paul Wilson Date: Mon, 29 Apr 2024 16:49:30 -0500 Subject: [PATCH 08/10] Update DEPENDENCIES.rst --- DEPENDENCIES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES.rst b/DEPENDENCIES.rst index 4143d7720..24e6ed021 100644 --- a/DEPENDENCIES.rst +++ b/DEPENDENCIES.rst @@ -20,7 +20,7 @@ Dependencies ==================== ================== Package Minimum Version ==================== ================== -`Cyclus` 1.5 +`Cyclus` 1.6 ==================== ================== From 55916c13ec41c883f090812fc3b84124d340e084 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Wed, 8 May 2024 12:37:18 -0500 Subject: [PATCH 09/10] remove dependency on agnostic python in env --- INSTALL.rst | 4 ++-- README.rst | 2 +- docker/Dockerfile | 4 ++-- install.py | 2 +- tests/README.rst | 4 ++-- tests/run_inputs.py.in | 4 ++-- tests/test_regression.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/INSTALL.rst b/INSTALL.rst index 2effce053..d5dc882e8 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -45,7 +45,7 @@ Run the install script: .. code-block:: bash - python install.py + python3 install.py If you successfully followed the instructions above, then the Cycamore library @@ -130,7 +130,7 @@ installation flag. The otherwise identical process would look like: .. code-block:: bash - .../cycamore$ python install.py --coin_root=path/to/coin + .../cycamore$ python3 install.py --coin_root=path/to/coin CMake Cycamore Installation diff --git a/README.rst b/README.rst index 3d35cf7c2..c0a303182 100644 --- a/README.rst +++ b/README.rst @@ -65,7 +65,7 @@ github is fairly straightforward: - Clone the Cyclus Repo: ``git clone https://github.com/cyclus/cycamore.git``, -- to install Cyclus locally (in ``~/.local/``) just run: ``python install.py`` +- to install Cyclus locally (in ``~/.local/``) just run: ``python3 install.py`` from cycamore folder, - finally, add the following Cyclus installation path (``~/.local/cyclus``) to diff --git a/docker/Dockerfile b/docker/Dockerfile index 07d439b69..04b52b03b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ ARG make_cores=2 COPY . /cycamore WORKDIR /cycamore -RUN python install.py -j ${make_cores} --allow-milps +RUN python3 install.py -j ${make_cores} --allow-milps FROM cycamore as deb-generation WORKDIR /cycamore/build @@ -21,4 +21,4 @@ FROM cycamore as cycamore-test RUN cycamore_unit_tests FROM cycamore-test as cycamore-pytest -RUN cd tests && python -m pytest \ No newline at end of file +RUN cd tests && python3 -m pytest \ No newline at end of file diff --git a/install.py b/install.py index 1809c8954..6763059e2 100755 --- a/install.py +++ b/install.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function, unicode_literals import os import sys diff --git a/tests/README.rst b/tests/README.rst index c63e89fab..e7b52207c 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -37,7 +37,7 @@ Next, generate the new databases: .. code-block:: bash - $ python ref.py gen + $ python3 ref.py gen Next, rename the databases: @@ -93,4 +93,4 @@ those tables. See the module's help: .. code-block:: python - $ python analysis.py -h + $ python3 analysis.py -h diff --git a/tests/run_inputs.py.in b/tests/run_inputs.py.in index 49be1fe64..e897246cd 100644 --- a/tests/run_inputs.py.in +++ b/tests/run_inputs.py.in @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import sys import subprocess @@ -42,7 +42,7 @@ def check_inputs(): def print_usage() : """This prints the proper way to treat the command line interface""" - print(""" Usage: python run_inputs.py\n + print(""" Usage: python3 run_inputs.py\n Allowed Options : \n -v arg output log verbosity. \n diff --git a/tests/test_regression.py b/tests/test_regression.py index 9f7aab0fb..9fded61ee 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import os import uuid import sqlite3 From f780ee153b7af90c868bfb7ee09515328352ba38 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Wed, 8 May 2024 12:44:03 -0500 Subject: [PATCH 10/10] update CHANGELOG --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0cedc4b82..c64cea94d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ Since last release **Changed:** +* Rely on `python3` in environment instead of `python` (#602) + **Fixed:** **Removed:**