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 1/5] 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 2effce0537..d5dc882e89 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 3d35cf7c26..c0a3031824 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 07d439b697..04b52b03b6 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 1809c89541..6763059e2a 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 c63e89fab4..e7b52207cf 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 49be1fe64c..e897246cda 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 9f7aab0fb4..9fded61ee6 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 2/5] update CHANGELOG --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0cedc4b82b..c64cea94d7 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:** From 0be715c0c10315624e73f16a8ace29b5bf850ef5 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Thu, 16 May 2024 20:19:55 -0500 Subject: [PATCH 3/5] remove reference to Manifest --- src/storage.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/storage.cc b/src/storage.cc index 2763263880..b02d49589d 100644 --- a/src/storage.cc +++ b/src/storage.cc @@ -318,7 +318,6 @@ void Storage::ProcessMat_(double cap) { using cyclus::Material; using cyclus::ResCast; using cyclus::toolkit::ResBuf; - using cyclus::toolkit::Manifest; if (!ready.empty()) { try { From cfbaba14153856678242ca220e0e1154e7a564c2 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Thu, 16 May 2024 21:51:44 -0500 Subject: [PATCH 4/5] Update CHANGELOG.rst --- CHANGELOG.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c64cea94d7..989d8e73f0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,12 +9,14 @@ Since last release **Changed:** -* Rely on `python3` in environment instead of `python` (#602) +* Rely on ``python3`` in environment instead of ``python`` (#602) **Fixed:** **Removed:** +* Removed references to deprecated ``ResourceBuff`` class (#604) + v1.6.0 ==================== From 72ccbaba0bd401d66f3f6dcc744f91758619ce04 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Fri, 17 May 2024 12:12:20 -0500 Subject: [PATCH 5/5] clean up using cyclus:: statements --- src/storage.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/storage.cc b/src/storage.cc index b02d49589d..96487b44c6 100644 --- a/src/storage.cc +++ b/src/storage.cc @@ -41,8 +41,7 @@ void Storage::InitFrom(Storage* m) { void Storage::InitFrom(cyclus::QueryableBackend* b) { #pragma cyclus impl initfromdb cycamore::Storage - using cyclus::toolkit::Commodity; - Commodity commod = Commodity(out_commods.front()); + cyclus::toolkit::Commodity commod = cyclus::toolkit::Commodity(out_commods.front()); cyclus::toolkit::CommodityProducer::Add(commod); cyclus::toolkit::CommodityProducer::SetCapacity(commod, throughput); } @@ -241,7 +240,6 @@ void Storage::Tick() { //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Storage::Tock() { - using cyclus::toolkit::RecordTimeSeries; LOG(cyclus::LEV_INFO3, "ComCnv") << prototype() << " is tocking {"; BeginProcessing_(); // place unprocessed inventory into processing @@ -315,10 +313,6 @@ void Storage::BeginProcessing_() { //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Storage::ProcessMat_(double cap) { - using cyclus::Material; - using cyclus::ResCast; - using cyclus::toolkit::ResBuf; - if (!ready.empty()) { try { double max_pop = std::min(cap, ready.quantity()); @@ -350,7 +344,6 @@ void Storage::ProcessMat_(double cap) { //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Storage::ReadyMatl_(int time) { - using cyclus::toolkit::ResBuf; LOG(cyclus::LEV_INFO5, "ComCnv") << "Placing material into ready"; int to_ready = 0;