Skip to content

Conversation

gonuke
Copy link
Member

@gonuke gonuke commented May 30, 2025

This removes references to the cycstub repo and instead replaces it with reference to the cycstub utility. This leaves one file untouched because it is slated to be removed in #418 .

cmake.rst still needs a closer review, but this could be left to a different PR??

Fixes #197 and #366

@gonuke gonuke requested review from abachma2 and dean-krueger May 30, 2025 19:50
@gonuke gonuke self-assigned this May 30, 2025
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.

This generally looks good to me. I recommend some of the capitalization is consistent with 1856 in Cyclus.

Comment on lines +13 to +15
cycstub --type facility :stublibrary:StubFacility
cycstub --type institution :stublibrary:StubInstitution
cycstub --type region :stublibrary:StubRegion
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 want these to have CamelCase in the library name?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did it this way before I committed to fixing the CamelCase problem. In the fixed version, all combinations will work successfully, so these don't need to change.

@@ -4,48 +4,32 @@ Hello, Cyclus! [C++]
====================
This pages walks you through a very simple hello world example using
|cyclus| agents. First make sure that you have the dependencies installed,
namely |Cyclus|, CMake, and a recent version of Python (2.7 or 3.3+).
namely |Cyclus|, CMake, and a recent version of Python (3.3+).
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what our minimum version is these days????

Copy link
Member

Choose a reason for hiding this comment

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

My guess would be python 3.9, but I can look around.

Copy link
Member

Choose a reason for hiding this comment

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

Going off of the dependencies for installing cyclus via conda, it looks like 3.8 is the lowest version allowed. I can build cyclus with 3.8 locally, but the unit tests won't pass unless you have python 3.11+, as of commit 4d1eeef5

@gonuke gonuke marked this pull request as draft May 31, 2025 01:37
@gonuke
Copy link
Member Author

gonuke commented May 31, 2025

I reverted this to draft because a little more work needs to be done to make it all consistent and useful.

@gonuke gonuke marked this pull request as ready for review June 3, 2025 14:55
@gonuke
Copy link
Member Author

gonuke commented Jun 3, 2025

I think this is probably where this needs to be to be consistent now.

@gonuke gonuke requested a review from abachma2 June 6, 2025 14:59
Copy link
Contributor

@dean-krueger dean-krueger left a comment

Choose a reason for hiding this comment

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

The only two comments I have are the same PascalCase vs camelCase comment I made in the other PR #1856, and that (and I'm not sure if this really needs to be fixed), but a naive version of me would probably try to type the command tutorial $ cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution instead of the command cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution in the tutorial folder. Perhaps if you copy the command from the markdown file it is smart enough to not give you that part, but just a thought! Otherwise this looks good to me.

@gonuke
Copy link
Member Author

gonuke commented Jun 11, 2025

but a naive version of me would probably try to type the command tutorial $ cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution instead of the command cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution in the tutorial folder

I think we've often wondered whether it makes sense to include the prompt in the samples. I'm torn on this. The only real benefit is that you can see the directory change and the user gets some clear feedback on which directory they should be in to run the command. The downside is that it looks like part of the command... we could try a different prompt separator... maybe:

(/home/tutorial) |> command here

@dean-krueger
Copy link
Contributor

I'm not sure the separator is really the problem, since ultimately this "issue" is with people who aren't that familiar with using the terminal. I wonder how other people handle this when writing documentation. I guess my personal preference is to change:

"""
You can add additional agents to this module by calling cycstub multiple times:

    tutorial $ python rename.py tutorial
    tutorial $ cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution
    tutorial $ cycstub --type region tutorial:TutorialLibrary:TutorialRegion

"""

Into something like:

"""
You can add additional agents to this module by calling cycstub multiple times.

From the "tutorial" directory, run:

    python rename.py tutorial
    cycstub --type inst tutorial:TutorialLibrary:TutorialInstitution
    cycstub --type region tutorial:TutorialLibrary:TutorialRegion

"""

But perhaps that's too verbose/much overhead/easy to miss? Ultimately I don't think it matters much (except that actually this makes the commands really easy to copy form the markdown file and paste in your terminal since you don't have to remove the tutorial $ bit from every line), but wanted to point this out.

@gonuke
Copy link
Member Author

gonuke commented Jun 13, 2025

I just updated all the code-blocks to be type console instead of type bash to hopefully get syntax highlighting to help with this

@gonuke gonuke force-pushed the wipe_cycstub_repo branch from 5f0bae3 to 6ad43cf Compare June 13, 2025 13:32
@gonuke
Copy link
Member Author

gonuke commented Jun 13, 2025

All the bash code blocks now have sytnax highlighting that requires the prompt to be indicated with only a single $ (there may be other options, but indicating the directory name is definitely not allowed).

Copy link
Contributor

@dean-krueger dean-krueger left a comment

Choose a reason for hiding this comment

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

Thanks @gonuke for making that change. This looks good to me now. I'll leave it unmerged until Wednesday morning to give others a chance to look at it on Monday if they want (I know @abachma2 mentioned wanting some time after TWOFCS to check things). If others get around to it before then, and approve, feel free to merge.

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 @gonuke. I am approving this PR. I have one comment to follow up on the minimum python version. If we don't have any more conversation about that then I will merge.

@@ -4,48 +4,32 @@ Hello, Cyclus! [C++]
====================
This pages walks you through a very simple hello world example using
|cyclus| agents. First make sure that you have the dependencies installed,
namely |Cyclus|, CMake, and a recent version of Python (2.7 or 3.3+).
namely |Cyclus|, CMake, and a recent version of Python (3.3+).
Copy link
Member

Choose a reason for hiding this comment

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

Going off of the dependencies for installing cyclus via conda, it looks like 3.8 is the lowest version allowed. I can build cyclus with 3.8 locally, but the unit tests won't pass unless you have python 3.11+, as of commit 4d1eeef5

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.

LGTM. Merging now.

@abachma2 abachma2 merged commit e4b518f into cyclus:source Jun 18, 2025
2 checks passed
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.

Scour for cycstub references
3 participants