expense-local 0.0.1b4425__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 (67) hide show
  1. expense_local-0.0.1b4425/.env.example +13 -0
  2. expense_local-0.0.1b4425/.env.local1.example +35 -0
  3. expense_local-0.0.1b4425/.env.play1.example +35 -0
  4. expense_local-0.0.1b4425/.flake8 +2 -0
  5. expense_local-0.0.1b4425/.logger.json5 +27 -0
  6. expense_local-0.0.1b4425/CODEOWNERS +2 -0
  7. expense_local-0.0.1b4425/PKG-INFO +27 -0
  8. expense_local-0.0.1b4425/README.md +39 -0
  9. expense_local-0.0.1b4425/__init__.py +0 -0
  10. expense_local-0.0.1b4425/bin/cmd/profile.bat +3 -0
  11. expense_local-0.0.1b4425/bin/powershell/ExamplePowerShellModule/ExamplePowershellModule.psm1 +0 -0
  12. expense_local-0.0.1b4425/bin/powershell/profile.ps1 +5 -0
  13. expense_local-0.0.1b4425/bin/sh/profile.sh +5 -0
  14. expense_local-0.0.1b4425/bin/sh/run.sh +7 -0
  15. expense_local-0.0.1b4425/component.local1.json5.example +11 -0
  16. expense_local-0.0.1b4425/database/mysql/reports/README.md +3 -0
  17. expense_local-0.0.1b4425/database/mysql/reports/entity_types_imported_group_by_source_report.sql +6 -0
  18. expense_local-0.0.1b4425/database/mysql/reports/entity_types_imported_group_by_source_view.sql +8 -0
  19. expense_local-0.0.1b4425/database/mysql/schema/entity_types_imported_group_by_source_view.sql +16 -0
  20. expense_local-0.0.1b4425/database/mysql/schema/group__storage_table.sql +13 -0
  21. expense_local-0.0.1b4425/database/mysql/schema_changes/0.0.1_0.0.2_add_business_process_id_to_logger_table_example.sql +7 -0
  22. expense_local-0.0.1b4425/database/mysql/scripts/give_permissions_for_microservice.sql +31 -0
  23. expense_local-0.0.1b4425/database/mysql/scripts/give_permissions_for_tests.sql +31 -0
  24. expense_local-0.0.1b4425/database/mysql/system_data/table_name_system_data.sql +2 -0
  25. expense_local-0.0.1b4425/expense_local.egg-info/PKG-INFO +27 -0
  26. expense_local-0.0.1b4425/expense_local.egg-info/SOURCES.txt +65 -0
  27. expense_local-0.0.1b4425/expense_local.egg-info/dependency_links.txt +1 -0
  28. expense_local-0.0.1b4425/expense_local.egg-info/requires.txt +3 -0
  29. expense_local-0.0.1b4425/expense_local.egg-info/top_level.txt +1 -0
  30. expense_local-0.0.1b4425/pyproject.toml +35 -0
  31. expense_local-0.0.1b4425/pytest.ini +6 -0
  32. expense_local-0.0.1b4425/python_packages/expense_local/__init__.py +0 -0
  33. expense_local-0.0.1b4425/python_packages/expense_local/src/__init__.py +0 -0
  34. expense_local-0.0.1b4425/python_packages/expense_local/src/constants_src_expense_local.py +55 -0
  35. expense_local-0.0.1b4425/python_packages/expense_local/src/expense.py.old +20 -0
  36. expense_local-0.0.1b4425/python_packages/expense_local/src/expense_local.py +28 -0
  37. expense_local-0.0.1b4425/python_packages/expense_local/src/expense_local_enum.py +6 -0
  38. expense_local-0.0.1b4425/python_packages/expense_local/src/expense_test.py.old +60 -0
  39. expense_local-0.0.1b4425/python_packages/expense_local/src/expenses_local.py.old +34 -0
  40. expense_local-0.0.1b4425/python_packages/expense_local/src/pycallgraph.py +8 -0
  41. expense_local-0.0.1b4425/python_packages/expense_local/src/version.py +1 -0
  42. expense_local-0.0.1b4425/python_packages/expense_local/tests/__init__.py +0 -0
  43. expense_local-0.0.1b4425/python_packages/expense_local/tests/conftest.py +7 -0
  44. expense_local-0.0.1b4425/python_packages/expense_local/tests/constants/__init__.py +0 -0
  45. expense_local-0.0.1b4425/python_packages/expense_local/tests/constants/constants_tests_expense_local.py +18 -0
  46. expense_local-0.0.1b4425/python_packages/expense_local/tests/system/__init__.py +0 -0
  47. expense_local-0.0.1b4425/python_packages/expense_local/tests/system/expense_local_system_test.py +11 -0
  48. expense_local-0.0.1b4425/python_packages/expense_local/tests/unit/__init__.py +0 -0
  49. expense_local-0.0.1b4425/python_packages/expense_local/tests/unit/expense_local_unit_test.py +86 -0
  50. expense_local-0.0.1b4425/python_packages/expenses_local/__init__.py +0 -0
  51. expense_local-0.0.1b4425/python_packages/expenses_local/src/__init__.py +0 -0
  52. expense_local-0.0.1b4425/python_packages/expenses_local/src/constants_src_expense_local.py.old +48 -0
  53. expense_local-0.0.1b4425/python_packages/expenses_local/src/constants_src_expenses_local.py +65 -0
  54. expense_local-0.0.1b4425/python_packages/expenses_local/src/constants_src_expenses_local.py.old +66 -0
  55. expense_local-0.0.1b4425/python_packages/expenses_local/src/expenses_local.py +37 -0
  56. expense_local-0.0.1b4425/python_packages/expenses_local/src/pycallgraph.py +8 -0
  57. expense_local-0.0.1b4425/python_packages/expenses_local/src/version.py +2 -0
  58. expense_local-0.0.1b4425/python_packages/expenses_local/tests/__init__.py +0 -0
  59. expense_local-0.0.1b4425/python_packages/expenses_local/tests/conftest.py +7 -0
  60. expense_local-0.0.1b4425/python_packages/expenses_local/tests/constants/__init__.py +0 -0
  61. expense_local-0.0.1b4425/python_packages/expenses_local/tests/constants/constants_tests_expenses_local.py +18 -0
  62. expense_local-0.0.1b4425/python_packages/expenses_local/tests/unit/__init__.py +0 -0
  63. expense_local-0.0.1b4425/python_packages/expenses_local/tests/unit/expenses_local_unit_test.py +71 -0
  64. expense_local-0.0.1b4425/requirements-dev.txt +8 -0
  65. expense_local-0.0.1b4425/requirements.txt +12 -0
  66. expense_local-0.0.1b4425/setup.cfg +4 -0
  67. expense_local-0.0.1b4425/setup.py +101 -0
@@ -0,0 +1,13 @@
1
+ BRAND_NAME=
2
+ ENVIRONMENT_NAME=
3
+ LOGZIO_TOKEN=
4
+ DATADOG_SITE=
5
+ DATADOG_API_KEY=
6
+ LOGGER_CONFIGURATION_JSON_PATH=
7
+ LOGGER_MINIMUM_SEVERITY=
8
+ LOGGER_IS_WRITE_TO_SQL=
9
+ LOGGER_COLORS_IN_LOGS=
10
+ RDS_USERNAME=None
11
+ RDS_HOSTNAME=None
12
+ RDS_PASSWORD=None
13
+ RDS_PORT=3306
@@ -0,0 +1,35 @@
1
+ # TODO Please add all the environment variables uses in this repo here without any sensative/private information/credentials
2
+
3
+ # This is the .env file for play1 environment in the project directory and not in the root directory
4
+ # Please do not delete/rename this file
5
+
6
+ BRAND_NAME=Circlez
7
+ ENVIRONMENT_NAME=local1
8
+
9
+ # TODO In -local-package we need RDS environment variables, in -remote-package please delete the RDS variables from this file
10
+ # RDS_HOSTNAME=db.local1.circ.zone
11
+ RDS_HOSTNAME=db.local.circ.zone
12
+ # TODO: Please update your RDS_USERNAME and RDS_PASSWORD
13
+ # RDS_USERNAME withour the @circ.zone
14
+ RDS_USERNAME=tal.r
15
+ RDS_PASSWORD=
16
+
17
+ # TODO In -local-package we need JWT_SECRET_KEY environment variables, in -remote-package please delete the JWT_SECRET_KEY variables from this file
18
+ JWT_SECRET_KEY=4rehrkj43h5lkefkdslcw4r
19
+
20
+ # LOGZIO_TOKEN=cXNHuVkkffkilnkKzZlWExECRlSKqopE
21
+ DATADOG_API_KEY=c3d63dc8998d86434b38142e50a05e74
22
+
23
+ # Needed by the logger-local
24
+ # TODO: Please update you username in the product i.e. tal.r@circ.zone and the password in the product
25
+ PRODUCT_USER_IDENTIFIER=
26
+ PRODUCT_PASSWORD=
27
+
28
+ # AWS (in case of Local you need AWS environment variables, in case of remote AWS environment variables are not needed)
29
+
30
+ AWS_ACCESS_KEY_ID=
31
+ AWS_SECRET_ACCESS_KEY=
32
+
33
+ AWS_DEFAULT_STORAGE_BUCKET_NAME="storage.us-east-1.local1.circ.zone"
34
+
35
+ AWS_DEFAULT_REGION=us-east-1
@@ -0,0 +1,35 @@
1
+ # TODO Please add all the environment variables uses in this repo here without any sensative/private information/credentials
2
+
3
+ # This is the .env file for play1 environment in the project directory and not in the root directory
4
+ # Please do not delete/rename this file
5
+
6
+ BRAND_NAME=Circlez
7
+ ENVIRONMENT_NAME=play1
8
+
9
+ # TODO In -local-package we need RDS environment variables, in -remote-package please delete the RDS variables from this file
10
+ RDS_HOSTNAME=db.play1.circ.zone
11
+ # TODO: Please update your RDS_USERNAME and RDS_PASSWORD
12
+ # RDS_USERNAME withour the @circ.zone
13
+ RDS_USERNAME=tal.r
14
+ RDS_PASSWORD=
15
+
16
+ # TODO In -local-package we need JWT_SECRET_KEY environment variables, in -remote-package please delete the JWT_SECRET_KEY variables from this file
17
+ JWT_SECRET_KEY=4rehrkj43h5lkefkdslcw4r
18
+
19
+ # LOGZIO_TOKEN=cXNHuVkkffkilnkKzZlWExECRlSKqopE
20
+ DATADOG_API_KEY=c3d63dc8998d86434b38142e50a05e74
21
+
22
+
23
+ # Needed by the logger-local
24
+ # TODO: Please update you username in the product i.e. tal.r@circ.zone and the password in the product
25
+ PRODUCT_USER_IDENTIFIER=
26
+ PRODUCT_PASSWORD=
27
+
28
+ # AWS (in case of Local you need AWS environment variables, in case of remote AWS environment variables are not needed)
29
+
30
+ AWS_ACCESS_KEY_ID=
31
+ AWS_SECRET_ACCESS_KEY=
32
+
33
+ AWS_DEFAULT_STORAGE_BUCKET_NAME="storage.us-east-1.play1.circ.zone"
34
+
35
+ AWS_DEFAULT_REGION=us-east-1
@@ -0,0 +1,2 @@
1
+ [flake8]
2
+ exclude = lib/
@@ -0,0 +1,27 @@
1
+ {
2
+ "database without ORM": {
3
+ "Console": "Warning"
4
+ },
5
+ "person_local_python": {
6
+ "Logz.io": "Warning"
7
+ },
8
+ "sdk local": {
9
+ "Logz.io": "Warning"
10
+ },
11
+ "contact-person-local": {
12
+ "Logz.io": "Warning"
13
+ },
14
+ "text_block": {
15
+ "Logz.io": "Warning"
16
+ },
17
+ "contact-notes-local": {
18
+ "Logz.io": "Warning"
19
+ },
20
+ "wrong-component": {
21
+ "Logz.io": "Warning"
22
+ },
23
+ "default": {
24
+ "Console": "Error",
25
+ "Logz.io": "Error"
26
+ }
27
+ }
@@ -0,0 +1,2 @@
1
+ # TODO: You can add your GitHub user in the end of the line
2
+ * @circles-zone/python-team-lead @talr
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: expense-local
3
+ Version: 0.0.1b4425
4
+ Summary: PyPI expense-local Python Package owned by Circlez.ai
5
+ Home-page: https://github.com/circles-zone/expense-local-python-package
6
+ Author: Circles
7
+ Author-email: info@circlez.ai
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: python-sdk-remote
13
+ Requires-Dist: database-mysql-local
14
+ Requires-Dist: logger-local
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
24
+
25
+ PyPI expense-local Python Package owned by Circlez.ai
26
+ JIRA Work Item: https://circles-zone.atlassian.net/browse/BU-4425
27
+ GHA: https://github.com/circles-zone/expense-local-python-package/actions
@@ -0,0 +1,39 @@
1
+ # General
2
+
3
+ Unlike the README.md in the root directory, this is a README.md of this specific repo/package<br>
4
+
5
+ TODO Please update the README.md of this specific repo/package and not the README.md in the root directory based on the python-package-template repo<br>
6
+
7
+ ## TODOs
8
+
9
+ TODO ExpensesClassifier using Machine Learning or AI using a new smart-classifier
10
+ עירייה וממשלה
11
+ מזון וצריכה
12
+ מסעדות, קפה, וברים
13
+ פנאי, בידור וספורט
14
+ חשמל ומחשבים
15
+ אופנה
16
+ דלק, חשמל וגז
17
+ שונות
18
+ רפואה ובתי מרקחת
19
+ ביטוח
20
+ תחבורה ורכבים
21
+ עיצוב הבית
22
+ שירותי תקשורת
23
+ ספורט ודפוס
24
+
25
+ TODO Backend to support slides for simulator<br>
26
+
27
+ ## Versions
28
+
29
+ [pub] 0.0.1 Initial version (change the directories, files, setup.py, .github/workflows/*.yml)<br>
30
+
31
+ ## Installation instructions
32
+
33
+ It's advised to use venv<br>
34
+ If you have Windows, it's also advised to use the Windows Subsystem for Linux<br>
35
+
36
+ ## Install dependencies
37
+
38
+ Run ./download-beta-sdk.sh from the bash terminal<br>
39
+ Run pip install -r requirements.txt from the bash terminal<br>
File without changes
@@ -0,0 +1,3 @@
1
+ # Profile a Python program (to check and improve its performance).
2
+ rem https://stackoverflow.com/questions/582336/how-do-i-profile-a-python-script
3
+ python -m cProfile %1
@@ -0,0 +1,5 @@
1
+ # Profile a Python program (to check and improve its performance).
2
+ # https://stackoverflow.com/questions/582336/how-do-i-profile-a-python-script
3
+
4
+ python -m cProfile $args[0]
5
+
@@ -0,0 +1,5 @@
1
+ #!/bin/sh
2
+ # Profile a Python program (to check and improve its performance).
3
+ # https://stackoverflow.com/questions/582336/how-do-i-profile-a-python-script
4
+
5
+ python -m cProfile "$1"
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # run.sh
4
+
5
+ # TODO Shall we move this file to a python-sdk-remote?
6
+
7
+ dotenv -f ~/repos/circlez/expense-local-python-package/packages/expense-local/.env.local1 run python expense-local/src/expense_local.py
@@ -0,0 +1,11 @@
1
+ {
2
+ "event": {
3
+ "componentId": 247,
4
+ "environmentName":"local"
5
+ },
6
+ "group": {
7
+ "componentId": 229,
8
+ "environmentName":"local",
9
+ "port": 3001
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ # <project-name> Reports
2
+
3
+ TODO: Please add documentation of each report, if any.
@@ -0,0 +1,6 @@
1
+ -- TODO Any report (even accessing multiple tables) that is relevant to this package
2
+ -- Purpose: This report present all ...
3
+
4
+ -- SELCET *
5
+ -- FROM xxxx
6
+ -- JOIN yyyy ON xxx.xx_id = yyy.yy_id;
@@ -0,0 +1,8 @@
1
+ -- TODO each table and view used in the repo in a seperate *.sql file, this file make sure the relevant tables and views are defined and accessable. Please make sure the filename match the table/view name.
2
+ USE entity_type;
3
+ SELECT *
4
+ FROM entity_types_imported_group_by_source_table
5
+ LIMIT 5;
6
+ SELECT *
7
+ FROM entity_types_imported_group_by_source_view
8
+ LIMIT 5;
@@ -0,0 +1,16 @@
1
+ -- TODO: Please write all CREATE TABLE and CREATE VIEWs relevant to this package. File name is exactly as the name of the table/view. We prefer *.py file usig our database package and not *.sql
2
+
3
+ -- If you need to add parameter to the SQL
4
+ -- https://stackoverflow.com/questions/2281890/can-i-create-view-with-parameter-in-mysql
5
+
6
+ -- Must have USE statement where the view should be created
7
+ -- USE importer;
8
+
9
+ -- Name of the view should be meaningful and according to our standard naming convention
10
+ -- DROP VIEW entity_types_imported_group_by_source_view;
11
+ -- CREATE VIEW IF NOT EXISTS entity_types_imported_group_by_source_view AS
12
+ -- SELECT entity_type_name AS 'Entity Type', source_name AS 'Website', count(*) as 'Number of Entries'
13
+ -- FROM importer.importer_table
14
+ -- JOIN entity_type.entity_type_ml_table ON entity_type.entity_type_ml_table.entity_type_id=importer.importer_table.entity_type_id
15
+ -- JOIN source.source_ml_table ON source.source_ml_table.source_id=importer.importer_table.source_id
16
+ -- GROUP BY source.source_ml_table.source_name;
@@ -0,0 +1,13 @@
1
+ # Group Storage Mapping Table
2
+
3
+ CREATE SCHEMA IF NOT EXISTS group__storage;
4
+ USE group__storage;
5
+
6
+ CREATE TABLE IF NOT EXISTS group__storage_table (
7
+ id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
8
+ group_id BIGINT UNSIGNED,
9
+ storage_id BIGINT UNSIGNED,
10
+ PRIMARY KEY(id),
11
+ FOREIGN KEY(group_id) REFERENCES group_table(id)
12
+ FOREIGN KEY(storage_id) REFERENCES storage_table(id)
13
+ );
@@ -0,0 +1,7 @@
1
+ -- We should manage our database schema versions in database schema in MySQL
2
+
3
+ -- schema_changes/0.0.1_0.0.2_add_business_process_id_to_logger_table.sql
4
+
5
+ -- schema_change example:
6
+ -- ALTER TABLE `logger`.`logger_table`
7
+ -- ADD COLUMN `business_process_id` INT NULL DEFAULT NULL AFTER `locals_before_exception_text`;
@@ -0,0 +1,31 @@
1
+ -- TODO If you need permissions to run this package's tests, please update the file /database/mysql/scripts/give_permissions.sql in your repo
2
+ -- Please ask only for what you need to complete your task.
3
+ -- We don't give all privileges. Please don't hesitate to ask if there's anything you need to make the code run.
4
+ -- Please ask your Team Lead to run it for you in play1, dvlp1, prod1 ...
5
+ -- Example:
6
+ -- https://github.com/circles-zone/python-package-template/blob/dev/replace-with-repo-name-push-and-merge/database/mysql/scripts/give_permissions.sql
7
+
8
+ -- SET @username = 'zvi.n';
9
+ -- SELECT @username;
10
+ -- USE contact_note;
11
+ -- SET @a=CONCAT("'",@username,"@\'%\'\'");
12
+ -- SELECT @a;
13
+
14
+
15
+
16
+ -- Please add this paragraph for each schema you need permissions for.
17
+ -- Please give the right permissions you need.
18
+ -- SET @query = CONCAT("GRANT SELECT, INSERT, UPDATE ON `location`.* TO ", @user_role,";");
19
+
20
+ -- In case of local package, you might need SELECT, INSERT, and UPDATE (to run the tests)
21
+ -- In case of a remote package, you need only SELECT for viewing the values with Workbench (not for running the tests)
22
+
23
+
24
+ -- TODO Please put your username here
25
+ SET @user_role = "'tal.r'@'%'";
26
+
27
+ -- For example, if you want to access component_table, component_view ... you should fill-in 'component' in the second parameter
28
+ CALL `database`.grant_permissions(@user_role, 'component', 'SELECT');
29
+
30
+ -- Only if you need more than SELECT, please add the permissions you need
31
+ CALL `database`.grant_permissions(@user_role, 'component', 'INSERT, SELECT');
@@ -0,0 +1,31 @@
1
+ -- TODO If you need permissions to run this package's tests, please update the file /database/mysql/scripts/give_permissions.sql in your repo
2
+ -- Please ask only for what you need to complete your task.
3
+ -- We don't give all privileges. Please don't hesitate to ask if there's anything you need to make the code run.
4
+ -- Please ask your Team Lead to run it for you in play1, dvlp1, prod1 ...
5
+ -- Example:
6
+ -- https://github.com/circles-zone/python-package-template/blob/dev/replace-with-repo-name-push-and-merge/database/mysql/scripts/give_permissions.sql
7
+
8
+ -- SET @username = 'zvi.n';
9
+ -- SELECT @username;
10
+ -- USE contact_note;
11
+ -- SET @a=CONCAT("'",@username,"@\'%\'\'");
12
+ -- SELECT @a;
13
+
14
+
15
+
16
+ -- Please add this paragraph for each schema you need permissions for.
17
+ -- Please give the right permissions you need.
18
+ -- SET @query = CONCAT("GRANT SELECT, INSERT, UPDATE ON `location`.* TO ", @user_role,";");
19
+
20
+ -- In case of local package, you might need SELECT, INSERT, and UPDATE (to run the tests)
21
+ -- In case of a remote package, you need only SELECT for viewing the values with Workbench (not for running the tests)
22
+
23
+
24
+ -- TODO Please put your username here
25
+ SET @user_role = "'tal.r'@'%'";
26
+
27
+ -- For example, if you want to access component_table, component_view ... you should fill-in 'component' in the second parameter
28
+ CALL `database`.grant_permissions(@user_role, 'component', 'SELECT');
29
+
30
+ -- Only if you need more than SELECT, please add the permissions you need
31
+ CALL `database`.grant_permissions(@user_role, 'component', 'INSERT, SELECT');
@@ -0,0 +1,2 @@
1
+ -- INSERT INTO `text_block`.`expand_text_table` (`original_text`, `target_text`) VALUES ('WA', 'WhatsApp');
2
+ -- INSERT INTO `text_block`.`expand_text_table` (`original_text`, `target_text`) VALUES ('VM', 'Voice Mail');
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: expense-local
3
+ Version: 0.0.1b4425
4
+ Summary: PyPI expense-local Python Package owned by Circlez.ai
5
+ Home-page: https://github.com/circles-zone/expense-local-python-package
6
+ Author: Circles
7
+ Author-email: info@circlez.ai
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: python-sdk-remote
13
+ Requires-Dist: database-mysql-local
14
+ Requires-Dist: logger-local
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
24
+
25
+ PyPI expense-local Python Package owned by Circlez.ai
26
+ JIRA Work Item: https://circles-zone.atlassian.net/browse/BU-4425
27
+ GHA: https://github.com/circles-zone/expense-local-python-package/actions
@@ -0,0 +1,65 @@
1
+ .env.example
2
+ .env.local1.example
3
+ .env.play1.example
4
+ .flake8
5
+ .logger.json5
6
+ CODEOWNERS
7
+ README.md
8
+ __init__.py
9
+ component.local1.json5.example
10
+ pyproject.toml
11
+ pytest.ini
12
+ requirements-dev.txt
13
+ requirements.txt
14
+ setup.py
15
+ bin/cmd/profile.bat
16
+ bin/powershell/profile.ps1
17
+ bin/powershell/ExamplePowerShellModule/ExamplePowershellModule.psm1
18
+ bin/sh/profile.sh
19
+ bin/sh/run.sh
20
+ database/mysql/reports/README.md
21
+ database/mysql/reports/entity_types_imported_group_by_source_report.sql
22
+ database/mysql/reports/entity_types_imported_group_by_source_view.sql
23
+ database/mysql/schema/entity_types_imported_group_by_source_view.sql
24
+ database/mysql/schema/group__storage_table.sql
25
+ database/mysql/schema_changes/0.0.1_0.0.2_add_business_process_id_to_logger_table_example.sql
26
+ database/mysql/scripts/give_permissions_for_microservice.sql
27
+ database/mysql/scripts/give_permissions_for_tests.sql
28
+ database/mysql/system_data/table_name_system_data.sql
29
+ expense_local.egg-info/PKG-INFO
30
+ expense_local.egg-info/SOURCES.txt
31
+ expense_local.egg-info/dependency_links.txt
32
+ expense_local.egg-info/requires.txt
33
+ expense_local.egg-info/top_level.txt
34
+ python_packages/expense_local/__init__.py
35
+ python_packages/expense_local/src/__init__.py
36
+ python_packages/expense_local/src/constants_src_expense_local.py
37
+ python_packages/expense_local/src/expense.py.old
38
+ python_packages/expense_local/src/expense_local.py
39
+ python_packages/expense_local/src/expense_local_enum.py
40
+ python_packages/expense_local/src/expense_test.py.old
41
+ python_packages/expense_local/src/expenses_local.py.old
42
+ python_packages/expense_local/src/pycallgraph.py
43
+ python_packages/expense_local/src/version.py
44
+ python_packages/expense_local/tests/__init__.py
45
+ python_packages/expense_local/tests/conftest.py
46
+ python_packages/expense_local/tests/constants/__init__.py
47
+ python_packages/expense_local/tests/constants/constants_tests_expense_local.py
48
+ python_packages/expense_local/tests/system/__init__.py
49
+ python_packages/expense_local/tests/system/expense_local_system_test.py
50
+ python_packages/expense_local/tests/unit/__init__.py
51
+ python_packages/expense_local/tests/unit/expense_local_unit_test.py
52
+ python_packages/expenses_local/__init__.py
53
+ python_packages/expenses_local/src/__init__.py
54
+ python_packages/expenses_local/src/constants_src_expense_local.py.old
55
+ python_packages/expenses_local/src/constants_src_expenses_local.py
56
+ python_packages/expenses_local/src/constants_src_expenses_local.py.old
57
+ python_packages/expenses_local/src/expenses_local.py
58
+ python_packages/expenses_local/src/pycallgraph.py
59
+ python_packages/expenses_local/src/version.py
60
+ python_packages/expenses_local/tests/__init__.py
61
+ python_packages/expenses_local/tests/conftest.py
62
+ python_packages/expenses_local/tests/constants/__init__.py
63
+ python_packages/expenses_local/tests/constants/constants_tests_expenses_local.py
64
+ python_packages/expenses_local/tests/unit/__init__.py
65
+ python_packages/expenses_local/tests/unit/expenses_local_unit_test.py
@@ -0,0 +1,3 @@
1
+ python-sdk-remote
2
+ database-mysql-local
3
+ logger-local
@@ -0,0 +1,35 @@
1
+ # This file should be in the future instead of setup.py
2
+ # https://python-poetry.org/docs/pyproject
3
+ # https://stackoverflow.com/questions/78048223/adding-folder-with-data-with-pyproject-toml
4
+ # https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
5
+
6
+ # This file is mandatory for the `poetry version patch`
7
+
8
+ # It seems we need to copy this file also to serverless-com repo, as required by dialog-workflow-python-package
9
+
10
+ [build-system]
11
+ # "setuptools_scm>=6.2" is required for writing the version in my_package/_version.py and may be also for "poetry version patch" to work
12
+ requires = ["setuptools>=61.0", "setuptools_scm>=6.2"]
13
+ build-backend = "setuptools.build_meta"
14
+
15
+ [tool.setuptools_scm]
16
+ write_to = "expense_local/_version.py"
17
+
18
+ [tool.pytest.ini_options]
19
+ pythonpath = ["."]
20
+
21
+ [tool.poetry]
22
+ # TODO: Please update the name, similar to storage-local (suffix -local)
23
+ name = "expense-local"
24
+ # TODO After the b (beta), you should add the Jira Work Item ID (was generated by Jira). If you run sdk-local Makec.ps1 it should do it for you.
25
+ # I believe we are still using the version from setup.py and not from here until Potery will work
26
+ version = "0.0.1b4425" # https://pypi.org/project/expense-local i.e. https://pypi.org/project/storage-local/
27
+ description = "expense-local Python Package"
28
+ readme = "README.md"
29
+ authors = [
30
+ "Circlez.ai <info@circlez.ai>",
31
+ ]
32
+
33
+ [tool.poetry.dev-dependencies]
34
+ pytest = "^8.0"
35
+ pytest-cov = "^5.0"
@@ -0,0 +1,6 @@
1
+ ; Neeedd only if we have two modules package_name_local and package_name_serverless_com, if we have only one per repo, I'm not sure we need it.
2
+ [pytest]
3
+ ; exit after 1 failure(s)
4
+ addopts = --maxfail=1
5
+ testpaths = python_packages/expense_local/tests python_packages/expenses_local/tests
6
+ pythonpath = python_packages/expense_local/src python_packages/expenses_local/src
@@ -0,0 +1,55 @@
1
+ # TODO Please rename the filename from entity_constants.py to your entity. If your entity is country please change the file name to country_constants.py # noqa E501
2
+ from typing import Any
3
+ from logger_local.LoggerComponentEnum import LoggerComponentEnum
4
+
5
+
6
+ # Please change everywhere there is "Expense" to your entity name i.e. "Country" (Please pay attention the C is in uppercase) # noqa E501
7
+ class ConstantsSrcExpense:
8
+ """This is a class of all the constants of Expense"""
9
+
10
+ # EXPENSE_MESSAGE_INFORU_API_TYPE_ID = <api-type-id>
11
+
12
+ # TODO Please update your email
13
+ EXPENSE_LOCAL_PYTHON_DEVELOPER_EMAIL_ADDRESS: str = 'tal.r@circ.zone'
14
+
15
+ EXPENSE_LOCAL_PYTHON_CODE_COMPONENT_ID: int = 5000018
16
+
17
+ # TODO Please write your own COMPONENT_NAME of the example (without S)
18
+ EXPENSE_LOCAL_PYTHON_COMPONENT_NAME = 'Expense local Python package'
19
+ EXPENSE_LOCAL_CODE_LOGGER_INIT_OBJECT: dict[str, Any] = {
20
+ 'componentId': EXPENSE_LOCAL_PYTHON_CODE_COMPONENT_ID,
21
+ 'componentName': EXPENSE_LOCAL_PYTHON_COMPONENT_NAME,
22
+ 'componentCategory': LoggerComponentEnum.ComponentCategory.Code.value,
23
+ 'developerEmailAddress': EXPENSE_LOCAL_PYTHON_DEVELOPER_EMAIL_ADDRESS # noqa E501
24
+ }
25
+
26
+ UNKNOWN_EXPENSE_ID = 0
27
+
28
+ # TODO Please update if you need default values i.e. for testing
29
+ # DEFAULT_XXX_NAME = None
30
+ # DEFAULT_XXX_NAME = None
31
+
32
+ # EXPENSE_SCHEMA_NAME = 'expense_schema'
33
+ # EXPENSE_TABLE_NAME = 'expense_table'
34
+ # EXPENSE_VIEW_NAME = 'expense_view'
35
+ # EXPENSE_ML_TABLE_NAME = 'expense_ml_table' # TODO In case you don't use ML table, delete this
36
+ # EXPENSE_ML_VIEW_NAME = 'expense_ml_view'
37
+ # EXPENSE_COLUMN_NAME = 'expense_id'
38
+
39
+
40
+ def get_logger_object(category: str = LoggerComponentEnum.ComponentCategory.Code):
41
+ if category == LoggerComponentEnum.ComponentCategory.Code:
42
+ get_logger_object_result = {
43
+ 'component_id': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_CODE_COMPONENT_ID,
44
+ 'component_name': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_COMPONENT_NAME,
45
+ 'component_category': LoggerComponentEnum.ComponentCategory.Code,
46
+ 'developer_email_address': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_DEVELOPER_EMAIL_ADDRESS
47
+ }
48
+ elif category == LoggerComponentEnum.ComponentCategory.Unit_Test:
49
+ get_logger_object_result = {
50
+ 'component_id': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_CODE_COMPONENT_ID,
51
+ 'component_name': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_COMPONENT_NAME,
52
+ 'component_category': LoggerComponentEnum.ComponentCategory.Unit_Test,
53
+ 'developer_email_address': ConstantsSrcExpense.EXPENSE_LOCAL_PYTHON_DEVELOPER_EMAIL_ADDRESS
54
+ }
55
+ return get_logger_object_result
@@ -0,0 +1,20 @@
1
+ from python_sdk_remote.our_object import OurObject
2
+
3
+ ENTITY_NAME = "<Example>"
4
+
5
+
6
+ class <Example>(OurObject):
7
+
8
+ # TODO Add all fields
9
+ fields = {
10
+ "<example>_id",
11
+ "display_as",
12
+ }
13
+
14
+ def __init__(self, entity_name=ENTITY_NAME, **kwargs):
15
+ super().__init__(entity_name, **kwargs)
16
+
17
+ # Mandatory pure virtual method from OurObject
18
+ def get_name(self):
19
+ print(f"{ENTITY_NAME} get_name() self.fields.display_as={self.fields.display_as}")
20
+ return self.fields.display_as
@@ -0,0 +1,28 @@
1
+ from python_sdk_remote.our_object import OurObject
2
+
3
+ ENTITY_NAME = "Expense"
4
+
5
+
6
+ class ExpenseLocal(OurObject):
7
+
8
+ # TODO Add all fields
9
+ fields = {
10
+ "expense_id",
11
+ "display_as",
12
+ }
13
+
14
+ def __init__(self, entity_name=ENTITY_NAME, **kwargs):
15
+ super().__init__(entity_name, **kwargs)
16
+
17
+ def get_expense_id_by_first_name(self) -> int:
18
+ pass
19
+
20
+ def get_expense_id(self) -> int:
21
+ """The id of this expense, or None when it is not set."""
22
+ get_expense_id_result = self.get("expense_id")
23
+ return get_expense_id_result
24
+
25
+ # Mandatory pure virtual method from OurObject
26
+ def get_name(self):
27
+ print(f"{ENTITY_NAME} get_name() self.fields.display_as={self.fields.display_as}")
28
+ return self.fields.display_as
@@ -0,0 +1,6 @@
1
+ import enum
2
+
3
+
4
+ class ExpenseLocalEnum(enum.Enum):
5
+ VALUE1_ID = 20
6
+ VALUE2_ID = 18