How to set up python projects - multiply-org/multiply-core GitHub Wiki
Python projects within the MULTIPLY platforms shall follow the following structure:
repository-name/
python_package_name/
__init__.py
version.py
some_file.py
sub_package_name/
__init__.py
some_sub_file.py
test/
python_package_name/
test_some_file.py
sub_package_name/
test_some_sub_file.py
doc/
recipe/
bld.bat
build.sh
meta.yaml
.gitignore
.travis.yml
setup.py
LICENSE
CHANGES.MD
README.MD
- repository_name: The name of the repository. Should contain dashes, not underscores
- python_package_name: The pyhon package containing the actual python code. There can be multiple python packages in a repository. As we already distribute functionality across multiple repositories, we can strive to have only one. This might then have sub-packages.
- __ init __.py: Identifies a directory as python package and collects the modules that shall form the package. Can be empty.
- version.py: A file with a single line indicating the version of the package.
- doc: A folder containing documentation about the package. This is optional and should be used for use without interaction with other codes of the MULTIPLY platform. The documentation of the whole MULTIPLY platform shall be contained in multiply-core (every member of the MULTIPLY platform has writing rights).
- recipe: This is a recipe for creating a conda package from the python code. This is required to build the package and create environments with correct versions of Python and Python libraries. Mandatory.
- .travis.yml: configuration file for using Travis (see https://conda.io/docs/travis.html for a file that works with conda )
- setup.py: Setup script required for installing the python package ( https://docs.python.org/3.6/distutils/setupscript.html )
- LICENSE: File containing the license of the project. TBD.
- CHANGES.MD: Shall list the changes that took place between releases. Ususally, these will be new features or bug fixes.
- README.MD: Readme-file in markdown format ( https://de.wikipedia.org/wiki/Markdown ). Shall shortly explain what the package does and how it can be used. See also https://github.com/multiply-org/multiply-core/wiki/Documentation#readmemd .