Skip to content

Commit

Permalink
Table names clean up and Remove Pylint workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Dec 23, 2020
1 parent 61b5f1f commit a36e55c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# IDEs
.idea/
.vscode

# Distribution / packaging
.Python
Expand Down
29 changes: 29 additions & 0 deletions fyle_accounting_mappings/migrations/0003_auto_20201221_1244.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 3.0.3 on 2020-12-21 12:44

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('fyle_accounting_mappings', '0002_auto_20201117_0655'),
]

operations = [
migrations.AlterModelTable(
name='destinationattribute',
table='destination_attributes',
),
migrations.AlterModelTable(
name='expenseattribute',
table='expense_attributes',
),
migrations.AlterModelTable(
name='mapping',
table='mappings',
),
migrations.AlterModelTable(
name='mappingsetting',
table='mapping_settings',
),
]
10 changes: 10 additions & 0 deletions fyle_accounting_mappings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class ExpenseAttribute(models.Model):
created_at = models.DateTimeField(auto_now_add=True, help_text='Created at datetime')
updated_at = models.DateTimeField(auto_now=True, help_text='Updated at datetime')

class Meta:
db_table = 'expense_attributes'

@staticmethod
def bulk_upsert_expense_attributes(attributes: List[Dict], workspace_id):
"""
Expand Down Expand Up @@ -87,6 +90,9 @@ class DestinationAttribute(models.Model):
created_at = models.DateTimeField(auto_now_add=True, help_text='Created at datetime')
updated_at = models.DateTimeField(auto_now=True, help_text='Updated at datetime')

class Meta:
db_table = 'destination_attributes'

@staticmethod
def bulk_upsert_destination_attributes(attributes: List[Dict], workspace_id):
"""
Expand Down Expand Up @@ -120,6 +126,9 @@ class MappingSetting(models.Model):
created_at = models.DateTimeField(auto_now_add=True, help_text='Created at datetime')
updated_at = models.DateTimeField(auto_now=True, help_text='Updated at datetime')

class Meta:
db_table = 'mapping_settings'

@staticmethod
def bulk_upsert_mapping_setting(settings: List[Dict], workspace_id: int):
"""
Expand Down Expand Up @@ -155,6 +164,7 @@ class Mapping(models.Model):

class Meta:
unique_together = ('source_type', 'source', 'destination_type', 'workspace')
db_table = 'mappings'

@staticmethod
def create_or_update_mapping(source_type: str, destination_type: str,
Expand Down
23 changes: 23 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
asgiref==3.2.3
astroid==2.3.3
certifi==2019.11.28
chardet==3.0.4
Django==3.0.2
django-rest-framework==0.1.0
djangorestframework==3.11.0
fylesdk==0.11.0
idna==2.8
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
pylint==2.4.4
pylint-django==2.0.13
pylint-plugin-utils==0.6
pytz==2019.3
requests==2.22.0
requests-cache==0.5.2
six==1.14.0
sqlparse==0.3.0
typed-ast==1.4.1
urllib3==1.25.7
wrapt==1.11.2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name='fyle-accounting-mappings',
version='0.4.0',
version='0.5.0',
author='Shwetabh Kumar',
author_email='[email protected]',
description='Django application to store the fyle accounting mappings in a generic manner',
Expand Down

0 comments on commit a36e55c

Please sign in to comment.