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

JuliaMathias / moolah / 1bc83f28c52c7005213ab08057319dce013dc910 / 1
4%
main: 4%

Build:
DEFAULT BRANCH: main
Ran 05 Dec 2025 06:19PM UTC
Files 111
Run time 4s
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.1

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)

108 of 10611 relevant lines covered (1.02%)

0.08 hits per line

Source Files on job 1bc83f28c52c7005213ab08057319dce013dc910.1
  • Tree
  • List 111
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1
  • 1bc83f28 on github
  • Prev Job for on main (#363db67abb897b71c65b7434c5c73c17a2393282.1)
  • Next Job for on main (#b8b7314e85feb59dcd9d172535109c764d492983.1)
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