Created
September 3, 2017 20:52
-
-
Save tadeoos/aae9a000334f90edf4f07b20cb0febea to your computer and use it in GitHub Desktop.
Script to quickly build an open source python project with conda environment manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo project_name: $1 | |
if [[ "$1" == "" ]] ; then | |
echo 'provide project name' | |
exit 0 | |
fi | |
mkdir $1 | |
cd $1 | |
mkdir $1 | |
mkdir docs | |
mkdir tests | |
touch .gitignore flit.ini setup.cfg .travis.yml README.md requirements.txt | |
# add possibility for other environments | |
git init | |
echo "# $1" >> README.md | |
echo "__pycache__ | |
dist | |
htmlcov | |
env | |
.env | |
.coverage" >> .gitignore | |
echo "coverage | |
coverage-badge | |
flake8" >> requirements.txt | |
echo """ | |
[metadata] | |
module = | |
author = | |
author-email = tadekte@gmail.com | |
maintainer = | |
maintainer-email = | |
home-page = | |
description-file = README.md | |
classifiers = Development Status :: 3 - Alpha | |
Programming Language :: Python :: 3 | |
Programming Language :: Python :: 3.5 | |
Programming Language :: Python :: 3.6 | |
Environment :: Console | |
License :: OSI Approved :: MIT License | |
Intended Audience :: Developers | |
Topic :: Software Development :: Pre-processors | |
Topic :: Text Processing :: General | |
Topic :: Utilities | |
requires-python= >=3.5 | |
keywords = | |
[scripts] | |
# fcomments = fcomments:main | |
""" >> flit.ini | |
echo """[flake8] | |
max-line-length = 110 | |
exclude = ex_file.py,dist | |
ignore = D10 | |
count = True | |
show-source = True | |
statistics = True | |
max-complexity = 10""" >> setup.cfg | |
echo """MIT""" > license.txt | |
conda create -n $1 python=3.6 -y | |
source activate $1 | |
pip install -r requirements.txt | |
git add . | |
pip list | |
git commit -m'Initial commit' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment