Skip to content

Commit c7e83dc

Browse files
committed
Merge branch 'main' into newAxialExpLinking
2 parents e84c018 + 14392c8 commit c7e83dc

File tree

409 files changed

+3334
-8807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+3334
-8807
lines changed

.github/workflows/black.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/linting.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ jobs:
1111
runs-on: ubuntu-24.04
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: Setup Python
16-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.9'
18+
python-version: '3.13'
1919
- name: Update package index
2020
run: sudo apt-get update
2121
- name: Run Linter
2222
run: |
2323
pip install -e .[test]
24+
ruff format --check .
2425
ruff check .

.github/workflows/validatemanifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def main():
4949

5050
# If there were any missing files, raise an Error.
5151
if errors:
52-
for (i, line) in errors:
52+
for i, line in errors:
5353
print("Nonexistant file on line {}: {}".format(i, line))
5454
raise ValueError("Package-data file is incorrect: includes non-existant files.")
5555

armi/__init__.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
* Wrap up
4343
* Quit
4444
"""
45+
4546
# ruff: noqa: F401
4647
import atexit
4748
import datetime
@@ -232,8 +233,7 @@ def getApp() -> Optional[apps.App]:
232233
def _cleanupOnCancel(signum, _frame):
233234
"""Helper function to clean up upon cancellation."""
234235
print(
235-
"Caught Cancel signal ({}); cleaning temporary files and exiting..."
236-
"".format(signum),
236+
"Caught Cancel signal ({}); cleaning temporary files and exiting...".format(signum),
237237
file=sys.stderr,
238238
)
239239
context.cleanTempDirs()
@@ -289,8 +289,9 @@ def configure(app: Optional[apps.App] = None, permissive=False):
289289
return
290290
else:
291291
raise RuntimeError(
292-
"Multiple calls to armi.configure() are not allowed. "
293-
"Previous call from:\n{}".format(_ARMI_CONFIGURE_CONTEXT)
292+
"Multiple calls to armi.configure() are not allowed. Previous call from:\n{}".format(
293+
_ARMI_CONFIGURE_CONTEXT
294+
)
294295
)
295296

296297
assert not context.BLUEPRINTS_IMPORTED, (
@@ -323,11 +324,7 @@ def applyAsyncioWindowsWorkaround() -> None:
323324
"""
324325
import asyncio
325326

326-
if (
327-
sys.version_info[0] == 3
328-
and sys.version_info[1] >= 8
329-
and sys.platform.startswith("win")
330-
):
327+
if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith("win"):
331328
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
332329

333330

armi/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
There are a variety of entry points in the ``cli`` package that define the various run options.
1919
This invokes them according to command-line user input.
2020
"""
21+
2122
import sys
2223
import traceback
2324

armi/_bootstrap.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
"""Code that needs to be executed before most ARMI components are safe to import."""
16+
1617
from armi.nucDirectory import nuclideBases # noqa: E402
1718

1819
# Nuclide bases get built explicitly here to have better determinism

armi/apps.py

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
Framework for a specific application. An ``App`` implements a simple interface for
2020
customizing much of the Framework's behavior.
2121
"""
22+
2223
# ruff: noqa: E402
2324
import collections
2425
import importlib
@@ -117,9 +118,7 @@ def pluginManager(self) -> pluginManager.ArmiPluginManager:
117118
def getSettings(self) -> Dict[str, Setting]:
118119
"""Return a dictionary containing all Settings defined by the framework and all plugins."""
119120
# Start with framework settings
120-
settingDefs = {
121-
setting.name: setting for setting in fwSettings.getFrameworkSettings()
122-
}
121+
settingDefs = {setting.name: setting for setting in fwSettings.getFrameworkSettings()}
123122

124123
# The optionsCache stores options that may have come from a plugin before the setting to
125124
# which they apply. Whenever a new setting is added, we check to see if there are any
@@ -134,10 +133,7 @@ def getSettings(self) -> Dict[str, Setting]:
134133
if isinstance(pluginSetting, settings.Setting):
135134
name = pluginSetting.name
136135
if name in settingDefs:
137-
raise ValueError(
138-
f"The setting {pluginSetting.name} "
139-
"already exists and cannot be redefined."
140-
)
136+
raise ValueError(f"The setting {pluginSetting.name} already exists and cannot be redefined.")
141137
settingDefs[name] = pluginSetting
142138
# handle when new setting has modifier in the cache (modifier loaded first)
143139
if name in optionsCache:
@@ -154,17 +150,13 @@ def getSettings(self) -> Dict[str, Setting]:
154150
elif isinstance(pluginSetting, settings.Default):
155151
if pluginSetting.settingName in settingDefs:
156152
# modifier loaded after setting, so just apply it (no cache needed)
157-
settingDefs[pluginSetting.settingName].changeDefault(
158-
pluginSetting
159-
)
153+
settingDefs[pluginSetting.settingName].changeDefault(pluginSetting)
160154
else:
161155
# no setting yet, cache it and apply when it arrives
162156
defaultsCache[pluginSetting.settingName] = pluginSetting
163157
else:
164158
raise TypeError(
165-
"Invalid setting definition found: {} ({})".format(
166-
pluginSetting, type(pluginSetting)
167-
)
159+
"Invalid setting definition found: {} ({})".format(pluginSetting, type(pluginSetting))
168160
)
169161

170162
if optionsCache:
@@ -214,8 +206,9 @@ def getParamRenames(self) -> Dict[str, str]:
214206
pluginCollisions = renames.keys() & pluginRenames.keys()
215207
if pluginCollisions:
216208
raise plugins.PluginError(
217-
"The following parameter renames are already defined by another "
218-
"plugin:\n{}".format(pluginCollisions)
209+
"The following parameter renames are already defined by another plugin:\n{}".format(
210+
pluginCollisions
211+
)
219212
)
220213
renames.update(pluginRenames)
221214
self._paramRenames = renames, self._pm.counter
@@ -230,9 +223,7 @@ def registerPluginFlags(self):
230223
armi.plugins.ArmiPlugin.defineFlags
231224
"""
232225
if self._pluginFlagsRegistered:
233-
raise RuntimeError(
234-
"Plugin flags have already been registered. Cannot do it twice!"
235-
)
226+
raise RuntimeError("Plugin flags have already been registered. Cannot do it twice!")
236227

237228
for pluginFlags in self._pm.hook.defineFlags():
238229
Flags.extend(pluginFlags)
@@ -370,19 +361,15 @@ def splashText(self):
370361
| Advanced Reactor Modeling Interface |
371362
| |
372363
| version {0:10s} |
373-
| |""".format(
374-
meta.__version__
375-
)
364+
| |""".format(meta.__version__)
376365

377366
# add the name/version of the current App, if it's not the default
378367
if context.APP_NAME != "armi":
379368
from armi import getApp
380369

381370
splash += r"""
382371
|---------------------------------------------------|
383-
| {0:>17s} app version {1:10s} |""".format(
384-
context.APP_NAME, getApp().version
385-
)
372+
| {0:>17s} app version {1:10s} |""".format(context.APP_NAME, getApp().version)
386373

387374
# bottom border of the splash
388375
splash += r"""

armi/bookkeeping/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
"""The bookkeeping package handles data persistence, reporting, and some debugging."""
16+
1617
from armi import plugins
1718

1819

armi/bookkeeping/db/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
indices allows for more efficient means of extracting information based on
6060
location, without having to compose the full model.
6161
"""
62+
6263
import os
6364

6465
from armi import runLog

0 commit comments

Comments
 (0)