Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.93 KB

CONTRIBUTING.md

File metadata and controls

61 lines (41 loc) · 1.93 KB

Contributing

Development Flow

  1. Create a new branch off of latest main branch.
  2. Make your changes.
  3. Bump up the library version in the pyproject.toml according to SemVer
  4. Auto-fix most linting errors via make format
  5. Make sure linting is passing by running make lint.
  6. Make sure tests are passing by running make test
  7. Commit and push your changes to a remote branch.
  8. Open a PR and confirm build is passing.
  9. Once your PR is merged and CICD is complete, your new version will be ready to install on our Artifactory.

Setup

Pre-Requisites for running on your Host Machine

  1. Install Pyenv and Poetry by following the instructions outlined here. (Must be on Known Network/VPN to access this link.)

  2. Install direnv

  3. Hook direnv to your shell. If you're using bash, e.g., add this to your ~/.bashrc.

  4. Create an .envrc file for secrets/configuration based on the config.databudgie.yml and place it in the root of repo.

    Example:

    # .envrc
    export ENVIRONMENT=development
    export DATABASE_HOST=something
    export DATABASE_USERNAME=something
    export DATABASE_PASSWORD=something
    export DATABASE_PORT=something
    export DATABASE_DATABASE=something
  5. direnv allow the .envrc file

  6. Test it works as expected:

    $ databudgie backup

Manifest Tables

The following Python will create a manifest table from the tests.mockmodels.models.DatabudgieManifest model.

Please supply your own SQLAlchemy connection string.

from sqlalchemy import create_engine
from tests.mockmodels.models import Base

engine = create_engine('SQLALCHEMY_CONN_URL', echo=True)
Base.metadata.tables["databudgie_manifest"].create(bind=engine)