Skip to content

Commit

Permalink
#6: adding encoding cookie to .py files
Browse files Browse the repository at this point in the history
  • Loading branch information
iheitlager committed Apr 15, 2017
1 parent 00cf2b3 commit 632c556
Show file tree
Hide file tree
Showing 31 changed files with 90 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
## [0.4.6] - 2017-04-13
### Changed
- First open source structure with MIT license and Apache like notice
- #6: pep 263 - add encoding cookie to .py files

### Added
- Basic Documentation
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

VERSION = (0,4,6,'final',0)

PACKAGE_NAME = 'data_migrator'
5 changes: 4 additions & 1 deletion data_migrator/contrib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

'''
The data_migrator.contrib contains commonly used helper functions, to support in the setup
of specific transformations
'''
'''
3 changes: 3 additions & 0 deletions data_migrator/contrib/dutch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import re

_PHONE_CHARS=re.compile('[^\+\d]+')
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/contrib/read.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import csv
import sys

Expand Down
3 changes: 3 additions & 0 deletions data_migrator/emitters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from .mysql import MySQLEmitter
from .csv import CSVEmitter

Expand Down
3 changes: 3 additions & 0 deletions data_migrator/emitters/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

class BaseEmitter(object):
'''Base for emitters of the data_migrator'''

Expand Down
3 changes: 3 additions & 0 deletions data_migrator/emitters/csv.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from data_migrator.emitters.base import BaseEmitter
from data_migrator.models.fields import HiddenField
from data_migrator.utils import default_logger, sql_escape
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/emitters/mysql.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from data_migrator.emitters.base import BaseEmitter
from data_migrator.models.fields import HiddenField
from data_migrator.utils import sql_escape, default_logger
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

class InternalException(Exception):
"""Unexpected internal error"""
pass
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

"""
This module contains all classes for models, managers and fields
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/models/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from .manager import SimpleManager
from .fields import BaseField, HiddenField
from .options import Options
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/models/fields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import uuid
import json

Expand Down
3 changes: 3 additions & 0 deletions data_migrator/models/manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from data_migrator.exceptions import NonUniqueDataException, ValidationException
from data_migrator.utils import default_logger

Expand Down
3 changes: 3 additions & 0 deletions data_migrator/models/options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from collections import OrderedDict

from data_migrator.exceptions import DefinitionException
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/transform.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys
import os
import logging
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from .sql import sql_escape
from .reader import default_reader
from .log import configure_logging, default_logger
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/utils/argparser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import argparse

_PARSER = None
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/utils/log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import logging.config

from data_migrator import PACKAGE_NAME
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/utils/reader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys
import csv

Expand Down
3 changes: 2 additions & 1 deletion data_migrator/utils/sql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

#!/usr/bin/python
# -*- coding: UTF-8 -*-

def sql_escape(v):
'''Translate Python native types to SQL relevant strings'''
Expand Down
3 changes: 3 additions & 0 deletions data_migrator/utils/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

# Taken from django, just get a proper version

import datetime
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from data_migrator.utils import get_version, get_development_status

from setuptools import setup, find_packages
Expand Down
2 changes: 2 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-
3 changes: 3 additions & 0 deletions test/test_contrib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator.contrib.dutch import clean_phone
Expand Down
3 changes: 3 additions & 0 deletions test/test_emitter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator.emitters.base import BaseEmitter
Expand Down
3 changes: 3 additions & 0 deletions test/test_fields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator import models
Expand Down
3 changes: 3 additions & 0 deletions test/test_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator.models import SimpleManager
Expand Down
3 changes: 3 additions & 0 deletions test/test_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator.models import Model, StringField
Expand Down
3 changes: 3 additions & 0 deletions test/test_options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator.models.options import Options
Expand Down
3 changes: 3 additions & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

from data_migrator import utils
Expand Down

0 comments on commit 632c556

Please sign in to comment.