From ba213df9aaae230425c1f2b48eaeb7fd7d2365de Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 20 May 2023 21:30:25 -0400 Subject: [PATCH 1/5] Update dependencies and require Julia >= 1.6 --- .github/workflows/CompatHelper.yml | 9 ++------- .github/workflows/TagBot.yml | 17 ++++++++++++++++- .github/workflows/ci.yml | 18 +++++------------- Project.toml | 13 +++++++------ ..._blink.jl => manipulation_with_electron.jl} | 16 ++-------------- test/runtests.jl | 14 +++++++------- 6 files changed, 39 insertions(+), 48 deletions(-) rename examples/{manipulation_with_blink.jl => manipulation_with_electron.jl} (70%) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 6992ce6..dd821e6 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -6,16 +6,11 @@ on: jobs: CompatHelper: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: [1.2.0] - julia-arch: [x86] - os: [ubuntu-latest] + runs-on: ubuntu-latest steps: - uses: julia-actions/setup-julia@latest with: - version: ${{ matrix.julia-version }} + version: 1.3 - name: Pkg.add("CompatHelper") run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - name: CompatHelper.main() diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..3486a1b 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,4 +28,3 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db41d90..b1aa8b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: version: - - '1.3' + - '1.6' - '1' os: - ubuntu-latest @@ -21,24 +21,16 @@ jobs: arch: - x64 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - CI: true - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + with: + prefix: ${{ matrix.prefix }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: diff --git a/Project.toml b/Project.toml index cda99c4..31e5ce7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "MeshCatMechanisms" uuid = "6ad125db-dd91-5488-b820-c1df6aab299d" -version = "0.8.2" +version = "0.8.3" [deps] ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" @@ -17,20 +17,21 @@ RigidBodyDynamics = "366cf18f-59d5-5db9-a4de-86a9f6786172" [compat] ColorTypes = "0.7, 0.8, 0.9, 0.10, 0.11" CoordinateTransformations = "0.5, 0.6" -GeometryBasics = "0.2, 0.3, 0.4" +GeometryBasics = "0.4" InteractBase = "0.8, 0.9, 0.10" -Interpolations = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14" +Interpolations = "0.9, 0.10, 0.11, 0.12, 0.13" LoopThrottle = "0.1" MechanismGeometries = "0.7" -MeshCat = "0.13, 0.14, 0.15" +MeshCat = "0.13, 0.14, 0.15, 0.16" NBInclude = "1, 2" OrderedCollections = "1" RigidBodyDynamics = "2" ValkyrieRobot = "0.2.1" -julia = "1.3" +julia = "1.6" [extras] NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464" +Electron = "a1bb12fb-d4d1-54b4-b10a-ee7951ef7ad3" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" @@ -38,4 +39,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" ValkyrieRobot = "c74b26e8-f247-5d24-b013-c11a2bbd97c6" [targets] -test = ["StaticArrays", "Pkg", "NBInclude", "Test", "ValkyrieRobot", "Random"] +test = ["StaticArrays", "Pkg", "NBInclude", "Test", "ValkyrieRobot", "Random", "Electron"] diff --git a/examples/manipulation_with_blink.jl b/examples/manipulation_with_electron.jl similarity index 70% rename from examples/manipulation_with_blink.jl rename to examples/manipulation_with_electron.jl index b344571..b31c1d1 100644 --- a/examples/manipulation_with_blink.jl +++ b/examples/manipulation_with_electron.jl @@ -22,20 +22,8 @@ mechanism = rand_chain_mechanism(Float64, mvis = MechanismVisualizer(mechanism, Skeleton(randomize_colors=true)) # Open the visualizer in a new window -# -# We don't open windows when we're running this test -# on the Travis CI build servers -if !haskey(ENV, "CI") - open(mvis, Electron.Application()) -end +open(mvis, Electron.Application()) # Create sliders to manipulate the visualizer's configuration widget = manipulate!(mvis) - -# Render those sliders in a new window -# -# We don't open windows when we're running this test -# on the Travis CI build servers -if !haskey(ENV, "CI") - body!(Electron.Application(), widget) -end +body!(Electron.Application(), widget) diff --git a/test/runtests.jl b/test/runtests.jl index 19fcbf2..1598579 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -124,15 +124,15 @@ vis = Visualizer() for file in readdir(dir) base, ext = splitext(file) if ext == ".jl" - if file == "manipulation_with_electron.jl" - # The interaction between MeshCat and Interact - # causes weird task deadlocks that I don't want - # to deal with right now. - @warn "Skipping $file" - else + # if file == "manipulation_with_electron.jl" + # # The interaction between MeshCat and Interact + # # causes weird task deadlocks that I don't want + # # to deal with right now. + # @warn "Skipping $file" + # else @info "Running $file" include(joinpath(dir, file)) - end + # end elseif ext == ".ipynb" @info "Running notebook $file" @nbinclude(joinpath(dir, file)) From f8296e82d869bac6580a117dd8e15a5952206678 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 20 May 2023 21:31:19 -0400 Subject: [PATCH 2/5] fix accidental change to Interpolations.jl dep --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 31e5ce7..74eea88 100644 --- a/Project.toml +++ b/Project.toml @@ -19,7 +19,7 @@ ColorTypes = "0.7, 0.8, 0.9, 0.10, 0.11" CoordinateTransformations = "0.5, 0.6" GeometryBasics = "0.4" InteractBase = "0.8, 0.9, 0.10" -Interpolations = "0.9, 0.10, 0.11, 0.12, 0.13" +Interpolations = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14" LoopThrottle = "0.1" MechanismGeometries = "0.7" MeshCat = "0.13, 0.14, 0.15, 0.16" From 31dcbde33a83503d0f2bf2002396d6131241fd13 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 20 May 2023 21:37:01 -0400 Subject: [PATCH 3/5] clean up --- examples/manipulation_with_electron.jl | 29 -------------------------- test/runtests.jl | 14 ++----------- 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 examples/manipulation_with_electron.jl diff --git a/examples/manipulation_with_electron.jl b/examples/manipulation_with_electron.jl deleted file mode 100644 index b31c1d1..0000000 --- a/examples/manipulation_with_electron.jl +++ /dev/null @@ -1,29 +0,0 @@ -# This example demonstrates basic manipulation of a visualized -# mechanism in a standalone window. - -# For a similar demo rendered in Jupyter instead, see the -# `interactive_manipulation.ipynb` notebook. - -# Import our packages -using MeshCatMechanisms -using RigidBodyDynamics - -# Electron provides the standalone window we'll use to display -# the visualizer and controls -import Electron - -# Create a random mechanism and its associated visualizer - -# seed the random number generator so we get repeatable results -import Random -Random.seed!(75) -mechanism = rand_chain_mechanism(Float64, - [QuaternionFloating{Float64}; [Revolute{Float64} for i = 1:5]]...) -mvis = MechanismVisualizer(mechanism, Skeleton(randomize_colors=true)) - -# Open the visualizer in a new window -open(mvis, Electron.Application()) - -# Create sliders to manipulate the visualizer's configuration -widget = manipulate!(mvis) -body!(Electron.Application(), widget) diff --git a/test/runtests.jl b/test/runtests.jl index 1598579..eed172f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -124,18 +124,8 @@ vis = Visualizer() for file in readdir(dir) base, ext = splitext(file) if ext == ".jl" - # if file == "manipulation_with_electron.jl" - # # The interaction between MeshCat and Interact - # # causes weird task deadlocks that I don't want - # # to deal with right now. - # @warn "Skipping $file" - # else - @info "Running $file" - include(joinpath(dir, file)) - # end - elseif ext == ".ipynb" - @info "Running notebook $file" - @nbinclude(joinpath(dir, file)) + @info "Running $file" + include(joinpath(dir, file)) end end end From 8030d3a68de3085c79955f2246db7e16cae0dc7e Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 20 May 2023 21:39:21 -0400 Subject: [PATCH 4/5] more compat updates --- .github/workflows/CompatHelper.yml | 43 +++++++++++++++++++++++------- Project.toml | 3 +-- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index dd821e6..7a9c79f 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,19 +1,44 @@ name: CompatHelper - on: schedule: - - cron: '00 00 * * *' - + - cron: 0 0 * * * + workflow_dispatch: +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: - - uses: julia-actions/setup-julia@latest + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v1 with: - version: 1.3 - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + version: '1' + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} diff --git a/Project.toml b/Project.toml index 74eea88..0f2096e 100644 --- a/Project.toml +++ b/Project.toml @@ -31,7 +31,6 @@ julia = "1.6" [extras] NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464" -Electron = "a1bb12fb-d4d1-54b4-b10a-ee7951ef7ad3" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" @@ -39,4 +38,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" ValkyrieRobot = "c74b26e8-f247-5d24-b013-c11a2bbd97c6" [targets] -test = ["StaticArrays", "Pkg", "NBInclude", "Test", "ValkyrieRobot", "Random", "Electron"] +test = ["StaticArrays", "Pkg", "NBInclude", "Test", "ValkyrieRobot", "Random"] From 43ce0e7d5d83fed58164347db7742a1a2f7ff4ab Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 20 May 2023 21:48:58 -0400 Subject: [PATCH 5/5] Bump version to 0.9.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0f2096e..6b9d121 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "MeshCatMechanisms" uuid = "6ad125db-dd91-5488-b820-c1df6aab299d" -version = "0.8.3" +version = "0.9.0" [deps] ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"