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

SuiteName Python 2.7 regression tests fail to run #158

Open
russell-taylor opened this issue Aug 24, 2021 · 6 comments
Open

SuiteName Python 2.7 regression tests fail to run #158

russell-taylor opened this issue Aug 24, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@russell-taylor
Copy link
Contributor

The program fails when we run compare.sh because it cannot handle the command-line parsing. It works with Python 3.6. It looks like it has never worked for 2.7, but apparently this is not caught in the FullTest.py program?

taylorr@reliasolve-3:~/src/suitename_regression$ phenix.suitename -report 19387.cif
Sorry: The following arguments are not recognized:
etatheta=False
nosequence=False
nowannabe=False
report=True
causes=False
anglefields=9
version=False
test=False
infile=19387.cif
suitein=False
string=False
altid=A
chart=False
noinc=False
satellites=False
pointidfields=7
altidfield=6
residuein=False
kinemage=False
oneline=False

@russell-taylor russell-taylor added the bug Something isn't working label Aug 24, 2021
@russell-taylor russell-taylor self-assigned this Aug 24, 2021
@russell-taylor
Copy link
Contributor Author

Once this is fixed, add a true regression test somewhere that actually tries running the program. See how CCTBX does this for other programs.

@russell-taylor
Copy link
Contributor Author

The problem is that unicode literals was turned on, which caused problems with the parser that was expecting strings.

When we remove the unicode future import, we get problems with the UnitTest code, which tries to pass a StringIO object to be filled in, but it gets filled in with strings on Python 2 and that doesn't work because it only wants unicode. Casting to unicode will presumably fail in Python 3 because it is already unicode.

If we use unicode_literals only in suitenout.py, it looks like we get the best of both worlds...

@russell-taylor
Copy link
Contributor Author

Figure out how to add a regression test to that we know you can run the program.

@Joymaker
Copy link
Collaborator

Joymaker commented Aug 24, 2021 via email

@russell-taylor
Copy link
Contributor Author

This is Github running on autopilot. You can turn off notifications for issues that you are not named on in Github and it will stop sending them to you unless I assign you or "at" you. This can be done on a per-repository basis.

@russell-taylor
Copy link
Contributor Author

phenix_regression/validation/tst_suitename.py does this. We can copy it and add the different input and output formats to snippets as tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants