Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Update package index
Expand All @@ -32,7 +32,7 @@ jobs:
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.number }}
PR_NUMBER: ${{ github.ref == 'refs/heads/main' && -1 || github.event.number }}
run: |
echo "Installing ARMI..."
set -x
Expand Down
24 changes: 14 additions & 10 deletions doc/.static/automateScr.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ def main():
parser = argparse.ArgumentParser(description="An ARMI custom doc tool to build the SCR for this release.")

# Required positional argument
parser.add_argument("prNum", type=int, help="The current PR number (use -1 if there is no PR).")
parser.add_argument("pastCommit", help="The commit hash of the last release.")
parser.add_argument(
"prNum", nargs="?", type=int, default=-1, help="The current PR number (use -1 if there is no PR)."
)

# Parse the command line
args = parser.parse_args()
prNum = int(args.prNum)
pastCommit = args.pastCommit
prNum = int(args.prNum)

rstContent = buildScrListing(prNum, pastCommit)
print(rstContent)
buildScrListing(pastCommit, prNum)


def _findOneLineData(lines: list, prNum: str, key: str):
Expand Down Expand Up @@ -188,16 +189,16 @@ def isMainPR(prNum: int):
return True


def buildScrListing(thisPrNum: int, pastCommit: str):
def buildScrListing(pastCommit: str, thisPrNum: int = -1):
"""Helper method to build an RST-formatted lists of all SCRs, by category.

Parameters
----------
thisPrNum : int
The number of this PR. If this is not a PR, this is a -1.
pastCommit : str
The shortened commit hash for a past reference commit. (This is the last commit of the last
release. It will not be included.)
The shortened commit hash for a past reference commit. (This is the last commit of the last release. It will not
be included.)
thisPrNum : int
The number of this PR. If this is not a PR, the default is -1.

Returns
-------
Expand Down Expand Up @@ -254,7 +255,10 @@ def buildScrListing(thisPrNum: int, pastCommit: str):
content += line
content += "\n\n"

return content + "\n\n"
content += "\n\n"

print(content)
return content


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion doc/gallery-src/framework/run_blockVolumeFractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def plotVolFracsWithComponentTemps(b, uniformTemps):
plt.show()


uniformTempsInC = [400.0, 500.0, 600.0, 700.0, 800.0, 900.0, 1200.0]
uniformTempsInC = [300.0, 400.0, 500.0, 600.0, 700.0]
b = buildSimpleFuelBlock()

writeInitialVolumeFractions(b)
Expand Down
2 changes: 1 addition & 1 deletion doc/qa_docs/scr/latest_scr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ The following lists display all the SCRs in this release of the ARMI framework.
from automateScr import buildScrListing

thisPrNum = int(os.environ.get('PR_NUMBER', -1) or -1)
return buildScrListing(thisPrNum, "95d94a4d")
return buildScrListing("95d94a4d", thisPrNum)
Loading