Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing to publish #13

Merged
merged 8 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
42 changes: 42 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
push:
branches:
- master
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.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 }}
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -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()'
33 changes: 33 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -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 }}
42 changes: 0 additions & 42 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"julia.executablePath": "${env:JULIA_194}"
"julia.executablePath": "${env:JULIA_1106}"
}
15 changes: 13 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LightBenders"
uuid = "2e9fe063-9687-4d41-bf41-4f062739391f"
authors = ["guilhermebodin <[email protected]>"]
authors = ["guilhermebodin", "raphasampaio", "viniciusjusten"]
version = "0.1.1"

[deps]
Expand All @@ -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.12"
JobQueueMPI = "0.1"
JuMP = "1.23"
LinearAlgebra = "1.9 - 1.11"
ProgressTables = "0.1"
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"]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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=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

## Getting Started

### Installation

```julia
julia> ] add LightBenders
```

### Example
2 changes: 1 addition & 1 deletion format/format.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

SET BASEPATH=%~dp0

CALL "%JULIA_194%" --project=%BASEPATH% %BASEPATH%\format.jl
CALL "%JULIA_1106%" --project=%BASEPATH% %BASEPATH%\format.jl
6 changes: 0 additions & 6 deletions revise.bat

This file was deleted.

5 changes: 5 additions & 0 deletions revise/revise.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off

SET BASEPATH=%~dp0

CALL "%JULIA_1106%" --project=%BASEPATH% --interactive --load=%BASEPATH%\revise.jl
2 changes: 1 addition & 1 deletion revise/revise_load_script.jl → revise/revise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
""")
8 changes: 8 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -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
26 changes: 20 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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()
2 changes: 1 addition & 1 deletion test/test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

SET BASEPATH=%~dp0

%JULIA_194% --project=%BASEPATH%\.. -e "import Pkg; Pkg.test()"
%JULIA_1106% --project=%BASEPATH%\.. -e "import Pkg; Pkg.test()"