Skip to content

Reducing the verbosity of the tutorial#444

Open
ConnorWelch-OSU wants to merge 21 commits intocyclus:sourcefrom
ConnorWelch-OSU:removing-verbosity
Open

Reducing the verbosity of the tutorial#444
ConnorWelch-OSU wants to merge 21 commits intocyclus:sourcefrom
ConnorWelch-OSU:removing-verbosity

Conversation

@ConnorWelch-OSU
Copy link
Contributor

Summary of Changes

This PR address the verbosity of the tutorial identified in #442. To reduce verbosity, repeated examples of XML blocks were removed, leaving only a template for each section of an input file. Additionally, minor changes to the text around where XML blocks were removed has been edited to fit the new context that it exists in.

Design Notes

I did not remove the XML blocks that users can use to check that their input files are correct that are at the end of some pages. There is a discussion to be had on whether these are something that we want to keep or not.

Check the box if your change does not break any of the following:

  • API for Cyclus modules
  • Input files
  • Output tables for post processing tools

Related CEPs and Issues

Fixes #442

Associated Developers

Testing and Validation

  • I have read the Contributing to Cyclus guide
  • I have compiled and run the code locally
  • I have added or updated relevant tests
  • I have added documentation for new or changed features
  • This code follows the style guide
  • I have updated the changelog

Reviewers, please refer to the Cyclus Guide for Reviewers.

Copy link
Member

@abachma2 abachma2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @ConnorWelch-OSU. I think this PR accomplishes the goal of removing some verbosity from the tutorial.

In the add_arche, add_commod_recipe and sim_parm files, it looks like you took out the completed blocks for users to compare against, but kept those in add_proto and add_reg_inst. Any reason for that inconsistency? I think having the completed blocks in the tutorial before the final input file has value.

