From 13b7658d76b34e427289eccd4fd3bfd943970cc4 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Wed, 1 May 2024 11:13:41 -0700 Subject: [PATCH] First attempt on adding docs --- .github/workflows/make_docs.yml | 29 +++++++++++++++++++++++++++++ docs/Project.toml | 2 ++ docs/make.jl | 12 ++++++++++++ docs/src/index.md | 25 +++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 .github/workflows/make_docs.yml create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.github/workflows/make_docs.yml b/.github/workflows/make_docs.yml new file mode 100644 index 0000000..b58f1c7 --- /dev/null +++ b/.github/workflows/make_docs.yml @@ -0,0 +1,29 @@ +name: Make Docs +on: + push: + branches: + - master + - docs + paths: + - '.github/workflows/make_docs.yml' + - 'src/' + - 'docs/**' + tags: '*' +jobs: + make_docs: + permissions: + contents: write + statuses: write + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/julia-docdeploy@v1 + - name: Install dependencies + run: | + julia --project=docs/ -e 'using Pkg; Pkg.add(; url="git@github.com:ProjectTorreyPines/IMASDD.jl.git", rev="master"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + run: julia --project=docs/ docs/make.jl \ No newline at end of file diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..9311ade --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..26aa732 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,12 @@ +using Documenter +using GGDUtils + +makedocs(; + modules=[GGDUtils], + format=Documenter.HTML(), + sitename="GGDUtils", +) + +deploydocs(; + repo="github.com/ProjectTorreyPines/GGDUtils.jl.git", +) \ No newline at end of file diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..c4e3156 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,25 @@ + +# GGDUtils.jl + +## Installation + +Clone the repo and run make command: + +```bash +% GGDUtils % make help +Help Menu + +make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories +make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones +make clean: Deletes Project.toml and Manifest.toml for a fresh start +``` + +## Interpolations + +Several interpolation functions are available to create interpolaiton functions for data present in a GGD represented over a particular grid subset: + +```@docs +interp +get_TPS_mats +get_kdtree +``` \ No newline at end of file