Hello community,
here is the log from the commit of package python-pypet for openSUSE:Factory checked in at 2020-06-30 21:56:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pypet (Old)
and /work/SRC/openSUSE:Factory/.python-pypet.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pypet"
Tue Jun 30 21:56:45 2020 rev:4 rq:817771 version:0.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pypet/python-pypet.changes 2018-08-03 12:40:30.563855943 +0200
+++ /work/SRC/openSUSE:Factory/.python-pypet.new.3060/python-pypet.changes 2020-06-30 21:56:48.266821850 +0200
@@ -1,0 +2,12 @@
+Tue Jun 23 20:05:26 UTC 2020 - Todd R
+
+- Update to 0.5.1
+ * Updated package description to automatically convert md to rst for pypi
+ * Updated pngpath for Sphinx
+- Update to 0.5.0
+ * Fix to work with pandas 1.0
+ * Fix to work with brian2 2.3
+ * Fix to work with Python 3.7 and 3.8
+ * Removal `expectedrows` and `filters` option for HDF5Storage.put as this is no longer supported by pandas
+
+-------------------------------------------------------------------
Old:
----
pypet-0.4.3.tar.gz
New:
----
pypet-0.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pypet.spec ++++++
--- /var/tmp/diff_new_pack.6NAytZ/_old 2020-06-30 21:56:48.890823781 +0200
+++ /var/tmp/diff_new_pack.6NAytZ/_new 2020-06-30 21:56:48.894823793 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pypet
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,16 +12,15 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
-# Tests take forever
-%bcond_with test
+%bcond_without test
Name: python-pypet
-Version: 0.4.3
+Version: 0.5.1
Release: 0
Summary: Parameter exploration and storage of results for numerical simulations
License: BSD-3-Clause
@@ -36,7 +35,6 @@
BuildRequires: %{python_module numpy >= 1.6.1}
BuildRequires: %{python_module pandas >= 0.15.0}
BuildRequires: %{python_module scipy >= 0.9.0}
-BuildRequires: %{python_module scoop >= 0.7.1}
BuildRequires: %{python_module tables >= 3.1.1}
%endif
Requires: python-numpy >= 1.6.1
@@ -74,11 +72,13 @@
%if %{with test}
%check
export LANG=en_US.UTF-8
-%python_exec setup.py test
+pushd pypet/tests
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+$python -B all_single_core_tests.py
+}
%endif
%files %{python_files}
-%defattr(-,root,root,-)
%doc README.md
%license LICENSE
%{python_sitelib}/*
++++++ pypet-0.4.3.tar.gz -> pypet-0.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/LICENSE new/pypet-0.5.1/LICENSE
--- old/pypet-0.4.3/LICENSE 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/LICENSE 2020-06-01 22:42:02.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2013-2018, Robert Meyer
+Copyright (c) 2013-2020, Robert Meyer
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/PKG-INFO new/pypet-0.5.1/PKG-INFO
--- old/pypet-0.4.3/PKG-INFO 2018-06-24 20:51:52.000000000 +0200
+++ new/pypet-0.5.1/PKG-INFO 2020-06-02 12:57:56.386352800 +0200
@@ -1,19 +1,45 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: pypet
-Version: 0.4.3
+Version: 0.5.1
Summary: A toolkit for numerical simulations to allow easy parameter exploration and storage of results.
Home-page: https://github.com/SmokinCaterpillar/pypet
Author: Robert Meyer
-Author-email: robert.meyer@ni.tu-berlin.de
+Author-email: robert.meyer@alcemy.tech
License: BSD
-Description: # pypet
+Description:
+ pypet
+ =====
+
+
+ .. image:: https://travis-ci.org/SmokinCaterpillar/pypet.svg?branch=master
+ :target: https://travis-ci.org/SmokinCaterpillar/pypet
+ :alt: Travis Build Status
+
+
+ .. image:: https://ci.appveyor.com/api/projects/status/9amhj3iyf105xa2y/branch/master?s...
+ :target: https://ci.appveyor.com/project/SmokinCaterpillar/pypet/branch/master
+ :alt: Appveyor Build status
+
+
+ .. image:: https://coveralls.io/repos/github/SmokinCaterpillar/pypet/badge.svg?branch=m...
+ :target: https://coveralls.io/github/SmokinCaterpillar/pypet?branch=master
+ :alt: Coverage Status
+
+
+ .. image:: https://api.codacy.com/project/badge/grade/86268960751442799fcf6192b36e386f
+ :target: https://www.codacy.com/app/robert-meyer/pypet
+ :alt: Codacy Badge
+
+
+ .. image:: https://badge.fury.io/py/pypet.svg
+ :target: https://badge.fury.io/py/pypet
+ :alt: PyPI version
+
+
+ .. image:: https://readthedocs.org/projects/pypet/badge/?version=latest
+ :target: http://pypet.readthedocs.io/en/latest/?badge=latest
+ :alt: Documentation Status
- [![Travis Build Status](https://travis-ci.org/SmokinCaterpillar/pypet.svg?branch=master)](https://travis-ci.org/SmokinCaterpillar/pypet)
- [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/9amhj3iyf105xa2y/branch/master?svg=true)](https://ci.appveyor.com/project/SmokinCaterpillar/pypet/branch/master)
- [![Coverage Status](https://coveralls.io/repos/github/SmokinCaterpillar/pypet/badge.svg?branch=master)](https://coveralls.io/github/SmokinCaterpillar/pypet?branch=master)
- [![Codacy Badge](https://api.codacy.com/project/badge/grade/86268960751442799fcf6192b36e386f)](https://www.codacy.com/app/robert-meyer/pypet)
- [![PyPI version](https://badge.fury.io/py/pypet.svg)](https://badge.fury.io/py/pypet)
- [![Documentation Status](https://readthedocs.org/projects/pypet/badge/?version=latest)](http://pypet.readthedocs.io/en/latest/?badge=latest)
The new python parameter exploration toolkit:
*pypet* manages exploration of the parameter space
@@ -24,58 +50,68 @@
from a single source. Data I/O of your simulations and
analyses becomes a piece of cake!
+ Requirements
+ ------------
- ## Requirements
-
- Python 3.5 or 3.6 and
+ Python 3.6, 3.7 or 3.8 and
- * tables >= 3.1.1
- * pandas >= 0.20.0
+ *
+ tables >= 3.5.0
- * numpy >= 1.12.0
+ *
+ pandas >= 1.0.0
- * scipy >= 0.17.0
+ *
+ numpy >= 1.16.0
- * HDF5 >= 1.8.9
+ *
+ scipy >= 1.3.0
+ *
+ HDF5 >= 1.10.0
There are also some optional packages that you can but do not have to install.
If you want to combine *pypet* with SCOOP you need
+
* scoop >= 0.7.1
For git integration you additionally need
- * GitPython >= 0.3.1
+
+ * GitPython >= 3.1.3
To utilize the cap feature for multiprocessing you need
- * psutil >= 2.0.0
+
+ * psutil >= 5.7.0
To utilize the continuing of crashed trajectories you need
- * dill >= 0.2.1
+
+ * dill >= 0.3.1
Automatic Sumatra records are supported for
- * Sumatra >= 0.7.1
+ * Sumatra >= 0.7.1
- ## Python 2.7
+ Python 2.7
+ ----------
This release no longer supports Python 2.7.
If you are still using Python 2.7, you need to
use the pypet legacy version 0.3.0 (https://pypi.python.org/pypi/pypet/0.3.0).
-
- # What is pypet all about?
+ What is pypet all about?
+ ========================
Whenever you do numerical simulations in science, you come across two major challenges.
First, you need some way to save your data. Secondly, you extensively explore the parameter space.
In order to accomplish both you write some hacky I/O functionality to get it done the quick and
- dirty way. This means storing stuff into text files, as *MATLAB* *m*-files,
+ dirty way. This means storing stuff into text files, as *MATLAB* *m*\ -files,
or whatever comes in handy.
After a while and many simulations later, you want to look back at some of your very
@@ -90,33 +126,38 @@
that was not specific to my current simulations, but I could also use for future scientific
projects right out of the box.
- The python parameter exploration toolkit (*pypet*) provides a framework to define *parameters*
+ The python parameter exploration toolkit (\ *pypet*\ ) provides a framework to define *parameters*
that you need to run your simulations. You can actively explore these by following a
*trajectory* through the space spanned by the parameters.
And finally, you can get your *results* together and store everything appropriately to disk.
The storage format of choice is HDF5 (http://www.hdfgroup.org/HDF5/) via PyTables
(http://www.pytables.org/).
-
- ## Package Organization
+ Package Organization
+ --------------------
This project encompasses these core modules:
- * The `pypet.environment` module for handling the running of simulations
- * The `pypet.trajectory` module for managing the parameters and results,
- and providing a way to *explore* your parameter space. Somewhat related is also the
- `pypet.naturalnaming` module, that provides functionality to access and put data into
- the *trajectory*.
+ *
+ The ``pypet.environment`` module for handling the running of simulations
- * The `pypet.parameters` module including containers for parameters and results
+ *
+ The ``pypet.trajectory`` module for managing the parameters and results,
+ and providing a way to *explore* your parameter space. Somewhat related is also the
+ ``pypet.naturalnaming`` module, that provides functionality to access and put data into
+ the *trajectory*.
- * The `pypet.storageservice` for saving your data to disk
+ *
+ The ``pypet.parameters`` module including containers for parameters and results
+ *
+ The ``pypet.storageservice`` for saving your data to disk
- ## Install
+ Install
+ -------
- If you don't have all prerequisites (*numpy*, *scipy*, *tables*, *pandas*) install them first.
+ If you don't have all prerequisites (\ *numpy*\ , *scipy*\ , *tables*\ , *pandas*\ ) install them first.
These are standard python packages, so chances are high that they are already installed.
By the way, in case you use the python package manager ``pip``
you can list all installed packages with ``pip freeze``.
@@ -130,13 +171,13 @@
**Or**
- In case you use **Windows**, you have to download the tar file from https://pypi.python.org/pypi/pypet
+ In case you use **Windows**\ , you have to download the tar file from https://pypi.python.org/pypi/pypet
and unzip it. Next, open a windows terminal
- and navigate to your unpacked *pypet* files to the folder containing the `setup.py` file.
+ and navigate to your unpacked *pypet* files to the folder containing the ``setup.py`` file.
As above run from the terminal ``python setup.py install``.
-
- ## Documentation and Support
+ Documentation and Support
+ -------------------------
Documentation can be found on http://pypet.readthedocs.org/.
@@ -144,137 +185,162 @@
If you have any further questions feel free to contact me at **robert.meyer (at) ni.tu-berlin.de**.
+ Main Features
+ -------------
- ## Main Features
- * **Novel tree container** `Trajectory`, for handling and managing of
+ *
+ **Novel tree container** ``Trajectory``\ , for handling and managing of
parameters and results of numerical simulations
- * **Group** your parameters and results into meaningful categories
+ *
+ **Group** your parameters and results into meaningful categories
- * Access data via **natural naming**, e.g. `traj.parameters.traffic.ncars`
+ *
+ Access data via **natural naming**\ , e.g. ``traj.parameters.traffic.ncars``
- * Automatic **storage** of simulation data into HDF5 files via PyTables
+ *
+ Automatic **storage** of simulation data into HDF5 files via PyTables
- * Support for many different **data formats**
+ *
+ Support for many different **data formats**
- * python native data types: bool, int, long, float, str, complex
- * list, tuple, dict
+ *
+ python native data types: bool, int, long, float, str, complex
- * Numpy arrays and matrices
+ *
+ list, tuple, dict
- * Scipy sparse matrices
+ *
+ Numpy arrays and matrices
- * pandas DataFrames (http://pandas.pydata.org/)
+ *
+ Scipy sparse matrices
- * BRIAN2 quantities and monitors (http://briansimulator.org/)
+ *
+ pandas DataFrames (http://pandas.pydata.org/)
- * Easily **extendable** to other data formats!
+ *
+ BRIAN2 quantities and monitors (http://briansimulator.org/)
- * **Exploration** of the parameter space of your simulations
+ *
+ Easily **extendable** to other data formats!
- * **Merging** of *trajectories* residing in the same space
+ *
+ **Exploration** of the parameter space of your simulations
- * Support for **multiprocessing**, *pypet* can run your simulations in parallel
+ *
+ **Merging** of *trajectories* residing in the same space
- * **Analyse** your data on-the-fly during multiprocessing
+ *
+ Support for **multiprocessing**\ , *pypet* can run your simulations in parallel
- * **Adaptively** explore tha parameter space combining *pypet* with optimization
+ *
+ **Analyse** your data on-the-fly during multiprocessing
+
+ *
+ **Adaptively** explore tha parameter space combining *pypet* with optimization
tools like the evolutionary algorithms framework DEAP (http://deap.readthedocs.org/en/)
- * **Dynamic Loading**, load only the parts of your data you currently need
+ *
+ **Dynamic Loading**\ , load only the parts of your data you currently need
- * **Resume** a crashed or halted simulation
+ *
+ **Resume** a crashed or halted simulation
- * **Annotate** your parameters, results and groups
+ *
+ **Annotate** your parameters, results and groups
- * **Git Integration**, let *pypet* make automatic commits of your codebase
+ *
+ **Git Integration**\ , let *pypet* make automatic commits of your codebase
- * **Sumatra Integration**, let *pypet* add your simulations to the *electronic lab notebook* tool
+ *
+ **Sumatra Integration**\ , let *pypet* add your simulations to the *electronic lab notebook* tool
Sumatra (http://neuralensemble.org/sumatra/)
-
- * *pypet* can be used on **computing clusters** or multiple servers at once if it is combined with
- SCOOP (http://scoop.readthedocs.org/)
+ *
+ *pypet* can be used on **computing clusters** or multiple servers at once if it is combined with
+ SCOOP (http://scoop.readthedocs.org/)
- # Quick Working Example
+ Quick Working Example
+ =====================
The best way to show how stuff works is by giving examples. I will start right away with a
very simple code snippet.
Well, what we have in mind is some sort of numerical simulation. For now we will keep it simple,
- let's say we need to simulate the multiplication of 2 values, i.e. `z=x*y`.
- We have two objectives, a) we want to store results of this simulation `z` and
- b) we want to explore the parameter space and try different values of `x` and `y`.
+ let's say we need to simulate the multiplication of 2 values, i.e. ``z=x*y``.
+ We have two objectives, a) we want to store results of this simulation ``z`` and
+ b) we want to explore the parameter space and try different values of ``x`` and ``y``.
Let's take a look at the snippet at once:
- ```python
- from pypet import Environment, cartesian_product
+ .. code-block:: python
+
+ from pypet import Environment, cartesian_product
- def multiply(traj):
- """Example of a sophisticated simulation that involves multiplying two values.
+ def multiply(traj):
+ """Example of a sophisticated simulation that involves multiplying two values.
- :param traj:
+ :param traj:
- Trajectory containing the parameters in a particular combination,
- it also serves as a container for results.
+ Trajectory containing the parameters in a particular combination,
+ it also serves as a container for results.
- """
- z=traj.x * traj.y
- traj.f_add_result('z',z, comment='I am the product of two values!')
+ """
+ z=traj.x * traj.y
+ traj.f_add_result('z',z, comment='I am the product of two values!')
- # Create an environment that handles running our simulation
- env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
- file_title='Example_01',
- comment = 'I am the first example!')
+ # Create an environment that handles running our simulation
+ env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
+ file_title='Example_01',
+ comment = 'I am the first example!')
- # Get the trajectory from the environment
- traj = env.trajectory
+ # Get the trajectory from the environment
+ traj = env.trajectory
- # Add both parameters
- traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
- traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
+ # Add both parameters
+ traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
+ traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
- # Explore the parameters with a cartesian product
- traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
+ # Explore the parameters with a cartesian product
+ traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
- # Run the simulation with all parameter combinations
- env.run(multiply)
- ```
+ # Run the simulation with all parameter combinations
+ env.run(multiply)
And now let's go through it one by one. At first we have a job to do, that is multiplying two
values:
- ```python
- def multiply(traj):
- """Example of a sophisticated simulation that involves multiplying two values.
+ .. code-block:: python
+
+ def multiply(traj):
+ """Example of a sophisticated simulation that involves multiplying two values.
- :param traj:
+ :param traj:
- Trajectory containing the parameters in a particular combination,
- it also serves as a container for results.
+ Trajectory containing the parameters in a particular combination,
+ it also serves as a container for results.
- """
- z=traj.x * traj.y
- traj.f_add_result('z',z, comment='I am the product of two values!')
- ```
+ """
+ z=traj.x * traj.y
+ traj.f_add_result('z',z, comment='I am the product of two values!')
- This is our simulation function `multiply`. The function uses a so called *trajectory*
+ This is our simulation function ``multiply``. The function uses a so called *trajectory*
container which manages our parameters. We can access the parameters simply by natural naming,
- as seen above via `traj.x` and `traj.y`. The value of `z` is simply added as a result
- to the `traj` object.
+ as seen above via ``traj.x`` and ``traj.y``. The value of ``z`` is simply added as a result
+ to the ``traj`` object.
After the definition of the job that we want to simulate, we create an environment which
will run the simulation.
- ```python
- # Create an environment that handles running our simulation
- env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
- file_title='Example_01',
- comment = 'I am the first example!')
- ```
+ .. code-block:: python
+
+ # Create an environment that handles running our simulation
+ env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
+ file_title='Example_01',
+ comment = 'I am the first example!')
The environment uses some parameters here, that is the name of the new trajectory, a filename to
store the trajectory into, the title of the file, and a comment that is added to the trajectory.
@@ -283,41 +349,41 @@
Check out the documentation (http://pypet.readthedocs.org/) if you want to know more.
The environment will automatically generate a trajectory for us which we can access via:
- ```python
- # Get the trajectory from the environment
- traj = env.trajectory
- ```
+ .. code-block:: python
+
+ # Get the trajectory from the environment
+ traj = env.trajectory
Now we need to populate our trajectory with our parameters. They are added with the default values
- of `x=y=1.0`.
+ of ``x=y=1.0``.
- ```python
- # Add both parameters
- traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
- traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
- ```
-
- Well, calculating `1.0 * 1.0` is quite boring, we want to figure out more products, that is
- the results of the cartesian product set `{1.0,2.0,3.0,4.0} x {6.0,7.0,8.0}`.
- Therefore, we use `f_explore` in combination with the builder function
- `cartesian_product`.
-
- ```python
- # Explore the parameters with a cartesian product
- traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
- ```
+ .. code-block:: python
- Finally, we need to tell the environment to run our job `multiply` with all parameter
+ # Add both parameters
+ traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
+ traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
+
+ Well, calculating ``1.0 * 1.0`` is quite boring, we want to figure out more products, that is
+ the results of the cartesian product set ``{1.0,2.0,3.0,4.0} x {6.0,7.0,8.0}``.
+ Therefore, we use ``f_explore`` in combination with the builder function
+ ``cartesian_product``.
+
+ .. code-block:: python
+
+ # Explore the parameters with a cartesian product
+ traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
+
+ Finally, we need to tell the environment to run our job ``multiply`` with all parameter
combinations.
- ```python
- # Run the simulation with all parameter combinations
- env.run(multiply)
- ```
-
- And that's it. The environment will evoke the function `multiply` now 12 times with
- all parameter combinations. Every time it will pass a `traj` container with another one of these
- 12 combinations of different `x` and `y` values to calculate the value of `z`.
+ .. code-block:: python
+
+ # Run the simulation with all parameter combinations
+ env.run(multiply)
+
+ And that's it. The environment will evoke the function ``multiply`` now 12 times with
+ all parameter combinations. Every time it will pass a ``traj`` container with another one of these
+ 12 combinations of different ``x`` and ``y`` values to calculate the value of ``z``.
Moreover, the environment and the storage service will have taken care about the storage
of our trajectory - including the results we have computed - into an HDF5 file.
@@ -326,82 +392,91 @@
Cheers,
Robert
+ Miscellaneous
+ =============
- # Miscellaneous
+ Acknowledgements
+ ----------------
- ## Acknowledgements
- * Thanks to Robert Pröpper and Philipp Meier for answering all my Python questions
+ *
+ Thanks to Robert Pröpper and Philipp Meier for answering all my Python questions
- You might want to check out their SpykeViewer (https://github.com/rproepp/spykeviewer)
- tool for visualization of MEA recordings and NEO (http://pythonhosted.org/neo) data
+ You might want to check out their SpykeViewer (https://github.com/rproepp/spykeviewer)
+ tool for visualization of MEA recordings and NEO (http://pythonhosted.org/neo) data
- * Thanks to Owen Mackwood for his SNEP toolbox which provided the initial ideas
- for this project
-
- * Thanks to Mehmet Nevvaf Timur for his work on the SCOOP integration and the ``'NETQUEUE'`` feature
+ *
+ Thanks to Owen Mackwood for his SNEP toolbox which provided the initial ideas
+ for this project
- * Thanks to Henri Bunting for his work on the BRIAN2 subpackage
+ *
+ Thanks to Mehmet Nevvaf Timur for his work on the SCOOP integration and the ``'NETQUEUE'`` feature
- * Thanks to the BCCN Berlin (http://www.bccn-berlin.de),
- the Research Training Group GRK 1589/1, and the
- Neural Information Processing Group ( http://www.ni.tu-berlin.de) for support
+ *
+ Thanks to Henri Bunting for his work on the BRIAN2 subpackage
+ *
+ Thanks to the BCCN Berlin (http://www.bccn-berlin.de),
+ the Research Training Group GRK 1589/1, and the
+ Neural Information Processing Group ( http://www.ni.tu-berlin.de) for support
- ## Tests
+ Tests
+ -----
- Tests can be found in `pypet/tests`.
+ Tests can be found in ``pypet/tests``.
Note that they involve heavy file I/O and you need privileges
to write files to a temporary folder.
- The tests suite will make use of the `tempfile.gettempdir()` function to
+ The tests suite will make use of the ``tempfile.gettempdir()`` function to
create such a temporary folder.
- Each test module can be run individually, for instance `$ python trajectory_test.py`.
+ Each test module can be run individually, for instance ``$ python trajectory_test.py``.
- You can run **all** tests with `$ python all_tests.py` which can also be found under
- `pypet/tests`.
- You can pass additional arguments as `$ python all_tests.py -k --folder=myfolder/`
- with `-k` to keep the HDF5 and log files created by the tests
+ You can run **all** tests with ``$ python all_tests.py`` which can also be found under
+ ``pypet/tests``.
+ You can pass additional arguments as ``$ python all_tests.py -k --folder=myfolder/``
+ with ``-k`` to keep the HDF5 and log files created by the tests
(if you want to inspect them, otherwise they will be deleted after the completed tests),
- and `--folder=` to specify a folder where to store the HDF5 files instead of the temporary one.
- If the folder cannot be created, the program defaults to `tempfile.gettempdir()`.
+ and ``--folder=`` to specify a folder where to store the HDF5 files instead of the temporary one.
+ If the folder cannot be created, the program defaults to ``tempfile.gettempdir()``.
Running all tests can take up to 20 minutes. The test suite encompasses more than **1000** tests
- and has a code coverage of about **90%**!
+ and has a code coverage of about **90%**\ !
- Moreover, *pypet* is constantly tested with Python 3.5 and 3.6 for **Linux** using
+ Moreover, *pypet* is constantly tested with Python 3.7 and 3.8 for **Linux** using
Travis-CI. Testing for **Windows** platforms is performed via Appveyor.
The source code is available at https://github.com/SmokinCaterpillar/pypet/.
-
- ## License
+ License
+ -------
BSD, please read LICENSE file.
-
- ## Legal Notice
+ Legal Notice
+ ------------
*pypet* was created by Robert Meyer at the Neural Information Processing Group (TU Berlin),
supported by the Research Training Group GRK 1589/1.
+ Contact
+ -------
- ## Contact
-
- **robert.meyer (at) ni.tu-berlin.de**
+ **robert.meyer (at) alcemy.tech**
- Marchstr. 23
+ alcemy GmbH
- MAR 5.046
+ Choriner Str. 83
- D-10587 Berlin
+ 10119 Berlin, Germany
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Utilities
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/README.md new/pypet-0.5.1/README.md
--- old/pypet-0.4.3/README.md 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/README.md 2020-06-02 09:48:52.000000000 +0200
@@ -19,17 +19,17 @@
## Requirements
-Python 3.5 or 3.6 and
+Python 3.6, 3.7 or 3.8 and
-* tables >= 3.1.1
+* tables >= 3.5.0
-* pandas >= 0.20.0
+* pandas >= 1.0.0
-* numpy >= 1.12.0
+* numpy >= 1.16.0
-* scipy >= 0.17.0
+* scipy >= 1.3.0
-* HDF5 >= 1.8.9
+* HDF5 >= 1.10.0
There are also some optional packages that you can but do not have to install.
@@ -40,15 +40,15 @@
For git integration you additionally need
-* GitPython >= 0.3.1
+* GitPython >= 3.1.3
To utilize the cap feature for multiprocessing you need
-* psutil >= 2.0.0
+* psutil >= 5.7.0
To utilize the continuing of crashed trajectories you need
-* dill >= 0.2.1
+* dill >= 0.3.1
Automatic Sumatra records are supported for
@@ -361,7 +361,7 @@
Running all tests can take up to 20 minutes. The test suite encompasses more than **1000** tests
and has a code coverage of about **90%**!
-Moreover, *pypet* is constantly tested with Python 3.5 and 3.6 for **Linux** using
+Moreover, *pypet* is constantly tested with Python 3.7 and 3.8 for **Linux** using
Travis-CI. Testing for **Windows** platforms is performed via Appveyor.
The source code is available at https://github.com/SmokinCaterpillar/pypet/.
@@ -379,10 +379,10 @@
## Contact
-**robert.meyer (at) ni.tu-berlin.de**
+**robert.meyer (at) alcemy.tech**
-Marchstr. 23
+alcemy GmbH
-MAR 5.046
+Choriner Str. 83
-D-10587 Berlin
+10119 Berlin, Germany
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet/_version.py new/pypet-0.5.1/pypet/_version.py
--- old/pypet-0.4.3/pypet/_version.py 2018-06-24 19:49:53.000000000 +0200
+++ new/pypet-0.5.1/pypet/_version.py 2020-06-02 09:53:26.000000000 +0200
@@ -1 +1 @@
-__version__ = '0.4.3'
+__version__ = '0.5.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet/brian2/parameter.py new/pypet-0.5.1/pypet/brian2/parameter.py
--- old/pypet-0.4.3/pypet/brian2/parameter.py 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/pypet/brian2/parameter.py 2020-06-01 22:42:02.000000000 +0200
@@ -44,7 +44,7 @@
return unit_from_expression(expr)
elif expr.__class__ is ast.Name:
return ALLUNITS[expr.id]
- elif expr.__class__ is ast.Num:
+ elif expr.__class__ is ast.Num or expr.__class__ is ast.Constant:
return expr.n
elif expr.__class__ is ast.UnaryOp:
op = expr.op.__class__.__name__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet/storageservice.py new/pypet-0.5.1/pypet/storageservice.py
--- old/pypet-0.4.3/pypet/storageservice.py 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/pypet/storageservice.py 2020-06-01 22:42:02.000000000 +0200
@@ -4182,8 +4182,8 @@
"""
try:
if 'filters' not in kwargs:
- filters = self._all_get_filters(kwargs)
- kwargs['filters'] = filters
+ self._logger.debug(
+ 'filters are no longer supported by pandas')
if 'format' not in kwargs:
kwargs['format'] = self.pandas_format
if 'encoding' not in kwargs:
@@ -4198,8 +4198,9 @@
else:
self._logger.debug('Appending to pandas data `%s` in `%s`' % (key, fullname))
- if data is not None and (kwargs['format'] == 'f' or kwargs['format'] == 'fixed'):
- kwargs['expectedrows'] = data.shape[0]
+ if 'expectedrows' in kwargs:
+ self._logger.debug('expectedrows no longer supported by pandas, will '
+ 'ignore the option')
name = group._v_pathname + '/' + key
self._hdf5store.put(name, data, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet/utils/comparisons.py new/pypet-0.5.1/pypet/utils/comparisons.py
--- old/pypet-0.4.3/pypet/utils/comparisons.py 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/pypet/utils/comparisons.py 2020-06-01 22:42:02.000000000 +0200
@@ -184,7 +184,7 @@
new_frame = a == b
new_frame = new_frame | (pd.isnull(a) & pd.isnull(b))
if isinstance(new_frame, pd.DataFrame):
- return np.all(new_frame.as_matrix())
+ return np.all(new_frame.values)
except (ValueError, TypeError):
# The Value Error can happen if the data frame is of dtype=object and contains
# numpy arrays. Numpy array comparisons do not evaluate to a single truth value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet/utils/helpful_classes.py new/pypet-0.5.1/pypet/utils/helpful_classes.py
--- old/pypet-0.4.3/pypet/utils/helpful_classes.py 2018-06-24 12:01:13.000000000 +0200
+++ new/pypet-0.5.1/pypet/utils/helpful_classes.py 2020-06-01 22:42:02.000000000 +0200
@@ -62,7 +62,12 @@
def __iter__(self):
while True:
- yield self.next()
+ try:
+ yield self.next()
+ except StopIteration:
+ # new behavior since PEP479
+ # one should return to stop iteration
+ return
class ChainMap(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/pypet.egg-info/PKG-INFO new/pypet-0.5.1/pypet.egg-info/PKG-INFO
--- old/pypet-0.4.3/pypet.egg-info/PKG-INFO 2018-06-24 20:51:52.000000000 +0200
+++ new/pypet-0.5.1/pypet.egg-info/PKG-INFO 2020-06-02 12:57:56.000000000 +0200
@@ -1,19 +1,45 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: pypet
-Version: 0.4.3
+Version: 0.5.1
Summary: A toolkit for numerical simulations to allow easy parameter exploration and storage of results.
Home-page: https://github.com/SmokinCaterpillar/pypet
Author: Robert Meyer
-Author-email: robert.meyer@ni.tu-berlin.de
+Author-email: robert.meyer@alcemy.tech
License: BSD
-Description: # pypet
+Description:
+ pypet
+ =====
+
+
+ .. image:: https://travis-ci.org/SmokinCaterpillar/pypet.svg?branch=master
+ :target: https://travis-ci.org/SmokinCaterpillar/pypet
+ :alt: Travis Build Status
+
+
+ .. image:: https://ci.appveyor.com/api/projects/status/9amhj3iyf105xa2y/branch/master?s...
+ :target: https://ci.appveyor.com/project/SmokinCaterpillar/pypet/branch/master
+ :alt: Appveyor Build status
+
+
+ .. image:: https://coveralls.io/repos/github/SmokinCaterpillar/pypet/badge.svg?branch=m...
+ :target: https://coveralls.io/github/SmokinCaterpillar/pypet?branch=master
+ :alt: Coverage Status
+
+
+ .. image:: https://api.codacy.com/project/badge/grade/86268960751442799fcf6192b36e386f
+ :target: https://www.codacy.com/app/robert-meyer/pypet
+ :alt: Codacy Badge
+
+
+ .. image:: https://badge.fury.io/py/pypet.svg
+ :target: https://badge.fury.io/py/pypet
+ :alt: PyPI version
+
+
+ .. image:: https://readthedocs.org/projects/pypet/badge/?version=latest
+ :target: http://pypet.readthedocs.io/en/latest/?badge=latest
+ :alt: Documentation Status
- [![Travis Build Status](https://travis-ci.org/SmokinCaterpillar/pypet.svg?branch=master)](https://travis-ci.org/SmokinCaterpillar/pypet)
- [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/9amhj3iyf105xa2y/branch/master?svg=true)](https://ci.appveyor.com/project/SmokinCaterpillar/pypet/branch/master)
- [![Coverage Status](https://coveralls.io/repos/github/SmokinCaterpillar/pypet/badge.svg?branch=master)](https://coveralls.io/github/SmokinCaterpillar/pypet?branch=master)
- [![Codacy Badge](https://api.codacy.com/project/badge/grade/86268960751442799fcf6192b36e386f)](https://www.codacy.com/app/robert-meyer/pypet)
- [![PyPI version](https://badge.fury.io/py/pypet.svg)](https://badge.fury.io/py/pypet)
- [![Documentation Status](https://readthedocs.org/projects/pypet/badge/?version=latest)](http://pypet.readthedocs.io/en/latest/?badge=latest)
The new python parameter exploration toolkit:
*pypet* manages exploration of the parameter space
@@ -24,58 +50,68 @@
from a single source. Data I/O of your simulations and
analyses becomes a piece of cake!
+ Requirements
+ ------------
- ## Requirements
-
- Python 3.5 or 3.6 and
+ Python 3.6, 3.7 or 3.8 and
- * tables >= 3.1.1
- * pandas >= 0.20.0
+ *
+ tables >= 3.5.0
- * numpy >= 1.12.0
+ *
+ pandas >= 1.0.0
- * scipy >= 0.17.0
+ *
+ numpy >= 1.16.0
- * HDF5 >= 1.8.9
+ *
+ scipy >= 1.3.0
+ *
+ HDF5 >= 1.10.0
There are also some optional packages that you can but do not have to install.
If you want to combine *pypet* with SCOOP you need
+
* scoop >= 0.7.1
For git integration you additionally need
- * GitPython >= 0.3.1
+
+ * GitPython >= 3.1.3
To utilize the cap feature for multiprocessing you need
- * psutil >= 2.0.0
+
+ * psutil >= 5.7.0
To utilize the continuing of crashed trajectories you need
- * dill >= 0.2.1
+
+ * dill >= 0.3.1
Automatic Sumatra records are supported for
- * Sumatra >= 0.7.1
+ * Sumatra >= 0.7.1
- ## Python 2.7
+ Python 2.7
+ ----------
This release no longer supports Python 2.7.
If you are still using Python 2.7, you need to
use the pypet legacy version 0.3.0 (https://pypi.python.org/pypi/pypet/0.3.0).
-
- # What is pypet all about?
+ What is pypet all about?
+ ========================
Whenever you do numerical simulations in science, you come across two major challenges.
First, you need some way to save your data. Secondly, you extensively explore the parameter space.
In order to accomplish both you write some hacky I/O functionality to get it done the quick and
- dirty way. This means storing stuff into text files, as *MATLAB* *m*-files,
+ dirty way. This means storing stuff into text files, as *MATLAB* *m*\ -files,
or whatever comes in handy.
After a while and many simulations later, you want to look back at some of your very
@@ -90,33 +126,38 @@
that was not specific to my current simulations, but I could also use for future scientific
projects right out of the box.
- The python parameter exploration toolkit (*pypet*) provides a framework to define *parameters*
+ The python parameter exploration toolkit (\ *pypet*\ ) provides a framework to define *parameters*
that you need to run your simulations. You can actively explore these by following a
*trajectory* through the space spanned by the parameters.
And finally, you can get your *results* together and store everything appropriately to disk.
The storage format of choice is HDF5 (http://www.hdfgroup.org/HDF5/) via PyTables
(http://www.pytables.org/).
-
- ## Package Organization
+ Package Organization
+ --------------------
This project encompasses these core modules:
- * The `pypet.environment` module for handling the running of simulations
- * The `pypet.trajectory` module for managing the parameters and results,
- and providing a way to *explore* your parameter space. Somewhat related is also the
- `pypet.naturalnaming` module, that provides functionality to access and put data into
- the *trajectory*.
+ *
+ The ``pypet.environment`` module for handling the running of simulations
- * The `pypet.parameters` module including containers for parameters and results
+ *
+ The ``pypet.trajectory`` module for managing the parameters and results,
+ and providing a way to *explore* your parameter space. Somewhat related is also the
+ ``pypet.naturalnaming`` module, that provides functionality to access and put data into
+ the *trajectory*.
- * The `pypet.storageservice` for saving your data to disk
+ *
+ The ``pypet.parameters`` module including containers for parameters and results
+ *
+ The ``pypet.storageservice`` for saving your data to disk
- ## Install
+ Install
+ -------
- If you don't have all prerequisites (*numpy*, *scipy*, *tables*, *pandas*) install them first.
+ If you don't have all prerequisites (\ *numpy*\ , *scipy*\ , *tables*\ , *pandas*\ ) install them first.
These are standard python packages, so chances are high that they are already installed.
By the way, in case you use the python package manager ``pip``
you can list all installed packages with ``pip freeze``.
@@ -130,13 +171,13 @@
**Or**
- In case you use **Windows**, you have to download the tar file from https://pypi.python.org/pypi/pypet
+ In case you use **Windows**\ , you have to download the tar file from https://pypi.python.org/pypi/pypet
and unzip it. Next, open a windows terminal
- and navigate to your unpacked *pypet* files to the folder containing the `setup.py` file.
+ and navigate to your unpacked *pypet* files to the folder containing the ``setup.py`` file.
As above run from the terminal ``python setup.py install``.
-
- ## Documentation and Support
+ Documentation and Support
+ -------------------------
Documentation can be found on http://pypet.readthedocs.org/.
@@ -144,137 +185,162 @@
If you have any further questions feel free to contact me at **robert.meyer (at) ni.tu-berlin.de**.
+ Main Features
+ -------------
- ## Main Features
- * **Novel tree container** `Trajectory`, for handling and managing of
+ *
+ **Novel tree container** ``Trajectory``\ , for handling and managing of
parameters and results of numerical simulations
- * **Group** your parameters and results into meaningful categories
+ *
+ **Group** your parameters and results into meaningful categories
- * Access data via **natural naming**, e.g. `traj.parameters.traffic.ncars`
+ *
+ Access data via **natural naming**\ , e.g. ``traj.parameters.traffic.ncars``
- * Automatic **storage** of simulation data into HDF5 files via PyTables
+ *
+ Automatic **storage** of simulation data into HDF5 files via PyTables
- * Support for many different **data formats**
+ *
+ Support for many different **data formats**
- * python native data types: bool, int, long, float, str, complex
- * list, tuple, dict
+ *
+ python native data types: bool, int, long, float, str, complex
- * Numpy arrays and matrices
+ *
+ list, tuple, dict
- * Scipy sparse matrices
+ *
+ Numpy arrays and matrices
- * pandas DataFrames (http://pandas.pydata.org/)
+ *
+ Scipy sparse matrices
- * BRIAN2 quantities and monitors (http://briansimulator.org/)
+ *
+ pandas DataFrames (http://pandas.pydata.org/)
- * Easily **extendable** to other data formats!
+ *
+ BRIAN2 quantities and monitors (http://briansimulator.org/)
- * **Exploration** of the parameter space of your simulations
+ *
+ Easily **extendable** to other data formats!
- * **Merging** of *trajectories* residing in the same space
+ *
+ **Exploration** of the parameter space of your simulations
- * Support for **multiprocessing**, *pypet* can run your simulations in parallel
+ *
+ **Merging** of *trajectories* residing in the same space
- * **Analyse** your data on-the-fly during multiprocessing
+ *
+ Support for **multiprocessing**\ , *pypet* can run your simulations in parallel
- * **Adaptively** explore tha parameter space combining *pypet* with optimization
+ *
+ **Analyse** your data on-the-fly during multiprocessing
+
+ *
+ **Adaptively** explore tha parameter space combining *pypet* with optimization
tools like the evolutionary algorithms framework DEAP (http://deap.readthedocs.org/en/)
- * **Dynamic Loading**, load only the parts of your data you currently need
+ *
+ **Dynamic Loading**\ , load only the parts of your data you currently need
- * **Resume** a crashed or halted simulation
+ *
+ **Resume** a crashed or halted simulation
- * **Annotate** your parameters, results and groups
+ *
+ **Annotate** your parameters, results and groups
- * **Git Integration**, let *pypet* make automatic commits of your codebase
+ *
+ **Git Integration**\ , let *pypet* make automatic commits of your codebase
- * **Sumatra Integration**, let *pypet* add your simulations to the *electronic lab notebook* tool
+ *
+ **Sumatra Integration**\ , let *pypet* add your simulations to the *electronic lab notebook* tool
Sumatra (http://neuralensemble.org/sumatra/)
-
- * *pypet* can be used on **computing clusters** or multiple servers at once if it is combined with
- SCOOP (http://scoop.readthedocs.org/)
+ *
+ *pypet* can be used on **computing clusters** or multiple servers at once if it is combined with
+ SCOOP (http://scoop.readthedocs.org/)
- # Quick Working Example
+ Quick Working Example
+ =====================
The best way to show how stuff works is by giving examples. I will start right away with a
very simple code snippet.
Well, what we have in mind is some sort of numerical simulation. For now we will keep it simple,
- let's say we need to simulate the multiplication of 2 values, i.e. `z=x*y`.
- We have two objectives, a) we want to store results of this simulation `z` and
- b) we want to explore the parameter space and try different values of `x` and `y`.
+ let's say we need to simulate the multiplication of 2 values, i.e. ``z=x*y``.
+ We have two objectives, a) we want to store results of this simulation ``z`` and
+ b) we want to explore the parameter space and try different values of ``x`` and ``y``.
Let's take a look at the snippet at once:
- ```python
- from pypet import Environment, cartesian_product
+ .. code-block:: python
+
+ from pypet import Environment, cartesian_product
- def multiply(traj):
- """Example of a sophisticated simulation that involves multiplying two values.
+ def multiply(traj):
+ """Example of a sophisticated simulation that involves multiplying two values.
- :param traj:
+ :param traj:
- Trajectory containing the parameters in a particular combination,
- it also serves as a container for results.
+ Trajectory containing the parameters in a particular combination,
+ it also serves as a container for results.
- """
- z=traj.x * traj.y
- traj.f_add_result('z',z, comment='I am the product of two values!')
+ """
+ z=traj.x * traj.y
+ traj.f_add_result('z',z, comment='I am the product of two values!')
- # Create an environment that handles running our simulation
- env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
- file_title='Example_01',
- comment = 'I am the first example!')
+ # Create an environment that handles running our simulation
+ env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
+ file_title='Example_01',
+ comment = 'I am the first example!')
- # Get the trajectory from the environment
- traj = env.trajectory
+ # Get the trajectory from the environment
+ traj = env.trajectory
- # Add both parameters
- traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
- traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
+ # Add both parameters
+ traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
+ traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
- # Explore the parameters with a cartesian product
- traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
+ # Explore the parameters with a cartesian product
+ traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
- # Run the simulation with all parameter combinations
- env.run(multiply)
- ```
+ # Run the simulation with all parameter combinations
+ env.run(multiply)
And now let's go through it one by one. At first we have a job to do, that is multiplying two
values:
- ```python
- def multiply(traj):
- """Example of a sophisticated simulation that involves multiplying two values.
+ .. code-block:: python
+
+ def multiply(traj):
+ """Example of a sophisticated simulation that involves multiplying two values.
- :param traj:
+ :param traj:
- Trajectory containing the parameters in a particular combination,
- it also serves as a container for results.
+ Trajectory containing the parameters in a particular combination,
+ it also serves as a container for results.
- """
- z=traj.x * traj.y
- traj.f_add_result('z',z, comment='I am the product of two values!')
- ```
+ """
+ z=traj.x * traj.y
+ traj.f_add_result('z',z, comment='I am the product of two values!')
- This is our simulation function `multiply`. The function uses a so called *trajectory*
+ This is our simulation function ``multiply``. The function uses a so called *trajectory*
container which manages our parameters. We can access the parameters simply by natural naming,
- as seen above via `traj.x` and `traj.y`. The value of `z` is simply added as a result
- to the `traj` object.
+ as seen above via ``traj.x`` and ``traj.y``. The value of ``z`` is simply added as a result
+ to the ``traj`` object.
After the definition of the job that we want to simulate, we create an environment which
will run the simulation.
- ```python
- # Create an environment that handles running our simulation
- env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
- file_title='Example_01',
- comment = 'I am the first example!')
- ```
+ .. code-block:: python
+
+ # Create an environment that handles running our simulation
+ env = Environment(trajectory='Multiplication',filename='./HDF/example_01.hdf5',
+ file_title='Example_01',
+ comment = 'I am the first example!')
The environment uses some parameters here, that is the name of the new trajectory, a filename to
store the trajectory into, the title of the file, and a comment that is added to the trajectory.
@@ -283,41 +349,41 @@
Check out the documentation (http://pypet.readthedocs.org/) if you want to know more.
The environment will automatically generate a trajectory for us which we can access via:
- ```python
- # Get the trajectory from the environment
- traj = env.trajectory
- ```
+ .. code-block:: python
+
+ # Get the trajectory from the environment
+ traj = env.trajectory
Now we need to populate our trajectory with our parameters. They are added with the default values
- of `x=y=1.0`.
+ of ``x=y=1.0``.
- ```python
- # Add both parameters
- traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
- traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
- ```
-
- Well, calculating `1.0 * 1.0` is quite boring, we want to figure out more products, that is
- the results of the cartesian product set `{1.0,2.0,3.0,4.0} x {6.0,7.0,8.0}`.
- Therefore, we use `f_explore` in combination with the builder function
- `cartesian_product`.
-
- ```python
- # Explore the parameters with a cartesian product
- traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
- ```
+ .. code-block:: python
- Finally, we need to tell the environment to run our job `multiply` with all parameter
+ # Add both parameters
+ traj.f_add_parameter('x', 1.0, comment='Im the first dimension!')
+ traj.f_add_parameter('y', 1.0, comment='Im the second dimension!')
+
+ Well, calculating ``1.0 * 1.0`` is quite boring, we want to figure out more products, that is
+ the results of the cartesian product set ``{1.0,2.0,3.0,4.0} x {6.0,7.0,8.0}``.
+ Therefore, we use ``f_explore`` in combination with the builder function
+ ``cartesian_product``.
+
+ .. code-block:: python
+
+ # Explore the parameters with a cartesian product
+ traj.f_explore(cartesian_product({'x':[1.0,2.0,3.0,4.0], 'y':[6.0,7.0,8.0]}))
+
+ Finally, we need to tell the environment to run our job ``multiply`` with all parameter
combinations.
- ```python
- # Run the simulation with all parameter combinations
- env.run(multiply)
- ```
-
- And that's it. The environment will evoke the function `multiply` now 12 times with
- all parameter combinations. Every time it will pass a `traj` container with another one of these
- 12 combinations of different `x` and `y` values to calculate the value of `z`.
+ .. code-block:: python
+
+ # Run the simulation with all parameter combinations
+ env.run(multiply)
+
+ And that's it. The environment will evoke the function ``multiply`` now 12 times with
+ all parameter combinations. Every time it will pass a ``traj`` container with another one of these
+ 12 combinations of different ``x`` and ``y`` values to calculate the value of ``z``.
Moreover, the environment and the storage service will have taken care about the storage
of our trajectory - including the results we have computed - into an HDF5 file.
@@ -326,82 +392,91 @@
Cheers,
Robert
+ Miscellaneous
+ =============
- # Miscellaneous
+ Acknowledgements
+ ----------------
- ## Acknowledgements
- * Thanks to Robert Pröpper and Philipp Meier for answering all my Python questions
+ *
+ Thanks to Robert Pröpper and Philipp Meier for answering all my Python questions
- You might want to check out their SpykeViewer (https://github.com/rproepp/spykeviewer)
- tool for visualization of MEA recordings and NEO (http://pythonhosted.org/neo) data
+ You might want to check out their SpykeViewer (https://github.com/rproepp/spykeviewer)
+ tool for visualization of MEA recordings and NEO (http://pythonhosted.org/neo) data
- * Thanks to Owen Mackwood for his SNEP toolbox which provided the initial ideas
- for this project
-
- * Thanks to Mehmet Nevvaf Timur for his work on the SCOOP integration and the ``'NETQUEUE'`` feature
+ *
+ Thanks to Owen Mackwood for his SNEP toolbox which provided the initial ideas
+ for this project
- * Thanks to Henri Bunting for his work on the BRIAN2 subpackage
+ *
+ Thanks to Mehmet Nevvaf Timur for his work on the SCOOP integration and the ``'NETQUEUE'`` feature
- * Thanks to the BCCN Berlin (http://www.bccn-berlin.de),
- the Research Training Group GRK 1589/1, and the
- Neural Information Processing Group ( http://www.ni.tu-berlin.de) for support
+ *
+ Thanks to Henri Bunting for his work on the BRIAN2 subpackage
+ *
+ Thanks to the BCCN Berlin (http://www.bccn-berlin.de),
+ the Research Training Group GRK 1589/1, and the
+ Neural Information Processing Group ( http://www.ni.tu-berlin.de) for support
- ## Tests
+ Tests
+ -----
- Tests can be found in `pypet/tests`.
+ Tests can be found in ``pypet/tests``.
Note that they involve heavy file I/O and you need privileges
to write files to a temporary folder.
- The tests suite will make use of the `tempfile.gettempdir()` function to
+ The tests suite will make use of the ``tempfile.gettempdir()`` function to
create such a temporary folder.
- Each test module can be run individually, for instance `$ python trajectory_test.py`.
+ Each test module can be run individually, for instance ``$ python trajectory_test.py``.
- You can run **all** tests with `$ python all_tests.py` which can also be found under
- `pypet/tests`.
- You can pass additional arguments as `$ python all_tests.py -k --folder=myfolder/`
- with `-k` to keep the HDF5 and log files created by the tests
+ You can run **all** tests with ``$ python all_tests.py`` which can also be found under
+ ``pypet/tests``.
+ You can pass additional arguments as ``$ python all_tests.py -k --folder=myfolder/``
+ with ``-k`` to keep the HDF5 and log files created by the tests
(if you want to inspect them, otherwise they will be deleted after the completed tests),
- and `--folder=` to specify a folder where to store the HDF5 files instead of the temporary one.
- If the folder cannot be created, the program defaults to `tempfile.gettempdir()`.
+ and ``--folder=`` to specify a folder where to store the HDF5 files instead of the temporary one.
+ If the folder cannot be created, the program defaults to ``tempfile.gettempdir()``.
Running all tests can take up to 20 minutes. The test suite encompasses more than **1000** tests
- and has a code coverage of about **90%**!
+ and has a code coverage of about **90%**\ !
- Moreover, *pypet* is constantly tested with Python 3.5 and 3.6 for **Linux** using
+ Moreover, *pypet* is constantly tested with Python 3.7 and 3.8 for **Linux** using
Travis-CI. Testing for **Windows** platforms is performed via Appveyor.
The source code is available at https://github.com/SmokinCaterpillar/pypet/.
-
- ## License
+ License
+ -------
BSD, please read LICENSE file.
-
- ## Legal Notice
+ Legal Notice
+ ------------
*pypet* was created by Robert Meyer at the Neural Information Processing Group (TU Berlin),
supported by the Research Training Group GRK 1589/1.
+ Contact
+ -------
- ## Contact
-
- **robert.meyer (at) ni.tu-berlin.de**
+ **robert.meyer (at) alcemy.tech**
- Marchstr. 23
+ alcemy GmbH
- MAR 5.046
+ Choriner Str. 83
- D-10587 Berlin
+ 10119 Berlin, Germany
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Utilities
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pypet-0.4.3/setup.py new/pypet-0.5.1/setup.py
--- old/pypet-0.4.3/setup.py 2018-06-24 19:39:52.000000000 +0200
+++ new/pypet-0.5.1/setup.py 2020-06-02 11:52:57.000000000 +0200
@@ -1,18 +1,22 @@
__author__ = 'Robert Meyer'
import re
-import sys
-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
+try:
+ # Used to convert md to rst for pypi, otherwise not needed
+ import m2r
+except ImportError:
+ m2r = None
install_requires=[
- 'tables',
- 'pandas',
- 'numpy',
- 'scipy']
+ 'tables',
+ 'pandas',
+ 'numpy',
+ 'scipy'
+]
# For versioning, Version found in pypet._version.py
verstrline = open('pypet/_version.py', "rt").read()
@@ -24,6 +28,14 @@
else:
raise RuntimeError('Unable to find version in pypet/_version.py')
+description = ('A toolkit for numerical simulations to allow '
+ 'easy parameter exploration and storage of results.')
+if m2r is None:
+ long_description = description
+else:
+ # convert markdown to rst
+ long_description = m2r.convert(open('README.md').read())
+
setup(
name='pypet',
version=verstr,
@@ -41,19 +53,21 @@
package_data={'pypet.tests': ['testdata/*.hdf5'], 'pypet': ['logging/*.ini']},
license='BSD',
author='Robert Meyer',
- author_email='robert.meyer@ni.tu-berlin.de',
- description='A toolkit for numerical simulations to allow easy parameter exploration and storage of results.',
- long_description=open('README.md').read(),
+ author_email='robert.meyer@alcemy.tech',
+ description=description,
+ long_description=long_description,
url='https://github.com/SmokinCaterpillar/pypet',
install_requires=install_requires,
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: BSD License',
- 'Topic :: Utilities']
+ 'Topic :: Utilities'],
+ python_requires='>=3.6',
)
\ No newline at end of file