Skip to content

An elegant, opinionated framework for deploying BrightHive Data Resources with zero coding.

License

Notifications You must be signed in to change notification settings

brighthive/data-resource-generator

Repository files navigation

Data Resource Generator

Maintenance GitHub commit activity GitHub Pipenv locked Python version GitHub

Twitter Follow

An elegant, opinionated framework for deploying BrightHive Data Resources (declarative database and API) with zero coding.

Motivation

BrightHive is in the business of building Data Trusts, which are legal, technical, and governance frameworks that enable networks of organizations to securely and responsibly share and collaborate with data, generating new insights and increasing their combined impact.

Features

Simply provide the application a declarative database and API specification via API and it will automatically stand up a RESTful database and API!

  • Declarative database with RESTful API using frictionless table schema and swagger

    • Dynamically generates SQLAlchemy ORM

    • Dynamically generates RESTful routing

  • Column level encryption

How to use Data Resource Generator

Please see the Data Resource Generator documentation.

How to develop Data Resource Generator

Please see https://data-resource-generator.readthedocs.io/en/latest/ for docs.

We welcome code contributions, suggestions, and reports! Please report bugs and make suggestions using Github issues. The BrightHive team will triage and prioritize your issue as soon as possible.

For development this application uses pre-commit hooks. When you make a commit the modified files will be put through a series of tests. If all tests pass then you will be able to make a commit, otherwise corrections will either automatically be made or need to be manually corrected. Please see pre-commit hooks website for instructions and reference the pre-commit yaml file to see the tests that are run.

  1. Install pipenv.

  2. Install docker and docker-compose.

  3. Clone the repo.

  4. Install production and development packages

    pipenv install --dev
  5. Install pre-commit hooks,

    pipenv run pre-commit install

Quick note about pre-commit hooks

In the event that you want to run pre-commit hooks over the entire application use the following,

pipenv run pre-commit run --all-files

To commit without running the pre-commit hooks add the --no-verify flag to your git commit command.

Testing

Some tests require that a database (Postgres) is running. We use docker to handle this for us. We have included a docker-compose file that allows you to easily run Postgres.

For developers to run the test suite,

  1. First install the required packages

    pipenv install --dev
  2. Stand up the database

    docker-compose -f test-database-docker-compose.yml up -d
  3. Run the tests with the following command,

    pipenv run pytest

Team

  • Logan Ripplinger (Software Engineer)
  • Gregory Mundy (VP of Engineering)
  • John O'Sullivan (Software Engineer)

License

MIT