Skip to content

Latest commit

 

History

History
155 lines (100 loc) · 6.26 KB

CONTRIBUTING_PACKAGES.md

File metadata and controls

155 lines (100 loc) · 6.26 KB

Contribute packages

To submit a custom Great Expectations package, you complete the following tasks:

To request a documentation change, or a change that doesn't require local testing, see the README in the docs repository.

To create and submit a Custom Expectation to Great Expectations for consideration, see CONTRIBUTING_EXPECTATIONS in the great_expectations repository.

To submit a code change to Great Expectations for consideration, see CONTRIBUTING_CODE in the great_expectations repository.

Prerequisites

Contact the Great Expectations Developer Relations team

Before you develop your custom Great Expectations package, notify the Great Expectations Developer Relations team of your plans in the Great Expectations #integrations Slack channel. A member of the team will discuss your custom Great Expectations package, support your development, and help you navigate the publication and maintenance process.

Install the Great Expectations CLI tool

Great Expectations provides the great_expectations_contrib command-line interface (CLI) tool to simplify the package contribution process and help you adhere to code base best practices.

The great_expectations_contrib CLI tool performs the following functions:

  • Initializes your package structure

  • Performs a series of checks to validate your package

  • Publishes your package to PyPi

While you're developing your package, you must use this tool to ensure that it meets the necessary requirements.

  1. Run the following command to cd to the root of the great_expectations codebase:

    cd contrib/cli
  2. Run the following command to install the CLI tool:

    pip install -e great_expectations_contrib
  3. Run the following command to verify your installation:

    great_expectations_contrib

Initialize a project

After you've enabled the great_expectations_contrib CLI tool, you need to initialize an empty package.

  1. Run the following command to initialize an empty package:

    great_expectations_contrib init
  2. Enter the name of your package, the purpose of your package, and your GitHub and PyPI usernames.

  3. Run the following command to access your configured package:

    cd <PACKAGE_NAME>
    tree

    The command returns a file structure similar to the following example:

    .
    ├── LICENSE
    ├── README.md
    ├── assets
    ├── package_info.yml
    ├── requirements.txt
    ├── setup.py
    ├── tests
    │   ├── __init__.py
    │   ├── expectations
    │   │   └── __init__.py
    │   ├── metrics
    │   │   └── __init__.py
    │   └── profilers
    │       └── __init__.py
    └── <YOUR_PACKAGE_SOURCE_CODE>
        ├── __init__.py
        ├── expectations
        │   └── __init__.py
        ├── metrics
        │   └── __init__.py
        └── profilers
            └── __init__.py

    To ensure consistency with other packages, maintain this general structure as you develop you package.

Contribute to your package

  1. Record any dependencies in your requirements.txt file, validate your code in tests, describe your package capabilities in README.md, and update publishing details in setup.py.

  2. Optional. Update package metadata and assign code owners or domain experts. See package_info.yml.

  3. Run the following command to run checks on your package including code formatting, annotated function signature availability, and Expectation documentation:

    great_expectations_contrib check

Publish your package

Publish your package after you have tested and verified its behavior and documented its capabilities.

  1. Run the following command to publish your package:

    great_expectations_contrib publish
  2. Enter your PyPI username and password.

Issue tags

Great Expectations uses a stalebot to automatically tag issues without activity as stale, and closes them when a response is not received within a week. To prevent stalebot from closing an issue, you can add the stalebot-exempt tag.

Additionally, Great Expectations adds the following tags to indicate issue status:

  • Thehelp wanted tag identifies useful issues that require help from community contributors to accelerate development.

  • The enhacement and expectation-request tags identify new Great Expectations features that require additional investigation and discussion.

  • The good first issue tag identifies issues that provide an introduction to the Great Expectations contribution process.