-
Notifications
You must be signed in to change notification settings - Fork 5
Development Environment
- clone the repository
- install requirements_dev.txt
pip install -r requirements_dev.txt
-
pip install -r requirements_docs.txt
in case of doing documentation work and need to run the documentation locally
Refer to requirements.txt wiki for more information
- make necessary changes
- test your code by running all the tests and being sure they pass
For development and CI, CRIPT Python SDK expects some variables on the machine and if it does not exist it might throw an error.
If this is set to True
then pytest, will run all integration tests, otherwise if set to False
or if it doesn't exist then it will skip them.
The value for the HAS_INTEGRATION_TESTS_ENABLED
variable can be changed manually within conftest.py
This is the variable that specifies the host, used for testing in conftest.py
to test the Python SDK against the API. It can be manually set within conftest.py
if needed.
http://mycriptapp.org
This is the variable that specifies the API token used for testing in conftest.py
to test the Python SDK against the API. It can be manually set within conftest.py
if needed.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
This is the variable that specifies cloud storage token to upload local files, and is used for testing in conftest.py
to test the Python SDK against the API. It can be manually set within conftest.py
if needed.
You can manually set the variable values that are set via environment variables
# flip to True or False if you want to run integration tests or not
HAS_INTEGRATION_TESTS_ENABLED: bool = False
# you can manually set these variables to make testing easier and quicker
# WARNING: be sure to remove ALL sensitive tokens/data from script before pushing/committing anything to the repo
host: str = "mycriptapp.org"
api_token: str = "my secret token"
storage_token: str = "my cloud secret token"
with cript.API(host=host, api_token=api_token, storage_token=storage_token) as api:
Please refer to CRIPT Python SDK user documentation on getting CRIPT Tokens for local testing.
Note: You must have a CRIPT account to get a CRIPT Token.
Warning: Please be sure to guard your tokens as they are sensitive and should never be pushed to any GitHub repository where it could create a security incident.