-
Notifications
You must be signed in to change notification settings - Fork 20
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
python 3.10 collections test suite update #312
Conversation
Updated requirements.txt to include all required packages Collections Iterable depreciated, now located in collections.abs
Further updated requirements.txt from successful passing test build
scripts/requirements.txt
Outdated
sbol3>=1.0b10 | ||
sbol-utilities>=1.0a15 | ||
biopython | ||
astroid==2.11.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's typically better to avoid including indirect requirements in the requirements.txt list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok didn't realise! Always thought it was better to be more explicit to have a more consistent environment. Will remove.
@@ -1,5 +1,5 @@ | |||
import math | |||
from collections import Iterable | |||
from collections.abc import Iterable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is iterable
a type options? If so, we can get backward compatibility through from __future__ import annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So using future does allow collections to be backwards compatible, but v3.8 didn't yet have .removesuffix() for strings which is used through part_retrieve.py.
Added some handling to this to get around this issue, but 2 tests still fail in py v3.8 as filecmp asserts deem integrated package and collated file to be different in test_collation and test_all_import_types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those issues are likely due to the update in rdflib that causes it to no longer have a spurious newline, which I fixed in #311. If you update your branch, it should resolve those issues. If it doesn't resolve those issues, it will be necessary to look deeper.
Added handling for py v3.8 prefix/suffix handling. py v3.8 still fails on test_collation adn test_all_import_types
Updated requirements.txt to include all required packages Collections Iterable depreciated, now located in collections.abs
Further updated requirements.txt from successful passing test build
Added handling for py v3.8 prefix/suffix handling. py v3.8 still fails on test_collation adn test_all_import_types
@mburridge96 Are these failures expected here? |
Not at all, should have failed on testing but not on linting. Will have a look |
Deleted synchronise and updated with actions based build_packages
Updated setup-python v2 -> v4. Updated checkout v2 -> v3
Python 3.10 collections depreciated the use of Iterable. Iterable has now been moved to collections.abc.
Tested in python 3.9 and 3.10 and passed 100% of tests. Python 3.8 had type issues with SBOL.components (ABCMeta type not subscriptable) so could not run helper functions. Question is does the testing suite require python 3.8 support? If it does will have to look into it further
Updated requirements.txt to be more exhaustive of requirements.
Added small troubleshooting section for Ubuntu setup.
fix #310