From 37e6901cf85ce05ca170de8efa0f07a5ae93dcbe Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 4 Feb 2022 15:29:22 +0550 Subject: [PATCH] feat: Initialize App --- .gitignore | 6 + MANIFEST.in | 18 ++ README.md | 7 + india_compliance/__init__.py | 3 + india_compliance/config/__init__.py | 0 india_compliance/config/desktop.py | 12 ++ india_compliance/config/docs.py | 10 + india_compliance/hooks.py | 190 ++++++++++++++++++ india_compliance/india_compliance/__init__.py | 0 india_compliance/modules.txt | 1 + india_compliance/patches.txt | 0 india_compliance/public/.gitkeep | 0 india_compliance/templates/__init__.py | 0 india_compliance/templates/pages/__init__.py | 0 license.txt | 1 + requirements.txt | 1 + setup.py | 19 ++ 17 files changed, 268 insertions(+) create mode 100644 .gitignore create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 india_compliance/__init__.py create mode 100644 india_compliance/config/__init__.py create mode 100644 india_compliance/config/desktop.py create mode 100644 india_compliance/config/docs.py create mode 100644 india_compliance/hooks.py create mode 100644 india_compliance/india_compliance/__init__.py create mode 100644 india_compliance/modules.txt create mode 100644 india_compliance/patches.txt create mode 100644 india_compliance/public/.gitkeep create mode 100644 india_compliance/templates/__init__.py create mode 100644 india_compliance/templates/pages/__init__.py create mode 100644 license.txt create mode 100644 requirements.txt create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..b30ae6135b --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*.pyc +*.egg-info +*.swp +tags +india_compliance/docs/current \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000..f2ab4078b5 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,18 @@ +include MANIFEST.in +include requirements.txt +include *.json +include *.md +include *.py +include *.txt +recursive-include india_compliance *.css +recursive-include india_compliance *.csv +recursive-include india_compliance *.html +recursive-include india_compliance *.ico +recursive-include india_compliance *.js +recursive-include india_compliance *.json +recursive-include india_compliance *.md +recursive-include india_compliance *.png +recursive-include india_compliance *.py +recursive-include india_compliance *.svg +recursive-include india_compliance *.txt +recursive-exclude india_compliance *.pyc \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000..9678eb6363 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +## India Compliance + +ERPNext app to simplify compliance with Indian Rules and Regulations + +#### License + +GNU General Public License (v3) \ No newline at end of file diff --git a/india_compliance/__init__.py b/india_compliance/__init__.py new file mode 100644 index 0000000000..7a0660b4a6 --- /dev/null +++ b/india_compliance/__init__.py @@ -0,0 +1,3 @@ + +__version__ = '0.0.1' + diff --git a/india_compliance/config/__init__.py b/india_compliance/config/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/india_compliance/config/desktop.py b/india_compliance/config/desktop.py new file mode 100644 index 0000000000..e1ee23d331 --- /dev/null +++ b/india_compliance/config/desktop.py @@ -0,0 +1,12 @@ +from frappe import _ + +def get_data(): + return [ + { + "module_name": "India Compliance", + "color": "grey", + "icon": "octicon octicon-file-directory", + "type": "module", + "label": _("India Compliance") + } + ] diff --git a/india_compliance/config/docs.py b/india_compliance/config/docs.py new file mode 100644 index 0000000000..b175604e55 --- /dev/null +++ b/india_compliance/config/docs.py @@ -0,0 +1,10 @@ +""" +Configuration for docs +""" + +# source_link = "https://github.com/[org_name]/india_compliance" +# headline = "App that does everything" +# sub_heading = "Yes, you got that right the first time, everything" + +def get_context(context): + context.brand_html = "India Compliance" diff --git a/india_compliance/hooks.py b/india_compliance/hooks.py new file mode 100644 index 0000000000..40c79af407 --- /dev/null +++ b/india_compliance/hooks.py @@ -0,0 +1,190 @@ +from . import __version__ as app_version + +app_name = "india_compliance" +app_title = "India Compliance" +app_publisher = "Resilient Tech" +app_description = "ERPNext app to simplify compliance with Indian Rules and Regulations" +app_icon = "octicon octicon-file-directory" +app_color = "grey" +app_email = "india.compliance@resilient.tech" +app_license = "GNU General Public License (v3)" + +# Includes in +# ------------------ + +# include js, css files in header of desk.html +# app_include_css = "/assets/india_compliance/css/india_compliance.css" +# app_include_js = "/assets/india_compliance/js/india_compliance.js" + +# include js, css files in header of web template +# web_include_css = "/assets/india_compliance/css/india_compliance.css" +# web_include_js = "/assets/india_compliance/js/india_compliance.js" + +# include custom scss in every website theme (without file extension ".scss") +# website_theme_scss = "india_compliance/public/scss/website" + +# include js, css files in header of web form +# webform_include_js = {"doctype": "public/js/doctype.js"} +# webform_include_css = {"doctype": "public/css/doctype.css"} + +# include js in page +# page_js = {"page" : "public/js/file.js"} + +# include js in doctype views +# doctype_js = {"doctype" : "public/js/doctype.js"} +# doctype_list_js = {"doctype" : "public/js/doctype_list.js"} +# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} +# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} + +# Home Pages +# ---------- + +# application home page (will override Website Settings) +# home_page = "login" + +# website user home page (by Role) +# role_home_page = { +# "Role": "home_page" +# } + +# Generators +# ---------- + +# automatically create page for each record of this doctype +# website_generators = ["Web Page"] + +# Jinja +# ---------- + +# add methods and filters to jinja environment +# jinja = { +# "methods": "india_compliance.utils.jinja_methods", +# "filters": "india_compliance.utils.jinja_filters" +# } + +# Installation +# ------------ + +# before_install = "india_compliance.install.before_install" +# after_install = "india_compliance.install.after_install" + +# Uninstallation +# ------------ + +# before_uninstall = "india_compliance.uninstall.before_uninstall" +# after_uninstall = "india_compliance.uninstall.after_uninstall" + +# Desk Notifications +# ------------------ +# See frappe.core.notifications.get_notification_config + +# notification_config = "india_compliance.notifications.get_notification_config" + +# Permissions +# ----------- +# Permissions evaluated in scripted ways + +# permission_query_conditions = { +# "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", +# } +# +# has_permission = { +# "Event": "frappe.desk.doctype.event.event.has_permission", +# } + +# DocType Class +# --------------- +# Override standard doctype classes + +# override_doctype_class = { +# "ToDo": "custom_app.overrides.CustomToDo" +# } + +# Document Events +# --------------- +# Hook on document methods and events + +# doc_events = { +# "*": { +# "on_update": "method", +# "on_cancel": "method", +# "on_trash": "method" +# } +# } + +# Scheduled Tasks +# --------------- + +# scheduler_events = { +# "all": [ +# "india_compliance.tasks.all" +# ], +# "daily": [ +# "india_compliance.tasks.daily" +# ], +# "hourly": [ +# "india_compliance.tasks.hourly" +# ], +# "weekly": [ +# "india_compliance.tasks.weekly" +# ], +# "monthly": [ +# "india_compliance.tasks.monthly" +# ], +# } + +# Testing +# ------- + +# before_tests = "india_compliance.install.before_tests" + +# Overriding Methods +# ------------------------------ +# +# override_whitelisted_methods = { +# "frappe.desk.doctype.event.event.get_events": "india_compliance.event.get_events" +# } +# +# each overriding function accepts a `data` argument; +# generated from the base implementation of the doctype dashboard, +# along with any modifications made in other Frappe apps +# override_doctype_dashboards = { +# "Task": "india_compliance.task.get_dashboard_data" +# } + +# exempt linked doctypes from being automatically cancelled +# +# auto_cancel_exempted_doctypes = ["Auto Repeat"] + + +# User Data Protection +# -------------------- + +# user_data_fields = [ +# { +# "doctype": "{doctype_1}", +# "filter_by": "{filter_by}", +# "redact_fields": ["{field_1}", "{field_2}"], +# "partial": 1, +# }, +# { +# "doctype": "{doctype_2}", +# "filter_by": "{filter_by}", +# "partial": 1, +# }, +# { +# "doctype": "{doctype_3}", +# "strict": False, +# }, +# { +# "doctype": "{doctype_4}" +# } +# ] + +# Authentication and authorization +# -------------------------------- + +# auth_hooks = [ +# "india_compliance.auth.validate" +# ] + diff --git a/india_compliance/india_compliance/__init__.py b/india_compliance/india_compliance/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/india_compliance/modules.txt b/india_compliance/modules.txt new file mode 100644 index 0000000000..bee15b81e2 --- /dev/null +++ b/india_compliance/modules.txt @@ -0,0 +1 @@ +India Compliance \ No newline at end of file diff --git a/india_compliance/patches.txt b/india_compliance/patches.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/india_compliance/public/.gitkeep b/india_compliance/public/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/india_compliance/templates/__init__.py b/india_compliance/templates/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/india_compliance/templates/pages/__init__.py b/india_compliance/templates/pages/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/license.txt b/license.txt new file mode 100644 index 0000000000..b5610908bc --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +License: GNU General Public License (v3) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..7668191f9c --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +# frappe -- https://github.com/frappe/frappe is installed via 'bench init' \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..ebb7dd937e --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +from setuptools import setup, find_packages + +with open("requirements.txt") as f: + install_requires = f.read().strip().split("\n") + +# get version from __version__ variable in india_compliance/__init__.py +from india_compliance import __version__ as version + +setup( + name="india_compliance", + version=version, + description="ERPNext app to simplify compliance with Indian Rules and Regulations", + author="Resilient Tech", + author_email="india.compliance@resilient.tech", + packages=find_packages(), + zip_safe=False, + include_package_data=True, + install_requires=install_requires +)