Skip to content

Commit

Permalink
Merge pull request #4 from crd/develop
Browse files Browse the repository at this point in the history
Release 0.1.1
  • Loading branch information
crd committed Aug 22, 2018
2 parents c0f1602 + 3e6d923 commit ecbc574
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 24 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
@@ -1,7 +1,11 @@
language: python
python:
- "3.6"
install:
- "make"
script:
- make test
env:
global:
- PIPENV_VENV_IN_PROJECT=1
- PIPENV_IGNORE_VIRTUALENVS=1
# command to install dependencies
install: make setup
# # command to run tests
script: make test
21 changes: 17 additions & 4 deletions Makefile
@@ -1,6 +1,19 @@
init:
pip install pipenv
pipenv install --dev
help:
@echo "Usage:"
@echo " make help show this message"
@echo " make setup create virtual environment and install dependencies"
@echo " make activate enter virtual environment"
@echo " make test run the test suite"
@echo " exit leave virtual environment"

setup:
pip install pipenv
pipenv install --dev --three

activate:
pipenv shell -c

test:
pipenv run python -m unittest tests/test_faker_credit_score.py
pipenv run python -m unittest tests/test_faker_credit_score.py

.PHONY: help activate test
60 changes: 45 additions & 15 deletions README.rst
@@ -1,11 +1,13 @@
faker_credit_score
==================

|pypi| |unix_build| |coverage| |license|
|pypi| |unix_build| |coverage| |license| |black|

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

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

* FICO Score 8
* Equifax Beacon 5.0
Expand All @@ -19,14 +21,14 @@ Install with pip:

.. code:: bash
pip install faker_credit_score
$ pip install faker_credit_score
Or install with setup.py
Alternatively, install with setup.py:

.. code:: bash
git clone https://github.com/crd/faker_credit_score.git
cd faker_credit_score && python setup.py install
$ git clone https://github.com/crd/faker_credit_score.git
$ cd faker_credit_score && python setup.py install
Add the ``CreditScore`` Provider to your ``Faker`` instance:

Expand All @@ -38,28 +40,56 @@ Add the ``CreditScore`` Provider to your ``Faker`` instance:
fake = Faker()
fake.add_provider(CreditScore)
fake.credit_score()
791
fake.credit_score_provider()
'TransUnion'
fake.credit_score_name()
'TransUnion FICO Risk Score, Classic 04'
fake.credit_score_provider()
'TransUnion'
fake.credit_score()
791
Contributing
------------

Please, by all means, contribute!

testing
-------

Execute unit tests and calculate code coverage like so:

.. code:: bash
$ coverage run -m unittest tests/*
........
----------------------------------------------------------------------
Ran 8 tests in 0.224s
OK
$ coverage report
Name Stmts Miss Cover
----------------------------------------------------
faker_credit_score/__init__.py 40 0 100%
.. |pypi| image:: https://img.shields.io/pypi/v/faker_credit_score.svg?style=flat-square&label=version
:target: https://pypi.python.org/pypi/faker_credit_score
:alt: Latest version released on PyPi

.. |unix_build| image:: https://img.shields.io/travis/crd/faker_credit_score/master.svg?style=flat-square&label=unix%20build
.. |unix_build| image:: https://img.shields.io/travis/crd/faker_credit_score/develop.svg?style=flat-square&label=unix%20build
:target: http://travis-ci.org/crd/faker_credit_score
:alt: Build status of the master branch on Mac/Linux
:alt: Build status of the develop branch on Mac/Linux

.. |coverage| image:: https://img.shields.io/coveralls/crd/faker_credit_score/master.svg?style=flat-square
:target: https://coveralls.io/r/crd/faker_credit_score?branch=master
.. |coverage| image:: https://img.shields.io/coveralls/crd/faker_credit_score/develop.svg?style=flat-square
:target: https://coveralls.io/r/crd/faker_credit_score?branch=develop
:alt: Test coverage

.. |license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg?style=flat-square
:target: https://github.com/crd/faker_credit_score/blob/master/LICENSE
:alt: BSD 3-Clause License

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
:target: https://github.com/ambv/black
:alt: Black code formatter

.. _Faker: https://github.com/joke2k/faker
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -13,7 +13,7 @@

# Package meta-data.
NAME = 'faker_credit_score'
DESCRIPTION = 'Faker Community Provider that adds credit score generation.'
DESCRIPTION = 'Adds fake credit score data generation to Faker Python package.'
URL = 'https://github.com/crd/faker_credit_score'
EMAIL = 'cory.donnelly+faker_credit_score@gmail.com'
AUTHOR = 'Cory Donnelly'
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ecbc574

Please sign in to comment.