Skip to content

Commit 71ba254

Browse files
committed
Add template using pkg.jl
1 parent 8e4af81 commit 71ba254

16 files changed

Lines changed: 248 additions & 25 deletions

.JuliaFormatter.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# See https://domluna.github.io/JuliaFormatter.jl/stable/ for a list of options
2+
style = "blue"

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- '1.11'
27+
os:
28+
- ubuntu-latest
29+
arch:
30+
- x64
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: julia-actions/setup-julia@v2
34+
with:
35+
version: ${{ matrix.version }}
36+
arch: ${{ matrix.arch }}
37+
- uses: julia-actions/cache@v2
38+
- uses: julia-actions/julia-buildpkg@v1
39+
- uses: julia-actions/julia-runtest@v1
40+
docs:
41+
name: Documentation
42+
runs-on: ubuntu-latest
43+
permissions:
44+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
45+
contents: write
46+
statuses: write
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: julia-actions/setup-julia@v2
50+
with:
51+
version: '1'
52+
- uses: julia-actions/cache@v2
53+
- name: Configure doc environment
54+
shell: julia --project=docs --color=yes {0}
55+
run: |
56+
using Pkg
57+
Pkg.develop(PackageSpec(path=pwd()))
58+
Pkg.instantiate()
59+
- uses: julia-actions/julia-buildpkg@v1
60+
- uses: julia-actions/julia-docdeploy@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
64+
- name: Run doctests
65+
shell: julia --project=docs --color=yes {0}
66+
run: |
67+
using Documenter: DocMeta, doctest
68+
using MetropolisAlgorithm
69+
DocMeta.setdocmeta!(MetropolisAlgorithm, :DocTestSetup, :(using MetropolisAlgorithm); recursive=true)
70+
doctest(MetropolisAlgorithm)

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.gitignore

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
# Files generated by invoking Julia with --code-coverage
2-
*.jl.cov
3-
*.jl.*.cov
4-
5-
# Files generated by invoking Julia with --track-allocation
6-
*.jl.mem
7-
8-
# System-specific files and directories generated by the BinaryProvider and BinDeps packages
9-
# They contain absolute paths specific to the host computer, and so should not be committed
10-
deps/deps.jl
11-
deps/build.log
12-
deps/downloads/
13-
deps/usr/
14-
deps/src/
15-
16-
# Build artifacts for creating documentation generated by the Documenter package
17-
docs/build/
18-
docs/site/
19-
20-
# File generated by Pkg, the package manager, based on a corresponding Project.toml
21-
# It records a fixed state of all packages used by the project. As such, it should not be
22-
# committed for packages, but should be committed for applications that require a static
23-
# environment.
24-
Manifest*.toml
1+
/Manifest*.toml
2+
/docs/Manifest*.toml
3+
/docs/build/

CITATION.bib

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@misc{MetropolisAlgorithm.jl,
2+
author = {Shuhei Ohno},
3+
title = {MetropolisAlgorithm.jl},
4+
url = {https://github.com/ohno/MetropolisAlgorithm.jl},
5+
version = {v1.0.0-DEV},
6+
year = {2025},
7+
month = {6}
8+
}

Project.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name = "MetropolisAlgorithm"
2+
uuid = "e0c51df9-7b68-45ac-a268-26cdc14101c5"
3+
authors = ["Shuhei Ohno"]
4+
version = "0.0.1"
5+
6+
[compat]
7+
julia = "1.11"

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
# MetropolisAlgorithm.jl
1+
# MetropolisAlgorithm
2+
3+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://ohno.github.io/MetropolisAlgorithm.jl/stable/)
4+
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ohno.github.io/MetropolisAlgorithm.jl/dev/)
5+
[![Build Status](https://github.com/ohno/MetropolisAlgorithm.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ohno/MetropolisAlgorithm.jl/actions/workflows/CI.yml?query=branch%3Amain)
6+
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
7+
8+
## Citing
9+
10+
See [`CITATION.bib`](CITATION.bib) for the relevant reference(s).

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
MetropolisAlgorithm = "e0c51df9-7b68-45ac-a268-26cdc14101c5"

0 commit comments

Comments
 (0)