Skip to content

Latest commit

 

History

History
1626 lines (1132 loc) · 53.9 KB

CHANGES.rst

File metadata and controls

1626 lines (1132 loc) · 53.9 KB

Changelog

dev (not yet released)

Bug fixes and minor changes

  • #152: Fix a documentation error
  • #154: Fix a duplicate test name

1.3.0 (2024-03-21)

New features

Incompatible changes

Bug fixes and minor changes

1.2.0 (2023-10-31)

New features

  • #125, #140: Add support to link datasets with samples in :mod:`icat.ingest`.
  • #122, #133: Allow referencing related objects by reference key in object references in XML ICAT data file format.

Incompatible changes

  • #138, #139: Fix the input that :mod:`icat.ingest` generates on the fly to be valid according to the ICAT data file schema. This also affects the input that the module accepts: the order of subelements of data need to be changed such that datasetTechnique comes before datasetInstrument.

    Note that :mod:`icat.ingest` has been declared experimental for now.

Bug fixes and minor changes

1.1.0 (2023-06-30)

New features

Bug fixes and minor changes

1.0.0 (2022-12-21)

New features

Incompatible changes and deprecations

Bug fixes and minor changes

0.21.0 (2022-01-28)

New features

0.20.1 (2021-11-04)

Bug fixes and minor changes

  • #96: Fix failing build of the documentation at Read the Docs.

0.20.0 (2021-10-29)

New features

Incompatible changes and new bugs

Bug fixes and minor changes

0.19.0 (2021-07-20)

New features

Bug fixes and minor changes

0.18.1 (2021-04-13)

Bug fixes and minor changes

  • #82: Change the search result in the case of multiple fields from list to tuple.
  • #76, #81: work around an issue in icat.server using DISTINCT in search queries for multiple fields.

0.18.0 (2021-03-29)

New features

  • #76, #78: add client side support for searching for multiple fields introduced in icat.server 4.11.0. Add support for building the corresponding queries in the in class :class:`icat.query.Query`.

Incompatible changes and deprecations

Bug fixes and minor changes

0.17.0 (2020-04-30)

New features

Incompatible changes and deprecations

Bug fixes and minor changes

  • #68: :ref:`wipeicat` enters an infinite loop if Datafiles are missing from IDS storage.
  • #19, #69: Review documentation and add tutorial.
  • #62: Minor fixes in the error handling in setup.py.
  • Fix icatdata-4.10.xsd: :attr:`Study.endDate` was erroneously not marked as optional.
  • #70: Fix several errors in the tests.
  • #58: Use specific test data for different ICAT versions.
  • #67, #71, #72: document the option to use suds-community instead of suds-jurko.

Misc

  • Do not include the documentation in the source distribution. Rely on the online documentation (see link in the README.rst) instead.

0.16.0 (2019-09-26)

New features

Incompatible changes and deprecations

  • Drop support for Python 2.6.

Bug fixes and minor changes

0.15.1 (2019-07-12)

Bug fixes and minor changes

0.15.0 (2019-03-27)

New features

  • #53: Add support for ICAT 4.10.0 including schema changes in that version.

Incompatible changes and deprecations

  • Require pytest 3.1.0 or newer to run the test suite. Note that this pytest version in turn requires Python 2.6, 2.7, or 3.3 and newer.
  • Drop support for Python 3.1 and 3.2. There is no known issue with these Python versions in python-icat (so far). But since we can't test this any more, see above, we drop the claim to support them.

Bug fixes and minor changes

  • #49: Module icat.eval is outdated.
  • #50, #52: Fix DeprecationWarnings.
  • #51: Fix a compatibility issue with pytest 4.1.0 in the tests.
  • #54: Fix a UnicodeDecodeError in the tests.

0.14.2 (2018-10-25)

Bug fixes and minor changes

  • Add a hook to control internal diverting of :attr:`sys.err` in the :mod:`icat.config` module. This is intentionally not documented as it goes deeply into the internals of this module and most users will probably not need it.

0.14.1 (2018-06-05)

Bug fixes and minor changes

  • Fix a misleading error message if the IDS server returns an error for the Write API call.

0.14.0 (2018-06-01)

New features

Incompatible changes and deprecations

  • Deprecate function :func:`icat.exception.stripCause`.

    This was an internal helper function not really meant to be part of the API. The functionality has been moved in a base class of the exception hierarchy.

Bug fixes and minor changes

0.13.1 (2017-07-12)

Bug fixes and minor changes

  • #38: There should be a way to access the kwargs used to create the client in config.

0.13.0 (2017-06-09)

