diff --git a/docs/index.rst b/docs/index.rst index 873551c..4ba93df 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -24,7 +24,7 @@ User Guide pages/querying_existing_db/index pages/ingesting/getting_started_ingesting pages/modifying/index - pages/make_new_db/getting_started_new_database + pages/make_new_db/index pages/template_repo/index pages/template_schema/template_schema pages/making_private_version diff --git a/docs/pages/make_new_db/create_database.rst b/docs/pages/make_new_db/create_database.rst new file mode 100644 index 0000000..137b949 --- /dev/null +++ b/docs/pages/make_new_db/create_database.rst @@ -0,0 +1,24 @@ +Create a New Database +======================= + +Start with the template schema which is defined by the +schema YAML file located at ``schema/schema.yaml``. + +This file needs to be modified to suit your use case. +e.g., add or rename tables, columns, etc. + +#. :doc:`Modify the schema YAML file <../modifying/index>` + to suit your use case. + + * We highly recommend using an AI coding assistant + (like GitHub Copilot) when modifying this file. + +#. Generate a new entity relationship diagram (ERD) + and documentation pages for your schema. + + * To make a new ERD, run ``scripts/build_schema_docs.py``. + This generates a PNG file in the ``docs/figures/`` directory. + + * To make new documentation pages, run ``scripts/build_schema_docs.py``. + This generates a new set of Markdown files + in the ``docs/schema/`` directory. diff --git a/docs/pages/make_new_db/getting_started_new_database.rst b/docs/pages/make_new_db/getting_started_new_database.rst deleted file mode 100644 index a589f83..0000000 --- a/docs/pages/make_new_db/getting_started_new_database.rst +++ /dev/null @@ -1,35 +0,0 @@ -Making a New Database -===================== - - -Overview --------- - -#. Make a new GitHub repository using the `astrodb-template-db `_ template repository. - -#. Update the ``README.md`` file with your database name and description. - - * Please retain the credit line to the AstroDB Toolkit. - -#. Update the ``LICENSE`` file with your license of choice. - -#. :doc:`Modify the schema <../modifying/index>` - to suit your use case. - - * We highly recommend using an AI coding assistant - (like GitHub Copilot) when modifying this file. - -#. Generate a new entity relationship diagram (ERD) - and documentation pages for your schema. - - * To make a new ERD, run ``scripts/build_schema_docs.py``. - This generates a PNG file in the ``docs/figures/`` directory. - - * To make new documentation pages, run ``scripts/build_schema_docs.py``. - This generates a new set of Markdown files - in the ``docs/schema/`` directory. - -#. Ingest data by modifying the JSON files by hand - (in the ``data/`` directory) or by using ``astrodb_utils`` functions. - - diff --git a/docs/pages/make_new_db/index.rst b/docs/pages/make_new_db/index.rst new file mode 100644 index 0000000..a003479 --- /dev/null +++ b/docs/pages/make_new_db/index.rst @@ -0,0 +1,13 @@ +Making a New Database +===================== + +.. toctree:: + :glob: + :maxdepth: 1 + + new_repo + create_database + ingest_data + + + diff --git a/docs/pages/make_new_db/ingest_data.rst b/docs/pages/make_new_db/ingest_data.rst new file mode 100644 index 0000000..4a3ea29 --- /dev/null +++ b/docs/pages/make_new_db/ingest_data.rst @@ -0,0 +1,15 @@ +Ingest Data into New Database +============================= + +There are many ways to ingest data into the database: + +Data that fits into the template schema +can be ingested into the database using the astrodb_utils functions. + + +#. Delete template data + +#. Ingest data by modifying the JSON files by hand + (in the ``data/`` directory) or by using ``astrodb_utils`` functions. + +#. Modify tests diff --git a/docs/pages/make_new_db/new_repo.rst b/docs/pages/make_new_db/new_repo.rst new file mode 100644 index 0000000..3cdcfbf --- /dev/null +++ b/docs/pages/make_new_db/new_repo.rst @@ -0,0 +1,10 @@ +Make a new GitHub Repository +============================ + +#. Make a new GitHub repository using the `astrodb-template-db `_ template repository. + +#. Update the ``README.md`` file with your database name and description. + + * Please retain the credit line to the AstroDB Toolkit. + +#. Update the ``LICENSE`` file with your license of choice.