Skip to content

Latest commit

 

History

History
92 lines (53 loc) · 2 KB

CONTRIBUTING.rst

File metadata and controls

92 lines (53 loc) · 2 KB

Contributing

Contributions are very welcome and highly appreciated!

Setup you dev environment

1 - First create a python development virtualenv

$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt -r requirements-dev.txt -r requirements-extra.txt

2 - Install docker and docker-compose

Run tests

Contributions for new features or fixes should have tests associated. To verify that all tests are green you can run a subset of tests targeting only Postgres.

1 - Start Postgres

$ docker-compose up -d

2 - Run Postgres tests

$ nosetests flask_appbuilder.tests

You can also use tox

$ tox -e postgres

4 - Code Formatting

$ black flask_appbuilder
$ flake8 flask_appbuilder

Run a single test

Using Postgres

1 - Stop and delete Postgres volume, then restart

$ docker-compose down -v
$ docker-compose up -d

2 - Export the connection string

$ export SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://pguser:[email protected]/app

3 - Run the fixtures

$ nosetests -v flask_appbuilder.tests.A_fixture

4 - Run a single test

$ nosetests -v flask_appbuilder.tests.test_api:APITestCase.test_get_item_dotted_mo_notation

Note

If your using SQLite3, the location of the db is: ./flask_appbuilder/tests/app.db You can safely delete it, if you need to delete the fixtures for example.

Responsible disclosure of Security Vulnerabilities

We want to keep Flask-AppBuilder safe for everyone. If you've discovered a security vulnerability please report to [email protected]. Reporting security vulnerabilities through the usual GitHub Issues channel is not ideal as it will publicize the flaw before a fix can be applied.