Skip to content

fix:hot-fix pdfgui functionality fix after skpkg#298

Open
stevenhua0320 wants to merge 1 commit intodiffpy:mainfrom
stevenhua0320:fix-gui-functionality
Open

fix:hot-fix pdfgui functionality fix after skpkg#298
stevenhua0320 wants to merge 1 commit intodiffpy:mainfrom
stevenhua0320:fix-gui-functionality

Conversation

@stevenhua0320
Copy link
Copy Markdown
Contributor

@stevenhua0320 stevenhua0320 commented Mar 27, 2026

@sbillinge ready to review. We have done the skpkg for this without waiting for its dependency new version release and we merged that PR. But today when I ran it using the developer version of diffpy.pdfgui, it gives me a lot of errors other than the python version. So, I made this PR to fix all of these.

  1. I added an __date__ variable in aboutdialog.py since it is the only place that we need the __date__. This helps us to run the pytest sucessfully.
  2. Closes changes when we drop python 3.11 #194, and also I updated the os.path to Path() object to comply with the group standard.
  3. I also made an edit to the pyproject.toml, this is needed because in the skpkg it changes the actual script running the pdfgui. Therefore, I changed it back to the application and in order to comply with the name of the app in the tutorial, I also changed the name of the command from diffpy-pdfgui back to pdfgui.

After finishing up these, I ran the pytest and also running the app, it works properly now. The CI would still failing since dependecies haven't updated to 3.14 yet, but now local test would confirm that everything is right now.

(diffpy.pdfgui_env) huarundong@Stevens-MacBook-Pro-405 diffpy.pdfgui % pytest
================================================================================================================== test session starts ===================================================================================================================
platform darwin -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/huarundong/dbs/diffpy.pdfgui
configfile: pyproject.toml
collected 58 items                                                                                                                                                                                                                                       

tests/test_aboutdialog.py .                                                                                                                                                                                                                        [  1%]
tests/test_calculation.py .                                                                                                                                                                                                                        [  3%]
tests/test_constraint.py ....                                                                                                                                                                                                                      [ 10%]
tests/test_datasetpanels.py ....                                                                                                                                                                                                                   [ 17%]
tests/test_dopingseriespanel.py .                                                                                                                                                                                                                  [ 18%]
tests/test_extendedplotframe.py ..                                                                                                                                                                                                                 [ 22%]
tests/test_fitdataset.py ..                                                                                                                                                                                                                        [ 25%]
tests/test_fitstructure.py ..........                                                                                                                                                                                                              [ 43%]
tests/test_insertrowsdialog.py .                                                                                                                                                                                                                   [ 44%]
tests/test_loadproject.py ......                                                                                                                                                                                                                   [ 55%]
tests/test_mainframe.py ..                                                                                                                                                                                                                         [ 58%]
tests/test_parameter.py ..                                                                                                                                                                                                                         [ 62%]
tests/test_parameterspanel.py ....                                                                                                                                                                                                                 [ 68%]
tests/test_pdfdataset.py ..                                                                                                                                                                                                                        [ 72%]
tests/test_pdfguicontrol.py .                                                                                                                                                                                                                      [ 74%]
tests/test_pdfstructure.py .....                                                                                                                                                                                                                   [ 82%]
tests/test_phaseconfigurepanel.py ..                                                                                                                                                                                                               [ 86%]
tests/test_structureviewer.py ......                                                                                                                                                                                                               [ 96%]
tests/test_temperatureseriespanel.py .                                                                                                                                                                                                             [ 98%]
tests/test_version.py .                                                                                                                                                                                                                            [100%]

==================================================================================================================== warnings summary ====================================================================================================================
tests/test_datasetpanels.py::TestDataSetPanel::test_onSampling
tests/test_loadproject.py::TestLoadProject::test___init__
tests/test_parameter.py::TestParameter::test___init__
tests/test_phaseconfigurepanel.py::TestPhaseConfigurePanel::test_onCellRightClick
  /Users/huarundong/dbs/diffpy.pdfgui/src/diffpy/pdfgui/control/fitdataset.py:480: VisibleDeprecationWarning: dtype(): align should be passed as Python or NumPy boolean but got `align=0`. Did you mean to pass a tuple to create a subarray type? (Deprecated NumPy 2.4)
    content = pickle.loads(z.read(subpath + "calc"), encoding="latin1")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================================= 58 passed, 4 warnings in 1.22s =============================================================================================================
Screenshot 2026-03-26 at 10 18 09 PM Screenshot 2026-03-26 at 10 19 49 PM

@sbillinge
Copy link
Copy Markdown
Contributor

Please can you check? This seems to be failing tests. Done version compatibility on problem?

@sbillinge
Copy link
Copy Markdown
Contributor

Please can you check? This seems to be failing tests. Done version compatibility on problem?

Ah, I read the full comment above, my apologies. I will merge this.

@sbillinge
Copy link
Copy Markdown
Contributor

actually, let's go a bit more slowly. Let's finalize the release of pdffit2 (please see the issue over there), push out that full release and rerun the action here so it passes, then I will merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

changes when we drop python 3.11

2 participants