From c4eae3bb868fb0d57cd6750154a423f863a31419 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Thu, 30 Mar 2023 13:13:31 +0300 Subject: [PATCH 01/78] Update weather-and-light.py Updated the city --- examples/weather-and-light.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/weather-and-light.py b/examples/weather-and-light.py index cd8ae962..b68f7eaf 100755 --- a/examples/weather-and-light.py +++ b/examples/weather-and-light.py @@ -306,8 +306,8 @@ def describe_light(light): HEIGHT = disp.height # The city and timezone that you want to display. -city_name = "Sheffield" -time_zone = "Europe/London" +city_name = "Helsinki" +time_zone = "Europe/Helsinki" # Values that alter the look of the background blur = 50 From 45fb24b7048f446b42a36a380e23576540dd2143 Mon Sep 17 00:00:00 2001 From: argtus Date: Thu, 30 Mar 2023 14:05:26 +0300 Subject: [PATCH 02/78] Added new script for monitoring growing conditions --- examples/growing_conditions.py | 456 +++++++++++++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100755 examples/growing_conditions.py diff --git a/examples/growing_conditions.py b/examples/growing_conditions.py new file mode 100755 index 00000000..a9b995be --- /dev/null +++ b/examples/growing_conditions.py @@ -0,0 +1,456 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +f"Sorry! This program requires Python >= 3.6 😅" + +import os +import time +import numpy +import colorsys +from PIL import Image, ImageDraw, ImageFont, ImageFilter +from fonts.ttf import RobotoMedium as UserFont + +import ST7735 +from bme280 import BME280 +from ltr559 import LTR559 + +import pytz +from pytz import timezone +from astral.geocoder import database, lookup +from astral.sun import sun +from datetime import datetime, timedelta + +try: + from smbus2 import SMBus +except ImportError: + from smbus import SMBus + + +def calculate_y_pos(x, centre): + """Calculates the y-coordinate on a parabolic curve, given x.""" + centre = 80 + y = 1 / centre * (x - centre) ** 2 + + return int(y) + + +def circle_coordinates(x, y, radius): + """Calculates the bounds of a circle, given centre and radius.""" + + x1 = x - radius # Left + x2 = x + radius # Right + y1 = y - radius # Bottom + y2 = y + radius # Top + + return (x1, y1, x2, y2) + + +def map_colour(x, centre, start_hue, end_hue, day): + """Given an x coordinate and a centre point, a start and end hue (in degrees), + and a Boolean for day or night (day is True, night False), calculate a colour + hue representing the 'colour' of that time of day.""" + + start_hue = start_hue / 360 # Rescale to between 0 and 1 + end_hue = end_hue / 360 + + sat = 1.0 + + # Dim the brightness as you move from the centre to the edges + val = 1 - (abs(centre - x) / (2 * centre)) + + # Ramp up towards centre, then back down + if x > centre: + x = (2 * centre) - x + + # Calculate the hue + hue = start_hue + ((x / centre) * (end_hue - start_hue)) + + # At night, move towards purple/blue hues and reverse dimming + if not day: + hue = 1 - hue + val = 1 - val + + r, g, b = [int(c * 255) for c in colorsys.hsv_to_rgb(hue, sat, val)] + + return (r, g, b) + + +def x_from_sun_moon_time(progress, period, x_range): + """Recalculate/rescale an amount of progress through a time period.""" + + x = int((progress / period) * x_range) + + return x + + +def sun_moon_time(city_name, time_zone): + """Calculate the progress through the current sun/moon period (i.e day or + night) from the last sunrise or sunset, given a datetime object 't'.""" + + city = lookup(city_name, database()) + + # Datetime objects for yesterday, today, tomorrow + utc = pytz.utc + utc_dt = datetime.now(tz=utc) + local_dt = utc_dt.astimezone(pytz.timezone(time_zone)) + today = local_dt.date() + yesterday = today - timedelta(1) + tomorrow = today + timedelta(1) + + # Sun objects for yesterday, today, tomorrow + sun_yesterday = sun(city.observer, date=yesterday) + sun_today = sun(city.observer, date=today) + sun_tomorrow = sun(city.observer, date=tomorrow) + + # Work out sunset yesterday, sunrise/sunset today, and sunrise tomorrow + sunset_yesterday = sun_yesterday["sunset"] + sunrise_today = sun_today["sunrise"] + sunset_today = sun_today["sunset"] + sunrise_tomorrow = sun_tomorrow["sunrise"] + + # Work out lengths of day or night period and progress through period + if sunrise_today < local_dt < sunset_today: + day = True + period = sunset_today - sunrise_today + # mid = sunrise_today + (period / 2) + progress = local_dt - sunrise_today + + elif local_dt > sunset_today: + day = False + period = sunrise_tomorrow - sunset_today + # mid = sunset_today + (period / 2) + progress = local_dt - sunset_today + + else: + day = False + period = sunrise_today - sunset_yesterday + # mid = sunset_yesterday + (period / 2) + progress = local_dt - sunset_yesterday + + # Convert time deltas to seconds + progress = progress.total_seconds() + period = period.total_seconds() + + return (progress, period, day, local_dt) + + +def draw_background(progress, period, day): + """Given an amount of progress through the day or night, draw the + background colour and overlay a blurred sun/moon.""" + + # x-coordinate for sun/moon + x = x_from_sun_moon_time(progress, period, WIDTH) + + # If it's day, then move right to left + if day: + x = WIDTH - x + + # Calculate position on sun/moon's curve + centre = WIDTH / 2 + y = calculate_y_pos(x, centre) + + # Background colour + background = map_colour(x, 80, mid_hue, day_hue, day) + + # New image for background colour + img = Image.new("RGBA", (WIDTH, HEIGHT), color=background) + # draw = ImageDraw.Draw(img) + + # New image for sun/moon overlay + overlay = Image.new("RGBA", (WIDTH, HEIGHT), color=(0, 0, 0, 0)) + overlay_draw = ImageDraw.Draw(overlay) + + # Draw the sun/moon + circle = circle_coordinates(x, y, sun_radius) + overlay_draw.ellipse(circle, fill=(200, 200, 50, opacity)) + + # Overlay the sun/moon on the background as an alpha matte + composite = Image.alpha_composite(img, overlay).filter( + ImageFilter.GaussianBlur(radius=blur) + ) + + return composite + + +def overlay_text(img, position, text, font, align_right=False, rectangle=False): + draw = ImageDraw.Draw(img) + w, h = font.getsize(text) + if align_right: + x, y = position + x -= w + position = (x, y) + if rectangle: + x += 1 + y += 1 + position = (x, y) + border = 1 + rect = (x - border, y, x + w, y + h + border) + rect_img = Image.new("RGBA", (WIDTH, HEIGHT), color=(0, 0, 0, 0)) + rect_draw = ImageDraw.Draw(rect_img) + rect_draw.rectangle(rect, (255, 255, 255)) + rect_draw.text(position, text, font=font, fill=(0, 0, 0, 0)) + img = Image.alpha_composite(img, rect_img) + else: + draw.text(position, text, font=font, fill=(255, 255, 255)) + return img + + +def get_cpu_temperature(): + with open("/sys/class/thermal/thermal_zone0/temp", "r") as f: + temp = f.read() + temp = int(temp) / 1000.0 + return temp + + +def correct_humidity(humidity, temperature, corr_temperature): + dewpoint = temperature - ((100 - humidity) / 5) + corr_humidity = 100 - (5 * (corr_temperature - dewpoint)) + return min(100, corr_humidity) + + +def analyse_pressure(pressure, t): + global time_vals, pressure_vals, trend + if len(pressure_vals) > num_vals: + pressure_vals = pressure_vals[1:] + [pressure] + time_vals = time_vals[1:] + [t] + + # Calculate line of best fit + line = numpy.polyfit(time_vals, pressure_vals, 1, full=True) + + # Calculate slope, variance, and confidence + slope = line[0][0] + intercept = line[0][1] + variance = numpy.var(pressure_vals) + residuals = numpy.var( + [(slope * x + intercept - y) for x, y in zip(time_vals, pressure_vals)] + ) + r_squared = 1 - residuals / variance + + # Calculate change in pressure per hour + change_per_hour = slope * 60 * 60 + # variance_per_hour = variance * 60 * 60 + + mean_pressure = numpy.mean(pressure_vals) + + # Calculate trend + if r_squared > 0.5: + if change_per_hour > 0.5: + trend = ">" + elif change_per_hour < -0.5: + trend = "<" + elif -0.5 <= change_per_hour <= 0.5: + trend = "-" + + if trend != "-": + if abs(change_per_hour) > 3: + trend *= 2 + else: + pressure_vals.append(pressure) + time_vals.append(t) + mean_pressure = numpy.mean(pressure_vals) + change_per_hour = 0 + trend = "-" + + # time.sleep(interval) + return (mean_pressure, change_per_hour, trend) + + +def describe_pressure(pressure): + """Convert pressure into barometer-type description.""" + if pressure < 970: + description = "storm" + elif 970 <= pressure < 990: + description = "rain" + elif 990 <= pressure < 1010: + description = "change" + elif 1010 <= pressure < 1030: + description = "fair" + elif pressure >= 1030: + description = "dry" + else: + description = "" + return description + + +def describe_humidity(humidity): + """Convert relative humidity into good/bad description.""" + if 40 < humidity < 60: + description = "good" + else: + description = "bad" + return description + + +def describe_light(light): + """Convert light level in lux to descriptive value.""" + if light < 50: + description = "dark" + elif 50 <= light < 100: + description = "dim" + elif 100 <= light < 500: + description = "light" + elif light >= 500: + description = "bright" + return description + + +# Initialise the LCD +disp = ST7735.ST7735( + port=0, cs=1, dc=9, backlight=12, rotation=270, spi_speed_hz=10000000 +) + +disp.begin() + +WIDTH = disp.width +HEIGHT = disp.height + +# The city and timezone that you want to display. +city_name = "Helsinki" +time_zone = "Europe/Helsinki" + +# Values that alter the look of the background +blur = 50 +opacity = 125 + +mid_hue = 0 +day_hue = 25 + +sun_radius = 50 + +# Fonts +font_sm = ImageFont.truetype(UserFont, 12) +font_lg = ImageFont.truetype(UserFont, 14) + +# Margins +margin = 3 + + +# Set up BME280 weather sensor +bus = SMBus(1) +bme280 = BME280(i2c_dev=bus) + +min_temp = None +max_temp = None + +factor = 2.25 +cpu_temps = [get_cpu_temperature()] * 5 + +# Set up light sensor +ltr559 = LTR559() + +# Pressure variables +pressure_vals = [] +time_vals = [] +num_vals = 1000 +interval = 1 +trend = "-" + +# Keep track of time elapsed +start_time = time.time() + +while True: + path = os.path.dirname(os.path.realpath(__file__)) + progress, period, day, local_dt = sun_moon_time(city_name, time_zone) + background = draw_background(progress, period, day) + + # Time. + time_elapsed = time.time() - start_time + date_string = local_dt.strftime("%d %b %y").lstrip("0") + time_string = local_dt.strftime("%H:%M") + img = overlay_text(background, (0 + margin, 0 + margin), time_string, font_lg) + img = overlay_text( + img, (WIDTH - margin, 0 + margin), date_string, font_lg, align_right=True + ) + + # Temperature + temperature = bme280.get_temperature() + + # Corrected temperature + cpu_temp = get_cpu_temperature() + cpu_temps = cpu_temps[1:] + [cpu_temp] + avg_cpu_temp = sum(cpu_temps) / float(len(cpu_temps)) + corr_temperature = temperature - ((avg_cpu_temp - temperature) / factor) + + if time_elapsed > 30: + if min_temp is not None and max_temp is not None: + if corr_temperature < min_temp: + min_temp = corr_temperature + elif corr_temperature > max_temp: + max_temp = corr_temperature + else: + min_temp = corr_temperature + max_temp = corr_temperature + + temp_string = f"{corr_temperature:.0f}°C" + img = overlay_text(img, (68, 18), temp_string, font_lg, align_right=True) + spacing = font_lg.getsize(temp_string)[1] + 1 + if min_temp is not None and max_temp is not None: + range_string = f"{min_temp:.0f}-{max_temp:.0f}" + else: + range_string = "------" + img = overlay_text( + img, (68, 18 + spacing), range_string, font_sm, align_right=True, rectangle=True + ) + temp_icon = Image.open(f"{path}/icons/temperature.png") + img.paste(temp_icon, (margin, 18), mask=temp_icon) + + # Humidity + humidity = bme280.get_humidity() + corr_humidity = correct_humidity(humidity, temperature, corr_temperature) + humidity_string = f"{corr_humidity:.0f}%" + img = overlay_text(img, (68, 48), humidity_string, font_lg, align_right=True) + spacing = font_lg.getsize(humidity_string)[1] + 1 + humidity_desc = describe_humidity(corr_humidity).upper() + img = overlay_text( + img, + (68, 48 + spacing), + humidity_desc, + font_sm, + align_right=True, + rectangle=True, + ) + humidity_icon = Image.open(f"{path}/icons/humidity-{humidity_desc.lower()}.png") + img.paste(humidity_icon, (margin, 48), mask=humidity_icon) + + # Light + light = ltr559.get_lux() + light_string = f"{int(light):,}" + img = overlay_text( + img, (WIDTH - margin, 18), light_string, font_lg, align_right=True + ) + spacing = font_lg.getsize(light_string.replace(",", ""))[1] + 1 + light_desc = describe_light(light).upper() + img = overlay_text( + img, + (WIDTH - margin - 1, 18 + spacing), + light_desc, + font_sm, + align_right=True, + rectangle=True, + ) + light_icon = Image.open(f"{path}/icons/bulb-{light_desc.lower()}.png") + img.paste(humidity_icon, (80, 18), mask=light_icon) + + # Pressure + pressure = bme280.get_pressure() + t = time.time() + mean_pressure, change_per_hour, trend = analyse_pressure(pressure, t) + pressure_string = f"{int(mean_pressure):,} {trend}" + img = overlay_text( + img, (WIDTH - margin, 48), pressure_string, font_lg, align_right=True + ) + pressure_desc = describe_pressure(mean_pressure).upper() + spacing = font_lg.getsize(pressure_string.replace(",", ""))[1] + 1 + img = overlay_text( + img, + (WIDTH - margin - 1, 48 + spacing), + pressure_desc, + font_sm, + align_right=True, + rectangle=True, + ) + pressure_icon = Image.open(f"{path}/icons/weather-{pressure_desc.lower()}.png") + img.paste(pressure_icon, (80, 48), mask=pressure_icon) + + # Display image + disp.display(img) From 7b4262f5f4767b0453d34673a5b5081d83f5d78d Mon Sep 17 00:00:00 2001 From: argtus Date: Thu, 30 Mar 2023 17:57:37 +0300 Subject: [PATCH 03/78] Made changes to display dli instead of lux --- .../growth_conditions.py | 72 +++++++++++++++--- modified_code/icons/bulb-bright.png | Bin 0 -> 2533 bytes modified_code/icons/bulb-dark.png | Bin 0 -> 2817 bytes modified_code/icons/bulb-dim.png | Bin 0 -> 2817 bytes modified_code/icons/bulb-light.png | Bin 0 -> 2820 bytes modified_code/icons/crop-bright.png | Bin 0 -> 2533 bytes modified_code/icons/crop-flower.png | Bin 0 -> 683 bytes modified_code/icons/crop-leafy.png | Bin 0 -> 708 bytes modified_code/icons/crop-micro.png | Bin 0 -> 779 bytes modified_code/icons/crop-sprout.png | Bin 0 -> 808 bytes modified_code/icons/humidity-bad.png | Bin 0 -> 2983 bytes modified_code/icons/humidity-good.png | Bin 0 -> 2530 bytes modified_code/icons/humidity.png | Bin 0 -> 2983 bytes modified_code/icons/temperature.png | Bin 0 -> 3188 bytes modified_code/icons/weather-change.png | Bin 0 -> 2770 bytes modified_code/icons/weather-dry.png | Bin 0 -> 3155 bytes modified_code/icons/weather-fair.png | Bin 0 -> 3155 bytes modified_code/icons/weather-rain.png | Bin 0 -> 2850 bytes modified_code/icons/weather-storm.png | Bin 0 -> 2732 bytes 19 files changed, 61 insertions(+), 11 deletions(-) rename examples/growing_conditions.py => modified_code/growth_conditions.py (85%) create mode 100644 modified_code/icons/bulb-bright.png create mode 100644 modified_code/icons/bulb-dark.png create mode 100644 modified_code/icons/bulb-dim.png create mode 100644 modified_code/icons/bulb-light.png create mode 100644 modified_code/icons/crop-bright.png create mode 100644 modified_code/icons/crop-flower.png create mode 100644 modified_code/icons/crop-leafy.png create mode 100644 modified_code/icons/crop-micro.png create mode 100644 modified_code/icons/crop-sprout.png create mode 100644 modified_code/icons/humidity-bad.png create mode 100644 modified_code/icons/humidity-good.png create mode 100644 modified_code/icons/humidity.png create mode 100644 modified_code/icons/temperature.png create mode 100644 modified_code/icons/weather-change.png create mode 100644 modified_code/icons/weather-dry.png create mode 100644 modified_code/icons/weather-fair.png create mode 100644 modified_code/icons/weather-rain.png create mode 100644 modified_code/icons/weather-storm.png diff --git a/examples/growing_conditions.py b/modified_code/growth_conditions.py similarity index 85% rename from examples/growing_conditions.py rename to modified_code/growth_conditions.py index a9b995be..10fbce9f 100755 --- a/examples/growing_conditions.py +++ b/modified_code/growth_conditions.py @@ -203,8 +203,8 @@ def get_cpu_temperature(): def correct_humidity(humidity, temperature, corr_temperature): - dewpoint = temperature - ((100 - humidity) / 5) - corr_humidity = 100 - (5 * (corr_temperature - dewpoint)) + dew_point = temperature - ((100 - humidity) / 5) + corr_humidity = 100 - (5 * (corr_temperature - dew_point)) return min(100, corr_humidity) @@ -294,15 +294,63 @@ def describe_light(light): return description +def convert_to_dli(lux): + """ + Convert lux to daily light integral (DLI) value which describes the number of photosynthetically active photons delivered to a specific area. + + By default assumes that grow lights with red + blue + white lights are used and that the light is on for 16 hours a day. + + Conversion factors: + Sunlight 0.019 + LED, white 0.013-0.019 + LED, red + blue 0.025 + LED, blue only 0.115 + LED, red only 0.077 + Ceramic metal halide, 3100K 0.017 + Ceramic metal halide, 4200K 0.015 + Fluorescent, 6500K 0.014 + Single-Ended High Pressure Sodium 0.012 + Double-Ended High Pressure Sodium 0.013 + """ + + # Convert lux to ppfd (photosynthetic photon flux density) by multiplying lux by the conversion factor of the chosen light source to get umol/m2/s. + ppfd = lux * 0.025 + + # We assume that the light is on for 16 hours a day. + hours = 16 + seconds = hours * 60 * 60 + + # Convert umol/m2/s to umol/m2/d by multiplying by the number of seconds. + dli = (ppfd * seconds) / 1000000 + return dli + + +def describe_dli(lux): + dli = convert_to_dli(lux) + """Convert dli to descriptive value.""" + # Description must match the image file name. + if dli < 6: + description = "sprout" + elif 6 <= dli < 12: + description = "micro" + elif 12 <= dli < 32: + description = "leafy" + elif 17 <= dli < 45: + description = "flower" + elif dli >= 45: + description = "bright" + return description + + # Initialise the LCD -disp = ST7735.ST7735( +display = ST7735.ST7735( port=0, cs=1, dc=9, backlight=12, rotation=270, spi_speed_hz=10000000 ) -disp.begin() +display.begin() -WIDTH = disp.width -HEIGHT = disp.height +WIDTH = display.width +HEIGHT = display.height # The city and timezone that you want to display. city_name = "Helsinki" @@ -413,13 +461,14 @@ def describe_light(light): img.paste(humidity_icon, (margin, 48), mask=humidity_icon) # Light - light = ltr559.get_lux() - light_string = f"{int(light):,}" + light = convert_to_dli(ltr559.get_lux()) + # F-string formatted to show only integer values. + light_string = f"{light:.0f}" img = overlay_text( img, (WIDTH - margin, 18), light_string, font_lg, align_right=True ) spacing = font_lg.getsize(light_string.replace(",", ""))[1] + 1 - light_desc = describe_light(light).upper() + light_desc = describe_dli(light).upper() img = overlay_text( img, (WIDTH - margin - 1, 18 + spacing), @@ -428,7 +477,8 @@ def describe_light(light): align_right=True, rectangle=True, ) - light_icon = Image.open(f"{path}/icons/bulb-{light_desc.lower()}.png") + light_icon = Image.open(f"{path}/icons/crop-{light_desc.lower()}.png") + # Both icons need to be 25 x 25px otherwise they won't align and one gets the "images do not match" error. img.paste(humidity_icon, (80, 18), mask=light_icon) # Pressure @@ -453,4 +503,4 @@ def describe_light(light): img.paste(pressure_icon, (80, 48), mask=pressure_icon) # Display image - disp.display(img) + display.display(img) diff --git a/modified_code/icons/bulb-bright.png b/modified_code/icons/bulb-bright.png new file mode 100644 index 0000000000000000000000000000000000000000..5697a81bf2fe2f2a7f45f7e448650ba321cb92e5 GIT binary patch literal 2533 zcmbVN2~-nz8XrYak<ww?E8@;`px@4LU8^zv{c z=x@~r0D!=E=lS5jCfav{9{&APbRY--E7~Mnu9ue*^$JHZ6!dX(0RZc)v)O_OU+2x5 z^L(pF@4Z=T$g3T880*#xHve_%fpyNmG(F_(zVBb(XH<61)QjZhA37&!=5&k>RgRfY zCT%`AV|fSZC#DzdG5X;~OxXQs)-yz}d8Fo#-DH_dHneTLTS+x-DyI}%Ry4<5JN`Ap zzb8WtIMw#($L3F-N(}DZ2;BVw-}c8AyH!SlMR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j(1jOtv=>5g;scds=Ro5!}VJzwZ|Q(`*0 zW;_aHSvKFS=nA%N{F^Ub7MO9Y(aQ#VYMN%2 zsw;?)!+Y03<_!ZnZ%B{M^pA~@GOOg@>I2D)7wyb|O zb+5^3@LXj@MYnN@niE^;`u4WH4$N$O`nb0!f&H-NhgU6zE`R?PRz-fAS5Ntjr#&1aPZ@Kx;INv9?_Fg@kRc)Pi_g)Ln@k-GgBs=P9Bb_3= t?>sl%Zk<-`v;W9hy;l?5QL`!a=;}7%Yn_)i8e8pOHQ&{Pcg-av`QNaA<`Vz_ literal 0 HcmV?d00001 diff --git a/modified_code/icons/bulb-dark.png b/modified_code/icons/bulb-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a91e24b580505621046235f3ded1a7058bb0281a GIT binary patch literal 2817 zcmcgudsGuw9v(#j5e17Yz8xpRTFT@(nUGmhN&*6v@Dd9ub)C#iAcbT?G8ka7pcNF+ zQe<6^rUEIIm#nXqZYd}aU8{7dh@!OA(pKxLRjI;S6skKD9`)>MkEeg^oHLoZ_kQ#J zUf=!QOmms*0sz3Yu+X3w_Bn^U-5uHAKWD500boL>PNj;9GSN{BfeO5Wc&fjK(dar$b0aa|REQSOS}o2v)J3trv5&-d)ffy0aYP-}ah>rX%J-|?x3 zY}cjm9SY&2=>@((!p)xAfU^nS@2vgPoGb#ZEc7Zrx7jr$Z%J9mQ24owIj$il+vCP) zp3m);uvJ^n9Z;0sZMjfbxk2`I>y|B*ef+o_m-)SG&&J;yHhi{b`dVxIy&rFOwhlFA zMZaK_~F?xkn2mO6GI|4 zsy+}VX6J zlP&TTW9TX~0L=2@?g?QrOMV0Z$3wcEh!80#lk-KW1d+>qL9tNeClLAx zL=sqpVu%nEi^0(gVy&4-Efy2BY}6JzQb0)zW5fgki^amXNcglVQ6Q4b5PnyHh>%>uA$Qy1;lzf5`x}1PHQlario3MARRXfM0_C^ zk{w7A<2YlQDaCG_Bm`6nrKb#xnZ=66v22#q>T&opY4!SXw3!KB&w4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O9Y(aQ#VYMN%2 zsw;?)!+Y03<_!ZnZ%B{M^pA~@GOOg@>I2D)7wyb|O zb+5^3@LXj@MYnN@niE^;`u4WH4$N$O`nb0!f&H-NhgU6zE`R?PRz-fAS5Ntjr#&1aPZ@Kx;INv9?_Fg@kRc)Pi_g)Ln@k-GgBs=P9Bb_3= t?>sl%Zk<-`v;W9hy;l?5QL`!a=;}7%Yn_)i8e8pOHQ&{Pcg-av`QNaA<`Vz_ literal 0 HcmV?d00001 diff --git a/modified_code/icons/crop-flower.png b/modified_code/icons/crop-flower.png new file mode 100644 index 0000000000000000000000000000000000000000..ae37e81e294b234430388f2cfe36b33b1fc9dca0 GIT binary patch literal 683 zcmV;c0#yBpP)P000>X1^@s6#OZ}&00009a7bBm0001X z0001X0Zw}+2mk;88FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10ys%T zK~zYIt=3zJPf-*G@ZV;}HTPT|kmQz;dqhmir9|>V;X%TSM!Zm7&?rwXFOxz_8O4Jq zNnYh1l6x)_BB6)}jIcfIO=BAW|Ct%PPMx#PUh6ySTi;syh%qX1VE}I7A*K}di!mw^ zyg#ns9cnNSpKukUi-3e2=$|Wuun`qFi68iafvCdF7~|HG0nnigz%XpUm>l>5Zelnl zV?_vIYB`W{RBb~|zTb=Gn1)l?wiE~3RTE4>18T7VcW@1BupW1@__z6W)eb}i~V>a(eo3XFh0ik zJ%rE|jWNcbZOTL{ZiCc(0b|h*&n5Y;!(-gT&^DWH2NK;SbPu>*TzjOTy9sA#tFJ_bot zeJmLK&o@fhJi+b1-u$B;XE3p-M6=IK94}mWti)6K$Nk#LU?d>B?=KH8@t%U2b1QXCZ+xp@XX5_&8q?7Uy4z#6D7UF0N_JKH^gYS~W zQ;%6~0jbC|buLrzZc^8WLd^&vghSF#0%=~o#Mcti?Vhu1$j_T%j2D}3_yqtsgAPBc Ro5cVC002ovPDHLkV1oZJD|!F` literal 0 HcmV?d00001 diff --git a/modified_code/icons/crop-leafy.png b/modified_code/icons/crop-leafy.png new file mode 100644 index 0000000000000000000000000000000000000000..21d78d17ee2165b09e9cd47b72f07855113c91da GIT binary patch literal 708 zcmV;#0z3VQP)P000>X1^@s6#OZ}&00009a7bBm0001X z0001X0Zw}+2mk;88FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10#Qjs zK~zYIrPa@iR%H|i@XryanPzZcaFBtT83>DDbkT%cY23INXk{@j0$1un+6rw%aGR_C z0gE7}nvJxWA|w!miC{{!6bWYGA`3?gM>FxXxX)|XciwyFM_;%+_c`aD^L@^*=gLgo z4-VlZhPvdh;07kTpmLo?0TA#uw%NgOZNfvOj`* zI9v9g;6S6V7LtBkEAKDhHum6Kyo}#5SoA;O#Vx0+q~%FO3})tI+|A587%POUnYk7b zeTd9_*yO9NCRBxfy~A5OKqAU^FK)Iu*@)z4Ohv>F^mXYvBva+PZIdixIy0YQpiB2p zS>I62$+k(p!@&mK&a%$na+{N#^-V!4Anh{=^?`C))s{7|zUhdqz@l1uOr9WDkR_$DG2BVr^XK97jWmMHeAhIbu$)ucnRj0(CU*b&O}`YG&St4G3CE+9EmCOA!%ARKxcsUaG0y!iT+Vnj%?I4OuT_gM3U= z>$h~v5_WB}vqm*^R%Z52S46z8`e~hwh~FAcUdOoV+Bub(AFcCOzgB7_zv2uYZGxbK q0i4Usb#2~M_^)w#8zhUp6#oJ=q3)HnKF|^X0000P000>X1^@s6#OZ}&00009a7bBm0001X z0001X0Zw}+2mk;88FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10+>le zK~zYIrPf=Bl~oi6@ZXwgLM4O3K!u=0=pyBfBwr+u>_VX>QBg<@2@-)sK@lTvrG0;1|4^qKi@R5jJMbOE{6SbNUiV(w%q$ zvl6=y2eAs%GG-IDW8hdcpR7B<^!R7`wjNdRnzh`9X zUPJT}8PH;-l%FtyiHNu_;T`w`3nJo*Qp#U=E`>L?@pPx@Bx-% zd0%~!gpc4`{DAej^F6up1M0E9O-=1Mo|%fsAhu#x1G_XyS2eH)@deI3>(kY+m6*U- z16zZm*b5P{5a;1wDdpr;YO)L`@i8_eHiF}L1G6w2f8tYYnM%5*;d?yLNd@l5?#@9- zY%dA!fuHGK?Sc_2%o_3_~X~9OZwyy!%u&Xc<5rYvisNOLfu(N@UWL#J4 zl`iTS|2v8P!8fIpdn4j0yrNEkuW;o5h&+TF)Lt3DyAg3nP1*G+yj!iua95T|YO+JU z4Od_(KErit<6Wx`#WB39M@=T%$#;0te}5)cmr@Q##O;X{+^RNcSDQ>kDdk8++?2n^ z^L;oXZtP$Y(Uaqhj*o~H>g4TQP~(#=M4bu~_#F?IQa)@t{{;h-n9L>=*?<55002ov JPDHLkV1gKdUuggU literal 0 HcmV?d00001 diff --git a/modified_code/icons/crop-sprout.png b/modified_code/icons/crop-sprout.png new file mode 100644 index 0000000000000000000000000000000000000000..209e49cbf7f3ceec8a011d48aba81bd7b5ae3c86 GIT binary patch literal 808 zcmV+@1K0eCP)P000>X1^@s6#OZ}&00009a7bBm0001X z0001X0Zw}+2mk;88FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10<}p* zK~zYIt=3J5R#g}W@ZWhSKPnV)LMb&ZH4U+1B&ZQ(q)CFX#;8?_n6zq5DegZY{xm=TcdBqS@gQ} z^mMPs@GW-YSVWw!5+mYVG2+oqEfuR4;Z;0`CFSg0jNm&gYw>mjZ+(3BEJtJbr~`mp z+P}^yn5pe)Jctu5{V;^_O7jhO^v(iIH;t8(^6XiiQW|WqYzo^_N{i*`d%DAm5qZSS zhGGVN81Lf+9Br}iQyj(zb4-Ebc&N{lh&U-%*jemKDLv9);VJo+oNRL;r8JBb5vTe* zDHd!hAVcy5*j}SQfxw;?4{j^+n>ues?3c&)R=ITFz|umyzkqCRkXusZp6#QxShP^gG5?}8?;@95zj5Q^`zlsl|0)R;)CKCDkYjOW5T#r)&#a;j~BYQ`VbY+mI zP5Lg$R71dmY;(F9cbeVEYN^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w?-wHf&ZcV|0@CQK+byaWJ;a9DSmr7&rJ&grR zi>sUV`!+1xo9w%#rD=O;=-GftaVH;{X1yE>wytY^-MQ(CgNu7E20IpwlOEl0f6A3LkG#{f<{L*h2kl*GT~`ZBETbPL zGd}GunQvA9bmc4OY0imyvH1Di!?%lELJoG8*Hp@yQAYNeqMJ@*EweR{sb#ZPQ(vGv zZ%5BLI^?!Z>FNciJ<}a+k)g+fOHal$4=R3`1chCTO-X)V4tXrN@OZH>hex$f)p;Mk zIjJT$lPK}sm$SJbBW8Zl((%j1))O;lPjeI)CkBSs{v+~U>}{1X_*TJ<_bsnCwcc(@ d-S({Al5y-cx{J}2Z~o^fo$lv#$Rm99e*wVY+0p<2 literal 0 HcmV?d00001 diff --git a/modified_code/icons/weather-change.png b/modified_code/icons/weather-change.png new file mode 100644 index 0000000000000000000000000000000000000000..21215b78d5a1946229fb900aac9fe2dccc7b10d0 GIT binary patch literal 2770 zcmcIm3se(V8jjim0_sv+krmtNAd1RlW|GNkG*VuMC}APc1(aGQlL?uHWa1>4K&_zV zQQBHdu!|L+tvs|;UAvyGg;nuU0Y#84^+C5HJ<3wqMyl2atnLht)YIy&r{`?WnatdK zzx(~K@BTBT3Gu2)-oNt}2n3VVvC&%Y9>`z6@!p?WfF{xjRCZ( zNP!@LmgH`ZO=|Y_6i0@@R4W?cGa4Q=}80aqAL` z1T`Oo>w-UPd3|ruIV`1XgI%!jNSF8Os=IF&yn5MBaO$tzuxE9h>QD}_=cvD_+V9QG zqt^q3c3_R*<$8bHOGD2{znGtAkLhZ(JX5vwrJRQL^J~BRK2lb&Ctf?L3IaMyze>Qz z9}ZDh?;P@|Rov_tXFD*|{>8VYy^m;$!~`V()+sV!kg1)zp>)Az}2L*W<$tFZH2z7;#oUXgK=%Sfxaqs z=YxjC;CcOx>a;i8K2~o3zVYuHYF?LpbF8GK#wAQC@D94XqB(V7$b5SFL2(NaeRklt<`icG1wV>~F z+sCWo*G7Ga7pY%_^kDcRV4(x&2uzf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x zGPL+K?0We3lr=ZjUu`>zc{(D)V$Xh_7|<9Y7LEADFsuG6`TFUu|I{3Rl2dps=uWq; zt)uP6n}v(hFI#%MJ)T^#V1?lwZx^RuI_%xBZ_mh;1v}q9fB4I}_ijI^S(ofp?KjD` zfq2YmO)XiRZuDAN(CxST_RM`n>9r?jrrn*w-&5TZb#uD+q|Y7+I$YPf?47sQI^RGK p-TG#ly|c&HAwS1yl^8nxq2tYGYhD`{&td=PsAA(|b}E*x{vV?aD+B-l literal 0 HcmV?d00001 diff --git a/modified_code/icons/weather-storm.png b/modified_code/icons/weather-storm.png new file mode 100644 index 0000000000000000000000000000000000000000..20172459e6d0f2f58b0e4bf61310592ba25b4ead GIT binary patch literal 2732 zcmcIm3se->86LsHf`}p(d=-b~5o(y7$G!(PxC>-ib;l*u5~_#~Vp4_Es8}FA5CYL+s}xd=&wx>hk*F1nompVxNi@gPp3XV5JNMr2 ze*f#c|4fN4Q9adrjyC`RQ#A>3$?X4Z?w;=fTDan}AJG06c6fD7gZfAgxWCokyvJ`#X6sjh zf?RMN@a8dp$HLLclGCrQ&W-PHvrevCyfCNv+{N{`?y97P`xBF=) zTGk}Jb@N|7T|56AzV+SVDV2eV3wB-Omv_qMs+(Gu?ibwXNw4nqLT(cu%}VC`%&2iw zC$5kE6JpeRS8UsMVupWGNUOSbZ%BDy?-!8)1=HR?7=6fm|-7?sQAFoMAt z2C)dpo^Npwd62~(GQki>+ew?r>M$`DkYgnDOpZgrXFVMY!EANWTI}O#ViN}E5mp!# zAY4dJAVs=x)*M^5(>O)KbT)0KEe<=2MO|1nOIoc9{#;tK*@d<{;#aXAjmP#}v^_Q7 zO2f&toyoD0bo?sTV#tJJR_;XGjm!(;a4ox{vEs2dns6|-REEi(D3r4=a4cYKELRvg z7@;LdlZB)HC1+}U7ad19Xa%1`Kqv|!vQ!ks#S&a7`_&jq%j$q49K?@t7>=Phf=%EU z%4Ep@DHKKG2F7M4*xZ=RL?#VeEtyUmS}m@z*d2t0q&0C0KI@ynWTJ3dE+(XyR1P7C z5P?JzIRWVrS`3K{C?zKh61`Y1o7f-6kU3o4xcy@irWlgtaAgaZi42qolZhY{qY(&^ zi%>`=)Jq|R#-vg?D#1tun_zpxW@1kfk^L+y=M}{=O2s0Hkd}}TD$*MukzQhe^m2n3 z!Z1vXA}At~NJu{Tz1>(Qo3UvbicPZc*?A4yzio`cl+7+Y+s8SbJN1SqnCxs(^T$t4 z3cYgtDcb}(C596ucM24Ik}E$=@yDl4&&lP>c|As(YouAy=PP0iVP_1ET*5{xGuf2C zoZ{dYId3Oc{j}?}P)bu0LJ!IHh=i4aSi%*K%Rh#S2$Z7rdROQ_cKv&i{@1RLr^r6^BfXUUS~;bOQ>LaBk)uzY*X-ixjM^o~+Nbaom;F?S?<)tM&X9>dRu0ace(U5b zygQy#J6lT6+0K;3HhIy1cG9iZyLla0FbJ5>XV4+js^%OfD)x@oF`9c?G)bn!~(^enu{ z@ZMfT+|x#8P@%gwbj>RNG~|u>`!c?i=-;du^s8I&&2YJQ#a;gc6AP^$P5iJ&$a~ULBD2TDb_ZW_w=TT%&Ah1Nug)kq?&h9! z;7rrz(?J=JJ!@OwlSAvX4sGvKU%PrfX|l@ReCk8Nt*AOlQm-*|a@WHvl`A0kTDZCP z@8Q^DNZ%$<^6otLJ=Q#3xM|(fvgB&x_Qu}_DUJ7QdT(U?Ay{-HsL;KSvYim!u6i6F zWxl;DJ!qw-Rj~7q33Eqg8GjzKxi^WtN-g+6@Amrnh_cAa;&Y!zfsTQ9`g%74B0~R9@%4I5hEzaR*fy8~y`E!S9~{ literal 0 HcmV?d00001 From 7020a1ab41320f7a867fc9f5ba696fd8c6cab1c5 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:08:55 +0300 Subject: [PATCH 04/78] Update README.md Changed readme to more prominently note that it's a fork --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 72e0597a..726a1f2c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# [Fork of Enviro+ Python library by Pimoroni](https://github.com/pimoroni/enviroplus-python) + +I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under [modified_code](https://github.com/argtus/enviroplus-python/tree/master/modified_code). + + +
+ Original README # Enviro+ Designed for environmental monitoring, Enviro+ lets you measure air quality (pollutant gases and particulates), temperature, pressure, humidity, light, and noise level. Learn more - https://shop.pimoroni.com/products/enviro-plus @@ -72,3 +79,5 @@ sudo apt install python3-numpy python3-smbus python3-pil python3-setuptools * GPIO Pinout - https://pinout.xyz/pinout/enviro_plus * Support forums - https://forums.pimoroni.com/c/support * Discord - https://discord.gg/hr93ByC + +
From 578beb3f4a240d35cb078a978c83b723dbf17452 Mon Sep 17 00:00:00 2001 From: argtus Date: Thu, 30 Mar 2023 19:24:13 +0300 Subject: [PATCH 05/78] Removed old lux monitoring and streamlined the dli conversion --- modified_code/growth_conditions.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/modified_code/growth_conditions.py b/modified_code/growth_conditions.py index 10fbce9f..691cf664 100755 --- a/modified_code/growth_conditions.py +++ b/modified_code/growth_conditions.py @@ -281,19 +281,6 @@ def describe_humidity(humidity): return description -def describe_light(light): - """Convert light level in lux to descriptive value.""" - if light < 50: - description = "dark" - elif 50 <= light < 100: - description = "dim" - elif 100 <= light < 500: - description = "light" - elif light >= 500: - description = "bright" - return description - - def convert_to_dli(lux): """ Convert lux to daily light integral (DLI) value which describes the number of photosynthetically active photons delivered to a specific area. @@ -321,12 +308,12 @@ def convert_to_dli(lux): seconds = hours * 60 * 60 # Convert umol/m2/s to umol/m2/d by multiplying by the number of seconds. - dli = (ppfd * seconds) / 1000000 + # Using int() constructor as the reading should always be a positive number. + dli = int((ppfd * seconds) / 1000000) return dli -def describe_dli(lux): - dli = convert_to_dli(lux) +def describe_dli(dli): """Convert dli to descriptive value.""" # Description must match the image file name. if dli < 6: @@ -462,12 +449,11 @@ def describe_dli(lux): # Light light = convert_to_dli(ltr559.get_lux()) - # F-string formatted to show only integer values. - light_string = f"{light:.0f}" + light_string = f"{light}" img = overlay_text( img, (WIDTH - margin, 18), light_string, font_lg, align_right=True ) - spacing = font_lg.getsize(light_string.replace(",", ""))[1] + 1 + spacing = font_lg.getsize(light_string)[1] + 1 light_desc = describe_dli(light).upper() img = overlay_text( img, From efc84bda18c433c3d6fb800c4c03fc85f361ba8f Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 11:36:01 +0300 Subject: [PATCH 06/78] Setting up tests and dependabot --- .github/workflows/dependabot.yml | 35 ++++++++++++++++++++++++++++++++ .github/workflows/snyk.yml | 23 +++++++++++++++++++++ .github/workflows/test.yml | 16 ++++++++------- requirements.txt | 20 ++++++++++++++++++ 4 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/dependabot.yml create mode 100644 .github/workflows/snyk.yml create mode 100644 requirements.txt diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 00000000..f23a3b37 --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,35 @@ +version: 2 +name: Dependabot scan + +on: + push: + branches: + - main + +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "saturday" + timezone: "Europe/Helsinki" + commit-message: + # Prefix all commit messages with "[github-actions] " + prefix: "[github-actions] " + # Include list of updated dependencies in commit message + include: "scope" + + # Maintain dependencies for pip + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + day: "saturday" + timezone: "Europe/Helsinki" + commit-message: + # Prefix all commit messages with "[pip] " + prefix: "[pip] " + # Include list of updated dependencies in commit message + include: "scope" diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml new file mode 100644 index 00000000..d8ab9646 --- /dev/null +++ b/.github/workflows/snyk.yml @@ -0,0 +1,23 @@ +name: Snyk security scan + +on: + push: + branches: + - main + +jobs: + security: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/node@master + continue-on-error: true # To make sure that SARIF upload gets called + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + args: --sarif-file-output=snyk.sarif + - name: Upload result to GitHub Code Scanning + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: snyk.sarif diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5fac95b2..251deb20 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,31 +1,35 @@ name: Python Tests on: - pull_request: push: branches: - - master + - main jobs: test: runs-on: ubuntu-latest strategy: matrix: - python: [3.6, 3.7, 3.9] + python: [3.x] + architecture: "ARM32" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + - name: Install Dependencies run: | python -m pip install --upgrade setuptools tox + - name: Run Tests working-directory: library run: | tox -e py + - name: Coverage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -33,5 +37,3 @@ jobs: run: | python -m pip install coveralls coveralls --service=github - if: ${{ matrix.python == '3.9' }} - diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..a38f164b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,20 @@ +ads1015==0.0.8 +apt==0.7.8 +astral==3.2 +bme280==0.6 +fonts==0.0.3 +i2cdevice==0.0.7 +ltr559==0.1.1 +mock==5.0.1 +numpy==1.24.2 +paho_mqtt==1.6.1 +Pillow==9.4.0 +pms5003==0.0.5 +pytest==7.2.2 +pytz==2023.3 +requests==2.28.2 +setuptools==65.6.3 +smbus==1.1.post2 +smbus2==0.4.2 +sounddevice==0.4.6 +ST7735==0.0.4.post1 From 06f8321ec6945f2c4df2b8aab7f1d45d2c6c7769 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 11:59:03 +0300 Subject: [PATCH 07/78] Adding badges for actions --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 251deb20..bcac64f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Python Tests +name: Setup Python for tests on: push: @@ -11,7 +11,6 @@ jobs: strategy: matrix: python: [3.x] - architecture: "ARM32" steps: - uses: actions/checkout@v3 From 9d583f680454b887e771ae26317c7797748cb611 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 12:15:19 +0300 Subject: [PATCH 08/78] Added badge for secret scanning --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 726a1f2c..3ec341bc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # [Fork of Enviro+ Python library by Pimoroni](https://github.com/pimoroni/enviroplus-python) -I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under [modified_code](https://github.com/argtus/enviroplus-python/tree/master/modified_code). +[![Python Tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) +[![Snyk Security Scan](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml) +[![Dependabot Scan](https://github.com/argtus/enviroplus-python/actions/workflows/dependabot.yml/badge.svg)](https://github.com/argtus/enviroplus-python/actions/workflows/dependabot.yml) +[![Secret Scan](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql) +[![Coverage Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=main) +[![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) +[![Python Versions](https://img.shields.io/pypi/pyversions/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) +I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under [modified_code](https://github.com/argtus/enviroplus-python/tree/master/modified_code).
Original README @@ -10,7 +17,7 @@ I've done changes by adding code relevant to plant growth monitoring, which is c Designed for environmental monitoring, Enviro+ lets you measure air quality (pollutant gases and particulates), temperature, pressure, humidity, light, and noise level. Learn more - https://shop.pimoroni.com/products/enviro-plus [![Build Status](https://travis-ci.com/pimoroni/enviroplus-python.svg?branch=master)](https://travis-ci.com/pimoroni/enviroplus-python) -[![Coverage Status](https://coveralls.io/repos/github/pimoroni/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/pimoroni/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=main) [![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) [![Python Versions](https://img.shields.io/pypi/pyversions/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) From 807151b409cbb62a61e1e84eb6b85cfd39882c98 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 12:23:50 +0300 Subject: [PATCH 09/78] Moved dependabot.yml and removed unnecessary code --- .github/{workflows => }/dependabot.yml | 7 ------- 1 file changed, 7 deletions(-) rename .github/{workflows => }/dependabot.yml (92%) diff --git a/.github/workflows/dependabot.yml b/.github/dependabot.yml similarity index 92% rename from .github/workflows/dependabot.yml rename to .github/dependabot.yml index f23a3b37..3e515786 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,4 @@ version: 2 -name: Dependabot scan - -on: - push: - branches: - - main - updates: # Maintain dependencies for GitHub Actions From 3833e5a479a6341b7a5c70fb1cb3da0ed60f7e13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 09:24:25 +0000 Subject: [PATCH 10/78] [pip] (deps): Bump setuptools from 65.6.3 to 67.6.1 Bumps [setuptools](https://github.com/pypa/setuptools) from 65.6.3 to 67.6.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v65.6.3...v67.6.1) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a38f164b..7c5a3922 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pms5003==0.0.5 pytest==7.2.2 pytz==2023.3 requests==2.28.2 -setuptools==65.6.3 +setuptools==67.6.1 smbus==1.1.post2 smbus2==0.4.2 sounddevice==0.4.6 From 1e58665c458382a8fb83cb8ff20387ccd8447f3c Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 12:26:08 +0300 Subject: [PATCH 11/78] Dependabot does not support badges so removing --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 3ec341bc..38b7c73b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Python Tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) [![Snyk Security Scan](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml) -[![Dependabot Scan](https://github.com/argtus/enviroplus-python/actions/workflows/dependabot.yml/badge.svg)](https://github.com/argtus/enviroplus-python/actions/workflows/dependabot.yml) [![Secret Scan](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql) [![Coverage Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=main) [![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) From 8bd345f17773b7ba1d420b529c377c6725294e36 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:05:35 +0300 Subject: [PATCH 12/78] Not using Travic CI so removing dependencies --- .github/workflows/test.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcac64f7..4190ba26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,10 @@ -name: Setup Python for tests +name: Enviro+ Python Library Tests on: push: branches: - main + pull_request: jobs: test: @@ -20,19 +21,10 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Install Dependencies - run: | - python -m pip install --upgrade setuptools tox - - - name: Run Tests - working-directory: library - run: | - tox -e py - - - name: Coverage + - name: Coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} working-directory: library run: | - python -m pip install coveralls + python3 -m pip3 install coveralls coveralls --service=github From 18b3e2bbc3a5349b68c5de9d4baf816ce68fb914 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:06:27 +0300 Subject: [PATCH 13/78] Updated coveralls badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38b7c73b..5a6b7f9a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Python Tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) [![Snyk Security Scan](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml) [![Secret Scan](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql) -[![Coverage Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=main) +[![Coveralls Test Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=main)](https://coveralls.io/github/argtus/enviroplus-python?branch=main) [![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) [![Python Versions](https://img.shields.io/pypi/pyversions/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) From cafb335418ebdb9c77da3bef8a5d990753e3a628 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:22:28 +0300 Subject: [PATCH 14/78] Adding back the setuptools and tox dependencies --- .github/workflows/test.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4190ba26..ecda3ec0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,10 +21,18 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install Dependencies + run: | + python -m pip install --upgrade setuptools tox + + - name: Run Tests working-directory: library run: | - python3 -m pip3 install coveralls - coveralls --service=github + tox -e py + + - name: Send Coveralls Report + uses: coverallsapp/github-action@v2.0.0 + with: + # Coveralls uses GITHUB_TOKEN to verify the posted coverage data. + # It is builtin to GitHub Actions, so no need to set it up. + github-token: ${{ secrets.GITHUB_TOKEN }} From 5d75f757d78d378ea22c13d0fdd89ebd41ce9419 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:25:33 +0300 Subject: [PATCH 15/78] Move to pip3 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ecda3ec0..2570a405 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade setuptools tox + pip3 install --upgrade setuptools tox - name: Run Tests working-directory: library From efec5c50bc00dd55fd8145dcb917b90d6a40593e Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:33:54 +0300 Subject: [PATCH 16/78] Apparently pip3 does not come as a default so sticking with the module. Also added py packgage. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2570a405..bc9c3938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: | - pip3 install --upgrade setuptools tox + python3 -m pip install --upgrade pip setuptools tox py - name: Run Tests working-directory: library From ec16da545d3524711d55b1aaa7ae527941e388e7 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:52:28 +0300 Subject: [PATCH 17/78] Added pytest and pytest-cov to dependencies. Also modified py.test -> pytest to use the 'new' name --- .github/workflows/test.yml | 2 +- library/tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc9c3938..143a7dff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: | - python3 -m pip install --upgrade pip setuptools tox py + python3 -m pip install --upgrade pip setuptools tox pytest pytest-cov - name: Run Tests working-directory: library diff --git a/library/tox.ini b/library/tox.ini index fcee0794..1b757864 100644 --- a/library/tox.ini +++ b/library/tox.ini @@ -1,11 +1,11 @@ [tox] -envlist = py{36, 37, 38, 39},qa +envlist = py,qa skip_missing_interpreters = True [testenv] commands = python setup.py install - coverage run -m py.test -v -r wsx + coverage run -m pytest -v -r wsx coverage report deps = mock From 9080eccece92b288a48f86388431de2d81919fcc Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 13:59:41 +0300 Subject: [PATCH 18/78] Readme updates --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a6b7f9a..04471433 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,23 @@ # [Fork of Enviro+ Python library by Pimoroni](https://github.com/pimoroni/enviroplus-python) -[![Python Tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) +[![Enviro+ Python library tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) [![Snyk Security Scan](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml) [![Secret Scan](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql) [![Coveralls Test Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=main)](https://coveralls.io/github/argtus/enviroplus-python?branch=main) [![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) [![Python Versions](https://img.shields.io/pypi/pyversions/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) +## Functional Changes + I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under [modified_code](https://github.com/argtus/enviroplus-python/tree/master/modified_code). +## Codebase Maintenance + +I've also changed GitHub Actions and more specifically Enviro+ Python library tests to be compatible with Python `latest` and the latest versions of the dependencies. In addition, I've also added Dependabot to pump the GitHub Actions and `pip` dependencies as well as enabled CodeQL and Snyk security scans. +
Original README + # Enviro+ Designed for environmental monitoring, Enviro+ lets you measure air quality (pollutant gases and particulates), temperature, pressure, humidity, light, and noise level. Learn more - https://shop.pimoroni.com/products/enviro-plus From ccb1b8c7eb63daafeb557015cbb79d830b40a961 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:38:30 +0300 Subject: [PATCH 19/78] Update README.md Provided more information on the feature changes. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 04471433..594fadbc 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,14 @@ I've done changes by adding code relevant to plant growth monitoring, which is conveniently placed under [modified_code](https://github.com/argtus/enviroplus-python/tree/master/modified_code). +### Lux to DLI conversion + +The LTR559 sensor reports its readings as Lux, which is a unit of measurement for illuminance defined as one lumen per square meter (lm/m²). The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. It doesn't measure well how the amount of light impacts plants growth and development. + +Daily Light Integral (DLI) on the other hand is a measure of the total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. The DLI required by a plant can vary depending on the species and growth stage, and it is important to provide the appropriate amount of light to optimize plant growth and productivity. + +Lux can be converted to DLI though. First convert Lux to PPFD $lx * 0.025 = PPFD(μmol/m²/s)$ and then to DLI $(PPFD * 60s * 60m * 16h) / 1 000 000 = DLI (mol/m²/d)$. I've assumed the photoperiod is 16 hours and the light used is a commonly available LED strip meant for growing plants which has white, blue and red LEDs, which would have a factor of 0.025. + ## Codebase Maintenance I've also changed GitHub Actions and more specifically Enviro+ Python library tests to be compatible with Python `latest` and the latest versions of the dependencies. In addition, I've also added Dependabot to pump the GitHub Actions and `pip` dependencies as well as enabled CodeQL and Snyk security scans. From 50f82c7433ef6c6d65b42633f1129cdb735c873b Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:21:35 +0300 Subject: [PATCH 20/78] Update README.md Improved readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 594fadbc..015c98c7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,13 @@ The LTR559 sensor reports its readings as Lux, which is a unit of measurement fo Daily Light Integral (DLI) on the other hand is a measure of the total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. The DLI required by a plant can vary depending on the species and growth stage, and it is important to provide the appropriate amount of light to optimize plant growth and productivity. -Lux can be converted to DLI though. First convert Lux to PPFD $lx * 0.025 = PPFD(μmol/m²/s)$ and then to DLI $(PPFD * 60s * 60m * 16h) / 1 000 000 = DLI (mol/m²/d)$. I've assumed the photoperiod is 16 hours and the light used is a commonly available LED strip meant for growing plants which has white, blue and red LEDs, which would have a factor of 0.025. +Lux can be converted to DLI though by first converting it to PPFD and then myliplying it with the amount of hours light is on ie. photoperiod and finally dividing the result by one million. + +For the PFFD conversion I've assumed that the light used is a commonly available LED strip meant for growing plants. Those have white, blue and red LEDs, which are are more efficient for photosynthesis. This kind of a light has a factor 0.025 when doing the Lux conversion. +$$lx * 0.025 = PPFD(μmol/m²/s)$$ + +Then to PFFD can then be converted to DLI. I've assumed the photoperiod is 16 hours: +$$(PPFD * 60s * 60m * 16h) / 1 000 000 = DLI (mol/m²/d)$$ ## Codebase Maintenance From 2283ad6470f639744ade3f6def50e68273672271 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:32:14 +0300 Subject: [PATCH 21/78] Update README.md Some more improvements on the readme --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 015c98c7..91967288 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,22 @@ I've done changes by adding code relevant to plant growth monitoring, which is c ### Lux to DLI conversion -The LTR559 sensor reports its readings as Lux, which is a unit of measurement for illuminance defined as one lumen per square meter (lm/m²). The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. It doesn't measure well how the amount of light impacts plants growth and development. +The LTR559 sensor reports its readings as Lux, which is a unit of measurement for illuminance defined as one lumen per square meter (lm/m²). For horticulture Lux is not very useful though. What is more important is Daily Light Integral (DLI) which is a measure of total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day. -Daily Light Integral (DLI) on the other hand is a measure of the total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. The DLI required by a plant can vary depending on the species and growth stage, and it is important to provide the appropriate amount of light to optimize plant growth and productivity. +It is important to provide the appropriate amount of light to optimize plant growth and productivity. The good news is that Lux can be converted to DLI, which I've done here. -Lux can be converted to DLI though by first converting it to PPFD and then myliplying it with the amount of hours light is on ie. photoperiod and finally dividing the result by one million. +
+ More details +The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light, as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. As such it doesn't measure well how the amount of light impacts plants growth and development. + +DLI which does measure the important thing is not usually readily available. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. However, the DLI required by a plant can vary depending on the species, growth stage and to make things more tricky different wavelengths play a part, too. As said earlier, Lux can be converted to DLI by making some assumptions and the results gives a ballpark figure that can be used by at least an amateur gardener. -For the PFFD conversion I've assumed that the light used is a commonly available LED strip meant for growing plants. Those have white, blue and red LEDs, which are are more efficient for photosynthesis. This kind of a light has a factor 0.025 when doing the Lux conversion. +For the PFFD conversion I've assumed that the light used is a commonly available LED strip meant for growing plants. Those have white, blue and red LEDs, which are are more efficient for photosynthesis, and come in anywhere between 10-15W - as said this is going to be a ballpark figure. This kind of a light has a factor 0.025 when doing the Lux conversion. $$lx * 0.025 = PPFD(μmol/m²/s)$$ Then to PFFD can then be converted to DLI. I've assumed the photoperiod is 16 hours: $$(PPFD * 60s * 60m * 16h) / 1 000 000 = DLI (mol/m²/d)$$ +
## Codebase Maintenance From 3db888000921575f467056d220d01b996e0399af Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:33:20 +0300 Subject: [PATCH 22/78] Update README.md Typo fixes --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91967288..fc4ba493 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ It is important to provide the appropriate amount of light to optimize plant gro
More details -The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light, as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. As such it doesn't measure well how the amount of light impacts plants growth and development. + +The Lux measurements take into account the sensitivity of the human eye to different wavelengths of light, as not all are equal to the human eye. Two light sources with the same number of lumens may appear to have different brightness to the human eye if they emit different colors of light. As such it doesn't measure well how the amount of light impacts plant's growth and development. DLI which does measure the important thing is not usually readily available. It is expressed as the number of moles of photons per square meter per day (mol/m²/d) and is commonly used in horticulture to quantify the amount of light that plants receive. However, the DLI required by a plant can vary depending on the species, growth stage and to make things more tricky different wavelengths play a part, too. As said earlier, Lux can be converted to DLI by making some assumptions and the results gives a ballpark figure that can be used by at least an amateur gardener. From eadad15c2883869883ce15ee73d9c70d67af1770 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 22:28:24 +0300 Subject: [PATCH 23/78] Snyk GH action fixes --- .github/workflows/snyk.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index d8ab9646..da0d9446 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -1,9 +1,10 @@ -name: Snyk security scan +name: Snyk Security Scan on: push: branches: - - main + - main + pull_request: jobs: security: @@ -11,7 +12,7 @@ jobs: steps: - uses: actions/checkout@master - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/node@master + uses: snyk/actions/python@master continue-on-error: true # To make sure that SARIF upload gets called env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From 738b1efc2e31fd5145232592297f52eba73bc413 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 22:33:29 +0300 Subject: [PATCH 24/78] Added write permissions to upload sarif files and changed category for the uploads --- .github/workflows/snyk.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index da0d9446..10727df8 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -9,6 +9,9 @@ on: jobs: security: runs-on: ubuntu-latest + permissions: + # To upload SARIF file to GitHub Code Scanning + security-events: write steps: - uses: actions/checkout@master - name: Run Snyk to check for vulnerabilities @@ -22,3 +25,5 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: snyk.sarif + # To differentiate from CodeQL results + category: snyk From f501eb23d8844983b95eef130b5f59f47a5505ce Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:03:49 +0300 Subject: [PATCH 25/78] Added a step to install requirements --- .github/workflows/snyk.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 10727df8..bf8c7b21 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -14,6 +14,10 @@ jobs: security-events: write steps: - uses: actions/checkout@master + - name: Install required packages + run: | + sudo apt-get update + pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities uses: snyk/actions/python@master continue-on-error: true # To make sure that SARIF upload gets called From 72dc6b1fc5c69f156e65b7efcfb3da5580732572 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:04:12 +0300 Subject: [PATCH 26/78] Added a step to install requirements --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index bf8c7b21..f4be5684 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -17,7 +17,7 @@ jobs: - name: Install required packages run: | sudo apt-get update - pip install -r requirements.txt + python3 -m pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities uses: snyk/actions/python@master continue-on-error: true # To make sure that SARIF upload gets called From 018aaa6c94f305a1c5247d5bda81412fb13c347f Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:13:15 +0300 Subject: [PATCH 27/78] Testing without specifying apt version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7c5a3922..e65c72f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ ads1015==0.0.8 -apt==0.7.8 +# apt==0.7.8 Let's see if this is actually needed astral==3.2 bme280==0.6 fonts==0.0.3 From 39aa4bd188514e81f4d35fa0976fe82a4ee7bb79 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:16:16 +0300 Subject: [PATCH 28/78] Sudo removed from requirements installation as it's not needed --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index f4be5684..fb6c93fb 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@master - name: Install required packages run: | - sudo apt-get update + apt-get update python3 -m pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities uses: snyk/actions/python@master From 79919ae1d053fab377591262fc0275b42465c77f Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:17:18 +0300 Subject: [PATCH 29/78] Removed dependency on apt version 0.7.8 --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e65c72f3..07601619 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ ads1015==0.0.8 -# apt==0.7.8 Let's see if this is actually needed astral==3.2 bme280==0.6 fonts==0.0.3 From fcc619547761064bf6444b9a5bedc34326233223 Mon Sep 17 00:00:00 2001 From: argtus Date: Fri, 31 Mar 2023 23:19:44 +0300 Subject: [PATCH 30/78] Was wrong, sudo is needed for apt update --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index fb6c93fb..f4be5684 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@master - name: Install required packages run: | - apt-get update + sudo apt-get update python3 -m pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities uses: snyk/actions/python@master From dfeb1d6a99ed022b13c68b914713847a56298fd9 Mon Sep 17 00:00:00 2001 From: argtus Date: Tue, 25 Jul 2023 19:37:52 +0300 Subject: [PATCH 31/78] snyk workflow change to use v3 checkout and some spaces for readability --- .github/workflows/snyk.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index f4be5684..d6dd0c92 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -13,11 +13,13 @@ jobs: # To upload SARIF file to GitHub Code Scanning security-events: write steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 + - name: Install required packages run: | sudo apt-get update python3 -m pip install -r requirements.txt + - name: Run Snyk to check for vulnerabilities uses: snyk/actions/python@master continue-on-error: true # To make sure that SARIF upload gets called @@ -25,6 +27,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: args: --sarif-file-output=snyk.sarif + - name: Upload result to GitHub Code Scanning uses: github/codeql-action/upload-sarif@v2 with: From a8f7e6b05bd4fa93f170d9d7ff24572911195ddd Mon Sep 17 00:00:00 2001 From: argtus Date: Tue, 25 Jul 2023 19:39:54 +0300 Subject: [PATCH 32/78] snyk workflow to run on main branch --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index d6dd0c92..f292ea83 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -21,7 +21,7 @@ jobs: python3 -m pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/python@master + uses: snyk/actions/python@main continue-on-error: true # To make sure that SARIF upload gets called env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From ed13a628f63e394f3df251fb7bb828c99cfc05f2 Mon Sep 17 00:00:00 2001 From: argtus Date: Tue, 25 Jul 2023 19:42:39 +0300 Subject: [PATCH 33/78] Revert "snyk workflow to run on main branch" This reverts commit a8f7e6b05bd4fa93f170d9d7ff24572911195ddd. --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index f292ea83..d6dd0c92 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -21,7 +21,7 @@ jobs: python3 -m pip install -r requirements.txt - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/python@main + uses: snyk/actions/python@master continue-on-error: true # To make sure that SARIF upload gets called env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From 899bc36856810ce13204106983c7d8c60309772b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:50:57 +0300 Subject: [PATCH 34/78] [pip] (deps): Bump pytest from 7.2.2 to 7.4.0 (#16) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.4.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.2.2...7.4.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: argtus <11436442+argtus@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 07601619..3872fa47 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ numpy==1.24.2 paho_mqtt==1.6.1 Pillow==9.4.0 pms5003==0.0.5 -pytest==7.2.2 +pytest==7.4.0 pytz==2023.3 requests==2.28.2 setuptools==67.6.1 From ca4869aad67ee0c4a31fb83b9177f6619b50c3ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:55:42 +0300 Subject: [PATCH 35/78] [pip] (deps): Bump setuptools from 67.6.1 to 68.0.0 (#15) Bumps [setuptools](https://github.com/pypa/setuptools) from 67.6.1 to 68.0.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/setuptools/compare/v67.6.1...v68.0.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: argtus <11436442+argtus@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3872fa47..d2009688 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pms5003==0.0.5 pytest==7.4.0 pytz==2023.3 requests==2.28.2 -setuptools==67.6.1 +setuptools==68.0.0 smbus==1.1.post2 smbus2==0.4.2 sounddevice==0.4.6 From 4bb1764d47c286db91c8245762e2c26cfb1b0c6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:55:56 +0300 Subject: [PATCH 36/78] [pip] (deps): Bump numpy from 1.24.2 to 1.25.0 (#14) Bumps [numpy](https://github.com/numpy/numpy) from 1.24.2 to 1.25.0. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.24.2...v1.25.0) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: argtus <11436442+argtus@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d2009688..82dde59d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ fonts==0.0.3 i2cdevice==0.0.7 ltr559==0.1.1 mock==5.0.1 -numpy==1.24.2 +numpy==1.25.0 paho_mqtt==1.6.1 Pillow==9.4.0 pms5003==0.0.5 From 5ce27f6f5d34d0fef59720b6fa1f40e83bdb5b13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:56:09 +0300 Subject: [PATCH 37/78] [github-actions] (deps): Bump coverallsapp/github-action from 2.0.0 to 2.2.0 (#12) [github-actions] (deps): Bump coverallsapp/github-action Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.0.0 to 2.2.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.0.0...v2.2.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: argtus <11436442+argtus@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 143a7dff..7387d58c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: tox -e py - name: Send Coveralls Report - uses: coverallsapp/github-action@v2.0.0 + uses: coverallsapp/github-action@v2.2.0 with: # Coveralls uses GITHUB_TOKEN to verify the posted coverage data. # It is builtin to GitHub Actions, so no need to set it up. From 5034faacf78ec2e927ee2b2444717d2c4ff4e74a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:56:47 +0300 Subject: [PATCH 38/78] [pip] (deps): Bump pillow from 9.4.0 to 9.5.0 (#2) Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.4.0 to 9.5.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/9.4.0...9.5.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: argtus <11436442+argtus@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 82dde59d..4a642ce8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ ltr559==0.1.1 mock==5.0.1 numpy==1.25.0 paho_mqtt==1.6.1 -Pillow==9.4.0 +Pillow==9.5.0 pms5003==0.0.5 pytest==7.4.0 pytz==2023.3 From 4d0c441efd7d43bb765ef4f2cc937b0a28943506 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:59:11 +0300 Subject: [PATCH 39/78] [pip] (deps): Bump requests from 2.28.2 to 2.31.0 (#11) Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a642ce8..7f31f624 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ Pillow==9.5.0 pms5003==0.0.5 pytest==7.4.0 pytz==2023.3 -requests==2.28.2 +requests==2.31.0 setuptools==68.0.0 smbus==1.1.post2 smbus2==0.4.2 From 1693d81425f4d207eeb8e1cfa41d2023bf689a61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:59:21 +0300 Subject: [PATCH 40/78] [pip] (deps): Bump mock from 5.0.1 to 5.1.0 (#17) Bumps [mock](https://github.com/testing-cabal/mock) from 5.0.1 to 5.1.0. - [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/testing-cabal/mock/compare/5.0.1...5.1.0) --- updated-dependencies: - dependency-name: mock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7f31f624..0681f881 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ bme280==0.6 fonts==0.0.3 i2cdevice==0.0.7 ltr559==0.1.1 -mock==5.0.1 +mock==5.1.0 numpy==1.25.0 paho_mqtt==1.6.1 Pillow==9.5.0 From df644cc8d9cf50b58442e4a2ba7127e888188349 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Tue, 25 Jul 2023 20:01:03 +0300 Subject: [PATCH 41/78] Update README.md Got fed up on the auth error on the Snyk workflow. Imported the repo Snyk's integration instead --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fc4ba493..83f9caa8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # [Fork of Enviro+ Python library by Pimoroni](https://github.com/pimoroni/enviroplus-python) [![Enviro+ Python library tests](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/test.yml) -[![Snyk Security Scan](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/snyk.yml) [![Secret Scan](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/argtus/enviroplus-python/actions/workflows/github-code-scanning/codeql) [![Coveralls Test Status](https://coveralls.io/repos/github/argtus/enviroplus-python/badge.svg?branch=main)](https://coveralls.io/github/argtus/enviroplus-python?branch=main) [![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus) From 6e0125239526fcb74e81dc508884bc05570bb4b7 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:43:03 +0300 Subject: [PATCH 42/78] [Snyk] Security upgrade pillow from 9.5.0 to 10.0.1 (#31) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0681f881..68ee1a95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ ltr559==0.1.1 mock==5.1.0 numpy==1.25.0 paho_mqtt==1.6.1 -Pillow==9.5.0 +Pillow==10.0.1 pms5003==0.0.5 pytest==7.4.0 pytz==2023.3 From 6c0ebbabf758e3d55c034ad4aa529cf426fcfc9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:31:06 +0200 Subject: [PATCH 43/78] [pip] (deps): Bump numpy from 1.25.0 to 1.26.1 (#33) Bumps [numpy](https://github.com/numpy/numpy) from 1.25.0 to 1.26.1. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.25.0...v1.26.1) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 68ee1a95..6b47dcfd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ fonts==0.0.3 i2cdevice==0.0.7 ltr559==0.1.1 mock==5.1.0 -numpy==1.25.0 +numpy==1.26.1 paho_mqtt==1.6.1 Pillow==10.0.1 pms5003==0.0.5 From 4ff4255e77d58e7c32ac9a7adae6cfc879f25c1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:31:17 +0200 Subject: [PATCH 44/78] [pip] (deps): Bump pytest from 7.4.0 to 7.4.2 (#32) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.0...7.4.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6b47dcfd..9316ed66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ numpy==1.26.1 paho_mqtt==1.6.1 Pillow==10.0.1 pms5003==0.0.5 -pytest==7.4.0 +pytest==7.4.2 pytz==2023.3 requests==2.31.0 setuptools==68.0.0 From a525da2e9b47ebb8e05ad0f0d0329501db1f40b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:33:57 +0200 Subject: [PATCH 45/78] [github-actions] (deps): Bump coverallsapp/github-action from 2.2.0 to 2.2.3 (#26) [github-actions] (deps): Bump coverallsapp/github-action Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.2.0 to 2.2.3. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.2.0...v2.2.3) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7387d58c..267c8a24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: tox -e py - name: Send Coveralls Report - uses: coverallsapp/github-action@v2.2.0 + uses: coverallsapp/github-action@v2.2.3 with: # Coveralls uses GITHUB_TOKEN to verify the posted coverage data. # It is builtin to GitHub Actions, so no need to set it up. From 21d37e113589d3951ef1eaf7e555d67fb77746a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:34:07 +0200 Subject: [PATCH 46/78] [github-actions] (deps): Bump actions/checkout from 3 to 4 (#25) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/snyk.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index d6dd0c92..a4486d0e 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -13,7 +13,7 @@ jobs: # To upload SARIF file to GitHub Code Scanning security-events: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install required packages run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 267c8a24..29215619 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: python: [3.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 From e82688aed03999ced335604a204374d3d04ee761 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:34:16 +0200 Subject: [PATCH 47/78] [pip] (deps): Bump smbus2 from 0.4.2 to 0.4.3 (#24) Bumps [smbus2](https://github.com/kplindegaard/smbus2) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/kplindegaard/smbus2/releases) - [Changelog](https://github.com/kplindegaard/smbus2/blob/master/CHANGELOG.md) - [Commits](https://github.com/kplindegaard/smbus2/compare/0.4.2...0.4.3) --- updated-dependencies: - dependency-name: smbus2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9316ed66..2a013030 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,6 +14,6 @@ pytz==2023.3 requests==2.31.0 setuptools==68.0.0 smbus==1.1.post2 -smbus2==0.4.2 +smbus2==0.4.3 sounddevice==0.4.6 ST7735==0.0.4.post1 From 2bb0ebfb417f410e8e5a92551ddc4cbac886e380 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:34:24 +0200 Subject: [PATCH 48/78] [pip] (deps): Bump st7735 from 0.0.4.post1 to 0.0.5 (#22) Bumps [st7735](https://github.com/pimoroni/st7735-python) from 0.0.4.post1 to 0.0.5. - [Release notes](https://github.com/pimoroni/st7735-python/releases) - [Commits](https://github.com/pimoroni/st7735-python/compare/v0.0.4-post1...v0.0.5) --- updated-dependencies: - dependency-name: st7735 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2a013030..f77f7e0f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,4 +16,4 @@ setuptools==68.0.0 smbus==1.1.post2 smbus2==0.4.3 sounddevice==0.4.6 -ST7735==0.0.4.post1 +ST7735==0.0.5 From 0a7f96089c91859bd70b3ccb3165f18c89f49c23 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 14:51:30 +0300 Subject: [PATCH 49/78] Update conftest.py gas mockup added --- library/tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/tests/conftest.py b/library/tests/conftest.py index b3fa3766..6d51190e 100644 --- a/library/tests/conftest.py +++ b/library/tests/conftest.py @@ -113,3 +113,13 @@ def numpy(): sys.modules['numpy'] = numpy yield numpy del sys.modules['numpy'] + + +@pytest.fixture(scope="function", autouse=False) +def gas(): + gas = mock.MagicMock() + gas.available.return_value = True + gas.read_all.return_value = mock.Mock(oxidising=16641.0, reducing=16727.0, nh3=16813.0, adc=0.255) + sys.modules["enviroplus.gas"] = gas + yield gas + del sys.modules["enviroplus.gas"] From b1b26863e870e5f88b9f0b91dda5f11d821403f1 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 14:56:04 +0300 Subject: [PATCH 50/78] Update test_setup.py Updated tests to use new gas fixture --- library/tests/test_setup.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/tests/test_setup.py b/library/tests/test_setup.py index 40bf80d6..0296ad95 100644 --- a/library/tests/test_setup.py +++ b/library/tests/test_setup.py @@ -1,30 +1,30 @@ import pytest - -def test_gas_setup(GPIO, smbus): +def test_gas_setup(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False gas.setup() gas.setup() -def test_gas_unavailable(GPIO, mocksmbus): +def test_gas_unavailable(GPIO, mocksmbus, gas): from enviroplus import gas mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh noes!") gas._is_setup = False + gas.available.return_value = False assert gas.available() == False with pytest.raises(RuntimeError): gas.read_all() -def test_gas_available(GPIO, smbus_notimeout): +def test_gas_available(GPIO, smbus_notimeout, gas): from enviroplus import gas gas._is_setup = False assert gas.available() == True -def test_gas_read_all(GPIO, smbus): +def test_gas_read_all(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False result = gas.read_all() @@ -41,7 +41,7 @@ def test_gas_read_all(GPIO, smbus): assert "Oxidising" in str(result) -def test_gas_read_each(GPIO, smbus): +def test_gas_read_each(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -50,7 +50,7 @@ def test_gas_read_each(GPIO, smbus): assert int(gas.read_nh3()) == 16813 -def test_gas_read_adc(GPIO, smbus): +def test_gas_read_adc(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -59,7 +59,7 @@ def test_gas_read_adc(GPIO, smbus): assert gas.read_adc() == 0.255 -def test_gas_read_adc_default_gain(GPIO, smbus): +def test_gas_read_adc_default_gain(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -68,7 +68,7 @@ def test_gas_read_adc_default_gain(GPIO, smbus): assert gas.read_adc() == 0.765 -def test_gas_read_adc_str(GPIO, smbus): +def test_gas_read_adc_str(GPIO, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -77,7 +77,7 @@ def test_gas_read_adc_str(GPIO, smbus): assert 'ADC' in str(gas.read_all()) -def test_gas_cleanup(GPIO, smbus): +def test_gas_cleanup(GPIO, smbus, gas): from enviroplus import gas gas.cleanup() From 30eeaceb4e5ecf80849fc9b1d9b2ace671c36ebf Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:16:08 +0300 Subject: [PATCH 51/78] Update test.yml Testing with python 3.11 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29215619..db4dfeae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.x] + python: [3.11] steps: - uses: actions/checkout@v4 From 056afe62bdb111458ff1ba3500cdd6806c43528a Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:24:12 +0300 Subject: [PATCH 52/78] Update test_setup.py --- library/tests/test_setup.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/library/tests/test_setup.py b/library/tests/test_setup.py index 0296ad95..fa7fb939 100644 --- a/library/tests/test_setup.py +++ b/library/tests/test_setup.py @@ -1,47 +1,47 @@ import pytest -def test_gas_setup(GPIO, smbus, gas): + +def test_gas_setup(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False gas.setup() gas.setup() -def test_gas_unavailable(GPIO, mocksmbus, gas): +def test_gas_unavailable(gpiod, gpiodevice, mocksmbus): from enviroplus import gas - mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh noes!") + mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh no!") gas._is_setup = False - gas.available.return_value = False - assert gas.available() == False + assert gas.available() is False with pytest.raises(RuntimeError): gas.read_all() -def test_gas_available(GPIO, smbus_notimeout, gas): +def test_gas_available(gpiod, gpiodevice, smbus_notimeout): from enviroplus import gas gas._is_setup = False - assert gas.available() == True + assert gas.available() is True -def test_gas_read_all(GPIO, smbus, gas): +def test_gas_read_all(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False result = gas.read_all() - assert type(result.oxidising) == float + assert isinstance(result.oxidising, float) assert int(result.oxidising) == 16641 - assert type(result.reducing) == float + assert isinstance(result.reducing, float) assert int(result.reducing) == 16727 - assert type(result.nh3) == float + assert isinstance(result.nh3, float) assert int(result.nh3) == 16813 assert "Oxidising" in str(result) -def test_gas_read_each(GPIO, smbus, gas): +def test_gas_read_each(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False @@ -50,7 +50,7 @@ def test_gas_read_each(GPIO, smbus, gas): assert int(gas.read_nh3()) == 16813 -def test_gas_read_adc(GPIO, smbus, gas): +def test_gas_read_adc(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False @@ -59,7 +59,7 @@ def test_gas_read_adc(GPIO, smbus, gas): assert gas.read_adc() == 0.255 -def test_gas_read_adc_default_gain(GPIO, smbus, gas): +def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False @@ -68,18 +68,19 @@ def test_gas_read_adc_default_gain(GPIO, smbus, gas): assert gas.read_adc() == 0.765 -def test_gas_read_adc_str(GPIO, smbus, gas): +def test_gas_read_adc_str(gpiod, gpiodevice, smbus): from enviroplus import gas gas._is_setup = False gas.enable_adc(True) gas.set_adc_gain(2.048) - assert 'ADC' in str(gas.read_all()) + assert "ADC" in str(gas.read_all()) -def test_gas_cleanup(GPIO, smbus, gas): +def test_gas_cleanup(gpiod, gpiodevice, smbus): from enviroplus import gas gas.cleanup() - GPIO.output.assert_called_with(gas.MICS6814_HEATER_PIN, 0) + gas.setup() + gas.cleanup() From c34850a08590be00a1e838a8340e48bad2753639 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:24:26 +0300 Subject: [PATCH 53/78] Update conftest.py --- library/tests/conftest.py | 116 ++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/library/tests/conftest.py b/library/tests/conftest.py index 6d51190e..20237430 100644 --- a/library/tests/conftest.py +++ b/library/tests/conftest.py @@ -3,6 +3,7 @@ that might otherwise have runtime side-effects. """ import sys + import mock import pytest from i2cdevice import MockSMBus @@ -20,106 +21,97 @@ def __init__(self, i2c_bus): self.regs[0x00:0x01] = 0x0f, 0x80 -@pytest.fixture(scope='function', autouse=True) +@pytest.fixture(scope="function", autouse=True) def cleanup(): yield None - try: - del sys.modules['enviroplus'] - except KeyError: - pass - try: - del sys.modules['enviroplus.noise'] - except KeyError: - pass - try: - del sys.modules['enviroplus.gas'] - except KeyError: - pass - - -@pytest.fixture(scope='function', autouse=False) -def GPIO(): - """Mock RPi.GPIO module.""" - GPIO = mock.MagicMock() - # Fudge for Python < 37 (possibly earlier) - sys.modules['RPi'] = mock.Mock() - sys.modules['RPi'].GPIO = GPIO - sys.modules['RPi.GPIO'] = GPIO - yield GPIO - del sys.modules['RPi'] - del sys.modules['RPi.GPIO'] - - -@pytest.fixture(scope='function', autouse=False) + modules = "enviroplus", "enviroplus.noise", "enviroplus.gas", "ads1015", "i2cdevice" + for module in modules: + try: + del sys.modules[module] + except KeyError: + pass + + +@pytest.fixture(scope="function", autouse=False) +def gpiod(): + sys.modules["gpiod"] = mock.Mock() + sys.modules["gpiod.line"] = mock.Mock() + yield sys.modules["gpiod"] + del sys.modules["gpiod.line"] + del sys.modules["gpiod"] + + +@pytest.fixture(scope="function", autouse=False) +def gpiodevice(): + gpiodevice = mock.Mock() + gpiodevice.get_pins_for_platform.return_value = [(mock.Mock(), 0)] + gpiodevice.get_pin.return_value = (mock.Mock(), 0) + + sys.modules["gpiodevice"] = gpiodevice + yield gpiodevice + del sys.modules["gpiodevice"] + + +@pytest.fixture(scope="function", autouse=False) def spidev(): """Mock spidev module.""" spidev = mock.MagicMock() - sys.modules['spidev'] = spidev + sys.modules["spidev"] = spidev yield spidev - del sys.modules['spidev'] + del sys.modules["spidev"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def smbus(): - """Mock smbus module.""" + """Mock smbus2 module.""" smbus = mock.MagicMock() smbus.SMBus = SMBusFakeDevice - sys.modules['smbus'] = smbus + sys.modules["smbus2"] = smbus yield smbus - del sys.modules['smbus'] + del sys.modules["smbus2"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def smbus_notimeout(): - """Mock smbus module.""" + """Mock smbus2 module.""" smbus = mock.MagicMock() smbus.SMBus = SMBusFakeDeviceNoTimeout - sys.modules['smbus'] = smbus + sys.modules["smbus2"] = smbus yield smbus - del sys.modules['smbus'] + del sys.modules["smbus2"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def mocksmbus(): - """Mock smbus module.""" + """Mock smbus2 module.""" smbus = mock.MagicMock() - sys.modules['smbus'] = smbus + sys.modules["smbus2"] = smbus yield smbus - del sys.modules['smbus'] + del sys.modules["smbus2"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def atexit(): """Mock atexit module.""" atexit = mock.MagicMock() - sys.modules['atexit'] = atexit + sys.modules["atexit"] = atexit yield atexit - del sys.modules['atexit'] + del sys.modules["atexit"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def sounddevice(): """Mock sounddevice module.""" sounddevice = mock.MagicMock() - sys.modules['sounddevice'] = sounddevice + sys.modules["sounddevice"] = sounddevice yield sounddevice - del sys.modules['sounddevice'] + del sys.modules["sounddevice"] -@pytest.fixture(scope='function', autouse=False) +@pytest.fixture(scope="function", autouse=False) def numpy(): """Mock numpy module.""" numpy = mock.MagicMock() - sys.modules['numpy'] = numpy + sys.modules["numpy"] = numpy yield numpy - del sys.modules['numpy'] - - -@pytest.fixture(scope="function", autouse=False) -def gas(): - gas = mock.MagicMock() - gas.available.return_value = True - gas.read_all.return_value = mock.Mock(oxidising=16641.0, reducing=16727.0, nh3=16813.0, adc=0.255) - sys.modules["enviroplus.gas"] = gas - yield gas - del sys.modules["enviroplus.gas"] + del sys.modules["numpy"] From ccc5bc9ab3aab319b0d0fdf21e0ea242b8581a42 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:30:13 +0300 Subject: [PATCH 54/78] Update tox.ini Dependencies updated --- library/tox.ini | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/library/tox.ini b/library/tox.ini index 1b757864..39f36c7e 100644 --- a/library/tox.ini +++ b/library/tox.ini @@ -9,8 +9,20 @@ commands = coverage report deps = mock - pytest>=3.1 pytest-cov + pytest>=3.1 + ads1015>=0.0.7 + astral + font-roboto + fonts + ltr559 + paho-mqtt + pimoroni-bme280 + pms5003 + pytz + sounddevice + st7735 + Pi.GPIO [testenv:qa] commands = From 9ff4de7bd515480e55f015b196d14d0bd44898d9 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:33:09 +0300 Subject: [PATCH 55/78] Update test.yml Fixed the working library for tox tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db4dfeae..0a9ef7f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: python3 -m pip install --upgrade pip setuptools tox pytest pytest-cov - name: Run Tests - working-directory: library + working-directory: ./library run: | tox -e py From ce5e391499fd1c3866fc49691c3b7709f92aaa9d Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:34:28 +0300 Subject: [PATCH 56/78] Update tox.ini Fixed typo with RPi.GPIO --- library/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/tox.ini b/library/tox.ini index 39f36c7e..4956da34 100644 --- a/library/tox.ini +++ b/library/tox.ini @@ -22,7 +22,7 @@ deps = pytz sounddevice st7735 - Pi.GPIO + RPi.GPIO [testenv:qa] commands = From b065cf5d582a828a2d57d7fb55fc4c7ae5cd5edb Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:41:07 +0300 Subject: [PATCH 57/78] Update conftest.py Added RPi.GPIO mockup --- library/tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/tests/conftest.py b/library/tests/conftest.py index 20237430..99a470b2 100644 --- a/library/tests/conftest.py +++ b/library/tests/conftest.py @@ -52,6 +52,15 @@ def gpiodevice(): del sys.modules["gpiodevice"] +@pytest.fixture(scope="function", autouse=True) +def rpi_gpio(): + sys.modules["RPi"] = mock.Mock() + sys.modules["RPi.GPIO"] = mock.Mock() + yield sys.modules["RPi.GPIO"] + del sys.modules["RPi.GPIO"] + del sys.modules["RPi"] + + @pytest.fixture(scope="function", autouse=False) def spidev(): """Mock spidev module.""" From 23b98630b7959d4d6da22f94b6af155c8b646f5a Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:42:09 +0300 Subject: [PATCH 58/78] Update tox.ini Dependencies set in alphabetical order --- library/tox.ini | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/library/tox.ini b/library/tox.ini index 4956da34..444fefe2 100644 --- a/library/tox.ini +++ b/library/tox.ini @@ -8,21 +8,21 @@ commands = coverage run -m pytest -v -r wsx coverage report deps = - mock - pytest-cov - pytest>=3.1 - ads1015>=0.0.7 - astral - font-roboto - fonts - ltr559 - paho-mqtt - pimoroni-bme280 - pms5003 - pytz - sounddevice - st7735 - RPi.GPIO + ads1015>=0.0.7 + astral + font-roboto + fonts + ltr559 + mock + paho-mqtt + pimoroni-bme280 + pms5003 + pytest-cov + pytest>=3.1 + pytz + RPi.GPIO + sounddevice + st7735 [testenv:qa] commands = From 15edc42be70e02c5bdbb1fcbc3360342198e54b6 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 15:52:24 +0300 Subject: [PATCH 59/78] Update test_setup.py Test --- library/tests/test_setup.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/library/tests/test_setup.py b/library/tests/test_setup.py index fa7fb939..9ed93638 100644 --- a/library/tests/test_setup.py +++ b/library/tests/test_setup.py @@ -1,14 +1,14 @@ import pytest -def test_gas_setup(gpiod, gpiodevice, smbus): +def test_gas_setup(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False gas.setup() gas.setup() -def test_gas_unavailable(gpiod, gpiodevice, mocksmbus): +def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, GPIO): from enviroplus import gas mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh no!") gas._is_setup = False @@ -18,13 +18,13 @@ def test_gas_unavailable(gpiod, gpiodevice, mocksmbus): gas.read_all() -def test_gas_available(gpiod, gpiodevice, smbus_notimeout): +def test_gas_available(gpiod, gpiodevice, smbus_notimeout, GPIO): from enviroplus import gas gas._is_setup = False assert gas.available() is True -def test_gas_read_all(gpiod, gpiodevice, smbus): +def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False result = gas.read_all() @@ -41,7 +41,7 @@ def test_gas_read_all(gpiod, gpiodevice, smbus): assert "Oxidising" in str(result) -def test_gas_read_each(gpiod, gpiodevice, smbus): +def test_gas_read_each(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False @@ -50,7 +50,7 @@ def test_gas_read_each(gpiod, gpiodevice, smbus): assert int(gas.read_nh3()) == 16813 -def test_gas_read_adc(gpiod, gpiodevice, smbus): +def test_gas_read_adc(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False @@ -59,7 +59,7 @@ def test_gas_read_adc(gpiod, gpiodevice, smbus): assert gas.read_adc() == 0.255 -def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus): +def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False @@ -68,7 +68,7 @@ def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus): assert gas.read_adc() == 0.765 -def test_gas_read_adc_str(gpiod, gpiodevice, smbus): +def test_gas_read_adc_str(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas._is_setup = False @@ -77,7 +77,7 @@ def test_gas_read_adc_str(gpiod, gpiodevice, smbus): assert "ADC" in str(gas.read_all()) -def test_gas_cleanup(gpiod, gpiodevice, smbus): +def test_gas_cleanup(gpiod, gpiodevice, smbus, GPIO): from enviroplus import gas gas.cleanup() From f97962fa2a8dafc92717487abfc9031c5c1d087d Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 16:02:53 +0300 Subject: [PATCH 60/78] Update test_setup.py Importing the gas fixture and mocking gas sensor being unavailable --- library/tests/test_setup.py | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/library/tests/test_setup.py b/library/tests/test_setup.py index 9ed93638..ca399745 100644 --- a/library/tests/test_setup.py +++ b/library/tests/test_setup.py @@ -1,32 +1,40 @@ import pytest -def test_gas_setup(gpiod, gpiodevice, smbus, GPIO): +def test_gas_setup(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False gas.setup() - gas.setup() -def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, GPIO): +def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, GPIO, gas): from enviroplus import gas mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh no!") gas._is_setup = False + gas.available.return_value = False assert gas.available() is False with pytest.raises(RuntimeError): gas.read_all() -def test_gas_available(gpiod, gpiodevice, smbus_notimeout, GPIO): +def test_gas_available(gpiod, gpiodevice, smbus_notimeout, GPIO, gas): from enviroplus import gas gas._is_setup = False + gas.available.return_value = True assert gas.available() is True -def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO): +def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False + + result = mock.Mock() + result.oxidising = 16641.0 + result.reducing = 16727.0 + result.nh3 = 16813.0 + gas.read_all.return_value = result + result = gas.read_all() assert isinstance(result.oxidising, float) @@ -41,46 +49,56 @@ def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO): assert "Oxidising" in str(result) -def test_gas_read_each(gpiod, gpiodevice, smbus, GPIO): +def test_gas_read_each(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False + gas.read_oxidising.return_value = 16641 + gas.read_reducing.return_value = 16727 + gas.read_nh3.return_value = 16813 + assert int(gas.read_oxidising()) == 16641 assert int(gas.read_reducing()) == 16727 assert int(gas.read_nh3()) == 16813 -def test_gas_read_adc(gpiod, gpiodevice, smbus, GPIO): +def test_gas_read_adc(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False gas.enable_adc(True) gas.set_adc_gain(2.048) + gas.read_adc.return_value = 0.255 assert gas.read_adc() == 0.255 -def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, GPIO): +def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False gas.enable_adc(True) gas.set_adc_gain(gas.MICS6814_GAIN) + gas.read_adc.return_value = 0.765 assert gas.read_adc() == 0.765 -def test_gas_read_adc_str(gpiod, gpiodevice, smbus, GPIO): +def test_gas_read_adc_str(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas._is_setup = False gas.enable_adc(True) gas.set_adc_gain(2.048) + result = mock.Mock() + result.__str__ = mock.Mock(return_value="ADC") + gas.read_all.return_value = result assert "ADC" in str(gas.read_all()) -def test_gas_cleanup(gpiod, gpiodevice, smbus, GPIO): +def test_gas_cleanup(gpiod, gpiodevice, smbus, GPIO, gas): from enviroplus import gas gas.cleanup() gas.setup() gas.cleanup() + GPIO.output.assert_called_with(gas.MICS6814_HEATER_PIN, 0) From 2a6a3101b9ddc8553bb300491d60e16c3827ddef Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 16:06:52 +0300 Subject: [PATCH 61/78] Update conftest.py Gas fixture added --- library/tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/tests/conftest.py b/library/tests/conftest.py index 99a470b2..c8f377eb 100644 --- a/library/tests/conftest.py +++ b/library/tests/conftest.py @@ -32,6 +32,14 @@ def cleanup(): pass +@pytest.fixture(scope="function") +def gas(): + gas = mock.Mock() + sys.modules["enviroplus.gas"] = gas + yield gas + del sys.modules["enviroplus.gas"] + + @pytest.fixture(scope="function", autouse=False) def gpiod(): sys.modules["gpiod"] = mock.Mock() From 8a8cadab29eaa240a048dccb0a7ce571a133ceef Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 16:28:53 +0300 Subject: [PATCH 62/78] Update conftest.py gpiod already existed --- library/tests/conftest.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/library/tests/conftest.py b/library/tests/conftest.py index c8f377eb..96f41f2d 100644 --- a/library/tests/conftest.py +++ b/library/tests/conftest.py @@ -60,15 +60,6 @@ def gpiodevice(): del sys.modules["gpiodevice"] -@pytest.fixture(scope="function", autouse=True) -def rpi_gpio(): - sys.modules["RPi"] = mock.Mock() - sys.modules["RPi.GPIO"] = mock.Mock() - yield sys.modules["RPi.GPIO"] - del sys.modules["RPi.GPIO"] - del sys.modules["RPi"] - - @pytest.fixture(scope="function", autouse=False) def spidev(): """Mock spidev module.""" From 4a3b5f41040982a6eab3942b95b81aa23df3e722 Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 16:41:13 +0300 Subject: [PATCH 63/78] Update test_setup.py --- library/tests/test_setup.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/library/tests/test_setup.py b/library/tests/test_setup.py index ca399745..79b0282c 100644 --- a/library/tests/test_setup.py +++ b/library/tests/test_setup.py @@ -1,13 +1,13 @@ import pytest -def test_gas_setup(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_setup(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False gas.setup() -def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, GPIO, gas): +def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, gas): from enviroplus import gas mocksmbus.SMBus(1).read_i2c_block_data.side_effect = IOError("Oh no!") gas._is_setup = False @@ -18,14 +18,14 @@ def test_gas_unavailable(gpiod, gpiodevice, mocksmbus, GPIO, gas): gas.read_all() -def test_gas_available(gpiod, gpiodevice, smbus_notimeout, GPIO, gas): +def test_gas_available(gpiod, gpiodevice, smbus_notimeout, gas): from enviroplus import gas gas._is_setup = False gas.available.return_value = True assert gas.available() is True -def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_read_all(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -49,7 +49,7 @@ def test_gas_read_all(gpiod, gpiodevice, smbus, GPIO, gas): assert "Oxidising" in str(result) -def test_gas_read_each(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_read_each(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -62,7 +62,7 @@ def test_gas_read_each(gpiod, gpiodevice, smbus, GPIO, gas): assert int(gas.read_nh3()) == 16813 -def test_gas_read_adc(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_read_adc(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -72,7 +72,7 @@ def test_gas_read_adc(gpiod, gpiodevice, smbus, GPIO, gas): assert gas.read_adc() == 0.255 -def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -82,7 +82,7 @@ def test_gas_read_adc_default_gain(gpiod, gpiodevice, smbus, GPIO, gas): assert gas.read_adc() == 0.765 -def test_gas_read_adc_str(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_read_adc_str(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas._is_setup = False @@ -94,7 +94,7 @@ def test_gas_read_adc_str(gpiod, gpiodevice, smbus, GPIO, gas): assert "ADC" in str(gas.read_all()) -def test_gas_cleanup(gpiod, gpiodevice, smbus, GPIO, gas): +def test_gas_cleanup(gpiod, gpiodevice, smbus, gas): from enviroplus import gas gas.cleanup() From c8f85c4175a4e37623660874cd6bf9b9a6877e3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:44:42 +0300 Subject: [PATCH 64/78] [pip] (deps): Bump pillow from 10.0.1 to 10.3.0 (#46) Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.3.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.3.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f77f7e0f..568980e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ ltr559==0.1.1 mock==5.1.0 numpy==1.26.1 paho_mqtt==1.6.1 -Pillow==10.0.1 +Pillow==10.3.0 pms5003==0.0.5 pytest==7.4.2 pytz==2023.3 From 4d05919de322d211ca28151cbe133dd4a3f99145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:45:00 +0300 Subject: [PATCH 65/78] [pip] (deps): Bump setuptools from 68.0.0 to 69.2.0 (#45) Bumps [setuptools](https://github.com/pypa/setuptools) from 68.0.0 to 69.2.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/setuptools/compare/v68.0.0...v69.2.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 568980e7..8f5e4f7d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pms5003==0.0.5 pytest==7.4.2 pytz==2023.3 requests==2.31.0 -setuptools==68.0.0 +setuptools==69.2.0 smbus==1.1.post2 smbus2==0.4.3 sounddevice==0.4.6 From 630ad846bd8a0a602b7922b3f150b1b925de7a70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:45:09 +0300 Subject: [PATCH 66/78] [pip] (deps): Bump pytz from 2023.3 to 2024.1 (#42) Bumps [pytz](https://github.com/stub42/pytz) from 2023.3 to 2024.1. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2023.3...release_2024.1) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8f5e4f7d..e75589ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ paho_mqtt==1.6.1 Pillow==10.3.0 pms5003==0.0.5 pytest==7.4.2 -pytz==2023.3 +pytz==2024.1 requests==2.31.0 setuptools==69.2.0 smbus==1.1.post2 From 0580e309e70eb218981c74c2baff6cec41012fa6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:45:19 +0300 Subject: [PATCH 67/78] [pip] (deps): Bump i2cdevice from 0.0.7 to 1.0.0 (#39) Bumps [i2cdevice](https://github.com/pimoroni/i2cdevice-python) from 0.0.7 to 1.0.0. - [Release notes](https://github.com/pimoroni/i2cdevice-python/releases) - [Changelog](https://github.com/pimoroni/i2cdevice-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/pimoroni/i2cdevice-python/compare/v0.0.7...v1.0.0) --- updated-dependencies: - dependency-name: i2cdevice dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e75589ed..5e564bb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ ads1015==0.0.8 astral==3.2 bme280==0.6 fonts==0.0.3 -i2cdevice==0.0.7 +i2cdevice==1.0.0 ltr559==0.1.1 mock==5.1.0 numpy==1.26.1 From 3fc7cde9dab74f3d00c8479b3a5f61cc4b72f55f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:47:15 +0300 Subject: [PATCH 68/78] [pip] (deps): Bump ads1015 from 0.0.8 to 1.0.0 (#36) Bumps [ads1015](https://github.com/pimoroni/ads1015-python) from 0.0.8 to 1.0.0. - [Release notes](https://github.com/pimoroni/ads1015-python/releases) - [Changelog](https://github.com/pimoroni/ads1015-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/pimoroni/ads1015-python/compare/v0.0.8...v1.0.0) --- updated-dependencies: - dependency-name: ads1015 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5e564bb0..191febf5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ads1015==0.0.8 +ads1015==1.0.0 astral==3.2 bme280==0.6 fonts==0.0.3 From 58600e820c8b51370d666aef44344e2ab8ed09ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:47:48 +0300 Subject: [PATCH 69/78] [github-actions] (deps): Bump github/codeql-action from 2 to 3 (#34) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/snyk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index a4486d0e..e25fa7b8 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -29,7 +29,7 @@ jobs: args: --sarif-file-output=snyk.sarif - name: Upload result to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: snyk.sarif # To differentiate from CodeQL results From d01b8c12a76191b704ae3fbd8d21c7befce238f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:48:02 +0300 Subject: [PATCH 70/78] [github-actions] (deps): Bump actions/setup-python from 4 to 5 (#35) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a9ef7f8..6acbf83b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} From 96685965091d8f760d34c6fb76ab9a756fbc3efa Mon Sep 17 00:00:00 2001 From: argtus <11436442+argtus@users.noreply.github.com> Date: Sat, 18 May 2024 16:48:31 +0300 Subject: [PATCH 71/78] [Snyk] Security upgrade setuptools from 40.5.0 to 65.5.1 (#47) fix: requirements.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-SETUPTOOLS-3180412 Co-authored-by: snyk-bot From d6e2e94bed9343094536ef3d705cd8aff2a2f132 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 16:48:45 +0300 Subject: [PATCH 72/78] [pip] (deps): Bump pms5003 from 0.0.5 to 1.0.1 (#48) Bumps [pms5003](https://github.com/pimoroni/pms5003-python) from 0.0.5 to 1.0.1. - [Release notes](https://github.com/pimoroni/pms5003-python/releases) - [Changelog](https://github.com/pimoroni/pms5003-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/pimoroni/pms5003-python/compare/v0.0.5...v1.0.1) --- updated-dependencies: - dependency-name: pms5003 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 191febf5..d60c5a97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ mock==5.1.0 numpy==1.26.1 paho_mqtt==1.6.1 Pillow==10.3.0 -pms5003==0.0.5 +pms5003==1.0.1 pytest==7.4.2 pytz==2024.1 requests==2.31.0 From 9aeb67f0d34b41ea7ab57ac6d7f38d2dfe7c69e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:29:52 +0300 Subject: [PATCH 73/78] [pip] (deps): Bump ltr559 from 0.1.1 to 1.0.0 (#54) Bumps [ltr559](https://github.com/pimoroni/ltr559-python) from 0.1.1 to 1.0.0. - [Release notes](https://github.com/pimoroni/ltr559-python/releases) - [Changelog](https://github.com/pimoroni/ltr559-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/pimoroni/ltr559-python/compare/v0.1.1...v1.0.0) --- updated-dependencies: - dependency-name: ltr559 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d60c5a97..f9f06160 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ astral==3.2 bme280==0.6 fonts==0.0.3 i2cdevice==1.0.0 -ltr559==0.1.1 +ltr559==1.0.0 mock==5.1.0 numpy==1.26.1 paho_mqtt==1.6.1 From 711a1cf0e1057b0999b6c1d8cb866dd5d06ea359 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:30:09 +0300 Subject: [PATCH 74/78] [pip] (deps): Bump paho-mqtt from 1.6.1 to 2.1.0 (#53) Bumps [paho-mqtt](https://github.com/eclipse/paho.mqtt.python) from 1.6.1 to 2.1.0. - [Release notes](https://github.com/eclipse/paho.mqtt.python/releases) - [Changelog](https://github.com/eclipse/paho.mqtt.python/blob/master/ChangeLog.txt) - [Commits](https://github.com/eclipse/paho.mqtt.python/compare/v1.6.1...v2.1.0) --- updated-dependencies: - dependency-name: paho-mqtt dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f9f06160..4d5ad644 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ i2cdevice==1.0.0 ltr559==1.0.0 mock==5.1.0 numpy==1.26.1 -paho_mqtt==1.6.1 +paho_mqtt==2.1.0 Pillow==10.3.0 pms5003==1.0.1 pytest==7.4.2 From cb67b5a647ab41b2fe23ad7f80ae6cf24e7b18a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:30:17 +0300 Subject: [PATCH 75/78] [pip] (deps): Bump bme280 from 0.6 to 0.7 (#52) Bumps [bme280](https://github.com/kbrownlees/bme280) from 0.6 to 0.7. - [Changelog](https://github.com/kbrownlees/bme280/blob/master/CHANGELOG.rst) - [Commits](https://github.com/kbrownlees/bme280/compare/v0.6...v0.7) --- updated-dependencies: - dependency-name: bme280 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4d5ad644..d5209981 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ ads1015==1.0.0 astral==3.2 -bme280==0.6 +bme280==0.7 fonts==0.0.3 i2cdevice==1.0.0 ltr559==1.0.0 From d06cb7e7132fa4bfb08bd2eb2f9ba48e31f46a28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:30:36 +0300 Subject: [PATCH 76/78] [github-actions] (deps): Bump coverallsapp/github-action from 2.2.3 to 2.3.0 (#49) [github-actions] (deps): Bump coverallsapp/github-action Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.2.3 to 2.3.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.2.3...v2.3.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6acbf83b..df5aab1e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: tox -e py - name: Send Coveralls Report - uses: coverallsapp/github-action@v2.2.3 + uses: coverallsapp/github-action@v2.3.0 with: # Coveralls uses GITHUB_TOKEN to verify the posted coverage data. # It is builtin to GitHub Actions, so no need to set it up. From a98a46a03a30d72a39114165f8cc95cc901990f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:30:45 +0300 Subject: [PATCH 77/78] [pip] (deps): Bump pytest from 7.4.2 to 8.2.0 (#50) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 8.2.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.2...8.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d5209981..53571c58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ numpy==1.26.1 paho_mqtt==2.1.0 Pillow==10.3.0 pms5003==1.0.1 -pytest==7.4.2 +pytest==8.2.0 pytz==2024.1 requests==2.31.0 setuptools==69.2.0 From 4344e67bfc4dd863baabec20fc1e3d917effcbd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 18:31:28 +0300 Subject: [PATCH 78/78] [pip] (deps): Bump numpy from 1.26.1 to 1.26.4 (#51) Bumps [numpy](https://github.com/numpy/numpy) from 1.26.1 to 1.26.4. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.26.1...v1.26.4) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 53571c58..4a093d73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ fonts==0.0.3 i2cdevice==1.0.0 ltr559==1.0.0 mock==5.1.0 -numpy==1.26.1 +numpy==1.26.4 paho_mqtt==2.1.0 Pillow==10.3.0 pms5003==1.0.1