Skip to content

Releases: pcdshub/happi

v2.6.0 (2024-12-19)

20 Dec 19:41
798b2f3
Compare
Choose a tag to compare

Features

  • Updated happi load to support searching and loading in one user-friendly expression. The load function now gathers the results of each search term individually and loads the union of the results.

Maintenance

  • Make running happi repair only saves an item if it actually got changed during the repair process
  • Fixes issue in test suite, making tst_base_pim2 a loadable SimpleNamespacce
  • Add example .cfg and some more instructions on using happi cli
  • Make pre-release notes script default to just using vi if EDITOR env var is not set.
  • Fix a few dead links in the docs, add to contributing doc to make 1st time dev instructions bit more clear

Contributors

  • janeliu-slac
  • nstelter-slac
  • tangkong

Full Changelog: v2.5.0...v2.6.0

v2.5.0 (2023-12-19)

19 Dec 19:02
8d1f067
Compare
Choose a tag to compare

Features

  • Adds more user-friendly qt search widget

Bugfixes

  • Fixes audit output table, preventing names from being dropped

Maintenance

  • Adjusts cli audit output to work better for file redirects
  • Fix conda recipe to use "run_constrained" not "run-constrained"

Contributors

v2.4.0 (2023-09-27)

27 Sep 22:54
9819438
Compare
Choose a tag to compare

Features

  • Added happi.audit.audit() which can be used to programmatically audit
    happi items.

Bugfixes

  • Fixes bug where happi transfer was not filling default values properly
  • Fixes conftest.trim_split_output, which was effectively a no-op. Touches up affected tests
  • Issue 302: Add functionality to happi 'repair' that ensures that the name and id fields of a device are the same.
  • Removes an extra pcdsutils import from test_cli.py that is not properly caught by error handling

