Git Product home page Git Product logo

skohub-vocabs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skohub-vocabs's Issues

Data guidance ?

Discovered project via signing up for SWIB20, so forgive me if am jumping ahead, but generating the static site is exactly what we need for a project. I've sort of got it working (tree looks amazing) but I'm obviously failing to get it in quite the right format/sematics. As a sample I have:

<https://data.vam.ac.uk/CIT/CIT284490> a skos:ConceptScheme ;
    dc:description "This is the Project" ;
    dc:title "Project Title" ;
    skos:hasTopConcept <https://data.vam.ac.uk/CIT/CIT286958>,
        <https://data.vam.ac.uk/CIT/CIT286959>,
        <https://data.vam.ac.uk/CIT/CIT286960>,
        <https://data.vam.ac.uk/CIT/CIT286961>,
        <https://data.vam.ac.uk/CIT/CIT286963>,
        <https://data.vam.ac.uk/CIT/CIT287802>,
        <https://data.vam.ac.uk/CIT/CIT288669>,
        <https://data.vam.ac.uk/CIT/CIT289138> 

<https://data.vam.ac.uk/CIT/CIT286960> a skos:Concept ;
    dc:source "A Source" ;
    skos:altLabel "An Alt Label"@en ;
    skos:broader <https://data.vam.ac.uk/CIT/CIT284490> ;
    skos:narrower <https://data.vam.ac.uk/CIT/CIT284537>,
        <https://data.vam.ac.uk/CIT/CIT284541>,
        <https://data.vam.ac.uk/CIT/CIT287833>,
        <https://data.vam.ac.uk/CIT/CIT287835>,
        <https://data.vam.ac.uk/CIT/CIT288261>,
        <https://data.vam.ac.uk/CIT/CIT288365>,
        <https://data.vam.ac.uk/CIT/CIT288428>,
        <https://data.vam.ac.uk/CIT/CIT288441>,
        <https://data.vam.ac.uk/CIT/CIT288546> ;
    skos:prefLabel "Term Label"@en ;
    skos:scopeNote "Scope Notes"@en ;
    skos:topConceptOf <https://data.vam.ac.uk/CIT/CIT284490> .

But for some reason the Title isn't picked up, and pages aren't generated (just the navigation tree).

I would also like the ability to navigate the tree in more than one language ideally, but that's probably a feature request!

Build problems

For reviewing I triggered new builds for test an production at https://github.com/dini-ag-kim/hochschulfaechersystematik/settings/hooks (I made you admin so you can take a look at the webhooks). The test system had a direct response 400 with "Payload was invalid, build not triggered" and production had problems building the page based on the payload, see https://skohub.io/build/?id=3cf02780-c406-429f-b12f-f5b303edcaaa. This is strange (at least for production) as it was build before on both systems (see production and test) and I did not change the file.

Internationalization/localization of a vocab

@sroertgen asked for this via Slack:

weisst Du zufällig, ob es einfach möglich ist, die Sprache in skohub-vocabs auf “de” zu setzen, wenn sie da ist

We should think about how to adress this. There are different options:

  • Let publishers configure the default language to be shown.
  • Choose language based on language header sent by browser

@sroertgen, what do you have in mind?

"followers" and "inbox" keys are not in JSON-LD context

See e.g. https://skohub.io/hbz/vocabs-edu/heads/master/w3id.org/class/esc/n0322.json:

{
  "id":"https://w3id.org/class/esc/n0322",
  "type":"Concept",
  "followers":"https://skohub.io/followers?subject=hbz%2Fvocabs-edu%2Fheads%2Fmaster%2Fw3id.org%2Fclass%2Fesc%2Fn0322",
  "inbox":"https://skohub.io/inbox?actor=hbz%2Fvocabs-edu%2Fheads%2Fmaster%2Fw3id.org%2Fclass%2Fesc%2Fn0322",
  "prefLabel":{
    "en":"Library, information and archival studies"
  },
  "notation":[
    "0322"
  ],
  "broader":{
    "id":"https://w3id.org/class/esc/n032",
    "prefLabel":{
      "en":"Journalism and information"
    }
  },
  "inScheme":{
    "id":"https://w3id.org/class/esc/scheme",
    "title":{
      "en":"Educational Subjects Classification"
    }
  },
  "@context":{
    "id":"@id",
    "type":"@type",
    "@vocab":"http://www.w3.org/2004/02/skos/core#",
    "xsd":"http://www.w3.org/2001/XMLSchema#",
    "dct":"http://purl.org/dc/terms/",
    "schema":"http://schema.org/",
    "vann":"http://purl.org/vocab/vann/",
    "title":{
      "@id":"dct:title",
      "@container":"@language"
    },
    "description":{
      "@id":"dct:description",
      "@container":"@language"
    },
    "issued":{
      "@id":"dct:issued",
      "@type":"xsd:date"
    },
    "created":{
      "@id":"dct:created",
      "@type":"xsd:date"
    },
    "modified":{
      "@id":"dct:modified",
      "@type":"xsd:date"
    },
    "creator":"dct:creator",
    "publisher":"dct:publisher",
    "preferredNamespacePrefix":"vann:preferredNamespacePrefix",
    "preferredNamespaceUri":"vann:preferredNamespaceUri",
    "isBasedOn":"schema:isBasedOn",
    "source":"dct:source",
    "prefLabel":{
      "@container":"@language"
    },
    "definition":{
      "@container":"@language"
    },
    "scopeNote":{
      "@container":"@language"
    },
    "note":{
      "@container":"@language"
    },
    "notation":{
      "@container":"@set"
    },
    "narrower":{
      "@container":"@set"
    },
    "narrowerTransitive":{
      "@container":"@set"
    },
    "broaderTransitive":{
      "@container":"@set"
    }
  }
}

