Skip to content
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
8 changes: 5 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ permissions:
jobs:
deploy:
runs-on: ubuntu-latest
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v5
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.x"

Expand All @@ -26,7 +26,7 @@ jobs:
run: python -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
Expand All @@ -46,7 +46,7 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
python-version: [ "3.10", "3.11" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down
48 changes: 48 additions & 0 deletions docs/.overrides/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends "main.html" %}

<!-- Content -->
{% block content %}
<style>
svg#clouds {
position: fixed;
width: 1920px;
z-index: -10;

left: -230px;
bottom: -4rem;

height: unset;
max-width: unset;
}
</style>

<script>
window.addEventListener("DOMContentLoaded", () => {
function get_path() {
const urlParams = new URLSearchParams(window.location.search);
const pathValue = urlParams.get('path');
return pathValue ? decodeURIComponent(pathValue) : "/unknown"
}

document.getElementById("path").textContent = get_path();
});
</script>

<h1>404 - Page Not Found</h1>

<p style="opacity: .75;">
The requested URL <strong><span id="path"></span></strong> was not found in this documentation.
</p>

<p style="opacity: .75;">
Try searching or go to <a href="{{ base_url }}">PyORlib's home page</a>.
</p>

<svg id="clouds" xmlns="http://www.w3.org/2000/svg" width="2611.084" height="485.677" viewBox="0 0 2611.084 485.677">
<title>Gray Clouds Background</title>
<path id="Path_39" data-name="Path 39"
d="M2379.709,863.793c10-93-77-171-168-149-52-114-225-105-264,15-75,3-140,59-152,133-30,2.83-66.725,9.829-93.5,26.25-26.771-16.421-63.5-23.42-93.5-26.25-12-74-77-130-152-133-39-120-212-129-264-15-54.084-13.075-106.753,9.173-138.488,48.9-31.734-39.726-84.4-61.974-138.487-48.9-52-114-225-105-264,15a162.027,162.027,0,0,0-103.147,43.044c-30.633-45.365-87.1-72.091-145.206-58.044-52-114-225-105-264,15-75,3-140,59-152,133-53,5-127,23-130,83-2,42,35,72,70,86,49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33,61.112,8.015,113.854-5.72,150.492-29.764a165.62,165.62,0,0,0,110.861-3.236c47,94,178,113,251,33,31.385,4.116,60.563,2.495,86.487-3.311,25.924,5.806,55.1,7.427,86.488,3.311,73,80,204,61,251-33a165.625,165.625,0,0,0,120,0c51,13,108,15,157-5a147.188,147.188,0,0,0,33.5-18.694,147.217,147.217,0,0,0,33.5,18.694c49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33C2446.709,1093.793,2554.709,922.793,2379.709,863.793Z"
transform="translate(142.69 -634.312)" fill="var(--md-default-fg-color--lightest)"/>
</svg>

{% endblock %}
49 changes: 49 additions & 0 deletions docs/stylesheets/consent.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.md-consent__overlay {
pointer-events: none;
background-color: inherit;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}

.md-consent__inner {
background-color: color-mix(in srgb, var(--md-default-bg-color) 75%, transparent);
-webkit-backdrop-filter: blur(0.7rem);
backdrop-filter: blur(0.7rem);
border-radius: 0;

h4 {
display: flex;
align-items: center;
}

img {
width: 1.5rem;
height: 1.5rem;
margin-right: 0.5rem;
}

.md-button {
border-radius: 1rem;
}

&::before {
content: "";
position: absolute;
pointer-events: none;
background-color: color-mix(in srgb, var(--md-primary-fg-color) 7%, transparent);
z-index: 0;
inset: 0;
}
}

.md-consent__controls {
.md-button {
border-color: var(--md-primary-fg-color--dark);
color: var(--md-primary-fg-color--dark);
}

.md-button--primary {
background-color: var(--md-primary-fg-color--dark);
color: var(--md-primary-bg-color);
}
}
20 changes: 20 additions & 0 deletions docs/stylesheets/header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.md-header {
font-weight: bold;
background-color: color-mix(in srgb, var(--md-primary-fg-color) 53%, transparent);
-webkit-backdrop-filter: blur(0.5rem);
backdrop-filter: blur(0.5rem);
border-radius: 0;

&::before {
content: "";
position: absolute;
pointer-events: none;
background-color: color-mix(in srgb, var(--md-primary-fg-color--dark) 57%, transparent);
z-index: 0;
inset: 0;
}
}

.md-header__source {
z-index: 0;
}
30 changes: 30 additions & 0 deletions docs/stylesheets/search-bar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.md-search__input {
font-weight: bold;
}

.md-search__form {
border-radius: 1rem;
border-top-right-radius: 1rem !important;
border-top-left-radius: 1rem !important;

&:hover {
background-color: var(--md-default-fg-color--lighter);
}
}

.md-search__output {
border-bottom-left-radius: 1rem !important;
border-bottom-right-radius: 1rem !important;
}

