Skip to content

v.0.2.2 (August, 2023)

Compare
Choose a tag to compare
@jeremymanning jeremymanning released this 10 Aug 14:37
· 136 commits to main since this release
5b8c55e

This release includes four major updates:

  1. We have added a "project" infrastructure for isolating davos-related changes from the user's runtime environment. When Davos is imported, a new lightweight "virtual environment-like infrastructure" is created. These environments are different from (and somewhat lighter-weight than) standard virtual environments in three ways: (a) they don't contain their own python or pip executables, (b) they don't need to be activated or deactivated in order to use them, and (c) they extend rather than replace the current runtime environment. Any smuggled packages (and their dependencies) that are not available in the runtime environment are automatically installed to the notebook's environment instead of altering the user's system. This means that davos-enhanced notebooks will no longer interfere with each other, or with the user's system. By default each davos-enhanced notebook gets its own associated environment. However, this may be customized by setting the davos.project attribute to a user-defined string, pathlib.Path, or davos.Project. If the project is shared across several notebooks, Davos can share package installations across those notebooks, rather than creating new copies of each package for each individual notebook. Setting davos.project to None will revert Davos to its pre-v0.2.0 behavior by installing any "smuggled" packages to the current runtime environment. Project can be inspected and managed from within the notebook — e.g., deleting them/“clean up after yourself” when you’re done with a project. Here's a screencast as an example (credit: @paxtonfitzpatrick):

demo

  1. To enable easier customization of Davos's behavior, we now allow many of the configurable attributes to be tunable from the main davos module variable rather than solely via davos.config. For example, to suppress verbose output when new packages are installed, either of the following will now work:
# pre v. 0.2.2 version (legacy support)
import davos
davos.config.suppress_stdout = True
# new syntax option as of v 0.2.2
import davos
davos.suppress_stdout = True
  1. We've included new syntax for requiring a specific Python version or pip version, using davos.require_python(...) and davos.require_pip(...), respectively. This is useful when specified dependencies only run on particular versions of Python, etc.

  2. We have added (unofficial and incomplete) support for using davos in IPython shells. More extensive and robust support for IPython shells will be implemented in a future release.

This release also includes many bug fixes, enhancements, and other optimizations. A complete changelog is available here.