Module file system structure of amp

Issue #102 resolved
Muammar El Khatib created an issue

I have started playing with amp. I wanted to discuss about the module file system hierarchy structure. I think a better structure may be:

amp
├── amp
│   ├── analysis.py
│   ├── descriptor
│   ├── __init__.py
│   ├── model
│   ├── model.f90
│   ├── regression
│   ├── tests
│   ├── tools
│   └── utilities.py
├── docs
│   ├── building.rst
│   ├── conf.py
│   ├── develop.rst
│   ├── examplescripts.rst
│   ├── index.rst
│   ├── installation.rst
│   ├── introduction.rst
│   ├── modules
│   ├── moredescriptor.rst
│   ├── moremodel.rst
│   ├── _static
│   ├── theory.rst
│   └── useamp.rst
├── README.md
└── setup.py

Doing this won't affect the package at all but it has the following advantages:

  1. One does not need to set PYTHONPATH in order to import amp module right away. It is sufficient to just get into the root amp directory, launch python console and import amp.
  2. Entering the amp root directory seems cleaner.
  3. It is the structure used in ASE.
  4. Lots of projects use the same hierarchy, e.g.: https://github.com/django/django, https://github.com/rpmuller/pyquante2, https://github.com/qutip/qutip.

What do you think about it?. I created a new branch with these changed. As I have to go through all documentation, I will test that everything works with this new structure and I will contact you back later.

In the case you agree, I can do a pull request if you want it. Attached a diff file with the differences with respect to master.

Sources:

  1. http://python-packaging.readthedocs.io/en/latest/minimal.html
  2. https://gitlab.com/ase/ase/tree/master
  3. http://stackoverflow.com/questions/193161/what-is-the-best-project-structure-for-a-python-application

Comments (3)

  1. andrew_peterson repo owner

    I agree. Also, I just created a "tools" directory which can contain executable, also modeled after where ASE puts executables.

    Where do we want "tests"?

  2. Muammar El Khatib reporter

    If they do not have anything to do with the amp/amp/tests in the second level, I would say they should be in the first level amp/tests.

  3. Log in to comment