From 4a59d4b4f57aa8be869bade2f87269c3bca45cbe Mon Sep 17 00:00:00 2001 From: Emily Hunt Date: Thu, 30 Nov 2023 17:03:02 +0100 Subject: [PATCH] Add mkdocs --- README.md | 16 ++++++++++++++-- docs/index.md | 17 +++++++++++++++++ mkdocs.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/README.md b/README.md index a2fde94..aca02b4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ -# smartmultiprocessing -Memory-managed parallel computing for medium-sized computational tasks. +# SmartMultiprocessing +A drop-in replacement for Python's `multiprocessing` library with many extra features, including: memory management, smart task scheduling, a pause button, a GUI, and more. + +`SmartMultiprocessing` is ideal for use cases beyond typical `multiprocessing` use, like: + +- Running code where memory usage is different depending on input values +- Benchmarking experimental code where memory usage is not well understood +- Running code on a machine where it's important to be able to pause execution/change thread and memory use on the fly +- Being able to monitor the performance of code without having to write your own monitoring library from scratch + + +## SmartMultiprocessing is in active development! + +This project is a spin-out from code that [@emilyhunt](https://github.com/emilyhunt) wrote during her PhD. It's currently in alpha / active development - check back here soon for the first production-ready versions! diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..000ea34 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,17 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..eb350b5 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,48 @@ +site_name: SmartMultiprocessing +site_url: https://smartmultiprocessing.org +site_author: Emily Hunt +site_description: >- + A drop-in replacement for Python's `multiprocessing` library with many extra features, + including: memory management, smart task scheduling, a pause button, a GUI, and more. + +repo_url: https://github.com/emilyhunt/smartmultiprocessing +repo_name: smartmultiprocessing + +theme: + name: material + features: + - navigation.sections # Sections are included in the navigation on the left. + - 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 / dark mode + # We deliberately don't automatically use `media` to check a user's preferences. We default to light mode as + # (a) it looks more professional, and (b) is more obvious about the fact that it offers a (dark mode) toggle. + - scheme: default + primary: white + accent: amber + toggle: + icon: material/weather-night + name: Switch to dark mode + - scheme: slate + primary: black + accent: amber + toggle: + icon: material/weather-sunny + name: Switch to light mode + icon: + repo: fontawesome/brands/github # GitHub logo in top right + logo: "material/circle-opacity" # Equinox logo in top left + favicon: "_static/favicon.png" + +markdown_extensions: + - pymdownx.arithmatex: # Render LaTeX via MathJax + generic: true + - pymdownx.superfences # Seems to enable syntax highlighting when used with the Material theme. + - pymdownx.details # Allowing hidden expandable regions denoted by ??? + - pymdownx.snippets: # Include one Markdown file into another + base_path: docs + - admonition + - toc: + permalink: "ยค" # Adds a clickable permalink to each section heading + toc_depth: 4 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9caf94e..a777f3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ [project.optional-dependencies] -dev = ["check-manifest", "pytest"] +dev = ["check-manifest", "pytest", "mkdocs-material", "mkdocstrings[python]"] test = ["pytest"] [project.urls] # Optional -- 2.54.0