Skip to content

Commit

Permalink
rename src folder to EasyReflectometryLib, scipp version
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Dec 18, 2023
1 parent 5e423ca commit 6f38581
Show file tree
Hide file tree
Showing 48 changed files with 111 additions and 111 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import yaml
from easyCore import np
from easyCore.Objects.ObjectClasses import Parameter, BaseObj
from EasyReflectometry.sample.structure import Structure
from EasyReflectometry.sample.item import MultiLayer, RepeatingMultiLayer
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometryLib.sample.structure import Structure
from EasyReflectometryLib.sample.item import MultiLayer, RepeatingMultiLayer
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers

LAYER_DETAILS = {
'scale': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml
from easyCore.Objects.Groups import BaseCollection
from EasyReflectometry.experiment.model import Model
from EasyReflectometryLib.experiment.model import Model


class Models(BaseCollection):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from easyCore.Fitting.Fitting import MultiFitter as easyFitter

from EasyReflectometry.experiment.model import Model
from EasyReflectometryLib.experiment.model import Model


class Fitter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = "github.com/wardsimon"

from EasyReflectometry.interfaces import InterfaceTemplate
from EasyReflectometryLib.interfaces import InterfaceTemplate
from easyCore.Objects.Inferface import InterfaceFactoryTemplate


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import traceback

try:
from EasyReflectometry.interfaces.refnx import Refnx # noqa: F401
from EasyReflectometryLib.interfaces.refnx import Refnx # noqa: F401
except Exception:
traceback.print_exc()
print('Warning: refnx is not installed')
Expand All @@ -16,11 +16,11 @@
# print('Warning: BornAgain python is not installed')

try:
from EasyReflectometry.interfaces.refl1d import Refl1d # noqa: F401
from EasyReflectometryLib.interfaces.refl1d import Refl1d # noqa: F401
except Exception:
traceback.print_exc()
print('Warning: refl1d is not installed')

from EasyReflectometry.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometryLib.interfaces.interfaceTemplate import InterfaceTemplate

_ = InterfaceTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import numpy as np

from easyCore.Objects.Inferface import ItemContainer
from EasyReflectometry.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometry.calculators.bornagain import BornAgain as BornAgain_calc
from EasyReflectometry.sample.material import Material, MaterialMixture
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.item import MultiLayer
from EasyReflectometry.experiment.model import Model
from EasyReflectometryLib.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometryLib.calculators.bornagain import BornAgain as BornAgain_calc
from EasyReflectometryLib.sample.material import Material, MaterialMixture
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.item import MultiLayer
from EasyReflectometryLib.experiment.model import Model


class BornAgain(InterfaceTemplate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import numpy as np

from easyCore.Objects.Inferface import ItemContainer
from EasyReflectometry.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometry.calculators.refl1d import Refl1d as Refl1d_calc
from EasyReflectometry.sample.material import Material, MaterialMixture
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.item import MultiLayer
from EasyReflectometry.experiment.model import Model
from EasyReflectometryLib.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometryLib.calculators.refl1d import Refl1d as Refl1d_calc
from EasyReflectometryLib.sample.material import Material, MaterialMixture
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.item import MultiLayer
from EasyReflectometryLib.experiment.model import Model


class Refl1d(InterfaceTemplate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import numpy as np

from easyCore.Objects.Inferface import ItemContainer
from EasyReflectometry.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometry.calculators.refnx import Refnx as Refnx_calc
from EasyReflectometry.sample.material import Material, MaterialMixture
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.item import MultiLayer
from EasyReflectometry.experiment.model import Model
from EasyReflectometryLib.interfaces.interfaceTemplate import InterfaceTemplate
from EasyReflectometryLib.calculators.refnx import Refnx as Refnx_calc
from EasyReflectometryLib.sample.material import Material, MaterialMixture
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.item import MultiLayer
from EasyReflectometryLib.experiment.model import Model


class Refnx(InterfaceTemplate):
Expand Down
2 changes: 1 addition & 1 deletion EasyReflectometry/main.py → EasyReflectometryLib/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.interface import InterfaceFactory


def main():
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import yaml

from easyCore.Objects.ObjectClasses import BaseObj
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers


class MultiLayer(BaseObj):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from typing import Union, List

from easyCore.Objects.ObjectClasses import Parameter
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers
from .multilayer import MultiLayer

REPEATINGMULTILAYER_DETAILS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from easyCore.Fitting.Constraints import ObjConstraint
from easyCore.Objects.ObjectClasses import Parameter
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import LayerApm
from EasyReflectometry.sample.layers import Layers
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import LayerApm
from EasyReflectometryLib.sample.layers import Layers
from .multilayer import MultiLayer


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from easyCore.Objects.ObjectClasses import Parameter, BaseObj
from easyCore.Fitting.Constraints import FunctionalConstraint

from EasyReflectometry.sample.material import Material, MaterialMixture
from EasyReflectometry.special.calculations import neutron_scattering_length, apm_to_sld
from EasyReflectometryLib.sample.material import Material, MaterialMixture
from EasyReflectometryLib.special.calculations import neutron_scattering_length, apm_to_sld

LAYER_DETAILS = {
'thickness': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml
from easyCore.Objects.Groups import BaseCollection
from EasyReflectometry.sample.layer import Layer
from EasyReflectometryLib.sample.layer import Layer


class Layers(BaseCollection):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from easyCore.Objects.ObjectClasses import Parameter, BaseObj
from easyCore.Fitting.Constraints import FunctionalConstraint

from EasyReflectometry.special.calculations import (weighted_average_sld,
from EasyReflectometryLib.special.calculations import (weighted_average_sld,
neutron_scattering_length,
molecular_weight, density_to_sld)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml
from easyCore.Objects.Groups import BaseCollection
from EasyReflectometry.sample.material import Material, MaterialMixture
from EasyReflectometryLib.sample.material import Material, MaterialMixture


class Materials(BaseCollection):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import yaml
from easyCore.Objects.Groups import BaseCollection
from EasyReflectometry.sample.item import MultiLayer
from EasyReflectometry.sample.layer import Layer
from EasyReflectometryLib.sample.item import MultiLayer
from EasyReflectometryLib.sample.layer import Layer


class Structure(BaseCollection):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import periodictable as pt
from easyCore.Objects.ObjectClasses import Parameter

from EasyReflectometry.special.parsing import parse_formula
from EasyReflectometryLib.special.parsing import parse_formula


def weighted_average_sld(a: Parameter, b: Parameter, p: Parameter) -> Parameter:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import sys
sys.path.insert(0, os.path.abspath('..'))

import EasyReflectometry
import EasyReflectometryLib

# -- General configuration ---------------------------------------------

Expand Down Expand Up @@ -69,9 +69,9 @@
# the built documents.
#
# The short X.Y version.
version = EasyReflectometry.__version__
version = EasyReflectometryLib.__version__
# The full version, including alpha/beta/rc tags.
release = EasyReflectometry.__version__
release = EasyReflectometryLib.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling<=1.18.0"]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -28,7 +28,7 @@ dependencies = [
"easyScienceCore @ git+https://github.com/easyscience/easycore.git@failed_unit_check",
"refnx>=0.1.15",
"refl1d>=0.8.14",
"scipp==0.13.0",
"scipp==23.08.0",
"orsopy>=0.0.4"
]

Expand Down
2 changes: 1 addition & 1 deletion tests/calculators/test_refl1d_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.calculators.refl1d import Refl1d
from EasyReflectometryLib.calculators.refl1d import Refl1d
from refl1d import names


Expand Down
2 changes: 1 addition & 1 deletion tests/calculators/test_refnx_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.calculators.refnx import Refnx
from EasyReflectometryLib.calculators.refnx import Refnx
from refnx import reflect


Expand Down
14 changes: 7 additions & 7 deletions tests/experiment/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.experiment.model import Model
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometry.sample.item import RepeatingMultiLayer, MultiLayer
from EasyReflectometry.sample.structure import Structure
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.experiment.model import Model
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers
from EasyReflectometryLib.sample.item import RepeatingMultiLayer, MultiLayer
from EasyReflectometryLib.sample.structure import Structure
from EasyReflectometryLib.interface import InterfaceFactory


class TestModel(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/interfaces/test_refl1d_inter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.interfaces.refl1d import Refl1d
from EasyReflectometry.sample.material import Material
from EasyReflectometryLib.interfaces.refl1d import Refl1d
from EasyReflectometryLib.sample.material import Material


class TestRefl1d(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/interfaces/test_refnx_inter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.interfaces.refnx import Refnx
from EasyReflectometry.sample.material import Material
from EasyReflectometryLib.interfaces.refnx import Refnx
from EasyReflectometryLib.sample.material import Material


class TestRefnx(unittest.TestCase):
Expand Down
10 changes: 5 additions & 5 deletions tests/sample/items/test_multilayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, assert_raises
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometry.sample.item import MultiLayer
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers
from EasyReflectometryLib.sample.item import MultiLayer
from EasyReflectometryLib.interface import InterfaceFactory


class TestMultiLayer(unittest.TestCase):
Expand Down
10 changes: 5 additions & 5 deletions tests/sample/items/test_repeating_multilayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, assert_raises
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometry.sample.item import RepeatingMultiLayer
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers
from EasyReflectometryLib.sample.item import RepeatingMultiLayer
from EasyReflectometryLib.interface import InterfaceFactory

class TestRepeatingMultiLayer(unittest.TestCase):

Expand Down
10 changes: 5 additions & 5 deletions tests/sample/items/test_surfactant_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import unittest
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, assert_raises
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import Layer
from EasyReflectometry.sample.layers import Layers
from EasyReflectometry.sample.item import RepeatingMultiLayer, MultiLayer, SurfactantLayer
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import Layer
from EasyReflectometryLib.sample.layers import Layers
from EasyReflectometryLib.sample.item import RepeatingMultiLayer, MultiLayer, SurfactantLayer
from EasyReflectometryLib.interface import InterfaceFactory


class TestSurfactantLayer(unittest.TestCase):
Expand Down
8 changes: 4 additions & 4 deletions tests/sample/test_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import os
import unittest
from EasyReflectometry.special.calculations import apm_to_sld, neutron_scattering_length
from EasyReflectometryLib.special.calculations import apm_to_sld, neutron_scattering_length
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.layer import Layer, LayerApm
from EasyReflectometry.interface import InterfaceFactory
from EasyReflectometryLib.sample.material import Material
from EasyReflectometryLib.sample.layer import Layer, LayerApm
from EasyReflectometryLib.interface import InterfaceFactory


class TestLayer(unittest.TestCase):
Expand Down
Loading

0 comments on commit 6f38581

Please sign in to comment.