Skip to content

Commit

Permalink
Merge pull request #1641 from folio-org/FOLIO-873-improve-docs-265
Browse files Browse the repository at this point in the history
FOLIO-873 improve docs
  • Loading branch information
dcrossleyau committed Apr 5, 2024
2 parents 3342ae6 + 9501634 commit 03159e9
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 11 deletions.
17 changes: 14 additions & 3 deletions _data/repos.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"metadata": {
"generatedDateTime": "2024-03-17T23:56:00.073826+00:00"
"generatedDateTime": "2024-04-05T00:22:36.804398+00:00"
},
"repos": [
{
Expand Down Expand Up @@ -89,6 +89,16 @@
"repoType": "other",
"snippetIntro": "<p>Library with general purpose classes to help with FOLIO backend development and testing</p>"
},
{
"defaultBranch": "master",
"description": "POC for notification of breaking changes",
"docDirName": null,
"name": "breaking-changes-notification-poc",
"org": "folio-org",
"repoLanguageHint": "other",
"repoType": "other",
"snippetIntro": ""
},
{
"defaultBranch": "master",
"description": "The library to handle events from data-import",
Expand Down Expand Up @@ -584,7 +594,7 @@
{
"defaultBranch": "master",
"description": "Dependency Injection support for FOLIO backend modules",
"docDirName": null,
"docDirName": "doc",
"name": "folio-di-support",
"org": "folio-org",
"repoLanguageHint": "java",
Expand Down Expand Up @@ -1359,7 +1369,8 @@
"workflows": [
"api-doc.yml",
"api-lint.yml",
"api-schema-lint.yml"
"api-schema-lint.yml",
"build.yml"
],
"workflowsFolio": [
"api-doc.yml",
Expand Down
50 changes: 46 additions & 4 deletions _remote/mod-search/doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,24 +258,26 @@ The module uses [Testcontainers](https://www.testcontainers.org/) to run Elastic
in embedded mode. It is required to have Docker installed and available on the host where the tests are executed.

### Local environment testing
Run `docker-compose up` in a project root folder.
Navigate to the docker folder in the project and run `docker-compose up`.
This will build local mod-search image and bring it up along with all necessary infrastructure:
- elasticsearch along with dashboards (kibana analogue from opensearch)
- kafka along with zookeeper
- postgres
- wiremock server for mocking external api calls (for example authorization)
-
Also you should invoke

Then, you should invoke
```shell
curl --location --request POST 'http://localhost:8081/_/tenant' \
--header 'Content-Type: application/json' \
--header 'x-okapi-tenant: test' \
--header 'x-okapi-tenant: test_tenant' \
--header 'x-okapi-url: http://api-mock:8080' \
--data-raw '{
"module_to": "mod-search-$version$",
"purge": "false"
}
```
to post some tenant in order to bring up kafka listeners and get indices created.
You can check which tenants enabled by wiremock in the `src/test/resources/mappings/user-tenants.json`
To rebuild mod-search image you should:
- bring down existing containers by running `docker-compose down`
Expand All @@ -287,3 +289,43 @@ Hosts/ports of containers to access functionality:
- `localhost` - host, `5010` - port for remote JVM debug
- `http://localhost:8081` - for calling mod-search REST api. Note that header `x-okapi-url: http://api-mock:8080` should be added to request for apis that take okapi url from headers
- `localhost:29092` - for kafka interaction. If you are sending messages to kafka from java application with `spring-kafka` then this host shoulb be added to `spring.kafka.bootstrap-servers` property of `application.yml`
### Consortium support for Local environment testing
Consortium feature is defined automatically at runtime by calling /user-tenants endpoint.
Consortium feature on module enable is defined by 'centralTenantId' tenant parameter.
Invoke the following
```shell
curl --location --request POST 'http://localhost:8081/_/tenant' \
--header 'Content-Type: application/json' \
--header 'x-okapi-tenant: consortium' \
--header 'x-okapi-url: http://api-mock:8080' \
--data-raw '{
"module_to": "mod-search-$version$",
"parameters": [
{
"key": "centralTenantId",
"value": "consortium"
}
]
}
```

Then execute the following to enable `member tenant`
```shell
curl --location --request POST 'http://localhost:8081/_/tenant' \
--header 'Content-Type: application/json' \
--header 'x-okapi-tenant: member_tenant' \
--header 'x-okapi-url: http://api-mock:8080' \
--data-raw '{
"module_to": "mod-search-$version$",
"parameters": [
{
"key": "centralTenantId",
"value": "consortium"
}
]
}
```
Consider that `tenantParameters` like `loadReference` and `loadSample` won't work because `loadReferenceData`
method is not implemented in the `SearchTenantService` yet.
12 changes: 12 additions & 0 deletions _remote/stripes-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@ Useful recipes for UI patterns appearing in FOLIO modules.
* [Show/Hide Columns in MCL](guides/patterns/ColumnSelector.stories.mdx) -- Give users the ability to select only the data they need to see.
* [Accessible Routing](guides/patterns/AccessibleRouting.stories.mdx) -- Detail the approaches to implementing accessible focus management.

## Working with dates/times in UI-Modules

We provide a handful of components and utilities for date/time functionality.

* **Datepicker, Timepicker, DateRangeWrapper components** - UI-widgets for accepting date/time input.
* **FormattedDate, FormattedUTCDate, FormattedTime** - Cross-browser convenience components for displaying localized representations of system ISO8601 timestamps.
* [dateTimeUtils](util/DateUtils_readme.md) - A handful of utility functions for working with date/time code in application logic.
* **Hooks**
* useFormatDate - presentational date-formatting.
* useFormatTime - presentational time-formatting.
* useDynamicLocale - loading DayJS locale information within functional components (also available in component form, via `DynamicLocaleRenderer`).

## Testing
Stripes Components' tests are automated browser tests powered by
[Karma](http://karma-runner.github.io) and written using
Expand Down
4 changes: 2 additions & 2 deletions guides/api-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The Python script will search the configured directories to find relevant API de
Required. Space-separated list.
* `-e,--excludes` -- List of additional sub-directories and/or files to be excluded (so that the tool will only discover top-level root API description files).
Optional. Space-separated list.
By default it excludes certain well-known directories (such as `raml-util`).
By default it excludes certain well-known directories (such as `raml-util examples headers parameters`).
Use the option `--loglevel debug` to report what is being excluded.

See help for the full list (including the default output directory):
Expand Down Expand Up @@ -100,7 +100,7 @@ Compare with the default files at [folio-org/.github/workflow-templates](https:/

<div class="attention">
NOTE: Using api-doc via Jenkins is <a href="https://issues.folio.org/browse/FOLIO-3678">deprecated</a>.
All relevant back-end repositories are now using GitHub Workflows.
All relevant back-end repositories are now using GitHub Workflows for API-related operations.
</div>

<div class="folio-spacer-content"></div>
Expand Down
4 changes: 2 additions & 2 deletions guides/api-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The Python script will search the configured directories to find relevant API de
Required. Space-separated list.
* `-e,--excludes` -- List of additional sub-directories and/or files to be excluded (so that the tool will only discover top-level root API description files).
Optional. Space-separated list.
By default it excludes certain well-known directories (such as `raml-util`).
By default it excludes certain well-known directories (such as `raml-util schema schemas examples headers parameters`).
Use the option `--loglevel debug` to report what is being excluded.
* `-w,--warnings` -- Cause "warnings" to fail the workflow, in the absence of "violations".
Optional. By default, if there are no "violations", then the workflow is successful and so any "warnings" would not be displayed.
Expand Down Expand Up @@ -117,7 +117,7 @@ Compare with the default files at [folio-org/.github/workflow-templates](https:/

<div class="attention">
NOTE: Using api-lint via Jenkins is <a href="https://issues.folio.org/browse/FOLIO-3678">deprecated</a>.
All relevant back-end repositories are now using GitHub Workflows.
All relevant back-end repositories are now using GitHub Workflows for API-related operations.
</div>

## Reports
Expand Down
2 changes: 2 additions & 0 deletions guides/commence-a-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ See also the guidelines to [Create a new FOLIO module and do initial setup](/gui

Be familiar with the [Getting started](/start/) fundamental documentation and primers.

Consider the [Officially Supported Technologies](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) for upcoming releases (also known as Approved Technologies).

The essential directories and files are explained below for [back-end](#back-end-modules) and [front-end](#front-end-modules) modules.
Of course any module might need extras.

Expand Down

0 comments on commit 03159e9

Please sign in to comment.