Skip to content

Commit 0e9d058

Browse files
authored
Merge pull request #351 from Duke-GCB/ddd-documentation
Update README replacing ddsclient with ddd
2 parents 10fba27 + 8294cad commit 0e9d058

2 files changed

Lines changed: 31 additions & 82 deletions

File tree

README.md

Lines changed: 29 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# DukeDSClient [![CircleCI](https://circleci.com/gh/Duke-GCB/DukeDSClient.svg?style=svg)](https://circleci.com/gh/Duke-GCB/DukeDSClient) [![Coverage Status](https://coveralls.io/repos/github/Duke-GCB/DukeDSClient/badge.svg)](https://coveralls.io/github/Duke-GCB/DukeDSClient)
22

3-
This command line program will allow you to upload, download, and manage projects in the [duke-data-service](https://github.com/Duke-Translational-Bioinformatics/duke-data-service).
3+
This command line program (`ddd`) will allow you to upload, download, and manage projects in the [DHTS Storage as a Service](https://azurestorage.duhs.duke.edu/). Previously there was a `ddsclient` command line tool that is now deprecated.
44

55
For help email <gcb-help@duke.edu>.
66

77

88
# Requirements
99

10-
- [python](https://www.python.org/) - version 3.5+
10+
- [python](https://www.python.org/) - version 3.7+
1111

12-
__NOTE:__ When installing Python on Windows be sure to check the `Add Python to PATH` checkbox. This will avoid a problem where `pip3` and/or `ddsclient` cannot be found.
12+
__NOTE:__ When installing Python on Windows be sure to check the `Add Python to PATH` checkbox. This will avoid a problem where `pip3` and/or `dds` cannot be found.
1313

1414
# Installation:
1515

@@ -25,37 +25,52 @@ The above commmand will install the latest version of DukeDSClient from [PyPI](h
2525
If you receive a permission denied error it may be due to you not having superuser or administrative privileges on your machine. You can run `pip3` with the [`--user` scheme](https://docs.python.org/3/install/index.html#alternate-installation-the-user-scheme) or create a [virtual environment](https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments) to work around this limitation.
2626
Please see [the tutorial on installing packages](https://packaging.python.org/tutorials/installing-packages/) for more details.
2727

28+
## Storage Setup
29+
Before you can use the `ddd` command line tool you must create a File System (container) at https://azurestorage.duhs.duke.edu/.
30+
2831
### Config file setup.
2932

30-
DukeDSClient requires a config file containing your credentials used to access the duke-data-service.
31-
Complete details are available in the [configuration documentation](https://github.com/Duke-GCB/DukeDSClient/wiki/Configuration).
33+
DukeDSClient requires a config file at `~/.ddsclient` containing settings used to access the backing storge.
34+
Minimally the config file must contain two fields:
35+
- `azure_storage_account` - Azure storage account that contains your Azure container
36+
- `azure_container_name` - Azure container where your projects(top level folders) will exist.
37+
38+
The simplest way to find these two values is from the **URL** field for your File System (container) at https://azurestorage.duhs.duke.edu/.
39+
40+
For example if the **URL** field is `https://mylab.dfs.core.windows.net/sequencing-data` the `azure_storage_account` field should be `mylab` and the `azure_container_name` should be `sequencing-data`.
3241

33-
##### Create credentials and config file
42+
The config file is in YAML format so for the above example the contents should be:
43+
```
44+
azure_storage_account: mylab
45+
azure_container_name: sequencing-data
46+
```
47+
#### Delivery Config
3448

35-
[Instructions for adding agent and user keys to the user config file.](https://github.com/Duke-GCB/DukeDSClient/wiki/Agent-User-Keys-(setup))
49+
If you wish to use the **deliver** command you must add a `delivery_token` field to the config file.
50+
Email <gcb-help@duke.edu> for help getting this token.
3651

3752
### Usage:
3853
See general help screen:
3954

4055
```
41-
ddsclient -h
56+
ddd -h
4257
```
4358

4459
See help screen for a particular command:
4560

4661
```
47-
ddsclient <command> -h
62+
ddd <command> -h
4863
```
4964

5065
All commands take the form:
5166
```
52-
ddsclient <command> <arguments...>
67+
ddd <command> <arguments...>
5368
```
5469

5570
### Upload:
5671

5772
```
58-
ddsclient upload -p <ProjectName> <Folders/Files...>
73+
ddd upload -p <ProjectName> <Folders/Files...>
5974
```
6075

6176
This will create a project with the name ProjectName in the duke data service for your user if one doesn't exist.
@@ -66,13 +81,13 @@ Any items that already exist with the same hash will not be uploaded.
6681
Example: Upload a folder named 'results' to new or existing project named 'Analyzed Mouse RNA':
6782

6883
```
69-
ddsclient upload -p 'Analyzed Mouse RNA' results
84+
ddd upload -p 'Analyzed Mouse RNA' results
7085
```
7186

7287
### Download:
7388

7489
```
75-
ddsclient download -p <ProjectName> [Folder]
90+
ddd download -p <ProjectName> [Folder]
7691
```
7792

7893
This will download the contents of ProjectName into the specified folder.
@@ -83,41 +98,14 @@ If Folder is not specified it will use the name of the project with spaces trans
8398
Example: Download the contents of project named 'Mouse RNA' into '/tmp/mouserna' :
8499

85100
```
86-
ddsclient download -p 'Mouse RNA' /tmp/mouserna
101+
ddd download -p 'Mouse RNA' /tmp/mouserna
87102
```
88103

89104
#### Downloading to a file share
90105

91106
To download a project onto a file share (such as a CIFS share) specify a path within the share for the `Folder` to download directly there.
92107

93108

94-
### Add User To Project:
95-
96-
#### Using duke netid:
97-
98-
```
99-
ddsclient add-user -p <ProjectName> --user <Username> --auth-role 'project_admin'
100-
```
101-
102-
Example: Grant permission to user with username 'jpb123' for a project named 'Analyzed Mouse RNA' with default permissions:
103-
104-
```
105-
ddsclient add-user -p 'Analyzed Mouse RNA' --user 'jpb123'
106-
```
107-
108-
#### Using email:
109-
110-
```
111-
ddsclient add-user -p <ProjectName> --email <Username> --auth-role 'project_admin'
112-
```
113-
114-
Example: Grant permission to user with email 'ada.lovelace@duke.edu' for a project named 'Analyzed Mouse RNA' with default permissions:
115-
116-
```
117-
ddsclient add-user -p 'Analyzed Mouse RNA' --email 'ada.lovelace@duke.edu'
118-
```
119-
120-
121109
### Developer:
122110

123111
Install dependencies:
@@ -139,42 +127,3 @@ Run the tests
139127
```
140128
python setup.py test
141129
```
142-
143-
144-
145-
### Data Service Web Portal:
146-
[Duke Data Service Portal](https://dataservice.duke.edu).
147-
This also requires a [Duke NetID](https://oit.duke.edu/email-accounts/netid/).
148-
149-
### Upload Settings
150-
The default upload settings is to use a worker per cpu and upload 100MB chunks.
151-
You can change this via the `upload_bytes_per_chunk` and `upload_workers` config file options.
152-
These options should be added to your `~/.ddsclient` config file.
153-
`upload_workers` should be an integer for the number of upload workers you want.
154-
`upload_bytes_per_chunk` is the size of chunks to upload. Specify this with MB extension.
155-
156-
Example config file setup to use 4 workers and 200MB chunks:
157-
```
158-
upload_workers: 4
159-
upload_bytes_per_chunk: 200MB
160-
```
161-
162-
### Alternate Service:
163-
The default url is `https://api.dataservice.duke.edu/api/v1`.
164-
You can customize this via the `url` config file option.
165-
Example config file setup to use the __uatest__ server:
166-
```
167-
url: https://apiuatest.dataservice.duke.edu/api/v1
168-
```
169-
170-
You also can specify an alternate url for use with ddsclient via the `DUKE_DATA_SERVICE_URL` environment variable.
171-
Here is how you can set the environment variable so ddsclient will connect to the 'dev' url:
172-
```
173-
export DUKE_DATA_SERVICE_URL='https://apidev.dataservice.duke.edu/api/v1'
174-
```
175-
This will require using the associated portal to get a valid keys.
176-
177-
You will need to specify an `agent_key` and `user_key` in the config file appropriate for the particular service.
178-
179-
180-

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'azure-identity',
2121
'azure-mgmt-storage',
2222
'azure-storage-file-datalake',
23-
'msgraph-core',
23+
'msgraph-core==0.2.2',
2424
],
2525
test_suite='nose.collector',
2626
tests_require=['nose', 'mock'],
@@ -36,6 +36,6 @@
3636
'Topic :: Utilities',
3737
'License :: OSI Approved :: MIT License'
3838
],
39-
python_requires='>=3.5',
39+
python_requires='>=3.7',
4040
)
4141

0 commit comments

Comments
 (0)