From e7a246d8a69742abdc9440cb9b042b4a48ec53eb Mon Sep 17 00:00:00 2001 From: jrhizor Date: Wed, 1 Mar 2023 16:29:54 -0800 Subject: [PATCH 1/7] initial commit, wip --- .github/workflows/python-tests.yaml | 2 +- .stoat/comment.hbs | 42 +++++++++++++++++++++++++++++ .stoat/config.yaml | 1 + 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .stoat/comment.hbs diff --git a/.github/workflows/python-tests.yaml b/.github/workflows/python-tests.yaml index f013214b47cf..5ff1f4f02b7d 100644 --- a/.github/workflows/python-tests.yaml +++ b/.github/workflows/python-tests.yaml @@ -64,7 +64,7 @@ jobs: lower-bound-requirements: true # Include Docker image builds on the service test run, and disallow the test - # suite from building images automaticlly in fixtures + # suite from building images automatically in fixtures - pytest-options: "--only-services" build-docker-images: true diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs new file mode 100644 index 000000000000..ceb0adddda8b --- /dev/null +++ b/.stoat/comment.hbs @@ -0,0 +1,42 @@ +### Pip Freeze Diffs + +[![pip freeze diff](https://shields.io/badge/pip%20freeze-diff-green&style=flat)](https://stoat.dev/diffs/github?ghOwner=stoat-dev&ghRepo=prefect&ghBranch={{ metadata.github.branch }}&ghPullRequest={{ metadata.github.pull_request }}&ghDefaultBranch=main&files=pip_freeze) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Postgres 13Postgres 14Sqlite 3
Python 3.7default • services
Python 3.8
Python 3.9
Python 3.10
Python 3.11
diff --git a/.stoat/config.yaml b/.stoat/config.yaml index 6d57473838b3..a8be2566d6e1 100644 --- a/.stoat/config.yaml +++ b/.stoat/config.yaml @@ -1,6 +1,7 @@ --- version: 1 enabled: true +comment_template_file: ".stoat/comment.hbs" plugins: job_runtime: enabled: true From 61084e982be735d5a1b48d2e9750ff227eac18ef Mon Sep 17 00:00:00 2001 From: jrhizor Date: Wed, 1 Mar 2023 16:31:58 -0800 Subject: [PATCH 2/7] rebuild From 13925c79144a563604bacd12a30250fb5407d44c Mon Sep 17 00:00:00 2001 From: jrhizor Date: Wed, 1 Mar 2023 16:52:52 -0800 Subject: [PATCH 3/7] render matrix with javascript --- .stoat/comment.hbs | 42 ------------------------------------------ .stoat/comment.js | 39 +++++++++++++++++++++++++++++++++++++++ .stoat/config.yaml | 2 +- 3 files changed, 40 insertions(+), 43 deletions(-) delete mode 100644 .stoat/comment.hbs create mode 100644 .stoat/comment.js diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs deleted file mode 100644 index ceb0adddda8b..000000000000 --- a/.stoat/comment.hbs +++ /dev/null @@ -1,42 +0,0 @@ -### Pip Freeze Diffs - -[![pip freeze diff](https://shields.io/badge/pip%20freeze-diff-green&style=flat)](https://stoat.dev/diffs/github?ghOwner=stoat-dev&ghRepo=prefect&ghBranch={{ metadata.github.branch }}&ghPullRequest={{ metadata.github.pull_request }}&ghDefaultBranch=main&files=pip_freeze) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Postgres 13Postgres 14Sqlite 3
Python 3.7default • services
Python 3.8
Python 3.9
Python 3.10
Python 3.11
diff --git a/.stoat/comment.js b/.stoat/comment.js new file mode 100644 index 000000000000..2fc658e6c404 --- /dev/null +++ b/.stoat/comment.js @@ -0,0 +1,39 @@ +let output = `### Pip Freeze Diffs + + + + + + + + +`; + +const pythonImage = (version) => `Python ${version}`; +const variants = plugins.static_hosting.pip_freeze.variants; + +["3.7", "3.8", "3.9", "3.10", "3.11"].forEach(pythonVersion => { + output += ``; + + ["postgres:13", "postgres:14", "sqlite"].forEach(database => { + const defaultKey = Object.keys(variants).find(key => + key.includes(`database: ${database}`) && + key.includes(`python-version: ${pythonVersion}`) && + key.includes(`--exclude-services`) + ); + const servicesKey = Object.keys(variants).find(key => + key.includes(`database: ${database}`) && + key.includes(`python-version: ${pythonVersion}`) && + !key.includes(`--exclude-services`) + ); + + const defaultValue = defaultKey ? `default` : "default"; + const servicesValue = servicesKey ? `default` : "services"; + + output += `` + }); + + output += ``; +}); + +output += '
Postgres 13Postgres 14Sqlite 3
${pythonImage(pythonVersion)}${defaultValue} • ${servicesValue}
'; diff --git a/.stoat/config.yaml b/.stoat/config.yaml index a8be2566d6e1..4190d83f33eb 100644 --- a/.stoat/config.yaml +++ b/.stoat/config.yaml @@ -1,7 +1,7 @@ --- version: 1 enabled: true -comment_template_file: ".stoat/comment.hbs" +comment_template_file: ".stoat/comment.js" plugins: job_runtime: enabled: true From 586b7d6ecd40108aa90319097d5663138057465d Mon Sep 17 00:00:00 2001 From: jrhizor Date: Wed, 1 Mar 2023 17:51:04 -0800 Subject: [PATCH 4/7] fix typo --- .stoat/comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stoat/comment.js b/.stoat/comment.js index 2fc658e6c404..058c09a8ad1f 100644 --- a/.stoat/comment.js +++ b/.stoat/comment.js @@ -28,7 +28,7 @@ const variants = plugins.static_hosting.pip_freeze.variants; ); const defaultValue = defaultKey ? `default` : "default"; - const servicesValue = servicesKey ? `default` : "services"; + const servicesValue = servicesKey ? `services` : "services"; output += `${defaultValue} • ${servicesValue}` }); From 9acc7c9d1879042a217066409159fa702a103960 Mon Sep 17 00:00:00 2001 From: jrhizor Date: Thu, 2 Mar 2023 00:23:05 -0800 Subject: [PATCH 5/7] hardcode as hbs until we upgrade js rendering --- .stoat/comment.hbs | 11 +++++++++++ .stoat/comment.js | 39 --------------------------------------- .stoat/config.yaml | 2 +- 3 files changed, 12 insertions(+), 40 deletions(-) create mode 100644 .stoat/comment.hbs delete mode 100644 .stoat/comment.js diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs new file mode 100644 index 000000000000..638557f6edd5 --- /dev/null +++ b/.stoat/comment.hbs @@ -0,0 +1,11 @@ +### Pip Freeze Diffs + + + + + + + + +
Postgres 13Postgres 14Sqlite 3
Python 3.7default • servicesdefault • servicesdefaultdefault
Python 3.8default • servicesdefault • servicesdefaultdefault
Python 3.9default • servicesdefault • servicesdefaultdefault
Python 3.10default • servicesdefault • servicesdefaultdefault
Python 3.11default • servicesdefault • servicesdefaultdefault
+ \ No newline at end of file diff --git a/.stoat/comment.js b/.stoat/comment.js deleted file mode 100644 index 058c09a8ad1f..000000000000 --- a/.stoat/comment.js +++ /dev/null @@ -1,39 +0,0 @@ -let output = `### Pip Freeze Diffs - - - - - - - - -`; - -const pythonImage = (version) => `Python ${version}`; -const variants = plugins.static_hosting.pip_freeze.variants; - -["3.7", "3.8", "3.9", "3.10", "3.11"].forEach(pythonVersion => { - output += ``; - - ["postgres:13", "postgres:14", "sqlite"].forEach(database => { - const defaultKey = Object.keys(variants).find(key => - key.includes(`database: ${database}`) && - key.includes(`python-version: ${pythonVersion}`) && - key.includes(`--exclude-services`) - ); - const servicesKey = Object.keys(variants).find(key => - key.includes(`database: ${database}`) && - key.includes(`python-version: ${pythonVersion}`) && - !key.includes(`--exclude-services`) - ); - - const defaultValue = defaultKey ? `default` : "default"; - const servicesValue = servicesKey ? `services` : "services"; - - output += `` - }); - - output += ``; -}); - -output += '
Postgres 13Postgres 14Sqlite 3
${pythonImage(pythonVersion)}${defaultValue} • ${servicesValue}
'; diff --git a/.stoat/config.yaml b/.stoat/config.yaml index 4190d83f33eb..a8be2566d6e1 100644 --- a/.stoat/config.yaml +++ b/.stoat/config.yaml @@ -1,7 +1,7 @@ --- version: 1 enabled: true -comment_template_file: ".stoat/comment.js" +comment_template_file: ".stoat/comment.hbs" plugins: job_runtime: enabled: true From 32d275cb9586310992646415b5fc50c3a5ca302f Mon Sep 17 00:00:00 2001 From: jrhizor Date: Thu, 2 Mar 2023 00:30:17 -0800 Subject: [PATCH 6/7] clean up link naming --- .stoat/comment.hbs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs index 638557f6edd5..47687c22875a 100644 --- a/.stoat/comment.hbs +++ b/.stoat/comment.hbs @@ -7,5 +7,4 @@ Postgres 14 Sqlite 3 - Python 3.7default • servicesdefault • servicesdefaultdefaultPython 3.8default • servicesdefault • servicesdefaultdefaultPython 3.9default • servicesdefault • servicesdefaultdefaultPython 3.10default • servicesdefault • servicesdefaultdefaultPython 3.11default • servicesdefault • servicesdefaultdefault - \ No newline at end of file + Python 3.7without serviceswithout serviceswithout serviceswith servicesPython 3.8without serviceswithout serviceswithout serviceswith servicesPython 3.9without serviceswithout serviceswithout serviceswith servicesPython 3.10without serviceswithout serviceswithout serviceswith servicesPython 3.11without serviceswithout serviceswithout serviceswith services From 38505c03e190a56f2c62daaf2c7422a68e99ae58 Mon Sep 17 00:00:00 2001 From: jrhizor Date: Thu, 2 Mar 2023 00:34:30 -0800 Subject: [PATCH 7/7] add names --- .stoat/comment.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stoat/comment.hbs b/.stoat/comment.hbs index 47687c22875a..33f773dc2233 100644 --- a/.stoat/comment.hbs +++ b/.stoat/comment.hbs @@ -3,8 +3,8 @@ - - - + + +
Postgres 13Postgres 14Sqlite 3Postgres 13Postgres 14Sqlite 3
Python 3.7without serviceswithout serviceswithout serviceswith services
Python 3.8without serviceswithout serviceswithout serviceswith services
Python 3.9without serviceswithout serviceswithout serviceswith services
Python 3.10without serviceswithout serviceswithout serviceswith services
Python 3.11without serviceswithout serviceswithout serviceswith services