From 010e0e74bf5471fbedecb59bc888f4233b3e5ebe Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Fri, 7 Aug 2026 11:50:53 +0000 Subject: [PATCH] Clean up CI: simplify dev versioning and remove dead config - Replace VERSION.minor date-stamp machinery with a plain x.y.z.dev0 suffix for non-release builds (matches AutoGluon's scheme; no nightly publish here). - Remove the unused install_tabular/install_multimodal block from test_cloud.sh and the install_* / install_latest_* helpers from env_setup.sh; the DLC already ships AutoGluon, so the host only needs autogluon.cloud[tests]. - Drop the push trigger on the nonexistent dev branch. - Align configure-aws-credentials to @v5 in the composite action. - Remove tox / pytest-cov from test extras; drop pypandoc/packaging from the PyPI release build deps. - Delete unused [tool.mypy] and [tool.coverage.*] config (never invoked). The disabled (if: false) test_multimodal_cloud and test_cluster jobs are kept as placeholders for future re-enablement. --- .github/actions/test-cloud/action.yml | 2 +- .github/workflow_scripts/env_setup.sh | 40 -------------- .github/workflow_scripts/test_cloud.sh | 8 --- .github/workflows/continuous_integration.yml | 55 -------------------- .github/workflows/pypi_release.yml | 2 +- .gitignore | 2 - pyproject.toml | 21 -------- setup.py | 34 +++--------- 8 files changed, 9 insertions(+), 155 deletions(-) diff --git a/.github/actions/test-cloud/action.yml b/.github/actions/test-cloud/action.yml index 4ca14010..eb7c90af 100644 --- a/.github/actions/test-cloud/action.yml +++ b/.github/actions/test-cloud/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v5 with: role-to-assume: arn:aws:iam::369469875935:role/AutoGluonCloudCIRole role-duration-seconds: 7200 diff --git a/.github/workflow_scripts/env_setup.sh b/.github/workflow_scripts/env_setup.sh index 71cf968e..87fbc0df 100644 --- a/.github/workflow_scripts/env_setup.sh +++ b/.github/workflow_scripts/env_setup.sh @@ -14,43 +14,3 @@ function install_cloud_test { python3 -m pip install --upgrade pytest-forked python3 -m pip install --upgrade -e ./[tests] } - -function install_latest_tabular_and_multimodal_dependencies { - git clone https://github.com/autogluon/autogluon.git - python3 -m pip install -e autogluon/common/ - python3 -m pip install -e autogluon/core/[all] - python3 -m pip install -e autogluon/features/ -} - -function install_latest_tabular { - install_latest_tabular_and_multimodal_dependencies - python3 -m pip install -e autogluon/tabular/[all] -} - -function install_latest_multimodal { - install_latest_tabular_and_multimodal_dependencies - python3 -m pip install -e autogluon/multimodal/ - mim install mmcv-full --timeout 60 - python3 -m pip install --upgrade "mmdet>=2.28, <3.0.0" - python3 -m pip install --upgrade "mmocr<1.0" -} - -function install_tabular { - VERSION=$1 - if [ $VERSION = "source" ] - then - install_latest_tabular - else - python3 -m pip install -U autogluon.tabular==$1 - fi -} - -function install_multimodal { - VERSION=$1 - if [ $VERSION = "source" ] - then - install_latest_multimodal - else - python3 -m pip install -U autogluon.multimodal==$1 - fi -} diff --git a/.github/workflow_scripts/test_cloud.sh b/.github/workflow_scripts/test_cloud.sh index 654ddc4b..8c231c33 100755 --- a/.github/workflow_scripts/test_cloud.sh +++ b/.github/workflow_scripts/test_cloud.sh @@ -7,14 +7,6 @@ set -ex source $(dirname "$0")/env_setup.sh -if [ $MODULE = "tabular" ] -then - install_tabular $AG_VERSION -elif [ $MODULE = "multimodal" ] -then - install_multimodal $AG_VERSION -fi - install_cloud_test python3 -m pytest -n 4 --junitxml=results.xml tests/unittests/$MODULE/ --framework_version $AG_VERSION diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 0631e837..a281bbe1 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -11,7 +11,6 @@ on: branches: - master - stable - - dev tags: - 'v*' pull_request: @@ -109,60 +108,6 @@ jobs: with: submodule-to-test: tabular ag_version: '${{ matrix.AG_VERSION }}' - test_text_cloud: - if: false - strategy: - fail-fast: false - matrix: - AG_VERSION: ["source", "1.2.0"] - needs: cloud_lint_check - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 - with: - python-version: '3.11' - - name: Check if changes beside docs - uses: dorny/paths-filter@v3 - id: changes - with: - filters: | - other_than_docs: - - '!(docs/**)**' - - name: Test Text Cloud - if: steps.changes.outputs.other_than_docs == 'true' - uses: ./.github/actions/test-cloud - with: - submodule-to-test: text - ag_version: '${{ matrix.AG_VERSION }}' - test_image_cloud: - if: false - strategy: - fail-fast: false - matrix: - AG_VERSION: ["source", "1.2.0"] - needs: cloud_lint_check - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 - with: - python-version: '3.11' - - name: Check if changes beside docs - uses: dorny/paths-filter@v3 - id: changes - with: - filters: | - other_than_docs: - - '!(docs/**)**' - - name: Test Image Cloud - if: steps.changes.outputs.other_than_docs == 'true' - uses: ./.github/actions/test-cloud - with: - submodule-to-test: image - ag_version: '${{ matrix.AG_VERSION }}' test_multimodal_cloud: if: false strategy: diff --git a/.github/workflows/pypi_release.yml b/.github/workflows/pypi_release.yml index 3c24ef24..5a09d85a 100644 --- a/.github/workflows/pypi_release.yml +++ b/.github/workflows/pypi_release.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build twine pypandoc packaging + pip install build twine - name: Build and publish env: TWINE_USERNAME: ${{ secrets. PYPI_USERNAME }} diff --git a/.gitignore b/.gitignore index faa00067..0d577cea 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,6 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ -.tox/ .nox/ .coverage .coverage.* @@ -130,7 +129,6 @@ dmypy.json .pyre/ src/autogluon/cloud/version.py -VERSION.minor .idea .vscode .DS_Store diff --git a/pyproject.toml b/pyproject.toml index 647b727a..94cb964e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,28 +10,7 @@ per-file-ignores = {"*/__init__.py" = ["F401"]} [tool.ruff.lint.isort] known-first-party = ["autogluon"] -[tool.mypy] -warn_unused_configs = true -show_error_context = true -pretty = true -check_untyped_defs = true - [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--strict-markers" xfail_strict = true - -[tool.coverage.run] -source = ["autogluon.cloud"] -branch = true - -[tool.coverage.report] -show_missing = true -skip_covered = true -fail_under = 80 - -[tool.coverage.paths] -source = [ - "src/autogluon/cloud", - "*/site-packages/autogluon/cloud", -] diff --git a/setup.py b/setup.py index b16d80ef..5a93d6c5 100644 --- a/setup.py +++ b/setup.py @@ -16,29 +16,13 @@ def create_version_file(*, version): f.write("__version__ = '{}'\n".format(version)) -def update_version(version, use_file_if_exists=True, create_file=False): +def update_version(version): """ - To release a new stable version on PyPi, simply tag the release on github, and the Github CI will automatically publish - a new stable version to PyPi using the configurations in .github/workflows/pypi_release.yml . - You need to increase the version number after stable release, so that the nightly pypi can work properly. + To release a new stable version on PyPi, tag the release on github; the Github CI publishes it to PyPi + (see .github/workflows/pypi_release.yml, which sets RELEASE=1). Non-release builds get a `.dev0` suffix. """ - try: - if not os.getenv("RELEASE"): - from datetime import date - - minor_version_file_path = "VERSION.minor" - if use_file_if_exists and os.path.isfile(minor_version_file_path): - with open(minor_version_file_path) as f: - day = f.read().strip() - else: - today = date.today() - day = today.strftime("b%Y%m%d") - version += day - except Exception: - pass - if create_file and not os.getenv("RELEASE"): - with open("VERSION.minor", "w") as f: - f.write(day) + if not os.getenv("RELEASE"): + version += ".dev0" return version @@ -105,7 +89,7 @@ def default_setup_args(*, version): version = "0.5.1" -version = update_version(version, use_file_if_exists=False, create_file=True) +version = update_version(version) install_requires = [ # common module provides utils with stable api across minor version @@ -133,14 +117,10 @@ def default_setup_args(*, version): extras_require["all"] = all_requires test_requirements = [ - "tox", "pytest", - "pytest-cov", "moto", "autogluon.common>=0.7", -] # Install pre-release of common for testing - -test_requirements = list(set(test_requirements)) +] extras_require["tests"] = test_requirements if __name__ == "__main__":