Maintenance

  • Adds error handling for the temporary file created when initializing a json backend object.
  • Changes format of temporary file name generation to contain only a unique hash.
  • Tests modified to no longer assert stdout matches expected strings. Rather the effect of the
    command being tested is verified independently. The assert_match_expected helper is still
    used, but will now print mismatches instead of asserting them.
  • Allows happi update to handle json-backend-type payloads
  • Adds pcdsutils and pcdsdevices to environment requirements in conda recipe and dev requirements
  • Removes pcdsutils and pcdsdevices from extra testing requirements in github workflow
  • The happi audit CLI entrypoint has been modified to use
    happi.audit.audit().
  • Updates mongo backend to handle authSource, require connection information (host, user, etc)
  • Documents bson dependency. Bson is vendored by pymongo, which instructs
    users to not install bson from pypi (pymongo readme <https://github.com/mongodb/mongo-python-driver/tree/master#installation>)

Contributors

v2.3.0 (2023-06-30)

30 Jun 20:50
ee68d81
Compare
Choose a tag to compare

Features

  • CLI command happi config edit - open config file in $EDITOR

  • CLI command happi config init - create new config file with default options

  • CLI command happi config show - show location & contents of config file

  • Extend the config searching mechanism to check the platformdirs config directory. The happi config file path is taken from the HAPPI_CFG environment variable, but if the variable is not set then the following locations are searched in order for files named .happi.cfg or happi.cfg:

    • The location specified by the XDG_CONFIG_HOME environment variable
    • ~/.config
    • (new) The location specified by platformdirs.user_config_dir("happi")

Maintenance

Contributors

v2.2.0 (2023-05-08)

08 May 23:56
1641d9c
Compare
Choose a tag to compare

Features

  • Adds a hook in happi.loader.from_container that runs the method post_happi_md on an instantiated object after the metadata container has been attached. This allows a clear method for objects to interact with happi metadata if desired.

Maintenance

  • Makes HappiDeviceTreeView more tolerant of items with missing metadata keys. Items missing the key used to group the tree view will be organized into a catch-all "[KEY NOT FOUND]" group.

Contributors

v2.1.1

08 Apr 00:00
c46a5e9
Compare
Choose a tag to compare

This is a maintenance-only/build release. There are no changes to the library code.

What's Changed

Full Changelog: v2.1.0...v2.1.1

v2.1.0 (2023-04-03)

04 Apr 20:03
f4d8c24
Compare
Choose a tag to compare

Features

  • Adds happi repair command, for synchronizing backend database with fields expected by container.
    Adds a corresponding audit function.
  • Adds audit functions that check the connection status of all signals in an
    ophyd device (check_wait_connection) and verify any fields requested by
    args/kwargs exist in the database (check_args_kwargs_match).
  • Adds happi audit -d/--details option to print the source of a requested
    audit function.
  • Adds the happi delete CLI tool for deleting entries from the happi database.

Bugfixes

  • Fix an issue where an ill-timed interrupt of the json backend's
    store operation could truncate the data file. This also removes
    the implicit/optional dependency on fcntl.

Maintenance

  • Migrates from Travis CI to GitHub Actions for continuous integration testing, and documentation deployment.
  • Updates happi to use setuptools-scm, replacing versioneer, as its version-string management tool of choice.
  • Syntax has been updated to Python 3.9+ via pyupgrade.
  • happi has migrated to modern pyproject.toml, replacing setup.py.
  • Sphinx 6.0 now supported for documentation building.

Contributors

v2.0.0 (2022-10-20)

20 Oct 21:51
0cb79b5
Compare
Choose a tag to compare

API Changes

  • Removed deprecated happi.containers.Device container.
  • Removed deprecated methods:
    • happi.Client.create_device
    • happi.Client.add_device
    • happi.Client.find_device
    • happi.Client.all_devices
    • happi.Client.remove_device
    • happi.SearchResult.device

Features

  • Added EntryInfo keyword argument include_default_as_kwarg. If set to False,
    any keys that are included in an item's kwargs that match the default of their
    corresponding EntryInfo will be omitted from the keyword arguments passed to
    device_class when instantiating (loading) the item as in happi.loader.load_device or
    SearchResult.get().
    If the kwargs EntryInfo sets include_default_as_kwarg = True,
    the setting on the corresponding EntryInfo will be used to decide
    whether or not to omit a keyword argument.
    If the kwargs EntryInfo sets include_default_as_kwarg = False,
    the setting on corresponding EntryInfo will be ignored.
    The default value is True on all EntryInfo instances, retaining the original behavior.
  • For happi load, fall back to Python REPL if IPython is not available.
  • Added MultiBackend, which allows a happi Client to serve information
    from multiple databases simultaneously. Updates config parsing logic
    to match.
  • Added happi audit function for running checks on happi database items.
  • Restored --json option for happi search.

Bugfixes

  • Removed extraneous extraneous print in happi load.
  • Calculate a max width for shown tables based on the current terminal size
    to prevent bad line wrapping.

Maintenance

  • Prevent ophyd / pyepics teardown during test suite.
  • Improved error logging in happi CLI to be more consistent.

Contributors

  • JJL772
  • klauer
  • tangkong

Full Changelog: v1.14.0...v2.0.0

v1.14.0

06 Jul 16:01
f348c1a
Compare
Choose a tag to compare

API Changes

  • Added happi.Client.create_item and deprecated happi.Client.create_device.
  • Added happi.Client.add_item and deprecated happi.Client.add_device.
  • Added happi.Client.find_item and deprecated happi.Client.find_device.
  • Added happi.Client.all_items and deprecated happi.Client.all_devices.
  • Added happi.Client.remove_item and deprecated happi.Client.remove_device.
  • Deprecated happi.SearchResult.device and above deprecated items are now scheduled for removal in the next major happi release.
  • Internal backend API all_devices has been changed to all_items.
  • Added happi.Client.retain_cache_context for clients that desire to control when reloading the database from a happi backend happens.
  • Backend implementations may now optionally support a caching mechanism with clear_cache being called externally by the client when desirable.
  • The happi container registry now supports adding new container classes manually by way of happi.containers.registry["ContainerName"] = ContainerClass.

Features

  • Significant performance increase for JSON-backed happi clients.
  • Makes SearchResult hashable
  • Uses hashable SearchResult in happi search cli command
  • JSON database paths may now be relative to the configuration file.
  • Added happi benchmark for identifying which items are slow to load.
  • Added happi profile for identifying why particular items are slow to load.

Bugfixes

  • Fix a rare race condition related to reading a json device database twice in a command line search command between database updates.
  • Issue where happi Client would repeatedly (and unnecessarily) make database backend calls has been fixed.
  • Allow int search values to match their float counterparts
  • The happi container registry is loaded at first use and not on import. This can result in increased performance where the happi database is not used. It also fixes a scenario in which a module that defines a happi container attempts to import certain classes from happi.

Maintenance

  • Old terminology for HappiItem instances has been scrubbed and clarified in documentation.
  • Test suite and documentation has been updated to reflect trajectory of deprecated methods and naming.
  • Added relaxed flake8 configuration.
  • Remove happi.device.Device from tests to avoid deprecation warnings
  • Add type annotations to test suite
  • Clean up fixture usage and separate three_valves fixture into three_valves and client_with_three_valves
  • add pre-release notes scripts
  • More documentation about the happi container registry was added.
  • Refactored CLI slightly to re-use searching logic.

Contributors

  • JJL772
  • klauer
  • tangkong
  • zllentz

Full Changelog: v1.13.0...v1.14.0

v1.13.0 (2022-06-03)

03 Jun 20:14
ffdf677
Compare
Choose a tag to compare

Features

  • Added the enforce_doc argument to EntryInfo. This lets us explain what the entry info represents and how it is meant to be filled out in more explicit words when it would be helpful to do.
  • Added methods to client and cli entry points for changing the container of a happi item. This will walk the user through the process of switching to or between custom containers while making sure we adhere to the defined EntryInfo. Check out happi transfer --help for command-line usage or Client.change_container for library usage.
  • Added the option to pick between glob and regex searching from the CLI, rather than only allowing glob as in the past. Give happi search --regex a try and check out happi search --help for more information.

Fixes

  • Fixed an issue where it was previously impossible to input dictionary and list fields using the CLI.
  • Fixed handling of numeric values in happi search.
  • Fixed range searching logic for multiple range searches in one query.
  • Fixed the ambiguity between a search returning no results (exit code 0) and a search being malformed (exit code 1).

Maintenance

  • Refactored the CLI to use click instead of bare argparse. This implementation is much cleaner and will lead to more advanced CLI features in the future.
  • psdm_qs_cli and pymongo are no longer required dependencies of happi. These have been reclassified into the run_constrained portion of the conda recipe bundled in this repository and will also be adjusted on conda-forge.
  • Improved usage and cleanup of temporary files when running the happi test suite.
  • Restored the automatic documention uploads.
  • Added/modified test cases to better cover search behavior.

Contributors