Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
datejada committed Nov 3, 2023
0 parents commit 1d06c10
Show file tree
Hide file tree
Showing 35 changed files with 1,109 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
align_assignment = true
align_matrix = true
align_pair_arrow = true
align_struct_field = true
conditional_to_if = true
format_docstrings = true
format_markdown = false
indent = 4
normalize_line_endings = "unix"
remove_extra_newlines = true
separate_kwargs_with_semicolon = true
verbose = true
14 changes: 14 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changes here will be overwritten by Copier
AddMacToCI: true
AddWinToCI: false
AuthorEmail: diego.tejadaarango@tno.nl
AuthorName: TNO
JuliaMinVersion: '1.6'
License: Apache-2.0
PackageName: TulipaProfileFitting
PackageOwner: TulipaEnergy
PackageUUID: 0aa31362-0b7e-4e8d-8385-676712fa7ef3
RunJuliaNightlyOnCI: true
UseCirrusCI: false
_commit: v0.2.3
_src_path: https://github.com/abelsiqueira/COPIERTemplate.jl
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/ADDITION-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Addition Request"
description: Create a ticket to request a new addition (or feature)
title: "<title>"
labels: ["Type: addition"]
body:
- type: textarea
id: description
attributes:
label: "Description"
description: Provide an explanation of the addition
placeholder: Describe your addition request
validations:
required: true
- type: textarea
id: related_issues
attributes:
label: "Related Issues"
description: Existing issues related to this addition
placeholder: "#Issues IDs"
validations:
required: false
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Bug Report"
description: Create a new ticket for a bug.
title: "[BUG] - <title>"
labels: ["Type: bug"]
body:
- type: textarea
id: description
attributes:
label: "Description"
description: Please enter an explicit description of your issue
placeholder: Short and explicit description of your incident...
validations:
required: true
- type: textarea
id: reprod
attributes:
label: "Reproduction steps"
description: Please describe steps to reproduce your issue
value: |
1. Go to '...'
2. Using input data '....'
3. With function '....'
4. [Specific error message]
render: bash
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Logs"
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: bash
validations:
required: false
- type: dropdown
id: os
attributes:
label: "OS"
description: What is the impacted environment ?
multiple: true
options:
- Windows
- Linux
- Mac
validations:
required: false
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/IMPROVEMENT-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Improvement Request"
description: Create a ticket to request an improvement of something that already exists.
title: "<title>"
labels: ["Type: improvement"]
body:
- type: textarea
id: summary
attributes:
label: "What and Why"
description: Explain the improvement
placeholder: Describe your request, including why it's an improvement
validations:
required: true
- type: textarea
id: drawbacks
attributes:
label: "Possible Drawbacks"
description: What are possible drawbacks of your improvement request?
placeholder: Identify the drawbacks, while remaining neutral
validations:
required: false
- type: textarea
id: related_issues
attributes:
label: "Related Issues"
description: Existing issues related to this improvement
placeholder: "#Issues IDs"
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pull request details

## Describe the changes made in this pull request

<!-- include screenshots if that helps the review -->

## List of related issues or pull requests

Closes #ISSUE_NUMBER

## Collaboration confirmation

As a contributor I confirm

- [ ] I read and followed the instructions in README.dev.md
- [ ] The documentation is up to date with the changes introduced in this Pull Request (or NA)
- [ ] Tests are passing
- [ ] Lint is passing
49 changes: 49 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# CompatHelper v3.5.0
name: CompatHelper

on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- 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"
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 }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
52 changes: 52 additions & 0 deletions .github/workflows/Copier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Copier Update

on:
schedule:
- cron: 0 7 1/7 * *
workflow_dispatch:

jobs:
Copier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.COPIER_PAT }}
- uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v1
- name: Install JuliaFormatter.jl
run: julia -e 'using Pkg; pkg"add JuliaFormatter"'
- name: Setup Python
uses: actions/setup-python@v4
- name: Check for update in the template
run: |
pip install copier
copier update -A -o rej
echo -e "Automated changed by Copier.yml workflow\n" > /tmp/body.md
echo -e 'Rejected changes (if any):\n```diff\n' >> /tmp/body.md
find . -name "*.rej" | xargs cat >> /tmp/body.md
find . -name "*.rej" | xargs rm -f
echo -e '```' >> /tmp/body.md
git diff
- name: Run pre-commit to run the formatters
run: |
pip install pre-commit
pre-commit run -a || true # Ignore pre-commit errors
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.COPIER_PAT }}
commit-message: ":robot: COPIERTemplate.jl update"
title: "[AUTO] COPIERTemplate.jl update"
body-path: /tmp/body.md
branch: auto-copier-template-update
delete-branch: true
labels: configuration, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
51 changes: 51 additions & 0 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docs

on:
push:
branches:
- main
paths:
- "docs/**"
- "src/**"
- "*.toml"
tags: ["*"]
pull_request:
branches:
- main
paths:
- "docs/**"
- "src/**"
- "*.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/') }}

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: "1"
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using TulipaProfileFitting
DocMeta.setdocmeta!(TulipaProfileFitting, :DocTestSetup, :(using TulipaProfileFitting); recursive=true)
doctest(TulipaProfileFitting)'
- run: julia --project=docs docs/make.jl
env:
JULIA_PKG_SERVER: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
37 changes: 37 additions & 0 deletions .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on:
push:
branches:
- main
tags: ["*"]
pull_request:

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/') }}
permissions:
contents: read
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v1
- name: Install JuliaFormatter.jl
run: julia -e 'using Pkg; pkg"add JuliaFormatter"'
- name: Setup Python
uses: actions/setup-python@v4
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: SKIP=no-commit-to-branch pre-commit run -a
36 changes: 36 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
type: number
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 }}
ssh: ${{ secrets.DOCUMENTER_KEY }}

Loading

0 comments on commit 1d06c10

Please sign in to comment.