Skip to content

Commit b2d69e9

Browse files
giddenrwcarlsen
authored andcommitted
add information about the version cli
1 parent c74e440 commit b2d69e9

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

source/arche/cli.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.. _cli:
2+
3+
Archetype Command Line Interface
4+
=======================================
5+
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.,
9+
10+
.. code-block:: bash
11+
12+
$ cyclus --agent-schema :agents:Source
13+
<interleave>
14+
<element name="commod">
15+
<data type="token"/>
16+
</element>
17+
<optional>
18+
<element name="recipe_name">
19+
<data type="token"/>
20+
</element>
21+
</optional>
22+
<element name="capacity">
23+
<data type="double"/>
24+
</element>
25+
</interleave>
26+
27+
However, other CLI interactions exist if they are implemented on the archetype.
28+
29+
Archetype Versioning
30+
--------------------
31+
32+
The ``cyclus::Agent`` class exposes a ``version()`` member function which is
33+
queried by the |Cyclus| CLI. For example,
34+
35+
.. code-block:: bash
36+
37+
$ cyclus --agent-version :agents:Source
38+
1.3.1-7-g9a2c9c9
39+
40+
This is generated from some ``git`` version control information. You can make
41+
your own version tag information for some archetype like
42+
43+
44+
.. code-block:: c++
45+
46+
virtual std::string version() { return "My Version"; }
47+
48+
and then access the version with
49+
50+
.. code-block:: bash
51+
52+
$ cyclus --agent-version my_package:my_library:MyArchetype
53+
My Version

source/arche/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Interfacing with the |Cyclus| Kernel
8383
custom_tables
8484
errors
8585
logger
86+
cli
8687

8788
A Word About Style
8889
++++++++++++++++++

0 commit comments

Comments
 (0)