diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..06615f6
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,36 @@
+name: CI
+
+on:
+ push:
+ branches: [ master, dev-* ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ env:
+ ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
+ strategy:
+ matrix:
+ python-version: [3.6, 3.7, 3.8]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install -r requirements.txt
+ python -m pip install gurobipy
+ - name: Python Unit tests
+ run: |
+ set -e
+ pylint flipy
+ pytest --cov-config=.coveragerc --cov=flipy/ tests
+ - name: Build docs
+ run: |
+ mkdocs build
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..533d04f
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,16 @@
+name: docs
+on:
+ push:
+ branches:
+ - master
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.6
+ - run: python -m pip install -r requirements.txt
+ - run: python -m pip install gurobipy
+ - run: mkdocs gh-deploy --force
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644
index f40fbd8..0000000
--- a/docs/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-_site
-.sass-cache
-.jekyll-cache
-.jekyll-metadata
-vendor
diff --git a/docs/404.html b/docs/404.html
deleted file mode 100644
index 56efce4..0000000
--- a/docs/404.html
+++ /dev/null
@@ -1,11 +0,0 @@
----
-layout: default
-title: Page not found
-permalink: /404
-nav_exclude: true
-search_exclude: true
----
-
-
The page you requested could not be found. Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this site's home page .
diff --git a/docs/_config.yml b/docs/_config.yml
deleted file mode 100644
index baddd4a..0000000
--- a/docs/_config.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-title: Flipy
-description: FreeWheel Linear Programming Interface for Python
-
-baseurl: "/flipy" # the subpath of your site, e.g. /blog
-url: "https://freewheel.github.io" # the base hostname & protocol for your site, e.g. http://example.com
-
-permalink: pretty
-exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
-
-# Enable or disable the site search
-search_enabled: true
-
-# Aux links for the upper right navigation
-aux_links:
- "Flipy on GitHub":
- - "//github.com/freewheel/flipy"
-
-# Color scheme currently only supports "dark" or nil (default)
-color_scheme: nil
-remote_theme: pmarsceill/just-the-docs
-
-# Google Analytics Tracking (optional)
-# e.g, UA-1234567-89
-ga_tracking:
-
-plugins:
- - jekyll-seo-tag
diff --git a/docs/_includes/head.html b/docs/_includes/head.html
deleted file mode 100644
index bbc0a27..0000000
--- a/docs/_includes/head.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- {% include nav.html %}
-
-
-
-
-
-
-
- {% unless page.url == "/" %}
- {% if page.parent %}
-
-
- {% if page.grand_parent %}
- {{ page.grand_parent }}
- {{ page.parent }}
- {% else %}
- {{ page.parent }}
- {% endif %}
- {{ page.title }}
-
-
- {% endif %}
- {% endunless %}
-
- {% if site.heading_anchors != false %}
- {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="
" anchorClass="anchor-heading" %}
- {% else %}
- {{ content }}
- {% endif %}
-
- {% if page.has_children == true and page.has_toc != false %}
-
-
Table of contents
- {% assign children_list = site.pages | sort:"nav_order" %}
-
- {% for child in children_list %}
- {% if child.parent == page.title and child.title != page.title %}
-
- {{ child.title }} {% if child.summary %} - {{ child.summary }}{% endif %}
-
- {% endif %}
- {% endfor %}
-
- {% endif %}
-
- {% if site.footer_content != nil %}
-
-
- {% endif %}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_sass/code.scss b/docs/_sass/code.scss
deleted file mode 100644
index 00a64c5..0000000
--- a/docs/_sass/code.scss
+++ /dev/null
@@ -1,265 +0,0 @@
-//
-// Code and syntax highlighting
-//
-// stylelint-disable selector-no-qualifying-type, declaration-block-semicolon-newline-after,declaration-block-single-line-max-declarations, selector-no-type, selector-max-type
-
-code {
- padding: 0.2em 0.15em;
- font-weight: 400;
- background-color: $code-background-color;
- border: $border $border-color;
- border-radius: $border-radius;
- }
-
- pre.highlight {
- padding: $sp-3;
- margin-bottom: 0;
- -webkit-overflow-scrolling: touch;
- background-color: $code-background-color;
-
- code {
- padding: 0;
- border: 0;
- }
- }
-
- .highlighter-rouge {
- margin-bottom: $sp-3;
- overflow: hidden;
- border-radius: $border-radius;
- }
-
- .highlight table td { padding: 5px; }
- .highlight table pre { margin: 0; }
- .highlight .cm {
- color: #999988;
- font-style: italic;
- }
- .highlight .cp {
- color: #999999;
- font-weight: bold;
- }
- .highlight .c1 {
- color: #999988;
- font-style: italic;
- }
- .highlight .cs {
- color: #999999;
- font-weight: bold;
- font-style: italic;
- }
- .highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf {
- color: #999988;
- font-style: italic;
- }
- .highlight .err {
- color: #a61717;
- background-color: #e3d2d2;
- }
- .highlight .gd {
- color: #000000;
- background-color: #ffdddd;
- }
- .highlight .ge {
- color: #000000;
- font-style: italic;
- }
- .highlight .gr {
- color: #aa0000;
- }
- .highlight .gh {
- color: #999999;
- }
- .highlight .gi {
- color: #000000;
- background-color: #ddffdd;
- }
- .highlight .go {
- color: #888888;
- }
- .highlight .gp {
- color: #555555;
- }
- .highlight .gs {
- font-weight: bold;
- }
- .highlight .gu {
- color: #aaaaaa;
- }
- .highlight .gt {
- color: #aa0000;
- }
- .highlight .kc {
- color: #000000;
- font-weight: bold;
- }
- .highlight .kd {
- color: #000000;
- font-weight: bold;
- }
- .highlight .kn {
- color: #000000;
- font-weight: bold;
- }
- .highlight .kp {
- color: #000000;
- font-weight: bold;
- }
- .highlight .kr {
- color: #000000;
- font-weight: bold;
- }
- .highlight .kt {
- color: #445588;
- font-weight: bold;
- }
- .highlight .k, .highlight .kv {
- color: #000000;
- font-weight: bold;
- }
- .highlight .mf {
- color: #009999;
- }
- .highlight .mh {
- color: #009999;
- }
- .highlight .il {
- color: #009999;
- }
- .highlight .mi {
- color: #009999;
- }
- .highlight .mo {
- color: #009999;
- }
- .highlight .m, .highlight .mb, .highlight .mx {
- color: #009999;
- }
- .highlight .sb {
- color: #d14;
- }
- .highlight .sc {
- color: #d14;
- }
- .highlight .sd {
- color: #d14;
- }
- .highlight .s2 {
- color: #d14;
- }
- .highlight .se {
- color: #d14;
- }
- .highlight .sh {
- color: #d14;
- }
- .highlight .si {
- color: #d14;
- }
- .highlight .sx {
- color: #d14;
- }
- .highlight .sr {
- color: #009926;
- }
- .highlight .s1 {
- color: #d14;
- }
- .highlight .ss {
- color: #990073;
- }
- .highlight .s, .highlight .sa, .highlight .dl {
- color: #d14;
- }
- .highlight .n {
- color: #24292e;
- }
- .highlight .na {
- color: #008080;
- }
- .highlight .bp {
- color: #999999;
- }
- .highlight .nb {
- color: #0086B3;
- }
- .highlight .nc {
- color: #445588;
- font-weight: bold;
- }
- .highlight .no {
- color: #008080;
- }
- .highlight .nd {
- color: #3c5d5d;
- font-weight: bold;
- }
- .highlight .ni {
- color: #800080;
- }
- .highlight .ne {
- color: #990000;
- font-weight: bold;
- }
- .highlight .nf, .highlight .fm {
- color: #990000;
- font-weight: bold;
- }
- .highlight .nl {
- color: #990000;
- font-weight: bold;
- }
- .highlight .nn {
- color: #555555;
- }
- .highlight .nt {
- color: #000080;
- }
- .highlight .vc {
- color: #008080;
- }
- .highlight .vg {
- color: #008080;
- }
- .highlight .vi {
- color: #008080;
- }
- .highlight .nv, .highlight .vm {
- color: #008080;
- }
- .highlight .ow {
- color: #000000;
- font-weight: bold;
- }
- .highlight .o {
- color: #000000;
- font-weight: bold;
- }
- .highlight .w {
- color: #bbbbbb;
- }
- .highlight {
- background-color: #f8f8f8;
- }
- //
- // Code examples (rendered)
- //
-
- .code-example {
- padding: $sp-3;
- margin-bottom: $sp-3;
- overflow: auto;
- border: 1px solid $border-color;
- border-radius: $border-radius;
-
- + .highlighter-rouge,
- + figure.highlight {
- position: relative;
- margin-top: -$sp-4;
- border-right: 1px solid $border-color;
- border-bottom: 1px solid $border-color;
- border-left: 1px solid $border-color;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- }
\ No newline at end of file
diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss
deleted file mode 100644
index 84c3daa..0000000
--- a/docs/_sass/custom/custom.scss
+++ /dev/null
@@ -1,136 +0,0 @@
-////
-//// Typography
-////
-
-//$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif;
-//$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace;
-//$root-font-size: 16px; // Base font-size for rems
-//$body-line-height: 1.4;
-//$content-line-height: 1.5;
-//$body-heading-line-height: 1.15;
-
-////
-//// Colors
-////
-
-//$white: #fff;
-
-//$grey-dk-000: #959396;
-//$grey-dk-100: #5c5962;
-//$grey-dk-200: #44434d;
-//$grey-dk-250: #302d36;
-//$grey-dk-300: #27262b;
-
-//$grey-lt-000: #f5f6fa;
-//$grey-lt-100: #eeebee;
-//$grey-lt-200: #ecebed;
-//$grey-lt-300: #e6e1e8;
-
-//$purple-000: #7253ed;
-//$purple-100: #5e41d0;
-//$purple-200: #4e26af;
-//$purple-300: #381885;
-
-//$blue-000: #2c84fa;
-//$blue-100: #2869e6;
-//$blue-200: #264caf;
-//$blue-300: #183385;
-
-//$green-000: #41d693;
-//$green-100: #11b584;
-//$green-200: #009c7b;
-//$green-300: #026e57;
-
-//$yellow-000: #ffeb82;
-//$yellow-100: #fadf50;
-//$yellow-200: #f7d12e;
-//$yellow-300: #e7af06;
-
-//$red-000: #f77e7e;
-//$red-100: #f96e65;
-//$red-200: #e94c4c;
-//$red-300: #dd2e2e;
-
-//$body-background-color: $white;
-//$sidebar-color: $grey-lt-000;
-//$search-background-color: $white;
-//$table-background-color: $white;
-//$code-background-color: $grey-lt-000;
-
-//$body-text-color: red;
-//$body-heading-color: $grey-dk-300;
-//$search-result-preview-color: $grey-dk-000;
-//$nav-child-link-color: $grey-dk-100;
-//$link-color: $purple-000;
-$link-color: $blue-000;
-//$btn-primary-color: $purple-100;
-//$base-button-color: #f7f7f7;
-
-////
-//// Spacing
-////
-
-//$spacing-unit: 1rem; // 1rem == 16px
-
-//$spacers: (
-//sp-0: 0,
-//sp-1: $spacing-unit * 0.25,
-//sp-2: $spacing-unit * 0.5,
-//sp-3: $spacing-unit * 0.75,
-//sp-4: $spacing-unit,
-//sp-5: $spacing-unit * 1.5,
-//sp-6: $spacing-unit * 2,
-//sp-7: $spacing-unit * 2.5,
-//sp-8: $spacing-unit * 3,
-//sp-9: $spacing-unit * 3.5,
-//sp-10: $spacing-unit * 4
-//);
-
-//$sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px
-//$sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px
-//$sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px
-//$sp-4: map-get($spacers, sp-4); // 1 rem == 16px
-//$sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px
-//$sp-6: map-get($spacers, sp-6); // 2 rem == 32px
-//$sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px
-//$sp-8: map-get($spacers, sp-8); // 3 rem == 48px
-//$sp-9: map-get($spacers, sp-9); // 4 rem == 48px
-//$sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px
-
-////
-//// Borders
-////
-
-//$border: 1px solid;
-//$border-radius: 4px;
-//$border-color: $grey-lt-100;
-
-////
-//// Grid system
-////
-
-//$gutter-spacing: $sp-6;
-//$gutter-spacing-sm: $sp-4;
-//$nav-width: 264px;
-//$nav-width-md: 248px;
-//$content-width: 800px;
-//$header-height: 60px;
-//$search-results-width: 500px;
-
-////
-//// Media queries in pixels
-////
-
-//$media-queries: (
-//xs: 320px,
-//sm: 500px,
-//md: $content-width,
-//lg: $content-width + $nav-width,
-//xl: 1400px
-//);
-
-@import "./code.scss";
-
-.highlight .n {
- color: #24292e;
- }
\ No newline at end of file
diff --git a/docs/api-reference/lp-constraint.md b/docs/api-reference/lp-constraint.md
new file mode 100644
index 0000000..676d3a6
--- /dev/null
+++ b/docs/api-reference/lp-constraint.md
@@ -0,0 +1,7 @@
+# LpConstraint
+
+::: flipy.lp_constraint.LpConstraint
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/lp-expression.md b/docs/api-reference/lp-expression.md
new file mode 100644
index 0000000..f56b4e1
--- /dev/null
+++ b/docs/api-reference/lp-expression.md
@@ -0,0 +1,7 @@
+# LpExpression
+
+::: flipy.lp_expression.LpExpression
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/lp-objective.md b/docs/api-reference/lp-objective.md
new file mode 100644
index 0000000..8666f94
--- /dev/null
+++ b/docs/api-reference/lp-objective.md
@@ -0,0 +1,7 @@
+# LpObjective
+
+::: flipy.lp_objective.LpObjective
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/lp-problem.md b/docs/api-reference/lp-problem.md
new file mode 100644
index 0000000..c920d7a
--- /dev/null
+++ b/docs/api-reference/lp-problem.md
@@ -0,0 +1,7 @@
+# LpProblem
+
+::: flipy.lp_problem.LpProblem
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/lp-reader.md b/docs/api-reference/lp-reader.md
new file mode 100644
index 0000000..a04c429
--- /dev/null
+++ b/docs/api-reference/lp-reader.md
@@ -0,0 +1,7 @@
+# LpReader
+
+::: flipy.lp_reader.LpReader
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/lp-variable.md b/docs/api-reference/lp-variable.md
new file mode 100644
index 0000000..feaa1bc
--- /dev/null
+++ b/docs/api-reference/lp-variable.md
@@ -0,0 +1,7 @@
+# LpVariable
+
+::: flipy.lp_variable.LpVariable
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/solvers-cbc-solver.md b/docs/api-reference/solvers-cbc-solver.md
new file mode 100644
index 0000000..fbe0a96
--- /dev/null
+++ b/docs/api-reference/solvers-cbc-solver.md
@@ -0,0 +1,7 @@
+# CBCSolver
+
+::: flipy.solvers.cbc_solver.CBCSolver
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/api-reference/solvers-gurobi-solver.md b/docs/api-reference/solvers-gurobi-solver.md
new file mode 100644
index 0000000..63d2abf
--- /dev/null
+++ b/docs/api-reference/solvers-gurobi-solver.md
@@ -0,0 +1,7 @@
+# GurobiSolver
+
+::: flipy.solvers.gurobi_solver.GurobiSolver
+ rendering:
+ show_root_toc_entry: False
+ selection:
+ inherited_members: True
diff --git a/docs/flipy_basics.md b/docs/basic_usage.md
similarity index 94%
rename from docs/flipy_basics.md
rename to docs/basic_usage.md
index a892c6c..17e8bb4 100644
--- a/docs/flipy_basics.md
+++ b/docs/basic_usage.md
@@ -1,20 +1,3 @@
----
-layout: default
-title: Flipy Basics
-nav_order: 3
----
-
-# Flipy basics
-{: .no_toc }
-
-## Table of contents
-{: .no_toc .text-delta }
-
-1. TOC
-{:toc}
-
----
-
## Variable
Create a variable with `flipy.LpVariable`:
@@ -29,7 +12,7 @@ Integer and binary variable types are also available:
```python
y = flipy.LpVariable('y', var_type=flipy.VarType.Integer, low_bound=1, up_bound=5)
-z = flipy.LpVariable('y', var_type=flipy.VarType.Binary)
+z = flipy.LpVariable('z', var_type=flipy.VarType.Binary)
```
`y` can take any integer value from 1 to 5 (1, 2, 3, 4, 5), while `z` can only take 0 or 1.
@@ -135,4 +118,4 @@ To get the value of objective function: call `LpObjective.evalaute()`:
```python
val_obj = obj.evaluate()
-```
+```
\ No newline at end of file
diff --git a/docs/favicon.ico b/docs/favicon.ico
deleted file mode 100644
index 814736e..0000000
Binary files a/docs/favicon.ico and /dev/null differ
diff --git a/docs/index.md b/docs/index.md
index 5d5506d..18d3859 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,19 +1,10 @@
----
-layout: default
-title: Home
-nav_order: 1
-description: "Flipy is a linear programming interface for Python built by FreeWheel."
-permalink: /
----
+![Flipy](assets/images/flipy.png)
# Flipy
-{: .fs-9 }
-![Flipy]({{site.baseurl}}/assets/images/flipy.png)
+Welcome to Flipy’s documentation! Flipy is a unified interface for creating and solving Linear Programming problems on different solvers like [Cbc](https://github.com/coin-or/Cbc) or [Gurobi](https://www.gurobi.com/).
-FreeWheel Linear Programming Interface for Python
-{: .fs-5 .fw-300 }
+Get started with [Installation](./installation.md) and then get to an overview with the [Quickstart](./quickstart.md).
-[Get started now]({{ site.baseurl }}{% link installation.md %}){: .btn .btn-blue .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/freewheel/flipy/){: .btn .fs-5 .mb-4 .mb-md-0 }
-
-Welcome to Flipy’s documentation! Get started with [Installation]({{ site.baseurl }}{% link installation.md %}) and then get to an overview with the [Quickstart]({{ site.baseurl }}{% link quickstart.md %}).
\ No newline at end of file
+[Getting started](./quickstart.md){ .md-button }
+[View on GitHub :fontawesome-brands-github:](//github.com/freewheel/flipy){ .md-button .md-button--primary }
diff --git a/docs/installation.md b/docs/installation.md
index 2975f90..090db96 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -1,20 +1,3 @@
----
-layout: default
-title: Installation
-nav_order: 1
----
-
-# Installation
-{: .no_toc }
-
-## Table of contents
-{: .no_toc .text-delta }
-
-1. TOC
-{:toc}
-
----
-
## Python versions
Flipy suports Python 3.6 and newer.
diff --git a/docs/js/config.js b/docs/js/config.js
new file mode 100644
index 0000000..a7adf3f
--- /dev/null
+++ b/docs/js/config.js
@@ -0,0 +1,16 @@
+window.MathJax = {
+ tex: {
+ inlineMath: [["\\(", "\\)"]],
+ displayMath: [["\\[", "\\]"]],
+ processEscapes: true,
+ processEnvironments: true
+ },
+ options: {
+ ignoreHtmlClass: ".*|",
+ processHtmlClass: "arithmatex"
+ }
+ };
+
+ document$.subscribe(() => {
+ MathJax.typesetPromise()
+ })
diff --git a/docs/overrides/partials/footer.html b/docs/overrides/partials/footer.html
new file mode 100644
index 0000000..644cd70
--- /dev/null
+++ b/docs/overrides/partials/footer.html
@@ -0,0 +1,56 @@
+{#-
+ This file was automatically generated - do not edit
+ -#}
+ {% import "partials/language.html" as lang with context %}
+
diff --git a/docs/quickstart.md b/docs/quickstart.md
index 09ae679..3287553 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -1,20 +1,3 @@
----
-layout: default
-title: Quickstart
-nav_order: 2
----
-
-# Quickstart
-{: .no_toc }
-
-## Table of contents
-{: .no_toc .text-delta }
-
-1. TOC
-{:toc}
-
----
-
## Linear programming
*Linear programming* (*LP*, or *linear optimization*) is a method to compute the best solution (such as maximum revenue or lowest cost) to a problem modeled as a set of linear relationships.
@@ -26,14 +9,14 @@ nav_order: 2
Here is a simple example of a linear programming problem:
\begin{align}
-& \text{Maximize} && \mathbf{3x + 2y} \\\\ & \text{subject to} && \mathbf{2.5x + y <= 12} \\\\ & \text{and} && \mathbf{1 \leq x \leq 3.5} \\\\ & \text{and} && \mathbf{2 \leq y \leq 4} \\\\
+& \text{Maximize} && \mathbf{3x + 2y} \\ & \text{subject to} && \mathbf{2.5x + y <= 12} \\ & \text{and} && \mathbf{1 \leq x \leq 3.5} \\ & \text{and} && \mathbf{2 \leq y \leq 4}
\end{align}
-The objective here is to maximize the value of $$3x + 2y$$, with constriants given as linear expressions.
+The objective here is to maximize the value of $3x + 2y$, with constriants given as linear expressions.
The three constraints defined a feasible region shown as below:
-![A simple problem]({{site.baseurl}}/assets/images/simple-problem.png)
+![A simple problem](assets/images/simple-problem.png)
The objective here is to find a spot that maximizes $$3x + 2y$$ in the above region.
@@ -87,4 +70,4 @@ print(y.evaluate())
# 4.0
```
-![Solution]({{site.baseurl}}/assets/images/simple-problem-solution.png)
\ No newline at end of file
+![Solution](assets/images/simple-problem-solution.png)
\ No newline at end of file
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
new file mode 100644
index 0000000..8aa3033
--- /dev/null
+++ b/docs/stylesheets/extra.css
@@ -0,0 +1,3 @@
+.md-typeset div.arithmatex {
+ overflow: hidden;
+}
diff --git a/flipy/lp_objective.py b/flipy/lp_objective.py
index 1bde537..dec88c4 100644
--- a/flipy/lp_objective.py
+++ b/flipy/lp_objective.py
@@ -45,6 +45,7 @@ def sense(self) -> ObjectiveType:
Returns
-------
flipy.lp_objective.ObjectiveType
+ The sense of the linear objective, i.e. minimize or maximize
"""
return self._sense
diff --git a/flipy/lp_reader.py b/flipy/lp_reader.py
index f29cc1d..46ffa52 100644
--- a/flipy/lp_reader.py
+++ b/flipy/lp_reader.py
@@ -307,6 +307,7 @@ def read(cls, obj: Union[str, IO, TextIO, io.StringIO]) -> LpProblem:
Parameters
----------
obj: str or buffer
+ The content of an LP file as a string or read buffer
Returns
-------
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 0000000..19cedb6
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,87 @@
+site_name: Flipy - FreeWheel Linear Programming Interface
+strict: true
+copyright: Copyright © 2021 Flipy Authors
+site_url: https://freewheel.github.io/flipy
+site_description: >-
+ Flipy is a unified interface for creating and solving Linear Programming problems on different solvers like Cbc or Gurobi.
+repo_name: freewheel/flipy
+repo_url: https://github.com/freewheel/flipy
+
+nav:
+ - Overview: index.md
+ - Installation: installation.md
+ - Quickstart: quickstart.md
+ - Basic Usage: basic_usage.md
+ - API Reference:
+ - LpProblem: api-reference/lp-problem.md
+ - LpConstraint: api-reference/lp-constraint.md
+ - LpExpression: api-reference/lp-expression.md
+ - LpObjective: api-reference/lp-objective.md
+ - LpVariable: api-reference/lp-variable.md
+ - LpReader: api-reference/lp-reader.md
+ - solvers.CBCSolver: api-reference/solvers-cbc-solver.md
+ - solvers.GurobiSolver: api-reference/solvers-gurobi-solver.md
+
+theme:
+ logo: assets/images/flipy.png
+ favicon: assets/images/flipy.png
+ name: material
+ custom_dir: docs/overrides
+ font:
+ text: Work Sans
+ palette:
+ - scheme: default
+ primary: indigo
+ accent: indigo
+ toggle:
+ icon: material/weather-night
+ name: Switch to dark mode
+ - scheme: slate
+ primary: red
+ accent: red
+ toggle:
+ icon: material/weather-sunny
+ name: Switch to light mode
+
+extra:
+ social:
+ - icon: fontawesome/brands/github
+ link: https://github.com/freewheel/flipy
+
+extra_css:
+ - stylesheets/extra.css
+
+extra_javascript:
+ - js/config.js
+ - https://polyfill.io/v3/polyfill.min.js?features=es6
+ - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
+
+markdown_extensions:
+ - admonition
+ - attr_list
+ - codehilite
+ - pymdownx.superfences
+ - pymdownx.tabbed
+ - pymdownx.details
+ - pymdownx.snippets
+ - pymdownx.emoji:
+ emoji_index: !!python/name:materialx.emoji.twemoji
+ emoji_generator: !!python/name:materialx.emoji.to_svg
+ - toc:
+ permalink: true
+ - pymdownx.arithmatex:
+ generic: true
+
+plugins:
+ - mkdocstrings:
+ default_handler: python
+ handlers:
+ python:
+ rendering:
+ show_root_heading: false
+ show_source: true
+ show_category_heading: true
+ selection:
+ docstring_style: numpy
+ filters:
+ - "!^_" # exlude all members starting with _
diff --git a/requirements.txt b/requirements.txt
index 8c74260..e4fd032 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,3 +4,6 @@ pytest-cov==2.8.1
mock==2.0.0
pylint==2.4.4
coveralls==1.10.0
+mkdocs_material==7.1.3
+mkdocstrings==0.15.0
+docstring-parser==0.7.3
\ No newline at end of file