Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
Nicholas Bollweg be9c5d8c66
Update CHANGELOG.md 2023-04-10 17:25:27 -05:00
Nicholas Bollweg f5f6c639aa
Preflight 1.3.0 (#114) 2023-04-10 09:09:29 -05:00
17 zmienionych plików z 255 dodań i 210 usunięć

Wyświetl plik

@ -102,6 +102,7 @@ dependencies:
- ssort
# unit testing
- pytest
- pytest-cov
- pytest-console-scripts
- pytest-html
- pytest-jupyter-server

Wyświetl plik

@ -50,6 +50,7 @@ dependencies:
- ssort
# unit testing
- pytest
- pytest-cov
- pytest-console-scripts
- pytest-html
- pytest-jupyter-server

Wyświetl plik

@ -0,0 +1,49 @@
<!--
Thanks for contributing to ipydrawio!
Please fill out the following items to submit a pull request.
See the contributing guidelines for more information:
https://github.com/deathbeds/ipydrawio/blob/master/CONTRIBUTING.md
-->
## References
<!-- Note issue numbers this pull request addresses (should be at least one, see contributing guidelines above). -->
<!-- Note any other pull requests that address this issue and how this pull request is different. -->
## Code changes
<!-- Describe the code changes and how they address the issue. -->
## User-facing changes
<!-- Describe any visual or user interaction changes and how they address the issue. -->
<!-- For visual changes, include before and after screenshots here. -->
## Backwards-incompatible changes
<!-- Describe any backwards-incompatible changes to IPyDrawio public APIs. -->
## Chores
- [ ] ran `doit lint`
- [ ] updated `CHANGELOG.md`
- [ ] validated on binder
- [ ] validated on ReadTheDocs
<!--
# Copyright 2023 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.
-->

Wyświetl plik

@ -45,5 +45,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Try this PR on [![](${LITE})](${RTD}) :arrow_left: ReadTheDocs or Binder :arrow_right: [![](${BND})](${BH})`,
body: `Try this PR on [![RTD](${LITE})](${RTD}) :arrow_left: ReadTheDocs or Binder :arrow_right: [![Binder](${BND})](${BH})`,
});

Wyświetl plik

@ -91,7 +91,7 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
id: cache-yarn-packages
with:
path: .yarn-packages
path: ./build/.cache/.yarn-packages
key: |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
@ -296,21 +296,13 @@ jobs:
cd ../ipydrawio-mathjax
codecov --root ../..
- name: upload (utest)
- name: upload (reports)
if: always()
uses: actions/upload-artifact@v3
with:
name: |-
ipydrawio-${{ github.run_number }}-utest-${{ matrix.os }}-${{ matrix.python-version }}
path: ./build/pytest
- name: upload (atest)
if: always()
uses: actions/upload-artifact@v3
with:
name: |-
ipydrawio-${{ github.run_number }}-atest-${{ matrix.os }}-${{matrix.python-version }}
path: ./build/atest
ipydrawio-${{ github.run_number }}-reports-${{ matrix.os }}-${{matrix.python-version }}
path: ./build/reports
- name: Rename uncached conda packages
shell: bash
@ -343,7 +335,7 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
id: cache-yarn-packages
with:
path: .yarn-packages
path: ./build/.cache/.yarn-packages
key: |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
@ -399,7 +391,7 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
id: cache-yarn-packages
with:
path: .yarn-packages
path: ./build/.cache/.yarn-packages
key: |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
@ -430,12 +422,12 @@ jobs:
shell: bash -l {0}
run: doit test:robot
- name: upload (atest)
- name: upload (reports)
if: always()
uses: actions/upload-artifact@v3
with:
name: |-
ipydrawio-${{ github.run_number }}-atest-${{ matrix.os }}${{ matrix.python-version }}
ipydrawio-${{ github.run_number }}-reports-${{ matrix.os }}${{ matrix.python-version }}
path: ./build/atest
- name: upload (docs)

Wyświetl plik

@ -3,5 +3,5 @@ ignore-scripts true
network-timeout "300000"
prefer-offline true
registry "https://registry.npmjs.org/"
yarn-offline-mirror "./.yarn-packages"
yarn-offline-mirror "./build/.cache/.yarn-packages"
yarn-offline-mirror-pruning true

Wyświetl plik

@ -2,27 +2,33 @@
## Unreleased
### ipydrawio-widgets 1.3.0
> TBD
## Releases
### 1.3.0
#### ipydrawio-widgets 1.3.0
- minimum supported python is now 3.8
### ipydrawio 1.3.0
#### ipydrawio 1.3.0
- minimum supported python is now 3.8
#### @deathbeds/ipydrawio 1.3.0
##### @deathbeds/ipydrawio 1.3.0
#### @deathbeds/ipydrawio-notebook 1.3.0
##### @deathbeds/ipydrawio-notebook 1.3.0
#### @deathbeds/ipydrawio-webpack 21.1.400
##### @deathbeds/ipydrawio-webpack 21.1.400
- updates to [drawio v21.1.4](https://github.com/jgraph/drawio/releases/tag/v21.1.4)
- includes
[mermaidjs 10.0.0](https://github.com/mermaid-js/mermaid/releases/tag/v10.0.0)
#### @deathbeds/ipydrawio-jupyter-templates 1.3.0
##### @deathbeds/ipydrawio-jupyter-templates 1.3.0
### ipydrawio-export 1.3.0
#### ipydrawio-export 1.3.0
- minimum supported python is now 3.8
- updates to
@ -30,19 +36,19 @@
- by default uses a private copy of chromium in `{sys.prefix}/jupyter/ipydrawio_export`
- can be overridden with `IPYDRAWIO_PUPPETEER_CACHE_DIR` or `PUPPETEER_CACHE_DIR`
#### @deathbeds/ipydrawio-pdf 1.3.0
##### @deathbeds/ipydrawio-pdf 1.3.0
### ipydrawio-mathjax 1.3.0
#### ipydrawio-mathjax 1.3.0
- minimum supported python is now 3.8
#### @deathbeds/ipydrawio-mathjax 1.3.0
##### @deathbeds/ipydrawio-mathjax 1.3.0
## Releases
### 1.2.2
### ipydrawio-widgets 1.2.2
#### ipydrawio-widgets 1.2.2
### ipydrawio 1.2.2
#### ipydrawio 1.2.2
- as `retrolab` no longer supports installation next to `jupyterlab 3.5`, it is no
longer under test... but might still work.
@ -52,161 +58,173 @@
- `mathjax` rendering is no longer included by default
- install it with `(mamba|conda|pip) install ipydrawio-mathjax`
#### @deathbeds/ipydrawio 1.2.2
##### @deathbeds/ipydrawio 1.2.2
#### @deathbeds/ipydrawio-notebook 1.2.2
##### @deathbeds/ipydrawio-notebook 1.2.2
#### @deathbeds/ipydrawio-webpack 20.5.300
##### @deathbeds/ipydrawio-webpack 20.5.300
- updates to drawio v20.5.3 [#106]
#### @deathbeds/ipydrawio-jupyter-templates 1.2.2
##### @deathbeds/ipydrawio-jupyter-templates 1.2.2
### ipydrawio-export 1.2.2
#### ipydrawio-export 1.2.2
#### @deathbeds/ipydrawio-pdf 1.2.2
##### @deathbeds/ipydrawio-pdf 1.2.2
### ipydrawio-mathjax 1.2.2
#### ipydrawio-mathjax 1.2.2
- now holds the drawio-compatible copy of MathJax [#106]
#### @deathbeds/ipydrawio-mathjax 1.2.2
##### @deathbeds/ipydrawio-mathjax 1.2.2
- initial release
[#106]: https://github.com/deathbeds/ipydrawio/pull/106
### ipydrawio-widgets 1.2.1
### 1.2.1
#### ipydrawio-widgets 1.2.1
- add support for `ipywidgets` 8 [#98]
### ipydrawio 1.2.1
#### ipydrawio 1.2.1
#### @deathbeds/ipydrawio 1.2.1
##### @deathbeds/ipydrawio 1.2.1
- add support `@jupyter-widgets/jupyterlab-manager` 5 [#98]
#### @deathbeds/ipydrawio-notebook 1.2.1
##### @deathbeds/ipydrawio-notebook 1.2.1
#### @deathbeds/ipydrawio-webpack 20.2.800
##### @deathbeds/ipydrawio-webpack 20.2.800
- updates to drawio v20.2.8
#### @deathbeds/ipydrawio-jupyter-templates 1.2.1
##### @deathbeds/ipydrawio-jupyter-templates 1.2.1
### ipydrawio-export 1.2.1
#### ipydrawio-export 1.2.1
#### @deathbeds/ipydrawio-pdf 1.2.1
##### @deathbeds/ipydrawio-pdf 1.2.1
[#98]: https://github.com/deathbeds/ipydrawio/issues/98
### ipydrawio-widgets 1.2.0
### 1.2.0
#### ipydrawio-widgets 1.2.0
- new kernel-only package for headless kernel installs [#63]
- adds `cell_ids` to widget diagrams [#88]
### ipydrawio 1.2.0
#### ipydrawio 1.2.0
- `jupyter ipydrawio clean` can now cleans `.ipynb` metadata and outputs [#88]
- minimum supported python is now to 3.7
#### @deathbeds/ipydrawio 1.2.0
##### @deathbeds/ipydrawio 1.2.0
- adds support for data URI-encoded shape libraries (incompatible with `stealth`) [#80]
- fixes selection in widget diagrams with more than 10 shapes [#85]
#### @deathbeds/ipydrawio-notebook 1.2.0
##### @deathbeds/ipydrawio-notebook 1.2.0
#### @deathbeds/ipydrawio-webpack 16.4.500
##### @deathbeds/ipydrawio-webpack 16.4.500
- updates to drawio v16.4.5
#### @deathbeds/ipydrawio-jupyter-templates 1.2.0
##### @deathbeds/ipydrawio-jupyter-templates 1.2.0
### ipydrawio-export 1.2.0
#### ipydrawio-export 1.2.0
- minimum supported python is now to 3.7
#### @deathbeds/ipydrawio-pdf 1.2.0
##### @deathbeds/ipydrawio-pdf 1.2.0
[#63]: https://github.com/deathbeds/ipydrawio/issues/63
[#80]: https://github.com/deathbeds/ipydrawio/issues/80
[#85]: https://github.com/deathbeds/ipydrawio/issues/85
[#88]: https://github.com/deathbeds/ipydrawio/issues/88
### ipydrawio 1.1.3
### 1.1.3
#### @deathbeds/ipydrawio 1.1.3
#### ipydrawio 1.1.3
#### @deathbeds/ipydrawio-notebook 1.1.3
##### @deathbeds/ipydrawio 1.1.3
#### @deathbeds/ipydrawio-webpack 15.8.701
##### @deathbeds/ipydrawio-notebook 1.1.3
#### @deathbeds/ipydrawio-jupyter-templates 1.1.3
##### @deathbeds/ipydrawio-webpack 15.8.701
### ipydrawio-export 1.1.3
##### @deathbeds/ipydrawio-jupyter-templates 1.1.3
#### ipydrawio-export 1.1.3
- revert to older PDF exporter for better robustness on binder, etc.
#### @deathbeds/ipydrawio-pdf 1.1.3
##### @deathbeds/ipydrawio-pdf 1.1.3
### ipydrawio 1.1.2
### 1.1.2
#### @deathbeds/ipydrawio 1.1.2
#### ipydrawio 1.1.2
##### @deathbeds/ipydrawio 1.1.2
- minimal support for RetroLab [#72]
#### @deathbeds/ipydrawio-notebook 1.1.2
##### @deathbeds/ipydrawio-notebook 1.1.2
#### @deathbeds/ipydrawio-webpack 15.8.700
##### @deathbeds/ipydrawio-webpack 15.8.700
- upgrade to drawio v15.8.7 for enhancements and bug fixes
#### @deathbeds/ipydrawio-jupyter-templates 1.1.2
##### @deathbeds/ipydrawio-jupyter-templates 1.1.2
### ipydrawio-export 1.1.2
#### ipydrawio-export 1.1.2
- a `yarn.lock` is shipped to reduce provisioning time and increase reproducibility
- update to newer PDF exporter for better performance
#### @deathbeds/ipydrawio-pdf 1.1.2
##### @deathbeds/ipydrawio-pdf 1.1.2
[#72]: https://github.com/deathbeds/ipydrawio/issues/72
### ipydrawio 1.1.1
### 1.1.1
#### ipydrawio 1.1.1
- adds `jupyter ipydrawio clean` for removing `host`, `agent`, `modified` attributes and
pretty printing, restoring `lxml` as a dependency [#44]
#### @deathbeds/ipydrawio 1.1.1
##### @deathbeds/ipydrawio 1.1.1
- revert default theme from `sketch` back to `min` [#41]
#### @deathbeds/ipydrawio-notebook 1.1.1
##### @deathbeds/ipydrawio-notebook 1.1.1
#### @deathbeds/ipydrawio-webpack 14.9.300
##### @deathbeds/ipydrawio-webpack 14.9.300
- upgrade to drawio v14.9.300 for many enhancements and bug fixes [#51]
#### @deathbeds/ipydrawio-jupyter-templates 1.1.1
##### @deathbeds/ipydrawio-jupyter-templates 1.1.1
- adds some (unofficial) Jupyter-branded templates [#44]
### ipydrawio-export 1.1.1
#### ipydrawio-export 1.1.1
- upgrades `draw-image-export` for `xmldom` version and bugfixes [#44]
#### @deathbeds/ipydrawio-pdf 1.1.1
##### @deathbeds/ipydrawio-pdf 1.1.1
[#44]: https://github.com/deathbeds/ipydrawio/issues/44
### ipydrawio 1.1.0
### 1.1.0
#### ipydrawio 1.1.0
- new documentation site at https://ipydrawio.rtfd.io [#40]
- no longer depends on `lxml`, future XML-based features will hopefully support the
standard library `xml` module [#40]
#### @deathbeds/ipydrawio 1.1.0
##### @deathbeds/ipydrawio 1.1.0
- the `sketch` theme is now available as the `ui` [#40]
- the _Custom Diagram..._ Launcher card offers all the themes, templates, and editable
@ -218,47 +236,51 @@
- the previous inescapable behavior can be restored in _Adanced Settings_ by setting
`"disableEscapeFocus": true`
#### @deathbeds/ipydrawio-notebook 1.1.0
##### @deathbeds/ipydrawio-notebook 1.1.0
#### @deathbeds/ipydrawio-webpack 14.7.100
##### @deathbeds/ipydrawio-webpack 14.7.100
- drawio 14.7.1 [#41]
### ipydrawio-export 1.1.0
#### ipydrawio-export 1.1.0
- depends on `lxml` [#40]
#### @deathbeds/ipydrawio-pdf 1.1.0
##### @deathbeds/ipydrawio-pdf 1.1.0
[#40]: https://github.com/deathbeds/ipydrawio/pull/40
[#41]: https://github.com/deathbeds/ipydrawio/pull/41
### ipydrawio 1.0.1
### 1.0.1
#### ipydrawio 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 1.0.1
#### @deathbeds/ipydrawio-notebook 1.0.1
##### @deathbeds/ipydrawio-notebook 1.0.1
#### @deathbeds/ipydrawio-webpack 14.5.901
##### @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
### ipydrawio-export 1.0.1
#### ipydrawio-export 1.0.1
- [#32] on-disk file paths are shorter to avoid Windows issues
- [#31] `install.json` is properly placed
#### @deathbeds/ipydrawio-pdf 1.0.1
##### @deathbeds/ipydrawio-pdf 1.0.1
[#31]: https://github.com/deathbeds/ipydrawio/issues/31
[#32]: https://github.com/deathbeds/ipydrawio/issues/32
### ipydrawio 1.0.0
### 1.0.0
#### ipydrawio 1.0.0
- ipywidgets support
- Supports JupyterLab 3
@ -268,7 +290,7 @@
unavailable
- A future release may unpack various dependencies into sub-packages
#### @deathbeds/ipydrawio 1.0.0
##### @deathbeds/ipydrawio 1.0.0
- [#22] adds more _Main Menu_ options and _Command Palette_ Commands
- [#22] new file names created by _Export Diagram as..._ commands use best-effort,
@ -276,18 +298,18 @@
- [#20] add `allow-downloads` sandbox exception for the drawio `iframe`, enabling some
more built-in features
#### @deathbeds/ipydrawio-notebook 1.0.0
##### @deathbeds/ipydrawio-notebook 1.0.0
- [#21] fixes overload of default _Notebook_ activity for _Edit with_ for `.ipynb` files
#### @deathbeds/ipydrawio-webpack 14.5.9
##### @deathbeds/ipydrawio-webpack 14.5.9
### ipydrawio-export 1.0.0
#### ipydrawio-export 1.0.0
- [#22] correctly handle finding/resolving `node.*` on windows
- [#22] upgrade to newer `puppeteer`-based `draw-image-export`
#### @deathbeds/ipydrawio-pdf 1.0.0
##### @deathbeds/ipydrawio-pdf 1.0.0
- [#22] improved PDF export
@ -295,7 +317,9 @@
[#21]: https://github.com/deathbeds/ipydrawio/issues/21
[#22]: https://github.com/deathbeds/ipydrawio/pull/22
### ipydrawio 1.0.0a0
### 1.0.0a0
#### ipydrawio 1.0.0a0
- ipywidgets support
- Supports JupyterLab 3
@ -305,15 +329,15 @@
unavailable
- A future release may unpack various dependencies into sub-packages
#### @deathbeds/ipydrawio 1.0.0-alpha0
##### @deathbeds/ipydrawio 1.0.0-alpha0
#### @deathbeds/ipydrawio-notebook 1.0.0-alpha0
##### @deathbeds/ipydrawio-notebook 1.0.0-alpha0
#### @deathbeds/ipydrawio-webpack 14.2.6-alpha0
##### @deathbeds/ipydrawio-webpack 14.2.6-alpha0
### ipydrawio-export 1.0.0a0
#### ipydrawio-export 1.0.0a0
#### @deathbeds/ipydrawio-pdf 1.0.0-alpha0
##### @deathbeds/ipydrawio-pdf 1.0.0-alpha0
## Historic Releases

Wyświetl plik

@ -14,11 +14,12 @@
## Prerequisites
- `jupyterlab >=3,<4`
- `nodejs >=12`
- `doit >=0.32`
- `jupyterlab >=3,<4`
- `nodejs >=18,<19`
- `python >=3.8`
### Recommended: conda
### Recommended: `mamba`
- Get [Miniforge/Mambaforge](https://github.com/conda-forge/miniforge/releases)
@ -76,38 +77,12 @@ doit dist
## Releasing
- [ ] start a release issue with a checklist (maybe like this one)
- [ ] merge all outstanding PRs
- [ ] ensure the versions have been bumped (check with `doit test:integrity`)
- [ ] 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 `master`
- [ ] download the `dist` archive and unpack somewhere (maybe a fresh `dist`)
- [ ] 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
cd dist
twine upload ipydrawio*
npm login
npm publish deathbeds-ipydrawio-$VERSION.tgz
npm publish deathbeds-ipydrawio-jupyter-templates-$VERSION.tgz
npm publish deathbeds-ipydrawio-notebook-$VERSION.tgz
npm publish deathbeds-ipydrawio-pdf-$VERSION.tgz
npm publish deathbeds-ipydrawio-webpack-$OTHER_VERSION.tgz
npm logout
```
- [ ] postmortem
- [ ] handle `conda-forge` feedstock tasks
- [ ] validate on binder via simplest-possible gists
- [ ] activate the version on ReadTheDocs
- [ ] bump to next development version
- [ ] update release procedures
- Start a [release] issue on GitHub
- Follow the checklist
```
[release]: https://github.com/deathbeds/ipydrawio/issues/new?template=release.md
<!--
Copyright 2023 ipydrawio contributors
Licensed under the Apache License, Version 2.0 (the "License");
@ -121,4 +96,4 @@ 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.
```
-->

Wyświetl plik

@ -12,7 +12,8 @@
"ignore_sys_prefix": true,
"lite_dir": ".",
"output_archive": "../build/demo/ipydrawio-lite-1.3.0.tgz",
"output_dir": "../build/demo"
"output_dir": "../build/demo",
"cache_dir": "../build/.cache/.lite"
},
"PipliteAddon": {
"piplite_urls": [

Wyświetl plik

@ -73,6 +73,7 @@ dependencies:
- ssort
# unit testing
- pytest
- pytest-cov
- pytest-console-scripts
- pytest-html
- pytest-jupyter-server

64
dodo.py
Wyświetl plik

@ -942,14 +942,10 @@ def task_provision():
)
def _pytest(setup_py, pycov_args, pytest_args):
def _pytest(setup_py, pytest_args):
return CmdAction(
[
*P.PYM,
"coverage",
"run",
*pycov_args,
"-m",
"pytest",
*P.PYTEST_ARGS,
*pytest_args,
@ -963,30 +959,6 @@ def _pytest(setup_py, pycov_args, pytest_args):
)
def _pycov_combine(setup_py):
return CmdAction(
[*P.PYM, "coverage", "combine"],
shell=False,
cwd=str(setup_py.parent),
)
def _pycov_report(setup_py):
return CmdAction(
[*P.PYM, "coverage", "report", "--skip-covered", "--show-missing"],
shell=False,
cwd=str(setup_py.parent),
)
def _pycov_html(setup_py, *pycov_html_args):
return CmdAction(
[*P.PYM, "coverage", "html", *pycov_html_args],
shell=False,
cwd=str(setup_py.parent),
)
def task_test():
"""Run tests."""
if not P.TESTING_IN_CI:
@ -1006,24 +978,39 @@ def task_test():
P.SCRIPTS / "integrity.py",
],
"actions": [
["python", "-m", "pytest", "--pyargs", "scripts.integrity", "-vv"],
[
*P.PYM,
"pytest",
"--pyargs",
"scripts.integrity",
"-vv",
*("-o", f"""cache_dir={P.CACHE / ".pytest.integrity"}"""),
],
],
},
P.OK_INTEGRITY,
)
for pkg, setup in P.PY_SETUP.items():
html = P.BUILD / f"pytest/{pkg}/test.html"
htmlcov = P.BUILD / f"pytest/{pkg}/htmlcov"
report_dir = P.REPORTS / "pytest" / pkg
html = report_dir / "pytest.html"
cov_index = report_dir / "htmlcov" / "index.html"
cache_dir = P.CACHE / f".pytest.{pkg}"
pytest_args = [
"-vv",
"--tb=long",
*("-o", f"cache_dir={cache_dir}"),
# subs
"--script-launch-mode=subprocess",
# report
f"--html={html}",
"--self-contained-html",
"--script-launch-mode=subprocess",
# cov
"--cov-context=test",
f"""--cov={pkg.replace("-", "_")}""",
f"--cov-report=html:{cov_index.parent}",
"--cov-branch",
]
pycov_args = []
pycov_html_args = [f"--directory={htmlcov.parent}"]
if pkg == P.IPD.name:
pytest_args += ["-n", "auto"]
@ -1041,12 +1028,9 @@ def task_test():
],
"actions": [
(P.delete_some, [html]),
_pytest(setup, pycov_args, pytest_args),
_pycov_combine(setup),
_pycov_html(setup, *pycov_html_args),
_pycov_report(setup),
_pytest(setup, pytest_args),
],
"targets": [html],
"targets": [html, cov_index],
},
P.OK_PYTEST[pkg],
)

