openedx-ledger


Nameopenedx-ledger JSON
Version 1.4.2 PyPI version JSON
download
home_pagehttps://github.com/openedx/openedx-ledger
SummaryRecords transactions against a ledger, denominated in units of value.
upload_time2024-04-16 13:45:28
maintainerNone
docs_urlNone
authoredX
requires_python>=3.8
licenseAGPL 3.0
keywords python edx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            openedx-ledger
##############

.. note::

  This README was auto-generated. Maintainer: please review its contents and
  update all relevant sections. Instructions to you are marked with
  "PLACEHOLDER" or "TODO". Update or remove those sections, and remove this
  note when you are done.

|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
|license-badge| |status-badge|

Purpose
*******

Records transactions against a ledger, denominated in units of value.

TODO: The ``README.rst`` file should start with a brief description of the repository and its purpose.
It should be described in the context of other repositories under the ``openedx``
organization. It should make clear where this fits in to the overall Open edX
codebase and should be oriented towards people who are new to the Open edX
project.

Getting Started
***************

Developing
==========

One Time Setup
--------------
.. code-block::

  # Clone the repository into your devstack src/ directory
  cd $DEVSTACK_WORKSPACE/src
  git clone git@github.com:openedx/openedx-ledger.git


Every time you develop something in this repo
---------------------------------------------
.. code-block::

   # shell into a running enterprise-subsidy container
   make app-shell

   # inside the container shell now
   # TODO find a better permanent place to put this git config call
   git config --global --add safe.directory /edx/src/openedx-ledger
   pip install -e /edx/src/openedx-ledger
   pip freeze | grep ledger # should give output pointing at a file and git hash

   # Now, to run tests and validation against openedx-ledger:
   pushd /edx/src/openedx-ledger
   source venv/bin/activate
   make validate


Deploying
=========

TODO: How can a new user go about deploying this component? Is it just a few
commands? Is there a larger how-to that should be linked here?

PLACEHOLDER: For details on how to deploy this component, see the `deployment how-to`_

.. _deployment how-to: https://docs.openedx.org/projects/openedx-ledger/how-tos/how-to-deploy-this-component.html

Getting Help
************

Documentation
=============

PLACEHOLDER: Start by going through `the documentation`_.  If you need more help see below.

.. _the documentation: https://docs.openedx.org/projects/openedx-ledger

(TODO: `Set up documentation <https://openedx.atlassian.net/wiki/spaces/DOC/pages/21627535/Publish+Documentation+on+Read+the+Docs>`_)

More Help
=========

If you're having trouble, we have discussion forums at
https://discuss.openedx.org where you can connect with others in the
community.

Our real-time conversations are on Slack. You can request a `Slack
invitation`_, then join our `community Slack workspace`_.

For anything non-trivial, the best path is to open an issue in this
repository with as many details about the issue you are facing as you
can provide.

https://github.com/openedx/openedx-ledger/issues

For more information about these options, see the `Getting Help`_ page.

.. _Slack invitation: https://openedx.org/slack
.. _community Slack workspace: https://openedx.slack.com/
.. _Getting Help: https://openedx.org/getting-help

License
*******

The code in this repository is licensed under the AGPL 3.0 unless
otherwise noted.

Please see `LICENSE.txt <LICENSE.txt>`_ for details.

Contributing
************

Contributions are very welcome.
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.

This project is currently accepting all types of contributions, bug fixes,
security fixes, maintenance work, or new features.  However, please make sure
to have a discussion about your new feature idea with the maintainers prior to
beginning development to maximize the chances of your change being accepted.
You can start a conversation by creating a new issue on this repo summarizing
your idea.

The Open edX Code of Conduct
****************************

All community members are expected to follow the `Open edX Code of Conduct`_.

.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/

People
******

The assigned maintainers for this component and other project details may be
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
file in this repo.

.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/openedx-ledger

Reporting Security Issues
*************************

Please do not report security issues in public. Please email security@openedx.org.

.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-ledger.svg
    :target: https://pypi.python.org/pypi/openedx-ledger/
    :alt: PyPI

.. |ci-badge| image:: https://github.com/openedx/openedx-ledger/workflows/Python%20CI/badge.svg?branch=main
    :target: https://github.com/openedx/openedx-ledger/actions
    :alt: CI

.. |codecov-badge| image:: https://codecov.io/github/openedx/openedx-ledger/coverage.svg?branch=main
    :target: https://codecov.io/github/openedx/openedx-ledger?branch=main
    :alt: Codecov