New features

Incompatible changes and deprecations

  • As a consequence of the discovery of available authenticators, the workflow during configuration need to be changed. Until now, the beginning of a typical python-icat program would look like:

    config = icat.config.Config()
    # Optionally, add custom configuration variables:
    # config.add_variable(...)
    conf = config.getconfig()
    client = icat.Client(conf.url, **conf.client_kwargs)
    

    E.g. first the configuration variables are set up, then the configuration is applied and finally the :class:`icat.client.Client` object is created using the configuration values. With the discovery of authenticators, the :class:`icat.config.Config` object itself needs a working :class:`icat.client.Client` object in order to connect to the ICAT server and query the authenticator info. The :class:`icat.client.Client` object will now be created in the :class:`icat.config.Config` constructor and returned along with the configuration values by :meth:`icat.config.Config.getconfig`. You will need to replace the code from above by:

    config = icat.config.Config()
    # Optionally, add custom configuration variables:
    # config.add_variable(...)
    client, conf = config.getconfig()
    

    The derived configuration variable client_kwargs that was used to pass additional arguments from the configuration to the Client constructor is no longer needed and has been removed.

    The optional argument args has been moved from the :meth:`icat.config.Config.getconfig` call to the :class:`icat.config.Config` constructor, retaining the same semantics. E.g. you must change in your code:

    config = icat.config.Config()
    conf = config.getconfig(args)
    client = icat.Client(conf.url, **conf.client_kwargs)
    

    to:

    config = icat.config.Config(args)
    client, conf = config.getconfig()
    
  • Deprecate support for ICAT 4.2.*.

    Note that already now significant parts of python-icat require features from ICAT 4.3 such as the JPQL like query language. The only workaround is to upgrade your icat.server.

  • Deprecate module :mod:`icat.cgi`.

    It is assumed that this has never actually been used in production. For web applications it is recommended to use the Python Web Server Gateway Interface (WSGI) rather then CGI.

  • Deprecate the predefined configuration variable configDir.

    The main use case for this variable was to be substituted in the default value for the path of an additional configuration file. The typical usage was the definition of a configuration variable like:

    config = icat.config.Config()
    config.add_variable('extracfg', ("--extracfg",),
                        dict(help="Extra config file"),
                        default="%(configDir)s/extra.xml", subst=True)
    

    This set the default path for the extra config file to the same directory the main configuration file was found in. Using the new config variable type :func:`icat.config.cfgpath` you can replace this by:

    config = icat.config.Config()
    config.add_variable('extracfg', ("--extracfg",),
                        dict(help="Extra config file"),
                        default="extra.xml", type=icat.config.cfgpath)
    

    This will search the extra config file in all the default config directories, regardless where the main configuration file was found.

  • The fixes for #35 and #36 require some changes in the semantics in the f and the mode argument to :func:`icat.dumpfile.open_dumpfile`. Most users will probably not notice the difference.

Bug fixes and minor changes

0.12.0 (2016-10-10)

New features

Bug fixes and minor changes

  • Sort objects in :ref:`icatdump` before writing them to the dump file. This keeps the order independent from the collation used in the ICAT database backend.
  • #2: for Python 3.6 (expected to be released in Dec 2016) and newer, use the support for chunked transfer encoding in the standard lib. Keep our own implementation in module :mod:`icat.chunkedhttp` only for compatibility with older Python versions.
  • Improved the example script :ref:`wipeicat`.
  • Add an example script dumprules.py.
  • Add missing schema definition for the ICAT XML data file format for ICAT 4.7.
  • Fix an :exc:`AttributeError` during error handling.

0.11.0 (2016-06-01)

New features

  • #12, #23: add support for ICAT 4.7.0 and IDS 1.6.0. ICAT 4.7.0 had some small schema changes that have been taken into account.

Incompatible changes

Bug fixes and minor changes

Misc

  • Change license to Apache 2.0.

0.10.0 (2015-12-06)

New features

Bug fixes and minor changes

0.9.0 (2015-08-13)

New features

Incompatible changes and deprecations

