Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: accept github urls longer than organization/repo segments #1692

Closed
wants to merge 9 commits into from

Conversation

pierrecamilleri
Copy link
Collaborator

@pierrecamilleri pierrecamilleri commented Oct 11, 2024

It looks like reading user (or organization) and repository names for the Github portal from the URL are faulty, as it was not expecting more than two URL segments.

I relaxed this constraint, and parsing user (or org) and repository names now work even if the URL continues.

I performed the manual test :

fricitonless validate https://github.com/DCMLab/dcml_corpora/releases/download/v2.1/dcml_corpora.datapackage.json

that seems to work.

Additionnal thoughts :

  • all tests related to github portal are actually skipped ! pytest.mark.skip doc
  • I added some tests to confirm the above behavior.
  • Documentation code for github portal was not working because it was pointing to a non-existant repo. I changed it a little with another repo.

@pierrecamilleri pierrecamilleri changed the title fix: Properly read user and repo for github portal for github portal fix: properly read user and repo for github portal for github portal Oct 11, 2024
@pierrecamilleri pierrecamilleri changed the title fix: properly read user and repo for github portal for github portal fix: accept github urls longer than organization/repo segments Nov 20, 2024
@pierrecamilleri
Copy link
Collaborator Author

Sorry, I was on the wrong track: I hadn't quite understood how the Github portal worked.

Validation seemed to work because the /DCMLab/dcml_corpora repo also contains files to be validated, but this is not the expected behavior for the url provided.

@pierrecamilleri pierrecamilleri deleted the fix/github-portal branch November 20, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot access URLs
1 participant