Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple small quality of life fixes #630

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fershad
Copy link
Contributor

@fershad fershad commented Dec 24, 2024

This PR:

  • Adds a max-length of 1000 characters to the Provider Description textarea field in the verification request form.
  • Adds an overflow property to long file names in file input fields.
  • Restricts the types of files a user can submit in a file input to only images & PDFs.
  • Update terminology across the repository.
  • Update wording on initial verification page for consistency.

@fershad fershad linked an issue Dec 24, 2024 that may be closed by this pull request
@fershad fershad requested a review from mrchrisadams December 24, 2024 09:43
Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 30.9043 407.395 4.07 100
checkout 18.05 3.88538 1.94 2
pip install uv wheel 18.15 3.88702 1.94 2
pip install requirements 70.68 33.0368 5.51 6
pytest 28.3955 366.586 4.17 88

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.42.50.226
CO₂ from energy is: 0.176809430 g
CO₂ from manufacturing (embodied carbon) is: 0.028531381 g
Carbon Intensity for this location: 434 gCO₂eq/kWh
SCI: 0.205341 gCO₂eq / pipeline run emitted

Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.6901 416.901 4.09 102
checkout 12.3 3.71001 3.71 1
pip install uv wheel 12.44 3.71615 3.72 1
pip install requirements 66.052 31.8459 6.37 5
pytest 27.9942 377.628 4.15 91

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.42.51.101
CO₂ from energy is: 0.180935034 g
CO₂ from manufacturing (embodied carbon) is: 0.029102008 g
Carbon Intensity for this location: 434 gCO₂eq/kWh
SCI: 0.210037 gCO₂eq / pipeline run emitted

@fershad
Copy link
Contributor Author

fershad commented Dec 24, 2024

@mrchrisadams This felt like a pretty straightforward change to make, because there's a similar max_length setting applied to the organisation name field in the form (on the same page as the description).

However, when testing with a reeeaaaaallllly long organisation name, I found that the form will just truncate the name to 255 characters without giving any warning. I'm okay with that functionality, but want to make a note that is what will happen with very long descriptions too.

Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.4948 404.493 4.00 101
checkout 16.58 3.8466 1.92 2
pip install uv wheel 16.64 3.84632 3.85 1
pip install requirements 66.948 31.7761 6.36 5
pytest 27.7911 365.024 4.10 89

🌳 CO2 Data:
City: San Jose, Lat: 37.1835, Lon: -121.7714
IP: 52.155.62.244
CO₂ from energy is: 0.127010802 g
CO₂ from manufacturing (embodied carbon) is: 0.028816695 g
Carbon Intensity for this location: 314 gCO₂eq/kWh
SCI: 0.155827 gCO₂eq / pipeline run emitted

Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.3131 429.22 4.01 107
checkout 9.73 3.6187 1.81 2
pip install uv wheel 9.85 3.62326 1.81 2
pip install requirements 66.16 31.8941 6.38 5
pytest 27.7871 390.084 4.11 95

🌳 CO2 Data:
City: Phoenix, Lat: 33.4475, Lon: -112.0866
IP: 20.169.14.19
CO₂ from energy is: 0.099149820 g
CO₂ from manufacturing (embodied carbon) is: 0.030528577 g
Carbon Intensity for this location: 231 gCO₂eq/kWh
SCI: 0.129678 gCO₂eq / pipeline run emitted

@fershad fershad changed the title Set 1000 char limit for provider description Multiple small quality of life fixes Dec 24, 2024
Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.8021 415.329 4.07 102
checkout 15.57 3.81855 1.91 2
pip install uv wheel 15.63 3.81936 1.91 2
pip install requirements 67.518 31.9917 5.33 6
pytest 27.4932 375.7 4.08 92

🌳 CO2 Data:
City: Boydton, Lat: 36.6676, Lon: -78.3875
IP: 20.161.77.224
CO₂ from energy is: 0.179422128 g
CO₂ from manufacturing (embodied carbon) is: 0.029102008 g
Carbon Intensity for this location: 432 gCO₂eq/kWh
SCI: 0.208524 gCO₂eq / pipeline run emitted

Copy link

