Skip to content

Commit f90fb42

Browse files
committed
extend archetype cli flag discussion a bit
1 parent b2d69e9 commit f90fb42

File tree

2 files changed

+50
-7
lines changed

2 files changed

+50
-7
lines changed

source/arche/cli.rst

+48-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
Archetype Command Line Interface
44
=======================================
55

6-
Many of the archetype-specific |Cyclus| CLI commands are automatically generated
7-
if the Cyclus preprocessor is used. For example, member variables added with
8-
``#pragma cyclus var`` are added to the generated input XML schema, e.g.,
6+
There are a few archetype-specific |Cyclus| CLI commands that allow
7+
introspecting details of archetypes that |Cyclus| can find. Most expose data
8+
that is automatically generated by the Cyclus preprocessor. For example,
9+
member variables added with ``#pragma cyclus var`` are added to the generated
10+
input XML schema. Agents are referenced on the command line by their
11+
single-string form ``spec`` (e.g. ``:cycamore:Source``) which is discussed
12+
:ref:`here <agent-spec-docs>`.
13+
14+
To view the auto-generated XML schema used for validating archetype
15+
configuration parameters in input files:
916

1017
.. code-block:: bash
1118
@@ -24,13 +31,47 @@ if the Cyclus preprocessor is used. For example, member variables added with
2431
</element>
2532
</interleave>
2633

27-
However, other CLI interactions exist if they are implemented on the archetype.
34+
To view a JSON structured output of all the data generated and collected from
35+
``#pragma cyclus`` annotations for a particular archetype:
36+
37+
.. code-block:: bash
38+
39+
$ cyclus --agent-annotations :cycamore:Source
40+
{
41+
"all_parents": [
42+
"cyclus::Agent",
43+
"cyclus::Facility",
44+
"cyclus::Ider",
45+
"cyclus::StateWrangler",
46+
"cyclus::TimeListener",
47+
"cyclus::Trader",
48+
"cyclus::toolkit::AgentManaged",
49+
"cyclus::toolkit::CommodityProducer"
50+
],
51+
"doc": "This facility acts as a source of material with a fixed...
52+
...
53+
54+
And to list all archetypes inside a particular library:
55+
56+
.. code-block:: bash
57+
58+
$ cyclus --agent-listing :cycamore
59+
:cycamore:DeployInst
60+
:cycamore:Enrichment
61+
:cycamore:FuelFab
62+
:cycamore:GrowthRegion
63+
:cycamore:ManagerInst
64+
:cycamore:Reactor
65+
:cycamore:Separations
66+
:cycamore:Sink
67+
:cycamore:Source
68+
:cycamore:Storage
2869
2970
Archetype Versioning
3071
--------------------
3172
32-
The ``cyclus::Agent`` class exposes a ``version()`` member function which is
33-
queried by the |Cyclus| CLI. For example,
73+
The ``cyclus::Agent`` class exposes a ``version()`` member function which can be
74+
queried with the |Cyclus| CLI. For example,
3475
3576
.. code-block:: bash
3677
@@ -49,5 +90,5 @@ and then access the version with
4990
5091
.. code-block:: bash
5192
52-
$ cyclus --agent-version my_package:my_library:MyArchetype
93+
$ cyclus --agent-version my/path:my_library:MyArchetype
5394
My Version

source/cep/cep21.rst

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ in a desired location and then identify specific agents in them to |Cyclus|.
2121
This CEP explains where modules can/should be installed and how |Cyclus| finds
2222
and identifies agents in them.
2323

24+
.. _agent-spec-docs:
25+
2426
Agent Spec
2527
===========
2628

0 commit comments

Comments
 (0)