Name: pystarter
Owner: Harvard Medical School - Department of Biomedical Informatics
Description: base project to be used as a starter for all your other python projects
Created: 2017-11-28 19:11:03.0
Updated: 2017-12-01 19:59:40.0
Pushed: 2017-12-08 18:52:07.0
Size: 37
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a starter repo, use this to get started with a new python project and get stuff like automated builds, tests, publish to pypi etc… Out of the box for free.
list all commands
ke -l
read help from there.
"suggested you are using virutalenvwrapper setup at (http://virtualenvwrapper.readthedocs.io/en/latest/install.html)"
rtualenv myproj --python=`which python3`
clone https://hms-dbmi/pystarter
ystarter
rf .git
install -r requirments-dev.txt
"basic environment set up, you are good to go"
remote add origin https://github.com/hms-dbmi/<your_repo_name>.git
push -u origin master
"See configure section in README.md"
This setup assumes your project is in the folder called sample. You should change the name of sample to be the name of your project and put all you code in that directory. Also change:
setup.py/setup (bottom of file)
As below name='name of code diretory / project packages=['put name of code directory here']
change whatever other details you deem appropriate.
NOTE: you will have to keep setup.requires
up to date with the libraries you use for your project if
you want auto pypi deployment to work.
ALSO CHANGE ***
in tasks.py
near the top probably close to line 12
ECT_NAME = 'sample'
here you need to swap sample with name of your code directory
Tests use pytest. Put all your unit tests in the tests folder, name them test_somthing.py. Each test function should start with the name test_ . That's it, test away and be merry. :)
This repo is also already pre-configured to run CI tests with travis. So anything in your tests folder will get ran each time you push code to github. You need to make sure your new repo is enabled in travis however for this to happen.
Publish will publish your code to pypi / cheese shop for easy sharing with the world