Skip to content
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

🚚 use token option when creating client #4

Merged
merged 4 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions d3b_dff_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ def main():
parser_url.set_defaults(func=check_url)

# Volume Command
volume_parser = subparsers.add_parser("volume", help="Dewrangle volume commands")
volume_subparsers = volume_parser.add_subparsers(
title="Dewrangle Subcommands", dest="volume_command"
dewrangle_parser = subparsers.add_parser("dewrangle", help="Dewrangle commands")
dewrangle_subparsers = dewrangle_parser.add_subparsers(
title="Dewrangle Subcommands", dest="dewrangle_command"
)

# volume hash subcommand
hash_parser = add_hash_arguments(volume_subparsers)
hash_parser = add_hash_arguments(dewrangle_subparsers)

args = parser.parse_args()

Expand Down
12 changes: 10 additions & 2 deletions d3b_dff_cli/modules/dewrangle/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,22 @@ def get_billing_groups(client, org_id):
return billing_groups


def load_and_hash_volume(bucket_name, study_name, region, prefix=None, billing=None, aws_cred=None):
def load_and_hash_volume(
bucket_name,
study_name,
region,
prefix=None,
billing=None,
aws_cred=None,
token=None,
):
"""
Wrapper function that checks if a volume is loaded, and hashes it.
Inputs: AWS bucket name, study name, aws region, and optional volume prefix.
Output: job id of parent job created when volume is hashed.
"""

client = create_gql_client()
client = create_gql_client(token)

job_id = None

Expand Down
14 changes: 14 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
aiohttp==3.9.3
aiosignal==1.3.1
anyio==4.3.0
async-timeout==4.0.3
attrs==23.2.0
backoff==2.2.1
certifi==2023.11.17
charset-normalizer==3.3.2
exceptiongroup==1.2.0
frozenlist==1.4.1
gql==3.5.0
graphql-core==3.2.3
idna==3.6
multidict==6.0.5
numpy==1.24.4
pandas==2.0.3
pysam==0.22.0
python-dateutil==2.8.2
pytz==2023.3.post1
requests==2.31.0
six==1.16.0
sniffio==1.3.1
typing_extensions==4.10.0
tzdata==2023.4
urllib3==2.1.0
yarl==1.9.4