beam-community/ex_machina
67.2
Adequate · 23 September 2026
1.4k
lines of production code
Elixir
primary language
5
measurements over time
What this system is
ExMachina is an Elixir library for generating test data factories, now operating under the BEAM Community stewardship. It provides a macro-based factory definition system with an extensible strategy protocol, supporting custom logic such as JSON encoding and robust Ecto integration for database inserts. The system handles complex schema relationships, sequence generation, and attribute merging, while offering configuration options to preserve date structures and ensure test environment stability.
Features
Automated release script for versioning and publishing
A new executable script at bin/release has been added to streamline the release process. When invoked with a previous and a new version number, it automatically updates the version strings in README.md and mix.exs, commits the changes, creates a git tag, pushes to the remote repository, and publishes the package via mix hex.publish.
bin · high confidence
Behavioural changes
Consolidated test database schema into a single migration file
The test repository schema is now defined in a single migration file (1\_migrate\_all.exs) instead of multiple separate files. This consolidated migration creates the necessary tables (users, publishers, articles, comments, documents) and includes a database trigger on the users table to automatically set a db\_value field, ensuring the test environment is set up with all required structures in one step.
priv · high confidence
Explicit test environment configuration and date preservation option
The application now explicitly loads a dedicated test configuration file (test.exs) when running in the test environment, replacing the previous generic import logic. This new configuration sets up the ExMachina test repository to use the Ecto SQL Sandbox with a PostgreSQL connection on localhost:5432, and configures the logger to output only warning-level messages. Additionally, a configuration option for ExMachina to preserve date values (preserve\_dates: true) is introduced to prevent breaking changes when converting datetime values, allowing users to opt into preserving date structures instead of converting them to string-keyed maps.
config · high confidence
Factory definitions migrate to macros and a new extensible strategy system
Factory definitions are now implemented as macros rather than functions, enabling compile-time validation and better integration with Elixir's macro system. The library introduces a new \ExMachina.Strategy\ protocol that allows users to define custom strategies (such as JSON encoding) by implementing a \handle\\\ callback, replacing the previous internal strategy mechanism. This architectural shift also underpins the refactored \ExMachina.Ecto\ module, which now uses \ExMachina.EctoStrategy\ to handle database inserts with improved support for associations, embeds, and casting, while maintaining backward compatibility for existing \build\ and \insert\ workflows.
_lib/ex\machina · high confidence
Project rebranded to ExMachina under BEAM Community stewardship
The library has been renamed from Anvil to ExMachina and transferred to the BEAM Community organization. This change updates the project identity, including the README, license headers, and documentation, to reflect the new name and maintainers.
(repo-wide) · high confidence
Rename library from Anvil to ExMachina and deprecate create functions
The library has been renamed from Anvil to ExMachina, removing the old \lib/anvil.ex\ module. Additionally, the \create\, \create\_pair\, and \create\_list\ functions have been removed; calling them now raises an error directing users to use \insert\/\insert\_pair\/\insert\_list\ (if using ExMachina.Ecto) or to implement \ExMachina.Strategy\ for custom save logic.
lib · high confidence
Test coverage
Added test coverage for ExMachina core features; Added test support infrastructure for Ecto integration; Added test support models for complex schema relationships; Initial test suite for ExMachina factory functions.
Dependencies
Project renamed to ExMachina with dependency and configuration updates
The project has been renamed from Anvil to ExMachina, updating the application ID to :ex\_machina and the module namespace to ExMachina.Mixfile. The Elixir requirement has been raised to \~\> 1.11, and the version is set to 2.8.2. Dependencies have been updated, including Ecto (\~\> 2.2 or \~\> 3.0), Ecto SQL (\~\> 3.0), and dev tools like Credo, Dialyxir, Doctor, ExCoveralls, and ExDoc. The mix.lock file reflects these changes, locking specific versions for all dependencies.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 67 → 67 (+0.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 55 → 55 (+0.0)
- Readiness 83 → 84 (+1.2)
- Security 81 → 84 (+2.7)
Resolved (5)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- No exposed public API
- PR-triggered workflow without a permissions block
- Test reliability not included
New (2)
- Medium: security finding (details withheld)
- Workflow holding a long-lived secret is unscoped
Changes since last survey
- 4 commits — 4 feature/other, 0 fixes
By area
- (root) — 3 commits
- .github/workflows — 1 commit
Notable commits
- change: chore(deps): bump ecto from 3.14.1 to 3.14.2 in the prod group (#571)
- change: chore(deps): bump postgrex from 0.22.3 to 0.22.4 in the dev group (#570)
- change: chore(deps): bump the dev group with 2 updates (#572)
- change: chore: sync files with beam-community/common-config (#569)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
beam-community/ex_machina was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 83d9dbe8ea9eecf388741af78b960d9b74c2d7f2 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.