Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyStationB/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dependencies:
- python==3.8.3
- pip==20.1.1
- pip:
- -r requirements_dev.txt
- -r requirements_dev.txt
1 change: 1 addition & 0 deletions PyStationB/libraries/ABEX/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gpy==1.10.0
matplotlib==3.4.2
pandas==1.3.1
param==1.11.1
psutil==5.7.1
pydantic==1.8.2
pydoe==0.3.8
pyyaml==5.4.1
Expand Down
2 changes: 1 addition & 1 deletion PyStationB/libraries/PyBCKG/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="",
packages=["pyBCKG"],
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand Down
2 changes: 1 addition & 1 deletion PyStationB/libraries/Utilities/psbutils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def flatten_list(lst: List[List[Any]]) -> List[Any]: # pragma: no cover


def find_root_directory() -> Path: # pragma: no cover
path = Path(__file__).parent
path = Path.cwd()
while True:
if (path / "libraries").is_dir() and (path / "projects").is_dir():
return path.resolve()
Expand Down
46 changes: 46 additions & 0 deletions PyStationB/projects/Malvern/.amlignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
*.egg-info/
*.ipynb
*.md
.amlignore
.coverage
.coveragerc
.flake8
.git
.gitattributes
.github
.gitignore
.idea
.mypy.ini
.mypy_cache/
.pre-commit-config.yaml
.pytest_cache/
.testmondata
.vscode/
/additional_requirements*.txt
/azure-pipelines/
/mypy.ini
/mypy_runner.py
/node_modules/
/scripts/
DATA/
Data/
LICENSE
Makefile
Notebooks/
README.txt
Results/
SC_RESULTS/
__pycache__/
abex-results/
doc/
docs/
libraries/StaticCharacterization
libraries/UniProt
make.bat
projects/Barcoder
projects/CellSignalling
projects/OXB_Proteomics
projects/OXB_Transfection
slow_tests/
test_outputs/
tests/
13 changes: 13 additions & 0 deletions PyStationB/projects/Malvern/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[run]
parallel = true
omit =
*/setup.py,
*/tests/*,
/simulator/*
source =
api

[report]
show_missing = true
precision = 2
fail_under = 100.00
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FLASK_APP=api/app.py
FLASK_APP=api
FLASK_ENV=development
30 changes: 14 additions & 16 deletions PyStationB/projects/Malvern/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
## Getting started

1. Install [Node.js](https://nodejs.org/en/). This will automatically install Node Package Manager (npm) too.

2. To install the dependencies for our app (specified in package.json):
```cd app```
```npm install```

## Setting up the backend (Flask api)
To create the virtual environment:
`npm install`

```pyStationB/app/api$ python -m venv MalvernEnv```
## Setting up the conda envrionment
Run the following command from the Malvern directory:

## To install the packages:
```pyStationB/app/api$ python -m pip install -r ../requirements_dev.txt```
```pyStationB/app/api$ python -m pip install ../../libraries/ABEX```
```pyStationB/app/api$ python -m pip install ../../libraries/Emukit```
`conda env create -f environment.yml`

## Install pyBCKG git submodule:
```pyStationB/app$ cd ../ ```
```pyStationB$ git submodule update --init --recursive``
## To Activate the conda env:

## To Activate the virtual env:
`conda activate malvern`

```pyStationB/app$ api\MalvernEnv\Scripts\activate Malvern``

## Running the app

### To start the React app
`app$ npm run start`

`npm run start`

### To start the Flask API
`app$ npm run start-api`
`npm run start-api`

## Connecting to Azure
When you first start the app you will be prompted to login. To do this, enter a connection string in the login tab. Follow the [instructions here](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal#view-account-access-keys) to get the connection string for your storage account
11 changes: 11 additions & 0 deletions PyStationB/projects/Malvern/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------------------------------
from flask import Flask

app = Flask(__name__)
app.config["UPLOADS_DIR"] = "./uploads"
from api import routes # type: ignore # noqa: E402

assert routes is not None # for flake8
Loading