-
Notifications
You must be signed in to change notification settings - Fork 46
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
Switch DIALS to src/
layout
#2077
Conversation
|
To aid migration, it now continues to install a blank libtbx.dials package with The other issue is lingering
|
So, because of the moved
I'm... not sure that there is a better way to manage this inside dials, without bothering the user. It's not easy to re-order these at time of refresh, because it's in a literal loop over the list, and changing that while running (edit: Fiddling with the module list in the simple case won't work because the SConscripts would be called twice, causing potentially duplicate build instructions.) |
On the plus side, the |
And autocomplete works. |
src/
layoutsrc/
layout
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.
Overall looking good.
I'm sure you've already thought of this, but: when merging this I'd be keen to squash it down to two commits, one just for the renames and one with changes that also adds the rename commit to that ignore file.
"long_description": Path(__file__).parent.joinpath("README.md").read_text(), | ||
"description": "Diffraction Integration for Advanced Light Sources", | ||
"author": "Diamond Light Source", | ||
"license": "BSD-3-Clause", | ||
"author_email": "dials-support@lists.sourceforge.net", | ||
"project_urls": { | ||
"homepage": "https://dials.github.io", | ||
"repository": "https://github.com/dials/dials", | ||
}, |
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.
I would suggest moving the bulk of the static information into a setup.cfg
- happy to provide this as commit
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.
I thought I recalled us doing this for dxtbx, but it appears not to be the case? Did something not work?
This comment was marked as outdated.
This comment was marked as outdated.
I'm also happy to consider just "Run libtbx.configure automatically then exit" but this feels a little prone to just complicating things, and I don't know if it will break anything for custom environments. |
Codecov Report
@@ Coverage Diff @@
## main #2077 +/- ##
===========================================
+ Coverage 68.48% 80.09% +11.60%
===========================================
Files 654 576 -78
Lines 76497 65431 -11066
Branches 10903 9227 -1676
===========================================
+ Hits 52392 52407 +15
+ Misses 22062 10989 -11073
+ Partials 2043 2035 -8 |
If you get
then you have to delete |
With src/ layout, these are no longer inside the dials. package
xfel_regression directly imports from dials.tests to get a phil string out of test_stills_process. For now, leave this in so that xfel_regression doesn't break.
- Split setup.py into setup/build.py, like dxtbx. pip installing DIALS will now properly install all python sources into the correct site-packages location. - Fix SConscript to build relatively, and update central environment configuration so that downstream packages know where the DIALS sources are. - Historically, the xfel module could be configured before the dials module, because of a recursive dependency. Because dials now needs to update the source location variable that xfel uses, it now needs to be configured first. libtbx_refresh checks for this scenario, and aborts with an error and instructions on how to fix this. - Fixup a few other references to now-src-relative locations - Ignore the large rename commit in "git blame" views.
This is a WIP branch for switching DIALS to
src/
layout. This will enable it to be installed as a standard python package when being used outside the libtbx build system. Behaviour under bootstrap should remain as identical as possible, butpip install dials/
will also be possible and install DIALS as a standardsite-packages/
python package. Similar to dxtbx, extension compilation isn't altered here and it's assumed is dealt with separately.The commits in this PR:
src/dials
1906a31libtbx_refresh.py
,libtbx_config
,SConscript
,setup.py
- 079f6ac. The libtbx_refresh is written in a similar style to dxtbx, and installs into thebuild/
folder without touchingconda_base/
.dials.tests
. c4b2ad5Things to do before this is ready:
xfel_regression
pass.xfel
compiles, but the regression tests have not been run yet.Once this is merged, I will go through and assist in rebasing/remerging any outstanding PRs. This is probably relatively simple, as git is pretty good at detecting changes to moved folders, though github is less helpful.
Transitioning to
src/
A
libtbx.refresh
will definitely be necessary. Possibly two. The sources will be moved around, but there will be some non-repository python cache files left behind, that you can probably either ignore or remove with e.g.