Skip to content

Commit

Permalink
Implement Resource Tests (#41)
Browse files Browse the repository at this point in the history
* Refactor resources into `locale` directory
Add resource tests

* Enable resource test workflow

* Add back timezone.value files

* Fix typos in test specs

* lowercase regex entity in test spec with comment

* Testing skill resource test fix

* Troubleshooting resource test failures

* Update tests to default branch
  • Loading branch information
NeonDaniel authored Feb 24, 2023
1 parent effb046 commit 4ffaa1d
Show file tree
Hide file tree
Showing 371 changed files with 57 additions and 802 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/skill_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: neongeckocom/.github/.github/workflows/skill_tests.yml@master
skill_intent_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_intents.yml@master
# skill_resource_tests:
# uses: neongeckocom/.github/.github/workflows/skill_test_resources.yml@master
skill_resource_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_resources.yml@master
skill_install_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_installation.yml@master
4 changes: 2 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def is_leap_year(self, year: int) -> bool:
"""
return (year % 400 == 0) or ((year % 4 == 0) and (year % 100 != 0))

@intent_handler(IntentBuilder("QueryTime")
@intent_handler(IntentBuilder("QueryTimeIntent")
.require("Query").require("Time")
.optionally("Location"))
@intent_file_handler("what.time.is.it.intent")
Expand Down Expand Up @@ -293,7 +293,7 @@ def handle_query_time(self, message: Message):
else:
self.speak_dialog("time.current", {"time": current_time})

@intent_handler(IntentBuilder("QueryDate")
@intent_handler(IntentBuilder("QueryDateIntent")
.require("Query").require("Date")
.optionally("Location"))
def handle_query_date(self, message: Message):
Expand Down
1 change: 0 additions & 1 deletion dialog/ca-es/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/ca-es/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/ca-es/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/ca-es/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/ca-es/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/ca-es/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/ca-es/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/ca-es/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/da-dk/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/da-dk/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/da-dk/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/da-dk/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/da-dk/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/da-dk/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/da-dk/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/da-dk/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/de-de/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/de-de/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/de-de/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/de-de/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/de-de/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/de-de/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/de-de/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/de-de/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/en-us/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/en-us/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/en-us/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/en-us/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/en-us/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/en-us/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/en-us/next.leap.year.dialog

This file was deleted.

3 changes: 0 additions & 3 deletions dialog/en-us/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/es-es/did.you.mean.timezone.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/es-es/time.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/eu-eu/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/eu-eu/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/eu-eu/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/eu-eu/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/eu-eu/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/eu-eu/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/eu-eu/next.leap.year.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/eu-eu/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fa-ir/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fa-ir/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fa-ir/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/fa-ir/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/fa-ir/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fa-ir/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fa-ir/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/fa-ir/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fr-fr/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fr-fr/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fr-fr/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/fr-fr/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/fr-fr/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fr-fr/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/fr-fr/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/fr-fr/time.future.dialog

This file was deleted.

11 changes: 0 additions & 11 deletions dialog/fr-fr/timezone.value

This file was deleted.

1 change: 0 additions & 1 deletion dialog/gl-es/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/gl-es/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/gl-es/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/gl-es/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/gl-es/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/gl-es/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/gl-es/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/gl-es/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/it-it/did.you.mean.timezone.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/it-it/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pl-pl/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pl-pl/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pl-pl/date.not.found.dialog

This file was deleted.

3 changes: 0 additions & 3 deletions dialog/pl-pl/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/pl-pl/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pl-pl/did.you.mean.timezone.dialog

This file was deleted.

3 changes: 0 additions & 3 deletions dialog/pl-pl/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/pl-pl/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pt-br/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pt-br/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pt-br/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/pt-br/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/pt-br/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pt-br/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/pt-br/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/pt-br/time.future.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/sv-se/date.future.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/sv-se/date.last.weekend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/sv-se/date.not.found.dialog

This file was deleted.

4 changes: 0 additions & 4 deletions dialog/sv-se/date.relative.future.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/sv-se/date.relative.past.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/sv-se/did.you.mean.timezone.dialog

This file was deleted.

1 change: 0 additions & 1 deletion dialog/sv-se/next.leap.year.dialog

This file was deleted.

2 changes: 0 additions & 2 deletions dialog/sv-se/time.future.dialog

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Zona horària del Pacífic, US/Pacific-New
Hora oriental, US/Eastern
Zona horària de l'est, US/Eastern
Costa est, US/Eastern
Zona horària de la costa est, US/Eastern
Zona horària de la costa est, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Vestamerikanslk tid, US(Pacific-New
Østamerikansk tid, US/Eastern
Amerikansk østkøst tidszone, US/Eastern
Amerikansk østkyst, US/Eastern
Amerikansk æstkyst tid, US/Eastern
Amerikansk æstkyst tid, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Pacific time zone, US/Pacific-New
Eastern time, US/Eastern
Eastern time zone, US/Eastern
East coast, US/Eastern
East coast time zone, US/Eastern
East coast time zone, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Zona horaria del Pacífico, US/Pacific-New
Hora del este, US/Eastern
Zona horaria del este, US/Eastern
Costa este, US/Eastern
Zona horaria de la costa este, US/Eastern
Zona horaria de la costa este, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions dialog/fa-ir/timezone.value → locale/fa-ir/timezone.value
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# این یک لیست قابل ترجمه از مقادیر و مناطق زمانی است
این یک لیست قابل ترجمه از مقادیر و مناطق زمانی ا#
چین, Etc/GMT+8
شهر کانزاس، امریکا
به وقت مرکز امریکا
Expand All @@ -8,4 +8,4 @@
به وقت شرق امریکا
به وقت شرق امریکا
امریکای شرقی
به وقت امریکای شرقی
به وقت امریکای شرقی
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Fuso orario del Pacifico, Stati Uniti / Pacific-New
Ora orientale, Stati Uniti / Est
Fuso orario orientale, Stati Uniti / Est
Costa orientale, Stati Uniti / Est
Fuso orario della costa orientale, Stati Uniti / Est
Fuso orario della costa orientale, Stati Uniti / Est
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ fuso horario do Pacífico, US/Pacific-New
hora do Este, US/Eastern
fuso horario do Este, US/Eastern
costa Este, US/Eastern
fuso horario da costa Este, US/Eastern
fuso horario da costa Este, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions locale/it-it/timezone.value
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is a translatable list of values and timezones
Cina, Etc/GMT+8
Kansas City, US/Central
Fuso orario centrale, USA / Centrale
Ora centrale, USA / centrale
Ora del Pacifico, Stati Uniti / Pacific-New
Fuso orario del Pacifico, Stati Uniti / Pacific-New
Ora orientale, Stati Uniti / Est
Fuso orario orientale, Stati Uniti / Est
Costa orientale, Stati Uniti / Est
Fuso orario della costa orientale, Stati Uniti / Est
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Strefa czasu wschodniego, US/Eastern
Wschodnie wybrzerze, US/Eastern
Strefa czasu wschodniego wybrzeża, US/Eastern
Czas środkowoeuropejski zimowy, UTC/GMT+1
Czas środkowoeuropejski letni, UTC/GMT+2
Czas środkowoeuropejski letni, UTC/GMT+2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ zona de tempo do Pacífico, US/Pacific-New
hora do Leste, US/Eastern
zona de tempo do Leste, US/Eastern
costa Leste, US/Eastern
zona de tempo da costa Leste, US/Eastern
zona de tempo da costa Leste, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ västamerikansk tid, US/Pacific-New
Östra Amerikas tid, US/Eastern
Amerikanska östkuststidszon, US/Eastern
Amerikanska östkusten, US/Eastern
Amerikanska östkustens tid, US/Eastern
Amerikanska östkustens tid, US/Eastern
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/test_intents.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
en-us:
QueryTime:
QueryTimeIntent:
- what time is it:
- Query: what
- Time: time
- tell me the time in paris:
- Query: tell
- Time: time
- Location: paris
QueryDate:
QueryDateIntent:
- what is the day today:
- Query: what
- Date: day
Expand Down
Loading

0 comments on commit 4ffaa1d

Please sign in to comment.