-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to repair GitHub pages deployment. #12
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
abee39b
Trying to repair GitHub pages deployment.
jeff-cohere 7200d18
Updating GH pages deployment settings.
jeff-cohere ec01b72
Updating content to test site push.
jeff-cohere 5444735
A first stab at an Overview.
jeff-cohere cf39f42
Fleshing things out a bit.
jeff-cohere 21f77e5
Adding Python markup syntax.
jeff-cohere File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,67 @@ | ||
# dtspy: a Python client for the [Data Transfer System](https://kbase.github.io/dts/) | ||
# dtspy: a Python client for the Data Transfer System (DTS) | ||
|
||
The `dtspy` Python client allows you to use the [DTS](https://kbase.github.io/dts/) | ||
to search for files and transfer them between several organizations supported | ||
by the Department of Energy (DOE) Biological and Environmental Research (BER) | ||
program: | ||
|
||
* [JGI Data Portal (JDP)](https://data.jgi.doe.gov/) | ||
* [DOE National Microbiome Data Collaborative (NMDC)](https://microbiomedata.org/) | ||
* [DOE Biology Knowledgebase(KBase)](https://www.kbase.us) | ||
* More coming soon! | ||
|
||
You can use `dtspy` to create a client that connects to a DTS server, and use | ||
that client to | ||
|
||
* search for data files within databases supported by the above organizations, | ||
obtaining their canonical IDs and metadata identifying their provenance | ||
* request the transfer of one or more of these data files between databases by | ||
using canonical file IDs | ||
|
||
## Prerequisites for Using `dtspy` | ||
|
||
To use the DTS Python client, you need | ||
|
||
* Python 3.12 | ||
* an [ORCID account](https://orcid.org/register) | ||
* a [KBase developer account](https://docs.kbase.us/development/create-a-kbase-developer-account) with a | ||
[developer token](https://kbase.github.io/kb_sdk_docs/tutorial/3_initialize.html#set-up-your-developer-credentials) | ||
|
||
DTS uses KBase's authentication server, so the token associates your DTS client | ||
with your KBase account, allowing you to transfer files to it. | ||
|
||
## Installation | ||
|
||
We recommend installing `dtspy` in a [virtual environment](https://docs.python.org/3/library/venv.html) | ||
alongside any tools or workflows you use to analyze the data you're working with. | ||
You can install `dtspy` using `pip` (or `pip3`): | ||
|
||
``` | ||
pip install dtspy | ||
``` | ||
|
||
## Quickstart | ||
|
||
Below is an example describing how to create a DTS client connected to a server, | ||
search for files within the JGI Data Portal, and print their metadata. | ||
|
||
|
||
``` | ||
import dts | ||
import os | ||
|
||
# to avoid putting your developer token in your Python scripts, store it | ||
# in an environment variable like `DTS_KBASE_DEV_TOKEN` | ||
token = os.getenv('DTS_KBASE_DEV_TOKEN') | ||
|
||
# connect to the DTS server | ||
dts_client = dts.Client(api_key = token, | ||
server = "https://lb-dts.staging.kbase.us") | ||
|
||
# search the JGI Data Portal for files related to prochlorococcus, a small | ||
# marine cyanobacteria | ||
files = dts_client.search(database = 'jdp', | ||
query = 'prochlorococcus') | ||
print(files) | ||
|
||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you append
py
to the three ticks, it will format the code as if it were python!