Comment on lines 105 to 107
**Note**: There are two blank lines between the end of the control section and
end of the simulation section. This section of the simulation block will hold
the rest of the simulation parameter blocks (commodities, facilities, regions,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this if we don't have the completed control block anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking in leaving it was that the template that appears earlier in the page does contain the two blank lines. It might make more sense to have it further up the page in the section that describes the different parts of the template. I can make that change if its what we want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add in those sections. I think they are valuable and make things more consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I have added them in.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the added completed control block is good for the beginner as this page is their first introduction to seeing completed cyclus input!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think the presence of these blank lines is distracting/concerning to learners? If so, it might be best to get rid of them than to draw attention to them with this note?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my personal experience going through the tutorial, having the blank lines was helpful for understanding that everything else in the tutorial was going to be put in between the control block and </simulation> tag

@ConnorWelch-OSU
Copy link
Contributor Author

In the add_arche, add_commod_recipe and sim_parm files, it looks like you took out the completed blocks for users to compare against, but kept those in add_proto and add_reg_inst. Any reason for that inconsistency?

I agree that having completed blocks has value. My opinion is that the completed block should appear in a "Check" section at the end of each page, and that's how they are in add_proto and add_reg_inst. I can add completed blocks back to the ends of the other pages in a "Check" section, if everyone thinks that's a good idea.

Copy link
Member

@abachma2 abachma2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making that change @ConnorWelch-OSU. I am approving this PR. I'll leave this open for another few days, in case anyone else wants to look at this. Feel free to ping me to merge this if you think enough time has passed and I haven't merged this yet.

Copy link

@meg-krieg meg-krieg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of my comments are cosmetic except for 1 typo.

I do still think the Add Region and Institution activity could be even less verbose. There are a lot of sequences of xml blocks to get to the general template... I am not sure how that reduction would look though.



</region>
Let's build the ``ReactorUtility`` institution. This institution has one ``1178MWe ReactorPlant Unit 1`` prototype.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this redundant compared to the above lines still under Activity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make changes improve the wording.

Comment on lines 105 to 107
**Note**: There are two blank lines between the end of the control section and
end of the simulation section. This section of the simulation block will hold
the rest of the simulation parameter blocks (commodities, facilities, regions,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the added completed control block is good for the beginner as this page is their first introduction to seeing completed cyclus input!

</facility>

.. rubric:: Footnotes
.. [#f1] The exact order of the sections in a |Cyclus| input file are of minor consequence. The ``control`` sequence must go first, but the other sequences can go in any order that makes sense to the user. The traditional organization of an input file is: control, archetypes, commodities, facilities, regions/institutions, and recipes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this comment isn't for this PR, but is there a better home for this footnote (and the other repeats of this footnote)? Would go with the "reduce" verbosity goal of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that there would be value in stating the information from the footnote early on in the tutorial, but I decided to leave it for this PR so it can be discussed as a separate issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe a subsection called Structure and Syntax in the sim_parm.rst or a new page before that could be good for this footnote . That could also be a place to mention that "hyphen" comment seen in the commodities section and stuff about capitalization mattering etc.

ConnorWelch-OSU and others added 2 commits January 29, 2026 12:49
@ConnorWelch-OSU
Copy link
Contributor Author

Thanks for your review, @meg-krieg. I made changes to add_reg_inst.rst based on your comments.

I do still think the Add Region and Institution activity could be even less verbose. There are a lot of sequences of xml blocks to get to the general template... I am not sure how that reduction would look though.

I agree that there's still room to improve the flow here, but I think the page requires some structural changes to achieve that.

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ConnorWelch-OSU - I've got a few comments here... Look forward to your thoughts

Comment on lines 105 to 107
**Note**: There are two blank lines between the end of the control section and
end of the simulation section. This section of the simulation block will hold
the rest of the simulation parameter blocks (commodities, facilities, regions,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think the presence of these blank lines is distracting/concerning to learners? If so, it might be best to get rid of them than to draw attention to them with this note?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we get rid of these underscore characters while we're at it... the table below doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is a good idea. I will make those changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious... is there any confusion in the fact that the XML entry is name but we call this variable arch1?

Also, we end up with more archetypes in this table than in the template. Any thoughts on rearranging this table to be something like:

+--------------+---------------+----------------+
| archetype # | lib | name |
+--------------+---------------+----------------+
| 1 | cycamore | Enrichment |
+--------------+---------------+----------------+
| 2 | cycamore | Reactor |
+--------------+---------------+----------------+
| 3 | cycamore | Source |
+--------------+---------------+----------------+
| 4 | cycamore | Sink |
+--------------+---------------+----------------+

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that your suggestion for rearranging the table would be more clear than the current table, but I could see the potential for confusion with the archetype # column since lib comes before arch in the template. Maybe we get rid of the lib and arch numbering in the template all together and just direct the user create four <spec> blocks with the information in the table. What are your thoughts on that?

Copy link
Member

@gonuke gonuke Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that in later pages, we put [string] in the placeholders. Maybe that's more consistent and we can then replace arch with name since name is the XML element.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, for clarity, we would replace lib1, arch1, etc. in the template with [string]. But then, where is the arch that we would be replacing with name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! My new table suggestion had already referred to name so you can ignore that part of my comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove this section or move it somewhere else? It's an optional and advanced feature that we haven't really explained. I think we can talk about the role of commodities without describing how or the option of adding a commodities block...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe my understanding is lacking, but don't wee need to define the commodities in order to use them as in and out commodities for prototypes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to define them. Your understanding may actually stem from this part of the tutorial! 😀

Commodities are defined implicitly by their use in archetypes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, I agree. This section isn't necessary, and may even cause confusion, as it did for me. If we were to move it, where would be the best place for it? Otherwise, I can remove it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the part that introduces the concept of commodities within the DRE is useful and can stay. Starting with the "Activity" we can remove it and add a sentence or two that states that commodities don't have to be explicitly defined. Rather, they are defined implicitly by the facilities and the commodities they choose to trade.

| ``arch6`` | ``NullInst`` | Name of archetype |
+-------------+------------------+----------------------------+

.. code-block:: XML
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we need this template again, or can we just refer back to the earlier location?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably exclude the template here and refer back to the archetypes page. The other option would be to instruct the user to add NullRegion and NullInst on the archetypes page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we avoid putting these on the archetypes page because we haven't introduced the concept of regions and institutions yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I will remove the template here and add a reference to the archetypes page.

@ConnorWelch-OSU
Copy link
Contributor Author

Thanks for the detailed review @gonuke. I've made the following changes to address your suggestions.

  • In add_arche.rst, I rearranged the table to remove lib1, arch1, etc. naming, but kept the columns as Variable and Value to match the way the majority of the tables in the tutorial are. Let me know what you think of the way I formatted the table.
  • In add_reg_inst.rst, I removed the repeated template and replaced it with a link to the Understanding Archetypes page.
  • I removed the optional add commodity activity, and I'm pretty sure I tracked down and removed any references to a commodity block in the rest of the tutorial, including the input files.

I also fixed the formatting for the code block and table in add_deploy.rst that I noticed weren't rendering properly on the website while looking for commodity references.

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is getting close, @ConnorWelch-OSU - a couple of little comments/requests here

+=============+=============+==================+
| 1 | ``lib`` | ``cycamore`` |
+ +-------------+------------------+
| | ``arch`` | ``Source`` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no variable named "arch" - can we change this to "name"?

Comment on lines 65 to 73
<name>nat_u</name>
<basis>mass</basis>
<nuclide>
<id>92235</id>
<comp>0.00711</comp>
</nuclide>
<nuclide>
<id>92238</id>
<comp>0.99289</comp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a template, per our normal pattern?

+=============+=============+==================+
| 5 | ``lib`` | ``agents`` |
+ +-------------+------------------+
| | ``arch`` | ``NullRegion`` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| | ``arch`` | ``NullRegion`` |
| | ``name`` | ``NullRegion`` |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Make tutorials less verbose

4 participants