defmodule Entropy.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/nrednav/entropy" def project do [ app: :entropy, version: @version, elixir: "~> 1.16", start_permanent: false, deps: deps(), aliases: aliases(), description: description(), package: package(), docs: docs(), dialyzer: [plt_add_apps: [:mix]], elixirc_paths: elixirc_paths(Mix.env()), test_coverage: test_coverage(), name: "Entropy", source_url: @source_url ] end def application do [ extra_applications: [:logger, :os_mon], mod: {Entropy.Application, []} ] end defp deps do [ {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false}, {:stream_data, "~> 1.0", only: :test}, {:telemetry, "~> 1.0"}, {:ex_doc, "~> 0.31", only: :dev, runtime: false} ] end defp aliases do [ setup: ["deps.get", "compile"], check: [ "format --check-formatted", "credo --strict", "compile --warnings-as-errors", "dialyzer", "deps.audit" ], "proof.targeted_precision": ["run priv/proofs/targeted_precision.exs"], "proof.global_stress": ["run priv/proofs/global_stress.exs"], proof: [ "cmd mix proof.targeted_precision", "cmd mix proof.global_stress" ] ] end defp description do "A precision fault-injection tool for Elixir/OTP designed to simulate Grey Failures (Process Suspension)." end defp package do [ files: [ "lib", "mix.exs", "README.md", "LICENSE", "CHANGELOG.md", "docs/GLOSSARY.md" ], maintainers: ["Vandern Rodrigues"], licenses: ["MIT"], links: %{ "GitHub" => @source_url, "Changelog" => @source_url <> "/blob/main/CHANGELOG.md" } ] end defp docs do [ main: "readme", extras: [ "README.md": [title: "Overview"], "docs/GLOSSARY.md": [title: "Glossary"] ], groups_for_modules: [ "Public API": [Entropy], Configuration: [Entropy.Config], "Core Mechanics": [ Entropy.Sanctuary.Injection, Entropy.Sanctuary.Selector, Entropy.Sanctuary.Zombie ], "Safety Systems": [ Entropy.State.CircuitBreaker, Entropy.State.ImmunityRegistry, Entropy.State.ZombieRegistry ], Internals: [ Entropy.Application, Entropy.Supervisor, Entropy.State.Scheduler, Entropy.Sanctuary.Census, Entropy.AxiomaticLogger ] ] ] end defp test_coverage do [ ignore_modules: [ Entropy.Test.Case, Entropy.Test.Wait, Entropy.Test.TelemetryForwarder ] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] end