Repository: terrapower/armi
Pull request #2053 (2025-01-13 20:12:08)

Add python exe file path to Case Information printout
## What is the change?

Adding the python executable to the `Case Information` printout

## Why is the change being made?

I think sometimes the interpreter isn't enough information about which python was used. This would prevent additional sleuthing and possibly save time. 

I didn't add to release notes because it's such a tiny update. 

---

## Checklist

<!--
    You (the pull requester) should put an `x` in the boxes below you have completed.

    (If a checkbox doesn't apply to your PR, check it anyway.)
-->

- [x] This PR has only [one purpose or idea](https://terrapower.github.io/armi/developer/tooling.html#one-idea-one-pr).
- [x] [Tests](https://terrapower.github.io/armi/developer/tooling.html#test-it) have been added/updated to verify any new/changed code.

<!-- Check the code quality -->

- [x] The code style follows [good practices](https://terrapower.github.io/armi/developer/standards_and_practices.html).
- [x] The commit message(s) follow [good practices](https://terrapower.github.io/armi/developer/tooling.html).

<!-- Check the project-level cruft -->

- [x] The [release notes](https://terrapower.github.io/armi/developer/tooling.html#add-release-notes) have been updated if necessary.
- [x] The [documentation](https://terrapower.github.io/armi/developer/tooling.html#document-it) is still up-to-date in the `doc` folder.
- [x] The dependencies are still up-to-date in `pyproject.toml`.


Patch:
diff --git a/armi/bookkeeping/db/__init__.py b/armi/bookkeeping/db/__init__.py
index 5e2b9f42..9ece8498 100644
--- a/armi/bookkeeping/db/__init__.py
+++ b/armi/bookkeeping/db/__init__.py
@@ -66,13 +66,11 @@ from armi.bookkeeping.db.compareDB3 import compareDatabases
 
 # re-export package components for easier import
 from armi.bookkeeping.db.database import Database
-from armi.bookkeeping.db.database3 import Database3
 from armi.bookkeeping.db.databaseInterface import DatabaseInterface
 from armi.bookkeeping.db.factory import databaseFactory
 
 __all__ = [
     "Database",
-    "Database3",
     "DatabaseInterface",
     "compareDatabases",
     "databaseFactory",
diff --git a/armi/bookkeeping/db/database3.py b/armi/bookkeeping/db/database3.py
deleted file mode 100644
index e28f7132..00000000
--- a/armi/bookkeeping/db/database3.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2024 TerraPower, LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""
-Temporary placeholder, to support backwards compatibility of the API.
-
-We are moving from the name "Database3" to just "Database". As this is an API breaking change, this
-file exists to streamline and ease the transition.
-"""
-# ruff: noqa: F403, F405
-from armi.bookkeeping.db.database import *
-
-
-class Database3(Database):
-    """Temporary placeholder to ease the API-breaking transition from Database3 to Database."""
-
-    pass
diff --git a/armi/bookkeeping/report/reportingUtils.py b/armi/bookkeeping/report/reportingUtils.py
index 1378efdf..01dbd691 100644
--- a/armi/bookkeeping/report/reportingUtils.py
+++ b/armi/bookkeeping/report/reportingUtils.py
@@ -52,6 +52,7 @@ Operator_NumProcessors = "Number of Processors:"
 Operator_WorkingDirectory = "Working Directory:"
 Operator_CurrentUser = "Current User:"
 Operator_PythonInterperter = "Python Interpreter:"
+Operator_PythonExecutable = "Python Executable:"
 Operator_ArmiCodebase = "ARMI Location:"
 Operator_MasterMachine = "Master Machine:"
 Operator_Date = "Date and Time:"
@@ -77,6 +78,7 @@ def writeWelcomeHeaders(o, cs):
             (Operator_ArmiCodebase, context.ROOT),
             (Operator_WorkingDirectory, os.getcwd()),
             (Operator_PythonInterperter, sys.version),
+            (Operator_PythonExecutable, sys.executable),
             (Operator_MasterMachine, getNodeName()),
             (Operator_NumProcessors, context.MPI_SIZE),
             (Operator_Date, context.START_TIME),
diff --git a/doc/release/0.5.rst b/doc/release/0.5.rst
index 0e49b8e5..16891118 100644
--- a/doc/release/0.5.rst
+++ b/doc/release/0.5.rst
@@ -14,7 +14,7 @@ New Features
 
 API Changes
 -----------
-#. TBD
+#. Removing ``Database3`` from the API, use ``Database``. (`PR#2052 <https://github.com/terrapower/armi/pull/2052>`_)
 
 Bug Fixes
 ---------


Test patch:
diff --git a/armi/bookkeeping/report/tests/test_report.py b/armi/bookkeeping/report/tests/test_report.py
index b395781d..1dc64a0f 100644
--- a/armi/bookkeeping/report/tests/test_report.py
+++ b/armi/bookkeeping/report/tests/test_report.py
@@ -261,6 +261,7 @@ class TestReport(unittest.TestCase):
             self.assertIn("Case Info", mock.getStdout())
             self.assertIn("Input File Info", mock.getStdout())
             self.assertIn("crossSectionControl-DA", mock.getStdout())
+            self.assertIn("Python Executable", mock.getStdout())
             self.assertIn(randoFile, mock.getStdout())