Skip to content

Commit

Permalink
Postmortem for 2.1.0 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Oct 24, 2022
1 parent d9178c2 commit 5b62ab1
Show file tree
Hide file tree
Showing 30 changed files with 677 additions and 453 deletions.
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- geckodriver
- robotframework >=6
- robotframework-jupyterlibrary >=0.4.1
- robotframework-pabot
- robotframework-robocop >=2.6.0
- robotframework-tidy >=3.3.1
# demo toys
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ labels: maintenance
- [ ] ensure the CHANGELOG is up-to-date
- [ ] move the new release to the top of the stack
- [ ] validate on binder
- [ ] validate on ReadTheDocs
- [ ] wait for a successful build of `main`
- [ ] download the `dist` archive and unpack somewhere (maybe a fresh `dist`)
- [ ] create a new release through the GitHub UI
Expand All @@ -20,7 +19,7 @@ labels: maintenance
cd dist
twine upload *.tar.gz *.whl
npm login
for tarball in deathbeds-jupyterlab-fonts-*.tar.gz; do
for tarball in deathbeds-jupyterlab-font*.tar.gz; do
npm publish .tgz
done
npm logout
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: upload (dist)
uses: actions/upload-artifact@v3
with:
name: jupyterlab-fonts ${{ github.run_number }} dist
name: jupyterlab-fonts-${{ github.run_number }}-dist
path: ./dist

test:
Expand Down Expand Up @@ -142,15 +142,10 @@ jobs:
matrix.python-version }}
path: ./build/${{ matrix.os }}-${{ matrix.python-version }}.conda.lock

- name: uninstall node
shell: bash -l {0}
run: |
mamba uninstall -y nodejs
- name: download (dist)
uses: actions/download-artifact@v3
with:
name: jupyterlab-fonts ${{ github.run_number }} dist
name: jupyterlab-fonts-${{ github.run_number }}-dist
path: ./dist

- name: clean
Expand All @@ -173,10 +168,10 @@ jobs:
shell: bash -l {0}
run: doit test || doit test || doit test

- name: upload (atest)
- name: upload (reports)
if: always()
uses: actions/upload-artifact@v3
with:
name: |
jupyterlab-fonts ${{ github.run_number }} atest ${{ runner.os }} ${{ matrix.python-version }}
path: ./build/atest
jupyterlab-fonts-${{ github.run_number }}-reports-${{ runner.os }}-f${{ matrix.python-version }}
path: ./build/reports
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## v2.1.0 (unreleased)
## v2.1.1 (unreleased)

- fix some errors when disposing notebooks
- normalize generated CSS
- allow for dereferencing local asset `url()`s for `@import`, etc.

## v2.1.0

- Improve notebook-level `@import`, `@font-face`, etc.
- adds `data-jpf-cell-id` and `data-jpf-cell-tags` to notebook cell elements
Expand Down
51 changes: 51 additions & 0 deletions atest/Cells.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
*** Settings ***
Documentation Cell-level styling works
Library JupyterLibrary
Resource ./_keywords.resource

Suite Setup Set Attempt Screenshot Directory cells
Suite Teardown Reset JupyterLab And Close With Coverage
Test Teardown Clean Up After Cell Test


*** Variables ***
${NS} @deathbeds/jupyterlab-fonts
${META_EMPTY} {}
${META_RED} {"tags":["red"], "${NS}": {"styles": {"background-color": "red"}}}
${META_IMPORT} {"${NS}": {"styles": {"@import": "url('./style.css')"}}}
${RED_TAG} css:[${DATA_TAGS}=",red,"]
${ID_TAG} css:[${DATA_CELL_ID}]


*** Test Cases ***
Cell Styling
Launch A New JupyterLab Document
Wait Until JupyterLab Kernel Is Idle
Stylesheet Should Not Contain background-color: red
Wait Until Page Contains Element ${ID_TAG}
Wait Until Page Does Not Contain Element ${RED_TAG}
Set Cell Metadata ${META_RED} 1 00-red.png
Wait Until Page Contains Element ${RED_TAG}
Stylesheet Should Contain background-color: red
Set Cell Metadata ${META_EMPTY} 1 01-empty.png
Wait Until Page Does Not Contain Element ${RED_TAG}
Stylesheet Should Not Contain background-color: red
Capture Page Screenshot 02-end.png

