Do you prefer to hand-craft your integrant setup for new projects, or do you use a template? I'm looking for a simple, reasonable setup that uses integrant.repl
and differentiates between configuration in dev and prod.
I’d recommend also including test as a profile (normally ontop of dev) too
And use it for unit tests?
I often just "mix the dev ad test profile", because I want to run tests from the REPL. But I guess unit tests don't need dependencies like integrant.repl
.
I mix the profiles too; but it’s nice to be able to run a dev system and a test system simultaneously; sometimes with different subsets of data etc
my apps repl usually has a dev system running, and various test ones (when the tests run)
I actually have a large set of profiles that include :dev :dev-only :test
:dev-only
is excluded from test, but included in :dev
and allows for spot checking and performance testing with larger sets of data; that you don’t want your tests to have to load etc…
The test profile typically contains small targeted sets of test data; and various tweaks (ports etc)
Sorry we’re also mixing terms here too…
There are profiles in terms of lein
profiles or tools.deps aliases. Essentially what you get on the classpath.
And there are profiles in terms of integrant systems; i.e. what keys you initialise etc.
I’m talking about both; not just whats on the classpath.
I really like the way Duct works, but I'm looking for something more lightweight.
Duct is pretty lightweight if you remove all the modules imho
You could just exclusively use the Duct profiles for dev / prod. And then write your own keys
But then again, if it's only dev / prod you need, might as well merge it in yourself
> Duct is pretty lightweight if you remove all the modules imho Good point. "Duct without modules" should be very similar to a "reasonable Integrant template".
Yeah, and it has integrant.repl set up. Maybe it's worth a shot
Duct core also has auto reloading