From 85ac8d8700d9151b9d7b471bee328fb0e82a537e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Oct 2022 09:31:26 -0500 Subject: [PATCH 1/4] maintenance cleanup --- .flake8 | 21 ------------- .github/workflows/check-release.yml | 19 ------------ .github/workflows/tests.yml | 43 ++++++++++++++++----------- .pre-commit-config.yaml | 19 ++++++++---- .readthedocs.yml => .readthedocs.yaml | 0 pyproject.toml | 25 ++++++++++++++++ 6 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 .flake8 delete mode 100644 .github/workflows/check-release.yml rename .readthedocs.yml => .readthedocs.yaml (100%) diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 3cb1c0240..000000000 --- a/.flake8 +++ /dev/null @@ -1,21 +0,0 @@ -[flake8] -ignore = E501, W503, E402 -builtins = c, get_config -exclude = - .cache, - .github, - docs -enable-extensions = G -extend-ignore = - G001, G002, G004, G200, G201, G202, - # black adds spaces around ':' - E203, -per-file-ignores = - # B011: Do not call assert False since python -O removes these calls - # F841 local variable 'foo' is assigned to but never used - nbconvert/*/tests/*: B011, F841, - nbconvert/tests/*: B011, F841, - # F401 'foo' imported but unused - # F403 'x' used; unable to detect undefined names - nbconvert/*/__init__.py: F401, F403 - nbconvert/__init__.py: F401, F403 diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml deleted file mode 100644 index eb467c740..000000000 --- a/.github/workflows/check-release.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Check Release -on: - push: - branches: ["main"] - pull_request: - branches: ["*"] - -jobs: - check_release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - run: pip install -e . - - uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 - with: - version_spec: 10.10.10 - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6bfa6d596..99d199591 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - os: "macos-latest" python-version: "3.9" - os: "ubuntu-latest" - python-version: "3.10" + python-version: "3.11-dev" fail-fast: false steps: - name: Check out repository code @@ -100,26 +100,33 @@ jobs: conda activate nbconvert codecov - # Run "pre-commit run --all-files --hook-stage=manual" - pre-commit: - runs-on: ubuntu-20.04 - timeout-minutes: 5 + check_release: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - uses: pre-commit/action@v2.0.0 + - run: pip install -e . + - uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 with: - extra_args: --all-files --hook-stage=manual - - name: Help message if pre-commit fail - if: ${{ failure() }} - run: | - echo "You can install pre-commit hooks to automatically run formatting" - echo "on each commit with:" - echo " pre-commit install" - echo "or you can run by hand on staged files with" - echo " pre-commit run" - echo "or after-the-fact on already committed files with" - echo " pre-commit run --all-files --hook-stage=manual" + version_spec: 10.10.10 + token: ${{ secrets.GITHUB_TOKEN }} + + check_links: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 + + pre_commit: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1 test_minimum_versions: name: Test Minimum Versions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b75318be8..5d6e5e44c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,10 +29,16 @@ repos: args: [--profile=black] stages: [manual] - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.1 + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.10.1 hooks: - - id: prettier + - id: validate-pyproject + stages: [manual] + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.16 + hooks: + - id: mdformat - repo: https://github.com/asottile/pyupgrade rev: v3.1.0 @@ -47,10 +53,11 @@ repos: args: [--max-line-length=200] stages: [manual] - - repo: https://github.com/pycqa/flake8 - rev: 5.0.4 + - repo: https://github.com/john-hen/Flake8-pyproject + rev: 1.0.1 hooks: - - id: flake8 + - id: Flake8-pyproject + alias: flake8 additional_dependencies: ["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"] stages: [manual] diff --git a/.readthedocs.yml b/.readthedocs.yaml similarity index 100% rename from .readthedocs.yml rename to .readthedocs.yaml diff --git a/pyproject.toml b/pyproject.toml index abdbb88f1..9bcc43cae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,3 +135,28 @@ filterwarnings = [ "ignore:unclosed event loop:ResourceWarning", "ignore:There is no current event loop:DeprecationWarning", ] + +[tool.flake8] +ignore = "E501, W503, E402" +builtins = "c, get_config" +exclude = [ + ".cache", + ".github", + "docs", +] +enable-extensions = "G" +extend-ignore = [ + "G001", "G002", "G004", "G200", "G201", "G202", + # black adds spaces around ':' + "E203", +] +per-file-ignores = [ + # B011: Do not call assert False since python -O removes these calls + # F841 local variable 'foo' is assigned to but never used + "nbconvert/*/tests/*: B011", "F841", + "nbconvert/tests/*: B011", "F841", + # F401 'foo' imported but unused + # F403 'x' used; unable to detect undefined names + "nbconvert/*/__init__.py: F401", "F403", + "nbconvert/__init__.py: F401", "F403", +] From 6e5d0a007463d33ab488007ca742150faee4b08d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Oct 2022 09:36:32 -0500 Subject: [PATCH 2/4] ignore link --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 99d199591..d077e65f6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -119,6 +119,8 @@ jobs: - uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 + with: + ignore_links: 'https://ipywidgets.readthedocs.io/en/latest/examples/Output' pre_commit: runs-on: ubuntu-latest From a89b865d9d52b3770227b576fc85a51db3a94840 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Oct 2022 09:37:37 -0500 Subject: [PATCH 3/4] fixups --- .github/ISSUE_TEMPLATE/bug_report.md | 7 +- .github/ISSUE_TEMPLATE/feature_request.md | 7 +- .github/ISSUE_TEMPLATE/question.md | 8 +-- .github/workflows/tests.yml | 4 +- CHANGELOG.md | 84 ++++++++++++----------- README.md | 14 ++-- docs/README.md | 54 +++++++++------ 7 files changed, 96 insertions(+), 82 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1c325636a..5754b5da8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,6 @@ ---- -name: Bug report -about: Create a report to help us improve ---- +______________________________________________________________________ + +## name: Bug report about: Create a report to help us improve diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index a17278a00..d67a63abc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,6 @@ ---- -name: Feature Request -about: Suggest an idea for this project ---- +______________________________________________________________________ + +## name: Feature Request about: Suggest an idea for this project diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 8a6fbc4f3..023f5fdba 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,8 +1,6 @@ ---- -name: Question -about: If you need some help -labels: question ---- +______________________________________________________________________ + +## name: Question about: If you need some help labels: question If you have a question, you can file an issue here or preferably ask on [Jupyter Discourse](https://discourse.jupyter.org/). diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d077e65f6..cdc522b54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,10 +19,8 @@ jobs: include: - os: "windows-latest" python-version: "3.8" - - os: "macos-latest" + - os: "ubunut-latest" python-version: "3.9" - - os: "ubuntu-latest" - python-version: "3.11-dev" fail-fast: false steps: - name: Check out repository code diff --git a/CHANGELOG.md b/CHANGELOG.md index c37687110..0438fed87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,7 @@ @akx in [#1854](https://github.com/jupyter/nbconvert/pull/1854) - Remove CircleCI badge from README by @akx in [#1857](https://github.com/jupyter/nbconvert/pull/1857) -- Added support for section (slide) \"data-\*\" attributes by +- Added support for section (slide) "data-\*" attributes by @bouzidanas in [#1861](https://github.com/jupyter/nbconvert/pull/1861) ## 7.0.0 @@ -108,7 +108,7 @@ - Add basic support for federated labextensions themes [#1703](https://github.com/jupyter/nbconvert/pull/1703) - Always hide the collapser element [#1712](https://github.com/jupyter/nbconvert/pull/1712) -- Raise pyppeteer requirement to \>=1,\<1.1 [#1711](https://github.com/jupyter/nbconvert/pull/1711) +- Raise pyppeteer requirement to >=1,\<1.1 [#1711](https://github.com/jupyter/nbconvert/pull/1711) ## 6.4.1 @@ -211,12 +211,12 @@ The following 31 authors contributed 81 commits. [#1504](https://github.com/jupyter/nbconvert/pull/1504) - Include output of stdin stream in lab template [#1454](https://github.com/jupyter/nbconvert/pull/1454) -- Don\'t use a shell to call inkscape [#1512](https://github.com/jupyter/nbconvert/pull/1512) +- Don't use a shell to call inkscape [#1512](https://github.com/jupyter/nbconvert/pull/1512) - JupyterLab export as HTML with widgets fails to load widgets [#1474](https://github.com/jupyter/nbconvert/pull/1474) - Move note inside Reveal.js HTML slideshow [#1510](https://github.com/jupyter/nbconvert/pull/1510) - fix issue 1507: broken command line option - \--CSSHTMLHeaderPreprocessor.style= [#1548](https://github.com/jupyter/nbconvert/pull/1548) + --CSSHTMLHeaderPreprocessor.style= [#1548](https://github.com/jupyter/nbconvert/pull/1548) - Fix order of template paths [#1496](https://github.com/jupyter/nbconvert/pull/1496) - Changed documentation of external_exporters [#1582](https://github.com/jupyter/nbconvert/pull/1582) - Fix template precedence when using a custom template (#1558) @@ -247,9 +247,9 @@ The following 31 authors contributed 81 commits. - fix typo [#1499](https://github.com/jupyter/nbconvert/pull/1499) - Update version dependency of traitlets [#1498](https://github.com/jupyter/nbconvert/pull/1498) - Update execute.py [#1457](https://github.com/jupyter/nbconvert/pull/1457) -- Fix code output indentation when running nbconvert \--no-input +- Fix code output indentation when running nbconvert --no-input [#1444](https://github.com/jupyter/nbconvert/pull/1444) -- fix issue (i\'d call it a BUG) #1167 [#1450](https://github.com/jupyter/nbconvert/pull/1450) +- fix issue (i'd call it a BUG) #1167 [#1450](https://github.com/jupyter/nbconvert/pull/1450) - #1428 add docstring [#1433](https://github.com/jupyter/nbconvert/pull/1433) - Update nbconvert_library.ipynb [#1438](https://github.com/jupyter/nbconvert/pull/1438) - Supports isolated iframe when converting to HTML @@ -341,7 +341,7 @@ A quick patch to fix an issue with get_exporter [#1367](https://github.com/jupyt ## 6.0 The following authors and reviewers contributed the changes for this -release \-- Thanks you all! +release -- Thanks you all! - Ayaz Salikhov - bnables @@ -361,7 +361,7 @@ release \-- Thanks you all! - Kerwin.Sun - letmerecall - Luciano Resende -- Lumír \'Frenzy\' Balhar +- Lumír 'Frenzy' Balhar - Maarten A. Breddels - Maarten Breddels - Marcel Stimberg @@ -403,13 +403,13 @@ significant changes. style `.tpl` template use the full path with the `template_file` argument to the file. On the command line the pattern is `--template-file=`. -- Nbconvert 6.0 includes a new \"webpdf\" exporter, which renders +- Nbconvert 6.0 includes a new "webpdf" exporter, which renders notebooks in pdf format through a headless web browser, so that complex outputs such as HTML tables, or even widgets are rendered in the same way as with the HTML exporter and a web browser. - The default template applied when exporting to HTML now produces the - same DOM structure as JupyterLab, and is styled using JupyterLab\'s - CSS. The pygments theme in use mimics JupyterLab\'s codemirror mode + same DOM structure as JupyterLab, and is styled using JupyterLab's + CSS. The pygments theme in use mimics JupyterLab's codemirror mode with the same CSS variables, so that custom JupyterLab themes could be applied. The classic notebook styling can still be enabled with @@ -418,13 +418,13 @@ jupyter nbconvert --to html --template classic ``` - Nbconvert 6.0 includes a new system for creating custom templates, - which can now be installed as packages. A custom \"foobar\" template - is installed in Jupyter\'s data directory under + which can now be installed as packages. A custom "foobar" template + is installed in Jupyter's data directory under `nbconvert/templates` and has the form of a directory containing all resources. Templates specify their base template as well as other configuration parameters in a `conf.json` at the root of the template directory. -- The \"slideshow\" template now makes use of RevealJS version 4. It +- The "slideshow" template now makes use of RevealJS version 4. It can now be used with the HTML exporter with ```bash @@ -439,7 +439,7 @@ The `--to slides` exporter is still supported for convenience. ### Remaining changes -We merged 105 pull requests! Rather than enumerate all of them we\'ll +We merged 105 pull requests! Rather than enumerate all of them we'll link to the github page which contains the many smaller impact improvements. @@ -449,7 +449,7 @@ GitHub](https://github.com/jupyter/nbconvert/issues?q=milestone%3A6.0+) ## 5.6.1 The following authors and reviewers contributed the changes for this -release \-- Thanks you all! +release -- Thanks you all! - Charles Frye - Chris Holdgraf @@ -504,7 +504,7 @@ Before this only cells that had outputs were filtered. ## 5.6 -The following 24 authors and reviewers contributed 224 commits \-- Thank +The following 24 authors and reviewers contributed 224 commits -- Thank you all! - 00Kai0 @@ -570,7 +570,7 @@ buffered. Now, messages can be logged immediately rather than waiting for the cell to terminate. See [#994](https://github.com/jupyter/nbconvert/pull/994) for exact code changes if -you\'re curious. +you're curious. ### Comprehensive notes @@ -625,7 +625,7 @@ you\'re curious. ## 5.5 -The following 18 authors contributed 144 commits \-- Thank you all! +The following 18 authors contributed 144 commits -- Thank you all! - Benjamin Ragan-Kelley - Clayton A Davis @@ -663,14 +663,16 @@ See [#979](https://github.com/jupyter/nbconvert/pull/979) for details. Now when a notebook executing contains [Jupyter Widgets](https://github.com/jupyter-widgets/ipywidgets/), the state of -all the widgets can be stored in the notebook\'s metadata. This allows +all the widgets can be stored in the notebook's metadata. This allows rendering of the live widgets on, for instance nbviewer, or when converting to html. You can tell nbconvert to not store the state using the `store_widget_state` argument: - jupyter nbconvert --ExecutePreprocessor.store_widget_state=False --to notebook --execute mynotebook.ipynb +``` +jupyter nbconvert --ExecutePreprocessor.store_widget_state=False --to notebook --execute mynotebook.ipynb +``` This widget rendering is not performed against a browser during execution, so only widget default states or states manipulated via user @@ -678,7 +680,7 @@ code will be calculated during execution. `%%javascript` cells will execute upon notebook rendering, enabling complex interactions to function as expected when viewed by a UI. -If you can\'t view widget results after execution, you may need to +If you can't view widget results after execution, you may need to select `File --> Trust Notebook` in the menu. See [#779](https://github.com/jupyter/nbconvert/pull/779), [#900](https://github.com/jupyter/nbconvert/pull/900), and [#983](https://github.com/jupyter/nbconvert/pull/983) for details. @@ -746,8 +748,8 @@ See [#992](https://github.com/jupyter/nbconvert/pull/992) for details - Typo in template syntax [#984](https://github.com/jupyter/nbconvert/pull/984) - Improved attachments +fix supporting non-unique names [#980](https://github.com/jupyter/nbconvert/pull/980) -- PDFExporter \"output_mimetype\" traitlet is not longer - \'text/latex\' [#972](https://github.com/jupyter/nbconvert/pull/972) +- PDFExporter "output_mimetype" traitlet is not longer + 'text/latex' [#972](https://github.com/jupyter/nbconvert/pull/972) - FIX: respect wait for clear_output [#969](https://github.com/jupyter/nbconvert/pull/969) - address deprecation warning in cgi.escape [#963](https://github.com/jupyter/nbconvert/pull/963) - Correct inaccurate description of available LaTeX template @@ -764,9 +766,9 @@ See [#992](https://github.com/jupyter/nbconvert/pull/992) for details #### Testing, Docs, and Builds -- Added tests for each branch in execute\'s run_cell method +- Added tests for each branch in execute's run_cell method [#982](https://github.com/jupyter/nbconvert/pull/982) -- Mention formats in \--to options more clearly +- Mention formats in --to options more clearly [#991](https://github.com/jupyter/nbconvert/pull/991) - Adds ascii output type to command line docs page, mention image folder output [#956](https://github.com/jupyter/nbconvert/pull/956) @@ -801,7 +803,7 @@ Thanks to the following 11 authors who contributed 57 commits. #### New Features - Expose pygments styles [#889](https://github.com/jupyter/nbconvert/pull/889) -- Tornado 6.0 support \-- Convert proxy handler from callback to +- Tornado 6.0 support -- Convert proxy handler from callback to coroutine [#937](https://github.com/jupyter/nbconvert/pull/937) - Add option to overwrite the highlight_code filter [#877](https://github.com/jupyter/nbconvert/pull/877) @@ -859,7 +861,7 @@ configuration option. Errors from executing the notebook can be allowed with a `raises-exception` tag on a single cell, or the `allow_errors` configurable option for all cells. An allowed error will be recorded in notebook output, and execution will continue. If an error occurs when it -is not explicitly allowed, a \'CellExecutionError\' will be raised. If +is not explicitly allowed, a 'CellExecutionError' will be raised. If `force_raise_errors` is True, `CellExecutionError` will be raised for any error that occurs while executing the notebook. This overrides both the `allow_errors` option and the `raises-exception` cell tags. @@ -882,7 +884,7 @@ cluster location ahead of time without building a new kernel. Overall the ExecutePreprocessor has been reworked to make it easier to use. Future releases will continue this trend to make this section of the code more inheritable and reusable by others. We encourage you read -the source code for this version if you\'re interested in the detailed +the source code for this version if you're interested in the detailed improvements. See [#852](https://github.com/jupyter/nbconvert/pull/852) for implementation changes. @@ -891,7 +893,7 @@ See [#852](https://github.com/jupyter/nbconvert/pull/852) for implementation cha Exporters are now exposed for front-ends to consume, including classic notebook. As an example, this means that latex exporter will be made -available for latex \'text/latex\' media type from the Download As +available for latex 'text/latex' media type from the Download As interface. See [#759](https://github.com/jupyter/nbconvert/pull/759) and [#864](https://github.com/jupyter/nbconvert/pull/864) for implementation changes. @@ -919,7 +921,7 @@ See [#675](https://github.com/jupyter/nbconvert/pull/675) for implementation cha #### New command line flags The `--no-input` will hide input cells on export. This is great for -notebooks which generate \"reports\" where you want the code that was +notebooks which generate "reports" where you want the code that was executed to not appear by default in the extracts. An alias for `notebook` was added to exporter commands. Now `--to ipynb` @@ -944,13 +946,13 @@ See [#825](https://github.com/jupyter/nbconvert/pull/825) and [#873](https://git - Refactor ExecutePreprocessor [#816](https://github.com/jupyter/nbconvert/pull/816) - Update widgets CDN for ipywidgets 7 w/fallback [#792](https://github.com/jupyter/nbconvert/pull/792) -- Add support for adding custom exporters to the \"Download as\" menu. +- Add support for adding custom exporters to the "Download as" menu. [#759](https://github.com/jupyter/nbconvert/pull/759) - Enable ANSI underline and inverse [#696](https://github.com/jupyter/nbconvert/pull/696) - Update notebook css to 5.4.0 [#748](https://github.com/jupyter/nbconvert/pull/748) - Change default for slides to direct to the reveal cdn rather than locally [#732](https://github.com/jupyter/nbconvert/pull/732) -- Use \"title\" instead of \"name\" for metadata to match the notebook +- Use "title" instead of "name" for metadata to match the notebook format [#703](https://github.com/jupyter/nbconvert/pull/703) - Img filename metadata [#685](https://github.com/jupyter/nbconvert/pull/685) - Added MathJax compatibility definitions [#687](https://github.com/jupyter/nbconvert/pull/687) @@ -970,7 +972,7 @@ See [#825](https://github.com/jupyter/nbconvert/pull/825) and [#873](https://git #### Fixing Problems - Fix api break [#872](https://github.com/jupyter/nbconvert/pull/872) -- Don\'t remove empty cells by default [#784](https://github.com/jupyter/nbconvert/pull/784) +- Don't remove empty cells by default [#784](https://github.com/jupyter/nbconvert/pull/784) - Handle attached images in html converter [#780](https://github.com/jupyter/nbconvert/pull/780) - No need to check for the channels already running [#862](https://github.com/jupyter/nbconvert/pull/862) @@ -1043,7 +1045,7 @@ metadata](https://nbformat.readthedocs.io/en/latest/format_description.html#cell **Usage**: -1. Apply tags to the elements that you want to remove. +1. Apply tags to the elements that you want to remove. For removing an entire cell, the cell input, or all cell outputs apply the tag to the cell. @@ -1055,9 +1057,9 @@ using a call like _NB_: Use different tags depending on whether you want to remove the entire cell, the input, all outputs, or individual outputs. -2. Add the tags for removing the different kinds of elements to the - following traitlets. Which kind of element you want to remove - determines which traitlet you add the tags to. +2. Add the tags for removing the different kinds of elements to the + following traitlets. Which kind of element you want to remove + determines which traitlet you add the tags to. The following traitlets remove elements of different kinds: @@ -1123,7 +1125,7 @@ access all of these is by using traitlets like TemplateExporter.exclude_input = True (or, for example HTMLExporter.exclude_markdown = True if you wanted to make it specific to HTML output). On the command line if you just want to not have input -or output prompts just use \--no-prompt. +or output prompts just use --no-prompt. #### Execute notebooks from a function @@ -1180,11 +1182,11 @@ exporter can now surface that directly. [#563](https://github.com/jupyter/nbconvert/pull/563) - bug fixed: dynamic defaults for optional jupyter_client import [#559](https://github.com/jupyter/nbconvert/pull/559) -- bug fixed: don\'t self-close non-void HTML tags +- bug fixed: don't self-close non-void HTML tags [#548](https://github.com/jupyter/nbconvert/pull/548) - buf fixed: upgrade jupyter_client dependency to 4.2 [#539](https://github.com/jupyter/nbconvert/pull/539) -- bug fixed: LaTeX output through md→LaTeX conversion shouldn\'t be +- bug fixed: LaTeX output through md→LaTeX conversion shouldn't be touched [#535](https://github.com/jupyter/nbconvert/pull/535) - bug fixed: now we escape `<` inside math formulas when converting to html [#514](https://github.com/jupyter/nbconvert/pull/514) diff --git a/README.md b/README.md index 24319b007..31d4466b2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![codecov.io](https://codecov.io/github/jupyter/nbconvert/coverage.svg?branch=main)](https://codecov.io/github/jupyter/nbconvert?branch=main) The **nbconvert** tool, `jupyter nbconvert`, converts notebooks to various other -formats via [Jinja][] templates. The nbconvert tool allows you to convert an +formats via [Jinja] templates. The nbconvert tool allows you to convert an `.ipynb` notebook file into various static formats including: - HTML @@ -25,7 +25,9 @@ formats via [Jinja][] templates. The nbconvert tool allows you to convert an From the command line, use nbconvert to convert a Jupyter notebook (_input_) to a a different format (_output_). The basic command structure is: - $ jupyter nbconvert --to +``` +$ jupyter nbconvert --to +``` where `` is the desired output format and `` is the filename of the Jupyter notebook. @@ -34,7 +36,9 @@ filename of the Jupyter notebook. Convert Jupyter notebook file, `mynotebook.ipynb`, to HTML using: - $ jupyter nbconvert --to html mynotebook.ipynb +``` +$ jupyter nbconvert --to html mynotebook.ipynb +``` This command creates an HTML output file named `mynotebook.html`. @@ -70,10 +74,10 @@ py.test --pyargs nbconvert ## Documentation - [Documentation for Jupyter nbconvert](https://nbconvert.readthedocs.io/en/latest/) - [[PDF](https://media.readthedocs.org/pdf/nbconvert/latest/nbconvert.pdf)] + \[[PDF](https://media.readthedocs.org/pdf/nbconvert/latest/nbconvert.pdf)\] - [nbconvert examples on GitHub](https://github.com/jupyter/nbconvert-examples) - [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html) - [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)] + \[[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)\] ## Technical Support diff --git a/docs/README.md b/docs/README.md index 4f3b28d53..bcbcacc6c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,42 +5,56 @@ is hosted on ReadTheDocs. ## Build Documentation locally -1. Change directory to documentation root: +1. Change directory to documentation root: - $ cd docs + ``` + $ cd docs + ``` -2. Create conda env (and install relevant dependencies): +1. Create conda env (and install relevant dependencies): - $ conda env create -f environment.yml + ``` + $ conda env create -f environment.yml + ``` -3. Activate the newly built conda environment `nbconvert_docs` +1. Activate the newly built conda environment `nbconvert_docs` - $ source activate nbconvert_docs + ``` + $ source activate nbconvert_docs + ``` -4. Create an editable install for nbconvert with doc dependencies using +1. Create an editable install for nbconvert with doc dependencies using - $ pip install -e '..[docs]' + ``` + $ pip install -e '..[docs]' + ``` - or if you want, `cd ..` and `pip install . -e`. But then you will need to `cd docs` before - continuing to the next step. + or if you want, `cd ..` and `pip install . -e`. But then you will need to `cd docs` before + continuing to the next step. -5. Build documentation using Makefile for Linux and OS X: +1. Build documentation using Makefile for Linux and OS X: - $ make html + ``` + $ make html + ``` - or on Windows: + or on Windows: - $ make.bat html + ``` + $ make.bat html + ``` -6. Display the documentation locally by navigating to - `build/html/index.html` in your browser: +1. Display the documentation locally by navigating to + `build/html/index.html` in your browser: - Or alternatively you may run a local server to display - the docs. In Python 3: + Or alternatively you may run a local server to display + the docs. In Python 3: - $ python -m http.server 8000 + ``` + $ python -m http.server 8000 + ``` - In your browser, go to `http://localhost:8000`. + In your browser, go to `http://localhost:8000`. ## Developing Documentation From e8c0b856699c5593a3eb4804b55933ef5b2f7309 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Oct 2022 10:01:43 -0500 Subject: [PATCH 4/4] fix os name in workflow --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cdc522b54..2f36ab907 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: include: - os: "windows-latest" python-version: "3.8" - - os: "ubunut-latest" + - os: "ubuntu-latest" python-version: "3.9" fail-fast: false steps: