Packages
Faber TWEANN - Topology and Weight Evolving Artificial Neural Networks
Current section
Files
Jump to
Current section
Files
faber_tweann
rebar.config
rebar.config
{erl_opts, [
debug_info,
{i, "include"},
warnings_as_errors,
warn_unused_vars,
warn_export_all,
warn_shadow_vars,
warn_unused_import,
warn_unused_function,
warn_bif_clash,
warn_unused_record,
warn_deprecated_function,
warn_obsolete_guard,
warn_export_vars,
warn_exported_vars
]}.
{deps, []}.
%% Rust NIFs, absorbed from the faber-nn-nifs package in v2.0.0.
%% Built from source, never downloaded: prebuilt artifacts couple the package
%% to a specific glibc. Set FABER_TWEANN_SKIP_NIF=1 to skip, in which case the
%% pure Erlang fallback must be selected explicitly via
%% {faber_tweann, [{nif_impl, fallback}]}.
{pre_hooks, [
{"(linux|darwin|solaris)", compile,
"sh -c 'B=\"${REBAR_DEPS_DIR}/faber_tweann\"; [ -f \"$B/priv/build-nifs.sh\" ] || B=\".\"; sh \"$B/priv/build-nifs.sh\" \"$B\"'"}
]}.
%% Project plugins
{project_plugins, [
rebar3_hex,
rebar3_ex_doc
]}.
%% Documentation with ex_doc
{ex_doc, [
{extras, [
%% Getting Started
{"guides/overview.md", #{title => "Overview"}},
{"guides/tweann-basics.md", #{title => "TWEANN Basics"}},
{"guides/installation.md", #{title => "Installation"}},
{"guides/quickstart.md", #{title => "Quick Start"}},
{"guides/native-nifs.md", #{title => "Native Acceleration"}},
%% Visual Guides
{"guides/diagram-index.md", #{title => "Diagram Index"}},
%% Architecture
{"guides/architecture.md", #{title => "Architecture Details"}},
{"guides/c4-architecture.md", #{title => "C4 Architecture Model"}},
%% LTC Neurons
{"guides/neuron-types.md", #{title => "LTC Neurons"}},
{"guides/ltc-usage-guide.md", #{title => "LTC Usage Guide"}},
{"guides/ltc-evolution.md", #{title => "LTC Evolution Guide"}},
%% Customization
{"guides/CUSTOM_MORPHOLOGIES.md", #{title => "Custom Morphologies"}},
%% History
{"design_docs/releases/CHANGELOG.md", #{title => "Changelog"}},
{"README.md", #{title => "README"}},
{"ROADMAP.md", #{title => "Roadmap"}}
]},
{main, "overview"},
{source_url, "https://github.com/rgfaber/faber-tweann"},
{assets, #{"assets" => "assets"}},
{prefix_ref_vsn_with_v, false}
]}.
%% Hex.pm package metadata
{hex, [
{doc, #{provider => ex_doc}}
%% Package contents live in src/*.app.src, not here: rebar3_hex reads
%% {files, ...} from app_details (the .app.src), never from this block.
]}.
%% Test configuration
{eunit_opts, [
verbose,
{report, {eunit_surefire, [{dir, "_build/test/logs"}]}}
]}.
%% AN ORPHANED NEURON SHOULD DIE IN MILLISECONDS UNDER TEST, NOT IN 30 SECONDS.
%% neuron and neuron_ltc wait ?DEFAULT_INPUT_TIMEOUT (10s) for missing inputs and
%% do it 3 times before terminating, which is correct for a live network and
%% ruinous for a suite: a full eunit run was producing 11 MB of timeout warnings
%% while the completed-test count stood still, because some test leaks neurons
%% that nothing ever drives.
%%
%% This does NOT fix the leak, which is a real defect and is recorded as such. It
%% stops the leak costing half a minute per orphan, without skipping, tagging or
%% deleting a single test. Production is unaffected: the short default is behind
%% -ifdef(TEST), which rebar3 defines only in the test profile, and the env key
%% overrides either way. See default_input_timeout/0 in neuron and neuron_ltc.
{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
%% Dialyzer configuration
{dialyzer, [
{warnings, [
unmatched_returns,
error_handling,
unknown
]},
{plt_apps, top_level_deps},
%% Note: mnesia removed - now using ETS for genotype storage
{plt_extra_apps, []},
{plt_location, local},
{base_plt_location, global}
]}.
%% Profiles
{profiles, [
{examples, [
{erl_opts, [
debug_info,
{i, "include"}
]},
{extra_src_dirs, [
"examples/xor/src",
"examples/pole_balancing/src",
"examples/tmaze/src",
"examples/forex/src",
"examples/flatland/src",
"examples/snake_duel/src"
]}
]},
{test, [
{erl_opts, [
debug_info,
nowarn_export_all,
{i, "include"}
]},
{deps, []},
{extra_src_dirs, [
"test/unit",
"test/integration",
"test/fixtures",
"test/benchmark",
"examples/xor/src",
"examples/pole_balancing/src",
"examples/tmaze/src",
"examples/forex/src",
"examples/flatland/src",
"examples/snake_duel/src"
]}
]}
,
{lint, [
{plugins, [
{rebar3_lint, "5.0.4"}
]}
]}
]}.
%% Shell configuration
{shell, [
{apps, [faber_tweann]}
]}.
%% Documentation
{edoc_opts, [
{title, "Faber TWEANN - Topology and Weight Evolving Artificial Neural Networks"},
{source_path, ["src"]},
{includes, ["include"]}
]}.
%% XRef configuration
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
%% Elvis style rules — shared faber_min ruleset, mirroring macula/evoq/reckon-db.
%% Targets deep nesting, nested try/catch, if-expressions. Run `rebar3 lint`.
{elvis, [
{rulesets, #{
faber_min => [
{elvis_style, no_deep_nesting, #{level => 2}},
{elvis_style, no_nested_try_catch, #{}},
{elvis_style, no_if_expression, #{}}
]
}},
{config, [
#{files => ["src/**/*.erl"], ruleset => faber_min}
]}
]}.