You're reading an old version of this documentation. For up-to-date information, please have a look at v0.5.

Package directory structure

If you create a new package using pymetadata, an entire directory structure will be created that follows best practices of Python packages, results in deployable packages and has been successfully applied to a number of packages of the author.

As there are different ways of how to eventually structure your package directory, pymetacode is opinionated in this regard. The package structure resulting in pymetacode creating a new package (here named “mypackage”) is documented below:

mypackage
├── bin
│   └── incrementVersion.sh
├── docs
│   ├── api
│      └── index.rst
│   ├── audience.rst
│   ├── changelog.rst
│   ├── conf.py
│   ├── developers.rst
│   ├── index.rst
│   ├── installing.rst
│   ├── make.bat
│   ├── Makefile
│   ├── people.rst
│   ├── roadmap.rst
│   ├── _templates
│      ├── page.html
│      └── versions.html
│   └── usecases.rst
├── mypackage
│   └── __init__.py
├── tests
│   └── __init__.py
├── .gitignore
├── LICENSE
├── .package_config.yaml
├── README.rst
├── setup.py
└── VERSION

If you add a graphical user interface (GUI) to your package, the following additional directories and files are added to the basic package layout shown above:

mypackage
├── docs
│   ├── api
│   │   ├── gui
│   │   │   ├── mypackage.gui.mainwindow.rst
│   │   │   └── index.rst
│   │   └── ...
│   └── ...
├── mypackage
│   ├── gui
│   │   ├── app.py
│   │   ├── data
│   │   ├── __init__.py
│   │   ├── mainwindow.py
│   │   ├── Makefile
│   │   └── ui
│   │       ├── __init__.py
│   │       └── mainwindow.ui
│   └── ...
└── tests
    ├── gui
    │   ├── __init__.py
    │   └── test_mainwindow.py
    └── ...