Skip to content

Commit 1035d4b

Browse files
committed
test: change order of testsets
1 parent d16009b commit 1035d4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+482
-128
lines changed

docs/src/developer_guide/data_interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
```@docs
44
Impostor._load!
5-
Impostor._provider_loaded
6-
Impostor._content_loaded
7-
Impostor._locale_loaded
5+
Impostor.is_provider_loaded
6+
Impostor.is_content_loaded
7+
Impostor.is_locale_loaded
88
```

src/Impostor.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ using Chain
1414
export session_locale
1515
export setlocale!
1616
export resetlocale!
17-
export provider_exists
18-
export content_exists
19-
export locale_exists
17+
export is_provider_available
18+
export is_content_available
19+
export is_locale_available
2020
export render_template
2121
export render_alphanumeric
2222
export render_alphanumeric_range

src/core/data_interface.jl

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,34 @@ end
4747

4848

4949
"""
50-
provider_exists(p::AbstractString) :: Bool
50+
is_provider_available(p::AbstractString) :: Bool
5151
5252
Return whether the provided `p` is available.
5353
5454
# Parameters
5555
- `p::AbstractString`: provider name
5656
"""
57-
@inline function provider_exists(p::AbstractString) :: Bool
57+
@inline function is_provider_available(p::AbstractString) :: Bool
5858
return p in readdir(joinpath(ASSETS_ROOT))
5959
end
6060

6161

6262
"""
63-
content_exists(p::T, c::T) :: Bool where {T <: AbstractString}
63+
is_content_available(p::T, c::T) :: Bool where {T <: AbstractString}
6464
6565
Return whether the content `c` is available for provider `p`.
6666
6767
# Parameters
6868
- `p::AbstractString`: provider name
6969
- `c::AbstractString`: content name
7070
"""
71-
@inline function content_exists(p::T, c::T) :: Bool where {T <: AbstractString}
72-
return provider_exists(p) && c in readdir(joinpath(ASSETS_ROOT, p))
71+
@inline function is_content_available(p::T, c::T) :: Bool where {T <: AbstractString}
72+
return is_provider_available(p) && c in readdir(joinpath(ASSETS_ROOT, p))
7373
end
7474

7575

7676
"""
77-
locale_exists(p::T, c::T, l::T) :: Bool where {T <: AbstractString}
77+
is_locale_available(p::T, c::T, l::T) :: Bool where {T <: AbstractString}
7878
7979
Return whether the provided locale `l` is available for content `c` from provider `p`.
8080
@@ -83,46 +83,46 @@ Return whether the provided locale `l` is available for content `c` from provide
8383
- `c::AbstractString`: content name
8484
- `l::AbstractString`: locale name
8585
"""
86-
@inline function locale_exists(p::T, c::T, l::T) :: Bool where {T <: AbstractString}
86+
@inline function is_locale_available(p::T, c::T, l::T) :: Bool where {T <: AbstractString}
8787
return (
88-
content_exists(p, c)
88+
is_content_available(p, c)
8989
&& l * ".csv" in readdir(joinpath(ASSETS_ROOT, p, c))
9090
)
9191
end
9292

9393

9494

9595
"""
96-
_provider_loaded(d::DataContainer, provider::AbstractString) :: Bool
96+
is_provider_loaded(d::DataContainer, provider::AbstractString) :: Bool
9797
9898
Return whether the DataContainer `d` has already loaded the information associated to the content `c`.
9999
"""
100-
@inline function _provider_loaded(d::DataContainer, provider::AbstractString) :: Bool
100+
@inline function is_provider_loaded(d::DataContainer, provider::AbstractString) :: Bool
101101
return haskey(d.data, provider)
102102
end
103103

104104

105105

106106
"""
107-
_content_loaded(d::DataContainer, provider::T, content::T) :: Bool
107+
is_content_loaded(d::DataContainer, provider::T, content::T) :: Bool
108108
109109
Return whether the DataContainer `d` has already loaded the information associated to the content `c`
110110
from provider `p`.
111111
"""
112-
@inline function _content_loaded(d::DataContainer, provider::T, content::T) :: Bool where {T <: AbstractString}
113-
return _provider_loaded(d, provider) && haskey(d.data[provider], content)
112+
@inline function is_content_loaded(d::DataContainer, provider::T, content::T) :: Bool where {T <: AbstractString}
113+
return is_provider_loaded(d, provider) && haskey(d.data[provider], content)
114114
end
115115

