ingot-sql 0.1.0__tar.gz → 0.7.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 (38) hide show
  1. ingot_sql-0.7.0/PKG-INFO +75 -0
  2. ingot_sql-0.7.0/README.md +51 -0
  3. ingot_sql-0.7.0/ingot_sql/__init__.py +11 -0
  4. ingot_sql-0.7.0/ingot_sql/__main__.py +17 -0
  5. ingot_sql-0.7.0/ingot_sql/logging/__init__.py +25 -0
  6. ingot_sql-0.7.0/ingot_sql/project.py +21 -0
  7. ingot_sql-0.7.0/ingot_sql/py.typed +0 -0
  8. ingot_sql-0.7.0/ingot_sql/settings/__init__.py +14 -0
  9. ingot_sql-0.7.0/ingot_sql/settings/configs.py +13 -0
  10. ingot_sql-0.7.0/pyproject.toml +167 -0
  11. ingot_sql-0.7.0/pyproject.toml.orig +144 -0
  12. ingot-sql-0.1.0/CHANGELOG.md +0 -12
  13. ingot-sql-0.1.0/MANIFEST.in +0 -7
  14. ingot-sql-0.1.0/PKG-INFO +0 -126
  15. ingot-sql-0.1.0/README.md +0 -101
  16. ingot-sql-0.1.0/ingot_sql/__init__.py +0 -16
  17. ingot-sql-0.1.0/ingot_sql/bootstrap/__init__.py +0 -4
  18. ingot-sql-0.1.0/ingot_sql/bootstrap/base.py +0 -15
  19. ingot-sql-0.1.0/ingot_sql/bootstrap/scaffolding/__init__.py +0 -1
  20. ingot-sql-0.1.0/ingot_sql/scripts/__init__.py +0 -1
  21. ingot-sql-0.1.0/ingot_sql/scripts/ingot_sql.py +0 -38
  22. ingot-sql-0.1.0/ingot_sql/tests/__init__.py +0 -1
  23. ingot-sql-0.1.0/ingot_sql/tests/functionals/__init__.py +0 -1
  24. ingot-sql-0.1.0/ingot_sql/tests/units/__init__.py +0 -1
  25. ingot-sql-0.1.0/ingot_sql/tests/units/bootstrap/__init__.py +0 -1
  26. ingot-sql-0.1.0/ingot_sql/tests/units/bootstrap/test_base.py +0 -17
  27. ingot-sql-0.1.0/ingot_sql/tests/units/scripts/__init__.py +0 -1
  28. ingot-sql-0.1.0/ingot_sql/tests/units/scripts/test_ingot_sql.py +0 -14
  29. ingot-sql-0.1.0/ingot_sql.egg-info/PKG-INFO +0 -126
  30. ingot-sql-0.1.0/ingot_sql.egg-info/SOURCES.txt +0 -25
  31. ingot-sql-0.1.0/ingot_sql.egg-info/dependency_links.txt +0 -1
  32. ingot-sql-0.1.0/ingot_sql.egg-info/entry_points.txt +0 -3
  33. ingot-sql-0.1.0/ingot_sql.egg-info/requires.txt +0 -1
  34. ingot-sql-0.1.0/ingot_sql.egg-info/top_level.txt +0 -1
  35. ingot-sql-0.1.0/requirements.txt +0 -1
  36. ingot-sql-0.1.0/setup.cfg +0 -4
  37. ingot-sql-0.1.0/setup.py +0 -63
  38. {ingot-sql-0.1.0 → ingot_sql-0.7.0}/LICENSE +0 -0
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.4
2
+ Name: ingot-sql
3
+ Version: 0.7.0
4
+ Summary: Typed tables and typical queries for SQL databases in Ingots, raw SQL at hand.
5
+ Keywords: ingots,sql,database
6
+ Author: Aliaksandr Karotki
7
+ Author-email: Aliaksandr Karotki <abkarotki@gmail.com>
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 2 - Pre-Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
18
+ Classifier: Typing :: Typed
19
+ Requires-Dist: ingots>=0.30.1,<0.31
20
+ Requires-Python: >=3.14
21
+ Project-URL: repository, https://github.com/ak-ingots/ingot-sql
22
+ Project-URL: changelog, https://github.com/ak-ingots/ingot-sql/blob/main/CHANGELOG.md
23
+ Description-Content-Type: text/markdown
24
+
25
+ # ingot-sql
26
+
27
+ [![ci](https://github.com/ak-ingots/ingot-sql/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ak-ingots/ingot-sql/actions/workflows/ci.yml)
28
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/ak-ingots/ingot-sql/blob/main/LICENSE)
29
+
30
+ <!-- Links must be absolute: this README also renders on PyPI. -->
31
+
32
+ Typed tables and typical queries for SQL databases in Ingots applications, with
33
+ raw SQL and the driver at hand: what the addons of the SQL databases build on.
34
+ An addon of [Ingots](https://github.com/ak-ingots/ingots).
35
+
36
+ ```python
37
+ import ingot_sql
38
+
39
+
40
+ class AppProject(ingot_sql.SqlProject):
41
+ env_configs_prefix = "APP"
42
+ ```
43
+
44
+ An application with other addons joins the configs, the settings and the
45
+ logging instead: `class AppConfigs(HttpConfigs, SqlConfigs)` with `SqlConfigs`
46
+ from `ingot_sql.settings.configs`, and so on, as the addon guide of Ingots
47
+ shows. The configs of the addon are named `SQL_*`: `SQL_LOGGING_LEVEL` sets the
48
+ level of its logger, `ingot_sql`.
49
+
50
+ **Status:** pre-alpha. The skeleton of the addon: its project, configs,
51
+ settings and logging. Next, tables that are their records too, typical queries
52
+ compiled to SQL you can read, raw SQL, and the base of the database addons.
53
+
54
+ ## Development
55
+
56
+ Requires [uv](https://docs.astral.sh/uv/) and `make`; uv fetches the
57
+ interpreters it needs.
58
+
59
+ ```sh
60
+ make # the target list
61
+ make check # everything CI runs: lint, test, coverage, wheel-test, cl-check
62
+ make format # black
63
+ make all # build the sdist and the wheel into dist/
64
+ ```
65
+
66
+ - Every change users should know about adds a news fragment to `changelog.d/`
67
+ (see [its README](https://github.com/ak-ingots/ingot-sql/blob/main/changelog.d/README.md)).
68
+ - A release is a pull request setting the version (`uv version X.Y.Z`) and
69
+ collating the changelog (`make cl-build VERSION=X.Y.Z`), then the tag
70
+ `vX.Y.Z` on `main`: the `release` workflow publishes the tested build to
71
+ TestPyPI, then to PyPI. Run by hand, it rehearses on TestPyPI only.
72
+
73
+ ## License
74
+
75
+ [Apache 2.0](https://github.com/ak-ingots/ingot-sql/blob/main/LICENSE).
@@ -0,0 +1,51 @@
1
+ # ingot-sql
2
+
3
+ [![ci](https://github.com/ak-ingots/ingot-sql/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ak-ingots/ingot-sql/actions/workflows/ci.yml)
4
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/ak-ingots/ingot-sql/blob/main/LICENSE)
5
+
6
+ <!-- Links must be absolute: this README also renders on PyPI. -->
7
+
8
+ Typed tables and typical queries for SQL databases in Ingots applications, with
9
+ raw SQL and the driver at hand: what the addons of the SQL databases build on.
10
+ An addon of [Ingots](https://github.com/ak-ingots/ingots).
11
+
12
+ ```python
13
+ import ingot_sql
14
+
15
+
16
+ class AppProject(ingot_sql.SqlProject):
17
+ env_configs_prefix = "APP"
18
+ ```
19
+
20
+ An application with other addons joins the configs, the settings and the
21
+ logging instead: `class AppConfigs(HttpConfigs, SqlConfigs)` with `SqlConfigs`
22
+ from `ingot_sql.settings.configs`, and so on, as the addon guide of Ingots
23
+ shows. The configs of the addon are named `SQL_*`: `SQL_LOGGING_LEVEL` sets the
24
+ level of its logger, `ingot_sql`.
25
+
26
+ **Status:** pre-alpha. The skeleton of the addon: its project, configs,
27
+ settings and logging. Next, tables that are their records too, typical queries
28
+ compiled to SQL you can read, raw SQL, and the base of the database addons.
29
+
30
+ ## Development
31
+
32
+ Requires [uv](https://docs.astral.sh/uv/) and `make`; uv fetches the
33
+ interpreters it needs.
34
+
35
+ ```sh
36
+ make # the target list
37
+ make check # everything CI runs: lint, test, coverage, wheel-test, cl-check
38
+ make format # black
39
+ make all # build the sdist and the wheel into dist/
40
+ ```
41
+
42
+ - Every change users should know about adds a news fragment to `changelog.d/`
43
+ (see [its README](https://github.com/ak-ingots/ingot-sql/blob/main/changelog.d/README.md)).
44
+ - A release is a pull request setting the version (`uv version X.Y.Z`) and
45
+ collating the changelog (`make cl-build VERSION=X.Y.Z`), then the tag
46
+ `vX.Y.Z` on `main`: the `release` workflow publishes the tested build to
47
+ TestPyPI, then to PyPI. Run by hand, it rehearses on TestPyPI only.
48
+
49
+ ## License
50
+
51
+ [Apache 2.0](https://github.com/ak-ingots/ingot-sql/blob/main/LICENSE).
@@ -0,0 +1,11 @@
1
+ """
2
+ ingot-sql: Typed tables and typical queries for SQL databases in Ingots
3
+ applications, with raw SQL and the driver at hand: what the addons of the
4
+ SQL databases build on. An application inherits from :class:`SqlProject`, or
5
+ joins the units of the addon, ``settings`` and ``logging``, with those of
6
+ its other addons.
7
+ """
8
+
9
+ __all__ = ("SqlProject",)
10
+
11
+ from .project import SqlProject
@@ -0,0 +1,17 @@
1
+ """Runs the addon on its own: ``python -m ingot_sql logging info``."""
2
+
3
+ import sys
4
+
5
+ from ingots.defaults.logging import configure_startup_logging
6
+ from ingots.puer.cli import CommandRunner
7
+
8
+ from .project import SqlProject
9
+
10
+
11
+ def main() -> None:
12
+ configure_startup_logging()
13
+ sys.exit(CommandRunner(SqlProject).run())
14
+
15
+
16
+ if __name__ == "__main__":
17
+ main()
@@ -0,0 +1,25 @@
1
+ """The logging unit of the defaults with the logger of the addon."""
2
+
3
+ __all__ = ("SqlLogging",)
4
+
5
+ import typing as t
6
+
7
+ from ingots.defaults.logging import Logging
8
+
9
+ if t.TYPE_CHECKING:
10
+ from ..project import SqlProject
11
+
12
+
13
+ class SqlLogging(Logging):
14
+ """
15
+ The logging unit, with the logger of the addon, ``ingot_sql``, at
16
+ ``SQL_LOGGING_LEVEL``.
17
+ """
18
+
19
+ project: "SqlProject"
20
+
21
+ @t.override
22
+ def build_loggers(self) -> dict[str, dict[str, t.Any]]:
23
+ level = self.project.settings.configs.SQL_LOGGING_LEVEL
24
+ addon = {"level": level, "handlers": ["default"], "propagate": False}
25
+ return {**super().build_loggers(), "ingot_sql": addon}
@@ -0,0 +1,21 @@
1
+ """The project of the addon: what an application inherits from."""
2
+
3
+ __all__ = ("SqlProject",)
4
+
5
+ from ingots.defaults import Project
6
+ from ingots.puer import Slot
7
+
8
+ from .logging import SqlLogging
9
+ from .settings import SqlSettings
10
+
11
+
12
+ class SqlProject(Project):
13
+ """
14
+ The project of the defaults with the addon's :class:`SqlSettings` and
15
+ :class:`SqlLogging`. An application inherits from it and sets its own
16
+ ``env_configs_prefix``; the addon run on its own (``python -m ingot_sql``)
17
+ keeps the prefix of the defaults, ``INGOT``.
18
+ """
19
+
20
+ settings = Slot(SqlSettings)
21
+ logging = Slot(SqlLogging)
File without changes
@@ -0,0 +1,14 @@
1
+ """The settings unit of the defaults with the configs of the addon."""
2
+
3
+ __all__ = ("SqlSettings",)
4
+
5
+ from ingots.defaults.settings import Settings
6
+ from ingots.puer import Slot
7
+
8
+ from .configs import SqlConfigs
9
+
10
+
11
+ class SqlSettings(Settings):
12
+ """The settings unit, with the addon's :class:`SqlConfigs`."""
13
+
14
+ configs = Slot(SqlConfigs)
@@ -0,0 +1,13 @@
1
+ """The configs of the addon, named ``SQL_*``."""
2
+
3
+ __all__ = ("SqlConfigs",)
4
+
5
+ import logging
6
+
7
+ from ingots.defaults.settings.configs import Configs, LogLevelConfig
8
+
9
+
10
+ class SqlConfigs(Configs):
11
+ """The configs of the defaults with those of SQL databases."""
12
+
13
+ SQL_LOGGING_LEVEL = LogLevelConfig(logging.INFO)
@@ -0,0 +1,167 @@
1
+ [project]
2
+ name = "ingot-sql"
3
+ version = "0.7.0"
4
+ description = "Typed tables and typical queries for SQL databases in Ingots, raw SQL at hand."
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE"]
9
+ keywords = [
10
+ "ingots",
11
+ "sql",
12
+ "database",
13
+ ]
14
+ classifiers = [
15
+ "Development Status :: 2 - Pre-Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Operating System :: MacOS",
18
+ "Operating System :: POSIX :: Linux",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
23
+ "Typing :: Typed",
24
+ ]
25
+ dependencies = ["ingots>=0.30.1,<0.31"]
26
+
27
+ [[project.authors]]
28
+ name = "Aliaksandr Karotki"
29
+ email = "abkarotki@gmail.com"
30
+
31
+ [project.urls]
32
+ repository = "https://github.com/ak-ingots/ingot-sql"
33
+ changelog = "https://github.com/ak-ingots/ingot-sql/blob/main/CHANGELOG.md"
34
+
35
+ [build-system]
36
+ requires = ["uv_build>=0.13.5,<0.14"]
37
+ build-backend = "uv_build"
38
+
39
+ [tool.uv]
40
+ required-version = ">=0.13.5"
41
+ environments = [
42
+ "sys_platform == 'linux'",
43
+ "sys_platform == 'darwin'",
44
+ ]
45
+
46
+ [tool.uv.build-backend]
47
+ module-name = "ingot_sql"
48
+ module-root = ""
49
+
50
+ [tool.black]
51
+ line-length = 88
52
+
53
+ [tool.flake8]
54
+ exclude = [
55
+ ".git",
56
+ ".venv",
57
+ ]
58
+ max-line-length = 88
59
+ extend-ignore = [
60
+ "E203",
61
+ "E701",
62
+ "E704",
63
+ ]
64
+ class_attributes_order = [
65
+ "nested_class",
66
+ "constant",
67
+ "field",
68
+ "static_method",
69
+ "protected_static_method",
70
+ "class_method",
71
+ "protected_class_method",
72
+ "__init__",
73
+ "property_method",
74
+ "protected_property_method",
75
+ "magic_method",
76
+ "method",
77
+ "protected_method",
78
+ ]
79
+
80
+ [tool.mypy]
81
+ strict = true
82
+ python_version = "3.14"
83
+ enable_error_code = [
84
+ "deprecated",
85
+ "explicit-override",
86
+ ]
87
+
88
+ [tool.towncrier]
89
+ name = "ingot-sql"
90
+ directory = "changelog.d"
91
+ filename = "CHANGELOG.md"
92
+ start_string = """
93
+ <!-- towncrier release notes start -->
94
+ """
95
+ title_format = "## [{version}] - {project_date}"
96
+ issue_format = "[#{issue}](https://github.com/ak-ingots/ingot-sql/issues/{issue})"
97
+ underlines = [
98
+ "",
99
+ "",
100
+ "",
101
+ ]
102
+ wrap = false
103
+ template = "changelog.d/_template.md"
104
+ ignore = [
105
+ "README.md",
106
+ "_template.md",
107
+ ]
108
+
109
+ [[tool.towncrier.type]]
110
+ directory = "added"
111
+ name = "Added"
112
+ showcontent = true
113
+
114
+ [[tool.towncrier.type]]
115
+ directory = "changed"
116
+ name = "Changed"
117
+ showcontent = true
118
+
119
+ [[tool.towncrier.type]]
120
+ directory = "deprecated"
121
+ name = "Deprecated"
122
+ showcontent = true
123
+
124
+ [[tool.towncrier.type]]
125
+ directory = "fixed"
126
+ name = "Fixed"
127
+ showcontent = true
128
+
129
+ [[tool.towncrier.type]]
130
+ directory = "removed"
131
+ name = "Removed"
132
+ showcontent = true
133
+
134
+ [[tool.towncrier.type]]
135
+ directory = "security"
136
+ name = "Security"
137
+ showcontent = true
138
+
139
+ [[tool.towncrier.type]]
140
+ directory = "misc"
141
+ name = "Misc"
142
+ showcontent = false
143
+
144
+ [tool.coverage.run]
145
+ branch = true
146
+ source = ["ingot_sql"]
147
+
148
+ [tool.coverage.report]
149
+ fail_under = 99
150
+ show_missing = true
151
+ skip_covered = true
152
+ exclude_also = [
153
+ "if t.TYPE_CHECKING:",
154
+ "raise NotImplementedError",
155
+ "if __name__ == .__main__.:",
156
+ ]
157
+
158
+ [dependency-groups]
159
+ dev = [
160
+ "black",
161
+ "coverage",
162
+ "flake8",
163
+ "flake8-class-attributes-order",
164
+ "flake8-pyproject",
165
+ "mypy",
166
+ ]
167
+ changelog = ["towncrier"]
@@ -0,0 +1,144 @@
1
+ [project]
2
+ name = "ingot-sql"
3
+ version = "0.7.0"
4
+ description = "Typed tables and typical queries for SQL databases in Ingots, raw SQL at hand."
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE"]
9
+ authors = [{name = "Aliaksandr Karotki", email = "abkarotki@gmail.com"}]
10
+ keywords = ["ingots", "sql", "database"]
11
+ classifiers = [
12
+ "Development Status :: 2 - Pre-Alpha",
13
+ "Intended Audience :: Developers",
14
+ "Operating System :: MacOS",
15
+ "Operating System :: POSIX :: Linux",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Programming Language :: Python :: 3.15",
20
+ "Typing :: Typed",
21
+ ]
22
+ # Before 1.0 a minor version of ingots may break its addons.
23
+ dependencies = ["ingots>=0.30.1,<0.31"]
24
+
25
+ [project.urls]
26
+ repository = "https://github.com/ak-ingots/ingot-sql"
27
+ changelog = "https://github.com/ak-ingots/ingot-sql/blob/main/CHANGELOG.md"
28
+
29
+ [build-system]
30
+ requires = ["uv_build>=0.13.5,<0.14"]
31
+ build-backend = "uv_build"
32
+
33
+ [tool.uv.build-backend]
34
+ module-name = "ingot_sql"
35
+ module-root = ""
36
+
37
+ [tool.uv]
38
+ # uv 0.13.5 drops the eMudhra roots from its certificates and its Pythons.
39
+ required-version = ">=0.13.5"
40
+ environments = ["sys_platform == 'linux'", "sys_platform == 'darwin'"]
41
+
42
+ [dependency-groups]
43
+ dev = [
44
+ "black",
45
+ "coverage",
46
+ "flake8",
47
+ "flake8-class-attributes-order",
48
+ "flake8-pyproject",
49
+ "mypy",
50
+ ]
51
+ changelog = ["towncrier"]
52
+
53
+ [tool.black]
54
+ line-length = 88
55
+
56
+ [tool.flake8]
57
+ exclude = [".git", ".venv"]
58
+ max-line-length = 88
59
+ extend-ignore = ["E203", "E701", "E704"]
60
+ # Member order of ADR 0007 (ingots-libs). `__init_subclass__` is written with an
61
+ # explicit @classmethod, so it is checked as a class method.
62
+ class_attributes_order = [
63
+ "nested_class",
64
+ "constant",
65
+ "field",
66
+ "static_method",
67
+ "protected_static_method",
68
+ "class_method",
69
+ "protected_class_method",
70
+ "__init__",
71
+ "property_method",
72
+ "protected_property_method",
73
+ "magic_method",
74
+ "method",
75
+ "protected_method",
76
+ ]
77
+
78
+ [tool.mypy]
79
+ strict = true
80
+ python_version = "3.14"
81
+ enable_error_code = ["deprecated", "explicit-override"]
82
+
83
+ [tool.towncrier]
84
+ name = "ingot-sql"
85
+ directory = "changelog.d"
86
+ filename = "CHANGELOG.md"
87
+ start_string = "<!-- towncrier release notes start -->\n"
88
+ title_format = "## [{version}] - {project_date}"
89
+ issue_format = "[#{issue}](https://github.com/ak-ingots/ingot-sql/issues/{issue})"
90
+ underlines = ["", "", ""]
91
+ wrap = false
92
+ template = "changelog.d/_template.md"
93
+ ignore = ["README.md", "_template.md"]
94
+
95
+ [[tool.towncrier.type]]
96
+ directory = "added"
97
+ name = "Added"
98
+ showcontent = true
99
+
100
+ [[tool.towncrier.type]]
101
+ directory = "changed"
102
+ name = "Changed"
103
+ showcontent = true
104
+
105
+ [[tool.towncrier.type]]
106
+ directory = "deprecated"
107
+ name = "Deprecated"
108
+ showcontent = true
109
+
110
+ [[tool.towncrier.type]]
111
+ directory = "fixed"
112
+ name = "Fixed"
113
+ showcontent = true
114
+
115
+ [[tool.towncrier.type]]
116
+ directory = "removed"
117
+ name = "Removed"
118
+ showcontent = true
119
+
120
+ [[tool.towncrier.type]]
121
+ directory = "security"
122
+ name = "Security"
123
+ showcontent = true
124
+
125
+ # Internal changes users need not know about (agent rules, CI, test
126
+ # refactoring): the fragment satisfies `cl-check`, its text is not published.
127
+ [[tool.towncrier.type]]
128
+ directory = "misc"
129
+ name = "Misc"
130
+ showcontent = false
131
+
132
+ [tool.coverage.run]
133
+ branch = true
134
+ source = ["ingot_sql"]
135
+
136
+ [tool.coverage.report]
137
+ fail_under = 99
138
+ show_missing = true
139
+ skip_covered = true
140
+ exclude_also = [
141
+ "if t.TYPE_CHECKING:",
142
+ "raise NotImplementedError",
143
+ "if __name__ == .__main__.:",
144
+ ]
@@ -1,12 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
-
6
- ## [Unreleased]
7
-
8
- ## [0.1.0]
9
- ### Added
10
- - Generate Ingots package structure.
11
- - Configure the `pre-commint` tool. See the `.pre-commit-config.yaml` config file for details.
12
- - Configure the `tox` tool. See the `tox.ini` config file for details.
@@ -1,7 +0,0 @@
1
- include CHANGELOG.md
2
- include LICENSE.md
3
- include README.md
4
- include requirements.txt
5
- graft ingot_sql/bootstrap/scaffolding
6
- global-exclude __pycache__
7
- global-exclude *.py[co]
ingot-sql-0.1.0/PKG-INFO DELETED
@@ -1,126 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ingot-sql
3
- Version: 0.1.0
4
- Summary: Provides SQS functionality for Ingots projects.
5
- Home-page: https://github.com/ABKorotky/ingot-sql.git
6
- Author: Alexander Korotkiy
7
- Author-email: abkorotky@gmail.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- Classifier: Development Status :: 1 - Planning
11
- Classifier: Environment :: Web Environment
12
- Classifier: Framework :: AsyncIO
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: GNU General Public License (GPL)
15
- Classifier: Natural Language :: English
16
- Classifier: Operating System :: POSIX
17
- Classifier: Operating System :: POSIX :: Linux
18
- Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Topic :: Internet
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
-
24
- # Ingot Ingot Sql package.
25
-
26
- Provides SQS functionality for Ingots projects.
27
-
28
- ## For consumers
29
-
30
- For using the Ingot package just execute the following commands:
31
- * Add the package to the `requirements.txt` file of your project.
32
- * Install int using the `pip` tool.
33
- * TODO. Add here something extra information.
34
-
35
- ### Package CLI
36
-
37
- The package provides CLI.
38
- It allows to start working with the package quickly.
39
- It contains the following commands:
40
- TODO. Add builders here after generating their by the `ingots package_bootstrap` tool.
41
-
42
- For using the CLI tool just call the following command:
43
- ```bash
44
- ingot-sql-cli <command>
45
- ```
46
- Getting package CLI help:
47
- ```bash
48
- ingot-sql-cli --help
49
- ingot-sql-cli <command> --help
50
- ```
51
-
52
- ## For developers
53
-
54
- ### Prepare the project for working
55
-
56
- Clone a repository:
57
- ```bash
58
- mkdir ingots-libs
59
- cd ingots-libs
60
- git clone https://github.com/ABKorotky/ingot-sql.git
61
- cd ingot-sql
62
- ```
63
-
64
- Prepare a virtual environment:
65
- ```bash
66
- python3.9 -m venv .venv
67
- source .venv/bin/activate
68
- pip install -r requirements.txt
69
- ```
70
-
71
- Prepare repository hooks
72
- ```bash
73
- pip install pre_commit
74
- pre-commit install
75
- pre-commit autoupdate
76
- ```
77
-
78
- Configure code-quality tools:
79
- ```bash
80
- pip install black flake8 mypy coverage
81
- ```
82
-
83
- Configure the Sphinx tool
84
-
85
- Please, use the following page for configuring the Sphinx documentation generator: [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
86
- ```bash
87
- pip install sphinx
88
- sphinx-build -b html docs docs/build -v
89
- ```
90
-
91
- ### Using the tox tool
92
-
93
- The Ingot package allows automation via the `tox` tool.
94
- ```bash
95
- pip install tox
96
- ```
97
-
98
- Use configured tox tool for several activities.
99
-
100
- `tox -e reformat` - auto reformat code by the black tool, makes ordering import too.
101
-
102
- `tox -e cs` - checks code style by PEP8.
103
-
104
- `tox -e ann` - checks annotations of types by the mypy tool.
105
-
106
- `tox -e utc` - runs unittests with the coverage tool.
107
-
108
- `tox -e report` - builds coverage report for the project.
109
-
110
- `tox -e doc` - builds a package documentation.
111
-
112
- `tox -e build` - builds a package form current branch / tag / commit.
113
-
114
- `tox -e upload` - uploads package to the PyPI index. Set the `PYPI_REPOSITORY_ALIAS` virtual variable for specify PyPI destination.
115
-
116
- Calling tox without parameters will execute the following steps: **cs**, **ann**, **utc** and **report**.
117
-
118
- ### Using package CLI locally
119
- Obviously, it's impossible to call the package CLI via package entry-point.
120
-
121
- Use the following command instead:
122
- ```bash
123
- python -m ingot_sql.scripts.ingot_sql ...
124
- ```
125
-
126
-
ingot-sql-0.1.0/README.md DELETED
@@ -1,101 +0,0 @@
1
- # Ingot Ingot Sql package.
2
-
3
- Provides SQS functionality for Ingots projects.
4
-
5
- ## For consumers
6
-
7
- For using the Ingot package just execute the following commands:
8
- * Add the package to the `requirements.txt` file of your project.
9
- * Install int using the `pip` tool.
10
- * TODO. Add here something extra information.
11
-
12
- ### Package CLI
13
-
14
- The package provides CLI.
15
- It allows to start working with the package quickly.
16
- It contains the following commands:
17
- TODO. Add builders here after generating their by the `ingots package_bootstrap` tool.
18
-
19
- For using the CLI tool just call the following command:
20
- ```bash
21
- ingot-sql-cli <command>
22
- ```
23
- Getting package CLI help:
24
- ```bash
25
- ingot-sql-cli --help
26
- ingot-sql-cli <command> --help
27
- ```
28
-
29
- ## For developers
30
-
31
- ### Prepare the project for working
32
-
33
- Clone a repository:
34
- ```bash
35
- mkdir ingots-libs
36
- cd ingots-libs
37
- git clone https://github.com/ABKorotky/ingot-sql.git
38
- cd ingot-sql
39
- ```
40
-
41
- Prepare a virtual environment:
42
- ```bash
43
- python3.9 -m venv .venv
44
- source .venv/bin/activate
45
- pip install -r requirements.txt
46
- ```
47
-
48
- Prepare repository hooks
49
- ```bash
50
- pip install pre_commit
51
- pre-commit install
52
- pre-commit autoupdate
53
- ```
54
-
55
- Configure code-quality tools:
56
- ```bash
57
- pip install black flake8 mypy coverage
58
- ```
59
-
60
- Configure the Sphinx tool
61
-
62
- Please, use the following page for configuring the Sphinx documentation generator: [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
63
- ```bash
64
- pip install sphinx
65
- sphinx-build -b html docs docs/build -v
66
- ```
67
-
68
- ### Using the tox tool
69
-
70
- The Ingot package allows automation via the `tox` tool.
71
- ```bash
72
- pip install tox
73
- ```
74
-
75
- Use configured tox tool for several activities.
76
-
77
- `tox -e reformat` - auto reformat code by the black tool, makes ordering import too.
78
-
79
- `tox -e cs` - checks code style by PEP8.
80
-
81
- `tox -e ann` - checks annotations of types by the mypy tool.
82
-
83
- `tox -e utc` - runs unittests with the coverage tool.
84
-
85
- `tox -e report` - builds coverage report for the project.
86
-
87
- `tox -e doc` - builds a package documentation.
88
-
89
- `tox -e build` - builds a package form current branch / tag / commit.
90
-
91
- `tox -e upload` - uploads package to the PyPI index. Set the `PYPI_REPOSITORY_ALIAS` virtual variable for specify PyPI destination.
92
-
93
- Calling tox without parameters will execute the following steps: **cs**, **ann**, **utc** and **report**.
94
-
95
- ### Using package CLI locally
96
- Obviously, it's impossible to call the package CLI via package entry-point.
97
-
98
- Use the following command instead:
99
- ```bash
100
- python -m ingot_sql.scripts.ingot_sql ...
101
- ```
@@ -1,16 +0,0 @@
1
- """Ingot Sql.
2
-
3
- Provides SQS functionality for Ingots projects.
4
-
5
- """
6
-
7
- __all__ = ("NAME", "VERSION", "AUTHOR", "AUTHOR_EMAIL")
8
-
9
- NAME = "ingot-sql"
10
- TITLE = "Ingot Sql"
11
- DESCRIPTION = "Provides SQS functionality for Ingots projects."
12
-
13
- VERSION = "0.1.0"
14
-
15
- AUTHOR = "Alexander Korotkiy"
16
- AUTHOR_EMAIL = "abkorotky@gmail.com"
@@ -1,4 +0,0 @@
1
- """Ingot Sql bootstrap."""
2
- from ingot_sql.bootstrap.base import IngotSqlBaseBuilder
3
-
4
- __all__ = ("IngotSqlBaseBuilder",)
@@ -1,15 +0,0 @@
1
- from logging import getLogger
2
-
3
- from ingots.bootstrap.base import BaseBuilder
4
-
5
- import ingot_sql as package
6
-
7
- __all__ = ("IngotSqlBaseBuilder",)
8
-
9
-
10
- logger = getLogger(__name__)
11
-
12
-
13
- class IngotSqlBaseBuilder(BaseBuilder):
14
-
15
- package = package
@@ -1 +0,0 @@
1
- """Ingot Sql bootstrap scaffolding."""
@@ -1 +0,0 @@
1
- """Ingot Sql entry-points."""
@@ -1,38 +0,0 @@
1
- import typing as t
2
- from logging import getLogger
3
- from logging import INFO
4
-
5
- from ingots.scripts.base import BaseDispatcher
6
- from ingots.utils.logging import configure_startup_logging
7
-
8
- if t.TYPE_CHECKING:
9
- from ingots.operations import BaseCliOperation # noqa
10
-
11
-
12
- __all__ = (
13
- "IngotSqlDispatcher",
14
- "main",
15
- )
16
-
17
-
18
- configure_startup_logging(
19
- default_level=INFO,
20
- format="%(levelname)s: %(message)s",
21
- )
22
- logger = getLogger(__name__)
23
-
24
-
25
- class IngotSqlDispatcher(BaseDispatcher):
26
-
27
- name = "ingot_sql"
28
- description = "The Ingot Sql management CLI."
29
- cli_entities_classes: t.List[t.Type["BaseCliOperation"]] = []
30
-
31
-
32
- def main():
33
- dispatcher = IngotSqlDispatcher.build()
34
- dispatcher.run()
35
-
36
-
37
- if __name__ == "__main__":
38
- main()
@@ -1 +0,0 @@
1
- """Tests for the Ingot Sql Ingot package."""
@@ -1 +0,0 @@
1
- """Functional tests for the Ingot Sql Ingot package."""
@@ -1 +0,0 @@
1
- """Unit tests for the Ingot Sql Ingot package."""
@@ -1 +0,0 @@
1
- """Tests for scripts of the Ingot Sql Ingot package."""
@@ -1,17 +0,0 @@
1
- import typing as t
2
-
3
- from ingots.tests.units.bootstrap import test_base
4
-
5
- from ingot_sql.bootstrap import IngotSqlBaseBuilder
6
-
7
- __all__ = ("IngotSqlBaseBuilderTestCase",)
8
-
9
-
10
- class IngotSqlBaseBuilderTestCase(test_base.BaseBuilderTestCase):
11
- """Contains tests for the IngotSqlBuilder class."""
12
-
13
- tst_cls: t.Type = IngotSqlBaseBuilder
14
- tst_entity_name: str = "ingot_sql"
15
- tst_entity_name_upper: str = "INGOT_SQL"
16
- tst_entity_name_class_name: str = "IngotSql"
17
- tst_entity_description = "Provides SQS functionality for Ingots projects."
@@ -1 +0,0 @@
1
- """Tests for scripts of the Ingot Sql Ingot package."""
@@ -1,14 +0,0 @@
1
- import typing as t
2
-
3
- from ingots.tests.units.scripts import test_base
4
-
5
- from ingot_sql.scripts.ingot_sql import IngotSqlDispatcher
6
-
7
- __all__ = ("IngotSqlDispatcherTestCase",)
8
-
9
-
10
- class IngotSqlDispatcherTestCase(test_base.BaseDispatcherTestCase):
11
- """Contains tests for the IngotSqlDispatcher class and checks it."""
12
-
13
- tst_cls: t.Type = IngotSqlDispatcher
14
- tst_builder_name = "test"
@@ -1,126 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ingot-sql
3
- Version: 0.1.0
4
- Summary: Provides SQS functionality for Ingots projects.
5
- Home-page: https://github.com/ABKorotky/ingot-sql.git
6
- Author: Alexander Korotkiy
7
- Author-email: abkorotky@gmail.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- Classifier: Development Status :: 1 - Planning
11
- Classifier: Environment :: Web Environment
12
- Classifier: Framework :: AsyncIO
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: GNU General Public License (GPL)
15
- Classifier: Natural Language :: English
16
- Classifier: Operating System :: POSIX
17
- Classifier: Operating System :: POSIX :: Linux
18
- Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Topic :: Internet
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
-
24
- # Ingot Ingot Sql package.
25
-
26
- Provides SQS functionality for Ingots projects.
27
-
28
- ## For consumers
29
-
30
- For using the Ingot package just execute the following commands:
31
- * Add the package to the `requirements.txt` file of your project.
32
- * Install int using the `pip` tool.
33
- * TODO. Add here something extra information.
34
-
35
- ### Package CLI
36
-
37
- The package provides CLI.
38
- It allows to start working with the package quickly.
39
- It contains the following commands:
40
- TODO. Add builders here after generating their by the `ingots package_bootstrap` tool.
41
-
42
- For using the CLI tool just call the following command:
43
- ```bash
44
- ingot-sql-cli <command>
45
- ```
46
- Getting package CLI help:
47
- ```bash
48
- ingot-sql-cli --help
49
- ingot-sql-cli <command> --help
50
- ```
51
-
52
- ## For developers
53
-
54
- ### Prepare the project for working
55
-
56
- Clone a repository:
57
- ```bash
58
- mkdir ingots-libs
59
- cd ingots-libs
60
- git clone https://github.com/ABKorotky/ingot-sql.git
61
- cd ingot-sql
62
- ```
63
-
64
- Prepare a virtual environment:
65
- ```bash
66
- python3.9 -m venv .venv
67
- source .venv/bin/activate
68
- pip install -r requirements.txt
69
- ```
70
-
71
- Prepare repository hooks
72
- ```bash
73
- pip install pre_commit
74
- pre-commit install
75
- pre-commit autoupdate
76
- ```
77
-
78
- Configure code-quality tools:
79
- ```bash
80
- pip install black flake8 mypy coverage
81
- ```
82
-
83
- Configure the Sphinx tool
84
-
85
- Please, use the following page for configuring the Sphinx documentation generator: [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
86
- ```bash
87
- pip install sphinx
88
- sphinx-build -b html docs docs/build -v
89
- ```
90
-
91
- ### Using the tox tool
92
-
93
- The Ingot package allows automation via the `tox` tool.
94
- ```bash
95
- pip install tox
96
- ```
97
-
98
- Use configured tox tool for several activities.
99
-
100
- `tox -e reformat` - auto reformat code by the black tool, makes ordering import too.
101
-
102
- `tox -e cs` - checks code style by PEP8.
103
-
104
- `tox -e ann` - checks annotations of types by the mypy tool.
105
-
106
- `tox -e utc` - runs unittests with the coverage tool.
107
-
108
- `tox -e report` - builds coverage report for the project.
109
-
110
- `tox -e doc` - builds a package documentation.
111
-
112
- `tox -e build` - builds a package form current branch / tag / commit.
113
-
114
- `tox -e upload` - uploads package to the PyPI index. Set the `PYPI_REPOSITORY_ALIAS` virtual variable for specify PyPI destination.
115
-
116
- Calling tox without parameters will execute the following steps: **cs**, **ann**, **utc** and **report**.
117
-
118
- ### Using package CLI locally
119
- Obviously, it's impossible to call the package CLI via package entry-point.
120
-
121
- Use the following command instead:
122
- ```bash
123
- python -m ingot_sql.scripts.ingot_sql ...
124
- ```
125
-
126
-
@@ -1,25 +0,0 @@
1
- CHANGELOG.md
2
- LICENSE
3
- MANIFEST.in
4
- README.md
5
- requirements.txt
6
- setup.py
7
- ingot_sql/__init__.py
8
- ingot_sql.egg-info/PKG-INFO
9
- ingot_sql.egg-info/SOURCES.txt
10
- ingot_sql.egg-info/dependency_links.txt
11
- ingot_sql.egg-info/entry_points.txt
12
- ingot_sql.egg-info/requires.txt
13
- ingot_sql.egg-info/top_level.txt
14
- ingot_sql/bootstrap/__init__.py
15
- ingot_sql/bootstrap/base.py
16
- ingot_sql/bootstrap/scaffolding/__init__.py
17
- ingot_sql/scripts/__init__.py
18
- ingot_sql/scripts/ingot_sql.py
19
- ingot_sql/tests/__init__.py
20
- ingot_sql/tests/functionals/__init__.py
21
- ingot_sql/tests/units/__init__.py
22
- ingot_sql/tests/units/bootstrap/__init__.py
23
- ingot_sql/tests/units/bootstrap/test_base.py
24
- ingot_sql/tests/units/scripts/__init__.py
25
- ingot_sql/tests/units/scripts/test_ingot_sql.py
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- ingot-sql-cli = ingot_sql.scripts.ingot_sql:main
3
-
@@ -1 +0,0 @@
1
- ingots~=0.17.2
@@ -1 +0,0 @@
1
- ingot_sql
@@ -1 +0,0 @@
1
- ingots~=0.17.2
ingot-sql-0.1.0/setup.cfg DELETED
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
ingot-sql-0.1.0/setup.py DELETED
@@ -1,63 +0,0 @@
1
- import typing as t
2
- from os import path
3
-
4
- from pkg_resources import parse_requirements
5
- from setuptools import find_packages
6
- from setuptools import setup
7
-
8
- import ingot_sql as package
9
-
10
-
11
- URL = "https://github.com/ABKorotky/ingot-sql.git"
12
- ROOT_DIR = path.abspath(path.dirname(__file__))
13
- readme_filename = "README.md"
14
- requirements_file = "requirements.txt"
15
-
16
-
17
- def get_readme() -> str:
18
- """get_readme.
19
-
20
- Extracts content from the README.mg file for long description.
21
- """
22
- with open(path.join(ROOT_DIR, readme_filename)) as _file:
23
- return _file.read()
24
-
25
-
26
- def get_requirements() -> t.List[str]:
27
- """get_requirements.
28
-
29
- Extracts requirements from the requirements.txt file.
30
- """
31
- with open(path.join(ROOT_DIR, requirements_file)) as _file:
32
- return list((str(req) for req in parse_requirements(_file)))
33
-
34
-
35
- setup(
36
- name=package.NAME,
37
- description=package.DESCRIPTION,
38
- long_description=get_readme(),
39
- long_description_content_type="text/markdown",
40
- version=package.VERSION,
41
- url=URL,
42
- author=package.AUTHOR,
43
- author_email=package.AUTHOR_EMAIL,
44
- packages=find_packages(),
45
- include_package_data=True,
46
- install_requires=get_requirements(),
47
- entry_points={
48
- "console_scripts": ["ingot-sql-cli = ingot_sql.scripts.ingot_sql:main []"]
49
- },
50
- classifiers=[
51
- "Development Status :: 1 - Planning",
52
- "Environment :: Web Environment",
53
- "Framework :: AsyncIO",
54
- "Intended Audience :: Developers",
55
- "License :: OSI Approved :: GNU General Public License (GPL)",
56
- "Natural Language :: English",
57
- "Operating System :: POSIX",
58
- "Operating System :: POSIX :: Linux",
59
- "Programming Language :: Python",
60
- "Programming Language :: Python :: 3.9",
61
- "Topic :: Internet",
62
- ],
63
- )
File without changes