Closed zyzzyxdonta closed 6 months ago
Hello @zyzzyxdonta
Thank you for letting us know about the issue. Some changes have been made. Please try the URL again and tell us if you spot any problems. Your feedback is greatly appreciated.
Hi @Aidajafarbigloo,
with the new code, it does indeed work. 👍🏻 However, I'm not quite sure if the check is even necessary. The same could be done with one of Django's validators:
from django.core.validators import URLValidator
validate = URLValidator(schemes=["http", "https"])
validate(url)
@zyzzyxdonta
Yes, got your point, and you're right. However, it's useful to know which repository the entered URL is for later on. Then we close this issue.
Many institutional GitLab instances will cause an "Invalid URL" error in SMECS as their domain names do not start with "gitlab". I ran into this with
https://codebase.helmholtz.cloud/heliport/heliport
.https://github.com/NFDI4Energy/SMECS/blob/f929cc6a55ba1fdacc5006033b4c8275ff9fc0a8/meta_creator/url_check_GitLab.py#L22