rue-a / provo Goto Github PK
View Code? Open in Web Editor NEWPROV-O API for Python
License: MIT License
PROV-O API for Python
License: MIT License
Handle PROV-O graph construction in the ProvGraph class (rather than directly using rdflib
functions). Add serialize function that exports the model in different formats.
"ProvStore is a free service for storing, viewing and collaborating on provenance documents."
Export should be fairly easy to implement. Import probably requires integration of the full PROV-Data Model.
Add export capabilities for image formats.
Most classes are defined in provClasses.py
. Refactor to one file per class!
Currently, the ProvGraph
Class only know the PROV-O starting terms. This makes sense for simple applications or for users that are new to the PROV DM.
Implement a derived class that also implements the advanced terms of the PROV-DM.
Update examples and review text thoroughly.
Currently, many default values are set to None
by proxy (e.g., ""
, []
, {}
) to be compliant with the given type hint, e.g.
def method(in: str = "", in_2: list = []) -> str:
<...>
if <something>:
return "some string"
else:
return ""
instead of:
def method(in: str = None, in_2: list = None) -> str:
<...>
if <something>:
return "some string"
else:
return None
According to PyLint some of these default values may be harmful:
dangerous-default-value / W0102
Message emitted:
Dangerous default value %s as argument
Description:
Used when a mutable value as list or dictionary is detected in a default value for an argument.
Problematic code:
def whats\_on\_the\_telly(penguin\=\[\]): \# \[dangerous-default-value\] penguin.append("property of the zoo") return penguinCorrect code:
def whats\_on\_the\_telly(penguin\=None): if penguin is None: penguin \= \[\] penguin.append("property of the zoo") return penguinAdditional details:
With a mutable default value, with each call the default value is modified, i.e.:
whats\_on\_the\_telly() \# \["property of the zoo"\] whats\_on\_the\_telly() \# \["property of the zoo", "property of the zoo"\] whats\_on\_the\_telly() \# \["property of the zoo", "property of the zoo", "property of the zoo"\]
Currently, you create a PROV object by providing the graph to which it should be added as argument (among other args). Change this, so that the PROV object creation is controlled by class methods of the ProvGraph
class.
provGraph = ProvGraph('https://ex.org/')
entity = provGraph.addEntity(id = '...')
instead of
provGraph = ProvGraph('https://ex.org/')
entity = Entity(provGraph, id = '...')
Currently, the package uses Pythons internal datetime
package. This has not the full capabilities of http://www.w3.org/2001/XMLSchema#dateTime, e.g., it cannot represent negative dates.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.