Skip to content
Draft
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
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,32 @@ jobs:
run: pip install ruff

- name: Check formatting
run: ruff format --check src tests examples
run: ruff format --check src tests examples field-sheet

- name: Lint
run: ruff check src tests examples
run: ruff check src tests examples field-sheet

field-sheet:
name: "field sheet calculator"
runs-on: ubuntu-latest
env:
FIELD_SHEET_JS: "1"
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install package + dev dependencies
run: pip install -e ".[dev]"

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Browser calculator
run: node --test field-sheet/calc.test.mjs

- name: Match Python scores and serve the sheet
run: pytest --tb=short -q tests/test_field_sheet_matches_python.py tests/test_field_sheet_server.py
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

---

## [Unreleased]

### Added
- `field-sheet/`: browser field sheet for the same WSM and MCDA scores as `epea.core`.
Enter six EPI-style tiers, docking LBE and cost per kg. The sheet ranks candidates,
stores records in the browser and imports or exports the tier CSV.
- `python field-sheet/serve.py` serves the sheet at <http://127.0.0.1:43119>.
That address is the field sheet link in the README, package metadata and the page footer.
- Tests that the browser scores match the Python module, plus a server smoke test.

## [1.0.0] — 2024-05-30

### Added
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![DOI](https://img.shields.io/badge/DOI-10.3390%2Fijms25116009-blue)](https://doi.org/10.3390/ijms25116009)

Python reference implementation of the **weighted score (WSM) environmental impact** and **multicriteria decision analysis (MCDA)** workflow described in *International Journal of Molecular Sciences* (2024), for comparing disinfectant (or similar) candidates on efficacy, environmental profiles, and cost.
Python reference implementation and browser field sheet for the **weighted score (WSM) environmental impact** and **multicriteria decision analysis (MCDA)** workflow in *International Journal of Molecular Sciences* (2024). Compare disinfectant (or similar) candidates on efficacy, environmental profiles and cost.

**Field sheet:** [http://127.0.0.1:43119](http://127.0.0.1:43119)

Start the sheet from this repository, then open that address in a browser:

```bash
python field-sheet/serve.py
```

`npm run dev` and `npm start` start the same server. The worked example loads the three illustrative rows from `examples/run_demo.py`. Records stay in the browser. No data are uploaded. A blank candidate row is left out of the score. Import a CSV that uses the columns in `examples/sample_chemicals.template.csv`, or export one and pass it to `run_mcda_from_tier_table`.

This sheet scores candidates. It does not close a pre-harvest mass balance. That calculation lives in [antiviral-mass-balance](https://github.com/planttalks/antiviral-mass-balance).

**Paper:** Zure, D.; Sung, M.-H.; Rahim, A.; Kuo, H.-W. “In Silico Assessment of Chemical Disinfectants on Surface Proteins Unveiled Dissimilarity in Antiviral Efficacy and Suitability towards Pathogenic Viruses.” *Int. J. Mol. Sci.* **2024**, *25*, 6009. [https://doi.org/10.3390/ijms25116009](https://doi.org/10.3390/ijms25116009) · [MDPI article page](https://www.mdpi.com/1422-0067/25/11/6009)

Expand Down Expand Up @@ -74,6 +86,7 @@ python examples/run_demo.py

```bash
pytest
node --test field-sheet/calc.test.mjs
```

## Citation
Expand Down
2 changes: 2 additions & 0 deletions examples/run_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def main() -> None:
df = df.sort_values("O_percent", ascending=False)
print("\nMCDA ranking (higher O_percent = better overall):")
print(df.to_string(index=False))
print("\nThe same scores are on the field sheet: http://127.0.0.1:43119")
print("Start it with: python field-sheet/serve.py")


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions examples/sample_chemicals.template.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Zure et al. Int. J. Mol. Sci. 2024 25 6009 https://doi.org/10.3390/ijms25116009
# Import this file on the field sheet at http://127.0.0.1:43119 (python field-sheet/serve.py)
name,logOH,logKoc,HLN,logBCF,logBAF,DT50,LBE,USD_per_kg,notes
Example_1,safe,mild,safe,mild,safe,mild,-7.2,12.0,template row — edit or replace
Loading
Loading