Skip to content

Commit

Permalink
Merge pull request #1 from CCBR/dev
Browse files Browse the repository at this point in the history
updated parkit with parkit_e2e and slurm support
  • Loading branch information
kopardev authored Mar 22, 2024
2 parents 9c58045 + 48445ab commit a911fc5
Show file tree
Hide file tree
Showing 38 changed files with 6,347 additions and 5,514 deletions.
1 change: 1 addition & 0 deletions .custom-codespell-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DNE
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
**/site/*
**.koparde*
**/.koparde*
**/*.pyc
**/.prettierrc
**/*.tmp
**/createtar.*.err
**/createtar.*.out
**/deposittar.*.err
**/deposittar.*.out
**/createmetadata.*.out
**/createmetadata.*.err
**/createemptycollection.*.err
**/createemptycollection.*.out
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
exclude: |
(?x)(
^assets/|
^docs/.*.html|
^_extensions/
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
# - id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
# spell check
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: ["--ignore-words=.custom-codespell-dictionary.txt"]
# https://github.com/codespell-project/codespell/issues/1498
# Python formatting
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
# R formatting
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.1.2
hooks:
- id: style-files
# general linting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
# enforce commit format
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.3.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/citation-file-format/cffconvert
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# gitignore
.nextflow*
work/
data/
results/
.DS_Store
*.code-workspace
assets/*.html
_extensions
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## v1.0

### Features/Bugs

- `parkit` added... built using python
- `parkit_e2e` added ... uses `parkit` and "slurm"
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## parkit

**Park** an **arc**hived project tool**kit**!

> DISCLAIMERS:
>
> - works only on [BIOWULF](https://hpc.nih.gov/) or HELIX
> - moves files to [HPC-DME](https://hpcdmeweb.nci.nih.gov/login)
### Usage:

```bash
./parkit --help
usage: parkit [-h] {createtar,createmetadata,createemptycollection,deposittar} ...

parkit subcommands to park data in HPCDME

positional arguments:
{createtar,createmetadata,createemptycollection,deposittar}
Subcommand to run
createtar create tarball(and its filelist) from a project folder.
createmetadata create the metadata.json file required for a tarball (and its filelist)
createemptycollection
creates empty project and analysis collections
deposittar deposit tarball(and filelist) into vault

options:
-h, --help show this help message and exit
```

### Example:

- Say you want to archive `/data/CCBR/projects/CCBR-12345` folder to `/CCBR_Archive/GRIDFTP/CCBR-12345` collection on HPC-DME
- you can run the following commands sequentially to do this:

```bash
# create the tarball
./parkit createtar --folder /data/CCBR/projects/ccbr_12345

# create an empty collection on HPC-DME
./parkit createemptycollection --dest /CCBR_Archive/GRIDFTP/CCBR-12345 --projectdesc "testing" --projecttitle "test project 1"

# create required metadata
./parkit createmetadata --tarball /data/CCBR/projects/ccbr_12345.tar --dest /CCBR_Archive/GRIDFTP/CCBR-12345

# deposit the tar into HPC-DME
./parkit deposittar --tarball /data/CCBR/projects/ccbr_12345.tar --dest /CCBR_Archive/GRIDFTP/CCBR-12345

# bunch of extra files are created in the process
ls /data/CCBR/projects/ccbr_12345.tar*
/data/CCBR/projects/ccbr_12345.tar /data/CCBR/projects/ccbr_12345.tar.filelist.md5 /data/CCBR/projects/ccbr_12345.tar.md5
/data/CCBR/projects/ccbr_12345.tar.filelist /data/CCBR/projects/ccbr_12345.tar.filelist.metadata.json /data/CCBR/projects/ccbr_12345.tar.metadata.json

# these extra files can now be deleted
rm -f /data/CCBR/projects/ccbr_12345.tar*

# you can also deleted the recently parked project folder
rm -rf /data/CCBR/projects/ccbr_12345

# Done!
```
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
1 change: 1 addition & 0 deletions bin/parkit
Loading

0 comments on commit a911fc5

Please sign in to comment.