Skip to content

Commit

Permalink
Fix to backticks (reported in #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cinderella-Man committed Jul 3, 2024
1 parent 5c9a14b commit 50e0dd8
Show file tree
Hide file tree
Showing 28 changed files with 54 additions and 54 deletions.
8 changes: 4 additions & 4 deletions 17-mox-rocks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ We are moving on to the configuration. As the `Naive.Leader` wasn't part of the

First, let's add the `:leader` key inside the `config :naive` in the default `/config/config.exs` configuration file:

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /config/config.exs
...
config :naive,
Expand All @@ -279,7 +279,7 @@ config :naive,

and then we need to apply the same update to the `/config/test.exs` configuration file(it will point to the module generated by the `mox` package - `Test.Naive.LeaderMock`):

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /config/test.exs
...
config :naive,
Expand Down Expand Up @@ -347,15 +347,15 @@ In the above code, we've told the `mox` package to define the `Test.PubSubMock`

The final step will be to append the `:core, :pubsub_client` configuration to the `/config/config.exs` file:

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /config/config.exs
config :core, # <= added
pubsub_client: Phoenix.PubSub # <= added
```

and the test `/config/test.exs` configuration file:

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /config/test.exs
config :core, # <= added
pubsub_client: Test.PubSubMock # <= added
Expand Down
2 changes: 1 addition & 1 deletion 21-layers-of-abstraction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ As the behaviour's interface(public functions) differs from the `Binance` module

As of now, we will deal only with the `Exchange.Order` structs instead a pair of `Binance.OrderResponse` and `Binance.Order`, we can simplify the existing two clauses of `broadcast_order/1` into a single one(and remove the `convert_to_order/1` function):

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /apps/naive/lib/naive/strategy.ex
defp broadcast_order(%Exchange.Order{} = order) do
@pubsub_client.broadcast(
Expand Down
2 changes: 1 addition & 1 deletion 23-back-to-the-monolith.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ config :hedgehog,

We need to add a couple of new dependencies that the streaming code is using:

```{r, engine = 'elixir', eval = FALSE}
```{r, engine = 'elixir', eval = FALSE}
# /mix.exs
defp deps do
[
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/abstract-duplicated-supervision-code.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/add-support-for-multiple-transactions-per-order.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
12 changes: 6 additions & 6 deletions docs/back-to-the-monolith.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down Expand Up @@ -803,11 +803,11 @@ <h3><span class="header-section-number">23.6.7</span> Config<a href="back-to-the
<h3><span class="header-section-number">23.6.8</span> Deps<a href="back-to-the-monolith.html#deps" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>We need to add a couple of new dependencies that the streaming code is using:</p>
<div class="sourceCode" id="cb568"><pre class="sourceCode elixir"><code class="sourceCode elixir"><span id="cb568-1"><a href="back-to-the-monolith.html#cb568-1" tabindex="-1"></a><span class="co"># /mix.exs</span></span>
<span id="cb568-2"><a href="back-to-the-monolith.html#cb568-2" tabindex="-1"></a> <span class="kw">defp</span> deps <span class="kw">do</span></span>
<span id="cb568-3"><a href="back-to-the-monolith.html#cb568-3" tabindex="-1"></a> <span class="ot">[</span></span>
<span id="cb568-4"><a href="back-to-the-monolith.html#cb568-4" tabindex="-1"></a> <span class="op">...</span></span>
<span id="cb568-5"><a href="back-to-the-monolith.html#cb568-5" tabindex="-1"></a> <span class="fu">{</span><span class="va">:ecto_enum</span>, <span class="st">&quot;~&gt; 1.4&quot;</span><span class="fu">}</span>,</span>
<span id="cb568-6"><a href="back-to-the-monolith.html#cb568-6" tabindex="-1"></a> <span class="fu">{</span><span class="va">:websockex</span>, <span class="st">&quot;~&gt; 0.4.2&quot;</span><span class="fu">}</span></span></code></pre></div>
<span id="cb568-2"><a href="back-to-the-monolith.html#cb568-2" tabindex="-1"></a> <span class="kw">defp</span> deps <span class="kw">do</span></span>
<span id="cb568-3"><a href="back-to-the-monolith.html#cb568-3" tabindex="-1"></a> <span class="ot">[</span></span>
<span id="cb568-4"><a href="back-to-the-monolith.html#cb568-4" tabindex="-1"></a> <span class="op">...</span></span>
<span id="cb568-5"><a href="back-to-the-monolith.html#cb568-5" tabindex="-1"></a> <span class="fu">{</span><span class="va">:ecto_enum</span>, <span class="st">&quot;~&gt; 1.4&quot;</span><span class="fu">}</span>,</span>
<span id="cb568-6"><a href="back-to-the-monolith.html#cb568-6" tabindex="-1"></a> <span class="fu">{</span><span class="va">:websockex</span>, <span class="st">&quot;~&gt; 0.4.2&quot;</span><span class="fu">}</span></span></code></pre></div>
<p>With the above changes, the reintegration of the <code>Streamer</code> app is finished. We need to remember about getting new deps, running migrations, seeding database and we can test that everything works up to this point:</p>
<pre><code>$ mix deps.get
...
Expand Down
2 changes: 1 addition & 1 deletion docs/backtest-trading-strategy.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/enable-parallel-trading-on-multiple-symbols.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/end-to-end-testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/fine-tune-trading-strategy-per-symbol.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/functional-elixir.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/idiomatic-otp.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/idiomatic-trading-strategy.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
2 changes: 1 addition & 1 deletion docs/introduce-pubsub-as-a-communication-method.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
18 changes: 9 additions & 9 deletions docs/layers-of-abstraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down Expand Up @@ -953,14 +953,14 @@ <h3><span class="header-section-number">21.3.4</span> Updating the <code>Naive.S
<span id="cb508-4"><a href="layers-of-abstraction.html#cb508-4" tabindex="-1"></a> <span class="fu">{</span><span class="va">:ok</span>, %<span class="cn">Exchange</span><span class="op">.</span><span class="cn">Order</span><span class="fu">{}</span> <span class="op">=</span> order<span class="fu">}</span> <span class="op">=</span></span>
<span id="cb508-5"><a href="layers-of-abstraction.html#cb508-5" tabindex="-1"></a> <span class="ot">@exchange_client</span><span class="op">.</span>order_limit_sell<span class="fu">(</span>symbol, quantity, sell_price<span class="fu">)</span></span></code></pre></div>
<p>As of now, we will deal only with the <code>Exchange.Order</code> structs instead a pair of <code>Binance.OrderResponse</code> and <code>Binance.Order</code>, we can simplify the existing two clauses of <code>broadcast_order/1</code> into a single one(and remove the <code>convert_to_order/1</code> function):</p>
<div class="sourceCode" id="cb509"><pre class="sourceCode elixir"><code class="sourceCode elixir"><span id="cb509-1"><a href="layers-of-abstraction.html#cb509-1" tabindex="-1"></a> <span class="co"># /apps/naive/lib/naive/strategy.ex</span></span>
<span id="cb509-2"><a href="layers-of-abstraction.html#cb509-2" tabindex="-1"></a> <span class="kw">defp</span> broadcast_order<span class="fu">(</span>%<span class="cn">Exchange</span><span class="op">.</span><span class="cn">Order</span><span class="fu">{}</span> <span class="op">=</span> order<span class="fu">)</span> <span class="kw">do</span></span>
<span id="cb509-3"><a href="layers-of-abstraction.html#cb509-3" tabindex="-1"></a> <span class="ot">@pubsub_client</span><span class="op">.</span>broadcast<span class="fu">(</span></span>
<span id="cb509-4"><a href="layers-of-abstraction.html#cb509-4" tabindex="-1"></a> <span class="cn">Core</span><span class="op">.</span><span class="cn">PubSub</span>,</span>
<span id="cb509-5"><a href="layers-of-abstraction.html#cb509-5" tabindex="-1"></a> <span class="st">&quot;ORDERS:</span><span class="ot">#{</span>order<span class="op">.</span>symbol<span class="ot">}</span><span class="st">&quot;</span>,</span>
<span id="cb509-6"><a href="layers-of-abstraction.html#cb509-6" tabindex="-1"></a> order</span>
<span id="cb509-7"><a href="layers-of-abstraction.html#cb509-7" tabindex="-1"></a> <span class="fu">)</span></span>
<span id="cb509-8"><a href="layers-of-abstraction.html#cb509-8" tabindex="-1"></a> <span class="kw">end</span></span></code></pre></div>
<div class="sourceCode" id="cb509"><pre class="sourceCode elixir"><code class="sourceCode elixir"><span id="cb509-1"><a href="layers-of-abstraction.html#cb509-1" tabindex="-1"></a> <span class="co"># /apps/naive/lib/naive/strategy.ex</span></span>
<span id="cb509-2"><a href="layers-of-abstraction.html#cb509-2" tabindex="-1"></a> <span class="kw">defp</span> broadcast_order<span class="fu">(</span>%<span class="cn">Exchange</span><span class="op">.</span><span class="cn">Order</span><span class="fu">{}</span> <span class="op">=</span> order<span class="fu">)</span> <span class="kw">do</span></span>
<span id="cb509-3"><a href="layers-of-abstraction.html#cb509-3" tabindex="-1"></a> <span class="ot">@pubsub_client</span><span class="op">.</span>broadcast<span class="fu">(</span></span>
<span id="cb509-4"><a href="layers-of-abstraction.html#cb509-4" tabindex="-1"></a> <span class="cn">Core</span><span class="op">.</span><span class="cn">PubSub</span>,</span>
<span id="cb509-5"><a href="layers-of-abstraction.html#cb509-5" tabindex="-1"></a> <span class="st">&quot;ORDERS:</span><span class="ot">#{</span>order<span class="op">.</span>symbol<span class="ot">}</span><span class="st">&quot;</span>,</span>
<span id="cb509-6"><a href="layers-of-abstraction.html#cb509-6" tabindex="-1"></a> order</span>
<span id="cb509-7"><a href="layers-of-abstraction.html#cb509-7" tabindex="-1"></a> <span class="fu">)</span></span>
<span id="cb509-8"><a href="layers-of-abstraction.html#cb509-8" tabindex="-1"></a> <span class="kw">end</span></span></code></pre></div>
<p>The final change to the <code>Naive.Strategy</code> module will be to update the <code>fetch_symbol_settings/1</code> function (and remove the <code>merge_filters_into_settings/3</code> function):</p>
<div class="sourceCode" id="cb510"><pre class="sourceCode elixir"><code class="sourceCode elixir"><span id="cb510-1"><a href="layers-of-abstraction.html#cb510-1" tabindex="-1"></a> <span class="co"># /apps/naive/lib/naive/strategy.ex</span></span>
<span id="cb510-2"><a href="layers-of-abstraction.html#cb510-2" tabindex="-1"></a> <span class="kw">def</span> fetch_symbol_settings<span class="fu">(</span>symbol<span class="fu">)</span> <span class="kw">do</span></span>
Expand Down
2 changes: 1 addition & 1 deletion docs/mock-the-binance-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down
Loading

0 comments on commit 50e0dd8

Please sign in to comment.