... | ... | @@ -38,7 +38,7 @@ For pedagogical purpose we will create the tree for dbnomics project by creating |
|
|
- dbnomics-source-data
|
|
|
- dbnomics-json-data
|
|
|
- dbnomics-fetcher
|
|
|
and by cloning:
|
|
|
and by **cloning** from source:
|
|
|
- dbnomics-data-model
|
|
|
|
|
|
```bash
|
... | ... | @@ -65,16 +65,16 @@ At the end of the procedure a DBNOMICS fetcher should be ordered in your compute |
|
|
|
|
|
```
|
|
|
|
|
|
All folders inside source-data and json-data MUST follow the naming conventions:
|
|
|
All folders inside source-data and json-data **MUST** follow the naming conventions:
|
|
|
- `<provider_slug>-source-data`
|
|
|
- `<provider_slug>-json-data`
|
|
|
- `<provider_slug>-fetcher`
|
|
|
|
|
|
#### Data_model :tools: FIXME
|
|
|
|
|
|
data_model defines the correct json data model of DB.nomics for one provider produced by a fetcher and exposed in the corresponding dbnomics-json-data.
|
|
|
|
|
|
Data_model consists of a specific library with a set of utils, helpers and shortcodes to convert raw data (source-data) to dbnomics formatted data (json-data).
|
|
|
using json-schema
|
|
|
Inside the virtual env
|
|
|
|
|
|
* `clone` the `repository` dbnomics/data_model
|
|
|
|
... | ... | @@ -99,11 +99,27 @@ using json-schema |
|
|
```bash
|
|
|
|
|
|
(nomics_env) me@mylaptop:~$ ls dbnomics-data_model/
|
|
|
(nomics_env) me@mylaptop:~$ dbnomics_data_model setup.cfg setup.py
|
|
|
(nomics_env) me@mylaptop:~$ build dbnomics_data_model.egg-info README.md setup.py
|
|
|
dbnomics_data_model dist scripts
|
|
|
```
|
|
|
Validate a JSON data Git repository:
|
|
|
|
|
|
* Install the library :tools: FIXME
|
|
|
```sh
|
|
|
./scripts/validate_json_data_git_repository.py <git_repo_dir>
|
|
|
|
|
|
#### for example:
|
|
|
./scripts/validate_json_data_git_repository.py wto-json-data
|
|
|
```
|
|
|
### Test
|
|
|
|
|
|
From a virtualenv in which this package is installed:
|
|
|
|
|
|
```sh
|
|
|
./scripts/test_tree_sample.sh
|
|
|
```
|
|
|
|
|
|
|
|
|
* Install the library :tools: FIXME
|
|
|
|
|
|
|
|
|
```bash
|
... | ... | |