updated folder's names and respective references
6
.github/workflows/tests.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
# This module is part of CARA. Please see the repository at
|
# This module is part of CAiMIRA. Please see the repository at
|
||||||
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
PROJECT_ROOT: ./
|
PROJECT_ROOT: ./
|
||||||
PROJECT_NAME: cara
|
PROJECT_NAME: caimira
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -45,7 +45,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
PROJECT_ROOT: ./
|
PROJECT_ROOT: ./
|
||||||
PROJECT_NAME: cara
|
PROJECT_NAME: caimira
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
|
||||||
2
.gitignore
vendored
|
|
@ -18,4 +18,4 @@ app-config/openshift/caimira-test
|
||||||
app-config/openshift/caimira-prod
|
app-config/openshift/caimira-prod
|
||||||
|
|
||||||
# documentation build folder
|
# documentation build folder
|
||||||
cara/docs/_build
|
caimira/docs/_build
|
||||||
|
|
@ -11,7 +11,7 @@ include:
|
||||||
file: acc_py_devtools/templates/gitlab-ci/python.yml
|
file: acc_py_devtools/templates/gitlab-ci/python.yml
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
project_name: cara
|
project_name: caimira
|
||||||
PY_VERSION: "3.9"
|
PY_VERSION: "3.9"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ build:
|
||||||
|
|
||||||
# Build documentation in the docs/ directory with Sphinx
|
# Build documentation in the docs/ directory with Sphinx
|
||||||
sphinx:
|
sphinx:
|
||||||
configuration: cara/docs/conf.py
|
configuration: caimira/docs/conf.py
|
||||||
|
|
||||||
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
||||||
# formats:
|
# formats:
|
||||||
|
|
|
||||||
22
README.md
|
|
@ -86,7 +86,7 @@ This will start a local version of CAiMIRA, which can be visited at http://local
|
||||||
|
|
||||||
## Development guide
|
## Development guide
|
||||||
|
|
||||||
CAiMIRA is also mirrored to Github if you wish to collaborate on development and can be found at: https://github.com/CERN/cara
|
CAiMIRA is also mirrored to Github if you wish to collaborate on development and can be found at: https://github.com/CERN/caimira
|
||||||
|
|
||||||
### Installing CAiMIRA in editable mode
|
### Installing CAiMIRA in editable mode
|
||||||
|
|
||||||
|
|
@ -97,19 +97,19 @@ pip install -e . # At the root of the repository
|
||||||
### Running the COVID calculator app in development mode
|
### Running the COVID calculator app in development mode
|
||||||
|
|
||||||
```
|
```
|
||||||
python -m cara.apps.calculator
|
python -m caimira.apps.calculator
|
||||||
```
|
```
|
||||||
|
|
||||||
To run with the CERN theme:
|
To run with the CERN theme:
|
||||||
|
|
||||||
```
|
```
|
||||||
python -m cara.apps.calculator --theme=cara/apps/templates/cern
|
python -m caimira.apps.calculator --theme=caimira/apps/templates/cern
|
||||||
```
|
```
|
||||||
|
|
||||||
To run the calculator on a different URL path:
|
To run the calculator on a different URL path:
|
||||||
|
|
||||||
```
|
```
|
||||||
python -m cara.apps.calculator --prefix=/mycalc
|
python -m caimira.apps.calculator --prefix=/mycalc
|
||||||
```
|
```
|
||||||
|
|
||||||
### How to compile and read the documentation
|
### How to compile and read the documentation
|
||||||
|
|
@ -120,15 +120,15 @@ In order to generate the documentation, CAiMIRA must be installed first with the
|
||||||
pip install -e .[doc]
|
pip install -e .[doc]
|
||||||
```
|
```
|
||||||
|
|
||||||
To generate the HTML documentation page, the command `make html` should be executed in the `cara/docs` directory.
|
To generate the HTML documentation page, the command `make html` should be executed in the `caimira/docs` directory.
|
||||||
If any of the `.rst` files under the `cara/docs` folder is changed, this command should be executed again.
|
If any of the `.rst` files under the `caimira/docs` folder is changed, this command should be executed again.
|
||||||
|
|
||||||
Then, right click on `cara/docs/_build/html/index.html` and select `Open with` your preferred web browser.
|
Then, right click on `caimira/docs/_build/html/index.html` and select `Open with` your preferred web browser.
|
||||||
|
|
||||||
### Running the CAiMIRA Expert-App app in development mode
|
### Running the CAiMIRA Expert-App app in development mode
|
||||||
|
|
||||||
```
|
```
|
||||||
voila cara/apps/expert/cara.ipynb --port=8080
|
voila caimira/apps/expert/caimira.ipynb --port=8080
|
||||||
```
|
```
|
||||||
|
|
||||||
Then visit http://localhost:8080.
|
Then visit http://localhost:8080.
|
||||||
|
|
@ -138,7 +138,7 @@ Then visit http://localhost:8080.
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install -e .[test]
|
pip install -e .[test]
|
||||||
pytest ./cara
|
pytest ./caimira
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building the whole environment for local development
|
### Building the whole environment for local development
|
||||||
|
|
@ -175,7 +175,7 @@ Then visit http://localhost:8080/.
|
||||||
|
|
||||||
### Setting up the application on openshift
|
### Setting up the application on openshift
|
||||||
|
|
||||||
The https://cern.ch/cara application is running on CERN's OpenShift platform. In order to set it up for the first time, we followed the documentation at https://cern.service-now.com/service-portal?id=kb_article&n=KB0004498. In particular we:
|
The https://cern.ch/caimira application is running on CERN's OpenShift platform. In order to set it up for the first time, we followed the documentation at https://cern.service-now.com/service-portal?id=kb_article&n=KB0004498. In particular we:
|
||||||
|
|
||||||
* Added the OpenShift application deploy key to the GitLab repository
|
* Added the OpenShift application deploy key to the GitLab repository
|
||||||
* Created a Python 3.6 (the highest possible at the time of writing) application in OpenShift
|
* Created a Python 3.6 (the highest possible at the time of writing) application in OpenShift
|
||||||
|
|
@ -183,7 +183,7 @@ The https://cern.ch/cara application is running on CERN's OpenShift platform. In
|
||||||
|
|
||||||
### Updating the caimira-test.web.cern.ch instance
|
### Updating the caimira-test.web.cern.ch instance
|
||||||
|
|
||||||
We have a replica of https://cara.web.cern.ch running on http://caimira-test.web.cern.ch. Its purpose is to simulate what will happen when
|
We have a replica of https://caimira.web.cern.ch running on http://caimira-test.web.cern.ch. Its purpose is to simulate what will happen when
|
||||||
a feature is merged. To push your changes to caimira-test, simply push your branch to `live/caimira-test` and the CI pipeline will trigger the
|
a feature is merged. To push your changes to caimira-test, simply push your branch to `live/caimira-test` and the CI pipeline will trigger the
|
||||||
deployment. To push to this branch, there is a good chance that you will need to force push - you should always force push with care and
|
deployment. To push to this branch, there is a good chance that you will need to force push - you should always force push with care and
|
||||||
understanding why you are doing it. Syntactically, it will look something like (assuming that you have "upstream" as your remote name,
|
understanding why you are doing it. Syntactically, it will look something like (assuming that you have "upstream" as your remote name,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y nginx
|
||||||
|
|
||||||
# Now that we have done the installation of the dependencies, copy the caimira source.
|
# Now that we have done the installation of the dependencies, copy the caimira source.
|
||||||
COPY ./ /opt/caimira/src
|
COPY ./ /opt/caimira/src
|
||||||
COPY ./app-config/caimira-public-docker-image/run_cara.sh /opt/caimira/start.sh
|
COPY ./app-config/caimira-public-docker-image/run_caimira.sh /opt/caimira/start.sh
|
||||||
|
|
||||||
# To ensure that we have installed the full requirements, re-run the pip install.
|
# To ensure that we have installed the full requirements, re-run the pip install.
|
||||||
# In the best case this will be a no-op.
|
# In the best case this will be a no-op.
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ http {
|
||||||
listen 8080 default_server;
|
listen 8080 default_server;
|
||||||
listen [::]:8080 default_server;
|
listen [::]:8080 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /opt/cara/src;
|
root /opt/caimira/src;
|
||||||
|
|
||||||
# Load configuration files for the default server block.
|
# Load configuration files for the default server block.
|
||||||
include /opt/app-root/etc/nginx.default.d/*.conf;
|
include /opt/app-root/etc/nginx.default.d/*.conf;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
|
|
||||||
echo 'CARA is running on http://localhost:8080'
|
echo 'CAiMIRA is running on http://localhost:8080'
|
||||||
echo 'Please see https://gitlab.cern.ch/cara/cara for terms of use.'
|
echo 'Please see https://gitlab.cern.ch/cara/cara for terms of use.'
|
||||||
|
|
||||||
# Run a proxy for the apps (listening on 8080).
|
# Run a proxy for the apps (listening on 8080).
|
||||||
nginx -c /opt/cara/nginx.conf
|
nginx -c /opt/caimira/nginx.conf
|
||||||
|
|
||||||
# Run the expert app in the background.
|
# Run the expert app in the background.
|
||||||
cd /opt/cara/src/cara
|
cd /opt/caimira/src/caimira
|
||||||
/opt/cara/app/bin/python -m voila /opt/cara/src/cara/apps/expert/cara.ipynb \
|
/opt/caimira/app/bin/python -m voila /opt/caimira/src/caimira/apps/expert/caimira.ipynb \
|
||||||
--port=8082 --no-browser --base_url=/voila-server/ \
|
--port=8082 --no-browser --base_url=/voila-server/ \
|
||||||
--Voila.tornado_settings 'allow_origin=*' \
|
--Voila.tornado_settings 'allow_origin=*' \
|
||||||
>> /var/log/expert-app.log 2>&1 &
|
>> /var/log/expert-app.log 2>&1 &
|
||||||
|
|
||||||
# Run the calculator in the foreground.
|
# Run the calculator in the foreground.
|
||||||
/opt/cara/app/bin/python -m cara.apps.calculator --port 8081 --no-debug
|
/opt/caimira/app/bin/python -m caimira.apps.calculator --port 8081 --no-debug
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ RUN mkdir -p /scratch \
|
||||||
# Set the HOME directory to something that anybody can write to (to support non root users, such as on openshift).
|
# Set the HOME directory to something that anybody can write to (to support non root users, such as on openshift).
|
||||||
ENV HOME=/scratch
|
ENV HOME=/scratch
|
||||||
WORKDIR /scratch
|
WORKDIR /scratch
|
||||||
RUN CAIMIRA_INIT_FILE=$(/opt/app/bin/python -c "import cara; print(cara.__file__)") \
|
RUN CAIMIRA_INIT_FILE=$(/opt/app/bin/python -c "import caimira; print(caimira.__file__)") \
|
||||||
&& ln -s $(dirname ${CAIMIRA_INIT_FILE}) /scratch/caimira
|
&& ln -s $(dirname ${CAIMIRA_INIT_FILE}) /scratch/caimira
|
||||||
CMD [ \
|
CMD [ \
|
||||||
"caimira-app.sh" \
|
"caimira-app.sh" \
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ if [[ "$APP_NAME" == "caimira-webservice" ]]; then
|
||||||
args+=("--prefix=${CAIMIRA_CALCULATOR_PREFIX}")
|
args+=("--prefix=${CAIMIRA_CALCULATOR_PREFIX}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting the caimira webservice with: python -m cara.apps.calculator ${args[@]}"
|
echo "Starting the caimira webservice with: python -m caimira.apps.calculator ${args[@]}"
|
||||||
python -m cara.apps.calculator "${args[@]}"
|
python -m caimira.apps.calculator "${args[@]}"
|
||||||
elif [[ "$APP_NAME" == "caimira-voila" ]]; then
|
elif [[ "$APP_NAME" == "caimira-voila" ]]; then
|
||||||
echo "Starting the voila service"
|
echo "Starting the voila service"
|
||||||
voila cara/apps/expert/ --port=8080 --no-browser --base_url=/voila-server/ --tornado_settings 'allow_origin=*'
|
voila caimira/apps/expert/ --port=8080 --no-browser --base_url=/voila-server/ --tornado_settings 'allow_origin=*'
|
||||||
else
|
else
|
||||||
echo "No APP_NAME specified"
|
echo "No APP_NAME specified"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ services:
|
||||||
- COOKIE_SECRET
|
- COOKIE_SECRET
|
||||||
- APP_NAME=caimira-webservice
|
- APP_NAME=caimira-webservice
|
||||||
- CAIMIRA_CALCULATOR_PREFIX=/calculator-cern
|
- CAIMIRA_CALCULATOR_PREFIX=/calculator-cern
|
||||||
- CAIMIRA_THEME=cara/apps/templates/cern
|
- CAIMIRA_THEME=caimira/apps/templates/cern
|
||||||
user: ${CURRENT_UID}
|
user: ${CURRENT_UID}
|
||||||
|
|
||||||
caimira-calculator-open:
|
caimira-calculator-open:
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@
|
||||||
- name: CAIMIRA_CALCULATOR_PREFIX
|
- name: CAIMIRA_CALCULATOR_PREFIX
|
||||||
value: /calculator-cern
|
value: /calculator-cern
|
||||||
- name: CAIMIRA_THEME
|
- name: CAIMIRA_THEME
|
||||||
value: cara/apps/templates/cern
|
value: caimira/apps/templates/cern
|
||||||
image: '${PROJECT_NAME}/caimira-webservice'
|
image: '${PROJECT_NAME}/caimira-webservice'
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# This module is part of CARA. Please see the repository at
|
# This module is part of CAiMIRA. Please see the repository at
|
||||||
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
||||||
"""
|
"""
|
||||||
Documentation for the CARA package
|
Documentation for the CAiMIRA package
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# This module is part of CARA. Please see the repository at
|
# This module is part of CAiMIRA. Please see the repository at
|
||||||
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
@ -31,7 +31,7 @@ from .user import AuthenticatedUser, AnonymousUser
|
||||||
# Effectively, if the model increases its MAJOR version then so too should this
|
# Effectively, if the model increases its MAJOR version then so too should this
|
||||||
# calculator version. If the calculator needs to make breaking changes (e.g. change
|
# calculator version. If the calculator needs to make breaking changes (e.g. change
|
||||||
# form attributes) then it can also increase its MAJOR version without needing to
|
# form attributes) then it can also increase its MAJOR version without needing to
|
||||||
# increase the overall CARA version (found at ``cara.__version__``).
|
# increase the overall CAiMIRA version (found at ``caimira.__version__``).
|
||||||
__version__ = "4.2"
|
__version__ = "4.2"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ class BaseRequestHandler(RequestHandler):
|
||||||
"""Called at the beginning of a request before `get`/`post`/etc."""
|
"""Called at the beginning of a request before `get`/`post`/etc."""
|
||||||
|
|
||||||
# Read the secure cookie which exists if we are in an authenticated
|
# Read the secure cookie which exists if we are in an authenticated
|
||||||
# context (though not if the cara webservice is running standalone).
|
# context (though not if the caimira webservice is running standalone).
|
||||||
session = json.loads(self.get_secure_cookie('session') or 'null')
|
session = json.loads(self.get_secure_cookie('session') or 'null')
|
||||||
|
|
||||||
if session:
|
if session:
|
||||||
|
|
@ -60,7 +60,7 @@ class BaseRequestHandler(RequestHandler):
|
||||||
contents = (
|
contents = (
|
||||||
f'Unfortunately an error occurred when processing your request. '
|
f'Unfortunately an error occurred when processing your request. '
|
||||||
f'Please let us know about this issue with as much detail as possible at '
|
f'Please let us know about this issue with as much detail as possible at '
|
||||||
f'<a href="mailto:CARA-dev@cern.ch">CARA-dev@cern.ch</a>, reporting status '
|
f'<a href="mailto:CAiMIRA-dev@cern.ch">CAiMIRA-dev@cern.ch</a>, reporting status '
|
||||||
f'code {status_code}, the error id of "{error_id}" and the time of the '
|
f'code {status_code}, the error id of "{error_id}" and the time of the '
|
||||||
f'request ({datetime.datetime.utcnow()}).<br><br><br><br>'
|
f'request ({datetime.datetime.utcnow()}).<br><br><br><br>'
|
||||||
)
|
)
|
||||||
|
|
@ -269,9 +269,9 @@ def make_app(
|
||||||
(calculator_prefix + r'/static/(.*)', StaticFileHandler, {'path': calculator_static_dir}),
|
(calculator_prefix + r'/static/(.*)', StaticFileHandler, {'path': calculator_static_dir}),
|
||||||
]
|
]
|
||||||
|
|
||||||
cara_templates = Path(__file__).parent.parent / "templates"
|
caimira_templates = Path(__file__).parent.parent / "templates"
|
||||||
calculator_templates = Path(__file__).parent / "templates"
|
calculator_templates = Path(__file__).parent / "templates"
|
||||||
templates_directories = [cara_templates, calculator_templates]
|
templates_directories = [caimira_templates, calculator_templates]
|
||||||
if theme_dir:
|
if theme_dir:
|
||||||
templates_directories.insert(0, theme_dir)
|
templates_directories.insert(0, theme_dir)
|
||||||
loader = jinja2.FileSystemLoader([str(path) for path in templates_directories])
|
loader = jinja2.FileSystemLoader([str(path) for path in templates_directories])
|
||||||
|
|
@ -8,13 +8,13 @@ import json
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from cara import models
|
from caimira import models
|
||||||
from cara import data
|
from caimira import data
|
||||||
import cara.data.weather
|
import caimira.data.weather
|
||||||
import cara.monte_carlo as mc
|
import caimira.monte_carlo as mc
|
||||||
from .. import calculator
|
from .. import calculator
|
||||||
from cara.monte_carlo.data import activity_distributions, virus_distributions, mask_distributions, short_range_distances
|
from caimira.monte_carlo.data import activity_distributions, virus_distributions, mask_distributions, short_range_distances
|
||||||
from cara.monte_carlo.data import expiration_distribution, expiration_BLO_factors, expiration_distributions, short_range_expiration_distributions
|
from caimira.monte_carlo.data import expiration_distribution, expiration_BLO_factors, expiration_distributions, short_range_expiration_distributions
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ class FormData:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
month = MONTH_NAMES.index(self.event_month) + 1
|
month = MONTH_NAMES.index(self.event_month) + 1
|
||||||
timezone = cara.data.weather.timezone_at(
|
timezone = caimira.data.weather.timezone_at(
|
||||||
latitude=self.location_latitude, longitude=self.location_longitude,
|
latitude=self.location_latitude, longitude=self.location_longitude,
|
||||||
)
|
)
|
||||||
# We choose the first of the month for the current year.
|
# We choose the first of the month for the current year.
|
||||||
|
|
@ -351,7 +351,7 @@ class FormData:
|
||||||
month = MONTH_NAMES.index(self.event_month) + 1
|
month = MONTH_NAMES.index(self.event_month) + 1
|
||||||
|
|
||||||
wx_station = self.nearest_weather_station()
|
wx_station = self.nearest_weather_station()
|
||||||
temp_profile = cara.data.weather.mean_hourly_temperatures(wx_station[0], month)
|
temp_profile = caimira.data.weather.mean_hourly_temperatures(wx_station[0], month)
|
||||||
|
|
||||||
_, utc_offset = self.tz_name_and_utc_offset()
|
_, utc_offset = self.tz_name_and_utc_offset()
|
||||||
|
|
||||||
|
|
@ -359,7 +359,7 @@ class FormData:
|
||||||
# result the first data value may no longer be a midnight, and the hours
|
# result the first data value may no longer be a midnight, and the hours
|
||||||
# no longer ordered modulo 24).
|
# no longer ordered modulo 24).
|
||||||
source_times = np.arange(24) + utc_offset
|
source_times = np.arange(24) + utc_offset
|
||||||
times, temp_profile = cara.data.weather.refine_hourly_data(
|
times, temp_profile = caimira.data.weather.refine_hourly_data(
|
||||||
source_times,
|
source_times,
|
||||||
temp_profile,
|
temp_profile,
|
||||||
npts=24*10, # 10 steps per hour => 6 min steps
|
npts=24*10, # 10 steps per hour => 6 min steps
|
||||||
|
|
@ -418,9 +418,9 @@ class FormData:
|
||||||
else:
|
else:
|
||||||
return models.MultipleVentilation((ventilation, infiltration_ventilation))
|
return models.MultipleVentilation((ventilation, infiltration_ventilation))
|
||||||
|
|
||||||
def nearest_weather_station(self) -> cara.data.weather.WxStationRecordType:
|
def nearest_weather_station(self) -> caimira.data.weather.WxStationRecordType:
|
||||||
"""Return the nearest weather station (which has valid data) for this form"""
|
"""Return the nearest weather station (which has valid data) for this form"""
|
||||||
return cara.data.weather.nearest_wx_station(
|
return caimira.data.weather.nearest_wx_station(
|
||||||
longitude=self.location_longitude, latitude=self.location_latitude
|
longitude=self.location_longitude, latitude=self.location_latitude
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -11,8 +11,8 @@ import zlib
|
||||||
import jinja2
|
import jinja2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from cara import models
|
from caimira import models
|
||||||
from cara.apps.calculator import markdown_tools
|
from caimira.apps.calculator import markdown_tools
|
||||||
from ... import monte_carlo as mc
|
from ... import monte_carlo as mc
|
||||||
from .model_generator import FormData, _DEFAULT_MC_SAMPLE_SIZE
|
from .model_generator import FormData, _DEFAULT_MC_SAMPLE_SIZE
|
||||||
from ... import dataclass_utils
|
from ... import dataclass_utils
|
||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
|
@ -11,7 +11,7 @@ import matplotlib.patches as patches
|
||||||
from matplotlib import pyplot as plt
|
from matplotlib import pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from cara import data, models, state
|
from caimira import data, models, state
|
||||||
|
|
||||||
|
|
||||||
def collapsible(widgets_to_collapse: typing.List, title: str, start_collapsed=False):
|
def collapsible(widgets_to_collapse: typing.List, title: str, start_collapsed=False):
|
||||||
|
|
@ -850,7 +850,7 @@ baseline_model = models.ExposureModel(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class CARAStateBuilder(state.StateBuilder):
|
class CAIMIRAStateBuilder(state.StateBuilder):
|
||||||
# Note: The methods in this class must correspond to the *type* of the data classes.
|
# Note: The methods in this class must correspond to the *type* of the data classes.
|
||||||
# For example, build_type__VentilationBase is called when dealing with ConcentrationModel
|
# For example, build_type__VentilationBase is called when dealing with ConcentrationModel
|
||||||
# types as it has a ventilation: _VentilationBase field.
|
# types as it has a ventilation: _VentilationBase field.
|
||||||
|
|
@ -928,7 +928,7 @@ class ExpertApplication(Controller):
|
||||||
def build_new_model(self) -> state.DataclassInstanceState[models.ExposureModel]:
|
def build_new_model(self) -> state.DataclassInstanceState[models.ExposureModel]:
|
||||||
default_model = state.DataclassInstanceState(
|
default_model = state.DataclassInstanceState(
|
||||||
models.ExposureModel,
|
models.ExposureModel,
|
||||||
state_builder=CARAStateBuilder(),
|
state_builder=CAIMIRAStateBuilder(),
|
||||||
)
|
)
|
||||||
default_model.dcs_update_from(baseline_model)
|
default_model.dcs_update_from(baseline_model)
|
||||||
# For the time-being, we have to initialise the select states. Careful
|
# For the time-being, we have to initialise the select states. Careful
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
"<div style=\"text-align: center;\" align=\"center\" >\n",
|
"<div style=\"text-align: center;\" align=\"center\" >\n",
|
||||||
"<img src=\"./files/static/images/header_image.png\" style=\"height:5em\"></img></div>\n",
|
"<img src=\"./files/static/images/header_image.png\" style=\"height:5em\"></img></div>\n",
|
||||||
"<p style=\"text-align: center;\">\n",
|
"<p style=\"text-align: center;\">\n",
|
||||||
"Please see the <a href=\"https://cara.web.cern.ch/\">CAiMIRA homepage</a> for details on the methodology, assumptions and limitations of CAiMIRA.</p>"
|
"Please see the <a href=\"https://caimira.web.cern.ch/\">CAiMIRA homepage</a> for details on the methodology, assumptions and limitations of CAiMIRA.</p>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import cara.apps\n",
|
"import caimira.apps\n",
|
||||||
"\n",
|
"\n",
|
||||||
"app = cara.apps.ExpertApplication()\n",
|
"app = caimira.apps.ExpertApplication()\n",
|
||||||
"app.widget"
|
"app.widget"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
|
@ -92,7 +92,7 @@ body {
|
||||||
height: 10em;
|
height: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cara_home_image {
|
.caimira_home_image {
|
||||||
height: 18rem;
|
height: 18rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 1.25rem!important;
|
border-radius: 1.25rem!important;
|
||||||
|
|
@ -258,11 +258,11 @@ footer img {
|
||||||
font-size:1rem;
|
font-size:1rem;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
.cara_version {
|
.caimira_version {
|
||||||
float:left;
|
float:left;
|
||||||
font-size:1rem;
|
font-size:1rem;
|
||||||
}
|
}
|
||||||
.cara_home_image {
|
.caimira_home_image {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -314,7 +314,7 @@ footer img {
|
||||||
font-size:.75rem;
|
font-size:.75rem;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
.cara_version {
|
.caimira_version {
|
||||||
float:left;
|
float:left;
|
||||||
font-size:.75rem;
|
font-size:.75rem;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 954 KiB After Width: | Height: | Size: 954 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
|
|
@ -18,7 +18,7 @@ if (document.location.hostname == "caimira-test.web.cern.ch") {
|
||||||
g.src = u + "piwik.js";
|
g.src = u + "piwik.js";
|
||||||
s.parentNode.insertBefore(g, s);
|
s.parentNode.insertBefore(g, s);
|
||||||
})();
|
})();
|
||||||
} else if (document.location.hostname == "cara.web.cern.ch") {
|
} else if (document.location.hostname == "caimira.web.cern.ch") {
|
||||||
var _paq = _paq || [];
|
var _paq = _paq || [];
|
||||||
if (typeof AuthUserDomain !== 'undefined') {
|
if (typeof AuthUserDomain !== 'undefined') {
|
||||||
_paq.push(["setCustomVariable", 1, "AuthUserDomain", AuthUserDomain, "visit"]);
|
_paq.push(["setCustomVariable", 1, "AuthUserDomain", AuthUserDomain, "visit"]);
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
||||||
<span class="cara_version">v{{ calculator_version }}</span>
|
<span class="caimira_version">v{{ calculator_version }}</span>
|
||||||
<span class="feedback">Please send feedback to <a href="mailto:CAiMIRA-dev@cern.ch">CAiMIRA-dev@cern.ch</a></span>
|
<span class="feedback">Please send feedback to <a href="mailto:CAiMIRA-dev@cern.ch">CAiMIRA-dev@cern.ch</a></span>
|
||||||
<header class= "bg-light">
|
<header class= "bg-light">
|
||||||
<div class="container container--padding">
|
<div class="container container--padding">
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
<hr width="95%">
|
<hr width="95%">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block cara_at_cern %}
|
{% block caimira_at_cern %}
|
||||||
{% endblock cara_at_cern %}
|
{% endblock caimira_at_cern %}
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "base/index.html.j2" %}
|
{% extends "base/index.html.j2" %}
|
||||||
|
|
||||||
{% block cara_at_cern %}
|
{% block caimira_at_cern %}
|
||||||
<h2 class="paragraph-title">CAiMIRA @ CERN</h2><br>
|
<h2 class="paragraph-title">CAiMIRA @ CERN</h2><br>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -8,4 +8,4 @@
|
||||||
A hosted <a href="{{ calculator_prefix }}">CERN version of the CAiMIRA Covid Calculator</a> is available on this site to members of the CERN personnel.
|
A hosted <a href="{{ calculator_prefix }}">CERN version of the CAiMIRA Covid Calculator</a> is available on this site to members of the CERN personnel.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock cara_at_cern %}
|
{% endblock caimira_at_cern %}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from cara import models
|
from caimira import models
|
||||||
from cara.data.weather import wx_data, nearest_wx_station
|
from caimira.data.weather import wx_data, nearest_wx_station
|
||||||
|
|
||||||
MONTH_NAMES = [
|
MONTH_NAMES = [
|
||||||
'January', 'February', 'March', 'April', 'May', 'June', 'July',
|
'January', 'February', 'March', 'April', 'May', 'June', 'July',
|
||||||
|
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 690 KiB |
|
|
@ -17,7 +17,7 @@ sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'CARA'
|
project = 'CAiMIRA'
|
||||||
copyright = '2022, Andre Henriques et al.'
|
copyright = '2022, Andre Henriques et al.'
|
||||||
author = 'Andre Henriques et al.'
|
author = 'Andre Henriques et al.'
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
.. CARA documentation master file, created by
|
.. CAiMIRA documentation master file, created by
|
||||||
sphinx-quickstart on Fri Apr 8 10:26:24 2022.
|
sphinx-quickstart on Fri Apr 8 10:26:24 2022.
|
||||||
You can adapt this file completely to your liking, but it should at least
|
You can adapt this file completely to your liking, but it should at least
|
||||||
contain the root `toctree` directive.
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
Welcome to CARA's documentation!
|
Welcome to CAiMIRA's documentation!
|
||||||
================================
|
================================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
@ -11,7 +11,7 @@ Welcome to CARA's documentation!
|
||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
full_diameter_dependence
|
full_diameter_dependence
|
||||||
cara
|
caimira
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
# This module is part of CARA. Please see the repository at
|
# This module is part of CAiMIRA. Please see the repository at
|
||||||
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
# https://gitlab.cern.ch/cara/cara for details of the license and terms of use.
|
||||||
"""
|
"""
|
||||||
This module implements the core CARA models.
|
This module implements the core CAiMIRA models.
|
||||||
|
|
||||||
The CARA model is a flexible, object-oriented numerical model. It is designed
|
The CAiMIRA model is a flexible, object-oriented numerical model. It is designed
|
||||||
to allow the user to swap-out and extend its various components. One of the
|
to allow the user to swap-out and extend its various components. One of the
|
||||||
major abstractions of the model is the distinction between virus concentration
|
major abstractions of the model is the distinction between virus concentration
|
||||||
(:class:`ConcentrationModel`) and virus exposure (:class:`ExposureModel`).
|
(:class:`ConcentrationModel`) and virus exposure (:class:`ExposureModel`).
|
||||||
|
|
@ -15,10 +15,10 @@ deterministic (i.e. running the same model twice will result in the same answer)
|
||||||
|
|
||||||
In order to apply stochastic / non-deterministic analyses therefore you must
|
In order to apply stochastic / non-deterministic analyses therefore you must
|
||||||
introduce the randomness before constructing the models themselves; the
|
introduce the randomness before constructing the models themselves; the
|
||||||
:mod:`cara.monte_carlo` module is a good example of doing this - that module uses
|
:mod:`caimira.monte_carlo` module is a good example of doing this - that module uses
|
||||||
the models defined here to allow you to construct a ConcentrationModel containing
|
the models defined here to allow you to construct a ConcentrationModel containing
|
||||||
parameters which are expressed as probability distributions. Under the hood the
|
parameters which are expressed as probability distributions. Under the hood the
|
||||||
``cara.monte_carlo.ConcentrationModel`` implementation simply samples all of those
|
``caimira.monte_carlo.ConcentrationModel`` implementation simply samples all of those
|
||||||
probability distributions to produce many instances of the deterministic model.
|
probability distributions to produce many instances of the deterministic model.
|
||||||
|
|
||||||
The models in this module have been designed for flexibility above performance,
|
The models in this module have been designed for flexibility above performance,
|
||||||
|
|
@ -5,8 +5,8 @@ import numpy as np
|
||||||
from scipy import special as sp
|
from scipy import special as sp
|
||||||
from scipy.stats import weibull_min
|
from scipy.stats import weibull_min
|
||||||
|
|
||||||
import cara.monte_carlo as mc
|
import caimira.monte_carlo as mc
|
||||||
from cara.monte_carlo.sampleable import LogCustom, LogNormal,LogCustomKernel,CustomKernel,Uniform, Custom
|
from caimira.monte_carlo.sampleable import LogCustom, LogNormal,LogCustomKernel,CustomKernel,Uniform, Custom
|
||||||
|
|
||||||
sqrt2pi = np.sqrt(2.*np.pi)
|
sqrt2pi = np.sqrt(2.*np.pi)
|
||||||
sqrt2 = np.sqrt(2.)
|
sqrt2 = np.sqrt(2.)
|
||||||
|
|
@ -3,7 +3,7 @@ import dataclasses
|
||||||
import sys
|
import sys
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
import cara.models
|
import caimira.models
|
||||||
|
|
||||||
from .sampleable import SampleableDistribution, _VectorisedFloatOrSampleable
|
from .sampleable import SampleableDistribution, _VectorisedFloatOrSampleable
|
||||||
|
|
||||||
|
|
@ -14,9 +14,9 @@ class MCModelBase(typing.Generic[_ModelType]):
|
||||||
"""
|
"""
|
||||||
A model base class for monte carlo types.
|
A model base class for monte carlo types.
|
||||||
|
|
||||||
This base class is essentially a declarative description of a cara.models
|
This base class is essentially a declarative description of a caimira.models
|
||||||
model with a :meth:`.build_model` method to generate an appropriate
|
model with a :meth:`.build_model` method to generate an appropriate
|
||||||
``cara.models` model instance on demand.
|
``caimira.models` model instance on demand.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
_base_cls: typing.Type[_ModelType]
|
_base_cls: typing.Type[_ModelType]
|
||||||
|
|
@ -36,7 +36,7 @@ class MCModelBase(typing.Generic[_ModelType]):
|
||||||
|
|
||||||
def build_model(self, size: int) -> _ModelType:
|
def build_model(self, size: int) -> _ModelType:
|
||||||
"""
|
"""
|
||||||
Turn this MCModelBase subclass into a cara.model Model instance
|
Turn this MCModelBase subclass into a caimira.model Model instance
|
||||||
from which you can then run the model.
|
from which you can then run the model.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
@ -49,7 +49,7 @@ class MCModelBase(typing.Generic[_ModelType]):
|
||||||
|
|
||||||
def _build_mc_model(model: _ModelType) -> typing.Type[MCModelBase[_ModelType]]:
|
def _build_mc_model(model: _ModelType) -> typing.Type[MCModelBase[_ModelType]]:
|
||||||
"""
|
"""
|
||||||
Generate a new MCModelBase subclass for the given cara.models model.
|
Generate a new MCModelBase subclass for the given caimira.models model.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
fields = []
|
fields = []
|
||||||
|
|
@ -57,7 +57,7 @@ def _build_mc_model(model: _ModelType) -> typing.Type[MCModelBase[_ModelType]]:
|
||||||
# Note: deepcopy not needed here as we aren't mutating entities beyond
|
# Note: deepcopy not needed here as we aren't mutating entities beyond
|
||||||
# the top level.
|
# the top level.
|
||||||
new_field = copy.copy(field)
|
new_field = copy.copy(field)
|
||||||
if field.type is cara.models._VectorisedFloat: # noqa
|
if field.type is caimira.models._VectorisedFloat: # noqa
|
||||||
new_field.type = _VectorisedFloatOrSampleable # type: ignore
|
new_field.type = _VectorisedFloatOrSampleable # type: ignore
|
||||||
|
|
||||||
field_type: typing.Any = new_field.type
|
field_type: typing.Any = new_field.type
|
||||||
|
|
@ -65,29 +65,29 @@ def _build_mc_model(model: _ModelType) -> typing.Type[MCModelBase[_ModelType]]:
|
||||||
if getattr(field_type, '__origin__', None) in [typing.Union, typing.Tuple]:
|
if getattr(field_type, '__origin__', None) in [typing.Union, typing.Tuple]:
|
||||||
# It is challenging to generalise this code, so we provide specific transformations,
|
# It is challenging to generalise this code, so we provide specific transformations,
|
||||||
# and raise for unforseen cases.
|
# and raise for unforseen cases.
|
||||||
if new_field.type == typing.Tuple[cara.models._VentilationBase, ...]:
|
if new_field.type == typing.Tuple[caimira.models._VentilationBase, ...]:
|
||||||
VB = getattr(sys.modules[__name__], "_VentilationBase")
|
VB = getattr(sys.modules[__name__], "_VentilationBase")
|
||||||
field_type = typing.Tuple[typing.Union[cara.models._VentilationBase, VB], ...]
|
field_type = typing.Tuple[typing.Union[caimira.models._VentilationBase, VB], ...]
|
||||||
elif new_field.type == typing.Tuple[cara.models._ExpirationBase, ...]:
|
elif new_field.type == typing.Tuple[caimira.models._ExpirationBase, ...]:
|
||||||
EB = getattr(sys.modules[__name__], "_ExpirationBase")
|
EB = getattr(sys.modules[__name__], "_ExpirationBase")
|
||||||
field_type = typing.Tuple[typing.Union[cara.models._ExpirationBase, EB], ...]
|
field_type = typing.Tuple[typing.Union[caimira.models._ExpirationBase, EB], ...]
|
||||||
elif new_field.type == typing.Tuple[cara.models.SpecificInterval, ...]:
|
elif new_field.type == typing.Tuple[caimira.models.SpecificInterval, ...]:
|
||||||
SI = getattr(sys.modules[__name__], "SpecificInterval")
|
SI = getattr(sys.modules[__name__], "SpecificInterval")
|
||||||
field_type = typing.Tuple[typing.Union[cara.models.SpecificInterval, SI], ...]
|
field_type = typing.Tuple[typing.Union[caimira.models.SpecificInterval, SI], ...]
|
||||||
else:
|
else:
|
||||||
# Check that we don't need to do anything with this type.
|
# Check that we don't need to do anything with this type.
|
||||||
for item in new_field.type.__args__:
|
for item in new_field.type.__args__:
|
||||||
if getattr(item, '__module__', None) == 'cara.models':
|
if getattr(item, '__module__', None) == 'caimira.models':
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"unsupported type annotation transformation required for {new_field.type}")
|
f"unsupported type annotation transformation required for {new_field.type}")
|
||||||
elif field_type.__module__ == 'cara.models':
|
elif field_type.__module__ == 'caimira.models':
|
||||||
mc_model = getattr(sys.modules[__name__], new_field.type.__name__)
|
mc_model = getattr(sys.modules[__name__], new_field.type.__name__)
|
||||||
field_type = typing.Union[new_field.type, mc_model]
|
field_type = typing.Union[new_field.type, mc_model]
|
||||||
|
|
||||||
fields.append((new_field.name, field_type, new_field))
|
fields.append((new_field.name, field_type, new_field))
|
||||||
|
|
||||||
bases = []
|
bases = []
|
||||||
# Update the inheritance/based to use the new MC classes, rather than the cara.models ones.
|
# Update the inheritance/based to use the new MC classes, rather than the caimira.models ones.
|
||||||
for model_base in model.__bases__: # type: ignore
|
for model_base in model.__bases__: # type: ignore
|
||||||
if model_base is object:
|
if model_base is object:
|
||||||
bases.append(MCModelBase)
|
bases.append(MCModelBase)
|
||||||
|
|
@ -111,7 +111,7 @@ def _build_mc_model(model: _ModelType) -> typing.Type[MCModelBase[_ModelType]]:
|
||||||
|
|
||||||
|
|
||||||
_MODEL_CLASSES = [
|
_MODEL_CLASSES = [
|
||||||
cls for cls in vars(cara.models).values()
|
cls for cls in vars(caimira.models).values()
|
||||||
if dataclasses.is_dataclass(cls)
|
if dataclasses.is_dataclass(cls)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@ import typing
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from sklearn.neighbors import KernelDensity # type: ignore
|
from sklearn.neighbors import KernelDensity # type: ignore
|
||||||
|
|
||||||
import cara.models
|
import caimira.models
|
||||||
|
|
||||||
# Declare a float array type of a given size.
|
# Declare a float array type of a given size.
|
||||||
# There is no better way to declare this currently, unfortunately.
|
# There is no better way to declare this currently, unfortunately.
|
||||||
|
|
@ -158,5 +158,5 @@ class LogCustomKernel(SampleableDistribution):
|
||||||
|
|
||||||
|
|
||||||
_VectorisedFloatOrSampleable = typing.Union[
|
_VectorisedFloatOrSampleable = typing.Union[
|
||||||
SampleableDistribution, cara.models._VectorisedFloat,
|
SampleableDistribution, caimira.models._VectorisedFloat,
|
||||||
]
|
]
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
cd Downloads
|
cd Downloads
|
||||||
git clone https://gitlab.cern.ch/cara/cara.git
|
git clone https://gitlab.cern.ch/cara/cara.git
|
||||||
cd cara
|
cd caimira
|
||||||
if [[ `uname -m` == 'arm64' ]]; then
|
if [[ `uname -m` == 'arm64' ]]; then
|
||||||
pip3 install scipy --index-url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
|
pip3 install scipy --index-url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
|
||||||
pip3 install Cython
|
pip3 install Cython
|
||||||
|
|
@ -8,7 +8,7 @@ if [[ `uname -m` == 'arm64' ]]; then
|
||||||
fi
|
fi
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
echo "CARA is now running at http://localhost:8080"
|
echo "CAiMIRA is now running at http://localhost:8080"
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
python3 -m cara.apps.calculator
|
python3 -m caimira.apps.calculator
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
git clone https://gitlab.cern.ch/cara/cara.git
|
git clone https://gitlab.cern.ch/cara/cara.git
|
||||||
cd cara
|
cd caimira
|
||||||
pip install -e .
|
pip install -e .
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
echo "CARA is now running at http://localhost:8080"
|
echo "CAiMIRA is now running at http://localhost:8080"
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
python -m cara.apps.calculator
|
python -m caimira.apps.calculator
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
cd Downloads
|
cd Downloads
|
||||||
git clone https://gitlab.cern.ch/cara/cara.git
|
git clone https://gitlab.cern.ch/cara/cara.git
|
||||||
cd cara
|
cd caimira
|
||||||
if [[ `uname -m` == 'arm64' ]]; then
|
if [[ `uname -m` == 'arm64' ]]; then
|
||||||
pip3 install scipy --index-url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
|
pip3 install scipy --index-url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
|
||||||
pip3 install Cython
|
pip3 install Cython
|
||||||
|
|
@ -8,7 +8,7 @@ if [[ `uname -m` == 'arm64' ]]; then
|
||||||
fi
|
fi
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
echo "CARA is now running at http://localhost:8080"
|
echo "CAiMIRA is now running at http://localhost:8080"
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
python3 -m cara.apps.calculator --theme=cara/apps/templates/cern
|
python3 -m caimira.apps.calculator --theme=caimira/apps/templates/cern
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
git clone https://gitlab.cern.ch/cara/cara.git
|
git clone https://gitlab.cern.ch/cara/cara.git
|
||||||
cd cara
|
cd caimira
|
||||||
pip install -e .
|
pip install -e .
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
echo "CARA is now running at http://localhost:8080"
|
echo "CAiMIRA is now running at http://localhost:8080"
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
python -m cara.apps.calculator --theme=cara/apps/templates/cern
|
python -m caimira.apps.calculator --theme=caimira/apps/templates/cern
|
||||||
|
|
||||||
|
|
@ -5,7 +5,7 @@ for this purpose, but the need to define class-level attributes proved to be a
|
||||||
limitation that meant we could not mutate the state from one subclass to another
|
limitation that meant we could not mutate the state from one subclass to another
|
||||||
after the state was instantiated.
|
after the state was instantiated.
|
||||||
|
|
||||||
This module MUST not import other parts of cara as this would point at a
|
This module MUST not import other parts of caimira as this would point at a
|
||||||
leaky abstraction.
|
leaky abstraction.
|
||||||
|
|
||||||
"""
|
"""
|
||||||