@media screen and (max-width: 59.9844em) {
.md-search__form {
border-top-right-radius: inherit !important;
border-top-left-radius: inherit !important;
}

.md-search__output {
border-bottom-left-radius: inherit !important;
border-bottom-right-radius: inherit !important;
}
}
25 changes: 25 additions & 0 deletions docs/stylesheets/tabs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.md-tabs {
font-weight: bold;
box-shadow: 0 0 .1rem #0000001a, 0 .1rem .2rem #0003;
background-color: color-mix(in srgb, var(--md-primary-fg-color) 53%, transparent);
-webkit-backdrop-filter: blur(0.5rem);
backdrop-filter: blur(0.5rem);
border-radius: 0;

&::before {
content: "";
position: absolute;
pointer-events: none;
background-color: color-mix(in srgb, var(--md-primary-fg-color--dark) 57%, transparent);
z-index: 0;
inset: 0;
}
}

.md-tabs__item--active {
text-decoration: underline;
text-decoration-color: color-mix(in srgb, var(--md-primary-bg-color) 70%, transparent);
text-decoration-thickness: 0.25rem;
text-decoration-skip-ink: auto;
text-underline-offset: 0.375rem;
}
11 changes: 11 additions & 0 deletions docs/stylesheets/task-list-indicator.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.md-typeset .task-list-indicator::before {
background-color: var(--md-default-fg-color--lighter);
}

.md-typeset [type="checkbox"]:checked+.task-list-indicator::before {
background-color: var(--md-primary-fg-color--dark);
}

.md-typeset .task-list-item {
padding-left: 0.25rem;
}
54 changes: 46 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,39 @@ repo_url: https://github.com/dapensoft/pyorlib

# Copyright
copyright: |
Copyright &copy; 2024 <a href="https://github.com/idapena" target="_blank" rel="idapena">Isaac Da Pena</a>,
<a href="https://github.com/mdapena" target="_blank" rel="mdapena">Manuel Da Pena</a>
Copyright &copy; 2024-2026 <a href="https://github.com/idapena" target="_blank" rel="idapena">Isaac Da Pena</a>,
<a href="https://github.com/mdapena" target="_blank" rel="mdapena">Manuel Da Pena</a> –
<a style="font-weight: bold;" href="#__consent">Change Cookie Settings</a>

# Configuration
theme:
name: material
language: en
custom_dir: docs/.overrides
logo: images/logo/pyorlib-logo-white.svg
favicon: images/favicon/pyorlib-logo.ico
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/weather-sunny
name: Switch to light mode
# Palette toggle for light mode
- media: '(prefers-color-scheme: light)'
scheme: default
primary: pink
accent: amber
toggle:
icon: material/weather-night
name: Switch to dark mode
# Palette toggle for dark mode
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: pink
accent: amber
toggle:
icon: material/weather-sunny
name: Switch to light mode
icon: material/brightness-auto
name: Switch to system preference
features:
- navigation.tabs
- navigation.indexes
Expand All @@ -56,11 +65,35 @@ extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/dapensoft
analytics:
provider: google
property: !ENV GOOGLE_ANALYTICS_KEY
feedback:
title: Was this page helpful?
ratings:
- icon: material/thumb-up-outline
name: This page was helpful
data: 1
note: >-
Thanks for your feedback!
- icon: material/thumb-down-outline
name: This page could be improved
data: 0
note: >-
Thanks for your feedback!
consent:
title: <img src="https://www.svgrepo.com/show/401340/cookie.svg" alt="Cookie"><span>Cookie Consent</span>
description: >-
We use cookies to recognize your repeated visits and preferences, as well
as to measure the effectiveness of our documentation and whether users
find what they're searching for. With your consent, you're helping us to
make our documentation better.

# Plugins
plugins:
- search
- git-committers:
enabled: !ENV [CI, false]
repository: dapensoft/pyorlib
branch: master
exclude:
Expand Down Expand Up @@ -92,7 +125,7 @@ plugins:
show_signature_annotations: true
show_category_heading: true
- social:
enabled: !ENV [ CI, false ]
enabled: !ENV [CI, false]

# Extensions
markdown_extensions:
Expand Down Expand Up @@ -122,10 +155,17 @@ markdown_extensions:
- toc:
permalink: true

# Extra Stylesheets
extra_css:
- stylesheets/consent.css
- stylesheets/header.css
- stylesheets/search-bar.css
- stylesheets/tabs.css
- stylesheets/task-list-indicator.css

# Extra JavaScript for MathJax
extra_javascript:
- javascript/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

# Page tree
Expand Down Expand Up @@ -184,7 +224,5 @@ nav:
- Ortools Exception: api/exceptions/ortools-exception.md
- Pulp Exception: api/exceptions/pulp-exception.md
- Model Exception: api/exceptions/model-exception.md


- Contributing: contributing.md
- Release Notes: release-notes.md
Loading