Packages
chi2fit
2.0.0
3.1.0
3.0.1
3.0.0
2.1.7
2.1.6
2.1.5
retired
2.1.4
retired
2.1.3
retired
2.1.2
retired
2.1.1
retired
2.1.0
retired
2.0.2
2.0.1
2.0.0
1.3.0
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-beta.11
1.0.0-beta.10
1.0.0-beta.9
1.0.0-beta.8
1.0.0-beta.7
1.0.0-beta.6
1.0.0-beta.5
1.0.0-beta.4
1.0.0-beta.3
1.0.0-beta.2
1.0.0-beta.1
1.0.0-beta
1.0.0-alpha
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.11
0.8.10
0.8.9
0.8.8
0.8.7-alpha.2
0.8.7-alpha
0.8.6
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.3-1
0.7.2
0.7.1
0.7.0
0.6.7
0.6.6
0.6.5
0.6.3
0.6.0
0.5.2
0.5.1
0.5.0
0.4.0
0.3.1
0.3.0
0.2.0
Provides functions for fast matrix inversion, creation of empirical CDF from sample data including handling of asymmetric errors, and fitting to a funtion using chi-squared. The fitting procedure return the full covariance matrix describing the fitted parameters.
Current section
Files
Jump to
Current section
Files
mix.exs
defmodule Chi2fit.Mixfile do
# Copyright 2015-2019 Pieter Rijken
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
use Mix.Project
def project do
[
app: :chi2fit,
version: "2.0.0",
elixir: "~> 1.12",
start_permanent: Mix.env == :prod,
build_embedded: Mix.env == :prod,
deps: deps(),
escript: escript(),
aliases: aliases(),
preferred_cli_env: preferred_cli_env(),
compilers: Mix.compilers ++ if(Mix.env == :docs, do: [:md], else: []), # Add the make compiler
test_coverage: [tool: ExCoveralls],
## Hex stuff:
description: description(),
package: package(),
name: "Chi-SquaredFit",
source_url: "https://github.com/piisgaaf/chi2fit",
## Docs
docs: docs()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [ :logger ]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:exboost, "~> 0.2.6"},
{:graphvix,"~> 1.0"},
{:csv, "~> 2.3"},
{:timex, "~> 3.6"},
{:stream_data, "~> 0.4"},
{:gnuplot, "~> 1.19.104"},
{:poison, "~> 4.0", only: :test, override: true},
{:ielixir, github: "pprzetacznik/IElixir", only: :nb, runtime: false},
{:tzdata, "~> 0.1.8"},
{:excoveralls, "~> 0.11.0", only: :test},
{:ex_doc, "~> 0.19", only: :docs, runtime: false},
{:credo, "~> 1.5", only: :dev},
{:mix_test_watch, "~> 1.0", only: :test}
]
end
defp aliases do
[
test_notebook: "test --only notebooks",
test_perf: "test --only performance",
test_all: "test --include performance --include notebooks",
docs: ["docs", ©_images/1]
]
end
defp escript do
[
main_module: Chi2fit.Cli
]
end
# Hex Package Manager stuff:
defp description() do
"""
Provides functions for fast matrix inversion, creation of empirical CDF from sample data including
handling of asymmetric errors, and fitting to a funtion using chi-squared. The fitting procedure return
the full covariance matrix describing the fitted parameters.
"""
end
defp package() do
[
maintainers: [ "Pieter Rijken" ],
licenses: [ "Apache-2.0" ],
files: [ "lib", "mix.exs", "README*", "LICENSE*", "NOTICE", "config", "chi2fit" ],
links: %{
"GitHub" => "https://github.com/piisgaaf/chi2fit",
"Docker" => "https://hub.docker.com/r/pietertje/chi2fit",
"Binder" => "https://mybinder.org/v2/gh/piisgaaf/chi2fit/master?filepath=README.ipynb"
}
]
end
defp preferred_cli_env() do
[
test: :test,
test_all: :test,
test_perf: :test,
test_notebook: :test,
coveralls: :test,
docs: :docs,
"coveralls.html": :test,
"hex.publish": :docs,
]
end
defp docs() do
[
extras: [
"README.md",
"Forecasting-empirical-data.md",
"Forecasting-fit-to-known-distribution.md",
"Forecasting-bootstrapping.md",
"Forecasting-non-equilibrium.md",
"Example-multi-plot.md",
"Forecasting-cycle-times.md",
] |> Enum.map(& "#{Mix.Project.build_path()}/lib/chi2fit/docs/"<>&1)
]
end
defp copy_images(_args) do
"#{Mix.Project.build_path()}/lib/chi2fit/docs/*_files"
|> Path.wildcard()
|> Enum.each(& File.cp_r!(&1, "doc/#{Path.basename &1}"))
end
end
defmodule Mix.Tasks.Compile.Md do
use Mix.Task.Compiler
@shortdoc "Compiles with jupyter nbconvert to create markdown from a notebook"
def run(_) do
outdir = "#{Mix.Project.build_path()}/lib/chi2fit/docs"
docs = Chi2fit.Mixfile.project()[:docs][:extras]
{result, _error_code} = System.cmd("make", docs, stderr_to_stdout: true, env: [{"OUTDIR",outdir}])
Mix.shell.info result
end
end