Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates fork #4

Open
wants to merge 166 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
6244f41
Post release version bump
spookylukey May 8, 2017
73882f1
Update to RELEASE.rst
spookylukey May 8, 2017
60592a3
CZK currency uses suffix, not prefix.
Visgean Jun 11, 2017
0af2876
Merge pull request #93 from Visgean/patch-1
spookylukey Jun 11, 2017
4fd08c8
Fall back to default currency sign
adamb70 Sep 13, 2017
2f8cae5
Change test to reflect intended functionality
adamb70 Sep 14, 2017
61cf09c
Fix Travis failing on tests, and add 3.6 testing.
adamb70 Oct 2, 2017
7778f47
Merge pull request #100 from adamb70/TravisCI-fixing
spookylukey Oct 4, 2017
f4ab99c
Merge remote-tracking branch 'refs/remotes/limist/master'
adamb70 Oct 8, 2017
074e36f
Add en_GB notation for € amounts
jonashaag Oct 16, 2017
ef03bff
Typo
jonashaag Oct 16, 2017
4995aaf
Fix space placement in sv_SE prefix for SEK
jodal Sep 20, 2017
2acad45
Add Norwegian localization
jodal Sep 20, 2017
e7c9183
Merge pull request #99 from jodal/feature/norwegian-localization
spookylukey Nov 7, 2017
0c3cdbe
Merge pull request #98 from jodal/feature/fix-swedish-prefix
spookylukey Nov 7, 2017
7f0a4a0
Updated changes.rst
adamb70 Nov 8, 2017
d75acb2
Merge remote-tracking branch 'refs/remotes/limist/master'
adamb70 Nov 8, 2017
b139215
Add python 2 division info at README.md
humrochagf Nov 8, 2017
90d78a2
Merge pull request #104 from humrochagf/master
spookylukey Nov 8, 2017
1006e6b
Merge pull request #97 from adamb70/master
spookylukey Nov 10, 2017
7f3e769
Merge branch 'master' into patch-1
spookylukey Nov 17, 2017
641a017
Merge branch 'master' into patch-1
spookylukey Nov 17, 2017
faca0a0
Merge pull request #101 from jonashaag/patch-1
spookylukey Dec 2, 2017
071701f
Add Money.round([ndigits]) method
klette Oct 26, 2017
cd4be3b
Merge pull request #102 from klette/rounding
spookylukey Feb 22, 2018
caf43cc
Remove the duplicated "San Marino"
kjagiello Jul 20, 2018
20b7029
Merge pull request #110 from kjagiello/patch-1
spookylukey Jul 20, 2018
fd9b90c
Sorted out version history
spookylukey Nov 19, 2018
c269837
Updates to release process
spookylukey Nov 19, 2018
55a5fd0
Version bump
spookylukey Nov 19, 2018
861c23d
Make universal wheels (Python 2 or 3)
spookylukey Nov 19, 2018
d806990
Fixed release instructions so I push to the right repo
spookylukey Nov 28, 2018
5c778a5
Version bump (dev)
spookylukey Nov 28, 2018
797017b
Dropped official support for Python 2.6, 3.2, 3.3
spookylukey Nov 28, 2018
1822e9f
Updated Python version support in setup.py classifiers
spookylukey Nov 28, 2018
f943a4a
Fix Money.__rsub__
Nov 28, 2019
6cef582
Fix __rtruediv__
Nov 28, 2019
f880f3a
Attempt to fix travis-CI
spookylukey Nov 30, 2019
eb5ac2c
Merge pull request #124 from limist/fix_travis
spookylukey Nov 30, 2019
b3ed12f
Merge remote-tracking branch 'origin/master'
Dec 2, 2019
796a7ec
Merge pull request #123 from lieryan/lieryan-fix-non-commutative-oper…
spookylukey Dec 2, 2019
e9d72fe
chore: add Python 3.7 and 3.8 to the build list
timdrijvers Jul 9, 2020
cdf3aa2
Merge pull request #130 from timdrijvers/test_py_37_38
spookylukey Jul 11, 2020
61c5448
Installation instructions
spookylukey Aug 1, 2020
4483466
Added comments about issue 22 to localization.py
spookylukey Aug 3, 2020
9dfb27a
Updated tox, versions etc.
spookylukey Nov 5, 2020
9714e59
Added GitHub Actions workflow
spookylukey Nov 5, 2020
78c7e45
Fixed flake8 errors
spookylukey Nov 5, 2020
ff8a9e7
Drop TravisCI
spookylukey Nov 5, 2020
031ad87
Merge pull request #135 from limist/use-github-actions
spookylukey Nov 5, 2020
62de2e9
Removed stray lines in build.yml
spookylukey Nov 5, 2020
8e562ad
Updated instructions about tox
spookylukey Nov 5, 2020
91e9533
Run tests on pypy
spookylukey Nov 5, 2020
d0c435f
Updated RELEASE.rst
spookylukey Nov 5, 2020
28019a7
FIX #22: Deprecate current format and depend on babel
pooyamb May 30, 2019
09c4479
Simplified `format_money` implementation.
spookylukey Nov 5, 2020
04effcc
Make tests work independent of system locale
spookylukey Nov 6, 2020
645b982
Get default currency names from Babel/CLDR instead of our own list
spookylukey Nov 6, 2020
bf6d8e9
Get country codes and names from Babel
spookylukey Nov 6, 2020
caaf384
Re-organise some imports
spookylukey Nov 6, 2020
19e8824
Added obsolete currencies to our list
spookylukey Nov 7, 2020
9dc3628
Issue #56 - Added method to get currency from country name.
TheTeraByte Jun 20, 2015
4839769
Re-worked get_currency_of_country to work using ISO 2-letter country …
spookylukey Nov 7, 2020
3505672
Made get_currencies_for_country return empty list for error case.
spookylukey Nov 7, 2020
d445330
Defined sorting for Currency and used in get_currencies_of_country
spookylukey Nov 7, 2020
913e175
Corrected docs for `get_currencies_of_country`
spookylukey Nov 7, 2020
65bf4af
'territory' -> 'country' everywhere for consistency
spookylukey Nov 7, 2020
5bb261e
Merge pull request #136 from limist/use-babel-3
spookylukey Nov 8, 2020
6db9764
Credited @pooyamb in CHANGES.rst
spookylukey Nov 8, 2020
6225aa1
Moved history section.
spookylukey Nov 8, 2020
46e1e08
add subunit support
noamby Nov 11, 2020
f7d4777
fix fixed point to return int
noamby Nov 11, 2020
6e5fb6b
default to 1 sub units
noamby Nov 11, 2020
2ba0881
update README and CHANGES
noamby Nov 11, 2020
0bc8a28
Merge pull request #137 from Twistbioscience/add_subunit_support
spookylukey Nov 11, 2020
c518745
Repo moved to py-moneyed organization
spookylukey Nov 13, 2020
92df9ac
Return string from repr() that can be used by eval()
davidtvs Dec 31, 2020
d00a2f7
Merge pull request #141 from davidtvs/eval-from-repr
spookylukey Jan 8, 2021
f5a1828
Changelog: note about repr change
spookylukey Jan 8, 2021
986b499
Added dates to release notes
spookylukey Jan 9, 2021
6056386
Re-organized docs using Sphinx
spookylukey Jan 9, 2021
17c943a
Added readthedocs conf file
spookylukey Jan 9, 2021
5ddcc15
Added some missing files
spookylukey Jan 9, 2021
af1c068
Adde pre-commit
spookylukey Jan 9, 2021
cb61d00
Added list_all_currencies() utility
spookylukey Jan 9, 2021
eab1f3c
Updated release process
spookylukey Jan 9, 2021
2e5908e
Added isort
spookylukey Jan 9, 2021
db6d8f7
Fixed workflows to work with Python 2.7
spookylukey Jan 9, 2021
fd8d4ab
Fixed flake8 on Python 2.7 on GitHub Actions
spookylukey Jan 9, 2021
1bbbb71
Merge pull request #142 from py-moneyed/isort
spookylukey Jan 9, 2021
f5d813e
Version bump
spookylukey Jan 9, 2021
85811ba
Enabled release script for real
spookylukey Jan 9, 2021
d1ab69f
Updated release notes with date. oops.
spookylukey Jan 9, 2021
ce41bb4
Updated PyPI classifiers
spookylukey Jan 9, 2021
a768397
build: Add missing `py38` tox environment
Stranger6667 Jan 15, 2021
26ba15c
fix: Change `numeric` attribute for currencies without assigned ISO n…
Stranger6667 Jan 15, 2021
116060d
chore: Remove unneeded `global`
Stranger6667 Jan 15, 2021
6c2c178
refactor: Reduce the number of dict lookups in `add_currency`
Stranger6667 Jan 15, 2021
6779e7e
fix: Use the proper definition for the `XXX` currency
Stranger6667 Jan 15, 2021
511637b
fix: `get_currency` returning obsolete currencies
Stranger6667 Jan 15, 2021
7414c2a
chore: Add `long_description_content_type` to setup.py
Stranger6667 Jan 15, 2021
ef5ad3e
chore: Update PyPI classifiers
Stranger6667 Jan 15, 2021
ff66ce9
docs: Target the PyPI page in the README badge
Stranger6667 Jan 15, 2021
3b62a5e
feat: __add__ return NotImplemented for other classes
Feb 22, 2021
ec1fd93
test: test __add__ behaviour for addition with other classes than Money
Feb 22, 2021
05ee499
test: put custom_class_add logic in a dedicated test
Feb 22, 2021
fa79b46
Release 1.1
Stranger6667 Jan 15, 2021
5eceef2
docs: Update changelog
Stranger6667 Feb 23, 2021
5e6a098
docs: Add maintainer to `setup.py`
Stranger6667 Feb 23, 2021
d734ffa
chore: Release 1.2
Stranger6667 Feb 23, 2021
0ad8a25
Drop support for legacy Python versions
antonagestam Apr 14, 2021
c14378f
Introduce black and use pre-commit in CI
antonagestam Apr 14, 2021
4ec89db
Drop deprecated localization module
antonagestam Apr 16, 2021
6aea54f
Add type hints and static type checking in CI
antonagestam Apr 16, 2021
355e254
Add release workflow
antonagestam Apr 18, 2021
0ea6d04
fixup! Add release workflow
antonagestam Apr 18, 2021
7700e0b
Remove default currency (#162)
antonagestam Apr 18, 2021
4561c1e
Restructure project layout (#165)
antonagestam May 5, 2021
0e89362
Add zero property to Currency
antonagestam May 20, 2021
b0946cf
Add missing changelog entry for Currency.zero
antonagestam May 24, 2021
8c46c93
Move to declarative packaging config
antonagestam May 23, 2021
7bd1984
Do not build universal wheels
Stranger6667 May 26, 2021
46cabd0
Fix dates in CHANGES.rst
Stranger6667 May 26, 2021
ef5d65d
chore: Release 2.0
Stranger6667 May 26, 2021
3adfef7
docs: Fix obsolete file name in RELEASE.rst
Stranger6667 May 26, 2021
24967f5
Drop Python 3.6, introduce Python 3.10
antonagestam Jan 2, 2022
d4e142a
chore: Fix pre-commit config indentation
sondrelg Jan 3, 2022
d8cf68b
chore: Add pyupgrade flags
sondrelg Jan 3, 2022
c11fb1a
chore: Replace blanket noqa with per-file handling
sondrelg Jan 3, 2022
c697316
chore: Upgrade type hints (PEP585)
sondrelg Jan 3, 2022
634abfe
chore: Upgrade type hints (PEP604)
sondrelg Jan 3, 2022
0cc3a02
chore: Replace isort mirror with official isort hook
sondrelg Jan 3, 2022
8c79b5f
chore: Remove empty args definition
sondrelg Jan 3, 2022
65f44d2
chore: Add --quite black arg
sondrelg Jan 3, 2022
e0b9b52
chore: Add ast and mixed line-ending hooks
sondrelg Jan 3, 2022
e09bb65
chore: Add flake8-type-checking
sondrelg Jan 3, 2022
b6ca426
chore: Add flake8-printf-formatting
sondrelg Jan 3, 2022
b916333
chore: Add flake8-pytest-style
sondrelg Jan 3, 2022
da9ca14
chore: Add flake8-simplify
sondrelg Jan 3, 2022
ca6e69b
chore: Add flake8-mutable
sondrelg Jan 3, 2022
52e090e
chore: Add flake8-print
sondrelg Jan 3, 2022
64cd5ee
chore: Add flake8-comprehensions
sondrelg Jan 3, 2022
243eb4f
chore: Add flake8-bugbear
sondrelg Jan 3, 2022
c495642
chore: Reorder pre-commit hooks
sondrelg Jan 3, 2022
bf85c81
Add new currencies
antonagestam Oct 26, 2022
7c472d1
chore: Update `pre-commit`
Stranger6667 Nov 27, 2022
fe0c756
Update formatting.rst
lukaskovarik Nov 16, 2022
cf79f23
chore: Support for Python 3.11
Stranger6667 Nov 27, 2022
fae4d73
docs: Add missing changelog entries
Stranger6667 Nov 27, 2022
1c8caad
Run CI on Python 3.11
antonagestam Oct 25, 2022
7c0ad09
build: Update actions for the `lint` job
Stranger6667 Nov 27, 2022
b991474
chore: Add missing `pytest` dependency in the tox env
Stranger6667 Nov 27, 2022
8a6fe57
build: Add a CI job for testing the docs
Stranger6667 Nov 27, 2022
bd86a53
docs: Add missing changelog entry
Stranger6667 Nov 27, 2022
8126c08
build: Update GH actions for the `release` workflow
Stranger6667 Nov 27, 2022
f45c007
chore: Release 3.0
Stranger6667 Nov 27, 2022
0c24810
chore: Remove Python 3.7 support
klette Apr 22, 2024
13a321d
chore: Add Python 3.12 to supported list
klette Apr 22, 2024
0f397a5
chore: Update mypy to >=1.9.0
klette Apr 22, 2024
22df7ef
chore: Enable mypy in tests
klette Apr 22, 2024
21dd952
chore: Fix various small mypy errors
klette Apr 22, 2024
07997f3
fixup! chore: Update mypy to >=1.9.0
klette Apr 22, 2024
da03a52
chore: Update all pre-commit libraries
klette Apr 22, 2024
3e76811
chores: Satisfy new pre-commit rules
klette Apr 22, 2024
9b1fe26
chores: Move pytest-mypy config to tox
klette Apr 22, 2024
4c90ed5
chore: Update CHANGES.rst with Python 3.7 removal and 3.12 addition
klette Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
check-latest: true
- name: Install dependencies
run: python -m pip install --upgrade pip tox tox-gh-actions
- name: Run tests
run: tox

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]

docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: actions/setup-python@v4
with:
python-version: 3.8

- run: pip install tox

- name: Run docs tox job
run: tox -e docs
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install tox
run: python3 -m pip install --upgrade tox
- name: Build a binary wheel and a source tarball
run: python3 -m tox -e build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dist/
downloads
eggs
parts
src/*.egg-info
*.egg-info
build/
.ropeproject
.tox
Expand All @@ -16,3 +16,5 @@ build/
.settings
.python-version
.idea/
docs/_build
.cache
63 changes: 63 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
repos:
- repo: https://github.com/psf/black
rev: "24.4.0"
hooks:
- id: black
args:
- --quiet

- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: "v3.15.2"
hooks:
- id: pyupgrade
args:
- --py3-plus
- --py36-plus
- --py37-plus
- --py38-plus

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-ast
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending

- repo: https://github.com/sirosen/check-jsonschema
rev: "0.28.2"
hooks:
- id: check-github-workflows
require_serial: true

- repo: https://github.com/pycqa/flake8
rev: "7.0.0"
hooks:
- id: flake8
additional_dependencies:
- flake8-type-checking
- flake8-bugbear
- flake8-comprehensions
- flake8-print
- flake8-mutable
- flake8-simplify
- flake8-pytest-style
- flake8-printf-formatting

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
exclude: ^(docs/|setup.py$)
additional_dependencies:
- pytest

- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

139 changes: 134 additions & 5 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,140 @@

Significant or incompatible changes listed here.

Unreleased - TBA
----------------
* Added support for Python 3.12
* Removed support for Python 3.7

Changes in v0.7
---------------
3.0 (2022-11-27)
----------------
* Added ``SLE`` & ``VED`` currencies.
* Removed support for Python 3.6.
* Added support for Python 3.10 & 3.11.

2.0 (2021-05-26)
----------------
* Dropped support for Python 2.7 and 3.5 and PyPy 2.
* Added pyupgrade pre-commit hook.
* Added black pre-commit hook and reformatted codebase.
* Updated pre-commit hooks.
* Replaced custom flake8, isort and check-manifest Github Action jobs with a generic
pre-commit job.
* Dropped the ``moneyed.localization`` module that was deprecated and announced for
removal in 1.0.
* Added type hints along with a mypy pre-commit hook.
* Added action for building and publishing releases, along with the
check-github-workflows pre-commit hook for validating Github Action workflow files.
* Removed undocumented ``DEFAULT_CURRENCY`` and ``DEFAULT_CURRENCY_CODE`` constants, and
change to make instantiating ``Money`` without providing a currency a type error. This
used to result in an object with a made-up ``"XYZ"`` currency, which could lead to
surprising behaviors and bugs.
* Added ``zero`` property to ``Currency`` to conveniently access the zero value of a
given currency.
* Moved to use setuptool's declarative packaging config and PEP 517 isolated builds.
* Removed requirements files and instead specified test requirements using extras.

1.2 (2021-02-23)
----------------
* ``Money.__add__`` returns ``NotImplemented`` instead of raising an exception when another operand has unsupported type.

1.1 (2021-01-15)
----------------
* Changed the ``numeric`` attribute values to ``None`` for currencies that don't have assigned ISO numeric codes: ``IMP``, ``TVD``, ``XFO``, ``XFU``.
* Restored the previous definition for the ``XXX`` currency, including its ``name`` and ``countries`` attributes.
* Fixed ``get_currency`` returning obsolete currencies.

1.0 (2021-01-09)
----------------
* Dropped official support for Python 2.6, 3.2, 3.3, 3.4 (mainly because
our test tools don't support them any more).

* Added support for getting amount in sub units (fixed point)

* Format ``Money`` instances using CLDR and Babel. This is a large change with lots of parts.
Many thanks to @pooyamb for all the hard work that went into this and other
related changes.

* Added new ``moneyed.l10n`` module, containing a new ``format_money``
function. This is a very thin wrapper around `babel.numbers.format_currency
<http://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency>`_
and has all the same options. This allows us to get the official CLDR
formats for currencies, in all the different locales.

See docs in README.

Note especially that you need to specify ``locale`` (e.g.
``locale="en_US"``), or you will get the ``LC_NUMERIC`` default.

* Deprecated the ``format_money`` function in ``moneyed.localization``. There
is no immediate plan to remove, but it should not be relied on. Also, this
function relies on our own manually entered data for formatting of
currencies in different locales. This data is very incomplete and will not
be updated any more.

So you need to use ``moneyed.l10n.format_money`` instead now.

If you were relying on the ``decimal_places`` argument to the old function,
there is no exact equivalent in the new ``format_money`` function, but see
the ``decimal_quantization`` option (documented in
`babel.numbers.format_currency
<http://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency>`_)

* ``Money.__str__`` (``Money.__unicode__`` on Python 2) now uses new
``format_money`` with the default locale ``LC_NUMERIC``, which can produce
different results from the old function. Use the new ``format_money`` to control
output.

* On Python 2, ``Money.__str__`` (bytestring) output has changed to be more
basic. You should use the new ``format_money`` function to control output.

* Money.__str__ changed under Python 2 to use only ASCII characters.
* Get currency names from Babel data. Several changes, including:

* For all built-in currencies, ``Currency.name`` now comes from Babel ("en_US"
locale). This means there have been various corrections to currency names.

If you pass a non-None ``name`` to the ``Currency`` constructor, you can
still specify any name you want.

* ``Currency.get_name(locale)`` has been added.

* Get currency 'countries' from Babel data. Several changes, including:

* ``Currency.countries`` now sources from Babel, so some names may be different.

* ``Currency.country_codes`` has been added.

* ``Currency.countries`` is deprecated, because it is not the most useful form
for the data (e.g. upper cased strings, and names in US English only). It is
recommended to use ``Currency.country_codes`` and convert to names using
``get_country_name``.

* Changed the repr of ``Money`` so that ``eval(repr(money_object) ==
money_object`` (at least in some environments, and most of the typical ones).
See `Python docs on __repr__
<https://docs.python.org/3/reference/datamodel.html?highlight=__repr__#object.__repr__>`_
for rationale. Thanks `@davidtvs <https://github.com/davidtvs>`_. This could
be backwards incompatible if you were relying on the old output of ``repr()``.

* Added ``list_all_currencies()`` utility function.

0.8 (2018-11-19)
----------------

* ``Money.round([ndigits])`` added.
Uses ``decimal.ROUND_HALF_EVEN`` by default, but this can be overridden
by setting ``rounding`` in the ``decimal`` context before calling ``Money.round()``.
* Various fixes/additions for different locales
* Division support on Python 2
* DEFAULT locale is now used as a fallback to return a currency symbol if your
chosen locale has no symbol set for that currency, rather than just returning
the currency code.


0.7 (2017-05-08)
----------------

* ``Money.__str__`` changed under Python 2 to use only ASCII characters.
This means that currency codes, rather than symbols, are used.

* Lots of additional locales supported out of the box.
Expand All @@ -21,7 +150,7 @@ Changes in v0.7
* Various other bug fixes


Changes in v0.6 and earlier
---------------------------
0.6 and earlier
---------------

* See VCS logs.
56 changes: 56 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Contributing to py-moneyed
==========================

If you would like to contribute to py-moneyed, the recommended workflow is:

1. First raise an issue on GitHub for any proposal or idea that might be
controversial and get feedback from the maintainers. If you have something
that is an obvious bug (a typo in the docs, for example), you can skip this
step.

2. Fork the project and checkout your fork onto your development machine.

3. Create a virtualenv of some kind for development (venv_, virtualenv_ or
virtualenvwrapper_) and install py-moneyed into it::

python setup.py develop

4. Optional, but highly recommended to save time later - install `pre-commit
<https://pre-commit.com/>`_ hooks::

pip install pre-commit
pre-commit install

5. Create a git branch for your changes, starting from ``master``

6. Fix the bug or implement your changes, being sure to:

1. Add tests and docs
2. Run the test suite (below)

7. Push your changes to your GitHub repo and submit a pull request.

Testing
-------

To run the test suite, first install tox (into your virtualenv)::

pip install tox

Run the tests using tox::

tox -e py310

You can run the test suite on all supported environments using tox_
(recommended). If you do not have all versions of Python that are used in
testing, you can use pyenv_ to install them, and you may benefit from the
additional plugin pyenv-implict_.

The py-moneyed package is tested against Python 3.7 - 3.11 and PyPy 3.

.. _tox: https://tox.readthedocs.io/en/latest/
.. _pyenv: https://github.com/pyenv/pyenv
.. _pyenv-implict: https://github.com/concordusapps/pyenv-implict
.. _venv: https://docs.python.org/3/library/venv.html
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/en/latest/
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Jacob Hansson ([email protected]) contributed a better currency
formatting implementation, and various patches, in May 2011.

Wojciech Banas added compatibility with multiple versions of Python,
including Python 3.x, in August 2013.
including Python 3.x, in August 2013.
Loading