yolothreat / utilitybelt

A Python library for being a CND Batman....
MIT License
35 stars 12 forks source link

Start development into a package rather than just a module. #18

Closed krmaxwell closed 9 years ago

krmaxwell commented 9 years ago
krmaxwell commented 9 years ago

This ain't right.

(venv)kmaxwell@leibniz:~/src/utilitybelt(package-dev)$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import utilitybelt
>>> dir(utilitybelt)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']
>>> 
krmaxwell commented 9 years ago

Ah, here we go. I don't have the namespace right.

>>> from utilitybelt import utilitybelt
Error Opening file ./data/GeoLiteCity.dat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "utilitybelt/utilitybelt.py", line 21, in <module>
    gi = GeoIP.open("./data/GeoLiteCity.dat", GeoIP.GEOIP_STANDARD)
GeoIP.error: [Errno 2] No such file or directory: './data/GeoLiteCity.dat'
>>> 
sroberts commented 9 years ago

@krmaxwell Is there a way to auto run bootstrap on setup?

krmaxwell commented 9 years ago

I think so. I was reading the spec earlier before :pizza: and got a few ideas. I will dig into it again this afternoon.

sroberts commented 9 years ago

Roger, let me know how I can help.

krmaxwell commented 9 years ago

OK, so I wrote "exclude data" but I'm re-thinking that. Should we distribute a copy of the DB? (The license permits this.)

sroberts commented 9 years ago

Ehh only if we also include an update mechanism. Out of date data is the worst.

krmaxwell commented 9 years ago

Well the script would still be there, so yeah.

sroberts commented 9 years ago

So are you suggesting having both or just the script?

krmaxwell commented 9 years ago

OK, give this a spin. If it installs and tests pass for you, let's open it and move to @yolothreat.

krmaxwell commented 9 years ago

oh and note that it already has a .travis.yml file :grinning:

krmaxwell commented 9 years ago

After fiddling, and reading some docs, and fiddling some more, and reading more docs, this should be right. We include the data in the package directly, plus a documentation note about updating the database.

sroberts commented 9 years ago

So are you saying it's :shipit:?

krmaxwell commented 9 years ago

From my end, sure. Make sure it works for you, then we can open the repo and move it to the org.