timgremore commited on
Commit
eb6a388
1 Parent(s): f4e5500

fix: Credo warnings

Browse files
lib/medical_transcription/transcription_supervisor.ex CHANGED
@@ -1,5 +1,8 @@
1
  defmodule Medicode.TranscriptionSupervisor do
2
- # Automatically defines child_spec/1
 
 
 
3
  use DynamicSupervisor
4
 
5
  def start_link(init_arg) do
 
1
  defmodule Medicode.TranscriptionSupervisor do
2
+ @moduledoc """
3
+ A supervisor for managing transcription processes.
4
+ """
5
+
6
  use DynamicSupervisor
7
 
8
  def start_link(init_arg) do
lib/medical_transcription/transcriptions.ex CHANGED
@@ -10,8 +10,8 @@ defmodule Medicode.Transcriptions do
10
  alias Medicode.Transcriptions.{
11
  Transcription,
12
  TranscriptionChunk,
13
- TranscriptionChunkKeyword,
14
- TranscriptionChunkCodeVector
15
  }
16
 
17
  @doc """
 
10
  alias Medicode.Transcriptions.{
11
  Transcription,
12
  TranscriptionChunk,
13
+ TranscriptionChunkCodeVector,
14
+ TranscriptionChunkKeyword
15
  }
16
 
17
  @doc """
test/medical_transcription/classification_server_test.exs CHANGED
@@ -5,12 +5,12 @@ defmodule Medicode.ClassificationServerTest do
5
 
6
  use Medicode.DataCase
7
 
8
- import Medicode.TranscriptionsFixtures
9
- import Medicode.TranscriptionChunksFixtures
10
  import Medicode.CodeVectorsFixtures
 
 
11
 
12
- alias Medicode.Transcriptions
13
  alias Medicode.ClassificationServer
 
14
 
15
  setup do
16
  transcription = transcription_fixture()
 
5
 
6
  use Medicode.DataCase
7
 
 
 
8
  import Medicode.CodeVectorsFixtures
9
+ import Medicode.TranscriptionChunksFixtures
10
+ import Medicode.TranscriptionsFixtures
11
 
 
12
  alias Medicode.ClassificationServer
13
+ alias Medicode.Transcriptions
14
 
15
  setup do
16
  transcription = transcription_fixture()
test/medical_transcription_web/live/home_live_test.exs CHANGED
@@ -1,12 +1,12 @@
1
  defmodule MedicodeWeb.HomeLiveTest do
2
  use MedicodeWeb.ConnCase, async: true
3
 
4
- import Phoenix.LiveViewTest
5
- import Medicode.AccountsFixtures
6
  import Ecto.Query
 
 
7
 
8
- alias Medicode.Transcriptions.Transcription
9
  alias Medicode.Repo
 
10
 
11
  setup %{conn: conn} do
12
  password = valid_user_password()
 
1
  defmodule MedicodeWeb.HomeLiveTest do
2
  use MedicodeWeb.ConnCase, async: true
3
 
 
 
4
  import Ecto.Query
5
+ import Medicode.AccountsFixtures
6
+ import Phoenix.LiveViewTest
7
 
 
8
  alias Medicode.Repo
9
+ alias Medicode.Transcriptions.Transcription
10
 
11
  setup %{conn: conn} do
12
  password = valid_user_password()
test/support/fixtures/code_feedbacks_fixtures.ex CHANGED
@@ -19,9 +19,10 @@ defmodule Medicode.CodeFeedbacksFixtures do
19
  end
20
 
21
  code_vector =
22
- cond do
23
- Map.has_key?(attrs, :code_vector) -> attrs.code_vector
24
- true -> code_vector_fixture()
 
25
  end
26
 
27
  # NOTE: The text and text_vector values are inaccurate. The text_vector
 
19
  end
20
 
21
  code_vector =
22
+ if Map.has_key?(attrs, :code_vector) do
23
+ attrs.code_vector
24
+ else
25
+ code_vector_fixture()
26
  end
27
 
28
  # NOTE: The text and text_vector values are inaccurate. The text_vector
test/support/fixtures/code_vectors_fixtures.ex CHANGED
@@ -7,7 +7,7 @@ defmodule Medicode.CodeVectorsFixtures do
7
  @doc """
8
  Insert code vectors from cached csv file.
9
  """
10
- def insert_code_vector_fixtures() do
11
  code_vectors =
12
  "../../../code_vectors.csv"
13
  |> Path.expand(__DIR__)
@@ -37,7 +37,7 @@ defmodule Medicode.CodeVectorsFixtures do
37
  )
38
  end
39
 
40
- def code_vector_fixture() do
41
  {:ok, code_vector} =
42
  %Medicode.Coding.CodeVector{
43
  code: "ABC",
 
7
  @doc """
8
  Insert code vectors from cached csv file.
9
  """
10
+ def insert_code_vector_fixtures do
11
  code_vectors =
12
  "../../../code_vectors.csv"
13
  |> Path.expand(__DIR__)
 
37
  )
38
  end
39
 
40
+ def code_vector_fixture do
41
  {:ok, code_vector} =
42
  %Medicode.Coding.CodeVector{
43
  code: "ABC",