Skip to content

Commit bcec358

Browse files
authored
Merge pull request #158 from nasa-jpl/pastord-update-readme
Update readme, refactor fcviz
2 parents 1fff671 + 4e9bdda commit bcec358

6 files changed

Lines changed: 350 additions & 143 deletions

File tree

.doxyfile.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,26 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "JSD"
35+
PROJECT_NAME = "@PROJECT_NAME@"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = @JSD_VERSION@
41+
PROJECT_NUMBER = @PROJECT_VERSION@
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = "JPL SOEM Drivers"
47+
PROJECT_BRIEF = "@PROJECT_DESCRIPTION@"
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55
5151
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
5252
# the logo to the output directory.
5353

54-
PROJECT_LOGO = ../doc/img/JPL-logo-color.png
54+
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/doc/img/JPL-logo-color.png
5555

5656
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
5757
# into which the generated documentation will be written. If a relative path is
@@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
152152
# will be relative from the directory where doxygen is started.
153153
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
154154

155-
STRIP_FROM_PATH =
155+
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
156156

157157
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
158158
# path mentioned in the documentation of a class, which tells the reader which
@@ -771,7 +771,7 @@ WARN_LOGFILE =
771771
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
772772
# Note: If this tag is empty the current directory is searched.
773773

774-
INPUT = ../src
774+
INPUT = @CMAKE_SOURCE_DIR@/src @CMAKE_SOURCE_DIR@/README.md @CMAKE_SOURCE_DIR@/doc
775775

776776
# This tag can be used to specify the character encoding of the source files
777777
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -865,7 +865,7 @@ EXAMPLE_RECURSIVE = NO
865865
# that contain images that are to be included in the documentation (see the
866866
# \image command).
867867

868-
IMAGE_PATH =
868+
IMAGE_PATH = @CMAKE_SOURCE_DIR@/doc/img
869869

870870
# The INPUT_FILTER tag can be used to specify a program that doxygen should
871871
# invoke to filter for each input file. Doxygen will invoke the filter program
@@ -921,7 +921,7 @@ FILTER_SOURCE_PATTERNS =
921921
# (index.html). This can be useful if you have a project on for instance GitHub
922922
# and want to reuse the introduction page also for the doxygen output.
923923

924-
USE_MDFILE_AS_MAINPAGE = README.md
924+
USE_MDFILE_AS_MAINPAGE = @CMAKE_SOURCE_DIR@/README.md
925925

926926
#---------------------------------------------------------------------------
927927
# Configuration options related to source browsing

.github/workflows/docs.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- ".doxyfile.in"
9+
- "CMakeLists.txt"
10+
- "README.md"
11+
- "doc/**"
12+
- "src/**"
13+
- ".github/workflows/docs.yml"
14+
pull_request:
15+
paths:
16+
- ".doxyfile.in"
17+
- "CMakeLists.txt"
18+
- "README.md"
19+
- "doc/**"
20+
- "src/**"
21+
- ".github/workflows/docs.yml"
22+
workflow_dispatch:
23+
inputs:
24+
deploy:
25+
description: "Deploy the generated docs to GitHub Pages"
26+
required: false
27+
default: false
28+
type: boolean
29+
30+
permissions:
31+
contents: read
32+
33+
concurrency:
34+
group: pages
35+
cancel-in-progress: true
36+
37+
jobs:
38+
build:
39+
runs-on: ubuntu-24.04
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Install documentation dependencies
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y doxygen graphviz libyaml-cpp-dev
46+
- name: Configure CMake
47+
run: cmake -S . -B build -DBUILD_TESTS=OFF
48+
- name: Build documentation
49+
run: cmake --build build --target doc
50+
- name: Upload Pages artifact
51+
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && inputs.deploy)
52+
uses: actions/upload-pages-artifact@v4
53+
with:
54+
path: build/doxygen_html
55+
56+
deploy:
57+
needs: build
58+
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_dispatch' && inputs.deploy)
59+
runs-on: ubuntu-24.04
60+
permissions:
61+
pages: write
62+
id-token: write
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
steps:
67+
- uses: actions/configure-pages@v5
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,38 @@ To learn more about fastcat, checkout the following documents:
1111
- 2021 Aeroconf paper submission `Fastcat: An Open-Source Library for Composable
1212
EtherCAT Control Systems`
1313
- README for build details
14-
- The API documentation (build locally using doxygen - Github hosting still a work-in-progress)
14+
- The API documentation
1515

1616
### Prerequisites
1717

18-
Fastcat has ben tested on Ubuntu 20.04, though it should work on older versions of Ubuntu with minor revisions to these steps.
18+
Fastcat has been tested on Ubuntu 20.04, 22.04 and 24.04, though it should work on older versions of Ubuntu with minor revisions to these steps.
1919

2020
```bash
21-
$ sudo apt install libyaml-cpp-dev libreadline-dev doxygen python3-pip
22-
$ sudo pip3 install pyaml cogapp graphviz ipython==7.9
21+
$ sudo apt install libyaml-cpp-dev libreadline-dev doxygen graphviz
22+
```
23+
24+
The `fcviz` utility is configured as a `uv` script, so its Python dependencies do not need to be installed globally:
25+
26+
Install `uv` using Astral's official installer:
27+
28+
```bash
29+
$ curl -LsSf https://astral.sh/uv/install.sh | sh
30+
```
31+
32+
Installation options and other platforms are documented by Astral at <https://docs.astral.sh/uv/getting-started/installation/>.
33+
34+
```bash
35+
$ uv run fcviz/fcviz.py example_configs/paper_examples/paper_faulter_config.yaml
36+
```
37+
38+
If you do not want to use `uv`, check the inline dependency metadata at the top of `fcviz/fcviz.py` and install those packages in your preferred Python environment before running the script directly.
39+
40+
If you need to regenerate code with `fcgen`, install Ubuntu's `python3-cogapp` package. On some systems, you may need to enable the `universe` repository first:
41+
42+
```bash
43+
$ sudo add-apt-repository universe
44+
$ sudo apt update
45+
$ sudo apt install python3-cogapp
2346
```
2447

2548
### Building
@@ -51,14 +74,14 @@ $ make memcheck # note valgrind is required to perform memory checking
5174
```bash
5275
# Install dependencies for Ubuntu
5376
$ sudo apt install doxygen graphviz
54-
55-
# use the build system to generate the code for you!
5677
$ cd build
5778
$ make doc
5879
```
5980

6081
The output documentation is created in the directory `doxygen_html` and can be opened by any web browser from the root `index.html` webpage.
6182

83+
The repository also includes a GitHub Actions workflow that builds this `doc` target and publishes it to GitHub Pages on pushes to `master`. Once GitHub Pages is enabled for the repository with GitHub Actions as the source, the published site will be available at <https://nasa-jpl.github.io/fastcat/>.
84+
6285
### Using fastcat in your Project
6386

6487
We recommend using the CMake `FetchContent` utility to acquire fastcat and its upstream dependencies.
@@ -67,12 +90,12 @@ We recommend using the CMake `FetchContent` utility to acquire fastcat and its u
6790
include(FetchContent)
6891
FetchContent_Declare(fastcat
6992
GIT_REPOSITORY git@github.com:nasa-jpl/fastcat.git
70-
GIT_TAG v0.4.3
93+
GIT_TAG v0.13.13
7194
)
7295
FetchContent_MakeAvailable(fastcat)
7396
```
7497

75-
It is always recommend you specify your dependency to a tagged reldroppingease (`GIT_TAG v0.4.3`) so updates to master cannot break your build (NOT `GIT_TAG master`).
98+
It is always recommend you specify your dependency to a tagged reldroppingease (`GIT_TAG v0.13.13`) so updates to master cannot break your build (NOT `GIT_TAG master`).
7699

77100
### Semantic Versioning
78101

@@ -83,8 +106,3 @@ fastcat uses Semantic versioning to help applications reason about the software
83106
* Patch Versions will denote bug fixes or minor improvements and will not break user applications.
84107

85108
Violations of these rules will be considered errors and should be patched immediately. Please open an issue if you find a violation.
86-
87-
**Note**
88-
89-
Major version `0` indicates the API is still considered experimental and subject to change with any new release. These rules will be strictly followed after a Major version `1` release.
90-

doc/fastcat_primer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ This example can be recreated with the following command:
117117

118118
``` bash
119119
!$ cd </path/to/fastcat>
120-
$ python3 fcviz/fcviz.py example_configs/paper_examples/paper_faulter_config.yaml
120+
$ uv run fcviz/fcviz.py example_configs/paper_examples/paper_faulter_config.yaml
121121
```
122122

123123

0 commit comments

Comments
 (0)