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

Template #20

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions docs/_custom/css/extra.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
:root {
--md-primary-fg-color: #6495ED;
[data-md-color-scheme="default"] {
--md-primary-fg-color: #4378dc;
--md-primary-fg-color--light: #4378dc;
--md-primary-fg-color--dark: #4378dc;
}

[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
[data-md-color-scheme="slate"] {
--md-typeset-a-color: #4378dc;
--md-primary-fg-color: #253758;
--md-primary-fg-color--dark: #253758;
}


.md-grid {
max-width: 1350px;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/community/CHANGES.md
2 changes: 1 addition & 1 deletion docs/community/CONTRIBUTING.md
2 changes: 1 addition & 1 deletion docs/community/DEPLOYMENT.md
2 changes: 1 addition & 1 deletion docs/community/DEVELOPMENT.md
5 changes: 5 additions & 0 deletions docs/community/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- toc
---

# Community

Welcome to the **Community** hub! 🚀
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
hide:
- navigation
- toc
---

# Examples
Expand Down
26 changes: 26 additions & 0 deletions docs/examples/sudoku.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Sudoku

Generate example documentation



=== "Usage :material-file-code-outline:"

``` markdown title="Simple encoding source"
::: examples/sudoku/encoding.lp
handler: asp
options:
source: true

```

!!! warning "Don't forget to use `handler: asp`"

=== "Output :material-palette-outline:"


::: examples/sudoku/encoding.lp
handler: asp
options:
source: true
dependency: true
17 changes: 3 additions & 14 deletions docs/getting_started.md → docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
hide:
- navigation
icon: "material/wrench"
---

# Getting started

## Installation

=== "Pip"
### Using `pip`

```console
pip install mkdoclingo
```

=== "Development mode"
### Development mode

```console
git clone https://github.com/potassco/mkdoclingo.git/
Expand All @@ -23,13 +22,3 @@ pip install -e .[all]

!!! warning
Use only for development purposes

## Usage

### Command line interface

Details about the command line usage can be found with:

```console
mkdoclingo -h
```
5 changes: 5 additions & 0 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- toc
---

# Reference

Welcome to the **Reference** section! 📚
Expand Down
13 changes: 13 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
icon: "material/rocket-launch"
---

# Usage

## Command line interface

Details about the command line usage can be found with:

```console
mkdoclingo -h
```
15 changes: 15 additions & 0 deletions examples/sudoku/encoding.lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#const dim = 3.
val(1..dim*dim).
pos(X,Y) :- val(X), val(Y).

subgrid(X,Y,(((X-1)/dim)*dim+((Y-1)/dim))) :- pos(X,Y).


1 { sudoku(X,Y,V) : val(V) } 1 :- pos(X,Y).

:- sudoku(X,Y,V), sudoku(X',Y,V), X != X'.
:- sudoku(X,Y,V), sudoku(X,Y',V), Y != Y'.
:- sudoku(X,Y,V), sudoku(X',Y',V), subgrid(X,Y,S), subgrid(X',Y',S), (X,Y)!=(X',Y').


sudoku(X,Y,V) :- initial(X,Y,V).
35 changes: 35 additions & 0 deletions examples/sudoku/instance.lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
initial(5,1,8).
initial(6,2,7).
initial(7,1,4).
initial(8,2,2).
initial(8,1,6).
initial(9,2,9).
initial(3,3,9).
initial(4,3,3).
initial(6,3,6).
initial(7,3,5).
initial(8,3,7).
initial(1,4,7).
initial(2,4,6).
initial(4,4,4).
initial(7,4,9).
initial(8,4,3).
initial(2,5,3).
initial(3,5,2).
initial(4,5,8).
initial(7,5,7).
initial(9,5,5).
initial(1,6,9).
initial(2,6,1).
initial(3,6,8).
initial(8,6,4).
initial(9,6,6).
initial(1,7,6).
initial(5,7,7).
initial(6,7,8).
initial(8,7,9).
initial(9,7,4).
initial(2,8,7).
initial(3,8,3).
initial(4,8,6).
initial(5,8,9).
107 changes: 0 additions & 107 deletions init.py

This file was deleted.

34 changes: 19 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ theme:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
icon: material/weather-night
name: Switch to dark mode
primary: custom #, [red, pink, purple, deep, purple, indigo, blue, light blue, cyan, teal, green, light green, lime, yellow, amber, orange, deep orange, brown, grey, blue, grey, black, white]
accent: indigo # [red, pink, purple, deep, purple, indigo, blue, light, blue, cyan, teal, green, light, green, lime, yellow, amber, orange, deep orange]
Expand All @@ -55,7 +55,7 @@ theme:
primary: custom #, [red, pink, purple, deep, purple, indigo, blue, light blue, cyan, teal, green, light green, lime, yellow, amber, orange, deep orange, brown, grey, blue, grey, black, white]
accent: indigo # [red, pink, purple, deep, purple, indigo, blue, light, blue, cyan, teal, green, light, green, lime, yellow, amber, orange, deep orange]
toggle:
icon: material/brightness-4
icon: material/weather-sunny
name: Switch to light mode

extra:
Expand Down Expand Up @@ -115,18 +115,22 @@ plugins:
show_source: false

nav:
- Home: index.md
- Getting Started: getting_started.md
- Examples: examples/index.md
# - Home: index.md
- Getting Started:
- Installation: installation.md
- Usage: usage.md
- Examples:
- examples/index.md
- examples/sudoku.md
- Reference:
- reference/index.md
- Problem: reference/problem/index.md
- Encodings: reference/encodings/index.md
- API: reference/api/index.md
- reference/index.md
- Problem: reference/problem/index.md
- Encodings: reference/encodings/index.md
- API: reference/api/index.md
- Community:
- community/index.md
- Help: community/help.md
- Changes: community/CHANGES.md
- Contributing: community/CONTRIBUTING.md
- Development: community/DEVELOPMENT.md
- Deployment: community/DEPLOYMENT.md
- community/index.md
- Help: community/help.md
- Changes: community/CHANGES.md
- Contributing: community/CONTRIBUTING.md
- Development: community/DEVELOPMENT.md
- Deployment: community/DEPLOYMENT.md
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ format = ["black", "isort", "autoflake"]
lint_pylint = ["pylint"]
typecheck = ["types-setuptools", "mypy"]
test = ["coverage[toml]"]
doc = ["mkdocs", "mkdocs-material", "mkdocstrings[python]"]
doc = ["mkdocs", "mkdocs-material", "mkdocstrings[python]", "tree-sitter"]
dev = ["mkdoclingo[test,typecheck,lint_pylint]"]

[project.scripts]
Expand Down

This file was deleted.

Loading