Skip to content

Commit

Permalink
Merge pull request #52 from CHIMEFRB/51-bug-datatrail-pull-on-canfar-…
Browse files Browse the repository at this point in the history
…doesnt-set-group

51 bug datatrail pull on canfar doesnt set group
  • Loading branch information
tjzegmott committed Jan 9, 2024
2 parents 0ad2cd0 + 5e3b966 commit 7f2fa63
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ repos:
- --line-width=88
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
- hooks:
- args:
- --max-line-length=89
- --max-complexity=15
id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
- hooks:
- args:
- --py36-plus
id: pyupgrade
repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
rev: v3.15.0
- hooks:
- id: black
repo: https://github.com/psf/black
Expand All @@ -37,7 +37,7 @@ repos:
- --no-implicit-optional
id: mypy
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.8.0
- hooks:
- args:
- --convention=google
Expand All @@ -48,7 +48,7 @@ repos:
- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.16.0
- hooks:
- exclude: ^docs/*
id: trailing-whitespace
Expand All @@ -67,14 +67,14 @@ repos:
- id: check-symlinks
- id: detect-private-key
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
- hooks:
- args:
- -iii
- -lll
id: bandit
repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.7.6
- hooks:
- additional_dependencies:
- radon
Expand All @@ -93,4 +93,4 @@ repos:
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: 3.2.0
rev: v3.13.0
2 changes: 1 addition & 1 deletion dtcli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def list():
@click.option(
"--site",
"-s",
type=click.STRING,
type=click.Choice(["chime", "canfar", "kko", "gbo", "hco", "local"]),
help="Site to initialise Datatrail CLI for.",
required=True,
)
Expand Down
10 changes: 8 additions & 2 deletions dtcli/src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,14 @@ def get_files(
destinations = [(directory + f).replace("//", "/") for f in files]
# make directory structure if it does not exist.
folders = {os.path.dirname(path) for path in destinations}
for folder in folders:
os.makedirs(folder, exist_ok=True)
if site == "canfar":
for folder in folders:
os.makedirs(folder, exist_ok=True)
os.system(f"chgrp -R chime-frb-rw {folder}") # nosec
os.system(f"chmod -R g+w {folder}") # nosec
else:
for folder in folders:
os.makedirs(folder, exist_ok=True)
cadcclient.pget(
source=files, destination=destinations, processors=cores, verbose=verbose
)
Expand Down

0 comments on commit 7f2fa63

Please sign in to comment.