DidYouMean-Python
DidYouMean-Python copied to clipboard
Make this pip installable
References:
https://docs.python.org/2/distutils/introduction.html http://peterdowns.com/posts/first-time-with-pypi.html http://docs.travis-ci.com/user/deployment/pypi/
$ python setup.py register -r pypi running register running check Registering didyoumean to https://pypi.python.org/pypi Server response (403): Package name conflicts with existing package 'DidYouMean'
I guess I'll have to find another name.
Also, I forgot to put the init.py and I am not quite sure how to make the whole thing work.
http://www.discoversdk.com/blog/packaging-python-code
What more do you need ? I can help you wish packaging, but appart for the name, you seem to be ok. Do you have another problem ?
Hi @sametmax , quite an honor to see you here :) I guess I'll need to try with another name. I'll keep you posted but I'm very new to this packaging thing. If you have any suggestion regarding the name, you are more than welcome!
:) It's a selfish visit. I'm gonna add DidYouMean to devpy.
DidYouMean could mean a spell checker or something from a search engine so adding a qualifier in the name wouldn't hurt anyway.
BetterErrorMessages, ErrorHints, ExceptionHints, ErrorTips, ExceptionTips, etc could be more self-explanatory names.
Working on it :-)
https://www.reddit.com/r/Python/comments/5f6ev8/what_one_thing_took_your_python_to_the_next_level/dai0glj/
$ python setup.py register -r pypitest
Registering BetterErrorMessages to https://upload.pypi.org/legacy/
Server response (410): This API is no longer supported, instead simply upload the file.
:(
I'm getting punished for procrastinating on this issue :-)
It works!!!!!
$ virtualenv toto_env
$ source toto_env/bin/activate
$ pip install BetterErrorMessages
$ python
>>> import didyoumean
>>> didyoumean.didyoumean_api.didyoumean_enablehook()
>>> abcdef = 'toto'
>>> abcdf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'abcdf' is not defined. Did you mean 'abcdef' (local)?
@sametmax Now it is pretty obvious (from the example above) that the API is terrible. I reckon being able to do import didyoumean
and didyoumean.enablehook
would probably be MUCH better. As you'll probably be the first user, you get to decide if that would be fine for you before it's too late :-).
Also, I should be able to do so just by messing with the __init__.py
file, right ?
- [ ] Make the API easier to use
- [x] Update the readme
@sametmax Any idea regarding the question above ?