Skip to content

pkg resources #116

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 21 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
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
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from pathlib import Path

import pytest

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


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -113,6 +113,7 @@ def _datafile(filename):

return _datafile


@pytest.fixture(scope="session")
def make_args():
def _makeArgs(num):
Expand All @@ -121,8 +122,10 @@ def _makeArgs(num):
j = i + 1
args.append(literals.Argument(name="v%i" % j, value=j))
return args

return _makeArgs


@pytest.fixture(scope="session")
def noObserversInGlobalBuilders():
def _noObserversInGlobalBuilders():
Expand All @@ -139,4 +142,5 @@ def _noObserversInGlobalBuilders():
rv = False
break
return rv

return _noObserversInGlobalBuilders()
6 changes: 5 additions & 1 deletion tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def testRegisterArg(make_args, noObserversInGlobalBuilders):
assert noObserversInGlobalBuilders
return


def testRegisterOperator(make_args, noObserversInGlobalBuilders):
"""Try to use an operator without arguments in an equation."""

Expand Down Expand Up @@ -80,6 +81,7 @@ def testRegisterOperator(make_args, noObserversInGlobalBuilders):
assert noObserversInGlobalBuilders
return


def testSwapping(make_args, noObserversInGlobalBuilders):

def g1(v1, v2, v3, v4):
Expand Down Expand Up @@ -140,6 +142,7 @@ def g2(v1):
assert noObserversInGlobalBuilders
return


def testParseEquation(noObserversInGlobalBuilders):

from numpy import array_equal, divide, e, sin, sqrt
Expand Down Expand Up @@ -172,7 +175,6 @@ def testParseEquation(noObserversInGlobalBuilders):
f = lambda x, sigma: sqrt(e ** (-0.5 * (x / sigma) ** 2))
assert numpy.allclose(eq(), f(x, sigma))


assert eq.args == [eq.x, eq.sigma]

# Equation with constants
Expand All @@ -193,6 +195,7 @@ def testParseEquation(noObserversInGlobalBuilders):
assert noObserversInGlobalBuilders
return


def test_parse_constant():
"""Verify parsing of constant numeric expressions."""
factory = builder.EquationFactory()
Expand All @@ -204,6 +207,7 @@ def test_parse_constant():
eq(3)
return


def testBuildEquation(noObserversInGlobalBuilders):

from numpy import array_equal
Expand Down
2 changes: 0 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
# Helper functions for testing -----------------------------------------------




def capturestdout(f, *args, **kwargs):
"""Capture the standard output from a call of function f."""
savestdout = sys.stdout
Expand Down
Loading