augint-github 1.3.0__tar.gz → 1.3.2__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,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: augint-github
3
+ Version: 1.3.2
4
+ Summary: GitHub tools for Augmenting Integrations
5
+ Author: Samuel Vange
6
+ Author-email: Samuel Vange <7166607+svange@users.noreply.github.com>
7
+ License-Expression: AGPL-3.0-only
8
+ Requires-Dist: click>=8.1.8,<9
9
+ Requires-Dist: python-dotenv>=1.0.1,<2
10
+ Requires-Dist: rich>=13.9.4,<15.0
11
+ Requires-Dist: loguru>=0.7.3,<0.8
12
+ Requires-Dist: pygithub>=2.5.0,<3
13
+ Requires-Dist: pytest>=8.3.4 ; extra == 'dev'
14
+ Requires-Dist: pytest-html>=4.1.1 ; extra == 'dev'
15
+ Requires-Dist: pytest-cov>=6.0.0 ; extra == 'dev'
16
+ Requires-Dist: augint-shell>=0.16.7 ; extra == 'dev'
17
+ Requires-Dist: python-semantic-release>=10.3.1 ; extra == 'dev'
18
+ Requires-Dist: pre-commit>=4.0.0 ; extra == 'dev'
19
+ Requires-Dist: ruff>=0.8.0 ; extra == 'dev'
20
+ Requires-Dist: mypy>=1.8.0 ; extra == 'dev'
21
+ Requires-Dist: bandit>=1.7.0 ; extra == 'dev'
22
+ Requires-Dist: pip-audit>=2.7.0 ; extra == 'dev'
23
+ Requires-Dist: pip-licenses>=5.0.0 ; extra == 'dev'
24
+ Requires-Dist: pdoc>=15.0.0 ; extra == 'dev'
25
+ Requires-Python: >=3.12, <4.0
26
+ Project-URL: Homepage, https://github.com/svange/augint-github
27
+ Provides-Extra: dev
28
+ Description-Content-Type: text/markdown
29
+
30
+ # Augmenting Integrations GitHub Tools
31
+
32
+ ![ci status](https://github.com/svange/augint-github/actions/workflows/pipeline.yaml/badge.svg?branch=main)
33
+ ![PyPI - Version](https://img.shields.io/pypi/v/augint-github)
34
+ [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
35
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
36
+ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
37
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
38
+ [![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions)
39
+ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%93%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
40
+
41
+ Push variables and secrets from `.env` files to GitHub Actions.
42
+
43
+ ## Reports
44
+
45
+ | Report | Link |
46
+ |--------|------|
47
+ | API Documentation | [docs](https://svange.github.io/augint-github/) |
48
+ | Test Coverage | [coverage](https://svange.github.io/augint-github/coverage/) |
49
+ | Unit Test Results | [tests](https://svange.github.io/augint-github/tests/) |
50
+ | Security Scan | [security](https://svange.github.io/augint-github/security/) |
51
+ | License Compliance | [compliance](https://svange.github.io/augint-github/compliance/) |
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ pip install augint-github
57
+ ```
58
+
59
+ ## Usage
60
+
61
+ ```bash
62
+ # Push .env secrets and variables to a GitHub repository
63
+ ai-gh-push
64
+ ```
@@ -0,0 +1,35 @@
1
+ # Augmenting Integrations GitHub Tools
2
+
3
+ ![ci status](https://github.com/svange/augint-github/actions/workflows/pipeline.yaml/badge.svg?branch=main)
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/augint-github)
5
+ [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
6
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
7
+ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
8
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
9
+ [![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions)
10
+ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%93%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
11
+
12
+ Push variables and secrets from `.env` files to GitHub Actions.
13
+
14
+ ## Reports
15
+
16
+ | Report | Link |
17
+ |--------|------|
18
+ | API Documentation | [docs](https://svange.github.io/augint-github/) |
19
+ | Test Coverage | [coverage](https://svange.github.io/augint-github/coverage/) |
20
+ | Unit Test Results | [tests](https://svange.github.io/augint-github/tests/) |
21
+ | Security Scan | [security](https://svange.github.io/augint-github/security/) |
22
+ | License Compliance | [compliance](https://svange.github.io/augint-github/compliance/) |
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ pip install augint-github
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```bash
33
+ # Push .env secrets and variables to a GitHub repository
34
+ ai-gh-push
35
+ ```
@@ -0,0 +1,148 @@
1
+ [project]
2
+ name = "augint-github"
3
+ version = "1.3.2"
4
+ description = "GitHub tools for Augmenting Integrations"
5
+ authors = [{name = "Samuel Vange", email = "7166607+svange@users.noreply.github.com"}]
6
+ readme = "README.md"
7
+ license = "AGPL-3.0-only"
8
+ requires-python = ">=3.12,<4.0"
9
+ dependencies = [
10
+ "click>=8.1.8,<9",
11
+ "python-dotenv>=1.0.1,<2",
12
+ "rich>=13.9.4,<15.0",
13
+ "loguru>=0.7.3,<0.8",
14
+ "pygithub>=2.5.0,<3",
15
+ ]
16
+
17
+ [project.urls]
18
+ Homepage = "https://github.com/svange/augint-github"
19
+
20
+ [project.scripts]
21
+ ai-gh-push = "gh_secrets_and_vars_async:cli"
22
+
23
+ [project.optional-dependencies]
24
+ dev = [
25
+ "pytest>=8.3.4",
26
+ "pytest-html>=4.1.1",
27
+ "pytest-cov>=6.0.0",
28
+ "augint-shell>=0.16.7",
29
+ "python-semantic-release>=10.3.1",
30
+ "pre-commit>=4.0.0",
31
+ "ruff>=0.8.0",
32
+ "mypy>=1.8.0",
33
+ "bandit>=1.7.0",
34
+ "pip-audit>=2.7.0",
35
+ "pip-licenses>=5.0.0",
36
+ "pdoc>=15.0.0",
37
+ ]
38
+
39
+ [build-system]
40
+ requires = ["uv_build>=0.11,<0.12"]
41
+ build-backend = "uv_build"
42
+
43
+ [tool.uv.build-backend]
44
+ module-name = "gh_secrets_and_vars_async"
45
+
46
+ [tool.semantic_release]
47
+ assets = ["uv.lock"]
48
+ commit_message = "chore(release): {version}\n\nAutomatically generated by python-semantic-release [skip ci]"
49
+ commit_parser = "conventional"
50
+ major_on_zero = false
51
+ tag_format = "v{version}"
52
+ version_toml = ["pyproject.toml:project.version"]
53
+ build_command = "uv lock && uv build"
54
+
55
+ [tool.semantic_release.branches.main]
56
+ match = "main"
57
+ prerelease = false
58
+
59
+ [tool.semantic_release.branches.dev]
60
+ match = "dev"
61
+ prerelease_token = "dev"
62
+ prerelease = true
63
+
64
+ [tool.semantic_release.commit_parser_options]
65
+ patch_tags = ["fix", "perf", "chore", "refactor"]
66
+
67
+ [tool.semantic_release.changelog]
68
+ mode = "update"
69
+ exclude_commit_patterns = [
70
+ '''ci(?:\([^)]*?\))?: .+''',
71
+ '''style(?:\([^)]*?\))?: .+''',
72
+ '''test(?:\([^)]*?\))?: .+''',
73
+ '''build\((?!deps\): .+)''',
74
+ ]
75
+
76
+ [tool.semantic_release.changelog.default_templates]
77
+ changelog_file = "CHANGELOG.md"
78
+
79
+ [tool.semantic_release.remote]
80
+ name = "origin"
81
+ type = "github"
82
+ ignore_token_for_push = false
83
+ insecure = false
84
+
85
+ [tool.semantic_release.remote.token]
86
+ env = "GH_TOKEN"
87
+
88
+ [tool.semantic_release.publish]
89
+ dist_glob_patterns = ["dist/*"]
90
+ upload_to_vcs_release = false
91
+
92
+ [tool.coverage.run]
93
+ source = ["src"]
94
+ omit = ["*/tests/*", "*/test_*.py"]
95
+
96
+ [tool.coverage.report]
97
+ show_missing = true
98
+ exclude_lines = [
99
+ 'pragma: no cover',
100
+ 'def __repr__',
101
+ 'if self\.debug',
102
+ 'raise AssertionError',
103
+ 'raise NotImplementedError',
104
+ 'if 0:',
105
+ 'if __name__ == .__main__.:',
106
+ 'if TYPE_CHECKING:',
107
+ ]
108
+
109
+ [tool.pytest.ini_options]
110
+ testpaths = ["tests"]
111
+ python_files = ["test_*.py"]
112
+ addopts = "-ra -q --strict-markers"
113
+ markers = [
114
+ "redundant: mark test as redundant",
115
+ "end_to_end: mark test as an end-to-end test",
116
+ "no_infra: mark test as not requiring infrastructure",
117
+ "skip_ci: mark as not suitable for ci",
118
+ ]
119
+
120
+ [tool.ruff]
121
+ line-length = 100
122
+ target-version = "py312"
123
+
124
+ [tool.ruff.lint]
125
+ select = ["E", "F", "I", "W", "B", "C4", "UP", "DTZ"]
126
+ ignore = ["E501"]
127
+
128
+ [tool.ruff.lint.isort]
129
+ known-first-party = ["gh_secrets_and_vars_async"]
130
+
131
+ [tool.mypy]
132
+ python_version = "3.12"
133
+ files = "src"
134
+ disallow_untyped_defs = true
135
+ disallow_untyped_decorators = true
136
+ disallow_subclassing_any = true
137
+ warn_return_any = true
138
+ warn_redundant_casts = true
139
+ warn_unused_ignores = true
140
+ warn_unused_configs = true
141
+
142
+ [[tool.mypy.overrides]]
143
+ module = "gh_secrets_and_vars_async"
144
+ disallow_untyped_defs = false
145
+
146
+ [[tool.mypy.overrides]]
147
+ module = "github.*"
148
+ ignore_missing_imports = true
@@ -5,16 +5,18 @@ from pathlib import Path
5
5
  import click
6
6
  import github.GithubException
7
7
  from dotenv import load_dotenv
8
- from github import Github, Auth
9
- from github.Repository import Repository
8
+ from github import Auth, Github
10
9
  from github.GithubException import UnknownObjectException
11
- from rich import print
10
+ from github.Repository import Repository
12
11
  from loguru import logger
12
+ from rich import print
13
13
 
14
14
 
15
15
  @click.command()
16
16
  @click.option("--verbose", "-v", is_flag=True, help="Print all the output.")
17
- @click.option("--dry-run", "-d", is_flag=True, help="Run through the process, but make no changes to GitHub.")
17
+ @click.option(
18
+ "--dry-run", "-d", is_flag=True, help="Run through the process, but make no changes to GitHub."
19
+ )
18
20
  @click.argument("filename", type=click.Path(exists=True, readable=True), default=".env")
19
21
  def cli(verbose: bool, dry_run: bool, filename: click.Path):
20
22
  """
@@ -48,7 +50,17 @@ async def perform_update(filename: click.Path, verbose: bool = False, dry_run: b
48
50
  # Read the .env file and convert it to a JSON object
49
51
  secrets = {}
50
52
  not_secrets = {}
51
- SECRETS_INDICATORS = ["secret", "key", "token", "bearer", "password", "pass", "pwd", "pword", "hash"]
53
+ SECRETS_INDICATORS = [
54
+ "secret",
55
+ "key",
56
+ "token",
57
+ "bearer",
58
+ "password",
59
+ "pass",
60
+ "pwd",
61
+ "pword",
62
+ "hash",
63
+ ]
52
64
  logger.debug(f"Reading file {file_path}")
53
65
 
54
66
  with file_path.open("r") as file:
@@ -68,12 +80,18 @@ async def perform_update(filename: click.Path, verbose: bool = False, dry_run: b
68
80
 
69
81
  try:
70
82
  repo = get_github_repo(github_account, github_repo)
71
- except github.GithubException as e:
72
- logger.critical(f"Repo {github_repo} not found. Ensure GH_REPO and GH_ACCOUNT are in your env file.")
83
+ except github.GithubException:
84
+ logger.critical(
85
+ f"Repo {github_repo} not found. Ensure GH_REPO and GH_ACCOUNT are in your env file."
86
+ )
73
87
  exit(1)
74
88
 
75
- secret_update_result = await create_or_update_github_secrets(repo=repo, env_data=secrets, dry_run=dry_run)
76
- not_secret_update_result = await create_or_update_github_variables(repo=repo, env_data=not_secrets, dry_run=dry_run)
89
+ secret_update_result = await create_or_update_github_secrets(
90
+ repo=repo, env_data=secrets, dry_run=dry_run
91
+ )
92
+ not_secret_update_result = await create_or_update_github_variables(
93
+ repo=repo, env_data=not_secrets, dry_run=dry_run
94
+ )
77
95
 
78
96
  results = {"SECRETS": secret_update_result, "VARIABLES": not_secret_update_result}
79
97
 
@@ -87,7 +105,8 @@ def get_github_repo(github_account, github_repo_name) -> Repository:
87
105
  :param github_repo_name: Name of the repository.
88
106
  :return: a GitHub repository object
89
107
  """
90
- auth = Auth.Token(os.environ.get("GH_TOKEN", None))
108
+ token = os.environ.get("GH_TOKEN", "")
109
+ auth = Auth.Token(token)
91
110
  g = Github(auth=auth)
92
111
  try:
93
112
  repo = g.get_user(github_account).get_repo(github_repo_name)
@@ -127,7 +146,7 @@ async def create_or_update_github_secrets(repo, env_data, dry_run: bool = False)
127
146
  tasks.append(asyncio.to_thread(repo.delete_secret, secret_name))
128
147
 
129
148
  if dry_run:
130
- results = [secret for secret in secrets]
149
+ results = list(secrets)
131
150
  else:
132
151
  results = await asyncio.gather(*tasks)
133
152
  return results
@@ -156,7 +175,9 @@ async def create_or_update_github_variables(repo, env_data, dry_run: bool = Fals
156
175
  return repo.create_variable(env_var_name, env_var_value)
157
176
 
158
177
  # tasks.append(asyncio.to_thread(repo.delete_variable, env_var_name))
159
- tasks.append(asyncio.to_thread(delete_then_create_variable, repo, env_var_name, env_var_value))
178
+ tasks.append(
179
+ asyncio.to_thread(delete_then_create_variable, repo, env_var_name, env_var_value)
180
+ )
160
181
  else:
161
182
  logger.info(f"{dry_run_prefix}Creating variable {env_var_name}...")
162
183
  tasks.append(asyncio.to_thread(repo.create_variable, env_var_name, env_var_value))
@@ -167,7 +188,7 @@ async def create_or_update_github_variables(repo, env_data, dry_run: bool = Fals
167
188
  tasks.append(asyncio.to_thread(repo.delete_variable, var_name))
168
189
 
169
190
  if dry_run:
170
- results = [var for var in vars]
191
+ results = list(vars)
171
192
  else:
172
193
  results = await asyncio.gather(*tasks)
173
194
 
@@ -1,43 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: augint-github
3
- Version: 1.3.0
4
- Summary: GitHub tools for Augmenting Integrations
5
- License: AGPL-3.0-only
6
- Author: Samuel Vange
7
- Author-email: 7166607+svange@users.noreply.github.com
8
- Requires-Python: >=3.9,<4.0
9
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: click (>=8.1.8,<9.0.0)
17
- Requires-Dist: loguru (>=0.7.3,<0.8.0)
18
- Requires-Dist: pygithub (>=2.5.0,<3.0.0)
19
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
20
- Requires-Dist: rich (>=13.9.4,<14.0.0)
21
- Project-URL: Homepage, https://github.com/svange/augint-github
22
- Description-Content-Type: text/markdown
23
-
24
- # Augmenting Integrations GitHub Tools
25
- ![ci status](https://github.com/svange/augint-github/actions/workflows/pipeline.yaml/badge.svg?branch=main)
26
-
27
- ![PyPI - Version](https://img.shields.io/pypi/v/openbrain)
28
- [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
29
- <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
30
- [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
31
- [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
32
- [![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions "Go to GitHub Actions homepage")
33
- [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
34
-
35
- # Variables and Secrets
36
- Push variables and secrets from .env to GH Actions.
37
-
38
-
39
- Here is a draft for a `README.md` section that provides a general overview of the `LeadmoApiV1` class, its capabilities, and usage examples:
40
-
41
- ---
42
-
43
-
@@ -1,19 +0,0 @@
1
- # Augmenting Integrations GitHub Tools
2
- ![ci status](https://github.com/svange/augint-github/actions/workflows/pipeline.yaml/badge.svg?branch=main)
3
-
4
- ![PyPI - Version](https://img.shields.io/pypi/v/openbrain)
5
- [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
6
- <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
7
- [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
8
- [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
9
- [![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions "Go to GitHub Actions homepage")
10
- [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
11
-
12
- # Variables and Secrets
13
- Push variables and secrets from .env to GH Actions.
14
-
15
-
16
- Here is a draft for a `README.md` section that provides a general overview of the `LeadmoApiV1` class, its capabilities, and usage examples:
17
-
18
- ---
19
-
@@ -1,235 +0,0 @@
1
- [tool.poetry]
2
- name = "augint-github"
3
- version = "1.3.0"
4
- description = "GitHub tools for Augmenting Integrations"
5
- authors = ["Samuel Vange <7166607+svange@users.noreply.github.com>"]
6
- readme = "README.md"
7
- license = "AGPL-3.0-only"
8
- homepage = "https://github.com/svange/augint-github"
9
- packages = [
10
- { include = "*", from = "src" },
11
- ]
12
-
13
- [tool.poetry.scripts]
14
- ai-gh-push = "gh_secrets_and_vars_async:cli"
15
-
16
- [tool.poetry.plugins."commitizen.plugin"] # completely untested
17
- cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz"
18
- #cz_jira = "commitizen.cz.jira:JiraSmartCz"
19
- cz_customize = "commitizen.cz.customize:CustomizeCommitsCz"
20
- cargo = "commitizen.providers:CargoProvider"
21
- commitizen = "commitizen.providers:CommitizenProvider"
22
- composer = "commitizen.providers:ComposerProvider"
23
- npm = "commitizen.providers:NpmProvider"
24
- pep621 = "commitizen.providers:Pep621Provider"
25
- poetry = "commitizen.providers:PoetryProvider"
26
- scm = "commitizen.providers:ScmProvider"
27
-
28
- [tool.poetry.dependencies]
29
- python = ">=3.9,<4.0"
30
- click = "^8.1.8"
31
- python-dotenv = "^1.0.1"
32
- rich = "^13.9.4"
33
- loguru = "^0.7.3"
34
- pygithub = "^2.5.0"
35
-
36
- [tool.poetry.group.dev.dependencies]
37
- pytest = "^8.3.4"
38
- pytest-html = "^4.1.1"
39
- pytest-cov = "^6.0.0"
40
-
41
- [tool.semantic_release]
42
- major_on_zero = false
43
- commit_message = "chore(release): release {version}"
44
-
45
- [tool.semantic_release.branches.main]
46
- match = "main"
47
- #commit_message = "chore(release): release {version}"
48
- prerelease = false
49
-
50
- [tool.semantic_release.branches.dev]
51
- match = "dev"
52
- #commit_message = "chore(pre-release): release {version}"
53
- prerelease_token = "dev"
54
- prerelease = true
55
-
56
- version_toml = [
57
- "pyproject.toml:tool.poetry.version",
58
- ]
59
- version_variable = [
60
- "__init__.py:__version__",
61
- ]
62
- build_command = "pip install poetry && poetry build"
63
- #logging_use_named_masks = true
64
- #major_on_zero = true
65
- tag_format = "v{version}"
66
- #exclude_commit_patterns = [
67
- # 'skip: ',
68
- #]
69
-
70
- [tool.semantic_release.publish]
71
- dist_glob_patterns = ["dist/*"]
72
- upload_to_vcs_release = true
73
- type = "github"
74
-
75
- [tool.semantic_release.remote.token]
76
- env = "GITHUB_TOKEN"
77
- fallback_env = "GH_TOKEN"
78
-
79
-
80
-
81
- [tool.commitizen]
82
- name = "cz_conventional_commits"
83
- tag_format = "v$version"
84
- version_scheme = "SemVer"
85
- version_provider = "poetry" #"scm"
86
- update_changelog_on_bump = true
87
- major_version_zero = true
88
- #version = "3.9.1"
89
- #version_files = [
90
- # "pyproject.toml:version",
91
- # "openbrain/__version__.py",
92
- # ".pre-commit-config.yaml:rev:.+Openbrain",
93
- #]
94
-
95
- [tool.poetry.plugins."commitizen.scheme"]
96
- pep440 = "commitizen.version_schemes:Pep440"
97
- semver = "commitizen.version_schemes:SemVer"
98
-
99
- [tool.coverage] # not tested
100
- [tool.coverage.report]
101
- show_missing = true
102
- exclude_lines = [
103
- # Have to re-enable the standard pragma
104
- 'pragma: no cover',
105
- # Don't complain about missing debug-only code:
106
- 'def __repr__',
107
- 'if self\.debug',
108
- # Don't complain if tests don't hit defensive assertion code:
109
- 'raise AssertionError',
110
- 'raise NotImplementedError',
111
- # Don't complain if non-runnable code isn't run:
112
- 'if 0:',
113
- 'if __name__ == .__main__.:',
114
- 'if TYPE_CHECKING:',
115
- ]
116
- omit = [
117
- 'env/*',
118
- 'venv/*',
119
- '.venv/*',
120
- '*/virtualenv/*',
121
- '*/virtualenvs/*',
122
- '*/tests/*',
123
- ]
124
-
125
- [tool.pytest.ini_options]
126
- addopts = '-m "not redundant and not skip_ci" --html=report.html --self-contained-html'
127
- log_cli = true
128
- log_cli_level = "INFO"
129
- log_format = "%(asctime)s %(levelname)s %(message)s"
130
- log_date_format = "%Y-%m-%d %H:%M:%S"
131
- log_file = "pytest.log"
132
- log_file_level = "INFO"
133
- #environment_table_redact_list = ".*key.*"
134
- #render_collapsed = "failed,error"
135
- markers = [
136
- "redudant: mark test as redundant",
137
- "end_to_end: mark test as an end-to-end test, meant for running in CI/CD against a live environment",
138
- "no_infra: mark test as not requiring infrastructure, intended for running in CI/CD against local web server (to the runner)",
139
- "skip_ci: mark as not suitable for ci",
140
- ]
141
-
142
- [tool.ruff]
143
- line-length = 130
144
- lint.ignore = [
145
- "E501",
146
- "D1",
147
- "D415"
148
- ]
149
- # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
150
- lint.select = ["E", "F"]
151
-
152
- [tool.lint.isort]
153
- known-first-party = ["commitizen", "tests"]
154
-
155
- [tool.lint.pydocstyle]
156
- convention = "restructuredtext"
157
-
158
- [tool.mypy]
159
- files = "commitizen"
160
- disallow_untyped_decorators = true
161
- disallow_subclassing_any = true
162
- warn_return_any = true
163
- warn_redundant_casts = true
164
- warn_unused_ignores = true
165
- warn_unused_configs = true
166
-
167
- [[tool.mypy.overrides]]
168
- module = "py.*" # Legacy pytest dependencies
169
- ignore_missing_imports = true
170
-
171
- [tool.black]
172
- line-length = 130
173
- target-version = ['py312']
174
- include = '\.pyi?$'
175
- exclude = '''
176
- /(
177
- \.git
178
- | \.hg
179
- | \.mypy_cache
180
- | \.tox
181
- | \.venv
182
- | _build
183
- | buck-out
184
- | build
185
- )/
186
- '''
187
-
188
- [tool.flake8]
189
- max-line-length = 130
190
- extend-ignore = ["D203", "E203", "E251", "E266", "E302", "E305", "E401", "E402", "E501", "F401", "F403", "W503"]
191
- exclude = [".git", "__pycache__", "dist"]
192
- max-complexity = 10
193
-
194
- [tool.isort]
195
- atomic = true
196
- profile = "black"
197
- line_length = 130
198
- skip_gitignore = true
199
-
200
- # Allow autofix for all enabled rules (when `--fix`) is provided.
201
- fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
202
- unfixable = []
203
-
204
- # Exclude a variety of commonly ignored directories.
205
- exclude = [
206
- ".bzr",
207
- ".direnv",
208
- ".eggs",
209
- ".git",
210
- ".git-rewrite",
211
- ".hg",
212
- ".mypy_cache",
213
- ".nox",
214
- ".pants.d",
215
- ".pytype",
216
- ".ruff_cache",
217
- ".svn",
218
- ".tox",
219
- ".venv",
220
- "__pypackages__",
221
- "_build",
222
- "buck-out",
223
- "build",
224
- "dist",
225
- "node_modules",
226
- "venv",
227
- ]
228
-
229
- # Same as Black.
230
- line-length = 130
231
-
232
- # Allow unused variables when underscore-prefixed.
233
- dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
234
-
235
- target-version = "py312"
File without changes