Skip to content

Commit 6c9b35a

Browse files
committed
Update README.md
1 parent 7f275c5 commit 6c9b35a

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

README.md

+19-25
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ISIMIP publisher
22
================
33

4-
[![Python Version](https://img.shields.io/badge/python-3.6|3.7|3.8|3.9|3.10-blue)](https://www.python.org/)
4+
[![Python Version: 3.6|3.7|3.8|3.9|3.10](https://img.shields.io/badge/Python-3.6|3.7|3.8|3.9|3.10-blue)](https://www.python.org/)
5+
[![License: MIT](http://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ISI-MIP/isimip-publisher/blob/master/LICENSE)
56
[![pytest Workflow Status](https://github.com/ISI-MIP/isimip-publisher/actions/workflows/pytest.yml/badge.svg)](https://github.com/ISI-MIP/isimip-publisher/actions/workflows/pytest.yml)
6-
[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/ISI-MIP/isimip-publisher/blob/master/LICENSE)
77

88
A command line tool to publish climate impact data from the ISIMIP project. This tool is used for the [ISIMIP repository](https://data.isimip.org).
99

@@ -49,17 +49,16 @@ usage: isimip-publisher [-h] [--config-file CONFIG_FILE] [-i INCLUDE_FILE]
4949
[-e EXCLUDE_FILE] [-v VERSION]
5050
[--remote-dest REMOTE_DEST] [--remote-dir REMOTE_DIR]
5151
[--local-dir LOCAL_DIR] [--public-dir PUBLIC_DIR]
52-
[--archive-dir ARCHIVE_DIR]
53-
[--resource-dir RESOURCE_DIR] [--database DATABASE]
52+
[--archive-dir ARCHIVE_DIR] [--database DATABASE]
5453
[--mock MOCK] [--protocol-location PROTOCOL_LOCATIONS]
55-
[--datacite-metadata-url DATACITE_METADATA_URL]
56-
[--datacite-doi-url DATACITE_DOI_URL]
5754
[--datacite-username DATACITE_USERNAME]
5855
[--datacite-password DATACITE_PASSWORD]
56+
[--datacite-prefix DATACITE_PREFIX]
57+
[--datacite-test-mode DATACITE_TEST_MODE]
5958
[--isimip-data-url ISIMIP_DATA_URL]
6059
[--rights {None,CC0,BY,BY-SA,BY-NC,BY-NC-SA}]
6160
[--log-level LOG_LEVEL] [--log-file LOG_FILE]
62-
{list_remote,list_local,list_public,match_remote,match_local,match_public,fetch_files,write_jsons,update_jsons,insert_datasets,update_datasets,publish_datasets,archive_datasets,check,clean,update_index,run,insert_doi,update_doi,register_doi,init}
61+
{list_remote,list_local,list_public,match_remote,match_local,match_public,fetch_files,write_jsons,update_jsons,insert_datasets,update_datasets,publish_datasets,archive_datasets,check,clean,update_index,run,insert_doi,update_doi,register_doi,link_files,link_datasets,link,init}
6362
...
6463
6564
optional arguments:
@@ -83,24 +82,20 @@ optional arguments:
8382
Public directory
8483
--archive-dir ARCHIVE_DIR
8584
Archive directory
86-
--resource-dir RESOURCE_DIR
87-
Resource metadata directory
8885
--database DATABASE Database connection string, e.g. postgresql+psycopg2:/
8986
/username:password@host:port/dbname
90-
--mock MOCK If set to True no files are actually copied. Empty
87+
--mock MOCK If set to True, no files are actually copied. Empty
9188
mock files are used instead
9289
--protocol-location PROTOCOL_LOCATIONS
9390
URL or file path to the protocol
94-
--datacite-metadata-url DATACITE_METADATA_URL
95-
Metadata endpoint for the DataCite MDS API, default:
96-
https://mds.datacite.org/metadata
97-
--datacite-doi-url DATACITE_DOI_URL
98-
DOI endpoint for the DataCite MDS API, default:
99-
https://mds.datacite.org/doi
10091
--datacite-username DATACITE_USERNAME
101-
Username the DataCite MDS API
92+
Username for DataCite
10293
--datacite-password DATACITE_PASSWORD
103-
Password the DataCite MDS API
94+
Password for DataCite
95+
--datacite-prefix DATACITE_PREFIX
96+
Prefix for DataCite
97+
--datacite-test-mode DATACITE_TEST_MODE
98+
If set to True, the test version of DataCite is used
10499
--isimip-data-url ISIMIP_DATA_URL
105100
URL of the ISIMIP repository [default:
106101
https://data.isimip.org/]
@@ -113,8 +108,7 @@ optional arguments:
113108
subcommands:
114109
valid subcommands
115110
116-
{list_remote,list_local,list_public,match_remote,match_local,match_public,fetch_files,write_jsons,update_jsons,insert_datasets,update_datasets,publish_datasets,archive_datasets,check,clean,update_index,run,insert_doi,update_doi,register_doi,init}
117-
111+
{list_remote,list_local,list_public,match_remote,match_local,match_public,fetch_files,write_jsons,update_jsons,insert_datasets,update_datasets,publish_datasets,archive_datasets,check,clean,update_index,run,insert_doi,update_doi,register_doi,link_files,link_datasets,link,init}
118112
```
119113

120114
The different steps of the publication process are covered by subcommands, which can be invoked separately.
@@ -149,7 +143,7 @@ isimip-publisher archive_datasets <path>
149143
isimip-publisher ingest_doi <resource-path>
150144

151145
# register a DOI resource with datacite
152-
isimip-publisher ingest_doi <DOI>
146+
isimip-publisher register_doi <DOI>
153147
```
154148

155149
`<path>` starts from `REMOTE_DIR`, `LOCAL_DIR`, etc., and *must* start with `<simulation_round>/<product>/<sector>`. After that more levels can follow to restrict the files to be processed further.
@@ -159,18 +153,18 @@ isimip-publisher ingest_doi <DOI>
159153
`match_remote`, `fetch_files`, `write_jsons`, `ingest_datasets`, and `publish_datasets` can be combined using `run`:
160154

161155
```bash
162-
isimip-publisher <path> run
156+
isimip-publisher run <path>
163157
```
164158

165159
For all commands a list of files with absolute pathes (as line separated txt file) can be provided to restrict the files processed, e.g.:
166160

167161
```bash
168-
isimip-publisher -f /path/to/files.txt <path> run
162+
isimip-publisher -e exclude.txt -i include.txt run <path>
169163
```
170164

171165
Default values for the optional arguments are set in the code, but can also be provided via:
172166

173-
* a config file given by `--config-file`, or located at `isimip-qc.conf`, `~/.isimip-qc.conf`, or `/etc/isimip-qc.conf`. The config file needs to have a section `isimip-publisher` and uses lower case variables and underscores, e.g.:
167+
* a config file given by `--config-file`, or located at `isimip.conf`, `~/.isimip.conf`, or `/etc/isimip.conf`. The config file needs to have a section `isimip-publisher` and uses lower case variables and underscores, e.g.:
174168
```
175169
[isimip-publisher]
176170
log_level = ERROR
@@ -195,7 +189,7 @@ Test
195189
Install test dependencies:
196190
197191
```
198-
pip install -r requirements/dev.txt
192+
pip install -r requirements/pytest.txt
199193
```
200194
201195
Copy `.env.pytest` to `.env`. This sets the environment variables to the directories in `testing`.

0 commit comments

Comments
 (0)