Skip to content

Commit

Permalink
tweaks to last updated la list output
Browse files Browse the repository at this point in the history
  • Loading branch information
robjharrison committed Jun 3, 2024
1 parent e5c9fc3 commit 9d125b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ofsted_childrens_services_inspection_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def save_to_html(data, column_order, local_link_column=None, web_link_column=Non
data.rename(columns={'Ltla23Cd': 'LTLA23CD', 'Urn': 'URN'}, inplace=True)


# Generate Most-recent-reports list
# Generate 'Most-recent-reports' list (last updated list)
# Remove this block if running locally (i.e. not in GitCodespace)
#
# Obtain list of those inspection reports that have updates
Expand All @@ -1218,12 +1218,12 @@ def save_to_html(data, column_order, local_link_column=None, web_link_column=Non
raise

try:
# Get current status of repo
# get current status of repo
changed_files = [item.a_path for item in repo.index.diff(None) if item.a_path.startswith(inspection_reports_folder)]
# untracked_files = repo.untracked_files

# changed repo files into a list for later use
las_with_new_inspection_list = [file for file in changed_files]
# remove the inspection_reports_folder path prefix from the file paths, create last updated list
las_with_new_inspection_list = [os.path.relpath(file, inspection_reports_folder) for file in changed_files]

except Exception as e:
print(f"Error processing repository: {e}")
Expand All @@ -1232,7 +1232,7 @@ def save_to_html(data, column_order, local_link_column=None, web_link_column=Non
# Chk + remove onward use of var las_with_new_inspection_list if running locally


# Initialise HTML content with title and CSS
# init HTML content with title and CSS
html_content = f"""
<html>
<head>
Expand Down

0 comments on commit 9d125b0

Please sign in to comment.