116116

117117

118118
"""
119-
_locale_loaded(d::DataContainer, provider::T, content::T, locale::T) :: Bool
119+
is_locale_loaded(d::DataContainer, provider::T, content::T, locale::T) :: Bool
120120
121121
Return whether the DataContainer `d` has already loaded the information associated to the content `c`
122122
from provider `p` related to locale `l`.
123123
"""
124-
@inline function _locale_loaded(d::DataContainer, provider::T, content::T, locale::T) :: Bool where {T <: AbstractString}
125-
return _content_loaded(d, provider, content) && haskey(d.data[provider][content], locale)
124+
@inline function is_locale_loaded(d::DataContainer, provider::T, content::T, locale::T) :: Bool where {T <: AbstractString}
125+
return is_content_loaded(d, provider, content) && haskey(d.data[provider][content], locale)
126126
end
127127

128128

@@ -150,29 +150,30 @@ end
150150

151151
function _load!(provider::T, content::T, locale::T = "noloc") :: DataFrame where {T <: AbstractString}
152152

153-
@assert(provider_exists(provider),
153+
@assert(is_provider_available(provider),
154154
"Provider '$provider' is not available.")
155155

156-
@assert(content_exists(provider, content),
156+
@assert(is_content_available(provider, content),
157157
"Content '$content' not available for provider '$provider'")
158158

159-
@assert(locale_exists(provider, content, locale),
159+
@assert(is_locale_available(provider, content, locale),
160160
"Locale '$locale' not available for content '$content' of provider '$provider'")
161161

162-
if !_provider_loaded(SESSION_CONTAINER, provider)
162+
if !is_provider_loaded(SESSION_CONTAINER, provider)
163163
merge!(SESSION_CONTAINER.data, Dict(provider => Dict()))
164164
end
165165

166-
if !_content_loaded(SESSION_CONTAINER, provider, content)
166+
if !is_content_loaded(SESSION_CONTAINER, provider, content)
167167
merge!(SESSION_CONTAINER.data[provider], Dict(content => Dict()))
168168
end
169169

170-
if !_locale_loaded(SESSION_CONTAINER, provider, content, locale)
171-
data_path = joinpath(ASSETS_ROOT, provider, content, locale * ".csv")
172-
header = joinpath(ASSETS_ROOT, provider, content, "HEADER.txt") |> readlines
170+
if !is_locale_loaded(SESSION_CONTAINER, provider, content, locale)
171+
data_archive_location = joinpath(ASSETS_ROOT, provider, content)
172+
file = joinpath(data_archive_location, locale * ".csv")
173+
header = joinpath(data_archive_location, "HEADER.txt") |> readlines
173174
merge!(
174175
SESSION_CONTAINER.data[provider][content],
175-
Dict(locale => CSV.read(data_path, DataFrame; header, delim = ','))
176+
Dict(locale => CSV.read(file, DataFrame; header, delim = ','))
176177
)
177178
end
178179

src/data/identity/prefix/ar_AA.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
F,الآنسة
2+
M,الأستاذ
3+
F,الأستاذة
4+
M,الدكتور
5+
F,الدكتورة
6+
M,السيد
7+
F,السيدة
8+
M,المهندس
9+
F,المهندسة

src/data/identity/prefix/ar_AE.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/ar_BH.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/ar_EG.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/ar_JO.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/ar_PS.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
F,الآنسة
2+
M,الأستاذ
3+
F,الأستاذة
4+
M,الدكتور
5+
F,الدكتورة
6+
M,السيد
7+
F,السيدة
8+
M,المهندس
9+
F,المهندسة

src/data/identity/prefix/ar_SA.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
F,الآنسة
2+
M,الأستاذ
3+
F,الأستاذة
4+
M,الدكتور
5+
F,الدكتورة
6+
M,السيد
7+
F,السيدة
8+
M,المهندس
9+
F,المهندسة

src/data/identity/prefix/az_AZ.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
M,Bəy
2+
M,Cənab
3+
M,Müəllim
4+
F,Xanım

src/data/identity/prefix/bg_BG.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
F,Г-жа
2+
M,Г-н
3+
F,Г-ца
4+
M,Др.

src/data/identity/prefix/bn_BD.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
M,ইঞ্জিঃ
2+
M,জনাব
3+
F,জনাবা
4+
M,ডঃ
5+
M,ডাঃ
6+
M,মিঃ
7+
F,মিসঃ
8+
F,মিসেস
9+
M,মৃতঃ
10+
F,মৃতাঃ

src/data/identity/prefix/bs_BA.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/cs_CZ.csv

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
M,Bc.
2+
M,Ing.
3+
M,Ing. arch.
4+
M,JUDr.
5+
M,MUDr.
6+
M,MVDr.
7+
M,Mgr.
8+
M,PhDr.
9+
M,RNDr.
10+
M,pan
11+
F,paní
12+
F,slečna

src/data/identity/prefix/da_DK.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Fru
3+
M,Hr
4+
M,Prof.
5+
M,Univ.Prof.

src/data/identity/prefix/de_AT.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
M,Dipl.-Ing.
2+
M,Dr.
3+
F,Frau
4+
M,Herr
5+
M,Ing.
6+
M,Prof.
7+
M,Univ.Prof.

src/data/identity/prefix/de_CH.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
M,Dr.
2+
M,Prof.
3+
F,Dr.
4+
F,Prof.

src/data/identity/prefix/de_DE.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
M,Dipl.-Ing.
2+
M,Dr.
3+
F,Frau
4+
M,Herr
5+
M,Ing.
6+
M,Prof.
7+
M,Univ.Prof.

src/data/identity/prefix/dk_DK.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/el_CY.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/en_AU.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/en_CA.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/en_GB.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr
2+
F,Miss
3+
M,Mr
4+
F,Mrs
5+
F,Ms

src/data/identity/prefix/en_IE.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/en_PH.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/en_US.csv

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
M,Mr.
21
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
35
F,Ms.

src/data/identity/prefix/es_AR.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
M,Dr(a).
2+
M,Sr(a).

src/data/identity/prefix/es_CA.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
M,de
2+
M,del

src/data/identity/prefix/es_CL.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
M,Don
2+
F,Doña
3+
M,Dr.
4+
F,Dra.
5+
M,Sr.
6+
F,Sra.
7+
F,Srta.

src/data/identity/prefix/es_CO.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
M,D.
2+
M,Don
3+
F,Doña
4+
M,Dr.
5+
F,Dra.
6+
F,Dña.
7+
M,Sr.
8+
F,Sra.
9+
F,Srta.

src/data/identity/prefix/es_ES.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
M,de
2+
M,del

src/data/identity/prefix/es_MX.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
M,Ing.
3+
M,Lic.
4+
M,Mtro.
5+
M,Sr(a).

src/data/identity/prefix/et_EE.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
M,doktor
2+
M,dr
3+
M,hr
4+
M,härra
5+
F,pr
6+
M,prof
7+
F,proua

src/data/identity/prefix/fa_IR.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
M,جناب آقای
2+
M,جناب آقای دکتر
3+
F,سرکار خانم
4+
F,سرکار خانم دکتر

src/data/identity/prefix/fi_FI.csv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
M,Herra
2+
M,Rouva
3+
M,Tohtori
4+
M,arkkit.
5+
M,hra
6+
M,prof.
7+
M,rva
8+
M,tri

src/data/identity/prefix/fil_PH.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
M,Dr.
2+
F,Miss
3+
M,Mr.
4+
F,Mrs.
5+
F,Ms.

src/data/identity/prefix/fr_BE.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
M,

src/data/identity/prefix/fr_FR.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
M,Le
2+
M,de
3+
F,de la
4+
M,du

0 commit comments

Comments
 (0)