galaxyproject / galaxyproject/planemo

planemo shed_update --help does not explain return codes

Open
#296 1 comment 0 reactions 0 assignees View on GitHub
docs missing enhancement help wanted toolshed
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

e.g. With an actual change to a file:

```
$ emacs tools/mira3/README.rst
$ git commit -m "Update copyright year" tools/mira3/README.rst
[master 8423277] Update copyright year
1 files changed, 1 insertions(+), 1 deletions(-)
[galaxy@ppserver galaxy_mira]$ planemo shed_update -t testtoolshed --fail_fast --force_repository_creation tools/mira3 ; echo "Returned $?"
cd '/tmp/galaxy_mira/tools/mira3' && git rev-parse HEAD
cd '/tmp/galaxy_mira/tools/mira3' && git diff --quiet
Repository mira_assembler updated successfully.
Repository metadata updated.
Returned 0
```

I'm guessing zero/success means an update was done?

Here I attempted to change just the meta-data:

```
$ emacs tools/mira3/.shed.yml
$ git commit -m "Suggest using MIRA 4 onwards" tools/mira3/.shed.yml
[master ea6742e] Suggest using MIRA 4 onwards
$ git commit -m "Suggest using MIRA 4 onwards" tools/mira3/.shed.yml
[master ea6742e] Suggest using MIRA 4 onwards
1 files changed, 1 insertions(+), 1 deletions(-)
[galaxy@ppserver galaxy_mira]$ planemo shed_update -t testtoolshed --fail_fast --force_repository_creation tools/mira3 ; echo "Returned $?"
cd '/tmp/galaxy_mira/tools/mira3' && git rev-parse HEAD
cd '/tmp/galaxy_mira/tools/mira3' && git diff --quiet
Could not update mira_assembler
Unexpected response from galaxy: 400: {"content_alert": "", "err_msg": "No changes to repository."}
Repository metadata updated.
Failed to update a repository.
Returned 255
```

Here I changed nothing:

```
$ planemo shed_update -t testtoolshed --fail_fast --force_repository_creation tools/mira3 ; echo "Returned $?"
cd '/tmp/galaxy_mira/tools/mira3' && git rev-parse HEAD
cd '/tmp/galaxy_mira/tools/mira3' && git diff --quiet
Could not update mira_assembler
Unexpected response from galaxy: 400: {"content_alert": "", "err_msg": "No changes to repository."}
Repository metadata updated.
Failed to update a repository.
Returned 255
```

It is unclear here from the output & return code if the metadata update actually applied any changes or not... but the none zero return code of 255 presumably means no files changed?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.