rcdb 2.2.6__tar.gz → 2.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rcdb-2.2.6/rcdb.egg-info → rcdb-2.2.8}/PKG-INFO +9 -2
- {rcdb-2.2.6 → rcdb-2.2.8}/pyproject.toml +10 -3
- rcdb-2.2.8/rcdb/cli/app.py +66 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/context.py +1 -1
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/db.py +4 -4
- rcdb-2.2.8/rcdb/cli/info.py +53 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/ls.py +3 -3
- rcdb-2.2.8/rcdb/cli/repair/__init__.py +12 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/repair/evio_files.py +4 -2
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/rp.py +9 -5
- rcdb-2.2.8/rcdb/cli/select.py +84 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/web.py +6 -4
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/version.py +1 -1
- {rcdb-2.2.6 → rcdb-2.2.8/rcdb.egg-info}/PKG-INFO +9 -2
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb.egg-info/SOURCES.txt +2 -2
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb.egg-info/requires.txt +1 -0
- rcdb-2.2.6/rcdb/admin_cmd.py +0 -83
- rcdb-2.2.6/rcdb/cli/app.py +0 -181
- rcdb-2.2.6/rcdb/cli/mkdb.py +0 -27
- rcdb-2.2.6/rcdb/cli/repair/__init__.py +0 -13
- {rcdb-2.2.6 → rcdb-2.2.8}/MANIFEST.in +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/README.md +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/__init__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/__main__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/alias.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/app_context.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/__init__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/__main__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/cli/run.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/coda_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/condition_query_builder.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/config_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/constants.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/errors.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/file_archiver.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/halld_daq_config_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/lexer.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/log_format.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/model.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/provider.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/stopwatch.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/update.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/__init__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/__init__.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/conditions.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/files.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/logs.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/runs.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/select_values.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/modules/statistics.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/pagination.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/run_table.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.bootstrap.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.bootstrap.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.foundation.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.foundation.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.jqueryui.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/dataTables.jqueryui.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/jquery.dataTables.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/jquery.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/css/jquery.dataTables_themeroller.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/images/sort_asc.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/images/sort_asc_disabled.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/images/sort_both.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/images/sort_desc.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/images/sort_desc_disabled.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.bootstrap.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.bootstrap.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.foundation.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.foundation.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.jqueryui.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/dataTables.jqueryui.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/jquery.dataTables.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/DataTables-1.10.10/js/jquery.dataTables.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.bootstrap.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.bootstrap.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.dataTables.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.foundation.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.foundation.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.jqueryui.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/css/responsive.jqueryui.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/dataTables.responsive.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/dataTables.responsive.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.bootstrap.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.bootstrap.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.foundation.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.foundation.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.jqueryui.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/Responsive-2.0.0/js/responsive.jqueryui.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.bootstrap.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.bootstrap.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.dataTables.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.foundation.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.foundation.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.jqueryui.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/css/rowReorder.jqueryui.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/js/dataTables.rowReorder.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/RowReorder-1.1.0/js/dataTables.rowReorder.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/datatables.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/datatables.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/datatables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/DataTables/datatables.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap-theme.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap-theme.css.map +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap-theme.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap-theme.min.css.map +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap.css.map +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/bootstrap.min.css.map +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/buttons.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/dataTables.tableTools.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery-ui.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery-ui.structure.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery-ui.theme.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery.dataTables.yadcf.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/jquery.jsonview.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/main.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/select.dataTables.min.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/css/webintellisense.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/favicon.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/fonts/glyphicons-halflings-regular.eot +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/fonts/glyphicons-halflings-regular.svg +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/fonts/glyphicons-halflings-regular.ttf +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/fonts/glyphicons-halflings-regular.woff +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/humans.txt +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/img/glyphicons-halflings-white.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/img/glyphicons-halflings.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/img/logo.png +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/bootstrap.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/bootstrap.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/clipboard.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/copy_clipboard.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/dataTables.buttons.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/dataTables.select.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery-2.1.0.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery-2.1.4.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery-ui.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery.dataTables.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery.dataTables.yadcf.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery.flot.min.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/jquery.jsonview.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/npm.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/webintellisense-ace.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/webintellisense-codemirror.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/webintellisense-textbox.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/js/webintellisense.js +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/robots.txt +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/static/style.css +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/404.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/admin/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/admin/layout.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/admin/user.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/admin/users.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/conditions/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/custom_column_run_table.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/default_run_table.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/errors/forbidden_page.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/errors/layout.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/errors/page_not_found.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/errors/server_error.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/files/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/files/info.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/files/not_found.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/create_profile.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/footers/help.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/login.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/login_openid.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/reauth.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/reset_password.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/search.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/frontend/signup.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/layout.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/layouts/base.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/layouts/base2.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/login.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/logs/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/macros/_ask_user_to_update_ie.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/macros/_form.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/macros/_google_analytics.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/macros/_misc.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/macros/_reset_password.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/render_pagination.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/run_search_box.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/runs/conditions.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/runs/example.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/runs/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/runs/info.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/runs/not_found.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/select_values/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/settings/layout.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/settings/password.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/settings/profile.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/show_entries.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/statistics/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/user/index.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb/web/templates/user/profile.html +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb.egg-info/dependency_links.txt +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb.egg-info/entry_points.txt +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/rcdb.egg-info/top_level.txt +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/setup.cfg +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_coda_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_conditions.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_config_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_get_run_periods.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_get_runs.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_halld_run_config_parser.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_save_files.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_select_runs.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_select_values.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_sql_schema_version.py +0 -0
- {rcdb-2.2.6 → rcdb-2.2.8}/tests/test_value_comparison.py +0 -0
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rcdb
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: RCDB - Run Conditions DataBase
|
|
5
5
|
Author-email: Dmitry Romanov <romanov@jlab.org>
|
|
6
6
|
License-Expression: MIT
|
|
7
|
-
Classifier: Development Status ::
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
+
Classifier: Topic :: Database
|
|
14
20
|
Requires-Python: >=3.9
|
|
15
21
|
Description-Content-Type: text/markdown
|
|
16
22
|
Requires-Dist: markupsafe>=3.0
|
|
@@ -20,6 +26,7 @@ Requires-Dist: mako>=1.3
|
|
|
20
26
|
Requires-Dist: click>=8
|
|
21
27
|
Requires-Dist: sqlalchemy>=2
|
|
22
28
|
Requires-Dist: flask>=3.1.0
|
|
29
|
+
Requires-Dist: rich
|
|
23
30
|
|
|
24
31
|
## RCDB
|
|
25
32
|
|
|
@@ -19,13 +19,19 @@ authors = [
|
|
|
19
19
|
{ name="Dmitry Romanov", email="romanov@jlab.org" }
|
|
20
20
|
]
|
|
21
21
|
classifiers = [
|
|
22
|
-
"Development Status ::
|
|
22
|
+
"Development Status :: 5 - Production/Stable",
|
|
23
23
|
"Programming Language :: Python :: 3",
|
|
24
24
|
"Programming Language :: Python :: 3.9",
|
|
25
25
|
"Programming Language :: Python :: 3.10",
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
|
-
"Programming Language :: Python :: 3.13"
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
30
|
+
"Intended Audience :: Science/Research",
|
|
31
|
+
"Intended Audience :: Developers",
|
|
32
|
+
"Operating System :: OS Independent",
|
|
33
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
34
|
+
"Topic :: Database"
|
|
29
35
|
]
|
|
30
36
|
requires-python = ">=3.9"
|
|
31
37
|
dependencies = [
|
|
@@ -35,7 +41,8 @@ dependencies = [
|
|
|
35
41
|
"mako>=1.3",
|
|
36
42
|
"click>=8",
|
|
37
43
|
"sqlalchemy>=2",
|
|
38
|
-
"flask>=3.1.0"
|
|
44
|
+
"flask>=3.1.0",
|
|
45
|
+
"rich"
|
|
39
46
|
]
|
|
40
47
|
|
|
41
48
|
# If you want a console script, define it in [project.scripts]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import posixpath
|
|
4
|
+
import click
|
|
5
|
+
from click import Command
|
|
6
|
+
|
|
7
|
+
from rcdb.app_context import RcdbApplicationContext, parse_run_range
|
|
8
|
+
from rcdb import RCDBProvider
|
|
9
|
+
from rcdb.model import ConfigurationFile
|
|
10
|
+
from rcdb.version import version as rcdb_version
|
|
11
|
+
|
|
12
|
+
from .ls import ls_command
|
|
13
|
+
from .repair import repair_command
|
|
14
|
+
from .db import db_command
|
|
15
|
+
from .rp import rp_command
|
|
16
|
+
from .web import web_command
|
|
17
|
+
from .info import info_command
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
pass_rcdb_context = click.make_pass_decorator(RcdbApplicationContext)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_default_config_path():
|
|
24
|
+
return os.path.join(os.path.expanduser('~'), '.rcdb_user')
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@click.group(invoke_without_command=True)
|
|
28
|
+
@click.option('--user-config', envvar='RCDB_USER_CONFIG', default=get_default_config_path, metavar='PATH', help='Changes the user config location.')
|
|
29
|
+
@click.option('--connection', '-c', envvar='RCDB_CONNECTION', help='Database connection string', default=None, required=False)
|
|
30
|
+
@click.option('--config', nargs=2, multiple=True, metavar='KEY VALUE', help='Overrides a config key/value pair.')
|
|
31
|
+
@click.option('--verbose', '-v', is_flag=True, help='Enables verbose mode.')
|
|
32
|
+
@click.version_option(rcdb_version)
|
|
33
|
+
@click.pass_context
|
|
34
|
+
def rcdb_cli(ctx, user_config, connection, config, verbose):
|
|
35
|
+
"""'rcdb' is a RCDB (run conditions database) command line tool
|
|
36
|
+
This tool allows to select runs and get values as well as manage RCDB values
|
|
37
|
+
|
|
38
|
+
RCDB CLI needs a DB connection string which could be provided via:
|
|
39
|
+
- RCDB_CONNECTION environment variable
|
|
40
|
+
- -c/--connection flag
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
# Create a rcdb_app_context object and remember it as the context object. From
|
|
44
|
+
# this point onwards other commands can refer to it by using the
|
|
45
|
+
# @pass_rcdb_context decorator.
|
|
46
|
+
if not connection:
|
|
47
|
+
print("(!)WARNING no connection provided! "
|
|
48
|
+
"Provide DB connection string via --connection/-c or RCDB_CONNECTION environment variable.")
|
|
49
|
+
ctx.obj = RcdbApplicationContext(os.path.abspath(user_config), connection)
|
|
50
|
+
ctx.obj.verbose = verbose
|
|
51
|
+
for key, value in config:
|
|
52
|
+
ctx.obj.set_config(key, value)
|
|
53
|
+
|
|
54
|
+
if ctx.invoked_subcommand is None:
|
|
55
|
+
"No command was specified"
|
|
56
|
+
click.echo(ctx.get_help())
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Add commands to application
|
|
60
|
+
rcdb_cli.add_command(ls_command)
|
|
61
|
+
rcdb_cli.add_command(repair_command)
|
|
62
|
+
rcdb_cli.add_command(db_command)
|
|
63
|
+
rcdb_cli.add_command(rp_command)
|
|
64
|
+
rcdb_cli.add_command(web_command)
|
|
65
|
+
rcdb_cli.add_command(info_command)
|
|
66
|
+
|
|
@@ -10,9 +10,9 @@ from rcdb.cli.context import pass_rcdb_context
|
|
|
10
10
|
from rcdb.provider import stamp_schema_version
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
@click.group(invoke_without_command=True)
|
|
13
|
+
@click.group(name="db", invoke_without_command=True)
|
|
14
14
|
@click.pass_context
|
|
15
|
-
def
|
|
15
|
+
def db_command(ctx):
|
|
16
16
|
"""Database management commands."""
|
|
17
17
|
if ctx.invoked_subcommand is None:
|
|
18
18
|
connection_str = ctx.obj.connection_str
|
|
@@ -29,7 +29,7 @@ def db(ctx):
|
|
|
29
29
|
print("Schema version: {} - '{}'".format(schema_version.version, schema_version.comment))
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
@
|
|
32
|
+
@db_command.command()
|
|
33
33
|
@pass_rcdb_context
|
|
34
34
|
def update(context):
|
|
35
35
|
provider = RCDBProvider(context.connection_str, check_version=False)
|
|
@@ -102,7 +102,7 @@ def update(context):
|
|
|
102
102
|
print("Stamped schema version: {} - '{}'".format(version.version, version.comment))
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
@
|
|
105
|
+
@db_command.command()
|
|
106
106
|
@click.option('--no-defaults', is_flag=True, help="Don't create default condition types")
|
|
107
107
|
@click.option('--drop-all', is_flag=True, help='Drops existing RCDB data if exists')
|
|
108
108
|
@click.option('--confirm', is_flag=True, help='For CI automation and tests')
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import datetime
|
|
3
|
+
from .context import pass_rcdb_context
|
|
4
|
+
from rcdb.model import Condition, Run, ConfigurationFile, RunPeriod
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@click.command("info", help="Prints summary info about RCDB contents")
|
|
8
|
+
@pass_rcdb_context
|
|
9
|
+
def info_command(context):
|
|
10
|
+
"""
|
|
11
|
+
Shows various summary information about the RCDB database contents.
|
|
12
|
+
"""
|
|
13
|
+
db = context.db
|
|
14
|
+
|
|
15
|
+
# Number of conditions
|
|
16
|
+
cnd_count = db.session.query(Condition).count()
|
|
17
|
+
|
|
18
|
+
# Date-time of the last condition added:
|
|
19
|
+
last_cnd = db.session.query(Condition).order_by(Condition.id.desc()).first()
|
|
20
|
+
cnd_last_time = last_cnd.created if (last_cnd and hasattr(last_cnd, 'created')) else None
|
|
21
|
+
|
|
22
|
+
# Number of runs saved
|
|
23
|
+
run_count = db.session.query(Run).count()
|
|
24
|
+
|
|
25
|
+
# Number of files saved
|
|
26
|
+
file_count = db.session.query(ConfigurationFile).count()
|
|
27
|
+
|
|
28
|
+
# The last 5 runs saved (by run_number DESC)
|
|
29
|
+
last_5_runs = db.session.query(Run).order_by(Run.number.desc()).limit(5).all()
|
|
30
|
+
|
|
31
|
+
# The number of run periods saved
|
|
32
|
+
rp_count = db.session.query(RunPeriod).count()
|
|
33
|
+
|
|
34
|
+
# 6. The last run period (by ID DESC, or whichever logic you prefer)
|
|
35
|
+
last_rp = db.session.query(RunPeriod).order_by(RunPeriod.id.desc()).first()
|
|
36
|
+
|
|
37
|
+
# Print it all
|
|
38
|
+
click.echo(f"Number of conditions: {cnd_count}")
|
|
39
|
+
click.echo(f"Last condition date/time: {cnd_last_time}")
|
|
40
|
+
click.echo(f"Number of runs: {run_count}")
|
|
41
|
+
click.echo(f"Number of files: {file_count}")
|
|
42
|
+
click.echo("Last 5 runs saved: " +
|
|
43
|
+
", ".join(str(r.number) for r in last_5_runs) if last_5_runs else "No runs")
|
|
44
|
+
click.echo(f"Number of run periods: {rp_count}")
|
|
45
|
+
if last_rp:
|
|
46
|
+
click.echo(f"Last run period: {last_rp.name} (ID={last_rp.id})")
|
|
47
|
+
else:
|
|
48
|
+
click.echo("No run periods found.")
|
|
49
|
+
|
|
50
|
+
# Finally, show all possible commands (help):
|
|
51
|
+
ctx = click.get_current_context()
|
|
52
|
+
click.echo("\n==== Available commands ====")
|
|
53
|
+
click.echo(ctx.parent.get_help())
|
|
@@ -4,12 +4,12 @@ from rcdb.provider import RCDBProvider
|
|
|
4
4
|
from .context import pass_rcdb_context
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
@click.command()
|
|
7
|
+
@click.command(name="ls")
|
|
8
8
|
@click.argument('search', required=False)
|
|
9
9
|
@click.option('--long', '-l', 'is_long', is_flag=True, help='Prints condition full information')
|
|
10
10
|
@pass_rcdb_context
|
|
11
|
-
def
|
|
12
|
-
"""
|
|
11
|
+
def ls_command(context, search, is_long):
|
|
12
|
+
"""List conditions"""
|
|
13
13
|
|
|
14
14
|
db = context.db
|
|
15
15
|
assert isinstance(db, RCDBProvider)
|
|
@@ -8,6 +8,7 @@ from rcdb.provider import RCDBProvider
|
|
|
8
8
|
from rcdb.cli.context import pass_rcdb_context
|
|
9
9
|
import json
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
def sizeof_fmt(num, suffix="B"):
|
|
12
13
|
for unit in ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"]:
|
|
13
14
|
if abs(num) < 1024.0:
|
|
@@ -15,6 +16,7 @@ def sizeof_fmt(num, suffix="B"):
|
|
|
15
16
|
num /= 1024.0
|
|
16
17
|
return f"{num:.1f}Yi{suffix}"
|
|
17
18
|
|
|
19
|
+
|
|
18
20
|
def read_run_directories(mask, run_min, run_max):
|
|
19
21
|
run_dirs = glob.glob(mask)
|
|
20
22
|
|
|
@@ -46,14 +48,14 @@ def read_run_directories(mask, run_min, run_max):
|
|
|
46
48
|
|
|
47
49
|
return run_files
|
|
48
50
|
|
|
49
|
-
@click.command()
|
|
51
|
+
@click.command(name="evio-files")
|
|
50
52
|
@click.option('--run-range', required=False, default=None)
|
|
51
53
|
@click.option('--mask', required=False, default="/gluex/data/rawdata/all/Run*111*")
|
|
52
54
|
@click.option('--save-list', required=False, default=None, help="Save found evio files to json file with this name")
|
|
53
55
|
@click.option('--load-list', required=False, default=None, help="Instead of scanning, load eviofiles from a list")
|
|
54
56
|
@click.option('--execute', is_flag=True, required=False, default=False, help="Instead of scanning, load eviofiles from a list")
|
|
55
57
|
@pass_rcdb_context
|
|
56
|
-
def
|
|
58
|
+
def evio_files_command(ctx, run_range, mask, save_list, load_list, execute):
|
|
57
59
|
"""
|
|
58
60
|
Example of usage:
|
|
59
61
|
# search /mss and save evio files to a json file list
|
|
@@ -9,9 +9,10 @@ from rcdb import RCDBProvider
|
|
|
9
9
|
from rcdb.model import RunPeriod
|
|
10
10
|
from rcdb.cli.context import pass_rcdb_context
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
@click.group(name="rp", invoke_without_command=True)
|
|
13
14
|
@click.pass_context
|
|
14
|
-
def
|
|
15
|
+
def rp_command(context):
|
|
15
16
|
"""
|
|
16
17
|
Run Periods management commands.
|
|
17
18
|
|
|
@@ -38,7 +39,7 @@ def rp(context):
|
|
|
38
39
|
print_run_periods(run_periods)
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
@
|
|
42
|
+
@rp_command.command()
|
|
42
43
|
@click.option('--name', required=True, help="Name of the run period, e.g. RunPeriod-2025-01.")
|
|
43
44
|
@click.option('--description', default='', help="Description of the run period.")
|
|
44
45
|
@click.option('--run-min', 'run_min', required=True, type=int, help="Minimum run number in the period.")
|
|
@@ -90,7 +91,8 @@ def add(context, name, description, run_min, run_max, start_date, end_date):
|
|
|
90
91
|
|
|
91
92
|
print(f"Added new run period: {new_period}")
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
|
|
95
|
+
@rp_command.command()
|
|
94
96
|
@click.argument('period_id', type=int)
|
|
95
97
|
@click.option('--yes', is_flag=True, help="Skip prompt confirmation and remove directly.")
|
|
96
98
|
@pass_rcdb_context
|
|
@@ -122,7 +124,8 @@ def rm(context, period_id, yes):
|
|
|
122
124
|
session.commit()
|
|
123
125
|
print(f"Removed run period ID={period_id} ({rp_item.name}).")
|
|
124
126
|
|
|
125
|
-
|
|
127
|
+
|
|
128
|
+
@rp_command.command()
|
|
126
129
|
@click.argument('period_id', type=int)
|
|
127
130
|
@click.option('--name', default=None, help="New name of the run period.")
|
|
128
131
|
@click.option('--description', default=None, help="New description of the run period.")
|
|
@@ -166,6 +169,7 @@ def update(context, period_id, name, description, run_min, run_max, start_date,
|
|
|
166
169
|
session.commit()
|
|
167
170
|
print(f"Updated run period ID={period_id}: {rp_item}")
|
|
168
171
|
|
|
172
|
+
|
|
169
173
|
def print_run_periods(run_periods):
|
|
170
174
|
# 1) Gather data strings and compute column widths
|
|
171
175
|
# ------------------------------------------------
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import click
|
|
3
|
+
|
|
4
|
+
from rcdb.app_context import parse_run_range
|
|
5
|
+
from rcdb import RCDBProvider
|
|
6
|
+
from rcdb.cli.context import pass_rcdb_context
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _process_sel_args(args):
|
|
10
|
+
"""
|
|
11
|
+
Process the argument list and extract a run range string, query and view.
|
|
12
|
+
:param args: list of user arguments.
|
|
13
|
+
:return: (run_range_str, query, view)
|
|
14
|
+
"""
|
|
15
|
+
run_range_str = ''
|
|
16
|
+
for arg in args:
|
|
17
|
+
if '-' in arg:
|
|
18
|
+
run_range_str = arg
|
|
19
|
+
args = [a for a in args if a != arg]
|
|
20
|
+
break
|
|
21
|
+
|
|
22
|
+
if len(args) == 0:
|
|
23
|
+
return run_range_str, None, None
|
|
24
|
+
if len(args) == 1:
|
|
25
|
+
return run_range_str, args[0], None
|
|
26
|
+
|
|
27
|
+
return run_range_str, args[0], args[1]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@click.command(name="select")
|
|
31
|
+
@click.argument('query', required=False)
|
|
32
|
+
@click.argument('views_or_runs', nargs=-1)
|
|
33
|
+
@click.option('--dump', '-d', 'is_dump_view', is_flag=True,
|
|
34
|
+
help='Display results in export-friendly format without borders or extra formatting')
|
|
35
|
+
@click.option('--desc/--asc', '-d/-a', 'is_descending', default=False,
|
|
36
|
+
help="Sort order of run number descending or ascending")
|
|
37
|
+
@pass_rcdb_context
|
|
38
|
+
def select_command(rcdb_context, query, views_or_runs, is_dump_view, is_descending):
|
|
39
|
+
"""Select runs and get their values."""
|
|
40
|
+
assert isinstance(rcdb_context.db, RCDBProvider)
|
|
41
|
+
args = []
|
|
42
|
+
if query is not None:
|
|
43
|
+
args.append(str(query))
|
|
44
|
+
args.extend([str(v) for v in views_or_runs])
|
|
45
|
+
run_range_str, query, view = _process_sel_args(args)
|
|
46
|
+
|
|
47
|
+
run_periods = rcdb_context.db.get_run_periods()
|
|
48
|
+
run_min, run_max = parse_run_range(run_range_str, run_periods)
|
|
49
|
+
|
|
50
|
+
if run_min is None:
|
|
51
|
+
run_min = 0
|
|
52
|
+
if run_max is None:
|
|
53
|
+
run_max = sys.maxsize # Use sys.maxsize in Python 3 instead of sys.maxint
|
|
54
|
+
|
|
55
|
+
if query == '@' or query is None:
|
|
56
|
+
query = ''
|
|
57
|
+
|
|
58
|
+
if not view:
|
|
59
|
+
view = "event_count run_config"
|
|
60
|
+
|
|
61
|
+
conditions_to_show = view.split()
|
|
62
|
+
|
|
63
|
+
values = rcdb_context.db.select_values([], query, run_min, run_max)
|
|
64
|
+
|
|
65
|
+
if not is_dump_view:
|
|
66
|
+
|
|
67
|
+
from rich.table import Table
|
|
68
|
+
from rich.console import Console
|
|
69
|
+
|
|
70
|
+
console = Console()
|
|
71
|
+
table = Table(show_header=True, header_style="bold magenta")
|
|
72
|
+
table.add_column("run_num")
|
|
73
|
+
for cond in conditions_to_show:
|
|
74
|
+
table.add_column(cond)
|
|
75
|
+
for row in values:
|
|
76
|
+
table.add_row(*[str(item) for item in row])
|
|
77
|
+
console.print(table)
|
|
78
|
+
return
|
|
79
|
+
|
|
80
|
+
# Dump view (export-friendly)
|
|
81
|
+
header = " ".join(["run_num"] + conditions_to_show)
|
|
82
|
+
click.echo("#! " + header)
|
|
83
|
+
for row in values:
|
|
84
|
+
click.echo(" ".join(map(str, row)))
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import click
|
|
3
3
|
|
|
4
|
-
from rcdb import web as rcdb_web
|
|
4
|
+
from rcdb import web as rcdb_web, RCDBProvider
|
|
5
5
|
from .context import pass_rcdb_context
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@click.command("web")
|
|
9
9
|
@pass_rcdb_context
|
|
10
|
-
def
|
|
10
|
+
def web_command(context):
|
|
11
11
|
"""
|
|
12
12
|
Runs the local RCDB web application using the connection string from
|
|
13
13
|
either the CLI context or the RCDB_CONNECTION environment variable.
|
|
14
14
|
"""
|
|
15
15
|
# If user provided --connection on the CLI, context.db.connection_str is set:
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
rcdb_provider = context.db
|
|
17
|
+
if rcdb_provider and rcdb_provider.connection_string:
|
|
18
|
+
assert isinstance(rcdb_provider, RCDBProvider)
|
|
19
|
+
rcdb_web.app.config["SQL_CONNECTION_STRING"] = rcdb_provider.connection_string
|
|
18
20
|
elif "RCDB_CONNECTION" in os.environ:
|
|
19
21
|
# Otherwise check the environment variable
|
|
20
22
|
rcdb_web.app.config["SQL_CONNECTION_STRING"] = os.environ["RCDB_CONNECTION"]
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rcdb
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: RCDB - Run Conditions DataBase
|
|
5
5
|
Author-email: Dmitry Romanov <romanov@jlab.org>
|
|
6
6
|
License-Expression: MIT
|
|
7
|
-
Classifier: Development Status ::
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
+
Classifier: Topic :: Database
|
|
14
20
|
Requires-Python: >=3.9
|
|
15
21
|
Description-Content-Type: text/markdown
|
|
16
22
|
Requires-Dist: markupsafe>=3.0
|
|
@@ -20,6 +26,7 @@ Requires-Dist: mako>=1.3
|
|
|
20
26
|
Requires-Dist: click>=8
|
|
21
27
|
Requires-Dist: sqlalchemy>=2
|
|
22
28
|
Requires-Dist: flask>=3.1.0
|
|
29
|
+
Requires-Dist: rich
|
|
23
30
|
|
|
24
31
|
## RCDB
|
|
25
32
|
|
|
@@ -4,7 +4,6 @@ pyproject.toml
|
|
|
4
4
|
../README.md
|
|
5
5
|
rcdb/__init__.py
|
|
6
6
|
rcdb/__main__.py
|
|
7
|
-
rcdb/admin_cmd.py
|
|
8
7
|
rcdb/alias.py
|
|
9
8
|
rcdb/app_context.py
|
|
10
9
|
rcdb/coda_parser.py
|
|
@@ -32,10 +31,11 @@ rcdb/cli/__main__.py
|
|
|
32
31
|
rcdb/cli/app.py
|
|
33
32
|
rcdb/cli/context.py
|
|
34
33
|
rcdb/cli/db.py
|
|
34
|
+
rcdb/cli/info.py
|
|
35
35
|
rcdb/cli/ls.py
|
|
36
|
-
rcdb/cli/mkdb.py
|
|
37
36
|
rcdb/cli/rp.py
|
|
38
37
|
rcdb/cli/run.py
|
|
38
|
+
rcdb/cli/select.py
|
|
39
39
|
rcdb/cli/web.py
|
|
40
40
|
rcdb/cli/repair/__init__.py
|
|
41
41
|
rcdb/cli/repair/evio_files.py
|
rcdb-2.2.6/rcdb/admin_cmd.py
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import sys
|
|
3
|
-
import posixpath
|
|
4
|
-
|
|
5
|
-
import click
|
|
6
|
-
|
|
7
|
-
from rcdb.app_context import RcdbApplicationContext, parse_run_range
|
|
8
|
-
from rcdb import RCDBProvider
|
|
9
|
-
|
|
10
|
-
pass_rcdb_context = click.make_pass_decorator(RcdbApplicationContext)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def get_default_config_path():
|
|
14
|
-
return os.path.join(os.path.expanduser('~'), '.rcdb_user')
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@click.group()
|
|
18
|
-
@click.option('--user-config', envvar='RCDB_USER_CONFIG', default=get_default_config_path, metavar='PATH', help='Changes the user config location.')
|
|
19
|
-
@click.option('--connection', '-c', envvar='RCDB_CONNECTION', help='Database connection string', default=None, required=True)
|
|
20
|
-
@click.option('--config', nargs=2, multiple=True, metavar='KEY VALUE', help='Overrides a config key/value pair.')
|
|
21
|
-
@click.option('--verbose', '-v', is_flag=True, help='Enables verbose mode.')
|
|
22
|
-
@click.version_option('1.0')
|
|
23
|
-
@click.pass_context
|
|
24
|
-
def cli(ctx, user_config, connection, config, verbose):
|
|
25
|
-
"""'rcdb' is a RCDB (run conditions database) command line tool
|
|
26
|
-
|
|
27
|
-
This tool allows to select runs and get values as well as manage RCDB values
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
# Create a rcdb_app_context object and remember it as as the context object. From
|
|
31
|
-
# this point onwards other commands can refer to it by using the
|
|
32
|
-
# @pass_rcdb_context decorator.
|
|
33
|
-
ctx.obj = RcdbApplicationContext(os.path.abspath(user_config), connection)
|
|
34
|
-
ctx.obj.verbose = verbose
|
|
35
|
-
for key, value in config:
|
|
36
|
-
ctx.obj.set_config(key, value)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@cli.command(help="")
|
|
40
|
-
@click.argument('search', required=False)
|
|
41
|
-
@click.option('--long', '-l', 'is_long', is_flag=True, help='Prints condition full information')
|
|
42
|
-
@pass_rcdb_context
|
|
43
|
-
def walk(context, search, is_long):
|
|
44
|
-
"""Lists condition
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"""
|
|
48
|
-
db = context.db
|
|
49
|
-
assert isinstance(db, RCDBProvider)
|
|
50
|
-
cnd_types = db.get_condition_types_by_name()
|
|
51
|
-
names = sorted(cnd_types.keys())
|
|
52
|
-
if search:
|
|
53
|
-
names = [n for n in names if search in n]
|
|
54
|
-
|
|
55
|
-
longest_len = len(max(names, key=len))
|
|
56
|
-
for name in names:
|
|
57
|
-
cnd_type = cnd_types[name]
|
|
58
|
-
click.echo("{0:<{1}} {2}".format(name, longest_len, cnd_type.description))
|
|
59
|
-
|
|
60
|
-
@cli.command()
|
|
61
|
-
@click.argument('search', required=False)
|
|
62
|
-
@click.option('--long', '-l', 'is_long', is_flag=True, help='Prints condition full information')
|
|
63
|
-
@pass_rcdb_context
|
|
64
|
-
def ls(context, search, is_long):
|
|
65
|
-
"""Lists condition
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"""
|
|
69
|
-
db = context.db
|
|
70
|
-
assert isinstance(db, RCDBProvider)
|
|
71
|
-
cnd_types = db.get_condition_types_by_name()
|
|
72
|
-
names = sorted(cnd_types.keys())
|
|
73
|
-
if search:
|
|
74
|
-
names = [n for n in names if search in n]
|
|
75
|
-
|
|
76
|
-
longest_len = len(max(names, key=len))
|
|
77
|
-
for name in names:
|
|
78
|
-
cnd_type = cnd_types[name]
|
|
79
|
-
click.echo("{0:<{1}} {2}".format(name, longest_len, cnd_type.description))
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if __name__ == '__main__':
|
|
83
|
-
cli(prog_name="rcdb")
|