diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..c5cc103 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,6 @@ +coverage: + status: + project: + default: + target: 90% # the required coverage value + threshold: 0.5% # the leniency in hitting the target diff --git a/.github/workflows/Register.yml b/.github/workflows/Register.yml new file mode 100644 index 0000000..5b7cd3b --- /dev/null +++ b/.github/workflows/Register.yml @@ -0,0 +1,16 @@ +name: Register Package +on: + workflow_dispatch: + inputs: + version: + description: Version to register or component to bump + required: true +jobs: + register: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: julia-actions/RegisterAction@latest + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 1a056c2..abde96d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ + + # AdversarialRobustness -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/stable/) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/dev/) -[![Build Status](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml?query=branch%3Amaster) -[![Coverage](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl) +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/dev/) [![Build Status](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl) [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) diff --git a/README.qmd b/README.qmd new file mode 100644 index 0000000..283955a --- /dev/null +++ b/README.qmd @@ -0,0 +1,19 @@ +--- +format: + commonmark: + variant: -raw_html+tex_math_dollars + wrap: none + mermaid-format: png +crossref: + fig-prefix: Figure + tbl-prefix: Table +output: asis +--- + +# AdversarialRobustness + +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/stable/) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl/dev/) +[![Build Status](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaTrustworthyAI/AdversarialRobustness.jl) +[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) diff --git a/_quarto.yml b/_quarto.yml new file mode 100644 index 0000000..928b28e --- /dev/null +++ b/_quarto.yml @@ -0,0 +1,15 @@ +project: + title: "AdversarialRobustness.jl" + execute-dir: project + render: + - "!docs/src/*.md" +crossref: + fig-prefix: Figure + tbl-prefix: Table +resource-path: + - docs/src/assets +format: + commonmark: + variant: -raw_html+tex_math_dollars + wrap: preserve + mermaid-format: png diff --git a/docs/make.jl b/docs/make.jl old mode 100644 new mode 100755 index e8c0c16..85b29fb --- a/docs/make.jl +++ b/docs/make.jl @@ -1,3 +1,48 @@ +#!/usr/bin/env julia +# +# + +if "--help" ∈ ARGS + println( + """ +docs/make.jl + +Render the documentation using Quarto with optional arguments + +Arguments +* `--help` - print this help and exit without rendering the documentation +* `--prettyurls` – toggle the prettyurls part to true (which is otherwise only true on CI) +* `--project` - specify the project name (default: `$(@__DIR__)`) +* `--quarto` – run the Quarto notebooks from the `tutorials/` folder before generating the documentation + this has to be run locally at least once for the `tutorials/*.md` files to exist that are included in + the documentation (see `--exclude-tutorials`) for the alternative. + If they are generated once they are cached accordingly. + Then you can spare time in the rendering by not passing this argument. + If quarto is not run, some tutorials are generated as empty files, since they + are referenced from within the documentation. +""", + ) + exit(0) +end + +# (a) Specify project +using Pkg +if any(contains.(ARGS, "--project")) + @assert sum(contains.(ARGS, "--project")) == 1 "Only one environment can be specified using the `--project` argument." + _path = + ARGS[findall(contains.(ARGS, "--project"))][1] |> + x -> replace(x, "--project=" => "") + Pkg.activate(_path) +else + Pkg.activate(@__DIR__) +end + +# (b) Did someone say render? +if "--quarto" ∈ ARGS + @info "Rendering docs" + run(`quarto render $(joinpath(@__DIR__, "src"))`) +end + using AdversarialRobustness using Documenter @@ -5,11 +50,11 @@ DocMeta.setdocmeta!(AdversarialRobustness, :DocTestSetup, :(using AdversarialRob makedocs(; modules=[AdversarialRobustness], - authors="Rithik Appachi Senthilkumar", + authors="Rithik Appachi Senthilkumar and contributors", sitename="AdversarialRobustness.jl", format=Documenter.HTML(; canonical="https://JuliaTrustworthyAI.github.io/AdversarialRobustness.jl", - edit_link="master", + edit_link="main", assets=String[], ), pages=[ @@ -19,5 +64,5 @@ makedocs(; deploydocs(; repo="github.com/JuliaTrustworthyAI/AdversarialRobustness.jl", - devbranch="master", + devbranch="main", ) diff --git a/docs/src/index.qmd b/docs/src/index.qmd new file mode 100644 index 0000000..ccf47cf --- /dev/null +++ b/docs/src/index.qmd @@ -0,0 +1,14 @@ +```@meta +CurrentModule = AdversarialRobustness +``` + +# AdversarialRobustness + +Documentation for [AdversarialRobustness](https://github.com/JuliaTrustworthyAI/AdversarialRobustness.jl). + +```@index +``` + +```@autodocs +Modules = [AdversarialRobustness] +```