You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lectern is Overture's Data Dictionary Schema Manager, providing a system for defining Schemas that will validate the structured data collected by an application. The core of Lectern is a web-server application that handles storage and version management of data dictionaries. Lectern data dictionaries are collections of schemas that define the structure of tabular data files (like TSV). This application provides functionality to validate the structure of data dictionaries, maintain a list of dictionary versions, and to compute the difference between dictionary versions.
@@ -23,45 +23,58 @@ The repository is organized with the following directory structure:
23
23
.
24
24
├── apps/
25
25
│ └── server
26
-
├── libraries/
27
-
│ ├── common
28
-
│ └── dictionary
29
26
└── packages/
30
-
└── client
27
+
├── client
28
+
├── common
29
+
├── dictionary
30
+
└── validation
31
31
```
32
32
33
-
The modules in the monorepo are organized into three categories:
33
+
The modules in the monorepo are organized into two categories:
34
34
35
35
*__apps/__ - Standalone processes meant to be run. These are published to [ghcr.io](https://ghcr.io) as container images.
36
-
*__libraries/__ - Interal modules shared between other apps, libraries, and packages.
37
-
*__packages/__ - Packages published to [NPM](https://npmjs.com) meant to be imported into other TypeScript applications.
36
+
*__packages/__ - Reusable packages shared between applications and other packages. Packages are published to [NPM](https://npmjs.com).
37
+
*__scripts__ - Utility scripts for use within this repo.
38
38
39
-
| Component | Type| Package Name | Path | Published Location | Description |
|[Lectern Server](apps/server/README.md)| Application | server| apps/server/|[GHCR](https://github.com/overture-stack/lectern/pkgs/container/lectern)| Lectern Server web application. |
42
-
|[Lectern Client](packages/client/README.md)| Package|@overture-stack/lectern-client| packages/client |[NPM](https://www.npmjs.com/package/@overturebio-stack/lectern-client)| TypeScript Client to interact with Lectern Server and perform data validation. |
43
-
|[common](libraries/common/README.md)|Library| common| libraries/common/|N/A | Non-specific but commonly reusable utilities. Includes shared Error classes.|
44
-
|[dictionary](libraries/dictionary/README.md)|Library | dictionary | libraries/dictionary/ | N/A| Dictionary meta-schema definition, includes TS types, and Zod schemas. This also exports all utilities for getting the diff of two dictionaries, and for validating data records with a Dictionary.|
39
+
| Component | Package Name | Path | Published Location | Description|
|[Lectern Server](apps/server/README.md)|@overture-stack/lectern-server| apps/server/|[](https://github.com/overture-stack/lectern/pkgs/container/lectern)| Lectern Server web application.|
42
+
|[Lectern Client](packages/client/README.md)|@overture-stack/lectern-client| packages/client |[](https://www.npmjs.com/package/@overture-stack/lectern-client)| TypeScript Client to interact with Lectern Server and Lectern data dictionaries. This library provides a REST client to assist in fetching data from the Lectern server. It also exposes the functionality from the Lectern Validation library to use a Lectern data dictionary to validate data.|
43
+
|[Lectern Dictionary](packages/dictionary/README.md)||@overture-stack/lectern-dictionary|[](https://www.npmjs.com/package/@overture-stack/lectern-dictionary)| Dictionary meta-schema definition, includes TS types, and Zod schemas. This also exports all utilities for getting the diff of two dictionaries.|
44
+
|[Lectern Validation](packages/validation/README.md)|@overture-stack/lectern-validation| packages/validation/|[](https://www.npmjs.com/package/@overture-stack/lectern-client)| Validate data using Lectern Dictionaries.|
45
45
46
46
## Developer Instructions
47
47
48
48
You can install all dependencies for the entire repo from the root (as defined the `pnpm-lock.yaml`) with the command:
49
49
50
50
`pnpm install`
51
51
52
-
Using `nx` will ensure all local dependencies are built, in the correct sequence, when building, running, or testing any of the applications and packages in the repo. To run a package.json script from any module - after installing dependencies - use a command of the form `pnpm nx <script> <package name>`. For example, to `build` the module `server` can be done with the command:
52
+
Using `nx` will ensure all local dependencies are built, in the correct sequence, when building, running, or testing any of the applications and packages in the repo. To run a package.json script from any module - after installing dependencies - use a command of the form `pnpm nx <script> <package name>`. For example, to `build` the server module `@overture-stack/lectern-server` can be done with the command:
53
53
54
-
`pnpm nx build server`
54
+
`pnpm nx build @overture-stack/lectern-server`
55
55
56
56
This will ensure that all dependencies of `server` are built in correct order before the `server` build is run.
57
57
58
-
To work with any module in this repository, follow the instructions in the README provide in the module directory.
58
+
Note that the full name of from the package must be used for this to work, so for the client the command would be:
59
+
60
+
`pnpm nx build @overture-stack/lectern-client`
61
+
62
+
For convenience, scripts have been added to the root level [`package.json`](./package.json) to run `build` and `test` scripts for every service using short names. These follow the pattern `pnpm <build|test>:<package short name/alias>`. For example, the same build command can be performed by:
63
+
64
+
`pnpm build:client`
65
+
66
+
To work with any module in this repository, follow the instructions in the README provide in that module's directory.
59
67
60
68
Get started by running the [Lecter Server application](apps/server/README.md).
61
69
62
70
### Common Commands
63
71
64
72
A few commonly reused scripts have been added to the root `package.json`. Run them from the root directory, or if you are in a sub directory then use `pnpm -w`.
73
+
74
+
For example, when your current working directory is not in the project root, you can still conveniently test every module in the monorepo with the command:
75
+
76
+
`pnpm -w test:all`
77
+
65
78
#### Build Everything
66
79
67
80
`pnpm build:all`
@@ -72,30 +85,26 @@ This will build all modules.
72
85
73
86
`pnpm test:all`
74
87
75
-
This will test everything, building all dependencies needed to fully test.
88
+
This will test all modules in the repo.
76
89
77
-
## Additonal Content
90
+
## Additional Content
78
91
79
92
In addition to the code for Lectern, this repository contains some useful reference material.
80
93
81
94
### Meta-Schema
82
95
83
96
Lectern provides a meta-schema definition that describes the structure of Lectern Dictionaries. The generated JSON Schema formatted copy of this schema can be found at [`./generated/DictionaryMetaSchema.json`](./generated/DictionaryMetaSchema.json).
84
97
85
-
This can be used as a programing language agnostic schema for external applications that want to validate, generate, or interact with Lectern Dictionaries.
98
+
This can be used as a programing language agnostic schema for external applications to validate Lectern Dictionaries.
86
99
87
-
> **Note:**
100
+
> [!NOTE]
88
101
>
89
102
> Don't manually update any files in the `./generated` path. This content is programatically generated from the source code.
90
103
91
-
### Sample Dictionaries
92
-
93
-
94
-
95
104
## Support & Contributions
96
105
97
106
We welcome community contributions! Please follow our [code of conduct](./code_of_conduct.md)
98
107
99
108
- Filing an [issue](https://github.com/overture-stack/ego/issues)
100
109
- Connect with us on [Slack](http://slack.overture.bio)
101
-
- Add or Upvote a [feature request](https://github.com/overture-stack/ego/issues?q=is%3Aopen+is%3Aissue+label%3Anew-feature)
110
+
- Add or Upvote a [feature request](https://github.com/overture-stack/ego/issues?q=is%3Aopen+is%3Aissue+label%3Anew-feature)
0 commit comments