From 449b90e648fb02f61f517f695a42355f041283d7 Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:02:25 -0300 Subject: [PATCH 1/8] Project updates --- .github/dependabot.yml | 7 ++++ .github/workflows/CI.yml | 43 +++++++++++++++++++++ .github/workflows/CompatHelper.yml | 16 ++++++++ .github/workflows/TagBot.yml | 33 ++++++++++++++++ README.md | 17 ++++++++ revise/revise.bat | 5 +++ revise/{revise_load_script.jl => revise.jl} | 2 +- 7 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/CompatHelper.yml create mode 100644 .github/workflows/TagBot.yml create mode 100644 README.md create mode 100644 revise/revise.bat rename revise/{revise_load_script.jl => revise.jl} (78%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ff6499d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..ef8d307 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,43 @@ +name: CI +on: + push: + branches: + - main + tags: ['*'] + pull_request: + workflow_dispatch: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.9' + - '1.10' + - '1.11' + os: + - ubuntu-latest + - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v4 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 0000000..cba9134 --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -0,0 +1,16 @@ +name: CompatHelper +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Pkg.add("CompatHelper") + run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + - name: CompatHelper.main() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..ba6db9e --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,33 @@ +name: TagBot +on: + issue_comment: + 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' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key + ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae75b30 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# LightBenders.jl + +[![CI](https://github.com/psrenergy/LightBenders.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/psrenergy/LightBenders.jl/actions/workflows/CI.yml) +[![codecov](https://codecov.io/gh/psrenergy/LightBenders.jl/graph/badge.svg?token=7tA9ajgsLf)](https://codecov.io/gh/psrenergy/LightBenders.jl) +[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) + +## Introduction + +## Getting Started + +### Installation + +```julia +julia> ] add LightBenders +``` + +### Example diff --git a/revise/revise.bat b/revise/revise.bat new file mode 100644 index 0000000..439fb97 --- /dev/null +++ b/revise/revise.bat @@ -0,0 +1,5 @@ +@echo off + +SET BASEPATH=%~dp0 + +CALL "%JULIA_194%" --project=%BASEPATH% --interactive --load=%BASEPATH%\revise.jl diff --git a/revise/revise_load_script.jl b/revise/revise.jl similarity index 78% rename from revise/revise_load_script.jl rename to revise/revise.jl index 2eddbcc..bde51ce 100644 --- a/revise/revise_load_script.jl +++ b/revise/revise.jl @@ -8,6 +8,6 @@ Pkg.instantiate() using LightBenders @info(""" -This session is using LightBenders with Revise.jl. +This session is using LightBenders.jl with Revise.jl. For more information visit https://timholy.github.io/Revise.jl/stable/. """) From b030011e03143ca216743bfa8fe224cbbcfabbea Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:02:28 -0300 Subject: [PATCH 2/8] [skip ci] Project updates --- .github/workflows/test.yml | 42 -------------------------------------- revise.bat | 6 ------ 2 files changed, 48 deletions(-) delete mode 100644 .github/workflows/test.yml delete mode 100644 revise.bat diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index c9a4f64..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: CI -on: - push: - branches: [master] - pull_request: - types: [opened, synchronize, reopened] -jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - version: '1' - os: windows-latest - arch: x64 - - version: '1' - os: ubuntu-latest - arch: x64 - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - 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/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: lcov.info \ No newline at end of file diff --git a/revise.bat b/revise.bat deleted file mode 100644 index e2c3520..0000000 --- a/revise.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -SET BASEPATH=%~dp0 -SET REVISE_PATH="%BASEPATH%\revise" - -CALL %JULIA_194% --project=%REVISE_PATH% --load=%REVISE_PATH%\revise_load_script.jl From a0e8599c4d15d390747bcffd489f6ff42aa7c02e Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:02:42 -0300 Subject: [PATCH 3/8] Project updates --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 85fc7f8..b1f86f0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "LightBenders" uuid = "2e9fe063-9687-4d41-bf41-4f062739391f" -authors = ["guilhermebodin "] +authors = ["guilhermebodin", "raphasampaio", "viniciusjusten"] version = "0.1.1" [deps] From 023410bdeabbbe465bbb1102bd9567e7bb15ae33 Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:05:59 -0300 Subject: [PATCH 4/8] Project updates --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae75b30..942c875 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # LightBenders.jl [![CI](https://github.com/psrenergy/LightBenders.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/psrenergy/LightBenders.jl/actions/workflows/CI.yml) -[![codecov](https://codecov.io/gh/psrenergy/LightBenders.jl/graph/badge.svg?token=7tA9ajgsLf)](https://codecov.io/gh/psrenergy/LightBenders.jl) +[![codecov](https://codecov.io/gh/psrenergy/LightBenders.jl/graph/badge.svg?token=zfYd247kfX)](https://codecov.io/gh/psrenergy/LightBenders.jl) [![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) ## Introduction From 2de7b7a2b2e549696bb84cf16da077bea12e5b8d Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:18:50 -0300 Subject: [PATCH 5/8] Project updates --- Project.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b1f86f0..dafe100 100644 --- a/Project.toml +++ b/Project.toml @@ -13,11 +13,22 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] +Aqua = "0.8" +EnumX = "1.0" +HiGHS = "1.10 - 1.12" +JobQueueMPI = "0.1" +JuMP = "1.23" +LinearAlgebra = "1.9 - 1.11" +ProgressTables = "0.1.0" +Random = "1.9 - 1.11" +Statistics = "1.9 - 1.11" +Test = "1.9 - 1.11" julia = "1.9" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "HiGHS"] +test = ["Aqua", "HiGHS", "Test"] From d2e0730aa3c09d6504d98f3209616724485b84c8 Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:21:14 -0300 Subject: [PATCH 6/8] [skip ci] Project updates --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ef8d307..1d5b55f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,7 @@ name: CI on: push: branches: - - main + - master tags: ['*'] pull_request: workflow_dispatch: From 6d4c081342e4b94e07f16a02fce132308e8e735a Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 14:31:15 -0300 Subject: [PATCH 7/8] [skip ci] Project updates --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index dafe100..f1f9540 100644 --- a/Project.toml +++ b/Project.toml @@ -15,11 +15,11 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] Aqua = "0.8" EnumX = "1.0" -HiGHS = "1.10 - 1.12" +HiGHS = "1.12" JobQueueMPI = "0.1" JuMP = "1.23" LinearAlgebra = "1.9 - 1.11" -ProgressTables = "0.1.0" +ProgressTables = "0.1" Random = "1.9 - 1.11" Statistics = "1.9 - 1.11" Test = "1.9 - 1.11" From 57bdc22cb8362cd5ddf7b9f55278cd5ec20387f4 Mon Sep 17 00:00:00 2001 From: raphasampaio Date: Mon, 25 Nov 2024 15:42:23 -0300 Subject: [PATCH 8/8] Project updates --- .github/workflows/CI.yml | 1 - .vscode/settings.json | 2 +- format/format.bat | 2 +- revise/revise.bat | 2 +- test/aqua.jl | 8 ++++++++ test/runtests.jl | 26 ++++++++++++++++++++------ test/test.bat | 2 +- 7 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 test/aqua.jl diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1d5b55f..caec027 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,7 +19,6 @@ jobs: fail-fast: false matrix: version: - - '1.9' - '1.10' - '1.11' os: diff --git a/.vscode/settings.json b/.vscode/settings.json index 84fa1ec..2185681 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "julia.executablePath": "${env:JULIA_194}" + "julia.executablePath": "${env:JULIA_1106}" } \ No newline at end of file diff --git a/format/format.bat b/format/format.bat index 1ff9bfc..59effe9 100644 --- a/format/format.bat +++ b/format/format.bat @@ -2,4 +2,4 @@ SET BASEPATH=%~dp0 -CALL "%JULIA_194%" --project=%BASEPATH% %BASEPATH%\format.jl \ No newline at end of file +CALL "%JULIA_1106%" --project=%BASEPATH% %BASEPATH%\format.jl \ No newline at end of file diff --git a/revise/revise.bat b/revise/revise.bat index 439fb97..dae381b 100644 --- a/revise/revise.bat +++ b/revise/revise.bat @@ -2,4 +2,4 @@ SET BASEPATH=%~dp0 -CALL "%JULIA_194%" --project=%BASEPATH% --interactive --load=%BASEPATH%\revise.jl +CALL "%JULIA_1106%" --project=%BASEPATH% --interactive --load=%BASEPATH%\revise.jl diff --git a/test/aqua.jl b/test/aqua.jl new file mode 100644 index 0000000..97f0283 --- /dev/null +++ b/test/aqua.jl @@ -0,0 +1,8 @@ +function test_aqua() + @testset "LightBenders" begin + Aqua.test_ambiguities(LightBenders, recursive = false) + end + Aqua.test_all(LightBenders, ambiguities = false) + + return nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index f385b7c..a08a140 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,9 @@ +using Aqua +using LightBenders using Test +include("aqua.jl") + function test_modules(dir::AbstractString) result = Dict{String, Vector{String}}() for (root, dirs, files) in walkdir(dir) @@ -14,14 +18,24 @@ function test_modules(dir::AbstractString) return result end -@testset "Tests" begin - for (main_case, files) in test_modules(@__DIR__) - @testset "$main_case" begin - for file in files - @testset "$(basename(dirname(file)))" begin - include(file) +function test_all() + @testset "Aqua.jl" begin + test_aqua() + end + + @testset "Tests" begin + for (main_case, files) in test_modules(@__DIR__) + @testset "$main_case" begin + for file in files + @testset "$(basename(dirname(file)))" begin + include(file) + end end end end end + + return nothing end + +test_all() diff --git a/test/test.bat b/test/test.bat index b4f67c8..0433efd 100644 --- a/test/test.bat +++ b/test/test.bat @@ -2,4 +2,4 @@ SET BASEPATH=%~dp0 -%JULIA_194% --project=%BASEPATH%\.. -e "import Pkg; Pkg.test()" \ No newline at end of file +%JULIA_1106% --project=%BASEPATH%\.. -e "import Pkg; Pkg.test()" \ No newline at end of file