Add labels to linked objects

For example instead of:

{
   "id":"http://w3id.org/class/hochschulkompass/S349#",
   "type":"Concept",
   "broader":{
      "id":"http://w3id.org/class/hochschulkompass/B348#"
   },
   "inScheme":{
      "id":"http://w3id.org/class/hochschulkompass/scheme#"
   }
}

it should be:

{
   "id":"http://w3id.org/class/hochschulkompass/S349#",
   "type":"Concept",
   "broader":{
      "id":"http://w3id.org/class/hochschulkompass/B348#",
      "prefLabel":{
         "de":"Philosophie"
      }
   },
   "inScheme":{
      "id":"http://w3id.org/class/hochschulkompass/scheme#",
      "title":{
         "de":"Fächersystematik Hochschulbildung in Deutschland"
      }
   }
}

Vocabulary versioning?

Would it make sense to provide a mechanism for vocabulary versioning like described here?: NatLibFi/Skosmos#677

That's just an idea. I'm not sure about it at all (it seems to overlap with what Ilik/Koster are after), and also I am not sure what it would require in terms of github history parsing/mapping... But it seems like a nice thing to have, especially insofar as this is already linked with github.

Support configuration of order

...at best per level of hierarchy. Current example is https://test.skohub.io/dini-ag-kim/hochschulfaechersystematik/w3id.org/class/hochschulfaechersystematik/scheme.html

Currently, all levels are obviously ordered alphabetically by prefLabel. The original classification is ordered by notation on the first and second level and alphabetically on the third and lowest hierarchy level, see https://www.destatis.de/DE/Methoden/Klassifikationen/Bildung/studenten-pruefungsstatistik.pdf?__blob=publicationFile

To reach the same ordering in SkoHub, it would be great to somehow configure the ordering per level.

Do not require "narrower" statements

From #85. Currently, narrower statements are required in the turtle file for hierarchical relationships being shown in the UI, broader are not. It would be good if you could choose only one of both and the vocab would build as expected.

Make inboxes optional

For small controlled vocabularies like the "Audience Role" vocab it might not really make sense to have an inbox for each element. Thus, it would be nice to be able to turn off inboxes and SkoHub pubsub functions.

@literarymachine, we have talked about a Yaml config file in the repo along with a vocabulary. This would be a good place for configuring this. (I think each ttl file could have a yml file with the same name.)

URIs with hyphens are not supported

I published the NWBib spatial classification with ~4,500 concepts via SkoHub: https://skohub.io/acka47/nwbib-spatial/heads/master/nwbib.de/spatial.html

As you can see, only the top level concepts are shown on the left-hand side with no possibility to expand the narrower concepts. The concepts themselves are there, though, see e.g. https://skohub.io/acka47/nwbib-spatial/heads/master/nwbib.de/spatial.html#Q61726649 or https://skohub.io/acka47/nwbib-spatial/heads/master/nwbib.de/spatial.html#33

Rename service

Currently, it still reads SkoHub-SSG on the web page. This should be replaced with "SkoHub Vocabs".

gatsby-source-filesystem fails with "EMFILE: too many open files"

When working with larger files (e.g. https://raw.githubusercontent.com/sroertgen/oeh-framework-bb/master/data/curriculum_bb_competences_skos.ttl) skohub-vocabs failed with the error: EMFILE: too many open files.

This gatsby issue seems to be related: gatsbyjs/gatsby#12011

I did a quick test installing graceful-fs and implementing the following like mentioned above in gatsby-node.js and webHookServer.js:

const gracefulFs = require('graceful-fs');
gracefulFs.gracefulify(fs);

Before making a pull request I would like to ask if you get the same error or it might be something special to my machine.

Offer vocab list page per user/organization

This was addressed in today's meeting by the OER metadata group of DINI AG KIM. It would be nice to have an overview of all vocabs published with SkoHub by a particular GitHub/GitLab organization or user. For example, at https://skohub.io/hbz/ should be a list of all vocabs from https://skohub.io/hbz/vocabs-edu/ and https://skohub.io/hbz/lobid-vocabs/ (where currently nothing is listed so that this is not a good example but I don't know a better one).

