-
Notifications
You must be signed in to change notification settings - Fork 1
Description
#!/bin/bash
#SBATCH --partition=cclake
#SBATCH --account=ACCOUNT
#SBATCH --mem=1Gb
#SBATCH --time=01:00:00
#SBATCH --job-name=test_transfer_bam
#SBATCH --output=transfer_bam_%A_%a.out
#SBATCH --error=transfer_bam_%A_%a.err
#SBATCH --array=1
BAM_FILE=$(sed -n "${SLURM_ARRAY_TASK_ID}p" newnew_test.txt)
source /home/user/.bashrc
conda activate gen3_transfer
gen3-client configure --profile=aced --cred=credentials.json --apiendpoint=https://aced-idp.org
export G3T_PROFILE=aced
export G3T_PROJECT=aced-evotypes
g3t ping
g3t add "$BAM_FILE"
g3t meta init
g3t commit -m "adding test file"
g3t push
Sometimes returns this in the std.err:
Uncommitted changes found. Please commit or stash them first.
If one then runs g3t status the following is returned:
No data file changes.
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: META/DocumentReference.ndjson
Untracked files:
(use "git add <file>..." to include in what will be committed)
MANIFEST/.g3t/
MANIFEST/logs/
...
This blocker can be fixed by:
git add META/ && git commit -m "Add META dir"
[master 8ccee9c] Add META dir
1 file changed, 1 insertion(+)
g3t push
What is potentially confusing for an average user is they may not realize META/DocumentReference.ndjson automatically populates with additional text whenever the user runsg3t meta init. If g3t meta init was run only once, I don't think this would likely arise as a problem, or if the user did a git add META/DocumentReference.ndjson at the top of their workflow (which might be a workable solution), this could be avoided.
But esentially, because one is tacitly updating DocumentReference.ndjson, one then has to use thegit add META/DocumentReference.ndjson && git commit -m "commit" workaround before get push will work. Might be good to either g3t add META/ from the jump or at least notify the user of the potential error and putative solution.