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

Some directories under statsmodels dont have __init_.py #1779

Closed
sergiopasra opened this issue Jun 22, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@sergiopasra
Copy link

commented Jun 22, 2014

This is 0.5.0

There are several directories under package statmodels:

statsmodels/examples
statsmodels/sandbox/examples
statsmodels/sandbox/tsa/examples

that don't have a __init__.py file. So they aren't subpackages.

When python3 setup.py build runs 2to3, those directories are not converted, but they are installed, so you end up with a mixture of python2 and python3 code installed.

The solution is either:

  • add a __init__.py file to those directories so that the code in them is properly converted to python3 OR
  • move those directories out of the package and into the examples directory
@josef-pkt

This comment has been minimized.

Copy link
Member

commented Jun 22, 2014

obsolete,

I thought some of the example directories were not installed.
I like them inside the source, but we don't really want to have them "very public".

However, statsmodels master has now a common py2 py3 code base, so also any example folders will/should work on python 3 without problems (and without conversion)

@josef-pkt josef-pkt added the build label Jun 22, 2014

@sergiopasra

This comment has been minimized.

Copy link
Author

commented Jun 22, 2014

If you plan to do a 0.5.1 release, consider moving the directories outside statsmodels or add a __init__.py to them

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Jun 22, 2014

@sergiopasra You can delete those 3 directories for a distribution, then you don't get the python 3 syntax errors with 0.5.0.

(statsmodels is still under development, and until now I refused or didn't have time to make it into a "clean" package.)

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Jun 22, 2014

If we do a 0.5.1, then the sdist and binary distribution will not contain the examples folder by explicitly excluding them from setup.py and MANIFEST.in.

@josef-pkt josef-pkt added this to the 0.5.1 milestone Jun 22, 2014

@sergiopasra

This comment has been minimized.

Copy link
Author

commented Jun 22, 2014

What I actually do is to move them under examples and ship that directory as documentation. But if you prefer not to distribute them, then yes, exclude them in MANIFEST.in

@jseabold

This comment has been minimized.

Copy link
Member

commented Sep 20, 2014

I agree that these should be moved outside of statsmodels and still advocate for the sandbox going away.

@jseabold jseabold modified the milestones: 0.6, 0.5.1 Sep 20, 2014

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Sep 20, 2014

python 3 is not a problem anymore, and I still like those examples.

I just found a nice collection of boxplot examples that I didn't know or remember that it existed.
cleaning out the sandbox will also take another year or two.

I might want to reactivate the sandbox for it's initial purpose for almost finished code. I see users copy code from branches so they have access to preliminary versions.

@jseabold

This comment has been minimized.

Copy link
Member

commented Sep 20, 2014

Closing this then.

@jseabold jseabold closed this Sep 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.