Skip to content

Commit b505a04

Browse files
thilinarmtbclaude
andcommitted
Update docs for the helper script refactor
Update the build and developer docs to match the new helper scripts: - Replace lncfg/lnbuild with the consolidated bin/lnbld and use --install-dir; drop the removed --update-shell flag. - Update lnrun usage to the new flag/key=value syntax (--test, --debug, --docs program=, --help <command>). - Replace the black/isort/flake8 instructions with the ruff-based bin/lnchk --fmt / --chk-fmt flow, which also covers clang-format. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3c0022b commit b505a04

2 files changed

Lines changed: 35 additions & 46 deletions

File tree

docs/build.rst

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Similarly, you can install the dev dependencies with mamba as well:
4040
mamba env create -f environment-dev.yml
4141
mamba activate libnomp-dev
4242
43-
Use `lncfg` to configure CMake build and `lnbuild` to build/install `libnomp`. To
44-
see the available options, check out `lncfg --help`. `libnomp` currently supports
45-
the following backends:
43+
Use `lnbld` to configure the CMake build and build/install `libnomp` in a single
44+
step. To see the available options, check out `lnbld --help`. `libnomp`
45+
currently supports the following backends:
4646

4747
#. OpenCL
4848
#. CUDA
@@ -54,8 +54,7 @@ commands:
5454
.. code-block:: bash
5555
5656
cd libnomp
57-
./lncfg --enable-opencl --install-prefix ${HOME}/.nomp
58-
./lnbuild
57+
./bin/lnbld --enable-opencl --install-dir ${HOME}/.nomp
5958
6059
`NOMP_INSTALL_DIR` environment variable must be set to `libnomp` install directory
6160
or it should be passed as a command line argument using `--nomp-install-dir` during
@@ -69,45 +68,38 @@ variable with `NOMP_INSTALL_DIR/bin`.
6968
export PATH=${NOMP_INSTALL_DIR}/bin:${PATH}
7069
7170
Setting the environment variable and adding `NOMP_INSTALL_DIR/bin` to `PATH` will
72-
enable you to use `lnrun` script without using its full path to open documentation,
73-
run tests, debug tests, etc. You can update the shell configuration file automatically
74-
by passing `--update-shell` to `lnbuild` script. You have to open a new shell in
75-
order for changes to take affect in case you update the shell configuration file.
71+
enable you to use the `lnrun` script without using its full path to open
72+
documentation, run tests, debug tests, etc.
7673

77-
.. code-block:: bash
78-
79-
cd libnomp
80-
./lncfg --enable-opencl --install-prefix ${HOME}/.nomp
81-
./lnbuild --update-shell
82-
83-
Use `lnbuild --help` to see all the available options supported by `lnbuild` script.
74+
Use `lnbld --help` to see all the available options supported by the `lnbld`
75+
script.
8476

8577
You might additionally want to specify OpenCL library path as below if CMake
8678
can't find OpenCL:
8779

8880
.. code-block:: bash
8981
90-
./lncfg --enable-opencl --opencl-lib /lib/x86_64-linux-gnu/libOpenCL.so
82+
./bin/lnbld --enable-opencl --opencl-lib /lib/x86_64-linux-gnu/libOpenCL.so
9183
9284
If you used `conda` to install OpenCL (for example `pocl`_), do the following:
9385

9486
.. code-block:: bash
9587
96-
./lncfg --enable-opencl --opencl-lib ${CONDA_PREFIX}/lib/libOpenCL.so --opencl-headers ${CONDA_PREFIX}/include
88+
./bin/lnbld --enable-opencl --opencl-lib ${CONDA_PREFIX}/lib/libOpenCL.so --opencl-headers ${CONDA_PREFIX}/include
9789
9890
9991
Run `libnomp` tests
10092
-------------------
10193

102-
You can run `libnomp` tests by executing `lnrun test` command. See below for
103-
a few examples on how to use the script:
94+
You can run `libnomp` tests by executing the `lnrun --test` command. See below
95+
for a few examples on how to use the script:
10496

10597
.. code-block:: bash
10698
107-
lnrun test
108-
lnrun test --backend opencl
99+
lnrun --test
100+
lnrun --test backend=opencl
109101
110-
Use `lnrun help` to see all supported options.
102+
Use `lnrun --help test` to see all supported options.
111103

112104
nompcc
113105
------
@@ -166,22 +158,22 @@ Documentation
166158

167159
We use `Doxygen` for in source documentations and render those with `Sphinx`
168160
and `Breathe`. These packages must be available if you install the dev
169-
dependencies using `conda`. You can enable docs by passing either `-docs` or
170-
`--enable-docs` option to `lncfg` script.
161+
dependencies using `conda`. You can enable docs by passing the `--enable-docs`
162+
option to the `lnbld` script.
171163

172164
.. code-block:: bash
173165
174-
./lncfg --enable-docs
175-
./lnbuild
166+
./bin/lnbld --enable-docs
176167
177-
Use `lnrun` to open the user documentation locally. You can specify the browser
178-
with option `--browser`. For example, to open the documentation in firefox:
168+
Use `lnrun --docs` to open the user documentation locally. You can specify the
169+
program used to open the documentation with the `program` option. For example,
170+
to open the documentation in firefox:
179171

180172
.. code-block:: bash
181173
182-
lnrun docs --browser firefox
174+
lnrun --docs program=firefox
183175
184-
If you do not specify the browser, it opens the documentation in chrome by
176+
If you do not specify the program, it opens the documentation with `open` by
185177
default.
186178

187179

docs/developer-docs.rst

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,21 @@ instead of:
5252
Formatting files before committing
5353
----------------------------------
5454

55-
Run `clang-format` before committing any changes you make on the source files.
56-
`clang-format` will be available if you install the dev dependencies with conda.
57-
Run `clang-format` as follows:
55+
Run `lnchk --fmt` before committing any changes you make to the source files.
56+
This formats all C source files with `clang-format` and all python files with
57+
`ruff`. Both tools will be available if you install the dev dependencies with
58+
conda.
5859

5960
.. code-block:: bash
6061
61-
clang-format -i **/*.[ch]
62+
./bin/lnchk --fmt
6263
63-
If you change any python files, please use `black` and `isort` to format the
64-
python code and then check with `flake8` before committing. `black`, `isort`
65-
and `flake8` will be available if you install the dev dependencies with
66-
conda.
64+
To only check the formatting (and run the `ruff` linter) without modifying any
65+
files, use `lnchk --chk-fmt`. This is the same check that is run in CI.
6766

6867
.. code-block:: bash
6968
70-
black .
71-
isort .
72-
flake8
69+
./bin/lnchk --chk-fmt
7370
7471
Debugging github actions
7572
------------------------
@@ -105,15 +102,15 @@ As a prerequisite you have to install the `gdbserver` which you can install with
105102
106103
sudo apt install gdbserver
107104
108-
Use :code:`lnrun debug` command to host the debugging session. If you want to debug the
109-
test case `nomp-api-200`:
105+
Use the :code:`lnrun --debug` command to host the debugging session. If you want
106+
to debug the test case `nomp-api-200`:
110107

111108
.. code-block:: bash
112109
113-
lnrun debug api-200
110+
lnrun --debug api-200
114111
115112
Additionally, you can set the port and the target device for the specific session.
116-
You can view the available options by :code:`lnrun help debug`.
113+
You can view the available options by :code:`lnrun --help debug`.
117114

118115
By default the test starts on `localhost:5005`, and a debug viewer should be connected
119116
to this target address. For example, the following figure shows how clion connects to

0 commit comments

Comments
 (0)