Great Expectations Cloud
Project description
GX Cloud
Quick Start
To use the GX Agent, you will need to have a Great Expectations Cloud account. You can sign up for free at https://app.greatexpectations.io.
Deployment instructions for the GX Agent can be found in the GX Cloud documentation.
Dev Setup
The following instructions are for those who are contributing to the GX Agent, to deploy and use the GX agent please see the Quick Start section above.
See also CONTRIBUTING.md
- Install
poetry
- Set up virtual environment and install dependencies
poetry install --sync
- Activate your virtual environment
poetry shell
- Set up precommit hooks
pre-commit install
Troubleshooting
If you run into issues, you can try pipx reinstall-all
Running locally for development
$ gx-agent --help
usage: gx-agent [-h] [--log-level LOG_LEVEL] [--skip-log-file SKIP_LOG_FILE] [--log-cfg-file LOG_CFG_FILE] [--version]
optional arguments:
-h, --help show this help message and exit
--log-level LOG_LEVEL
Level of logging to use. Defaults to WARNING.
--skip-log-file SKIP_LOG_FILE
Skip writing debug logs to a file. Defaults to False. Does not affect logging to stdout/stderr.
--log-cfg-file LOG_CFG_FILE
Path to a logging configuration json file. Supersedes --log-level and --skip-log-file.
--version Show the GX Agent version.
Set ENV variables
GX_CLOUD_ACCESS_TOKEN
GX_CLOUD_ORGANIZATION_ID
Start the GX Agent
If you intend to run the GX Agent against local services (Cloud backend or datasources) run the Agent outside of the container.
gx-agent
Developer Tasks
Common developer tasks are available via invoke
(defined in tasks.py
).
invoke --list
to see available tasks.
Synchronize Dependencies
To ensure you are using the latest version of the core and development dependencies run poetry install --sync
.
Also available as an invoke task.
invoke deps
Updating poetry.lock
dependencies
The dependencies installed in our CI and the Docker build step are determined by the poetry.lock file.
To update only a specific dependency (such as great_expectations
) ...
poetry update great_expectations
To resolve and update all dependencies ...
poetry lock
In either case, the updated poetry.lock
file must be committed and merged to main.
Building and Running the GX Agent Image
To build the GX Agent Docker image, run the following in the root dir:
invoke docker
Running the GX Agent:
invoke docker --run
or
docker run --env GX_CLOUD_ACCESS_TOKEN="<GX_TOKEN>" --env GX_CLOUD_ORGANIZATION_ID="<GX_ORG_ID>" gx/agent
Now go into GX Cloud and issue commands for the GX Agent to run, such as generating an Expectation Suite for a Data Source.
Note if you are pushing out a new image update the image tag version in
containerize-agent.yaml
. The image will be built and pushed out via GitHub Actions.
Example Data
The contents from /examples/agent/data will be copied to /data
for the Docker container.
Adding an action to the Agent
- Make a new action in
great_expectations_cloud/agent/actions/
in a separate file. - Register your action in the file it was created in using
great_expectations_cloud.agent.event_handler.register_event_action()
. Register for the major version of GX Core that the action applies to, e.g.register_event_action("1", RunCheckpointEvent, RunCheckpointAction)
registers the action for major version 1 of GX Core (e.g. 1.0.0). - Import your action in
great_expectations_cloud/agent/actions/__init__.py
Note: The Agent is core-version specific but this registration mechanism allows us to preemptively work on actions for future versions of GX Core while still supporting the existing latest major version.
Release Process
Versioning
This is the version that will be used for the Docker image tag as well.
Standard Release:
The versioning scheme is YYYYMMDD.{release_number}
where:
- the date is the date of the release
- the release number starts at 0 for the first release of the day
- the release number is incremented for each release within the same day
For example: 20240402.0
Pre-release:
The versioning scheme is YYYYMMDD.{release_number}.dev{dev_number}
- the date is the date of the release
- the dev number starts at 0 for the first pre-release of the day
- the dev number is incremented for each pre-release within the same day
- the release number is the release that this pre-release is for
For example: 20240403.0.dev0
is the first pre-release for the 20240403.0
release.
For example, imagine the following sequence of releases given for a day with two releases:
20240403.0.dev0
20240403.0.dev1
20240403.0
20240403.1.dev0
20240403.1
There can be days with no standard releases, only pre-releases or days with no pre-release or standard release at all.
Pre-releases
Pre-releases are completed automatically with each merge to the main
branch.
The version is updated in pyproject.toml
and a pre-release is created on PyPi.
A new Docker tag will also be generated and pushed to Docker Hub
Manual Pre-releases
NOTE: CI will automatically create pre-releases on merges to main
. Instead of manually creating pre-releases, consider using the CI process. This is only for exceptional cases.
To manually create a pre-release, run the following command to update the version in pyproject.toml
and then merge it to main
in a standalone PR:
invoke pre-release
This will create a new pre-release version. On the next merge to main
, the release will be uploaded to PyPi.
A new Docker tag will also be generated and pushed to Docker Hub
Releases
Releases will be completed on a regular basis by the maintainers of the project and with any release of GX Core
For maintainers, to create a release, run the following command to update the version in pyproject.toml
and then
merge it to main
in a standalone PR:
invoke release
This will create a new release version. On the next merge to main
, the release will be uploaded to PyPi.
A new Docker tag will also be generated and pushed to Docker Hub. In addition, releases will be tagged with stable
and latest
tags.
GitHub Workflow for releasing
We use the GitHub Actions workflow to automate the release and pre-release process. There are two workflows involved:
-
CI - This workflow runs on each pull request and will update the version in
pyproject.toml
to the pre-release version if the version is not already manually updated in the PR. It will also run the tests and linting. -
Containerize Agent - This workflows runs on merge with
main
and will create a new Docker image and push it to Docker Hub and PyPi. It uses the version inpyproject.toml
.
A visual representation of the workflow is shown here
Dependabot and Releases/Pre-releases
GitHub's Dependabot regularly checks our dependencies for vulnerabilty-based updates and proposes PRs to update dependency version numbers accordingly.
Dependabot may only update the poetry.lock
file. If only changes to poetry.lock
are made, this may be done in a pre-release.
For changes to the pyproject.toml
file:
- If the version of a tool in the
[tool.poetry.group.dev.dependencies]
group is updated, this may be done without any version bump.- While doing this, make sure any version references in the pre-commit config
.pre-commit-config.yaml
are kept in sync (e.g., ruff).
- While doing this, make sure any version references in the pre-commit config
- For other dependency updates or package build metadata changes, a new release should be orchestrated. This includes updates in the following sections:
[tool.poetry.dependencies]
[tool.poetry.group.*.dependencies]
where*
is the name of the group (not including thedev
group)
- To stop the auto-version bump add the
no version bump
label to the PR. Use this when:- Only modifying dev dependencies.
- Only modifying tests that do not change functionality.
NOTE: Dependabot does not have permissions to access secrets in our CI. You may notice that integration tests fail on PRs that dependabot creates. If you add a commit (as a GX member) to the PR, the tests will run again and pass because they now have access to the secrets. That commit can be anything, including an empty commit e.g. git commit -m "some message" --allow-empty
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file great_expectations_cloud-20241121.0.dev1.tar.gz
.
File metadata
- Download URL: great_expectations_cloud-20241121.0.dev1.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013e8ef11526b864e701f83f70a1403b1b0e25b6b6f51a22a424b184ee6da2a5 |
|
MD5 | 614ec2dd1f166cebd3de1f4984ea38bf |
|
BLAKE2b-256 | 3e83b6d2fb8faf2a7fa61cd2ecb3a0ee49b901d1be4ebe5385aa7c4e633730d1 |
Provenance
The following attestation bundles were made for great_expectations_cloud-20241121.0.dev1.tar.gz
:
Publisher:
publish-to-pypi.yaml
on great-expectations/cloud
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
great_expectations_cloud-20241121.0.dev1.tar.gz
- Subject digest:
013e8ef11526b864e701f83f70a1403b1b0e25b6b6f51a22a424b184ee6da2a5
- Sigstore transparency entry: 150655080
- Sigstore integration time:
- Predicate type:
File details
Details for the file great_expectations_cloud-20241121.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: great_expectations_cloud-20241121.0.dev1-py3-none-any.whl
- Upload date:
- Size: 43.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e15a21daee73b629bfa4d2aefd4fa1db5d6be3b38509be7a100a0d23587534 |
|
MD5 | 6d5ec7490180b07df02b8d44150c0c58 |
|
BLAKE2b-256 | 4d7f2afe9d39b0691867c81cd347fa282b378405de419df29d1ac698c3269420 |
Provenance
The following attestation bundles were made for great_expectations_cloud-20241121.0.dev1-py3-none-any.whl
:
Publisher:
publish-to-pypi.yaml
on great-expectations/cloud
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
great_expectations_cloud-20241121.0.dev1-py3-none-any.whl
- Subject digest:
f9e15a21daee73b629bfa4d2aefd4fa1db5d6be3b38509be7a100a0d23587534
- Sigstore transparency entry: 150655083
- Sigstore integration time:
- Predicate type: