-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Update dag test utils for Airflow 2.0 #5865
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b63a985
Add changelog and maintenance guide
leahecole 8dc5c76
update dag test util to version 1.0
leahecole 11808dd
Merge branch 'master' into new-dag-utils-versison
leahecole ae764df
add Rachael suggestions to maintaining guide
leahecole bfb4526
Merge branch 'master' into new-dag-utils-versison
leahecole e1fd292
add version range for Airflow instead of pinning
leahecole 6c3f0da
Merge branch 'master' into new-dag-utils-versison
leahecole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# CHANGELOG | ||
|
||
## 1.0.0 - May 21, 2021 | ||
* Upgrade to Airflow 2.0.0 | ||
* Add CHANGELOG | ||
* Add README to PyPI | ||
* Add MAINTAINING | ||
|
||
## 0.0.1 - May 20, 2021 | ||
* Push package compatible with Airflow 1.10.15 to PyPI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Maintenance Guide | ||
|
||
## How to release a new version | ||
* Make relevant code changes | ||
* Increment the version number in [setup.py](./setup.py) following [semver](https://semver.org/) | ||
* Add changes to the [CHANGELOG](./CHANGELOG.md) | ||
* If any usage info has changed, update the [README](./README.md) | ||
* [Test the distribution locally](#how-to-test-the-distribution-locally) in the [workflows directory](../workflows) | ||
* Open a PR and request reviews from a [Python Samples owner](https://github.com/orgs/GoogleCloudPlatform/teams/python-samples-owners) and a [Composer Codeowner](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS#L24) | ||
* Once the PR is approved and merged, [push the new version to PyPI](#how-to-push-the-new-version-to-pypi) | ||
|
||
## How to test the distribution locally | ||
* In a `virtualenv`, run `pip install build` | ||
* Run `python -m build` to build the package. It will create a `dist/` directory containg a wheel (`.whl`) and a tar (`.tar.gz`). | ||
* Change the [`requirements-test.txt`](../workflows/requirements-test.txt) file in the [`workflows`](../workflows) directory to import your distribution relatively, ensuring that `x.y.z` is replaced with your version number | ||
|
||
``` | ||
../dag_test_utils/dist/cloud_composer_dag_test_utils-x.y.z.tar.gz | ||
``` | ||
|
||
* Run `nox -s py-3.8 -- quickstart_test.py` (or the entire nox session, if you prefer) - if it passes without an `ImportError`, congrats! You've done it! | ||
|
||
|
||
## How to push the new version to PyPI | ||
Note - these instructions are derived from [the official guide](https://packaging.python.org/tutorials/packaging-projects/) - if they seem to be out of date, please contact `cloud-dpes-composer@`. | ||
|
||
You may only do this after you have successfully tested the package locally and had your PR approved and merged to the primary branch of `python-docs-samples`. | ||
|
||
You will need access to the `cloud-dpes-composer` PyPI account and will need an API token. Reach out to `cloud-dpes-composer@` for access. | ||
|
||
* In a `virtualenv`, run `pip install build` | ||
* Run `python -m build` to build the package. It will create a `dist/` directory containg a wheel (`.whl`) and a tar (`.tar.gz`). | ||
* Run `pip install twine` | ||
* Run `python -m twine upload --repository pypi dist/*` | ||
* For username, put `__token__`. For password, put your API token. | ||
* Voila! Your new version is fully released! | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pytest==6.2.4 | ||
cloud-composer-dag-test-utils==0.0.1 | ||
cloud-composer-dag-test-utils==0.0.1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.