Some directories under statsmodels dont have __init_.py #1779

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

Projects

None yet

3 participants

@sergiopasra

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
Member

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

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
Member

@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
Member

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

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
Member

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

@jseabold jseabold modified the milestone: 0.6, 0.5.1 Sep 20, 2014
@josef-pkt
Member

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
Member

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