Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation using DocumenterVitepress.jl #129

Merged
merged 23 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5f5382b
Move NEWS.md into docs to render at the site
camilogarciabotero Apr 8, 2024
c503f22
Start ignoring DocumenterVitepress local files
camilogarciabotero Apr 8, 2024
96f179a
Remove MkDocs files
camilogarciabotero Apr 8, 2024
384a007
Splitting index into more concise docs
camilogarciabotero Apr 8, 2024
8df08ed
Install DocumenterVitepress and add style.css, packages.json and conf…
camilogarciabotero Apr 8, 2024
8034510
Update make.jl for DocumenterVitepress.jl and comment old mkdocs code
camilogarciabotero Apr 8, 2024
bb29c34
Add index file with all Tidier data using home hero template
camilogarciabotero Apr 8, 2024
4400854
Remove genfile.jl run from actions
camilogarciabotero Apr 8, 2024
dd086fa
Update links to remote in make.jl
camilogarciabotero Apr 8, 2024
0aebd1b
Update make.jl with target to biuld
camilogarciabotero Apr 8, 2024
3201791
Update Documenter.yml action
camilogarciabotero Apr 8, 2024
526f6ad
Remove logo workflow
camilogarciabotero Apr 8, 2024
1e3ada1
Testing Doc action into other branch
camilogarciabotero Apr 8, 2024
3c04f09
Revert to push the main branch
camilogarciabotero Apr 8, 2024
7da7a0a
Avoid broken links in home
camilogarciabotero Apr 9, 2024
09c603c
Use less blur and on glowing color to logo
camilogarciabotero Apr 9, 2024
9f6cd05
Edit 200% on TiderPlots description
camilogarciabotero Apr 9, 2024
1dead3b
Revert gradient to title and glowing
camilogarciabotero Apr 9, 2024
046a3f8
Bump dependency versions and package version to 1.2.2.
kdpsingh Apr 9, 2024
c938eff
Bump Julia version to 1.9
kdpsingh Apr 9, 2024
59cf7a2
Removed space before julia version.
kdpsingh Apr 9, 2024
51f13a5
Update CI.yml to use Julia version 1.9
kdpsingh Apr 9, 2024
63bfbbd
Updated news.md
kdpsingh Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.8'
- '1.9'
- 'nightly'
os:
- ubuntu-latest
Expand Down
56 changes: 35 additions & 21 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,50 @@
name: Documenter
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy documentation

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches:
- main
tags: '*'
- main
tags: ['*']
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
actions: write


# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
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/') }}
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/cache@v1
with:
cache-registries: "false"
- name: Install documentation dependencies
run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate()'
- name: Build and deploy
- name: Checkout
uses: actions/checkout@v4
with: # Fetches the last commit only
fetch-depth: 0
- name: Setup Julia
uses: julia-actions/setup-julia@v2
- name: Pull Julia cache
uses: julia-actions/cache@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988
JULIA_DEBUG: "Documenter"
DATADEPS_ALWAYS_ACCEPT: true
run: |
julia --code-coverage=user --project=docs/ --color=yes docs/genfiles.jl
julia --code-coverage=user --project=docs/ --color=yes docs/make.jl
DATADEPS_ALWAYS_ACCEPT: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ docs/docs
docs/site
docs/build
docs/var
docs/node_modules/
docs/Manifest.toml
docs/package-lock.json

deps/build.jl
Manifest.toml
9 changes: 4 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tidier"
uuid = "f0413319-3358-4bb0-8e7c-0c83523a93bd"
authors = ["Karandeep Singh"]
version = "1.2.1"
version = "1.2.2"

[deps]
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand All @@ -15,15 +15,14 @@ TidierVest = "969b988e-7aed-4820-b60d-bdec252047c4"

[compat]
Reexport = "0.2, 1"
TidierData = "0.14, 1"
TidierPlots = "0.5, 1"
TidierData = "0.15, 1"
TidierPlots = "0.6, 1"
TidierCats = "0.1, 1"
TidierDates = "0.2, 1"
TidierStrings = "0.2, 1"
TidierText = "0.1, 1"
TidierVest = "0.4, 1"

julia = "1.6"
julia = "1.9"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
Tidier = "f0413319-3358-4bb0-8e7c-0c83523a93bd"
30 changes: 0 additions & 30 deletions docs/_overrides/partials/source.html

This file was deleted.

87 changes: 63 additions & 24 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,34 +1,73 @@
using Documenter, DocumenterMarkdown
using Documenter, DocumenterVitepress
using Tidier, DataFrames, RDatasets

DocTestMeta = quote
using Tidier, DataFrames, Chain, Statistics
end

DocMeta.setdocmeta!(Tidier,
:DocTestSetup,
DocTestMeta;
recursive=true)
makedocs(
modules=[Tidier],
clean=true,
doctest=true,
#format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
sitename="Tidier.jl",
authors="Karandeep Singh et al.",
strict=[
:doctest,
:linkcheck,
:parse_error,
:example_block,
# Other available options are
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block,
# :footnote, :meta_block, :missing_docs, :setup_block
], checkdocs=:all, format=Markdown(), draft=false,
build=joinpath(@__DIR__, "docs")
recursive=true
)

deploydocs(; repo="https://github.com/TidierOrg/Tidier.jl", push_preview=true,
deps=Deps.pip("mkdocs", "pygments", "python-markdown-math", "mkdocs-material",
"pymdown-extensions", "mkdocstrings", "mknotebooks",
"pytkdocs_tweaks", "mkdocs_include_exclude_files", "jinja2", "mkdocs-video"),
make=() -> run(`mkdocs build`), target="site", devbranch="main")
pgs = [
"Home" => "index.md",
"Get Started" => ["Installation" => "installation.md", "A Simple Data Analysis" => "simple-analysis.md"],
"API Reference" => "reference.md",
"Changelog" => "news.md",
"FAQ" => "faq.md",
# "Contributing" => "contributing.md",
]

fmt = DocumenterVitepress.MarkdownVitepress(
repo = "https://github.com/TidierOrg/Tidier.jl",
devurl = "dev",
# deploy_url = "yourgithubusername.github.io/Tidier.jl.jl",
)

makedocs(;
modules = [Tidier],
authors = "Karandeep Singh et al.",
repo = "https://github.com/TidierOrg/Tidier.jl",
sitename = "Tidier.jl",
format = fmt,
pages= pgs,
warnonly = true,
)

deploydocs(;
repo = "https://github.com/TidierOrg/Tidier.jl",
target="build", # this is where Vitepress stores its output
branch = "gh-pages",
devbranch = "main",
push_preview = true,
)

# makedocs(
# modules=[Tidier],
# clean=true,
# doctest=true,
# #format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
# sitename="Tidier.jl",
# authors="Karandeep Singh et al.",
# strict=[
# :doctest,
# :linkcheck,
# :parse_error,
# :example_block,
# # Other available options are
# # :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block,
# # :footnote, :meta_block, :missing_docs, :setup_block
# ],
# checkdocs=:all,
# format=Markdown(),
# draft=false,
# build=joinpath(@__DIR__, "docs")
# )

# deploydocs(; repo="https://github.com/TidierOrg/Tidier.jl", push_preview=true,
# deps=Deps.pip("mkdocs", "pygments", "python-markdown-math", "mkdocs-material",
# "pymdown-extensions", "mkdocstrings", "mknotebooks",
# "pytkdocs_tweaks", "mkdocs_include_exclude_files", "jinja2", "mkdocs-video"),
# make=() -> run(`mkdocs build`), target="site", devbranch="main")
118 changes: 0 additions & 118 deletions docs/mkdocs.yml

This file was deleted.

18 changes: 18 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"scripts": {
"docs:dev": "vitepress dev build/.documenter",
"docs:build": "vitepress build build/.documenter",
"docs:preview": "vitepress preview build/.documenter"
},
"dependencies": {
"@shikijs/transformers": "^1.1.7",
"markdown-it": "^14.0.0",
"markdown-it-footnote": "^4.0.0",
"markdown-it-mathjax3": "^4.3.2",
"vitepress-plugin-tabs": "^0.5.0",
"vitest": "^1.3.0"
},
"devDependencies": {
"vitepress": "^1.0.2"
}
}
Loading
Loading