Skip to content

Commit

Permalink
v0.7.0 (#228)
Browse files Browse the repository at this point in the history
* Relaxing Dependency Constraints

* Issue 208 ofx files (#209)

* fix: initial attempt

* Allow .qfx files in data_import form.

The accept attribute in the file-input field now includes .qfx files. This permits users to import data from files in .qfx format in addition to the previously supported .ofx format.

* remove debugging lines, remove debug code, add sample ofx for tests

---------

Co-authored-by: Miguel Sanda <[email protected]>

* v0.6.3 (#214)

* Add proxy functions to JournalEntry model

The commit introduces proxy functions to the JournalEntry model in the Django Ledger code. Specifically, it adds 'post', 'unpost', 'lock', and 'unlock' methods, each serving as a proxy to their counterpart methods 'mark_as_posted', 'mark_as_unposted', 'mark_as_locked', and 'mark_as_unlocked'. This simplifies the interface for interacting with JournalEntry objects.

* Minor code optimization & Django Ledger admin fields.

* access the queryset instance using .all() which returns a queryset. (#213)

* Correct urls for going back in entity and ledger balance sheet view (#215)

* Add signal handling for various models' statuses

Added signals for different status changes of Django Ledger models to enable real-time, event-driven system behavior. Signals are now sent each time an action is performed in the Ledger, Invoice, Bill, Journal Entry, Purchase Order, and Estimate. These changes will allow us to trigger specific actions depending on these changes.

* Update Python version and package versions in Pipfile

Updated the Python version from 3.11 to 3.12 in Pipfile and Pipfile.lock. Also, updated the package versions of 'django', 'faker' and 'pillow' in Pipfile.lock for improved functionality and security.

* Update Django Ledger version to 0.6.3

This commit updates the version number of the Django Ledger project in both __init__.py and pyproject.toml files. The version has been incremented from 0.6.2 to 0.6.3.

* Update signal comments in models

Updated the comments in the signals.py file to clearly specify that the signals correspond to Journal Entry Models. Additional context was also included for the signals module to enhance clarity for developers in understanding the importance of events or states in the models.

* Update documentation structure

Rearrange sections in documentation, focusing on IO and models. For docs/source/models.rst, the automodule section for django_ledger.models.signals was added. Meanwhile, in docs/source/io.rst, sections were reshuffled and terms updated for better clarity. These steps aim to enhance documentation readability and accuracy.

---------

Co-authored-by: Eric paul <[email protected]>
Co-authored-by: Ubaid ur Rehman <[email protected]>

* Update dependencies versions in Pipfile.lock

Upgraded several packages to their latest versions, including Faker, Alabaster, and SQLParse, among others. Added new dependencies appnope and backports.tarfile, and adjusted Python version markers for some packages. Removed cryptography and jeepney from the list of dependencies.

* Updated Logos

* comment out attribute that doesn't exist (#220)

* Docker Fix (#218)

* Update version to 0.6.4

Bump the version number in `__init__.py` and `pyproject.toml`. This update ensures consistency and readiness for the next release cycle.

* API authentication (#217)

* access the queryset instance using .all() which returns a queryset.

* fixed invalid client

* changes in API authentication usage

* API Authentication usage

* Add DjangoCon2024 Jupyter notebook example

Introduced a detailed Jupyter notebook for DjangoCon 2024. This notebook demonstrates various functionalities including setting up Django, creating a UserModel, defining an EntityModel, and creating and populating a Chart of Accounts.

* Update entity model CoA handling and streamline notebook

Enhanced the entity model to handle various types for CoA (Chart of Accounts) input. Cleared execution counts and outputs from DjangoCon2024 notebook for better clarity.

* Add support for validating parent roles in accounts

Implemented `VALID_PARENTS` to allow filtering accounts based on hierarchical roles. This ensures that parent-child relationships between account roles are correctly validated and managed.

* Pipfile Update

* Refactor and improve docs for AccountModel and QuerySets

Refactored and enhanced documentation for AccountModel and its related query sets to ensure clarity and consistency. Introduced detailed attribute descriptions and method explanations while maintaining code functionality.

* Add net income computation to IO middleware

Introduced a new `net_income` method to calculate and store net income as part of the IO_DATA digest process. Updated the `digest` method to include the net income calculation step. This enhances the financial reporting capabilities of the middleware.

* v0.7.0 (#226)

* v0.6.4 (#223)

* Relaxing Dependency Constraints

* Issue 208 ofx files (#209)

* fix: initial attempt

* Allow .qfx files in data_import form.

The accept attribute in the file-input field now includes .qfx files. This permits users to import data from files in .qfx format in addition to the previously supported .ofx format.

* remove debugging lines, remove debug code, add sample ofx for tests

---------

Co-authored-by: Miguel Sanda <[email protected]>

* v0.6.3 (#214)

* Add proxy functions to JournalEntry model

The commit introduces proxy functions to the JournalEntry model in the Django Ledger code. Specifically, it adds 'post', 'unpost', 'lock', and 'unlock' methods, each serving as a proxy to their counterpart methods 'mark_as_posted', 'mark_as_unposted', 'mark_as_locked', and 'mark_as_unlocked'. This simplifies the interface for interacting with JournalEntry objects.

* Minor code optimization & Django Ledger admin fields.

* access the queryset instance using .all() which returns a queryset. (#213)

* Correct urls for going back in entity and ledger balance sheet view (#215)

* Add signal handling for various models' statuses

Added signals for different status changes of Django Ledger models to enable real-time, event-driven system behavior. Signals are now sent each time an action is performed in the Ledger, Invoice, Bill, Journal Entry, Purchase Order, and Estimate. These changes will allow us to trigger specific actions depending on these changes.

* Update Python version and package versions in Pipfile

Updated the Python version from 3.11 to 3.12 in Pipfile and Pipfile.lock. Also, updated the package versions of 'django', 'faker' and 'pillow' in Pipfile.lock for improved functionality and security.

* Update Django Ledger version to 0.6.3

This commit updates the version number of the Django Ledger project in both __init__.py and pyproject.toml files. The version has been incremented from 0.6.2 to 0.6.3.

* Update signal comments in models

Updated the comments in the signals.py file to clearly specify that the signals correspond to Journal Entry Models. Additional context was also included for the signals module to enhance clarity for developers in understanding the importance of events or states in the models.

* Update documentation structure

Rearrange sections in documentation, focusing on IO and models. For docs/source/models.rst, the automodule section for django_ledger.models.signals was added. Meanwhile, in docs/source/io.rst, sections were reshuffled and terms updated for better clarity. These steps aim to enhance documentation readability and accuracy.

---------

Co-authored-by: Eric paul <[email protected]>
Co-authored-by: Ubaid ur Rehman <[email protected]>

* Update dependencies versions in Pipfile.lock

Upgraded several packages to their latest versions, including Faker, Alabaster, and SQLParse, among others. Added new dependencies appnope and backports.tarfile, and adjusted Python version markers for some packages. Removed cryptography and jeepney from the list of dependencies.

* Updated Logos

* comment out attribute that doesn't exist (#220)

* Docker Fix (#218)

* Update version to 0.6.4

Bump the version number in `__init__.py` and `pyproject.toml`. This update ensures consistency and readiness for the next release cycle.

* API authentication (#217)

* access the queryset instance using .all() which returns a queryset.

* fixed invalid client

* changes in API authentication usage

* API Authentication usage

* Add DjangoCon2024 Jupyter notebook example

Introduced a detailed Jupyter notebook for DjangoCon 2024. This notebook demonstrates various functionalities including setting up Django, creating a UserModel, defining an EntityModel, and creating and populating a Chart of Accounts.

* Update entity model CoA handling and streamline notebook

Enhanced the entity model to handle various types for CoA (Chart of Accounts) input. Cleared execution counts and outputs from DjangoCon2024 notebook for better clarity.

* Add support for validating parent roles in accounts

Implemented `VALID_PARENTS` to allow filtering accounts based on hierarchical roles. This ensures that parent-child relationships between account roles are correctly validated and managed.

* Pipfile Update

* Refactor and improve docs for AccountModel and QuerySets

Refactored and enhanced documentation for AccountModel and its related query sets to ensure clarity and consistency. Introduced detailed attribute descriptions and method explanations while maintaining code functionality.

---------

Co-authored-by: Tom Hodder <[email protected]>
Co-authored-by: Eric paul <[email protected]>
Co-authored-by: Ubaid ur Rehman <[email protected]>
Co-authored-by: Krzysztof Czapla <[email protected]>

* Add logo and update documentation for Django Ledger CoA

This commit adds the Django Ledger logo to the Jupyter notebook and reworks the documentation for the Chart of Accounts (CoA) section. It also updates type imports, adjusts outputs, and includes explanations for handling multiple CoA and sample data population.

* Ui Icons Fix
Subscription ID on UI
Wallet Create Mutation
Sidebar Simplification

* Update to version 0.6.5 and add account lock/unlock methods

Bumped the project version to 0.6.5 and added Django 5.0 framework classifier. Enhanced AccountModel by introducing methods to lock and unlock accounts with validation. Simplified the get_queryset method for item views.

* Update to version 0.6.5 and add account lock/unlock methods

Bumped the project version to 0.6.5 and added Django 5.0 framework classifier. Enhanced AccountModel by introducing methods to lock and unlock accounts with validation. Simplified the get_queryset method for item views.

* Add `allow_empty` attribute and fix sales tax rate help text

Enable empty ledger list handling in LedgerModelListView by setting `allow_empty` to True. Additionally, update the help text for the sales tax rate field to correct the example conversion factor.

* Refactor queryset initialization in item views

Updated the get_queryset methods to use the AUTHORIZED_ENTITY_MODEL attribute for fetching related models instead of directly invoking model managers. This change improves code consistency and leverages the new entity model for querying related objects. Removed an outdated comment from the items.py model file.

* Add 'active' filter to queries and reorganize docstrings

Enhanced vendor and customer queries with an 'active' filter for better data accuracy. Also, standardized contribution docstrings across multiple files and updated the EstimateModel queryset to use the `AUTHORIZED_ENTITY_MODEL`.

* Update view mixins and clean up docstrings

Replaced security mixins with specific view mixins across multiple views to streamline authorization logic. Additionally, cleaned up and standardized docstrings in several modules.

* Rename model view mixins for better consistency

Replaced *ModelViewQuerySetMixIn class names with *ModelBaseView across multiple modules. This change improves naming clarity and consistency in the project's codebase.

* Add entity-based filtering and queryset improvements

Refactor multiple classes to enhance entity-based filtering and queryset handling. Streamline vendor and account queries, improve code readability, and consolidate security checks.

- Optimize AccountModel forms and remove unnecessary arguments
- Enhance AccountModel views to inherit from a base view and add select_related fields to view querysets, minimizing database queries during template rendering
- Implement AccountModel navigation URLs as model methods and annotate default AccountModel queryset with necessary relevant information
- Replace unique_together Meta option with constraints option on the AccountModel to conform with new API
- Add coa_slug as mandatory kwarg on all AccountModel-related views.

* Format code for readability and remove redundant methods

Reformatted various parts of the code for better readability by breaking long lines and ensuring consistent indentation. Additionally, removed redundant methods `with_roles` and `with_roles_available` from `models/accounts.py` to clean up unnecessary code.

* Simplify and format README.md for better readability

Condensed the README by removing verbose descriptions and reformatting key sections. Enhanced navigation with clear links to Discord, documentation, and the QuickStart Notebook, and streamlined the list of features for clarity.

* Update invoice detail URLs to include coa_slug parameter

Added the 'coa_slug' parameter to account-detail URLs in the invoice detail template to ensure proper linkage to the chart of accounts model. Updated the view to prefetch related coa_model fields for cash, prepaid, and unearned accounts.

* Reformat `with_roles` method calls for readability

Improve readability by reformatting `with_roles` method calls to use multiline styling consistently. This change enhances code maintainability without affecting functionality. It should make the nested roles easier to read and modify in the future.

* Refactor initialization logic in Bill forms

Replace individual entity and user model parameters with a single entity model parameter in BillModelCreateForm and BaseBillItemTransactionFormset. This simplifies querysets and improves code readability by leveraging direct relationships.

* Refactor bill views and forms with new base view

Refactored multiple components in `bill.py` to streamline and simplify the code by introducing `BillModelModelBaseView`. Replaced repeated logic for querying BillModel instances and standardized the creation and updating of forms.

* Add "Is Active" column to expense table and update account URLs

Added an "Is Active" column to the expense item table to indicate the status of expense items. Updated account detail URLs in bill detail template to include the chart of accounts slug for accurate link resolution.

* Account Model QuerySets optimization.

Update entity_slug to entity_model in various files

Replaces 'entity_slug' with 'entity_model' for better consistency and clarity across forms, views, and notebooks. This change also introduces the handling of ObjectDoesNotExist within notebooks and improves the use of queryset filtering.

* Refactor account tests and form ID handling

Added account management tests, including view protection and creation. Introduce form ID generation in account creation forms and implement utility methods for URL pattern resolution in tests.

* Add account activation and locking tests

Implemented tests for account activation and locking functionalities, including the ability to lock, unlock, activate, and deactivate accounts. Also updated the `get_coa_accounts` method to filter by locked status.

* Update `get_random_account` to filter by active and locked status

Add parameters to filter accounts based on their active and locked status. This enhances the function's flexibility and ensures more precise query results.

* Update execution timestamps in DjangoCon2024 notebook

Updated metadata execution timestamps throughout the DjangoCon2024 notebook to reflect the current date. Also added a note emphasizing a limitation in executing a particular code snippet within a Jupyter notebook.

* Add lock/unlock actions and COA active check in accounts

Introduced methods to generate lock/unlock URLs in the Account model, along with corresponding URL patterns. Added `is_coa_active` to check the COA active status, updating `can_activate` to utilize this check.

* Add lock status and actions to accounts table

Added a new column to display the lock status of each account and incorporated conditional icons to visually indicate if an account is locked or unlocked. Additionally, added actions in the dropdown menu to lock and unlock accounts based on the account's current state.

* Documentation Update

* Add new account model tests and refactor imports

Introduce tests for account annotations and transaction capabilities to ensure accurate entity associations and transaction status checks. Refactor import statements to remove unused `DEBIT` import and improve code readability with minor reformatting.

* Refactor AUTHORS.md for better organization

Reorganize sections in AUTHORS.md to separate Developers, Contributors, and Documentation Contributors for better clarity.

* Update README and contribution guidelines

Expanded the contact section in README for better clarity. Revised the Contribute.md file to include detailed guidelines, ensuring clarity on contribution processes and standards.

* v0.7.0

---------

Co-authored-by: Tom Hodder <[email protected]>
Co-authored-by: Eric paul <[email protected]>
Co-authored-by: Ubaid ur Rehman <[email protected]>
Co-authored-by: Krzysztof Czapla <[email protected]>

---------

Co-authored-by: Tom Hodder <[email protected]>
Co-authored-by: Eric paul <[email protected]>
Co-authored-by: Ubaid ur Rehman <[email protected]>
Co-authored-by: Krzysztof Czapla <[email protected]>
  • Loading branch information
5 people authored Oct 25, 2024
1 parent 226a506 commit 13543ac
Show file tree
Hide file tree
Showing 78 changed files with 2,259 additions and 4,461 deletions.
10 changes: 8 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ Django Ledger was created by [Miguel Sanda](https://github.com/elarroba).
### Project Maintainers
* Miguel Sanda [@elarroba](https://github.com/elarroba)

### Developers & Contributors
### Developers
* Miguel Sanda [@elarroba](https://github.com/elarroba)

### Contributors
* Michael Noel [@mnooel](https://github.com/mnooel)
* Eric Owuor [@Ericpaul](https://github.com/25-do)
* Pranav P Tulshyan

### Accountants, CPAs & Bookkeepers
* Miguel Sanda [@elarroba](https://github.com/elarroba)
* Albert Salazar [@Beachwood619](https://github.com/Beachwood619)
* Michael Noel, CPA [@mnooel](https://github.com/mnooel)
* Michael Noel, CPA [@mnooel](https://github.com/mnooel)

### Documentation Contributors
* Miguel Sanda [@elarroba](https://github.com/elarroba)
67 changes: 44 additions & 23 deletions Contribute.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
# Django Ledger Contribution Guidelines

* UI
* Django Ledger UI is based on the [Bulma](https://bulma.io/) CSS Framework via [WebPack](https://webpack.js.org/).
Any template contributions must follow Bulma's best practices.
* Icons are implemented through [Iconify](https://iconify.design/) and Django Ledger has the built-in template tag
[icon](https://github.com/arrobalytics/django-ledger/blob/5f61251ce3ee8a9b159211a98d8d00c53b5cb942/django_ledger/templatetags/django_ledger.py#L78)
which can be used to render any icon using Iconify.
* JavaScript
* Django Ledger uses [TypeScript](https://www.typescriptlang.org/) to ship JavaScript to the browser. Webpack is used to bundle all CSS/JS into two
javascript files respectively. See [bundle](https://github.com/arrobalytics/django-ledger/tree/develop/django_ledger/static/django_ledger/bundle)
in the static file directory. The build command in the [assets/package.json](https://github.com/arrobalytics/django-ledger/blob/develop/assets/package.json)
file will build styles and javascript and
automatically update the application bundle with the latest compiled version.
* Models
* Changes and contributions to Models are limited to those with proven Django experience. Also, in addition to Django
experience, some accounting and domain knowledge is required. Changes to models must be justified and susbtantiated
with proper accounting best practices.
* Documentation
* All documentation contributions are welcome. [Sphinx](https://github.com/sphinx-doc/sphinx) has been set up to
automatically generate static HTML documentation.
* Unit Tests
* All unit tests contributions are welcome if they are intended to validate program logic and/or accounting logic.
# Contribution Guidelines for Django Ledger

Thank you for your interest in contributing to Django Ledger. Before submitting your contribution, please review the following guidelines:

## 1. Contributor License Agreement (CLA)
All contributors must sign our Contributor License Agreement. This agreement ensures that:
- You grant us a perpetual, worldwide, non-exclusive, royalty-free license to use your contributions.
- You confirm that you have the right to grant us these rights.
- You understand that your contributions will be under the project's open-source license.

## 2. Copyright
- The copyright for Django Ledger is held by the project owner.
- By contributing, you agree that your contributions will be licensed under the same terms.

## 3. Code Contributions
- Ensure your code adheres to our coding standards and style guide.
- All new code should be accompanied by appropriate tests.
- Update documentation as necessary.

## 4. Pull Requests
- Submit pull requests against the `develop` branch.
- Clearly describe the problem and solution in your PR description.
- Include any relevant issue numbers.

## 5. Issue Reporting
- Use the issue tracker to report bugs or suggest enhancements.
- Provide as much detail as possible, including steps to reproduce for bugs.

## 6. Ownership and Rights
- By contributing to Django Ledger, you acknowledge that the project owner retains the right to use, modify, and distribute your contribution as part of the project.
- The project owner reserves the right to reject any contribution.

## 7. Code of Conduct
- Adhere to our Code of Conduct in all interactions within the project community.

## 8. Documentation and Other Contributions
- Contributions to documentation, tutorials, or other non-code assets are also subject to these guidelines.

## 9. No Warranty
- Contributions are provided "as is" without warranty of any kind.

By submitting a contribution, you agree to these terms and conditions. The project owner reserves the right to update these guidelines as necessary.

Thank you for helping improve Django Ledger!
4 changes: 3 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
django = ">=2.2"
django = ">=4.2"
django-treebeard = ">=4.5.1"
ofxtools = ">=0.9.5"
markdown = ">=3.4.1"
Expand All @@ -26,6 +26,8 @@ behave = "*"
twine = "*"
jupyterlab = "*"
pandas = "*"
numpy = "*"


[requires]
python_version = "3.12"
Expand Down
Loading

0 comments on commit 13543ac

Please sign in to comment.