memoryframes 0.1.5__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.
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.3
2
+ Name: memoryframes
3
+ Version: 0.1.5
4
+ Summary: Add your description here
5
+ Author: David Brownell
6
+ Author-email: David Brownell <github@DavidBrownell.com>
7
+ License: MIT
8
+ Classifier: Operating System :: MacOS
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Requires-Python: >=3.10
17
+ Project-URL: Documentation, https://github.com/davidbrownell/MemoryFrames
18
+ Project-URL: Homepage, https://github.com/davidbrownell/MemoryFrames
19
+ Project-URL: Repository, https://github.com/davidbrownell/MemoryFrames
20
+ Description-Content-Type: text/markdown
21
+
22
+ **Project:**
23
+ [![License](https://img.shields.io/github/license/davidbrownell/MemoryFrames?color=dark-green)](https://github.com/davidbrownell/MemoryFrames/blob/master/LICENSE)
24
+
25
+ **Package:**
26
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/MemoryFrames?color=dark-green)](https://pypi.org/project/MemoryFrames/)
27
+ [![PyPI - Version](https://img.shields.io/pypi/v/MemoryFrames?color=dark-green)](https://pypi.org/project/MemoryFrames/)
28
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/MemoryFrames)](https://pypistats.org/packages/memoryframes)
29
+
30
+ **Development:**
31
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
32
+ [![CI](https://github.com/davidbrownell/MemoryFrames/actions/workflows/CICD.yml/badge.svg)](https://github.com/davidbrownell/MemoryFrames/actions/workflows/CICD.yml)
33
+ [![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/davidbrownell/f15146b1b8fdc0a5d45ac0eb786a84f7/raw/MemoryFrames_code_coverage.json)](https://github.com/davidbrownell/MemoryFrames/actions)
34
+ [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/davidbrownell/MemoryFrames?color=dark-green)](https://github.com/davidbrownell/MemoryFrames/commits/main/)
35
+
36
+ <!-- Content above this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
37
+
38
+ ## Contents
39
+ - [Overview](#overview)
40
+ - [Installation](#installation)
41
+ - [Development](#development)
42
+ - [Additional Information](#additional-information)
43
+ - [License](#license)
44
+
45
+ ## Overview
46
+ TODO: Complete this section
47
+
48
+ ### How to use `MemoryFrames`
49
+ TODO: Complete this section
50
+
51
+ <!-- Content below this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
52
+
53
+ ## Installation
54
+
55
+ | Installation Method | Command |
56
+ | --- | --- |
57
+ | Via [uv](https://github.com/astral-sh/uv) | `uv add MemoryFrames` |
58
+ | Via [pip](https://pip.pypa.io/en/stable/) | `pip install MemoryFrames` |
59
+
60
+ ### Verifying Signed Artifacts
61
+ Artifacts are signed and verified using [py-minisign](https://github.com/x13a/py-minisign) and the public key in the file `./minisign_key.pub`.
62
+
63
+ To verify that an artifact is valid, visit [the latest release](https://github.com/davidbrownell/MemoryFrames/releases/latest) and download the `.minisign` signature file that corresponds to the artifact, then run the following command, replacing `<filename>` with the name of the artifact to be verified:
64
+
65
+ ```shell
66
+ uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>'); print('The file has been verified.')"
67
+ ```
68
+
69
+ ## Development
70
+ Please visit [Contributing](https://github.com/davidbrownell/MemoryFrames/blob/main/CONTRIBUTING.md) and [Development](https://github.com/davidbrownell/MemoryFrames/blob/main/DEVELOPMENT.md) for information on contributing to this project.
71
+
72
+ ## Additional Information
73
+ Additional information can be found at these locations.
74
+
75
+ | Title | Document | Description |
76
+ | --- | --- | --- |
77
+ | Code of Conduct | [CODE_OF_CONDUCT.md](https://github.com/davidbrownell/MemoryFrames/blob/main/CODE_OF_CONDUCT.md) | Information about the norms, rules, and responsibilities we adhere to when participating in this open source community. |
78
+ | Contributing | [CONTRIBUTING.md](https://github.com/davidbrownell/MemoryFrames/blob/main/CONTRIBUTING.md) | Information about contributing to this project. |
79
+ | Development | [DEVELOPMENT.md](https://github.com/davidbrownell/MemoryFrames/blob/main/DEVELOPMENT.md) | Information about development activities involved in making changes to this project. |
80
+ | Governance | [GOVERNANCE.md](https://github.com/davidbrownell/MemoryFrames/blob/main/GOVERNANCE.md) | Information about how this project is governed. |
81
+ | Maintainers | [MAINTAINERS.md](https://github.com/davidbrownell/MemoryFrames/blob/main/MAINTAINERS.md) | Information about individuals who maintain this project. |
82
+ | Security | [SECURITY.md](https://github.com/davidbrownell/MemoryFrames/blob/main/SECURITY.md) | Information about how to privately report security issues associated with this project. |
83
+
84
+ ## License
85
+ `MemoryFrames` is licensed under the <a href="https://choosealicense.com/licenses/MIT/" target="_blank">MIT</a> license.
@@ -0,0 +1,64 @@
1
+ **Project:**
2
+ [![License](https://img.shields.io/github/license/davidbrownell/MemoryFrames?color=dark-green)](https://github.com/davidbrownell/MemoryFrames/blob/master/LICENSE)
3
+
4
+ **Package:**
5
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/MemoryFrames?color=dark-green)](https://pypi.org/project/MemoryFrames/)
6
+ [![PyPI - Version](https://img.shields.io/pypi/v/MemoryFrames?color=dark-green)](https://pypi.org/project/MemoryFrames/)
7
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/MemoryFrames)](https://pypistats.org/packages/memoryframes)
8
+
9
+ **Development:**
10
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
11
+ [![CI](https://github.com/davidbrownell/MemoryFrames/actions/workflows/CICD.yml/badge.svg)](https://github.com/davidbrownell/MemoryFrames/actions/workflows/CICD.yml)
12
+ [![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/davidbrownell/f15146b1b8fdc0a5d45ac0eb786a84f7/raw/MemoryFrames_code_coverage.json)](https://github.com/davidbrownell/MemoryFrames/actions)
13
+ [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/davidbrownell/MemoryFrames?color=dark-green)](https://github.com/davidbrownell/MemoryFrames/commits/main/)
14
+
15
+ <!-- Content above this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
16
+
17
+ ## Contents
18
+ - [Overview](#overview)
19
+ - [Installation](#installation)
20
+ - [Development](#development)
21
+ - [Additional Information](#additional-information)
22
+ - [License](#license)
23
+
24
+ ## Overview
25
+ TODO: Complete this section
26
+
27
+ ### How to use `MemoryFrames`
28
+ TODO: Complete this section
29
+
30
+ <!-- Content below this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
31
+
32
+ ## Installation
33
+
34
+ | Installation Method | Command |
35
+ | --- | --- |
36
+ | Via [uv](https://github.com/astral-sh/uv) | `uv add MemoryFrames` |
37
+ | Via [pip](https://pip.pypa.io/en/stable/) | `pip install MemoryFrames` |
38
+
39
+ ### Verifying Signed Artifacts
40
+ Artifacts are signed and verified using [py-minisign](https://github.com/x13a/py-minisign) and the public key in the file `./minisign_key.pub`.
41
+
42
+ To verify that an artifact is valid, visit [the latest release](https://github.com/davidbrownell/MemoryFrames/releases/latest) and download the `.minisign` signature file that corresponds to the artifact, then run the following command, replacing `<filename>` with the name of the artifact to be verified:
43
+
44
+ ```shell
45
+ uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>'); print('The file has been verified.')"
46
+ ```
47
+
48
+ ## Development
49
+ Please visit [Contributing](https://github.com/davidbrownell/MemoryFrames/blob/main/CONTRIBUTING.md) and [Development](https://github.com/davidbrownell/MemoryFrames/blob/main/DEVELOPMENT.md) for information on contributing to this project.
50
+
51
+ ## Additional Information
52
+ Additional information can be found at these locations.
53
+
54
+ | Title | Document | Description |
55
+ | --- | --- | --- |
56
+ | Code of Conduct | [CODE_OF_CONDUCT.md](https://github.com/davidbrownell/MemoryFrames/blob/main/CODE_OF_CONDUCT.md) | Information about the norms, rules, and responsibilities we adhere to when participating in this open source community. |
57
+ | Contributing | [CONTRIBUTING.md](https://github.com/davidbrownell/MemoryFrames/blob/main/CONTRIBUTING.md) | Information about contributing to this project. |
58
+ | Development | [DEVELOPMENT.md](https://github.com/davidbrownell/MemoryFrames/blob/main/DEVELOPMENT.md) | Information about development activities involved in making changes to this project. |
59
+ | Governance | [GOVERNANCE.md](https://github.com/davidbrownell/MemoryFrames/blob/main/GOVERNANCE.md) | Information about how this project is governed. |
60
+ | Maintainers | [MAINTAINERS.md](https://github.com/davidbrownell/MemoryFrames/blob/main/MAINTAINERS.md) | Information about individuals who maintain this project. |
61
+ | Security | [SECURITY.md](https://github.com/davidbrownell/MemoryFrames/blob/main/SECURITY.md) | Information about how to privately report security issues associated with this project. |
62
+
63
+ ## License
64
+ `MemoryFrames` is licensed under the <a href="https://choosealicense.com/licenses/MIT/" target="_blank">MIT</a> license.
@@ -0,0 +1,96 @@
1
+ [project]
2
+ name = "MemoryFrames"
3
+ version = "0.1.5"
4
+ # ^^^^^
5
+ # Wheel names will be generated according to this value. Do not manually modify this value; instead
6
+ # update it according to committed changes by running this command from the root of the repository:
7
+ #
8
+ # uv run python -m AutoGitSemVer.scripts.UpdatePythonVersion ./pyproject.toml ./src
9
+
10
+ description = "Add your description here"
11
+ readme = "README.md"
12
+ authors = [
13
+ { name = "David Brownell", email = "github@DavidBrownell.com" }
14
+ ]
15
+ requires-python = ">= 3.10"
16
+ dependencies = []
17
+ classifiers = [
18
+ "Operating System :: MacOS",
19
+ "Operating System :: Microsoft :: Windows",
20
+ "Operating System :: POSIX :: Linux",
21
+ "Programming Language :: Python",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.10",
26
+ ]
27
+
28
+ [project.license]
29
+ text = "MIT"
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/davidbrownell/MemoryFrames"
33
+ Documentation = "https://github.com/davidbrownell/MemoryFrames"
34
+ Repository = "https://github.com/davidbrownell/MemoryFrames"
35
+
36
+ [build-system]
37
+ requires = ["uv_build>=0.8.15,<0.9.0"]
38
+ build-backend = "uv_build"
39
+
40
+ [dependency-groups]
41
+ dev = [
42
+ "autogitsemver>=0.9.2",
43
+ "pre-commit>=4.2.0",
44
+ "py-minisign>=0.12.0",
45
+ "pytest>=8.4.1",
46
+ "pytest-cov>=6.2.1",
47
+ "ruff>=0.12.3",
48
+ ]
49
+
50
+ [tool.pytest.ini_options]
51
+ addopts = "--verbose -vv --capture=no --cov=MemoryFrames --cov-report html --cov-report term --cov-report xml:coverage.xml --cov-fail-under=95.0"
52
+ python_files = [
53
+ "**/*Test.py",
54
+ ]
55
+
56
+ [tool.ruff]
57
+ line-length = 110
58
+
59
+ [tool.ruff.lint]
60
+ exclude = ["tests/**"]
61
+
62
+ select = ["ALL"]
63
+
64
+ ignore = [
65
+ "ANN002", # Missing type annotation for `*args`
66
+ "ANN003", # Missing type annotation for `**kwargs`
67
+ "BLE001", # Do not catch blind exception: `Exception`
68
+ "COM812", # Trailing comma missing
69
+ "D105", # Missing docstring in magic method
70
+ "D107", # Missing docstring in `__init__` method
71
+ "D202", # No blank lines allowed after function docstring
72
+ "E501", # Line too long
73
+ "FIX002", # Line contains TODO, consider resolving the issue
74
+ "I001", # Import block is un-sorted or un-formatted
75
+ "N802", # Function name `xxx` should be lowercase
76
+ "N999", # Invalid module name
77
+ "RSE102", # Unnecessary parentheses on raise exception
78
+ "S101", # Use of assert detected
79
+ "TC006", # Add quotes to type expression in `typing.cast()`
80
+ "TD002", # Missing author in TODO
81
+ "TD003", # Missing issue link for this TODO
82
+ "TRY002", # Create your own exception
83
+ "TRY300", # Consider moving this statement to an `else` block
84
+ "UP032", # Use f-string instead of `format` call
85
+ ]
86
+
87
+ [tool.ruff.lint.mccabe]
88
+ max-complexity = 15
89
+
90
+ [tool.ruff.lint.pylint]
91
+ max-args = 10
92
+ max-branches = 20
93
+ max-returns = 20
94
+
95
+ [tool.uv.build-backend]
96
+ module-name = "MemoryFrames"
@@ -0,0 +1,85 @@
1
+ """An example of how to create scripts that can be invoked from the command line once the package is installed."""
2
+
3
+ import sys
4
+
5
+ import typer
6
+
7
+ from typer.core import TyperGroup # type: ignore [import-untyped]
8
+
9
+ from MemoryFrames import Math, __version__
10
+
11
+
12
+ # ----------------------------------------------------------------------
13
+ class NaturalOrderGrouper(TyperGroup): # noqa: D101
14
+ # ----------------------------------------------------------------------
15
+ def list_commands(self, *args, **kwargs) -> list[str]: # noqa: ARG002, D102
16
+ return list(self.commands.keys()) # pragma: no cover
17
+
18
+
19
+ # ----------------------------------------------------------------------
20
+ app = typer.Typer(
21
+ cls=NaturalOrderGrouper,
22
+ help=__doc__,
23
+ no_args_is_help=True,
24
+ pretty_exceptions_show_locals=False,
25
+ pretty_exceptions_enable=False,
26
+ )
27
+
28
+
29
+ # ----------------------------------------------------------------------
30
+ @app.command("Add")
31
+ def Add(
32
+ x: int,
33
+ y: int,
34
+ ) -> None:
35
+ """Add 2 values."""
36
+
37
+ sys.stdout.write(str(Math.Add(x, y)))
38
+
39
+
40
+ # ----------------------------------------------------------------------
41
+ @app.command("Sub")
42
+ def Sub(
43
+ x: int,
44
+ y: int,
45
+ ) -> None:
46
+ """Subtract 2 values."""
47
+
48
+ sys.stdout.write(str(Math.Sub(x, y)))
49
+
50
+
51
+ # ----------------------------------------------------------------------
52
+ @app.command("Mult")
53
+ def Mult(
54
+ x: int,
55
+ y: int,
56
+ ) -> None:
57
+ """Multiplie 2 values."""
58
+
59
+ sys.stdout.write(str(Math.Mult(x, y)))
60
+
61
+
62
+ # ----------------------------------------------------------------------
63
+ @app.command("Div")
64
+ def Div(
65
+ x: int,
66
+ y: int,
67
+ ) -> None:
68
+ """Divide 1 value by another."""
69
+
70
+ sys.stdout.write(str(Math.Div(x, y)))
71
+
72
+
73
+ # ----------------------------------------------------------------------
74
+ @app.command("Version")
75
+ def Version() -> None:
76
+ """Print the version of the package."""
77
+
78
+ sys.stdout.write(__version__)
79
+
80
+
81
+ # ----------------------------------------------------------------------
82
+ # ----------------------------------------------------------------------
83
+ # ----------------------------------------------------------------------
84
+ if __name__ == "__main__":
85
+ app() # pragma: no cover
@@ -0,0 +1,21 @@
1
+ """Basic math functions. This file illustrates how to create a python package that contains functions that can be invoked by other python code."""
2
+
3
+
4
+ # ----------------------------------------------------------------------
5
+ def Add(x, y): # noqa: ANN001, ANN201, D103
6
+ return x + y
7
+
8
+
9
+ # ----------------------------------------------------------------------
10
+ def Sub(x, y): # noqa: ANN001, ANN201, D103
11
+ return x - y
12
+
13
+
14
+ # ----------------------------------------------------------------------
15
+ def Mult(x, y): # noqa: ANN001, ANN201, D103
16
+ return x * y
17
+
18
+
19
+ # ----------------------------------------------------------------------
20
+ def Div(x, y): # noqa: ANN001, ANN201, D103
21
+ return x / y
@@ -0,0 +1,15 @@
1
+ # noqa: D104
2
+
3
+ from importlib.metadata import version
4
+
5
+ from .Math import Add, Sub, Mult, Div
6
+
7
+
8
+ __all__ = [
9
+ "Add",
10
+ "Div",
11
+ "Mult",
12
+ "Sub",
13
+ ]
14
+
15
+ __version__ = version("MemoryFrames")
File without changes