Software Development Specifications

Source: Internet
Author: User

Software Catalog Structure specification

Standardization can better control program structure, improve the readability of programs

How directory is organized
Foo/|-- bin/|   |-- foo||-- conf/|   
|-- db/ ||-- docs/| |-- conf.py| |-- abc.rst||-- setup.py|-- requirements.txt|-- README

Briefly explain:

    1. bin/: Store some executable files and scripts of the project, of course you can name and script/ so on.
    2. conf/: Store some configuration files.
    3. db/: Store some data.
    4. docs/: Store some documents and logs.
    5. setup.py: Install, deploy, and package the scripts.
    6. requirements.txt: A list of external Python packages that store software dependencies.
    7. README: Project description file.
About the content of the Readme

It needs to illustrate several things:

    1. Software positioning, the basic functions of the software.
    2. How to run your code: Installation environment, startup commands, and so on.
    3. Brief instructions for use.
    4. Code directory structure Description, more detailed can explain the basic principles of the software.
    5. FAQ's description.
About Requirements.txt and setup.pysetup.py

In general, use it setup.py to manage the packaging, installation, and deployment of your code. The industry standard notation is to use Python's popular packaging tools Setuptools to manage these things. This approach is commonly used in open source projects. But the core idea here is not to use standardized tools to solve these problems, but to say that a project must have an installation deployment tool that can quickly and easily install the environment on a new machine, deploy the code, and run the program.

setup.pyThese things can be automated to improve efficiency and reduce the probability of errors. "Complex things are automated and things that can be automated must be automated. "is a very good habit.

Requirements.txt

The purpose of this file exists is to:

    1. Easy for developers to maintain software package dependencies. Add the new packages in the development process to this list to avoid setup.py missing packages when installing dependencies.
    2. Make it easy for readers to identify which Python packages the project uses.

The format of this file is that each line contains a description of the package dependencies, usually flask>=0.10 this format, the requirement is that the format can be pip recognized, so that you can simply pass pip install -r requirements.txt all the Python package dependencies are installed.

Software Development Specifications

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.