Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinating docs with new logging #394

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import logging
import pathlib
import re
import warnings
Expand Down Expand Up @@ -173,6 +174,9 @@ def setup(app):
# The full version, including alpha/beta/rc tags.
release = armi.__version__

# from here on out, we use the std library default logging
logging.setLoggerClass(logging.Logger)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
Expand Down
12 changes: 10 additions & 2 deletions doc/gallery-src/analysis/run_hexBlockToRZConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@
the design in real geometry while still performing appropriate approximations for
efficient analysis.

.. warning::
.. warning::
This uses :py:mod:`armi.reactor.converters.blockConverters`, which
currently only works on a constrained set of hex-based geometries. For your systems,
consider these an example and starting point and build your own converters as
appropriate.

"""
import logging

from armi.reactor.tests import test_reactors
from armi.reactor.flags import Flags
from armi.reactor.converters import blockConverters
from armi import configure
from armi import configure, runLog

# init ARMI logging tools
logging.setLoggerClass(runLog.RunLogger)

# configure ARMI
configure(permissive=True)

_o, r = test_reactors.loadTestReactor()
Expand All @@ -45,3 +50,6 @@
)
converter.convert()
converter.plotConvertedBlock()

# revert back to std library logging
logging.setLoggerClass(logging.Logger)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def collectExtraFiles():
"pytest-html",
"pylint",
"docutils",
"sphinx>=2.2",
"sphinx==2.2",
"sphinx-rtd-theme",
"black",
# for running jupyter dynamically in docs
Expand Down