{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "tags": [
     "remove-input",
     "active-ipynb",
     "remove-output"
    ]
   },
   "outputs": [],
   "source": [
    "try:\n",
    "    from openmdao.utils.notebook_utils import notebook_mode\n",
    "except ImportError:\n",
    "    !python -m pip install openmdao[notebooks]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "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.8.1"
  },
  "orphan": true
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
