Skip to content

Commit

Permalink
Release Lena v0.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
ynikitenko committed May 1, 2022
1 parent d077f23 commit 7b77600
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 3 deletions.
109 changes: 109 additions & 0 deletions TIDINGS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
====================
Lena release 0.5
====================

Lena v0.5 was released on 1st May 2022.

What's new
----------

Adds graphs (Lena graph structure and adapters for ROOT graphs with error bars).

Improves GroupPlots and facilitates analysis (user's sequences)
separation between different modules.

* lena.context changes:

* Context allows pickling.
* difference adds a keyword argument *level*.

* lena.core changes:

* FillRequest element no longer yields in case of empty flow.
Adds a keyword argument *yield_on_remainder*.
Adds keyword arguments *buffer_input* and *buffer_output*
(both obligatory, same for FillRequestSeq),
*reset_name*.
FillRequest requires explicit *reset* for FillCompute elements.
Fixes/improves *run, fill, request* methods of FillRequest.

* lena.flow changes:

* GroupBy accepts formatting strings.
* GroupPlots selects all values by default.
* GroupScale modifies scale of a group in place
(that is mutates its members and not produces their scaled copies).
* Adds MapGroup to simultaneously modify a group of values
(produced by GroupPlots).
* RunIf accepts a variable number of arguments.

* lena.output changes:

* Adds iterable_to_table.
* ToCSV no longer requires *to_csv* method (and does not use that).
Now to be written as a table, it is sufficient for a structure to be iterable.
ToCSV ignores strings (passes them unchanged).
ToCSV updates context when data has a method *_update_context(context)*
(used during the "destruction" of structures).
* Write doesn't require *context.output* to be present.
Write accepts objects with *write(filename)* method as writable data.
Write doesn't write values where data part is equal to *context.output.filename*
(this means that it was already written by another Write element).

* lena.structures changes:

* Adds a graph structure.
* histogram adds a method *_update_context* (like graph).
* HistToGraph accepts a keyword argument *scale*
and works with multidimensional histograms.
* hist_to_graph adds a keyword argument *scale*.
* HistToGraph and hist_to_graph add a keyword argument *field_names*.
* Adds iter_bins_with_edges (in fact, makes that public).
* MapBins sets default *select_bins* keyword argument selecting everything.
* Add root_graph_errors structure and ROOTGraphErrors element.

Bug fixes
---------

* Fixes structures.histogram.scale method,
which did not store a computed scale.

Deprecations and backward incompatible changes
----------------------------------------------

* lena.context.difference recurses infinitely by default.

* lena.flow changes:

* Deprecates GroupPlots initialization keyword arguments *transform*
and *select* (use flow.MapGroup and flow.RunIf instead).
* Move SplitIntoBins, MapBins, IterateBins, get_example_bin, cell_to_string
to lena.structures.

* lena.structures changes:

* Histogram element no longer accepts an initialization keyword argument
*context* and no longer has histogram public fields
(they remain only in the histogram structure).
*fill* method no longer accepts a weight
(this is not needed in a Sequence or will require a different interface).
*reset* algorithm is fixed and no longer throws an error.
Histogram no longer updates context during *compute*.
* Graph is deprecated.
* hist_to_graph drops a keyword argument *context*.
* hist_to_graph produces graphs (not Graphs).
* HistToGraph requires *make_value* to be a Variable (not a function).
*context.value* is updated with the context of the graph's value.
* make_hist_context is deprecated.

* lena.output.ToCSV no longer uses *to_csv* method (see changes).

Technical changes
-----------------

* Adds performance measurement scripts.
* Fixes hypothesis error in Python 3.10 for extremely small ("subnormal") histogram weights.
* Improves docs, adds new Sphinx directives (*deprecated* and *versionadded*).
* Update Sphinx conf.py for *napoleon*. Add sphinx to requirements.txt.
* Adds tests. Test coverage is 92% (287/3604 missing vs total).

====================
Lena release 0.4
====================
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def setup(app):
author = u'Yaroslav Nikitenko'

# The short X.Y version
version = u'0.4'
version = u'0.5'
# The full version, including alpha/beta/rc tags
release = u'0.4'
release = u'0.5'
# release = u'0.1-alpha'


Expand Down
3 changes: 3 additions & 0 deletions lena/flow/group_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def __init__(self, *seq, **map_scalars):
Set a keyword argument *map_scalars* to ``False``
to ignore scalar values (those that are not groups).
Other keyword arguments raise :exc:`.LenaTypeError`.
.. versionadded:: 0.5
"""
# todo: could be made a FillCompute element, depending on *seq*
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="lena",
version="0.4",
version="0.5",
author="Yaroslav Nikitenko",
author_email="[email protected]",
description="Lena is an architectural framework for data analysis",
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# otherwise will have problems either with tox,
# or when executing pytest directly
collect_ignore_glob += ["root/*"]
collect_ignore_glob += ["*/*_root_*"]

0 comments on commit 7b77600

Please sign in to comment.