Skip to content

Commit 1c44a53

Browse files
authored
Allow ex_doc to process grisp dep (#42)
* Allow ex_doc to process grisp dep This is an hack because we do not support ExDoc in grisp * Restructure README headings to appear better in the exdoc overview * Add ex_doc gen to CI
1 parent 09c2ac2 commit 1c44a53

3 files changed

Lines changed: 45 additions & 28 deletions

File tree

.github/workflows/ct.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
name: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
1616
strategy:
1717
matrix:
18-
otp: ['25.2.3']
19-
rebar3: ['3.20.0']
18+
otp: ['27.1']
19+
rebar3: ['3.24.0']
2020
steps:
2121
- uses: erlef/setup-beam@v1
2222
with:
@@ -33,3 +33,8 @@ jobs:
3333
eval `ssh-agent -s`
3434
ssh-add - <<< '${{ secrets.STRITZINGER_BOT_SSH_KEY }}'
3535
rebar3 ct
36+
- name: Run ex_doc
37+
run: |
38+
eval `ssh-agent -s`
39+
ssh-add - <<< '${{ secrets.STRITZINGER_BOT_SSH_KEY }}'
40+
rebar3 ex_doc

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,43 @@
22

33
GRiSP.io Client Library for GRiSP
44

5-
Table of content
5+
## Table of content
66

77
- [grisp\_connect](#grisp_connect)
8-
- [Usage](#usage)
9-
- [Option 1. Use the `rebar3_grisp` plugin](#option-1-use-the-rebar3_grisp-plugin)
10-
- [Option 2. Add `grisp_connect` Manually to your Application](#option-2-add-grisp_connect-manually-to-your-application)
11-
- [Further Steps](#further-steps)
12-
- [Check whether the board is connected](#check-whether-the-board-is-connected)
13-
- [Link your Device to your GRiSP.io Account](#link-your-device-to-your-grispio-account)
8+
- [Table of content](#table-of-content)
9+
- [Usage](#usage)
10+
- [Option 1. Use the `rebar3_grisp` plugin](#option-1-use-the-rebar3_grisp-plugin)
11+
- [Option 2. Add `grisp_connect` Manually to your Application](#option-2-add-grisp_connect-manually-to-your-application)
12+
- [Further Steps](#further-steps)
13+
- [Check whether the board is connected](#check-whether-the-board-is-connected)
14+
- [Link your Device to your GRiSP.io Account](#link-your-device-to-your-grispio-account)
1415
- [Troubleshooting:](#troubleshooting)
1516
- [Need to Unlink a Device?](#need-to-unlink-a-device)
16-
- [Environment Options](#environment-options)
17+
- [Environment Options](#environment-options)
1718
- [`connect`](#connect)
1819
- [`ntp`](#ntp)
1920
- [`ws_request_timeout`](#ws_request_timeout)
2021
- [`ws_ping_timeout`](#ws_ping_timeout)
2122
- [`logs_interval`](#logs_interval)
2223
- [`logs_batch_size`](#logs_batch_size)
2324
- [Custom TLS options](#custom-tls-options)
24-
- [See all Logs on GRiSP.io](#see-all-logs-on-grispio)
25-
- [Development](#development)
26-
- [Local Development](#local-development)
27-
- [Development on GRiSP Hardware](#development-on-grisp-hardware)
28-
- [Production on GRiSP Hardware](#production-on-grisp-hardware)
25+
- [See all Logs on GRiSP.io](#see-all-logs-on-grispio)
26+
- [Development](#development)
27+
- [Local Development](#local-development)
28+
- [Development on GRiSP Hardware](#development-on-grisp-hardware)
29+
- [Production on GRiSP Hardware](#production-on-grisp-hardware)
2930

3031

3132
Add this application as a dependency in your GRiSP2 project.
3233
Your board will connect securely using mTLS to the [GRiSP.io](https://grisp.io) services.
3334

34-
# Usage
35+
## Usage
3536

36-
## Option 1. Use the `rebar3_grisp` plugin
37+
### Option 1. Use the `rebar3_grisp` plugin
3738

3839
The `configure` method of the `rebar3_grisp` version >= 2.6.0 will add `grisp_connect` with the needed configurations to your GRiSP application. See [GRiSP Wiki/Use-your-GRiSP-2-board-with-GRiSP.io](https://github.com/grisp/grisp/wiki/Use-your-GRiSP-2-board-with-GRiSP.io).
3940

40-
## Option 2. Add `grisp_connect` Manually to your Application
41+
### Option 2. Add `grisp_connect` Manually to your Application
4142

4243
Add
4344

@@ -59,9 +60,9 @@ You can find your device linking token on [GRiSP.io/grisp_manager](https://grisp
5960

6061
You can also skip this configuration and insert the token manually later.
6162

62-
# Further Steps
63+
## Further Steps
6364

64-
## Check whether the board is connected
65+
### Check whether the board is connected
6566

6667
```erlang
6768
> grisp_connect:is_connected().
@@ -70,7 +71,7 @@ true
7071
{ok,<<"pong">>}
7172
```
7273

73-
## Link your Device to your GRiSP.io Account
74+
### Link your Device to your GRiSP.io Account
7475

7576
```erlang
7677
> grisp_connect:link_device(<<"...">>).
@@ -100,7 +101,7 @@ We currently do not expose a public API to unlink a Device. Please reach out to
100101

101102
If you encounter any problems or have questions, don't hesitate to contact [support](mailto:grisp@stritzinger.com). Happy coding!
102103

103-
# Environment Options
104+
## Environment Options
104105

105106
### `connect`
106107

@@ -147,7 +148,7 @@ grisp_connect sets the following options as default values if no `tls_server_tru
147148
]
148149
```
149150

150-
# See all Logs on GRiSP.io
151+
## See all Logs on GRiSP.io
151152

152153
Once this app is started, it forwards all logs to GRiSP.io without the need of setting up anything. The only logs that we do not catch are the ones generated before `grisp_connect` boots.
153154
If you want to see ALL logs, even from applications that boot before `grisp_connect`, you need to disable the default logger handler and set the grisp_connect handler as the default one. This involves changing the `kernel` and `grisp_connect` app configuration settings in your sys.config file.
@@ -182,9 +183,9 @@ You can copy paste these settings. Here we both swap the default logger handler
182183
].
183184
```
184185

185-
# Development
186+
## Development
186187

187-
## Local Development
188+
### Local Development
188189

189190
Add an entry in your local hosts file so the domain www.seawater.local points
190191
to your local development server.
@@ -197,7 +198,7 @@ Run tests:
197198

198199
rebar3 ct
199200

200-
## Development on GRiSP Hardware
201+
### Development on GRiSP Hardware
201202

202203
Add an entry in the grisp hosts file so the domain www.seawater.local points
203204
to your local development server.
@@ -215,8 +216,7 @@ rebar.config and then run:
215216

216217
rebar3 as dev grisp deploy
217218

218-
219-
## Production on GRiSP Hardware
219+
### Production on GRiSP Hardware
220220

221221
To deploy on GRiSP hardware for production, configure rebar3_grisp's deploy
222222
configuration in rebar.config and then run:

rebar.config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,17 @@
7070
{add, grisp_cryptoauth, [{erl_opts, [{d, 'EMULATE_CRYPTOAUTH'}]}]}
7171
]},
7272
{ct_opts, [{sys_config, "./config/test.config"}]}
73+
]},
74+
{docs,[
75+
{deps, [
76+
{grisp_emulation, "0.2.2"}
77+
]},
78+
{overrides, [
79+
{add, grisp, [{erl_opts, [
80+
{d, 'GRISP_HRL'},
81+
{d, 'EMULATION_BACKEND', {grisp2, grisp_emulation}}
82+
]}
83+
]}
84+
]}
7385
]}
7486
]}.

0 commit comments

Comments
 (0)