Bug fixes and minor changes

  • #6: :class:`icat.query.Query`: adding a condition on a meta attribute fails.
  • #10: client.putData: IDSInternalError is raised if datafile.datafileCreateTime is set.
  • Ignore import errors from the backend modules in :ref:`icatingest` and :ref:`icatdump`. This means one can use the scripts also if the prerequisites for some backends are not fulfilled, only the concerned backends are not available then.
  • #5, compatibility with ICAT 4.5: entity ids are not guaranteed to be unique among all entities, but only for entities of the same type.
  • #5, compatibility with ICAT 4.5: :meth:`icat.client.Client.getEntityInfo` also lists createId, createTime, modId, and modTime as attributes. This need to be taken into account in :mod:`icat.icatcheck`.
  • The last fix in 0.8.0 on the string representation operator :meth:`icat.query.Query.__str__` was not complete, the operator still had unwanted side effects.
  • Fix a bug in the handling of errors raised from the ICAT or the IDS server. This bug affected only Python 3.
  • Add proper type checking and conversion for setting an attribute that corresponds to a one to many relationship in class :class:`icat.entity.Entity`. Accept any iterable of entities as value.
  • #9: :ref:`icatingest` with duplicate=CHECK may fail when attributes are not strings. Note that this bug was only present in an alpha version, but not in any earlier release version.
  • Source repository moved to Git. This gives rise to a few tiny changes. To name the most visible ones: python2_6.patch is now auto generated by comparing two source branches and must be applied with -p1 instead of -p0, the format of the icat module variable :attr:`icat.__revision__` has changed.
  • Review default exports of modules. Mark some helper functions as internal.

0.8.0 (2015-05-08)

New features

  • Enable verification of the SSL server certificate in HTTPS connections. Add a new configuration variable checkCert to control this. It is set to :const:`True` by default.

    Note that this requires either Python 2.7.9 or 3.2 or newer. With older Python version, this configuration option has no effect.

  • Add type conversion of configuration variables.

  • Add substituting the values of configuration variables in other variables.

  • Add another derived configuration variable configDir.

  • Default search path for the configuration file: add an appropriate path on Windows, add /etc/icat and ~/.config/icat to the path if not on Windows.

  • Add icatexport.py and icatimport.py example scripts that use the corresponding calls to the ICAT RESTful interface to dump and restore the ICAT content.

  • The constructor of :exc:`icat.exception.ICATError` and the :func:`icat.exception.translateError` function are now able to construct exceptions based on a dict such as those returned by the ICAT RESTful interface in case of an error.

    Unified handling of errors raised from the ICAT and the IDS server.

Incompatible changes

Bug fixes and minor changes

0.7.0 (2015-02-11)

New features

0.6.0 (2014-12-15)

New features

Incompatible changes

  • Move the group argument to method :meth:`icat.client.Client.createRules` to the last position and make it optional, having default :const:`None`.

    In the client code, replace:

    client.createRules(group, crudFlags, what)
    

    by

    client.createRules(crudFlags, what, group)
    
  • The :meth:`icat.client.Client.putData` method returns the new Datafile object created by IDS rather then only its id.

    If you depend on the old behavior in the client code, replace:

    dfid = client.putData(file, datafile)
    

    by

    df = client.putData(file, datafile)
    dfid = df.id
    

Minor changes and fixes

0.5.1 (2014-07-07)

  • Add a module :mod:`icat.eval` that is intended to be run using the -m command line switch to Python. It allows to evaluate Python expressions within an ICAT session as one liners directly from the command line, as for example:

    # get all Dataset ids
    $ python -m icat.eval -e 'client.search("Dataset.id")' -s root
    [102284L, 102288L, 102289L, 102293L]
    
  • Fix an issue in the error handling in the IDS client that caused an :exc:`urllib2.HTTPError` to be raised instead of an :exc:`icat.exception.IDSServerError` in the case of an error from the IDS server and thus the loss of all details about the error reported in the reply from the server.

  • Add specific exception classes for the different error codes raised by the IDS server.

  • Fix compatibility issue with Python 3.3 that caused the HTTP method to be set to :const:`None` in some IDS methods, which in turn caused an internal server error to be raised in the IDS server.

  • Fix compatibility issues with Python 3.4: some methods have been removed from class :class:`urllib.request.Request` which caused an :exc:`AttributeError` in the :class:`icat.ids.IDSClient`.

  • Fix: failed to connect to an ICAT server if it advertises a version number having a trailing "-SNAPSHOT" in :meth:`icat.client.Client.getApiVersion`. For compatibility, a trailing "-SNAPSHOT" will be replaced by "a1" in the client.apiversion attribute.

  • Suppress misleading context information introduced with Python 3 (PEP 3134) from the traceback in some error messages. Unfortunately, the fix only works for Python 3.3 and newer.

  • Make example files compatible across Python versions without modifications, such as running 2to3 on them.

0.5.0 (2014-06-24)

0.4.0 (2014-02-11)

0.3.0 (2014-01-10)

0.2.0 (2013-11-18)

0.1.0 (2013-11-01)

  • Initial version