Skip to content

Commit

Permalink
Try and form a better location for MAP Client repository infromation …
Browse files Browse the repository at this point in the history
…in provenance.
  • Loading branch information
hsorby committed May 15, 2024
1 parent dceafbf commit 62fd2fd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/mapclient/core/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ def _strip_pip_list_output(output_stream):
output[parts[0]] = {'version': parts[1]}
if len(parts) > 2:
if parts[0] == 'mapclient' and os.path.isdir(parts[2]):
output[parts[0]]['location'] = describe_tag(parts[2])
describe_result = describe_tag(parts[2])
describe_parts = describe_result.split('-')
if len(describe_parts) == 1 and describe_parts[0]:
location = remote_locations(parts[2])
else:
location = f'local-repo-{describe_result}'

output[parts[0]]['location'] = location
elif os.path.isdir(parts[2]):
output[parts[0]]['location'] = f'locally-acquired-{describe_tag(parts[2])}'
else:
Expand Down

0 comments on commit 62fd2fd

Please sign in to comment.