Skip to content

Project directory overview

Julian Gonggrijp edited this page Oct 20, 2013 · 3 revisions

Table of Contents

The root

Main article: RED_SPIDER_ROOT.

This is the base directory of the Git repository as well as the base directory of the user's installation. Since it can be considered to be the root of the "Red Spider filesystem" we'll abbreviate it here simply as /.

Versioned files and directories

These items are always present when a user clones the repository or downloads the ZIP or TAR distribution. They are created by the hackers, not by software.

/.gitignore

Git helper file to ensure that generated files and directories are not added to the repository.

/Authors.txt

List of people who contributed something for which they didn't attribute themselves in-place. See also Minimal requirements.

/Dependencies.md

Lists auxiliary software required for running the project software.

/License.txt

Our license statement, obviously.

/Platforms.md

Declares what platforms are supported and to what extend. Also contains notes on unsupported platforms.

/Readme.md

A very quick overview for those who look for documentation in /.

/setup.py

Main article: setup.py.

The installation script.

/doc

Documentation. It need not be documentation for a command, you can document anything you want. One topic per file. Currently only plain text is supported.

/include

Compile-time dependencies. In other words, header files for compiled languages.

/other

Anything that is not program/library source code or documentation.

/src

Non-header program/library source code.

/test

Unit tests for programs and libraries.

Generated files and directories

These items are created by the installation script. /.gitignore excludes them from the repository.

/bin

Installed commands, which are available when rsshell is run.

/build

When we have a build file (see issue #33) it will generate platform-specific makefiles and intermediate build products (object files) here.

/config

Configuration files specific to the software of the Red Spider Project.

/extbin

Commands which are available outside the project, i.e. which can be run any time even if you're not running an rsshell session. Currently only provides rsshell.

/extbin/rsshell.cmd

A proxy to rsshell.py generated only on Windows, which lets users invoke the command without the .py extension even if it isn't in their PATHEXT.

/lib

Link-time dependencies. This includes header files for interpreted languages (which are copied from /src) and compiled libraries.

/work

Data files managed by the Red Spider Project software as well as anything the user chooses to store. Basically, any data that could be of central interest to the particular user.

/work/xkcd-fetch

xkcd comics database managed by xkcd-fetch.

Recommendations

/config versus /work

/config is for files that list choices with regard to the behaviour of programs. /work is for data that are of direct interest to the user.

Flat directory versus hierarchical subdirectories

/bin, /doc (see #28), /extbin and /lib should be entirely flat, because their contents may be queried directly by software based on just a single word. Exception for /lib: Python packages and similar constructions in other languages.

/config, /include, and /src should be mostly flat, but a dedicated subdirectory is warranted if many files are associated with the same program or library. What constitutes "many" is subjective and disagreement is possible. Discuss if necessary.

In /test and /work every program or library should have its own dedicated subdirectory. Contrary to the previous category, dedicated subdirectories are really necessary in these directories to keep things tidy and accessible to the user.

The organisation within /build entirely depends on what's best for the build script. In /other, hackers are advised to do whatever seems best since it totally depends on what is added.

See also