Skip to content

A simple "template" for package development that implements packaging, unit testing, ci/cd, and deployment through containerization.

License

Notifications You must be signed in to change notification settings

duncaneddy/python_package_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python_package_template

A simple "template" for package development that implements packaging, unit testing, ci/cd, and deployment through containerization.

To get started with this template. Clone it then replace every instance of mypkg with your package name.

Usage

You can install the package for local development with:

pip install -e ".[dev]"

The [dev] flag installs the development dependencies, which in this case are pytest and pytest-cov. These are used for running the tests.

You can run the tests with:

pytest

You can run the streamlit app with:

streamlit run mypkg/app.py

Or you can run it as a docker container with:

docker-compose up

To stop the container, you can run:

docker-compose down

For efficiency, I generally alias the docker-compose command to dc in my shell. You can do this by adding the following line to your .bashrc or .zshrc:

alias dc='docker-compose'

Finally, you can execute the built-in CLI with:

mypkg --help

About

A simple "template" for package development that implements packaging, unit testing, ci/cd, and deployment through containerization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •