EmblemOfEa / Tenebrae

1 stars 0 forks source link

Directory structure #1

Open taladan opened 6 years ago

taladan commented 6 years ago
Directory structure

We need to discuss and finalize best practices for setting up and maintaining a clean directory structure for the Tenebrae codebase.

Proposal


The <gamedir> is the working directory for the server. Under <gamedir> the only directory included that does not hold platform specific modules is ./world. All systems should be located under the ./world directory. Under this directory each system will have its own dedicated directory.

It would be ideal for each directory to have its own set of standardized files thus:

└── world
│   │   ├── __init__.py
│   │   ├── tenebrae_utils.py
│   └── bbs
│   │   ├── __init__.py
│   │   ├── bbs.md
│   │   ├── bbs_default_settings.py
│   │   ├── bbs_settings.py
│   │   ├── bbs_utils.py
│   └── jobs
│   │   ├── __init__.py
│   │   ├── jobs.md
│   │   ├── jobs_default_settings.py
│   │   ├── jobs_settings.py
│   │   ├── jobs_utils.py
│   └── weather
│   │   ├── __init__.py
│   │   ├── weather.md
│   │   ├── weather_default_settings.py
│   │   ├── weather_settings.py
│   │   ├── weather_utils.py
│   └── (. . .)
Reasoning
File Purpose
tenebrae_utils.py Aggregates classes and methods common to multiple systems
__init__.py necessary for python imports (can be blank)
<sys>.md Gives a thorough description of in PEP257 format (help files)
<sys>_default_settings.py Controls defaults for config options
<sys>_settings.py Allow server admins to override defaults
<sys>_utils.py Aggregates classes and functions commonly used by the system

This structure will provide a flatish structure that allows easy recognition and location of systems. As the systems are developed, other module files will be added (and possibly other directories as needed to organize and modularize the structure. As we develop systems, we will of course be putting our useful recipes in the <game>_utils.py directory.

eta: I have found a boilerplate system here, so pep compliant tools already exist for setting up test files and buildouts. I would like to get input on thoughts to including these - will we be distributing these as a point-click package for evennia eventually or will we work to keep systems separated and just let people pull from git?

I thank you for your time and comments.