Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.7.1 - Switch to Cascadia Code & Mono #275

Merged
merged 2 commits into from
Oct 18, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

- run: |
mk python-release owner=vkottler \
repo=runtimepy version=5.7.0
repo=runtimepy version=5.7.1
if: |
matrix.python-version == '3.12'
&& matrix.system == 'ubuntu-latest'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
=====================================
generator=datazen
version=3.1.4
hash=aa59dcef7f11c767458b14ad97f9de59
hash=8247340c8c4e6982a54b831c311f2c0b
=====================================
-->

# runtimepy ([5.7.0](https://pypi.org/project/runtimepy/))
# runtimepy ([5.7.1](https://pypi.org/project/runtimepy/))

[![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
Expand Down
2 changes: 1 addition & 1 deletion local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 5
minor: 7
patch: 0
patch: 1
entry: runtimepy
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"

[project]
name = "runtimepy"
version = "5.7.0"
version = "5.7.1"
description = "A framework for implementing Python services."
readme = "README.md"
requires-python = ">=3.11"
Expand Down
4 changes: 2 additions & 2 deletions runtimepy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.4
# hash=c51f4ac6cf134b3c3fa872a096e83489
# hash=405585c0fbfcc966ef193f744f21fa59
# =====================================

"""
Expand All @@ -10,7 +10,7 @@

DESCRIPTION = "A framework for implementing Python services."
PKG_NAME = "runtimepy"
VERSION = "5.7.0"
VERSION = "5.7.1"

# runtimepy-specific content.
METRICS_NAME = "metrics"
Expand Down
13 changes: 4 additions & 9 deletions runtimepy/data/css/bootstrap_extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,8 @@ button:hover {
width: 6em;
}

/*
* Should probably build the bootstrap stuff from source and set custom Sass:
* https://getbootstrap.com/docs/5.3/customize/sass/
*/

:root {
/* Prefer 'Arial' and 'Consolas' at the highest priority. */
--bs-font-sans-serif: Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace;
/* Prefer 'CascadiaCode' and 'CascadiaMono' at the highest priority. */
:root, [data-bs-theme=dark], [data-bs-theme=light] {
--bs-font-sans-serif: CascadiaCode, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: CascadiaMono, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
47 changes: 47 additions & 0 deletions runtimepy/data/css/font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@font-face {
font-family: CascadiaCode;
src: url("/static/woff2/CascadiaCode-Regular.woff2");
}

@font-face {
font-family: CascadiaCode;
src: url("/static/woff2/CascadiaCode-Bold.woff2");
font-weight: bold;
}

@font-face {
font-family: CascadiaCode;
src: url("/static/woff2/CascadiaCode-BoldItalic.woff2");
font-weight: bold;
font-style: italic;
}

@font-face {
font-family: CascadiaCode;
src: url("/static/woff2/CascadiaCode-Italic.woff2");
font-style: italic;
}

@font-face {
font-family: CascadiaMono;
src: url("/static/woff2/CascadiaMono-Regular.woff2");
}

@font-face {
font-family: CascadiaMono;
src: url("/static/woff2/CascadiaMono-Bold.woff2");
font-weight: bold;
}

@font-face {
font-family: CascadiaMono;
src: url("/static/woff2/CascadiaMono-BoldItalic.woff2");
font-weight: bold;
font-style: italic;
}

@font-face {
font-family: CascadiaMono;
src: url("/static/woff2/CascadiaMono-Italic.woff2");
font-style: italic;
}
Binary file modified runtimepy/data/favicon.ico
Binary file not shown.
22 changes: 22 additions & 0 deletions runtimepy/data/static/svg/chip-circle-bootstrap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions runtimepy/data/static/woff2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Cascadia Code](https://github.com/microsoft/cascadia-code)

Assets sourced from
[this release](https://github.com/microsoft/cascadia-code/releases/tag/v2404.23).

See also:
[LICENSE](https://github.com/microsoft/cascadia-code/blob/main/LICENSE).

**Fonts are used from release as-is.**
5 changes: 2 additions & 3 deletions runtimepy/net/server/app/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ def __init__(self, app: AppInfo) -> None:
def populate(self, document: Html, app: TabPopulater) -> None:
"""Populate the body element with the application."""

# Third-party dependencies.
# CSS.
append_kind(document.head, "font", kind="css", tag="style")
add_bootstrap_css(document.head)

# Internal CSS.
append_kind(
document.head, "main", "bootstrap_extra", kind="css", tag="style"
)
Expand Down
7 changes: 5 additions & 2 deletions runtimepy/net/server/app/env/tab/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def create_name_td(parent: Element) -> Element:
return div(tag="td", parent=parent, class_str="p-0 text-nowrap")


COMMANDABLE = "text-info-emphasis"


class ChannelEnvironmentTabHtml(ChannelEnvironmentTabControls):
"""A channel-environment tab interface."""

Expand All @@ -67,7 +70,7 @@ def add_channel(

name_elem = div(tag="span", text=name, parent=name_td)
if chan.commandable:
name_elem.add_class("text-success")
name_elem.add_class(COMMANDABLE)

if description:
set_tooltip(name_elem, description, placement="left")
Expand Down Expand Up @@ -105,7 +108,7 @@ def add_field(

name_elem = div(tag="span", text=name, parent=name_td)
if field.commandable:
name_elem.add_class("text-success")
name_elem.add_class(COMMANDABLE)

if field.description:
description = field.description
Expand Down
29 changes: 28 additions & 1 deletion tasks/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,40 @@ includes:
factories:
- {name: tasks.tlm.LogCapture}
tasks:
- {name: root_log, factory: log_capture, period_s: 0.1}
- name: root_log
factory: log_capture
period_s: 0.1
markdown: |
*something isn't looking right...*

**why's it looking like that...**

***why's it looking like THAT...***

`nice mono stuff there`

*`nice slanted mono yeah`*

**`nice mono bold type shit there`**

***`nice mono bold type slant shit there`***

ligature type shit \_\_\_|\_\_\_ ligature type shit

port_overrides:
runtimepy_https_server: 8443

# This works.
# websocket_hostname: nuc2

config:
top_markdown: |
# Libre Embedded

![logo](/static/svg/chip-circle-bootstrap.svg)

bottom_markdown: |
`libre-embedded.com`

app:
- runtimepy.net.apps.wait_for_stop
Loading