Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Oct 25, 2023
2 parents 9428478 + ccc9c94 commit f660fae
Show file tree
Hide file tree
Showing 302 changed files with 15,731 additions and 4,531 deletions.
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# flake8 does not support pyproject.toml (https://github.com/PyCQA/flake8/issues/234)

[flake8]
max-line-length = 100
# E123: closing bracket does not match indentation of opening bracket's line
# E126: continuation line over-indented for hanging indent
# E226: missing whitespace around arithmetic operator
# E402: Module level import not at top of file
# W503: line break before binary operator
# W504: line break after binary operator
ignore = E123,E126,E226,E402,W503,W504

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# the repo. Unless a later match takes precedence,
# they will be requested for
# review when someone opens a pull request.
* @duytnguyendtn @rosteen @javerbukh @pllim @kecnry @bmorris3 @haticekaratay
* @rosteen @javerbukh @pllim @kecnry @bmorris3 @haticekaratay @cshanahan1
2 changes: 1 addition & 1 deletion .github/workflows/changelog_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check change log entry
uses: pllim/action-check_astropy_changelog@main
uses: scientific-python/action-check-changelogfile@6087eddce1d684b0132be651a4dad97699513113 # 0.2
env:
CHANGELOG_FILENAME: CHANGES.rst
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 34 additions & 8 deletions .github/workflows/ci_cron_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
schedule:
# run at 9am UTC on Mondays
- cron: '0 9 * * 1'
pull_request:
# We also want this workflow triggered if the 'Extra CI' label is added
# or present when PR is updated
types:
- synchronize
- labeled

permissions:
contents: read
Expand All @@ -15,27 +21,47 @@ jobs:
# The if statement is to prevent cron from running on forks.
linkcheck:
runs-on: ubuntu-latest
if: github.repository == 'spacetelescope/jdaviz'
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Extra CI')))
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check links in docs using tox
run: tox -e linkcheck

ci_cron_tests:
name: Python 3.10 with latest dev versions of key dependencies
ci_cron_tests_dev_roman:
name: Python 3.11 with latest dev versions of key dependencies and Roman
runs-on: ubuntu-latest
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Extra CI')))
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: tox -e py311-test-devdeps-romandeps

ci_cron_tests_stable_roman:
name: Python 3.10 with stable versions of dependencies and Roman
runs-on: ubuntu-latest
if: github.repository == 'spacetelescope/jdaviz'
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Extra CI')))
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python
Expand All @@ -47,4 +73,4 @@ jobs:
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: tox -e py310-test-devdeps
run: tox -e py310-test-romandeps
20 changes: 10 additions & 10 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
toxenv: securityaudit
allow_failure: false

- name: Python 3.10 with coverage checking, all deps, and remote data
- name: Python 3.11 with coverage checking, all deps, and remote data
os: ubuntu-latest
python: '3.10'
toxenv: py310-test-alldeps-cov
python: '3.11'
toxenv: py311-test-alldeps-cov
toxposargs: --remote-data
allow_failure: false

Expand All @@ -57,24 +57,24 @@ jobs:
toxenv: py39-test
allow_failure: false

- name: Windows - Python 3.8
- name: Windows - Python 3.10
os: windows-latest
python: 3.8
toxenv: py38-test
python: '3.10'
toxenv: py310-test
allow_failure: false

# This also runs on cron but we want to make sure new changes
# won't break this job at the PR stage.
- name: Python 3.11 with latest dev versions of key dependencies, and remote data
- name: Python 3.12 with latest dev versions of key dependencies, and remote data
os: ubuntu-latest
python: '3.11'
toxenv: py311-test-devdeps
python: '3.12-dev'
toxenv: py312-test-devdeps
toxposargs: --remote-data --run-slow
allow_failure: true

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/open_actions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: "When Opened"

on:
issues:
types:
- opened
pull_request_target:
types:
- opened
Expand All @@ -12,6 +15,12 @@ jobs:
# NOTE: sync-labels due to https://github.com/actions/labeler/issues/112
- name: Label PR
uses: actions/labeler@v4
if: github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'meeseeksmachine'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: ''
# Special action for a special day. Until next year!
#- name: Special comment
# uses: pllim/action-special_pr_comment@main
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/predeps_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
if: github.repository == 'spacetelescope/jdaviz'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install python-build and twine
run: python -m pip install build "twine>=3.3"
Expand Down
141 changes: 141 additions & 0 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build standalone

on:
push:
branches:
- main
- 'v*'
tags:
- 'v*'
workflow_dispatch:

defaults:
run:
shell: bash {0}

jobs:
build_binary:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macos]
steps:
# osx signing based on https://melatonin.dev/blog/how-to-code-sign-and-notarize-macos-audio-plugins-in-ci/
- name: Import Certificates (macOS)
uses: apple-actions/import-codesign-certs@v2
if: ${{ matrix.os == 'macos' }}
with:
p12-file-base64: ${{ secrets.DEV_ID_APP_CERT }}
p12-password: ${{ secrets.DEV_ID_APP_PASSWORD }}
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install jdaviz
run: pip install .[test]

- name: Install pyinstaller
run: pip install pyinstaller==5.11

- name: Create standalone binary
env:
DEVELOPER_ID_APPLICATION: ${{ secrets.DEVELOPER_ID_APPLICATION }}
run: (cd standalone; pyinstaller ./jdaviz.spec)

