sentropy 0.1.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 (40) hide show
  1. sentropy-0.1.0/.coveragerc +10 -0
  2. sentropy-0.1.0/.github/workflows/tests.yml +38 -0
  3. sentropy-0.1.0/.gitignore +134 -0
  4. sentropy-0.1.0/LICENSE +21 -0
  5. sentropy-0.1.0/PKG-INFO +675 -0
  6. sentropy-0.1.0/README.md +649 -0
  7. sentropy-0.1.0/S_2b_df_after_removing_zero_abundance_species.csv +9 -0
  8. sentropy-0.1.0/images/diversity_logo.png +0 -0
  9. sentropy-0.1.0/images/fig2_thumbnail.png +0 -0
  10. sentropy-0.1.0/images/fruits-1.png +0 -0
  11. sentropy-0.1.0/pyproject.toml +40 -0
  12. sentropy-0.1.0/src/sentropy/__init__.py +10 -0
  13. sentropy-0.1.0/src/sentropy/__main__.py +73 -0
  14. sentropy-0.1.0/src/sentropy/abundance.py +184 -0
  15. sentropy-0.1.0/src/sentropy/backend.py +468 -0
  16. sentropy-0.1.0/src/sentropy/components.py +52 -0
  17. sentropy-0.1.0/src/sentropy/exceptions.py +29 -0
  18. sentropy-0.1.0/src/sentropy/log.py +26 -0
  19. sentropy-0.1.0/src/sentropy/parameters.py +150 -0
  20. sentropy-0.1.0/src/sentropy/powermean.py +81 -0
  21. sentropy-0.1.0/src/sentropy/ray.py +231 -0
  22. sentropy-0.1.0/src/sentropy/sentropy.py +221 -0
  23. sentropy-0.1.0/src/sentropy/set.py +292 -0
  24. sentropy-0.1.0/src/sentropy/similarity.py +317 -0
  25. sentropy-0.1.0/src/sentropy/tests/S_2b_df_after_removing_zero_abundance_species.csv +9 -0
  26. sentropy-0.1.0/src/sentropy/tests/base_tests/abundance_test.py +255 -0
  27. sentropy-0.1.0/src/sentropy/tests/base_tests/backend_test.py +199 -0
  28. sentropy-0.1.0/src/sentropy/tests/base_tests/components_test.py +43 -0
  29. sentropy-0.1.0/src/sentropy/tests/base_tests/main_test.py +203 -0
  30. sentropy-0.1.0/src/sentropy/tests/base_tests/parameters_test.py +32 -0
  31. sentropy-0.1.0/src/sentropy/tests/base_tests/powermean_test.py +321 -0
  32. sentropy-0.1.0/src/sentropy/tests/base_tests/sentropy_test.py +136 -0
  33. sentropy-0.1.0/src/sentropy/tests/base_tests/set_test.py +661 -0
  34. sentropy-0.1.0/src/sentropy/tests/base_tests/similarity_test.py +915 -0
  35. sentropy-0.1.0/src/sentropy/tests/base_tests/test_material/S_2b.csv +10 -0
  36. sentropy-0.1.0/src/sentropy/tests/base_tests/test_material/counts_2b_1.csv +10 -0
  37. sentropy-0.1.0/src/sentropy/tests/base_tests/test_material/counts_2b_2.csv +10 -0
  38. sentropy-0.1.0/src/sentropy/tests/mockray.py +57 -0
  39. sentropy-0.1.0/src/sentropy/tests/mockray_test.py +31 -0
  40. sentropy-0.1.0/src/sentropy/tests/ray_test.py +337 -0
@@ -0,0 +1,10 @@
1
+ [report]
2
+ exclude_lines =
3
+ # Skip which are passed (e.g., lines used in @abstractmethod)
4
+ pass
5
+
6
+ # Have to re-enable the standard pragma
7
+ pragma: no cover
8
+
9
+ # Don't complain if non-runnable code isn't run:
10
+ if __name__ == .__main__.:
@@ -0,0 +1,38 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths-ignore:
8
+ - '**/README.md'
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ paths-ignore:
13
+ - '**/README.md'
14
+
15
+ jobs:
16
+ test-basic-and-ray:
17
+ runs-on: ${{ matrix.os}}
18
+ strategy:
19
+ matrix:
20
+ os: [macos-latest, ubuntu-latest, windows-latest]
21
+ python-version: ['3.9', '3.10', '3.11']
22
+
23
+ steps:
24
+ - name: checkout repository
25
+ uses: actions/checkout@v3
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v3
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ - name: Install dependencies
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ pip install -e ".[tests, ray]"
34
+ - name: Run tests
35
+ run: |
36
+ pytest src/sentropy/tests
37
+
38
+
@@ -0,0 +1,134 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ *.DS_Store*
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ pip-wheel-metadata/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
97
+ __pypackages__/
98
+
99
+ # Celery stuff
100
+ celerybeat-schedule
101
+ celerybeat.pid
102
+
103
+ # SageMath parsed files
104
+ *.sage.py
105
+
106
+ # Environments
107
+ .env
108
+ .venv
109
+ env/
110
+ venv/
111
+ ENV/
112
+ env.bak/
113
+ venv.bak/
114
+
115
+ # Spyder project settings
116
+ .spyderproject
117
+ .spyproject
118
+
119
+ # Rope project settings
120
+ .ropeproject
121
+
122
+ # mkdocs documentation
123
+ /site
124
+
125
+ # mypy
126
+ .mypy_cache/
127
+ .dmypy.json
128
+ dmypy.json
129
+
130
+ # Pyre type checker
131
+ .pyre/
132
+
133
+ log.ipynb
134
+ .vscode
sentropy-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Elliot Hill
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.