Skip to content

Commit

Permalink
Merge b9181bf into 8aab8d3
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglinfang authored May 28, 2019
2 parents 8aab8d3 + b9181bf commit 7e38682
Show file tree
Hide file tree
Showing 14 changed files with 1,634 additions and 327 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
sudo: false
language: python
python:
- '2.7'
- '3.6'
before_script:
- pip install -e .
- pip install pycodestyle
- pip install nose2
- pip install coverage
- pip install commonconf
- pip install python-coveralls
- pip install coveralls

script:
- pycodestyle uw_hrp/ --exclude=uw_hrp/tests
- pycodestyle uw_hrp/
- coverage run --source=uw_hrp uw_hrp/test.py -v

after_script:
- coveralls
before_deploy:
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
author_email="aca-it@uw.edu",
include_package_data=True,
install_requires=[
'UW-RestClients-Core>=0.9.6,<1.0',
'UW-RestClients-PWS>=0.6,<1.0',
'UW-RestClients-Core<2.0',
'UW-RestClients-PWS<3.0',
'python-dateutil'
],
license='Apache License, Version 2.0',
description=('A library for connecting to the UW Human Resources API'),
Expand All @@ -34,7 +35,6 @@
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
],
)
8 changes: 4 additions & 4 deletions uw_hrp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"""

import logging
import json
from uw_hrp.dao import HRP_DAO
from restclients_core.exceptions import DataFailureException


logger = logging.getLogger(__name__)
hrp_dao = HRP_DAO()


def get_resource(url):
response = HRP_DAO().getURL(url, {'Accept': 'application/json'})
logger.info("%s ==status==> %s" % (url, response.status))
response = hrp_dao.getURL(url, {'Accept': 'application/json'})

logger.debug("{0} ==status==> {1}".format(url, response.status))
if response.status != 200:
raise DataFailureException(url, response.status, response.data)

logger.debug("%s ==data==> %s" % (url, response.data))
logger.debug("{0} ==data==> {1}".format(url, response.data))
return response.data
93 changes: 0 additions & 93 deletions uw_hrp/appointee.py

This file was deleted.

Loading

0 comments on commit 7e38682

Please sign in to comment.