{ "cells": [ { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext", "vscode": { "languageId": "raw" } }, "source": [ ".. _update_db_schema_example:\n", "\n", "====================================\n", "Build Database Schema Documentation\n", "====================================\n", "\n", "When adding a new project, first add the project to the :attr:`.APDBWSICONST.WSI_DATABASES` dictionary.\n", "This is ``dataclass`` holds information about the projects and is used for the :attr:`.AstroDB.wsi_dbs_metadata` dictionary.\n", "The project must be on ``SciServer`` for the package to find it and must be added to this dictionary to initialize the\n", ":class:`.AstroDB` SQL mapping for the project.\n", "\n", ".. warning::\n", " \n", " Trying to load the project with that class without adding it to the aforementioned dictionary will throw an error.\n", "\n", "Once the project has been added to the dictionary and is on ``SciServer``, the following commands can be run to\n", "create the database schema tables used for the documentation. The source files for term and table definitions\n", "are in the \"./docs/database_schema/defs/yml\" folder. The code below will output columns without definitions in the\n", "\"terms.yml\" file." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "e:\\bgreen\\envs\\pkg_dev_env\\lib\\site-packages\\dask\\dataframe\\__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "rdist2 for table cellpos not defined in terms\n", "rdist2 for table celltag not defined in terms\n", "rdist2 for table randomcell not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "slideid1 for table xform not defined in terms\n", "sampleid1 for table xform not defined in terms\n", "ppscale for table xform not defined in terms\n", "a for table xform not defined in terms\n", "b for table xform not defined in terms\n", "e for table xform not defined in terms\n", "c for table xform not defined in terms\n", "d for table xform not defined in terms\n", "f for table xform not defined in terms\n", "dir for table xform not defined in terms\n", "dx00 for table xwarp not defined in terms\n", "dx10 for table xwarp not defined in terms\n", "dx01 for table xwarp not defined in terms\n", "dx11 for table xwarp not defined in terms\n", "dy00 for table xwarp not defined in terms\n", "dy10 for table xwarp not defined in terms\n", "dy01 for table xwarp not defined in terms\n", "dy11 for table xwarp not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "rdist2 for table cellpos not defined in terms\n", "rdist2 for table celltag not defined in terms\n", "rdist2 for table randomcell not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "ki67 for table cellall not defined in terms\n", "ki67 for table celltag not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "rdist2 for table cellpos not defined in terms\n", "rdist2 for table celltag not defined in terms\n", "rdist2 for table randomcell not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "ccytomembrane690 for table celltag not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n", "xposition for table annotationinfo not defined in terms\n", "yposition for table annotationinfo not defined in terms\n", "xmlfile for table annotationinfo not defined in terms\n" ] } ], "source": [ "from astropathdb.shared._docs._build_database_schema import BuildDocsSchema \n", "from astropathdb import AstroDB\n", "_ = BuildDocsSchema(astrodb=AstroDB())" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.11" } }, "nbformat": 4, "nbformat_minor": 2 }