easyscience 0.0.1a0__tar.gz → 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. easyscience-0.6.0/.gitignore +49 -0
  2. easyscience-0.6.0/LICENSE +29 -0
  3. easyscience-0.6.0/PKG-INFO +116 -0
  4. easyscience-0.6.0/README.md +40 -0
  5. easyscience-0.6.0/pyproject.toml +160 -0
  6. easyscience-0.6.0/src/easyscience/Datasets/__init__.py +6 -0
  7. easyscience-0.6.0/src/easyscience/Datasets/xarray.py +824 -0
  8. easyscience-0.6.0/src/easyscience/Fitting/Constraints.py +492 -0
  9. easyscience-0.6.0/src/easyscience/Fitting/DFO_LS.py +288 -0
  10. easyscience-0.6.0/src/easyscience/Fitting/Fitting.py +473 -0
  11. easyscience-0.6.0/src/easyscience/Fitting/__init__.py +35 -0
  12. easyscience-0.6.0/src/easyscience/Fitting/bumps.py +314 -0
  13. easyscience-0.6.0/src/easyscience/Fitting/fitting_template.py +272 -0
  14. easyscience-0.6.0/src/easyscience/Fitting/lmfit.py +324 -0
  15. easyscience-0.6.0/src/easyscience/Objects/Borg.py +48 -0
  16. easyscience-0.6.0/src/easyscience/Objects/Graph.py +339 -0
  17. easyscience-0.6.0/src/easyscience/Objects/Groups.py +250 -0
  18. easyscience-0.6.0/src/easyscience/Objects/Inferface.py +228 -0
  19. easyscience-0.6.0/src/easyscience/Objects/Job/Analysis.py +21 -0
  20. easyscience-0.6.0/src/easyscience/Objects/Job/Experiment.py +21 -0
  21. easyscience-0.6.0/src/easyscience/Objects/Job/Job.py +86 -0
  22. easyscience-0.6.0/src/easyscience/Objects/Job/Theory.py +24 -0
  23. easyscience-0.6.0/src/easyscience/Objects/ObjectClasses.py +345 -0
  24. easyscience-0.6.0/src/easyscience/Objects/Variable.py +863 -0
  25. easyscience-0.6.0/src/easyscience/Objects/__init__.py +6 -0
  26. easyscience-0.6.0/src/easyscience/Objects/core.py +134 -0
  27. easyscience-0.6.0/src/easyscience/Objects/virtual.py +200 -0
  28. easyscience-0.6.0/src/easyscience/REDIRECT.py +9 -0
  29. easyscience-0.6.0/src/easyscience/Utils/Exceptions.py +15 -0
  30. easyscience-0.6.0/src/easyscience/Utils/Hugger/Hugger.py +224 -0
  31. easyscience-0.6.0/src/easyscience/Utils/Hugger/Property.py +272 -0
  32. easyscience-0.6.0/src/easyscience/Utils/Hugger/__init__.py +6 -0
  33. easyscience-0.6.0/src/easyscience/Utils/Logging.py +37 -0
  34. easyscience-0.6.0/src/easyscience/Utils/UndoRedo.py +491 -0
  35. easyscience-0.6.0/src/easyscience/Utils/__init__.py +6 -0
  36. easyscience-0.6.0/src/easyscience/Utils/classTools.py +72 -0
  37. easyscience-0.6.0/src/easyscience/Utils/classUtils.py +97 -0
  38. easyscience-0.6.0/src/easyscience/Utils/decorators.py +103 -0
  39. easyscience-0.6.0/src/easyscience/Utils/io/__init__.py +6 -0
  40. easyscience-0.6.0/src/easyscience/Utils/io/dict.py +128 -0
  41. easyscience-0.6.0/src/easyscience/Utils/io/json.py +171 -0
  42. easyscience-0.6.0/src/easyscience/Utils/io/star.py +520 -0
  43. easyscience-0.6.0/src/easyscience/Utils/io/template.py +302 -0
  44. easyscience-0.6.0/src/easyscience/Utils/io/xml.py +177 -0
  45. easyscience-0.6.0/src/easyscience/Utils/string.py +48 -0
  46. easyscience-0.6.0/src/easyscience/Utils/typing.py +14 -0
  47. easyscience-0.6.0/src/easyscience/__init__.py +18 -0
  48. easyscience-0.6.0/src/easyscience/__version__.py +1 -0
  49. easyscience-0.6.0/src/easyscience/models/__init__.py +6 -0
  50. easyscience-0.6.0/src/easyscience/models/polynomial.py +102 -0
  51. easyscience-0.0.1a0/PKG-INFO +0 -5
  52. easyscience-0.0.1a0/easyscience.egg-info/PKG-INFO +0 -5
  53. easyscience-0.0.1a0/easyscience.egg-info/SOURCES.txt +0 -6
  54. easyscience-0.0.1a0/easyscience.egg-info/dependency_links.txt +0 -1
  55. easyscience-0.0.1a0/easyscience.egg-info/top_level.txt +0 -1
  56. easyscience-0.0.1a0/pyproject.toml +0 -7
  57. easyscience-0.0.1a0/setup.cfg +0 -4
  58. {easyscience-0.0.1a0/easyscience → easyscience-0.6.0/src/easyscience/Objects/Job}/__init__.py +0 -0
