Skip to content

we-are-coding/python-package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Python Package Template

A template for creating python packages @ we are.

Introduction

Explain what the package is for.

Installing

Usage

Explain something about how to use it.

# give a demo of the usage
...

Development

Makefile

The Makefile is used to create easy-to-use commands. Instead of adding complex commands (with a lot of parameters etc.) to this README, add a simpler version to this README file making use of the Makefile.

Virtual environment

When working in python code, it is recommended to work with a virtual environment. This can be instantiated by your IDE such as pycharm, but can also be done manually.

make virtualenv

Creating the virtual environment should be done only once. Activating it should be done when working on the code and the virtual environment being inactive.

make activate

Requirements: requirements.txt

Downloading the requirements

To download all the necessities to work on this package, use the requirements.txt file. One can download all the resources with the following command.

make install

Adding requirements

When adding extra requirements, perform the following command to put them in the requirements file.

make requirements

Linting

The eye want's something too. Therefore we use a linter, flake8, to make sure all the code written follows the PEP-guidelines. This avoids the code to become ๐Ÿ-code.

You can run the linter using the following command.

make lint

Testing

For testing purposes we make use of pytest. The tests are to be found in tests/-folders. All code should be thoroughly tested.

To create a test for a file watemplate/dir/filename.py, create a file tests/dir/test_filename.py. For every class or method, write a definition that tests the code thoroughly.

To perform the tests one can perform the following commands.

make tests

About

๐Ÿ Our template for python packages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published