Project

General

Profile

Idea #24351

Revise the project directory structure

Added by Marco Mambelli 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Start date:
04/27/2020
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

The project directory structure should be revised to ease the python packages formation and exports and to make the structure more standard:
  • All python sources should be under "glideinwms"
  • Avoid the "build" name (sometimes build or BUILD are used for automatic build directory
  • Other possible folders: doc/docs/apidoc, test/tests (all different unit tests), pkg (packaging and release building scripts)

Some directories used by automatic build systems (keep in mind that Macs are not case sensitive):
dist, build

Some standard directories:
  • res - for language files (resources)
  • Go language uses: /cmd, /internal, /pkg and /vendor
Questions:
  • should name be singular or plural?
  • should all unit tests be together or separate close to the different language sources (e.g. python ones under glideinwms)?
  • should the sources go under a src dir?
  • should there be a bin and lib directory?
  • should there be tools?
  • should it be build or pkg, make, setup, produce, install, prepare, project, plan, svc/service, auto(mation)?
    • contains both release/packaging scripts and CI scripts

Some links about Python projects:
https://stackoverflow.com/questions/193161/what-is-the-best-project-structure-for-a-python-application
https://dev.to/codemouse92/dead-simple-python-project-structure-and-imports-38c6
https://realpython.com/python-application-layouts/
https://docs.python-guide.org/writing/structure/
https://github.com/pypa/setuptools/issues/1347

Multi language projects:
https://stackoverflow.com/questions/25918514/project-directory-structure-for-a-multi-language-application
https://akutz.wordpress.com/2008/05/30/a-cross-language-project-structure/
https://softwareengineering.stackexchange.com/questions/273249/structuring-a-multi-language-project
https://www.reddit.com/r/golang/comments/3jvjqg/managing_multilanguage_project/
https://groups.google.com/forum/#!topic/golang-nuts/LXQQlbqN604
https://softwareengineering.stackexchange.com/questions/81899/how-should-i-organize-my-source-tree
https://github.com/golang-standards/project-layout
https://docs.gradle.org/current/userguide/organizing_gradle_projects.html
https://doc.rust-lang.org/cargo/guide/project-layout.html
https://groups.google.com/forum/#!topic/golang-nuts/6orXabMNivE
https://dart.dev/tools/pub/package-layout

Some notes:
  • These seem standard LICENSE, CHANGELOG.md (instead of TAGS.txt), README.md
  • setup.py leaves these directories in a project dir: build, dist, ${project_name}.egg-info
  • singular names seem better than plural: test, doc
  • Dart uses also benchmark and groups aux files under tool
  • Go has a very specific recommendation: build, build/package, build/ci, deployments (or deploy)
    <quot>
    Packaging and Continuous Integration.

Put your cloud (AMI), container (Docker), OS (deb, rpm, pkg) package configurations and scripts in the /build/package directory.

Put your CI (travis, circle, drone) configurations and scripts in the /build/ci directory. Note that some of the CI tools (e.g., Travis CI) are very picky about the location of their config files. Try putting the config files in the /build/ci directory linking them to the location where the CI tools expect them (when possible).
</quot>


Related issues

Related to GlideinWMS - Feature #20227: Migrate to Python3New06/27/2018

History

#1 Updated by Marco Mambelli 5 months ago

  • Description updated (diff)

#2 Updated by Marco Mambelli 5 months ago



Also available in: Atom PDF