-
Notifications
You must be signed in to change notification settings - Fork 33
PEP 426: Define a JSON-LD context as part of the proposal #31
Comments
So, this is somewhat of a frequent documentation need,
| Homepage: ...
| Src: git https://bitbucket.org/./.
| Download: .../download/
| Issues: bitbucket.org/././issues
| Docs: `<https://containsparens_(disambiguation)>`__
[... add'l ad-hoc attributes] Before writing this as (most minimal, ordered) inline blocks, I wrote 'bobcat' (which requires FuXi for OWL schema reasoning) and one day drafted some thoughts for a 'sphinxcontrib-rdf' extension to add roles and directives.
More practically, how do I simulate pip install without running any setup.py files (traverse and solve from the given Requirements rules)?
And then positive externalities of exposing JSON[-LD] that is schema.org compatible:
An broader discussion for/with really tools in any language for/with RDFJS: https://text.allmende.io/p/rdfjs (see
|
Also of potential interest would be linking this in to the ISO/IEC Software Identification effort: http://tagvault.org/about/ |
Do they have URNs that could be the object of a (pypi:projectname, ex:, urn:x-tagvault:xyz) triple? |
The total graph of install_requires and extras_require
|
|
[EDIT] ~fulltext cc here, emphasis added, markdown |
Here is the XSD schema for "[ISO/IEC 19770-2:2009 Software Identification Tag Standard]" from http://tagvault.org/standards/swid_tagstandard/: AFAIU, there is not yet support for ISO/IEC 19770-2:2009 "Software Identification (SWID) Tag Standard" tags in schema.org (e.g. schema.org/SoftwareApplication).
|
Possible prefix URIs (these don't have to resolve as deferencable URLs (they are URIs)):, but it's helpful if there is an HTML(+RDFa) representation there, for reference, which links to the source vocabs)
Docs on creating schema.org extension vocabulary for [Python] packages:
[EDIT] Links |
#PEP426JSONLD |
@westurner #WhatDoHashTagsMean? |
Should there be / would it be useful to have:
|
... So, in Linked Data terminology, the package URN URI ( |
For the distro metadata question, that's the main reason the draft metadata 2.0 proposal moves project details out to a metadata extension: https://www.python.org/dev/peps/pep-0459/#the-python-project-extension Having the project metadata in an extension means it is then trivial to re-use the same format for redistributor metadata: https://www.python.org/dev/peps/pep-0459/#the-python-integrator-extension For the pkgname to URI question: what practical problem will that solve for Python developers? What will they be able to do if metadata 2.0 defines that mapping that they won't be able to do if we don't define it? |
Got it, thanks hadn't been aware of this draft spec.
Linked Data names things with namespaced URIs for many of the same reasons that Python uses namespaces.
Practical utility of this:
|
If, in the future, I want to store checksums for each and every file in a package (so that they can be later reviewed), what do I key that auxiliary document to? Should I be able to just ingest 1+ JSON-LD documents into an [in-memory, ..., RDF] graph datastore? This is a graph of packages which happened to have fit a given set of constraints on a given date and time, with a given What I would like is:
IIUC, currently, the suggested solution is "just rebuild [in a venv [in a Docker container named 'distro']] and re-run the comprehensive test suite". |
The currently suggested solution for cryptographic assurance of repeated installations is to use peep to capture the hash of the Python components in the requirements.txt file: https://pypi.python.org/pypi/peep If you want full traceability, then Nix is a better fit than any other current packaging system: http://nixos.org/nix/about.html Offering these kinds of capabilities by default isn't a current design goal for the upstream Python ecosystem, since they can already be added by the folks that need them, and providing them by default doesn't help lower barriers to entry for new users. |
FWIW pip 8.0 will include peep’s functionality built into pip (though it is opt in by adding hashes to your requirements file). |
Is/should this also be defined in "PEP 0508 -- Dependency specification for Python Software Packages" https://www.python.org/dev/peps/pep-0508/ ? ... 👍 |
{
"@graph": {
"actions": [
{"@type": "InstallAction",
"command": "pip install -U pip",
"description": "log message",
"packages": [
{"name": "pip", "version": "7.1.2", "versionwas": "7.1.0",
"versionspec_constraint": ">=7.0.0",
# ... pypi/pip/json metadata ...
}
]}
]}
} Then indexing on |
A JSON-LD journal of package Actions [and inlined-metadata.json] would be an improvement over (PEP376 .dist-info directories) and (pip-log.txt, pip.log) because:
https://github.com/pypa/interoperability-peps/blob/master/pep-0376-installation-db.rst pip log
|
A JSONLD context for the current JSON would need an "index map" to skip over the version keys; but in JSONLD 2.0, we would need the ability to not skip but apply the key to each nested record. |
|
This discusdion indicates that there may be need to add reified edges for packages which, according to maintainers and/or index maintainers, supersede existing packages (e.g. PIL -> pillow)
|
I finally found time to investigate JSON-LD as Wes Turner has regularly suggested. It does look like a good fit for what I want to achieve with the metadata 2.0 spec: http://www.w3.org/TR/json-ld/#basic-concepts
Also useful to me was this blog post from the JSON-LD lead editor: http://manu.sporny.org/2014/json-ld-origins-2/
I've long ignored the semantic web people because they tend to design and create overengineered solutions that are completely impractical for real world use. Sporny's post persuaded me that JSON-LD wasn't like that, and hence worth investigating further.
The text was updated successfully, but these errors were encountered: