Packages

Implementation of the FDSN availability webservice for Epos-France seismological datacenter

Current section

Files

Jump to
avy mix.exs
Raw

mix.exs

defmodule Avy.MixProject do
  use Mix.Project

  def project do
    [
      app: :avy,
      version: "1.1.36",
      elixir: "~> 1.18",
      elixirc_paths: elixirc_paths(Mix.env()),
      start_permanent: Mix.env() in [:prod, :staging],
      aliases: aliases(),
      deps: deps(),
      source_url: "https://gricad-gitlab.univ-grenoble-alpes.fr/OSUG/RESIF/avy",
      homepage_url: "https://gricad-gitlab.univ-grenoble-alpes.fr/OSUG/RESIF/avy",
      description:
        "Implementation of the FDSN availability webservice for Epos-France seismological datacenter",
      test_coverage: [tool: ExCoveralls],
      package: package(),
      dialyzer: [
        ignore_warnings: ".dialyzer_ignore.exs",
        plt_file: {:no_warn, "priv/plts/project.plt"}
      ],
      versioning: versioning()
    ]
  end

  defp package do
    [
      licenses: ["GPL-3.0-or-later"],
      links: %{
        "FDSN webservices" => "https://www.fdsn.org/webservices/",
        "Epos-France seismological data center" => "https://seisdata.epos-france.fr"
      }
    ]
  end

  def cli do
    [
      preferred_envs: [
        coveralls: :test,
        "coveralls.detail": :test,
        "coveralls.post": :test,
        "coveralls.html": :test,
        "coveralls.cobertura": :test
      ]
    ]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.

  def versioning do
    [
      annotate: true,
      annotation: "new version %s",
      commit_msg: "new version %s",
      tag_prefix: "v"
    ]
  end

  def application do
    [
      mod: {Avy.Application, []},
      extra_applications: [:logger, :runtime_tools]
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [
      {:phoenix, "~> 1.8.0"},
      {:dns_cluster, "~> 0.2.0"},
      {:bandit, "~> 1.5"},
      {:phoenix_ecto, "~> 4.5"},
      {:ecto_sql, "~> 3.10"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_live_dashboard, "~> 0.8.3"},
      {:swoosh, "~> 1.5"},
      {:finch, "~> 0.21"},
      {:telemetry_metrics, "~> 1.0"},
      {:telemetry_poller, "~> 1.0"},
      {:jason, "~> 1.2"},
      # Sentry deps
      {:sentry, "~> 13.0"},
      {:opentelemetry, "~> 1.7"},
      {:opentelemetry_api, "~> 1.5"},
      {:opentelemetry_exporter, "~> 1.10"},
      {:opentelemetry_semantic_conventions, "~> 1.27"},
      {:opentelemetry_phoenix, "~> 2.0"},
      {:opentelemetry_bandit, "~> 0.3"},
      {:opentelemetry_ecto, "~> 1.2"},
      ## End of Sentry deps
      {:hackney, "~> 4.7"},
      {:graceful_stop, "~> 0.2.2"},
      {:fdsn_plugs, "~> 1.0"},
      {:open_api_spex, "~> 3.21"},
      {:ex_machina, "~> 2.8.0", only: [:test]},
      {:junit_formatter, "~> 3.4", only: [:test]},
      {:excoveralls, "~> 0.18.1", only: [:test]},
      {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
      {:credo, "~> 1.7", only: [:dev, :test], runtime: false},
      {:mix_version, "~> 2.5", only: [:dev], runtime: false},
      {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
      #      {:flame_on, git: "https://github.com/DockYard/flame_on", branch: "main", only: [:dev]}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to install project dependencies and perform other setup tasks, run:
  #
  #     $ mix setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      setup: ["deps.get", "ecto.setup"],
      "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
    ]
  end
end