kraph 4.1.0__tar.gz → 5.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kraph-4.1.0 → kraph-5.0.0}/PKG-INFO +3 -3
- {kraph-4.1.0 → kraph-5.0.0}/kraph/api/project.json +1 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/api/schema.graphql +14 -10
- {kraph-4.1.0 → kraph-5.0.0}/kraph/api/schema.py +26 -70
- {kraph-4.1.0 → kraph-5.0.0}/pyproject.toml +2 -2
- {kraph-4.1.0 → kraph-5.0.0}/.gitignore +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/README.md +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/__init__.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/api/__init__.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/arkitekt.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/client.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/contrib/fakts/__init__.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/datalayer.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/errors.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/io.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/kraph.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/links/__init__.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/links/errors.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/links/upload.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/py.typed +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/rath.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/refs.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/scalars.py +0 -0
- {kraph-4.1.0 → kraph-5.0.0}/kraph/traits.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: kraph
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: the arkitekt knowledge graph
|
|
5
5
|
Author-email: jhnnsrs <jhnnsrs@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
7
7
|
Requires-Python: <4.0,>=3.11
|
|
8
|
-
Requires-Dist: arkitekt-spec>=
|
|
8
|
+
Requires-Dist: arkitekt-spec>=3.4
|
|
9
9
|
Requires-Dist: dokker>=2.8
|
|
10
|
-
Requires-Dist: fakts>=4
|
|
10
|
+
Requires-Dist: fakts>=5.4
|
|
11
11
|
Requires-Dist: rath>=4.1.1
|
|
12
12
|
Requires-Dist: websockets>=15.0.1
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
@@ -1955,12 +1955,6 @@ input DeleteStructureRelationCategoryInput {
|
|
|
1955
1955
|
id: String!
|
|
1956
1956
|
}
|
|
1957
1957
|
|
|
1958
|
-
"""Input for retiring one of the organization's words"""
|
|
1959
|
-
input DeleteTermInput {
|
|
1960
|
-
"""The ID of the term to delete"""
|
|
1961
|
-
id: String!
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
1958
|
"""A DERIVED_FROM claim: this claim came from that one (RFC 0017)"""
|
|
1965
1959
|
type Derivation implements Edge {
|
|
1966
1960
|
"""This claim's durable identity — the `Link` primary key, a bare uuid"""
|
|
@@ -4164,13 +4158,10 @@ type Mutation {
|
|
|
4164
4158
|
createTerm(input: CreateTermInput!): Term!
|
|
4165
4159
|
|
|
4166
4160
|
"""
|
|
4167
|
-
Update a term's label, description, PURL or colour. Its kind and key are its identity and cannot change.
|
|
4161
|
+
Update a term's label, description, PURL or colour, or hide it. Its kind and key are its identity and cannot change, and a term is never deleted — hiding is how a word is put away.
|
|
4168
4162
|
"""
|
|
4169
4163
|
updateTerm(input: UpdateTermInput!): Term!
|
|
4170
4164
|
|
|
4171
|
-
"""Retire a word nothing has been claimed under"""
|
|
4172
|
-
deleteTerm(input: DeleteTermInput!): ID!
|
|
4173
|
-
|
|
4174
4165
|
"""
|
|
4175
4166
|
Retire a structure kind. Refused while any structure is recorded under it — evidence is never deleted; retract the structures first
|
|
4176
4167
|
"""
|
|
@@ -6862,6 +6853,11 @@ type Term @key(fields: "id", resolvable: true) {
|
|
|
6862
6853
|
"""Illustrative image, if any"""
|
|
6863
6854
|
image: MediaStore
|
|
6864
6855
|
|
|
6856
|
+
"""
|
|
6857
|
+
Whether curators have put this word away. A word is never deleted; a hidden one is still named by its claims, it is just no longer offered
|
|
6858
|
+
"""
|
|
6859
|
+
hidden: Boolean!
|
|
6860
|
+
|
|
6865
6861
|
"""When this organization first used this word"""
|
|
6866
6862
|
createdAt: DateTime!
|
|
6867
6863
|
|
|
@@ -6891,6 +6887,9 @@ input TermFilter {
|
|
|
6891
6887
|
|
|
6892
6888
|
"""Filter to terms at least one graph declares a category for"""
|
|
6893
6889
|
declared: Boolean
|
|
6890
|
+
|
|
6891
|
+
"""Only hidden words, or only offered ones. Omitted shows both"""
|
|
6892
|
+
hidden: Boolean
|
|
6894
6893
|
}
|
|
6895
6894
|
|
|
6896
6895
|
enum TermKind {
|
|
@@ -7342,6 +7341,11 @@ input UpdateTermInput {
|
|
|
7342
7341
|
|
|
7343
7342
|
"""Optional media store ID for an illustrative image"""
|
|
7344
7343
|
image: String = null
|
|
7344
|
+
|
|
7345
|
+
"""
|
|
7346
|
+
Put the word away (true) or offer it again (false). A word is never deleted; omitted leaves it as it is
|
|
7347
|
+
"""
|
|
7348
|
+
hidden: Boolean = null
|
|
7345
7349
|
}
|
|
7346
7350
|
|
|
7347
7351
|
enum ValueKind {
|
|
@@ -1486,15 +1486,6 @@ class DeleteStructureRelationCategoryInput(BaseModel):
|
|
|
1486
1486
|
)
|
|
1487
1487
|
|
|
1488
1488
|
|
|
1489
|
-
class DeleteTermInput(BaseModel):
|
|
1490
|
-
"""Input for retiring one of the organization's words"""
|
|
1491
|
-
|
|
1492
|
-
id: str = Field(description="The ID of the term to delete")
|
|
1493
|
-
model_config = ConfigDict(
|
|
1494
|
-
frozen=True, extra="forbid", populate_by_name=True, use_enum_values=True
|
|
1495
|
-
)
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
1489
|
class DerivationRuleInput(BaseModel):
|
|
1499
1490
|
"""Configuration for property derivation rules"""
|
|
1500
1491
|
|
|
@@ -2909,6 +2900,10 @@ class TermFilter(BaseModel):
|
|
|
2909
2900
|
default=None,
|
|
2910
2901
|
description="Filter to terms at least one graph declares a category for",
|
|
2911
2902
|
)
|
|
2903
|
+
hidden: bool | None = Field(
|
|
2904
|
+
default=None,
|
|
2905
|
+
description="Only hidden words, or only offered ones. Omitted shows both",
|
|
2906
|
+
)
|
|
2912
2907
|
model_config = ConfigDict(
|
|
2913
2908
|
frozen=True, extra="forbid", populate_by_name=True, use_enum_values=True
|
|
2914
2909
|
)
|
|
@@ -3346,6 +3341,10 @@ class UpdateTermInput(BaseModel):
|
|
|
3346
3341
|
image: str | None = Field(
|
|
3347
3342
|
default=None, description="Optional media store ID for an illustrative image"
|
|
3348
3343
|
)
|
|
3344
|
+
hidden: bool | None = Field(
|
|
3345
|
+
default=None,
|
|
3346
|
+
description="Put the word away (true) or offer it again (false). A word is never deleted; omitted leaves it as it is",
|
|
3347
|
+
)
|
|
3349
3348
|
model_config = ConfigDict(
|
|
3350
3349
|
frozen=True, extra="forbid", populate_by_name=True, use_enum_values=True
|
|
3351
3350
|
)
|
|
@@ -4220,6 +4219,8 @@ class Term(TermRef, TermTrait, BaseModel):
|
|
|
4220
4219
|
"Persistent URL, where this corresponds to a published ontology term"
|
|
4221
4220
|
color: tuple[int, ...] | None = Field(default=None)
|
|
4222
4221
|
"Display colour as RGBA"
|
|
4222
|
+
hidden: bool
|
|
4223
|
+
"Whether curators have put this word away. A word is never deleted; a hidden one is still named by its claims, it is just no longer offered"
|
|
4223
4224
|
created_at: datetime = Field(alias="createdAt")
|
|
4224
4225
|
"When this organization first used this word"
|
|
4225
4226
|
model_config = ConfigDict(frozen=True)
|
|
@@ -4227,7 +4228,7 @@ class Term(TermRef, TermTrait, BaseModel):
|
|
|
4227
4228
|
class Meta:
|
|
4228
4229
|
"""Meta class for Term"""
|
|
4229
4230
|
|
|
4230
|
-
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n createdAt\n __typename\n}"
|
|
4231
|
+
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n hidden\n createdAt\n __typename\n}"
|
|
4231
4232
|
name = "Term"
|
|
4232
4233
|
type = "Term"
|
|
4233
4234
|
|
|
@@ -6042,14 +6043,14 @@ class CreateTermMutation(BaseModel):
|
|
|
6042
6043
|
class Meta:
|
|
6043
6044
|
"""Meta class for CreateTerm"""
|
|
6044
6045
|
|
|
6045
|
-
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n createdAt\n __typename\n}\n\nmutation CreateTerm($input: CreateTermInput!) {\n createTerm(input: $input) {\n ...Term\n __typename\n }\n}"
|
|
6046
|
+
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n hidden\n createdAt\n __typename\n}\n\nmutation CreateTerm($input: CreateTermInput!) {\n createTerm(input: $input) {\n ...Term\n __typename\n }\n}"
|
|
6046
6047
|
|
|
6047
6048
|
|
|
6048
6049
|
class UpdateTermMutation(BaseModel):
|
|
6049
6050
|
"""No documentation found for this operation."""
|
|
6050
6051
|
|
|
6051
6052
|
update_term: Term = Field(alias="updateTerm")
|
|
6052
|
-
"Update a term's label, description, PURL or colour. Its kind and key are its identity and cannot change."
|
|
6053
|
+
"Update a term's label, description, PURL or colour, or hide it. Its kind and key are its identity and cannot change, and a term is never deleted — hiding is how a word is put away."
|
|
6053
6054
|
|
|
6054
6055
|
class Arguments(BaseModel):
|
|
6055
6056
|
"""Arguments for UpdateTerm"""
|
|
@@ -6059,24 +6060,7 @@ class UpdateTermMutation(BaseModel):
|
|
|
6059
6060
|
class Meta:
|
|
6060
6061
|
"""Meta class for UpdateTerm"""
|
|
6061
6062
|
|
|
6062
|
-
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n createdAt\n __typename\n}\n\nmutation UpdateTerm($input: UpdateTermInput!) {\n updateTerm(input: $input) {\n ...Term\n __typename\n }\n}"
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
class DeleteTermMutation(BaseModel):
|
|
6066
|
-
"""No documentation found for this operation."""
|
|
6067
|
-
|
|
6068
|
-
delete_term: ID = Field(alias="deleteTerm")
|
|
6069
|
-
"Retire a word nothing has been claimed under"
|
|
6070
|
-
|
|
6071
|
-
class Arguments(BaseModel):
|
|
6072
|
-
"""Arguments for DeleteTerm"""
|
|
6073
|
-
|
|
6074
|
-
input: DeleteTermInput
|
|
6075
|
-
|
|
6076
|
-
class Meta:
|
|
6077
|
-
"""Meta class for DeleteTerm"""
|
|
6078
|
-
|
|
6079
|
-
document = "mutation DeleteTerm($input: DeleteTermInput!) {\n deleteTerm(input: $input)\n}"
|
|
6063
|
+
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n hidden\n createdAt\n __typename\n}\n\nmutation UpdateTerm($input: UpdateTermInput!) {\n updateTerm(input: $input) {\n ...Term\n __typename\n }\n}"
|
|
6080
6064
|
|
|
6081
6065
|
|
|
6082
6066
|
class UpdateStructureKindMutation(BaseModel):
|
|
@@ -7032,7 +7016,7 @@ class GetTermQuery(BaseModel):
|
|
|
7032
7016
|
class Meta:
|
|
7033
7017
|
"""Meta class for GetTerm"""
|
|
7034
7018
|
|
|
7035
|
-
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n createdAt\n __typename\n}\n\nquery GetTerm($id: ID!) {\n term(id: $id) {\n ...Term\n __typename\n }\n}"
|
|
7019
|
+
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n hidden\n createdAt\n __typename\n}\n\nquery GetTerm($id: ID!) {\n term(id: $id) {\n ...Term\n __typename\n }\n}"
|
|
7036
7020
|
|
|
7037
7021
|
|
|
7038
7022
|
class ListTermsQuery(BaseModel):
|
|
@@ -7050,7 +7034,7 @@ class ListTermsQuery(BaseModel):
|
|
|
7050
7034
|
class Meta:
|
|
7051
7035
|
"""Meta class for ListTerms"""
|
|
7052
7036
|
|
|
7053
|
-
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n createdAt\n __typename\n}\n\nquery ListTerms($filters: TermFilter, $pagination: VocabularyPaginationInput) {\n terms(filters: $filters, pagination: $pagination) {\n ...Term\n __typename\n }\n}"
|
|
7037
|
+
document = "fragment TermRef on Term {\n id\n key\n kind\n __typename\n}\n\nfragment Term on Term {\n ...TermRef\n label\n description\n purl\n color\n hidden\n createdAt\n __typename\n}\n\nquery ListTerms($filters: TermFilter, $pagination: VocabularyPaginationInput) {\n terms(filters: $filters, pagination: $pagination) {\n ...Term\n __typename\n }\n}"
|
|
7054
7038
|
|
|
7055
7039
|
|
|
7056
7040
|
class SearchTermsQueryOptions(TermTrait, BaseModel):
|
|
@@ -11778,11 +11762,12 @@ class KraphApi:
|
|
|
11778
11762
|
purl: str | None | UnsetType = UNSET,
|
|
11779
11763
|
color: Iterable[int] | None | UnsetType = UNSET,
|
|
11780
11764
|
image: str | None | UnsetType = UNSET,
|
|
11765
|
+
hidden: bool | None | UnsetType = UNSET,
|
|
11781
11766
|
task: TaskLike | None = None,
|
|
11782
11767
|
) -> Term:
|
|
11783
11768
|
"""UpdateTerm
|
|
11784
11769
|
|
|
11785
|
-
Update a term's label, description, PURL or colour. Its kind and key are its identity and cannot change.
|
|
11770
|
+
Update a term's label, description, PURL or colour, or hide it. Its kind and key are its identity and cannot change, and a term is never deleted — hiding is how a word is put away.
|
|
11786
11771
|
|
|
11787
11772
|
Args:
|
|
11788
11773
|
id: The ID of the term to update
|
|
@@ -11791,6 +11776,7 @@ class KraphApi:
|
|
|
11791
11776
|
purl: Persistent URL, where this corresponds to a published ontology term
|
|
11792
11777
|
color: Optional RGBA colour
|
|
11793
11778
|
image: Optional media store ID for an illustrative image
|
|
11779
|
+
hidden: Put the word away (true) or offer it again (false). A word is never deleted; omitted leaves it as it is
|
|
11794
11780
|
task (rath.task.TaskLike, optional): The task this call is made for; the ambient one by default.
|
|
11795
11781
|
|
|
11796
11782
|
Returns:
|
|
@@ -11808,6 +11794,8 @@ class KraphApi:
|
|
|
11808
11794
|
_input["color"] = color
|
|
11809
11795
|
if image is not UNSET:
|
|
11810
11796
|
_input["image"] = image
|
|
11797
|
+
if hidden is not UNSET:
|
|
11798
|
+
_input["hidden"] = hidden
|
|
11811
11799
|
variables["input"] = _input
|
|
11812
11800
|
return (
|
|
11813
11801
|
await self.aexecute(UpdateTermMutation, variables, task=task)
|
|
@@ -11821,11 +11809,12 @@ class KraphApi:
|
|
|
11821
11809
|
purl: str | None | UnsetType = UNSET,
|
|
11822
11810
|
color: Iterable[int] | None | UnsetType = UNSET,
|
|
11823
11811
|
image: str | None | UnsetType = UNSET,
|
|
11812
|
+
hidden: bool | None | UnsetType = UNSET,
|
|
11824
11813
|
task: TaskLike | None = None,
|
|
11825
11814
|
) -> Term:
|
|
11826
11815
|
"""UpdateTerm
|
|
11827
11816
|
|
|
11828
|
-
Update a term's label, description, PURL or colour. Its kind and key are its identity and cannot change.
|
|
11817
|
+
Update a term's label, description, PURL or colour, or hide it. Its kind and key are its identity and cannot change, and a term is never deleted — hiding is how a word is put away.
|
|
11829
11818
|
|
|
11830
11819
|
Args:
|
|
11831
11820
|
id: The ID of the term to update
|
|
@@ -11834,6 +11823,7 @@ class KraphApi:
|
|
|
11834
11823
|
purl: Persistent URL, where this corresponds to a published ontology term
|
|
11835
11824
|
color: Optional RGBA colour
|
|
11836
11825
|
image: Optional media store ID for an illustrative image
|
|
11826
|
+
hidden: Put the word away (true) or offer it again (false). A word is never deleted; omitted leaves it as it is
|
|
11837
11827
|
task (rath.task.TaskLike, optional): The task this call is made for; the ambient one by default.
|
|
11838
11828
|
|
|
11839
11829
|
Returns:
|
|
@@ -11851,45 +11841,11 @@ class KraphApi:
|
|
|
11851
11841
|
_input["color"] = color
|
|
11852
11842
|
if image is not UNSET:
|
|
11853
11843
|
_input["image"] = image
|
|
11844
|
+
if hidden is not UNSET:
|
|
11845
|
+
_input["hidden"] = hidden
|
|
11854
11846
|
variables["input"] = _input
|
|
11855
11847
|
return self.execute(UpdateTermMutation, variables, task=task).update_term
|
|
11856
11848
|
|
|
11857
|
-
async def adelete_term(self, id: str, task: TaskLike | None = None) -> ID:
|
|
11858
|
-
"""DeleteTerm
|
|
11859
|
-
|
|
11860
|
-
Retire a word nothing has been claimed under
|
|
11861
|
-
|
|
11862
|
-
Args:
|
|
11863
|
-
id: The ID of the term to delete
|
|
11864
|
-
task (rath.task.TaskLike, optional): The task this call is made for; the ambient one by default.
|
|
11865
|
-
|
|
11866
|
-
Returns:
|
|
11867
|
-
ID"""
|
|
11868
|
-
variables: dict[str, builtins.object] = {}
|
|
11869
|
-
_input: dict[str, builtins.object] = {}
|
|
11870
|
-
_input["id"] = id
|
|
11871
|
-
variables["input"] = _input
|
|
11872
|
-
return (
|
|
11873
|
-
await self.aexecute(DeleteTermMutation, variables, task=task)
|
|
11874
|
-
).delete_term
|
|
11875
|
-
|
|
11876
|
-
def delete_term(self, id: str, task: TaskLike | None = None) -> ID:
|
|
11877
|
-
"""DeleteTerm
|
|
11878
|
-
|
|
11879
|
-
Retire a word nothing has been claimed under
|
|
11880
|
-
|
|
11881
|
-
Args:
|
|
11882
|
-
id: The ID of the term to delete
|
|
11883
|
-
task (rath.task.TaskLike, optional): The task this call is made for; the ambient one by default.
|
|
11884
|
-
|
|
11885
|
-
Returns:
|
|
11886
|
-
ID"""
|
|
11887
|
-
variables: dict[str, builtins.object] = {}
|
|
11888
|
-
_input: dict[str, builtins.object] = {}
|
|
11889
|
-
_input["id"] = id
|
|
11890
|
-
variables["input"] = _input
|
|
11891
|
-
return self.execute(DeleteTermMutation, variables, task=task).delete_term
|
|
11892
|
-
|
|
11893
11849
|
async def aupdate_structure_kind(
|
|
11894
11850
|
self,
|
|
11895
11851
|
id: str,
|
|
@@ -13,9 +13,9 @@ dependencies = [
|
|
|
13
13
|
"rath>=4.1.1",
|
|
14
14
|
"websockets>=15.0.1",
|
|
15
15
|
# The service and structures are declared with arkitekt-spec.
|
|
16
|
-
"arkitekt-spec>=
|
|
16
|
+
"arkitekt-spec>=3.4",
|
|
17
17
|
# The service wiring (Alias, Require, FaktsAuthLink); it came through rekuest before.
|
|
18
|
-
"fakts>=4",
|
|
18
|
+
"fakts>=5.4",
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|