Skip to content

Remove remotes from bin/jsonschema_suite #460

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

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

amosonn
Copy link
Contributor

@amosonn amosonn commented Mar 5, 2021

Now it fetches them from the filesystem for serving, checking and displaying.

Two open questions:

  1. Is the dump_remotes command even necessary now? I didn't remove it so it doesn't break anything, but it is now reduced to copying a file tree.
  2. It would be cool if we could also verify that the remotes are valid schemas. The question is of course, for which draft? The only idea I've had so far was to make them available in a similar structure to the tests, under directories for each draft. This is a bit cumbersome (though they could mostly just be symlinked from elsewhere), the advantage is that they can be properly checked and then only used from relevant draft versions. This does require changing the serve infrastructure, either to accept a draft name and serve only the relevant remotes, or to serve them in sub-directories, which requires changes to the tests as well.

Now it fetches them from the filesystem for serving, checking and
displaying
@amosonn amosonn force-pushed the remove-remotes-from-script branch from 54594c3 to ebbcbc8 Compare March 5, 2021 02:18
@Julian
Copy link
Member

Julian commented Mar 10, 2021

Hi! Awesome, thanks so much for trying to tackle this it's gone unfixed for too long... I have to give it a closer look, but let's see if I can answer either question firstly...:

Is the dump_remotes command even necessary now? I didn't remove it so it doesn't break anything, but it is now reduced to copying a file tree.

Honestly I don't know if anyone uses this at this point, the person who originally asked for it was about 6 years ago and the only person who ever wanted it :) -- in theory the point is encapsulation -- even though as you say right now it's just copying a directory, in the future that may not be the case for whatever reason, so having it provides a public API vs saying "rely on the directory layout". Of course on the other hand, we still haven't done #223, so ... yeah I don't know, my inclination is still to leave it for now rather than thinking too hard but obviously thoughts welcome.

Copy link
Member

@Julian Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I think this looks great to me! Will see if you have any comments but then this may well be ready to merge.

@Julian Julian merged commit 3c45b81 into json-schema-org:master Mar 12, 2021
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.

2 participants