biocommons / bioutils

provides common tools and lookup tables used primarily by the hgvs and uta packages
Apache License 2.0
21 stars 18 forks source link

Work done to support the human mitochondrial codon table in main, but missing from latest release 0.5.8.post1 #67

Closed bsgiles73 closed 1 month ago

bsgiles73 commented 2 months ago

Describe the bug The latest build of bioutils does not include the recent work done to add the Human Mitochondrial translation table.

https://github.com/biocommons/bioutils/blob/main/src/bioutils/sequences.py#L605-L610

To Reproduce Steps to reproduce the behavior:

  1. Install latest version of bioutils
  2. Run translate_cds method with vertebrate_mitochondrial translation table option.
    (.venv) sgiles-MD6M:bioutils shane.giles$ pip freeze | grep bioutils
    bioutils==0.5.8.post1
    >>> from bioutils.sequences import translate_cds, TranslationTable
    >>> translate_cds("ATACGA", translation_table=TranslationTable.standard)
    'IR'
    >>> translate_cds("ATACGA", translation_table=TranslationTable.vertebrate_mitochondrial)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Users/shane.giles/.pyenv/versions/3.11.4/lib/python3.11/enum.py", line 783, in __getattr__
    raise AttributeError(name) from None
    AttributeError: vertebrate_mitochondrial

Expected behavior Code does not throw exception using latest version, but uses the human mitochondrial translation table to generate the following.

>>> translate_cds("ATACGA", translation_table=TranslationTable.vertebrate_mitochondrial)
'MR'
andreasprlic commented 2 months ago

I think this makes sense: We merged the MR that adds mitochondrial support in https://github.com/biocommons/bioutils/commit/ab6a9e4bb204c6858f5e91e0a619fc085f5f9e94 which was in Jan 2024, but the 0.5.8 release was in July 2023. Solution should be to create a new release. I'll see if I can do that.

andreasprlic commented 2 months ago

I tried to create a new release, but it failed with the following. Looks like we need to update our release CI.

Checking dist/bioutils-0.6.0-py3-none-any.whl: PASSED
Uploading distributions to https://upload.pypi.org/legacy/
Uploading bioutils-0.6.0-py3-none-any.whl
WARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/          
         Invalid or non-existent authentication information. See                
         https://pypi.org/help/#invalid-auth for more information.   
andreasprlic commented 2 months ago

discussion for how to fix CI/CD on #68

andreasprlic commented 1 month ago

I rolled back the unfinished 0.6.0 release so we can restart it once #68 has been updated.

andreasprlic commented 1 month ago

bioutils 0.6.0 has been released. I consider this issue resolved.