for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import logging
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
import sys
from LORIS.query import LORIS_query
from LORIS.candidates import LORIS_candidates
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logger = logging.getLogger(__name__)
logger
(([A-Z_][A-Z0-9_]*)|(__.*__))$
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
import unittest
class UT_LORISQuery(unittest.TestCase):
UT_LORISQuery
[A-Z_][a-zA-Z0-9]+$
__class__
@staticmethod
def test_LORIS_login():
test_LORIS_login
(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
response_success, token = LORIS_query.login()
token
assert response_success
#assert len(token) == 256 #token should always be 256 char long
def test_LORIS_get():
test_LORIS_get
#assert len(token) == 256 # token should always be 256 char long
response_success, json = LORIS_query.getCNBP(token, "projects")
json
response_success, json = LORIS_query.getCNBP(token, "candidates")
def test_checkPSCIDExist():
test_checkPSCIDExist
response_success, exist = LORIS_candidates.checkPSCIDExist(token, "CNBP0010001")
assert not exist
def test_checkDCCIDExist():
test_checkDCCIDExist
response_success, exist = LORIS_candidates.checkDCCIDExist(token, 272264)
assert exist
if __name__ == '__main__':
UT_LORISQuery.test_checkPSCIDExist()
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.