From e8680c63a35a4c1eb3736f3ec537c16ec53c9b74 Mon Sep 17 00:00:00 2001 From: Charles Moore <122481442+moorec-aws@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:26:29 +0000 Subject: [PATCH] feat!: public release (#265) Signed-off-by: Charles Moore <122481442+moorec-aws@users.noreply.github.com> --- .github/workflows/release_publish.yml | 21 ++------------------- .github/workflows/reuse_python_build.yml | 16 +--------------- README.md | 2 +- hatch.toml | 5 +---- pyproject.toml | 5 ++--- requirements-integ-testing.txt | 2 +- 6 files changed, 8 insertions(+), 43 deletions(-) diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index fc2f700e..ce9a05ba 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -41,11 +41,6 @@ jobs: permissions: id-token: write contents: write - env: - CODEARTIFACT_REGION: "us-west-2" - CODEARTIFACT_DOMAIN: ${{ secrets.CODEARTIFACT_DOMAIN }} - CODEARTIFACT_ACCOUNT_ID: ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} - CODEARTIFACT_REPOSITORY: ${{ secrets.CODEARTIFACT_REPOSITORY }} steps: - name: Checkout uses: actions/checkout@v4 @@ -89,17 +84,9 @@ jobs: echo EOF } >> $GITHUB_ENV - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_CODEARTIFACT_ROLE }} - aws-region: us-west-2 - mask-aws-account-id: true - # Tag must be made before building so the generated _version.py files have the correct version - name: Build run: | - export CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{ secrets.CODEARTIFACT_DOMAIN }} --domain-owner ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} --query authorizationToken --output text --region us-west-2) pip install --upgrade hatch hatch -v build @@ -188,9 +175,6 @@ jobs: - name: Install dependencies run: | - CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{ secrets.CODEARTIFACT_DOMAIN }} --domain-owner ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} --query authorizationToken --output text --region us-west-2) - echo "::add-mask::$CODEARTIFACT_AUTH_TOKEN" - echo CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN >> $GITHUB_ENV pip install --upgrade hatch pip install --upgrade twine @@ -211,7 +195,6 @@ jobs: export TWINE_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain ${{ secrets.CUSTOMER_DOMAIN }} --domain-owner ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} --repository ${{ secrets.CUSTOMER_REPOSITORY }} --format pypi --query repositoryEndpoint --output text` twine upload dist/* - # TODO: Uncomment this block to publish to PyPI once this package is public # # See https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi - # - name: Publish to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/reuse_python_build.yml b/.github/workflows/reuse_python_build.yml index 038ba8b4..992b15ac 100644 --- a/.github/workflows/reuse_python_build.yml +++ b/.github/workflows/reuse_python_build.yml @@ -15,14 +15,10 @@ jobs: contents: read strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] os: [ubuntu-latest, windows-latest, macOS-latest] env: PYTHON: ${{ matrix.python-version }} - CODEARTIFACT_REGION: "us-west-2" - CODEARTIFACT_DOMAIN: ${{ secrets.CODEARTIFACT_DOMAIN }} - CODEARTIFACT_ACCOUNT_ID: ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} - CODEARTIFACT_REPOSITORY: ${{ secrets.CODEARTIFACT_REPOSITORY }} steps: - uses: actions/checkout@v4 if: ${{ !inputs.branch }} @@ -38,19 +34,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_CODEARTIFACT_ROLE }} - aws-region: us-west-2 - mask-aws-account-id: true - - name: Install Hatch shell: bash run: | - CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{ secrets.CODEARTIFACT_DOMAIN }} --domain-owner ${{ secrets.CODEARTIFACT_ACCOUNT_ID }} --query authorizationToken --output text --region us-west-2) - echo "::add-mask::$CODEARTIFACT_AUTH_TOKEN" - echo CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN >> $GITHUB_ENV pip install --upgrade hatch - name: Run Linting diff --git a/README.md b/README.md index 648797d1..ff4b6cab 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To support building workflows on top of AWS Deadline Cloud it implements its own This library requires: -1. Python 3.7 or higher; and +1. Python 3.8 or higher; and 2. Linux, Windows, or macOS operating system. ## Getting Started diff --git a/hatch.toml b/hatch.toml index 47d8c353..1ef6010d 100644 --- a/hatch.toml +++ b/hatch.toml @@ -22,17 +22,15 @@ lint = [ ] [[envs.all.matrix]] -python = ["3.7", "3.8", "3.9", "3.10", "3.11"] +python = ["3.8", "3.9", "3.10", "3.11"] [envs.default.env-vars] -PIP_INDEX_URL="https://aws:{env:CODEARTIFACT_AUTH_TOKEN}@{env:CODEARTIFACT_DOMAIN}-{env:CODEARTIFACT_ACCOUNT_ID}.d.codeartifact.{env:CODEARTIFACT_REGION}.amazonaws.com/pypi/{env:CODEARTIFACT_REPOSITORY}/simple/" SKIP_BOOTSTRAP_TEST_RESOURCES="True" [envs.codebuild.scripts] build = "hatch build" [envs.codebuild.env-vars] -PIP_INDEX_URL="" SKIP_BOOTSTRAP_TEST_RESOURCES="True" [envs.codebuild-installer] @@ -41,7 +39,6 @@ pre-install-commands = [ ] [envs.codebuild-installer.env-vars] -PIP_INDEX_URL="" SKIP_BOOTSTRAP_TEST_RESOURCES="True" [envs.codebuild-installer.scripts] diff --git a/pyproject.toml b/pyproject.toml index 8e0c5625..893cbcd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,13 +11,12 @@ authors = [ dynamic = ["version"] readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.7" +requires-python = ">=3.8" # https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -36,7 +35,7 @@ classifiers = [ # Applications that consume this library should be the ones that are more strictly # limiting dependencies if they want/need to. dependencies = [ - "boto3 >= 1.28.80", + "boto3 >= 1.34.75", "click >= 8.1.7", "pyyaml >= 6.0", # Job Attachments diff --git a/requirements-integ-testing.txt b/requirements-integ-testing.txt index c3a37b0e..79394251 100644 --- a/requirements-integ-testing.txt +++ b/requirements-integ-testing.txt @@ -1 +1 @@ -deadline-cloud-test-fixtures ~= 0.5.5 +deadline-cloud-test-fixtures ~= 0.6.0