2.3.1. Structure and Location

Your repository’s control center is a directory in your repository, where all contents are organized in a specific directory structure, and categorized and stored in various files; these are mostly in YAML format, except a few pyproject.toml-related options that are stored in TOML format, and some media files in SVG and PNG formats. Applying changes in the control center is thus as simple as editing the corresponding files and pushing the changes to your repository.

Learn YAML & TOML

To learn more about the YAML file format, see Learn YAML in Y Minutes, or check out the full specification at yaml.org. Similarly, for the TOML file format, see Learn TOML in Y Minutes, or check out the full specification at toml.io.

2.3.1.1. Location

By default, the control center is located at ./.meta, i.e., a directory named .meta placed at the root of your repository. You can customize the location of this directory by creating a file at ./.github/.control_center_path.txt containing the new path, relative to the root of your repository.

Example

To change the location of the control center directory to ./some_directory/my_custom_meta_directory, move the control center directory to this new location, and create a file at ./.github/.control_center_path.txt containing only a single line as shown below:

Snippet 2.3.1 🗂 ./.github/.control_center_path.txt
some_directory/my_custom_meta_directory

If this file exists, PyPackIT will look for the control center directory at the path specified in the file, otherwise, it will look for it at the default location, i.e., at ./.meta.

Important Considerations

  • You must also manually rename/move the control center directory to match the new path in the same commit where you create/modify/delete the path declaration file.

  • The control center directory must be orthogonal to all other main directories in your repository, meaning that it cannot be a subdirectory of any other main directory.

2.3.1.2. Structure

The control center directory has a fixed pre-defined structure, shown below. Note that your repository’s control center does not need to contain all these files and directories; almost all configuration files have default values that are automatically used by PyPackIT when the corresponding file is not present. On the other hand, except additional TOML files that can be placed under the package_python/tools subdirectory, you cannot add any additional files or directories to the control center; PyPackIT will ignore any files or directories that are not part of the control center structure below.

Directory structure of your repository’s control center. Click on any file or directory name to learn more about it in the corresponding section under Options.

📦 <CONTROL-CENTER-DIRECTORY>
 ┃
 ┣ 🗂 project
 ┃ ┃
 ┃ ┣ 📄 credits.yaml
 ┃ ┃
 ┃ ┣ 📄 intro.yaml
 ┃ ┃
 ┃ ┗ 📄 license.yaml
 ┃
 ┣ 🗂 custom
 ┃ ┃
 ┃ ┣ 📄 custom.yaml
 ┃ ┃
 ┃ ┣ 📄 generator.py
 ┃ ┃
 ┃ ┗ 📄 requirements.txt
 ┃
 ┣ 🗂 dev
 ┃ ┃
 ┃ ┣ 📄 branch.yaml
 ┃ ┃
 ┃ ┣ 📄 changelog.yaml
 ┃ ┃
 ┃ ┣ 📄 commit.yaml
 ┃ ┃
 ┃ ┣ 📄 discussion.yaml
 ┃ ┃
 ┃ ┣ 📄 issue.yaml
 ┃ ┃
 ┃ ┣ 📄 label.yaml
 ┃ ┃
 ┃ ┣ 📄 maintainer.yaml
 ┃ ┃
 ┃ ┣ 📄 pull.yaml
 ┃ ┃
 ┃ ┣ 📄 repo.yaml
 ┃ ┃
 ┃ ┣ 📄 tag.yaml
 ┃ ┃
 ┃ ┗ 📄 workflow.yaml
 ┃
 ┣ 🗂 package_python
 ┃ ┃
 ┃ ┣ 🗂 tools
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 bandit.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 black.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 isort.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 mypy.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 pylint.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 pytest.toml
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 ruff.toml
 ┃ ┃ ┃
 ┃ ┃ ┗ 📄 *.toml
 ┃ ┃
 ┃ ┣ 📄 build.toml
 ┃ ┃
 ┃ ┣ 📄 build_tests.toml
 ┃ ┃
 ┃ ┣ 📄 conda.yaml
 ┃ ┃
 ┃ ┣ 📄 dev_config.yaml
 ┃ ┃
 ┃ ┣ 📄 docs.yaml
 ┃ ┃
 ┃ ┣ 📄 entry_points.yaml
 ┃ ┃
 ┃ ┣ 📄 metadata.yaml
 ┃ ┃
 ┃ ┗ 📄 requirements.yaml
 ┃
 ┣ 🗂 ui
 ┃ ┃
 ┃ ┣ 🗂 branding
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 favicon.png
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 icon.png
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 logo_full_dark.svg
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 logo_full_light.svg
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 logo_full_light.png
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 logo_simple_dark.svg
 ┃ ┃ ┃
 ┃ ┃ ┣ 📄 logo_simple_light.svg
 ┃ ┃ ┃
 ┃ ┃ ┗ 📄 social_preview.png
 ┃ ┃
 ┃ ┣ 📄 health_file.yaml
 ┃ ┃
 ┃ ┣ 📄 readme.yaml
 ┃ ┃
 ┃ ┣ 📄 theme.yaml
 ┃ ┃
 ┃ ┗ 📄 web.yaml
 ┃
 ┣ 📄 config.yaml
 ┃
 ┣ 📄 extensions.yaml
 ┃
 ┗ 📄 path.yaml