From d3a591f9d817182aa7299d55c32d45f2e3ea0cdc Mon Sep 17 00:00:00 2001 From: ElderNoSpace Date: Sat, 12 Dec 2020 14:21:20 +1100 Subject: [PATCH 1/7] added documentation for the documentation generator --- src/book/02-system/01-foundations/02-build-system.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 9766ecc6b..84e120785 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -122,6 +122,7 @@ NUClear Roles introduces the `b` command that wraps up all of the functionality | run | Run a role locally | | shell | Exposes a shell in the Docker image | | target | Select a target to work on | +| doc | Create json documenting each module's reactors | ##### Build @@ -344,6 +345,16 @@ The `nuc7i7bnh` target should be used for building and running code on the robot The `target` command will download (or, if needed, build) the Docker image for the specified target and then mark that target as active. +##### Doc + +The `doc` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. + +The `--indir` argument gives the root of the directories that will be documented, defaults to the `./module/` directory. + +The `--outdir` argument gives the directory that the JSON output will be written, defaults to `./doc/NUdoc/` directory. + +The `-m` or `--multiprocess` argument tells the command to use multiprocessing to greatly reduce the processing time, but uses a very large amount of RAM, about 1G per thread. + ## Docker Images The NUbots codebase uses Docker images to containerise the build process. From 5d56d5628afc9b0faf80ec1eed368da8cce4eaa5 Mon Sep 17 00:00:00 2001 From: ElderNoSpace <43051455+ElderNoSpace@users.noreply.github.com> Date: Sat, 12 Dec 2020 14:37:52 +1100 Subject: [PATCH 2/7] Changed 1G to 1GB Co-authored-by: Josephus Paye II --- src/book/02-system/01-foundations/02-build-system.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 84e120785..35ef8e118 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -353,7 +353,7 @@ The `--indir` argument gives the root of the directories that will be documented The `--outdir` argument gives the directory that the JSON output will be written, defaults to `./doc/NUdoc/` directory. -The `-m` or `--multiprocess` argument tells the command to use multiprocessing to greatly reduce the processing time, but uses a very large amount of RAM, about 1G per thread. +The `-m` or `--multiprocess` argument tells the command to use multiprocessing to greatly reduce the processing time, but uses a very large amount of RAM, about 1GB per thread. ## Docker Images From b0d30e965528d09b2d0348577647a93b735c9ec6 Mon Sep 17 00:00:00 2001 From: ElderNoSpace Date: Sat, 12 Dec 2020 14:42:58 +1100 Subject: [PATCH 3/7] Added Joey's suggestions --- .../01-foundations/02-build-system.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 35ef8e118..fee98d908 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -109,20 +109,20 @@ As is the case with modules and messages, utilities are grouped together into me NUClear Roles introduces the `b` command that wraps up all of the functionality needed to create modules and build the NUbots code. -| Command | Description | -| --------- | -------------------------------------------------------------- | -| build | Build the currently configured code | -| configure | Configure the CMake system for the current target | -| edit | Edit configuration files | -| footdown | Trains a neural network to detect foot down based on leg loads | -| format | Applies code formatting rules to the codebase | -| install | Install built code to the specified robot | -| module | Generate new modules | -| nbs | For working with NBS recordings | -| run | Run a role locally | -| shell | Exposes a shell in the Docker image | -| target | Select a target to work on | -| doc | Create json documenting each module's reactors | +| Command | Description | +| ------------------| ----------------------------------------------------------------------------| +| build | Build the currently configured code | +| configure | Configure the CMake system for the current target | +| edit | Edit configuration files | +| footdown | Trains a neural network to detect foot down based on leg loads | +| format | Applies code formatting rules to the codebase | +| install | Install built code to the specified robot | +| module | Generate new modules | +| nbs | For working with NBS recordings | +| run | Run a role locally | +| shell | Exposes a shell in the Docker image | +| target | Select a target to work on | +| extract-reactions | Dump documentation of each module's ons, emits and reactions in JSON format | ##### Build @@ -345,7 +345,7 @@ The `nuc7i7bnh` target should be used for building and running code on the robot The `target` command will download (or, if needed, build) the Docker image for the specified target and then mark that target as active. -##### Doc +##### Extract-Reactions The `doc` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. From 7372da63d134ce007ed18f38999bf2dbe2e338ae Mon Sep 17 00:00:00 2001 From: ElderNoSpace Date: Sat, 12 Dec 2020 14:46:56 +1100 Subject: [PATCH 4/7] Changed default outdir directory name --- src/book/02-system/01-foundations/02-build-system.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index fee98d908..80cb04c8d 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -110,7 +110,7 @@ As is the case with modules and messages, utilities are grouped together into me NUClear Roles introduces the `b` command that wraps up all of the functionality needed to create modules and build the NUbots code. | Command | Description | -| ------------------| ----------------------------------------------------------------------------| +| ----------------- | --------------------------------------------------------------------------- | | build | Build the currently configured code | | configure | Configure the CMake system for the current target | | edit | Edit configuration files | @@ -351,7 +351,7 @@ The `doc` command of `b` generates a JSON file documenting each Module. It lists The `--indir` argument gives the root of the directories that will be documented, defaults to the `./module/` directory. -The `--outdir` argument gives the directory that the JSON output will be written, defaults to `./doc/NUdoc/` directory. +The `--outdir` argument gives the directory that the JSON output will be written, defaults to `./doc/extract-documentation/` directory. The `-m` or `--multiprocess` argument tells the command to use multiprocessing to greatly reduce the processing time, but uses a very large amount of RAM, about 1GB per thread. From 4334fcf94615fbfe73c7368080359f5ec8cf0fd0 Mon Sep 17 00:00:00 2001 From: ElderNoSpace Date: Sat, 12 Dec 2020 14:49:07 +1100 Subject: [PATCH 5/7] further propgation of name change --- src/book/02-system/01-foundations/02-build-system.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 80cb04c8d..bd09c960f 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -347,7 +347,7 @@ The `target` command will download (or, if needed, build) the Docker image for t ##### Extract-Reactions -The `doc` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. +The `extract-reactions` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. The `--indir` argument gives the root of the directories that will be documented, defaults to the `./module/` directory. From d9f50ed1155a624f8e3a2edc32e6d9c39cbaf585 Mon Sep 17 00:00:00 2001 From: cameron Date: Fri, 5 Feb 2021 13:35:04 +1100 Subject: [PATCH 6/7] fixed name --- .../01-foundations/02-build-system.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 5a529aa37..87d907f03 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -109,20 +109,20 @@ As is the case with modules and messages, utilities are grouped together into me NUClear Roles introduces the `b` command that wraps up all of the functionality needed to create modules and build the NUbots code. -| Command | Description | -| ----------------- | --------------------------------------------------------------------------- | -| build | Build the currently configured code | -| configure | Configure the CMake system for the current target | -| edit | Edit configuration files | -| footdown | Trains a neural network to detect foot down based on leg loads | -| format | Applies code formatting rules to the codebase | -| install | Install built code to the specified robot | -| module | Generate new modules | -| nbs | For working with NBS recordings | -| run | Run a role locally | -| shell | Exposes a shell in the Docker image | -| target | Select a target to work on | -| extract-reactions | Dump documentation of each module's ons, emits and reactions in JSON format | +| Command | Description | +| --------------------- | --------------------------------------------------------------------------- | +| build | Build the currently configured code | +| configure | Configure the CMake system for the current target | +| edit | Edit configuration files | +| footdown | Trains a neural network to detect foot down based on leg loads | +| format | Applies code formatting rules to the codebase | +| install | Install built code to the specified robot | +| module | Generate new modules | +| nbs | For working with NBS recordings | +| run | Run a role locally | +| shell | Exposes a shell in the Docker image | +| target | Select a target to work on | +| extract-documentation | Dump documentation of each module's ons, emits and reactions in JSON format | ##### Build @@ -345,9 +345,9 @@ The `nuc7i7bnh` target should be used for building and running code on the robot The `target` command will download (or, if needed, build) the Docker image for the specified target and then mark that target as active. -##### Extract-Reactions +##### Extract-Documentation -The `extract-reactions` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. +The `extract-documentation` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. The `--indir` argument gives the root of the directories that will be documented, defaults to the `./module/` directory. From 8733ba02d92d4b92e83b69f1d82e84a8d2261204 Mon Sep 17 00:00:00 2001 From: Cameron Murtagh <43051455+CMurtagh-LGTM@users.noreply.github.com> Date: Sat, 3 Jul 2021 16:21:42 +1000 Subject: [PATCH 7/7] Some grammar from Josephus Co-authored-by: Josephus Paye II --- src/book/02-system/01-foundations/02-build-system.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/book/02-system/01-foundations/02-build-system.mdx b/src/book/02-system/01-foundations/02-build-system.mdx index 87d907f03..87e87a4fb 100644 --- a/src/book/02-system/01-foundations/02-build-system.mdx +++ b/src/book/02-system/01-foundations/02-build-system.mdx @@ -347,7 +347,7 @@ The `target` command will download (or, if needed, build) the Docker image for t ##### Extract-Documentation -The `extract-documentation` command of `b` generates a JSON file documenting each Module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their dsl worlds also. +The `./b extract-documentation` command generates a JSON file documenting each module. It lists each reactor, with their on statements and emit statements. The on and emit statements have their location in the file and their DSL words also. The `--indir` argument gives the root of the directories that will be documented, defaults to the `./module/` directory.