Wyświetl plik

@ -39,7 +39,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
@ -85,3 +84,6 @@ source_pkgs =
ipydrawio_export
concurrency = multiprocessing
parallel = True
[coverage:html]
show_contexts = True

Wyświetl plik

@ -39,7 +39,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
@ -73,3 +72,6 @@ source_pkgs =
ipydrawio_mathjax
concurrency = multiprocessing
parallel = True
[coverage:html]
show_contexts = True

Wyświetl plik

@ -37,7 +37,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
@ -72,3 +71,6 @@ source_pkgs =
ipydrawio_widgets
concurrency = multiprocessing
parallel = True
[coverage:html]
show_contexts = True

Wyświetl plik

@ -40,7 +40,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
@ -91,3 +90,6 @@ source_pkgs =
ipydrawio
concurrency = multiprocessing
parallel = True
[coverage:html]
show_contexts = True

Wyświetl plik

@ -1,6 +1,6 @@
[tool.ruff]
fix = true
cache-dir = "build/.cache/ruff"
cache-dir = "build/.cache/.ruff"
ignore = [
"BLE001",
"E501",

Wyświetl plik

@ -136,15 +136,19 @@ YARN_INTEGRITY = NODE_MODULES / ".yarn-integrity"
YARN_LOCK = ROOT / "yarn.lock"
DODO = ROOT / "dodo.py"
BUILD = ROOT / "build"
REPORTS = BUILD / "reports"
OK = BUILD / "ok"
DIST = ROOT / "dist"
DOCS = ROOT / "docs"
README = ROOT / "README.md"
CHANGELOG = ROOT / "CHANGELOG.md"
CACHE = BUILD / ".cache"
# external URLs
# archive.org template
CACHE_EPOCH = 0
HTTP_CACHE = BUILD / ".requests-cache"
HTTP_CACHE = CACHE / ".requests-cache"
BLACK_CACHE_DIR = CACHE / ".black"
def A_O(archive_id, url, cache_bust=CACHE_EPOCH):
@ -200,7 +204,7 @@ EXAMPLE_IPYNB = _clean(EXAMPLES.rglob("*.ipynb"))
DIST_NBHTML = DIST / "nbsmoke"
ATEST = ROOT / "atest"
ATEST_DIO = _clean(ATEST.rglob("*.dio"), ATEST.rglob("*.dio.svg"))
ATEST_OUT = BUILD / "atest"
ATEST_OUT = REPORTS / "atest"
ATEST_OUT_XML = "output.xml"
ATEST_TEMPLATES = [*ATEST.rglob("*.robot.j2")]
@ -365,7 +369,7 @@ JS_PKG_PACK = {
for k, v in JS_TSBUILDINFO.items()
if not k.startswith("_")
]
OK_PYSETUP = {k: BUILD / f"pysetup.{k}.ok" for k, v in PY_SETUP.items()}
OK_PYSETUP = {k: OK / f"pysetup.{k}.ok" for k, v in PY_SETUP.items()}
PY_SETUP_DEPS = {
IPD: lambda: [OK_PYSETUP["ipydrawio-widgets"]],
@ -557,32 +561,32 @@ JS_PKG_PACK[IPDM.name][0] += [IPDWP_IGNORE, IPDWP_APP, *ALL_IPDM_JS, IPDM_STARTU
IPYDRAWIO_DATA_DIR = Path(sys.prefix) / "share/jupyter/ipydrawio_export"
# built files
OK_PIP_CHECK = BUILD / "pip.check.ok"
OK_INTEGRITY = BUILD / "integrity.ok"
OK_SUBMODULES = BUILD / "submodules.ok"
OK_BLACK = BUILD / "black.ok"
OK_BLACK_JUPYTER = BUILD / "black.jupyter.ok"
OK_NBQA_RUFF = BUILD / "nbqa.ruff.ok"
OK_RUFF = BUILD / "ruff.ok"
OK_FLAKE8 = BUILD / "flake8.ok"
OK_SSORT = BUILD / "ssort.ok"
OK_LINT = BUILD / "lint.ok"
OK_ROBOTIDY = BUILD / "robot.tidy.ok"
OK_PRETTIER = BUILD / "prettier.ok"
OK_ESLINT = BUILD / "eslint.ok"
OK_JS_BUILD_PRE = BUILD / "js.build.pre.ok"
OK_JS_BUILD = BUILD / "js.build.ok"
OK_PYTEST = {k: BUILD / f"pytest.{k}.ok" for k, v in PY_SETUP.items()}
OK_SERVEREXT = {k: BUILD / f"serverext.{k}.ok" for k, v in SERVER_EXT.items()}
OK_PROVISION = BUILD / "provision.ok"
OK_ROBOT_DRYRUN = BUILD / "robot.dryrun.ok"
OK_ROBOCOP = BUILD / "robot.robocop.ok"
OK_DIOLINT = BUILD / "dio.lint.ok"
OK_ATEST = BUILD / "atest.ok"
OK_CONDA_TEST = BUILD / "conda-build.test.ok"
OK_LINK_CHECK = BUILD / "pytest-check-links.ok"
OK_PIP_CHECK = OK / "pip.check.ok"
OK_INTEGRITY = OK / "integrity.ok"
OK_SUBMODULES = OK / "submodules.ok"
OK_BLACK = OK / "black.ok"
OK_BLACK_JUPYTER = OK / "black.jupyter.ok"
OK_NBQA_RUFF = OK / "nbqa.ruff.ok"
OK_RUFF = OK / "ruff.ok"
OK_FLAKE8 = OK / "flake8.ok"
OK_SSORT = OK / "ssort.ok"
OK_LINT = OK / "lint.ok"
OK_ROBOTIDY = OK / "robot.tidy.ok"
OK_PRETTIER = OK / "prettier.ok"
OK_ESLINT = OK / "eslint.ok"
OK_JS_BUILD_PRE = OK / "js.build.pre.ok"
OK_JS_BUILD = OK / "js.build.ok"
OK_PYTEST = {k: OK / f"pytest.{k}.ok" for k, v in PY_SETUP.items()}
OK_SERVEREXT = {k: OK / f"serverext.{k}.ok" for k, v in SERVER_EXT.items()}
OK_PROVISION = OK / "provision.ok"
OK_ROBOT_DRYRUN = OK / "robot.dryrun.ok"
OK_ROBOCOP = OK / "robot.robocop.ok"
OK_DIOLINT = OK / "dio.lint.ok"
OK_ATEST = OK / "atest.ok"
OK_CONDA_TEST = OK / "conda-build.test.ok"
OK_LINK_CHECK = OK / "pytest-check-links.ok"
OK_EXT_BUILD = {k: BUILD / f"ext.build.{k}.ok" for k in JS_LABEXT_PY_HOST}
OK_EXT_BUILD = {k: OK / f"ext.build.{k}.ok" for k in JS_LABEXT_PY_HOST}
PY_TEST_DEP.setdefault("ipydrawio-export", []).append(OK_PROVISION)
@ -829,7 +833,11 @@ def _ok(task, ok):
task["actions"] = [
lambda: [ok.exists() and ok.unlink(), True][-1],
*task["actions"],
lambda: [ok.parent.mkdir(exist_ok=True), ok.write_text("ok", **ENC), True][-1],
lambda: [
ok.parent.mkdir(exist_ok=True, parents=True),
ok.write_text("ok", **ENC),
True,
][-1],
]
return task
@ -1068,4 +1076,5 @@ os.environ.update(
JUPYTER_PLATFORM_DIRS="1",
PYDEVD_DISABLE_FILE_VALIDATION="1",
IPYDRAWIO_DATA_DIR=str(IPYDRAWIO_DATA_DIR),
BLACK_CACHE_DIR=str(BLACK_CACHE_DIR),
)