-
Notifications
You must be signed in to change notification settings - Fork 19
port to python 3.7 and use requests #8
base: master
Are you sure you want to change the base?
Conversation
let me know if you are happy (in general) with this PR, then I'll fix the codacy issues. Would be cool to move this project over to python3 as the clock is ticking for python 2 :) |
Hey @wolfv, Thank you very much for your contribution! I did some quick tests based on https://github.com/opencultureconsulting/openrefine-client/blob/master/tests/cli_bash.ipynb and some basic functionalities seem to be broken.
I am on parental leave and will probably not be able to take a closer look at it until March. @boerni667 is also working on a port to Python3 (https://github.com/boerni667/openrefine-client) and may want to check it out before then. |
Hey @felixlohmeier thanks for taking a look. Indeed, there were quite a bunch of issues left ... I attempted to fix them (the CLI at least seems to work fine with the latest changes). |
Great, I will take a closer look next month. I had started to investigate this systematically a few months ago (paulmakepeace#19), but I lacked the time to complete it. Dropping support for older versions would be a pragmatic solution. |
@boerni667 and @jnauber, maybe you would like to join this discussion? |
After comparing the development branches from @wolfv and @boerni667 [1] and discussing the matter with @felixlohmeier, i do think that the best way to continue the development is to merge this pull request (after successful testing through @felixlohmeier) and afterwards open a new pull request with the changes in @boerni667 fork. What do you think about this procedure? |
sounds good to me :) I have ticked the checkbox so that other maintainers can push to my branch as well. |
Sorry for the long delay. I will check and merge the port on Python3 by end of July. |
No worries, I am happy to see this move forward. |
I'm working on it now. Great work! So far I've noticed only two deviations. The template option "suffixById=true" returns wrong file names and the connection error is so verbose that we better intercept it. I will take care of it. |
Unfortunately code freezing with pyinstaller does not work well with python3 and requests. The executable file takes almost twice as long to start up:
If I exclude requests, then the performance is much better. I will have a look if these parts can be implemented with urllib.
|
Thanks @felixlohmeier I would additionally be interested in having openrefine and htis library on conda-forge. Maybe we can make that happen :) |
Yeah, basically a good idea. Actually, I was planning on just updating the CLI functionality. Do you also need the other parts of the library (the "upstream way")? |
Hey @wolfv, it's been almost a year since you initiated the port to Python3. Thanks again for that! In August I had written some tests to check the functionality of the command line interface. Thereby I noticed a few bugs. However, I had bigger problems with the creation of the one-file-executables in a Python3 environment. Here is a list:
Over the holidays I finally have time to work on the openrefine-client again. Actually I had hoped to finish the port to Python3 first and then make it compatible with OpenRefine 3.3+ (csrf token). But I can't do both and OpenRefine 3.3 was released almost a year ago. Therefore I want to focus on one-file-executables supporting OpenRefine 3.3+ and stay with Python2 for now. Do you want to continue and publish the port on your own? That would be really great, because a lot of people had shown interest in it. I'm sorry I can't contribute more right now. |
f06fc54
to
cca067a
Compare
Hello @felixlohmeier, @wolfv, @jnauber I'm arriving late to the repo but would like to help where I can to see if we can update this for Python2 and possibly migrate this to Python 3.10? with a few new resources. I will probably be asking a bunch of questions that seem obvious but with Python Rule #2 'Explicit is better than implicit'. Sometimes I regularly have people ask for open source projects they could assist with and who doesn't like hacking API's. |
Hi @datatalking, Help is very welcome here! I look forward to your questions! I'm currently working on a new implementation in Bash (orcli) and was actually planning to discontinue this project (openrefine-client). See also: https://forum.openrefine.org/t/orcli-yet-another-client-for-openrefine-written-in-bash/753 |
hey, I attempted to port the openrefine client to python3, and I have also swithced to use the
requests
library for communicating with the server (including uploading files).