Skip to content

Commit c691ab6

Browse files
committed
More documentation updates.
1 parent 889a6d2 commit c691ab6

File tree

5 files changed

+41
-31
lines changed

5 files changed

+41
-31
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ An experimental Graphical User Interface (GUI) for *bdbag* can be found [here](h
3737

3838
### Dependencies
3939

40-
* [Python 2.7](https://www.python.org/downloads/release/python-2711/) is the minimum Python version required.
40+
* [Python 2.7](https://www.python.org/downloads/release/python-27/) is the minimum Python version required.
4141
* The code and dependencies are also compatible with Python 3, versions 3.3 through 3.6.
4242

4343
### Installation
@@ -71,16 +71,17 @@ The unit tests can be run by invoking the following command from the root of the
7171
python setup.py test
7272
```
7373

74-
### Configuration
75-
76-
See the [Configuration guide](./doc/config.md).
77-
7874
### Usage
7975

8076
This software can be used from the command-line environment by running the **bdbag** script. For detailed usage
8177
instructions, see the [CLI guide](./doc/cli.md).
8278

79+
### Configuration
80+
81+
Some components of the **bdbag** software can be configured via JSON-formatted configuration files.
82+
See the [Configuration guide](./doc/config.md) for further details.
83+
8384
### Application Programming Interface
8485

8586
It is also possible to use **bdbag** from within other Python programs via an API.
86-
See the [API guide](./doc/api.md) for further details.
87+
See the [API guide](/doc/api.md) for further details.

doc/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ and that there are no additional files present that are not listed in either `fe
141141
-----
142142

143143
<a name="make_bag"></a>
144-
#### make_bag(bag_path, update=False, algs=None, prune_manifests=False, metadata=None, metadata_file=None, remote_file_manifest=None, config_file=bdbag.DEFAULT_CONFIG_FILE) ⇒ `bag`
144+
#### make_bag(bag_path, update=False, algs=None, prune_manifests=False, metadata=None, metadata_file=None, remote_file_manifest=None, config_file=bdbag.DEFAULT_CONFIG_FILE, ro_metadata=None, ro_metadata_file=None) ⇒ `bag`
145145
Creates or updates the bag denoted by the `bag_path` argument.
146146

147147
| Param | Type | Description |

doc/cli.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,20 @@ usage: bdbag
3939
#### Extended arguments:
4040
These extended arguments are mapped directly to metadata fields in bag-info.txt:
4141
```
42-
[--source-organization SOURCE_ORGANIZATION]
43-
[--organization-address ORGANIZATION_ADDRESS]
44-
[--contact-name CONTACT_NAME] [--contact-phone CONTACT_PHONE]
42+
[--bag-count BAG_COUNT]
43+
[--bag-group-identifier BAG_GROUP_IDENTIFIER]
44+
[--bag-size BAG_SIZE]
45+
[--bagit-profile-identifier BAGIT_PROFILE_IDENTIFIER]
4546
[--contact-email CONTACT_EMAIL]
47+
[--contact-name CONTACT_NAME]
4648
[--contact-orcid CONTACT_ORCID]
49+
[--contact-phone CONTACT_PHONE]
4750
[--external-description EXTERNAL_DESCRIPTION]
48-
[--external-identifier EXTERNAL_IDENTIFIER] [--bag-size BAG_SIZE]
49-
[--bag-group-identifier BAG_GROUP_IDENTIFIER]
50-
[--bag-count BAG_COUNT]
51-
[--internal-sender-identifier INTERNAL_SENDER_IDENTIFIER]
51+
[--external-identifier EXTERNAL_IDENTIFIER]
5252
[--internal-sender-description INTERNAL_SENDER_DESCRIPTION]
53-
[--bagit-profile-identifier BAGIT_PROFILE_IDENTIFIER]
53+
[--internal-sender-identifier INTERNAL_SENDER_IDENTIFIER]
54+
[--organization-address ORGANIZATION_ADDRESS]
55+
[--source-organization SOURCE_ORGANIZATION]
5456
```
5557
----
5658

@@ -407,7 +409,6 @@ Here's an example of what a `remote-file-manifest` looks like:
407409
"url":"https://raw.githubusercontent.com/fair-research/bdbag/master/profiles/bdbag-profile.json",
408410
"length":723,
409411
"filename":"bdbag-profile.json",
410-
"md5":"4754a1f3204f8b2de547477117f65f6d",
411412
"sha256":"3039ea47828e032ea2fe63679281c50760e68b5773a76f5873c4ae7acdf87951"
412413
},
413414
{
@@ -467,7 +468,6 @@ ark:/88120/r8059v 632860 data/minid_v0.1_Nov_2015.pdf
467468
468469
[mdarcy@dev ~]$ cat test_bag/manifest-md5.txt
469470
470-
4754a1f3204f8b2de547477117f65f6d data/bdbag-profile.json
471471
dad6891eb4148dfed2d162370983d06f data/test1.txt
472472
11069c18ee13a990265cf944359dbca5 data/test2.txt
473473

doc/config.md

+18-10
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ There are two global configuration files: [bdbag.json](#bdbag.json) and [keychai
66
these files with simple default values are automatically created in
77
the current user's home directory the first time a bag is created or opened.
88

9-
Additionally, two JSON-formatted configuration files can be passed as arguments to *bdbag* in order to supply input
10-
for certain bag creation and update functions. These files are known as [metadata](#metadata) and
9+
Additionally, three JSON-formatted configuration files can be passed as arguments to *bdbag* in order to supply input
10+
for certain bag creation and update functions. These files are known as [metadata](#metadata), [ro metadata](#ro_metadata) and
1111
[remote-file-manifest](#remote-file-manifest) configurations.
1212

1313
<a name="bdbag.json"></a>
@@ -145,11 +145,11 @@ Below is a sample *remote-file-manifest* configuration file:
145145
```
146146

147147
<a name="metadata"></a>
148-
## *metadata*
149-
A metadata configuration file consists of a single JSON object containing a set of JSON key-value pairs that will be
150-
written as-is to the bag's `bag-info.txt` file.
148+
## *`bag-info` metadata*
149+
A `bag-info` metadata configuration file consists of a single JSON object containing a set of JSON key-value pairs that will be
150+
written as-is to the bag's `bag-info.txt` file. NOTE: per the `bagit` specification, strings are the only supported value type in `bag-info.txt`.
151151

152-
Below is a sample *metadata* configuration file:
152+
Below is a sample `bag-info` *metadata* configuration file:
153153
```json
154154
{
155155
"BagIt-Profile-Identifier": "https://raw.githubusercontent.com/fair-research/bdbag/master/profiles/bdbag-profile.json",
@@ -159,10 +159,18 @@ Below is a sample *metadata* configuration file:
159159
```
160160

161161
<a name="ro_metadata"></a>
162-
## *ro_metadata*
163-
A Research Object metadata configuration file consists of a single JSON object containing a set of JSON key-object pairs where the `key` is a `/` delimited relative file path and the `object` is any aribitratily complex JSON content. This format allows `bdbag` to process all RO metadata as an aggregation which can then be serialized into individual JSON file components relative to the bag's `metadata` directory.
164-
165-
Below is a sample *ro_metadata* configuration file:
162+
## *`ro` metadata*
163+
A Research Object metadata configuration file consists of a single JSON object containing a set of JSON key-object pairs where
164+
the `key` is a `/` delimited relative file path and the `object` is any aribitratily complex JSON content. This format allows
165+
`bdbag` to process all RO metadata as an aggregation which can then be serialized into individual JSON file components relative
166+
to the bag's `metadata` directory.
167+
168+
NOTE: while this documentation refers to this configuration file a `ro` metadata file,
169+
the contents of this configuration file only have to conform to the [`bagit-ro`](https://github.com/ResearchObject/bagit-ro)
170+
conventions if `bagit-ro` compatibility is the goal. Otherwise, this mechanism can be used as a generic way to create any number of
171+
arbitrary JSON (or JSON-LD) metadata files as `bagit` tagfiles.
172+
173+
Below is a sample *ro metadata* configuration file:
166174
```json
167175
{
168176
"manifest.json": {

setup.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
from setuptools import setup, find_packages
1010

11+
with open('README.md') as readme_file:
12+
readme = readme_file.read()
1113

1214
setup(
1315
name="bdbag",
14-
description="BigData Bag Utilities",
15-
long_description=
16-
"For more information on *bdbag*, visit: https://github.com/fair-research/bdbag/.\n\n"
17-
"For more information on the GUI frontend for *bdbag*, visit: https://github.com/fair-research/bdbag_gui/.\n",
16+
description="Big Data Bag Utilities",
17+
long_description=readme,
18+
long_description_content_type='text/markdown',
1819
url='https://github.com/fair-research/bdbag/',
1920
maintainer='USC Information Sciences Institute, Informatics Systems Research Division',
2021
maintainer_email='[email protected]',

0 commit comments

Comments
 (0)