|
| 1 | +======================================= |
| 2 | +Contributor Setup And 4.5 Release Flow |
| 3 | +======================================= |
| 4 | + |
| 5 | +This page is the contributor runbook for DataFog 4.5 work. It is meant for |
| 6 | +humans and agents preparing local changes, choosing verification commands, and |
| 7 | +understanding where the 4.5 release boundary sits. |
| 8 | + |
| 9 | +Version Frame |
| 10 | +============= |
| 11 | + |
| 12 | +Current release planning uses this frame: |
| 13 | + |
| 14 | +* Stable package release: ``4.4.0``. |
| 15 | +* Current development package version: ``4.4.0a5``. |
| 16 | +* Next minor target: ``4.5.0``. |
| 17 | + |
| 18 | +Do not bump routine feature, documentation, or cleanup branches directly to |
| 19 | +``4.5.0``. Keep the version stable during local release-prep work, then handle |
| 20 | +the final version and release-note alignment in the release-readiness slice. |
| 21 | + |
| 22 | +Python Environments |
| 23 | +=================== |
| 24 | + |
| 25 | +DataFog currently declares support for Python ``>=3.10,<3.14``. The CI matrix |
| 26 | +tests core installs on Python 3.10, 3.11, 3.12, and 3.13. Optional NLP and |
| 27 | +NLP-advanced profiles are tested on Python 3.10, 3.11, and 3.12; Python 3.13 |
| 28 | +optional-profile validation is tracked separately for 4.5. |
| 29 | + |
| 30 | +Create one virtual environment per Python version when you need to compare |
| 31 | +profiles locally: |
| 32 | + |
| 33 | +.. code-block:: bash |
| 34 | +
|
| 35 | + python3.12 -m venv .venv312 |
| 36 | + source .venv312/bin/activate |
| 37 | + python -m pip install --upgrade pip |
| 38 | +
|
| 39 | +For another version, keep the environment name explicit: |
| 40 | + |
| 41 | +.. code-block:: bash |
| 42 | +
|
| 43 | + python3.10 -m venv .venv310 |
| 44 | + python3.11 -m venv .venv311 |
| 45 | + python3.13 -m venv .venv313 |
| 46 | +
|
| 47 | +Install Profiles |
| 48 | +================ |
| 49 | + |
| 50 | +Install the package in editable mode with the smallest profile that matches the |
| 51 | +work you are doing: |
| 52 | + |
| 53 | +.. list-table:: |
| 54 | + :header-rows: 1 |
| 55 | + |
| 56 | + * - Profile |
| 57 | + - Command |
| 58 | + - Notes |
| 59 | + * - Core |
| 60 | + - ``pip install -e .`` |
| 61 | + - Lightweight regex engine and package import path. |
| 62 | + * - Core test + CLI |
| 63 | + - ``pip install -e ".[test,cli]" -r requirements-test.txt`` |
| 64 | + - Matches the core CI test profile. |
| 65 | + * - Docs |
| 66 | + - ``pip install -e ".[docs]" -r requirements-docs.txt`` |
| 67 | + - Enough to build Sphinx docs locally. |
| 68 | + * - Local dev |
| 69 | + - ``pip install -e ".[dev,cli]" && pip install -r requirements-dev.txt`` |
| 70 | + - Test, docs, lint, formatting, and pre-commit tooling. |
| 71 | + * - NLP |
| 72 | + - ``pip install -e ".[test,cli,nlp]" -r requirements-test.txt`` |
| 73 | + - Also install the spaCy model needed for NLP tests. |
| 74 | + * - NLP advanced |
| 75 | + - ``pip install -e ".[test,cli,nlp,nlp-advanced]" -r requirements-test.txt`` |
| 76 | + - Also install spaCy and GLiNER models explicitly. |
| 77 | + * - OCR |
| 78 | + - ``pip install -e ".[test,ocr]" -r requirements-test.txt`` |
| 79 | + - Tesseract workflows also need the system ``tesseract`` binary. |
| 80 | + * - Distributed |
| 81 | + - ``pip install -e ".[test,distributed]" -r requirements-test.txt`` |
| 82 | + - Spark workflows also need a Java runtime. |
| 83 | + * - All extras |
| 84 | + - ``pip install -e ".[all,dev]"`` |
| 85 | + - Use only when you deliberately want every optional surface locally. |
| 86 | + |
| 87 | +Optional model setup is explicit: |
| 88 | + |
| 89 | +.. code-block:: bash |
| 90 | +
|
| 91 | + python -m spacy download en_core_web_lg |
| 92 | + datafog download-model urchade/gliner_multi_pii-v1 --engine gliner |
| 93 | +
|
| 94 | +Focused Verification |
| 95 | +==================== |
| 96 | + |
| 97 | +Use focused checks for the area you touched before running broader suites. |
| 98 | +Set the no-telemetry environment variables when testing core privacy and import |
| 99 | +behavior: |
| 100 | + |
| 101 | +.. code-block:: bash |
| 102 | +
|
| 103 | + export DATAFOG_NO_TELEMETRY=1 |
| 104 | + export DO_NOT_TRACK=1 |
| 105 | +
|
| 106 | +Core dependency and no-network checks: |
| 107 | + |
| 108 | +.. code-block:: bash |
| 109 | +
|
| 110 | + python -m pytest tests/test_runtime_dependency_safety.py tests/test_no_network_core.py -q |
| 111 | +
|
| 112 | +Run a changed test file directly when behavior changes: |
| 113 | + |
| 114 | +.. code-block:: bash |
| 115 | +
|
| 116 | + python -m pytest tests/test_engine_api.py -q |
| 117 | + python -m pytest tests/test_agent_api.py -q |
| 118 | + python -m pytest tests/test_cli_smoke.py -q |
| 119 | +
|
| 120 | +Docs build: |
| 121 | + |
| 122 | +.. code-block:: bash |
| 123 | +
|
| 124 | + python -m sphinx -b html docs docs/_build/html |
| 125 | +
|
| 126 | +Pre-commit on touched files: |
| 127 | + |
| 128 | +.. code-block:: bash |
| 129 | +
|
| 130 | + pre-commit run --files README.md docs/index.rst --show-diff-on-failure |
| 131 | + git diff --check |
| 132 | +
|
| 133 | +Broad Verification |
| 134 | +================== |
| 135 | + |
| 136 | +Run the broad non-slow suite when a change affects shared behavior, |
| 137 | +public docs, imports, packaging, or release confidence: |
| 138 | + |
| 139 | +.. code-block:: bash |
| 140 | +
|
| 141 | + python -m pytest -m "not slow" -q |
| 142 | +
|
| 143 | +To mimic the core CI profile more closely: |
| 144 | + |
| 145 | +.. code-block:: bash |
| 146 | +
|
| 147 | + python -m pytest tests/ \ |
| 148 | + -m "not slow" \ |
| 149 | + --ignore=tests/test_gliner_annotator.py \ |
| 150 | + --ignore=tests/test_image_service.py \ |
| 151 | + --ignore=tests/test_ocr_integration.py \ |
| 152 | + --ignore=tests/test_spark_integration.py \ |
| 153 | + --ignore=tests/test_text_service_integration.py |
| 154 | +
|
| 155 | +Use optional-profile smoke checks when changing extras, dependency boundaries, |
| 156 | +or install behavior: |
| 157 | + |
| 158 | +.. code-block:: bash |
| 159 | +
|
| 160 | + DATAFOG_INSTALL_PROFILE=core python -m pytest tests/test_install_profiles.py -q |
| 161 | + DATAFOG_INSTALL_PROFILE=cli python -m pytest tests/test_install_profiles.py -q |
| 162 | + DATAFOG_INSTALL_PROFILE=nlp python -m pytest tests/test_install_profiles.py -q |
| 163 | + DATAFOG_INSTALL_PROFILE=nlp-advanced python -m pytest tests/test_install_profiles.py -q |
| 164 | + DATAFOG_INSTALL_PROFILE=ocr python -m pytest tests/test_install_profiles.py -q |
| 165 | + DATAFOG_INSTALL_PROFILE=distributed python -m pytest tests/test_install_profiles.py -q |
| 166 | + DATAFOG_INSTALL_PROFILE=web python -m pytest tests/test_install_profiles.py -q |
| 167 | +
|
| 168 | +4.5 Release Flow |
| 169 | +================ |
| 170 | + |
| 171 | +The 4.5 work lands as focused pull requests into ``dev``. Keep feature and docs |
| 172 | +branches narrow, and avoid mixing local cleanup, external PR review, and final |
| 173 | +release mechanics in one branch. |
| 174 | + |
| 175 | +The release flow for 4.5 is: |
| 176 | + |
| 177 | +1. Land the local release-prep baseline and follow-up cleanup/docs slices. |
| 178 | +2. Review the external German regex PR after the local release-prep baseline is |
| 179 | + in place. |
| 180 | +3. Integrate German regex support only if review says it fits the 4.5 |
| 181 | + lightweight text screening thesis. |
| 182 | +4. Validate optional Python 3.13 profiles before claiming support beyond core |
| 183 | + SDK and CLI. |
| 184 | +5. Prepare release readiness: changelog/release notes, package checks, docs |
| 185 | + build, CI state, and version alignment. |
| 186 | +6. Bump or override the final stable release to ``4.5.0`` only during the |
| 187 | + release-readiness and stable-release path. |
| 188 | + |
| 189 | +The current release workflow strips prerelease suffixes from the package |
| 190 | +version unless a manual stable ``version_override`` is provided. For the final |
| 191 | +4.5 stable release, use a dedicated release-readiness change or the stable |
| 192 | +workflow override so the published version is ``4.5.0`` rather than another |
| 193 | +``4.4.0`` prerelease line. |
| 194 | + |
| 195 | +External PR Boundary |
| 196 | +==================== |
| 197 | + |
| 198 | +The external German PII regex PR belongs after local baseline cleanup. Review |
| 199 | +it as a 4.5 candidate, not as a v5 planning shortcut. If accepted, adapt it in |
| 200 | +the German regex integration slice with tests, documentation of locale |
| 201 | +coverage, and no new dependency burden on the core path. |
0 commit comments