.. |doc-badge| image:: https://readthedocs.org/projects/openedx-ledger/badge/?version=latest
    :target: https://openedx-ledger.readthedocs.io/en/latest/
    :alt: Documentation

.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-ledger.svg
    :target: https://pypi.python.org/pypi/openedx-ledger/
    :alt: Supported Python versions

.. |license-badge| image:: https://img.shields.io/github/license/openedx/openedx-ledger.svg
    :target: https://github.com/openedx/openedx-ledger/blob/main/LICENSE.txt
    :alt: License

.. TODO: Choose one of the statuses below and remove the other status-badge lines.
.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red


Change Log
##########

..
   All enhancements and patches to openedx_ledger will be documented
   in this file.  It adheres to the structure of https://keepachangelog.com/ ,
   but in reStructuredText instead of Markdown (for ease of incorporation into
   Sphinx documentation and the PyPI description).

   This project adheres to Semantic Versioning (https://semver.org/).

.. There should always be an "Unreleased" section for changes pending release.

Unreleased
**********
* Nothing unreleased

[1.4.2]
*******
* feat: Dependency updates

[1.4.1]
*******
* feat: Add python 3.12 support

[1.4.0]
*******
* feat: Add parent_content_key field to Transaction model (ENT-8389)

[1.3.3]
*******
* Upgrade requirements

[1.3.2]
*******
* Fixing a kwarg typo

[1.3.1]
*******
* Update requirements

[1.3.0]
*******
* Add optional ``lms_user_email`` and ``content_title`` to the ``Transaction`` model

[1.2.0]
*******
* Add an ``Adjustment`` model

[1.1.0]
*******
* Add support for Django 4.2

[1.0.2]
*******
* only allow reversals of committed transactions

[1.0.1]
*******
* make transaction and ledger admins friendlier

[1.0.0]
*******
* Look for an ``lms_user_id`` key when generating transaction idempotency keys, not ``learner_id``.

[0.4.0]
*******
* include only non-failed transactions in ledger balance calculation by default

[0.3.3]
*******
* drop `ExternalFulfillmentProvider` name constraints
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
  deprecated.  See https://github.com/openedx/edx-sphinx-theme/issues/184 for
  more details.

[0.2.2]
*******
* Add many help_text fields to model fields.
* Add some useful composite table indices.
* Add a "failed" transaction state.

[0.2.0]
*******
* Some small developer QOL stuff.
* Better local development instructions in README.
* Remove docs from quality checks and ci.yml.
* Reasonable first pass at allowing for weak/strong admin editing ability depending on environment settings.
* Simple, first attempt at an idempotency key utility methods for ledgers and transactions that optionally take a subsidy and initial deposit, resp.
* Allow blank idp keys on the Ledger model, and set to a sane default if not provided on save().
* Remove JPY as an allowed unit.
* ``api.create_ledger()`` now seeds the ledger with an optional initial deposit.
* Check if we're already inside a transaction when setting ``durable=True`` in ``create_transaction()``.

[0.1.1] - 2023-01-05
********************

Added
=====

* Package renamed from `edx-ledger` to `openedx-ledger`

[0.1.0] - 2023-01-04
************************************************

Added
=====

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openedx/openedx-ledger",
    "name": "openedx-ledger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Python edx",
    "author": "edX",
    "author_email": "oscm@edx.org",
    "download_url": "https://files.pythonhosted.org/packages/34/fa/3b06719f9f86df290586aa37a046a62a9fd67b3c6e8d8c539986bb5470e4/openedx_ledger-1.4.2.tar.gz",
    "platform": null,
    "description": "openedx-ledger\n##############\n\n.. note::\n\n  This README was auto-generated. Maintainer: please review its contents and\n  update all relevant sections. Instructions to you are marked with\n  \"PLACEHOLDER\" or \"TODO\". Update or remove those sections, and remove this\n  note when you are done.\n\n|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|\n|license-badge| |status-badge|\n\nPurpose\n*******\n\nRecords transactions against a ledger, denominated in units of value.\n\nTODO: The ``README.rst`` file should start with a brief description of the repository and its purpose.\nIt should be described in the context of other repositories under the ``openedx``\norganization. It should make clear where this fits in to the overall Open edX\ncodebase and should be oriented towards people who are new to the Open edX\nproject.\n\nGetting Started\n***************\n\nDeveloping\n==========\n\nOne Time Setup\n--------------\n.. code-block::\n\n  # Clone the repository into your devstack src/ directory\n  cd $DEVSTACK_WORKSPACE/src\n  git clone git@github.com:openedx/openedx-ledger.git\n\n\nEvery time you develop something in this repo\n---------------------------------------------\n.. code-block::\n\n   # shell into a running enterprise-subsidy container\n   make app-shell\n\n   # inside the container shell now\n   # TODO find a better permanent place to put this git config call\n   git config --global --add safe.directory /edx/src/openedx-ledger\n   pip install -e /edx/src/openedx-ledger\n   pip freeze | grep ledger # should give output pointing at a file and git hash\n\n   # Now, to run tests and validation against openedx-ledger:\n   pushd /edx/src/openedx-ledger\n   source venv/bin/activate\n   make validate\n\n\nDeploying\n=========\n\nTODO: How can a new user go about deploying this component? Is it just a few\ncommands? Is there a larger how-to that should be linked here?\n\nPLACEHOLDER: For details on how to deploy this component, see the `deployment how-to`_\n\n.. _deployment how-to: https://docs.openedx.org/projects/openedx-ledger/how-tos/how-to-deploy-this-component.html\n\nGetting Help\n************\n\nDocumentation\n=============\n\nPLACEHOLDER: Start by going through `the documentation`_.  If you need more help see below.\n\n.. _the documentation: https://docs.openedx.org/projects/openedx-ledger\n\n(TODO: `Set up documentation <https://openedx.atlassian.net/wiki/spaces/DOC/pages/21627535/Publish+Documentation+on+Read+the+Docs>`_)\n\nMore Help\n=========\n\nIf you're having trouble, we have discussion forums at\nhttps://discuss.openedx.org where you can connect with others in the\ncommunity.\n\nOur real-time conversations are on Slack. You can request a `Slack\ninvitation`_, then join our `community Slack workspace`_.\n\nFor anything non-trivial, the best path is to open an issue in this\nrepository with as many details about the issue you are facing as you\ncan provide.\n\nhttps://github.com/openedx/openedx-ledger/issues\n\nFor more information about these options, see the `Getting Help`_ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n.. _Getting Help: https://openedx.org/getting-help\n\nLicense\n*******\n\nThe code in this repository is licensed under the AGPL 3.0 unless\notherwise noted.\n\nPlease see `LICENSE.txt <LICENSE.txt>`_ for details.\n\nContributing\n************\n\nContributions are very welcome.\nPlease read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.\n\nThis project is currently accepting all types of contributions, bug fixes,\nsecurity fixes, maintenance work, or new features.  However, please make sure\nto have a discussion about your new feature idea with the maintainers prior to\nbeginning development to maximize the chances of your change being accepted.\nYou can start a conversation by creating a new issue on this repo summarizing\nyour idea.\n\nThe Open edX Code of Conduct\n****************************\n\nAll community members are expected to follow the `Open edX Code of Conduct`_.\n\n.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/\n\nPeople\n******\n\nThe assigned maintainers for this component and other project details may be\nfound in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``\nfile in this repo.\n\n.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/openedx-ledger\n\nReporting Security Issues\n*************************\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-ledger.svg\n    :target: https://pypi.python.org/pypi/openedx-ledger/\n    :alt: PyPI\n\n.. |ci-badge| image:: https://github.com/openedx/openedx-ledger/workflows/Python%20CI/badge.svg?branch=main\n    :target: https://github.com/openedx/openedx-ledger/actions\n    :alt: CI\n\n.. |codecov-badge| image:: https://codecov.io/github/openedx/openedx-ledger/coverage.svg?branch=main\n    :target: https://codecov.io/github/openedx/openedx-ledger?branch=main\n    :alt: Codecov\n\n.. |doc-badge| image:: https://readthedocs.org/projects/openedx-ledger/badge/?version=latest\n    :target: https://openedx-ledger.readthedocs.io/en/latest/\n    :alt: Documentation\n\n.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-ledger.svg\n    :target: https://pypi.python.org/pypi/openedx-ledger/\n    :alt: Supported Python versions\n\n.. |license-badge| image:: https://img.shields.io/github/license/openedx/openedx-ledger.svg\n    :target: https://github.com/openedx/openedx-ledger/blob/main/LICENSE.txt\n    :alt: License\n\n.. TODO: Choose one of the statuses below and remove the other status-badge lines.\n.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red\n\n\nChange Log\n##########\n\n..\n   All enhancements and patches to openedx_ledger will be documented\n   in this file.  It adheres to the structure of https://keepachangelog.com/ ,\n   but in reStructuredText instead of Markdown (for ease of incorporation into\n   Sphinx documentation and the PyPI description).\n\n   This project adheres to Semantic Versioning (https://semver.org/).\n\n.. There should always be an \"Unreleased\" section for changes pending release.\n\nUnreleased\n**********\n* Nothing unreleased\n\n[1.4.2]\n*******\n* feat: Dependency updates\n\n[1.4.1]\n*******\n* feat: Add python 3.12 support\n\n[1.4.0]\n*******\n* feat: Add parent_content_key field to Transaction model (ENT-8389)\n\n[1.3.3]\n*******\n* Upgrade requirements\n\n[1.3.2]\n*******\n* Fixing a kwarg typo\n\n[1.3.1]\n*******\n* Update requirements\n\n[1.3.0]\n*******\n* Add optional ``lms_user_email`` and ``content_title`` to the ``Transaction`` model\n\n[1.2.0]\n*******\n* Add an ``Adjustment`` model\n\n[1.1.0]\n*******\n* Add support for Django 4.2\n\n[1.0.2]\n*******\n* only allow reversals of committed transactions\n\n[1.0.1]\n*******\n* make transaction and ledger admins friendlier\n\n[1.0.0]\n*******\n* Look for an ``lms_user_id`` key when generating transaction idempotency keys, not ``learner_id``.\n\n[0.4.0]\n*******\n* include only non-failed transactions in ledger balance calculation by default\n\n[0.3.3]\n*******\n* drop `ExternalFulfillmentProvider` name constraints\n* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is\n  deprecated.  See https://github.com/openedx/edx-sphinx-theme/issues/184 for\n  more details.\n\n[0.2.2]\n*******\n* Add many help_text fields to model fields.\n* Add some useful composite table indices.\n* Add a \"failed\" transaction state.\n\n[0.2.0]\n*******\n* Some small developer QOL stuff.\n* Better local development instructions in README.\n* Remove docs from quality checks and ci.yml.\n* Reasonable first pass at allowing for weak/strong admin editing ability depending on environment settings.\n* Simple, first attempt at an idempotency key utility methods for ledgers and transactions that optionally take a subsidy and initial deposit, resp.\n* Allow blank idp keys on the Ledger model, and set to a sane default if not provided on save().\n* Remove JPY as an allowed unit.\n* ``api.create_ledger()`` now seeds the ledger with an optional initial deposit.\n* Check if we're already inside a transaction when setting ``durable=True`` in ``create_transaction()``.\n\n[0.1.1] - 2023-01-05\n********************\n\nAdded\n=====\n\n* Package renamed from `edx-ledger` to `openedx-ledger`\n\n[0.1.0] - 2023-01-04\n************************************************\n\nAdded\n=====\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "AGPL 3.0",
    "summary": "Records transactions against a ledger, denominated in units of value.",
    "version": "1.4.2",
    "project_urls": {
        "Homepage": "https://github.com/openedx/openedx-ledger"
    },
    "split_keywords": [
        "python",
        "edx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9814baf3a4f7586e3fe7eb951a0802a77cf6a8ff0cf701091baa02612f0bad20",
                "md5": "5f9d9e6a162bb09461c1e29931374d29",
                "sha256": "ccb8bcddbe43d5b013f7d6fee17740ee71393c9aa8b1c606a8bd79599a00fb58"
            },
            "downloads": -1,
            "filename": "openedx_ledger-1.4.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f9d9e6a162bb09461c1e29931374d29",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 44363,
            "upload_time": "2024-04-16T13:45:26",
            "upload_time_iso_8601": "2024-04-16T13:45:26.131271Z",
            "url": "https://files.pythonhosted.org/packages/98/14/baf3a4f7586e3fe7eb951a0802a77cf6a8ff0cf701091baa02612f0bad20/openedx_ledger-1.4.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34fa3b06719f9f86df290586aa37a046a62a9fd67b3c6e8d8c539986bb5470e4",
                "md5": "f8858bace295474e7343cf38dffe2054",
                "sha256": "ca4c2c96722e5c1548812a96f726433cd926cd6611073519a345eaa6bef63f07"
            },
            "downloads": -1,
            "filename": "openedx_ledger-1.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f8858bace295474e7343cf38dffe2054",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 45434,
            "upload_time": "2024-04-16T13:45:28",
            "upload_time_iso_8601": "2024-04-16T13:45:28.261126Z",
            "url": "https://files.pythonhosted.org/packages/34/fa/3b06719f9f86df290586aa37a046a62a9fd67b3c6e8d8c539986bb5470e4/openedx_ledger-1.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 13:45:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openedx",
    "github_project": "openedx-ledger",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "openedx-ledger"
}
        
edX
Elapsed time: 0.25143s