diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4786b81..e126d31 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: # Misc commit checks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 # ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available hooks: # Autoformat: Makes sure files end in a newline and only a newline. @@ -34,6 +34,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.6 hooks: - id: codespell diff --git a/_static/fonts/itim-v14-latin-regular.woff2 b/_static/fonts/itim-v14-latin-regular.woff2 new file mode 100644 index 0000000..985eced Binary files /dev/null and b/_static/fonts/itim-v14-latin-regular.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-500.woff2 b/_static/fonts/poppins-v20-latin-500.woff2 new file mode 100644 index 0000000..c660336 Binary files /dev/null and b/_static/fonts/poppins-v20-latin-500.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-600.woff2 b/_static/fonts/poppins-v20-latin-600.woff2 new file mode 100644 index 0000000..921e962 Binary files /dev/null and b/_static/fonts/poppins-v20-latin-600.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-700.woff2 b/_static/fonts/poppins-v20-latin-700.woff2 new file mode 100644 index 0000000..bf022fc Binary files /dev/null and b/_static/fonts/poppins-v20-latin-700.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-700italic.woff2 b/_static/fonts/poppins-v20-latin-700italic.woff2 new file mode 100644 index 0000000..70974d8 Binary files /dev/null and b/_static/fonts/poppins-v20-latin-700italic.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-italic.woff2 b/_static/fonts/poppins-v20-latin-italic.woff2 new file mode 100644 index 0000000..1112336 Binary files /dev/null and b/_static/fonts/poppins-v20-latin-italic.woff2 differ diff --git a/_static/fonts/poppins-v20-latin-regular.woff2 b/_static/fonts/poppins-v20-latin-regular.woff2 new file mode 100644 index 0000000..b69e009 Binary files /dev/null and b/_static/fonts/poppins-v20-latin-regular.woff2 differ diff --git a/_static/pyos.css b/_static/pyos.css index a14cb75..d94fb75 100644 --- a/_static/pyos.css +++ b/_static/pyos.css @@ -1,47 +1,383 @@ +/* PyOS-specific vars :) */ +:root { + --pyos-color-primary: #703c87; + --pyos-color-secondary: #8045e5; + --pyos-color-secondary-highlight: #591bc2; + --pyos-color-tertiary: #A66C98; + --pyos-color-dark: #542568; + --pyos-color-light: #DAABCF; -/* HEADER BLOCK */ -div.header__block { - color: #222; + /* Darkmode Adjustments*/ + --pyos-dm-color-primary: #C483E0; + + /* Fonts (overrides base theme) */ + --pst-font-family-heading: 'Poppins', sans-serif; + --pst-font-family-base: 'Poppins', sans-serif; + --pyos-font-family-h1: 'Itim', serif; + +} + + +/* anything related to the dark theme */ +html[data-theme="dark"] { + --pst-color-info-bg: #400f59!important; + --pst-color-tbl-row: #2E2E2E!important; +} + +/* anything related to the light theme */ +html[data-theme="light"] { + --pst-color-tbl-row: #f5f1ff!important; +} +} + + +html, body { + font-size: 1.0rem; +} + +/* Allow the center content to expand to wide on wide screens */ +@media (min-width: 960px){ +.bd-page-width { + max-width: min(100%, 1600px)!important; + } +} + +/* Make sure the header nav is centered - not sure why it's not overriding*/ +.navbar-header-items .me-auto, .me-auto .navbar-header-items__center { + margin-left: auto!important; + margin-right: auto!important; +} + +/* custom fonts */ + +html, body { + font-size: 1.02rem; +} + +body p { +} + +.admonition { + margin-top: 60px!important; + margin-bottom: 70px!important; +} + +h1 { + margin-top: 10px; + margin-bottom: 40px; + font-family: var(--pyos-font-family-h1) !important; + color: var(--pyos-h1-color); +} +h2 { + margin-top: 1em; +} + +h3 { + margin-top: 60px} + +figcaption .caption-text { + text-align: left!important; +} + +figure { + margin-top: 60px!important; + margin-bottom: 60px!important; +} + +figcaption { + font-size: .9em; + font-weight: bold; +} + + +.admonition p { + font-size: .9em; } +/* Navbar */ /* -.announcement div { - background-color: #ccc; -} */ +Don't fill all vertical space beneath TOC, which causes +readthedocs version selector to fall off the page and the +ugly scrollbar to show all the time +*/ +.bd-sidebar-primary .sidebar-primary-items__end { + margin-bottom: unset; + margin-top: unset; +} + +/* Tutorial block page */ +.left-div { + background-color: #3498db; + color: #fff; + text-align: center; + padding: 20px; + width: 35%; + border-radius: 10px; +} -.header-item.announcement, .header-item.announcement .noprint { - background-color:#ccc; +.right-div { + margin-top: 10px; } -div .announcement .header-item .noprint, header-item.announcement { - background-color: #ccc!important; +.lesson-div { + cursor: pointer; + transition: background-color 0.3s; + margin-bottom: 10px; + padding: 10px; + border-radius: 5px; + text-align: center; + color: #333; } -/* notes */ +.lesson-div a { + color: inherit; + text-decoration: none; + display: block; + height: 100%; + width: 100%; +} -div.admonition.note .admonition-title, div.admonition.note .admonition-title::before { - background-color: #C1CFD4; - color: #222; +.lesson-div:hover { + background-color: #ccc; +} +/* Different colors and their shades */ +.lesson-div:nth-child(1) { + background-color: #216A6B; + color: #fff; } -div.admonition.note { - border-color: #C1CFD4; - background-color: #E3F4FA; +.lesson-div:nth-child(2) { + background-color: #6D597A; + color: #fff; } +.lesson-div:nth-child(3) { + background-color: #B56576; + color: #fff; +} -div.admonition.important .admonition-title, div.admonition.important .admonition-title::before { - background-color: #107762; - color: #ffffff!important; +.lesson-div:nth-child(4) { + background-color: #3A8C8E; /* Shade of #216A6B */ } -div.admonition.important .admonition-title { - background-color: #107762; - border-color: #1abc9c; +.lesson-div:nth-child(5) { + background-color: #8F7B8D; /* Shade of #6D597A */ } -div.admonition.important { - border-color: #0e6654; - background-color: #ecfcf9; +.lesson-div:nth-child(6) { + background-color: #D78287; /* Shade of #B56576 */ } + +.lesson-div:nth-child(7) { + background-color: #185355; /* Darker shade of #216A6B */ + color: #fff; +} + + + +html[data-theme=light] { + --pst-color-primary: var(--pyos-color-primary); + --pst-color-primary-text: #fff; + --pst-color-primary-highlight: #053f49; + --sd-color-primary: var(--pst-color-primary); + --sd-color-primary-text: var(--pst-color-primary-text); + --sd-color-primary-highlight: var(--pst-color-primary-highlight); + --sd-color-primary-bg: #d0ecf1; + --sd-color-primary-bg-text: #14181e; + --pst-color-secondary: var(--pyos-color-secondary); + --pst-color-secondary-text: #fff; + --pst-color-secondary-highlight: var(--pyos-color-secondary-highlight); + --sd-color-secondary: var(--pst-color-secondary); + --sd-color-secondary-text: var(--pst-color-secondary-text); + --sd-color-secondary-highlight: var(--pst-color-secondary-highlight); + --sd-color-secondary-bg: #e0c7ff; + --sd-color-secondary-bg-text: #14181e; + --pst-color-success: #00843f; + --pst-color-success-text: #fff; + --pst-color-success-highlight: #00381a; + --sd-color-success: var(--pst-color-success); + --sd-color-success-text: var(--pst-color-success-text); + --sd-color-success-highlight: var(--pst-color-success-highlight); + --sd-color-success-bg: #d6ece1; + --sd-color-success-bg-text: #14181e; + --pst-color-info: #A66C98; /* general admonition */ + --pst-color-info-bg: #eac8e2; + --pst-heading-color: var(--pyos-color-dark); + --pyos-h1-color: var(--pyos-color-dark); +} + +html[data-theme=dark] { + --pst-color-primary: var(--pyos-dm-color-primary); + --pst-color-link: var(--pyos-color-light); + --pst-color-link-hover: var(--pyos-dm-color-primary); + --pyos-h1-color: var(--pyos-color-light); +} + + +/* -------------------------------------- */ +/* Generated by https://gwfh.mranftl.com/ */ + +/* poppins-regular - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: normal; + font-weight: 400; + src: url('./fonts/poppins-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* poppins-italic - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: italic; + font-weight: 400; + src: url('./fonts/poppins-v20-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* poppins-700 - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: normal; + font-weight: 700; + src: url('./fonts/poppins-v20-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* poppins-700italic - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: italic; + font-weight: 700; + src: url('./fonts/poppins-v20-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* itim-regular - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Itim'; + font-style: normal; + font-weight: 400; + src: url('./fonts/itim-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* poppins-500 - latin */ +@font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: normal; + font-weight: 500; + src: url('./fonts/poppins-v20-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ + } + /* poppins-600 - latin */ + @font-face { + font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ + font-family: 'Poppins'; + font-style: normal; + font-weight: 600; + src: url('./fonts/poppins-v20-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ + } +/* Cards */ + +/* todo light and dark adaptations needed */ + +.sd-card-title { + margin-bottom: 0.5rem; + background-color: var(--pst-color-info-bg)!important; + padding: .5rem; + border-bottom: 2px solid #999; + font-size: 1.2rem; + font-weight: 600!important; +} + +.sd-card-header { + font-size: 1.2em; + font-weight: 600; +} + +.sd-card-body { + padding: 0 0!important; + + .left-aligned + & ul li { + text-align: left; + } +} + +.sd-card { + padding-bottom: 1.5em; +} + +.sd-card-text { + text-align: left; + padding-right: 1.5em; + padding-left: 1.5em; +} + +#footnotes { + font-size: .8em; + line-height: 1.1; + &span.label { + font-weight:400 + } +} + +aside.footnote { + margin-bottom: 0.5rem; + &:last-child { + margin-bottom: 1rem; + } + span.label, + span.backrefs { + font-weight: 400!important; + } + + &:target { + background-color: var(--pst-color-target); + } + } + + +.fa-circle-check { + color: #7BCDBA; +} + +/* pyOpenSci table styles */ + +.pyos-table { + & th.head, .pyos-table th.head.stub { + background-color: #33205C!important; + + & p { + color: #fff + } +} + & th.stub { + background-color: var(--pst-color-tbl-row); + font-weight: 500; + } + & td { + vertical-align: middle; + text-align: center; + } +} + + +/* Make the first column in a table a "header" like thing */ + + +/* Dark mode fix for tables */ +@media (prefers-color-scheme: dark) { + td:not(.row-header):nth-child(1) { + background-color: var(--pst-color-tbl-row); /* Adjust the dark mode color */ + color: #ffffff; /* Adjust the text color for better contrast */ + font-weight: 500; + } + } + +td, th { + border: 1px solid #ccc; /* Light gray border */ + padding: 8px; /* Add some padding for better readability */ + } diff --git a/codespell-ignore.txt b/codespell-ignore.txt new file mode 100644 index 0000000..e69de29 diff --git a/conf.py b/conf.py index 1464c0c..9fe222c 100644 --- a/conf.py +++ b/conf.py @@ -14,16 +14,29 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +from datetime import datetime +import subprocess + +current_year = datetime.now().year +organization_name = "pyOpenSci" # -- Project information ----------------------------------------------------- -project = "governance" -copyright = "2023, pyOpenSci" +project = "pyOpenSci Handbook" +copyright = f"{current_year}, {organization_name}" author = "pyOpenSci" -# The full version, including alpha/beta/rc tags -release = "0.1" +# Get the latest Git tag - there might be a prettier way to do this but... +try: + release_value = ( + subprocess.check_output(["git", "describe", "--tags"]).decode("utf-8").strip() + ) + release_value = release_value[:4] +except subprocess.CalledProcessError: + release_value = "0.1" # Default value in case there's no tag +# Update the release value +release = release_value # -- General configuration --------------------------------------------------- @@ -32,17 +45,30 @@ # ones. extensions = [ "myst_nb", - # "myst_parser", "sphinx_design", "sphinx_copybutton", "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx_sitemap", + "sphinxext.opengraph", + "sphinx_favicon", ] # colon fence for card support in md -myst_enable_extensions = ["colon_fence"] +myst_enable_extensions = [ + "colon_fence", + "deflist", + "attrs_block", +] +myst_heading_anchors = 3 +# Link to our repo -# Link to our repo for easy PR/ editing +# Sphinx_favicon is used now in favor of built in support +# https://pypi.org/project/sphinx-favicon/ +favicons = [ + {"href": "https://www.pyopensci.org/images/favicon.ico"}, +] html_theme_options = { "announcement": "
Submit Your Python Package for Peer Review - Learn More!
", @@ -56,28 +82,37 @@ "name": "Packaging Guide", }, { - "url": "https://pyopensci.org/python-package-guide", + "url": "https://pyopensci.org/peer-review-guide", "name": "Peer Review Guide", }, ], + "icon_links": [ + { + "name": "Mastodon", + "url": "https://fosstodon.org/@pyOpenSci", + "icon": "fa-brands fa-mastodon", + }, + ], "logo": { "text": "Governance", "image_dark": "logo-dark-mode.png", "image_light": "logo-light-mode.png", - "alt_text": "pyOpenSci Governance documentation. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower", + "alt_text": "pyOpenSci Handbook. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower", }, "header_links_before_dropdown": 4, "use_edit_page_button": True, + "show_nav_level": 2, + "navigation_depth": 3, "show_toc_level": 1, - "navbar_align": "left", # [left, content, right] For testing that the navbar items align properly + # "navbar_align": "left", # [left, content, right] For testing that the navbar items align properly "github_url": "https://github.com/pyopensci/governance", - "twitter_url": "https://twitter.com/pyopensci", - "footer_items": ["copyright"], + "footer_start": ["copyright"], + "footer_end": [], } -html_theme_options["analytics"] = { - "google_analytics_id": "UA-141260825-1", -} +# html_theme_options["analytics"] = { +# "google_analytics_id": "UA-141260825-1", +# } html_context = { "github_user": "pyopensci", @@ -85,16 +120,6 @@ "github_version": "main", } -# "repository_url": "https://github.com/pyopensci/governance", -# "use_repository_button": True, -# "google_analytics_id": "UA-141260825-1", -# "external_links": [ -# {"name": "link-one-name", "url": "https://pyopensci.org"}, -# {"name": "link-two-name", "url": "https://pyopensci.org"} -# ], -# "announcement": "✨ Learn more about our peer review process ✨" -# } - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -111,6 +136,9 @@ "reference/2018-2020-orig-meeting-notes", ] +# For sitemap generation +html_baseurl = "https://www.pyopensci.org/governance/" +sitemap_url_scheme = "{link}" # -- Options for HTML output ------------------------------------------------- @@ -118,11 +146,20 @@ # a list of builtin themes. # html_theme = "pydata_sphinx_theme" -html_static_path = ["_static"] html_title = "pyOpenSci Governance" html_logo = "_static/logo.png" +html_js_files = ["matomo.js"] +html_css_files = ["pyos.css"] + # 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"] + +# Social cards +ogp_site_url = "https://www.pyopensci.org/governance/" +ogp_social_cards = { + "line_color": "#6D597A", + "image": "_static/pyopensci-logo-package-guide.png", +} diff --git a/handbook/index.md b/handbook/index.md new file mode 100644 index 0000000..4f1b9a3 --- /dev/null +++ b/handbook/index.md @@ -0,0 +1 @@ +# Organization Handbook diff --git a/index.md b/index.md index 2c6d48c..e105763 100644 --- a/index.md +++ b/index.md @@ -1,86 +1,78 @@ -# pyOpenSci Governance +# pyOpenSci Handbook & Governance -::::{grid} 2 -:reverse: - -:::{grid-item} -:columns: 4 -:class: sd-m-auto -::: - -:::{grid-item} -:columns: 8 -:class: sd-fs-3 This guide is designed to define the structure and processes that support operations of pyOpenSci. -% The SVG rendering breaks latex builds for the GitHub badge, so only include in HTML +![GitHub release (latest by date)](https://img.shields.io/github/v/release/pyopensci/governance?color=purple&display_name=tag&style=plastic) [![DOI](https://zenodo.org/badge/161679308.svg)](https://zenodo.org/badge/latestdoi/161679308) [![All Contributors](https://img.shields.io/badge/all_contributors-3-blue.svg?style=flat-square)](#contributors-) -```{only} html - -``` +:::::{grid} 1 1 3 3 +:class-container: text-center +:gutter: 3 -::: +::::{grid-item} +:::{card} ✿ Our Structure and Values ✿ +:class-card: left-aligned +:link: organization/index +:link-type: doc + +Learn more about the governance structure of pyOpenSci. +::: :::: - +::::{grid-item} +:::{card} ✿ Community Handbook ✿ +:class-card: left-aligned +:link: handbook/index +:link-type: doc -::::{grid} 1 1 3 3 -:class-container: text-center -:gutter: 4 -:::{grid-item-card} +Learn more our community. +::: +:::: + +::::{grid-item} +:::{card} ✿ Code of Conduct ✿ :link: CODE_OF_CONDUCT :link-type: doc +:class-card: left-aligned -Code of Conduct ✏️ -^^^ Our code of conduct applies to all members of the pyOpenSci community. And to those participating in pyOpenSci supported events. ::: +:::: -:::{grid-item-card} +::::{grid-item} +:::{card} ✿ Contributing Guide ✿ +:class-card: left-aligned :link: CONTRIBUTING :link-type: doc -Contributing Guide ✏️ -^^^ Our contributing guide applicable to all repositories in our pyOpenSci GitHub organization. You can find specific resources for local development builds of content in individual pyOpenSci repositories. ::: +:::: -:::{grid-item-card} -:link: organization/index -:link-type: doc - -✨ Our Structure and Values ✨ -^^^ - -Learn more about the governance structure of pyOpenSci. -::: - -:::{grid-item-card} +::::{grid-item} +:::{card} ✿ ✨ Meeting Notes✨ +:class-card: left-aligned :link: reference/index.html -✨ Meeting Notes✨ -^^^ - These are notes taken during 2018-2021 - the early meetings when we were developing and founding pyOpenSci. ::: +:::: -:::{grid-item-card} +::::{grid-item} +:::{card} ✿ See our peer review guide ✨ +:class-card: left-aligned :link: https://www.pyopensci.org/software-peer-review/ -See our peer review guide ✨ -^^^ - This guide will walk you through the editorial process. ::: - :::: +::::: + ## Why pyOpenSci? pyOpenSci promotes open and reproducible research through peer-review of @@ -90,29 +82,31 @@ and share their own software. We hope to foster a greater sense of community among scientific Python users so that we can help each other become better programmers and researchers. -```{toctree} +:::{toctree} :hidden: -🏠 Home