From a029568f77deee0f99611753a4657a53feba096f Mon Sep 17 00:00:00 2001 From: Jax Date: Sat, 1 Feb 2025 11:49:56 +0800 Subject: [PATCH] feat: 0.3.5 --- .github/workflows/publish.yml | 6 +++--- CHANGELOG.md | 4 ++++ README.md | 10 ++++++++++ pyproject.toml | 2 +- src/bagels/forms/record_forms.py | 7 ++----- src/bagels/forms/recordtemplate_forms.py | 4 ++-- src/bagels/modals/transfer.py | 5 ++--- src/bagels/utils/validation.py | 2 +- 8 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac36a0c..318f982 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,9 @@ name: "Publish" on: - push: - branches: - - main + release: + types: [published] + branches: [master] jobs: run: diff --git a/CHANGELOG.md b/CHANGELOG.md index bb80beb..b81fa3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.3.5 + +- Removed minimum amount validation for records for flexibility. + ## 0.3.4 - Added ability to click on accounts in accounts-mode module diff --git a/README.md b/README.md index 3c48bda..7e7c713 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ Some notable features include:
Recommended: By UV +Bagels can be installed via uv on MacOS, Linux, and Windows. + +`uv` is a single Rust binary that you can use to install Python apps. It's significantly faster than alternative tools, and will get you up and running with Bagels in seconds. + +You don't even need to worry about installing Python yourself - uv will manage everything for you. + #### Unix / MacOS: ```bash @@ -50,6 +56,10 @@ source $HOME/.local/bin/env # or follow instructions uv tool install --python 3.13 bagels ``` +`uv` can also be installed via Homebrew, Cargo, Winget, pipx, and more. See the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) for more information. + +Now you can run Posting via the command line: + #### Windows: ```bash diff --git a/pyproject.toml b/pyproject.toml index 84be31e..f837fcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "Bagels" -version = "0.3.4" +version = "0.3.5" authors = [ { name = "Jax", email = "enhancedjax@gmail.com" } ] diff --git a/src/bagels/forms/record_forms.py b/src/bagels/forms/record_forms.py index ec4f2f8..ed55944 100644 --- a/src/bagels/forms/record_forms.py +++ b/src/bagels/forms/record_forms.py @@ -3,13 +3,12 @@ from rich.text import Text -from bagels.config import CONFIG +from bagels.forms.form import Form, FormField, Option, Options from bagels.managers.accounts import get_all_accounts_with_balance from bagels.managers.categories import get_all_categories_by_freq from bagels.managers.persons import get_all_persons from bagels.managers.record_templates import get_all_templates -from bagels.managers.records import get_record_by_id, get_record_total_split_amount -from bagels.forms.form import Form, FormField, Option, Options +from bagels.managers.records import get_record_by_id class RecordForm: @@ -46,7 +45,6 @@ def __new__(cls): title="Amount", key="amount", type="number", - min=0, is_required=True, ), FormField( @@ -89,7 +87,6 @@ def __new__(cls): title="Amount", key="amount", type="number", - min=0, is_required=True, placeholder="0.00", ), diff --git a/src/bagels/forms/recordtemplate_forms.py b/src/bagels/forms/recordtemplate_forms.py index 10e7bcf..a74308f 100644 --- a/src/bagels/forms/recordtemplate_forms.py +++ b/src/bagels/forms/recordtemplate_forms.py @@ -1,10 +1,11 @@ import copy + from rich.text import Text +from bagels.forms.form import Form, FormField, Option, Options from bagels.managers.accounts import get_all_accounts_with_balance from bagels.managers.categories import get_all_categories_by_freq from bagels.managers.record_templates import get_template_by_id -from bagels.forms.form import Form, FormField, Option, Options class RecordTemplateForm: @@ -39,7 +40,6 @@ def __new__(cls): title="Amount", key="amount", type="number", - min=0, is_required=True, ), FormField( diff --git a/src/bagels/modals/transfer.py b/src/bagels/modals/transfer.py index 3eeb7e2..9f1f429 100644 --- a/src/bagels/modals/transfer.py +++ b/src/bagels/modals/transfer.py @@ -11,10 +11,10 @@ ) from bagels.components.fields import Fields +from bagels.forms.form import Form, FormField from bagels.managers.accounts import get_all_accounts_with_balance -from bagels.utils.validation import validateForm from bagels.modals.base_widget import ModalContainer -from bagels.forms.form import Form, FormField +from bagels.utils.validation import validateForm class Accounts(ListView): @@ -74,7 +74,6 @@ def __init__( key="amount", type="number", placeholder="0.00", - min=0, is_required=True, default_value=str(record.amount) if record else "", ), diff --git a/src/bagels/utils/validation.py b/src/bagels/utils/validation.py index 0629841..088901e 100644 --- a/src/bagels/utils/validation.py +++ b/src/bagels/utils/validation.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Tuple, Dict, Any +from typing import Any, Dict, Tuple from textual.widget import Widget