-
Notifications
You must be signed in to change notification settings - Fork 34
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
CLI loads local file #148
CLI loads local file #148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! Might want to add a few tests to sanity check.
Hmm. This is challenging because you still need a "top" type (e.g. for Right now schema-dts-gen always expect a A few solutions:
|
please have a look at it - I haven't got much experience with testing file system access in node. Also a minor issue: Running the lint-fix modifies all the files, including json-files. In the comparison view I don't see any difference, is there a OS-specific file or line ending? I tried it both on windows and on WSL2 |
I've seen this before too. Running git add on all the changed files suffices: they stop showing up in the commit, but the linter stops complaining. Not sure why it's happening. |
Looks good! What did you decide to do with the fact that .nt files might not include references to |
My opinion after some experimenting is that this library is named "schema-dts" so that problem is out of the scope of this library. For now I put
into my ontology to get a "local" build. Another example for scope: SDO has a particular way of describing type-relationships, uses The thing is that schema.org is (afaik) blocked in mainland China, so an online approach to linked data build pipelines would stop working there. For that case I believe it makes sense to let people build from local files. |
Sounds good. FWIW, within reason, I'm happy to support some widely used predicates that declare ontologies. I've had a longstanding hope to support OA for example. But Schema.org support will always be a higher priority. |
OA looks really interesting and potentially useful! Thanks for sharing the link. Do you have a usage example? For a lot of the linked data projects I find it difficult to find them used "in the wild", but they're more thought-through than the average REST or GraphQL API. |
I was sure I had an issue showing an example usage in the wild, but I can't seem to find it. Point taken re: finding usages "in the wild", but unless you have a better idea (Im all ears!), it seems like a necessary evil to prevent a tool from becoming ad hoc. |
In my experience it looks like the low entry barrier of an ad hoc-tool drives usage, people want something they can play with. Otherwise there's a lot of concern that the constraints are limiting instead of guarding. So now I first look at existing devX and UX and then at how much I like a concept. Did that the other way around before: The value proposition of schema.org is still pretty abstract, that's why I like this library: It improves ease of use a lot. I'm trying to get an idea of how popular the topic is with implementers, so I've written a post about it. So far either my writing or the topic didn't get much attention ;) |
Nice post! -- and yes, attention on dev.to is pretty hit or miss. Point taken, and there's definitely a trade-off to be made somewhere on this spectrum.
This is a fair statement to make about linked data and the Semantic Web in general, as concepts. But take a look at how people suggest new schemas for Schema.org for a time and a few patterns will emerge:
Using schema.org purely as an API language might get you more headaches than benefits in the general case, unless the data your representing benefits from being seen a set of entities in a semantic graph. But your mileage may vary. |
Forry for the delay, but this is finally included in v0.8.3 |
Fixes #145
the --ontology argument will have priority, unless it explicitly isn't prefixed with "https://", then there's an additional --file argument now. So you have to deliberatly switch it off, like so:
schema-dts-gen --ontology=doNotUse --file=./somefolder/ontology.nt