commons-metrics 0.0.18__tar.gz → 0.0.19__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.
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/PKG-INFO +1 -1
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/__init__.py +1 -1
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/repositories.py +4 -4
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/PKG-INFO +1 -1
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/setup.py +1 -1
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/LICENSE +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/README.md +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/azure_devops_client.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/cache_manager.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/commons_repos_client.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/connection_database.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/database.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/date_utils.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/github_api_client.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/s3_file_manager.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/text_simplifier.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/update_design_components.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/util.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/variable_finder.py +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/SOURCES.txt +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/dependency_links.txt +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/requires.txt +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/top_level.txt +0 -0
- {commons_metrics-0.0.18 → commons_metrics-0.0.19}/setup.cfg +0 -0
|
@@ -6,4 +6,4 @@ from .github_api_client import GitHubAPIClient
|
|
|
6
6
|
from .azure_devops_client import AzureDevOpsClient
|
|
7
7
|
|
|
8
8
|
__all__ = ['Util', 'DatabaseConnection', 'ComponentRepository', 'UpdateDesignSystemComponents', 'GitHubAPIClient', 'AzureDevOpsClient']
|
|
9
|
-
__version__ = '0.0.
|
|
9
|
+
__version__ = '0.0.19'
|
|
@@ -112,14 +112,14 @@ class ComponentRepository:
|
|
|
112
112
|
if cursor:
|
|
113
113
|
cursor.close()
|
|
114
114
|
|
|
115
|
-
def save_adoption(self, version_id: int, component_id: int,
|
|
115
|
+
def save_adoption(self, version_id: int, component_id: int, application_code: str, count: int, date_id: int = None):
|
|
116
116
|
"""
|
|
117
117
|
Inserta un registro de adopción en la tabla schmetrc.general_adoption
|
|
118
118
|
|
|
119
119
|
Args:
|
|
120
120
|
version_id (int): ID de la versión del sistema de diseño
|
|
121
121
|
component_id (int): ID del componente
|
|
122
|
-
|
|
122
|
+
application_code (str): Código de aplicación (ej: NU0296001)
|
|
123
123
|
count (int): Cantidad de usos del componente
|
|
124
124
|
date_id (int, optional): ID de la fecha en measurement_systems_history. Por defecto None
|
|
125
125
|
"""
|
|
@@ -127,12 +127,12 @@ class ComponentRepository:
|
|
|
127
127
|
try:
|
|
128
128
|
cursor = self.db.connection.cursor()
|
|
129
129
|
insert_query = """
|
|
130
|
-
INSERT INTO schmetrc.general_adoption(version_id, component_id,
|
|
130
|
+
INSERT INTO schmetrc.general_adoption(version_id, component_id, application_code, count, date_id)
|
|
131
131
|
VALUES (%s, %s, %s, %s, %s)
|
|
132
132
|
RETURNING id;
|
|
133
133
|
"""
|
|
134
134
|
|
|
135
|
-
cursor.execute(insert_query, (version_id, component_id,
|
|
135
|
+
cursor.execute(insert_query, (version_id, component_id, application_code, count, date_id))
|
|
136
136
|
adoption_id = cursor.fetchone()[0]
|
|
137
137
|
self.db.commit_transaction()
|
|
138
138
|
return adoption_id
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='commons_metrics',
|
|
5
|
-
version='0.0.
|
|
5
|
+
version='0.0.19',
|
|
6
6
|
description='A simple library for basic statistical calculations',
|
|
7
7
|
#long_description=open('USAGE.md').read(),
|
|
8
8
|
#long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics/update_design_components.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{commons_metrics-0.0.18 → commons_metrics-0.0.19}/commons_metrics.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|