Skip to content

python package - #10

Closed
micuat wants to merge 9 commits into
sccn:masterfrom
micuat:pip
Closed

micuat wants to merge 9 commits into
sccn:masterfrom
micuat:pip

Conversation

@micuat

@micuat micuat commented Jun 14, 2017

Copy link
Copy Markdown

Hi, I found xdf for python is extremely useful and I think it should be packaged so that you don't need to copy xdf.py to all the project directories.

TODO:

  • I made a stub setup.py so feel free to edit it if you merge (currently I added @cboulay as the author)
  • license should be specified in setup.py
  • Current folder structure is
xdf/
  Matlab/
  pyxdf/
    pyxdf/
      __init__.py

but maybe pip cannot find it if it's registered on PyPI? Should it be

xdf/
  Matlab/
  xdf/
    __init__.py

instead? Or should a separate repository be created?

Thanks,
Naoto

@dmedine

dmedine commented Jun 20, 2017 via email

Copy link
Copy Markdown
Contributor

@cboulay

cboulay commented Jun 20, 2017

Copy link
Copy Markdown
Collaborator

Sorry I haven't taken a look at this yet. I will try to get to it soon.

@micuat

micuat commented Jun 21, 2017

Copy link
Copy Markdown
Author

another possibility may be to integrate this in pylsl. what do you think @chkothe ?

@cbrnr

cbrnr commented Jun 23, 2017

Copy link
Copy Markdown
Contributor

I'd prefer keeping this in a separate pyxdf package. I can help creating a package for PyPI, but before we do that we should all agree that the package is functional. If you want to call the package pyxdf then the first folder structure would be correct. For PyPI, we don't need all the other stuff, so this should suffice:

pyxdf/
    __init__.py
    xdf.py

@micuat

micuat commented Jun 23, 2017

Copy link
Copy Markdown
Author

@cbrnr thanks about that. So far I'm testing it with Python 3.6 on Windows 10 and working fine - at least for single stream recorded by LabRecorder. I haven't tested multiple streams and markers.

Although I don't think I will be largely involved in dev of (py)xdf, I'm making a tool to playback xdf file and stream it to LSL:
https://github.com/sccn/labstreaminglayer/pull/201
The aim is to extend it to multiple streams and setting the playback position based on markers. I think this will be a good testbed to verify (py)xdf.

@sappelhoff

Copy link
Copy Markdown
Contributor

Any news on this front?

@micuat

micuat commented Apr 20, 2018

Copy link
Copy Markdown
Author

as @cbrnr says probably it's a good idea to make another repository for pyxdf instead of changing the structure of this repo

@cboulay

cboulay commented Apr 20, 2018

Copy link
Copy Markdown
Collaborator

I don't think that's what @cbrnr was saying. It doesn't need to be another repository, it just needs to be an isolated package.

I think the reason there hasn't been any movement on this is that we know that pyxdf is inefficient and hasn't been tested very thoroughly. I think we'd like to make it a little more robust before it goes on pypi, but no one has the time to do that.

@micuat

micuat commented Apr 20, 2018

Copy link
Copy Markdown
Author

ok. in my opinion if pyxdf is published on pypi then it may get more feedback, too.

@sappelhoff

Copy link
Copy Markdown
Contributor

I agree with @micuat. For the package to be on pypi it doesn't have to be perfect ... but it could spark wider use and with that more feedback.

@cboulay, could you specify what you mean by

we'd like to make it a little more robust

Furthermore, I think that it would be great if the author/person in charge could upload a LICENSE.txt so that this is openly specified.

@cboulay

cboulay commented Apr 20, 2018

Copy link
Copy Markdown
Collaborator

License added.

I think that at a minimum we should have some unittests that load and inspect a few different very small data files.
Also, for those interested, please take a look at python-neo and see if you would prefer that xdf support be added there instead of having a separate python library.

Comment thread pyxdf/setup.py
from setuptools import setup

setup(name='pyxdf',
version='0.1',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be 1.14.0, see code.

Comment thread pyxdf/setup.py
version='0.1',
description='Python library for importing XDF (Extensible Data Format)',
url='http://github.com/sccn/xdf',
author='Chadwick Boulay',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be Christian Kothe (for setup.py, only one author should be specified so it could also be Alejandro Ojeda)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd try to contact the original authors Christian Kothe and Alejandro Ojeda - if they don't want to maintain the package, I'd prefer to specify the current maintainer's contact details in setup.py. I think this field is supposed to contain the package author anyway, but I'm not sure.

Comment thread pyxdf/setup.py
description='Python library for importing XDF (Extensible Data Format)',
url='http://github.com/sccn/xdf',
author='Chadwick Boulay',
author_email='[email protected]',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be [email protected] (or the email of Alejandro ... depending on who is listed as author)

Comment thread pyxdf/setup.py
url='http://github.com/sccn/xdf',
author='Chadwick Boulay',
author_email='[email protected]',
license='MIT',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is BSD, see code

@sappelhoff

Copy link
Copy Markdown
Contributor

I think that adding XDF support to NEO would be a better idea than having a separate XDF package. However, it will probably involve even more work than getting the simple pyxdf package to pypi.

Until someone has some time to first add some unit tests and then think about adding pyxdf to NEO, I propose to merge this PR by @micuat so that the pyxdf package can at least be installed with:

pip install git+https://github.com/sccn/xdf/tree/master/Python.git

@cbrnr

cbrnr commented Apr 23, 2018

Copy link
Copy Markdown
Contributor

Since I don't use XDF in my workflow, I don't have the time to contribute to this package at the moment. However, I'd prefer a pyxdf package in this repository since integrating it into Neo is definitely a lot more work. Therefore, I suggest to rename the Python folder to pyxdf and add an empty __init__.py.

@micuat

micuat commented Apr 24, 2018

Copy link
Copy Markdown
Author

@sappelhoff thanks a lot for the comments. It would be great if you could make a new pull request so you can make changes directly.

@sappelhoff

Copy link
Copy Markdown
Contributor

@micuat, sure I can do that.

@chkothe, what is your take on who should be listed as author and email in the setup.py?

@dmedine

dmedine commented May 4, 2018

Copy link
Copy Markdown
Contributor

I don't know who actually wrote this module (I sem to remember it was cboulay?) though I guess it is in the git history. I'm pretty sure it wasn't Christian or Alejandro.

@cbrnr

cbrnr commented May 4, 2018

Copy link
Copy Markdown
Contributor

No, there's only one commit which says "Added Python loader from Christian". The license text mentions Christian and Alejandro. Anyway, since this is BSD licensed we are free to reuse it in MNE, which is what I think is the best way forward. Let's mention both in the list of authors and add whoever does further work on it.

@sappelhoff

Copy link
Copy Markdown
Contributor

+1 @dmedine and @cbrnr ... sounds great

@dmedine

dmedine commented May 4, 2018 •

Copy link
Copy Markdown
Contributor

@cbrnr, I stand corrected.

Comment thread setup.py
url='http://github.com/sccn/xdf',
author='Chadwick Boulay',
author_email='[email protected]',
license='MIT',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be BSD.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

oh sorry I edited the branch for my project. I thought @sappelhoff has a branch that can be merged. If that is the case I will take down this pr.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@micuat I stopped working with XDF for now and I think your branch is better suited for a merge.

@cboulay

cboulay commented Aug 6, 2018

Copy link
Copy Markdown
Collaborator

Now part of #21

@cboulay cboulay closed this Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants