diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a52bfdeb..c7a7acea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,10 +9,10 @@ jobs: strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" + - "3.11" fail-fast: false steps: - uses: actions/checkout@v4 @@ -33,9 +33,7 @@ jobs: env: PREFECT_SERVER_DATABASE_CONNECTION_URL: "sqlite+aiosqlite:///./collection-tests.db" run: | - prefect server database reset -y - coverage run --branch -m pytest tests -vv - coverage report + pytest --cov=prefect_aws --no-cov-on-fail --cov-report=term-missing --cov-branch tests -n auto -vv - name: Run mkdocs build run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index a310bab3..ec431ba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,25 +7,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- AWS S3 copy and move tasks and `S3Bucket` methods - [#316](https://github.com/PrefectHQ/prefect-aws/pull/316) +### Added + +### Changed + +### Fixed + +### Deprecated + +### Removed + +## 0.4.1 + +Released October 13th, 2023. ### Added -- Added retries to ECS task run creation for ECS worker - [#303](https://github.com/PrefectHQ/prefect-aws/pull/303) -- Added support to `ECSWorker` for `awsvpcConfiguration` [#304](https://github.com/PrefectHQ/prefect-aws/pull/304) +- AWS S3 copy and move tasks and `S3Bucket` methods - [#316](https://github.com/PrefectHQ/prefect-aws/pull/316) + +### Fixed + +- `ECSWorker` issue where defining a custom network configuration with a subnet would erroneously report it as missing from the VPC when more than one subnet exists in the VPC. [#321](https://github.com/PrefectHQ/prefect-aws/pull/321) +- Updated `push_to_s3` and `pull_from_s3` deployment steps to properly create a boto3 session client if the passed credentials are a referenced `AwsCredentials` block [#322](https://github.com/PrefectHQ/prefect-aws/pull/322) + +## 0.4.0 + +Released October 5th, 2023. ### Changed - Changed `push_to_s3` deployment step function to write paths `as_posix()` to allow support for deploying from windows [#314](https://github.com/PrefectHQ/prefect-aws/pull/314) -- Changed `push_to_s3` and `pull_from_s3` deployment steps to properly create a boto3 session client if the passed credentials are a referenced AwsCredentials block [#322](https://github.com/PrefectHQ/prefect-aws/pull/322) +- Conditional imports to support operating with pydantic>2 installed - [#317](https://github.com/PrefectHQ/prefect-aws/pull/317) -### Fixed +## 0.3.7 -- Resolved an issue where defining a custom network configuration with a subnet would erroneously report it as missing from the VPC when more than one subnet exists in the VPC. [#321](https://github.com/PrefectHQ/prefect-aws/pull/321) +Released August 31st, 2023. -### Deprecated +### Added -### Removed +- Added retries to ECS task run creation for ECS worker - [#303](https://github.com/PrefectHQ/prefect-aws/pull/303) +- Added support to `ECSWorker` for `awsvpcConfiguration` [#304](https://github.com/PrefectHQ/prefect-aws/pull/304) ## 0.3.6 diff --git a/README.md b/README.md index 596765bd..952f8fd2 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,24 @@ -# Incorporate AWS into your Prefect workflows with `prefect-aws` +# `prefect-aws`
## Welcome! -The `prefect-aws` collection makes it easy to leverage the capabilities of AWS in your flows, featuring support for ECS, S3, Secrets Manager, Batch Job, and Client Waiter. +`prefect-aws` makes it easy to leverage the capabilities of AWS in your flows, featuring support for ECS, S3, Secrets Manager, and Batch. Visit the full docs [here](https://PrefectHQ.github.io/prefect-aws). diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico index c4b42158..159c4152 100644 Binary files a/docs/img/favicon.ico and b/docs/img/favicon.ico differ diff --git a/docs/img/prefect-logo-mark-solid-white-500.png b/docs/img/prefect-logo-mark-solid-white-500.png deleted file mode 100644 index f83aa6ef..00000000 Binary files a/docs/img/prefect-logo-mark-solid-white-500.png and /dev/null differ diff --git a/docs/img/prefect-logo-mark.png b/docs/img/prefect-logo-mark.png new file mode 100644 index 00000000..0d696821 Binary files /dev/null and b/docs/img/prefect-logo-mark.png differ diff --git a/docs/img/prefect-logo-white.png b/docs/img/prefect-logo-white.png deleted file mode 100644 index 50ca6139..00000000 Binary files a/docs/img/prefect-logo-white.png and /dev/null differ diff --git a/docs/index.md b/docs/index.md index fdb966ca..091b54e9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,26 +1,24 @@ -# Coordinate and incorporate AWS in your dataflow with `prefect-aws` +# `prefect-aws` ## Welcome! -The `prefect-aws` collection makes it easy to leverage the capabilities of AWS in your flows, featuring support for ECSTask, S3, Secrets Manager, Batch Job, and Client Waiter. +`prefect-aws` makes it easy to leverage the capabilities of AWS in your flows, featuring support for ECSTask, S3, Secrets Manager, Batch Job, and Client Waiter. ## Getting Started diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 11a02095..662cca0c 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -1,9 +1,9 @@ /* theme */ :root > * { /* theme */ - --md-primary-fg-color: #115AF4; - --md-primary-fg-color--light: #115AF4; - --md-primary-fg-color--dark: #115AF4; + --md-primary-fg-color: #26272B; + --md-primary-fg-color--light: #26272B; + --md-primary-fg-color--dark: #26272B; } /* Table formatting */ @@ -72,7 +72,7 @@ to force column width */ /* dark mode slate theme */ /* dark mode code overrides */ [data-md-color-scheme="slate"] { - --md-code-bg-color: #252a33; + --md-code-bg-color: #1c1d20; --md-code-fg-color: #eee; --md-code-hl-color: #3b3d54; --md-code-hl-name-color: #eee; @@ -100,15 +100,15 @@ to force column width */ /* dark mode collection catalog overrides */ [data-md-color-scheme="slate"] .collection-item { - background-color: #3b3d54; + background-color: #26272B; } /* dark mode recipe collection overrides */ [data-md-color-scheme="slate"] .recipe-item { - background-color: #3b3d54; + background-color: #26272B; } /* dark mode API doc overrides */ [data-md-color-scheme="slate"] .prefect-table th { - background-color: #3b3d54; + background-color: #26272B; } \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 246fc31d..465f6407 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -28,7 +28,7 @@ theme: icon: repo: fontawesome/brands/github logo: - img/prefect-logo-mark-solid-white-500.png + img/prefect-logo-mark.png font: text: Inter code: Source Code Pro diff --git a/prefect_aws/credentials.py b/prefect_aws/credentials.py index 7810f7f9..64f49efe 100644 --- a/prefect_aws/credentials.py +++ b/prefect_aws/credentials.py @@ -40,7 +40,7 @@ class AwsCredentials(CredentialsBlock): ``` """ # noqa E501 - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/1jbV4lceHOjGgunX15lUwT/db88e184d727f721575aeb054a37e277/aws.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png" # noqa _block_type_name = "AWS Credentials" _documentation_url = "https://prefecthq.github.io/prefect-aws/credentials/#prefect_aws.credentials.AwsCredentials" # noqa @@ -164,7 +164,7 @@ class MinIOCredentials(CredentialsBlock): ``` """ # noqa E501 - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/22vXcxsOrVeFrUwHfSoaeT/7607b876eb589a9028c8126e78f4c7b4/imageedit_7_2837870043.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/676cb17bcbdff601f97e0a02ff8bcb480e91ff40-250x250.png" # noqa _block_type_name = "MinIO Credentials" _description = ( "Block used to manage authentication with MinIO. Refer to the MinIO " diff --git a/prefect_aws/ecs.py b/prefect_aws/ecs.py index 7dbfa68a..a6ebe206 100644 --- a/prefect_aws/ecs.py +++ b/prefect_aws/ecs.py @@ -276,7 +276,7 @@ class ECSTask(Infrastructure): _block_type_slug = "ecs-task" _block_type_name = "ECS Task" - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/1jbV4lceHOjGgunX15lUwT/db88e184d727f721575aeb054a37e277/aws.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png" # noqa _description = "Run a command as an ECS task." # noqa _documentation_url = ( "https://prefecthq.github.io/prefect-aws/ecs/#prefect_aws.ecs.ECSTask" # noqa diff --git a/prefect_aws/s3.py b/prefect_aws/s3.py index df84873c..11ca0438 100644 --- a/prefect_aws/s3.py +++ b/prefect_aws/s3.py @@ -404,7 +404,7 @@ class S3Bucket(WritableFileSystem, WritableDeploymentStorage, ObjectStorageBlock for reading and writing objects. """ - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/1jbV4lceHOjGgunX15lUwT/db88e184d727f721575aeb054a37e277/aws.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png" # noqa _block_type_name = "S3 Bucket" _documentation_url = ( "https://prefecthq.github.io/prefect-aws/s3/#prefect_aws.s3.S3Bucket" # noqa diff --git a/prefect_aws/secrets_manager.py b/prefect_aws/secrets_manager.py index 5eea5ba8..9b93e867 100644 --- a/prefect_aws/secrets_manager.py +++ b/prefect_aws/secrets_manager.py @@ -368,7 +368,7 @@ class AwsSecret(SecretBlock): secret_name: The name of the secret. """ - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/1jbV4lceHOjGgunX15lUwT/db88e184d727f721575aeb054a37e277/aws.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png" # noqa _block_type_name = "AWS Secret" _documentation_url = "https://prefecthq.github.io/prefect-aws/secrets_manager/#prefect_aws.secrets_manager.AwsSecret" # noqa diff --git a/prefect_aws/workers/ecs_worker.py b/prefect_aws/workers/ecs_worker.py index a3822a3f..02c4117c 100644 --- a/prefect_aws/workers/ecs_worker.py +++ b/prefect_aws/workers/ecs_worker.py @@ -548,7 +548,7 @@ class ECSWorker(BaseWorker): ) _display_name = "AWS Elastic Container Service" _documentation_url = "https://prefecthq.github.io/prefect-aws/ecs_worker/" - _logo_url = "https://images.ctfassets.net/gm98wzqotmnx/1jbV4lceHOjGgunX15lUwT/db88e184d727f721575aeb054a37e277/aws.png?h=250" # noqa + _logo_url = "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png" # noqa async def run( self, diff --git a/requirements-dev.txt b/requirements-dev.txt index e22e9290..bcbdc906 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -17,6 +17,7 @@ pillow pre-commit pytest pytest-asyncio +pytest-cov pytest-lazy-fixture pytest-xdist types-boto3 >= 1.0.2 diff --git a/tests/test_ecs.py b/tests/test_ecs.py index a27ff925..cf18bfe4 100644 --- a/tests/test_ecs.py +++ b/tests/test_ecs.py @@ -1368,7 +1368,7 @@ async def test_latest_task_definition_not_used_if_inequal( # {"execution_role_arn": "test"}, # {"launch_type": "EXTERNAL"}, ], - ids=lambda item: str(set(item.keys())), + ids=lambda item: str(sorted(list(set(item.keys())))), ) async def test_latest_task_definition_with_overrides_that_do_not_require_copy( aws_credentials, overrides, launch_type @@ -1536,7 +1536,7 @@ async def test_task_definition_arn_with_overrides_requiring_copy_shows_diff( # from the base task definition {"env": {"FOO": None}}, ], - ids=lambda item: str(set(item.keys())), + ids=lambda item: str(sorted(list(set(item.keys())))), ) async def test_task_definition_arn_with_overrides_that_do_not_require_copy( aws_credentials, overrides diff --git a/tests/workers/test_ecs_worker.py b/tests/workers/test_ecs_worker.py index 2c177aae..b6a39b35 100644 --- a/tests/workers/test_ecs_worker.py +++ b/tests/workers/test_ecs_worker.py @@ -1587,7 +1587,7 @@ async def test_worker_task_definition_cache_miss_on_deregistered( # {"execution_role_arn": "test"}, # {"launch_type": "EXTERNAL"}, ], - ids=lambda item: str(set(item.keys())), + ids=lambda item: str(sorted(list(set(item.keys())))), ) async def test_worker_task_definition_cache_hit_on_config_changes( aws_credentials: AwsCredentials,