Contributing¶
- Report Bugs on the issues page with detailed steps to reproduce the bug, and your Anaconda version
- Fix Bugs on the issues page for anything tagged “bug”.
- Implement features on the issues page for anything tagged “feature”.
- Write Documentation, either as part of the official Autolysis docs, in docstrings, or in blog posts.
Setup¶
- The master branch holds the latest stable version.
- The dev branch has the latest development version
- Any other branches are temporary feature branches
Autolysis runs on Python 2.7+ and Python 3.4+ in Windows and Linux. To set up the development environment on Ubuntu, run this script:
source <(wget -qO- https://github.com/gramener/autolysis/issues/raw/master/setup-dev.sh)
To manually set up the development environment, follow these steps.
Install Anaconda (version 2.4 or higher)
Install git and make. On Windows, use git and make, or use cygwin.
Clone the Autolysis repo:
git clone git@github.com:gramener/autolysis.git cd autolysis git checkout devInstall development requirements, and also this branch in editable mode. This “installs” the autolysis folder in development mode. Changes to this folder are reflected in the environment:
pip install -r requirements.txt # Base requirements pip install -r requirements-dev.txt # Additional development requirements pip uninstall autolysis # Uninstall prior autolysis repo pip install -e . # Install this repo as autolysis
Any changes made to the
autolysisrepo will automatically be reflected when you import the package.Install MySQL and PostgreSQL. Ensure that you can connect using the following SQLAlchemy strings:
postgresql://postgres@localhost/autolysistest mysql+pymysql://root@localhost/autolysistest
Notes: mysql.ini must not have a
secure-file-privflag set.
Contributing to autolysis¶
Create a branch for local development to make local changes:
$ git checkout -b <branch-name>When you’re done making changes, check that your changes pass flake8 and the tests, as well as provide reasonable test coverage:
make release-test
To run a subset of tests:
python -m unittest tests.test_types
Note: This uses the
python.exein yourPATH. To change the Python used, run:export PYTHON=/path/to/python # e.g. path to Python 3.4+
Commit your changes and push your branch:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push --set-upstream origin <branch-name>
Submit a pull request through the code.gramener.com website.
To delete your branch:
git branch -d <branch-name> git push origin --delete <branch-name>
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
- The pull request should work for Python 2.7, 3.4 and 3.5
Release¶
When releasing a new version of Autolysis:
Test the
devbranch by running:export PYTHON=/path/to/python2.7 make release-test export PYTHON=/path/to/python3.4 make release-test export PYTHON=/path/to/python3.5 make release-test
Build and upload the release:
make release
- Update the following and commit:
docs/HISTORY.rst– add release notesREADME.rst– update the version number
Merge with master, create an annotated tag and push the code:
git checkout master git merge dev git tag -a v1.x.x # Annotate with a one-line summary of features git push --follow-tags