Skip to content

Commit

Permalink
Shorten some paths for Windows (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Apr 12, 2021
1 parent 8031573 commit cbb7440
Show file tree
Hide file tree
Showing 34 changed files with 3,205 additions and 2,937 deletions.
3 changes: 1 addition & 2 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ dependencies:
- networkx
- pygraphviz
- python-graphviz
- qrcode-artistic
- segno
- shapely
- tabulate
- wxyz_datagrid
- wxyz_json_schema_form
- wxyz_lab
- wxyz_svg
# TODO: get on conda-forge
# - qrcode-artistic

### ipydrawio-dev-deps ###

Expand Down
26 changes: 26 additions & 0 deletions .github/environment-conda-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# a sufficient environment for acceptance testing

# Copyright 2021 ipydrawio contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: ipydrawio-conda-build

channels:
- conda-forge
- nodefaults

dependencies:
- boa
- conda-build
- doit
56 changes: 54 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-${{ hashFiles('.github/pip-build.txt') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-
- name: cache (node)
uses: actions/cache@v2
id: cache-node-modules
Expand Down Expand Up @@ -127,6 +128,57 @@ jobs:
name: ipydrawio ${{ github.run_number }} dist
path: ./dist

conda-build:
needs: [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 (dist)
uses: actions/download-artifact@v2
with:
name: ipydrawio ${{ github.run_number }} dist
path: ./dist

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

test:
needs: [build]
name: ${{ matrix.os }} ${{ matrix.python-version }}
Expand Down Expand Up @@ -165,13 +217,13 @@ jobs:
with:
condarc-file: .github/.condarc
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: ${{ matrix.python-version }}
environment-file: .github/environment.yml
use-only-tar-bz2: true
use-mamba: true

- uses: actions/download-artifact@v2
- name: download (dist)
uses: actions/download-artifact@v2
with:
name: ipydrawio ${{ github.run_number }} dist
path: ./dist
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ __pycache__
*.tgz
*.tsbuildinfo
**/*DRAWIO_DEBUG*
**/labextensions/**
atest/output/
build/
dist/
Expand All @@ -21,5 +20,7 @@ htmlcov/
node_modules/
py_packages/ipydrawio-export/ipydrawio-export-*
py_packages/ipydrawio/ipydrawio-*
py_packages/**/src/*/ext/
packages/ipydrawio-webpack/dio/
untitled*
Untitled*
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "src/drawio"]
[submodule "packages/ipydrawio-webpack/drawio"]
path = packages/ipydrawio-webpack/drawio
url = https://github.com/jgraph/drawio.git
[submodule "py_packages/jupyter-drawio-export/src/jupyter_drawio_export/vendor/draw-image-export2"]
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

## Unreleased

### ipydrawio 1.0.1

- [#32] on-disk file paths are shorter to avoid Windows issues
- [#31] `install.json` is properly placed

### ipydrawio-export 1.0.1

- [#32] on-disk file paths are shorter to avoid Windows issues
- [#31] `install.json` is properly placed

### @deathbeds/ipydrawio 1.0.1

### @deathbeds/ipydrawio-notebook 1.0.1

### @deathbeds/ipydrawio-pdf 1.0.1

### @deathbeds/ipydrawio-webpack 14.5.901

- [#32] drawio assets are copied into a shorter path
- changing version scheme to allow for patch releases.
- going forward, the upstream patch release will be multiplied by 100

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

---

### ipydrawio 1.0.0

- ipywidgets support
Expand Down
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,24 @@ doit dist
- [ ] validate on binder
- [ ] wait for a successful build of `master`
- [ ] download the `dist` archive and unpack somewhere (maybe a fresh `dist`)
- [ ] actually upload
- [ ] create a new release through the GitHub UI
- [ ] paste in the relevant CHANGELOG entries
- [ ] upload the artifacts
- [ ] actually upload to npm.com, pypi.org
```bash
export VERSION=<the next version>
cd dist
twine upload ipydrawio*
npm login
npm publish deathbeds-ipydrawio-$VERSION.tgz
npm publish deathbeds-ipydrawio-notebook-$VERSION.tgz
npm publish deathbeds-ipydrawio-pdf-$VERSION.tgz
npm publish deathbeds-ipydrawio-webpack-$VERSION.tgz
npm publish deathbeds-ipydrawio-webpack-$OTHER_VERSION.tgz
npm logout
```
- [ ] handle `conda-forge` feedstock tasks
- [ ] postmortem
- [ ] handle `conda-forge` feedstock tasks
- [ ] validate on binder via simplest-possible gists
- [ ] bump to next development version

```
Copyright 2021 ipydrawio contributors
Expand Down
128 changes: 128 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{% set name = "ipydrawio" %}
{% set version = "1.0.1" %}

{% set build_number = 0 %}

{% set url_base = RECIPE_DIR.replace("\\", "/") + "/../dist" %}
{% if not url_base.startswith("/") %}
{% set url_base = "/" + url_base %}
{% endif %}

package:
name: {{ name }}-build
version: {{ version }}

source:
- folder: {{ name }}
url: file://{{ url_base }}/{{ name }}-{{ version }}.tar.gz
# url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
# sha256:

- folder: {{ name }}-export
url: file://{{ url_base }}/{{ name }}-export-{{ version }}.tar.gz
# url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}-export/{{ name }}-export-{{ version }}.tar.gz
# sha256:

build:
number: {{ build_number }}
noarch: python

requirements:
host:
- pip
- python >=3.6
run:
- python >=3.6

test:
commands:
- echo "tests in outputs"

outputs:
- name: {{ name }}
version: {{ version }}
build:
number: {{ build_number }}
noarch: python
script:
- cd {{ name }} && {{ PYTHON }} -m pip install . -vv --no-deps
requirements:
host:
- pip
- python >=3.6
run:
- ipywidgets >=7.6
- jupyterlab ==3.*
- jupyterlab_widgets >=1
- lxml
- python >=3.6
test:
imports:
- {{ name }}
requires:
- pip
- pytest-cov
commands:
- pip check
- jupyter labextension list
- jupyter labextension list 1>labextensions 2>&1
- cat labextensions | grep "@deathbeds/{{ name }}.*OK" # [unix]
- pytest -vv --pyargs {{ name }} --cov={{ name }} --cov-fail-under=100 --cov-report=term-missing:skip-covered
about:
home: https://github.com/deathbeds/{{ name }}
summary: Draw.io Diagrams as Jupyter Widgets
license: Apache-2.0
license_file: {{ name }}/LICENSE.txt

- name: {{ name }}-export
version: {{ version }}
build:
number: {{ build_number }}
noarch: python
script:
- cd {{ name }}-export && {{ PYTHON }} -m pip install . -vv --no-deps
entry_points:
- jupyter-{{ name }}-export = {{ name }}_export.app:main
requirements:
host:
- pip
- python >=3.6
run:
- {{ name }} =={{ version }}.*
- python >=3.6
- pillow
- pypdf2
- requests_cache
- nodejs
test:
imports:
- {{ name }}_export
requires:
- pip
- pytest-cov
- pytest-tornasync
- pytest-console-scripts
commands:
- pip check
- jupyter labextension list
- jupyter labextension list 1>labextensions 2>&1
- cat labextensions | grep "@deathbeds/{{ name }}-pdf.*OK" # [unix]
- jupyter serverextension list
- jupyter serverextension list 1>serverextensions 2>&1
- cat serverextensions | grep "{{ name }}_export.*OK" # [unix]
- pytest -vv --pyargs {{ name }}_export --script-launch-mode=subprocess --cov={{ name }}_export --cov-fail-under=96 --cov-report=term-missing:skip-covered
about:
home: https://github.com/deathbeds/{{ name }}
summary: PDF export for IPyDrawio
license: Apache-2.0
license_file: {{ name }}-export/LICENSE.txt

about:
home: https://github.com/deathbeds/{{ name }}
summary: Draw.io Diagrams as Jupyter Widgets
license: Apache-2.0
license_file: {{ name }}/LICENSE.txt

extra:
recipe-maintainers:
- bollwyvl
Loading

0 comments on commit cbb7440

Please sign in to comment.