-
Notifications
You must be signed in to change notification settings - Fork 12
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
dxtbx -> Python 3 #36
Comments
These will be used by Jenkins to test for Python 3 regressions and track conversion progress, cf. #36
I think this all sounds good, I like the sound of the separate feature branches - I'm hoping to learn a bit through this process as I'm not yet up to speed with all of the differences between python 2&3. For the python3-regression test branch, will we receive emails if this one fails or does it rely on checking the github page? |
I was going to reply "no, we can't have emails because Jenkins can't distinguish between expected and unexpected test failures", but pytest actually makes it really easy to keep a list of conditionally expected test failures, so I've just committed f3daa9c and we now should have Python3 test regression emails. (The same logic will also apply when you run tests locally.) |
parses a pytest output.xml file, finds the top 5 failure causes, and prints a very short error excerpt and a pytest command to run one representative test for each group. Should be useful for cctbx/dxtbx#36 and the dials+xia2 equivalents.
* set up a Travis build to keep it that way * celebrate Python 3 in the README * remove the ignore-failing-tests mechanism
This work has now been completed.
Thanks to everyone involved. |
Python 3 for dxtbx
As you are aware dxtbx is already python 3 syntax compatible, and has been for some time. With cctbx now being nominally python 3 compatible we can proceed with our work on dxtbx.
As discussed on dials-support we propose that this is done in a staged way, with open work and continuous testing to record progress.
Process
Before the work is started we will set up a Jenkins build job at Diamond following the same principle that we had with the python 3 syntax conversion, ie. we will keep a list of expected failing tests in python 3 alongside the code.
A python 3 Travis job will not be available initially but may be added at a later date.
Work will proceed in feature branches off master which will be submitted as pull requests, reviewed, and merged in a timely fashion i.e. over a period of a couple of days.
This ensures we do not have long-running side branches leading to code conflicts and the need to merge from the master branch or rebase the feature branch.
The entire test suite is run on the iteratively updated master branch which means we avoid python 2 and - as the list of ignored tests shrinks - python 3 regressions.
Every feature branch will be concerned with a small number of topics. Initially these will be futurize stage 2 fixers, later these will be picked from remaining python 3 test failures. Commits in each pull request may fall into one of the following categories:
There is no required flake8/LGTM compliancy level for pull requests, and particularly at the start of the process it may be the case that pull requests will be merged with failing flake8 tests. As we refactor dxtbx and our code quality improves we should aim for more stringent flake8 compliancy and even consider enforcing more flake8 test categories via the pre-commit hook. Pull requests should not introduce any new LGTM issues, and ideally address existing issues in the touched files, although this may again not be practicable at the start of the process.
Benefits
At the end of the process dxtbx will be idiomatically modernized python 3 code that is fully python 2.7 compatible. This will improve the overall code quality, reduce technical debt and code maintenance cost, and reduce the barriers to entry for new or external developers.
The process will serve as a prototype for the upcoming work on the DIALS project.
Success criteria
Comments
Please discuss this process in the issue comments below. If this is agreeable we anticipate starting this work in the next week.
The text was updated successfully, but these errors were encountered: