Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
* Add content to README.md
* Add docstrings to deposit and listen commands in cli.pu
  • Loading branch information
ehanson8 committed Feb 16, 2022
1 parent 44b621f commit 55cdafe
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
# wiley-deposits
Wiley Deposits


### Crossref to Dublin Core metadata mapping
## Installation

To install, clone the repo and run

```
pipenv run install
```

To install with development dependencies

```
pipenv run install --dev
```

## Runnning commands

To excute a command after installation, run:

```
pipenv run awd deposit
```

The available commands:

`deposit` - Process a text file of DOIs to retrieve and send metadata and PDFs as SQS messages to the DSpace Submission Service. Errors generated during the process are emailed to stakeholders.

`listen` - Retrieve messages from a DSpace Submission output queue and email the results to stakeholders.

`check-permisions` - Confirm AWD infrastructure has deployed properly with correct permissions to all expected resources given the current env configuration.

## Crossref to Dublin Core metadata mapping
Metadata is retrieved from the Crossref API and is mapped to Dublin Core according to this crosswalk:

Crossref field|DC field|Field notes
------ | ------ | -------
Expand Down
5 changes: 5 additions & 0 deletions awd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def deposit(
sqs_input_queue,
collection_handle,
):
"""Process a text file of DOIs to retrieve and send metadata and PDFs as SQS messages
to the DSpace Submission Service. Errors generated during the process are emailed
to stakeholders."""
date = datetime.today().strftime("%m-%d-%Y %H:%M:%S")
stream = ctx.obj["stream"]
s3_client = s3.S3()
Expand Down Expand Up @@ -254,6 +257,8 @@ def listen(
ctx,
retry_threshold,
):
"""Retrieve messages from a DSpace Submission output queue and email the
results to stakeholders."""
date = datetime.today().strftime("%m-%d-%Y %H:%M:%S")
stream = ctx.obj["stream"]
sqs = SQS(ctx.obj["aws_region"])
Expand Down

0 comments on commit 55cdafe

Please sign in to comment.