Skip to content

Commit 3750c3e

Browse files
authored
Merge branch 'master' into greg/new-payment-processor
2 parents a54b123 + 6af7814 commit 3750c3e

14 files changed

Lines changed: 130 additions & 84 deletions

File tree

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Python lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '3 19 * * SUN'
8+
9+
jobs:
10+
build:
11+
12+
name: Python linting
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.8
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install --upgrade pylint black mypy voluptuous-stubs
26+
27+
- name: Install
28+
run: python setup.py install
29+
30+
- name: Run mypy
31+
run: mypy minfraud tests
32+
33+
- name: Run Pylint
34+
run: pylint minfraud
35+
36+
- name: Run Black
37+
run: black --check --diff .

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Python tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '3 15 * * SUN'
8+
9+
jobs:
10+
build:
11+
12+
strategy:
13+
matrix:
14+
# We don't test on Windows currently as it appears mocket may not
15+
# work there.
16+
platform: [ubuntu-latest, macos-latest]
17+
python-version: [3.6, 3.7, 3.8, 3.9]
18+
19+
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
20+
runs-on: ${{ matrix.platform }}
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
with:
26+
submodules: true
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -e git+https://github.com/maxmind/GeoIP2-python#egg=geoip2
37+
pip install tox tox-gh-actions
38+
39+
- name: Test with tox
40+
run: tox

.travis-black.sh

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

.travis-pylint.sh

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

.travis.yml

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

HISTORY.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ History
77
++++++++++++++++++
88

99
* Added ``tsys`` to the ``/payment/processor`` validation.
10+
* The device IP address is no longer a required input.
1011

1112
2.1.0 (2020-09-25)
1213
++++++++++++++++++
@@ -78,7 +79,7 @@ History
7879
+++++++++++++++++++
7980

8081
* Added support for the Report Transactions API. We encourage use of this API
81-
as we use data recieved through this channel to continually improve the
82+
as we use data received through this channel to continually improve the
8283
accuracy of our fraud detection algorithms.
8384

8485
1.11.0 (2020-04-06)

README.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Documentation
3030
-------------
3131

3232
Complete API documentation is available on `Read the Docs
33-
<http://minfraud.readthedocs.io/>`_.
33+
<https://minfraud.readthedocs.io/>`_.
3434

3535
Usage
3636
-----
@@ -72,8 +72,7 @@ Each of these methods takes a dictionary representing the transaction to be sent
7272
to the web service. The structure of this dictionary should be in `the format
7373
specified in the REST API documentation
7474
<https://dev.maxmind.com/minfraud/#Request_Body>`__.
75-
The ``ip_address`` in the ``device`` sub-dictionary is required. All other
76-
fields are optional.
75+
All fields are optional.
7776

7877
Report Transactions Usage
7978
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -114,9 +113,9 @@ The possible errors are:
114113
is unable to authenticate the request, e.g., if the license key or account
115114
ID is invalid.
116115
* ``minfraud.InvalidRequestError`` - This will be raised when the server
117-
rejects the request as invalid for another reason, such as a missing or
118-
reserved IP address. It is also raised if validation of the request before
119-
it is sent to the server fails.
116+
rejects the request as invalid for another reason, such as a reserved IP
117+
address. It is also raised if validation of the request before it is sent to
118+
the server fails.
120119
* ``minfraud.HttpError`` - This will be raised when an unexpected HTTP
121120
error occurs such as a firewall interfering with the request to the server.
122121
* ``minfraud.MinFraudError`` - This will be raised when some other error
@@ -303,7 +302,7 @@ Python 3.6 or greater is required. Older versions are not supported.
303302
Versioning
304303
----------
305304

306-
The minFraud Python API uses `Semantic Versioning <http://semver.org/>`_.
305+
The minFraud Python API uses `Semantic Versioning <https://semver.org/>`_.
307306

308307
Support
309308
-------
@@ -312,7 +311,7 @@ Please report all issues with this code using the `GitHub issue tracker
312311
<https://github.com/maxmind/minfraud-api-python/issues>`_.
313312

314313
If you are having an issue with a MaxMind service that is not specific to the
315-
client API, please contact `MaxMind support <http://www.maxmind.com/en/support>`_
314+
client API, please contact `MaxMind support <https://www.maxmind.com/en/support>`_
316315
for assistance.
317316

318317
Copyright and License

dev-bin/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ hub release create -m "$message" "$tag"
6868
git push --tags
6969

7070
rm -fr dist
71-
python setup.py sdist bdist_wheel
71+
python setup.py build_html sdist bdist_wheel
7272
twine upload dist/*

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@
244244

245245
# Example configuration for intersphinx: refer to the Python standard library.
246246
intersphinx_mapping = {
247-
"python": ("http://python.readthedocs.org/en/latest/", None),
248-
"geoip2": ("http://geoip2.readthedocs.org/en/latest/", None),
247+
"python": ("https://python.readthedocs.org/en/latest/", None),
248+
"geoip2": ("https://geoip2.readthedocs.org/en/latest/", None),
249249
}
250250

251251
autoclass_content = "both"

minfraud/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class GeoIP2Location(geoip2.records.Location):
6969
7070
The date and time of the transaction in the time
7171
zone associated with the IP address. The value is formatted according to
72-
`RFC 3339 <http://tools.ietf.org/html/rfc3339>`_. For instance, the
72+
`RFC 3339 <https://tools.ietf.org/html/rfc3339>`_. For instance, the
7373
local time in Boston might be returned as 2015-04-27T19:17:24-04:00.
7474
7575
:type: str | None
@@ -463,7 +463,7 @@ class CreditCard:
463463
.. attribute:: country
464464
465465
This property contains the `ISO 3166-1 alpha-2 country code
466-
<http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ associated with the
466+
<https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ associated with the
467467
location of the majority of customers using this credit card as
468468
determined by their billing address. In cases where the location of
469469
customers is highly mixed, this defaults to the country of the bank

0 commit comments

Comments
 (0)