Skip to content

Commit

Permalink
Merge pull request #87 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
fanglinfang committed Apr 16, 2021
2 parents ecf809c + 0e3b778 commit 657d585
Show file tree
Hide file tree
Showing 29 changed files with 85 additions and 54 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cicd.yml
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pycodestyle nose2 coverage coveralls==2.2.0
pip install nose2 coverage coveralls==2.2.0
- name: Start Servers
shell: bash
Expand All @@ -62,8 +62,10 @@ jobs:
python test/live_ssl_server.py &
python test/live_ssl_bad_server.py &
- name: Run Pycodestyle
run: pycodestyle ${APP_NAME}/
- name: Run Python Linters
uses: uw-it-aca/actions/python-linters@main
with:
app_name: ${APP_NAME}

- name: Run Tests
env:
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,7 +1,7 @@
# Base class and utils for UW REST Clients

[![Build Status](https://github.com/uw-it-aca/uw-restclients-core/workflows/tests/badge.svg?branch=master)](https://github.com/uw-it-aca/uw-restclients-core/actions)
[![Coverage Status](https://coveralls.io/repos/uw-it-aca/uw-restclients-core/badge.svg?branch=master)](https://coveralls.io/r/uw-it-aca/uw-restclients-core?branch=master)
[![Build Status](https://github.com/uw-it-aca/uw-restclients-core/workflows/tests/badge.svg?branch=main)](https://github.com/uw-it-aca/uw-restclients-core/actions)
[![Coverage Status](https://coveralls.io/repos/uw-it-aca/uw-restclients-core/badge.svg?branch=main)](https://coveralls.io/r/uw-it-aca/uw-restclients-core?branch=main)
[![PyPi Version](https://img.shields.io/pypi/v/uw-restclients-core.svg)](https://pypi.python.org/pypi/uw-restclients-core)
![Python versions](https://img.shields.io/pypi/pyversions/uw-restclients-core.svg)

Expand Down
3 changes: 3 additions & 0 deletions restclients_core/cache.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

class NoCache(object):
"""
A cache implementation that never caches.
Expand Down
49 changes: 0 additions & 49 deletions restclients_core/cache_manager.py

This file was deleted.

3 changes: 3 additions & 0 deletions restclients_core/dao.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

import random
import datetime
from restclients_core.util.mock import load_resource_from_path
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/exceptions.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

class ImproperlyConfigured(Exception):
"""Required setting is missing"""
pass
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/models/__init__.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

import re
import weakref
from restclients_core.models.fields import (BooleanField, CharField, DateField,
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/models/fields.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

import datetime
import time

Expand Down
3 changes: 3 additions & 0 deletions restclients_core/test.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

# This is just a test runner for coverage
from commonconf.backends import use_configparser_backend
from os.path import abspath, dirname
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/dao_implementation/test_backend.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase, skipUnless
from commonconf import override_settings
from restclients_core.dao import DAO, MockDAO
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/dao_implementation/test_live.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase, skipUnless
from commonconf import override_settings
from restclients_core.dao import DAO
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/dao_implementation/test_mock.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase, skipIf
from restclients_core.dao import DAO
from os.path import abspath, dirname
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/models/test_base.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from restclients_core import models
from datetime import datetime
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/models/test_clean.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from restclients_core import models
from datetime import datetime
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/models/test_http_responses.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from restclients_core.models import CacheHTTP
from unittest import TestCase

Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/models/test_model_string.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from restclients_core import models

Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/test_local_cache.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from threading import currentThread
from restclients_core.util.local_cache import (
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/test_prometheus.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from restclients_core.tests.dao_implementation.test_backend import TDAO
from unittest import TestCase
from prometheus_client import generate_latest, REGISTRY
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/test_thread.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from commonconf import settings, override_settings
from restclients_core.thread import is_django_mysql
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/test_timing_log.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from restclients_core.tests.dao_implementation.test_backend import TDAO
from unittest import TestCase, skipUnless
from commonconf import override_settings
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/util/test_decorators.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from commonconf import settings
from restclients_core.dao import DAO
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/util/test_mock.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from restclients_core.util.mock import convert_to_platform_safe

Expand Down
3 changes: 3 additions & 0 deletions restclients_core/tests/util/test_retry.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from restclients_core.exceptions import DataFailureException
from restclients_core.util.retry import retry
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/thread.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

import threading
from commonconf import settings
"""
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/util/decorators.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from commonconf import override_settings


Expand Down
3 changes: 3 additions & 0 deletions restclients_core/util/local_cache.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from threading import currentThread


Expand Down
3 changes: 3 additions & 0 deletions restclients_core/util/mock.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

import re
import os
from os.path import isfile, join, dirname
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/util/performance.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from threading import currentThread
from restclients_core.models import MockHTTP
import time
Expand Down
3 changes: 3 additions & 0 deletions restclients_core/util/retry.py
@@ -1,3 +1,6 @@
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

from restclients_core.exceptions import DataFailureException
import math
import time
Expand Down

0 comments on commit 657d585

Please sign in to comment.