ba-certification-finder 1.0.0__tar.gz

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.
@@ -0,0 +1,18 @@
1
+ node_modules/
2
+ dist/
3
+ .output/
4
+ .wxt/
5
+ apps/wordpress-plugin/assets/build/
6
+ apps/discord-bot/.env
7
+ *.zip
8
+ .DS_Store
9
+ # Generated copy of the shared core inside the Python package (pnpm --filter python-package sync)
10
+ apps/python-package/src/ba_cert_finder/_assets/
11
+ apps/python-package/dist/
12
+ __pycache__/
13
+ *.egg-info/
14
+ .venv/
15
+ .pytest_cache/
16
+ # Google Workspace add-on build output and personal clasp settings
17
+ apps/google-workspace/build/
18
+ apps/google-workspace/.clasp.json
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.5
2
+ Name: ba-certification-finder
3
+ Version: 1.0.0
4
+ Summary: Find the right Business Analyst certification (ECBA, CCBA, CBAP, CBDA, AAC, CCA, PMI-PBA). Same rules engine as the Techcanvass browser extension and WordPress plugin.
5
+ Project-URL: Homepage, https://www.techcanvass.com
6
+ Author: Techcanvass
7
+ License-Expression: GPL-2.0-or-later
8
+ Keywords: business analysis,cbap,ccba,certification,ecba,iiba,pmi-pba
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Education
15
+ Requires-Python: >=3.10
16
+ Requires-Dist: mini-racer<1,>=0.12
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest>=8; extra == 'test'
19
+ Description-Content-Type: text/markdown
20
+
21
+ # BA Certification Finder
22
+
23
+ Find the right Business Analyst certification (**ECBA, CCBA, CBAP, CBDA, AAC, CCA or PMI-PBA**) from
24
+ someone's background and the work they actually do. You don't need to know certification terminology.
25
+
26
+ This is the same rules engine that powers the Techcanvass BA Certification Finder browser extension
27
+ and WordPress plugin, so it gives identical results everywhere.
28
+
29
+ ```bash
30
+ pip install ba-certification-finder
31
+ ```
32
+
33
+ Requires Python 3.10+. Works on Windows, macOS and Linux.
34
+
35
+ ## Command line
36
+
37
+ ```bash
38
+ ba-cert-finder
39
+ ```
40
+
41
+ This opens a guided questionnaire: about you, your work activities, then your matches.
42
+
43
+ Other commands:
44
+
45
+ ```bash
46
+ # Quick hours-based ECBA / CCBA / CBAP check
47
+ ba-cert-finder check --ba-hours 5000 --pd-hours 35 --ka planning=1200 --ka elicitation=1200 --ka radd=900 --ka strategy=900
48
+
49
+ # Report for saved answers (JSON file, or - for stdin)
50
+ ba-cert-finder find answers.json
51
+ ba-cert-finder find answers.json --json
52
+
53
+ # All questions and their allowed values
54
+ ba-cert-finder questions
55
+ ```
56
+
57
+ Knowledge areas for `--ka`: `planning`, `elicitation`, `lifecycle`, `strategy`, `radd`, `evaluation`.
58
+
59
+ ## Python
60
+
61
+ ```python
62
+ from ba_cert_finder import find_certifications, check_eligibility
63
+
64
+ report = find_certifications({
65
+ "totalYears": 6, # values: see `ba-cert-finder questions`
66
+ "background": "ba",
67
+ "education": "bachelor",
68
+ "interest": "general",
69
+ "activities": [0, 1, 4, 6], # indices of everyday work activities
70
+ "baYears": 6,
71
+ "baShare": 0.7,
72
+ "continuity": "continuous",
73
+ "recent": "current",
74
+ })
75
+ for m in report["matches"]:
76
+ print(m["code"], "-", m["status"])
77
+
78
+ result = check_eligibility({
79
+ "baHours": 5000, "pdHours": 35, "agreesToEthics": True,
80
+ "kaHours": {"planning": 1200, "elicitation": 1200, "radd": 900, "strategy": 900},
81
+ })
82
+ print(result["recommended"]) # "CCBA"
83
+ ```
84
+
85
+ Invalid input raises `FinderInputError` or `EligibilityInputError` (both `ValueError`). Each has an
86
+ `.errors` list of `{"field", "message"}`.
87
+
88
+ ### Up-to-date rules
89
+
90
+ ```python
91
+ from ba_cert_finder import load_rules, find_certifications
92
+
93
+ rules, source = load_rules("https://example.com/iiba-rules.json") # source: "remote" or "bundled"
94
+ report = find_certifications(answers, rules=rules)
95
+ ```
96
+
97
+ A hosted file is used only if it is valid and not older than the rules bundled with the package.
98
+ On the command line, use `--rules-url`.
99
+
100
+ ## How it works
101
+
102
+ The certification logic is written once, in TypeScript, and compiled to a single JavaScript file.
103
+ This package runs that exact file in Google's V8 engine (via `mini-racer`). It contains no logic of
104
+ its own, so a rule change in the shared core reaches every platform.
105
+
106
+ ---
107
+
108
+ Independent guidance based on published IIBA and PMI criteria. Final eligibility is determined by the
109
+ certification body. IIBA®, BABOK®, ECBA™, CCBA®, CBAP®, CBDA®, AAC® and CCA® are trademarks of the
110
+ International Institute of Business Analysis. PMI-PBA® is a mark of the Project Management Institute.
111
+ This package is not affiliated with or endorsed by IIBA or PMI.
@@ -0,0 +1,91 @@
1
+ # BA Certification Finder
2
+
3
+ Find the right Business Analyst certification (**ECBA, CCBA, CBAP, CBDA, AAC, CCA or PMI-PBA**) from
4
+ someone's background and the work they actually do. You don't need to know certification terminology.
5
+
6
+ This is the same rules engine that powers the Techcanvass BA Certification Finder browser extension
7
+ and WordPress plugin, so it gives identical results everywhere.
8
+
9
+ ```bash
10
+ pip install ba-certification-finder
11
+ ```
12
+
13
+ Requires Python 3.10+. Works on Windows, macOS and Linux.
14
+
15
+ ## Command line
16
+
17
+ ```bash
18
+ ba-cert-finder
19
+ ```
20
+
21
+ This opens a guided questionnaire: about you, your work activities, then your matches.
22
+
23
+ Other commands:
24
+
25
+ ```bash
26
+ # Quick hours-based ECBA / CCBA / CBAP check
27
+ ba-cert-finder check --ba-hours 5000 --pd-hours 35 --ka planning=1200 --ka elicitation=1200 --ka radd=900 --ka strategy=900
28
+
29
+ # Report for saved answers (JSON file, or - for stdin)
30
+ ba-cert-finder find answers.json
31
+ ba-cert-finder find answers.json --json
32
+
33
+ # All questions and their allowed values
34
+ ba-cert-finder questions
35
+ ```
36
+
37
+ Knowledge areas for `--ka`: `planning`, `elicitation`, `lifecycle`, `strategy`, `radd`, `evaluation`.
38
+
39
+ ## Python
40
+
41
+ ```python
42
+ from ba_cert_finder import find_certifications, check_eligibility
43
+
44
+ report = find_certifications({
45
+ "totalYears": 6, # values: see `ba-cert-finder questions`
46
+ "background": "ba",
47
+ "education": "bachelor",
48
+ "interest": "general",
49
+ "activities": [0, 1, 4, 6], # indices of everyday work activities
50
+ "baYears": 6,
51
+ "baShare": 0.7,
52
+ "continuity": "continuous",
53
+ "recent": "current",
54
+ })
55
+ for m in report["matches"]:
56
+ print(m["code"], "-", m["status"])
57
+
58
+ result = check_eligibility({
59
+ "baHours": 5000, "pdHours": 35, "agreesToEthics": True,
60
+ "kaHours": {"planning": 1200, "elicitation": 1200, "radd": 900, "strategy": 900},
61
+ })
62
+ print(result["recommended"]) # "CCBA"
63
+ ```
64
+
65
+ Invalid input raises `FinderInputError` or `EligibilityInputError` (both `ValueError`). Each has an
66
+ `.errors` list of `{"field", "message"}`.
67
+
68
+ ### Up-to-date rules
69
+
70
+ ```python
71
+ from ba_cert_finder import load_rules, find_certifications
72
+
73
+ rules, source = load_rules("https://example.com/iiba-rules.json") # source: "remote" or "bundled"
74
+ report = find_certifications(answers, rules=rules)
75
+ ```
76
+
77
+ A hosted file is used only if it is valid and not older than the rules bundled with the package.
78
+ On the command line, use `--rules-url`.
79
+
80
+ ## How it works
81
+
82
+ The certification logic is written once, in TypeScript, and compiled to a single JavaScript file.
83
+ This package runs that exact file in Google's V8 engine (via `mini-racer`). It contains no logic of
84
+ its own, so a rule change in the shared core reaches every platform.
85
+
86
+ ---
87
+
88
+ Independent guidance based on published IIBA and PMI criteria. Final eligibility is determined by the
89
+ certification body. IIBA®, BABOK®, ECBA™, CCBA®, CBAP®, CBDA®, AAC® and CCA® are trademarks of the
90
+ International Institute of Business Analysis. PMI-PBA® is a mark of the Project Management Institute.
91
+ This package is not affiliated with or endorsed by IIBA or PMI.
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ba-certification-finder"
7
+ version = "1.0.0"
8
+ description = "Find the right Business Analyst certification (ECBA, CCBA, CBAP, CBDA, AAC, CCA, PMI-PBA). Same rules engine as the Techcanvass browser extension and WordPress plugin."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "GPL-2.0-or-later"
12
+ authors = [{ name = "Techcanvass" }]
13
+ keywords = ["iiba", "cbap", "ccba", "ecba", "business analysis", "certification", "pmi-pba"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Education",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Education",
21
+ ]
22
+ # V8 engine that runs the shared core. Prebuilt for Windows, macOS and Linux (x86_64 + ARM).
23
+ dependencies = ["mini-racer>=0.12,<1"]
24
+
25
+ [project.optional-dependencies]
26
+ test = ["pytest>=8"]
27
+
28
+ [project.scripts]
29
+ ba-cert-finder = "ba_cert_finder.cli:main"
30
+
31
+ [project.urls]
32
+ Homepage = "https://www.techcanvass.com"
33
+
34
+ [tool.hatch.build.targets.wheel]
35
+ packages = ["src/ba_cert_finder"]
36
+
37
+ [tool.hatch.build]
38
+ # _assets/ is generated by `pnpm --filter python-package sync` and git-ignored; ship it anyway.
39
+ artifacts = ["src/ba_cert_finder/_assets/*.js", "src/ba_cert_finder/_assets/*.json"]
40
+
41
+ [tool.hatch.build.targets.sdist]
42
+ include = ["src", "tests", "README.md", "pyproject.toml"]
43
+
44
+ [tool.pytest.ini_options]
45
+ testpaths = ["tests"]
@@ -0,0 +1,126 @@
1
+ """BA Certification Finder — find the right Business Analyst certification.
2
+
3
+ Uses the same rules engine as the Techcanvass browser extension and WordPress plugin::
4
+
5
+ from ba_cert_finder import find_certifications
6
+
7
+ report = find_certifications({
8
+ "totalYears": 6, "background": "ba", "education": "bachelor", "interest": "general",
9
+ "activities": [0, 1, 4, 6], "baYears": 6, "baShare": 0.7,
10
+ "continuity": "continuous", "recent": "current",
11
+ })
12
+ for m in report["matches"]:
13
+ print(m["code"], "-", m["status"])
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import copy
19
+ import json
20
+ import urllib.request
21
+ from collections.abc import Mapping
22
+ from importlib.metadata import PackageNotFoundError, version
23
+ from typing import Any
24
+
25
+ from . import _engine
26
+
27
+ try:
28
+ __version__ = version("ba-certification-finder")
29
+ except PackageNotFoundError: # running from a source checkout
30
+ __version__ = "0.0.0"
31
+
32
+ __all__ = [
33
+ "BACertFinderError",
34
+ "EligibilityInputError",
35
+ "FinderInputError",
36
+ "bundled_rules",
37
+ "check_eligibility",
38
+ "find_certifications",
39
+ "load_rules",
40
+ "__version__",
41
+ ]
42
+
43
+
44
+ class BACertFinderError(ValueError):
45
+ """Invalid input. ``errors`` lists ``{"field": ..., "message": ...}`` per problem."""
46
+
47
+ def __init__(self, message: str, errors: list[dict[str, str]] | None = None):
48
+ super().__init__(message)
49
+ self.errors = errors or []
50
+
51
+
52
+ class FinderInputError(BACertFinderError):
53
+ """Raised by :func:`find_certifications` for invalid answers."""
54
+
55
+
56
+ class EligibilityInputError(BACertFinderError):
57
+ """Raised by :func:`check_eligibility` for invalid input."""
58
+
59
+
60
+ _ERRORS = {"FinderInputError": FinderInputError, "EligibilityInputError": EligibilityInputError}
61
+
62
+
63
+ def _run(fn: str, payload: Mapping[str, Any], rules: Mapping[str, Any] | None) -> dict:
64
+ result = _engine.call(fn, dict(payload), dict(rules) if rules is not None else None)
65
+ if "error" in result:
66
+ err = result["error"]
67
+ raise _ERRORS.get(err.get("name"), BACertFinderError)(err.get("message", "Invalid input"), err.get("errors"))
68
+ return result["value"]
69
+
70
+
71
+ def find_certifications(answers: Mapping[str, Any], *, rules: Mapping[str, Any] | None = None) -> dict:
72
+ """Guided finder: suggest certifications from background and work activities.
73
+
74
+ ``answers`` keys: totalYears, background, education, interest, activities (indices into
75
+ ``bundled_rules()["finder"]["activities"]``), baYears, baShare, continuity, recent and
76
+ optionally ``precise`` (exact CCBA/CBAP hours). Allowed values for each question are in
77
+ ``bundled_rules()["finder"]["questions"]``.
78
+
79
+ Returns a report with ``headline``, ``detail``, ``warnings`` and ``matches`` (one per
80
+ certification, each with ``code``, ``status``, ``tone`` and ``notes``).
81
+ """
82
+ return _run("buildFinderReport", answers, rules)
83
+
84
+
85
+ def check_eligibility(candidate: Mapping[str, Any], *, rules: Mapping[str, Any] | None = None) -> dict:
86
+ """Quick hours-based check for ECBA, CCBA and CBAP.
87
+
88
+ ``candidate`` keys: agreesToEthics (required), baHours or jobs, pdHours or pdEntries,
89
+ kaHours, references, asOf (YYYY-MM-DD).
90
+ """
91
+ return _run("checkEligibility", candidate, rules)
92
+
93
+
94
+ def bundled_rules() -> dict:
95
+ """The rules, questions and certifications shipped with this version."""
96
+ return copy.deepcopy(_bundled())
97
+
98
+
99
+ _BUNDLED: dict | None = None
100
+
101
+
102
+ def _bundled() -> dict:
103
+ global _BUNDLED
104
+ if _BUNDLED is None:
105
+ _BUNDLED = json.loads(_engine.bundled_rules_text())
106
+ return _BUNDLED
107
+
108
+
109
+ def load_rules(url: str | None = None, *, timeout: float = 4.0) -> tuple[dict, str]:
110
+ """Fetch hosted rules, falling back to the bundled copy.
111
+
112
+ Returns ``(rules, source)`` where source is ``"remote"`` or ``"bundled"``. The remote file
113
+ is used only if the shared core accepts it and it is not older than the bundled copy, so a
114
+ bad upload can't break anything.
115
+ """
116
+ if not url:
117
+ return bundled_rules(), "bundled"
118
+ try:
119
+ req = urllib.request.Request(url, headers={"User-Agent": f"ba-certification-finder/{__version__}"})
120
+ with urllib.request.urlopen(req, timeout=timeout) as resp: # noqa: S310 (URL chosen by the caller)
121
+ remote = json.loads(resp.read().decode("utf-8"))
122
+ except Exception: # network, HTTP or JSON error
123
+ return bundled_rules(), "bundled"
124
+ if not isinstance(remote, dict) or _engine.rules_status(remote) != "ok":
125
+ return bundled_rules(), "bundled"
126
+ return remote, "remote"
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())