Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Add pre-commit autofix to PRs #8873

Merged
merged 10 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ci:
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
autofix_prs: false
autofix_prs: true
autoupdate_branch: 'develop'
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING_EXPECTATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Confirm the `library_metadata` object for your Custom Expectation includes the f
- [FEATURE] for significant PRs that add a new feature likely to require being added to our feature maturity matrix.

- [MAINTENANCE] for PRs that focus on updating repository settings or related changes.

- [CONTRIB] for the contribution of Custom Expectations and supporting work into the `contrib/` directory.

- [HACKATHON] for submissions to an active Great Expectations Hackathon.

In the section for design review, include a description of any prior discussion or coordination on the features in the PR, such as mentioning the number of the issue where discussion has taken place. For example: Closes #123”, linking to a relevant discuss or slack article, citing a team meeting, or even noting that no discussion is relevant because the issue is small.
Expand All @@ -131,6 +131,6 @@ Additionally, Great Expectations adds the following tags to indicate issue statu

- The`help 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 `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.
2 changes: 1 addition & 1 deletion IDE_SETUP_TIPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ _.vscode/settings.json_

## PyCharm

tbd.
tbd.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![PyPI](https://img.shields.io/pypi/v/great_expectations)](https://pypi.org/project/great-expectations/#history)
[![PyPI Downloads](https://img.shields.io/pypi/dm/great-expectations)](https://pypistats.org/packages/great-expectations)
[![Build Status](https://img.shields.io/azure-devops/build/great-expectations/bedaf2c2-4c4a-4b37-87b0-3877190e71f5/1)](https://dev.azure.com/great-expectations/great_expectations/_build/latest?definitionId=1&branchName=develop)
[![pre-commit.ci Status](https://results.pre-commit.ci/badge/github/great-expectations/great_expectations/develop.svg)](https://results.pre-commit.ci/latest/github/great-expectations/great_expectations/develop)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5683574.svg)](https://doi.org/10.5281/zenodo.5683574)
[![Twitter Follow](https://img.shields.io/twitter/follow/expectgreatdata?style=social)](https://twitter.com/expectgreatdata)
[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://greatexpectations.io/slack)
Expand Down Expand Up @@ -480,5 +481,3 @@ How do I stay up to date with Great Expectations?
--------------------------------------------------------------------------------

You can get updates on everything GX with our email newsletter. [Subscribe here!](https://greatexpectations.io/newsletter?utm_source=github&utm_medium=social&utm_campaign=newsletter&utm_content=form)


4 changes: 2 additions & 2 deletions assets/docker/clickhouse/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ services:
image: yandex/clickhouse-server
ports:
- "9000:9000"

ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
hard: 262144
2 changes: 1 addition & 1 deletion assets/docker/clickhouse/info.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
aa|User:149.62.201.0/24|1|4802
aa|User:191.101.30.0/24|1|4806
aa|User:5.172.192.0/21|1|4800
aa|User:62.76.7.25|1|4788
aa|User:62.76.7.25|1|4788
13 changes: 6 additions & 7 deletions assets/docker/mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ A second service will create the `test_ci` database required for the tests. This

You should now be able to run the tests via `pytest --mssql`

## If your Mac computer has an Apple M1 chip, you might need to
## If your Mac computer has an Apple M1 chip, you might need to

1. specify additional compiler or linker options. For example:

```sh
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/[your version]/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/[your version]/include"
```
```

2. Turn on `activate Rosetta emulation (beta feature)` within docker desktop

See: https://github.com/microsoft/mssql-docker/issues/668#issuecomment-1420259510

3. Install the ODSBC 17 driver:
3. Install the ODSBC 17 driver:

https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver15

### Trouble shooting for Apple Silicon Macs

1. If you are seeing the following error:

```
Expand All @@ -39,8 +39,7 @@ You should now be able to run the tests via `pytest --mssql`
2. If you are getting `Login timeout expired` when using localhost, try setting:

```sh
export GE_TEST_LOCAL_DB_HOSTNAME=127.0.0.1
export GE_TEST_LOCAL_DB_HOSTNAME=127.0.0.1
```



2 changes: 1 addition & 1 deletion assets/partners/anthonydb/provision.mssql
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ BEGIN
congestion_surcharge double precision
);
END
GO
GO
2 changes: 1 addition & 1 deletion assets/partners/anthonydb/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
great_expectations
pyodbc>=4.0.30
pyarrow
pyodbc>=4.0.30
pytest
2 changes: 1 addition & 1 deletion assets/partners/rubenshift/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
great_expectations
psycopg2-binary
sqlalchemy-redshift>=0.7.7
pyarrow
pytest==7.0.1
sqlalchemy-redshift>=0.7.7
2 changes: 1 addition & 1 deletion assets/scripts/AlgoliaScripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Install my-project with npm
```bash
cd AlgoliaScripts
npm install

// Upload expectations to algolia
node upload-expec

Expand Down
6 changes: 3 additions & 3 deletions ci/azure-pipelines-sqlalchemy-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ stages:
cp constraints-dev.txt constraints-dev-temp.txt
echo "SQLAlchemy$(comparison)2.0.0" >> constraints-dev-temp.txt
echo "pandas$(comparison)2.0.0" >> constraints-dev-temp.txt

pip install --constraint constraints-dev-temp.txt ".[test, postgresql]" pytest-azurepipelines
displayName: 'Install dependencies using SQLAlchemy base version $(sqlalchemy_base_version)'

Expand Down Expand Up @@ -182,7 +182,7 @@ stages:
comparison: '>='

services:
mssql: mssql
mssql: mssql

steps:
- task: UsePythonVersion@0
Expand All @@ -200,7 +200,7 @@ stages:
cp constraints-dev.txt constraints-dev-temp.txt
echo "SQLAlchemy$(comparison)2.0.0" >> constraints-dev-temp.txt
echo "pandas$(comparison)2.0.0" >> constraints-dev-temp.txt

pip install --constraint constraints-dev-temp.txt ".[test, mssql]" pytest-azurepipelines
displayName: 'Install dependencies using SQLAlchemy base version $(sqlalchemy_base_version)'

Expand Down
4 changes: 2 additions & 2 deletions contrib/time_series_expectations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ As all of those use cases are realized, we imagine the full class hierarchy for
ExpectBatchAggregateStatisticToMatchArimaModel (ABC)
expect_batch_row_count_to_match_arima_model
expect_batch_most_recent_update_to_match_arima_model

... for other types of models

*ColumnAggregateExpectation* (ABC)
Expand All @@ -92,7 +92,7 @@ As all of those use cases are realized, we imagine the full class hierarchy for
expect_column_pair_values_to_match_prophet_date_model (:white_check_mark:)
expect_column_pair_values_to_match_prophet_timestamp_model
expect_column_pair_values_to_match_arima_model

Formatting conventions for the nested hierarchy above:

* Abstract base classes are in CamelCase, and marked with (ABC).
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs_rtd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ install:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 0 additions & 2 deletions docs_rtd/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ Contribute code or documentation

We welcome contributions to Great Expectations. Please start with our :ref:`contributing` guide and don't be shy
with questions!


2 changes: 0 additions & 2 deletions docs_rtd/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,3 @@ Our goal is to make your experience as great as possible. Please follow these st
/contributing/levels_of_maturity
/contributing/style_guide
/contributing/miscellaneous


Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Both contributors and reviewers should follow this checklist:

* The tests included in the module must pass for the PR to be approved.

* Verify that changes to existing renderers (or new renderers) make sense--the language needs to accurately describe the semantics and behavior of the Expectation.
* Verify that changes to existing renderers (or new renderers) make sense--the language needs to accurately describe the semantics and behavior of the Expectation.

* Clarification about imports, renderers
* At this time, unused module imports and commented out renderer code from the template should not be removed if left in by the contributor. However if the contributor has already removed it, please do not put it back in.
Expand Down
8 changes: 4 additions & 4 deletions docs_rtd/contributing/contribution_checklist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Following these instructions helps us make sure the code review and merge proces
Before submitting a pull request
--------------------------------

Once your code is ready, please go through the following checklist before submitting a pull request.
Once your code is ready, please go through the following checklist before submitting a pull request.


**1. Have you signed the CLA?**
Expand Down Expand Up @@ -75,12 +75,12 @@ When you’re done with your work...
* Follow `these instructions <https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork>`__ to create a PR from your commit.
* Provide background for reviewers so they can understand and approve your PR more quickly:

* Choose a short title which sums up the changes that you have made.
* Choose a short title which sums up the changes that you have made.
* Add a tag to help categorize the PR:

* [BUGFIX] for PRs that address minor bugs without changing behavior,
* [BUGFIX] for PRs that address minor bugs without changing behavior,
* [FEATURE] for significant PRs that add a new feature likely to require being added to our feature maturity matrix,
* [DOCS] for PRs that focus on improving documentation, or
* [DOCS] for PRs that focus on improving documentation, or
* [MAINTENANCE] for PRs that focus on updating repository settings or related chores. This status is used internally.

* Summarize your changes using a few clear sentences (sometimes screenshots are nice too!). A good guide is to aim for a collection of commit message summaries that provide more details about what your changes do, like "Fixed handling of malformed datasource configuration" or "Improved docstrings for store module"
Expand Down
5 changes: 2 additions & 3 deletions docs_rtd/contributing/levels_of_maturity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For contributors to Great Expectations, our goal is to channel creativity by alw
This grid provides guidelines for how the maintainers of Great Expectations evaluate levels of maturity. Maintainers will always exercise some discretion in determining when any given feature is ready to graduate to the next level. If you have ideas or suggestions for leveling up a specific feature, please raise them in Github issues, and we'll work with you to get there.

.. raw:: html

<table class="legend-table">
<tr>
<td><br/><b>Criteria</b></td>
Expand Down Expand Up @@ -73,7 +73,7 @@ This grid provides guidelines for how the maintainers of Great Expectations eval
</table>
<br/>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<style>
.text-danger {
color: #dc3545;
Expand All @@ -93,4 +93,3 @@ This grid provides guidelines for how the maintainers of Great Expectations eval
\* Experimental classes log warning-level messages when initialized: “Warning: great_expectations.some_module.SomeClass is experimental. Methods, APIs, and core behavior may change in the future.”

** In the special case of Expectations, some gaps in implementation are allowed in beta (e.g. works in pandas and Spark, but not yet in SQLAlchemy; validation and rendering work, but not profiling yet)

7 changes: 2 additions & 5 deletions docs_rtd/contributing/make_changes_through_github.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Start editing

* Go to the `Great Expectations docs <http://docs.greatexpectations.io/en/latest/>`__.
* On each page, you’ll see an ``Edit on GitHub`` button in the top right. Click this to go to the source file in the Great Expectations GitHub repo.

**1B. Edit from Github**

* If you’re already on GitHub, the docs are located in ``great_expectations > docs``. You can directly navigate to the respective page you want to edit (but getting there from `docs.great_expectations.io <http://docs.greatexpectations.io/en/latest/>`__ is a little easier).
Expand Down Expand Up @@ -49,7 +49,7 @@ Submit a pull request

**6. Wait for a core team member to approve and merge your PR**

* Once all checks pass, a Great Expectations team member will approve your PR and merge it.
* Once all checks pass, a Great Expectations team member will approve your PR and merge it.
* GitHub will notify you of comments or a successful merge according to your notification settings.
* If there are any issues, please address them promptly.

Expand All @@ -63,6 +63,3 @@ Submit a pull request
.. ------------------

.. #FIXME: Insert video version here.



6 changes: 3 additions & 3 deletions docs_rtd/contributing/setting_up_your_dev_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Install python dependencies
* ``pip install -r requirements-dev.txt -c constraints-dev.txt``
* MacOS users will be able to pip / pip3 install ``requirements-dev.txt`` using the above command from within conda, yet Windows users utilizing a conda environment will need to individually install all files within ``requirements-dev.txt``
* This will ensure that sure you have the right libraries installed in your python environment.

* Note that you can also substitute ``requirements-dev-test.txt`` to only install requirements required for testing all backends, and ``requirements-dev-spark.txt`` or ``requirements-dev-sqlalchemy.txt`` if you would like to add support for spark or sqlalchemy tests, respectively. For some database backends, such as MSSQL additional driver installation may required in your environment; see below for more information.
* For some users, installation of certain Pyspark versions (such as 2.4.7) may cause import errors. To fix this simply run ``pip install pyspark --upgrade`` to upgrade to the latest version, which should fix all import errors.
* `Installing Microsoft ODBC driver for MacOS <https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos>`__
Expand All @@ -89,7 +89,7 @@ Depending on which features of Great Expectations you want to work on, you may w

.. code-block::

Name Command State Ports
Name Command State Ports
———————————————————————————————————————————
postgresql_travis_db_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp

Expand All @@ -106,7 +106,7 @@ Depending on which features of Great Expectations you want to work on, you may w
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

* Or this...

.. code-block::
Expand Down
1 change: 0 additions & 1 deletion docs_rtd/guides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ This section contains a collection of practical step-by-step instructions to hel
/guides/tutorials
/guides/workflows_patterns
/guides/how_to_guides

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Please see the :ref:`Getting Started <tutorials__getting_started__initialize_a_d

.. discourse::
:topic_identifier: 160

Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Overwriting a section
#. **For code**

.. code-block:: yaml

notebooks:
suite_edit:
custom_templates_module: notebook_assets.suite_edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Steps
connection_string: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=<YOUR-STORAGE-ACCOUNT-NAME>;AccountKey=<YOUR-STORAGE-ACCOUNT-KEY==>"
container: <blob-container>
prefix: validations

.. tab-container:: tab1
:title: Show Docs for V3 (Batch Request) API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Steps
store_backend:
class_name: TupleS3StoreBackend
bucket: '<your_s3_bucket_name>'
prefix: '<your_s3_bucket_folder_name>'
prefix: '<your_s3_bucket_folder_name>'


6. **Confirm that Expectations can be accessed from Amazon S3 by running** ``great_expectations --v3-api suite list``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ By default, newly profiled Expectations are stored in JSON format in the ``expec
- Configured an Azure `storage account <https://docs.microsoft.com/en-us/azure/storage>`_ and get the `connection string <https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal>`_
- Create the Azure Blob container. If you also wish to :ref:`host and share data docs on azure blob storage <how_to_guides__configuring_data_docs__how_to_host_and_share_data_docs_on_azure_blob_storage>` then you may setup this first and then use the ``$web`` existing container to store your expectations.
- Identify the prefix (folder) where Expectations will be stored (you don't need to create the folder, the prefix is just part of the Blob name).

Steps
-----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ How to edit an Expectation Suite using a disposable notebook
==========================================================================

Editing :ref:`Expectations` in a notebook is usually much more convenient than editing them as raw JSON objects. You can evaluate them against real data, examine the results, and calibrate parameters. Often, you also learn about your data in the process.

To simplify this workflow, the CLI command ``suite edit`` takes a named :ref:`Expectation Suite <reference__core_concepts__expectations__expectation_suites>` and uses it to *generate* an equivalent Jupyter notebook. You can then use this notebook as a disposable interface to edit your Expectations and optionally explore data.

.. admonition:: Prerequisites: This how-to guide assumes you have already:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Steps
.. code-block::

This article is for comments to: https://docs.greatexpectations.io/en/latest/guides/how_to_guides/{some_path}/{your_guide_name}.html

Please comment +1 if this How-to Guide is important to you.

2. After publishing the article, find the ``topic_id`` at the end of the article's URL: (Ex: ``219`` in ``/t/how-to-configure-an-actionlistvalidationoperator/219``). Please add this code to the bottom of your Guide, and replace ``{topic_id}`` with the real id.

.. raw:: html
Expand Down
1 change: 0 additions & 1 deletion docs_rtd/guides/how_to_guides/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Validation
:glob:

/guides/how_to_guides/validation/*

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Steps

great_expectations checkpoint new my_checkpoint my_suite

2. Next, you will be prompted to select a data asset you want to couple with the Expectation Suite.
2. Next, you will be prompted to select a data asset you want to couple with the Expectation Suite.

3. You will then see a message that indicates the Checkpoint has been added to your project.

Expand Down
Loading
Loading