Skip to content

Commit

Permalink
adds documentation files
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Mar 30, 2024
1 parent 2b5ed8a commit 98c4be2
Show file tree
Hide file tree
Showing 15 changed files with 420 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 drizk1 <rizkytennis@gmail.com> and contributors
Copyright (c) 2024 Daniel Rizk <rizk.daniel.12@gmail.com> and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TidierDB"
uuid = "86993f9b-bbba-4084-97c5-ee15961ad48b"
authors = ["drizk1 <rizkytennis@gmail.com> and contributors"]
version = "1.0.0-DEV"
authors = ["Daniel Rizk <rizk.daniel.12@gmail.com> and contributors"]
version = "0.1.0-DEV"

[deps]
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"
Expand Down
Binary file added docs/.DS_Store
Binary file not shown.
10 changes: 10 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[deps]
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DuckDB = "d2f5444f-75bc-4fdf-ac35-56f514c445e1"
LibPQ = "194296ae-ab2e-5f79-8cd4-7183a0a5a0d1"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
TidierDB = "86993f9b-bbba-4084-97c5-ee15961ad48b"
Binary file added docs/_overrides/.DS_Store
Binary file not shown.
30 changes: 30 additions & 0 deletions docs/_overrides/partials/source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% import "partials/language.html" as lang with context %}
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</div>
<div class="md-source__repository">
{{ config.repo_name }}
</div>
</a>
{% if config.theme.twitter_url %}
<a href="{{ config.theme.twitter_url }}" title="Go to Twitter" class="md-source">
<div class="md-source__icon md-icon">
{% include ".icons/fontawesome/brands/twitter.svg" %}
</div>
<div class="md-source__repository">
{{ config.theme.twitter_name }}
</div>
</a>
{% endif %}
{% if config.theme.sponsor_url %}
<a href="{{ config.theme.sponsor_url }}" title="Go to Sponsor" class="md-source">
<div class="md-source__icon md-icon">
{% include ".icons/fontawesome/regular/heart.svg" %}
</div>
<div class="md-source__repository">
{{ config.theme.sponsor_name }}
</div>
</a>
{% endif %}
Binary file added docs/examples/.DS_Store
Binary file not shown.
Empty file.
28 changes: 28 additions & 0 deletions docs/genfiles.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Documenter, DocumenterMarkdown
using Literate

get_example_path(p) = joinpath(@__DIR__, ".", "examples", p)
OUTPUT = joinpath(@__DIR__, "src", "examples", "generated")

folders = readdir(joinpath(@__DIR__, ".", "examples"))
setdiff!(folders, [".DS_Store"])

function getfiles()
srcsfiles = []
for f in folders
names = readdir(joinpath(@__DIR__, ".", "examples", f))
setdiff!(names, [".DS_Store"])
fpaths = "$(f)/" .* names
srcsfiles = vcat(srcsfiles, fpaths...)
end
return srcsfiles
end

srcsfiles = getfiles()

for (d, paths) in (("tutorial", srcsfiles),)
for p in paths
Literate.markdown(get_example_path(p), joinpath(OUTPUT, dirname(p));
documenter=true)
end
end
34 changes: 34 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Documenter, DocumenterMarkdown
using Tidier, TidierDB

DocTestMeta = quote
using Tidier, TidierDB, DataFrames, Chain
end
DocMeta.setdocmeta!(TidierDB,
:DocTestSetup,
DocTestMeta;
recursive=true)
makedocs(
modules=[TidierDB],
clean=true,
doctest=false,
#format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
sitename="TidierDB.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="github.com/TidierOrg/TidierDB.jl.git", push_preview=true,
deps=Deps.pip("mkdocs", "pygments", "python-markdown-math", "mkdocs-material",
"pymdown-extensions", "mkdocstrings", "mknotebooks",
"pytkdocs_tweaks", "mkdocs_include_exclude_files", "jinja2"),
make=() -> run(`mkdocs build`), target="site", devbranch="main")
120 changes: 120 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
theme:
name: material
logo: assets/TidierDB_logo.png
features:
- content.code.copy
# - announce.dismiss
- content.code.annotate
# - content.tabs.link
#- content.tooltips
# - header.autohide
# - navigation.expand
#- navigation.indexes
# - navigation.instant
# - navigation.prune
#- navigation.sections
#- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.footer
#- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
#- toc.integrate # Table of contents is integrated on the left; does not appear separately on the right.
- header.autohide # header disappears as you scroll
palette:

# Light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: deep purple
accent: purple
toggle:
icon: material/weather-sunny
name: Switch to dark mode

# Dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: purple
accent: purple
toggle:
icon: material/weather-night
name: Switch to light mode
font:
text: Lato
icon:
repo: fontawesome/brands/github # GitHub logo in top right
#logo: "material/gridoff" # Equinox logo in top left
# favicon: "_static/icon_transparent.svg"
custom_dir: "_overrides" # Overriding part of the HTML

# These additions are my own custom ones, having overridden a partial.
#twitter_name: ""
#twitter_url: ""
site_name: TidierDB.jl
site_description: TidierDB.jl
site_author: Lazaro Alonso and Karandeep Singh
site_url: ""

repo_url: https://github.com/TidierOrg/TidierDB.jl
repo_name: TidierDB.jl
edit_uri: "" # No edit button, as some of our pages are in /docs and some in /examples via symlink, so it's impossible for them all to be accurate

strict: true # Don't allow warnings during the build process
extra_javascript:
# The below three make MathJax work, see https://squidfunk.github.io/mkdocs-material/reference/mathjax/
- _static/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/kdpsingh
- icon: fontawesome/brands/twitter
link: https://twitter.com/kdpsinghlab

extra_css:
- stylesheets/custom.css
- assets/Documenter.css

extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

markdown_extensions:
- tables
- admonition
- toc:
permalink: "¤" # Adds a clickable permalink to each section heading
toc_depth: 4
- pymdownx.arithmatex: # Render LaTeX via MathJax
generic: true
- pymdownx.details # Allowing hidden expandable regions denoted by ???
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences # Seems to enable syntax highlighting when used with the Material theme.
- pymdownx.tasklist:
custom_checkbox: true
- def_list
- pymdownx.tabbed:
alternate_style: true
- attr_list
- md_in_html
plugins:
- search # default search plugin; needs manually re-enabling when using any other plugins
- autorefs # Cross-links to headings
- include_exclude_files:
exclude:
- "_overrides"
# - mknotebooks # Jupyter notebooks
#- mkdocs-video
nav:
- "Home": "index.md"
- "Key Differences from TidierData.jl" : "examples/generated/UserGuide/key_differences.md"
- "Reference" : "reference.md"
16 changes: 16 additions & 0 deletions docs/src/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.typesetPromise()
})
22 changes: 22 additions & 0 deletions docs/src/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```@meta
DocTestSetup= quote
using TidierDB
end
```
## Index
```@index
Modules = [TidierDB]
Private = false
```

## Reference - Exported functions
```@autodocs
Modules = [TidierDB]
Private = false
```

## Reference - Internal functions
```@autodocs
Modules = [TidierDB]
Public = false
```
Loading

0 comments on commit 98c4be2

Please sign in to comment.