Skip to content

Commit

Permalink
Merge branch 'main' into SamuelBrand1/issue7
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 authored Feb 12, 2024
2 parents 88952c0 + 7362a2e commit bd24ef0
Show file tree
Hide file tree
Showing 16 changed files with 1,625 additions and 48 deletions.
40 changes: 40 additions & 0 deletions .github/actions/install-julia/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Install Julia
description: Installs a user-specified version of Julia
inputs:
version:
description: 'The version of Julia to install (e.g., 1.10.0)'
required: true
default: '1.10.0'
runs:
using: composite
steps:
- name: Cache Julia binary
id: cache-julia
uses: actions/cache@v3
with:
path: ~/julia
key: julia-binary-${{ inputs.version }}
restore-keys: |
julia-binary-${{ inputs.version }}
- name: Install Julia
if: steps.cache-julia.outputs.cache-hit != 'true'
run: |
mkdir -p ~/julia
version=$(echo ${{ inputs.version }} | cut -d. -f1,2)
wget https://julialang-s3.julialang.org/bin/linux/x64/$version/julia-${{ inputs.version }}-linux-x86_64.tar.gz -O ~/julia/julia.tar.gz
shell: bash

- name: Unzip Julia
run: tar -xzf ~/julia/julia.tar.gz -C ~/julia --strip-components=1
shell: bash

- run: echo "$HOME/julia/bin" >> $GITHUB_PATH
shell: bash

- uses: actions/cache@v3
with:
path: |
~/.julia
~/.cache/julia
key: julia-${{ inputs.version }}-${{ hashFiles('**/*.toml') }}
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: ./.github/actions/install-julia
with:
version: '1.10.0'
- run: julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
- uses: ./.github/actions/pre-commit
17 changes: 17 additions & 0 deletions .github/workflows/test-EpiAware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test EpiAware

on:
pull_request:
push:
branches: [main]

jobs:
test-EpiAware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-julia
with:
version: '1.10.0'
- name: Run unit tests for EpiAware
run: julia --project=EpiAware -e 'using Pkg; Pkg.test()'
43 changes: 6 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,18 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
#####
# Python
- repo: https://github.com/psf/black
rev: 23.10.0
hooks:
- id: black
args: ['--line-length', '79']
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ['--profile', 'black',
'--line-length', '79']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.0
hooks:
- id: ruff
#####
# R
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9023
hooks:
- id: style-files
- id: lintr
#####
# Java
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-java
args: [--aosp,--autofix]
#####
# Julia
# Due to lack of first-class Julia support, this needs Julia local install
# and JuliaFormatter.jl installed in the library
# - repo: https://github.com/domluna/JuliaFormatter.jl
# rev: v1.0.39
# hooks:
# - id: julia-formatter
# and JuliaFormatter.jl installed in the library
- repo: https://github.com/domluna/JuliaFormatter.jl
rev: v1.0.39
hooks:
- id: julia-formatter
#####
# Secrets
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: package.lock.json
exclude: '.*/Manifest\.toml$'
2 changes: 1 addition & 1 deletion EpiAware/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "994dd97f3407acb923def45029b96a36ab4b1ffe"
project_hash = "b4d488971893c2da3a7e5ee0a7a6da358a2c3ba6"

[[deps.ADTypes]]
git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245"
Expand Down
7 changes: 0 additions & 7 deletions EpiAware/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.1.0-DEV"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Expand All @@ -20,9 +19,3 @@ Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"

[compat]
julia = "1.9,1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
2 changes: 1 addition & 1 deletion EpiAware/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Readme for EpiAware
# EpiAware
Loading

0 comments on commit bd24ef0

Please sign in to comment.