From 14af43964756718dfa1690562adf79d678a3627d Mon Sep 17 00:00:00 2001 From: Daniel Neilson <53624638+ddneilson@users.noreply.github.com> Date: Tue, 13 Feb 2024 08:21:10 -0600 Subject: [PATCH] feat!: prepare for public release (#69) feat: prepare for public release Preparing the repository for its public release: - Update the build script to no longer define a PIP_INDEX_URL -- the environment variable that we used to interface with our internal repository during private development. - Update the code quality check to pull deps from the public PyPI, so that we're testing as customers would use it. - Use the public PyPI in the release flows since all deps are now available publicly. This ensures that the artifact we release can be built & used by anyone using PyPI. - Small additions to the README. Signed-off-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com> --- .github/workflows/release_publish.yml | 30 ++++++------------------ .github/workflows/reuse_python_build.yml | 25 -------------------- README.md | 17 +++++++++++--- hatch.toml | 6 ----- 4 files changed, 21 insertions(+), 57 deletions(-) diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 70c2282..546248a 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 @@ -90,17 +85,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 build @@ -174,13 +161,6 @@ jobs: ref: release fetch-depth: 0 - - 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: Set up Python uses: actions/setup-python@v5 with: @@ -188,15 +168,19 @@ 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 - name: Build run: hatch build + - 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: Publish to Repository run: | export TWINE_USERNAME=aws diff --git a/.github/workflows/reuse_python_build.yml b/.github/workflows/reuse_python_build.yml index 7bcd341..6a9c976 100644 --- a/.github/workflows/reuse_python_build.yml +++ b/.github/workflows/reuse_python_build.yml @@ -22,10 +22,6 @@ jobs: 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 }} @@ -41,27 +37,6 @@ 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: CodeArtifact Setup Windows - if: ${{ matrix.os == 'windows-latest' }} - 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 >> $env:GITHUB_ENV - - - name: CodeArtifact Setup Linux/MacOS - if: ${{ matrix.os != 'windows-latest' }} - 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 - - name: Install Dependencies run: pip install --upgrade -r requirements-development.txt diff --git a/README.md b/README.md index 4ef8610..28dbac1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # Open Job Description - Models For Python +[![pypi](https://img.shields.io/pypi/v/openjd-model.svg)](https://pypi.python.org/pypi/openjd-model) + Open Job Description is a flexible open specification for defining render jobs which are portable -between studios and render solutions. This package provides a Python implementation of the data model -for Open Job Description's template schemas. It can be used to parse, validate, and create JSON/Yaml -documents for the Open Job Description specification. +between studios and render management solutions. This package provides a Python implementation of the +data model for Open Job Description's template schemas. It can parse, validate, create JSON/Yaml +documents for the Open Job Description specification, and more. A main use-case that this library +targets is interoperability by creating applications to translate a Job from Open Job Description +to the render management software of your choice. For more information about Open Job Description and our goals with it, please see the Open Job Description [Wiki on GitHub](https://github.com/OpenJobDescription/openjd-specifications/wiki). @@ -25,6 +29,13 @@ versions will increment during this initial development stage, they are describe 2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API. 3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API. +## Contributing + +We encourage all contributions to this package. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for our contributing guidelines. + ## Example Usage ### Reading and Validating a Template File diff --git a/hatch.toml b/hatch.toml index b318b58..eeeeb1a 100644 --- a/hatch.toml +++ b/hatch.toml @@ -23,15 +23,9 @@ lint = [ [[envs.all.matrix]] python = ["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/" - [envs.codebuild.scripts] build = "hatch build" -[envs.codebuild.env-vars] -PIP_INDEX_URL="" - [envs.release] detached = true dependencies = [