Skip to content

Update parameters of the ResNet18Classifier class. #61

Update parameters of the ResNet18Classifier class.

Update parameters of the ResNet18Classifier class. #61

# This is the main workflow for the "datascope" module.
name: Main Workflow for "datascope"
on:
push:
branches: [ "main" ]
paths: ["datascope/**", "setup.py", "setup.cfg", "requirements*.txt", "MANIFEST.in", "pyproject.toml"]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
paths: ["datascope/**", "setup.py", "setup.cfg", "requirements*.txt", "MANIFEST.in", "pyproject.toml"]
workflow_dispatch:
inputs:
publish:
type: boolean
description: Run the Packaging and Publish Process.
required: false
default: true
env:
python-version: "3.8"
jobs:
test:
name: Run Full Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make setup-dev
- name: Lint
run: |
make lint
- name: Test
run: |
make test
version:
name: Extract Module Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.python-version }}
- name: Check Version File
id: version
run: |
VERSION=$(./dev/scripts/update-version.py datascope/version.py)
echo "VERSION=${VERSION}"
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
publish:
name: Packge and Publish
needs: [test, version]
uses: easeml/datascope/.github/workflows/reusable-publish.yml@main
if: ${{ (github.ref_type == 'tag' && github.ref_name == format('v{0}', needs.version.outputs.version) ) || inputs.publish == true }}
secrets: inherit
with:
package-path: "."
version-increment: false
package-wheels: false
publish-test: true
publish: true
pypi-api-token-secret: "PYPI_API_TOKEN_DATASCOPE"
pypi-test-api-token-secret: "PYPI_TEST_API_TOKEN_DATASCOPE"
debug:
name: Debug
runs-on: ubuntu-latest
needs: version
steps:
- name: Check Version File
id: version
run: |
echo github.ref_name=${{ github.ref_name }}
echo github.ref_type=${{ github.ref_type }}
echo "(github.ref_type == 'tag') == ${{ github.ref_type == 'tag' }}"
echo "needs.version.outputs == ${{ needs.version.outputs }}"
echo "format('v{0}', needs.version.outputs.version) == ${{ format('v{0}', needs.version.outputs.version) }}"
echo "github.ref_name == ${{ github.ref_name }}"
echo "(github.ref_name == format('v{0}', needs.version.outputs.version)) == ${{ github.ref_name == format('v{0}', needs.version.outputs.version) }}"
echo "(github.ref_type == 'tag' && github.ref_name == format('v{0}', needs.version.outputs.version) ) == ${{ (github.ref_type == 'tag' && github.ref_name == format('v{0}', needs.version.outputs.version) ) }}"
echo "(inputs.publish == true) == ${{ inputs.publish == true }}"
echo "((github.ref_type == 'tag' && github.ref_name == format('v{0}', needs.version.outputs.version) ) || inputs.publish == true) == ${{ (github.ref_type == 'tag' && github.ref_name == format('v{0}', needs.version.outputs.version) ) || inputs.publish == true }}"