Skip to content

A locally executable script + Apache Jena + Queries to generate (mostly statistical) reports on LOSH data in MD + PDF & HTML exports

License

Notifications You must be signed in to change notification settings

OPEN-NEXT/LOSH-Reporter

Repository files navigation

REUSE status

LOSH-Reporter

The LOSH reporter is couple of files that, given the LOSH OKH RDF data, produce a human-readable report with statistical diagrams about selected aspects of the OSH projects, together with some manually written prose around it.

Technolog wise, it is Jupyter-Lab (ex Jupyter-Notebook) based. It runs as a headless CLI script, though one would usually edit the template in the Jupyter-Lab Web UI.

The LOSH reporter generates its report simultaneously in Markdown, PDF and HTML reports.

Supported OSH Platforms

  • Wikifactory.com
    • per API
  • OSHWA Certification List
    • per API
  • Thinigverse.com
    • per API (+ workaround due to #xxxx)
    • We needed to be very economical with data fields here, since due to API bugs, we can't filter their database – we're checking out every thing on thingiverse and every datafield is a new request. There are 5+ Mio. things on Thingiverse × the number of data fields → you can do the math :)
  • GitHub.com
    • per global search for manifest files
  • Appropedia.org
    • per script, exporting manifest files to GitHub.com
  • OKHv1
    • per script, exporting manifest files to GitHub.com

Note on other platforms:

  • GitLab.com
    • does not yet support global file search (#2263, #14597), which is a blocker for crawling. we currently only have manually indexed projects from this platform.

Edit the template

  1. Install Jupyter-Lab
  2. Make shure you have the LOSH RDF DB set-up locally with Apache Jena and Jena-Fuseki. You can do that most easily with our RDF-DB tester, by following the instructions in its README. When you run its web-ui script, Jena Fuseki should be running, and you are ready to go.
  3. Run it, and open the report file: jupyter-lab report.ipynb

Comment:

  • While the report speaks of OSH projects, the OKH-LOSH specification defines OSH modules. In data specifications in this repo, we'll use the OKH-LOSH notion.
  • If not otherwise noted, numbers refer to modules, ignoring their different versions.
  • …hence calculations are (if not otherwise noted) run on the total LOSH data

Installation

Data server

To test and run the reporter locally you can use a dockerized Apache Jena instance.

Start the Apache Jena database with docker-compose up within the fuseki folder.

Environment variables

To start the reporter this environment variables need to be set:

  • FUSEKI_URL
  • FUSEKI_DATASET_NAME

An example can be found in .env.example. Those values can be used for development.

Running the reporter

Run the BASH shell script generate, and the generated reports will appear in the output folder.

License

The LOSH Reporter is licensed under GPL-3.0-or-later, the generated reports are licensed under CC-BY-4.0.

References

About

A locally executable script + Apache Jena + Queries to generate (mostly statistical) reports on LOSH data in MD + PDF & HTML exports

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages