From 95a3c697f605f71e4de0992f770d25d714ceb3be Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Tue, 10 Dec 2024 13:46:39 -0800 Subject: [PATCH 001/132] Make a named view corresponding to the start of a session [#16442] --- src/bundles/core/src/session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bundles/core/src/session.py b/src/bundles/core/src/session.py index a72845c360..ab52f80a28 100644 --- a/src/bundles/core/src/session.py +++ b/src/bundles/core/src/session.py @@ -889,6 +889,8 @@ def restore( self.triggers.activate_trigger("end restore session", self) self.restore_options.clear() mgr.cleanup() + from chimerax.core.commands import run + run(self, "view name session-start") class InScriptFlag: From a6a7a28ef3d388fb1d8a1669053031dc2d70f34b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 10:27:00 -0800 Subject: [PATCH 002/132] fix(ci): Cache the flatpak version of ffmpeg --- utils/ci/consolidated_cache/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 3518d48c3e..af6c52b187 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -181,6 +181,7 @@ runs: with: path: | prereqs/ffmpeg/ffmpeg-3.2.4.tar.bz2 + prereqs/ffmpeg/ffmpeg-6.1.tar.xz prereqs/ffmpeg/libtheora-1.1.1.tar.xz prereqs/ffmpeg/libogg-1.3.2.tar.xz prereqs/ffmpeg/libvpx-1.6.1.tar.xz @@ -314,6 +315,7 @@ runs: run: | if [ "${{ inputs.platform }}" = "linux" ] ; then curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/ffmpeg/ffmpeg-3.2.4.tar.bz2 -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/ffmpeg/ffmpeg-6.1.tar.xz -O -J curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/ffmpeg/libtheora-1.1.1.tar.xz -O -J curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/ffmpeg/libogg-1.3.2.tar.xz -O -J curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/ffmpeg/libvpx-1.6.1.tar.xz -O -J From 3ddecfb9ea1e1a1402a11bf913a997065faba18d Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 10:27:15 -0800 Subject: [PATCH 003/132] fix(ci): mac metal openmm curl needed -O -J to actually save the file --- utils/ci/consolidated_cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index af6c52b187..5998465983 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -352,7 +352,7 @@ runs: else curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/openmm/openmm-8.0.0-mac-py311hf4819f2_1_apple.tar.bz2 -O -J fi - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/openmm/openmm-8.0.0-mac-metal.tar.bz2 + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/openmm/openmm-8.0.0-mac-metal.tar.bz2 -O -J fi if [ "${{ inputs.platform }}" = "windows" ] ; then curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/openmm/openmm-8.0.0-win-py311h9957787_1_tar.bz2 -O -J From 304122cda8897d858b17843f0bbf39f6055ca115 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 11:56:05 -0800 Subject: [PATCH 004/132] feat(ci): Note the run ID and job IDs of nightly builds --- .github/workflows/flatpak_build.yml | 8 +++++ .github/workflows/mac_arm_build.yml | 8 +++++ .github/workflows/mac_intel_build.yml | 8 +++++ .github/workflows/mac_universal_build.yml | 8 +++++ .github/workflows/rocky8_build.yml | 8 +++++ .github/workflows/rocky9_build.yml | 8 +++++ .github/workflows/ubuntu_build.yml | 8 +++++ .github/workflows/windows_build.yml | 8 +++++ utils/ci/nightly_logs/action.yml | 38 +++++++++++++++++++++++ 9 files changed, 102 insertions(+) create mode 100644 utils/ci/nightly_logs/action.yml diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index 7e8a5f5918..a2758b7386 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -39,6 +39,14 @@ jobs: linux-bundles.tar.gz linux-include.tar.gz key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: flatpak + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - run: chown -R $(id -u):$(id -g) $PWD - name: Unpack the bundles to build/sync run: | diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index 0b55cf15a7..d9237bddea 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -52,6 +52,14 @@ jobs: platform: macos architecture: arm64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: mac_arm64 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - run: MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" make -j$(sysctl -n hw.logicalcpu) install-rbvi - name: Run the legacy test suite run: make test diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 953be670ec..c10ab8b060 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -52,6 +52,14 @@ jobs: platform: macos architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: macosx + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - run: MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" make -j$(sysctl -n hw.logicalcpu) install-rbvi - name: Run the legacy test suite run: make test diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index 8dca53dcbd..c982077866 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -43,6 +43,14 @@ jobs: python3.10 -m pip install dmgbuild # Make dmgbuild allocate an adult sized DMG patch --ignore-whitespace -d /opt/homebrew/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: mac_universal + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - uses: ./utils/ci/download_mac_chimerax with: cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 8d8ddd6ee5..e06a576ced 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -37,6 +37,14 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: centos-8 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index b8780d6d39..416ff488c1 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -37,6 +37,14 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: centos-9 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - name: Restore bundles and includes from cache uses: actions/cache/restore@v4 with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index c281748dc5..0aab9cdb2e 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -31,6 +31,14 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: ${{ matrix.os }} + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - name: Restore bundles and includes from cache uses: actions/cache/restore@v4 with: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index e3d2e18ce6..be4263ae66 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -68,6 +68,14 @@ jobs: platform: windows architecture: x86 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: windows + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ github.job }} + build_type: daily - run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && MAKEOPTS="-j$(nproc)" make -j$(nproc) install - name: Run the legacy test suite run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && make test diff --git a/utils/ci/nightly_logs/action.yml b/utils/ci/nightly_logs/action.yml new file mode 100644 index 0000000000..af8a522cbc --- /dev/null +++ b/utils/ci/nightly_logs/action.yml @@ -0,0 +1,38 @@ +name: Tell Plato what logs are current +description: Upload log IDs + +inputs: + deploy_key: + description: deploy key + required: true + run_id: + description: GitHub action run ID + required: true + job_id: + description: GitHub job ID + required: true + platform: + description: Platform for which ChimeraX is being built + required: true + build_type: + description: The type of ChimeraX build + required: true + +runs: + using: "composite" + steps: + - name: Mask input parameters + shell: bash + run: | + export PREBUILT_CACHE_KEY=${{ inputs.deploy_key }} + echo "::add-mask::$PREBUILT_CACHE_KEY" + + - name: Upload the docs + shell: bash + run: | + curl -v -F "key=${{ inputs.deploy_key }}" \ + -F "run_id=${{ inputs.run_id }}" \ + -F "job_id=${{ inputs.job_id }}" \ + -F "platform=${{ inputs.platform }}" \ + -F "build_type=${{ inputs.build_type }} \ + https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/register_log_ids.py From 41df59424f77945fa21af3d50cf3df3cfcf92e27 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 11:59:26 -0800 Subject: [PATCH 005/132] fix(ci): Missing quote --- utils/ci/nightly_logs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ci/nightly_logs/action.yml b/utils/ci/nightly_logs/action.yml index af8a522cbc..141bb1d72e 100644 --- a/utils/ci/nightly_logs/action.yml +++ b/utils/ci/nightly_logs/action.yml @@ -34,5 +34,5 @@ runs: -F "run_id=${{ inputs.run_id }}" \ -F "job_id=${{ inputs.job_id }}" \ -F "platform=${{ inputs.platform }}" \ - -F "build_type=${{ inputs.build_type }} \ + -F "build_type=${{ inputs.build_type }}" \ https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/register_log_ids.py From 15f81df4262c9fb18dcc4b819c246d84a5737135 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 12:38:31 -0800 Subject: [PATCH 006/132] fix(ci): github.job unfortunately refers to the job name and not its ID --- .github/workflows/flatpak_build.yml | 6 +++++- .github/workflows/mac_arm_build.yml | 6 +++++- .github/workflows/mac_intel_build.yml | 6 +++++- .github/workflows/mac_universal_build.yml | 6 +++++- .github/workflows/rocky8_build.yml | 6 +++++- .github/workflows/rocky9_build.yml | 6 +++++- .github/workflows/ubuntu_build.yml | 6 +++++- .github/workflows/windows_build.yml | 6 +++++- utils/ci/nightly_logs/action.yml | 2 +- 9 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index a2758b7386..fb02422ce1 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -39,13 +39,17 @@ jobs: linux-bundles.tar.gz linux-include.tar.gz key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: flatpak deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - run: chown -R $(id -u):$(id -g) $PWD - name: Unpack the bundles to build/sync diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index d9237bddea..aad50fb4d9 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -52,13 +52,17 @@ jobs: platform: macos architecture: arm64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: mac_arm64 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - run: MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" make -j$(sysctl -n hw.logicalcpu) install-rbvi - name: Run the legacy test suite diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index c10ab8b060..3c74d2726f 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -52,13 +52,17 @@ jobs: platform: macos architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: macosx deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - run: MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" make -j$(sysctl -n hw.logicalcpu) install-rbvi - name: Run the legacy test suite diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index c982077866..06f3529956 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -43,13 +43,17 @@ jobs: python3.10 -m pip install dmgbuild # Make dmgbuild allocate an adult sized DMG patch --ignore-whitespace -d /opt/homebrew/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: mac_universal deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - uses: ./utils/ci/download_mac_chimerax with: diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index e06a576ced..e454ab3cc5 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -37,13 +37,17 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: centos-8 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 416ff488c1..c9555a00e1 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -37,13 +37,17 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: centos-9 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - name: Restore bundles and includes from cache uses: actions/cache/restore@v4 diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 0aab9cdb2e..cfa2f87a70 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -31,13 +31,17 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: ${{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: ${{ matrix.os }} deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - name: Restore bundles and includes from cache uses: actions/cache/restore@v4 diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index be4263ae66..4ea91b2ae0 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -68,13 +68,17 @@ jobs: platform: windows architecture: x86 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Triyoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: $ {{ github.job }} - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: platform: windows deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} run_id: ${{ github.run_id }} - job_id: ${{ github.job }} + job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && MAKEOPTS="-j$(nproc)" make -j$(nproc) install - name: Run the legacy test suite diff --git a/utils/ci/nightly_logs/action.yml b/utils/ci/nightly_logs/action.yml index 141bb1d72e..7e0a62e1ca 100644 --- a/utils/ci/nightly_logs/action.yml +++ b/utils/ci/nightly_logs/action.yml @@ -27,7 +27,7 @@ runs: export PREBUILT_CACHE_KEY=${{ inputs.deploy_key }} echo "::add-mask::$PREBUILT_CACHE_KEY" - - name: Upload the docs + - name: Upload the log IDs shell: bash run: | curl -v -F "key=${{ inputs.deploy_key }}" \ From 9207af6c2f1df7f3da51cfd56aaf4c8e5b563ce0 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 12:41:39 -0800 Subject: [PATCH 007/132] fix(ci): Wrong username in action repo --- .github/workflows/flatpak_build.yml | 2 +- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index fb02422ce1..2c6b9fc614 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -39,7 +39,7 @@ jobs: linux-bundles.tar.gz linux-include.tar.gz key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index aad50fb4d9..e10d627b44 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -52,7 +52,7 @@ jobs: platform: macos architecture: arm64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 3c74d2726f..3171aadbf0 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -52,7 +52,7 @@ jobs: platform: macos architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index 06f3529956..3aa922fbd8 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -43,7 +43,7 @@ jobs: python3.10 -m pip install dmgbuild # Make dmgbuild allocate an adult sized DMG patch --ignore-whitespace -d /opt/homebrew/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index e454ab3cc5..0a7c2446a6 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -37,7 +37,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index c9555a00e1..7906408b50 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -37,7 +37,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index cfa2f87a70..4047d1cf29 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -31,7 +31,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: ${{ github.job }} diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 4ea91b2ae0..3bd293086c 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -68,7 +68,7 @@ jobs: platform: windows architecture: x86 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Triyoh/gha-jobid-action@v1 + - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: job_name: $ {{ github.job }} From ab13e8062c36ca3d1a1da24cb6f9d5154f526b1b Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Tue, 17 Dec 2024 13:20:17 -0800 Subject: [PATCH 008/132] Until session save/restore implemented, don't save tool in session --- src/bundles/profile_grids/src/tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bundles/profile_grids/src/tool.py b/src/bundles/profile_grids/src/tool.py index 66126c1e9d..e2acd24a25 100644 --- a/src/bundles/profile_grids/src/tool.py +++ b/src/bundles/profile_grids/src/tool.py @@ -298,7 +298,8 @@ def restore_snapshot(cls, session, data): inst.show_feature_browser(seq, state=fb_data) return inst - SESSION_SAVE = True + #TODO: change to the below when snapshot methods implemented + #SESSION_SAVE = True def take_snapshot(self, session, flags): raise NotImplementedError("take_snaphot") From 3a524d13894fc5929f9323665bb0bdcafad1b89d Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 14:44:28 -0800 Subject: [PATCH 009/132] fix(ci): Install jq on GitHub runners --- .github/workflows/windows_build.yml | 4 ++-- utils/Brewfile | 3 ++- utils/centos/8.txt | 1 + utils/centos/9.txt | 1 + utils/ubuntu/2004.txt | 1 + utils/ubuntu/2204.txt | 1 + utils/ubuntu/2404.txt | 1 + 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 3bd293086c..a37bf4eb77 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -18,7 +18,7 @@ on: jobs: build-test: - name: Test + name: Windows Build if: ${{ inputs.release_type == 'test' }} runs-on: windows-latest defaults: @@ -30,7 +30,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-imagemagick mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-objc mingw-w64-x86_64-gcc-fortran rsync patch unzip openssh make mingw-w64-x86_64-autotools + install: git mingw-w64-x86_64-imagemagick mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-objc mingw-w64-x86_64-gcc-fortran rsync patch unzip openssh make mingw-w64-x86_64-autotools mingw-w64-x86_64-jq - run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && MAKEOPTS="-j$(nproc)" make -j$(nproc) build-minimal - name: Run the legacy test suite run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && make test diff --git a/utils/Brewfile b/utils/Brewfile index 5f7ba77797..2a3dd05840 100644 --- a/utils/Brewfile +++ b/utils/Brewfile @@ -7,6 +7,7 @@ brew "autoconf" brew "automake" brew "libtool" # if installing scipy from source -brew "openblas" +brew "openblas" +brew "jq" brew "python@3.10" diff --git a/utils/centos/8.txt b/utils/centos/8.txt index 1e4821f018..1f915e6ac9 100644 --- a/utils/centos/8.txt +++ b/utils/centos/8.txt @@ -23,6 +23,7 @@ glibc gtk3 ImageMagick ImageMagick-devel +jq libatomic libdrm libffi diff --git a/utils/centos/9.txt b/utils/centos/9.txt index 534eaf13d1..1f3e8092e1 100644 --- a/utils/centos/9.txt +++ b/utils/centos/9.txt @@ -19,6 +19,7 @@ glibc gtk3 ImageMagick ImageMagick-devel +jq libatomic libdrm libffi diff --git a/utils/ubuntu/2004.txt b/utils/ubuntu/2004.txt index 339748e812..1d3dc63baa 100644 --- a/utils/ubuntu/2004.txt +++ b/utils/ubuntu/2004.txt @@ -1,3 +1,4 @@ +jq libasound2 libatk1.0-0 libbz2-1.0 diff --git a/utils/ubuntu/2204.txt b/utils/ubuntu/2204.txt index 339748e812..1d3dc63baa 100644 --- a/utils/ubuntu/2204.txt +++ b/utils/ubuntu/2204.txt @@ -1,3 +1,4 @@ +jq libasound2 libatk1.0-0 libbz2-1.0 diff --git a/utils/ubuntu/2404.txt b/utils/ubuntu/2404.txt index edaed13b4b..ad2e96fca4 100644 --- a/utils/ubuntu/2404.txt +++ b/utils/ubuntu/2404.txt @@ -1,3 +1,4 @@ +jq language-selector-common ffmpeg build-essential From b4d53a2a2538fd1ed9a1efb5ccecb0e07188cf0a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 14:47:53 -0800 Subject: [PATCH 010/132] fix(ci): That job id action requires the name of the job --- .github/workflows/flatpak_build.yml | 2 +- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index 2c6b9fc614..163993aed9 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -42,7 +42,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "flatpak-build" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index e10d627b44..bfba2766af 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-arm-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 3171aadbf0..6156c2f840 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-intel-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index 3aa922fbd8..e13db7330a 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -46,7 +46,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-mac-universal" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 0a7c2446a6..928fb9e9ef 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-rocky8-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 7906408b50..3608400d80 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-rocky9-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 4047d1cf29..212abd72d9 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -34,7 +34,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: ${{ github.job }} + job_name: "build-ubuntu (${{ matrix.distro }})" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index a37bf4eb77..30a05a4e82 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -71,7 +71,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: $ {{ github.job }} + job_name: "build-daily" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From d2882dde2d9e22b9bbdbbc1d0310ee3917132769 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 14:52:38 -0800 Subject: [PATCH 011/132] fix(ci): It's job_id not job_name --- .github/workflows/flatpak_build.yml | 2 +- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index 163993aed9..8154653700 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -42,7 +42,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "flatpak-build" + job_id: "flatpak-build" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index bfba2766af..7824ac4f63 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-arm-macos" + job_id: "build-arm-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 6156c2f840..6224dccc90 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-intel-macos" + job_id: "build-intel-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index e13db7330a..c6166c68a1 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -46,7 +46,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-mac-universal" + job_id: "build-mac-universal" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 928fb9e9ef..4608b04b95 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-rocky8-docker" + job_id: "build-rocky8-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 3608400d80..cacc16f236 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-rocky9-docker" + job_id: "build-rocky9-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 212abd72d9..d6b355cf8d 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -34,7 +34,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-ubuntu (${{ matrix.distro }})" + job_id: "build-ubuntu (${{ matrix.distro }})" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 30a05a4e82..775d7e1463 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -71,7 +71,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-daily" + job_id: "build-daily" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From 7a8911743d1161dadedf71f1b4d6f32e37899b42 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 14:57:30 -0800 Subject: [PATCH 012/132] Revert "fix(ci): It's job_id not job_name" This reverts commit d2882dde2d9e22b9bbdbbc1d0310ee3917132769. --- .github/workflows/flatpak_build.yml | 2 +- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index 8154653700..163993aed9 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -42,7 +42,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "flatpak-build" + job_name: "flatpak-build" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index 7824ac4f63..bfba2766af 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-arm-macos" + job_name: "build-arm-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 6224dccc90..6156c2f840 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-intel-macos" + job_name: "build-intel-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index c6166c68a1..e13db7330a 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -46,7 +46,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-mac-universal" + job_name: "build-mac-universal" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 4608b04b95..928fb9e9ef 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-rocky8-docker" + job_name: "build-rocky8-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index cacc16f236..3608400d80 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-rocky9-docker" + job_name: "build-rocky9-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index d6b355cf8d..212abd72d9 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -34,7 +34,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-ubuntu (${{ matrix.distro }})" + job_name: "build-ubuntu (${{ matrix.distro }})" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 775d7e1463..30a05a4e82 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -71,7 +71,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_id: "build-daily" + job_name: "build-daily" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From 2efaca5a7a89da4d0c34028cc9a54d13eedc61d5 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 15:24:14 -0800 Subject: [PATCH 013/132] fix(ci): Give jobs the correct names --- .github/workflows/flatpak_build.yml | 2 +- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- .github/workflows/windows_build.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index 163993aed9..e08aea4797 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -42,7 +42,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "flatpak-build" + job_name: "Build ChimeraX FlatPak / flatpak-build" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index bfba2766af..afa67af6f8 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-arm-macos" + job_name: "Build ChimeraX for arm64 macOS / build-arm-macos" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 6156c2f840..15336156c9 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -55,7 +55,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-intel-macos" + job_name: "Build ChimeraX for Intel macOS / Build ChimeraX for Intel Macs" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index e13db7330a..ca09eef7aa 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -46,7 +46,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-mac-universal" + job_name: "Build Universal ChimeraX for macOS / build-mac-universal" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 928fb9e9ef..eeb447f4af 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-rocky8-docker" + job_name: "Build ChimeraX for Rocky 8 / Build ChimeraX for Rocky 8" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 3608400d80..dc47c778f3 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -40,7 +40,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-rocky9-docker" + job_name: "Build ChimeraX for Rocky 9 / build-rocky9-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 212abd72d9..cc0b3ad576 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -34,7 +34,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-ubuntu (${{ matrix.distro }})" + job_name: "Build ChimeraX for Ubuntu / build-ubuntu (${{ matrix.distro }})" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 30a05a4e82..a8933cc3be 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -71,7 +71,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "build-daily" + job_name: "Build ChimeraX for Windows / Daily" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From 7e433733cfdfcbb50a01d3185cad506a3874674b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 15:57:52 -0800 Subject: [PATCH 014/132] fix(ci): It's 'matrix.os' not 'matrix.distro' --- .github/workflows/ubuntu_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index cc0b3ad576..b27746d481 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -34,7 +34,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "Build ChimeraX for Ubuntu / build-ubuntu (${{ matrix.distro }})" + job_name: "Build ChimeraX for Ubuntu / build-ubuntu (${{ matrix.os }})" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From b1896266bfdef8b1ab8173df3e8439f91f0c5181 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 16:50:38 -0800 Subject: [PATCH 015/132] fix(ci): Install jq on Flatpak runner --- .github/workflows/flatpak_build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/flatpak_build.yml b/.github/workflows/flatpak_build.yml index e08aea4797..876fd9dc9c 100644 --- a/.github/workflows/flatpak_build.yml +++ b/.github/workflows/flatpak_build.yml @@ -39,6 +39,8 @@ jobs: linux-bundles.tar.gz linux-include.tar.gz key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} + - name: Install jq + run: dnf install -y jq - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: From 5b57517a9a44da5553409ec18b40ab542b31dd58 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Tue, 17 Dec 2024 17:29:45 -0800 Subject: [PATCH 016/132] Don't copy alignment sequences if restoring from session [#16478]; restore region state after sequence canvas so that the latter is in a consistent state --- src/bundles/seq_view/src/tool.py | 2 +- src/bundles/seqalign/bundle_info.xml | 2 +- src/bundles/seqalign/src/alignment.py | 16 ++++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/bundles/seq_view/src/tool.py b/src/bundles/seq_view/src/tool.py index 88e2e59821..074f2d882c 100644 --- a/src/bundles/seq_view/src/tool.py +++ b/src/bundles/seq_view/src/tool.py @@ -853,9 +853,9 @@ def status(self, *args, **kw): def restore_snapshot(cls, session, data): inst = super().restore_snapshot(session, data['ToolInstance']) inst._finalize_init(data['alignment']) - inst.region_manager.restore_state(data['region browser']) if 'seq canvas' in data: inst.seq_canvas.restore_state(session, data['seq canvas']) + inst.region_manager.restore_state(data['region browser']) # feature browsers depend on regions (and therefore the region browser) being restored first if 'feature browsers' in data: from .feature_browser import FeatureBrowser diff --git a/src/bundles/seqalign/bundle_info.xml b/src/bundles/seqalign/bundle_info.xml index df2518c208..f5e33db5b5 100644 --- a/src/bundles/seqalign/bundle_info.xml +++ b/src/bundles/seqalign/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/seqalign/src/alignment.py b/src/bundles/seqalign/src/alignment.py index 1e04d61c00..fbb20bd11b 100644 --- a/src/bundles/seqalign/src/alignment.py +++ b/src/bundles/seqalign/src/alignment.py @@ -94,9 +94,12 @@ def __init__(self, session, seqs, ident, file_attrs, file_markups, auto_destroy, if isinstance(seqs, tuple): seqs = list(seqs) # prevent later accidental modification; also different alignments may contain the same sequence - # (so prevent Alignment.destroy from messing up other alignments) - from copy import copy - self._seqs = [copy(seq) for seq in seqs] + # (so prevent Alignment._destroy from messing up other alignments) + if session_restore: + self._seqs = seqs + else: + from copy import copy + self._seqs = [copy(seq) for seq in seqs] self.ident = ident self.file_attrs = file_attrs self.file_markups = file_markups @@ -925,13 +928,6 @@ def restore_snapshot(session, data): """For restoring scenes/sessions""" ident = data['ident'] if 'ident' in data else data['name'] create_headers = data['version'] < 2 - for seq in data['seqs']: - if seq.characters == "AYVINEACISCGACEPECPVNAISSGDDRYVIDADTCIDCGACAGVCPVDAPVQA" and len(seq) < len(data['seqs'][0]): - if hasattr(seq, 'residues'): - import sys - print("structure sequence", file=sys.__stderr__) - else: - seq.characters = "AYVINEA--CISCGACEPECPVNAISSGDD---RYVIDADTCIDCGACAGVCPVDA-PVQA" aln = Alignment(session, data['seqs'], ident, data['file attrs'], data['file markups'], data['auto_destroy'], "session" if data['auto_associate'] else False, From 0d4d3869681e975d39b10c8034ca38529991243f Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Tue, 17 Dec 2024 17:29:45 -0800 Subject: [PATCH 017/132] Don't copy alignment sequences if restoring from session [#16478]; restore region state after sequence canvas so that the latter is in a consistent state --- src/bundles/seq_view/src/tool.py | 2 +- src/bundles/seqalign/bundle_info.xml | 2 +- src/bundles/seqalign/src/alignment.py | 16 ++++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/bundles/seq_view/src/tool.py b/src/bundles/seq_view/src/tool.py index 88e2e59821..074f2d882c 100644 --- a/src/bundles/seq_view/src/tool.py +++ b/src/bundles/seq_view/src/tool.py @@ -853,9 +853,9 @@ def status(self, *args, **kw): def restore_snapshot(cls, session, data): inst = super().restore_snapshot(session, data['ToolInstance']) inst._finalize_init(data['alignment']) - inst.region_manager.restore_state(data['region browser']) if 'seq canvas' in data: inst.seq_canvas.restore_state(session, data['seq canvas']) + inst.region_manager.restore_state(data['region browser']) # feature browsers depend on regions (and therefore the region browser) being restored first if 'feature browsers' in data: from .feature_browser import FeatureBrowser diff --git a/src/bundles/seqalign/bundle_info.xml b/src/bundles/seqalign/bundle_info.xml index df2518c208..f5e33db5b5 100644 --- a/src/bundles/seqalign/bundle_info.xml +++ b/src/bundles/seqalign/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/seqalign/src/alignment.py b/src/bundles/seqalign/src/alignment.py index 1e04d61c00..fbb20bd11b 100644 --- a/src/bundles/seqalign/src/alignment.py +++ b/src/bundles/seqalign/src/alignment.py @@ -94,9 +94,12 @@ def __init__(self, session, seqs, ident, file_attrs, file_markups, auto_destroy, if isinstance(seqs, tuple): seqs = list(seqs) # prevent later accidental modification; also different alignments may contain the same sequence - # (so prevent Alignment.destroy from messing up other alignments) - from copy import copy - self._seqs = [copy(seq) for seq in seqs] + # (so prevent Alignment._destroy from messing up other alignments) + if session_restore: + self._seqs = seqs + else: + from copy import copy + self._seqs = [copy(seq) for seq in seqs] self.ident = ident self.file_attrs = file_attrs self.file_markups = file_markups @@ -925,13 +928,6 @@ def restore_snapshot(session, data): """For restoring scenes/sessions""" ident = data['ident'] if 'ident' in data else data['name'] create_headers = data['version'] < 2 - for seq in data['seqs']: - if seq.characters == "AYVINEACISCGACEPECPVNAISSGDDRYVIDADTCIDCGACAGVCPVDAPVQA" and len(seq) < len(data['seqs'][0]): - if hasattr(seq, 'residues'): - import sys - print("structure sequence", file=sys.__stderr__) - else: - seq.characters = "AYVINEA--CISCGACEPECPVNAISSGDD---RYVIDADTCIDCGACAGVCPVDA-PVQA" aln = Alignment(session, data['seqs'], ident, data['file attrs'], data['file markups'], data['auto_destroy'], "session" if data['auto_associate'] else False, From 967a31c05e25e0b558441f2f579cb0cd18fca765 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 18:51:07 -0800 Subject: [PATCH 018/132] fix(ci): If only one arch available, still make copied binaries executable --- utils/build/macos/make_universal.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/utils/build/macos/make_universal.py b/utils/build/macos/make_universal.py index 07c84a6b63..62a0bc9b0a 100755 --- a/utils/build/macos/make_universal.py +++ b/utils/build/macos/make_universal.py @@ -7,6 +7,8 @@ import subprocess import lief import sys + + # ------------------------------------------------------------------------------------- # Make a Mac universal build by combining Arm and Intel builds using the lipo command. # @@ -116,7 +118,6 @@ def only_line_endings_differ(arm_path, intel_path): return True - need_lipo = set( [ lief.MachO.FILE_TYPES.BUNDLE, @@ -156,15 +157,16 @@ def lipo_files(arm_path, intel_path, universal_path, warn): if not make_thin(arm_path, arm_path_thin, "arm64"): log_mismatch(f"ARM ChimeraX has only Intel binary: {arm_path}") _copy(arm_path, universal_path) + chmod(universal_path, 0o755) # Add execute permission. return intel_path_thin = universal_path + ".x86_64_thin" if not make_thin(intel_path, intel_path_thin, "x86_64"): log_mismatch(f"Intel ChimeraX has non-Intel binary: {intel_path}") _copy(arm_path, universal_path) + chmod(universal_path, 0o755) # Add execute permission. return - try: args = [ "lipo", @@ -189,16 +191,18 @@ def lipo_files(arm_path, intel_path, universal_path, warn): basename(universal_path), dirname(universal_path))) """ - remove(arm_path_thin) remove(intel_path_thin) chmod(universal_path, 0o755) # Add execute permission. except RuntimeError as e: error = str(e) - if 'have the same architecture' in error: + if "have the same architecture" in error: remove(arm_path_thin) rename(intel_path_thin, universal_path) - stderr.write("both builds had same arch for %s; renaming instead of lipoing" % universal_path) + stderr.write( + "both builds had same arch for %s; renaming instead of lipoing" + % universal_path + ) else: raise e except RuntimeError as e: @@ -213,8 +217,6 @@ def lipo_files(arm_path, intel_path, universal_path, warn): raise RuntimeError("No binary file %s" % universal_path) - - def make_thin(path, thin_path, arch): args = ["lipo", path, "-info"] @@ -318,7 +320,6 @@ def warn_on_mismatch(path, no_warn=no_warn): return not has_suffix(path, no_warn) - arm_location, intel_location, universal_location = sys.argv[1:4] make_universal( arm_location, intel_location, universal_location, exclude, warn_on_mismatch From 73efeb0d5b50e98d1b62dd8bae98f2d8805a1720 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 19:08:23 -0800 Subject: [PATCH 019/132] fix(ci): Do the nightly build 1 hour earlier I've noticed that the nightly builds never, ever break when I run them by hand to test them all day. It seems like only at night do they ever fail. This commit tries running them an hour earlier. Maybe Apple's servers just get slammed every evening by every developer in California's workflow going off at the same time. --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index afb0fba875..9ed8feb965 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,7 +2,7 @@ name: Nightly Build on: workflow_dispatch: schedule: - - cron: "0 8 * * *" # 8AM UTC / 12AM PST / 1AM PDT + - cron: "0 7 * * *" # 7AM UTC / 11PM PST / 12AM PDT jobs: build-rocky8-docker: From 8c17eb7b9d8b73447aeb7afbb2480381e3fc4ce6 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 21:38:54 -0800 Subject: [PATCH 020/132] fix(ci): Use lief 0.16 --- .github/workflows/mac_arm_build.yml | 2 +- .github/workflows/mac_intel_build.yml | 2 +- .github/workflows/mac_universal_build.yml | 2 +- utils/build/macos/make_universal.py | 12 +++++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index afa67af6f8..49338a772c 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -42,7 +42,7 @@ jobs: uses: Homebrew/actions/setup-homebrew@master - run: | brew install python@3.10 - python3.10 -m pip install lief==0.12.2 dmgbuild + python3.10 -m pip install lief dmgbuild patch --ignore-whitespace -d /opt/homebrew/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch - uses: actions/checkout@v4 - run: ${PWD}/utils/set_up_macos.sh diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 15336156c9..38a9f56ba4 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -41,7 +41,7 @@ jobs: uses: Homebrew/actions/setup-homebrew@master - run: | brew install python@3.10 - python3.10 -m pip install lief==0.12.2 dmgbuild + python3.10 -m pip install lief dmgbuild patch --ignore-whitespace -d /usr/local/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch # Temporarily force this to succeed. The container's Python conflicts with homebrew's, # but we don't really use it anyway. diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index ca09eef7aa..b95003e029 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -39,7 +39,7 @@ jobs: run: | brew install python@3.10 python3.10 -m pip install setuptools==54.0 - python3.10 -m pip install lief==0.12.2 + python3.10 -m pip install lief python3.10 -m pip install dmgbuild # Make dmgbuild allocate an adult sized DMG patch --ignore-whitespace -d /opt/homebrew/lib/python3.10/site-packages/dmgbuild -N -p0 < ./utils/build/macos/dmgbuild.patch diff --git a/utils/build/macos/make_universal.py b/utils/build/macos/make_universal.py index 62a0bc9b0a..28c044bd78 100755 --- a/utils/build/macos/make_universal.py +++ b/utils/build/macos/make_universal.py @@ -120,10 +120,10 @@ def only_line_endings_differ(arm_path, intel_path): need_lipo = set( [ - lief.MachO.FILE_TYPES.BUNDLE, - lief.MachO.FILE_TYPES.DYLIB, - lief.MachO.FILE_TYPES.EXECUTE, - lief.MachO.FILE_TYPES.OBJECT, + lief.MachO.Header.FILE_TYPE.BUNDLE, + lief.MachO.Header.FILE_TYPE.DYLIB, + lief.MachO.Header.FILE_TYPE.EXECUTE, + lief.MachO.Header.FILE_TYPE.OBJECT, ] ) lief.logging.disable() @@ -135,7 +135,9 @@ def is_executable(path): return False try: m = lief.MachO.parse(path) - except lief.bad_file: + # Bare except is usually bad, but lief does not provide its own + # exceptions + except Exception as e: return False if m is None or m.at(0) is None: return False From 73ba932cd110404d6e1f28b9076f2039ff3364f0 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 22:37:05 -0800 Subject: [PATCH 021/132] fix(ci): Update notarize.py to use lief 16 --- utils/build/macos/notarize.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/build/macos/notarize.py b/utils/build/macos/notarize.py index e9b9a7144a..97ca8b50de 100755 --- a/utils/build/macos/notarize.py +++ b/utils/build/macos/notarize.py @@ -303,10 +303,10 @@ def executable_paths(app_path): need_signature = set( [ - lief.MachO.FILE_TYPES.BUNDLE, - lief.MachO.FILE_TYPES.DYLIB, - lief.MachO.FILE_TYPES.EXECUTE, - lief.MachO.FILE_TYPES.OBJECT, + lief.MachO.Header.FILE_TYPE.BUNDLE, + lief.MachO.Header.FILE_TYPE.DYLIB, + lief.MachO.Header.FILE_TYPE.EXECUTE, + lief.MachO.Header.FILE_TYPE.OBJECT, ] ) contents_dir = os.path.join(app_path, "Contents") @@ -335,7 +335,7 @@ def executable_paths(app_path): # On Mac ARM64 lief fails to parse several .a archives. # With python 3.11 ChimeraX a file config-3.11-darwin/python.o # also is not recognized by lief. ChimeraX ticket 9148 - file_type = lief.MachO.FILE_TYPES.OBJECT + file_type = lief.MachO.Header.FILE_TYPE.OBJECT else: continue else: From ea7d89091039fc2b780682768066b55c8a6e35ca Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Tue, 17 Dec 2024 23:59:11 -0800 Subject: [PATCH 022/132] fix(ci): Just chmod +x ambertools on the universal build --- .github/workflows/mac_universal_build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/mac_universal_build.yml b/.github/workflows/mac_universal_build.yml index b95003e029..8b8d9c1c87 100644 --- a/.github/workflows/mac_universal_build.yml +++ b/.github/workflows/mac_universal_build.yml @@ -72,6 +72,11 @@ jobs: - name: Make the universal build run: | python3.10 ./utils/build/macos/make_universal.py chimerax_arm64.app chimerax_intel.app ChimeraX.app 2>&1 + # Local machines keep the executable bits on these files. Runner machines for whatever reason do not. + # Perhaps they are quarantined? al2co doesn't have this problem? + - name: Make ambertools executable + run: | + chmod +x ChimeraX.app/Contents/bin/amber*/bin/* - name: Remove unneeded ChimeraXes run: | rm -r chimerax_arm64.app From 0efd0bece06d9f97c7fa4a20fcf1fef235afe3d6 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Wed, 18 Dec 2024 13:09:30 -0800 Subject: [PATCH 023/132] fix(segmentations): By popular demand, note ID of segmentation tool's cursors in the log --- src/bundles/segmentations/src/ui/segmentations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bundles/segmentations/src/ui/segmentations.py b/src/bundles/segmentations/src/ui/segmentations.py index 163b572b95..e7bf383bd9 100644 --- a/src/bundles/segmentations/src/ui/segmentations.py +++ b/src/bundles/segmentations/src/ui/segmentations.py @@ -898,7 +898,8 @@ def _create_2d_segmentation_pucks(self, initial_display=False) -> None: cursor.axis ] ) - self.session.models.add(self.segmentation_cursors.values()) + self.session.models.add(cursor) + self.session.logger.info("Created segmentation sphere cursor with ID #%s" % cursor.id_string) def _destroy_2d_segmentation_pucks(self) -> None: seg_cursors = self.segmentation_cursors.values() @@ -919,6 +920,7 @@ def _create_3d_segmentation_sphere(self) -> None: self.segmentation_sphere.position = Place( origin=current_reference_model.bounds().center() ) + self.session.logger.info("Created segmentation sphere cursor with ID #%s" % self.segmentation_sphere.id_string) def _destroy_3d_segmentation_sphere(self) -> None: if self.segmentation_sphere: From 085af664e4f56582243206c26222fdff2d353956 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Wed, 18 Dec 2024 13:09:53 -0800 Subject: [PATCH 024/132] build: Remove static libraries from pdb bundle on clean --- src/bundles/pdb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/pdb/Makefile b/src/bundles/pdb/Makefile index 2947dec017..5ffa78a12f 100644 --- a/src/bundles/pdb/Makefile +++ b/src/bundles/pdb/Makefile @@ -1,3 +1,3 @@ include ../Makefile.bundle -CLEAN_ALWAYS = src/*.$(PYMOD_EXT) pdbio_cpp/PDBio.o* +CLEAN_ALWAYS = src/*.$(PYMOD_EXT) pdbio_cpp/PDBio.o* src/*.a From b053c44c50d6dc0d89ea07ee2bcef7dc69c0dc66 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Wed, 18 Dec 2024 13:20:54 -0800 Subject: [PATCH 025/132] fix(segmentations): session.models.add expects a list --- src/bundles/segmentations/src/ui/segmentations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/segmentations/src/ui/segmentations.py b/src/bundles/segmentations/src/ui/segmentations.py index e7bf383bd9..2b16057682 100644 --- a/src/bundles/segmentations/src/ui/segmentations.py +++ b/src/bundles/segmentations/src/ui/segmentations.py @@ -898,7 +898,7 @@ def _create_2d_segmentation_pucks(self, initial_display=False) -> None: cursor.axis ] ) - self.session.models.add(cursor) + self.session.models.add([cursor]) self.session.logger.info("Created segmentation sphere cursor with ID #%s" % cursor.id_string) def _destroy_2d_segmentation_pucks(self) -> None: From 5f7a14a2b85247158fe4faa6dfbfb42641461dd3 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Wed, 18 Dec 2024 13:38:21 -0800 Subject: [PATCH 026/132] fix(segmentations): Use the ActiveSegmentationChanged trigger in each plane viewer --- .../segmentations/src/segmentation_tracker.py | 6 +++++- .../segmentations/src/ui/orthoplanes.py | 18 ++++++++++-------- .../segmentations/src/ui/segmentations.py | 6 ------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/bundles/segmentations/src/segmentation_tracker.py b/src/bundles/segmentations/src/segmentation_tracker.py index 21d392a5dd..c54a4554fb 100644 --- a/src/bundles/segmentations/src/segmentation_tracker.py +++ b/src/bundles/segmentations/src/segmentation_tracker.py @@ -91,9 +91,13 @@ def active_segmentation(self, segmentation: Segmentation): raise ValueError( f"Segmentation {segmentation} is not associated with any open volumes." ) + if self._active_segmentation: + self._active_segmentation.active = False self._active_segmentation = segmentation + if self._active_segmentation: + self._active_segmentation.active = True chimerax.segmentations.triggers.activate_trigger( - chimerax.segmentations.triggers.ACTIVE_SEGMENTATION_CHANGED, segmentation + Trigger.ActiveSegmentationChanged, segmentation ) diff --git a/src/bundles/segmentations/src/ui/orthoplanes.py b/src/bundles/segmentations/src/ui/orthoplanes.py index bdb0d1f054..67d1af9da0 100644 --- a/src/bundles/segmentations/src/ui/orthoplanes.py +++ b/src/bundles/segmentations/src/ui/orthoplanes.py @@ -49,7 +49,6 @@ import chimerax.segmentations.triggers from chimerax.segmentations.triggers import ( - ACTIVE_SEGMENTATION_CHANGED, SEGMENTATION_REMOVED, SEGMENTATION_ADDED, SEGMENTATION_MODIFIED, @@ -104,9 +103,6 @@ def __init__(self, session): self.have_seg_tool = False self.axes = {} self.segmentation_tracker = get_tracker() - self._active_seg_changed_handler = chimerax.segmentations.triggers.add_handler( - ACTIVE_SEGMENTATION_CHANGED, self._active_segmentation_changed_cb - ) self._segmentation_added_handler = chimerax.segmentations.triggers.add_handler( SEGMENTATION_ADDED, self._on_segmentation_added ) @@ -139,15 +135,11 @@ def update_location(self, viewer): self.axes[Axis.CORONAL].sagittal_index = viewer.sagittal_index def deregister_triggers(self): - chimerax.segmentations.triggers.remove_handler(self._active_seg_changed_handler) chimerax.segmentations.triggers.remove_handler(self._segmentation_added_handler) chimerax.segmentations.triggers.remove_handler( self._segmentation_removed_handler ) - def _active_segmentation_changed_cb(self, _, segmentation): - pass - def update_dimensions(self, dimensions): for axis in self.axes.values(): axis.update_dimensions(dimensions) @@ -433,7 +425,14 @@ def _not_volume_surface_or_segmentation(m): self.reference_model_changed_handler = chimerax.segmentations.triggers.add_handler( Trigger.ReferenceModelChanged, self._on_reference_model_changed ) + self.active_segmentation_changed_handler = ( + chimerax.segmentations.triggers.add_handler( + Trigger.ActiveSegmentationChanged, self._on_active_segmentation_changed + ) + ) + def _on_active_segmentation_changed(self, _, data): + self._redraw() def _on_reference_model_changed(self, _, model): self.model_menu._menu.set_value(model) @@ -796,6 +795,9 @@ def close(self): chimerax.segmentations.triggers.remove_handler( self.segmentation_modified_handler ) + chimerax.segmentations.triggers.remove_handler( + self.active_segmentation_changed_handler + ) del self.label diff --git a/src/bundles/segmentations/src/ui/segmentations.py b/src/bundles/segmentations/src/ui/segmentations.py index 2b16057682..4e0d1bd3d0 100644 --- a/src/bundles/segmentations/src/ui/segmentations.py +++ b/src/bundles/segmentations/src/ui/segmentations.py @@ -1015,13 +1015,7 @@ def saveSegment(self, segments=None): self.segmentation_tracker.active_segmentation.save(filename) def setActiveSegment(self, segment): - if self.segmentation_tracker.active_segmentation: - self.segmentation_tracker.active_segmentation.active = False self.segmentation_tracker.active_segmentation = segment - if self.segmentation_tracker.active_segmentation: - self.segmentation_tracker.active_segmentation.active = True - if self.session.ui.main_window.view_layout == "orthoplanes": - self.session.ui.main_window.main_view.redraw_all() def hide_active_segmentation(self): if self.segmentation_tracker.active_segmentation is not None: From 7230ab62d8f3f5a89bbafa049308fb028e7b8f14 Mon Sep 17 00:00:00 2001 From: Tom Goddard Date: Wed, 18 Dec 2024 19:49:21 -0800 Subject: [PATCH 027/132] Added link to AlphaFold 3 drug web page on presentations web page. --- docs/presentations.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/presentations.html b/docs/presentations.html index 7d843b0fd7..a44247ce52 100644 --- a/docs/presentations.html +++ b/docs/presentations.html @@ -39,6 +39,10 @@

ChimeraX Demonstrations, Talks and Posters

ChimeraX recipes

+

+Docking antiviral drugs to Nipah virus, influenza virus and HIV virus proteins using AlphaFold 3. December 18, 2024. +

+

How to run AlphaFold 3 on the UCSF Wynton cluster. December 4, 2024.

From c3e69a8a204cf4fe3c06fb9f15b215acdf9052e4 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 10:47:20 -0800 Subject: [PATCH 028/132] fix(ci): Set MACOSX_DEPLOYMENT_TARGET to 11 in the Mac Intel build --- .github/workflows/mac_intel_build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index 38a9f56ba4..f7bf86dfaf 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -28,6 +28,9 @@ on: MAC_NOTARIZATION_EMAIL: required: true +env: + MACOSX_DEPLOYMENT_TARGET: 11 + jobs: build-intel-macos: name: Build ChimeraX for Intel Macs From 5d102abcb023193f6e9a3104c0b05b9097c72b08 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Thu, 19 Dec 2024 14:57:17 -0800 Subject: [PATCH 029/132] Faulthandler output seems better on Windows now, so re-enable it and see how it goes --- src/bundles/bug_reporter/bundle_info.xml | 2 +- src/bundles/bug_reporter/src/__init__.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bundles/bug_reporter/bundle_info.xml b/src/bundles/bug_reporter/bundle_info.xml index 6856d5d4ee..8eed94c4fb 100644 --- a/src/bundles/bug_reporter/bundle_info.xml +++ b/src/bundles/bug_reporter/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/bug_reporter/src/__init__.py b/src/bundles/bug_reporter/src/__init__.py index f6b7a2b787..c03fb2acf4 100644 --- a/src/bundles/bug_reporter/src/__init__.py +++ b/src/bundles/bug_reporter/src/__init__.py @@ -33,12 +33,10 @@ def initialize(session, bundle_info): and the log recording temporary file to record if the current session crashes. ''' - from sys import platform - if platform != 'win32': - from . import crash_report - crash_report.check_for_crash(session) - crash_report.register_signal_handler(session) - crash_report.register_log_recorder(session) + from . import crash_report + crash_report.check_for_crash(session) + crash_report.register_signal_handler(session) + crash_report.register_log_recorder(session) # Add Report a Bug to Help menu from . import tool From 526dcfcfbb493d24e249e9746900c92b82552284 Mon Sep 17 00:00:00 2001 From: Greg Couch Date: Thu, 19 Dec 2024 15:04:46 -0800 Subject: [PATCH 030/132] Use PyQt/Qt 6.8 --- prereqs/PyQt/Makefile | 6 +++--- prereqs/PyQt/Makefile.wheel.qt6 | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/prereqs/PyQt/Makefile b/prereqs/PyQt/Makefile index b854dcec58..226fed77c0 100644 --- a/prereqs/PyQt/Makefile +++ b/prereqs/PyQt/Makefile @@ -10,9 +10,9 @@ PYQT_LICENSE = gpl USE_QT6 = true -BASE_VERSION = 6.7 -QT_MINOR_VERSION = 3 -PYQT_MINOR_VERSION = 1 +BASE_VERSION = 6.8 +QT_MINOR_VERSION = 1 +PYQT_MINOR_VERSION = 0 PYQTWE_MINOR_VERSION = 0 MAKE_ARGS = -f Makefile.$(METHOD) BASE_VERSION=$(BASE_VERSION) PYQT_MINOR_VERSION=$(PYQT_MINOR_VERSION) QT_MINOR_VERSION=$(QT_MINOR_VERSION) PYQTWE_MINOR_VERSION=$(PYQTWE_MINOR_VERSION) PYQT_LICENSE=$(PYQT_LICENSE) diff --git a/prereqs/PyQt/Makefile.wheel.qt6 b/prereqs/PyQt/Makefile.wheel.qt6 index ebd2815de4..dbcacd8f0c 100644 --- a/prereqs/PyQt/Makefile.wheel.qt6 +++ b/prereqs/PyQt/Makefile.wheel.qt6 @@ -9,11 +9,11 @@ REMOTE_HOST = plato.cgl.ucsf.edu: REMOTE_DIR = $(REMOTE_HOST)/usr/local/src/PyQt6 # QT_VERSION is overriden by Makefile -BASE_VERSION = 6.7 -QT_MINOR_VERSION = 3 -PYQT_MINOR_VERSION = 1 +BASE_VERSION = 6.8 +QT_MINOR_VERSION = 1 +PYQT_MINOR_VERSION = 0 ifeq ($(OS),Linux) -PYQT_REVISION = 1 +PYQT_REVISION = else PYQT_REVISION = endif @@ -36,14 +36,19 @@ SIP_VERSION = 13.8.0 ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.6.0" && echo $$?)) # PyQt version <= 6.6.0 PYTHON_TAGS = cp37 -else +else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) +# PyQt version < 6.8 PYTHON_TAGS = cp38 +else +PYTHON_TAGS = cp39 endif ifeq (0, $(shell sort -CV <<< "$(PYQTWE_VERSION)"$$'\n'"6.6.0" && echo $$?)) # PyQt WebEngine version <= 6.6.0 WE_PYTHON_TAGS = cp37 -else +else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) WE_PYTHON_TAGS = cp38 +else +WE_PYTHON_TAGS = cp39 endif WHEEL_ABI = abi3 @@ -57,8 +62,11 @@ BIN_PLATFORM = linux ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.3.99" && echo $$?)) # For PyQt version < 6.4 WHEEL_PLATFORM = manylinux1_x86_64 -else +else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) +# For PyQt version < 6.4 WHEEL_PLATFORM = manylinux_2_28_x86_64 +else +WHEEL_PLATFORM = manylinux_2_35_x86_64 endif WE_WHEEL_PLATFORM = $(WHEEL_PLATFORM) MISSING_QTWEBENGINE_DICT = PyQt6/Qt6/libexec/qtwebengine_dictionaries From c62ea7da81772445c3e8c9b1b575fe60cfc87f71 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 14:57:05 -0800 Subject: [PATCH 031/132] fix(segmentation): Remove vestigial PlaneViewerEnter/Leave events --- src/bundles/segmentations/src/triggers.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/bundles/segmentations/src/triggers.py b/src/bundles/segmentations/src/triggers.py index 3f2a599dd1..a3579ad657 100644 --- a/src/bundles/segmentations/src/triggers.py +++ b/src/bundles/segmentations/src/triggers.py @@ -133,13 +133,6 @@ class Trigger(StrEnum): SagittalCursorResized = "sagittal cursor resized" SphereCursorResized = "sphere cursor resized" - AxialPlaneViewerEnter = "axial plane viewer enter" - CoronalPlaneViewerEnter = "coronal plane viewer enter" - SagittalPlaneViewerEnter = "sagittal plane viewer enter" - - AxialPlaneViewerLeave = "axial plane viewer leave" - CoronalPlaneViewerLeave = "coronal plane viewer leave" - SagittalPlaneViewerLeave = "sagittal plane viewer leave" ViewLayoutChanged = "view layout changed" GuidelinesVisibilityChanged = "guidelines visibility changed" From 9f072d75adaf445122ed6009651188dc4154886c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 15:13:17 -0800 Subject: [PATCH 032/132] fix(segmentations): Use Trigger.GuidelinesVisibilityChanged where applicable --- src/bundles/segmentations/src/triggers.py | 1 - src/bundles/segmentations/src/ui/orthoplanes.py | 7 ++++--- src/bundles/segmentations/src/ui/segmentations.py | 5 ++--- src/bundles/segmentations/src/view/cmd.py | 15 ++++++--------- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/bundles/segmentations/src/triggers.py b/src/bundles/segmentations/src/triggers.py index a3579ad657..026a19d10d 100644 --- a/src/bundles/segmentations/src/triggers.py +++ b/src/bundles/segmentations/src/triggers.py @@ -161,7 +161,6 @@ class Trigger(StrEnum): SPHERE_CURSOR_RESIZED = Trigger.SphereCursorResized VIEW_LAYOUT_CHANGED = Trigger.ViewLayoutChanged -GUIDELINES_VISIBILITY_CHANGED = Trigger.GuidelinesVisibilityChanged HAND_MODES_CHANGED = Trigger.HandModesChanged MOUSE_MODES_CHANGED = Trigger.MouseModesChanged diff --git a/src/bundles/segmentations/src/ui/orthoplanes.py b/src/bundles/segmentations/src/ui/orthoplanes.py index 67d1af9da0..7949a96004 100644 --- a/src/bundles/segmentations/src/ui/orthoplanes.py +++ b/src/bundles/segmentations/src/ui/orthoplanes.py @@ -52,7 +52,6 @@ SEGMENTATION_REMOVED, SEGMENTATION_ADDED, SEGMENTATION_MODIFIED, - GUIDELINES_VISIBILITY_CHANGED, ) from chimerax.segmentations.triggers import Trigger @@ -415,7 +414,7 @@ def _not_volume_surface_or_segmentation(m): ADD_TOOL_INSTANCE, self._tool_instance_added_cb ) self.guideline_visibility_handler = chimerax.segmentations.triggers.add_handler( - GUIDELINES_VISIBILITY_CHANGED, self._on_guideline_visibility_changed + Trigger.GuidelinesVisibilityChanged, self._on_guideline_visibility_changed ) self.segmentation_modified_handler = ( chimerax.segmentations.triggers.add_handler( @@ -940,7 +939,9 @@ def toggle_guidelines(self): settings = get_settings(self.session) settings.display_guidelines = not settings.display_guidelines - chimerax.segmentations.triggers.activate_trigger(GUIDELINES_VISIBILITY_CHANGED) + chimerax.segmentations.triggers.activate_trigger( + Trigger.GuidelinesVisibilityChanged + ) def toggle_color_key(self): self.color_key.display = not self.color_key.display diff --git a/src/bundles/segmentations/src/ui/segmentations.py b/src/bundles/segmentations/src/ui/segmentations.py index 4e0d1bd3d0..8eedf1e88a 100644 --- a/src/bundles/segmentations/src/ui/segmentations.py +++ b/src/bundles/segmentations/src/ui/segmentations.py @@ -79,7 +79,6 @@ from chimerax.segmentations.triggers import ( VIEW_LAYOUT_CHANGED, - GUIDELINES_VISIBILITY_CHANGED, ) @@ -1134,7 +1133,7 @@ def _on_show_guidelines_checkbox_changed(self): check_state = self.guidelines_checkbox.isChecked() settings.display_guidelines = not settings.display_guidelines - chimerax.segmentations.triggers.activate_trigger(GUIDELINES_VISIBILITY_CHANGED) + chimerax.segmentations.triggers.activate_trigger(Trigger.GuidelinesVisibilityChanged) if self.session.ui.main_window.view_layout == "orthoplanes": self.session.ui.main_window.main_view.register_segmentation_tool(self) @@ -1148,7 +1147,7 @@ def _on_guidelines_visibility_changed(self, _, visibility): else: state = Qt.CheckState.Unchecked with chimerax.segmentations.triggers.block_trigger( - GUIDELINES_VISIBILITY_CHANGED + Trigger.GuidelinesVisibilityChanged ): self.guidelines_checkbox.blockSignals(True) self.guidelines_checkbox.setCheckState(state) diff --git a/src/bundles/segmentations/src/view/cmd.py b/src/bundles/segmentations/src/view/cmd.py index 248fb88809..6d39a1fd95 100644 --- a/src/bundles/segmentations/src/view/cmd.py +++ b/src/bundles/segmentations/src/view/cmd.py @@ -5,10 +5,7 @@ from chimerax.dicom.dicom_volumes import DICOMVolume import chimerax.segmentations.triggers -from chimerax.segmentations.triggers import ( - VIEW_LAYOUT_CHANGED, - GUIDELINES_VISIBILITY_CHANGED, -) +from chimerax.segmentations.triggers import Trigger from chimerax.segmentations.view import views, FourPanelView from chimerax.segmentations.ui import find_segmentation_tool @@ -27,31 +24,31 @@ def view_layout( settings = get_settings(session) if layout == "default" and session.ui.main_window.view_layout != "default": session.ui.main_window.restore_default_main_view() - chimerax.segmentations.triggers.activate_trigger(VIEW_LAYOUT_CHANGED, layout) + chimerax.segmentations.triggers.activate_trigger(Trigger.ViewLayoutChanged, layout) elif layout in views and session.ui.main_window.view_layout != "orthoplanes": if not layout: session.ui.main_window.main_view = FourPanelView(session) else: session.ui.main_window.main_view = FourPanelView(session, layout) session.ui.main_window.view_layout = "orthoplanes" - chimerax.segmentations.triggers.activate_trigger(VIEW_LAYOUT_CHANGED, layout) + chimerax.segmentations.triggers.activate_trigger(Trigger.ViewLayoutChanged, layout) if st: session.ui.main_window.main_view.register_segmentation_tool(st) if guidelines: settings.display_guidelines = guidelines chimerax.segmentations.triggers.activate_trigger( - chimerax.segmentations.triggers.GUIDELINES_VISIBILITY_CHANGED + Trigger.GuidelinesVisibilityChanged ) elif layout in views and session.ui.main_window.view_layout == "orthoplanes": if layout: session.ui.main_window.main_view.convert_to_layout(layout) chimerax.segmentations.triggers.activate_trigger( - VIEW_LAYOUT_CHANGED, layout + Trigger.ViewLayoutChanged, layout ) if guidelines is not None: settings.display_guidelines = guidelines chimerax.segmentations.triggers.activate_trigger( - GUIDELINES_VISIBILITY_CHANGED + Trigger.GuidelinesVisibilityChanged ) From a70b0e0bd527ec6e526567abee33cad50bf0de0c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 15:46:04 -0800 Subject: [PATCH 033/132] ci!: Make Rocky 9 the common linux build environment --- .github/workflows/check-for-changes.yml | 7 +- .github/workflows/nightly.yml | 10 +-- .github/workflows/rocky8_build.yml | 93 ------------------------- .github/workflows/rocky9_build.yml | 43 +++++------- .github/workflows/ubuntu_build.yml | 2 +- 5 files changed, 26 insertions(+), 129 deletions(-) delete mode 100644 .github/workflows/rocky8_build.yml diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 94dd573b86..860f2bab59 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -5,13 +5,14 @@ on: branches: [develop, release/*] jobs: - build-and-test-rocky8-docker: - runs-on: ubuntu-20.04 + build-and-test-rocky9-docker: + runs-on: ubuntu-22.04 container: - image: rockylinux:8 + image: rockylinux:9 env: SHELL: /bin/bash PATH: /usr/bin:/usr/sbin:/bin:/sbin + PYOPENGL_PLATFORM: egl steps: - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - run: dnf update -y diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9ed8feb965..1283a2037c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,12 +5,6 @@ on: - cron: "0 7 * * *" # 7AM UTC / 11PM PST / 12AM PDT jobs: - build-rocky8-docker: - name: Build ChimeraX for Rocky 8 - uses: ./.github/workflows/rocky8_build.yml - with: - release_type: daily - secrets: inherit build-rocky9-docker: name: Build ChimeraX for Rocky 9 needs: [build-rocky8-docker] @@ -20,14 +14,14 @@ jobs: secrets: inherit build-ubuntu: name: Build ChimeraX for Ubuntu - needs: [build-rocky8-docker] + needs: [build-rocky9-docker] uses: ./.github/workflows/ubuntu_build.yml with: release_type: daily secrets: inherit build-flatpak: name: Build ChimeraX FlatPak - needs: [build-rocky8-docker] + needs: [build-rocky9-docker] uses: ./.github/workflows/flatpak_build.yml with: release_type: daily diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml deleted file mode 100644 index eeb447f4af..0000000000 --- a/.github/workflows/rocky8_build.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Build ChimeraX for Rocky 8 -on: - workflow_call: - inputs: - release_type: - type: string - required: true - branch: - type: string - required: false - secrets: - PREBUILT_CACHE_SECRET: - required: true - -jobs: - build-rocky8-docker: - name: Build ChimeraX for Rocky 8 - runs-on: ubuntu-20.04 - container: - image: rockylinux:8 - env: - SHELL: /bin/bash - PATH: /usr/bin:/usr/sbin:/bin:/sbin - steps: - - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - - run: dnf update -y - - run: dnf install -y git-all - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch || 'develop' }} - # buildinfo.py breaks without this - - run: chown -R $(id -u):$(id -g) $PWD - - run: ${PWD}/utils/set_up_centos.sh - - name: Fetch Plato prerequisites - uses: ./utils/ci/consolidated_cache - with: - platform: linux - architecture: x86_64 - cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - uses: Tiryoh/gha-jobid-action@v1 - id: get_job_id - with: - job_name: "Build ChimeraX for Rocky 8 / Build ChimeraX for Rocky 8" - - name: Note the run and job IDs on Plato - uses: ./utils/ci/nightly_logs - with: - platform: centos-8 - deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - run_id: ${{ github.run_id }} - job_id: ${{ steps.get_job_id.outputs.job_id }} - build_type: daily - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - - name: Run the legacy test suite - run: make test - - name: Install Pytest - run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov - - name: Set up the repo for coverage reporting - run: make prepare-coverage - - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent - run: USE_COVERAGE=1 make pytest-both-exes - - name: Run wheel tests - run: USE_COVERAGE=1 make pytest-wheel - - name: Run distribution tests - run: USE_COVERAGE=1 make pytest-app - - name: Report coverage - run: make report-coverage - - name: Build the Rocky 8 package - run: make -f Makefile.centos ${{ inputs.release_type }}-package - - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm - - name: Upload ChimeraX - uses: ./utils/ci/upload_artifact - with: - artifact_path: chimerax.rpm - full_build: true - release_type: ${{ inputs.release_type }} - platform: centos-8 - deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Upload documentation - uses: ./utils/ci/upload_docs - with: - deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Tar bundles and includes for other builds - run: | - export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync - tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . - tar -cvzf linux-include.tar.gz -C build include - - name: Cache the bundles and includes - uses: actions/cache/save@v4 - with: - path: | - linux-bundles.tar.gz - linux-include.tar.gz - key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index dc47c778f3..bd604156da 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -14,6 +14,7 @@ on: jobs: build-rocky9-docker: + name: Build ChimeraX for Rocky 9 runs-on: ubuntu-20.04 container: image: rockylinux:9 @@ -49,29 +50,7 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - name: Restore bundles and includes from cache - uses: actions/cache/restore@v4 - with: - path: | - linux-bundles.tar.gz - linux-include.tar.gz - key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} - - name: Unpack the bundles to build/sync - run: | - mkdir wheels - tar -xvf linux-bundles.tar.gz -C wheels - - name: Unpack the include tarball to include - run: | - tar -xvf linux-include.tar.gz - - name: Build the rest of ChimeraX - run: | - MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install - MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install - make -C src/apps/ChimeraX install BUILD_TYPE=daily - ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl - cp -rp include ChimeraX.app - make -C src/apps install BUILD_TYPE=daily - make -C docs install BUILD_TYPE=daily + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test - name: Install Pytest @@ -86,7 +65,7 @@ jobs: run: USE_COVERAGE=1 make pytest-app - name: Report coverage run: make report-coverage - - name: Make the package + - name: Build the Rocky 9 package run: make -f Makefile.centos ${{ inputs.release_type }}-package - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm - name: Upload ChimeraX @@ -97,3 +76,19 @@ jobs: release_type: ${{ inputs.release_type }} platform: centos-9 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Upload documentation + uses: ./utils/ci/upload_docs + with: + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Tar bundles and includes for other builds + run: | + export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync + tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . + tar -cvzf linux-include.tar.gz -C build include + - name: Cache the bundles and includes + uses: actions/cache/save@v4 + with: + path: | + linux-bundles.tar.gz + linux-include.tar.gz + key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index b27746d481..c37fb1e51b 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -16,7 +16,7 @@ jobs: build-ubuntu: strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-22.04, ubuntu-24.04] env: PYOPENGL_PLATFORM: egl runs-on: ${{ matrix.os }} From 6b43af732dccbf15fe9c334e8b3374bd6c742ac0 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 15:49:54 -0800 Subject: [PATCH 034/132] ci: Use the correct job name for the Rocky 9 daily build --- .github/workflows/rocky9_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index bd604156da..6e179f8b66 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -41,7 +41,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "Build ChimeraX for Rocky 9 / build-rocky9-docker" + job_name: "Build ChimeraX for Rocky 9 / Build ChimeraX for Rocky 9" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From 078bf5664a0bba02ff052d7c673456a1daa8b649 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 15:53:11 -0800 Subject: [PATCH 035/132] ci: There is no gcc-toolset-10 on Rocky 9 --- .github/workflows/check-for-changes.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 860f2bab59..d6b4d497fb 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -27,7 +27,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal + - run: MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal - name: Run the legacy test suite run: make test - name: Install Pytest diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 6e179f8b66..09f34be7db 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -50,7 +50,7 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - run: MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test - name: Install Pytest From c6ea4fd2175721c66886d7b103c5c07f17977b4e Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 15:55:34 -0800 Subject: [PATCH 036/132] ci: A job cannot actually depend on a job that no longer exists. Who knew! --- .github/workflows/nightly.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1283a2037c..9219b05bf8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,7 +7,6 @@ on: jobs: build-rocky9-docker: name: Build ChimeraX for Rocky 9 - needs: [build-rocky8-docker] uses: ./.github/workflows/rocky9_build.yml with: release_type: daily From 94a99852d19a72a5f2f0882eea2ae124f0d10108 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:00:09 -0800 Subject: [PATCH 037/132] ci: Cache PyQt 6.8.0 --- utils/ci/consolidated_cache/action.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 5998465983..b4e5b617cc 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -222,8 +222,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.7.1-1-cp38-abi3-manylinux_2_28_x86_64.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-manylinux_2_28_x86_64.whl + prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-manylinux_2_35_x86_64.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-manylinux_2_35_x86_64.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached PyQt6 and PyQt6-WebEngine (Windows) @@ -232,8 +232,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.7.1-cp38-abi3-win_amd64.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-win_amd64.whl + prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-win_amd64.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-win_amd64.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached PyQt6 and PyQt6-WebEngine (macOS) @@ -242,8 +242,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.7.1-cp38-abi3-macosx_11_0_universal2.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-macosx_10_14_universal2.whl + prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-macosx_10_14_universal2.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-macosx_10_14_universal2.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached seggerx dependency sources @@ -281,11 +281,11 @@ runs: if: ${{ steps[format('cache-pyqt6-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - export PYQT_VERSION=6.7.1-1 + export PYQT_VERSION=6.8.0 else - export PYQT_VERSION=6.7.1 + export PYQT_VERSION=6.8.0 fi - export PYQTWE_VERSION=6.7.0 + export PYQTWE_VERSION=6.8.0 export PYQT_URL="https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/get_pyqt.py?platform=${{ inputs.platform }}&version=${PYQT_VERSION}&webengine=false&architecture=${{ inputs.architecture }}" export PYQTWE_URL="https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/get_pyqt.py?platform=${{ inputs.platform }}&version=${PYQTWE_VERSION}&webengine=true&architecture=${{ inputs.architecture }}" curl -H "X-API-KEY: ${{ inputs.cache_key }}" ${PYQT_URL} -O -J From 40e373ba66b12c6a61ceb2cd5dcb357786a84720 Mon Sep 17 00:00:00 2001 From: Greg Couch Date: Thu, 19 Dec 2024 16:12:51 -0800 Subject: [PATCH 038/132] Revert "Use PyQt/Qt 6.8" This reverts commit 526dcfcfbb493d24e249e9746900c92b82552284. PyQt 6.8 doesn't work on Red Hat 8 nor 9. --- prereqs/PyQt/Makefile | 6 +++--- prereqs/PyQt/Makefile.wheel.qt6 | 22 +++++++--------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/prereqs/PyQt/Makefile b/prereqs/PyQt/Makefile index 226fed77c0..b854dcec58 100644 --- a/prereqs/PyQt/Makefile +++ b/prereqs/PyQt/Makefile @@ -10,9 +10,9 @@ PYQT_LICENSE = gpl USE_QT6 = true -BASE_VERSION = 6.8 -QT_MINOR_VERSION = 1 -PYQT_MINOR_VERSION = 0 +BASE_VERSION = 6.7 +QT_MINOR_VERSION = 3 +PYQT_MINOR_VERSION = 1 PYQTWE_MINOR_VERSION = 0 MAKE_ARGS = -f Makefile.$(METHOD) BASE_VERSION=$(BASE_VERSION) PYQT_MINOR_VERSION=$(PYQT_MINOR_VERSION) QT_MINOR_VERSION=$(QT_MINOR_VERSION) PYQTWE_MINOR_VERSION=$(PYQTWE_MINOR_VERSION) PYQT_LICENSE=$(PYQT_LICENSE) diff --git a/prereqs/PyQt/Makefile.wheel.qt6 b/prereqs/PyQt/Makefile.wheel.qt6 index dbcacd8f0c..ebd2815de4 100644 --- a/prereqs/PyQt/Makefile.wheel.qt6 +++ b/prereqs/PyQt/Makefile.wheel.qt6 @@ -9,11 +9,11 @@ REMOTE_HOST = plato.cgl.ucsf.edu: REMOTE_DIR = $(REMOTE_HOST)/usr/local/src/PyQt6 # QT_VERSION is overriden by Makefile -BASE_VERSION = 6.8 -QT_MINOR_VERSION = 1 -PYQT_MINOR_VERSION = 0 +BASE_VERSION = 6.7 +QT_MINOR_VERSION = 3 +PYQT_MINOR_VERSION = 1 ifeq ($(OS),Linux) -PYQT_REVISION = +PYQT_REVISION = 1 else PYQT_REVISION = endif @@ -36,19 +36,14 @@ SIP_VERSION = 13.8.0 ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.6.0" && echo $$?)) # PyQt version <= 6.6.0 PYTHON_TAGS = cp37 -else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) -# PyQt version < 6.8 -PYTHON_TAGS = cp38 else -PYTHON_TAGS = cp39 +PYTHON_TAGS = cp38 endif ifeq (0, $(shell sort -CV <<< "$(PYQTWE_VERSION)"$$'\n'"6.6.0" && echo $$?)) # PyQt WebEngine version <= 6.6.0 WE_PYTHON_TAGS = cp37 -else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) -WE_PYTHON_TAGS = cp38 else -WE_PYTHON_TAGS = cp39 +WE_PYTHON_TAGS = cp38 endif WHEEL_ABI = abi3 @@ -62,11 +57,8 @@ BIN_PLATFORM = linux ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.3.99" && echo $$?)) # For PyQt version < 6.4 WHEEL_PLATFORM = manylinux1_x86_64 -else ifeq (0, $(shell sort -CV <<< "$(PYQT_VERSION)"$$'\n'"6.7.99" && echo $$?)) -# For PyQt version < 6.4 -WHEEL_PLATFORM = manylinux_2_28_x86_64 else -WHEEL_PLATFORM = manylinux_2_35_x86_64 +WHEEL_PLATFORM = manylinux_2_28_x86_64 endif WE_WHEEL_PLATFORM = $(WHEEL_PLATFORM) MISSING_QTWEBENGINE_DICT = PyQt6/Qt6/libexec/qtwebengine_dictionaries From 6ec2e828e02d58878a2bd636e74e35569077c7f8 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:12:55 -0800 Subject: [PATCH 039/132] Revert "ci: Cache PyQt 6.8.0" This reverts commit 94a99852d19a72a5f2f0882eea2ae124f0d10108. --- utils/ci/consolidated_cache/action.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index b4e5b617cc..5998465983 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -222,8 +222,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-manylinux_2_35_x86_64.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-manylinux_2_35_x86_64.whl + prereqs/PyQt/PyQt6_commercial-6.7.1-1-cp38-abi3-manylinux_2_28_x86_64.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-manylinux_2_28_x86_64.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached PyQt6 and PyQt6-WebEngine (Windows) @@ -232,8 +232,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-win_amd64.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-win_amd64.whl + prereqs/PyQt/PyQt6_commercial-6.7.1-cp38-abi3-win_amd64.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-win_amd64.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached PyQt6 and PyQt6-WebEngine (macOS) @@ -242,8 +242,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/PyQt/PyQt6_commercial-6.8.0-cp39-abi3-macosx_10_14_universal2.whl - prereqs/PyQt/PyQt6_WebEngine_commercial-6.8.0-cp39-abi3-macosx_10_14_universal2.whl + prereqs/PyQt/PyQt6_commercial-6.7.1-cp38-abi3-macosx_11_0_universal2.whl + prereqs/PyQt/PyQt6_WebEngine_commercial-6.7.0-cp38-abi3-macosx_10_14_universal2.whl key: ${{ runner.os }}-${{ inputs.architecture }}-pyqt6 - name: Restore cached seggerx dependency sources @@ -281,11 +281,11 @@ runs: if: ${{ steps[format('cache-pyqt6-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - export PYQT_VERSION=6.8.0 + export PYQT_VERSION=6.7.1-1 else - export PYQT_VERSION=6.8.0 + export PYQT_VERSION=6.7.1 fi - export PYQTWE_VERSION=6.8.0 + export PYQTWE_VERSION=6.7.0 export PYQT_URL="https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/get_pyqt.py?platform=${{ inputs.platform }}&version=${PYQT_VERSION}&webengine=false&architecture=${{ inputs.architecture }}" export PYQTWE_URL="https://preview.rbvi.ucsf.edu/chimerax/cgi-bin/get_pyqt.py?platform=${{ inputs.platform }}&version=${PYQTWE_VERSION}&webengine=true&architecture=${{ inputs.architecture }}" curl -H "X-API-KEY: ${{ inputs.cache_key }}" ${PYQT_URL} -O -J From f994a65535a825c4ddbd88d57d746157f8094dea Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:12:59 -0800 Subject: [PATCH 040/132] Revert "ci: A job cannot actually depend on a job that no longer exists. Who knew!" This reverts commit c6ea4fd2175721c66886d7b103c5c07f17977b4e. --- .github/workflows/nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9219b05bf8..1283a2037c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,6 +7,7 @@ on: jobs: build-rocky9-docker: name: Build ChimeraX for Rocky 9 + needs: [build-rocky8-docker] uses: ./.github/workflows/rocky9_build.yml with: release_type: daily From 3806faeb35e554493bbc8d1d8db43841668b6950 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:13:01 -0800 Subject: [PATCH 041/132] Revert "ci: There is no gcc-toolset-10 on Rocky 9" This reverts commit 078bf5664a0bba02ff052d7c673456a1daa8b649. --- .github/workflows/check-for-changes.yml | 2 +- .github/workflows/rocky9_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index d6b4d497fb..860f2bab59 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -27,7 +27,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - run: MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal - name: Run the legacy test suite run: make test - name: Install Pytest diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 09f34be7db..6e179f8b66 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -50,7 +50,7 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test - name: Install Pytest From 6382e4b66e0a93eba75882c0d4652076d431a72b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:13:03 -0800 Subject: [PATCH 042/132] Revert "ci: Use the correct job name for the Rocky 9 daily build" This reverts commit 6b43af732dccbf15fe9c334e8b3374bd6c742ac0. --- .github/workflows/rocky9_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 6e179f8b66..bd604156da 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -41,7 +41,7 @@ jobs: - uses: Tiryoh/gha-jobid-action@v1 id: get_job_id with: - job_name: "Build ChimeraX for Rocky 9 / Build ChimeraX for Rocky 9" + job_name: "Build ChimeraX for Rocky 9 / build-rocky9-docker" - name: Note the run and job IDs on Plato uses: ./utils/ci/nightly_logs with: From 3ae59d06466257b09ca3f8e6457a496fabe4cba4 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 16:13:33 -0800 Subject: [PATCH 043/132] Revert "ci!: Make Rocky 9 the common linux build environment" This reverts commit a70b0e0bd527ec6e526567abee33cad50bf0de0c. --- .github/workflows/check-for-changes.yml | 7 +- .github/workflows/nightly.yml | 10 ++- .github/workflows/rocky8_build.yml | 93 +++++++++++++++++++++++++ .github/workflows/rocky9_build.yml | 43 +++++++----- .github/workflows/ubuntu_build.yml | 2 +- 5 files changed, 129 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/rocky8_build.yml diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 860f2bab59..94dd573b86 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -5,14 +5,13 @@ on: branches: [develop, release/*] jobs: - build-and-test-rocky9-docker: - runs-on: ubuntu-22.04 + build-and-test-rocky8-docker: + runs-on: ubuntu-20.04 container: - image: rockylinux:9 + image: rockylinux:8 env: SHELL: /bin/bash PATH: /usr/bin:/usr/sbin:/bin:/sbin - PYOPENGL_PLATFORM: egl steps: - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - run: dnf update -y diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1283a2037c..9ed8feb965 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,6 +5,12 @@ on: - cron: "0 7 * * *" # 7AM UTC / 11PM PST / 12AM PDT jobs: + build-rocky8-docker: + name: Build ChimeraX for Rocky 8 + uses: ./.github/workflows/rocky8_build.yml + with: + release_type: daily + secrets: inherit build-rocky9-docker: name: Build ChimeraX for Rocky 9 needs: [build-rocky8-docker] @@ -14,14 +20,14 @@ jobs: secrets: inherit build-ubuntu: name: Build ChimeraX for Ubuntu - needs: [build-rocky9-docker] + needs: [build-rocky8-docker] uses: ./.github/workflows/ubuntu_build.yml with: release_type: daily secrets: inherit build-flatpak: name: Build ChimeraX FlatPak - needs: [build-rocky9-docker] + needs: [build-rocky8-docker] uses: ./.github/workflows/flatpak_build.yml with: release_type: daily diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml new file mode 100644 index 0000000000..eeb447f4af --- /dev/null +++ b/.github/workflows/rocky8_build.yml @@ -0,0 +1,93 @@ +name: Build ChimeraX for Rocky 8 +on: + workflow_call: + inputs: + release_type: + type: string + required: true + branch: + type: string + required: false + secrets: + PREBUILT_CACHE_SECRET: + required: true + +jobs: + build-rocky8-docker: + name: Build ChimeraX for Rocky 8 + runs-on: ubuntu-20.04 + container: + image: rockylinux:8 + env: + SHELL: /bin/bash + PATH: /usr/bin:/usr/sbin:/bin:/sbin + steps: + - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + - run: dnf update -y + - run: dnf install -y git-all + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch || 'develop' }} + # buildinfo.py breaks without this + - run: chown -R $(id -u):$(id -g) $PWD + - run: ${PWD}/utils/set_up_centos.sh + - name: Fetch Plato prerequisites + uses: ./utils/ci/consolidated_cache + with: + platform: linux + architecture: x86_64 + cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Tiryoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: "Build ChimeraX for Rocky 8 / Build ChimeraX for Rocky 8" + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: centos-8 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ steps.get_job_id.outputs.job_id }} + build_type: daily + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - name: Run the legacy test suite + run: make test + - name: Install Pytest + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + - name: Set up the repo for coverage reporting + run: make prepare-coverage + - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent + run: USE_COVERAGE=1 make pytest-both-exes + - name: Run wheel tests + run: USE_COVERAGE=1 make pytest-wheel + - name: Run distribution tests + run: USE_COVERAGE=1 make pytest-app + - name: Report coverage + run: make report-coverage + - name: Build the Rocky 8 package + run: make -f Makefile.centos ${{ inputs.release_type }}-package + - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm + - name: Upload ChimeraX + uses: ./utils/ci/upload_artifact + with: + artifact_path: chimerax.rpm + full_build: true + release_type: ${{ inputs.release_type }} + platform: centos-8 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Upload documentation + uses: ./utils/ci/upload_docs + with: + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Tar bundles and includes for other builds + run: | + export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync + tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . + tar -cvzf linux-include.tar.gz -C build include + - name: Cache the bundles and includes + uses: actions/cache/save@v4 + with: + path: | + linux-bundles.tar.gz + linux-include.tar.gz + key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index bd604156da..dc47c778f3 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -14,7 +14,6 @@ on: jobs: build-rocky9-docker: - name: Build ChimeraX for Rocky 9 runs-on: ubuntu-20.04 container: image: rockylinux:9 @@ -50,7 +49,29 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - name: Restore bundles and includes from cache + uses: actions/cache/restore@v4 + with: + path: | + linux-bundles.tar.gz + linux-include.tar.gz + key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} + - name: Unpack the bundles to build/sync + run: | + mkdir wheels + tar -xvf linux-bundles.tar.gz -C wheels + - name: Unpack the include tarball to include + run: | + tar -xvf linux-include.tar.gz + - name: Build the rest of ChimeraX + run: | + MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install + MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install + make -C src/apps/ChimeraX install BUILD_TYPE=daily + ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl + cp -rp include ChimeraX.app + make -C src/apps install BUILD_TYPE=daily + make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest @@ -65,7 +86,7 @@ jobs: run: USE_COVERAGE=1 make pytest-app - name: Report coverage run: make report-coverage - - name: Build the Rocky 9 package + - name: Make the package run: make -f Makefile.centos ${{ inputs.release_type }}-package - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm - name: Upload ChimeraX @@ -76,19 +97,3 @@ jobs: release_type: ${{ inputs.release_type }} platform: centos-9 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Upload documentation - uses: ./utils/ci/upload_docs - with: - deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Tar bundles and includes for other builds - run: | - export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync - tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . - tar -cvzf linux-include.tar.gz -C build include - - name: Cache the bundles and includes - uses: actions/cache/save@v4 - with: - path: | - linux-bundles.tar.gz - linux-include.tar.gz - key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index c37fb1e51b..b27746d481 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -16,7 +16,7 @@ jobs: build-ubuntu: strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] env: PYOPENGL_PLATFORM: egl runs-on: ${{ matrix.os }} From dfa6acf58b72a52f50798c5655d362d605e920c0 Mon Sep 17 00:00:00 2001 From: Elaine Meng Date: Thu, 19 Dec 2024 20:05:03 -0800 Subject: [PATCH 044/132] cite Roca paper in Profile Grid description --- docs/user/tools/profilegrid.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/user/tools/profilegrid.html b/docs/user/tools/profilegrid.html index 9ed9d1a7b5..306f6b0751 100644 --- a/docs/user/tools/profilegrid.html +++ b/docs/user/tools/profilegrid.html @@ -55,11 +55,23 @@

Tool: Profile Grid

in which the rows are the possible sequence characters (residue one-letter codes and gap), the columns are positions in the alignment (as in the standard view of a sequence alignment), and the values -in the cells are percentages of that type of residue at that position, +in the cells are the prevalences of that type of residue at that position. +

+Profile Grid is a reimplementation of the viewer developed +by Alberto Roca, as described in: +

+
+ +ProfileGrids: a sequence alignment visualization paradigm that avoids the limitations of Sequence Logos. +Roca AI. BMC Proc. 2014 Aug 28;8(Suppl 2 Proceedings of the +3rd Annual Symposium on Biologica):S6. +
+

+The values in the ChimeraX Profile Grid are percentages rounded to the nearest integer. A blank cell means that no sequences at all have that residue type at that position, whereas a displayed value of 0 means that some do, but <0.5%. -

Much like the Sequence Viewer, the Profile Grid tool interacts with any associated structures, and it From 12eb2d8efc050ef11f4a8e5d52272ba72cded9ef Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Thu, 19 Dec 2024 20:55:31 -0800 Subject: [PATCH 045/132] feat(qtshim): Add PySide6 support to the Qt shim --- prereqs/qtshim/Qt/QtCore.py | 7 +++- prereqs/qtshim/Qt/QtGui.py | 5 ++- prereqs/qtshim/Qt/QtMultimedia.py | 5 ++- prereqs/qtshim/Qt/QtNetwork.py | 5 ++- prereqs/qtshim/Qt/QtWebEngineCore.py | 5 ++- prereqs/qtshim/Qt/QtWebEngineWidgets.py | 5 ++- prereqs/qtshim/Qt/QtWidgets.py | 6 +++- prereqs/qtshim/Qt/__init__.py | 43 ++++++++++++++++++++----- 8 files changed, 66 insertions(+), 15 deletions(-) diff --git a/prereqs/qtshim/Qt/QtCore.py b/prereqs/qtshim/Qt/QtCore.py index e22ef65b8f..d35f6fb056 100644 --- a/prereqs/qtshim/Qt/QtCore.py +++ b/prereqs/qtshim/Qt/QtCore.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtCore import * @@ -30,3 +30,8 @@ from PySide2.QtCore import * import PySide2.QtCore __version__ = PySide2.QtCore.__version__ + +elif using_pyside6: + from PySide6.QtCore import * + import PySide6.QtCore + __version__ = PySide6.QtCore.__version__ diff --git a/prereqs/qtshim/Qt/QtGui.py b/prereqs/qtshim/Qt/QtGui.py index f984459ec6..265ea43fb4 100644 --- a/prereqs/qtshim/Qt/QtGui.py +++ b/prereqs/qtshim/Qt/QtGui.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtGui import * @@ -18,3 +18,6 @@ from PySide2.QtGui import * # Add QAction, QShortcut to match the location in Qt 6. from PySide2.QtWidgets import QAction, QShortcut + +elif using_pyside6: + from PySide6.QtGui import * diff --git a/prereqs/qtshim/Qt/QtMultimedia.py b/prereqs/qtshim/Qt/QtMultimedia.py index 99c6d25db2..3ea653c3e3 100644 --- a/prereqs/qtshim/Qt/QtMultimedia.py +++ b/prereqs/qtshim/Qt/QtMultimedia.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtMultimedia import * @@ -8,3 +8,6 @@ elif using_pyside2: from PySide2.QtMultimedia import * + +elif using_pyside6: + from PySide6.QtMultimedia import * diff --git a/prereqs/qtshim/Qt/QtNetwork.py b/prereqs/qtshim/Qt/QtNetwork.py index 8a91b2dbf2..d467cb0e3a 100644 --- a/prereqs/qtshim/Qt/QtNetwork.py +++ b/prereqs/qtshim/Qt/QtNetwork.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtNetwork import * @@ -14,3 +14,6 @@ elif using_pyside2: from PySide2.QtNetwork import * + +elif using_pyside6: + from PySide6.QtNetwork import * diff --git a/prereqs/qtshim/Qt/QtWebEngineCore.py b/prereqs/qtshim/Qt/QtWebEngineCore.py index b532d48300..00a513ea59 100644 --- a/prereqs/qtshim/Qt/QtWebEngineCore.py +++ b/prereqs/qtshim/Qt/QtWebEngineCore.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtWebEngineCore import * @@ -16,3 +16,6 @@ from PySide2.QtWebEngineCore import * # Match the location of QWebEnginePage, QWebEngineProfile in Qt 6. from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineProfile + +elif using_pyside6: + from PySide6.QtWebEngineCore import * diff --git a/prereqs/qtshim/Qt/QtWebEngineWidgets.py b/prereqs/qtshim/Qt/QtWebEngineWidgets.py index 5293b7829c..53206fead8 100644 --- a/prereqs/qtshim/Qt/QtWebEngineWidgets.py +++ b/prereqs/qtshim/Qt/QtWebEngineWidgets.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtWebEngineWidgets import * @@ -8,3 +8,6 @@ elif using_pyside2: from PySide2.QtWebEngineWidgets import * + +elif using_pyside6: + from PySide6.QtWebEngineWidgets import * diff --git a/prereqs/qtshim/Qt/QtWidgets.py b/prereqs/qtshim/Qt/QtWidgets.py index a77b43e010..d9942b1efd 100644 --- a/prereqs/qtshim/Qt/QtWidgets.py +++ b/prereqs/qtshim/Qt/QtWidgets.py @@ -1,4 +1,4 @@ -from . import using_pyqt6, using_pyqt5, using_pyside2 +from . import using_pyqt6, using_pyqt5, using_pyside2, using_pyside6 if using_pyqt6: from PyQt6.QtWidgets import * @@ -17,3 +17,7 @@ elif using_pyside2: from PySide2.QtWidgets import * + +elif using_pyside6: + from PySide6.QtWidgets import * + from PySide6.QtGui import QAction, QShortcut diff --git a/prereqs/qtshim/Qt/__init__.py b/prereqs/qtshim/Qt/__init__.py index 19d06f1ffa..3f67a0d37d 100644 --- a/prereqs/qtshim/Qt/__init__.py +++ b/prereqs/qtshim/Qt/__init__.py @@ -5,7 +5,7 @@ # All rights reserved. This software provided pursuant to a # license agreement containing restrictions on its disclosure, # duplication and use. For details see: -# https://www.rbvi.ucsf.edu/chimerax/docs/licensing.html +# http://www.rbvi.ucsf.edu/chimerax/docs/licensing.html # This notice must be embedded in or attached to all copies, # including partial copies, of the software or any revisions # or derivations thereof. @@ -41,7 +41,7 @@ """ # Choose between PyQt5 and PySide2 -using_pyqt6 = using_pyqt5 = using_pyside2 = False +using_pyqt6 = using_pyqt5 = using_pyside2 = using_pyside6 = False using_qt5 = using_qt6 = False try: import PyQt6 @@ -49,13 +49,18 @@ using_qt6 = True except ImportError: try: - import PyQt5 - using_pyqt5 = True - using_qt5 = True + import PySide6 + using_pyside6 = True + using_qt6 = True except ImportError: - import PySide2 - using_pyside2 = True - using_qt5 = True + try: + import PyQt5 + using_pyqt5 = True + using_qt5 = True + except ImportError: + import PySide2 + using_pyside2 = True + using_qt5 = True import enum qt_enum_as_int = lambda val: val if isinstance(val, int) else val.value @@ -107,6 +112,21 @@ def qt_image_bytes(qimage): # PySide2 wants ints, not enums qt_enum_from_int = lambda enum_class, val: val.value if isinstance(val, enum.Enum) else val +if using_pyside6: + from PySide6 import __version__ as PYSIDE6_VERSION + from PySide6.QtCore import __version__ as QT_VERSION + version = 'PySide6 %s, Qt %s' % (PYSIDE6_VERSION, QT_VERSION) + + def qt_object_is_deleted(object): + '''Return whether a C++ Qt QObject has been deleted.''' + import shiboken6 + return not shiboken6.isValid(object) + + def qt_image_bytes(qimage): + return qimage.bits().tobytes() + + qt_enum_from_int = lambda enum_class, val: val.value if isinstance(val, enum.Enum) else val + def qt_have_web_engine(): try: from . import QtWebEngineWidgets @@ -114,3 +134,10 @@ def qt_have_web_engine(): return False return True +def qt_delete(object): + if using_pyqt6: + import PyQt6.sip + PyQt6.sip.delete(object) + elif using_pyside6: + import shiboken6 + shiboken6.delete(object) From d391269c9328c058c106951d38dff208cf39bb46 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 20 Dec 2024 12:08:07 -0800 Subject: [PATCH 046/132] Don't run a command (which can fire triggers) in a delete() call [#16506] --- src/bundles/color_key/bundle_info.xml | 2 +- src/bundles/color_key/src/tool.py | 20 ++++---------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/bundles/color_key/bundle_info.xml b/src/bundles/color_key/bundle_info.xml index 3e1d78aa33..e798c8b365 100644 --- a/src/bundles/color_key/bundle_info.xml +++ b/src/bundles/color_key/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/color_key/src/tool.py b/src/bundles/color_key/src/tool.py index 9bc7990be2..2b00da1644 100644 --- a/src/bundles/color_key/src/tool.py +++ b/src/bundles/color_key/src/tool.py @@ -215,26 +215,14 @@ class NumLabelSpacingOption(EnumOption): tw.manage(placement=None) def delete(self): + for handler in self.handlers: + handler.remove() if self._mouse_handler: button = self.mouse_button_button.text() - if self._prev_mouse_mode: - new_mode = self._prev_mouse_mode.name - else: - new_mode = 'none' self._self_mm_change = True - cmd = "ui mousemode %s %s" % (button, StringArg.unparse(new_mode)) - if self.session.restore_options: - # delay running command until end of restore [#16296] - def reset_mousemode(trig_name, session, *, cmd=cmd): - run(session, cmd) - from chimerax.core.triggerset import DEREGISTER - return DEREGISTER - self.session.triggers.add_handler("end restore session", reset_mousemode) - else: - run(self.session, cmd) + # Running a command in a delete() call, which can fire triggers, is asking for trouble so... + self.session.ui.mouse_modes.bind_mouse_mode(button, [], self._prev_mouse_mode) self._self_mm_change = False - for handler in self.handlers: - handler.remove() self.key = None super().delete() From 88171818f8d4019c57a6b00a89cd819da19176f2 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 20 Dec 2024 12:08:07 -0800 Subject: [PATCH 047/132] Don't run a command (which can fire triggers) in a delete() call [#16506] --- src/bundles/color_key/bundle_info.xml | 2 +- src/bundles/color_key/src/tool.py | 20 ++++---------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/bundles/color_key/bundle_info.xml b/src/bundles/color_key/bundle_info.xml index 3e1d78aa33..e798c8b365 100644 --- a/src/bundles/color_key/bundle_info.xml +++ b/src/bundles/color_key/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/color_key/src/tool.py b/src/bundles/color_key/src/tool.py index 9bc7990be2..2b00da1644 100644 --- a/src/bundles/color_key/src/tool.py +++ b/src/bundles/color_key/src/tool.py @@ -215,26 +215,14 @@ class NumLabelSpacingOption(EnumOption): tw.manage(placement=None) def delete(self): + for handler in self.handlers: + handler.remove() if self._mouse_handler: button = self.mouse_button_button.text() - if self._prev_mouse_mode: - new_mode = self._prev_mouse_mode.name - else: - new_mode = 'none' self._self_mm_change = True - cmd = "ui mousemode %s %s" % (button, StringArg.unparse(new_mode)) - if self.session.restore_options: - # delay running command until end of restore [#16296] - def reset_mousemode(trig_name, session, *, cmd=cmd): - run(session, cmd) - from chimerax.core.triggerset import DEREGISTER - return DEREGISTER - self.session.triggers.add_handler("end restore session", reset_mousemode) - else: - run(self.session, cmd) + # Running a command in a delete() call, which can fire triggers, is asking for trouble so... + self.session.ui.mouse_modes.bind_mouse_mode(button, [], self._prev_mouse_mode) self._self_mm_change = False - for handler in self.handlers: - handler.remove() self.key = None super().delete() From 2bd063d7fd419d30e6dcb62399017ff723e8b1c1 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:12:51 -0800 Subject: [PATCH 048/132] fix(segmentations): Use a function from the Qt shim instead of direct PyQt calls --- src/bundles/segmentations/src/view/ui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bundles/segmentations/src/view/ui.py b/src/bundles/segmentations/src/view/ui.py index 7410aa6f77..5f4316aa9f 100644 --- a/src/bundles/segmentations/src/view/ui.py +++ b/src/bundles/segmentations/src/view/ui.py @@ -1,5 +1,5 @@ from chimerax.segmentations.ui.orthoplanes import PlaneViewer, PlaneViewerManager, Axis -import PyQt6.sip +from Qt import qt_delete from Qt.QtCore import Qt from Qt.QtWidgets import ( QWidget, @@ -94,7 +94,7 @@ def _convert_to_over_under(self): self._clean_fourup() elif self._view_layout == "overunder": self._clean_side_by_side() - PyQt6.sip.delete(self.layout()) + qt_delete(self.layout()) self._construct_over_under() self._view_layout = "overunder" @@ -103,13 +103,13 @@ def _convert_to_side_by_side(self): self._clean_fourup() elif self._view_layout == "overunder": self._clean_over_under() - PyQt6.sip.delete(self.layout()) + qt_delete(self.layout()) self._construct_side_by_side() self._view_layout = "sidebyside" def _convert_to_fourup(self): self._clean_side_by_side() - PyQt6.sip.delete(self.layout()) + qt_delete(self.layout()) self._construct_fourup() self._view_layout = "fourup" From 78248bf6c918ad82ca4450112378a1bbc607ea3b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:41:09 -0800 Subject: [PATCH 049/132] fix(qtshim): Bump the shim to 1.1 to reflect the addition of qt_delete --- prereqs/qtshim/Makefile | 2 +- prereqs/qtshim/pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/prereqs/qtshim/Makefile b/prereqs/qtshim/Makefile index 04d859bc8c..f1d4680db2 100644 --- a/prereqs/qtshim/Makefile +++ b/prereqs/qtshim/Makefile @@ -14,7 +14,7 @@ upload_new_version: clean wheel $(RSYNC) dist/qtshim*.whl $(PREREQS_UPLOAD)/qt/ wheel: - python -m build . + python3 -m build . clean: rm -rf *.egg-info build dist diff --git a/prereqs/qtshim/pyproject.toml b/prereqs/qtshim/pyproject.toml index 3f942661dd..37b49797c9 100644 --- a/prereqs/qtshim/pyproject.toml +++ b/prereqs/qtshim/pyproject.toml @@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta" [project] name = "qtshim" -version = "1.0" +version = "1.1" license = { text = "Free for non-commercial use" } -authors= [{name = "UCSF RBVI", email="chimerax@cgl.ucsf.edu"}] +authors = [{ name = "UCSF RBVI", email = "chimerax@cgl.ucsf.edu" }] description = "Qt shim that handles PyQt5/6 and PySide2/6" dependencies = [] @@ -16,7 +16,7 @@ pyqt6 = ["PyQt6", "PyQt6-WebEngine"] [project.readme] content-type = "text" text = """Qt shim that handles PyQt5/6 and PySide2/6""" - + [project.urls] Home = "https://www.rbvi.ucsf.edu/chimerax/" From dc81b55bea42b91da6294c0907af43224b2d3b75 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:42:14 -0800 Subject: [PATCH 050/132] build: Use version 1.1 of the qtshim --- prereqs/pips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 7d364a0ac8..8490e7ad15 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -23,7 +23,7 @@ CXSERVICES_DEPLOYMENT_VER ?= production # tcia_utils.patch: Fix needless import of x86_64 zmq on macOS, see Trac#8638 # Remove if tcia_utils removes those imports PATCHES = tcia_utils.patch tcia_utils_metadata.patch -QTSHIM_WHEEL = qtshim-1.0-py3-none-any.whl +QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl ifeq ($(OS),Windows) From 5c65f48a5fd2b4aebb12382391b3dd15b9acf367 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:35:41 -0800 Subject: [PATCH 051/132] build: Use an actual wildcard in Makefile.bundle to get all Python versions --- src/bundles/Makefile.bundle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundles/Makefile.bundle b/src/bundles/Makefile.bundle index 5d77a63211..eaea4fa1ce 100644 --- a/src/bundles/Makefile.bundle +++ b/src/bundles/Makefile.bundle @@ -42,12 +42,12 @@ CX_BIN = $(CHIMERAX_APP)/bin/ChimeraX-console.exe PYMOD_EXT = pyd endif ifeq ($(OS),Darwin) -APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/Contents/bin/python3.11) +APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/Contents/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/Contents/bin/ChimeraX PYMOD_EXT = so endif ifeq ($(OS),Linux) -APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python3.11) +APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/bin/chimerax PYMOD_EXT = so endif From cce8387f7d39d666b963d9ac43b88f9e9ba0c17c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:10:36 -0800 Subject: [PATCH 052/132] build: Set Python version to 3.13.1 --- mk/config.make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/config.make b/mk/config.make index ee3f939fff..a1b4717884 100644 --- a/mk/config.make +++ b/mk/config.make @@ -30,8 +30,8 @@ all: # version numbers that leak out of prerequisites -PYTHON_VERSION = 3.11 -PYTHON_PATCH_VERSION = 4 +PYTHON_VERSION = 3.13 +PYTHON_PATCH_VERSION = 1 ifndef DEBUG # Starting with Python 3.8 the ABI "m" has been dropped. From f9596a94aaeb942dbe220807e6523678e28a341a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:13:57 -0800 Subject: [PATCH 053/132] build: There's no macOS 10.9 Python 3.13.1 --- prereqs/Python/Makefile.macos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/Python/Makefile.macos b/prereqs/Python/Makefile.macos index 4d976d5339..445c9a4501 100644 --- a/prereqs/Python/Makefile.macos +++ b/prereqs/Python/Makefile.macos @@ -25,7 +25,7 @@ include $(TOP)/mk/config.make PYTHON_PATCH_LEVEL = $(PYTHON_VERSION).$(PYTHON_PATCH_VERSION) DISTRIBUTION = python-$(PYTHON_PATCH_LEVEL)-mac.tar.bz2 -MACOS_VER = 10.9 +MACOS_VER = 11 all : $(DISTRIBUTION) From ca4bc2b01feaa02b0f897609fa9885b86d17121b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 12:21:51 -0800 Subject: [PATCH 054/132] build: Update pips for Python 3.13 --- prereqs/pips/Makefile | 36 +++---------------------------- prereqs/pips/app_requirements.txt | 8 +++---- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 8490e7ad15..50ed6c1719 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -16,7 +16,6 @@ WHEEL_CFLAGS ?= # On macOS, only the x86_64 version of Cython is available from pypi. # So we install the same version on arm64, but from source. -CYTHON_VERSION = $(shell grep Cython= app_requirements.txt | sed -e 's/ ;.*//' -e 's/.*=//') CXSERVICES_VER = 1.2.3 CXSERVICES_DEPLOYMENT_VER ?= production @@ -26,33 +25,8 @@ PATCHES = tcia_utils.patch tcia_utils_metadata.patch QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl -ifeq ($(OS),Windows) -TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-win_amd64.whl -else -ifeq ($(OS),Linux) -ifeq ($(OSARCH),LinuxArm64) -TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-linux_aarch64.whl -else -TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -endif -else -ifeq ($(OS),Darwin) -WHEEL_CFLAGS="-Wno-error=int-conversion" -TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl -ifeq ($(OSARCH),DarwinArm64) -CYTHON_WHEEL = Cython-$(CYTHON_VERSION)-cp311-cp311-macosx_10_9_universal2.whl -else -ifeq ($(OSARCH),DarwinIntel64) -endif -endif -endif -endif -endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(TINYARRAY_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) -ifeq ($(OSARCH),DarwinArm64) -PLATO_WHEELS += $(CYTHON_WHEEL) -endif +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) all: @@ -69,6 +43,8 @@ upgrade: app-install: $(PLATO_WHEELS) # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) + # Install Cython second because source packages will complain otherwise + $(APP_PIP_INSTALL) $(shell grep Cython app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) LANG=$(LANG) $(PIP_INSTALL) --no-build-isolation --no-binary $(subst $(SPACE),$(COMMA),$(SOURCE_WHEELS)) $(SOURCE_VERSIONS) @@ -135,12 +111,6 @@ src-outdated: $(GRAKO_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/grako/$(GRAKO_WHEEL) -$(TINYARRAY_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tinyarray/$(TINYARRAY_WHEEL) - -$(CYTHON_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/cython/$(CYTHON_WHEEL) - $(CXSERVICES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/cxservices/cxservices-$(CXSERVICES_VER)-$(CXSERVICES_DEPLOYMENT_VER)-py3-none-any.whl mv cxservices-$(CXSERVICES_VER)-$(CXSERVICES_DEPLOYMENT_VER)-py3-none-any.whl $(CXSERVICES_WHEEL) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 0384640623..49653b86fb 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -10,12 +10,12 @@ appdirs==1.4.4 beautifulsoup4==4.12.3 build==1.2.1 colorama==0.4.6 -Cython==3.0.10 ; platform_machine != 'arm64' +Cython==3.0.10 filelock==3.15.4 # grako==3.16.5 # See the Makefile; need patched Grako for 3.11 html2text==2024.2.26 ihm==1.3 -imagecodecs==2024.6.1 +imagecodecs==2024.9.22 ipykernel==6.29.5 # if ipython updated, make sure autocompletion still works (e.g. "mi" becomes min) and if not then # try a newer version of jedi @@ -53,14 +53,14 @@ python-dateutil==2.9.0.post0 #PySide2==5.15.2 qtconsole==5.5.2 requests==2.32.3 -scipy==1.14.0 +scipy==1.14.1 six==1.16.0 sortedcontainers==2.4.0 # Used by the DICOM bundle for a double-ended QSlider superqt==0.6.3 tables==3.10.1 tifffile==2024.7.24 -# tinyarray==1.2.4 # 3.11 requires getting this from Plato +tinyarray==1.2.4 webcolors==24.6.0 wheel-filename==1.4.1 # From fbe7f5138d40ab2557349cb19456d196cf177c8e Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:34:14 -0800 Subject: [PATCH 055/132] build: Use the PyPi version of OpenMM --- prereqs/Makefile | 2 +- prereqs/openmm/Makefile | 95 ------------------- prereqs/openmm/OpenMM-Windows-plugins.patch | 24 ----- prereqs/openmm/README.txt | 41 -------- .../openmm/openmm_linux_compile/README.txt | 6 -- prereqs/openmm/openmm_linux_compile/build.sh | 91 ------------------ .../centos-7-devtoolset-9-cuda.def | 73 -------------- prereqs/openmm/openmm_linux_compile/run.sh | 2 - prereqs/pips/app_requirements.txt | 1 + 9 files changed, 2 insertions(+), 333 deletions(-) delete mode 100644 prereqs/openmm/Makefile delete mode 100644 prereqs/openmm/OpenMM-Windows-plugins.patch delete mode 100644 prereqs/openmm/README.txt delete mode 100644 prereqs/openmm/openmm_linux_compile/README.txt delete mode 100755 prereqs/openmm/openmm_linux_compile/build.sh delete mode 100644 prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def delete mode 100755 prereqs/openmm/openmm_linux_compile/run.sh diff --git a/prereqs/Makefile b/prereqs/Makefile index 304f1b007b..a3f0ef6d61 100644 --- a/prereqs/Makefile +++ b/prereqs/Makefile @@ -56,7 +56,7 @@ endif .NOTPARALLEL: # keep in alphabetical order, dependencies go below -SUBDIRS += ambertools openmm pips PyQt Python +SUBDIRS += ambertools pips PyQt Python # All needed subdirectories must be set by now. diff --git a/prereqs/openmm/Makefile b/prereqs/openmm/Makefile deleted file mode 100644 index 2d26534e0e..0000000000 --- a/prereqs/openmm/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -PREREQ_MAKE = 1 -TOP = ../.. -include $(TOP)/mk/config.make - -# Using OpenMM builds from https://anaconda.org/conda-forge/openmm/files -VERSION = 8.0.0 - -ifeq ($(OS),Darwin) -PLATFORM = mac -ifeq ($(MACOS_ARCH),arm64) -DISTRIBUTION = openmm-8.0.0-mac-py311h68ae2cc_1_apple.tar.bz2 -else -DISTRIBUTION = openmm-8.0.0-mac-py311hf4819f2_1_apple.tar.bz2 -endif -# Tristan Croll provided these optional Mac Metal libraries used with OpenMM platform HIP -MAC_METAL_PLUGIN = openmm-8.0.0-mac-metal.tar.bz2 -endif -ifeq ($(OS),Linux) -PLATFORM = linux -# The Linux distribution comes from Tristan Croll -# compiled Oct 31, 2022 with the same compiler as ChimeraX. -# Using CUDA 11.2 -DISTRIBUTION = openmm-8.0.0-linux-py311_cuda112.tar.bz2 -endif -ifeq ($(OS),Windows) -PLATFORM = windows -# Using CUDA 11.2 -DISTRIBUTION = openmm-8.0.0-win-py311h9957787_1.tar.bz2 -endif - -SOURCE = $(tmpdir)/OpenMM-$(VERSION)-$(PLATFORM) -OPENMM_LIB_INSTALL = $(libdir)/openmm - -# Beware the Windows OpenMM has the Python code in a different location -# than Mac and Linux, so one patch for OpenMM Python code won't find the -# Python file on all 3 platforms. Also the Windows Python has /r/n DOS -# line endings and patches expecting /n line endings will fail. -# Probably easiest to make a separate Windows patch. -PATCHES = $(wildcard OpenMM-$(OS)-*.patch) - -ifeq ($(OS),Windows) - -install: $(SOURCE) - cd $(SOURCE) ; \ - $(RSYNC) Lib/site-packages/openmm $(PYSITEDIR) ; \ - $(RSYNC) Library/lib/ --exclude site-packages $(OPENMM_LIB_INSTALL) - -else - -install: $(SOURCE) - cd $(SOURCE) ; \ - $(RSYNC) lib/python$(PYTHON_VERSION)/site-packages/openmm $(PYSITEDIR) ; \ - $(RSYNC) lib/ --exclude python$(PYTHON_VERSION) $(OPENMM_LIB_INSTALL) - -endif - -app-install: install - $(RSYNC) $(OPENMM_LIB_INSTALL)/* $(app_shlibdir) - $(RSYNC) $(PYSITEDIR)/openmm $(APP_PYSITEDIR) -ifeq ($(OS),Windows) - cd $(app_shlibdir); mv OpenMM*.lib libs/ -endif - -$(SOURCE): $(DISTRIBUTION) $(MAC_METAL_PLUGIN) - -mkdir $(SOURCE) - tar xf $(DISTRIBUTION) -C $(SOURCE) --no-same-owner -ifneq (,$(PATCHES)) - for p in $(PATCHES); do \ - (cd $(SOURCE) && patch -f -p0) < $$p ; \ - done -endif -ifeq ($(OS),Windows) - cd $(SOURCE)/Lib ; \ - chmod a+x site-packages/openmm/*.pyd ; \ - chmod a+x site-packages/openmm/app/internal/*.pyd - cd $(SOURCE)/Library/lib ; \ - chmod a+x *dll *.lib plugins/*.dll plugins/*.lib -endif -ifeq ($(OS),Darwin) - tar xf $(MAC_METAL_PLUGIN) -C $(SOURCE)/lib/plugins -endif - -$(DISTRIBUTION): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/openmm/$(DISTRIBUTION) - -ifeq ($(OS),Darwin) -$(MAC_METAL_PLUGIN): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/openmm/$(MAC_METAL_PLUGIN) -endif - -upload_new_version: - $(RSYNC) $(DISTRIBUTION) $(MAC_METAL_PLUGIN) $(PREREQS_UPLOAD)/openmm - -clean: - rm -rf $(SOURCE) $(DISTRIBUTION) diff --git a/prereqs/openmm/OpenMM-Windows-plugins.patch b/prereqs/openmm/OpenMM-Windows-plugins.patch deleted file mode 100644 index b34981bca5..0000000000 --- a/prereqs/openmm/OpenMM-Windows-plugins.patch +++ /dev/null @@ -1,24 +0,0 @@ -*** Lib/site-packages/openmm/__init__.py~ Wed May 10 16:58:02 2017 ---- Lib/site-packages/openmm/__init__.py Fri May 12 16:54:05 2017 -*************** -*** 24,30 **** - if os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path): - pluginLoadedLibNames = Platform.loadPluginsFromDirectory(os.path.join(version.openmm_library_path, 'plugins')) - else: -! pluginLoadedLibNames = Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory()) - - if sys.platform == 'win32': - os.environ['PATH'] = _path ---- 24,35 ---- - if os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path): - pluginLoadedLibNames = Platform.loadPluginsFromDirectory(os.path.join(version.openmm_library_path, 'plugins')) - else: -! # Assume that openmm is installed in LIB/site-packages -! # and plugins are in LIB/plugins. We are in -! # site-packages/openmm -! import os.path -! pluginDir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "plugins") -! pluginLoadedLibNames = Platform.loadPluginsFromDirectory(pluginDir) - - if sys.platform == 'win32': - os.environ['PATH'] = _path diff --git a/prereqs/openmm/README.txt b/prereqs/openmm/README.txt deleted file mode 100644 index 46a41c20d1..0000000000 --- a/prereqs/openmm/README.txt +++ /dev/null @@ -1,41 +0,0 @@ -Build notes for OpenMM ----------------------- - -The 7.6 builds came from https://anaconda.org/conda-forge/openmm/files -The linux build comes from Tristan Croll using the compiler used by ChimeraX. - -On Linux, we need OpenMM built with the same C++ compiler as the rest -of ChimeraX so that ISOLDE can link to both ChimeraX and OpenMM libraries. -At this time, that is CentOS 7 with devtoolset-9. And it is -devtoolset-9 so OpenMM can use newer C++ constructs. See ticket #3756. -In the openmm_build3.zip file with a build script and a singularity -definition file that is used to create the .tar.gz file. And that -.tar.gz is placed on the chimerax web site for downloading. - -Old Build notes for OpenMM --------------------------- - -On Mac, Linux and Windows using the OpenMM builds from -https://anaconda.org/omnia/openmm/files -- Version: 7.3.0 Label: main. - -The files are renamed from PLATFORM/openmm-VERSION-PYVER.tar.bz2 to - openemm-VERSION-PLATFORM-PYVER.tar.bz where PLATFORM changes - { win-64: windows, osx-64: mac, linux-64: linux } - -Even Older Build notes for OpenMM ---------------------------------- - -Formerly used the OpenMM 7.0.1 binary installers on Mac and Linux that -include precompiled C++ libraries. The SWIG Python wrapper is compiled by -the install.sh script on our machine. The C++ ABI used by our compiler -must match the ABI used in the OpenMM C++ libraries. Specifically on -Linux the OpenMM libraries use a G++ version 4.9(?) compiler and G++ -5.x uses a different ABI. - -On Windows the OpenMM 7.0.1 binary installers only support Python 3.3 and -3.4 and use Visual Studio 10 while we use Visual Studio Community 2015 -(not sure if these have compatible ABIs). So instead we use the OpenMM -conda install on Windows for Python 3.5 and copy the resulting binaries -to a tar file to use in our builds. These will need to be updated when -we update to Python 3.6. - diff --git a/prereqs/openmm/openmm_linux_compile/README.txt b/prereqs/openmm/openmm_linux_compile/README.txt deleted file mode 100644 index f89bb297c3..0000000000 --- a/prereqs/openmm/openmm_linux_compile/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -These scripts provided by Tristan Croll to compile OpenMM using a CentOS 7 Docker Singularity image -using a C++ compiler compatible with the ChimeraX distribution compiler. This allows ISOLDE -to link to both OpenMM and ChimeraX atomic_lib using the same C++ compiler. - -These scripts were provided in ChimeraX ticket #3756 and the compiled build was provided -in ticket #4661. diff --git a/prereqs/openmm/openmm_linux_compile/build.sh b/prereqs/openmm/openmm_linux_compile/build.sh deleted file mode 100755 index 6fa6c78219..0000000000 --- a/prereqs/openmm/openmm_linux_compile/build.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -set -e - -cd /tmp -git clone https://github.com/openmm/openmm.git -cd openmm -git checkout 7.5_branch -cd .. - - -# CFLAGS -export MINIMAL_CFLAGS="-g -O3" -export CFLAGS="$MINIMAL_CFLAGS" -export CXXFLAGS="$MINIMAL_CFLAGS" -export LDFLAGS="$LDPATHFLAGS" - -INSTALL=`pwd`/install -if [ -e $INSTALL ]; then - rm -rf $INSTALL -fi - -CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL" - -# Don't build tests -CMAKE_FLAGS+=" -DBUILD_TESTING=OFF" - -# Ensure we build a release -CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Release" - -# setting the rpath so that libOpenMMPME.so finds the right libfftw3 -#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.." -# Use NVIDIA CUDA -CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so" -CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/nvcc" -CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda/" -CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda/include" -CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/" -# So that FindCuda correctly finds libcuda.os -CMAKE_FLAGS+=" -DCMAKE_LIBRARY_PATH=/usr/local/cuda/compat/" -echo "CMAKE_FLAGS = $CMAKE_FLAGS" -# Use AMD APP SDK 3.0 -#CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/" -CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so" -# Generate API docs -CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON" -# Set location for FFTW3 -CMAKE_FLAGS+=" -DFFTW_INCLUDES=/usr/include" -CMAKE_FLAGS+=" -DFFTW_LIBRARY=/usr/lib64/libfftw3f.so" -CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=/usr/lib64/libfftw3f_threads.so" -# Necessary to find GL headers -# CMAKE_FLAGS+=" -DCMAKE_CXX_FLAGS_RELEASE=-I/usr/include/nvidia/" - -if [ -e build ]; then - rm -rf build -fi -mkdir build -cd build -cmake3 ../openmm $CMAKE_FLAGS -make -j12 all install - -export CFLAGS="$MINIMAL_CFLAGS" - -export CXXFLAGS="$MINIMAL_CFLAGS" -export LDFLAGS="$LDPATHFLAGS" - -make -j20 PythonInstall - -make install - -export OPENMM_INCLUDE_PATH=$INSTALL/include -export OPENMM_LIB_PATH=$INSTALL/lib -PYTHON_VER=$(python3 -c 'import sys; print("%s.%s" % sys.version_info[0:2])') -(cd python && python3 setup.py install --install-lib $INSTALL/lib/python${PYTHON_VER}/site-packages) -find $INSTALL/lib -name \*.so -exec chrpath -d {} \; - -cd .. - -(cd install/lib && for so in plugins/*.so; do ln -s $so .; done && strip *.so) - -OPENMM_VER=$(python3 -c 'vtxt = open("build/python/simtk/openmm/version.py").read(); exec(vtxt); print(short_version)') -PYTHON_VER_NODOT=$(python3 -c 'import sys; print("%s%s" % sys.version_info[0:2])') -CUDA_VER=$(nvcc --version | awk '$4 == "release" {print $5}' | sed 's/[,.]//g') -TAR_FILE=openmm-${OPENMM_VER}-linux-py${PYTHON_VER_NODOT}_cuda${CUDA_VER}_1.tar.bz2 -tar -jcf ${TAR_FILE} -C install . - -cp ${TAR_FILE} /host -cd /tmp -rm -fr openmm -rm -fr build -rm -fr $INSTALL - diff --git a/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def b/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def deleted file mode 100644 index e1c2a53136..0000000000 --- a/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def +++ /dev/null @@ -1,73 +0,0 @@ -Bootstrap: docker -From: nvidia/cuda:11.2.1-devel-centos7 - -%setup - # Runs on host. The path to the image is $SINGULARITY_ROOTFS - -%post - # Post setup, runs inside the image - - #Host directory mount point - mkdir /host - - #Add CUDA paths - echo "\n #Cuda paths \n" >> /environment - echo 'export CPATH="/usr/local/cuda/include:$CPATH"' >> /environment - echo 'export PATH="/usr/local/cuda/bin:$PATH"' >> /environment - echo 'export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"' >> /environment - echo 'export CUDA_HOME="/usr/local/cuda"' >> /environment - - # for Python source install - for some reason /usr/local/lib isn't on the library path by default - echo 'export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"' >> /environment - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" - # install dependencies - - yum install -y centos-release-scl epel-release - yum groupinstall -y "Development Tools" - # OpenMM requires swig3 and cmake3. Remove the old versions installed by the group install - yum remove -y swig cmake - yum install -y \ - devtoolset-9 \ - swig3 \ - cmake3 \ - wget \ - bzip2 bzip2-devel\ - chrpath \ - git \ - doxygen \ - fftw-devel -# rh-python39 rh-python39-python-devel rh-python39-python-pip \ -# rh-python39-python-numpy rh-python39-python-Cython rh-python39-python-wheel \ -# Python 3.9 not yet available as rh package. Need to build from source - -# scl enable rh-python39 "pip install sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake" - - yum -y install gcc openssl-devel libffi-devel - - wget https://github.com/python/cpython/archive/refs/tags/v3.9.6.tar.gz - tar xvf v3.9.6.tar.gz - cd cpython-3.9.6 - ./configure --enable-shared --with-ensurepip=install - make -j20 - make install - - cd .. - - pip3 install lxml numpy Cython - - - - - -%runscript - #Executes when the "singularity run" command is used - #Useful when you want the container to run as an executable - - - scl enable devtoolset-9 /host/build.sh - - -%test - #Test script to verify that the image is built and running correctly - - diff --git a/prereqs/openmm/openmm_linux_compile/run.sh b/prereqs/openmm/openmm_linux_compile/run.sh deleted file mode 100755 index 0a98cda74e..0000000000 --- a/prereqs/openmm/openmm_linux_compile/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -singularity run --fakeroot --bind .:/host centos-7-devtoolset-9-py39-cuda-openmm.sif diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 49653b86fb..c4194aac42 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -33,6 +33,7 @@ netCDF4==1.6.5 networkx==3.3 numpy==1.26.4 openvr==1.26.701 +openmm==8.2.0 packaging==23.2 # as per Tristan's request in ticket #3055 ParmEd==4.2.2 From b86cefd379642d481d408b723d9effc369d683f3 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:47:22 -0800 Subject: [PATCH 056/132] build: Make sure the arm64 ChimeraX has a binary Cython --- prereqs/pips/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 50ed6c1719..f2625ba86f 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -28,6 +28,12 @@ GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) +ifeq ($(OSARCH),DarwinArm64) +CYTHON_BUILD_ARGS= --no-binary :all: +else +CYTHON_BUILD_ARGS= +endif + all: install: @@ -44,7 +50,8 @@ app-install: $(PLATO_WHEELS) # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) # Install Cython second because source packages will complain otherwise - $(APP_PIP_INSTALL) $(shell grep Cython app_requirements.txt) + $(APP_PIP_INSTALL) $(CYTHON_BUILD_ARGS) $(shell grep Cython app_requirements.txt) + $(APP_PIP_INSTALL) $(shell grep lz4 app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) LANG=$(LANG) $(PIP_INSTALL) --no-build-isolation --no-binary $(subst $(SPACE),$(COMMA),$(SOURCE_WHEELS)) $(SOURCE_VERSIONS) From 8a4806c82e29823d0d90b375c5247d974a4c7c41 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:53:02 -0800 Subject: [PATCH 057/132] build: Use numpy 2.0 --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index c4194aac42..6fcb0b2e1b 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -31,7 +31,7 @@ msgpack==1.0.8 nibabel == 5.2.0 netCDF4==1.6.5 networkx==3.3 -numpy==1.26.4 +numpy==2.2.0 openvr==1.26.701 openmm==8.2.0 packaging==23.2 From 10794ffe826e089a5d656434abdec2f724ad5de1 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:55:13 -0800 Subject: [PATCH 058/132] build: Use gcc-toolset-11 on Rocky 8 --- .github/workflows/rocky8_build.yml | 2 +- utils/centos/8.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index eeb447f4af..137f6ede30 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -49,7 +49,7 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - run: source /opt/rh/gcc-toolset-11/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test - name: Install Pytest diff --git a/utils/centos/8.txt b/utils/centos/8.txt index 1f915e6ac9..91eaba4990 100644 --- a/utils/centos/8.txt +++ b/utils/centos/8.txt @@ -13,10 +13,10 @@ freetype git gcc gcc-c++ -gcc-toolset-10 -gcc-toolset-10-binutils-devel -gcc-toolset-10-elfutils-devel -gcc-toolset-10-valgrind-devel +gcc-toolset-11 +gcc-toolset-11-binutils-devel +gcc-toolset-11-elfutils-devel +gcc-toolset-11-valgrind-devel gdk-pixbuf2 glib2 glibc From c3261e7f3b0c03e919f78c83aef20d429c3cdcca Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:56:20 -0800 Subject: [PATCH 059/132] build: Use netcdf4 >1.7 --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 6fcb0b2e1b..43ebc64196 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -29,7 +29,7 @@ lz4==4.3.3 matplotlib==3.9.2 msgpack==1.0.8 nibabel == 5.2.0 -netCDF4==1.6.5 +netCDF4==1.7.2 networkx==3.3 numpy==2.2.0 openvr==1.26.701 From 0e7eef9763a06dbde3b7027c052693c13b3e8a29 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 13:58:57 -0800 Subject: [PATCH 060/132] ci: You have to use toolset 11 in both workflows --- .github/workflows/check-for-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 94dd573b86..85d9c1160d 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -26,7 +26,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal + - run: source /opt/rh/gcc-toolset-11/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal - name: Run the legacy test suite run: make test - name: Install Pytest From 199611a1424131bd7463c570f6206e5df9dad0e4 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 20 Dec 2024 14:12:40 -0800 Subject: [PATCH 061/132] Hopefully better info when 'pip install pyKVFinfer' fails --- src/bundles/kvfinder/bundle_info.xml | 2 +- src/bundles/kvfinder/src/__init__.py | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/bundles/kvfinder/bundle_info.xml b/src/bundles/kvfinder/bundle_info.xml index 40cff4fb42..d529b05aa3 100644 --- a/src/bundles/kvfinder/bundle_info.xml +++ b/src/bundles/kvfinder/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/kvfinder/src/__init__.py b/src/bundles/kvfinder/src/__init__.py index 7e98195f1d..b3381fd3cf 100644 --- a/src/bundles/kvfinder/src/__init__.py +++ b/src/bundles/kvfinder/src/__init__.py @@ -33,15 +33,13 @@ def get_class(class_name): @staticmethod def register_command(command_name, logger): - if not check_pyKVFinder(logger): - return + check_pyKVFinder(logger) from . import cmd cmd.register_command(command_name, logger) @staticmethod def start_tool(session, tool_name): - if not check_pyKVFinder(session.logger): - return + check_pyKVFinder(session.logger) from .tool import LaunchKVFinderTool return LaunchKVFinderTool(session, tool_name) @@ -52,11 +50,11 @@ def check_pyKVFinder(logger): from chimerax.core.commands import run logger.status("pyKVFinder module not installed; fetching from PyPi repository...", log=True) try: - run(logger.session, "pip install pyKVFinder", log=False) - except Exception: - logger.report_exception(preface="Could not install pyKVFinder module from PyPi repository") - return False + pip_cmd = "pip install pyKVFinder" + run(logger.session, pip_cmd, log=False) + except (PermissionError, RuntimeError) as e: + logger.info("'%s' failed. Error from pip: %s" % (pip_cmd, str(e))) + raise logger.status("pyKVFinder module installed from PyPi repository.", log=True) - return True bundle_api = _KVFinderBundle() From bbf0a8164d659150f20d6766f1a65bdd4de7be55 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 20 Dec 2024 14:12:40 -0800 Subject: [PATCH 062/132] Hopefully better info when 'pip install pyKVFinfer' fails --- src/bundles/kvfinder/bundle_info.xml | 2 +- src/bundles/kvfinder/src/__init__.py | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/bundles/kvfinder/bundle_info.xml b/src/bundles/kvfinder/bundle_info.xml index 40cff4fb42..d529b05aa3 100644 --- a/src/bundles/kvfinder/bundle_info.xml +++ b/src/bundles/kvfinder/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/kvfinder/src/__init__.py b/src/bundles/kvfinder/src/__init__.py index 7e98195f1d..b3381fd3cf 100644 --- a/src/bundles/kvfinder/src/__init__.py +++ b/src/bundles/kvfinder/src/__init__.py @@ -33,15 +33,13 @@ def get_class(class_name): @staticmethod def register_command(command_name, logger): - if not check_pyKVFinder(logger): - return + check_pyKVFinder(logger) from . import cmd cmd.register_command(command_name, logger) @staticmethod def start_tool(session, tool_name): - if not check_pyKVFinder(session.logger): - return + check_pyKVFinder(session.logger) from .tool import LaunchKVFinderTool return LaunchKVFinderTool(session, tool_name) @@ -52,11 +50,11 @@ def check_pyKVFinder(logger): from chimerax.core.commands import run logger.status("pyKVFinder module not installed; fetching from PyPi repository...", log=True) try: - run(logger.session, "pip install pyKVFinder", log=False) - except Exception: - logger.report_exception(preface="Could not install pyKVFinder module from PyPi repository") - return False + pip_cmd = "pip install pyKVFinder" + run(logger.session, pip_cmd, log=False) + except (PermissionError, RuntimeError) as e: + logger.info("'%s' failed. Error from pip: %s" % (pip_cmd, str(e))) + raise logger.status("pyKVFinder module installed from PyPi repository.", log=True) - return True bundle_api = _KVFinderBundle() From 48109ffee3b282796165fdef2029e4b9a2475c30 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 14:55:21 -0800 Subject: [PATCH 063/132] build: No need to mangle setup.py on Linux Python 3.13 --- prereqs/Python/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prereqs/Python/Makefile b/prereqs/Python/Makefile index 5abfaefbed..ab58c62a0a 100644 --- a/prereqs/Python/Makefile +++ b/prereqs/Python/Makefile @@ -215,10 +215,11 @@ ifdef USE_MAC_FRAMEWORKS -e /HAVE_CLOCK_SETTIME/d \ < pyconfig.h.old > pyconfig.h endif + # No longer necessary with Python 3.13 -- it's missing setup.py # Don't use stuff from /usr/local (especially Tcl, Tk, and SSL) - cd $(SOURCE) && \ - mv setup.py setup.py.orig ; \ - sed -e 's;/usr/local;$(build_prefix);' -e 's;/ssl/;/;' < setup.py.orig > setup.py + # cd $(SOURCE) && \ + # mv setup.py setup.py.orig ; \ + # sed -e 's;/usr/local;$(build_prefix);' -e 's;/ssl/;/;' < setup.py.orig > setup.py ifdef USE_MAC_FRAMEWORKS # say where to find Tcl and Tk (and any other frameworks) (echo ':/framework_dirs =/s:$$: "$(frameworkdir)",:'; echo ':wq') \ From 0c101d834abb4c718b97666d55d9b24304483263 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 15:16:13 -0800 Subject: [PATCH 064/132] build: Use lxml 5.3 --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 43ebc64196..dca2891b6c 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -24,7 +24,7 @@ ipython==8.26.0 jedi==0.19.1 jupyter-client==8.6.2 line_profiler==4.1.3 -lxml==5.2.2 +lxml==5.3.0 lz4==4.3.3 matplotlib==3.9.2 msgpack==1.0.8 From 4dec07ba3ec9e9b15341618cd6a0bd6a19aaaa31 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 16:04:41 -0800 Subject: [PATCH 065/132] build: Temporarily disable pyopengl-accelerate --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index dca2891b6c..29437a21a6 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -47,7 +47,7 @@ pynrrd==1.0.0 pyopenxr==1.0.3401 tcia_utils==1.5.1 PyOpenGL==3.1.7 -PyOpenGL-accelerate==3.1.7 +# PyOpenGL-accelerate==3.1.7 python-dateutil==2.9.0.post0 # PyQt handled in prereqs/PyQt # sip handled in prereqs/PyQt From 8149f51370568d3b1e5ae244b408388847ee4aad Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 16:27:33 -0800 Subject: [PATCH 066/132] build: Give bundle builder the same numpy requirement as ChimeraX --- src/bundles/bundle_builder/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/bundle_builder/pyproject.toml b/src/bundles/bundle_builder/pyproject.toml index 23324df863..f6ace6985a 100644 --- a/src/bundles/bundle_builder/pyproject.toml +++ b/src/bundles/bundle_builder/pyproject.toml @@ -8,7 +8,7 @@ description = "Bundle building utilities" # one line synopsis authors = [{ name = "UCSF RBVI", email = "chimerax@cgl.ucsf.edu" }] dependencies = [ 'tomli; python_version < "3.11"', - 'numpy==1.26.4', + 'numpy==2.2.0', 'setuptools==72.1.0', 'lxml==5.2.2', 'auditwheel>=6.1.0', From 5836c89bb3a503f74534517d8e46e9a5fa787030 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 16:39:25 -0800 Subject: [PATCH 067/132] build: Give bundle builder ChimeraX's lxml version too --- src/bundles/bundle_builder/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/bundle_builder/pyproject.toml b/src/bundles/bundle_builder/pyproject.toml index f6ace6985a..863ab50f3d 100644 --- a/src/bundles/bundle_builder/pyproject.toml +++ b/src/bundles/bundle_builder/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ 'tomli; python_version < "3.11"', 'numpy==2.2.0', 'setuptools==72.1.0', - 'lxml==5.2.2', + 'lxml==5.3.0', 'auditwheel>=6.1.0', ] classifiers = [ From 79e9ea9ae30a6a38d3d4751ec2535946fa6090a0 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 16:47:19 -0800 Subject: [PATCH 068/132] build: prereqs/pips/Makefile was missing QTSHIM_WHEEL --- prereqs/pips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index f2625ba86f..eaebfdb049 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -26,7 +26,7 @@ QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) ifeq ($(OSARCH),DarwinArm64) CYTHON_BUILD_ARGS= --no-binary :all: From 4a3a83a0b93c258e0df1ea8280503a63b18264a8 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 17:07:41 -0800 Subject: [PATCH 069/132] build: Reenable PyOpenGL_accelerate with a Plato wheel --- prereqs/pips/Makefile | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index eaebfdb049..d89d80b2f8 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -26,14 +26,35 @@ QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) - ifeq ($(OSARCH),DarwinArm64) CYTHON_BUILD_ARGS= --no-binary :all: else CYTHON_BUILD_ARGS= endif +ifeq ($(OS),Windows) +ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl +else +ifeq ($(OS),Linux) +ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl +ifeq ($(OSARCH),LinuxArm64) +else +ACCELERATE_WHEEL = +endif +else +ifeq ($(OS),Darwin) +WHEEL_CFLAGS="-Wno-error=int-conversion" +ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl +ifeq ($(OSARCH),DarwinArm64) +else +ifeq ($(OSARCH),DarwinIntel64) +endif +endif +endif +endif + +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) + all: install: @@ -47,10 +68,10 @@ app-list: upgrade: app-install: $(PLATO_WHEELS) - # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler - $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) - # Install Cython second because source packages will complain otherwise + # Install Cython first because source packages will complain otherwise $(APP_PIP_INSTALL) $(CYTHON_BUILD_ARGS) $(shell grep Cython app_requirements.txt) + # Install numpy second so that PyOpenGL_Accelerate will compile numpy_formathandler + $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) $(APP_PIP_INSTALL) $(shell grep lz4 app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) @@ -115,6 +136,9 @@ app-outdated: src-outdated: $(PYTHON_EXE) -m package_checker ../../src +$(ACCELERATE_WHEEL): + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) + $(GRAKO_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/grako/$(GRAKO_WHEEL) From 4abb20c3aada129748cac14a3b40498c174765a3 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 17:14:34 -0800 Subject: [PATCH 070/132] build: Fix mismatched ifeq/endif in pips Makefile --- prereqs/pips/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index d89d80b2f8..bd98afd342 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -38,17 +38,12 @@ else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl ifeq ($(OSARCH),LinuxArm64) -else ACCELERATE_WHEEL = endif else ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl -ifeq ($(OSARCH),DarwinArm64) -else -ifeq ($(OSARCH),DarwinIntel64) -endif endif endif endif From 98ac8ffaf620aca2bfb4f6de9cab5afee227b61e Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 17:31:51 -0800 Subject: [PATCH 071/132] fix(core): bool8 doesn't exist as an alias to bool_ anymore in numpy --- src/bundles/core/src/_serial_python.py | 2 +- src/bundles/core/src/_serialize.pyx | 2 +- src/bundles/core/src/serialize.py | 2 +- src/bundles/core/src/state.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bundles/core/src/_serial_python.py b/src/bundles/core/src/_serial_python.py index ceada90c91..6197ed57ef 100644 --- a/src/bundles/core/src/_serial_python.py +++ b/src/bundles/core/src/_serial_python.py @@ -196,7 +196,7 @@ def _encode_ext(obj): return ExtType(8, packer.pack([obj.days, obj.seconds, obj.microseconds])) if isinstance(obj, Image.Image): return ExtType(9, _encode_image(obj)) - if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): + if isinstance(obj, (numpy.number, numpy.bool_)): # handle numpy scalar subclasses return ExtType(10, packer.pack(_encode_numpy_number(obj))) if isinstance(obj, FinalizedState): diff --git a/src/bundles/core/src/_serialize.pyx b/src/bundles/core/src/_serialize.pyx index 1dcb7d5bf2..5f43e00021 100644 --- a/src/bundles/core/src/_serialize.pyx +++ b/src/bundles/core/src/_serialize.pyx @@ -55,7 +55,7 @@ PRIMITIVE_TYPES = frozenset(( bool, int, float, bytes, bytearray, str, dict, list, memoryview, type(None), # additionally supported types complex, tuple, range, _UniqueName, - numpy.ndarray, numpy.number, numpy.bool_, numpy.bool8, + numpy.ndarray, numpy.number, numpy.bool_, set, frozenset, deque, OrderedDict, datetime, timedelta, timezone, Image.Image, FinalizedState, diff --git a/src/bundles/core/src/serialize.py b/src/bundles/core/src/serialize.py index 46c8b4b361..662b5c8647 100644 --- a/src/bundles/core/src/serialize.py +++ b/src/bundles/core/src/serialize.py @@ -152,7 +152,7 @@ def _count_object_types(obj): if isinstance(obj, numpy.ndarray): _object_counts[numpy.ndarray] += 1 return - if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): + if isinstance(obj, (numpy.number, numpy.bool_)): _object_counts[numpy.number] += 1 return t = type(obj) diff --git a/src/bundles/core/src/state.py b/src/bundles/core/src/state.py index 5a4e657d28..2733eda446 100644 --- a/src/bundles/core/src/state.py +++ b/src/bundles/core/src/state.py @@ -157,7 +157,6 @@ def numpy_numbers(): except Exception: pass yield numpy.bool_ - yield numpy.bool8 _final_primitives = ( type(None), From 7d3b8d63270f4c411aa5fd5e93b2478cb7fbcd79 Mon Sep 17 00:00:00 2001 From: Greg Couch Date: Fri, 20 Dec 2024 17:36:12 -0800 Subject: [PATCH 072/132] Use system's libtheora. --- mkcentos.py | 2 ++ mkubuntu.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/mkcentos.py b/mkcentos.py index 9462c0d2a5..6157fec47b 100644 --- a/mkcentos.py +++ b/mkcentos.py @@ -120,6 +120,7 @@ "libglvnd-egl": None, "libglvnd-glx": None, "libstdc++": None, + "libtheora": None, "libuuid": None, "libwayland-client": None, "libwayland-cursor": None, @@ -181,6 +182,7 @@ "libglvnd-egl": None, "libglvnd-glx": None, "libstdc++": None, + "libtheora": None, "libuuid": None, "libwayland-client": None, "libwayland-cursor": None, diff --git a/mkubuntu.py b/mkubuntu.py index c1d0eebb20..db5fdd7e00 100755 --- a/mkubuntu.py +++ b/mkubuntu.py @@ -184,6 +184,7 @@ "libsqlite3-0": "3.31.1", "libssl1.1": "1.1.1f", "libstdc++6": "10-20200411", + "libtheora": None, "libtinfo6": "6.2", "libuuid1": "2.34", "libwayland-client0": "1.18.0", @@ -254,6 +255,7 @@ "libsqlite3-0": "3.31.1", "libssl3": "3.0.2", "libstdc++6": "10-20200411", + "libtheora": None, "libtinfo6": "6.2", "libuuid1": "2.34", "libwayland-client0": "1.18.0", @@ -324,6 +326,7 @@ "libsqlite3-0": "3.31.1", "libssl3": "3.0.2", "libstdc++6": "10-20200411", + "libtheora": None, "libtinfo6": "6.2", "libuuid1": "2.34", "libwayland-client0": "1.18.0", From 26377d6b846b832acba864cc4b56f59157b73262 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Wed, 18 Dec 2024 21:42:52 -0800 Subject: [PATCH 073/132] Commit the changes so far so that I can continue work at UC tomorrow --- src/examples/tutorials/tut_cmd/src/cmd.py | 48 +++++++++++++++++------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/src/examples/tutorials/tut_cmd/src/cmd.py b/src/examples/tutorials/tut_cmd/src/cmd.py index fd1fa949fc..31d5e228ac 100644 --- a/src/examples/tutorials/tut_cmd/src/cmd.py +++ b/src/examples/tutorials/tut_cmd/src/cmd.py @@ -14,7 +14,7 @@ # ========================================================================== -def cofm(session, atoms, weighted=False, transformed=True): +def cofm(session, atoms, *, weighted=False, transformed=True): """Report center of mass of given atoms.""" # ``session`` - ``chimerax.core.session.Session`` instance @@ -28,10 +28,42 @@ def cofm(session, atoms, weighted=False, transformed=True): cofm_desc = CmdDesc(required=[("atoms", Or(AtomsArg, EmptyArg))], - optional=[("weighted", BoolArg), + keyword=[("weighted", BoolArg), ("transformed", BoolArg)]) -# CmdDesc contains the command description. +# CmdDesc contains a description of how the user-typed command arguments +# should be translated into Python arguments for the function that actually +# implements the command. There are three styles: +# required: the user must provide such arguments and the Python function +# should declare them as mandatory (i.e. with no default value) +# optional: the user can optionally provide these arguments, immediately +# after the mandatory arguments, and in the same order as declared +# in the Python function, which should provide default values for them +# keyword: the user must provide a keyword to specify these arguments, but +# they can be in any order after the required and optional arguments. +# The Python function normally declares them after a '*,' (which +# indicates the start of mandatory keyword arguments) +# +# Most commands should only use required and keyword arguments. Optional +# arguments should be used in the rare case that an argument's meaning is +# obvious from its position, and it is acceptable for the argument to be +# missing. For instance, the ChimeraX 'torsion' command requires an atom +# spec specifying four atoms as its first argument, but accepts an optional +# floating point value as a second argument. If only the first argumeht is +# given, the torsion angle value is reported. If both arguments are given, +# then the torsion angle is set to that value. +# +# The required/optional/keyword descriptions are passed as keyword arguments +# to the ``CmdDesc`` constructor. Each set of descriptions is passed as a +# list of 2-tuples. The first element of the tuple must match the name +# of a parameter of the callback function. The second element must be a class +# describing the expected input; ChimeraX provides many such classes, +# e.g., BoolArg for boolean values, IntArg for integer values, etc. +# The order of tuples is important for required arguments as the user +# must enter them in that order. +#TODO: The order is irrelevant for optional +# arguments since they are identified by keywords. + # For the "cofm" command, we expect three arguments: # ``atoms`` - collection of atoms (required), default: all atoms # ``weighted`` - boolean (optional), default: False @@ -48,16 +80,6 @@ def cofm(session, atoms, weighted=False, transformed=True): # tut cofm weighted t (weighted cofm of all atoms) # tut cofm :23 trans false (cofm of input coordinates of residue 23) # -# The required and optional arguments are passed as keyword arguments to -# the ``CmdDesc`` constructor. Each set of arguments is passed as a -# list of 2-tuples. The first element of the tuple must match the name -# of a parameter of callback function. The second element must be a class -# describing the expected input; ChimeraX provides many such classes, -# e.g., BoolArg for boolean values, IntArg for integer values, etc. -# The order of tuples is important for require arguments as the user -# must enter them in that order. The order is irrelevant for optional -# arguments since they are identified by keywords. -# # Note the trick used for the "atoms" argument, which may be left out to # mean "use all atoms". If we make "atoms" an optional argument, the user # would have to enter "tut cofm atoms /A" rather than "tut cofm /A". From 2b7b250339460d7797bee586f7d858b09547d1c2 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 20 Dec 2024 17:57:23 -0800 Subject: [PATCH 074/132] Update add-a-command tutorial to prefer keyword to optional arguments, and discuss the difference. Also updated some of the code to use more modern ChimeraX techniques. --- docs/devel/tutorials/tutorial_command.rst | 28 ++++++------ src/examples/tutorials/tut_cmd/src/cmd.py | 56 ++++++++++------------- 2 files changed, 38 insertions(+), 46 deletions(-) diff --git a/docs/devel/tutorials/tutorial_command.rst b/docs/devel/tutorials/tutorial_command.rst index 511b626a87..72272e0a63 100644 --- a/docs/devel/tutorials/tutorial_command.rst +++ b/docs/devel/tutorials/tutorial_command.rst @@ -209,14 +209,14 @@ the array of atoms, their coordinates, and their center of mass by calling :py:func:`_get_cofm`. It then #. computes the distances from each atom to the center of mass - using Numpy (line 88), + using Numpy (line 104), #. sorts the atom indices by distances so that indices of atoms that are closer to the center of mass are towards the front of the sort result (:code:`argsort(distances)`), and select the first - :code:`count` indices (line 94), -#. turn the array of indices into an array of atoms (line 97), + :code:`count` indices (line 110), +#. turn the array of indices into an array of atoms (line 113), and -#. finally, set the color of the selected atoms (line 101). +#. finally, set the color of the selected atoms (line 117). The :py:attr:`colors` attribute of the atomic array is an Nx4 array of integers, where N is the number of atoms and the rows (of 4 elements) are the RGBA values for each atom. @@ -242,21 +242,19 @@ calling :py:func:`_get_cofm`. It then If the user did not choose specific atoms (when :code:`atoms` is :code:`None`), the usual ChimeraX interpretation is that all -atoms should be used (lines 123-125). -:py:func:`chimerax.core.commands.atomspec.all_objects` returns -an instance of `chimerax.core.objects.Object` that contains -all open models in the current ChimeraX session, and whose -:py:attr:`atoms` attribute is an array of atoms in the included +atoms should be used (lines 139-141). +:py:func:`chimerax.atomic.structure.all_atoms` returns +an array of atoms from all open models. Transformed and untransformed coordinates are accessed using the :py:attr:`scene_coords` and :py:attr:`coords` attributes -of the atom array, respectively (lines 132-135). If atomic mass +of the atom array, respectively (lines 148-151). If atomic mass need not be included, the "center of mass" is simply the average -of the coordinates (line 141); if a weighted calculation is required, +of the coordinates (line 157); if a weighted calculation is required, (a) the atomic masses are retrieved by :code:`atoms.elements.masses` -(line 143), +(line 159), (b) the coordinates are scaled by the corresponding atomic masses -(line 144), and -(c) the weighted average is computed (line 145). +(line 160), and +(c) the weighted average is computed (line 161). For performance, ChimeraX makes use of `NumPy`_ arrays in many contexts. The container for atoms is typically a @@ -264,7 +262,7 @@ The container for atoms is typically a instance, as are those for bonds, residues, and atomic structures. Fetching the same attribute, e.g., coordinates, from a collection of molecular data, e.g., atoms, usually results in a NumPy array. -Although code involving NumPy arrays are sometimes opaque, they are +Although code involving NumPy arrays is sometimes opaque, they are typically much more efficient than using Python loops. .. _command help: diff --git a/src/examples/tutorials/tut_cmd/src/cmd.py b/src/examples/tutorials/tut_cmd/src/cmd.py index 31d5e228ac..ab5e149aad 100644 --- a/src/examples/tutorials/tut_cmd/src/cmd.py +++ b/src/examples/tutorials/tut_cmd/src/cmd.py @@ -35,14 +35,14 @@ def cofm(session, atoms, *, weighted=False, transformed=True): # should be translated into Python arguments for the function that actually # implements the command. There are three styles: # required: the user must provide such arguments and the Python function -# should declare them as mandatory (i.e. with no default value) -# optional: the user can optionally provide these arguments, immediately -# after the mandatory arguments, and in the same order as declared -# in the Python function, which should provide default values for them +# should declare them as mandatory (i.e. with no default value). +# optional: the user can optionally provide these arguments immediately +# after the mandatory arguments. The Python function should provide +# default values for them. # keyword: the user must provide a keyword to specify these arguments, but # they can be in any order after the required and optional arguments. # The Python function normally declares them after a '*,' (which -# indicates the start of mandatory keyword arguments) +# indicates the start of Python keyword-only arguments) # # Most commands should only use required and keyword arguments. Optional # arguments should be used in the rare case that an argument's meaning is @@ -55,25 +55,19 @@ def cofm(session, atoms, *, weighted=False, transformed=True): # # The required/optional/keyword descriptions are passed as keyword arguments # to the ``CmdDesc`` constructor. Each set of descriptions is passed as a -# list of 2-tuples. The first element of the tuple must match the name -# of a parameter of the callback function. The second element must be a class -# describing the expected input; ChimeraX provides many such classes, -# e.g., BoolArg for boolean values, IntArg for integer values, etc. -# The order of tuples is important for required arguments as the user -# must enter them in that order. -#TODO: The order is irrelevant for optional -# arguments since they are identified by keywords. - -# For the "cofm" command, we expect three arguments: +# list of 2-tuples. The first element of the tuple must match the name of a +# parameter of the callback function. The second element must be a class +# describing the expected input; ChimeraX provides many such classes, e.g., +# BoolArg for boolean values, IntArg for integer values, etc. The order of +# the 2-tuples in the required and optional lists determine the order that +# the user must provide those arguments to the command. That need not be the +# same order as the arguments of the callback function, though it is typically +# good programming practice to have the orders the same. + +# For the "cofm" command, we declare three arguments: # ``atoms`` - collection of atoms (required), default: all atoms -# ``weighted`` - boolean (optional), default: False -# ``transformed`` - boolean (optional), default: True -# ChimeraX expects the command syntax to be something like: -# command_name req1 req2 [opt1_keyword opt1 value] [opt2_keyword opt2_value] -# where reqX is the value for a required argument, and optX_keyword and -# optX_value are the keyword and value for an optional argument. -# Required arguments are listed in the order expected. Optional arguments -# appear after required arguments but may be in any order. +# ``weighted`` - boolean (keyword), default: False +# ``transformed`` - boolean (keyword), default: True # # Example commands: # tut cofm /A (cofm of chain A) @@ -81,18 +75,18 @@ def cofm(session, atoms, *, weighted=False, transformed=True): # tut cofm :23 trans false (cofm of input coordinates of residue 23) # # Note the trick used for the "atoms" argument, which may be left out to -# mean "use all atoms". If we make "atoms" an optional argument, the user +# mean "use all atoms". If we make "atoms" a keyword argument, the user # would have to enter "tut cofm atoms /A" rather than "tut cofm /A". -# The trick is to make "atoms" required, so the input does not need to -# include the "atoms" keyword; the value for "atoms" can be either an -# AtomsArg or an EmptyArg. If the user enters an atom specification as +# The trick is to make "atoms" required, so that the typed command does not +# need to include the "atoms" keyword; the value for "atoms" can be either +# an AtomsArg or an EmptyArg. If the user enters an atom specification as # part of the command, then "atoms" value matches AtomsArg, which # translates to a ``chimerax.atomic.Atoms`` instance for the function # parameter; if not, "atoms" matches EmptyArg, which translates to ``None``. # -def highlight(session, atoms, color, weighted=False, transformed=True, count=1): +def highlight(session, atoms, color, *, weighted=False, transformed=True, count=1): """Highlight the atoms nearest the center of mass of given atoms.""" # ``session`` - ``chimerax.core.session.Session`` instance @@ -125,7 +119,7 @@ def highlight(session, atoms, color, weighted=False, transformed=True, count=1): highlight_desc = CmdDesc(required=[("atoms", Or(AtomsArg, EmptyArg)), ("color", ColorArg)], - optional=[("weighted", BoolArg), + keyword=[("weighted", BoolArg), ("transformed", BoolArg), ("count", Bounded(IntArg, 1, 5))]) @@ -143,8 +137,8 @@ def _get_cofm(session, atoms, transformed, weighted): # If user did not specify the list of atoms, use all atoms if atoms is None: - from chimerax.core.commands import all_objects - atoms = all_objects(session).atoms + from chimerax.atomic import all_atoms + atoms = all_atoms(session) # We can use either transformed or untransformed coordinates. # Transformed coordinates are "scene coordinates", which From 8fe121ba2f194486882e28d70e8966446afc27e5 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 18:15:21 -0800 Subject: [PATCH 075/132] build: No, really, bool8 doesn't exist anymore --- src/bundles/core/src/_serialize.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/core/src/_serialize.pyx b/src/bundles/core/src/_serialize.pyx index 5f43e00021..1290b10755 100644 --- a/src/bundles/core/src/_serialize.pyx +++ b/src/bundles/core/src/_serialize.pyx @@ -244,7 +244,7 @@ cdef object _encode_ext(object obj): return ExtType(8, _pack_as_array((obj.days, obj.seconds, obj.microseconds))) if isinstance(obj, Image.Image): return ExtType(9, _encode_image(obj)) - if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): + if isinstance(obj, (numpy.number, numpy.bool_)): # handle numpy scalar subclasses packer = Packer(**_packer_args) return ExtType(10, packer.pack(_encode_numpy_number(obj))) From 44b3243a69c456dad0b9183f05b9ea4345ef0b4a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 18:54:23 -0800 Subject: [PATCH 076/132] build: Use a tables wheel from Plato --- prereqs/pips/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index bd98afd342..570b290acc 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -34,9 +34,11 @@ endif ifeq ($(OS),Windows) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl +TABLES_WHEEL = tables-3.10.2.dev0-cp313-cp313-win_amd64.whl else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl +TABLES_WHEEL= ifeq ($(OSARCH),LinuxArm64) ACCELERATE_WHEEL = endif @@ -44,11 +46,12 @@ else ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl +TABLES_WHEEL= endif endif endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) all: @@ -131,6 +134,9 @@ app-outdated: src-outdated: $(PYTHON_EXE) -m package_checker ../../src +$(TABLES_WHEEL): + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) + $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From 76b9cb2a405a3bf3a7798f6b049d34320d7d2d1c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 19:13:56 -0800 Subject: [PATCH 077/132] build: It turns out that to use the plato wheel you have to mask it in app_requirements.txt --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 29437a21a6..a8a7c03905 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -59,7 +59,7 @@ six==1.16.0 sortedcontainers==2.4.0 # Used by the DICOM bundle for a double-ended QSlider superqt==0.6.3 -tables==3.10.1 +tables==3.10.1 ; sys_platform != 'win32' tifffile==2024.7.24 tinyarray==1.2.4 webcolors==24.6.0 From 3476e4ed596a9db6f0fd3b0bef395ee7f2dbc2b6 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 19:24:28 -0800 Subject: [PATCH 078/132] build: Update pynrrd to 1.1.1 --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index a8a7c03905..29c92ebb9d 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -43,7 +43,7 @@ pkginfo==1.11.1 psutil==6.0.0 pycollada==0.8 pydicom==2.4.4 -pynrrd==1.0.0 +pynrrd==1.1.1 pyopenxr==1.0.3401 tcia_utils==1.5.1 PyOpenGL==3.1.7 From b22e170d8e392c0e35bcc6c4df9a453caba85761 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 19:29:22 -0800 Subject: [PATCH 079/132] test: Update the test script to use Python 3.13 --- tests/env.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/env.sh b/tests/env.sh index 6f25931fb1..927262de08 100755 --- a/tests/env.sh +++ b/tests/env.sh @@ -4,11 +4,10 @@ # runs the same whether it's called by running the ChimeraX binary or by # running ChimeraX.app/bin/python -I -m chimerax.core -while getopts cs flag -do +while getopts cs flag; do case "${flag}" in - c) COVERAGE=true;; - s) COV_SILENT=true;; + c) COVERAGE=true ;; + s) COV_SILENT=true ;; esac done @@ -26,24 +25,24 @@ CHIMERAX_BIN= case $OSTYPE in linux-gnu) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python3.11 - CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python3.13 + CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX + ;; msys) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python.exe - CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX-console.exe - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python.exe + CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX-console.exe + ;; darwin*) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/Contents/bin/python3.11 - CHIMERAX_BIN=./ChimeraX.app/Contents/bin/ChimeraX - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/Contents/bin/python3.13 + CHIMERAX_BIN=./ChimeraX.app/Contents/bin/ChimeraX + ;; esac if [ ! -e "${CHIMERAX_PYTHON_BIN}" ]; then - echo "No ChimeraX Python binary found" && exit 1 + echo "No ChimeraX Python binary found" && exit 1 fi if [ ! -e "${CHIMERAX_BIN}" ]; then - echo "No ChimeraX binary found" && exit 1 + echo "No ChimeraX binary found" && exit 1 fi echo "Running Pytest on tests/test_env.py (ChimeraX)" From 10bb5f3aacd59e8aad0f50b4232a879563a0df00 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 19:36:05 -0800 Subject: [PATCH 080/132] build: Use pywin32 308 --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 29c92ebb9d..2e714d2a3a 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -77,7 +77,7 @@ sphinx_autodoc_typehints==2.2.3 # # Windows # -pywin32==306; sys_platform == 'win32' +pywin32==308; sys_platform == 'win32' WMI==1.5.1; sys_platform == 'win32' comtypes==1.4.5; sys_platform == 'win32' # From ca3fef48199675c44de3e2d01cd5cd19b286666c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 19:41:53 -0800 Subject: [PATCH 081/132] fix(map_fit): np.product == np.prod but the former is deprecated/removed --- src/bundles/map_data/src/arrays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundles/map_data/src/arrays.py b/src/bundles/map_data/src/arrays.py index 218f9bc2a5..57dbc97b73 100644 --- a/src/bundles/map_data/src/arrays.py +++ b/src/bundles/map_data/src/arrays.py @@ -245,7 +245,7 @@ def grid_indices(size, data_type): # the array contiguous. # shape = (size[2], size[1], size[0], 3) - from numpy import zeros, product, reshape + from numpy import zeros, prod, reshape indices = zeros(shape, data_type) for i in range(size[0]): indices[:,:,i,0] = i @@ -253,7 +253,7 @@ def grid_indices(size, data_type): indices[:,j,:,1] = j for k in range(size[2]): indices[k,:,:,2] = k - volume = product(size) + volume = prod(size) indices = reshape(indices, (volume, 3)) return indices From 204a5f51e32ba221dc6ef82ac148121bcbee505c Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 20:10:04 -0800 Subject: [PATCH 082/132] build: Use the cp13 tinyarray from Plato --- prereqs/pips/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 570b290acc..5dea5a5d0c 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -35,10 +35,12 @@ endif ifeq ($(OS),Windows) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl TABLES_WHEEL = tables-3.10.2.dev0-cp313-cp313-win_amd64.whl +TINYARRAY_WHEEL = tinyarray-1.2.4-cp313-cp313-win_amd64.whl else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl TABLES_WHEEL= +TINYARRAY_WHEEL= ifeq ($(OSARCH),LinuxArm64) ACCELERATE_WHEEL = endif @@ -47,11 +49,12 @@ ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl TABLES_WHEEL= +TINYARRAY_WHEEL= endif endif endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) $(TINYARRAY_WHEEL) all: @@ -137,6 +140,9 @@ src-outdated: $(TABLES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) +$(TINYARRAY_WHEEL): + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TINYARRAY_WHEEL) + $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From e4afe787afdfe58a28be3ddc45e8dcd477a157aa Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 20:12:58 -0800 Subject: [PATCH 083/132] ci: The workflows need to use Python 3.13 now --- .github/workflows/check-for-changes.yml | 4 ++-- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 4 ++-- .github/workflows/ubuntu_build.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 85d9c1160d..31d73c11ac 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -30,7 +30,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent @@ -61,7 +61,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 137f6ede30..4697a45a04 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -53,7 +53,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index dc47c778f3..2c78ea1296 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -68,14 +68,14 @@ jobs: MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install make -C src/apps/ChimeraX install BUILD_TYPE=daily - ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl + ChimeraX.app/bin/python3.13 -m pip install wheels/*.whl cp -rp include ChimeraX.app make -C src/apps install BUILD_TYPE=daily make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index b27746d481..792f0f4b47 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -62,14 +62,14 @@ jobs: MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install make -C src/apps/ChimeraX install BUILD_TYPE=daily - ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl + ChimeraX.app/bin/python3.13 -m pip install wheels/*.whl cp -rp include ChimeraX.app make -C src/apps install BUILD_TYPE=daily make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From b5b41c1dc0ba0b36335c829a6bdc68095743ff52 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 20:19:03 -0800 Subject: [PATCH 084/132] build: tinyarray is not in prereqs/tables, it's in prereqs/tinyarray --- prereqs/pips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 5dea5a5d0c..d482f4d871 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -141,7 +141,7 @@ $(TABLES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) $(TINYARRAY_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TINYARRAY_WHEEL) + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tinyarray/$(TINYARRAY_WHEEL) $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From 172a8473bdde0ae928b0cf517b87290e887e076d Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 20:24:52 -0800 Subject: [PATCH 085/132] build: mask tinyarray on Windows --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 2e714d2a3a..62491d9971 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -61,7 +61,7 @@ sortedcontainers==2.4.0 superqt==0.6.3 tables==3.10.1 ; sys_platform != 'win32' tifffile==2024.7.24 -tinyarray==1.2.4 +tinyarray==1.2.4 ; sys_platform != 'win32' webcolors==24.6.0 wheel-filename==1.4.1 # From 5dcb09530ce747178c9ab525062f34240748b6cd Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 20:45:48 -0800 Subject: [PATCH 086/132] fix(ui): We no longer use Qt < 5.13 --- src/bundles/ui/src/widgets/htmlview.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bundles/ui/src/widgets/htmlview.py b/src/bundles/ui/src/widgets/htmlview.py index 928915c27b..38ae8c45b3 100644 --- a/src/bundles/ui/src/widgets/htmlview.py +++ b/src/bundles/ui/src/widgets/htmlview.py @@ -121,11 +121,7 @@ def delete_profile(profile): del profile._handlers del profile._scheme_handler del profile._schemes - from Qt.QtCore import QT_VERSION - if QT_VERSION < 0x050d00: - profile.setRequestInterceptor(None) - else: - profile.setUrlRequestInterceptor(None) + profile.setUrlRequestInterceptor(None) class HtmlView(QWebEngineView): From 7de322d3a4bd14fcf90d797590ba8249078d2c55 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 21:13:27 -0800 Subject: [PATCH 087/132] ci: Missed the Mac arm python --- .github/workflows/mac_arm_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index 49338a772c..fcb23150c6 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -68,7 +68,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From 0a3ba2fc6ed633e4a6f8d31cb5ff264e50d93523 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 21:58:38 -0800 Subject: [PATCH 088/132] build: Don't break build-from-scratch if ChimeraX python missing --- src/bundles/Makefile.bundle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bundles/Makefile.bundle b/src/bundles/Makefile.bundle index eaea4fa1ce..cdd9f35272 100644 --- a/src/bundles/Makefile.bundle +++ b/src/bundles/Makefile.bundle @@ -37,18 +37,33 @@ OS=Windows endif endif ifeq ($(OS),Windows) +ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python.exe) CX_BIN = $(CHIMERAX_APP)/bin/ChimeraX-console.exe +else +APP_PYTHON_EXE = +CX_BIN = +endif PYMOD_EXT = pyd endif ifeq ($(OS),Darwin) +ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/Contents/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/Contents/bin/ChimeraX +else +APP_PYTHON_EXE = +CX_BIN = +endif PYMOD_EXT = so endif ifeq ($(OS),Linux) +ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/bin/chimerax +else +APP_PYTHON_EXE = +CX_BIN = +endif PYMOD_EXT = so endif PYTHON ?= $(APP_PYTHON_EXE) -I From 81716b2a7bb63879e504c424f4665a737820d780 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Fri, 20 Dec 2024 21:59:26 -0800 Subject: [PATCH 089/132] ci: Use python 3.13 to test mac Intel build --- .github/workflows/mac_intel_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index f7bf86dfaf..de3e4bb472 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -71,7 +71,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From d6bfd4ed86acfcf390706f7bcf271fb52d452e2d Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Sat, 21 Dec 2024 00:20:18 -0800 Subject: [PATCH 090/132] ci: Cache the new wheels/Python --- utils/ci/consolidated_cache/action.yml | 34 ++++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 5998465983..39fce82ab5 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -27,7 +27,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached plato pips (Windows) @@ -36,7 +36,9 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/tinyarray-1.2.4-cp311-cp311-win_amd64.whl + prereqs/pips/tinyarray-1.2.4-cp313-cp313-win_amd64.whl + prereqs/pips/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl + prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached plato pips (macOS) @@ -45,8 +47,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl - prereqs/pips/Cython-3.0.10-cp311-cp311-macosx_10_9_universal2.whl + prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached generic pips @@ -56,7 +57,7 @@ runs: path: | prereqs/pips/grako-3.16.5-py2.py3-none-any.whl prereqs/pips/cxservices-1.2.3-py3-none-any.whl - prereqs/pips/qtshim-1.0-py3-none-any.whl + prereqs/pips/qtshim-1.1-py3-none-any.whl key: generic-plato-pips - name: Restore cached Python (Linux) @@ -65,7 +66,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/Python-3.11.4.tar.xz + prereqs/Python/Python-3.13.1.tar.xz key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached Python (Windows) @@ -74,7 +75,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/python-3.11.4-win-amd64.tar.bz2 + prereqs/Python/python-3.13.1-win-amd64.tar.bz2 key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached Python (macOS) @@ -83,7 +84,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/python-3.11.4-mac.tar.bz2 + prereqs/Python/python-3.13.1-mac.tar.bz2 key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached mmtf dependency sources @@ -297,15 +298,16 @@ runs: if: ${{ steps[format('cache-plato-pips-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl fi if [ "${{ inputs.platform }}" = "macos" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/cython/Cython-3.0.10-cp311-cp311-macosx_10_9_universal2.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl mv Cython* prereqs/pips/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-win_amd64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tables/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl fi mv tinyarray* prereqs/pips/ @@ -402,15 +404,15 @@ runs: if: ${{ steps[format('cache-python-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/Python-3.11.4.tar.xz -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/Python-3.13.1.tar.xz -O -J mv Python* prereqs/Python/ fi if [ "${{ inputs.platform }}" = "macos" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.11.4-mac.tar.bz2 -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.13.1-mac.tar.bz2 -O -J mv python* prereqs/Python/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.11.4-win-amd64.tar.bz2 -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.13.1-win-amd64.tar.bz2 -O -J mv python* prereqs/Python/ fi @@ -420,7 +422,7 @@ runs: run: | curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/grako/grako-3.16.5-py2.py3-none-any.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/cxservices/cxservices-1.2.3-production-py3-none-any.whl - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/qt/qtshim-1.0-py3-none-any.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/qt/qtshim-1.1-py3-none-any.whl mv grako* prereqs/pips/ mv cxservices* prereqs/pips/cxservices-1.2.3-py3-none-any.whl mv qtshim* prereqs/pips/ From 024e9c96a680fb0d3d3f878ff6c1704e2976a706 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Sun, 22 Dec 2024 15:28:55 -0800 Subject: [PATCH 091/132] ci: Fix the mv in the binary pip cache miss handler --- utils/ci/consolidated_cache/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 39fce82ab5..6519ed1098 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -308,8 +308,10 @@ runs: curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tables/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl + mv tinyarray* prereqs/pips/ + mv tables* prereqs/pips/ fi - mv tinyarray* prereqs/pips/ + mv PyOpenGL* prereqs/pips/ - name: Fetch ffmpeg shell: bash From 68e545ce0f9c1d0317f11847cf83cfff80ab33a9 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Sun, 22 Dec 2024 15:31:10 -0800 Subject: [PATCH 092/132] ci: We no longer download Cython on macOS --- utils/ci/consolidated_cache/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 6519ed1098..61915e1d69 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -302,7 +302,6 @@ runs: fi if [ "${{ inputs.platform }}" = "macos" ] ; then curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl - mv Cython* prereqs/pips/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl From 04d6f041db480fd95ed6ce8c6aa52facd7ed2736 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:04 -0800 Subject: [PATCH 093/132] Revert "ci: We no longer download Cython on macOS" This reverts commit 68e545ce0f9c1d0317f11847cf83cfff80ab33a9. --- utils/ci/consolidated_cache/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 61915e1d69..6519ed1098 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -302,6 +302,7 @@ runs: fi if [ "${{ inputs.platform }}" = "macos" ] ; then curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl + mv Cython* prereqs/pips/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl From 4f592f1d2bfdc6d1306a8ae5b47b95477800d83b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:08 -0800 Subject: [PATCH 094/132] Revert "ci: Fix the mv in the binary pip cache miss handler" This reverts commit 024e9c96a680fb0d3d3f878ff6c1704e2976a706. --- utils/ci/consolidated_cache/action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 6519ed1098..39fce82ab5 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -308,10 +308,8 @@ runs: curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tables/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl - mv tinyarray* prereqs/pips/ - mv tables* prereqs/pips/ fi - mv PyOpenGL* prereqs/pips/ + mv tinyarray* prereqs/pips/ - name: Fetch ffmpeg shell: bash From dcbc5936e68481a074b9c628f0afed799d551875 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:10 -0800 Subject: [PATCH 095/132] Revert "ci: Cache the new wheels/Python" This reverts commit d6bfd4ed86acfcf390706f7bcf271fb52d452e2d. --- utils/ci/consolidated_cache/action.yml | 34 ++++++++++++-------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/utils/ci/consolidated_cache/action.yml b/utils/ci/consolidated_cache/action.yml index 39fce82ab5..5998465983 100644 --- a/utils/ci/consolidated_cache/action.yml +++ b/utils/ci/consolidated_cache/action.yml @@ -27,7 +27,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl + prereqs/pips/tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached plato pips (Windows) @@ -36,9 +36,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/tinyarray-1.2.4-cp313-cp313-win_amd64.whl - prereqs/pips/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl - prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl + prereqs/pips/tinyarray-1.2.4-cp311-cp311-win_amd64.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached plato pips (macOS) @@ -47,7 +45,8 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/pips/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl + prereqs/pips/tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl + prereqs/pips/Cython-3.0.10-cp311-cp311-macosx_10_9_universal2.whl key: ${{ runner.os }}-${{ inputs.architecture}}-pips - name: Restore cached generic pips @@ -57,7 +56,7 @@ runs: path: | prereqs/pips/grako-3.16.5-py2.py3-none-any.whl prereqs/pips/cxservices-1.2.3-py3-none-any.whl - prereqs/pips/qtshim-1.1-py3-none-any.whl + prereqs/pips/qtshim-1.0-py3-none-any.whl key: generic-plato-pips - name: Restore cached Python (Linux) @@ -66,7 +65,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/Python-3.13.1.tar.xz + prereqs/Python/Python-3.11.4.tar.xz key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached Python (Windows) @@ -75,7 +74,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/python-3.13.1-win-amd64.tar.bz2 + prereqs/Python/python-3.11.4-win-amd64.tar.bz2 key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached Python (macOS) @@ -84,7 +83,7 @@ runs: uses: actions/cache@v4 with: path: | - prereqs/Python/python-3.13.1-mac.tar.bz2 + prereqs/Python/python-3.11.4-mac.tar.bz2 key: ${{ runner.os }}-${{ inputs.architecture }}-python - name: Restore cached mmtf dependency sources @@ -298,16 +297,15 @@ runs: if: ${{ steps[format('cache-plato-pips-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl fi if [ "${{ inputs.platform }}" = "macos" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/cython/Cython-3.0.10-cp311-cp311-macosx_10_9_universal2.whl mv Cython* prereqs/pips/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp313-cp313-win_amd64.whl - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tables/tables-3.10.2.dev0-cp313-cp313-win_amd64.whl - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/pyopengl/PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/tinyarray/tinyarray-1.2.4-cp311-cp311-win_amd64.whl fi mv tinyarray* prereqs/pips/ @@ -404,15 +402,15 @@ runs: if: ${{ steps[format('cache-python-{0}', inputs.platform)].outputs.cache-hit != 'true' }} run: | if [ "${{ inputs.platform }}" = "linux" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/Python-3.13.1.tar.xz -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/Python-3.11.4.tar.xz -O -J mv Python* prereqs/Python/ fi if [ "${{ inputs.platform }}" = "macos" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.13.1-mac.tar.bz2 -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.11.4-mac.tar.bz2 -O -J mv python* prereqs/Python/ fi if [ "${{ inputs.platform }}" = "windows" ] ; then - curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.13.1-win-amd64.tar.bz2 -O -J + curl https://cxtoolshed.rbvi.ucsf.edu/prereqs/python/python-3.11.4-win-amd64.tar.bz2 -O -J mv python* prereqs/Python/ fi @@ -422,7 +420,7 @@ runs: run: | curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/grako/grako-3.16.5-py2.py3-none-any.whl curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/cxservices/cxservices-1.2.3-production-py3-none-any.whl - curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/qt/qtshim-1.1-py3-none-any.whl + curl --silent --show-error --fail --insecure -O https://cxtoolshed.rbvi.ucsf.edu/prereqs/qt/qtshim-1.0-py3-none-any.whl mv grako* prereqs/pips/ mv cxservices* prereqs/pips/cxservices-1.2.3-py3-none-any.whl mv qtshim* prereqs/pips/ From 6631c557db61c45c38417007e5d546b715818233 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:12 -0800 Subject: [PATCH 096/132] Revert "ci: Use python 3.13 to test mac Intel build" This reverts commit 81716b2a7bb63879e504c424f4665a737820d780. --- .github/workflows/mac_intel_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac_intel_build.yml b/.github/workflows/mac_intel_build.yml index de3e4bb472..f7bf86dfaf 100644 --- a/.github/workflows/mac_intel_build.yml +++ b/.github/workflows/mac_intel_build.yml @@ -71,7 +71,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From f4ef0aa67d07d4031f9a4810f18915983bb9e805 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:14 -0800 Subject: [PATCH 097/132] Revert "build: Don't break build-from-scratch if ChimeraX python missing" This reverts commit 0a3ba2fc6ed633e4a6f8d31cb5ff264e50d93523. --- src/bundles/Makefile.bundle | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/bundles/Makefile.bundle b/src/bundles/Makefile.bundle index cdd9f35272..eaea4fa1ce 100644 --- a/src/bundles/Makefile.bundle +++ b/src/bundles/Makefile.bundle @@ -37,33 +37,18 @@ OS=Windows endif endif ifeq ($(OS),Windows) -ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python.exe) CX_BIN = $(CHIMERAX_APP)/bin/ChimeraX-console.exe -else -APP_PYTHON_EXE = -CX_BIN = -endif PYMOD_EXT = pyd endif ifeq ($(OS),Darwin) -ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/Contents/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/Contents/bin/ChimeraX -else -APP_PYTHON_EXE = -CX_BIN = -endif PYMOD_EXT = so endif ifeq ($(OS),Linux) -ifneq ($(CHIMERAX_APP),) APP_PYTHON_EXE = $(wildcard $(CHIMERAX_APP)/bin/python3.*) CX_BIN = $(CHIMERAX_APP)/bin/chimerax -else -APP_PYTHON_EXE = -CX_BIN = -endif PYMOD_EXT = so endif PYTHON ?= $(APP_PYTHON_EXE) -I From aa716793d1e1a4d0b2d9e7f494050f83dd7abea9 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:15 -0800 Subject: [PATCH 098/132] Revert "ci: Missed the Mac arm python" This reverts commit 7de322d3a4bd14fcf90d797590ba8249078d2c55. --- .github/workflows/mac_arm_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac_arm_build.yml b/.github/workflows/mac_arm_build.yml index fcb23150c6..49338a772c 100644 --- a/.github/workflows/mac_arm_build.yml +++ b/.github/workflows/mac_arm_build.yml @@ -68,7 +68,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From 44170b9a4549325342ac489e11ebf06c33a3cb03 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:17 -0800 Subject: [PATCH 099/132] Revert "fix(ui): We no longer use Qt < 5.13" This reverts commit 5dcb09530ce747178c9ab525062f34240748b6cd. --- src/bundles/ui/src/widgets/htmlview.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bundles/ui/src/widgets/htmlview.py b/src/bundles/ui/src/widgets/htmlview.py index 38ae8c45b3..928915c27b 100644 --- a/src/bundles/ui/src/widgets/htmlview.py +++ b/src/bundles/ui/src/widgets/htmlview.py @@ -121,7 +121,11 @@ def delete_profile(profile): del profile._handlers del profile._scheme_handler del profile._schemes - profile.setUrlRequestInterceptor(None) + from Qt.QtCore import QT_VERSION + if QT_VERSION < 0x050d00: + profile.setRequestInterceptor(None) + else: + profile.setUrlRequestInterceptor(None) class HtmlView(QWebEngineView): From 9722298fa0bcf75b1783954364e8f546e03c7f81 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:18 -0800 Subject: [PATCH 100/132] Revert "build: mask tinyarray on Windows" This reverts commit 172a8473bdde0ae928b0cf517b87290e887e076d. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 62491d9971..2e714d2a3a 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -61,7 +61,7 @@ sortedcontainers==2.4.0 superqt==0.6.3 tables==3.10.1 ; sys_platform != 'win32' tifffile==2024.7.24 -tinyarray==1.2.4 ; sys_platform != 'win32' +tinyarray==1.2.4 webcolors==24.6.0 wheel-filename==1.4.1 # From daaf2f609c24806d4b1945a20343961047ee7853 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:20 -0800 Subject: [PATCH 101/132] Revert "build: tinyarray is not in prereqs/tables, it's in prereqs/tinyarray" This reverts commit b5b41c1dc0ba0b36335c829a6bdc68095743ff52. --- prereqs/pips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index d482f4d871..5dea5a5d0c 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -141,7 +141,7 @@ $(TABLES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) $(TINYARRAY_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tinyarray/$(TINYARRAY_WHEEL) + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TINYARRAY_WHEEL) $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From d79f5f418072c6387a5a9319bc9605e08a398adc Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:22 -0800 Subject: [PATCH 102/132] Revert "ci: The workflows need to use Python 3.13 now" This reverts commit e4afe787afdfe58a28be3ddc45e8dcd477a157aa. --- .github/workflows/check-for-changes.yml | 4 ++-- .github/workflows/rocky8_build.yml | 2 +- .github/workflows/rocky9_build.yml | 4 ++-- .github/workflows/ubuntu_build.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 31d73c11ac..85d9c1160d 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -30,7 +30,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent @@ -61,7 +61,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/Contents/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 4697a45a04..137f6ede30 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -53,7 +53,7 @@ jobs: - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index 2c78ea1296..dc47c778f3 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -68,14 +68,14 @@ jobs: MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install make -C src/apps/ChimeraX install BUILD_TYPE=daily - ChimeraX.app/bin/python3.13 -m pip install wheels/*.whl + ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl cp -rp include ChimeraX.app make -C src/apps install BUILD_TYPE=daily make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 792f0f4b47..b27746d481 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -62,14 +62,14 @@ jobs: MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install make -C src/apps/ChimeraX install BUILD_TYPE=daily - ChimeraX.app/bin/python3.13 -m pip install wheels/*.whl + ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl cp -rp include ChimeraX.app make -C src/apps install BUILD_TYPE=daily make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest - run: ./ChimeraX.app/bin/python3.13 -I -m pip install pytest pytest-cov + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov - name: Set up the repo for coverage reporting run: make prepare-coverage - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent From 9464bbe9b423371e2b09fb0ec2dae3cec353dd64 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:23 -0800 Subject: [PATCH 103/132] Revert "build: Use the cp13 tinyarray from Plato" This reverts commit 204a5f51e32ba221dc6ef82ac148121bcbee505c. --- prereqs/pips/Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 5dea5a5d0c..570b290acc 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -35,12 +35,10 @@ endif ifeq ($(OS),Windows) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl TABLES_WHEEL = tables-3.10.2.dev0-cp313-cp313-win_amd64.whl -TINYARRAY_WHEEL = tinyarray-1.2.4-cp313-cp313-win_amd64.whl else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl TABLES_WHEEL= -TINYARRAY_WHEEL= ifeq ($(OSARCH),LinuxArm64) ACCELERATE_WHEEL = endif @@ -49,12 +47,11 @@ ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl TABLES_WHEEL= -TINYARRAY_WHEEL= endif endif endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) $(TINYARRAY_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) all: @@ -140,9 +137,6 @@ src-outdated: $(TABLES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) -$(TINYARRAY_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TINYARRAY_WHEEL) - $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From f65c068b7b00b6b4d78cca94952a589565747fec Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:25 -0800 Subject: [PATCH 104/132] Revert "fix(map_fit): np.product == np.prod but the former is deprecated/removed" This reverts commit ca3fef48199675c44de3e2d01cd5cd19b286666c. --- src/bundles/map_data/src/arrays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundles/map_data/src/arrays.py b/src/bundles/map_data/src/arrays.py index 57dbc97b73..218f9bc2a5 100644 --- a/src/bundles/map_data/src/arrays.py +++ b/src/bundles/map_data/src/arrays.py @@ -245,7 +245,7 @@ def grid_indices(size, data_type): # the array contiguous. # shape = (size[2], size[1], size[0], 3) - from numpy import zeros, prod, reshape + from numpy import zeros, product, reshape indices = zeros(shape, data_type) for i in range(size[0]): indices[:,:,i,0] = i @@ -253,7 +253,7 @@ def grid_indices(size, data_type): indices[:,j,:,1] = j for k in range(size[2]): indices[k,:,:,2] = k - volume = prod(size) + volume = product(size) indices = reshape(indices, (volume, 3)) return indices From c88b9d39665fbeb73c65560eb390eef5a00f4ab8 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:27 -0800 Subject: [PATCH 105/132] Revert "build: Use pywin32 308" This reverts commit 10bb5f3aacd59e8aad0f50b4232a879563a0df00. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 2e714d2a3a..29c92ebb9d 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -77,7 +77,7 @@ sphinx_autodoc_typehints==2.2.3 # # Windows # -pywin32==308; sys_platform == 'win32' +pywin32==306; sys_platform == 'win32' WMI==1.5.1; sys_platform == 'win32' comtypes==1.4.5; sys_platform == 'win32' # From 7bb7fa9fecf724673903da5b82069eb3556f00ab Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:28 -0800 Subject: [PATCH 106/132] Revert "test: Update the test script to use Python 3.13" This reverts commit b22e170d8e392c0e35bcc6c4df9a453caba85761. --- tests/env.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/env.sh b/tests/env.sh index 927262de08..6f25931fb1 100755 --- a/tests/env.sh +++ b/tests/env.sh @@ -4,10 +4,11 @@ # runs the same whether it's called by running the ChimeraX binary or by # running ChimeraX.app/bin/python -I -m chimerax.core -while getopts cs flag; do +while getopts cs flag +do case "${flag}" in - c) COVERAGE=true ;; - s) COV_SILENT=true ;; + c) COVERAGE=true;; + s) COV_SILENT=true;; esac done @@ -25,24 +26,24 @@ CHIMERAX_BIN= case $OSTYPE in linux-gnu) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python3.13 - CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python3.11 + CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX + ;; msys) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python.exe - CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX-console.exe - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/bin/python.exe + CHIMERAX_BIN=./ChimeraX.app/bin/ChimeraX-console.exe + ;; darwin*) - CHIMERAX_PYTHON_BIN=./ChimeraX.app/Contents/bin/python3.13 - CHIMERAX_BIN=./ChimeraX.app/Contents/bin/ChimeraX - ;; + CHIMERAX_PYTHON_BIN=./ChimeraX.app/Contents/bin/python3.11 + CHIMERAX_BIN=./ChimeraX.app/Contents/bin/ChimeraX + ;; esac if [ ! -e "${CHIMERAX_PYTHON_BIN}" ]; then - echo "No ChimeraX Python binary found" && exit 1 + echo "No ChimeraX Python binary found" && exit 1 fi if [ ! -e "${CHIMERAX_BIN}" ]; then - echo "No ChimeraX binary found" && exit 1 + echo "No ChimeraX binary found" && exit 1 fi echo "Running Pytest on tests/test_env.py (ChimeraX)" From ffd0698e10b0c628a0e3a698a56f54f106d28e21 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:30 -0800 Subject: [PATCH 107/132] Revert "build: Update pynrrd to 1.1.1" This reverts commit 3476e4ed596a9db6f0fd3b0bef395ee7f2dbc2b6. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 29c92ebb9d..a8a7c03905 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -43,7 +43,7 @@ pkginfo==1.11.1 psutil==6.0.0 pycollada==0.8 pydicom==2.4.4 -pynrrd==1.1.1 +pynrrd==1.0.0 pyopenxr==1.0.3401 tcia_utils==1.5.1 PyOpenGL==3.1.7 From eaa8d42467e923cd7485db7addd4cca9b5ae620a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:31 -0800 Subject: [PATCH 108/132] Revert "build: It turns out that to use the plato wheel you have to mask it in" This reverts commit 76b9cb2a405a3bf3a7798f6b049d34320d7d2d1c. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index a8a7c03905..29437a21a6 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -59,7 +59,7 @@ six==1.16.0 sortedcontainers==2.4.0 # Used by the DICOM bundle for a double-ended QSlider superqt==0.6.3 -tables==3.10.1 ; sys_platform != 'win32' +tables==3.10.1 tifffile==2024.7.24 tinyarray==1.2.4 webcolors==24.6.0 From 3e01604217b9ece83d55e0dd4abf967b3b1c4bd3 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:33 -0800 Subject: [PATCH 109/132] Revert "build: Use a tables wheel from Plato" This reverts commit 44b3243a69c456dad0b9183f05b9ea4345ef0b4a. --- prereqs/pips/Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 570b290acc..bd98afd342 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -34,11 +34,9 @@ endif ifeq ($(OS),Windows) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl -TABLES_WHEEL = tables-3.10.2.dev0-cp313-cp313-win_amd64.whl else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl -TABLES_WHEEL= ifeq ($(OSARCH),LinuxArm64) ACCELERATE_WHEEL = endif @@ -46,12 +44,11 @@ else ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl -TABLES_WHEEL= endif endif endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) $(TABLES_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) all: @@ -134,9 +131,6 @@ app-outdated: src-outdated: $(PYTHON_EXE) -m package_checker ../../src -$(TABLES_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tables/$(TABLES_WHEEL) - $(ACCELERATE_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) From 8a7679c79250d3751f3a4c2ea02fe292a5ab02b4 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:35 -0800 Subject: [PATCH 110/132] Revert "build: No, really, bool8 doesn't exist anymore" This reverts commit 8fe121ba2f194486882e28d70e8966446afc27e5. --- src/bundles/core/src/_serialize.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/core/src/_serialize.pyx b/src/bundles/core/src/_serialize.pyx index 1290b10755..5f43e00021 100644 --- a/src/bundles/core/src/_serialize.pyx +++ b/src/bundles/core/src/_serialize.pyx @@ -244,7 +244,7 @@ cdef object _encode_ext(object obj): return ExtType(8, _pack_as_array((obj.days, obj.seconds, obj.microseconds))) if isinstance(obj, Image.Image): return ExtType(9, _encode_image(obj)) - if isinstance(obj, (numpy.number, numpy.bool_)): + if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): # handle numpy scalar subclasses packer = Packer(**_packer_args) return ExtType(10, packer.pack(_encode_numpy_number(obj))) From fb7e4865f4a568cba394fae0b0975b0a20b92e30 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:36 -0800 Subject: [PATCH 111/132] Revert "fix(core): bool8 doesn't exist as an alias to bool_ anymore in numpy" This reverts commit 98ac8ffaf620aca2bfb4f6de9cab5afee227b61e. --- src/bundles/core/src/_serial_python.py | 2 +- src/bundles/core/src/_serialize.pyx | 2 +- src/bundles/core/src/serialize.py | 2 +- src/bundles/core/src/state.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bundles/core/src/_serial_python.py b/src/bundles/core/src/_serial_python.py index 6197ed57ef..ceada90c91 100644 --- a/src/bundles/core/src/_serial_python.py +++ b/src/bundles/core/src/_serial_python.py @@ -196,7 +196,7 @@ def _encode_ext(obj): return ExtType(8, packer.pack([obj.days, obj.seconds, obj.microseconds])) if isinstance(obj, Image.Image): return ExtType(9, _encode_image(obj)) - if isinstance(obj, (numpy.number, numpy.bool_)): + if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): # handle numpy scalar subclasses return ExtType(10, packer.pack(_encode_numpy_number(obj))) if isinstance(obj, FinalizedState): diff --git a/src/bundles/core/src/_serialize.pyx b/src/bundles/core/src/_serialize.pyx index 5f43e00021..1dcb7d5bf2 100644 --- a/src/bundles/core/src/_serialize.pyx +++ b/src/bundles/core/src/_serialize.pyx @@ -55,7 +55,7 @@ PRIMITIVE_TYPES = frozenset(( bool, int, float, bytes, bytearray, str, dict, list, memoryview, type(None), # additionally supported types complex, tuple, range, _UniqueName, - numpy.ndarray, numpy.number, numpy.bool_, + numpy.ndarray, numpy.number, numpy.bool_, numpy.bool8, set, frozenset, deque, OrderedDict, datetime, timedelta, timezone, Image.Image, FinalizedState, diff --git a/src/bundles/core/src/serialize.py b/src/bundles/core/src/serialize.py index 662b5c8647..46c8b4b361 100644 --- a/src/bundles/core/src/serialize.py +++ b/src/bundles/core/src/serialize.py @@ -152,7 +152,7 @@ def _count_object_types(obj): if isinstance(obj, numpy.ndarray): _object_counts[numpy.ndarray] += 1 return - if isinstance(obj, (numpy.number, numpy.bool_)): + if isinstance(obj, (numpy.number, numpy.bool_, numpy.bool8)): _object_counts[numpy.number] += 1 return t = type(obj) diff --git a/src/bundles/core/src/state.py b/src/bundles/core/src/state.py index 2733eda446..5a4e657d28 100644 --- a/src/bundles/core/src/state.py +++ b/src/bundles/core/src/state.py @@ -157,6 +157,7 @@ def numpy_numbers(): except Exception: pass yield numpy.bool_ + yield numpy.bool8 _final_primitives = ( type(None), From 7104dc27f5de13e7d28feb9ea9830eaf6ae7773d Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:38 -0800 Subject: [PATCH 112/132] Revert "build: Fix mismatched ifeq/endif in pips Makefile" This reverts commit 4abb20c3aada129748cac14a3b40498c174765a3. --- prereqs/pips/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index bd98afd342..d89d80b2f8 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -38,12 +38,17 @@ else ifeq ($(OS),Linux) ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl ifeq ($(OSARCH),LinuxArm64) +else ACCELERATE_WHEEL = endif else ifeq ($(OS),Darwin) WHEEL_CFLAGS="-Wno-error=int-conversion" ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl +ifeq ($(OSARCH),DarwinArm64) +else +ifeq ($(OSARCH),DarwinIntel64) +endif endif endif endif From 740db5653901e5523bb3eaba97fc1cd1a3b9fc6a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:40 -0800 Subject: [PATCH 113/132] Revert "build: Reenable PyOpenGL_accelerate with a Plato wheel" This reverts commit 4a3a83a0b93c258e0df1ea8280503a63b18264a8. --- prereqs/pips/Makefile | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index d89d80b2f8..eaebfdb049 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -26,35 +26,14 @@ QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) + ifeq ($(OSARCH),DarwinArm64) CYTHON_BUILD_ARGS= --no-binary :all: else CYTHON_BUILD_ARGS= endif -ifeq ($(OS),Windows) -ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-win_amd64.whl -else -ifeq ($(OS),Linux) -ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl -ifeq ($(OSARCH),LinuxArm64) -else -ACCELERATE_WHEEL = -endif -else -ifeq ($(OS),Darwin) -WHEEL_CFLAGS="-Wno-error=int-conversion" -ACCELERATE_WHEEL = PyOpenGL_accelerate-3.1.7-cp313-cp313-macosx_10_13_universal2.whl -ifeq ($(OSARCH),DarwinArm64) -else -ifeq ($(OSARCH),DarwinIntel64) -endif -endif -endif -endif - -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) $(ACCELERATE_WHEEL) - all: install: @@ -68,10 +47,10 @@ app-list: upgrade: app-install: $(PLATO_WHEELS) - # Install Cython first because source packages will complain otherwise - $(APP_PIP_INSTALL) $(CYTHON_BUILD_ARGS) $(shell grep Cython app_requirements.txt) - # Install numpy second so that PyOpenGL_Accelerate will compile numpy_formathandler + # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) + # Install Cython second because source packages will complain otherwise + $(APP_PIP_INSTALL) $(CYTHON_BUILD_ARGS) $(shell grep Cython app_requirements.txt) $(APP_PIP_INSTALL) $(shell grep lz4 app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) @@ -136,9 +115,6 @@ app-outdated: src-outdated: $(PYTHON_EXE) -m package_checker ../../src -$(ACCELERATE_WHEEL): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/pyopengl/$(ACCELERATE_WHEEL) - $(GRAKO_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/grako/$(GRAKO_WHEEL) From 8c2c4f3086fb7dfb6fc25e11b818ac452b38afc7 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:41 -0800 Subject: [PATCH 114/132] Revert "build: prereqs/pips/Makefile was missing QTSHIM_WHEEL" This reverts commit 79e9ea9ae30a6a38d3d4751ec2535946fa6090a0. --- prereqs/pips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index eaebfdb049..f2625ba86f 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -26,7 +26,7 @@ QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) ifeq ($(OSARCH),DarwinArm64) CYTHON_BUILD_ARGS= --no-binary :all: From f6d126e9a8c07327969f8e265d00cb08a77b9601 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:43 -0800 Subject: [PATCH 115/132] Revert "build: Give bundle builder ChimeraX's lxml version too" This reverts commit 5836c89bb3a503f74534517d8e46e9a5fa787030. --- src/bundles/bundle_builder/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/bundle_builder/pyproject.toml b/src/bundles/bundle_builder/pyproject.toml index 863ab50f3d..f6ace6985a 100644 --- a/src/bundles/bundle_builder/pyproject.toml +++ b/src/bundles/bundle_builder/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ 'tomli; python_version < "3.11"', 'numpy==2.2.0', 'setuptools==72.1.0', - 'lxml==5.3.0', + 'lxml==5.2.2', 'auditwheel>=6.1.0', ] classifiers = [ From a3de32ed8ba25764bd88b02b3209ae6a7eef691f Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:45 -0800 Subject: [PATCH 116/132] Revert "build: Give bundle builder the same numpy requirement as ChimeraX" This reverts commit 8149f51370568d3b1e5ae244b408388847ee4aad. --- src/bundles/bundle_builder/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/bundle_builder/pyproject.toml b/src/bundles/bundle_builder/pyproject.toml index f6ace6985a..23324df863 100644 --- a/src/bundles/bundle_builder/pyproject.toml +++ b/src/bundles/bundle_builder/pyproject.toml @@ -8,7 +8,7 @@ description = "Bundle building utilities" # one line synopsis authors = [{ name = "UCSF RBVI", email = "chimerax@cgl.ucsf.edu" }] dependencies = [ 'tomli; python_version < "3.11"', - 'numpy==2.2.0', + 'numpy==1.26.4', 'setuptools==72.1.0', 'lxml==5.2.2', 'auditwheel>=6.1.0', From c24f15ebfb3fb1cc33e90cefc4028801c9039754 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:46 -0800 Subject: [PATCH 117/132] Revert "build: Temporarily disable pyopengl-accelerate" This reverts commit 4dec07ba3ec9e9b15341618cd6a0bd6a19aaaa31. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 29437a21a6..dca2891b6c 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -47,7 +47,7 @@ pynrrd==1.0.0 pyopenxr==1.0.3401 tcia_utils==1.5.1 PyOpenGL==3.1.7 -# PyOpenGL-accelerate==3.1.7 +PyOpenGL-accelerate==3.1.7 python-dateutil==2.9.0.post0 # PyQt handled in prereqs/PyQt # sip handled in prereqs/PyQt From 760ec83936485e91d2849a6933a5f7725de563ec Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:48 -0800 Subject: [PATCH 118/132] Revert "build: Use lxml 5.3" This reverts commit 0c101d834abb4c718b97666d55d9b24304483263. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index dca2891b6c..43ebc64196 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -24,7 +24,7 @@ ipython==8.26.0 jedi==0.19.1 jupyter-client==8.6.2 line_profiler==4.1.3 -lxml==5.3.0 +lxml==5.2.2 lz4==4.3.3 matplotlib==3.9.2 msgpack==1.0.8 From a86f56c509fe3906b82a96a7ead04088f6be10eb Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:50 -0800 Subject: [PATCH 119/132] Revert "build: No need to mangle setup.py on Linux Python 3.13" This reverts commit 48109ffee3b282796165fdef2029e4b9a2475c30. --- prereqs/Python/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prereqs/Python/Makefile b/prereqs/Python/Makefile index ab58c62a0a..5abfaefbed 100644 --- a/prereqs/Python/Makefile +++ b/prereqs/Python/Makefile @@ -215,11 +215,10 @@ ifdef USE_MAC_FRAMEWORKS -e /HAVE_CLOCK_SETTIME/d \ < pyconfig.h.old > pyconfig.h endif - # No longer necessary with Python 3.13 -- it's missing setup.py # Don't use stuff from /usr/local (especially Tcl, Tk, and SSL) - # cd $(SOURCE) && \ - # mv setup.py setup.py.orig ; \ - # sed -e 's;/usr/local;$(build_prefix);' -e 's;/ssl/;/;' < setup.py.orig > setup.py + cd $(SOURCE) && \ + mv setup.py setup.py.orig ; \ + sed -e 's;/usr/local;$(build_prefix);' -e 's;/ssl/;/;' < setup.py.orig > setup.py ifdef USE_MAC_FRAMEWORKS # say where to find Tcl and Tk (and any other frameworks) (echo ':/framework_dirs =/s:$$: "$(frameworkdir)",:'; echo ':wq') \ From 577203fdaedb9301f3a1185c1e35ba60e4242ad3 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:51 -0800 Subject: [PATCH 120/132] Revert "ci: You have to use toolset 11 in both workflows" This reverts commit 0e7eef9763a06dbde3b7027c052693c13b3e8a29. --- .github/workflows/check-for-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 85d9c1160d..94dd573b86 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -26,7 +26,7 @@ jobs: platform: linux architecture: x86_64 cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - run: source /opt/rh/gcc-toolset-11/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal - name: Run the legacy test suite run: make test - name: Install Pytest From 3365dcc0929070c36628a9db61941dc5de9dae44 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:53 -0800 Subject: [PATCH 121/132] Revert "build: Use netcdf4 >1.7" This reverts commit c3261e7f3b0c03e919f78c83aef20d429c3cdcca. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 43ebc64196..6fcb0b2e1b 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -29,7 +29,7 @@ lz4==4.3.3 matplotlib==3.9.2 msgpack==1.0.8 nibabel == 5.2.0 -netCDF4==1.7.2 +netCDF4==1.6.5 networkx==3.3 numpy==2.2.0 openvr==1.26.701 From cf86954b8bb8c8e6ba032d41c1fc1eb5d94f5519 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:54 -0800 Subject: [PATCH 122/132] Revert "build: Use gcc-toolset-11 on Rocky 8" This reverts commit 10794ffe826e089a5d656434abdec2f724ad5de1. --- .github/workflows/rocky8_build.yml | 2 +- utils/centos/8.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml index 137f6ede30..eeb447f4af 100644 --- a/.github/workflows/rocky8_build.yml +++ b/.github/workflows/rocky8_build.yml @@ -49,7 +49,7 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: source /opt/rh/gcc-toolset-11/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi - name: Run the legacy test suite run: make test - name: Install Pytest diff --git a/utils/centos/8.txt b/utils/centos/8.txt index 91eaba4990..1f915e6ac9 100644 --- a/utils/centos/8.txt +++ b/utils/centos/8.txt @@ -13,10 +13,10 @@ freetype git gcc gcc-c++ -gcc-toolset-11 -gcc-toolset-11-binutils-devel -gcc-toolset-11-elfutils-devel -gcc-toolset-11-valgrind-devel +gcc-toolset-10 +gcc-toolset-10-binutils-devel +gcc-toolset-10-elfutils-devel +gcc-toolset-10-valgrind-devel gdk-pixbuf2 glib2 glibc From 62e931319341ac9e60c1f856a5a3c02ecf4ad28a Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:56 -0800 Subject: [PATCH 123/132] Revert "build: Use numpy 2.0" This reverts commit 8a4806c82e29823d0d90b375c5247d974a4c7c41. --- prereqs/pips/app_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 6fcb0b2e1b..c4194aac42 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -31,7 +31,7 @@ msgpack==1.0.8 nibabel == 5.2.0 netCDF4==1.6.5 networkx==3.3 -numpy==2.2.0 +numpy==1.26.4 openvr==1.26.701 openmm==8.2.0 packaging==23.2 From 63729389e117fcac604500c2368180ae81197ef0 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:32:57 -0800 Subject: [PATCH 124/132] Revert "build: Make sure the arm64 ChimeraX has a binary Cython" This reverts commit b86cefd379642d481d408b723d9effc369d683f3. --- prereqs/pips/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index f2625ba86f..50ed6c1719 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -28,12 +28,6 @@ GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) -ifeq ($(OSARCH),DarwinArm64) -CYTHON_BUILD_ARGS= --no-binary :all: -else -CYTHON_BUILD_ARGS= -endif - all: install: @@ -50,8 +44,7 @@ app-install: $(PLATO_WHEELS) # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) # Install Cython second because source packages will complain otherwise - $(APP_PIP_INSTALL) $(CYTHON_BUILD_ARGS) $(shell grep Cython app_requirements.txt) - $(APP_PIP_INSTALL) $(shell grep lz4 app_requirements.txt) + $(APP_PIP_INSTALL) $(shell grep Cython app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) LANG=$(LANG) $(PIP_INSTALL) --no-build-isolation --no-binary $(subst $(SPACE),$(COMMA),$(SOURCE_WHEELS)) $(SOURCE_VERSIONS) From 58edd43b592adf1f563e76f89cc2c4b779ee71d1 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:33:01 -0800 Subject: [PATCH 125/132] Revert "build: Update pips for Python 3.13" This reverts commit ca4bc2b01feaa02b0f897609fa9885b86d17121b. --- prereqs/pips/Makefile | 36 ++++++++++++++++++++++++++++--- prereqs/pips/app_requirements.txt | 8 +++---- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/prereqs/pips/Makefile b/prereqs/pips/Makefile index 50ed6c1719..8490e7ad15 100644 --- a/prereqs/pips/Makefile +++ b/prereqs/pips/Makefile @@ -16,6 +16,7 @@ WHEEL_CFLAGS ?= # On macOS, only the x86_64 version of Cython is available from pypi. # So we install the same version on arm64, but from source. +CYTHON_VERSION = $(shell grep Cython= app_requirements.txt | sed -e 's/ ;.*//' -e 's/.*=//') CXSERVICES_VER = 1.2.3 CXSERVICES_DEPLOYMENT_VER ?= production @@ -25,8 +26,33 @@ PATCHES = tcia_utils.patch tcia_utils_metadata.patch QTSHIM_WHEEL = qtshim-1.1-py3-none-any.whl CXSERVICES_WHEEL = cxservices-$(CXSERVICES_VER)-py3-none-any.whl GRAKO_WHEEL = grako-3.16.5-py2.py3-none-any.whl +ifeq ($(OS),Windows) +TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-win_amd64.whl +else +ifeq ($(OS),Linux) +ifeq ($(OSARCH),LinuxArm64) +TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-linux_aarch64.whl +else +TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl +endif +else +ifeq ($(OS),Darwin) +WHEEL_CFLAGS="-Wno-error=int-conversion" +TINYARRAY_WHEEL = tinyarray-1.2.4-cp311-cp311-macosx_10_9_universal2.whl +ifeq ($(OSARCH),DarwinArm64) +CYTHON_WHEEL = Cython-$(CYTHON_VERSION)-cp311-cp311-macosx_10_9_universal2.whl +else +ifeq ($(OSARCH),DarwinIntel64) +endif +endif +endif +endif +endif -PLATO_WHEELS = $(GRAKO_WHEEL) $(CXSERVICES_WHEEL) +PLATO_WHEELS = $(GRAKO_WHEEL) $(TINYARRAY_WHEEL) $(CXSERVICES_WHEEL) $(QTSHIM_WHEEL) +ifeq ($(OSARCH),DarwinArm64) +PLATO_WHEELS += $(CYTHON_WHEEL) +endif all: @@ -43,8 +69,6 @@ upgrade: app-install: $(PLATO_WHEELS) # Install numpy first so that PyOpenGL_Accelerate will compile numpy_formathandler $(APP_PIP_INSTALL) $(shell grep numpy app_requirements.txt) - # Install Cython second because source packages will complain otherwise - $(APP_PIP_INSTALL) $(shell grep Cython app_requirements.txt) CFLAGS+=$(WHEEL_CFLAGS) $(APP_PIP_INSTALL) --no-build-isolation -r app_requirements.txt ifneq (,$(SOURCE_WHEELS)) LANG=$(LANG) $(PIP_INSTALL) --no-build-isolation --no-binary $(subst $(SPACE),$(COMMA),$(SOURCE_WHEELS)) $(SOURCE_VERSIONS) @@ -111,6 +135,12 @@ src-outdated: $(GRAKO_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/grako/$(GRAKO_WHEEL) +$(TINYARRAY_WHEEL): + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/tinyarray/$(TINYARRAY_WHEEL) + +$(CYTHON_WHEEL): + $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/cython/$(CYTHON_WHEEL) + $(CXSERVICES_WHEEL): $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/cxservices/cxservices-$(CXSERVICES_VER)-$(CXSERVICES_DEPLOYMENT_VER)-py3-none-any.whl mv cxservices-$(CXSERVICES_VER)-$(CXSERVICES_DEPLOYMENT_VER)-py3-none-any.whl $(CXSERVICES_WHEEL) diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index c4194aac42..79a0929171 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -10,12 +10,12 @@ appdirs==1.4.4 beautifulsoup4==4.12.3 build==1.2.1 colorama==0.4.6 -Cython==3.0.10 +Cython==3.0.10 ; platform_machine != 'arm64' filelock==3.15.4 # grako==3.16.5 # See the Makefile; need patched Grako for 3.11 html2text==2024.2.26 ihm==1.3 -imagecodecs==2024.9.22 +imagecodecs==2024.6.1 ipykernel==6.29.5 # if ipython updated, make sure autocompletion still works (e.g. "mi" becomes min) and if not then # try a newer version of jedi @@ -54,14 +54,14 @@ python-dateutil==2.9.0.post0 #PySide2==5.15.2 qtconsole==5.5.2 requests==2.32.3 -scipy==1.14.1 +scipy==1.14.0 six==1.16.0 sortedcontainers==2.4.0 # Used by the DICOM bundle for a double-ended QSlider superqt==0.6.3 tables==3.10.1 tifffile==2024.7.24 -tinyarray==1.2.4 +# tinyarray==1.2.4 # 3.11 requires getting this from Plato webcolors==24.6.0 wheel-filename==1.4.1 # From a8df6012037bb669295b5fd2a68744cd43b39359 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:33:02 -0800 Subject: [PATCH 126/132] Revert "build: There's no macOS 10.9 Python 3.13.1" This reverts commit f9596a94aaeb942dbe220807e6523678e28a341a. --- prereqs/Python/Makefile.macos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prereqs/Python/Makefile.macos b/prereqs/Python/Makefile.macos index 445c9a4501..4d976d5339 100644 --- a/prereqs/Python/Makefile.macos +++ b/prereqs/Python/Makefile.macos @@ -25,7 +25,7 @@ include $(TOP)/mk/config.make PYTHON_PATCH_LEVEL = $(PYTHON_VERSION).$(PYTHON_PATCH_VERSION) DISTRIBUTION = python-$(PYTHON_PATCH_LEVEL)-mac.tar.bz2 -MACOS_VER = 11 +MACOS_VER = 10.9 all : $(DISTRIBUTION) From da3c6ac8be5ef7898d207424c50d39e7de4bc14b Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 11:33:04 -0800 Subject: [PATCH 127/132] Revert "build: Set Python version to 3.13.1" This reverts commit cce8387f7d39d666b963d9ac43b88f9e9ba0c17c. --- mk/config.make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/config.make b/mk/config.make index a1b4717884..ee3f939fff 100644 --- a/mk/config.make +++ b/mk/config.make @@ -30,8 +30,8 @@ all: # version numbers that leak out of prerequisites -PYTHON_VERSION = 3.13 -PYTHON_PATCH_VERSION = 1 +PYTHON_VERSION = 3.11 +PYTHON_PATCH_VERSION = 4 ifndef DEBUG # Starting with Python 3.8 the ABI "m" has been dropped. From d4b003a98c242180774e9d3bcb12c4f4038efdf6 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Mon, 23 Dec 2024 13:07:36 -0800 Subject: [PATCH 128/132] Added some more text clarifying why the example doesn't use an optional argument --- src/examples/tutorials/tut_cmd/src/cmd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/examples/tutorials/tut_cmd/src/cmd.py b/src/examples/tutorials/tut_cmd/src/cmd.py index ab5e149aad..68d308f363 100644 --- a/src/examples/tutorials/tut_cmd/src/cmd.py +++ b/src/examples/tutorials/tut_cmd/src/cmd.py @@ -84,6 +84,14 @@ def cofm(session, atoms, *, weighted=False, transformed=True): # translates to a ``chimerax.atomic.Atoms`` instance for the function # parameter; if not, "atoms" matches EmptyArg, which translates to ``None``. # +# The astute reader will note that the "atoms" argument could have instead +# been declared as optional, with a parser class of AtomsArg and a Python +# default value of None. In ChimeraX, commands that require some kind of +# atom specification typically have that as their first argument. If the +# command has additional required arguments, then you would have to use the +# "trick" demonstrated here in order to allow the atom spec to be the first +# argument while still allowing that argument to be omitted in order to +# indicate "all atoms". def highlight(session, atoms, color, *, weighted=False, transformed=True, count=1): From 00794480007e12d469220415c1c73227cf602ee6 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Mon, 23 Dec 2024 13:07:36 -0800 Subject: [PATCH 129/132] Added some more text clarifying why the example doesn't use an optional argument --- src/examples/tutorials/tut_cmd/src/cmd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/examples/tutorials/tut_cmd/src/cmd.py b/src/examples/tutorials/tut_cmd/src/cmd.py index ab5e149aad..68d308f363 100644 --- a/src/examples/tutorials/tut_cmd/src/cmd.py +++ b/src/examples/tutorials/tut_cmd/src/cmd.py @@ -84,6 +84,14 @@ def cofm(session, atoms, *, weighted=False, transformed=True): # translates to a ``chimerax.atomic.Atoms`` instance for the function # parameter; if not, "atoms" matches EmptyArg, which translates to ``None``. # +# The astute reader will note that the "atoms" argument could have instead +# been declared as optional, with a parser class of AtomsArg and a Python +# default value of None. In ChimeraX, commands that require some kind of +# atom specification typically have that as their first argument. If the +# command has additional required arguments, then you would have to use the +# "trick" demonstrated here in order to allow the atom spec to be the first +# argument while still allowing that argument to be omitted in order to +# indicate "all atoms". def highlight(session, atoms, color, *, weighted=False, transformed=True, count=1): From 24fafdf4de5fba6ed2af4bf4d5f1a127872ae060 Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 13:41:55 -0800 Subject: [PATCH 130/132] fix(ui): Fix broken URL handling on PySide6 --- src/bundles/ui/src/widgets/htmlview.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bundles/ui/src/widgets/htmlview.py b/src/bundles/ui/src/widgets/htmlview.py index 928915c27b..450e354da0 100644 --- a/src/bundles/ui/src/widgets/htmlview.py +++ b/src/bundles/ui/src/widgets/htmlview.py @@ -451,7 +451,11 @@ def defer(session, topic, from_dir): if prev_dir: os.chdir(prev_dir) from Qt.QtCore import QUrl - no_formatting = QUrl.UrlFormattingOption.None_ + from Qt import using_pyqt6, using_pyside6 + if using_pyqt6: + no_formatting = QUrl.UrlFormattingOption.None_ + elif using_pyside6: + no_formatting = QUrl.ComponentFormattingOption.FullyEncoded session.ui.thread_safe(defer, session, qurl.url(no_formatting), from_dir) return From c873e33ce73f3436b60d5a4342b698cc3b40481f Mon Sep 17 00:00:00 2001 From: Zach Pearson Date: Mon, 23 Dec 2024 13:46:32 -0800 Subject: [PATCH 131/132] fix(ui): We no longer use PyQt5, so don't import Qt version for checking --- src/bundles/ui/src/widgets/htmlview.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bundles/ui/src/widgets/htmlview.py b/src/bundles/ui/src/widgets/htmlview.py index 450e354da0..cdf6efc9db 100644 --- a/src/bundles/ui/src/widgets/htmlview.py +++ b/src/bundles/ui/src/widgets/htmlview.py @@ -121,11 +121,7 @@ def delete_profile(profile): del profile._handlers del profile._scheme_handler del profile._schemes - from Qt.QtCore import QT_VERSION - if QT_VERSION < 0x050d00: - profile.setRequestInterceptor(None) - else: - profile.setUrlRequestInterceptor(None) + profile.setUrlRequestInterceptor(None) class HtmlView(QWebEngineView): From 139b2961cfb0d2eebdcba43d9e5cad46eabffdbd Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Fri, 27 Dec 2024 10:58:12 -0800 Subject: [PATCH 132/132] Catch all UnicodeErrors, not just UnicodeDecodeErrors --- src/bundles/viewdockx/src/pdbqt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundles/viewdockx/src/pdbqt.py b/src/bundles/viewdockx/src/pdbqt.py index 45359f774a..36ca1df035 100755 --- a/src/bundles/viewdockx/src/pdbqt.py +++ b/src/bundles/viewdockx/src/pdbqt.py @@ -5,7 +5,7 @@ def open_pdbqt(*args): for encoding in encodings: try: return _open_pdbqt(*args, encoding) - except UnicodeDecodeError: + except UnicodeError: if encoding == encodings[-1]: raise