diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml
index a4d02c3f8..9198d9c19 100644
--- a/.github/workflows/continuous-integration.yaml
+++ b/.github/workflows/continuous-integration.yaml
@@ -649,27 +649,36 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- - name: Update versions.html for docs
+ - name: Update versions.json for docs
if: ${{ success() && !cancelled() }}
env:
RAW_DOCS_DIR: ${{ steps.download-docs.outputs.download-path }}
run: |
- DOWNLOADED_VERSIONS_HTML_FILE=$(mktemp --suffix=.html)
- OUTPUT_VERSIONS_HTML_FILE=$(mktemp --suffix=.html)
+ DOWNLOADED_VERSIONS_JSON_FILE=$(mktemp --suffix=.json)
+ OUTPUT_VERSIONS_JSON_FILE=$(mktemp --suffix=.json)
+ OPTS=""
+ if [[ $IS_LATEST = "true" ]]; then
+ OPTS="${OPTS} --latest "
+ fi
+ if [[ $IS_PRERELEASE = "true" ]]; then
+ OPTS="${OPTS} --prerelease "
+ fi
aws s3api get-object \
--bucket ${{ steps.docs-push-infos.outputs.aws-bucket }} \
- --key concretefhe/versions.html "${DOWNLOADED_VERSIONS_HTML_FILE}"
+ --key concretefhe/versions.json "${DOWNLOADED_VERSIONS_JSON_FILE}"
- poetry run python ./script/actions_utils/generate_versions_html.py \
- --add-versions "${PROJECT_VERSION}" \
- --versions-html-file "${DOWNLOADED_VERSIONS_HTML_FILE}" \
- --output-html "${OUTPUT_VERSIONS_HTML_FILE}"
+ poetry run python ./script/actions_utils/generate_versions_json.py \
+ --add-version "${PROJECT_VERSION}" \
+ --versions-json-file "${DOWNLOADED_VERSIONS_JSON_FILE}" \
+ --output-json "${OUTPUT_VERSIONS_JSON_FILE}" \
+ $OPTS
- echo "OUTPUT_VERSIONS_HTML_FILE=${OUTPUT_VERSIONS_HTML_FILE}" >> "$GITHUB_ENV"
+
+ echo "OUTPUT_VERSIONS_JSON_FILE=${OUTPUT_VERSIONS_JSON_FILE}" >> "$GITHUB_ENV"
# Copy to docs to keep a version in docs artifacts
- cp "${OUTPUT_VERSIONS_HTML_FILE}" "${RAW_DOCS_DIR}"/versions.html
+ cp "${OUTPUT_VERSIONS_JSON_FILE}" "${RAW_DOCS_DIR}"/versions.json
- name: Create ready to upload/packaged artifacts and release body
if: ${{ success() && !cancelled() }}
env:
@@ -679,8 +688,8 @@ jobs:
pushd "${RAW_DOCS_DIR}"
zip -r "${ARTIFACTS_PACKAGED_DIR}/html-docs.zip" ./*
tar -cvzf "${ARTIFACTS_PACKAGED_DIR}/html-docs.tar.gz" ./*
- # Remove the versions.html to avoid pushing it to S3 but have it in release artifacts
- rm versions.html
+ # Remove the versions.json to avoid pushing it to S3 but have it in release artifacts
+ rm versions.json
popd
cp "${RAW_CHANGELOG_DIR}"/* "${ARTIFACTS_PACKAGED_DIR}"
ls -a "${ARTIFACTS_PACKAGED_DIR}"
diff --git a/docs/_static/css/zama.css b/docs/_static/css/zama.css
deleted file mode 100644
index d2aaf1930..000000000
--- a/docs/_static/css/zama.css
+++ /dev/null
@@ -1,360 +0,0 @@
-/** css/zama.css **/
-
-/* This line is theme specific - it includes the base theme CSS */
-@import 'theme.css'; /* for the Read the Docs theme */
-
-:root {
- /* primary: yellow, secondary: orange, tertiary: black */
- --primary-color: #ffd208;
- --primary-color-darker: #cba706;
- --secondary-color: #ffb854;
- --secondary-color-light: #fff0d9;
- --tertiary-color: #414042;
- --tertiary-color-light: #e6e7e8;
- --link-color: black;
- --button-accept-color: #ffd208;
- --button-decline-color: grey;
- --primary-font: Archivo, sans-serif;
-}
-
-.zama-header {
- position: fixed;
- left: 0;
- right: 0;
- z-index: 201;
- height: 43px;
- background: black;
- color: white;
- display: flex;
- align-items: center;
- padding: 0 40px;
- justify-content: flex-end;
- font-size: 16px;
- box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
-}
-
-.zama-header > a {
- display: flex;
- height: 33px;
- align-items: center;
- color: #fff;
- font-weight: bold ;
- font-family: var(--primary-font);
- text-decoration: none;
- margin-left: 30px;
-}
-
-.zama-header > a:hover,
-.zama-header > a:focus,
-.zama-header > a:active {
- color: var(--primary-color);
- text-decoration: none;
-}
-
-body {
- font-family: var(--primary-font);
- color: black;
-}
-
-/* Change code blocks font size slightly (normally 12px)*/
-.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre {
- font-size: 13px !important;
-}
-
-.rst-content .toctree-wrapper>p.caption, h1, h2, h3, h4, h5, h6, legend {
- font-family: var(--primary-font);
-}
-
-input[type=color], input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week] {
- font-family: var(--primary-font);
-}
-.wy-side-nav-search input[type=text]{
- border-color: var(--primary-color);
-}
-
-.wy-side-nav-search {
- background-color: var(--primary-color);
-}
-
-.wy-menu-vertical {
- padding-bottom: 30px;
-}
-
-.wy-menu-vertical header,
-.wy-menu-vertical p.caption {
- color: var(--primary-color);
-}
-
-.wy-side-nav-search > a {
- position: relative;
- padding-top: 50px;
- color: black;
-}
-
-.wy-side-nav-search > a::before {
- display: none;
-}
-
-.wy-side-nav-search > a .logo {
- position: absolute;
- top: 0;
- left: 50%;
- padding: 0;
-
- /* Adjust this to change the adjustment of the Zama's logo, on the top left */
- margin: 0 0 0 -88px !important;
-}
-.wy-grid-for-nav {
- padding-top: 43px;
-}
-
-.wy-body-for-nav {
- background: rgba(0,0,0,.05);
-}
-.wy-nav-content-wrap {
- background: none;
-}
-
-.wy-nav-side {
- top: 43px;
-}
-
-.rst-content code.literal,
-.rst-content tt.literal {
- color: var(--primary-color);
- background-color: #696969;
-}
-
-/* increase padding for top menu + version bar */
-.wy-menu-vertical {
- padding-bottom: 60px;
-}
-
-/* fix version box font */
-.rst-versions {
- font-family: var(--primary-font);
-}
-
-/* fix version link color */
-.rst-versions a {
- color: var(--primary-color);
-}
-
-/* fix version fa-caret-down empty space on click */
-.rst-versions.shift-up {
- overflow-y: unset;
-}
-/* current version color */
-.rst-versions .rst-current-version {
- color: var(--primary-color)
-}
-
-
-.wy-nav-content a {
- color: var(--link-color);
- text-decoration: underline;
-}
-
-.rst-footer-buttons a {
- text-decoration: none;
-}
-
-.wy-nav-content a:hover,
-.wy-nav-content a:focus,
-.wy-nav-content a:active {
- color: var(--link-color);
- text-decoration: none;
-}
-
-.wy-nav-content a.btn:hover,
-.wy-nav-content a.btn:focus,
-.wy-nav-content a.btn:active{
- color: black;
- text-decoration: none;
-}
-
-.wy-nav-content {
- max-width: none;
- background-color: white;
-}
-
-.rst-content {
- max-width: 800px;
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-
-.wy-nav-top {
- color: #696969;
- background: #343131
-}
-.wy-nav-top a {
- color:var(--primary-color);
-}
-
-html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {
- display: table;
- margin: 6px 0;
- font-size: 90%;
- line-height: normal;
- background: var(--tertiary-color-light);
- color: var(--tertiary-color);
- border-top: 3px solid var(--primary-color);
- padding: 6px;
- position: relative;
-}
-
-html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt a {
- color: var(--tertiary-color);
- text-decoration: underline;
-}
-
-html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt a:hover,
-html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt a:focus,
-html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt a:active {
- color: var(--tertiary-color);
- text-decoration: none;
-}
-
-/* Api doc
- * Newlines (\a) and spaces (\20) before each parameter
- * https://github.com/sphinx-doc/sphinx/issues/1514
- */
-
-/* Newlines (\a) and spaces (\20) before each parameter */
-.sig-param::before {
- content: "\a\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20";
- white-space: pre;
-}
-
-/* Newline after the last parameter (so the closing bracket is on a new line) */
-dt em.sig-param:last-of-type::after {
- content: "\a";
- white-space: pre;
-}
-
-/* To have blue background of width of the block (instead of width of content) */
-dl.class > dt:first-of-type {
- display: block !important;
-}
-
-/*
- * Admonitions
- */
-
-/* Important admonition */
-.rst-content .important .admonition-title {
- background: var(--secondary-color);
-}
-
-.rst-content .important {
- background: var(--secondary-color-light);
-}
-
-/* Hint admonition */
-.rst-content .hint .admonition-title {
- background: var(--tertiary-color);
-}
-
-.rst-content .hint {
- background: var(--tertiary-color-light);
-}
-
-/* Note admonition */
-
-.rst-content .note .admonition-title {
- background: var(--tertiary-color);
- color: #FFFFFF;
-}
-
-.rst-content .note {
- background: var(--tertiary-color-light);
-}
-
-/*
- * RGPD
- */
-
-.rgpd {
- z-index: 300;
- position: fixed;
- width: calc(100% - 40px);
- height: 76px;
- padding: 17px 0px;
- border: 1px solid rgba(0, 0, 0, 0.2);
- background-color: rgba(255, 255, 255, 0.9);
- bottom: 20px;
- left: 20px;
- font-size: 16px;
- padding-left: 12.5%;
- padding-right: 12.5%;
- background: black;
- color: white;
- opacity: 75%;
- font-size: 17px;
- white-space: nowrap;
-}
-
-.zama-container {
- max-width: 1440px;
- margin: auto;
- width: 100%;
-}
-
-.rgpd .zama-container .padded {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.rgpd .consent {
- text-overflow: ellipsis;
- overflow: hidden;
-
-}
-
-.rgpd .button {
- text-decoration: none;
- white-space: nowrap;
- position: relative;
- z-index: 0;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 60px;
- padding: 0px 10px;
- margin-left: 15px;
- height: 46px;
- text-transform: uppercase;
- font-family: var(--primary-font);
- font-weight: bold;
- -webkit-font-smoothing: antialiased;
- font-size: 14px;
- cursor: pointer;
- color: black;
- transition: all 0.33s cubic-bezier(0.33, 0, 0, 1);
-}
-
-.rgpd .button::after {
- background-color: white;
- height: 46px;
- content: '';
- display: block;
- position: absolute;
- right: 0;
- top: 3px;
- width: 100%;
- height: 40px;
- border-radius: 25px;
- z-index: -1;
-}
-
-.rgpd .button-accept::after{
- background-color: var(--button-accept-color);
-}
-
-.rgpd .button-decline::after{
- background-color: var(--button-decline-color);
-}
diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico
deleted file mode 100644
index fb2fa5a15..000000000
Binary files a/docs/_static/favicon.ico and /dev/null differ
diff --git a/docs/_static/logo.png b/docs/_static/logo.png
deleted file mode 100644
index c9ac1cdbd..000000000
Binary files a/docs/_static/logo.png and /dev/null differ
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
deleted file mode 100644
index 40e7dd702..000000000
--- a/docs/_templates/layout.html
+++ /dev/null
@@ -1,291 +0,0 @@
-{# TEMPLATE VAR SETTINGS #}
-{%- set url_root = pathto('', 1) %}
-{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
-{%- if not embedded and docstitle %}
- {%- set titlesuffix = " — "|safe + docstitle|e %}
-{%- else %}
- {%- set titlesuffix = "" %}
-{%- endif %}
-{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
-{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' -%}
-
-{# Build sphinx_version_info tuple from sphinx_version string in pure Jinja #}
-{%- set (_ver_major, _ver_minor, _ver_bugfix) = sphinx_version.split('.') | map('int') -%}
-{%- set sphinx_version_info = (_ver_major, _ver_minor, _ver_bugfix) -%}
-
-
-
-
-
-
-
-
- {#- Do not conflict with RTD insertion of analytics script #}
- {%- if not READTHEDOCS %}
- {%- if theme_analytics_id %}
-
-
-
-
-
- {%- endif %}
- {%- endif %}
-
-
- {{- metatags }}
-
- {%- block htmltitle %}
- {{ title|striptags|e }}{{ titlesuffix }}
- {%- endblock -%}
-
- {#- CSS #}
- {%- if sphinx_version_info < (4, 0) -%}
-
-
- {%- endif %}
- {%- for css in css_files %}
- {%- if css|attr("rel") %}
-
- {%- else %}
-
- {%- endif %}
- {%- endfor %}
-
- {%- for cssfile in extra_css_files %}
-
- {%- endfor -%}
-
- {#- FAVICON #}
- {%- if favicon %}
- {%- if sphinx_version_info < (4, 0) -%}
-
- {%- else %}
-
- {%- endif %}
- {%- endif -%}
-
- {#- CANONICAL URL (deprecated) #}
- {%- if theme_canonical_url and not pageurl %}
-
- {%- endif -%}
-
- {#- CANONICAL URL #}
- {%- if pageurl %}
-
- {%- endif -%}
-
- {#- JAVASCRIPTS #}
- {%- block scripts %}
-
- {%- if not embedded %}
- {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
- {%- if sphinx_version_info >= (1, 8) -%}
- {%- if sphinx_version_info < (4, 0) -%}
-
- {%- endif -%}
- {%- for scriptfile in script_files %}
- {{ js_tag(scriptfile) }}
- {%- endfor %}
- {%- else %}
-
- {%- for scriptfile in script_files %}
-
- {%- endfor %}
- {%- endif %}
-
-
- {#- OPENSEARCH #}
- {%- if use_opensearch %}
-
- {%- endif %}
- {%- endif %}
- {%- endblock %}
-
- {%- block linktags %}
- {%- if hasdoc('about') %}
-
- {%- endif %}
- {%- if hasdoc('genindex') %}
-
- {%- endif %}
- {%- if hasdoc('search') %}
-
- {%- endif %}
- {%- if hasdoc('copyright') %}
-
- {%- endif %}
- {%- if next %}
-
- {%- endif %}
- {%- if prev %}
-
- {%- endif %}
- {%- endblock %}
- {%- block extrahead %} {% endblock %}
-
-
-
-
- {%- block extrabody %} {% endblock %}
-
- {#- SIDE NAV, TOGGLES ON MOBILE #}
-
-
-
-
-
-
- {#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
- {#- Translators: This is an ARIA section label for the navigation menu that is visible when viewing the page on mobile devices -#}
-
- {%- block mobile_nav %}
-
- {{ project }}
- {%- endblock %}
-
-
-
- {%- block content %}
- {%- if theme_style_external_links|tobool %}
-
- {%- else %}
-
- {%- endif %}
- {% include "breadcrumbs.html" %}
-
- {%- block document %}
-
- {% block body %}{% endblock %}
-
- {%- if self.comments()|trim %}
-
- {%- block comments %}{% endblock %}
-
- {%- endif%}
-
- {%- endblock %}
- {% include "footer.html" %}
-
- {%- endblock %}
-
-
-
- {%- if theme_display_version %}
- {% include "versioning.html" -%}
- {%- endif %}
-
- {%- block footer %} {% endblock %}
-
- {%- if theme_analytics_id %}
-
-
-
-
- We use analytics cookies to understand how people view and
- use our documentation.
-
-
Accept
-
Decline
-
-
-
-
- {%- endif%}
-
-
diff --git a/docs/_templates/versioning.html b/docs/_templates/versioning.html
deleted file mode 100644
index 65838d55d..000000000
--- a/docs/_templates/versioning.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html
deleted file mode 100644
index 8c221c407..000000000
--- a/docs/_templates/versions.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ConcreteFHE Documentation
-
-
-
-
- Pick a version
-
-
-
-
-
-
-
-
diff --git a/docs/conf.py b/docs/conf.py
index 3b0f82a85..b80039dcb 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -10,16 +10,19 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
-# import os
+import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
-project = "Concrete Framework"
-copyright = "2021, Zama"
-author = "Zama"
+project = 'Concrete Framework'
+copyright = '2021, Zama'
+author = 'Zama'
+description = 'Zama Concrete Framework'
+root_url = os.environ.get("DOC_ROOT_URL", "/concretefhe")
+root_url = root_url if root_url.endswith('/') else root_url + '/'
# The full version, including alpha/beta/rc tags
release = "0.2.0-rc5"
@@ -32,25 +35,21 @@ release = "0.2.0-rc5"
# ones.
extensions = [
"myst_parser",
- "nbsphinx",
- "sphinx.ext.autodoc",
- "sphinx.ext.autosummary",
- "sphinx.ext.napoleon",
"sphinx_copybutton",
+ "nbsphinx",
+ "sphinx.ext.napoleon",
]
myst_enable_extensions = [
"amsmath",
"colon_fence",
+ "dollarmath",
]
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ["_templates"]
-
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Group member variables and methods separately (not alphabetically)
autodoc_member_order = "groupwise"
@@ -64,26 +63,39 @@ nbsphinx_codecell_lexer = 'ipython3'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = "sphinx_rtd_theme"
-html_style = "css/zama.css"
-html_logo = "_static/logo.png"
-html_favicon = "_static/favicon.ico"
-html_theme_options = {
- "logo_only": False,
- "analytics_id": "G-XRM93J9QBW",
- "display_version": True,
-}
-pygments_style = "zenburn"
-html_last_updated_fmt = None # '%b %d, %Y'
-html_show_copyright = True
-html_show_sphinx = False
-html_context = {
- "show_docs_home_link": True, # Show/hide docs link in top menu
- "versions_url": "/concretefhe/versions.html",
- "version_name": release,
-}
+html_theme = 'sphinx_zama_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ["_static"]
+html_static_path = ['_static']
+html_theme_options = {
+ "github_url": "https://github.com/zama-ai/concretefhe",
+ "twitter_url": "https://twitter.com/zama_fhe",
+ "icon_links": [{
+ "name": "Discourse",
+ "url": "https://community.zama.ai/",
+ "icon": "fab fa-discourse",
+ }],
+ "navigation_depth": 2,
+ "collapse_navigation": False,
+ # Known issue between nbsphinx and GDPR banner (yett lib)
+ # "google_analytics_id": "G-XRM93J9QBW",
+}
+html_context = {
+ "show_version": True,
+ "author": author,
+ "description": description,
+ "language": "en",
+ "versions_url": "#",
+}
+html_title = "%s Manual" % (project)
+
+# Uncomment for test
+# html_extra_path = ["versions.json", "alert.html"]
+
+
+def setup(app):
+ html_init = f"const CURRENT_VERSION = {release!r};"
+ html_init += f"const ROOT_URL = {root_url!r};"
+ app.add_js_file(None, body=html_init, priority=100)
diff --git a/docs/dev/index.rst b/docs/dev/index.rst
new file mode 100644
index 000000000..b59c79c31
--- /dev/null
+++ b/docs/dev/index.rst
@@ -0,0 +1,21 @@
+Developer Guide
+===============
+
+.. toctree::
+ :maxdepth: 1
+ :caption: How To
+
+ howto/PROJECT_SETUP.md
+ howto/DOCKER.md
+ howto/DOCUMENTING.md
+ Releasing on GitHub
+ howto/CONTRIBUTING.md
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Explanation
+
+ explanation/COMPILATION.md
+ explanation/TERMINOLOGY_AND_STRUCTURE.md
+ explanation/FLOAT-FUSING.md
+ explanation/MLIR.md
diff --git a/docs/index.rst b/docs/index.rst
index e0e38bb9b..0eff966ef 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,71 +1,10 @@
Concrete Framework's documentation
-===========================================
+==================================
.. toctree::
:maxdepth: 2
- :caption: Getting Started
-
- README.md
- user/howto/INSTALLING.md
- benchmarks.md
-
-.. toctree::
- :maxdepth: 2
- :caption: Tutorial
-
- user/tutorial/ARITHMETIC_OPERATIONS.md
- user/tutorial/TABLE_LOOKUP.md
- user/tutorial/WORKING_WITH_FLOATING_POINTS.md
- user/tutorial/COMPILATION_ARTIFACTS.md
-
-.. toctree::
- :maxdepth: 2
- :caption: How to
-
- user/howto/COMPILING_AND_EXECUTING.md
- user/howto/PRINTING_AND_DRAWING.md
- user/howto/REDUCE_NEEDED_PRECISION.md
- user/howto/DEBUG_SUPPORT_SUBMIT_ISSUES.md
- user/howto/FAQ.md
-
-.. toctree::
- :maxdepth: 2
- :caption: Advanced Examples
-
- user/advanced_examples/QuantizedLinearRegression.ipynb
- user/advanced_examples/QuantizedLogisticRegression.ipynb
-
-.. toctree::
- :maxdepth: 2
- :caption: Explanation
-
- user/explanation/WHAT_IS_FHE.md
- user/explanation/FHE_AND_FRAMEWORK_LIMITS.md
- user/explanation/QUANTIZATION.md
- user/explanation/FUTURE_FEATURES.md
-
-.. toctree::
- :maxdepth: 5
- :caption: Reference
+ User Guide
API <_apidoc/modules.rst>
-
-.. toctree::
- :maxdepth: 2
- :caption: Developer - How To
-
- dev/howto/PROJECT_SETUP.md
- dev/howto/DOCKER.md
- dev/howto/DOCUMENTING.md
- Releasing on GitHub
- dev/howto/CONTRIBUTING.md
-
-.. toctree::
- :maxdepth: 2
- :caption: Developer - Explanation
-
- dev/explanation/COMPILATION.md
- dev/explanation/TERMINOLOGY_AND_STRUCTURE.md
- dev/explanation/FLOAT-FUSING.md
- dev/explanation/MLIR.md
+ Developer
diff --git a/docs/README.md b/docs/user/README.md
similarity index 91%
rename from docs/README.md
rename to docs/user/README.md
index f32164fce..a5c35013e 100644
--- a/docs/README.md
+++ b/docs/user/README.md
@@ -27,7 +27,7 @@ Basically, we have divided our documentation into several parts:
## A work in progress
```{note}
-Concrete is a work in progress, and is currently limited to a certain number of operators and features. In the future, there will be improvements as described in this [section](user/explanation/FUTURE_FEATURES.md).
+Concrete is a work in progress, and is currently limited to a certain number of operators and features. In the future, there will be improvements as described in this [section](explanation/FUTURE_FEATURES.md).
```
The main _current_ limits are:
@@ -35,6 +35,6 @@ The main _current_ limits are:
- **Concrete** needs the integer to be less than 7 bits (included)
- **Concrete** is mostly restricted to scalars (by opposition to tensors). The only exception is the `dot` operator, which can dot a tensor of encrypted values with a tensor of constant values
-The first two limits can be taken care of with the use of quantization, as explained a bit further in [this](user/explanation/QUANTIZATION.md) and [this](user/howto/REDUCE_NEEDED_PRECISION.md) parts of the documentation.
+The first two limits can be taken care of with the use of quantization, as explained a bit further in [this](explanation/QUANTIZATION.md) and [this](howto/REDUCE_NEEDED_PRECISION.md) parts of the documentation.
The scalar limitation is mainly an engineering issue, and will be fixed in the next release. Today, one needs to split all the tensors into small scalars, which is inconvenient and will be no more needed very soon.
diff --git a/docs/benchmarks.md b/docs/user/benchmarks.md
similarity index 100%
rename from docs/benchmarks.md
rename to docs/user/benchmarks.md
diff --git a/docs/user/howto/FAQ.md b/docs/user/howto/FAQ.md
index eb5b82ffe..aadb11688 100644
--- a/docs/user/howto/FAQ.md
+++ b/docs/user/howto/FAQ.md
@@ -2,7 +2,7 @@
## What is **Concrete**?
-See [here](../../README.md)
+See [here](../README.md)
## Is it an open source project?
diff --git a/docs/user/index.rst b/docs/user/index.rst
new file mode 100644
index 000000000..79a673578
--- /dev/null
+++ b/docs/user/index.rst
@@ -0,0 +1,45 @@
+Getting Started
+===============
+
+
+.. toctree::
+ :maxdepth: 1
+
+ README.md
+ howto/INSTALLING.md
+ benchmarks.md
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Tutorial
+
+ tutorial/ARITHMETIC_OPERATIONS.md
+ tutorial/TABLE_LOOKUP.md
+ tutorial/WORKING_WITH_FLOATING_POINTS.md
+ tutorial/COMPILATION_ARTIFACTS.md
+
+.. toctree::
+ :maxdepth: 1
+ :caption: How to
+
+ howto/COMPILING_AND_EXECUTING.md
+ howto/PRINTING_AND_DRAWING.md
+ howto/REDUCE_NEEDED_PRECISION.md
+ howto/DEBUG_SUPPORT_SUBMIT_ISSUES.md
+ howto/FAQ.md
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Advanced Examples
+
+ advanced_examples/QuantizedLinearRegression.ipynb
+ advanced_examples/QuantizedLogisticRegression.ipynb
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Explanation
+
+ explanation/WHAT_IS_FHE.md
+ explanation/FHE_AND_FRAMEWORK_LIMITS.md
+ explanation/QUANTIZATION.md
+ explanation/FUTURE_FEATURES.md
diff --git a/licences/licences_linux_dev.txt b/licences/licences_linux_dev.txt
index ca48dff8c..f8001857b 100644
--- a/licences/licences_linux_dev.txt
+++ b/licences/licences_linux_dev.txt
@@ -9,7 +9,7 @@
QtPy 1.11.2 MIT License
SecretStorage 3.3.1 BSD License
Send2Trash 1.8.0 BSD License
- Sphinx 4.2.0 BSD License
+ Sphinx 4.3.0 BSD License
alabaster 0.7.12 BSD License
argon2-cffi 21.1.0 MIT License
astroid 2.8.3 GNU Lesser General Public License v2 (LGPLv2)
@@ -131,7 +131,7 @@
snowballstemmer 2.1.0 BSD License
soupsieve 2.2.1 MIT License
sphinx-copybutton 0.4.0 MIT License
- sphinx-rtd-theme 1.0.0 MIT License
+ sphinx-zama-theme 2.0.5 BSD License
sphinxcontrib-applehelp 1.0.2 BSD License
sphinxcontrib-devhelp 1.0.2 BSD License
sphinxcontrib-htmlhelp 2.0.0 BSD License
diff --git a/poetry.lock b/poetry.lock
index c8a10a708..e10a2051f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1693,7 +1693,7 @@ python-versions = ">=3.6"
[[package]]
name = "sphinx"
-version = "4.2.0"
+version = "4.3.0"
description = "Python documentation generator"
category = "dev"
optional = false
@@ -1738,19 +1738,19 @@ code_style = ["pre-commit (==2.12.1)"]
rtd = ["sphinx", "ipython", "sphinx-book-theme"]
[[package]]
-name = "sphinx-rtd-theme"
-version = "1.0.0"
-description = "Read the Docs theme for Sphinx"
+name = "sphinx-zama-theme"
+version = "2.0.5"
+description = "Zama sphinx theme forked from PyData sphinx theme"
category = "dev"
optional = false
-python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
+python-versions = ">=3.5"
[package.dependencies]
-docutils = "<0.18"
-sphinx = ">=1.6"
-
-[package.extras]
-dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"]
+beautifulsoup4 = "4.10.0"
+docutils = "0.17.1"
+myst-parser = "0.15.2"
+sphinx = "4.3.0"
+sphinx-copybutton = "0.4.0"
[[package]]
name = "sphinxcontrib-applehelp"
@@ -2010,7 +2010,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
[metadata]
lock-version = "1.1"
python-versions = ">=3.8,<3.9"
-content-hash = "3ec23f6a38087a531ba1ef8654127249fd228ea57ef7d39aee8e2f431a6c7f7e"
+content-hash = "257bd43feacf444f205828ac6a97ad54ee24f00a94fd29e1800a1e3e42fa39f6"
[metadata.files]
alabaster = [
@@ -2456,28 +2456,12 @@ markdown-it-py = [
{file = "markdown_it_py-1.1.0-py3-none-any.whl", hash = "sha256:98080fc0bc34c4f2bcf0846a096a9429acbd9d5d8e67ed34026c03c61c464389"},
]
markupsafe = [
- {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"},
- {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"},
- {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"},
{file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"},
{file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"},
@@ -2486,27 +2470,14 @@ markupsafe = [
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"},
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"},
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"},
- {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"},
{file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"},
{file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"},
{file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"},
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"},
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"},
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"},
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"},
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"},
- {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"},
{file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"},
{file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"},
{file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"},
@@ -2516,12 +2487,6 @@ markupsafe = [
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"},
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"},
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"},
- {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"},
{file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"},
{file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"},
{file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"},
@@ -2983,32 +2948,24 @@ pyzmq = [
{file = "pyzmq-22.3.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f89468059ebc519a7acde1ee50b779019535db8dcf9b8c162ef669257fef7a93"},
{file = "pyzmq-22.3.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea12133df25e3a6918718fbb9a510c6ee5d3fdd5a346320421aac3882f4feeea"},
{file = "pyzmq-22.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c532fd68b93998aab92356be280deec5de8f8fe59cd28763d2cc8a58747b7f"},
- {file = "pyzmq-22.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f907c7359ce8bf7f7e63c82f75ad0223384105f5126f313400b7e8004d9b33c3"},
- {file = "pyzmq-22.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:902319cfe23366595d3fa769b5b751e6ee6750a0a64c5d9f757d624b2ac3519e"},
{file = "pyzmq-22.3.0-cp310-cp310-win32.whl", hash = "sha256:67db33bea0a29d03e6eeec55a8190e033318cee3cbc732ba8fd939617cbf762d"},
{file = "pyzmq-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:7661fc1d5cb73481cf710a1418a4e1e301ed7d5d924f91c67ba84b2a1b89defd"},
{file = "pyzmq-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79244b9e97948eaf38695f4b8e6fc63b14b78cc37f403c6642ba555517ac1268"},
{file = "pyzmq-22.3.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab888624ed68930442a3f3b0b921ad7439c51ba122dbc8c386e6487a658e4a4e"},
{file = "pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:18cd854b423fce44951c3a4d3e686bac8f1243d954f579e120a1714096637cc0"},
{file = "pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:de8df0684398bd74ad160afdc2a118ca28384ac6f5e234eb0508858d8d2d9364"},
- {file = "pyzmq-22.3.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:62bcade20813796c426409a3e7423862d50ff0639f5a2a95be4b85b09a618666"},
- {file = "pyzmq-22.3.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ea5a79e808baef98c48c884effce05c31a0698c1057de8fc1c688891043c1ce1"},
{file = "pyzmq-22.3.0-cp36-cp36m-win32.whl", hash = "sha256:3c1895c95be92600233e476fe283f042e71cf8f0b938aabf21b7aafa62a8dac9"},
{file = "pyzmq-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:851977788b9caa8ed011f5f643d3ee8653af02c5fc723fa350db5125abf2be7b"},
{file = "pyzmq-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b4ebed0977f92320f6686c96e9e8dd29eed199eb8d066936bac991afc37cbb70"},
{file = "pyzmq-22.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42abddebe2c6a35180ca549fadc7228d23c1e1f76167c5ebc8a936b5804ea2df"},
{file = "pyzmq-22.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1e41b32d6f7f9c26bc731a8b529ff592f31fc8b6ef2be9fa74abd05c8a342d7"},
{file = "pyzmq-22.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:be4e0f229cf3a71f9ecd633566bd6f80d9fa6afaaff5489492be63fe459ef98c"},
- {file = "pyzmq-22.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:08c4e315a76ef26eb833511ebf3fa87d182152adf43dedee8d79f998a2162a0b"},
- {file = "pyzmq-22.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:badb868fff14cfd0e200eaa845887b1011146a7d26d579aaa7f966c203736b92"},
{file = "pyzmq-22.3.0-cp37-cp37m-win32.whl", hash = "sha256:7c58f598d9fcc52772b89a92d72bf8829c12d09746a6d2c724c5b30076c1f11d"},
{file = "pyzmq-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2b97502c16a5ec611cd52410bdfaab264997c627a46b0f98d3f666227fd1ea2d"},
{file = "pyzmq-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d728b08448e5ac3e4d886b165385a262883c34b84a7fe1166277fe675e1c197a"},
{file = "pyzmq-22.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:480b9931bfb08bf8b094edd4836271d4d6b44150da051547d8c7113bf947a8b0"},
{file = "pyzmq-22.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7dc09198e4073e6015d9a8ea093fc348d4e59de49382476940c3dd9ae156fba8"},
{file = "pyzmq-22.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ca6cd58f62a2751728016d40082008d3b3412a7f28ddfb4a2f0d3c130f69e74"},
- {file = "pyzmq-22.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:468bd59a588e276961a918a3060948ae68f6ff5a7fa10bb2f9160c18fe341067"},
- {file = "pyzmq-22.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c88fa7410e9fc471e0858638f403739ee869924dd8e4ae26748496466e27ac59"},
{file = "pyzmq-22.3.0-cp38-cp38-win32.whl", hash = "sha256:c0f84360dcca3481e8674393bdf931f9f10470988f87311b19d23cda869bb6b7"},
{file = "pyzmq-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:f762442bab706fd874064ca218b33a1d8e40d4938e96c24dafd9b12e28017f45"},
{file = "pyzmq-22.3.0-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:954e73c9cd4d6ae319f1c936ad159072b6d356a92dcbbabfd6e6204b9a79d356"},
@@ -3016,8 +2973,6 @@ pyzmq = [
{file = "pyzmq-22.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:acebba1a23fb9d72b42471c3771b6f2f18dcd46df77482612054bd45c07dfa36"},
{file = "pyzmq-22.3.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cf98fd7a6c8aaa08dbc699ffae33fd71175696d78028281bc7b832b26f00ca57"},
{file = "pyzmq-22.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d072f7dfbdb184f0786d63bda26e8a0882041b1e393fbe98940395f7fab4c5e2"},
- {file = "pyzmq-22.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:53f4fd13976789ffafedd4d46f954c7bb01146121812b72b4ddca286034df966"},
- {file = "pyzmq-22.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d1b5d457acbadcf8b27561deeaa386b0217f47626b29672fa7bd31deb6e91e1b"},
{file = "pyzmq-22.3.0-cp39-cp39-win32.whl", hash = "sha256:e6a02cf7271ee94674a44f4e62aa061d2d049001c844657740e156596298b70b"},
{file = "pyzmq-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d3dcb5548ead4f1123851a5ced467791f6986d68c656bc63bfff1bf9e36671e2"},
{file = "pyzmq-22.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3a4c9886d61d386b2b493377d980f502186cd71d501fffdba52bd2a0880cef4f"},
@@ -3132,16 +3087,15 @@ soupsieve = [
{file = "soupsieve-2.2.1.tar.gz", hash = "sha256:052774848f448cf19c7e959adf5566904d525f33a3f8b6ba6f6f8f26ec7de0cc"},
]
sphinx = [
- {file = "Sphinx-4.2.0-py3-none-any.whl", hash = "sha256:98a535c62a4fcfcc362528592f69b26f7caec587d32cd55688db580be0287ae0"},
- {file = "Sphinx-4.2.0.tar.gz", hash = "sha256:94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6"},
+ {file = "Sphinx-4.3.0-py3-none-any.whl", hash = "sha256:7e2b30da5f39170efcd95c6270f07669d623c276521fee27ad6c380f49d2bf5b"},
+ {file = "Sphinx-4.3.0.tar.gz", hash = "sha256:6d051ab6e0d06cba786c4656b0fe67ba259fe058410f49e95bee6e49c4052cbf"},
]
sphinx-copybutton = [
{file = "sphinx-copybutton-0.4.0.tar.gz", hash = "sha256:8daed13a87afd5013c3a9af3575cc4d5bec052075ccd3db243f895c07a689386"},
{file = "sphinx_copybutton-0.4.0-py3-none-any.whl", hash = "sha256:4340d33c169dac6dd82dce2c83333412aa786a42dd01a81a8decac3b130dc8b0"},
]
-sphinx-rtd-theme = [
- {file = "sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl", hash = "sha256:4d35a56f4508cfee4c4fb604373ede6feae2a306731d533f409ef5c3496fdbd8"},
- {file = "sphinx_rtd_theme-1.0.0.tar.gz", hash = "sha256:eec6d497e4c2195fa0e8b2016b337532b8a699a68bcb22a512870e16925c6a5c"},
+sphinx-zama-theme = [
+ {file = "sphinx_zama_theme-2.0.5.tar.gz", hash = "sha256:c7427d8db1ea5626bf8341f8564e6509071c43453b76299a367e026dd4da31b3"},
]
sphinxcontrib-applehelp = [
{file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"},
diff --git a/pyproject.toml b/pyproject.toml
index b6f63a45b..a964d0d1e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,15 +28,11 @@ pydocstyle = "^6.1.1"
jupyter = "^1.0.0"
flake8 = "^3.9.2"
flake8-bugbear = "^21.9.2"
-Sphinx = "^4.2.0"
-sphinx-rtd-theme = "^1.0.0"
-myst-parser = "^0.15.2"
nbsphinx = "^0.8.7"
tqdm = "^4.62.3"
psutil = "^5.8.0"
py-cpuinfo = "^8.0.0"
python-dotenv = "^0.19.0"
-sphinx-copybutton = "^0.4.0"
nbmake = "^0.9"
python-semantic-release = "7.19.2"
semver = "^2.13.0"
@@ -47,6 +43,7 @@ pytest-randomly = "^3.10.1"
pygments-style-tomorrow = "^1.0.0"
beautifulsoup4 = "^4.10.0"
pip-licenses = "^3.5.3"
+sphinx-zama-theme = "^2.0.5"
[build-system]
requires = ["poetry-core>=1.0.0"]
diff --git a/script/actions_utils/generate_versions_json.py b/script/actions_utils/generate_versions_json.py
new file mode 100644
index 000000000..2e8f24871
--- /dev/null
+++ b/script/actions_utils/generate_versions_json.py
@@ -0,0 +1,81 @@
+"""Tool to manage the versions.json file at the root of our docs sites."""
+
+import argparse
+import json
+from json.decoder import JSONDecodeError
+from pathlib import Path
+
+from semver import VersionInfo
+
+
+def strip_leading_v(version_str: str):
+ """Strip leading v of a version which is not SemVer compatible."""
+ return version_str[1:] if version_str.startswith("v") else version_str
+
+
+def main(args):
+ """Entry point."""
+ version = args.version
+ latest = args.latest
+ prerelease = args.prerelease
+
+ if not VersionInfo.isvalid(strip_leading_v(version)):
+ raise RuntimeError(f"Invalid version: {version}")
+
+ version_json_file_path = Path(args.versions_json_file).resolve()
+ try:
+ with open(version_json_file_path, "r", encoding="utf-8") as f:
+ version_json = json.loads(f.read())
+ except JSONDecodeError as err:
+ raise RuntimeError(
+ f"An error occurred while trying to load {str(version_json_file_path)}"
+ ) from err
+
+ # Version json is composed by:
+ # all: list of all published versions
+ # menu: list of all available versions (if any entry is not included in "all",
+ # warning banner with DEV/PRE-RELEASE doc warning will be displayed)
+ # latest: latest version, if current doc != latest, warning banner is displayed
+ if "version" not in version_json["menu"]:
+ version_json["menu"].append(version)
+ if not prerelease:
+ version_json["all"].append(version)
+ if latest:
+ version_json["latest"] = version
+
+ print(version_json)
+ output_json_path = Path(args.output_json).resolve()
+ with open(output_json_path, "w", encoding="utf-8") as f:
+ json.dump(version_json, f, indent=4)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser("versions.json generator", allow_abbrev=False)
+
+ parser.add_argument(
+ "--add-version",
+ type=str,
+ required=True,
+ dest="version",
+ help="A single versions to add to versions.json. "
+ "The link will point to '$VERSION/' and will have text '$VERSION'.",
+ )
+ parser.add_argument(
+ "--versions-json-file", type=str, required=True, help="Path to the versions.json to update."
+ )
+ parser.add_argument(
+ "--prerelease",
+ action="store_true",
+ dest="prerelease",
+ help="set this version as a pre-release documentation.",
+ )
+ parser.add_argument(
+ "--latest",
+ action="store_true",
+ dest="latest",
+ help="set this version as latest available documentation.",
+ )
+ parser.add_argument("--output-json", type=str, required=True, help="Output file path.")
+
+ cli_args = parser.parse_args()
+ main(cli_args)