Skip to content

Commit

Permalink
Merge pull request #272 from beawitcht/development
Browse files Browse the repository at this point in the history
update dependencies, scripts, remove banner
  • Loading branch information
beawitcht authored Jan 22, 2024
2 parents bb8d18f + f1b8ab0 commit 9f8bad3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/forms/GICs.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"GICs": [["Wales", "Welsh Gender Service - Cardiff - Wait time (months): 12-13"], ["Scotland", "Edinburgh Chalmers Centre - Wait time (months): 23"], ["England", "Nottingham Centre for Transgender Health - Wait time (months): 23"], ["Scotland", "Grampian - Wait time (months): 24"], ["Scotland", "Inverness Highland Sexual Health - Wait time (months): 29"], ["England", "Leeds and York Partnership Trust - Wait time (months): 53"], ["England", "Northants Northamptonshire Healthcare Trust - Wait time (months): 53"], ["Scotland", "Glasgow Sandyford - Wait time (months): 55"], ["Northern Ireland", "Belfast Brackenburn Clinic - Wait time (months): 59"], ["England", "London Tavistock and Portman Trust - Wait time (months): 60"], ["England", "Sheffield Porterbrook Clinic - Wait time (months): 62"], ["England", "Exeter Devon Partnership Trust - Wait time (months): 87"]]}
{"GICs": [["Wales", "Welsh Gender Service - Cardiff - Wait time (months): 15"], ["Scotland", "Edinburgh Chalmers Centre - Wait time (months): 23"], ["England", "Nottingham Centre for Transgender Health - Wait time (months): 23"], ["Scotland", "Grampian - Wait time (months): 24"], ["Scotland", "Inverness Highland Sexual Health - Wait time (months): 29"], ["England", "Northants Northamptonshire Healthcare Trust - Wait time (months): 53"], ["Scotland", "Glasgow Sandyford - Wait time (months): 55"], ["England", "Leeds and York Partnership Trust - Wait time (months): 57"], ["Northern Ireland", "Belfast Brackenburn Clinic - Wait time (months): 59"], ["England", "London Tavistock and Portman Trust - Wait time (months): 60"], ["England", "Sheffield Porterbrook Clinic - Wait time (months): 62"], ["England", "Exeter Devon Partnership Trust - Wait time (months): 87"]]}
6 changes: 3 additions & 3 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gunicorn==21.2.0
flask==3.0.0
flask==3.0.1
docxtpl==0.16.7
jinja2==3.1.3
convertapi==1.7.0
Expand All @@ -10,6 +10,6 @@ Flask-Limiter==3.5.0
Flask-Caching==2.1.0
deepdiff==6.7.1
discord.py==2.3.2
pandas==2.1.4
bs4==0.0.1
pandas==2.2.0
bs4==0.0.2
feedparser==6.0.11
8 changes: 5 additions & 3 deletions app/scripts/gics.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async def on_ready():
else:
country = "England"

if "Not accepting new patients" not in to_be_seen:
options.append((country, f"{service} - Wait time (months): {to_be_seen}" if pd.notna(to_be_seen) else "Unknown"))
if "Not accepting new patients" not in str(to_be_seen):
options.append((country, f"{service} - Wait time (months): {to_be_seen}" if pd.notna(to_be_seen) else f"{service} - Wait time (months): Unknown"))

# Filter out under 18 services
youth_services = ["GIDS", "KOI", "Youth", "Hub"]
Expand All @@ -86,7 +86,9 @@ async def on_ready():


# Sort options by months remaining
options.sort(key=lambda x: int(re.search(r'\d+', str(x[1].split(': ')[1])).group()) if pd.notna(x[1].split(': ')[1]) and re.search(r'\d+', str(x[1].split(': ')[1])) else 9999)
print(options)
options = sorted(options, key=lambda x: int(re.search(r'\d+', str(x[1].split(': ')[1] if len(x) == 2 and 'Unknown' not in x[1] else '0')).group()))
print(options)

new_options = {"GICs": options}
new_options = json.dumps(new_options)
Expand Down
3 changes: 0 additions & 3 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
{% endblock %}
</head>
<body>
<div class="alert alert-warning" role="alert">
We're expanding this service and looking for your feedback, <a href="https://forms.gle/ZjNBisGtFBZQA9GV8" class="alert-link"> fill out the survey here for your chance to win a £10 amazon voucher.</a>
</div>
{% block body %}
{% endblock %}
</body>
Expand Down

0 comments on commit 9f8bad3

Please sign in to comment.