Skip to content

Clarify error message re unspecified gitlab project#5907

Merged
mih merged 1 commit intodatalad:maintfrom
mih:bf-5764
Aug 17, 2021
Merged

Clarify error message re unspecified gitlab project#5907
mih merged 1 commit intodatalad:maintfrom
mih:bf-5764

Conversation

@mih
Copy link
Member

@mih mih commented Aug 17, 2021

Issue

% datalad create-sibling-gitlab --site gitlab.com
create_sibling_gitlab(error): . (dataset) [No project path specified, and no configuration to derive one]

% datalad create-sibling-gitlab -h
Usage: datalad create-sibling-gitlab [-h] [--site SITENAME] [--project NAME/LOCATION]
                                     [--layout {hierarchy|collection|flat}] [--dataset DATASET] [-r] [-R LEVELS]
                                     [-s NAME] [--existing {skip|error|reconfigure}] [--access {http|ssh|ssh+http}]
                                     [--publish-depends SIBLINGNAME] [--description DESCRIPTION] [--dryrun]
                                     [PATH ...]

The error message is hinting at a missing PATH, but --project is
required instead.

This change standardizes on using the terms from the existing metavar
spec, in the docs and the error message to reduce the confusion:

create_sibling_gitlab(error): . (dataset) [No project name/location specified, and no configuration to derive one]

Fixes #5764

Issue
```
% datalad create-sibling-gitlab --site gitlab.com
create_sibling_gitlab(error): . (dataset) [No project path specified, and no configuration to derive one]

% datalad create-sibling-gitlab -h
Usage: datalad create-sibling-gitlab [-h] [--site SITENAME] [--project NAME/LOCATION]
                                     [--layout {hierarchy|collection|flat}] [--dataset DATASET] [-r] [-R LEVELS]
                                     [-s NAME] [--existing {skip|error|reconfigure}] [--access {http|ssh|ssh+http}]
                                     [--publish-depends SIBLINGNAME] [--description DESCRIPTION] [--dryrun]
                                     [PATH ...]
```

The error message is hinting at a missing PATH, but --project is
required instead.

This change standardizes on using the terms from the existing metavar
spec, in the docs and the error message to reduce the confusion:

```
create_sibling_gitlab(error): . (dataset) [No project name/location specified, and no configuration to derive one]
```

Fixes datalad#5764
@mih mih linked an issue Aug 17, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 17, 2021

Codecov Report

Merging #5907 (377ab18) into maint (7d1f2bf) will decrease coverage by 60.77%.
The diff coverage is n/a.

❗ Current head 377ab18 differs from pull request most recent head 691925a. Consider uploading reports for the commit 691925a to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##            maint    #5907       +/-   ##
===========================================
- Coverage   90.32%   29.54%   -60.78%     
===========================================
  Files         300      297        -3     
  Lines       42396    42360       -36     
===========================================
- Hits        38294    12517    -25777     
- Misses       4102    29843    +25741     
Impacted Files Coverage Δ
datalad/distributed/create_sibling_gitlab.py 18.83% <ø> (-55.85%) ⬇️
datalad/tests/test_api.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/support/digests.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_config.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/ui/tests/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test__main__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_strings.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/ui/tests/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/support/tests/utils.py 0.00% <0.00%> (-100.00%) ⬇️
... and 247 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d1f2bf...691925a. Read the comment docs.

@mih mih added the semver-patch Increment the patch version when merged label Aug 17, 2021
@mih
Copy link
Member Author

mih commented Aug 17, 2021

OK, I complained about the message, I think it is better now. Will merge now-ish.

@mih mih merged commit c6e0e4d into datalad:maint Aug 17, 2021
@mih mih deleted the bf-5764 branch August 17, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Increment the patch version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing error message

1 participant