Importing
${nbdir} = Get Jupyter Directory
${nburl} = Get Jupyter Server URL
Create File ${nbdir}${/}style.css body { background-color: green; }
Launch A New JupyterLab Document
Wait Until JupyterLab Kernel Is Idle
Set Cell Metadata ${META_IMPORT} 1 10-green.png
Stylesheet Should Contain @import url('${nburl}files/./style.css')
Capture Page Screenshot 11-end.png


*** Keywords ***
Clean Up After Cell Test
Execute JupyterLab Command Close All Tabs
${nbdir} = Get Jupyter Directory
Remove File ${nbdir}${/}Untitled.ipynb
170 changes: 0 additions & 170 deletions atest/Editor.robot

This file was deleted.

28 changes: 28 additions & 0 deletions atest/Global.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*** Settings ***
Documentation The font editor allows changing fonts in notebooks
Resource ./_keywords.resource


*** Test Cases ***
Global Font Editor
[Documentation] Customize Global fonts with the Font Editor
[Template] Use the font editor to configure fonts
[Setup] Open the Global Font Editor
Global Code Anonymous Pro Bold
Global Code Anonymous Pro Regular
Global Code DejaVu Sans Mono
Global Code DejaVu Sans Mono Bold
Global Code Fira Code Bold
Global Code Fira Code Light
Global Code Fira Code Medium
Global Code Fira Code Regular
Global Content Anonymous Pro Bold
Global Content Anonymous Pro Regular
Global Content DejaVu Sans Mono
Global Content DejaVu Sans Mono Bold
Global Content Fira Code Bold
Global Content Fira Code Light
Global Content Fira Code Medium
Global Content Fira Code Regular
[Teardown] Close the Font Editor Global
18 changes: 0 additions & 18 deletions atest/Menus.robot
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
*** Settings ***
Documentation Test whether the JupyterLab Fonts Menu performs as advertised.
Library JupyterLibrary
Library BuiltIn
Resource ./_keywords.resource
Resource ./_coverage.resource

Suite Setup Prepare Menu Test

Expand Down Expand Up @@ -45,18 +42,3 @@ Customize code font with the JupyterLab Menu
Content Size Default Content Size
Content Size 20px
Content Size Default Content Size


*** Keywords ***
Prepare Menu Test
Set Screenshot Directory ${OUTPUT_DIR}${/}menus
Execute JupyterLab Command Close All Tabs
Make a Font Test Notebook

Use the Menu to configure Font
[Documentation] Set a font value in the JupyterLab Fonts Menu
[Arguments] ${kind} ${aspect} ${setting}
Wait Until Keyword Succeeds 5x 0.25s
... Open With JupyterLab Menu Settings Fonts ${kind} ${aspect} ${setting}
Capture Page Screenshot ${kind}-${aspect}-${setting}.png
Capture Page Coverage
30 changes: 30 additions & 0 deletions atest/Notebook.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
*** Settings ***
Documentation The font editor allows changing fonts in notebooks
Resource ./_keywords.resource


*** Test Cases ***
Notebook Font Editor
[Documentation] Customize Notebook fonts with the Font Editor
[Template] Use the font editor to configure fonts
[Setup] Open the Notebook Font Editor
Notebook Code -
Notebook Code Anonymous Pro Bold
Notebook Code Anonymous Pro Regular
Notebook Code DejaVu Sans Mono
Notebook Code DejaVu Sans Mono Bold
Notebook Code Fira Code Bold
Notebook Code Fira Code Light
Notebook Code Fira Code Medium
Notebook Code Fira Code Regular
Notebook Content -
Notebook Content Anonymous Pro Bold
Notebook Content Anonymous Pro Regular
Notebook Content DejaVu Sans Mono
Notebook Content DejaVu Sans Mono Bold
Notebook Content Fira Code Bold
Notebook Content Fira Code Light
Notebook Content Fira Code Medium
Notebook Content Fira Code Regular
[Teardown] Close the Font Editor Untitled

0 comments on commit 5b62ab1

Please sign in to comment.