Skip to content
Snippets Groups Projects
Verified Commit c8553d1e authored by Alexander Kreft's avatar Alexander Kreft
Browse files

ENH: Make jsonschema optional

parent 87fd4e60
No related branches found
No related tags found
2 merge requests!33MAINT: change arguments of create_user,!29Revert "Revert "Merge branch 'f-validate-config' into 'dev'""
Checking pipeline status
...@@ -11,6 +11,10 @@ typically be installed automatically): ...@@ -11,6 +11,10 @@ typically be installed automatically):
- `PyYaml` - `PyYaml`
- `PySocks` - `PySocks`
Optional packages:
- `keyring`
- `jsonschema`
### How to install ### ### How to install ###
#### Linux #### #### Linux ####
...@@ -66,6 +70,13 @@ cd caosdb-pylib ...@@ -66,6 +70,13 @@ cd caosdb-pylib
pip3 install --user . pip3 install --user .
``` ```
For installation of optional packages, install with an additional option, e.g. for
validating with the caosdb json schema:
```sh
pip3 install --user .[jsonschema]
```
## Configuration ## ## Configuration ##
The configuration is done using `ini` configuration files. The configuration is done using `ini` configuration files.
......
...@@ -158,10 +158,11 @@ def setup_package(): ...@@ -158,10 +158,11 @@ def setup_package():
python_requires='>=3.6', python_requires='>=3.6',
package_dir={'': 'src'}, package_dir={'': 'src'},
install_requires=['lxml>=3.6.4', install_requires=['lxml>=3.6.4',
'PyYaml>=3.12', 'future', 'PySocks>=1.6.7', 'jsonschema'], 'PyYaml>=3.12', 'future', 'PySocks>=1.6.7'],
extras_require={'keyring': ['keyring>=13.0.0']}, extras_require={'keyring': ['keyring>=13.0.0'],
'jsonschema': ['jsonschema==4.0.1']},
setup_requires=["pytest-runner>=2.0,<3dev"], setup_requires=["pytest-runner>=2.0,<3dev"],
tests_require=["pytest", "pytest-cov", "coverage>=4.4.2", "jsonschema"], tests_require=["pytest", "pytest-cov", "coverage>=4.4.2", "jsonschema==4.0.1"],
package_data={ package_data={
'caosdb': ['cert/indiscale.ca.crt', 'schema-pycaosdb-ini.yml'], 'caosdb': ['cert/indiscale.ca.crt', 'schema-pycaosdb-ini.yml'],
}, },
......
...@@ -7,4 +7,5 @@ deps = . ...@@ -7,4 +7,5 @@ deps = .
nose nose
pytest pytest
pytest-cov pytest-cov
jsonschema==4.0.1
commands=py.test --cov=caosdb -vv {posargs} commands=py.test --cov=caosdb -vv {posargs}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment