To decrease the hassle of installing different versions of dependencies for the project, it is recommended that you use pipenv. Pipenv ships with package management and virtual environment support. To install, just run the command below
pip install pipenv
You would also need to download and set up ganache gui
-
git clone [email protected]:trufflesuite/ganache.git
-
cd ganache
-
npm install
-
npm start
Follow the steps below to clone and set up the project.
-
git clone [email protected]:peakshift/ethereum-flask.git
-
cd ethereum-flask
To run the Flask app:
-
pipenv install
-
server= "server url" pipenv run python app.py
- eg.
server="http://localhost:8080" pipenv run python app.py
In these steps pipenv is installing the necessary dependencies for the project and automatically creates a virtual environment for the project. Any other dependencies that you may add would be automatically added to the Pipfile.
- Fork it (https://github.com/peakshift/ethereum-flask/fork)
- Create your feature branch (see "Branches" below)
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin 123-short-name
) - Create a new Pull Request to base
peakshift:master
- A branch name should begin with the issue number, and have short name (2-4 words). New features or fixes should be based off of the
master
branch.git checkout -b 123-short-name master
When making changes or adding a new feature, to ensure the feature works correctly or the changes made have not broken the code then you can do unit testing using the behave framework and gherkin scenarios. *Behave Framework Docs
To begin testing your scenarios
- run
pipenv install behave
- run
pipenv run behave
- if it passes
- commit and push your branch
- open a pull request for your branch in develop
- if it fails
- fix the problem so all tests pass
- Open Terminal.
git pull
git add file_name.py
git commit -m "type(component): subject line"
git push origin 123-short-name
We follow the Angular commit guidelines so that we can generate changelogs and have a clean commit history โ see Pushing Changes #3 for an example commit.
- Type, for your commit message commiting you should select a type from this list below:
- feat: a new features
- fix: a bug fix
- docs: documentation only changes
- style: changes that do not affect the menaing of the code (white-space, formatting, missing semi-colons, etc)
- refactor: a code change that neither fixes a bug or adds a feature
- pref: a code change that improves performance
- test: adding missing tests
- chore: changes to the build process or auxiliary tools and libraries such as documentation generation
- Components, represent the larger feature / scope of the change
- Subject line, use the imperative form of a verb
- GOOD "add contributing guidelines"
- BAD "adding contribuing guidelines"