From 4ae78e75caba242f8f870706b02f7eab237a655f Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 23 Jul 2024 16:51:23 -0600 Subject: [PATCH 01/12] addressing redefinition of classes --- src/diffpy/pdfgui/gui/wxextensions/wx12.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/diffpy/pdfgui/gui/wxextensions/wx12.py b/src/diffpy/pdfgui/gui/wxextensions/wx12.py index 17a3f938..ddbc7641 100644 --- a/src/diffpy/pdfgui/gui/wxextensions/wx12.py +++ b/src/diffpy/pdfgui/gui/wxextensions/wx12.py @@ -46,7 +46,9 @@ def Append(self, *args, **kwargs): if WX4: - Menu = wx.Menu + RealMenu = wx.Menu +else: + RealMenu = Menu # ---------------------------------------------------------------------------- @@ -58,7 +60,9 @@ class ListCtrl(wx.ListCtrl): if WX4: - ListCtrl = wx.ListCtrl + RealListCtrl = wx.ListCtrl +else: + RealListCtrl = ListCtrl # ---------------------------------------------------------------------------- @@ -70,7 +74,9 @@ class TreeCtrl(wx.TreeCtrl): if WX4: - TreeCtrl = wx.TreeCtrl + RealTreeCtrl = wx.TreeCtrl +else: + RealTreeCtrl = TreeCtrl # wx.ToolBar ----------------------------------------------------------------- @@ -92,6 +98,6 @@ def patchToolBarMethods(toolbar): # Final checks --------------------------------------------------------------- -assert WX3 ^ (Menu is wx.Menu) -assert WX3 ^ (TreeCtrl is wx.TreeCtrl) -assert WX3 ^ (ListCtrl is wx.ListCtrl) +assert WX3 ^ (RealMenu is wx.Menu) +assert WX3 ^ (RealTreeCtrl is wx.TreeCtrl) +assert WX3 ^ (RealListCtrl is wx.ListCtrl) From a3359ef0b1a1b3e1d2a8c4303a804f2d9d9dd632 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 23 Jul 2024 16:56:49 -0600 Subject: [PATCH 02/12] fix bare except --- src/diffpy/pdfgui/gui/plotpanel.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/diffpy/pdfgui/gui/plotpanel.py b/src/diffpy/pdfgui/gui/plotpanel.py index 241f4b48..eab29b06 100644 --- a/src/diffpy/pdfgui/gui/plotpanel.py +++ b/src/diffpy/pdfgui/gui/plotpanel.py @@ -16,8 +16,6 @@ # generated by wxGlade 0.9.3 on Fri Jul 19 16:05:24 2019 -import sys - import wx from diffpy.pdfgui.control.controlerrors import ControlConfigError @@ -167,7 +165,7 @@ def _represent(mixedNames): xvals = _represent(xdata) try: xvals.remove("rw") - except: + except ValueError: pass numericStringSort(xvals) From 383a7aabd083290d799b2736f26b6b50f5abd1bf Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 23 Jul 2024 17:01:40 -0600 Subject: [PATCH 03/12] fix exception with Exception --- src/diffpy/pdfgui/gui/errorwrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffpy/pdfgui/gui/errorwrapper.py b/src/diffpy/pdfgui/gui/errorwrapper.py index a45a55fc..de99d93b 100644 --- a/src/diffpy/pdfgui/gui/errorwrapper.py +++ b/src/diffpy/pdfgui/gui/errorwrapper.py @@ -75,7 +75,7 @@ def _f(*args, **kwargs): return rvpass # Everything else - except: + except Exception: if pdfguiglobals.dbopts.pythondebugger: import pdb From a3e00180788fabcde6d240813470014427af9f74 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 23 Jul 2024 17:06:35 -0600 Subject: [PATCH 04/12] bare exception with wx.PyDeadObjectError --- src/diffpy/pdfgui/gui/phasepanelutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffpy/pdfgui/gui/phasepanelutils.py b/src/diffpy/pdfgui/gui/phasepanelutils.py index 6b4d03af..8459294e 100644 --- a/src/diffpy/pdfgui/gui/phasepanelutils.py +++ b/src/diffpy/pdfgui/gui/phasepanelutils.py @@ -234,7 +234,7 @@ def canPasteIntoCells(panel): # Strip any trailing tabs rowlist = [r.rstrip("\t") for r in rowlist] celllist = [r.split("\t") for r in rowlist] - except: + except wx.PyDeadObjectError: return False if len(celllist) == 0: From eeb06e7072b30964f275caebc55acbf8fdf0accf Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 23 Jul 2024 17:13:50 -0600 Subject: [PATCH 05/12] bare except with Exception --- src/diffpy/pdfgui/gui/fittree.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/diffpy/pdfgui/gui/fittree.py b/src/diffpy/pdfgui/gui/fittree.py index 886a6e61..d82970c2 100644 --- a/src/diffpy/pdfgui/gui/fittree.py +++ b/src/diffpy/pdfgui/gui/fittree.py @@ -356,9 +356,9 @@ def AddFit(self, fitname="Fit 1", cdata=None, paste=False): cdata = self.control.paste(cdata, None, fitname, pos) self.SetControlData(newfit, cdata) return newfit - except: + except Exception: self.Delete(newfit) - raise + raise Exception return def AddPhase(self, node, label, insertafter=None, filename=None, makedata=True, cdata=None): @@ -427,9 +427,9 @@ def AddPhase(self, node, label, insertafter=None, filename=None, makedata=True, elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newphase - except: + except Exception: self.Delete(newphase) - raise + raise Exception return def AddDataSet(self, node, label, insertafter=None, filename=None, makedata=True, cdata=None): @@ -492,9 +492,9 @@ def AddDataSet(self, node, label, insertafter=None, filename=None, makedata=True elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newset - except: + except Exception: self.Delete(newset) - raise + raise Exception return def AddCalc(self, node, label, insertafter=None, makedata=True, cdata=None): @@ -553,9 +553,9 @@ def AddCalc(self, node, label, insertafter=None, makedata=True, cdata=None): elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newcalc - except: + except Exception: self.Delete(newcalc) - raise + raise Exception return def CopyBranch(self, startnode): @@ -611,7 +611,7 @@ def GetClipboard(self): if cdatabytes[:16] == "pdfgui_cliboard=".encode(): cdatabytes = cdatabytes[16:] cdata = pickle_loads(cdatabytes) - except: + except Exception: pass return cdata From 9feb7b4eaf6e47d5c383b22abb8f22cf8d100373 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Thu, 25 Jul 2024 12:33:27 -0600 Subject: [PATCH 06/12] update copyright --- src/diffpy/pdfgui/gui/errorwrapper.py | 2 +- src/diffpy/pdfgui/gui/fittree.py | 2 +- src/diffpy/pdfgui/gui/phasepanelutils.py | 2 +- src/diffpy/pdfgui/gui/plotpanel.py | 2 +- src/diffpy/pdfgui/gui/wxextensions/wx12.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/diffpy/pdfgui/gui/errorwrapper.py b/src/diffpy/pdfgui/gui/errorwrapper.py index de99d93b..031f5c85 100644 --- a/src/diffpy/pdfgui/gui/errorwrapper.py +++ b/src/diffpy/pdfgui/gui/errorwrapper.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. +# (c) 2008-2024 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/fittree.py b/src/diffpy/pdfgui/gui/fittree.py index d82970c2..11f69a2e 100644 --- a/src/diffpy/pdfgui/gui/fittree.py +++ b/src/diffpy/pdfgui/gui/fittree.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. +# (c) 2006-2024 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/phasepanelutils.py b/src/diffpy/pdfgui/gui/phasepanelutils.py index 8459294e..b347d9c7 100644 --- a/src/diffpy/pdfgui/gui/phasepanelutils.py +++ b/src/diffpy/pdfgui/gui/phasepanelutils.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. +# (c) 2006-2024 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/plotpanel.py b/src/diffpy/pdfgui/gui/plotpanel.py index eab29b06..97aec510 100644 --- a/src/diffpy/pdfgui/gui/plotpanel.py +++ b/src/diffpy/pdfgui/gui/plotpanel.py @@ -4,7 +4,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. +# (c) 2006-2024 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/wxextensions/wx12.py b/src/diffpy/pdfgui/gui/wxextensions/wx12.py index ddbc7641..ff878bc5 100644 --- a/src/diffpy/pdfgui/gui/wxextensions/wx12.py +++ b/src/diffpy/pdfgui/gui/wxextensions/wx12.py @@ -2,7 +2,7 @@ ############################################################################## # # diffpy.pdfgui Complex Modeling Initiative -# (c) 2019 Brookhaven Science Associates, +# (c) 2019-2024 Brookhaven Science Associates, # Brookhaven National Laboratory. # All rights reserved. # From 3d8288f613b78f16fcb61dfa825382babc9b6069 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Thu, 25 Jul 2024 14:35:08 -0600 Subject: [PATCH 07/12] restore copyright --- src/diffpy/pdfgui/gui/errorwrapper.py | 2 +- src/diffpy/pdfgui/gui/fittree.py | 2 +- src/diffpy/pdfgui/gui/phasepanelutils.py | 2 +- src/diffpy/pdfgui/gui/plotpanel.py | 2 +- src/diffpy/pdfgui/gui/wxextensions/wx12.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/diffpy/pdfgui/gui/errorwrapper.py b/src/diffpy/pdfgui/gui/errorwrapper.py index 031f5c85..de99d93b 100644 --- a/src/diffpy/pdfgui/gui/errorwrapper.py +++ b/src/diffpy/pdfgui/gui/errorwrapper.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2008-2024 trustees of the Michigan State University. +# (c) 2008 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/fittree.py b/src/diffpy/pdfgui/gui/fittree.py index 11f69a2e..d82970c2 100644 --- a/src/diffpy/pdfgui/gui/fittree.py +++ b/src/diffpy/pdfgui/gui/fittree.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006-2024 trustees of the Michigan State University. +# (c) 2006 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/phasepanelutils.py b/src/diffpy/pdfgui/gui/phasepanelutils.py index b347d9c7..8459294e 100644 --- a/src/diffpy/pdfgui/gui/phasepanelutils.py +++ b/src/diffpy/pdfgui/gui/phasepanelutils.py @@ -3,7 +3,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006-2024 trustees of the Michigan State University. +# (c) 2006 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/plotpanel.py b/src/diffpy/pdfgui/gui/plotpanel.py index 97aec510..eab29b06 100644 --- a/src/diffpy/pdfgui/gui/plotpanel.py +++ b/src/diffpy/pdfgui/gui/plotpanel.py @@ -4,7 +4,7 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006-2024 trustees of the Michigan State University. +# (c) 2006 trustees of the Michigan State University. # All rights reserved. # # File coded by: Chris Farrow diff --git a/src/diffpy/pdfgui/gui/wxextensions/wx12.py b/src/diffpy/pdfgui/gui/wxextensions/wx12.py index ff878bc5..ddbc7641 100644 --- a/src/diffpy/pdfgui/gui/wxextensions/wx12.py +++ b/src/diffpy/pdfgui/gui/wxextensions/wx12.py @@ -2,7 +2,7 @@ ############################################################################## # # diffpy.pdfgui Complex Modeling Initiative -# (c) 2019-2024 Brookhaven Science Associates, +# (c) 2019 Brookhaven Science Associates, # Brookhaven National Laboratory. # All rights reserved. # From c5d73e97fbe6da0d9f0dcae0b3779b99a9337fa8 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 24 Jul 2024 12:47:34 -0600 Subject: [PATCH 08/12] copy .github directory --- workflows/docs.yml | 43 ++++++++++++++++++++++++++++++++ workflows/main.yml | 54 ++++++++++++++++++++++++++++++++++++++++ workflows/pre-commit.yml | 19 ++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 workflows/docs.yml create mode 100644 workflows/main.yml create mode 100644 workflows/pre-commit.yml diff --git a/workflows/docs.yml b/workflows/docs.yml new file mode 100644 index 00000000..2909d67f --- /dev/null +++ b/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Build Documentation + +on: + push: + branches: + - main + release: + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: build + auto-update-conda: true + + - name: install requirements + run: >- + conda install -n build -c conda-forge + --file requirements/build.txt + --file requirements/run.txt + --file requirements/docs.txt + --quiet --yes + + - name: install the package + run: python -m pip install . --no-deps + + - name: build documents + run: make -C doc html + + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/build/html diff --git a/workflows/main.yml b/workflows/main.yml new file mode 100644 index 00000000..81ed769d --- /dev/null +++ b/workflows/main.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - main + - CI + pull_request: + workflow_dispatch: + +jobs: + miniconda: + name: Miniconda ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + steps: + - name: check out diffpy.pdfmorph + uses: actions/checkout@v3 + with: + repository: diffpy/diffpy.pdfmorph + path: . + fetch-depth: 0 # avoid shallow clone with no tags + + - name: initialize miniconda + # this uses a marketplace action that sets up miniconda in a way that makes + # it easier to use. I tried setting it up without this and it was a pain + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: test + # environment.yml file is needed by this action. Because I don't want + # maintain this but rather maintain the requirements files it just has + # basic things in it like conda and pip + environment-file: ./environment.yml + python-version: 3 + auto-activate-base: false + + - name: install diffpy.pdfmorph requirements + shell: bash -l {0} + run: | + conda config --set always_yes yes --set changeps1 no + conda config --add channels conda-forge + conda activate test + conda install --file requirements/run.txt + conda install --file requirements/test.txt + pip install . + - name: Validate diffpy.pdfmorph + shell: bash -l {0} + run: | + conda activate test + coverage run -m pytest -vv -s + coverage report -m + codecov diff --git a/workflows/pre-commit.yml b/workflows/pre-commit.yml new file mode 100644 index 00000000..f2ff7e42 --- /dev/null +++ b/workflows/pre-commit.yml @@ -0,0 +1,19 @@ +name: pre-commit + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + pre-commit: + # pull requests are a duplicate of a branch push if within the same repo. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files From f1530334d9c05805e6baaa91f66c4b6f8a15fbdb Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 24 Jul 2024 12:50:53 -0600 Subject: [PATCH 09/12] nest inside .github --- {workflows => .github/workflows}/docs.yml | 0 {workflows => .github/workflows}/main.yml | 0 {workflows => .github/workflows}/pre-commit.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {workflows => .github/workflows}/docs.yml (100%) rename {workflows => .github/workflows}/main.yml (100%) rename {workflows => .github/workflows}/pre-commit.yml (100%) diff --git a/workflows/docs.yml b/.github/workflows/docs.yml similarity index 100% rename from workflows/docs.yml rename to .github/workflows/docs.yml diff --git a/workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from workflows/main.yml rename to .github/workflows/main.yml diff --git a/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml similarity index 100% rename from workflows/pre-commit.yml rename to .github/workflows/pre-commit.yml From 052adb5278ce17accf285f3f14b5cc6c4c94d578 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 24 Jul 2024 23:41:36 -0600 Subject: [PATCH 10/12] update for pdfgui --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81ed769d..80bbfb71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,10 +16,10 @@ jobs: matrix: os: ["ubuntu-latest"] steps: - - name: check out diffpy.pdfmorph + - name: check out diffpy.pdfgui uses: actions/checkout@v3 with: - repository: diffpy/diffpy.pdfmorph + repository: diffpy/diffpy.pdfgui path: . fetch-depth: 0 # avoid shallow clone with no tags @@ -36,7 +36,7 @@ jobs: python-version: 3 auto-activate-base: false - - name: install diffpy.pdfmorph requirements + - name: install diffpy.pdfgui requirements shell: bash -l {0} run: | conda config --set always_yes yes --set changeps1 no @@ -45,7 +45,7 @@ jobs: conda install --file requirements/run.txt conda install --file requirements/test.txt pip install . - - name: Validate diffpy.pdfmorph + - name: Validate diffpy.pdfgui shell: bash -l {0} run: | conda activate test From 38b37fa16d6a20b004e611459cefabc4f3145bcd Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Fri, 26 Jul 2024 07:50:29 +0200 Subject: [PATCH 11/12] test tests (#131) * pin numpy to 1.x for now * add environment.yml * test tests * trigger * try again with requirements * try again with requirements * now update test reqs * try and handle xwindow display issue * try using xfvb action * refactor xvfb action commands * source activate? * different tack, generate error and work on test? * again * again * chatgpt method * supress running qc of meta.yaml in conda-forge by renaming * try new pyproject.toml * again2 * forgot to install diffpy.pdfgui! * back to setup.py --- .github/workflows/main.yml | 51 +++++++++---------- conda-recipe/{run_test.py => dont_run.py} | 0 .../{meta.yaml => meta.suppress_yaml} | 2 +- environment.yml | 6 +++ requirements/run.txt | 2 +- requirements/test.txt | 2 + run_tests.py | 5 ++ src/diffpy/pdfgui/gui/aboutdialog.py | 4 +- src/diffpy/pdfgui/gui/adddatapanel.py | 1 + 9 files changed, 44 insertions(+), 29 deletions(-) rename conda-recipe/{run_test.py => dont_run.py} (100%) rename conda-recipe/{meta.yaml => meta.suppress_yaml} (96%) create mode 100644 environment.yml create mode 100644 run_tests.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 80bbfb71..e3ade008 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,32 +23,31 @@ jobs: path: . fetch-depth: 0 # avoid shallow clone with no tags - - name: initialize miniconda - # this uses a marketplace action that sets up miniconda in a way that makes - # it easier to use. I tried setting it up without this and it was a pain - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - # environment.yml file is needed by this action. Because I don't want - # maintain this but rather maintain the requirements files it just has - # basic things in it like conda and pip - environment-file: ./environment.yml - python-version: 3 - auto-activate-base: false + - name: Install Mamba + run: | + wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh" -O mambaforge.sh + bash mambaforge.sh -b -p $HOME/mambaforge + echo "$HOME/mambaforge/bin" >> $GITHUB_PATH + source $HOME/mambaforge/etc/profile.d/conda.sh + conda init bash - - name: install diffpy.pdfgui requirements - shell: bash -l {0} + - name: Create conda environment run: | - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - conda activate test - conda install --file requirements/run.txt - conda install --file requirements/test.txt - pip install . - - name: Validate diffpy.pdfgui - shell: bash -l {0} + source $HOME/mambaforge/etc/profile.d/conda.sh + conda create -n test_env python=3.12 xonsh regolith -c conda-forge -y + conda activate test_env + pip install case_insensitive_dict + + - name: Install dependencies run: | - conda activate test - coverage run -m pytest -vv -s - coverage report -m - codecov + source $HOME/mambaforge/etc/profile.d/conda.sh + conda activate test_env + mamba install --file requirements/run.txt + mamba install --file requirements/test.txt + pip install -e . + + - name: Use Xvfb Action + uses: GabrielBB/xvfb-action@v1 + with: + run: | + bash -c "source $HOME/mambaforge/etc/profile.d/conda.sh && conda activate test_env && python -m run_tests.py" diff --git a/conda-recipe/run_test.py b/conda-recipe/dont_run.py similarity index 100% rename from conda-recipe/run_test.py rename to conda-recipe/dont_run.py diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.suppress_yaml similarity index 96% rename from conda-recipe/meta.yaml rename to conda-recipe/meta.suppress_yaml index 2eeff68a..568d0c7d 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.suppress_yaml @@ -54,7 +54,7 @@ test: # entry points work. - # You can also put a file called run_test.py in the recipe that will be run + # You can also put a file called dont_run.py in the recipe that will be run # at test time. # requires: diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..a3904941 --- /dev/null +++ b/environment.yml @@ -0,0 +1,6 @@ +name: diffpy.pdfgui +channels: + - conda-forge +dependencies: + - python=3 + - pip diff --git a/requirements/run.txt b/requirements/run.txt index 10e45f83..40bce3f0 100644 --- a/requirements/run.txt +++ b/requirements/run.txt @@ -1,4 +1,4 @@ -numpy +numpy==1.26 wxpython diffpy.pdffit2 diffpy.utils diff --git a/requirements/test.txt b/requirements/test.txt index 7167f602..628a048a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,2 +1,4 @@ pytest freezegun +coverage +codecov diff --git a/run_tests.py b/run_tests.py new file mode 100644 index 00000000..a2a69494 --- /dev/null +++ b/run_tests.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +import diffpy.pdfgui.tests + +assert diffpy.pdfgui.tests.testdeps().wasSuccessful() diff --git a/src/diffpy/pdfgui/gui/aboutdialog.py b/src/diffpy/pdfgui/gui/aboutdialog.py index 37bd30c7..c71c45b3 100644 --- a/src/diffpy/pdfgui/gui/aboutdialog.py +++ b/src/diffpy/pdfgui/gui/aboutdialog.py @@ -4,6 +4,8 @@ # PDFgui by DANSE Diffraction group # Simon J. L. Billinge # (c) 2006 trustees of the Michigan State University. +# (c) 2024 trustees of the Columbia University in the City +# of New York # All rights reserved. # # File coded by: Dmitriy Bryndin @@ -233,7 +235,7 @@ def onColumbiaLogo(self, event): # wxGlade: DialogAbout. # end of class DialogAbout -##### testing code ########################################################### +# #### testing code ########################################################### if __name__ == "__main__": app = wx.App() diff --git a/src/diffpy/pdfgui/gui/adddatapanel.py b/src/diffpy/pdfgui/gui/adddatapanel.py index 7f5f1407..15cb48ca 100644 --- a/src/diffpy/pdfgui/gui/adddatapanel.py +++ b/src/diffpy/pdfgui/gui/adddatapanel.py @@ -5,6 +5,7 @@ # PDFgui by DANSE Diffraction group # Simon J. L. Billinge # (c) 2006 trustees of the Michigan State University. +# (c) 2024 trustees of the Columbia University in the City # All rights reserved. # # File coded by: Chris Farrow From 6c5423ba76cc497593272e55e5d622089420dd47 Mon Sep 17 00:00:00 2001 From: Caden Myers <158210249+cadenmyers13@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:07:29 -0600 Subject: [PATCH 12/12] copyright fixes (#134) --- src/diffpy/pdfgui/applications/__init__.py | 2 +- src/diffpy/pdfgui/control/structureviewer.py | 2 +- src/diffpy/pdfgui/tests/__init__.py | 2 +- src/diffpy/pdfgui/tests/run.py | 2 +- src/diffpy/pdfgui/tests/rundeps.py | 2 +- src/diffpy/pdfgui/tests/showphasenotebookpanel.py | 2 +- src/diffpy/pdfgui/tests/testutils.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/diffpy/pdfgui/applications/__init__.py b/src/diffpy/pdfgui/applications/__init__.py index d698044f..8bdc5f5a 100644 --- a/src/diffpy/pdfgui/applications/__init__.py +++ b/src/diffpy/pdfgui/applications/__init__.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2009 Trustees of the Columbia University +# (c) 2009-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/control/structureviewer.py b/src/diffpy/pdfgui/control/structureviewer.py index d58def97..85308d10 100644 --- a/src/diffpy/pdfgui/control/structureviewer.py +++ b/src/diffpy/pdfgui/control/structureviewer.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2009 Trustees of the Columbia University +# (c) 2009-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/tests/__init__.py b/src/diffpy/pdfgui/tests/__init__.py index accc2e33..863e9949 100644 --- a/src/diffpy/pdfgui/tests/__init__.py +++ b/src/diffpy/pdfgui/tests/__init__.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University +# (c) 2012-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/tests/run.py b/src/diffpy/pdfgui/tests/run.py index f1bf407e..461d7c01 100644 --- a/src/diffpy/pdfgui/tests/run.py +++ b/src/diffpy/pdfgui/tests/run.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University +# (c) 2012-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/tests/rundeps.py b/src/diffpy/pdfgui/tests/rundeps.py index 0181a83f..9818fc86 100644 --- a/src/diffpy/pdfgui/tests/rundeps.py +++ b/src/diffpy/pdfgui/tests/rundeps.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University +# (c) 2012-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/tests/showphasenotebookpanel.py b/src/diffpy/pdfgui/tests/showphasenotebookpanel.py index 4dfb8cde..71c3f0d3 100644 --- a/src/diffpy/pdfgui/tests/showphasenotebookpanel.py +++ b/src/diffpy/pdfgui/tests/showphasenotebookpanel.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2016 Trustees of the Columbia University +# (c) 2016-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas diff --git a/src/diffpy/pdfgui/tests/testutils.py b/src/diffpy/pdfgui/tests/testutils.py index eb981e2b..70147319 100644 --- a/src/diffpy/pdfgui/tests/testutils.py +++ b/src/diffpy/pdfgui/tests/testutils.py @@ -3,7 +3,7 @@ # # diffpy.pdfgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2016 Trustees of the Columbia University +# (c) 2016-2024 Trustees of the Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas