Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply COPIERTemplate 0.5.3 with minimum optional questions
Browse files Browse the repository at this point in the history
abelsiqueira committed Jun 11, 2024
1 parent 11e9c7c commit d549e17
Showing 20 changed files with 971 additions and 761 deletions.
9 changes: 7 additions & 2 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -2,12 +2,17 @@ align_assignment = true
align_matrix = true
align_pair_arrow = true
align_struct_field = true
always_for_in = true
annotate_untyped_fields_with_any = false
conditional_to_if = true
for_in_replacement = "in"
format_docstrings = false
format_markdown = false
indent = 4
import_to_using = true
indent = 2
margin = 100
normalize_line_endings = "unix"
remove_extra_newlines = true
separate_kwargs_with_semicolon = true
verbose = true
whitespace_ops_in_indices = true
whitespace_typedefs = true
11 changes: 11 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changes here will be overwritten by Copier
AnswerStrategy: minimum
AuthorEmail: fatkasuvayu+linux@gmail.com
AuthorName: Suvayu Ali
JuliaMinVersion: '1.6'
License: Apache-2.0
PackageName: TulipaIO
PackageOwner: TulipaEnergy
PackageUUID: 7b3808b7-0819-42d4-885c-978ba173db11
_commit: v0.5.3
_src_path: https://github.com/abelsiqueira/COPIERTemplate.jl
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"
6 changes: 4 additions & 2 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name: CompatHelper

on:
schedule:
- cron: 0 0 * * *
- cron: 0 0 * * * # Every day at 00:00 UTC
workflow_dispatch:

permissions:
@@ -19,11 +19,13 @@ jobs:
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
uses: julia-actions/setup-julia@v2
with:
version: "1"
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: Use Julia cache
uses: julia-actions/cache@v2
- name: "Add the General registry via Git"
run: |
import Pkg
6 changes: 4 additions & 2 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -29,10 +29,12 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v2
- run: |
julia --project=docs -e '
using Pkg
52 changes: 52 additions & 0 deletions .github/workflows/ReusableTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Reusable test

on:
workflow_call:
inputs:
version:
required: false
type: string
default: "1"
os:
required: false
type: string
default: ubuntu-latest
arch:
required: false
type: string
default: x64
allow_failure:
required: false
type: boolean
default: false
run_codecov:
required: false
type: boolean
default: false
secrets:
codecov_token:
required: true

jobs:
test:
name: Julia ${{ inputs.version }} - ${{ inputs.os }} - ${{ inputs.arch }} - ${{ github.event_name }}
runs-on: ${{ inputs.os }}
continue-on-error: ${{ inputs.allow_failure }}

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ inputs.version }}
arch: ${{ inputs.arch }}
- name: Use Julia cache
uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
if: ${{ inputs.run_codecov }}
- uses: codecov/codecov-action@v4
if: ${{ inputs.run_codecov }}
with:
file: lcov.info
token: ${{ secrets.codecov_token }}
62 changes: 12 additions & 50 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -4,10 +4,6 @@ on:
push:
branches:
- main
paths:
- "src/**"
- "test/**"
- "*.toml"
tags: ["*"]
pull_request:
branches:
@@ -17,63 +13,29 @@ on:
- "test/**"
- "*.toml"
types: [opened, synchronize, reopened]

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/') }}
workflow_dispatch:

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
uses: ./.github/workflows/ReusableTest.yml
with:
os: ${{ matrix.os }}
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
allow_failure: ${{ matrix.allow_failure }}
run_codecov: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }}
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
version:
- "1.6"
- "1"
- "nightly"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
#- macOS-latest
#- windows-latest
arch:
- x64
allow_failure: [false]
include:
- version: "nightly"
os: ubuntu-latest
arch: x64
allow_failure: true
- version: "nightly"
os: macOS-latest
arch: x64
allow_failure: true
- version: "nightly"
os: windows-latest
arch: x64
allow_failure: true
steps:
- 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
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
40 changes: 28 additions & 12 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -3,19 +3,35 @@ using Documenter

DocMeta.setdocmeta!(TulipaIO, :DocTestSetup, :(using TulipaIO); recursive = true)

const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers

function nice_name(file)
file = replace(file, r"^[0-9]*-" => "")
if haskey(page_rename, file)
return page_rename[file]
end
return splitext(file)[1] |> x -> replace(x, "-" => " ") |> titlecase
end

makedocs(;
modules = [TulipaIO],
doctest = true,
linkcheck = true,
authors = "Suvayu Ali <fatkasuvayu+linux@gmail.com> and contributors",
repo = "https://github.com/TulipaEnergy/TulipaIO.jl/blob/{commit}{path}#{line}",
sitename = "TulipaIO.jl",
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
canonical = "https://TulipaEnergy.github.io/TulipaIO.jl",
assets = ["assets/style.css"],
),
pages = ["Home" => "index.md", "Reference" => "reference.md"],
modules = [TulipaIO],
doctest = true,
linkcheck = false, # Rely on Lint.yml/lychee for the links
authors = "Suvayu Ali <fatkasuvayu+linux@gmail.com> and contributors",
repo = "https://github.com/TulipaEnergy/TulipaIO.jl/blob/{commit}{path}#{line}",
sitename = "TulipaIO.jl",
format = Documenter.HTML(;
prettyurls = true,
canonical = "https://TulipaEnergy.github.io/TulipaIO.jl",
assets = ["assets/style.css"],
),
pages = [
"Home" => "index.md"
[
nice_name(file) => file for
file in readdir(joinpath(@__DIR__, "src")) if file != "index.md" && splitext(file)[2] == ".md"
]
],
)

deploydocs(; repo = "github.com/TulipaEnergy/TulipaIO.jl", push_preview = true)
25 changes: 25 additions & 0 deletions docs/src/90-contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# [Contributing guidelines](@id contributing)

First of all, thanks for the interest!

We welcome all kinds of contribution, including, but not limited to code, documentation, examples, configuration, issue creating, etc.

Be polite and respectful, and follow the code of conduct.

## Bug reports and discussions

If you think you found a bug, feel free to open an [issue](https://github.com/TulipaEnergy/TulipaIO.jl/issues).
Focused suggestions and requests can also be opened as issues.
Before opening a pull request, start an issue or a discussion on the topic, please.

## Working on an issue

If you found an issue that interests you, comment on that issue what your plans are.
If the solution to the issue is clear, you can immediately create a pull request (see below).
Otherwise, say what your proposed solution is and wait for a discussion around it.

!!! tip
Feel free to ping us after a few days if there are no responses.

If your solution involves code (or something that requires running the package locally), check the [developer documentation](90-developer.md).
Otherwise, you can use the GitHub interface directly to create your pull request.
Loading

0 comments on commit d549e17

Please sign in to comment.