Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added controlled vocab links to documentation for each node attribute #372

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cript/nodes/primary_nodes/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def type(self) -> str:
def type(self, new_data_type: str) -> None:
"""
set the data type.
The data type must come from [CRIPT data type vocabulary]()
The data type must come from [CRIPT data type vocabulary](https://app.criptapp.org/vocab/data_type)

Parameters
----------
Expand Down
6 changes: 2 additions & 4 deletions src/cript/nodes/subobjects/citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, type: str, reference: Reference, **kwargs):
Parameters
----------
type : citation type
citation type must come from [CRIPT Controlled Vocabulary]()
citation type must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/citation_type)
reference : Reference
Reference node

Expand Down Expand Up @@ -134,9 +134,7 @@ def type(self) -> str:
@beartype
def type(self, new_type: str) -> None:
"""
set the citation subobject type

> Note: citation subobject must come from [CRIPT Controlled Vocabulary]()
set the citation sub-object type

Parameters
----------
Expand Down
6 changes: 4 additions & 2 deletions src/cript/nodes/subobjects/computational_forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ def __init__(self, key: str, building_block: str, coarse_grained_mapping: str =
Parameters
----------
key : str
type of forcefield key must come from [CRIPT Controlled Vocabulary]()
type of forcefield key must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/computational_forcefield_key)
building_block : str
type of computational_forcefield building_block must come from [CRIPT Controlled Vocabulary]()
type of computational_forcefield building_block must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/building_block)
coarse_grained_mapping : str, optional
atom to beads mapping, by default ""
implicit_solvent : str, optional
Expand Down
2 changes: 0 additions & 2 deletions src/cript/nodes/subobjects/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ def key(self, new_key: str) -> None:
"""
set this Condition sub-object key

> Condition key must come from [CRIPT Controlled Vocabulary]()

Parameters
----------
new_key : str
Expand Down
4 changes: 1 addition & 3 deletions src/cript/nodes/subobjects/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, key: str, description: str = "", condition: Union[List[Condit
Parameters
----------
key : str
Equipment key must come from [CRIPT Controlled Vocabulary]()
Equipment key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/equipment_key)
description : str, optional
additional details about the equipment, by default ""
condition : Union[List[Condition], None], optional
Expand Down Expand Up @@ -125,8 +125,6 @@ def key(self, new_key: str) -> None:
"""
set the equipment key

> Equipment key must come from [CRIPT Controlled Vocabulary]()

Parameters
----------
new_key : str
Expand Down
5 changes: 2 additions & 3 deletions src/cript/nodes/subobjects/ingredient.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def __init__(self, material: Material, quantity: List[Quantity], keyword: Option
quantity : List[Quantity]
list of quantity sub-objects
keyword : List[str], optional
ingredient keyword must come from [CRIPT Controlled Vocabulary](), by default ""
ingredient keyword must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/ingredient_keyword), by default ""

Returns
-------
Expand Down Expand Up @@ -206,8 +207,6 @@ def keyword(self, new_keyword: List[str]) -> None:
"""
set new ingredient keyword to replace the current

ingredient keyword must come from the [CRIPT controlled vocabulary]()

Parameters
----------
new_keyword : str
Expand Down
4 changes: 1 addition & 3 deletions src/cript/nodes/subobjects/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, key: str, value: Number, unit: Optional[str] = None, **kwargs
Parameters
----------
key : str
Parameter key must come from [CRIPT Controlled Vocabulary]()
Parameter key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/parameter_key)
value : Union[int, float]
Parameter value
unit : Union[str, None], optional
Expand Down Expand Up @@ -132,8 +132,6 @@ def key(self, new_key: str) -> None:
"""
set new key for the Parameter sub-object

Parameter key must come from [CRIPT Controlled Vocabulary]()

Parameters
----------
new_key : str
Expand Down
6 changes: 2 additions & 4 deletions src/cript/nodes/subobjects/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def __init__(
Parameters
----------
key : str
type of property, Property key must come from the [CRIPT Controlled Vocabulary]()
type of property, Property key must come from the CRIPT Controlled Vocabulary
type : str
type of value stored, Property type must come from the [CRIPT Controlled Vocabulary]()
type of value stored, Property type must come from the CRIPT Controlled Vocabulary
value : Union[Number, None]
value or quantity
unit : str
Expand Down Expand Up @@ -477,8 +477,6 @@ def method(self, new_method: str) -> None:
"""
set the Property method

Property method must come from [CRIPT Controlled Vocabulary]()

Parameters
----------
new_method : str
Expand Down
17 changes: 11 additions & 6 deletions src/cript/nodes/subobjects/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@ def __init__(self, key: str, value: Number, unit: str, uncertainty: Optional[Num
Parameters
----------
key : str
type of quantity. Quantity key must come from [CRIPT Controlled Vocabulary]()
type of quantity. Quantity key must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/quantity_key)
value : Number
amount of material
unit : str
unit for quantity
uncertainty : Union[Number, None], optional
uncertainty of value, by default None
uncertainty_type : str, optional
type of uncertainty. Quantity uncertainty type must come from [CRIPT Controlled Vocabulary](), by default ""
type of uncertainty. Quantity uncertainty type must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/uncertainty_type), by default ""

Examples
--------
Expand Down Expand Up @@ -113,7 +115,7 @@ def set_key_unit(self, new_key: str, new_unit: str) -> None:
"""
set the Quantity key and unit attributes

Quantity key must come from [CRIPT Controlled Vocabulary]()
Quantity key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/quantity_key)

Examples
--------
Expand All @@ -124,7 +126,8 @@ def set_key_unit(self, new_key: str, new_unit: str) -> None:
Parameters
----------
new_key : str
new Quantity key. Quantity key must come from [CRIPT Controlled Vocabulary]()
new Quantity key. Quantity key must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/quantity_key)
new_unit : str
new unit

Expand Down Expand Up @@ -235,7 +238,8 @@ def set_uncertainty(self, uncertainty: Optional[Number], type: str) -> None:

Uncertainty and uncertainty type are set at the same time to keep the value and type in sync

`uncertainty_type` must come from [CRIPT Controlled Vocabulary]()
`uncertainty_type` must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/uncertainty_type)

Examples
--------
Expand All @@ -248,7 +252,8 @@ def set_uncertainty(self, uncertainty: Optional[Number], type: str) -> None:
uncertainty : Number
uncertainty value
type : str
type of uncertainty, uncertainty_type must come from [CRIPT Controlled Vocabulary]()
type of uncertainty, uncertainty_type must come from
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/uncertainty_type)

Returns
-------
Expand Down
5 changes: 3 additions & 2 deletions src/cript/nodes/supporting_nodes/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def __init__(self, name: str, source: str, type: str, extension: str, data_dicti
source: str
link or path to local file
type: str
Pick a file type from CRIPT controlled vocabulary [File types]()
Pick a file type from CRIPT controlled vocabulary
[File types](https://app.criptapp.org/vocab/file_type)
extension:str
file extension
data_dictionary:str
Expand Down Expand Up @@ -298,7 +299,7 @@ def type(self) -> str:
Returns
-------
file type: str
file type must come from [CRIPT controlled vocabulary]()
file type must come from [CRIPT controlled vocabulary](https://app.criptapp.org/vocab/file_type)
"""
return self._json_attrs.type

Expand Down