-
Notifications
You must be signed in to change notification settings - Fork 21
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
Tracking develop branch issues: #135
Comments
I made a new issue for this rather than using a comment is a merged PR. |
Installation tasks @briantoby:
Self-tests @briantoby:
|
@tacaswell Here is stuff that I'd like your help with:
More long range, but for people who have a traditionally-installed (non self-updating) version of GSAS-II, I'd like still generate a message that shows how far the installed version is behind from the current version. Any thoughts on how to find this out? Low priority: It is not clear to me how pixi would use one python environment for building and installing GSAS-II and another for running it, but I have left some comments on how different conda environments might be deployed in the TODO comment in pixi.toml, |
|
for the programs I see a couple paths:
for flang: We need to use flang to compile on windows as that is the only toolchain that can be distributed on conda-forge (see https://labs.quansight.org/blog/building-scipy-with-flang ) on windows. It is not clear to me where gfortran is coming from in that GHA. I suspect that debugging the fortran will be simpler than getting the gfortran toolchain to run on windows for CF. I tried tracking back through the code to figure out which fortran was being called, but got lost. Is there a more direct way to call the code that is misbehaving? |
I prefer to have Python run externally-compiled programs (particularly Fortran ones) rather than interface them as .pyd/.so libraries. This could be done for several of the routines (diffax and pyspg come to mind as they are not called that often and the amount of data transfer is small compared to execution time). How would it help if there are more .exe's and fewer .pyd's? For pypowder, histogram2d and maybe pytexture, they need to run fast and do in-memory data xfer, so they really need to be wrapped for python modules. Perhaps ideal would be to recode them in C, but pypowder needs lots of subroutines. pack_f and unpack_f are used only for MAR images. That could be retired IMHO.
not understanding this
please do
Oh dear. At least it will be possible to install GSAS-II from flang side-by-side with GSAS-II from gfortran so we can see where it fails.
not sure what you want here |
I assumed the programs were stand-alone because users also directly call them, if they are only used internally having them available as so/pyds seems better (even if the data transfer is slow, launching new processes are not the most performant thing). However, that is not what I meant to suggest. Instead to write functions like: def really_call_prog(*args):
prog = find_the_prog()
subprocess.run([prog, *args]).check() and then registering that function as a entry point so the editable wheel install would automatically drop those in if we put entries in Doing the copies is probably the easiest path (I may need some help sorting out how to get the right path on Windows). |
I started from GSAS-II/tests/test_scriptref.py Line 45 in 3ab4088
|
I will see if I can write something that just does a single call to pypowder that tests it. |
Now that there are a lot more optional packages used in GSAS-II, it might be a good idea to have a "stub" package so that something like |
@tacaswell for next meeting: are there some basic protection rules I should have on the master branch? |
When building a the conda-package you can have multiple outputs from the same recipe (e.g. for Matplotlib we have |
I've tweaked the reproducer code a bit to: # compute a single peak with pypowder
import GSASII.pypowder as pyd
import matplotlib.pyplot as plt
import numpy as np
fig, ax1 = plt.subplots()
# these values generate a nearly symmetric peak
xdata = np.arange(15, 25, 0.05)
pos = 20.0
sig = 525.9994695543994
gam = 2.1444606947716025
shl = 2.0
for shl in [2, 0.2, 0.002, 0]:
ydata = pyd.pypsvfcjo(len(xdata), xdata - pos, pos, sig, gam, shl)
ax1.plot(xdata, ydata, label=f"{shl=}")
ax1.legend()
plt.show() which works correctly in the |
~~ pixi run install-editable does not place compiled programs convcell & LATTIC into .pixi/envs//bin; (N.B. pixi run install does do this)~~ (moved below)
comment in GSASIIphsGUI.py: "XXX I suspect this is Unix-specific -- need porting help!". Is this still relevant?
Best way to read & write configuration info to an external file?
running tests/test_scripting.py fails due to "path hacking"; problem seems to be within pytest, but is not seen with the other self-tests.
Tom will make path-hacking test "opt in" via a PR(done in ca6402f, BHT)can pixi install & install-editable run the GSAS-II/install/save_versions.py script (before copying files) or perhaps this should be made into a git smudge activity?
Originally posted by @briantoby in #134 (comment)
The text was updated successfully, but these errors were encountered: