Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neo.units module (Issue278) #297

Closed
wants to merge 12 commits into from

Conversation

joffreygonin
Copy link
Contributor

Create neo.units module #278

(Units need a change to units: not final commit)
And remove Quantities import in the code (except for units module)
(by using units module)
@apdavison
Copy link
Member

@jgonin Please can you resolve the conflicts by rebasing your changes onto the latest master (see https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request for how to do this, replacing "edx/edx-platform" with "NeuralEnsemble/python-neo")

joffreygonin and others added 8 commits March 22, 2017 16:41
(Units need a change to units: not final commit)

Partly removed

And remove Quantities import in the code (except for units module)

Small precision :
(by using units module)
# Conflicts:
#	neo/io/nixio.py
#	neo/test/iotest/test_nixio.py
# Conflicts:
#	neo/test/coretest/test_epoch.py
@coveralls
Copy link

coveralls commented Mar 30, 2017

Coverage Status

Coverage decreased (-0.8%) to 51.436% when pulling c99c929 on jgonin:issue278 into 04e1962 on NeuralEnsemble:master.

@apdavison apdavison changed the title Issue278 neo.units module (Issue278) Mar 31, 2017
Copy link
Member

@apdavison apdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main point: do not import the Quantity class from neo.units, that should be imported as pq.Quantity, as before.

Also note that there are some new h5 files in the tests folder, and some additional temporary Python files created by Git that should not be there.

@@ -0,0 +1,206 @@
# -*- coding: utf-8 -*-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This files should not be here - there are other similar files generated (I think) by Git merging or rebase operations, which have been added to the commit and need to be removed.

@@ -66,7 +66,7 @@ cut across the simple container hierarchy.
NumPy compatibility
===================

Neo data objects inherit from :py:class:`Quantity`, which in turn inherits from NumPy
Neo data objects inherit from :py:class:`Quantity` (by using units module), which in turn inherits from NumPy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert - we should not import Quantity via the units module

@@ -173,7 +174,7 @@ def generate_diagram(filename, rect_pos, rect_width, figsize):
else:
t1 = attrname

if attrtype == pq.Quantity:
if attrtype == un.Quantity:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the units module only for importing units, not for the quantities.Quantity class. This should still be pq.Quantity

@@ -64,7 +65,7 @@ def _new_AnalogSignalArray(cls, signal, units=None, dtype=None, copy=True,
**annotations)


class AnalogSignal(BaseNeo, pq.Quantity):
class AnalogSignal(BaseNeo, un.Quantity):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should stay as pq.Quantity

@samuelgarcia samuelgarcia added this to the 0.5.2 milestone Aug 23, 2017
@apdavison apdavison modified the milestones: 0.5.2, future Sep 26, 2017
@samuelgarcia
Copy link
Contributor

@joffreygonin: rawio is now the master.
As discussed when I was in Gif, I propose to close this PR because it is not compatible with the new master. So you an start working on this in a new branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants