From ff7ad8a69d5b3e573184af372b26bee77c784abd Mon Sep 17 00:00:00 2001 From: "Pey Lian Lim (Github)" <2090236+pllim@users.noreply.github.com> Date: Tue, 10 May 2022 17:13:28 -0400 Subject: [PATCH] MNT: Drop support for Python 3.6 and 3.7. TST: Update test workflows. TST: Use built-in cancel. --- .github/workflows/cancel_workflows.yml | 17 ----------------- .github/workflows/ci_workflows.yml | 26 +++++++++++++++----------- .github/workflows/codeql-analysis.yml | 12 ++++++++---- .github/workflows/open_actions.yml | 8 ++++++-- .readthedocs.yml | 8 +++++++- doc/source/index.rst | 4 +--- setup.cfg | 2 +- 7 files changed, 38 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/cancel_workflows.yml diff --git a/.github/workflows/cancel_workflows.yml b/.github/workflows/cancel_workflows.yml deleted file mode 100644 index 3574d03b..00000000 --- a/.github/workflows/cancel_workflows.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Cancel duplicate workflows - -on: - workflow_run: - workflows: ["CI", "CodeQL"] - types: - - requested - -# Note: This has to be in workflow_run so it works for PRs from forks. -jobs: - cancel: - runs-on: ubuntu-latest - steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # 0.8.0 - with: - workflow_id: ${{ github.event.workflow.id }} diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 811fb028..19453786 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -8,6 +8,10 @@ on: # * is a special character in YAML so you have to quote this string - cron: '0 6 * * 2' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: jref: "https://ssb.stsci.edu/trds_open/jref" @@ -17,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check base branch - uses: actions/github-script@v3 + uses: actions/github-script@v6 if: github.event_name == 'pull_request' with: script: | @@ -36,11 +40,11 @@ jobs: needs: initial_checks steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '3.x' - name: Lint with flake8 @@ -63,14 +67,14 @@ jobs: needs: initial_checks steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: - python-version: '3.7' + python-version: '3.8' - name: Install and build run: | python -m pip install --upgrade pip setuptools wheel @@ -84,14 +88,14 @@ jobs: needs: initial_checks steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: - python-version: '3.8' + python-version: '3.10' - name: Install and build run: | python -m pip install --upgrade pip setuptools wheel @@ -106,9 +110,9 @@ jobs: needs: initial_checks steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '3.x' - name: Install and build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index cbaa1fe7..89d68606 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,6 +18,10 @@ on: # The branches below must be a subset of the branches above branches: [ master ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: analyze: name: Analyze @@ -33,11 +37,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -48,7 +52,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -62,4 +66,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/open_actions.yml b/.github/workflows/open_actions.yml index 8bd32c40..6ac3b6d1 100644 --- a/.github/workflows/open_actions.yml +++ b/.github/workflows/open_actions.yml @@ -8,6 +8,10 @@ on: types: - opened +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: triage: runs-on: ubuntu-latest @@ -18,12 +22,12 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - name: 'Comment Draft PR' - uses: actions/github-script@v3 + uses: actions/github-script@v6 if: github.event.pull_request.draft == true with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - github.issues.createComment({ + await github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, diff --git a/.readthedocs.yml b/.readthedocs.yml index aee168bf..71b09889 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,6 +2,13 @@ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details version: 2 +build: + os: ubuntu-20.04 + apt_packages: + - graphviz + tools: + python: "3.9" + sphinx: builder: html configuration: doc/source/conf.py @@ -9,7 +16,6 @@ sphinx: # Set the version of Python and requirements required to build your docs python: - version: 3.8 install: - method: pip path: . diff --git a/doc/source/index.rst b/doc/source/index.rst index adf42eb5..92815dff 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -13,8 +13,6 @@ Different ways to install the latest release of this package:: conda install acstools -c conda-forge - conda install acstools -c http://ssb.stsci.edu/astroconda - To install the development version of this package:: pip install git+https://github.com/spacetelescope/acstools @@ -32,7 +30,7 @@ To install the development version of this package:: .. note:: - Python 2 is no longer supported. Please use Python 3.6 or later. + Python 2 is no longer supported. Please use Python 3.8 or later. .. toctree:: :maxdepth: 2 diff --git a/setup.cfg b/setup.cfg index 5d75e318..aca0edeb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,7 +36,7 @@ install_requires = beautifulsoup4 requests PyYAML -python_requires = >=3.6 +python_requires = >=3.8 [options.extras_require] all =