chemekit 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.
- chemekit-0.1.0/LICENSE +21 -0
- chemekit-0.1.0/PKG-INFO +71 -0
- chemekit-0.1.0/README.md +41 -0
- chemekit-0.1.0/pyproject.toml +47 -0
- chemekit-0.1.0/setup.cfg +4 -0
- chemekit-0.1.0/src/chemekit/__init__.py +19 -0
- chemekit-0.1.0/src/chemekit/py.typed +0 -0
- chemekit-0.1.0/src/chemekit/strings.py +64 -0
- chemekit-0.1.0/src/chemekit.egg-info/PKG-INFO +71 -0
- chemekit-0.1.0/src/chemekit.egg-info/SOURCES.txt +13 -0
- chemekit-0.1.0/src/chemekit.egg-info/dependency_links.txt +1 -0
- chemekit-0.1.0/src/chemekit.egg-info/requires.txt +6 -0
- chemekit-0.1.0/src/chemekit.egg-info/top_level.txt +1 -0
- chemekit-0.1.0/tests/test_basic.py +14 -0
- chemekit-0.1.0/tests/test_strings.py +39 -0
chemekit-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Your Name
|
|
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.
|
chemekit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chemekit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python toolkit for chemistry-related operations
|
|
5
|
+
Author-email: Your Name <your.email@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/yourusername/chemekit
|
|
8
|
+
Project-URL: Repository, https://github.com/yourusername/chemekit
|
|
9
|
+
Project-URL: Issues, https://github.com/yourusername/chemekit/issues
|
|
10
|
+
Keywords: chemistry,toolkit,chemekit
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
27
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# Chemekit
|
|
32
|
+
|
|
33
|
+
A Python toolkit for chemistry-related operations.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install chemekit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For development:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install -e ".[dev]"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
import chemekit
|
|
51
|
+
|
|
52
|
+
print(chemekit.__version__)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
Run tests:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pytest
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Build package:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python -m build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
chemekit-0.1.0/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Chemekit
|
|
2
|
+
|
|
3
|
+
A Python toolkit for chemistry-related operations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install chemekit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
For development:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install -e ".[dev]"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
import chemekit
|
|
21
|
+
|
|
22
|
+
print(chemekit.__version__)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
Run tests:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pytest
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Build package:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
python -m build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "chemekit"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A Python toolkit for chemistry-related operations"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Your Name", email = "your.email@example.com" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["chemistry", "toolkit", "chemekit"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Chemistry",
|
|
27
|
+
]
|
|
28
|
+
dependencies = []
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=7.0",
|
|
33
|
+
"pytest-cov>=4.0",
|
|
34
|
+
"build>=1.0",
|
|
35
|
+
"twine>=4.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Homepage = "https://github.com/yourusername/chemekit"
|
|
40
|
+
Repository = "https://github.com/yourusername/chemekit"
|
|
41
|
+
Issues = "https://github.com/yourusername/chemekit/issues"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.packages.find]
|
|
44
|
+
where = ["src"]
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
testpaths = ["tests"]
|
chemekit-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Chemekit - A Python toolkit for chemistry-related operations."""
|
|
2
|
+
|
|
3
|
+
from chemekit.strings import (
|
|
4
|
+
camel_to_snake,
|
|
5
|
+
capitalize_words,
|
|
6
|
+
remove_extra_spaces,
|
|
7
|
+
reverse_string,
|
|
8
|
+
snake_to_camel,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.0"
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"camel_to_snake",
|
|
15
|
+
"capitalize_words",
|
|
16
|
+
"remove_extra_spaces",
|
|
17
|
+
"reverse_string",
|
|
18
|
+
"snake_to_camel",
|
|
19
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""String processing utilities for chemekit."""
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def reverse_string(s: str) -> str:
|
|
7
|
+
"""Return the reversed version of the input string.
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
s: The string to reverse.
|
|
11
|
+
|
|
12
|
+
Returns:
|
|
13
|
+
The reversed string.
|
|
14
|
+
"""
|
|
15
|
+
return s[::-1]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def capitalize_words(s: str) -> str:
|
|
19
|
+
"""Capitalize the first letter of each word in the string.
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
s: The input string.
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
A string with each word capitalized.
|
|
26
|
+
"""
|
|
27
|
+
return " ".join(word.capitalize() for word in s.split())
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def remove_extra_spaces(s: str) -> str:
|
|
31
|
+
"""Collapse multiple spaces/tabs/newlines into a single space and trim.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
s: The input string.
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
A cleaned string with no leading/trailing or duplicate spaces.
|
|
38
|
+
"""
|
|
39
|
+
return re.sub(r"\s+", " ", s).strip()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def camel_to_snake(s: str) -> str:
|
|
43
|
+
"""Convert a camelCase string to snake_case.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
s: A camelCase string.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
The snake_case representation.
|
|
50
|
+
"""
|
|
51
|
+
return re.sub(r"(?<!^)(?=[A-Z])", "_", s).lower()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def snake_to_camel(s: str) -> str:
|
|
55
|
+
"""Convert a snake_case string to camelCase.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
s: A snake_case string.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
The camelCase representation.
|
|
62
|
+
"""
|
|
63
|
+
parts = s.split("_")
|
|
64
|
+
return parts[0] + "".join(p.capitalize() for p in parts[1:])
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chemekit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python toolkit for chemistry-related operations
|
|
5
|
+
Author-email: Your Name <your.email@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/yourusername/chemekit
|
|
8
|
+
Project-URL: Repository, https://github.com/yourusername/chemekit
|
|
9
|
+
Project-URL: Issues, https://github.com/yourusername/chemekit/issues
|
|
10
|
+
Keywords: chemistry,toolkit,chemekit
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
27
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# Chemekit
|
|
32
|
+
|
|
33
|
+
A Python toolkit for chemistry-related operations.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install chemekit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For development:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install -e ".[dev]"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
import chemekit
|
|
51
|
+
|
|
52
|
+
print(chemekit.__version__)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
Run tests:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pytest
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Build package:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python -m build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/chemekit/__init__.py
|
|
5
|
+
src/chemekit/py.typed
|
|
6
|
+
src/chemekit/strings.py
|
|
7
|
+
src/chemekit.egg-info/PKG-INFO
|
|
8
|
+
src/chemekit.egg-info/SOURCES.txt
|
|
9
|
+
src/chemekit.egg-info/dependency_links.txt
|
|
10
|
+
src/chemekit.egg-info/requires.txt
|
|
11
|
+
src/chemekit.egg-info/top_level.txt
|
|
12
|
+
tests/test_basic.py
|
|
13
|
+
tests/test_strings.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
chemekit
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Basic tests for chemekit package."""
|
|
2
|
+
|
|
3
|
+
import chemekit
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_version():
|
|
7
|
+
"""Test that the package has a version attribute."""
|
|
8
|
+
assert hasattr(chemekit, "__version__")
|
|
9
|
+
assert chemekit.__version__ == "0.1.0"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_import():
|
|
13
|
+
"""Test that the package can be imported."""
|
|
14
|
+
assert chemekit is not None
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Tests for chemekit.string utilities."""
|
|
2
|
+
|
|
3
|
+
from chemekit.strings import (
|
|
4
|
+
camel_to_snake,
|
|
5
|
+
capitalize_words,
|
|
6
|
+
remove_extra_spaces,
|
|
7
|
+
reverse_string,
|
|
8
|
+
snake_to_camel,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_reverse_string():
|
|
13
|
+
assert reverse_string("hello") == "olleh"
|
|
14
|
+
assert reverse_string("") == ""
|
|
15
|
+
assert reverse_string("a") == "a"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_capitalize_words():
|
|
19
|
+
assert capitalize_words("hello world") == "Hello World"
|
|
20
|
+
assert capitalize_words(" foo bar ") == "Foo Bar"
|
|
21
|
+
assert capitalize_words("") == ""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_remove_extra_spaces():
|
|
25
|
+
assert remove_extra_spaces(" hello world ") == "hello world"
|
|
26
|
+
assert remove_extra_spaces("a\tb\n\nc") == "a b c"
|
|
27
|
+
assert remove_extra_spaces("") == ""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def test_camel_to_snake():
|
|
31
|
+
assert camel_to_snake("camelCase") == "camel_case"
|
|
32
|
+
assert camel_to_snake("HTMLElement") == "html_element"
|
|
33
|
+
assert camel_to_snake("simple") == "simple"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_snake_to_camel():
|
|
37
|
+
assert snake_to_camel("snake_case") == "snakeCase"
|
|
38
|
+
assert snake_to_camel("already_camel_case") == "alreadyCamelCase"
|
|
39
|
+
assert snake_to_camel("nodashes") == "nodashes"
|