Skip to content

chore: bring code up to latest group standards #113

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

Merged
merged 60 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
31695bc
chore: move tests
sbillinge Jun 14, 2025
b93adc8
Merge pull request #106 from sbillinge/mv-tests
sbillinge Jun 14, 2025
66dc962
fix: rename all test files to pytest standard
sbillinge Jun 15, 2025
4a00cb8
fix: rename test_data back to testdata and import utils locally
sbillinge Jun 15, 2025
72b4958
fix: change error raised by badly formed input for numpy.add operator…
sbillinge Jun 15, 2025
10b91b5
Merge pull request #107 from sbillinge/rename-testfiles
sbillinge Jun 15, 2025
7b6d45e
chore: requirements and new version infrastructure updated
sbillinge Jun 15, 2025
66ef58d
Merge pull request #108 from sbillinge/skp1
sbillinge Jun 15, 2025
2f1aabe
chore: news and doc make
sbillinge Jun 15, 2025
78eece9
chore: initial commit of doc/source
sbillinge Jun 15, 2025
4e26021
Merge pull request #109 from sbillinge/move-docs
sbillinge Jun 15, 2025
613e037
chore: add new img, snippets etc.
sbillinge Jun 15, 2025
6a57d3f
chore: move over doc/source files
sbillinge Jun 15, 2025
2c732c1
chore:move over doc images
sbillinge Jun 15, 2025
4729b43
Merge pull request #110 from sbillinge/mv-docs2
sbillinge Jun 15, 2025
a9e8989
chore: delete conda-recipe, setup.py and devutils from git database
sbillinge Jun 15, 2025
5c068f3
chore: update all the inits
sbillinge Jun 15, 2025
4f03fbd
chore: add new files from skpkg to database
sbillinge Jun 15, 2025
b0008f2
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 15, 2025
67adf1e
Merge pull request #111 from sbillinge/sp2
sbillinge Jun 15, 2025
cfb732d
chore: adding all skpkg files and removing unwanted files from the db
sbillinge Jun 15, 2025
3580b81
fix: update authors and changelog
sbillinge Jun 15, 2025
81bac08
chore: licenses and manifest
sbillinge Jun 15, 2025
ac3011f
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 15, 2025
901cf6f
chore: readme blended
sbillinge Jun 15, 2025
474d217
Merge branch 'sp3' of github.com:sbillinge/diffpy.srfit into sp3
sbillinge Jun 15, 2025
e223401
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 15, 2025
ae9d65f
Merge pull request #112 from sbillinge/sp3
sbillinge Jun 15, 2025
9232638
chore: codespell
sbillinge Jun 15, 2025
bb4f92d
Merge pull request #114 from sbillinge/codespell
sbillinge Jun 15, 2025
c12a58a
fix: version.py now working again
sbillinge Jun 15, 2025
93ff368
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 15, 2025
a23f8de
fix: test_sas working with skipping features
sbillinge Jun 19, 2025
b1f6369
merging init file
sbillinge Jun 19, 2025
e54ef40
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 19, 2025
2338ba4
tests: test_builder.py passing all tests
sbillinge Jun 19, 2025
685df37
merging pre-commit changes. test_builder.py now passing tests
sbillinge Jun 19, 2025
4ddf81e
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 19, 2025
9c825ec
tests: characteristicfunctions and contribution
sbillinge Jun 19, 2025
b791c52
tests: diffpyparset
sbillinge Jun 19, 2025
f51ee43
Merge branch 'pkg_resources' of github.com:sbillinge/diffpy.srfit int…
sbillinge Jun 19, 2025
c2dc20e
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jun 19, 2025
be7eeb6
tests: equation.py
sbillinge Jun 19, 2025
f27ab7a
tests: fitrecipe
sbillinge Jun 19, 2025
8e0376a
tests: fitresults
sbillinge Jun 19, 2025
760bc0d
Merge branch 'pkg_resources' of github.com:sbillinge/diffpy.srfit int…
sbillinge Jun 19, 2025
632798e
tests pdf
sbillinge Jun 19, 2025
fb5001a
tests: profile
sbillinge Jun 19, 2025
59a56c7
tests: recipeorganizer
sbillinge Jun 19, 2025
f144bae
tests: objcrystparset and sgconstraints passing locally
sbillinge Jun 25, 2025
cb65f54
tests: visitors and speed. added sympy requirement to test
sbillinge Jun 25, 2025
191fe7d
Merge pull request #116 from sbillinge/pkg_resources
sbillinge Jun 25, 2025
9046255
flake8: equation
sbillinge Jun 25, 2025
09a11ee
removed unused fixture from conftest.py
sbillinge Jun 25, 2025
5980b00
style: line lengths in src
sbillinge Jun 26, 2025
a0eeed1
lambdas in tests
sbillinge Jun 26, 2025
f44dde2
style: last few lambdas etc
sbillinge Jun 26, 2025
dd7b99a
style: no ##'s in the docs examples to make flake8 happy
sbillinge Jun 26, 2025
0726694
fix: correct call of functions in filter in recipeorganizer.py
sbillinge Jun 26, 2025
75f570d
Merge pull request #117 from sbillinge/flake8
sbillinge Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/diffpy/srfit/equation/literals/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Operator(Literal, OperatorABC):
"""Abstract class for specifying a general operator.

This class provides several methods that are common to a derived
classes for concrete concrete operations.
classes for concrete operations.

Class Attributes
----------------
Expand Down
4 changes: 2 additions & 2 deletions tests/testbuilder.py → tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import diffpy.srfit.equation.builder as builder
import diffpy.srfit.equation.literals as literals
from diffpy.srfit.tests.utils import _makeArgs
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import _makeArgs
from .utils import noObserversInGlobalBuilders


class TestBuilder(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy

from diffpy.srfit.tests.utils import has_sas, _msg_nosas
from .utils import has_sas, _msg_nosas
from diffpy.srfit.sas.sasimport import sasimport

# Global variables to be assigned in setUp
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/testcontribution.py → tests/test_contribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.fitbase.parameter import Parameter
from diffpy.srfit.exceptions import SrFitError
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import noObserversInGlobalBuilders


class TestContribution(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testdiffpyparset.py → tests/test_diffpyparset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import numpy

from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import has_structure, _msg_nostructure

# Global variables to be assigned in setUp
Atom = Lattice = Structure = DiffpyStructureParSet = None
Expand Down
4 changes: 2 additions & 2 deletions tests/testequation.py → tests/test_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import diffpy.srfit.equation.literals as literals
from diffpy.srfit.equation import Equation
from diffpy.srfit.tests.utils import _makeArgs
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import _makeArgs
from .utils import noObserversInGlobalBuilders


class TestEquation(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testfitrecipe.py → tests/test_fitrecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from diffpy.srfit.fitbase.fitcontribution import FitContribution
from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.fitbase.parameter import Parameter
from diffpy.srfit.tests.utils import capturestdout
from .utils import capturestdout


class TestFitRecipe(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testfitresults.py → tests/test_fitresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from diffpy.srfit.fitbase.fitrecipe import FitRecipe
from diffpy.srfit.fitbase.fitresults import initializeRecipe
from diffpy.srfit.tests.utils import datafile
from .utils import datafile


class TestInitializeRecipe(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/testliterals.py → tests/test_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def testAddLiteral(self):
"""Test adding a literal to an operator node."""
op = self.op

self.assertRaises(ValueError, op.getValue)
self.assertRaises(TypeError, op.getValue)
op._value = 1
self.assertEqual(op.getValue(), 1)

Expand All @@ -127,7 +127,7 @@ def testAddLiteral(self):
b = literals.Argument(name = "b", value = 0)

op.addLiteral(a)
self.assertRaises(ValueError, op.getValue)
self.assertRaises(TypeError, op.getValue)

op.addLiteral(b)
self.assertAlmostEqual(0, op.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy

from diffpy.srfit.tests.utils import has_pyobjcryst, _msg_nopyobjcryst
from .utils import has_pyobjcryst, _msg_nopyobjcryst

# Global variables to be assigned in setUp
ObjCrystCrystalParSet = spacegroups = None
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/testpdf.py → tests/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import numpy

from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_srreal, _msg_nosrreal
from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import datafile
from .utils import has_srreal, _msg_nosrreal
from .utils import has_structure, _msg_nostructure
from diffpy.srfit.pdf import PDFGenerator, PDFParser, PDFContribution
from diffpy.srfit.exceptions import SrFitError

Expand Down
2 changes: 1 addition & 1 deletion tests/testprofile.py → tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.exceptions import SrFitError
from diffpy.srfit.tests.utils import datafile
from .utils import datafile


class TestProfile(unittest.TestCase):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from diffpy.srfit.fitbase.recipeorganizer import equationFromString
from diffpy.srfit.fitbase.recipeorganizer import RecipeContainer
from diffpy.srfit.fitbase.recipeorganizer import RecipeOrganizer
from diffpy.srfit.tests.utils import capturestdout
from .utils import capturestdout

import numpy

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testsas.py → tests/test_sas.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import numpy

from diffpy.srfit.sas import SASGenerator, SASParser, SASProfile
from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_sas, _msg_nosas
from .utils import datafile
from .utils import has_sas, _msg_nosas
from diffpy.srfit.sas.sasimport import sasimport

# ----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions tests/testsgconstraints.py → tests/test_sgconstraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

import numpy

from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_pyobjcryst, _msg_nopyobjcryst
from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import datafile
from .utils import has_pyobjcryst, _msg_nopyobjcryst
from .utils import has_structure, _msg_nostructure

# ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion tests/speedtest.py → tests/test_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import diffpy.srfit.equation.visitors as visitors
import diffpy.srfit.equation.literals as literals

from diffpy.srfit.tests.utils import _makeArgs
from .utils import _makeArgs

x = numpy.arange(0, 20, 0.05)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testvisitors.py → tests/test_visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import diffpy.srfit.equation.visitors as visitors
import diffpy.srfit.equation.literals as literals
from diffpy.srfit.tests.utils import _makeArgs
from .utils import _makeArgs

class TestValidator(unittest.TestCase):

Expand Down Expand Up @@ -194,7 +194,7 @@ def testSimpleFunction(self):
self.assertTrue(plus2.hasObserver(mult._flush))

# plus2 has no arguments yet. Verify this.
self.assertRaises(ValueError, mult.getValue)
self.assertRaises(TypeError, mult.getValue)
# Add the arguments to plus2.
plus2.addLiteral(v4)
plus2.addLiteral(v5)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import diffpy.srfit.equation.literals as literals
from diffpy.srfit.sas.sasimport import sasimport
from diffpy.srfit.tests import logger
from . import logger


# Resolve availability of optional third-party packages.
Expand Down