mvote 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mvote/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """mVote: session/board creation for participatory sticky-note voting."""
2
+
3
+ __version__ = "0.1.0"
mvote/board.py ADDED
@@ -0,0 +1,63 @@
1
+ """Create and export mVote voting sessions ("boards").
2
+
3
+ This module does not depend on any backend. :func:`create_board` returns a
4
+ :class:`Board`, and a backend-specific writer (``firebase_store``) saves it.
5
+ Keeping this backend-agnostic is what lets someone deploy mVote without
6
+ being locked into Firebase specifically.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import uuid
11
+ from dataclasses import asdict, dataclass, field
12
+ from datetime import datetime, timezone
13
+ from pathlib import Path
14
+ from typing import Any
15
+
16
+ from .config import Item, load_items
17
+
18
+
19
+ @dataclass
20
+ class Board:
21
+ board_id: str
22
+ title: str
23
+ items: list[Item]
24
+ created_at: str
25
+ metadata: dict[str, Any] = field(default_factory=dict)
26
+
27
+ def to_dict(self) -> dict:
28
+ return asdict(self)
29
+
30
+
31
+ def create_board(config_path: str | Path, title: str, board_id: str | None = None) -> Board:
32
+ """Build a new :class:`Board` from an item config file.
33
+
34
+ Does not persist anything — callers (CLI, backend adapter) are
35
+ responsible for writing the board to a store and generating the
36
+ link/QR code from ``board_id``.
37
+ """
38
+ items = load_items(config_path)
39
+ return Board(
40
+ board_id=board_id or uuid.uuid4().hex[:8],
41
+ title=title,
42
+ items=items,
43
+ created_at=datetime.now(timezone.utc).isoformat(),
44
+ )
45
+
46
+
47
+ def export_results(board: Board, vote_counts: dict[str, int]) -> list[dict]:
48
+ """Produce a tidy, analysis-ready export of vote results.
49
+
50
+ Returns one row per item: ``board_id``, ``board_title``, ``item_id``,
51
+ ``label``, ``vote_count`` — the structured-data export that is mVote's
52
+ core differentiator versus workshop-oriented dot-voting tools.
53
+ """
54
+ return [
55
+ {
56
+ "board_id": board.board_id,
57
+ "board_title": board.title,
58
+ "item_id": item.id,
59
+ "label": item.label,
60
+ "vote_count": vote_counts.get(item.id, 0),
61
+ }
62
+ for item in board.items
63
+ ]
mvote/cli.py ADDED
@@ -0,0 +1,125 @@
1
+ """Command-line interface for creating mVote voting sessions."""
2
+ from __future__ import annotations
3
+
4
+ import csv
5
+ import json
6
+ import os
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ import click
11
+
12
+ from . import firebase_store
13
+ from .board import create_board
14
+ from .config import ConfigError
15
+
16
+ DEFAULT_BASE_URL_ENV = "MVOTE_WEBAPP_URL"
17
+ PLACEHOLDER_BASE_URL = "https://mvote.example/vote"
18
+ RESULT_FIELDS = ["board_id", "board_title", "item_id", "label", "vote_count"]
19
+
20
+
21
+ @click.group()
22
+ @click.version_option()
23
+ def main():
24
+ """mVote: create participatory sticky-note voting sessions."""
25
+
26
+
27
+ @main.command("create")
28
+ @click.option("--config", "config_path", required=True, type=click.Path(exists=True),
29
+ help="Path to a CSV or JSON item config file.")
30
+ @click.option("--title", required=True, help="Title for this session (e.g. 'Week 3').")
31
+ @click.option("--board-id", default=None, help="Optional fixed board id; random if omitted.")
32
+ @click.option("--out", "out_path", default=None, type=click.Path(),
33
+ help="Write the board definition (JSON) to this path instead of stdout.")
34
+ @click.option("--publish/--no-publish", default=False,
35
+ help="Also write the board to Firebase and print a shareable link + QR code.")
36
+ @click.option("--overwrite", is_flag=True, default=False,
37
+ help="With --publish, replace a board that already has this id. Its vote counts "
38
+ "return to zero; dots participants already spent stay spent.")
39
+ @click.option("--base-url", default=None,
40
+ help=f"Webapp base URL for the shareable link (or set {DEFAULT_BASE_URL_ENV}). "
41
+ "Only used with --publish.")
42
+ @click.option("--qr-out", "qr_out_path", default=None, type=click.Path(),
43
+ help="Save the shareable link's QR code as a PNG to this path (only with --publish; "
44
+ "prints an ASCII QR code to the terminal if omitted).")
45
+ def create(config_path: str, title: str, board_id: str | None, out_path: str | None,
46
+ publish: bool, overwrite: bool, base_url: str | None, qr_out_path: str | None):
47
+ """Create a new board from an item config file.
48
+
49
+ With --publish, also writes the board to Firestore (see cli/README.md
50
+ for the required GOOGLE_APPLICATION_CREDENTIALS setup) and prints a
51
+ shareable participant link and QR code.
52
+ """
53
+ try:
54
+ board = create_board(config_path, title=title, board_id=board_id)
55
+ except ConfigError as e:
56
+ click.echo(f"Config error: {e}", err=True)
57
+ sys.exit(1)
58
+
59
+ payload = board.to_dict()
60
+ text = json.dumps(payload, indent=2, default=str)
61
+
62
+ if out_path:
63
+ Path(out_path).write_text(text, encoding="utf-8")
64
+ click.echo(f"Board '{board.board_id}' written to {out_path}")
65
+ else:
66
+ click.echo(text)
67
+
68
+ if publish:
69
+ try:
70
+ firebase_store.save_board(board, overwrite=overwrite)
71
+ except firebase_store.BoardExistsError as e:
72
+ click.echo(str(e), err=True)
73
+ sys.exit(1)
74
+ click.echo(f"Board '{board.board_id}' published to Firestore.")
75
+
76
+ resolved_base_url = base_url or os.environ.get(DEFAULT_BASE_URL_ENV)
77
+ if not resolved_base_url:
78
+ resolved_base_url = PLACEHOLDER_BASE_URL
79
+ click.echo(
80
+ f"Note: no webapp URL configured (--base-url or {DEFAULT_BASE_URL_ENV}); "
81
+ "using a placeholder until the webapp is deployed.",
82
+ err=True,
83
+ )
84
+ link = f"{resolved_base_url.rstrip('/')}/{board.board_id}"
85
+ click.echo(f"Participant link: {link}")
86
+
87
+ import qrcode
88
+
89
+ if qr_out_path:
90
+ qrcode.make(link).save(qr_out_path)
91
+ click.echo(f"QR code written to {qr_out_path}")
92
+ else:
93
+ qr = qrcode.QRCode()
94
+ qr.add_data(link)
95
+ qr.print_ascii()
96
+
97
+
98
+ @main.command("results")
99
+ @click.option("--board-id", required=True, help="Id of a board previously created with --publish.")
100
+ @click.option("--out", "out_path", default=None, type=click.Path(),
101
+ help="Write results as CSV to this path instead of stdout.")
102
+ def results(board_id: str, out_path: str | None):
103
+ """Fetch live vote counts for a published board and export tidy results."""
104
+ try:
105
+ rows = firebase_store.export_board_results(board_id)
106
+ except ValueError as e:
107
+ click.echo(str(e), err=True)
108
+ sys.exit(1)
109
+
110
+ if out_path:
111
+ with open(out_path, "w", newline="", encoding="utf-8") as f:
112
+ _write_results(f, rows)
113
+ click.echo(f"Results for board '{board_id}' written to {out_path}")
114
+ else:
115
+ _write_results(sys.stdout, rows)
116
+
117
+
118
+ def _write_results(stream, rows: list[dict]) -> None:
119
+ writer = csv.DictWriter(stream, fieldnames=RESULT_FIELDS)
120
+ writer.writeheader()
121
+ writer.writerows(rows)
122
+
123
+
124
+ if __name__ == "__main__":
125
+ main()
mvote/config.py ADDED
@@ -0,0 +1,105 @@
1
+ """Load and validate item configs (CSV or JSON) for a mVote session.
2
+
3
+ An item config defines the sticky notes participants will vote on. Each item
4
+ needs at minimum an ``id`` and a ``label``; a ``description`` is optional.
5
+
6
+ JSON format::
7
+
8
+ [
9
+ {"id": "var_001", "label": "Depressive symptoms", "description": "..."},
10
+ {"id": "var_002", "label": "Sleep quality"}
11
+ ]
12
+
13
+ CSV format (header row required)::
14
+
15
+ id,label,description
16
+ var_001,Depressive symptoms,...
17
+ var_002,Sleep quality,
18
+ """
19
+ from __future__ import annotations
20
+
21
+ import csv
22
+ import json
23
+ from dataclasses import dataclass
24
+ from pathlib import Path
25
+
26
+
27
+ REQUIRED_FIELDS = ("id", "label")
28
+
29
+
30
+ class ConfigError(ValueError):
31
+ """Raised when an item config file is missing required fields or is malformed."""
32
+
33
+
34
+ @dataclass(frozen=True)
35
+ class Item:
36
+ id: str
37
+ label: str
38
+ description: str = ""
39
+
40
+
41
+ def load_items(path: str | Path) -> list[Item]:
42
+ """Load a list of :class:`Item` from a CSV or JSON file.
43
+
44
+ Raises:
45
+ ConfigError: if the file is malformed, has duplicate ids, or is
46
+ missing required fields.
47
+ FileNotFoundError: if ``path`` does not exist.
48
+ """
49
+ path = Path(path)
50
+ if not path.exists():
51
+ raise FileNotFoundError(f"Config file not found: {path}")
52
+
53
+ if path.suffix.lower() == ".json":
54
+ raw_items = _load_json(path)
55
+ elif path.suffix.lower() == ".csv":
56
+ raw_items = _load_csv(path)
57
+ else:
58
+ raise ConfigError(
59
+ f"Unsupported config file type '{path.suffix}'. Use .csv or .json."
60
+ )
61
+
62
+ items = []
63
+ seen_ids = set()
64
+ for i, raw in enumerate(raw_items):
65
+ if not isinstance(raw, dict):
66
+ raise ConfigError(f"Item at index {i} must be an object with id and label.")
67
+ missing = [f for f in REQUIRED_FIELDS if not raw.get(f)]
68
+ if missing:
69
+ raise ConfigError(
70
+ f"Item at index {i} is missing required field(s): {missing}"
71
+ )
72
+ # Compared as text, the way ids are stored: 1 and "1" are the same id.
73
+ item_id = str(raw["id"])
74
+ if item_id in seen_ids:
75
+ raise ConfigError(f"Duplicate item id found: '{item_id}'")
76
+ seen_ids.add(item_id)
77
+ items.append(
78
+ Item(
79
+ id=item_id,
80
+ label=str(raw["label"]),
81
+ description=str(raw.get("description", "") or ""),
82
+ )
83
+ )
84
+
85
+ if not items:
86
+ raise ConfigError("Config file contains no items.")
87
+
88
+ return items
89
+
90
+
91
+ def _load_json(path: Path) -> list[dict]:
92
+ with path.open("r", encoding="utf-8") as f:
93
+ try:
94
+ data = json.load(f)
95
+ except json.JSONDecodeError as e:
96
+ raise ConfigError(f"Config file is not valid JSON: {e}") from e
97
+ if not isinstance(data, list):
98
+ raise ConfigError("JSON config must be a list of item objects.")
99
+ return data
100
+
101
+
102
+ def _load_csv(path: Path) -> list[dict]:
103
+ with path.open("r", encoding="utf-8", newline="") as f:
104
+ reader = csv.DictReader(f)
105
+ return list(reader)
@@ -0,0 +1,116 @@
1
+ """Firestore-backed persistence for mVote boards and votes.
2
+
3
+ This is the one Firebase-specific module in the project — board.py stays
4
+ backend-agnostic on purpose (see its docstring). Swapping to a different
5
+ backend later means reimplementing the functions here, not touching board.py.
6
+
7
+ Every function accepts an optional ``db`` (a Firestore client, or anything
8
+ duck-typing its ``collection()``/``document()`` interface) so callers —
9
+ tests included — can inject a fake instead of hitting real Firebase.
10
+ """
11
+ from __future__ import annotations
12
+
13
+ import os
14
+ from typing import Any
15
+
16
+ from .board import Board, export_results
17
+ from .config import Item
18
+
19
+ BOARDS_COLLECTION = "boards"
20
+ VOTES_SUBCOLLECTION = "votes"
21
+
22
+
23
+ def get_client() -> Any:
24
+ """Return a Firestore client, initializing the Firebase app if needed.
25
+
26
+ Credentials come from the ``GOOGLE_APPLICATION_CREDENTIALS`` environment
27
+ variable (a service-account JSON key path) via Firebase's standard
28
+ Application Default Credentials flow — see cli/README.md for setup.
29
+ """
30
+ import firebase_admin
31
+ from firebase_admin import credentials, firestore
32
+
33
+ if not firebase_admin._apps:
34
+ cred_path = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS")
35
+ if cred_path:
36
+ firebase_admin.initialize_app(credentials.Certificate(cred_path))
37
+ else:
38
+ firebase_admin.initialize_app()
39
+ return firestore.client()
40
+
41
+
42
+ class BoardExistsError(ValueError):
43
+ """Raised when publishing would replace a board that is already there."""
44
+
45
+
46
+ def save_board(board: Board, db: Any = None, overwrite: bool = False) -> None:
47
+ """Write a board and its zero-initialized vote counts to Firestore.
48
+
49
+ Publishing sets every count to zero, so a board that already exists is
50
+ left alone unless ``overwrite`` is true.
51
+
52
+ Raises:
53
+ BoardExistsError: if the board exists and ``overwrite`` is false.
54
+ """
55
+ db = db or get_client()
56
+ board_ref = db.collection(BOARDS_COLLECTION).document(board.board_id)
57
+ if not overwrite and board_ref.get().exists:
58
+ raise BoardExistsError(
59
+ f"Board '{board.board_id}' already exists. Publishing again would reset its "
60
+ "votes to zero. Choose another --board-id, or pass --overwrite to replace it."
61
+ )
62
+ board_ref.set(
63
+ {
64
+ "title": board.title,
65
+ "created_at": board.created_at,
66
+ "metadata": board.metadata,
67
+ "items": [
68
+ {"id": item.id, "label": item.label, "description": item.description}
69
+ for item in board.items
70
+ ],
71
+ }
72
+ )
73
+ votes_ref = board_ref.collection(VOTES_SUBCOLLECTION)
74
+ for item in board.items:
75
+ votes_ref.document(item.id).set({"count": 0})
76
+
77
+
78
+ def load_board(board_id: str, db: Any = None) -> Board:
79
+ """Fetch a previously-saved board definition from Firestore.
80
+
81
+ Raises:
82
+ ValueError: if no board with this id exists.
83
+ """
84
+ db = db or get_client()
85
+ snapshot = db.collection(BOARDS_COLLECTION).document(board_id).get()
86
+ if not snapshot.exists:
87
+ raise ValueError(f"Board '{board_id}' not found.")
88
+ data = snapshot.to_dict()
89
+ items = [
90
+ Item(id=i["id"], label=i["label"], description=i.get("description", ""))
91
+ for i in data["items"]
92
+ ]
93
+ return Board(
94
+ board_id=board_id,
95
+ title=data["title"],
96
+ items=items,
97
+ created_at=data["created_at"],
98
+ metadata=data.get("metadata", {}),
99
+ )
100
+
101
+
102
+ def fetch_vote_counts(board_id: str, db: Any = None) -> dict[str, int]:
103
+ """Read current per-item vote counts for a board from Firestore."""
104
+ db = db or get_client()
105
+ votes_ref = db.collection(BOARDS_COLLECTION).document(board_id).collection(
106
+ VOTES_SUBCOLLECTION
107
+ )
108
+ return {doc.id: (doc.to_dict() or {}).get("count", 0) for doc in votes_ref.stream()}
109
+
110
+
111
+ def export_board_results(board_id: str, db: Any = None) -> list[dict]:
112
+ """Load a board and its live vote counts, and produce the tidy export rows."""
113
+ db = db or get_client()
114
+ board = load_board(board_id, db=db)
115
+ vote_counts = fetch_vote_counts(board_id, db=db)
116
+ return export_results(board, vote_counts)
@@ -0,0 +1,76 @@
1
+ Metadata-Version: 2.4
2
+ Name: mvote
3
+ Version: 0.1.0
4
+ Summary: CLI for creating and configuring mVote participatory sticky-note voting sessions
5
+ Author: Valentín Quiroz de la Sierra, Marissa Ledesma
6
+ License-Expression: Apache-2.0
7
+ Keywords: cbpr,participatory-research,dot-voting,research-tools
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Topic :: Scientific/Engineering
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ License-File: NOTICE
15
+ Requires-Dist: qrcode[pil]>=7.4
16
+ Requires-Dist: click>=8.1
17
+ Requires-Dist: firebase-admin>=6.5
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=7.0; extra == "dev"
20
+ Requires-Dist: pytest-cov; extra == "dev"
21
+ Dynamic: license-file
22
+
23
+ # mvote (command line tool)
24
+
25
+ A Python command line tool that creates mVote voting sessions ("boards") from a CSV or JSON file of items.
26
+
27
+ ## Install for development
28
+
29
+ ```bash
30
+ cd cli
31
+ pip install -e ".[dev]"
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```bash
37
+ mvote create --config ../examples/chks_example.json --title "Week 3"
38
+ ```
39
+
40
+ This prints the board definition as JSON, or writes it to a file with `--out`. It doesn't touch any backend.
41
+
42
+ ### Publish a session to Firebase
43
+
44
+ Add `--publish` to also write the board to Firestore and print a link and QR code you can share:
45
+
46
+ ```bash
47
+ mvote create --config ../examples/chks_example.json --title "Week 3" --publish
48
+ ```
49
+
50
+ Publishing sets every vote count to zero, so the tool won't publish over a board that already exists. Choose another `--board-id`, or add `--overwrite` if you mean to replace the board and start its counts again.
51
+
52
+ This needs a Firebase project with **Firestore** turned on. Sign the tool in with a service account key. In the Firebase console, go to Project settings, then Service accounts, then Generate new private key. Then set `GOOGLE_APPLICATION_CREDENTIALS` to the downloaded JSON file. **Never commit this file to the repo.**
53
+
54
+ ```bash
55
+ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.json
56
+ ```
57
+
58
+ The link uses a placeholder domain until you tell the tool where the web app lives. Pass `--base-url` or set `MVOTE_WEBAPP_URL`. Use `--qr-out path.png` to save the QR code as an image instead of printing it.
59
+
60
+ After participants have voted in the web app, pull the results:
61
+
62
+ ```bash
63
+ mvote results --board-id <id> --out results.csv
64
+ ```
65
+
66
+ ## Tests
67
+
68
+ ```bash
69
+ pytest
70
+ ```
71
+
72
+ ## Releases
73
+
74
+ Releases follow [SPEC-distribution](https://github.com/MalverdeSoftware/malverdesoftware/blob/main/docs/specs/SPEC-distribution.md). Until the public flip, `.github/workflows/cli-release.yml` is a dry run. It builds the sdist and wheel, runs `twine check --strict` and `scripts/check-cli-release.py`, installs the wheel, and keeps the files as a workflow artifact. Nothing goes to PyPI.
75
+
76
+ `cli/LICENSE` and `cli/NOTICE` are copies of the root files, so that both the wheel and installs from GitHub include them. After you edit either root file, run `python scripts/check-cli-release.py --fix`; the check fails while the copies differ. Release tags take the form `v<version>` and must match `version` in `pyproject.toml`.
@@ -0,0 +1,12 @@
1
+ mvote/__init__.py,sha256=cFRtybqUwX2z00rm7Bru3qmlgxgwg16TELJlztbvVcc,97
2
+ mvote/board.py,sha256=F_axWSOu7lWRkC1OGIJyH8dCl1cWN_-fQdU8xE1M7lc,1956
3
+ mvote/cli.py,sha256=giC8uD_BwS3eQL_MPTZMMrPhKEoRTR6cZ3xDeCJEOZA,4844
4
+ mvote/config.py,sha256=CGAo0Zpid4W4YEfhlzyZ5ZrcLYJzynx6_Wwt_CTZgOY,3060
5
+ mvote/firebase_store.py,sha256=AKADtPEyPDNxnU1M2_ZnMKycH9X46dbzQnUsMqtS-ag,4169
6
+ mvote-0.1.0.dist-info/licenses/LICENSE,sha256=yVuuHRzgI17MzTVgt3LsHvuX80innw--CmNPDCzO_iw,11358
7
+ mvote-0.1.0.dist-info/licenses/NOTICE,sha256=Tc6lc-aoILsn99GQs3JIv8bR1JP2BtP89RFlLKKkqjE,631
8
+ mvote-0.1.0.dist-info/METADATA,sha256=RxevhzARJtQuxvZiej-LAp760Co_fq11uAWYACNrxcM,3110
9
+ mvote-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
10
+ mvote-0.1.0.dist-info/entry_points.txt,sha256=M2uyNHvwgLxbQJ0c_dOCAsjP74IdjDrb3TpCO4EuPVY,41
11
+ mvote-0.1.0.dist-info/top_level.txt,sha256=YrlxuykTwsvpVsenxwByVTG5krDyMpB4FwBtiT-cjqA,6
12
+ mvote-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mvote = mvote.cli:main
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
@@ -0,0 +1,14 @@
1
+ mVote
2
+ Copyright 2026 The Johns Hopkins University
3
+
4
+ Developed by Valentín Quiroz de la Sierra and Marissa Ledesma for MalverdeSoftware.
5
+
6
+ This work was supported by the National Institute on Drug Abuse of the
7
+ National Institutes of Health under Award Number K99DA066943. The content is
8
+ solely the responsibility of the authors and does not necessarily represent
9
+ the official views of the National Institutes of Health.
10
+
11
+ Cite as: de la Sierra, V. Q., & Ledesma, M. (2026). mVote
12
+ [Computer software]. MalverdeSoftware. https://github.com/MalverdeSoftware/mvote
13
+
14
+ This product includes third-party software; see THIRD_PARTY_NOTICES.md.
@@ -0,0 +1 @@
1
+ mvote