compare_core_model
python.tests.core.compare_core_model
¶
Check the current ensembl-py core model against a core created from Ensembl SQL.
This script gets one row for each table in the ORM to check that SQLAlchemy can correctly query the table.
If not, it will show the OperationalError
exception to explain what is wrong in the ORM.
Use this script to check the ORM (and fix it if needed).
check_tables(session, only_table='')
¶
Load data from a core using the ORM to check for any discrepancies in the definitions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Session
|
SQLAlchemy session. |
required |
only_table |
str
|
Only check this one table instead of all of the tables defined in the ORM. |
''
|
Source code in src/python/tests/core/compare_core_model.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
main()
¶
Main script entry-point.
Source code in src/python/tests/core/compare_core_model.py
65 66 67 68 69 70 71 72 73 74 75 |
|