Skip to content

Commit 385dbce

Browse files
committed
Cleaned up class file names
✏️ Renaming files to match their classes 👷 Start configuration of build stack. Modified file names to better match their parent classes. Started configuration of CI/CD pipeline.
1 parent 61f3766 commit 385dbce

File tree

10 files changed

+83
-135
lines changed

10 files changed

+83
-135
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: python
2+
python:
3+
- "3.7"
4+
install:
5+
- "pipenv install"
6+
after_success:
7+
- coveralls

Pipfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7+
coverage="*"
8+
python-coveralls="*"
9+
coveralls="*"
710

811
[packages]
9-
sqlalchemy = "*"
10-
sqlalchemy-utils = "*"
11-
python-dateutil = "*"
12-
psycopg2-binary = "*"
13-
coverage = "*"
12+
sqlalchemy="*"
13+
sqlalchemy-utils="*"
14+
python-dateutil="*"
15+
psycopg2-binary="*"
1416

1517
[requires]
1618
python_version = "3.7"

Pipfile.lock

Lines changed: 0 additions & 121 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ProcessTracker - Python
2+
-----------------------
3+
Data integration process management made easy!
4+
5+
[![Coverage Status](https://coveralls.io/repos/github/OpenDataAlex/process_tracker_python/badge.svg?branch=master)](https://coveralls.io/github/OpenDataAlex/process_tracker_python?branch=master)
6+
7+
This is the Python implementation of the ProcessTracker framework. ProcessTracker builds a standard framework that is
8+
tool agnostic. If you are working with data integration/cleansing processes within Python (i.e. using PySpark, Pandas, etc.)
9+
then this framework can help manage dependencies between processes and provide auditing capabilities without having to
10+
parse logs or build your own framework.
11+
12+
To learn more about how to use ProcessTracker, please check out our documentation on [ReadTheDocs][1]!
13+
14+
Want to contribute? Check out our contributors guide!
15+
16+
Found a bug? Have an idea for an improvement? Submit it into our [Issues tracker][2]
17+
18+
[1]: https://readthedocs.org/projects/process_tracking/
19+
[2]: https://github.com/OpenDataAlex/process_tracker_python/issues

process_tracker/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Based on environment variables, create the data store connection engine.
1111
:return:
1212
"""
13+
1314
data_store_type = os.environ.get('process_tracking_data_store_type')
1415
data_store_username = os.environ.get('process_tracking_data_store_username')
1516
data_store_password = os.environ.get('process_tracking_data_store_password')
@@ -63,13 +64,14 @@
6364
, data_store_host
6465
, data_store_port))
6566

67+
Session = sessionmaker(bind=engine)
68+
69+
session = Session(expire_on_commit=False)
70+
session.execute("SET search_path TO %s" % data_store_name)
71+
6672
elif data_store_type in nonrelational_stores:
6773
Session = ''
6874

69-
Session = sessionmaker(bind=engine)
70-
71-
session = Session(expire_on_commit=False)
72-
session.execute("SET search_path TO %s" % data_store_name)
7375

7476
else:
7577
raise Exception('Invalid data store type provided. Please use: ' + ", ".join(supported_data_stores))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class ExtractTracker:
13-
13+
# TODO: Add filename/path variable
1414
def __init__(self, process_run, filename, location_path, location_name=None):
1515
"""
1616
ExtractTracker is the primary engine for tracking data extracts

setup.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import setuptools
2+
3+
with open("README.md.md", "r") as fh:
4+
long_description = fh.read()
5+
6+
setuptools.setup(
7+
name="process-tracking-opendataalex",
8+
version="0.0.1",
9+
author="Alex Meadows",
10+
author_email="alexmeadows@bluefiredatasolutions.com",
11+
description="A framework for managing data integration processes and their data",
12+
long_description=long_description,
13+
long_description_content_type="text/markdown",
14+
url="https://github.com/opendataalex/process_tracker_python",
15+
packages=setuptools.find_packages(),
16+
install_requires=[
17+
'sqlalchemy >= 1.3.3',
18+
'sqlalchemy-utils >= 0.33.11',
19+
'python-dateutil >= 2.8.0',
20+
'psycopg2-binary >= 2.8.2'
21+
],
22+
extras_requires={
23+
'dev': [
24+
'coverage >= "4.0.3',
25+
'python-coveralls >= 2.9.1',
26+
'coveralls >= 1.7.0'
27+
]
28+
},
29+
classifiers=[
30+
"Programming Language :: Python :: 3",
31+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
32+
"Operating System :: OS Independent",
33+
"Environment :: Console",
34+
"Environment :: Plugins",
35+
"Intended Audience :: Developers",
36+
"Natural Language :: English",
37+
"Topic :: Software Development"
38+
],
39+
)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from models.process import Process, ProcessTracking
88

99
from process_tracker import session
10-
from process_tracker.extract_tracking import ExtractTracker
11-
from process_tracker.process_tracking import ProcessTracker
10+
from process_tracker.extract_tracker import ExtractTracker
11+
from process_tracker.process_tracker import ProcessTracker
1212

1313

1414
class TestExtractTracking(unittest.TestCase):
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from models.process import ErrorType, ErrorTracking, Process, ProcessTracking
88

99
from process_tracker import data_store_type, session
10-
from process_tracker.extract_tracking import ExtractTracker
11-
from process_tracker.process_tracking import ProcessTracker
10+
from process_tracker.extract_tracker import ExtractTracker
11+
from process_tracker.process_tracker import ProcessTracker
1212

1313

1414
class TestProcessTracking(unittest.TestCase):

0 commit comments

Comments
 (0)