Compare commits
	
		
			No commits in common. "bc4d956042d4f45c58031be140bf09f96d6e300b" and "bc8391a5d58731928a378301d4911e66e8b6b39d" have entirely different histories.
		
	
	
		
			bc4d956042
			...
			bc8391a5d5
		
	
		
| 
						 | 
					@ -197,18 +197,15 @@ def calculate_meteor_shower_data(year: int) -> list[MeteorShower]:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for shower_id, shower_info in METEOR_SHOWERS.items():
 | 
					    for shower_id, shower_info in METEOR_SHOWERS.items():
 | 
				
			||||||
        # Calculate peak date based on solar longitude
 | 
					        # Calculate peak date based on solar longitude
 | 
				
			||||||
        peak_longitude = shower_info["peak_solar_longitude"]
 | 
					        peak_date = calculate_solar_longitude_date(
 | 
				
			||||||
        assert isinstance(peak_longitude, (int, float))
 | 
					            year, shower_info["peak_solar_longitude"]
 | 
				
			||||||
        peak_date = calculate_solar_longitude_date(year, peak_longitude)
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Calculate activity period
 | 
					        # Calculate activity period
 | 
				
			||||||
        start_longitude = shower_info["activity_start"]
 | 
					        activity_start = calculate_solar_longitude_date(
 | 
				
			||||||
        assert isinstance(start_longitude, (int, float))
 | 
					            year, shower_info["activity_start"]
 | 
				
			||||||
        activity_start = calculate_solar_longitude_date(year, start_longitude)
 | 
					        )
 | 
				
			||||||
 | 
					        activity_end = calculate_solar_longitude_date(year, shower_info["activity_end"])
 | 
				
			||||||
        end_longitude = shower_info["activity_end"]
 | 
					 | 
				
			||||||
        assert isinstance(end_longitude, (int, float))
 | 
					 | 
				
			||||||
        activity_end = calculate_solar_longitude_date(year, end_longitude)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Calculate moon phase at peak
 | 
					        # Calculate moon phase at peak
 | 
				
			||||||
        moon_illumination, moon_phase_desc = calculate_moon_phase(peak_date)
 | 
					        moon_illumination, moon_phase_desc = calculate_moon_phase(peak_date)
 | 
				
			||||||
| 
						 | 
					@ -238,9 +235,9 @@ def calculate_meteor_shower_data(year: int) -> list[MeteorShower]:
 | 
				
			||||||
            "peak": peak_formatted,
 | 
					            "peak": peak_formatted,
 | 
				
			||||||
            "active": active_formatted,
 | 
					            "active": active_formatted,
 | 
				
			||||||
            "rate": f"{shower_info['rate_min']}-{shower_info['rate_max']} meteors per hour",
 | 
					            "rate": f"{shower_info['rate_min']}-{shower_info['rate_max']} meteors per hour",
 | 
				
			||||||
            "radiant": str(shower_info["radiant_ra"]).split("h")[0]
 | 
					            "radiant": shower_info["radiant_ra"].split("h")[0]
 | 
				
			||||||
            + "h "
 | 
					            + "h "
 | 
				
			||||||
            + str(shower_info["radiant_dec"]),
 | 
					            + shower_info["radiant_dec"],
 | 
				
			||||||
            "moon_phase": moon_phase_desc,
 | 
					            "moon_phase": moon_phase_desc,
 | 
				
			||||||
            "visibility": shower_info["visibility"],
 | 
					            "visibility": shower_info["visibility"],
 | 
				
			||||||
            "description": shower_info["description"],
 | 
					            "description": shower_info["description"],
 | 
				
			||||||
| 
						 | 
					@ -258,7 +255,7 @@ def calculate_meteor_shower_data(year: int) -> list[MeteorShower]:
 | 
				
			||||||
        meteor_data.append(meteor_shower)
 | 
					        meteor_data.append(meteor_shower)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Sort by peak date
 | 
					    # Sort by peak date
 | 
				
			||||||
    meteor_data.sort(key=lambda x: datetime.strptime(str(x["peak_date"]), "%Y-%m-%d"))
 | 
					    meteor_data.sort(key=lambda x: datetime.strptime(x["peak_date"], "%Y-%m-%d"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return meteor_data
 | 
					    return meteor_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -158,6 +158,7 @@ async def recent() -> str:
 | 
				
			||||||
        "event_list.html",
 | 
					        "event_list.html",
 | 
				
			||||||
        today=now.date(),
 | 
					        today=now.date(),
 | 
				
			||||||
        events=events,
 | 
					        events=events,
 | 
				
			||||||
 | 
					        fullcalendar_events=calendar.build_events(events),
 | 
				
			||||||
        start_event_list=date.today() - timedelta(days=14),
 | 
					        start_event_list=date.today() - timedelta(days=14),
 | 
				
			||||||
        end_event_list=date.today(),
 | 
					        end_event_list=date.today(),
 | 
				
			||||||
        render_time=(time.time() - t0),
 | 
					        render_time=(time.time() - t0),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue