defmodule ExOKF.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/thanos/ex_okf" def project do [ app: :ex_okf, version: @version, elixir: "~> 1.18", start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), description: description(), package: package(), docs: docs(), test_coverage: [tool: ExCoveralls, summary: [threshold: 95]], preferred_cli_env: [ coveralls: :test, "coveralls.detail": :test, "coveralls.html": :test, "coveralls.json": :test, "coveralls.xml": :test, "coveralls.cobertura": :test, "coveralls.lcov": :test, "coveralls.github": :test, "coveralls.post": :test, "test.cover": :test, "test.cover.html": :test, "test.cover.detail": :test, credo: :test, "credo.diff": :test, dialyzer: :dev ], dialyzer: [ plt_add_apps: [:mix], flags: [:error_handling, :underspecs] ], aliases: aliases() ] end def application do [ extra_applications: [:logger] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp deps do [ {:yaml_elixir, "~> 2.9"}, {:ymlr, "~> 5.0"}, {:ex_doc, "~> 0.38", only: :dev, runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:excoveralls, "~> 0.18", only: :test}, {:castore, "~> 1.0", only: :test}, {:stream_data, "~> 1.1", only: [:dev, :test]}, {:benchee, "~> 1.3", only: :dev} ] end defp description do """ Production-grade Elixir library for the Open Knowledge Format (OKF). Standards-compliant parsing, validation, lossless I/O, graph indexing, querying, and provenance-aware AI context assembly. """ end defp package do [ licenses: ["Apache-2.0"], maintainers: ["Thanos Vassilakis"], links: %{ "GitHub" => @source_url, "OKF Spec" => "https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md" }, files: ~w(lib mix.exs README.md LICENSE CHANGELOG.md priv) ] end defp docs do [ main: "ExOKF", source_url: @source_url, extras: ["README.md", "CHANGELOG.md"], groups_for_modules: [ "Core Types": [ ExOKF.Bundle, ExOKF.Concept, ExOKF.Link, ExOKF.Index, ExOKF.Log ], Parsing: [ExOKF.Parser, ExOKF.Writer], Validation: [ExOKF.Validator, ExOKF.Diagnostics, ExOKF.Diagnostic], Graph: [ ExOKF.Graph, ExOKF.Graph.Backend, ExOKF.Graph.Adjacency, ExOKF.Graph.GraphBLAS ], Query: [ExOKF.Query, ExOKF.Context] ] ] end defp aliases do [ "test.cover": ["coveralls"], "test.cover.html": ["coveralls.html"], "test.cover.detail": ["coveralls.detail"], lint: [ "format --check-formatted", "compile --warnings-as-errors", "credo --strict" ] ] end end