Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: 2
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
python:
install:
# Every package is pinned by hash; pip refuses anything else.
- requirements: docs/requirements.txt

sphinx:
configuration: docs/conf.py
fail_on_warning: true
9 changes: 9 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
====================
pyais CHANGELOG
====================
-------------------------------------------------------------------------------
Version 3.4.0 25 Oct 2026
-------------------------------------------------------------------------------
* `NMEAQueue` now uses the same assembly logic as the streams
* out-of-order and orphaned fragments are dropped
* removed attributes `buffer`, `tbq` and `last_wrapper`
* new `NMEAAssembler` to assemble messages line by line via `feed()`
* streams keep pending fragments between `next()` calls
* new documentation theme
-------------------------------------------------------------------------------
Version 3.3.1 11 Oct 2026
-------------------------------------------------------------------------------
Expand Down
30 changes: 30 additions & 0 deletions docs/_themes/pyais/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="{{ language or 'en' }}">
<head>
<meta charset="utf-8">
{{ metatags }}
<title>{{ title|striptags|e }} | {{ docstitle|e }}</title>
{%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}">
{%- endif %}
<link rel="stylesheet" href="{{ pathto('_static/pyais.css', 1) }}">
</head>
<body>
<header>
<a href="{{ pathto(root_doc) }}">pyais<br>AIS decoder for Python</a>
<p>Version {{ release|e }}{% if last_updated %}<br>{{ last_updated|e }}{% endif %}</p>
</header>

<main>
{% block body %}{{ body }}{% endblock %}
</main>

<footer>
<nav aria-label="Pages">
{%- if prev %}<a href="{{ prev.link|e }}" rel="prev">&larr; {{ prev.title }}</a>{% else %}<span></span>{% endif %}
{%- if pagename != root_doc %}<a href="{{ pathto(root_doc) }}" class="home">Contents</a>{% else %}<span></span>{% endif %}
{%- if next %}<a href="{{ next.link|e }}" rel="next">{{ next.title }} &rarr;</a>{% else %}<span></span>{% endif %}
</nav>
</footer>
</body>
</html>
14 changes: 14 additions & 0 deletions docs/_themes/pyais/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{#- Sphinx always emits a search page. Its client-side search needs
JavaScript, which this theme does not ship, so point readers to the
server-side search Read the Docs provides instead. -#}
{%- extends "layout.html" %}
{%- set title = "Search" %}
{%- block body %}
<section>
<h1>Search</h1>
<p>Search is provided by Read the Docs: press <kbd>/</kbd> or open the
Read the Docs menu in the corner of the page.</p>
<p>Offline, use your browser’s find on the
<a href="{{ pathto(root_doc) }}">contents</a>.</p>
</section>
{%- endblock %}
132 changes: 132 additions & 0 deletions docs/_themes/pyais/static/pyais.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/* pyais documentation theme.
Modelled on a 1980s machine reference manual: one monospace face,
ink on paper, structure carried by rules instead of colour. */

:root {
color-scheme: light dark;
--paper: #fff;
--ink: #000;
--mark: #c3d7f4; /* the highlighter blue: selection */
--mark-ink: #2f5590; /* also used for literals in code */
--tint: #f3f5f8; /* faint surface behind code */
--muted: #5d6570; /* comments and shell prompts */
}

@media (prefers-color-scheme: dark) {
:root {
--paper: #000;
--ink: #e6e6e6;
--mark: #1d3354;
--mark-ink: #b7cdf0;
--tint: #10151d;
--muted: #98a1ac;
}
}

/* Berkeley Mono is used only if it is installed on the reader's machine;
no font files are served. */
html {
background: var(--paper);
color: var(--ink);
font: 16px/1.6 "Berkeley Mono", "IBM Plex Mono", ui-monospace, "SF Mono",
Menlo, Consolas, "Liberation Mono", monospace;
-webkit-text-size-adjust: 100%;
}

body {
max-width: 84ch;
margin: 0 auto;
padding: 3rem 2ch;
overflow-wrap: anywhere; /* long URLs must not widen the page */
}

::selection { background: var(--mark); color: var(--mark-ink); }

a { color: inherit; text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid; outline-offset: 2px; }

/* Masthead: publisher left, revision right */
header {
display: flex;
justify-content: space-between;
gap: 2ch;
margin-bottom: 3rem;
font-weight: 700;
text-transform: uppercase;
}
header a { text-decoration: none; }
header p { margin: 0; text-align: right; }

/* Page title: the boxed label */
h1 {
width: fit-content;
max-width: 100%;
margin: 0 auto 3rem;
padding: .75em 4ch;
border: 2px solid;
font-size: 1em;
font-weight: 400;
text-align: center;
text-transform: uppercase;
}

h2, h3, h4 {
margin: 3rem 0 1rem;
font-size: 1em;
font-weight: 400;
text-transform: uppercase;
}
h2 { padding-bottom: .25em; border-bottom: 4px double; }
h3 { padding-bottom: .25em; border-bottom: 1px solid; }

.headerlink { margin-left: 1ch; text-decoration: none; visibility: hidden; }
:hover > .headerlink, .headerlink:focus-visible { visibility: visible; }
h1 .headerlink { display: none; }

/* Code: indented between single rules, like the DATA block */
pre {
margin: 1.5rem 0;
padding: 1rem 2ch 1rem 4ch;
background: var(--tint);
border-block: 1px solid;
overflow-x: auto;
line-height: 1.5;
overflow-wrap: normal;
}
code, kbd, pre { font: inherit; }
code.literal, kbd {
padding: .1em .5ch;
background: var(--tint);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
}

/* Syntax: weight and two quiet tones instead of a rainbow.
Pygments class prefixes: c = comment, k = keyword, s = string,
m = number, gp = shell prompt. */
.highlight [class^="c"] { color: var(--muted); font-style: italic; }
.highlight [class^="k"], .highlight .ow { font-weight: 700; }
.highlight [class^="s"],
.highlight [class^="m"] { color: var(--mark-ink); }
.highlight .gp { color: var(--muted); user-select: none; } /* copy commands without "$ " */

/* Lists, including the contents page and local tables of contents */
ul { padding-left: 4ch; list-style: "- "; }
li > p { margin: 0; }
li + li { margin-top: .25em; }
.toctree-wrapper ul, nav.contents ul { list-style: none; }
.toctree-wrapper > ul, nav.contents > ul { padding-left: 0; }
.toctree-wrapper .caption, nav.contents .topic-title { display: none; }
nav.contents { margin-bottom: 3rem; }
.toctree-wrapper > ul > li { margin-top: 1rem; }
.toctree-wrapper > ul > li > a { text-transform: uppercase; }

/* Footer: previous / contents / next */
footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid; }
footer nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2ch; }
footer .home { font-style: italic; }
footer [rel="next"] { text-align: right; }

@media (max-width: 40em) {
header p { white-space: nowrap; }
pre { padding-left: 2ch; }
}
7 changes: 7 additions & 0 deletions docs/_themes/pyais/theme.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Minimal in-repo theme. Inherits only the template set of Sphinx's
# built-in "basic" theme; none of its CSS or JavaScript is loaded.
[theme]
inherit = "basic"
stylesheets = ["pyais.css"]
sidebars = []
pygments_style = { default = "none" }
Loading
Loading