• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaMathias / moolah / 1bc83f28c52c7005213ab08057319dce013dc910
4%

Build:
DEFAULT BRANCH: main
Ran 05 Dec 2025 06:19PM UTC
Jobs 1
Files 111
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Dec 2025 06:09PM UTC coverage: 1.018% (+0.3%) from 0.715%
1bc83f28c52c7005213ab08057319dce013dc910

push

github

web-flow
Implement LifeAreaCategory with Hierarchy Validation (#34)

* Add elixir coding standards to claude.md

* Add validation modules for LifeAreaCategory

Adds three validation modules to enforce data integrity for `LifeAreaCategory`:
- `Moolah.Finance.Validations.MaxDepth`: Ensures the category hierarchy does not exceed 2 levels.
- `Moolah.Finance.Validations.NoChildrenOnDelete`: Prevents deletion of categories that have children.
- `Moolah.Finance.Validations.NoCycleReference`: Prevents circular references in the parent-child hierarchy.

* Add LifeAreaCategory resource

Adds the `LifeAreaCategory` resource to the `Moolah.Finance` domain. This resource represents the hierarchical structure of life areas for transaction classification.

Changes details:
- Defines the `LifeAreaCategory` resource with attributes: `name`, `description`, `icon`, `color`, `transaction_type`, `parent_id`, and `depth`
- Configures PostgreSQL table `life_area_categories`
- Adds standard actions: `create`, `update`, `destroy`, `read`
- Adds helper actions: `roots` and `with_children`
- Configures policies to allow all operations (currently open)
- Applies validations using the previously added modules: `Moolah.Finance.Validations.MaxDepth`, `Moolah.Finance.Validations.NoChildrenOnDelete`, and `Moolah.Finance.Validations.NoCycleReference`
- Defines relationships: `parent` (belongs_to) and `children` (has_many)
- Adds `unique_name_per_parent` identity
- Includes the database migration file and Ash resource snapshots
- Adds unit tests in `test/moolah/finance/life_area_category_test.exs`

* Register LifeAreaCategory and refactor seeds

Registers the new resource and consolidates seed data into a single efficient script.

Changes details:
- ADD `Moolah.Finance.LifeAreaCategory` to resource list in `lib/moolah/finance.ex`
- REFACTOR `priv/repo/seeds.exs` to include `LifeAreaCategory` seeds directly
- Implement `SeedHelper` module for safe idempotent seeding
- Remove separate `priv/repo/... (continued)

33 of 125 new or added lines in 5 files covered. (26.4%)

108 of 10611 relevant lines covered (1.02%)

0.08 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
83.33
lib/moolah/finance/validations/max_depth.ex
2
83.33
lib/moolah/finance/validations/no_children_on_delete.ex
2
85.71
lib/moolah/finance/validations/no_cycle_reference.ex
86
0.0
test/support/component_helpers.ex
Jobs
ID Job ID Ran Files Coverage
1 1bc83f28c52c7005213ab08057319dce013dc910.1 05 Dec 2025 06:19PM UTC 111
1.02
GitHub Action Run
Source Files on build 1bc83f28c52c7005213ab08057319dce013dc910
  • Tree
  • List 111
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1bc83f28 on github
  • Prev Build on main (#363DB67A...)
  • Next Build on main (#B8B7314E...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc