From 996b368f41fad501e1cf87d4b1b5a69bbb1c92af Mon Sep 17 00:00:00 2001 From: Paul Xu Date: Mon, 18 Sep 2023 11:27:30 -0400 Subject: [PATCH 1/4] improve css --- docs/styles/extra.css | 92 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 19 deletions(-) diff --git a/docs/styles/extra.css b/docs/styles/extra.css index 04e36100..ab2bb2a5 100644 --- a/docs/styles/extra.css +++ b/docs/styles/extra.css @@ -1,45 +1,99 @@ +[data-md-color-scheme="ocean"] { + --md-primary-fg-color: #245c81; + --md-accent-fg-color: #ec205b; + --md-typeset-a-color: #338fb8; +} + +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #245c81; + --md-accent-fg-color: #ec205b; + --md-typeset-a-color: #00b4b5; +} + .md-header-nav__title img { - height: 200px; /* adjust size as needed */ - width: 200px; /* adjust size as needed */ + height: 200px; /* adjust size as needed */ + width: 200px; /* adjust size as needed */ +} + +.md-typeset h1 { + font-weight: 300; +} + +h2 { + font-weight: 700; +} + +.md-header-__title { + font-size: 1rem; +} + +ul .md-nav__list { + margin-left: 0.2rem; +} + +.md-nav__list label { + font-size: 0.7rem; + font-weight: 600; + margin-bottom: 0.8rem; + text-transform: uppercase; +} + +.md-nav__title { + font-size: 0.7rem; + font-weight: 600; + margin-bottom: 0.8rem; + text-transform: uppercase; +} + +div .md-sidebar__inner { + margin-left: 0.2rem; +} + +div .md-sidebar__inner nav .md-nav__list { + margin-left: 0.2rem; +} + +div .md-sidebar__inner { + margin-left: 0.2rem; } #wrapper { - display: grid; - grid-template-columns: 33.334% 66.667%; + display: grid; + grid-template-columns: 33.334% 66.667%; } #main-logo { - text-align: center; + text-align: center; } #main-title { - padding-top: 1.3em; - padding-left: 1.0em; + padding-top: 1.3em; + padding-left: 1em; } .right-margin { - margin-right: 10px; + margin-right: 10px; } @media screen and (min-width: 1220px) { - .show-on-small { - display: none - } + .show-on-small { + display: none; + } } .move-down { - transform: translate(0px, -5px); - animation: down_movement 1000ms infinite ease-out; + transform: translate(0px, -5px); + animation: down_movement 1000ms infinite ease-out; } @keyframes down_movement { - to { - transform: translate(0px, 5px); - } + to { + transform: translate(0px, 5px); + } } .question { - color: pink; - width: 35px; - height: 35px; + color: pink; + width: 35px; + height: 35px; } From ed50a18b984300aee4936e5604ba3c1c799f9209 Mon Sep 17 00:00:00 2001 From: Paul Xu Date: Mon, 18 Sep 2023 11:27:43 -0400 Subject: [PATCH 2/4] update mkdocs.yml --- mkdocs.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index ef6eb07b..c0840cce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -28,7 +28,7 @@ plugins: - search - autorefs - mkdocs-jupyter: - execute: True + execute: true execute_ignore: - getting_started/getting_started.ipynb - tutorials/main_tutorial.ipynb @@ -52,13 +52,19 @@ plugins: docstring_section_style: "list" show_root_members_full_path: true show_object_full_path: false - show_category_heading: true + show_category_heading: false show_signature_annotations: true show_source: false - group_by_category: false + group_by_category: true signature_crossrefs: true + summary: true + filters: + - "!^_" theme: logo: images/navlogo.png + font: + text: Noto Sans + code: Roboto Mono name: material custom_dir: docs/overrides features: @@ -76,13 +82,16 @@ theme: palette: # Palette toggle for automatic mode - media: "(prefers-color-scheme)" + scheme: ocean + primary: custom toggle: icon: material/brightness-auto name: Switch to light mode # Palette toggle for light mode - media: "(prefers-color-scheme: light)" - scheme: default + scheme: ocean + primary: custom toggle: icon: material/brightness-7 name: Switch to dark mode @@ -90,6 +99,7 @@ theme: # Palette toggle for dark mode - media: "(prefers-color-scheme: dark)" scheme: slate + primary: custom toggle: icon: material/brightness-4 name: Switch to system preference @@ -101,8 +111,11 @@ extra_css: - "styles/extra.css" markdown_extensions: + - toc: + permalink: true - admonition - pymdownx.highlight: + use_pygments: true anchor_linenums: true line_spans: __span pygments_lang_class: true From f6a166c48af47308bd4f0e8838da0b5a35b827e5 Mon Sep 17 00:00:00 2001 From: Paul Xu Date: Mon, 18 Sep 2023 11:28:13 -0400 Subject: [PATCH 3/4] updates to documentation pages --- docs/index.md | 31 +++++++++++++++++-------------- docs/overrides/main.html | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/docs/index.md b/docs/index.md index f95722de..c95e35a9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,21 +1,24 @@ -
- - - - +
+ + + +
-HSSM is a Python toolbox that provides a seamless combination of state-of-the-art likelihood approximation methods with the wider ecosystem of probabilistic programming languages. It facilitates flexible hierarchical model building and inference via modern MCMC samplers. HSSM is user-friendly and provides the ability to rigorously estimate the impact of neural and other trial-by-trial covariates through parameter-wise mixed-effects models for a large variety of cognitive process models. +![PyPI](https://img.shields.io/pypi/v/hssm) +![PyPI - Downloads](https://img.shields.io/pypi/dm/HSSM?link=https%3A%2F%2Fpypi.org%2Fproject%2Fhssm%2F) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hssm) +![GitHub pull requests](https://img.shields.io/github/issues-pr/lnccbrown/HSSM) +![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/lnccbrown/HSSM/run_tests.yml) +![GitHub Repo stars](https://img.shields.io/github/stars/lnccbrown/HSSM) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) -**Authors**: Alexander Fengler, Aisulu Omar, Paul Xu, Krishn Bera, Michael J. Frank +**HSSM** (Hierarchical Sequential Sampling Modeling) is a modern Python toolbox that provides state-of-the-art likelihood approximation methods within the Python Bayesian ecosystem. It facilitates hierarchical model building and inference via fast and robust MCMC samplers. User-friendly, extensible, and flexible, HSSM can rigorously estimate the impact of neural and other trial-by-trial covariates through parameter-wise mixed-effects models for a large variety of cognitive process models. -**Contacts**: alexander_fengler@brown.edu -**GitHub**: https://github.com/lnccbrown/HSSM +HSSM is a [BRAINSTORM](https://ccbs.carney.brown.edu/brainstorm) project in collaboration with the [Center for Computation and Visualization (CCV)](https://ccv.brown.edu/) and the [Center for Computational Brain Science](https://ccbs.carney.brown.edu/) within the [Carney Institute at Brown University](https://www.brown.edu/carney/). -**Copyright**: This document has been placed in the public domain. - -**License**: HSSM is licensed under [Copyright 2023, Brown University, Providence, RI](../LICENSE) +## Features - Allows approximate hierarchical Bayesian inference via various likelihood approximators. - Estimate impact of neural and other trial-by-trial covariates via native hierarchical mixed-regression support. @@ -29,13 +32,13 @@ HSSM is a Python toolbox that provides a seamless combination of state-of-the-ar `hssm` is available through PyPI. You can install it with Pip via: -``` +```bash pip install hssm ``` You can also install the bleeding edge version of `hssm` directly from this repo: -``` +```bash pip install git+https://github.com/lnccbrown/HSSM.git ``` diff --git a/docs/overrides/main.html b/docs/overrides/main.html index b8d58c39..38eda562 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -8,7 +8,7 @@ Navigate the site here! - v0.1.4 is out! + v0.1.5 is released! From 51f2a128b0aee3818daa576e8fed04da57bc303b Mon Sep 17 00:00:00 2001 From: Paul Xu Date: Mon, 18 Sep 2023 11:28:25 -0400 Subject: [PATCH 4/4] Improve documentation on hssm module --- src/hssm/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hssm/__init__.py b/src/hssm/__init__.py index 382d3a8d..d7ba5d8f 100644 --- a/src/hssm/__init__.py +++ b/src/hssm/__init__.py @@ -1,4 +1,11 @@ -"""HSSM - Hierarchical Sequential Sampling Models.""" +"""Top-level entry to the HSSM package. + +The `hssm` module is the top-level entry to the HSSM package. It exports some of the +most important classes, including the `HSSM` class that handles model creation and +sampling. You will also find utility classes such as `hssm.Prior`, `hssm.ModelConfig`, +and `hssm.Param`, with which users will often interface. Additionally, most frequently +used utility functions can also be found. +""" import importlib.metadata import logging