Skip to content

Commit

Permalink
Add ipydrawio-jupyter-templates, first template (Lab mockup) (QuantSt…
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Jun 3, 2021
1 parent a80f3a7 commit 383d02c
Show file tree
Hide file tree
Showing 66 changed files with 5,017 additions and 311 deletions.
52 changes: 48 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ env:
PYTHONUNBUFFERED: '1'
PYTHONIOENCODING: 'utf-8'
PIP_DISABLE_PIP_VERSION_CHECK: '1'
CONDARC: .github/.condarc

# our stuff
ATEST_RETRIES: '3'
CACHE_EPOCH: '1'
DOIT_N_BUILD: '-n4'
DOIT_N_TEST: '-n4'
CONDA_BUILDERER: mambabuild

jobs:
build:
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos', 'windows']
os: ['ubuntu']
steps:
- name: configure line endings
run: |
Expand Down Expand Up @@ -168,17 +170,59 @@ jobs:

- name: build (conda)
shell: bash -l {0}
env:
CONDA_BUILDERER: mambabuild
run: |
doit -s conda
doit -s conda_build
- name: upload (conda)
uses: actions/upload-artifact@v2
with:
name: ipydrawio ${{ github.run_number }} conda
path: ./build/conda-bld

conda-test:
needs: [conda-build]
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos', 'windows']
steps:
- name: configure line endings
run: |
git config --global core.autocrlf false
- name: checkout
uses: actions/checkout@v2

- name: cache (conda)
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-build-${{ hashFiles('.github/environment-conda-build.yml') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-build-
- name: install (conda)
uses: conda-incubator/setup-miniconda@v2
with:
condarc-file: .github/.condarc
environment-file: .github/environment-conda-build.yml
miniforge-variant: Mambaforge
use-mamba: true

- name: download (conda)
uses: actions/download-artifact@v2
with:
name: ipydrawio ${{ github.run_number }} conda
path: ./build/conda-bld

- name: build (conda)
shell: bash -l {0}
run: |
conda index build/conda-bld
doit -s conda_test
test:
needs: [build]
name: ${{ matrix.os }} ${{ matrix.python-version }}
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@

#### @deathbeds/ipydrawio-notebook 1.1.1

#### @deathbeds/ipydrawio-webpack 14.7.101
#### @deathbeds/ipydrawio-webpack 14.7.400

- upgrade to drawio 14.7.4 for layer enhancements and various bugfixes

#### @deathbeds/ipydrawio-jupyter-templates 1.1.1

- adds some (unofficial) Jupyter-branded templates [#44]

### ipydrawio-export 1.1.1

- upgrades `draw-image-export` for `xmldom` version and bugfixes [#44]

#### @deathbeds/ipydrawio-pdf 1.1.1

[#44]: https://github.com/deathbeds/ipydrawio/issues/44

---

## Releases
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pip install ipydrawio ipydrawio
- in many file formats
- Drawio/mxgraph XML, SVG, PNG
- or Jupyter Notebooks
- with all the Drawio templates
- plus some Jupyter ones
- Jupyter [rich display][] output
- Jupyter [Widgets][]
- `ipydrawio-export`
Expand Down
6 changes: 5 additions & 1 deletion atest/Custom.robot
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ Kennedy Flowchart PNG

Sketch Business Model SVG
[Documentation] Kennedy Classes PNG?
Validate Custom Create kfp dio.svg sketch business_model_1.xml
Validate Custom Create sbp dio.svg sketch business_model_1.xml

Atlas JupyterLab Diagram Notebook
[Documentation] Atlas JupyterLab Diagram Notebook?
Validate Custom Create ajn dio.ipynb atlas JupyterLab Mockups.dio

*** Keywords ***
Validate Custom Create
Expand Down
3 changes: 3 additions & 0 deletions atest/Widget.robot
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ Update The Diagram Widget Value
[Arguments] ${path}
${xml} = Get File ${path}
Add and Run JupyterLab Code Cell d.source.value = '''${xml.strip()}'''
Press Keys None ESC
Press Keys None UP

Change Paper Size
[Arguments] ${size}=letter
Scroll Element Into View ${CSS DIO IFRAME}
Select Frame ${CSS DIO IFRAME}
Maybe Open Format Pane
${el} = Get WebElement xpath:${XP DIO PAGE SIZE}
Expand Down
2 changes: 1 addition & 1 deletion atest/_Variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ${JW XP ACCORD CHILD HEAD} ${JW XP ACCORD CHILD}/div[contains(@class, 'p-Coll
${JLAB CSS ICON ADD} .jp-ToolbarButtonComponent [data-icon='ui-components:add']
${JLAB CSS ICON RUN} .jp-ToolbarButtonComponent [data-icon='ui-components:run']
${XP DIO FORMAT TITLE} //*[contains(@class, 'mxWindowTitle')][contains(text(), 'Format')]
${XP DIO FORMAT TOGGLE} ${XP DIO FORMAT TITLE}/div
${XP DIO FORMAT TOGGLE} ${XP DIO FORMAT TITLE}/div/img[@title="Normalize"]
${XP DIO FORMAT PANE} ${XP DIO FORMAT TITLE}/../..//td/div[contains(@class, 'mxWindowPane')]
${XP DIO FORMAT PANE VISIBLE} ${XP DIO FORMAT PANE}\[not(contains(@style, 'display: none'))]
${XP DIO PAGE SIZE} //div[contains(@class, "geFormatSection")][contains(., "Paper Size")]//select
Expand Down
14 changes: 13 additions & 1 deletion atest/examples/A.dio
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
<mxfile host="localhost" modified="2020-08-28T03:18:03.905Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36" version="13.6.2" etag="sRvBxgpFvqvJ6ZOE7QqG"><diagram id="Kgp7oERnrECbv33cBmmy" name="Page-1"><mxGraphModel dx="1841" dy="728" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="3" value="A" style="ellipse;whiteSpace=wrap;html=1;fontSize=48;fontFamily=sans-serif;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#496082;" vertex="1" parent="1"><mxGeometry x="20" y="20" width="285" height="280" as="geometry"/></mxCell></root></mxGraphModel></diagram></mxfile>
<mxfile version="13.6.2">
<diagram id="Kgp7oERnrECbv33cBmmy" name="Page-1">
<mxGraphModel dx="1841" dy="728" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="3" value="A" style="ellipse;whiteSpace=wrap;html=1;fontSize=48;fontFamily=sans-serif;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#496082;" vertex="1" parent="1">
<mxGeometry x="20" y="20" width="285" height="280" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading

0 comments on commit 383d02c

Please sign in to comment.