quast icon indicating copy to clipboard operation
quast copied to clipboard

Python 2 is no longer supported. Are there plans to migrate QUAST to Python 3 only codebase?

Open peterk87 opened this issue 2 years ago • 0 comments

Hello,

Python 2 is no longer supported and has been "sunsetted". As such, are there any plans to remove the Python 2 code and replace it with more idiomatic Python 3 code for future versions of QUAST?

There would be many benefits to fully migrating to Python 3 only such as:

  1. Improvements, bug fixes, security patches and support that Python 2 will no longer receive.
  2. Type hinting which would make it easier to read and understand the code. For example, for the following function https://github.com/ablab/quast/blob/278f61fe84e429ac7b0080bcf886e717530a7cb6/quast_libs/fastaparser.py#L94 type-hints could be added
    def get_chr_lengths_from_fastafile(fpath: str) -> int:
    
    to make it more clear types are expected and output. Editors like PyCharm have great support for Python type hinting and it can be very useful for catching issues early.
  3. f-string literals for more readable string generation.
  4. pathlib to cut down on the amount of boilerplate code for processing and manipulating file/dir paths.
  5. Better asyncio support
  6. Unicode strings by default
  7. Many new Python libraries are only available for Python 3.

Most importantly I think migrating to a Python 3 codebase would make it easier to contribute to and improve QUAST especially as Python 3 becomes the standard and Python 2 is phased out. Contributors would not need to worry about their code being backward compatible with a version of Python that is no longer supported or widely used.

If this kind of migration is of interest or on the roadmap, I would be happy to assist as my time permits.

Thanks!

peterk87 avatar Aug 05 '21 16:08 peterk87