Skip to content

OpenValue/PythonVanilla

Repository files navigation

Python Vanilla project

Purpose

Provide a Python template project (also with docker config)

Anaconda local environment support

Install Anaconda:

See https://www.anaconda.com/distribution/#download-section

Edit environment.yml file and specify needed libraries

Install Anaconda local environment as below:

./install-conda-environment.sh

Activate Anaconda local environment as below:

conda activate ${PWD}/.conda

Parameters

  • Configuration files: yaml files are provided
    • development.yml
    • staging.yml
    • production.yml

The configuration file that will be used is based on ENVIRONMENT variable:

  • ENVIRONMENT: environment of run
    • development
    • staging
    • production
    • Default: development

Format code before committing

./format.sh

Run tests

We use pytest to run tests. Pytest expects our tests to be located in files whose names begin with test_ or end with _test.py

To run tests, go to project root and run:

pytest

Run code

Set environment variables to relevant values and run:

./entrypoint.sh

Docker

Build image:

docker build . -t vanilla

Run:

docker run -it vanilla

Install lib

Activate conda environment and run:

python setup.py install

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published