Skip to content

Commit

Permalink
add support for self-hosted gitlab instances (#631)
Browse files Browse the repository at this point in the history
* support parsing repository urls that require auth
* add support for self-hosted gitlab instances
* be more explicit when parsing url
* bump version to 0.1.19

closes #630
  • Loading branch information
phue authored Feb 15, 2023
1 parent 68a0005 commit 52f2baf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
- Support for remote registries on self-hosted Gitlab instances (0.1.19)
- Support for uninstall and fixing bug in biocontainers install (0.1.18)
- GitHub action to update a registry from a cache or listing (0.1.17)
- Support for "remove" command to more easily remove / uninstall entries
Expand Down
17 changes: 12 additions & 5 deletions shpc/main/registry/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,18 @@ def web_url(self):
"""
Retrieve the web url, either pages or (eventually) custom.
"""
parts = self.source_url.split("/")[3:]
return "https://%s.%s.io/%s/library.json" % (
parts[0],
self.provider_name,
"/".join(parts[1:]),
domain, namespace, repo = self.source_url.split("/")[2:]
domain_parts = domain.split('@')[-1].split(".")

if len(domain_parts) == 2:
domain_parts[1] = "io"
else:
domain_parts.insert(0, "pages")

return "https://%s.%s/%s/library.json" % (
namespace,
".".join(domain_parts),
repo,
)

def exists(self, name):
Expand Down
2 changes: 1 addition & 1 deletion shpc/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__copyright__ = "Copyright 2021-2023, Vanessa Sochat"
__license__ = "MPL 2.0"

__version__ = "0.1.18"
__version__ = "0.1.19"
AUTHOR = "Vanessa Sochat"
EMAIL = "[email protected]"
NAME = "singularity-hpc"
Expand Down

0 comments on commit 52f2baf

Please sign in to comment.