Skip to content

Commit

Permalink
updated readme and removed jinja2 files
Browse files Browse the repository at this point in the history
  • Loading branch information
lrdossan committed Nov 19, 2024
1 parent 7eaa0b5 commit 7587a46
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 429 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Contributions are welcome on our [GitHub repository](https://github.com/CERN/CAi

## Authors & License

Developed by CERN's HSE, Beams, and IT departments, in collaboration with WHO. © Copyright 2020-2021 CERN. All rights not expressly granted are reserved.
Developed by CERN's HSE, Beams, and IT departments, in collaboration with WHO.

© Copyright 2020-2021 CERN. All rights not expressly granted are reserved.<br>
Licensed under the Apache License, Version 2.0

See the full [license](caimira/LICENSE) for details.
9 changes: 3 additions & 6 deletions cern_caimira/src/cern_caimira/apps/calculator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def write_error(self, status_code: int, **kwargs) -> None:
get_url = template.globals['get_url'],
get_calculator_url = template.globals["get_calculator_url"],
active_page='Error',
documentation_url = template.globals["documentation_url"],
error_id=error_id,
status_code=status_code,
datetime=datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"),
Expand Down Expand Up @@ -278,6 +279,7 @@ def get(self):
template = template_environment.get_template(
"index.html.j2")
report = template.render(
documentation_url = template.globals["documentation_url"],
user=self.current_user,
get_url = template_environment.globals['get_url'],
get_calculator_url = template_environment.globals['get_calculator_url'],
Expand Down Expand Up @@ -458,12 +460,6 @@ def make_app(
(get_root_calculator_url(r'/baseline-model/result'), StaticModel),
(get_root_calculator_url(r'/api/arve/v1/(.*)/(.*)'), ArveData),
# Generic Pages
(get_root_url(r'/about'), GenericExtraPage, {
'active_page': 'about',
'filename': 'about.html.j2'}),
(get_root_calculator_url(r'/user-guide'), GenericExtraPage, {
'active_page': 'calculator/user-guide',
'filename': 'userguide.html.j2'}),
(get_root_url(r'/expert-app'), GenericExtraPage, {
'active_page': 'expert-app',
'filename': 'expert-app.html.j2'}),
Expand Down Expand Up @@ -510,6 +506,7 @@ def make_app(
)
template_environment.globals['get_url']=get_root_url
template_environment.globals['get_calculator_url']=get_root_calculator_url
template_environment.globals['documentation_url']='https://caimira.docs.cern.ch'

if debug:
tornado.log.enable_pretty_logging()
Expand Down
77 changes: 0 additions & 77 deletions cern_caimira/src/cern_caimira/apps/templates/about.html.j2

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -774,60 +774,15 @@
<br><br>

<div class="container container--padding">
<b>Quick Guide:</b><br>
This tool simulates the airborne spread SARS-CoV-2 virus in a finite volume and estimates the risk of COVID-19 infection. It is based on current scientific data and can be used to compare the effectiveness of different mitigation measures.<br>
<b>Virus data:</b> <br>
SARS-CoV-2 covers the original "wild type" strain of the virus and three variants of concern (VOC):<br>
<ul>
<li>Alpha (also known as B.1.1.7, first identified in UK, Sept 2020),</li>
<li>Beta (also known as B.1.351, first identified in South Africa, May 2020).</li>
<li>Gamma (also known as P.1, first identified in Brazil/Japan, Jan 2021).</li>
<li>Delta (also known as B.1.617.2, first identified in India, Oct 2020).</li>
<li>Omicron (also known as B.1.1.529, first identified in South Africa, November 2021).</li>
</ul>
Modify the default as necessary, according to local area prevalence e.g. for <a href="https://www.covid19.admin.ch/fr/epidemiologic/virus-variants?detGeo=GE">Geneva</a>
or <a href="https://www.santepubliquefrance.fr/dossiers/coronavirus-covid-19/covid-19-cartographie-des-variants-en-france-donnees-par-region-et-par-departement">Ain (France)</a>.<br>
<b>Ventilation data:</b> <br>
<ul>
<li>Mechanical ventilation = the HVAC supply of fresh air. Check the flow rates with the concerned technical department.</li>
<li>Natural ventilation = the type of window opening. The opening distance is between the fixed frame and movable part when open (commonly used values are window height of 1.6m and window opening between 0.15m and 0.6m). In case of periodic opening, specify the duration (e.g. 10 min) per hour.</li>
<li>HEPA filtration = the air flow of the device. The following values are based on the different fan velocities of a specific commercial device proposed by the HSE Unit:</li>
<ul>
<li>Level 6 (max) = 430 m<sup>3</sup>/h (noisy),</li>
<li>Level 5 = 250 m<sup>3</sup>/h (ok w.r.t. noise, recommended),</li>
<li>Level 4 = 130 m<sup>3</sup>/h (silent),</li>
<li>Level 3 = 95 m<sup>3</sup>/h (silent).</li>
</ul>
</ul>
<b>Activity types:</b><br>
The type of activity applies to both the infected and exposed persons:
<ul>
<li>Office = all seated, talking 33% of the time,</li>
<li>Small meeting (< 10 occ.) = all seated, talking time shared between all persons,</li>
<li>Large meeting (>= 10 occ.) = speaker is standing and speaking 33% of the time, other occupants are seated,</li>
<li>Call Centre = all seated, continuous talking,</li>
<li>Control Room (day shift) = all seated, talking 50% of the time,</li>
<li>Control Room (night shift) = all seated, talking 10% of the time,</li>
<li>Library = all seated, no talking, just breathing,</li>
<li>Laboratory = light physical activity, talking 50% of the time,</li>
<li>Workshop = moderate physical activity, talking 50% of the time,</li>
<li>Conference/Training (speaker infected) = speaker/trainer standing and talking, rest seated and talking quietly.
Speaker/Trainer assumed infected (worst case scenario),</li>
<li>Conference/Training (attendee infected) = someone in the audience is infected, all are seated and breathing.</li>
<li>Gym = heavy exercise, no talking, just breathing.</li>
</ul>
<b>Activity breaks:</b><br>
<ul>
<li>If coffee breaks are included, they are spread out evenly throughout the day,
in addition to any lunch break (if applicable).</li>
</ul>
Refer to <a href="{{ get_calculator_url() }}/user-guide"> Calculator App user guide </a>
for more detailed explanations on how to use this tool. <br>
<b>Quick Guide</b>: Refer to <a href="{{ documentation_url }}/project_overview/user_guide/quick_guide"> Calculator App quick user guide</a>.
<br>
<b>Full Guide</b>: Refer to <a href="{{ documentation_url }}/project_overview/user_guide/full_guide"> Calculator App full user guide</a>.
<br>
</div>

<div class="center container--padding pr-3 pl-3">
<button class="btn btn-primary bigButton">
<a href="{{ get_calculator_url() }}/user-guide" class="{{ "nav-link active" if "user-guide" in active_page else "nav-link" }}" style="color:white">User guide</a>
<a href="{{ documentation_url }}/project_overview/user_guide/full_guide" class="nav-link" style="color:white">User guide</a>
</button>
<button class="btn btn-primary bigButton ml-2" type="button" data-toggle="collapse" data-target="#collapseDisclaimer" aria-expanded="false" aria-controls="collapseDisclaimer">
Disclaimer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<p>
CAiMIRA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions.
It does this by simulating the airborne spread SARS-CoV-2 virus in a finite volume, assuming homogenous mixing for the long-range component and a two-stage jet model for short-range, and estimates the risk of COVID-19 airborne transmission therein.
Please see the <a href="{{ get_url('/about') }}">About</a> page for more details on the methodology, assumptions and limitations of CAiMIRA.
Please see the <a href="{{ documentation_url }}/about">About</a> page for more details on the methodology, assumptions and limitations of CAiMIRA.
</p>
<p>
The full CAiMIRA source code can be accessed freely under an Apache 2.0 open source license from our <a href="https://gitlab.cern.ch/caimira/caimira">code repository</a>.
Expand Down Expand Up @@ -50,11 +50,11 @@
</div>
<div class="w-25 mobile-sub-section"><hr width="95%">
<div class="d-flex m-2 align-items-center"><i class="bi bi-info-square-fill" style="font-size: 25px"></i><div><p class="paragraph-title ml-2">About</p></div></div>
<div class="m-2"><a href="{{ get_url('/about') }}">About</a> page for details on methodology, assumptions and limitations of CAiMIRA.</div>
<div class="m-2"><a href="{{ documentation_url }}/about">About</a> page for details on methodology, assumptions and limitations of CAiMIRA.</div>
</div>
<div class="w-25 mobile-sub-section"><hr width="95%">
<div class="d-flex m-2 align-items-center"><i class="bi bi-journal-text" style="font-size: 25px"></i><div><p class="paragraph-title ml-2">Documentation</p></div></div>
<div class="m-2">Documentation for CAiMIRA, available <a href="https://caimira.readthedocs.io/">here</a>.<br></div>
<div class="m-2">Documentation for CAiMIRA, available <a href="{{ documentation_url }}">here</a>.<br></div>
</div>
<div class="w-25 mobile-sub-section"><hr width="95%">
<div class="d-flex m-2 align-items-center"><i class="bi bi-git" style="font-size: 25px"></i><div><p class="paragraph-title ml-2">Git</p></div></div>
Expand Down Expand Up @@ -91,7 +91,7 @@
<a href="https://doi.org/10.5281/zenodo.6520431"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.6520431.svg" alt="DOI"></a><br>
© Copyright 2020-2021 CERN. All rights not expressly granted are reserved.<br>
Licensed under the Apache License, Version 2.0<br>
<a href=https://gitlab.cern.ch/caimira/caimira/-/blob/master/LICENSE><i>LICENSE</i></a>
<a href=https://gitlab.cern.ch/caimira/caimira/-/blob/master/caimira/LICENSE><i>LICENSE</i></a>
</ul>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@
</a>
<ul class="dropdown-menu dropwown-navbar-colors" style="min-width: 12rem;" aria-labelledby="navbarDropdown">
<li><a href="{{ get_calculator_url() }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">Calculator</a></li>
<li><div class="d-flex"><span class="d-flex align-self-center submenu-division"></span><a href="{{ get_calculator_url() }}/user-guide" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">User Guide</a></div></li>
<li><div class="d-flex"><span class="d-flex align-self-center submenu-division"></span><a href="{{ documentation_url }}/project_overview/user_guide/full_guide" class="header-navbar nav-link">User Guide</a></div></li>
<li><a href="{{ get_url() }}/expert-app" class="{{ "header-navbar nav-link active" if "expert-app" == active_page else "header-navbar nav-link" }}">Expert app</a></li>
<li><a href="{{ get_url() }}/expert-app" class="{{ "header-navbar nav-link active" if "expert-app" == active_page else "header-navbar nav-link" }}">CO₂ Simulator</a></li>
</ul>
</li>
</div>
<div id="mobile_calculator_option">
<li class="nav-link"><a href="{{ get_calculator_url() }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">Calculator</a></li>
<li class="nav-link"><a href="{{ get_calculator_url() }}/user-guide" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">User Guide</a></li>
<li class="nav-link"><a href="{{ documentation_url }}/project_overview/user_guide/full_guide" class="header-navbar nav-link">User Guide</a></li>
</div>
{% block covid_information%}
{% endblock covid_information%}
<li class="nav-link"><a href="{{ get_url('/about') }}" class="{{ "header-navbar nav-link active" if "about" == active_page else "header-navbar nav-link" }}">About</a></li>
<li class="nav-link"><a href="{{ documentation_url }}/project_overview/about/" class="header-navbar nav-link">About</a></li>
{% if user.is_authenticated() %}
<li class="nav-item dropdown p-2">
<a class="nav-link active dropdown-toggle d-inline-block" href="https://cern.ch/users-portal" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down Expand Up @@ -93,13 +93,12 @@
policy issues. Any initiative is conducted on a best effort and as-is basis, without liability or
warranty.</em></span></p>
<p style="font-size:10px;">
CAiMIRA is <a href="https://gitlab.cern.ch/caimira/caimira/-/blob/master/LICENSE" class="ext">Apache 2.0 licensed</a> open-source
CAiMIRA is <a href="https://gitlab.cern.ch/caimira/caimira/-/blob/master/caimira/LICENSE" class="ext">Apache 2.0 licensed</a> open-source
software developed at CERN.
You can find the source code at <a href="https://gitlab.cern.ch/caimira/caimira">https://gitlab.cern.ch/caimira/caimira</a>,
where we welcome contributions, feature requests and issue reports.
</p>
</div>

</div>
</div>
</footer>
Expand Down
Loading

0 comments on commit 7587a46

Please sign in to comment.