From f71669e54af9b86a69875ec6c58bc779539d504d Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 17:15:59 +0100 Subject: [PATCH 1/7] Update workflow triggers to only run on specific file changes --- .github/workflows/check_project_metadata.yaml | 7 ++++--- .github/workflows/check_query_forms.yaml | 7 ++++--- .github/workflows/check_query_identifiers.yaml | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check_project_metadata.yaml b/.github/workflows/check_project_metadata.yaml index a36cc509e..f6ee5f4b0 100644 --- a/.github/workflows/check_project_metadata.yaml +++ b/.github/workflows/check_project_metadata.yaml @@ -1,10 +1,11 @@ name: Check Project Metadata on: push: - branches: [main] + paths: + - 'src/scribe_data/resources/**/*.json' # Trigger when any .json file in the resources folder is modified pull_request: - branches: [main] - types: [opened, reopened, synchronize] + paths: + - 'src/scribe_data/resources/**/*.json' # Trigger on pull requests that modify .json files in the resources folder jobs: structure-check: diff --git a/.github/workflows/check_query_forms.yaml b/.github/workflows/check_query_forms.yaml index 6c99caa18..053a86776 100644 --- a/.github/workflows/check_query_forms.yaml +++ b/.github/workflows/check_query_forms.yaml @@ -1,10 +1,11 @@ name: Check Query Forms on: push: - branches: [main] + paths: + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger only when .sparql files in subdirectories are changed pull_request: - branches: [main] - types: [opened, reopened, synchronize] + paths: + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger on pull request changes to .sparql files jobs: format_check: diff --git a/.github/workflows/check_query_identifiers.yaml b/.github/workflows/check_query_identifiers.yaml index ef3e7bd48..18d691655 100644 --- a/.github/workflows/check_query_identifiers.yaml +++ b/.github/workflows/check_query_identifiers.yaml @@ -1,10 +1,11 @@ name: Check Query Identifiers on: push: - branches: [main] + paths: + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger only when .sparql files in subdirectories are changed pull_request: - branches: [main] - types: [opened, reopened, synchronize] + paths: + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger on PR for .sparql file changes jobs: format_check: From f3216aa881588e4b602d537e82a47002245b899f Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 17:17:13 +0100 Subject: [PATCH 2/7] make a change on a sparql file --- .../language_data_extraction/yoruba/nouns/query_nouns.sparql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql index d3d869224..99e98d205 100644 --- a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql +++ b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql @@ -1,6 +1,6 @@ # tool: scribe-data # All Yoruba (Q34311) nouns (Q1084) and the given forms. -# Enter this query at https://query.wikidata.org/. +# Enter this query at https://query.wikidata.org/ SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) From 545cba580609402761842636e3a11ee66f3bdb7d Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 18:17:38 +0100 Subject: [PATCH 3/7] update workflows to also watch new targets --- .github/workflows/check_project_metadata.yaml | 10 ++++++++-- .github/workflows/check_query_forms.yaml | 8 ++++++-- .github/workflows/check_query_identifiers.yaml | 8 ++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_project_metadata.yaml b/.github/workflows/check_project_metadata.yaml index f6ee5f4b0..d52d2b7f5 100644 --- a/.github/workflows/check_project_metadata.yaml +++ b/.github/workflows/check_project_metadata.yaml @@ -1,11 +1,15 @@ name: Check Project Metadata + on: push: + branches: [main] paths: - - 'src/scribe_data/resources/**/*.json' # Trigger when any .json file in the resources folder is modified + - 'src/scribe_data/resources/**/*.json' pull_request: + branches: [main] + types: [opened, reopened, synchronize] paths: - - 'src/scribe_data/resources/**/*.json' # Trigger on pull requests that modify .json files in the resources folder + - 'src/scribe_data/resources/**/*.json' jobs: structure-check: @@ -19,6 +23,8 @@ jobs: runs-on: ${{ matrix.os }} + name: Run Check Project Metadata + steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/check_query_forms.yaml b/.github/workflows/check_query_forms.yaml index 053a86776..d9530277e 100644 --- a/.github/workflows/check_query_forms.yaml +++ b/.github/workflows/check_query_forms.yaml @@ -1,11 +1,15 @@ name: Check Query Forms + on: push: + branches: [main] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger only when .sparql files in subdirectories are changed + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' pull_request: + branches: [main] + types: [opened, reopened, synchronize] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger on pull request changes to .sparql files + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' jobs: format_check: diff --git a/.github/workflows/check_query_identifiers.yaml b/.github/workflows/check_query_identifiers.yaml index 18d691655..9c6ca770b 100644 --- a/.github/workflows/check_query_identifiers.yaml +++ b/.github/workflows/check_query_identifiers.yaml @@ -1,11 +1,15 @@ name: Check Query Identifiers + on: push: + branches: [main] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger only when .sparql files in subdirectories are changed + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' pull_request: + branches: [main] + types: [opened, reopened, synchronize] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' # Trigger on PR for .sparql file changes + - 'src/scribe_data/language_data_extraction/**/**/*.sparql' jobs: format_check: From abda00cf6ab16b5eb3752096d189b5f27a71f8ee Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 18:49:50 +0100 Subject: [PATCH 4/7] update query nouns for test --- .../language_data_extraction/yoruba/nouns/query_nouns.sparql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql index 99e98d205..d3d869224 100644 --- a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql +++ b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql @@ -1,6 +1,6 @@ # tool: scribe-data # All Yoruba (Q34311) nouns (Q1084) and the given forms. -# Enter this query at https://query.wikidata.org/ +# Enter this query at https://query.wikidata.org/. SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) From 72b736584ff0313d010bdcbf323b233e0eb95f16 Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 18:56:09 +0100 Subject: [PATCH 5/7] update file path --- .github/workflows/check_query_forms.yaml | 4 ++-- .github/workflows/check_query_identifiers.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_query_forms.yaml b/.github/workflows/check_query_forms.yaml index d9530277e..2c7227d6d 100644 --- a/.github/workflows/check_query_forms.yaml +++ b/.github/workflows/check_query_forms.yaml @@ -4,12 +4,12 @@ on: push: branches: [main] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' + - 'src/scribe_data/wikidata/language_data_extraction/**/*.sparql' pull_request: branches: [main] types: [opened, reopened, synchronize] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' + - 'src/scribe_data/wikidata/language_data_extraction/**/*.sparqll' jobs: format_check: diff --git a/.github/workflows/check_query_identifiers.yaml b/.github/workflows/check_query_identifiers.yaml index 9c6ca770b..93b4223dc 100644 --- a/.github/workflows/check_query_identifiers.yaml +++ b/.github/workflows/check_query_identifiers.yaml @@ -4,12 +4,12 @@ on: push: branches: [main] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' + - 'src/scribe_data/wikidata/language_data_extraction/**/*.sparql' pull_request: branches: [main] types: [opened, reopened, synchronize] paths: - - 'src/scribe_data/language_data_extraction/**/**/*.sparql' + - 'src/scribe_data/wikidata/language_data_extraction/**/*.sparql' jobs: format_check: From 77b8a0e479df79e41f27d8710cdfeca2ff3a23c4 Mon Sep 17 00:00:00 2001 From: Akindele Michael Date: Sun, 17 Nov 2024 18:59:18 +0100 Subject: [PATCH 6/7] test file edit --- .../language_data_extraction/yoruba/nouns/query_nouns.sparql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql index d3d869224..99e98d205 100644 --- a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql +++ b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql @@ -1,6 +1,6 @@ # tool: scribe-data # All Yoruba (Q34311) nouns (Q1084) and the given forms. -# Enter this query at https://query.wikidata.org/. +# Enter this query at https://query.wikidata.org/ SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) From cc2e614eef9e09287e74a6cd5cae47af6cf3deaf Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Sun, 17 Nov 2024 21:25:07 +0100 Subject: [PATCH 7/7] Revert removal of period to test the workflows --- .../language_data_extraction/yoruba/nouns/query_nouns.sparql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql index 99e98d205..d3d869224 100644 --- a/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql +++ b/src/scribe_data/wikidata/language_data_extraction/yoruba/nouns/query_nouns.sparql @@ -1,6 +1,6 @@ # tool: scribe-data # All Yoruba (Q34311) nouns (Q1084) and the given forms. -# Enter this query at https://query.wikidata.org/ +# Enter this query at https://query.wikidata.org/. SELECT (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID)