{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a47c2d1b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-10-02T14:46:50.955187Z",
     "iopub.status.busy": "2026-10-02T14:46:50.954945Z",
     "iopub.status.idle": "2026-10-02T14:46:50.960856Z",
     "shell.execute_reply": "2026-10-02T14:46:50.959725Z"
    },
    "papermill": {
     "duration": 0.00855,
     "end_time": "2026-10-02T14:46:50.961432+00:00",
     "exception": false,
     "start_time": "2026-10-02T14:46:50.952882+00:00",
     "status": "completed"
    },
    "tags": [
     "remove-input",
     "active-ipynb",
     "remove-output"
    ]
   },
   "outputs": [],
   "source": [
    "try:\n",
    "    from openmdao.utils.notebook_utils import notebook_mode  # noqa: F401\n",
    "except ImportError:\n",
    "    !python -m pip install openmdao[notebooks]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e9da759b",
   "metadata": {
    "papermill": {
     "duration": 0.000849,
     "end_time": "2026-10-02T14:46:50.963292+00:00",
     "exception": false,
     "start_time": "2026-10-02T14:46:50.962443+00:00",
     "status": "completed"
    },
    "tags": []
   },
   "source": [
    "# Repository Structure\n",
    "\n",
    "## Sample OpenMDAO-Compatible Repository Template\n",
    "\n",
    "A lot of small details go into setting up a repository: the code itself, packaging mechanisms, continuous integration\n",
    "configuration, documentation building, and documentation styling, to name a few. To aid in the setup of a new tool built\n",
    "upon OpenMDAO, we have created a Github repository that is a basic template of how to set up your project. It is a small\n",
    "working example that you can clone and copy to help set up your own repository: [OpenMDAO Library Template](https://github.com/OpenMDAO/library_template)\n",
    "\n",
    "Project Documentation Structure\n",
    "\n",
    "First, to make things run smoothly, set up your project structure so that your documentation lies in the top-level project directory\n",
    "in a directory named `/docs`. For instance, \"openmdao/docs\" or \"openaerostruct/docs\".  The reasons for this location is this is where Jupyter Book will be looking for docs.\n",
    "\n",
    "If you must put docs elsewhere for some reason, just be aware that it will require modifications to things in the above list.\n",
    "\n",
    "Within `/docs`, you will have a lot of important files that will all interact to create your project docs:\n",
    "\n",
    "1. A `_config.yml` file, that configures your Jupyter Notebook. We have provided a modified example of ours in the repo. Jupyter Book will create this for you when you run `jupyter-book build`.\n",
    "2. An `intro.md` file, that is the top-level document in your entire project. You can rename this as long as you update the name in `_toc.yml`\n",
    "3. A `README.md` file, that gives instructions on how to build the docs.\n",
    "4. Directories of `.md`/`.ipynb` files that will be built.\n",
    "\n",
    "Here's an example of how all those things might look within the context of a\n",
    "real project, OpenMDAO:\n",
    "\n",
    "![internal_structure](images/internal_structure.png)"
   ]
  }
 ],
 "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.13.14"
  },
  "orphan": true,
  "papermill": {
   "default_parameters": {},
   "duration": 0.895114,
   "end_time": "2026-10-02T14:46:51.178200+00:00",
   "environment_variables": {},
   "exception": null,
   "input_path": "/home/runner/work/OpenMDAO/OpenMDAO/openmdao/docs/openmdao_book/other_useful_docs/building_a_tool/repository_structure.ipynb",
   "output_path": "/home/runner/work/OpenMDAO/OpenMDAO/openmdao/docs/_executed_book/other_useful_docs/building_a_tool/repository_structure.ipynb",
   "parameters": {},
   "start_time": "2026-10-02T14:46:50.283086+00:00",
   "version": "2.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}