Python 3 Pypi community fork namespace

We are going to be creating python3 pypi packages soon enough, so I wanted to start a conversation about how we name the packages we create. I started this conversation on the HTM Hackers’ Hangout with @David_Keeney, here.

The bottom line is we must have different names when we pip install X in python 3. I suggested in the hangout, that nupic.py use the more generic namespace htm, so we could continue using the nupic namespace for Numenta projects.

Does anyone have a problem with this? It means an eventual structure like this:

  • pip install htm.py: Install the current nupic.py (once ported to Python 3)
  • pip install htm.cpp: Install current nupic.cpp python bindings (once deployed to pypi)
  • pip install nupic.research: Install Numenta’s Python 3 research code, which will eventually bind to htmresearch-core (but we may rename it).

I don’t know whether there will be python 3 nupic.py package in the near future, but it makes sense to keep the nupic namespace for Numenta-backed projects.

1 Like

@rhyolight I am giving some thought to the namespace used in the community fork. Using htm as the pypi package name is not a problem but I was wondering if you envisioned this to extend to the directory names we use in .py code and C++ code and the namespaces within the code.

  • GitHub: htm-community/htm.cpp rather than `htm-community/nupic.cpp’
  • Repository directory structure: ${Repo}/src/htm/algorithms rather than ${Repo}/src/nupic/algorithms
  • in Python: import htm.bindings.algorithms rather than import nupic.bindings.algorithms
  • in C++: using namespace htm; rather than using namespace nupic;

We certainly could do that if that is what you would like. It might be quite confusing for people at first but in the long run it might be better to use entirely separate namespaces to avoid name collisions. What are your thoughts?

2 Likes

Is there already a PYPI login that should be used to register the package names for the htm-community packages? @rhyolight I would think that you should control that login.

If there is, please register htm as our package name. I don’t think it is taken.
Thanks.

1 Like

David you are spot on. That is exactly what I prefer to do. I think it will be worth it in the long run. Now is the time to make big changes like this.

I will take care of this and get back to you guys.

2 Likes

I just tried to do this, and I can’t until we have a python package ready to deploy.

1 Like

I am traveling today, will be back on Wednesday. I will see if I can put together something you can use

2 Likes