github-actions bot commented Dec 24, 2024

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 30.76 455.696 4.14 110
checkout 25.13 4.07602 4.08 1
pip install uv wheel 31.7133 26.0006 4.33 6
pip install requirements 55.0822 50.7944 5.08 10
pytest 28.2994 374.825 4.16 90

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.42.17.118
CO₂ from energy is: 0.196860672 g
CO₂ from manufacturing (embodied carbon) is: 0.031384519 g
Carbon Intensity for this location: 432 gCO₂eq/kWh
SCI: 0.228245 gCO₂eq / pipeline run emitted

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.398 424.801 4.12 103
checkout 12.18 3.70541 3.71 1
pip install uv wheel 23.315 8.11268 4.06 2
pip install requirements 66.194 31.8906 5.32 6
pytest 27.6991 381.093 4.10 93

🌳 CO2 Data:
City: Boydton, Lat: 36.6676, Lon: -78.3875
IP: 20.57.46.32
CO₂ from energy is: 0.183514032 g
CO₂ from manufacturing (embodied carbon) is: 0.029387322 g
Carbon Intensity for this location: 432 gCO₂eq/kWh
SCI: 0.212901 gCO₂eq / pipeline run emitted

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 29.3348 406.863 4.07 100
checkout 12.88 3.73194 3.73 1
pip install uv wheel 12.96 3.73098 1.87 2
pip install requirements 65.112 31.4239 5.24 6
pytest 27.6924 367.976 4.13 89

🌳 CO2 Data:
City: San Jose, Lat: 37.1835, Lon: -121.7714
IP: 52.234.38.196
CO₂ from energy is: 0.123279489 g
CO₂ from manufacturing (embodied carbon) is: 0.028531381 g
Carbon Intensity for this location: 303 gCO₂eq/kWh
SCI: 0.151811 gCO₂eq / pipeline run emitted

@fershad
Copy link
Contributor Author

fershad commented Dec 24, 2024

@mrchrisadams This felt like a pretty straightforward change to make, because there's a similar max_length setting applied to the organisation name field in the form (on the same page as the description).

However, when testing with a reeeaaaaallllly long organisation name, I found that the form will just truncate the name to 255 characters without giving any warning. I'm okay with that functionality, but want to make a note that is what will happen with very long descriptions too.

Thinking out loud, this could also be done through a bit of JavaScript like the other change in this PR.

@@ -1,4 +1,4 @@
Dear member of The Green Web Foundation,
Dear member of Green Web Foundation,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind using the lower case the here instead removing it @fershad ? I think it reads funny, as there's only one Green Web Foundation. I've expanded on this here, and referenced it in the controlled vocabulary:

https://docs.google.com/document/d/1ag3WJ01saMP0NO1-WHD0xq0DpC9koTzVnH3I8OUUWU8/edit?tab=t.0#heading=h.ctxl9icrf6iv

@@ -18,7 +18,7 @@

schema_view = get_schema_view(
openapi.Info(
title="Welcome to The Green Web Foundation Partner API ",
title="Welcome to Green Web Foundation Partner API ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here as above. Can we please keep the lower case 'the' here, like we do in other places where we refer to the Green Web Foundation in the middle of a sentence?

@@ -1,16 +1,19 @@
# Installation

This installation shows you how to setup the Admin Portal of The Green Web Foundation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

@@ -1,6 +1,6 @@
# Key concepts

The Green Web Foundation offers an API to provide any IP address or domain, and get back a 'green' result indicating that the site or digital service appears to be running on digital powered by green energy, and we have found evidence to support this claim or a 'grey' result where no evidence was found for green energy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to have the 'The' here to be honest, as we're talking about the foundation offering an API, and it's sentence in a paragraph, rather than a the name of the organistion all by itself. Personally, I think it reads a bit funny when we remove the article. This is consistence with the usage I've outlined in the article, where the Mozilla Foundation, another foundation is totally with beginning sentences with 'The' if it makes them read better. I've linked directly to the example below:

https://docs.google.com/document/d/1ag3WJ01saMP0NO1-WHD0xq0DpC9koTzVnH3I8OUUWU8/edit?tab=t.0#heading=h.t4lcbe6foxja

Copy link
Member

@mrchrisadams mrchrisadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fershad - I've added a few comments but otherwise this look good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Limit provide description field max length
2 participants