Skip to content

Commit

Permalink
use last pushed year only + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3Rabbit committed Feb 9, 2024
1 parent 15dcdad commit b763b1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions tests/http_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def run_test(_, langCode, url):
Only work on a domain-level. Returns tuple with decimal for grade and string with review
"""

# TODO: Check if we can use sitespeed instead (to make it more accurate), https://addons.mozilla.org/en-US/firefox/addon/http2-indicator/

rating = Rating(_, review_show_improvements_only)
result_dict = {}

Expand Down
4 changes: 0 additions & 4 deletions tests/software.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@
def get_rating_from_sitespeed(url, _local, _):
# We don't need extra iterations for what we are using it for
sitespeed_iterations = 1
# sitespeed_arg = '--shm-size=1g -b chrome --plugins.remove screenshot --plugins.remove html --plugins.remove metrics --browsertime.screenshot false --screenshot false --screenshotLCP false --browsertime.screenshotLCP false --chrome.cdp.performance false --browsertime.chrome.timeline false --videoParams.createFilmstrip false --visualMetrics false --visualMetricsPerceptual false --visualMetricsContentful false --browsertime.headless true --browsertime.chrome.includeResponseBodies all --utc true --browsertime.chrome.args ignore-certificate-errors -n {0}'.format(
# sitespeed_iterations)
# sitespeed_arg = '--shm-size=1g -b firefox --plugins.remove screenshot --plugins.remove html --plugins.remove metrics --browsertime.screenshot false --screenshot false --screenshotLCP false --browsertime.screenshotLCP false --chrome.cdp.performance false --browsertime.chrome.timeline false --videoParams.createFilmstrip false --visualMetrics false --visualMetricsPerceptual false --visualMetricsContentful false --browsertime.headless true --browsertime.chrome.includeResponseBodies all --utc true --browsertime.chrome.args ignore-certificate-errors -n {0}'.format(
# sitespeed_iterations)
sitespeed_arg = '--plugins.remove screenshot --plugins.remove html --plugins.remove metrics --browsertime.screenshot false --screenshot false --screenshotLCP false --browsertime.screenshotLCP false --videoParams.createFilmstrip false --visualMetrics false --visualMetricsPerceptual false --visualMetricsContentful false --browsertime.headless true --utc true -n {0}'.format(
sitespeed_iterations)

Expand Down
10 changes: 8 additions & 2 deletions update_software.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,16 @@ def set_github_repository_info(item, owner, repo):
item['license'] = license

# Lets get an indication if the project is worked on or not
item['pushed_at'] = None
item['last_pushed_year'] = None
if 'pushed_at' in github_info and github_info['pushed_at'] != None:
pushed_at = github_info['pushed_at']
item['pushed_at'] = pushed_at

# we only use year today, but who knows...
regex = r"^(?P<date>(?P<year>[0-9]{4})\-(?P<month>[0-9]{2})\-(?P<day>[0-9]{2}))"
match = re.match(regex, pushed_at)
if match:
pushed_at = match.group('year')
item['last_pushed_year'] = pushed_at

techs = list()
imgs = list()
Expand Down

0 comments on commit b763b1f

Please sign in to comment.