Support content negotiation

For the start, we should at least support JSON-LD. Currently, it does not work:

$ curl -LIH "Accept: application/ld+json" http://w3id.org/class/hochschulfaecher/scheme
HTTP/1.1 301 Moved Permanently
Date: Mon, 19 Aug 2019 11:38:08 GMT
Server: Apache/2.4.7 (Ubuntu)
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubDomains
Location: https://w3id.org/class/hochschulfaecher/scheme
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 302 Found
Date: Mon, 19 Aug 2019 11:38:08 GMT
Server: Apache/2.4.7 (Ubuntu)
Access-Control-Allow-Origin: *
Location: https://test.skohub.io/literarymachine/skos/w3id.org/class/hochschulfaecher/scheme
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 406 Not Acceptable
Date: Mon, 19 Aug 2019 11:38:08 GMT
Server: Apache/2.4.18 (Ubuntu)
Alternates: {"scheme.html" 1 {type text/html} {length 299785}}, {"scheme.index" 1 {type text/index} {length 650627}}, {"scheme.json" 1 {type application/json} {length 60354}}
Vary: negotiate,accept
TCN: list
Content-Type: text/html; charset=iso-8859-1

In the long run, we might also support other RDF serializations.

Vulnerabilities

Don't know if this is actually of importance - however, every time i do $ npm i it's warning

found 16160 vulnerabilities (16156 high, 4 critical)
run npm audit fix to fix them, or npm audit for details

My npm version is:

$ npm --version
6.9.0

When I do the audit fix, some packages are downgraded like e.g.:

"convert-source-map": "1.6.0" => "convert-source-map": "^1.1.0",

Even so, things seems to be builded and running just fine.

Also, my npm prefixes the version numbers of the packages with an ^ , I think to be even more on the sure side that the version number will be the correct one.

You may reject this PR, just in case, to let you know, for what it's worth.

Support local namespaces

It would be great to just publish a SKOS vocab on GitHub and then be able to have all the functionality in SkoHub without setting up a redirect.

Background

I wanted to publish https://github.com/tawahle/destatis_faecherklassifikation/blob/master/faecherklassifikation.rdf with SkoHub for interested parties to inspect the vocabulary. Everything worked quite well, the classification was shown as expected. However, clicking on a concept made a problem of course, because the concept URIs (namespace https://onto.tib.eu/destf/cs/) do not redirect to SkoHub (in fact, they do not go anywhere).

As I am not in control of the domain and did not want to use another HTTP namespace where I'd have to setup a redirect myself, I tried to use a local namespaces. This did not work, and in fact sometimes even broke the other Skohub-published vocab in the repo:

Error when running npm run build or npm run develop

Hello,

I tried to follow your blog entry (http://blog.lobid.org/2019/09/27/presenting-skohub-vocabs.html#implementation) and documentation along, but when running npm run build or npm run develop I get the following error:

> [email protected] develop /skohub/skohub-vocabs
> gatsby develop

success open and validate gatsby-configs - 0.065s
success load plugins - 1.245s
success onPreInit - 0.011s
success initialize cache - 0.097s
success copy gatsby files - 0.149s
success onPreBootstrap - 0.024s

 ERROR

Encountered an error parsing the provided GraphQL type definitions:
Syntax Error: Expected Name, found }

  21 |     inbox: String
  22 |   }
  23 |
  24 |   type LanguageMap {
  25 |
> 26 |   }
     |   ^
  27 |


not finished createSchemaCustomization - 0.065s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2020-02-07T18_22_43_407Z-debug.log

log file:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'develop' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predevelop', 'develop', 'postdevelop' ]
5 info lifecycle [email protected]~predevelop: [email protected]
6 info lifecycle [email protected]~develop: [email protected]
7 verbose lifecycle [email protected]~develop: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~develop: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/steffenroertgen/gwdg_owncloud/coding/skohub/skohub-vocabs/node_modules/.bin:/usr/local/opt/python/libexec/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Users/steffenroertgen/.npm-global/bin
9 verbose lifecycle [email protected]~develop: CWD: /Users/steffenroertgen/gwdg_owncloud/coding/skohub/skohub-vocabs
10 silly lifecycle [email protected]~develop: Args: [ '-c', 'gatsby develop' ]
11 silly lifecycle [email protected]~develop: Returned: code: 1  signal: null
12 info lifecycle [email protected]~develop: Failed to exec develop script
13 verbose stack Error: [email protected] develop: `gatsby develop`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/steffenroertgen/gwdg_owncloud/coding/skohub/skohub-vocabs
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "develop"
18 verbose node v13.7.0
19 verbose npm  v6.13.6
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] develop: `gatsby develop`
22 error Exit status 1
23 error Failed at the [email protected] develop script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.