- name: Remove invalid files for OSX
# hopefully we can improve this in the future
# by using good hooks
# i think the issue is that we have a . in the name, there are many
# google hits on pyqt having the same issue
# and we might be able to remove it after https://github.com/pyinstaller/pyinstaller/pull/7619
# is released (pyinstaller 5.13 probably)
if: ${{ matrix.os == 'macos' }}
run: |
rm -rf standalone/dist/jdaviz.app/Contents/MacOS/skimage/.dylibs
rm -rf standalone/dist/jdaviz.app/Contents/Resources/skimage/.dylibs
- name: Codesign (OSX)
if: ${{ matrix.os == 'macos' }}
run: |
cd standalone/dist
codesign --deep --force --options=runtime --entitlements ../entitlements.plist --sign ${{ secrets.DEVELOPER_ID_APPLICATION }} --timestamp jdaviz.app
- name: Create dmg (OSX)
# if we do not call always() GHA will && with success()
if: ${{ always() && (matrix.os == 'macos') }}
# it seems ditto (not zip) should be used in combination with notarization
# see https://developer.apple.com/forums/thread/116831
# but dmg also works
# see https://github.com/glue-viz/glue-standalone-apps/blob/main/.github/workflows/build_stable.yml
run: |
rm -rf standalone/dist/jdaviz
hdiutil create -volname "Jdaviz" -srcfolder standalone/dist -ov -format UDZO standalone/dist/jdaviz.dmg
- name: Notary step + stapling (OSX)
if: ${{ matrix.os == 'macos' }}
run: |
output=$(xcrun notarytool submit standalone/dist/jdaviz.dmg --apple-id ${{ secrets.NOTARIZATION_USERNAME }} --team-id ${{ secrets.TEAM_ID }} --wait --password ${{ secrets.NOTARIZATION_PASSWORD }}) || true
echo "$output"
uuid=$(echo "$output" | awk -F '[ :]+' '/id:/ {print $3; exit}')
echo "UUID: $uuid"
if [[ $output == *"status: Accepted"* ]]; then
echo "Great, notarization succeeded, staple it!"
xcrun stapler staple standalone/dist/jdaviz.dmg
else
echo "Log output for failed notarization: $uuid"
xcrun notarytool log --apple-id ${{ secrets.NOTARIZATION_USERNAME }} --team-id ${{ secrets.TEAM_ID }} --password ${{ secrets.NOTARIZATION_PASSWORD }} $uuid || true
fi
- name: Validate app (OSX)
if: ${{ matrix.os == 'macos' }}
run: |
spctl -a -vvv -t execute standalone/dist/jdaviz.app
- name: Run jdaviz cmd in background
if: ${{ matrix.os == 'macos' }}
run: ./standalone/dist/jdaviz.app/Contents/MacOS/jdaviz-cli imviz&

- name: Run jdaviz cmd in background
if: ${{ matrix.os != 'macos' }}
run: ./standalone/dist/jdaviz/jdaviz-cli imviz&

- name: Install playwright
run: (pip install playwright; playwright install chromium)

- name: Install pytest
run: pip install pytest-playwright

- name: Wait for Voila to get online
uses: ifaxity/wait-on-action@628831cec646e6dacca502f34a6c6b46e131e51d # v1.1.0
with:
resource: tcp:8866
timeout: 60000

- name: Test standalone
run: (cd standalone; touch pytest.ini; JUPYTER_PLATFORM_DIRS=1 pytest test_standalone.py --video=on)

- name: Upload Test artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.os }}
path: standalone/test-results

- name: Upload jdaviz standalone (non-OSX)
if: ${{ always() && (matrix.os != 'macos') }}
uses: actions/upload-artifact@v3
with:
name: jdaviz-standlone-${{ matrix.os }}
path: |
standalone/dist/jdaviz
- name: Upload jdaviz standalone (OSX)
if: ${{ always() && (matrix.os == 'macos') }}
uses: actions/upload-artifact@v3
with:
name: jdaviz-standlone-${{ matrix.os }}
path: standalone/dist/jdaviz.dmg
26 changes: 26 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Brett Graham <[email protected]>
Brett M. Morris <[email protected]> <[email protected]>
Camilla Pacifici <[email protected]> <[email protected]>
Craig Jones <[email protected]> <[email protected]>
Duy Nguyen <[email protected]> <[email protected]>
Duy Nguyen <[email protected]> <[email protected]>
Duy Nguyen <[email protected]> Duy Tuong Nguyen <[email protected]>
Duy Nguyen <[email protected]> Duy Tuong Nguyen <[email protected]>
Duy Nguyen <[email protected]> duytnguyendtn <[email protected]>
Ivo Busko <[email protected]> Ivo <[email protected]>
Ivo Busko <[email protected]> busko <[email protected]>
Ivo Busko <[email protected]> [email protected] <New1trilha>
Jennifer Kotler <[email protected]> <[email protected]>
Jennifer Kotler <[email protected]> <[email protected]>
Jesse Averbukh <[email protected]> <[email protected]>
Josh Soref <[email protected]> <[email protected]>
Kyle Conroy <[email protected]> Kyle <[email protected]>
Mario Buikhuizen <[email protected]> <[email protected]>
Mario Buikhuizen <[email protected]> <[email protected]>
Nicholas Earl <[email protected]> <[email protected]>
Nicholas Earl <[email protected]> nmearl <[email protected]>
Ori Fox <[email protected]> Ori <[email protected]>
P. L. Lim <[email protected]>
Patrick Ogle <[email protected]> PatrickOgle <[email protected]>
Ricky O'Steen <[email protected]> <[email protected]>
Ricky O'Steen <[email protected]> rosteen <[email protected]>
5 changes: 2 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
apt_packages:
- graphviz
tools:
python: "3.9"
python: "3.11"
jobs:
post_checkout:
# Use `git log` to check if the latest commit contains "skip rtd" or "rtd skip",
Expand All @@ -18,7 +18,6 @@ sphinx:
fail_on_warning: true

python:
system_packages: false
install:
- method: pip
path: .
Expand Down
Loading

0 comments on commit f660fae

Please sign in to comment.