Comment on page
Contributing Guide
⏱ tutorial time: 20 minutes
This tutorial will help you set up a full Development environment with all components of the
isabl
infrastructure.📘 Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
isabl
could always use more documentation, whether as part of the README, in doc-strings, or even on the web in blog posts articles, and such. Also, bet you've read the Zen Of Python.- 1.Clone locally:git clone [email protected]:papaemmelab/isabl_api.gitcd api
- 2.Build containers:docker-compose build
- 3.docker-compose run --rm django toxdocker-compose run --rm django pytest --ds example.settings --cov=isabl_apidocker-compose run --rm django pylint isabl_apidocker-compose run --rm django pydocstyle isabl_api
Create a superuser with username and password set to
admin
(we will need it later):docker-compose run --rm django python manage.py migrate
docker-compose run --rm django python manage.py createsuperuser --email [email protected] --username admin
docker-compose up
Now you can login in the frontend at http://localhost:8000 (there won't be much to see). An easy way to create objects is to run the client tests.
Since tests were run inside a container, we need to combine the coverages to see the html report:
alias opencov="mv .coverage .coverage.tmp && coverage combine && coverage html && open htmlcov/index.html"
pip install coverage && opencov
- 1.Clone locally:git clone [email protected]:papaemmelab/isabl_cli.gitcd cli
- 2.pip install -r requirements.txt
- 3.toxpy.test tests/ --cov=isabl_cli -spylint isabl_clipydocstyle isabl_cli
Note: if your changes depend on a particular branch of Isabl API, make sure both Isabl CLI and Isabl API branches are called the same so that the travis configuration can pick that up.
- 1.Clone locally:git clone [email protected]:papaemmelab/isabl_web.gitcd web
- 2.Install yarn:brew install yarn --without-node
- 3.Install dependencies:yarn install
- 4.Start the react development server:yarn serveImportant! export
FRONTEND_URL=localhost:8080
before runningdocker-compose up
in the api repository, note that the port may vary.
git clone [email protected]:isabl/docs.git
- 1.Create a branch for local development and get ready to make changes locally:git pullgit checkout -b name-of-your-bugfix-or-feature
- 2.Commit your changes and push your branch to GitHub (see the emoji reference):git add .git config commit.template .gitmessagegit commit -m ":emoji: your short and nice description"git push origin name-of-your-bugfix-or-feature
- 3.Create a test in:tests/
- 4.Submit a pull request through the GitHub website.
pip install black && black .
yarn lint
Following the semantic versioning guidelines and update the
VERSION
file before creating a PR, for instance:echo v0.1.0 > isabl_api/VERSION
git add isabl_api/VERSION
git commit -m ":gem: bump to version 0.1.0"
We use emojis to quickly categorize commits and pull requests. These are some common type of changes we use but feel free to ignore the conventions:
emoji | name | type of change |
🚀 | rocket | new feature |
🐛 | bug | bug fix |
📝 | memo | changes to documentation |
🎨 | art | formatting no code change |
🔧 | wrench | refactoring production code |
✅ | white_check_mark | adding/editing test logic |
👕 | shirt | no production code change |
💎 | gem | bump to new version |
Tip: To insert an emoji in mac type
control+cmd+space
. Alternative, type the emoji's name within two semicolons (e.g. :rocket:
).Last modified 7mo ago