Skip to main content

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

Project description

openedx-ledger

PyPI CI Codecov Documentation Supported Python versions License 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
# 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
# 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

Getting Help

Documentation

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

(TODO: Set up documentation)

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.

License

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

Please see LICENSE.txt for details.

Contributing

Contributions are very welcome. Please read 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.

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.

Reporting Security Issues

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

Change Log

Unreleased

  • Nothing unreleased

[1.7.2]

  • build: upgrade pip-tools to version 7.5.3

[1.7.1]

  • chore: Upgrade to Django 5.2 (no-op for new release tag)

[1.7.0]

  • build: Upgrade to Django 5.2

[1.6.14]

  • chore: Upgrade Python requirements

[1.6.13]

  • chore: Upgrade Python requirements

  • fix: Convert UUIDField columns to uuid type for MariaDB

[1.6.12]

  • chore: Increase version to 1.6.12 for dependency updates.

[1.6.11]

  • chore: Increase version to 1.6.11 for dependency updates.

[1.6.10]

  • chore: Increase version to 1.6.10 for dependency updates.

[1.6.9]

  • feat: Added course_run_start_date field to the Transaction model.

[1.6.8]

  • chore: Increase version to 1.6.8 for dependency updates.

[1.6.7]

  • chore: Increase version to 1.6.7 for dependency updates.

[1.6.6]

  • chore: Increase version to 1.6.6 for dependency updates.

[1.6.5]

  • chore: Increase version to 1.6.5 for dependency updates.

[1.6.4]

  • chore: Increase version to 1.6.4 for dependency updates.

[1.6.3]

  • chore: Increase version to 1.6.3 for dependency updates.

[1.6.2]

  • chore: Increase version to 1.6.2 for dependency updates.

[1.6.1]

  • chore: Increase version to 1.6.1 for dependency updates.

[1.6.0]

  • feat: Add support for Django 5.2

  • feat!: Dropped support for Python 3.8 and 3.9

[1.5.24]

  • chore: Increase version to 1.5.24 for dependency updates.

[1.5.23]

  • chore: Increase version to 1.5.23 for dependency updates.

[1.5.22]

  • chore: Update python requirements job source to openedx

[1.5.21]

  • chore: Increase version to 1.5.21 for dependency updates.

[1.5.20]

  • chore: Increase version to 1.5.20 for dependency updates.

[1.5.19]

  • chore: Increase version to 1.5.19 for dependency updates.

[1.5.18]

  • chore: Increase version to 1.5.18 for dependency updates.

[1.5.17]

  • chore: Increase version to 1.5.17 for dependency updates.

[1.5.16]

  • chore: Increase version to 1.5.16 for dependency updates.

[1.5.15]

  • chore: Increase version to 1.5.15 for dependency updates.

[1.5.14]

  • chore: Increase version to 1.5.14 for dependency updates.

[1.5.13]

  • chore: Increase version to 1.5.13 for dependency updates.

[1.5.12]

  • chore: Increase version to 1.5.12 for dependency updates.

[1.5.11]

  • chore: Increase version to 1.5.11 for dependency updates.

[1.5.10]

  • chore: Increase version to 1.5.10 for dependency updates.

[1.5.9]

  • chore: Increase version to 1.5.9 for dependency updates.

  • chore: Use Node 20 in Dockerfile.

[1.5.8]

  • chore: Increase version to 1.5.8 for dependency updates.

[1.5.7]

  • chore: Increase version to 1.5.7 for dependency updates.

[1.5.6]

  • chore: Increase version to 1.5.5 for dependency updates.

[1.5.5]

  • chore: Increase version to 1.5.5 for dependency updates.

[1.5.4]

  • chore: Increase version to 1.5.4 for dependency updates.

[1.5.3]

  • fix: deposit sales references should be optional

[1.5.2]

  • feat: Ledger creation is now capable of initial Deposit creation

[1.5.1]

  • chore: Increase version to 1.5.1 for dependency updates.

[1.5.0]

  • feat: Deposit model and supporting functionality

[1.4.5]

  • chore: Increase version to 1.4.5 for dependency updates.

[1.4.4]

  • feat: the Reversal django admin field now autocompletes.

[1.4.3]

  • feat: Update help text for adjustments

[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]

[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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openedx_ledger-1.7.2.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openedx_ledger-1.7.2-py2.py3-none-any.whl (52.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file openedx_ledger-1.7.2.tar.gz.

File metadata

  • Download URL: openedx_ledger-1.7.2.tar.gz
  • Upload date:
  • Size: 53.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openedx_ledger-1.7.2.tar.gz
Algorithm Hash digest
SHA256 625a2a7579da6bbffde3a7887702de9dd8dabdec93f34d1cdf24615c08813978
MD5 4d39db7dd9aff3b05749aa8712344d15
BLAKE2b-256 b5e977c15d3e8043bb4125ec9c3e9f50b789754594c3565922e5fbd21ba267d8

See more details on using hashes here.

File details

Details for the file openedx_ledger-1.7.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for openedx_ledger-1.7.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d0500b6c3e6fca8940a177984d9fd55862701747f18f4723e79e7809ce9b8ba2
MD5 a8fbde4925d7022afc73e85e12df4717
BLAKE2b-256 c5f1d63362ae58fa1b7fc98943232d3fcbf561a14f9d7e34ed7ad9cceb9819a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page