Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

andela-technology/ds-code-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

datascience-python-template

This repository is a cookiecutter templates for quick python project scaffolding.

Requirements

Install cookiecutter with either of the following

  • pip: pip install cookiecutter
  • homebrew: brew install cookiecutter

Features

This package template is set up to allow scientists/developers to be immediately productive writing python. Here are some of the features the package format setups up automatically.

  • Automatically sets the python package version from the git tag. If a git tag is not preset then the latest git commit hash is used.
  • Linting/formatting are automatically setup using tox.
  • ✅ Isolated builds with tox.
  • Debugging with vscode.
  • ✅ Example unit tests.
  • ✅ Example command line entry point.
  • ✅ Example parameter config file (which is loaded via a --run-config argument).
  • pre-commit git hooks.

Usage

You can read the templates directly from git without downloading them you do need to provide the --directory argument to select the template. An example below,

cookiecutter git+ssh://[email protected]/andela-technology/ds-code-template --directory basic-template

Example

Here we show the steps need to create an example package called algo-cat-tracker.

# generate your package from the template
cookiecutter git+ssh://[email protected]/andela-technology/ds-code-template --directory basic-template

# Answer questions:
    package_name: cat-tracker
    module_name: cat_tracker

# new directory will have generated code
cd cat_tracker

# Initialize the git repo, add files and commit
#❗ NOTE: You must do this step or the generated package won't build.
git init . && git add -A && git commit -am "Initial Commit"

# after you make a virtualenv install and build the package
pip install ".[dev]"

# run linting/formatting/tests
tox

# If everything succeed then you are good to go! Push your code to github.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •