-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
242 lines (223 loc) · 7.21 KB
/
Copy pathmix.exs
File metadata and controls
242 lines (223 loc) · 7.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
defmodule DocShell.MixProject do
use Mix.Project
@version "0.3.0"
@source_url "https://github.com/futhr/doc_shell"
def project do
[
app: :doc_shell,
name: "DocShell",
version: @version,
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
description: description(),
package: package(),
source_url: @source_url,
homepage_url: @source_url,
docs: docs(),
test_coverage: test_coverage(),
dialyzer: dialyzer()
]
end
def application do
[extra_applications: [:crypto, :logger]]
end
def cli do
[
preferred_envs: [
check: :dev,
ci: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.json": :test,
"test.cover": :test,
"test.cover.html": :test,
"test.watch": :test
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp test_coverage do
[tool: ExCoveralls]
end
defp dialyzer do
[
# Test fixtures implement the optional AshOaskit adapter and are included
# in the test analysis even though those dependencies are runtime-false.
plt_add_apps: [
:ash,
:ash_oaskit,
:ex_unit,
:mix,
:open_api_spex,
:spark,
:splode
],
plt_local_path: "priv/plts",
plt_core_path: "priv/plts",
flags: [:error_handling, :unknown],
ignore_warnings: ".dialyzer_ignore.exs"
]
end
defp deps do
optional_integrations(Mix.env()) ++
[
{:jason, "~> 1.4"},
{:open_api_spex, "~> 3.22.4", only: :test, runtime: false},
{:earmark_parser, "~> 1.4"},
{:yaml_elixir, "~> 2.11"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:doctor, "~> 0.21", only: [:dev, :test], runtime: false},
{:doctest_formatter, "~> 0.4", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.16", only: :dev, runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:mix_test_watch, "~> 1.2", only: [:dev, :test], runtime: false},
{:stream_data, "~> 1.0", only: [:dev, :test]},
{:benchee, "~> 1.3", only: :dev, runtime: false},
{:benchee_markdown, "~> 0.3", only: :dev, runtime: false},
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
{:git_ops, "~> 2.6", only: :dev}
]
end
# Plug needs dependency ordering for conditional web compilation. AshOaskit
# is a development fixture: its adapter resolves the host's library at runtime.
# The isolated compile gate removes both integrations.
defp optional_integrations(:no_optional), do: []
defp optional_integrations(_) do
[
# Exercise both supported AshOaskit minor lines without imposing its
# dependency tree on consumers of the runtime adapter.
{:ash_oaskit, "~> 0.3 or ~> 0.4.1", only: [:dev, :test], runtime: false},
{:plug, "~> 1.16", optional: true}
]
end
defp aliases do
[
# Setup
setup: ["deps.get", "deps.compile", "compile"],
# Testing
"test.watch": ["test.watch --stale"],
"test.cover": ["coveralls"],
"test.cover.html": ["coveralls.html"],
# Quality
lint: ["format --check-formatted", "credo --strict", "dialyzer"],
ci: ["setup", "lint", "test.cover"],
# Benchmarks
bench: ["bench.all"],
"bench.all": ["bench.ast", "bench.presentation", "bench.json", "bench.serving"],
"bench.ast": ["run bench/ast.exs"],
"bench.presentation": ["run bench/presentation.exs"],
"bench.json": ["run bench/json.exs"],
"bench.serving": ["run bench/serving.exs"],
# Release
release: ["git_ops.release"]
]
end
defp description do
"Renderer-neutral documentation generation and serving for Elixir applications"
end
defp package do
[
files: ~w(
lib
notebooks
bench/output
.formatter.exs
mix.exs
README.md
CHANGELOG.md
LICENSE.md
CONTRIBUTING.md
usage-rules.md
),
maintainers: ["Tobias Bohwalli <hi@futhr.io>"],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Issues" => "#{@source_url}/issues",
"Changelog" => "#{@source_url}/blob/v#{@version}/CHANGELOG.md"
}
]
end
defp docs do
[
main: "readme",
extras: [
"README.md": [title: "Overview"],
"CHANGELOG.md": [title: "Changelog"],
"notebooks/build-pipeline.livemd": [title: "The Build Pipeline"],
"notebooks/openapi-adapters.livemd": [title: "OpenAPI Adapters"],
"notebooks/artifact-contract.livemd": [title: "Artifact Contract"],
"notebooks/serving-artifacts.livemd": [title: "Serving Artifacts"],
"bench/output/ast.md": [title: "Markdown Parsing"],
"bench/output/presentation.md": [title: "Presentation Projection"],
"bench/output/json.md": [title: "Term Coercion"],
"bench/output/artifact.md": [title: "Artifact Round Trip"],
"CONTRIBUTING.md": [title: "Contributing"],
"LICENSE.md": [title: "License"],
"usage-rules.md": [title: "Usage Rules (LLM)"]
],
groups_for_extras: [
Tutorials: ~r/notebooks\//,
Performance: ~r/bench\/output\//,
Reference: ~r/CHANGELOG|CONTRIBUTING|usage-rules|LICENSE/
],
groups_for_modules: [
Core: [
DocShell,
DocShell.Build,
DocShell.Config,
DocShell.Artifact,
DocShell.Artifact.Transaction
],
Extraction: [
DocShell.Ast,
DocShell.Generate.ExDoc,
DocShell.Generate.Guides,
DocShell.Generate.Livebooks,
DocShell.Generate.Collector
],
Changelog: [
DocShell.Generate.Changelog,
DocShell.Generate.Changelog.Source,
DocShell.Generate.Changelog.Sources.MarkdownFile
],
OpenAPI: [
DocShell.Generate.OpenApi,
DocShell.Generate.OpenApi.Adapter,
DocShell.Generate.OpenApi.Adapters.AshOaskit,
DocShell.Generate.OpenApi.Adapters.OpenApiSpex,
DocShell.Generate.OpenApi.Adapters.RawJson
],
Presentation: [
DocShell.Presentation.Source,
DocShell.Presentation.StaticGenerator,
DocShell.Presentation.GraphProjector,
DocShell.Presentation.NavigationItem,
DocShell.Presentation.SearchEntry,
DocShell.Presentation.Backlink
],
"Web Serving": [
DocShell.Web.Cache,
DocShell.Web.Plug,
DocShell.Web.Controller,
DocShell.Web.Response
],
Support: [
DocShell.Json
]
],
source_ref: "v#{@version}",
source_url: @source_url,
# ex_doc's defaults, named so a future edit has to be deliberate:
# dropping "markdown" also drops llms.txt and the per-module .md files
formatters: ["html", "markdown", "epub"]
]
end
end