1. FeiWongReed
  2. agatsuma

Wiki

Clone wiki

agatsuma / ProjectTree

Example project tree:

project

├── dev.json
├── project.egg-info
├── setup.py
├── projectspell
│   ├── __init__.py
│   ├── controllers
│   │   └── testcontroller.py
│   ├── models
│   └── tests
├── somespell
│   ├── __init__.py
│   ├── controllers
│   │   └── test2controller.py
│   ├── public
│   ├── templates
│   └── tests
└── spells
    ├── somespell1
    │   ├── __init__.py
    │   ├── somedir1
    │   │   └── mod.py
    │   └── somemod.py
    └── somespell2
        ├── __init__.py
        ├── somedir
        ├── somedir1
        │   └── mod.py
        └── somemod.py

Files description:

  • dev.json - Agatsuma project config
  • setup.py - Egg setup script
  • ez_setup.py - setuptools installer
  • project.egg-info - Egg files directory
  • projectspell - one of project starters
  • somespell - one of project starters
  • __init__.py - module, which contains Spell class
  • controllers, models, tests, templates, public, somedir, somemod etc - inner files of spell

Clear example project tree:

project

├── dev.json
├── setup.py
├── projectspell
│   ├── __init__.py
│   └── somemod.py
├── somespell
│   ├── __init__.py
│   └── somemod.py
└── spells
    ├── somespell1
    │   ├── __init__.py
    │   └── somemod.py
    └── somespell2
        ├── __init__.py
        └── somemod.py

About project

Root directory must contain all starter spells. For example: implementation of IPylonsApplication Spell, IDjangoApplication, ITwistedApplication etc.

Starter spells from root - projects, it's what project contains, what project implements and gives to user.

Additional spells

Any project needs some spells for working. It can be helpers, models, tools, GUI, parts of web app. This spells can not be starters, cuz it can't live w/o general parts of project. Its must be in agatsuma.spells namespace, just as separated parts.

BUT! We can't separate spells in new eggs each time. Why? It easier to develop spells before separating it.

For developing of spells inner of project, you can use directory spells from root of project.

Agatsuma configuration

See main wiki page for details

Egg files

In root of project, near of starter spells folders, keeps setuptools files of project egg.

Main file of egg - setup.py.

For compatibility with paster and other tools, we need to generate some egg files like entry points list(special functions from starters).

You must remember one thing about eggs in agatsuma projects - all egg files generates in the root of project, you can delete anything(except of setup.py), but you need this files for work.

Updated