Deploy a development instance¶
In development mode, AskOmics dependencies can be deployed with docker-compose, but AsKomics have to be running locally, on your dev machine.
Install dev dependencies
# Debian/Ubuntu sudo apt install -y git python3 python3-venv python3-dev make gcc zlib1g-dev libbz2-dev liblzma-dev g++ npm # Fedora sudo dnf install -y git make gcc zlib-devel bzip2-devel xz-devel python3-devel gcc-c++ npm
# Debian/Ubuntu apt install -y docker-compose # Fedora dnf install -y docker-compose
We provide a
docker-compose template to run external services used by AskOmics. Clone the flaskomics-docker-compose repository to use it.
git clone https://github.com/askomics/flaskomics-docker-compose.git
docker-compose up -d
Fork and clone AskOmics repository¶
Fork the AskOmics repository
then, clone your fork locally
git clone https://github.com/USERNAME/flaskomics.git # replace USERNAME with your github username
install.sh script to setup the python virtual environment and to download python and node modules needed.
Run in dev mode
./run_all.sh -d dev
Launch continuous integration locally¶
AskOmics have to pass the continuous integration. To run the CI locally, you can use
test.sh. The CI use
config/askomics.test.ini for the configuration. You can use the
ci/docker-compose.yml of flaskomics-docker-compose to deploy clean third party apps used by AskOmics on the right port.
Contribute to AskOmics¶
If you have an idea for a feature to add or an approach for a bugfix, it is best to communicate with developers early. The most common venues for this are GitHub issues.
All changes to AskOmics should be made through pull requests to this repository.
Install AskOmics in development mode, then, create a new branch for your new feature
git checkout -b my_new_feature
Commit and push your modification to your fork. If your changes modify code, please ensure that is conform to AskOmics style
Write tests for your changes, and make sure that they passes.
Open a pull request against the master branch of flaskomics. The message of your pull request should describe your modifications (why and how).
The pull request should pass all the continuous integration tests which are automatically run by Github using Travis CI. The coverage must be at least remain the same (but it's better if it increases)
Coding style guidelines¶
Ensure all user-enterable strings are unicode capable. Use only English language for everything (code, documentation, logs, comments, ...)
We follow PEP-8, with particular emphasis on the parts about knowing when to be inconsistent, and readability being the ultimate goal.
- Whitespace around operators and inside parentheses
- 4 spaces per indent, spaces, not tabs
- Include docstrings on your modules, class and methods
- Avoid from module import *. It can cause name collisions that are tedious to track down.
- Class should be in
CamelCase, methods and variables in
Contribute to docs¶
all the documentation (including what you are reading) can be found here. Files are on the AskOmics repository.
To serve docs locally, run
cd flaskomics # source the askomics virtual env source venv/bin/activate cd docs mkdocs serve
Docs are available at localhost:8000