@@ -0,0 +1,49 @@
1
+ # QtCreator
2
+ *.autosave
3
+
4
+ # QtCreator Qml
5
+ *.qmlproject.user
6
+ *.qmlproject.user.*
7
+
8
+ # QtCreator Python
9
+ *.pyproject.user
10
+ *.pyproject.user.*
11
+
12
+ # QtCreator CMake
13
+ CMakeLists.txt.user*
14
+
15
+ # Python
16
+ __pycache__
17
+ .venv
18
+ .coverage
19
+ .pyc
20
+
21
+ # Poetry
22
+ dist
23
+ poetry.lock
24
+ *.egg-info
25
+
26
+ # PyInstaller
27
+ build
28
+ *.spec
29
+
30
+ # Jupyter
31
+ .ipynb_checkpoints
32
+
33
+ # macOS
34
+ .DS_Store
35
+ *.app
36
+ *.dmg
37
+
38
+ # Docs
39
+ docs/_build
40
+
41
+ # VSCode
42
+ .vscode
43
+
44
+ # Misc
45
+ ..*
46
+ *.log
47
+ *.zip
48
+ .ci/
49
+ .idea/
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Easyscience contributors (https://github.com/EasyScience)
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.1
2
+ Name: EasyScience
3
+ Version: 0.6.0
4
+ Summary: Generic logic for easyScience libraries
5
+ Project-URL: homepage, https://docs.easyscience.org
6
+ Project-URL: documentation, https://docs.easyscience.org
7
+ Author: EasyScience contributors
8
+ License: BSD 3-Clause License
9
+
10
+ Copyright (c) 2024, Easyscience contributors (https://github.com/EasyScience)
11
+ All rights reserved.
12
+
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ 1. Redistributions of source code must retain the above copyright notice, this
17
+ list of conditions and the following disclaimer.
18
+
19
+ 2. Redistributions in binary form must reproduce the above copyright notice,
20
+ this list of conditions and the following disclaimer in the documentation
21
+ and/or other materials provided with the distribution.
22
+
23
+ 3. Neither the name of the copyright holder nor the names of its
24
+ contributors may be used to endorse or promote products derived from
25
+ this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
+ License-File: LICENSE
38
+ Classifier: Development Status :: 3 - Alpha
39
+ Classifier: License :: OSI Approved :: BSD License
40
+ Classifier: Operating System :: OS Independent
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Programming Language :: Python :: 3 :: Only
43
+ Classifier: Programming Language :: Python :: 3.8
44
+ Classifier: Programming Language :: Python :: 3.9
45
+ Classifier: Programming Language :: Python :: 3.10
46
+ Classifier: Programming Language :: Python :: 3.11
47
+ Classifier: Programming Language :: Python :: 3.12
48
+ Classifier: Topic :: Scientific/Engineering
49
+ Requires-Python: <3.12,>=3.8
50
+ Requires-Dist: asteval
51
+ Requires-Dist: bumps
52
+ Requires-Dist: dfo-ls
53
+ Requires-Dist: lmfit
54
+ Requires-Dist: numpy
55
+ Requires-Dist: pint
56
+ Requires-Dist: uncertainties
57
+ Requires-Dist: xarray
58
+ Provides-Extra: dev
59
+ Requires-Dist: build; extra == 'dev'
60
+ Requires-Dist: codecov; extra == 'dev'
61
+ Requires-Dist: flake8; extra == 'dev'
62
+ Requires-Dist: matplotlib; extra == 'dev'
63
+ Requires-Dist: pytest; extra == 'dev'
64
+ Requires-Dist: pytest-cov; extra == 'dev'
65
+ Requires-Dist: ruff; extra == 'dev'
66
+ Requires-Dist: tox-gh-actions; extra == 'dev'
67
+ Provides-Extra: docs
68
+ Requires-Dist: doc8; extra == 'docs'
69
+ Requires-Dist: readme-renderer; extra == 'docs'
70
+ Requires-Dist: sphinx; extra == 'docs'
71
+ Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
72
+ Requires-Dist: sphinx-gallery; extra == 'docs'
73
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
74
+ Requires-Dist: toml; extra == 'docs'
75
+ Description-Content-Type: text/markdown
76
+
77
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
78
+ [![PyPI badge](http://img.shields.io/pypi/v/EasyScience.svg)](https://pypi.python.org/pypi/EasyScience)
79
+ [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)
80
+
81
+ # Easyscience
82
+
83
+ ## About
84
+
85
+ EasyScience package is the foundation of the EasyScience family of projects, providing the building blocks for libraries and applications
86
+ which aim to make scientific data simulation and analysis easier.
87
+
88
+ ## Install
89
+
90
+ **EasyScience** can be downloaded using pip:
91
+
92
+ ```pip install easyscience```
93
+
94
+ Or direct from the repository:
95
+
96
+ ```pip install https://github.com/easyScience/EasyScience```
97
+
98
+ ## Test
99
+
100
+ After installation, launch the test suite:
101
+
102
+ ```python -m pytest```
103
+
104
+ ## Documentation
105
+
106
+ Documentation can be found at:
107
+
108
+ [https://easyScience.github.io/EasyScience](https://easyScience.github.io/EasyScience)
109
+
110
+ ## Contributing
111
+ We absolutely welcome contributions. **EasyScience** is maintained by the ESS and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas.
112
+
113
+ ## License
114
+ While **EasyScience** is under the BSD-3 license, DFO_LS is subject to the GPL license.
115
+
116
+
@@ -0,0 +1,40 @@
1
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
2
+ [![PyPI badge](http://img.shields.io/pypi/v/EasyScience.svg)](https://pypi.python.org/pypi/EasyScience)
3
+ [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)
4
+
5
+ # Easyscience
6
+
7
+ ## About
8
+
9
+ EasyScience package is the foundation of the EasyScience family of projects, providing the building blocks for libraries and applications
10
+ which aim to make scientific data simulation and analysis easier.
11
+
12
+ ## Install
13
+
14
+ **EasyScience** can be downloaded using pip:
15
+
16
+ ```pip install easyscience```
17
+
18
+ Or direct from the repository:
19
+
20
+ ```pip install https://github.com/easyScience/EasyScience```
21
+
22
+ ## Test
23
+
24
+ After installation, launch the test suite:
25
+
26
+ ```python -m pytest```
27
+
28
+ ## Documentation
29
+
30
+ Documentation can be found at:
31
+
32
+ [https://easyScience.github.io/EasyScience](https://easyScience.github.io/EasyScience)
33
+
34
+ ## Contributing
35
+ We absolutely welcome contributions. **EasyScience** is maintained by the ESS and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas.
36
+
37
+ ## License
38
+ While **EasyScience** is under the BSD-3 license, DFO_LS is subject to the GPL license.
39
+
40
+
@@ -0,0 +1,160 @@
1
+ [build-system]
2
+ requires = [
3
+ "hatchling<=1.21.0",
4
+ "setuptools-git-versioning",
5
+ ]
6
+ build-backend = "hatchling.build"
7
+
8
+ [tool.setuptools-git-versioning]
9
+ enabled = true
10
+
11
+ [project]
12
+ name = "EasyScience"
13
+ dynamic = ["version"]
14
+ description = "Generic logic for easyScience libraries"
15
+ readme = "README.md"
16
+ authors = [{name = "EasyScience contributors"}]
17
+ license = { file = "LICENSE" }
18
+ classifiers = [
19
+ "License :: OSI Approved :: BSD License",
20
+ "Operating System :: OS Independent",
21
+ "Topic :: Scientific/Engineering",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Programming Language :: Python :: 3.8",
25
+ "Programming Language :: Python :: 3.9",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Development Status :: 3 - Alpha"
30
+ ]
31
+ requires-python = ">=3.8,<3.12"
32
+ dependencies = [
33
+ "asteval",
34
+ "bumps",
35
+ "DFO-LS",
36
+ "lmfit",
37
+ "numpy",
38
+ "pint",
39
+ "uncertainties",
40
+ "xarray"
41
+ ]
42
+
43
+ [project.optional-dependencies]
44
+ dev = [
45
+ "build",
46
+ "codecov",
47
+ "flake8",
48
+ "matplotlib",
49
+ "pytest",
50
+ "pytest-cov",
51
+ "ruff",
52
+ "tox-gh-actions"
53
+ ]
54
+ docs = [
55
+ "doc8",
56
+ "readme-renderer",
57
+ "Sphinx",
58
+ "sphinx-rtd-theme",
59
+ "sphinx-autodoc-typehints",
60
+ "sphinx-gallery",
61
+ "toml"
62
+ ]
63
+
64
+ [project.urls]
65
+ homepage = "https://docs.easyscience.org"
66
+ documentation = "https://docs.easyscience.org"
67
+
68
+ [tool.hatch.version]
69
+ path = "src/easyscience/__version__.py"
70
+
71
+ [tool.hatch.metadata]
72
+ allow-direct-references = true
73
+
74
+ [tool.hatch.build.targets.sdist]
75
+ packages = ["src"]
76
+
77
+ [tool.hatch.build.targets.wheel]
78
+ packages = ["src/easyscience"]
79
+
80
+ [tool.coverage.run]
81
+ source = ["src/easyscience"]
82
+
83
+ [tool.github.info]
84
+ organization = 'easyScience'
85
+ repo = "easyscience"
86
+
87
+ [tool.ruff]
88
+ line-length = 127
89
+ exclude = [
90
+ "docs",
91
+ "examples_old",
92
+ "tests"
93
+ ]
94
+
95
+ [tool.ruff.format]
96
+ quote-style = "single"
97
+
98
+ [tool.ruff.per-file-ignores]
99
+ # allow asserts in test files
100
+ "*test_*.py" = ["S101"]
101
+
102
+ [tool.ruff.lint]
103
+ ignore-init-module-imports = true
104
+ select = [
105
+ # flake8 settings from existing CI setup
106
+ "E9", "F63", "F7", "F82",
107
+ # Code should be polished to fulfill all cases below
108
+ # https://docs.astral.sh/ruff/rules/
109
+ # pycodestyle
110
+ "E",
111
+ # Pyflakes
112
+ "F",
113
+ # pyupgrade
114
+ # "UP",
115
+ # flake8-bugbear
116
+ # "B",
117
+ # flake8-simplify
118
+ # "SIM",
119
+ # isort
120
+ "I",
121
+ # flake8-bandit
122
+ "S",
123
+ ]
124
+
125
+ [tool.ruff.lint.isort]
126
+ force-single-line = true
127
+
128
+ [tool.tox]
129
+ legacy_tox_ini = """
130
+ [tox]
131
+ isolated_build = True
132
+ envlist = py{3.8,3.9,3.10,3.11,3.12}
133
+ [gh-actions]
134
+ python =
135
+ 3.8: py38
136
+ 3.9: py39
137
+ 3.10: py310
138
+ 3.11: py311
139
+ 3.12: py312
140
+ [gh-actions:env]
141
+ PLATFORM =
142
+ ubuntu-latest: linux
143
+ macos-latest: macos
144
+ windows-latest: windows
145
+ [testenv]
146
+ passenv =
147
+ CI
148
+ GITHUB_ACTIONS
149
+ GITHUB_ACTION
150
+ GITHUB_REF
151
+ GITHUB_REPOSITORY
152
+ GITHUB_HEAD_REF
153
+ GITHUB_RUN_ID
154
+ GITHUB_SHA
155
+ COVERAGE_FILE
156
+ deps = coverage
157
+ commands =
158
+ pip install -e '.[dev]'
159
+ pytest --cov --cov-report=xml
160
+ """
@@ -0,0 +1,6 @@
1
+ # SPDX-FileCopyrightText: 2023 EasyScience contributors <core@easyscience.software>
2
+ # SPDX-License-Identifier: BSD-3-Clause
3
+ # © 2021-2023 Contributors to the EasyScience project <https://github.com/easyScience/EasyScience
4
+
5
+ __author__ = "github.com/wardsimon"
6
+ __version__ = "0.1.0"