Skip to content

Commit 53de5ff

Browse files
authored
Merge pull request #21 from crd/develop
Merge develop into master in preparation of v0.3.0
2 parents d946aa6 + 8927aad commit 53de5ff

File tree

9 files changed

+152
-108
lines changed

9 files changed

+152
-108
lines changed

.codacy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ engines:
33
pylint:
44
enabled: true
55
python_version: 3
6-
6+
77
duplication:
88
enabled: true
99

@@ -13,9 +13,6 @@ engines:
1313
coverage:
1414
enabled: true
1515

16-
languages:
17-
python:
18-
1916
exclude_paths:
2017
- tests/*
2118
- setup.py

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: python
22
python:
33
- "3.6"
4+
- "3.7"
5+
- "3.8"
46
env:
57
global:
68
- PIPENV_VENV_IN_PROJECT=1

Pipfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ name = "pypi"
99
coverage = "*"
1010
faker = "*"
1111
python-coveralls = "*"
12-
13-
[requires]
14-
python_version = "3.6"

Pipfile.lock

Lines changed: 70 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
faker_credit_score
22
==================
33

4-
|pypi| |unix_build| |coverage| |license| |black|
4+
|pypi| |unix_build| |coverage| |license| |codacy| |black|
55

66
faker_credit_score is a community-created provider for the `Faker`_ test data
77
generator Python package.
88

9-
This package provides fake credit score data for testing purposes. The four
10-
most common non-industry specific credit scoring models are supported:
9+
This package provides fake credit score data for testing purposes. The most common non-industry specific credit scoring models are supported:
1110

1211
* FICO Score 8
12+
* VantageScore 3.0
13+
* FICO Score 10
14+
* FICO Score 10 T
1315
* Equifax Beacon 5.0
1416
* Experian/Fair Isaac Risk Model V2SM
1517
* TransUnion FICO Risk Score, Classic 04
@@ -55,11 +57,11 @@ Add the ``CreditScore`` Provider to your ``Faker`` instance:
5557
fake.add_provider(CreditScore)
5658
5759
fake.credit_score_name()
58-
'TransUnion FICO Risk Score, Classic 04'
60+
# 'TransUnion FICO Risk Score, Classic 04'
5961
fake.credit_score_provider()
60-
'TransUnion'
62+
# 'TransUnion'
6163
fake.credit_score()
62-
791
64+
# 791
6365
6466
Contributing
6567
------------
@@ -74,16 +76,16 @@ Execute unit tests and calculate code coverage like so:
7476
.. code:: bash
7577
7678
$ coverage run -m unittest tests/*
77-
........
79+
..............
7880
----------------------------------------------------------------------
79-
Ran 8 tests in 0.224s
81+
Ran 14 tests in 0.406s
8082
8183
OK
8284
8385
$ coverage report
8486
Name Stmts Miss Cover
8587
----------------------------------------------------
86-
faker_credit_score/__init__.py 49 0 100%
88+
faker_credit_score/__init__.py 58 0 100%
8789
8890
8991
.. |pypi| image:: https://img.shields.io/pypi/v/faker_credit_score.svg?style=flat-square&label=version
@@ -102,6 +104,10 @@ Execute unit tests and calculate code coverage like so:
102104
:target: https://github.com/crd/faker_credit_score/blob/master/LICENSE
103105
:alt: BSD 3-Clause License
104106

107+
.. |codacy| image:: https://api.codacy.com/project/badge/Grade/accb555dd0ae4e9598333988d57487e7
108+
:target: https://www.codacy.com/manual/crd/faker_credit_score?utm_source=github.com&utm_medium=referral&utm_content=crd/faker_credit_score&utm_campaign=Badge_Grade
109+
:alt: Codacy code quality grade
110+
105111
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
106112
:target: https://github.com/ambv/black
107113
:alt: Black code formatter

faker_credit_score/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
class CreditScoreObject(object):
99
""" Credit Score Object that uses fico8 as a sensible default. """
10+
1011
def __init__(
1112
self,
1213
name="FICO Score 8",
@@ -44,12 +45,28 @@ class Provider(BaseProvider):
4445
fico4_providers = ("TransUnion",)
4546
fico4_range = (309, 839)
4647

48+
# VantageScore 3.0, FICO 10, and FICO 10 T are modelled on FICO 8
49+
vantageScore3_name = "VantageScore 3.0"
50+
vantageScore3_providers = fico8_providers
51+
vantageScore3_range = fico8_range
52+
53+
fico10_name = "FICO Score 10"
54+
fico10_providers = fico8_providers
55+
fico10_range = fico8_range
56+
57+
fico10t_name = "FICO Score 10 T"
58+
fico10t_providers = fico8_providers
59+
fico10t_range = fico8_range
60+
4761
credit_score_types = OrderedDict(
4862
(
4963
("fico8", CreditScoreObject(fico8_name, fico8_providers, fico8_range)),
5064
("fico5", CreditScoreObject(fico5_name, fico5_providers, fico5_range)),
5165
("fico2", CreditScoreObject(fico2_name, fico2_providers, fico2_range)),
5266
("fico4", CreditScoreObject(fico4_name, fico4_providers, fico4_range)),
67+
("vantageScore3", CreditScoreObject(vantageScore3_name, vantageScore3_providers, vantageScore3_range)),
68+
("fico10", CreditScoreObject(fico10_name, fico10_providers, fico10_range)),
69+
("fico10t", CreditScoreObject(fico10t_name, fico10t_providers, fico10t_range)),
5370
)
5471
)
5572
credit_score_types["fico"] = credit_score_types["fico8"]
@@ -96,4 +113,5 @@ def _generate_credit_score(self, credit_score_range):
96113
""" Returns an integer within the range specified by credit_score_range. """
97114
return self.generator.random_int(*credit_score_range)
98115

116+
99117
CreditScore = Provider

faker_credit_score/__version__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Package version."""
2-
VERSION = (0, 2, 3)
2+
VERSION = (0, 3, 0)
33

4-
__version__ = '.'.join(map(str, VERSION))
4+
__version__ = ".".join(map(str, VERSION))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ def run(self):
123123
cmdclass={
124124
'upload': UploadCommand,
125125
},
126-
)
126+
)

0 commit comments

Comments
 (0)