Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please port to Python3 #626

Open
tillea opened this issue Jul 10, 2019 · 11 comments
Open

Please port to Python3 #626

tillea opened this issue Jul 10, 2019 · 11 comments

Comments

@tillea
Copy link

tillea commented Jul 10, 2019

Hello,
the Debian Med team is maintaining nanopolish for official Debian. The recently released Debian 10 was the last Debian release featuring Python2 since this programming language is EOL. If you are interested that we continue to maintain nanopolish in official Debian (and that users of other modern distributions will have no problems to install nanopolish on their systems) I'd recommend you port your code to Python3. The 2to3 tool might be of great help here.
Kind regards, Andreas.

@jts
Copy link
Owner

jts commented Aug 7, 2019

Hi @tillea,

If possible could you point me to the problematic python2 scripts?

Jared

@tillea
Copy link
Author

tillea commented Aug 7, 2019 via email

@jts
Copy link
Owner

jts commented Aug 7, 2019

Thanks, that is helpful. I will incorporate these changes.

Jared

@jts
Copy link
Owner

jts commented Sep 18, 2019

Hi @tillea,

@paultsw has just pushed the 2to3 changes. Could you take a look? These changes will be incorporated into the next tagged version.

Jared

@tillea
Copy link
Author

tillea commented Sep 18, 2019

Thanks a lot. I'm afraid if I just look I might not spot any issues you might find when doing your usual tests. While I'm running the test suite in the packaging process I guess you will have better insight into the code. Please let me know if you will tag a new release (I'd be happy if this would be in the next 2-3 weeks).
Kind regards, Andreas.

@mr-c
Copy link
Contributor

mr-c commented Sep 19, 2019

@jts Maybe update the #! /usr/bin/env python to be python3 ?


#! /usr/bin/env python


#! /usr/bin/env python

and this python invocation to python3:

ret = os.system("python scripts/convert_model_to_header.py -i %s -f %s > src/%s" % (model_file, function_name, outfile))

Likewise these documentation mentions: https://github.com/jts/nanopolish/blame/master/README.md#L93
https://github.com/jts/nanopolish/blame/b4b4748b9b8616d0de26477140acf1f31a78b706/docs/source/debug.rst#L94
https://github.com/jts/nanopolish/blame/master/docs/source/quickstart_call_methylation.rst#L99

Otherwise, looks good to me, thanks!

@paultsw
Copy link
Collaborator

paultsw commented Sep 19, 2019

@mr-c Thanks for the suggestions. I've made the above changes.

@jts
Copy link
Owner

jts commented Oct 21, 2019

@tillea I've now tagged a version with these changes as 0.11.2 - sorry for the delay. Let me know how it looks.

@mr-c
Copy link
Contributor

mr-c commented Nov 8, 2019

Unpacking nanopolish (0.11.2-1) ...
Setting up nanopolish (0.11.2-1) ...
  File "/usr/lib/nanopolish/polya_training/hmmplot.py", line 63
    row_values  = choice(polya[polya['qc_tag'] == 'PASS'][['readname', *state_starts]].values).tolist()
                                                                       ^
SyntaxError: invalid syntax

@jts
Copy link
Owner

jts commented Nov 8, 2019

@paultsw can you take a look?

@mr-c
Copy link
Contributor

mr-c commented Nov 8, 2019

#684 will help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants