Skip to content

Commit

Permalink
Merge pull request #431 from Inist-CNRS/docs/improve-core-documentation
Browse files Browse the repository at this point in the history
[Docs] Improve core documentation
  • Loading branch information
parmentf authored Nov 22, 2024
2 parents 080ddd2 + 69cc305 commit 4253e88
Show file tree
Hide file tree
Showing 10 changed files with 559 additions and 323 deletions.
15 changes: 14 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,18 @@
"source.fixAll": "explicit"
},
"editor.tabSize": 4,
"prettier.configPath": "./.prettierrc"
"prettier.configPath": "./.prettierrc",
"makefile.configureOnOpen": false,
"cSpell.words": [
"conditor",
"Conditor",
"corhal",
"CORHAL",
"preversion",
"requêter",
"rnsr",
"Rnsr",
"sparql",
"Transpiling"
]
}
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ Add the badges (change `sparql` to the name of the package's directory):

### Hoist devDependencies

We want to use the same dev depencies for all packages, so we can hoist them to
the root of the lerna repository.
We want to use the same dev dependencies for all packages, so we can hoist them
to the root of the lerna repository.

Don't hoist devDependencies like `@ezs/core` (but you shouldn't depend on `@ezs`
package, see [Use the src files in tests](#use-the-src-files-in-tests)).
Expand Down Expand Up @@ -227,3 +227,17 @@ Add the new package in the list of the [root's README](./README.md).
### Add the package in the gh-pages

Add the new package in the [documentation side bar](./docs/_sidebar.md).

## Documenting

Write statement instructions in the corresponding function's comments, using
markdown syntax.

A plugin's general documentation takes place in the `docs` repository, in the
`plugin-name.md` file.

To generate the documentation, use:

```bash
npx yarn run doc
```
34 changes: 0 additions & 34 deletions docs/plugin-conditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Sachant qu'on appauvrit (casse, accents, tiret, apostrophe) tous les champs.
* [compareRnsr](#comparernsr)
* [conditorScroll](#conditorscroll)
* [CORHALFetch](#corhalfetch)
* [CORHALFetch](#corhalfetch-1)
* [getRnsr](#getrnsr)
* [getRnsrInfo](#getrnsrinfo)
* [WOSFetch](#wosfetch)
Expand Down Expand Up @@ -223,39 +222,6 @@ Output:

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 

### CORHALFetch

Take `String` as URL, throw each chunk from the result

Input:

```json
[
{ q: "toto" },
]
```

Script:

```ini
[CORHALFetch]
url = https://corhal-api.inist.fr
```

Output:

```json
[{...}, {"a": "b"}, {"a": "c" }]
```

#### Parameters

* `url` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** corhal api url
* `timeout` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Timeout in milliseconds (optional, default `1000`)
* `retries` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The maximum amount of times to retry the connection (optional, default `5`)

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 

### getRnsr

Find the RNSR identifier(s) matching the `address` and the publication `year`
Expand Down
Loading

0 comments on commit 4253e88

Please sign in to comment.