forked from clips/pattern
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
I've broken up python 3 migration (#1) into the following independent tasks.
Fix the (python 2) skipped tests see #3:
- mysql (this just needs travis to install it I think this is no big deal, i.e. just a line to .travis.yml)
- test command line (uses PIPE atm which doesn't work on py2.6)
- test _keywords
- skip MediaWikiArticle
- I think there is a couple more from travis passing python 2 tests #3 (search for FIXME and TODO)
Python 3 stuff
- print statements (Future stage1 python3 #4)
- get imports working from Future stage1 python3 #4
- sgmllib is depreciated in python 3 (!) https://docs.python.org/2/library/sgmllib.html (I've kinda worked around this by renaming html.parser (which is a hack), the fact html.parser is in base may mean this section of pattern is no longer required sgmllib is deprecated clips/pattern#4
- ... (triage remaining)
test files passing on python 3
e.g. via nosetests test/test_xx.py
- add separate travis py3 build for the thus far passing tests
- test_graph TST graph tests pass #11
- test_text en de... text passing py3 tests #16
- test_metric
- test_vector Vector #17
- test_web
- test_db
- remove py3 special case build (once all the above are passing!)
General stuff
- use a single README (probably an rst is best)
- add a MANIFEST.in - burn with fire the current os.walk stuff (other files?)
- grab version number from the init file (rather than the pattern installation)
- style is a bit random for importing py3 stuff atm (my fault) should be more consistent
- remove testing
suitefunctions (just usetest_main). - some tests are pretty flaky (ie. numbers changing)
- remove utf-8 print hack added to the examples (due to
__future__ print_statementbeing sensitive to unicode) i.e. make all the things unicode. See Unicode all the things #12 - some tests are ombscurified by being so class based (although some which are still not very dry), atm I prefixed these with Abstract... but they should probably be ABC (the key is they can't start with Test otherwise nose etc tries to run them - and fails).
- javascript tests (?) currently not run - unclear if do they do anything?!
- add examples to tests (e.g. have just run all the example py files, no assertions just running... but potentially could add some asserts?) - I nearly have done this.
- work out which dependancies can stop being vendorized (see below)
- depreciation messages of uses of dependancies (which have been updated), see travis/nose output
- add travis, coveralls, landscape (sign up with pattern & pattern3 gh accounts and add this repo)
- add banner for the above into README
- pep8/docformatter all the things (this should be simultaneously merged with clips/pattern, otherwise merging in work to clips will be very very difficult ???)
- decide on when this can be merged back upstream (IMO this should be asap, we don't require py3 to be ready just that py2 still works... and a quick pep8 storm :) )
Performace
- come up with some benchmarks to compare python 2 and 3 (and potentially the old code base)
- profile and see what can be improved...
james-see and KartikKannapur