Codebraid

Latest version: v0.11.0

Safety actively analyzes 621924 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.11.0

* Added support for Pandoc option `--embed-resources`.

* Python 3.11 compatibility: set `PYDEVD_DISABLE_FILE_VALIDATION=1` at
beginning of command-line application to prevent debugger frozen modules
warning.

* Switched packaging to `pyproject.toml`.

* Added support for [GAP](https://www.gap-system.org/) (#51).

0.10.3

* Fixed bug in Pandoc version checking for Pandoc 3.0 compatibility.

0.10.2

* Sessions that result in errors are now re-executed during subsequent builds
regardless of whether the session code is modified. Previously,
re-execution was only triggered by code modification. This addresses
situations such as import errors due to missing libraries (57).

* Markup and code can now be displayed `raw`. Previously, only `verbatim` was
permitted.

* Fixed a bug that caused Jupyter kernels to be used if there were any
Jupyter settings in the YAML metadata, including `jupyter: false`.

0.10.1

* Fixed a bug that prevented multi-file documents from working with input
formats other than Pandoc's Markdown (`markdown`).

0.10.0

* Added support for specifying document-wide settings in the YAML metadata.
Codebraid settings must be under either a `codebraid` or `codebraid_` key in
the metadata. Pandoc will ignore `codebraid_` so it will not be available
to filters; this distinction should not typically be important.

To use Jupyter kernels automatically for all sessions, simply set
`jupyter: true`. For example,


---
codebraid:
jupyter: true
---


It is also possible to set a default kernel and/or default timeout. For example,


---
codebraid:
jupyter:
kernel: python3
timeout: 120
---


A Jupyter kernel and/or timeout can still be set in the first code chunk
for a given session, and will override the document-wide default.

It is also possible to set `live_output: <bool>` in the metadata.
Additional metadata settings will be added in future releases.

* When a selected Jupyter kernel is ambiguous (for example, `python` on a
machine with multiple Python kernels), there is no longer an error message
by default. Instead, if all potential matches have kernel names that
include a version number, and if only a single kernel has a version number
higher than the rest, then the kernel with the highest version number is
used. Only version numbers of the form `major`, `major.minor`, and
`major.minor.patch` are considered in doing the comparison. Any
alpha/beta/dev or similar status is ignored.

* Fixed an encoding bug that prevented `svg` rich output from being displayed.
Added `svg` to the collection of rich output formats that are automatically displayed (53).

* stdout and stderr from Jupyter kernel processes are no longer included in
Codebraid's stdout and stderr. Some kernels such as IJulia write messages
to output streams during startup. This was causing error messages in
Codebraid Preview and incorrect documents when Codebraid outputs to stdout.

* Fixed a bug that prevented Jupyter kernels from being used when the kernel
name, kernel display name, and kernel language were not all different from
each other.

* Setting `jupyter_timeout` without `jupyter_kernel` on the first code chunk
in a session now causes the session to execute with the default kernel for
the session's language. Previously, `jupyter_timeout` was ignored without
`jupyter_kernel`.

* Sessions that do not specify execution information (language, executable,
Jupyter kernel, etc.) now result in an error message rather than causing
`codebraid` to exit with an error.

* Fixed `--only-code-output` bugs that affected Codebraid Preview.
`.cb-paste` did not work due to a hashing bug. LaTeX rich output appeared
verbatim instead of being interpreted. Verbatim textual rich output did not
have the correct language class. Code chunks with a missing language or
inherited language could have incorrect output when interspersed.

* Code chunks with a named session but an invalid command are now treated as
session rather than source chunks. This provides better error messages and
prevents execution of the named session since it involves errors.

* Code chunks in sessions and sources with significant errors are now given
consecutive line numbers, instead of all starting with a line number of 1.

0.9.0

* Added option `--stdin-json-header`, which treats the first line of stdin as
a header in JSON format containing data about stdin such as file origin.
This allows Codebraid Preview to transmit multiple, concatenated files via
stdin while still getting correct file names and line numbers in error and
warning messages, rather than a file name like `<string>` and a number based
on concatenated file length. It also allows Codebraid Preview and normal
Codebraid processing to share the same cache, since Codebraid can associate
the cache with specific file paths rather than just generic stdin.

* Fixed a caching bug. Errors due to missing executables (built-in code
execution system), missing Jupyter kernels, ambiguous Jupyter kernel names,
and some Jupyter configuration issues were only reported during an initial
Codebraid run. During subsequent runs with unmodified code and settings,
errors were not reported and there was no attempt to re-execute sessions to
check for newly available executables/Jupyter kernels/libraries.

* When a Jupyter kernel name is ambiguous (for example, `python` on a machine
with multiple Python kernels), the error message now lists all potentially
compatible kernels instead of just stating that a kernel could not be found.

* Improved `--only-code-output`. It now sends an `index` message that lists
all code collections being processed and includes information about language
inheritance through `copy`. Code chunk `output` messages now include
execution progress information for chunks being executed. Fixed a bug that
could cause a `KeyError` for some sessions containing only a single code
chunk. Fixed a bug that caused the first code chunk in a code collection to
be resent unnecessarily at the end of code collection processing.

* Refactored line number calculations. Fixed a bug that could produce
incorrect line numbers for code from `copy`. Fixed a bug with
`--only-code-output` that duplicated line number settings for the first code
chunk in a code collection when checking the code chunk for modifications at
the end of code collection processing.

* Fixed a bug that skipped progress notifications for sessions with errors
that prevent code execution. This prevented `--only-code-output` from
sending information about these sessions and prevented summaries with
`--live-output`.

* Fixed a bug that prevented a progress notification for session completion
with the built-in code execution system.

* Improved progress tracking for sources.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.