-
Notifications
You must be signed in to change notification settings - Fork 4
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
Extract prefix list into its own library #55
Comments
Good point, I think it makes sense to reflect what we were trying to do and what we might want to do in the future and then decide what should be done next. My initial goal in another repo was to have predefined prefixes that I could use anywhere, a bit like a pre-configured namespaces that would be used within the code but also when I for example serialize to Turtle or do something with JSON-LD. When we started working on that we started to source ontologies, which was more difficult than it should be so we thought it makes sense to store them as well so we don't have to go through that pain every time we need classes/properties of vocabularies. After that we created prefix.zazuko.com because that made sense with what we had as a base. Later we added some APIs to the prefix service so we can use that from tools that need autocomplete. So my current list of things that would be useful are
We used it in various ways, I fetched a list of classes/properties for certain prefixes via the API provided by prefix.zazuko.com but some colleagues used it differently. So @bergos @tpluscode @martinmaillard @vhf @l00mi @mchlrch any comments here? |
Cue @tpluscode/rdf-ns-builders which @thewilkybarkid mentions above. You gave me an idea to maybe also generate exports of only property name and only class names, etc.
I believe that rdf-vocabularies provides this feature nicely?
this might be useful in browser environment if it can make do without importing the large-ish RDF/JS dependencies |
I like this idea, it looks clean and simple. |
@tpluscode yes it does, I just want to list all possible use-cases I could think of |
I just got this idea to extract the code used to generate this package contents (index, etc.) as well as the generator of This would allow others to create their own similar packages for other ontologies which we might not want to incorporate in this list for some reason. |
@thewilkybarkid coming back to this, is the problem the total size of this package? Granted, it is bound to grow until we break it up into smaller pieces (if ever) but at runtime your application would not be affected thanks to tree shaking and dynamic imports. You can Is this good enough to close? |
Yeah, it was about NPM usage rather than runtime. This is made worse when using Docker, though BuildKit helps locally as you can now mount in a cache during the build (but not in CI). |
Ok, here's another idea. @ktk how about a |
I think we should reflect how we use it right now and how we might use it in the future. Not a problem for me to split things but I would do it in a way that it stays like this for a while. Right now is very JS centric but the content/ontologies are useful in many other contexts as well. |
We recently looked at some docker image of our apps. We managed to get it down to ~350 MB where 80 MB was the vocabularies package I think it does justify the need to separate the actual datasets. |
@zazuko/rdf-vocabularies
is quite large (nearly 20MB). tpluscode/rdf-ns-builders@3019d71 was committed to avoid forcing this as a runtime dependency, but there are still cases where it would be useful to have a simple library containing just prefixes.js to avoid having to hard-code the IRIs elsewhere (eg libero/article-store#260 (comment)).Would it be possible to extract this into its own package? (
@zazuko/rdf-vocabulary-prefixes
or something?)The text was updated successfully, but these errors were encountered: