Skip to content

Commit

Permalink
replacing all vocabulary links to new production server (#270)
Browse files Browse the repository at this point in the history
doing this last second
  • Loading branch information
nh916 authored Aug 12, 2023
1 parent 4a6640d commit 299d34d
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 40 deletions.
12 changes: 8 additions & 4 deletions src/cript/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ def __init__(self, host: Union[str, None] = None, api_token: Union[str, None] =
--------
### Create API client with host and token
```Python
with cript.API('https://criptapp.org', 'secret_token') as api:
with cript.API(
host="https://api.criptapp.org/",
api_token="my api token",
storage_token="my storage token"),
) as api:
# node creation, api.save(), etc.
```
Expand Down Expand Up @@ -160,7 +164,7 @@ def __init__(self, host: Union[str, None] = None, api_token: Union[str, None] =
`config.json`
```json
{
"host": "https://criptapp.org",
"host": "https://api.criptapp.org/",
"api_token": "I am API token",
"storage_token": "I am storage token"
}
Expand All @@ -180,7 +184,7 @@ def __init__(self, host: Union[str, None] = None, api_token: Union[str, None] =
Parameters
----------
host : str, None
CRIPT host for the Python SDK to connect to such as `https://criptapp.org`
CRIPT host for the Python SDK to connect to such as https://api.criptapp.org/`
This host address is the same address used to login to cript website.
If `None` is specified, the host is inferred from the environment variable `CRIPT_HOST`.
api_token : str, None
Expand Down Expand Up @@ -357,7 +361,7 @@ def host(self):
```
Output
```Python
https://criptapp.org/api/v1
https://api.criptapp.org/api/v1
```
"""
return self._host
Expand Down
6 changes: 3 additions & 3 deletions src/cript/api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CRIPTAPIRequiredError(CRIPTException):
```python
import cript
my_host = "https://criptapp.org"
my_host = "https://api.criptapp.org/"
my_token = "123456" # To use your token securely, please consider using environment variables
my_api = cript.API(host=my_host, token=my_token)
Expand Down Expand Up @@ -136,15 +136,15 @@ class InvalidHostError(CRIPTException):
## How to Fix
This is a simple error to fix, simply put `http://` or preferably `https://` in front of your domain
when passing in the host to the cript.API class such as `https://criptapp.org`
when passing in the host to the cript.API class such as `https://api.criptapp.org/`
Currently, the only web protocol that is supported with the CRIPT Python SDK is `HTTP`.
### Example
```python
import cript
my_valid_host = "https://criptapp.org"
my_valid_host = "https://api.criptapp.org/"
my_token = "123456" # To use your token securely, please consider using environment variables
my_api = cript.API(host=my_valid_host, token=my_token)
Expand Down
2 changes: 1 addition & 1 deletion src/cript/api/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def current_page_number(self, new_page_number: int) -> None:
Examples
--------
requests.get("https://criptapp.org/api?page=2)
requests.get("https://api.criptapp.org//api?page=2)
requests.get(f"{self.query}?page={self.current_page_number - 1}")
Raises
Expand Down
2 changes: 1 addition & 1 deletion src/cript/api/vocabulary_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class VocabCategories(Enum):
"""
All available [CRIPT controlled vocabulary categories](https://www.mycriptapp.org/vocab/)
All available [CRIPT controlled vocabulary categories](https://app.criptapp.org/vocab/)
Controlled vocabulary categories are used to classify data.
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/primary_nodes/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def type(self) -> str:
"""
The type of computation
The [computation type](https://www.mycriptapp.org/vocab/computation_type)
The [computation type](https://app.criptapp.org/vocab/computation_type)
must come from CRIPT controlled vocabulary
Examples
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/primary_nodes/computation_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def __init__(
@beartype
def type(self) -> str:
"""
The [computational process type](https://www.mycriptapp.org/vocab/computational_process_type)
The [computational process type](https://app.criptapp.org/vocab/computational_process_type)
must come from CRIPT Controlled vocabulary
Examples
Expand Down
4 changes: 2 additions & 2 deletions src/cript/nodes/primary_nodes/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Data(PrimaryBaseNode):
|---------------------|---------------------------------------------------|----------------------------|-----------------------------------------------------------------------------------------|----------|
| experiment | [Experiment](experiment.md) | | Experiment the data belongs to | True |
| name | str | `"my_data_name"` | Name of the data node | True |
| type | str | `"nmr_h1"` | Pick from [CRIPT data type controlled vocabulary](https://criptapp.org/keys/data-type/) | True |
| type | str | `"nmr_h1"` | Pick from [CRIPT data type controlled vocabulary](https://app.criptapp.org/keys/data-type/) | True |
| file | List[[File](../supporting_nodes/file.md)] | `[file_1, file_2, file_3]` | list of file nodes | False |
| sample_preparation | [Process](process.md) | | | False |
| computation | List[[Computation](computation.md)] | | data produced from this Computation method | False |
Expand Down Expand Up @@ -144,7 +144,7 @@ def __init__(
@beartype
def type(self) -> str:
"""
The data type must come from [CRIPT data type vocabulary](https://www.mycriptapp.org/vocab/data_type)
The data type must come from [CRIPT data type vocabulary](https://app.criptapp.org/vocab/data_type)
Example
-------
Expand Down
8 changes: 4 additions & 4 deletions src/cript/nodes/primary_nodes/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class Material(PrimaryBaseNode):
| keyword | list[str] | [thermoplastic, homopolymer, linear, polyolefins] | words that classify the material | | True |
## Navigating to Material
Materials can be easily found on the [CRIPT](https://criptapp.org) home screen in the
under the navigation within the [Materials link](https://criptapp.org/material/)
Materials can be easily found on the [CRIPT](https://app.criptapp.org) home screen in the
under the navigation within the [Materials link](https://app.criptapp.org/material/)
## Available Sub-Objects for Material
* [Identifier](../../subobjects/identifier)
Expand Down Expand Up @@ -174,7 +174,7 @@ def identifiers(self) -> List[Dict[str, str]]:
my_material.identifier = {"alternative_names": "my material alternative name"}
```
[material identifier key](https://www.mycriptapp.org/vocab/material_identifier_key)
[material identifier key](https://app.criptapp.org/vocab/material_identifier_key)
must come from CRIPT controlled vocabulary
Returns
Expand Down Expand Up @@ -325,7 +325,7 @@ def keyword(self) -> List[str]:
List of keyword for this material
the material keyword must come from the
[CRIPT controlled vocabulary](https://www.mycriptapp.org/vocab/material_keyword)
[CRIPT controlled vocabulary](https://app.criptapp.org/vocab/material_keyword)
```python
identifiers = [{"alternative_names": "my material alternative name"}]
Expand Down
10 changes: 5 additions & 5 deletions src/cript/nodes/primary_nodes/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
[ingredient](../../subobjects/ingredient) used in this process
type: str = ""
Process type must come from
[CRIPT Controlled vocabulary process type](https://criptapp.org/keys/process-type/)
[CRIPT Controlled vocabulary process type](https://app.criptapp.org/vocab/process-type/)
description: str = ""
description of this process
equipment: List[Equipment] = None
Expand All @@ -119,7 +119,7 @@ def __init__(
list of [properties](../../subobjects/property) for this process
keyword: List[str] = None
list of keywords for this process must come from
[CRIPT process keyword controlled keyword](https://criptapp.org/keys/process-keyword/)
[CRIPT process keyword controlled keyword](https://app.criptapp.org/vocab/process-keyword/)
citation: List[Citation] = None
list of [citation](../../subobjects/citation)
Expand Down Expand Up @@ -178,7 +178,7 @@ def __init__(
@beartype
def type(self) -> str:
"""
[Process type](https://www.mycriptapp.org/vocab/process_type) must come from the CRIPT controlled vocabulary
[Process type](https://app.criptapp.org/vocab/process_type) must come from the CRIPT controlled vocabulary
Examples
--------
Expand All @@ -189,7 +189,7 @@ def type(self) -> str:
Returns
-------
str
Select a [Process type](https://criptapp.org/keys/process-type/) from CRIPT controlled vocabulary
Select a [Process type](https://app.criptapp.org/vocab/process-type/) from CRIPT controlled vocabulary
"""
return self._json_attrs.type

Expand Down Expand Up @@ -478,7 +478,7 @@ def keyword(self) -> List[str]:
"""
List of keyword for this process
[Process keyword](https://criptapp.org/keys/process-keyword/) must come from CRIPT controlled vocabulary
[Process keyword](https://app.criptapp.org/vocab/process-keyword/) must come from CRIPT controlled vocabulary
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/primary_nodes/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def type(self) -> str:
"""
Type of reference.
The [reference type](https://www.mycriptapp.org/vocab/reference_type)
The [reference type](https://app.criptapp.org/vocab/reference_type)
must come from the CRIPT controlled vocabulary
Examples
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/subobjects/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def key(self) -> str:
"""
Algorithm key
Algorithm key must come from [CRIPT controlled vocabulary](https://www.mycriptapp.org/vocab/algorithm_key)
Algorithm key must come from [CRIPT controlled vocabulary](https://app.criptapp.org/vocab/algorithm_key)
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/subobjects/citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def type(self) -> str:
"""
Citation type subobject
Citation type must come from [CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/citation_type)
Citation type must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/citation_type)
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions src/cript/nodes/subobjects/computational_forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def key(self) -> str:
type of forcefield
Computational_Forcefield key must come from
[CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/computational_forcefield_key)
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/computational_forcefield_key)
Examples
--------
Expand Down Expand Up @@ -199,7 +199,7 @@ def building_block(self) -> str:
type of building block
Computational_Forcefield building_block must come from
[CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/building_block)
[CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/building_block)
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions src/cript/nodes/subobjects/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def key(self) -> str:
"""
type of condition
> Condition key must come from [CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/condition_key)
> Condition key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/condition_key)
Examples
--------
Expand Down Expand Up @@ -395,7 +395,7 @@ def uncertainty_type(self) -> str:
"""
Uncertainty type for the uncertainty value
[Uncertainty type](https://www.mycriptapp.org/vocab/uncertainty_type) must come from CRIPT controlled vocabulary
[Uncertainty type](https://app.criptapp.org/vocab/uncertainty_type) must come from CRIPT controlled vocabulary
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/subobjects/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def key(self) -> str:
"""
scientific instrument
Equipment key must come from [CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/equipment_key)
Equipment key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/equipment_key)
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/subobjects/ingredient.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def set_material(self, new_material: Material, new_quantity: List[Quantity]) ->
def keyword(self) -> List[str]:
"""
ingredient keyword must come from the
[CRIPT controlled vocabulary](https://www.mycriptapp.org/vocab/ingredient_keyword)
[CRIPT controlled vocabulary](https://app.criptapp.org/vocab/ingredient_keyword)
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion src/cript/nodes/subobjects/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _from_json(cls, json_dict: dict):
@beartype
def key(self) -> str:
"""
Parameter key must come from the [CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/parameter_key)
Parameter key must come from the [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/parameter_key)
Examples
--------
Expand Down
8 changes: 4 additions & 4 deletions src/cript/nodes/subobjects/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(
@beartype
def key(self) -> str:
"""
Property key must come from [CRIPT Controlled Vocabulary](https://www.mycriptapp.org/vocab/)
Property key must come from [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/)
Examples
--------
Expand Down Expand Up @@ -232,7 +232,7 @@ def type(self) -> str:
"""
type of value for this Property sub-object
[property type](https://www.mycriptapp.org/vocab/) must come from CRIPT controlled vocabulary
[property type](https://app.criptapp.org/vocab/) must come from CRIPT controlled vocabulary
Examples
```python
Expand Down Expand Up @@ -361,7 +361,7 @@ def uncertainty_type(self) -> str:
"""
get the uncertainty_type for this Property subobject
[Uncertainty type](https://www.mycriptapp.org/vocab/uncertainty_type)
[Uncertainty type](https://app.criptapp.org/vocab/uncertainty_type)
must come from CRIPT Controlled Vocabulary
Returns
Expand Down Expand Up @@ -456,7 +456,7 @@ def method(self) -> str:
"""
approach or source of property data True sample_preparation Process sample preparation
[Property method](https://www.mycriptapp.org/vocab/property_method) must come from CRIPT Controlled Vocabulary
[Property method](https://app.criptapp.org/vocab/property_method) must come from CRIPT Controlled Vocabulary
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions src/cript/nodes/subobjects/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def key(self) -> str:
"""
get the Quantity sub-object key attribute
[Quantity type](https://www.mycriptapp.org/vocab/quantity_key) must come from CRIPT controlled vocabulary
[Quantity type](https://app.criptapp.org/vocab/quantity_key) must come from CRIPT controlled vocabulary
Returns
-------
Expand Down Expand Up @@ -219,7 +219,7 @@ def uncertainty_type(self) -> str:
"""
get the uncertainty type attribute for the Quantity sub-object
[Uncertainty type](https://www.mycriptapp.org/vocab/uncertainty_type) must come from CRIPT controlled vocabulary
[Uncertainty type](https://app.criptapp.org/vocab/uncertainty_type) must come from CRIPT controlled vocabulary
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions src/cript/nodes/supporting_nodes/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class File(PrimaryBaseNode):
| Attribute | Type | Example | Description | Required |
|-----------------|------|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|----------|
| source | str | `"path/to/my/file"` or `"https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system"` | source to the file can be URL or local path | True |
| type | str | `"logs"` | Pick from [CRIPT File Types](https://criptapp.org/keys/file-type/) | True |
| type | str | `"logs"` | Pick from [CRIPT File Types](https://app.criptapp.org/vocab/file-type/) | True |
| extension | str | `".csv"` | file extension | False |
| data_dictionary | str | `"my extra info in my data dictionary"` | set of information describing the contents, format, and structure of a file | False |
Expand Down Expand Up @@ -280,7 +280,7 @@ def source(self, new_source: str) -> None:
@beartype
def type(self) -> str:
"""
The [File type](https://www.mycriptapp.org/vocab/file_type) must come from CRIPT controlled vocabulary
The [File type](https://app.criptapp.org/vocab/file_type) must come from CRIPT controlled vocabulary
Example
-------
Expand Down

0 comments on commit 299d34d

Please sign in to comment.