{
 "cranqe_package": "refi-qda",
 "dev_metadata": {
  "author": "Cody L Marquart <cody.marquart@wisc.edu>",
  "description": "# qe-refi-qda\n\nReads REFI-QDA projects (`.qdpx`, exported by NVivo, ATLAS.ti, MAXQDA,\nQualCoder and others) into the table ENA works on: one row per utterance,\na 0/1 column per code. A port of the JavaScript package\n[`@qe-libs/refi-qda`](../README.md): the same functions, the same output\nbyte for byte, tested on the same fixtures. Pure Python, no dependencies.\n\n```bash\npip install qe-refi-qda --extra-index-url https://qe-libs.org/py/simple/\n```\n\nThen `import refi_qda`. Releases are on [qe-libs.org](https://qe-libs.org/py/)\n(the PEP 503 index at `py/simple/`; dev builds of every push to `main` at\n`py/dev/simple/`), published by cranqe.\n\n## Use\n\n```python\nfrom refi_qda import to_csv\n\nr = to_csv(\"project.qdpx\", coder=\"any\")\nr.csv          # CSV text\nr.fields       # column names\nr.rows         # one list per row\nr.report       # counts, coders, notes, skipped sources\nr.coders       # the project's coders by name\n```\n\n`to_csv` and `read_project` take a path, bytes, a bytes-like object or an\nopen binary file.\n\n`coder` chooses whose coding becomes the code columns, for projects coded\nby more than one person (see `coders_of`):\n\n| `coder` | Rows | A line is 1 for a code when\u2026 |\n|---|---|---|\n| `'any'` (default) | one per utterance | any coder coded it |\n| `'all'` | one per utterance | every coder coded it |\n| `'each'` | one per utterance per coder, with a `Coder` column | that row's coder coded it |\n| `'columns'` | one per utterance; each code once per coder, `Code [Coder A]` | that column's coder coded it |\n| a coder's name or GUID | one per utterance | that coder coded it |\n\n`unit=\"sentence\"` makes each sentence a row (a `Sentence` column follows\n`Line`); `lines=\"all\"` keeps lines without a `Speaker:` prefix, with the\nprevious speaker; `min_overlap=2` ignores spans that reach two characters or\nfewer into a row. They are the JS library's `unit`, `lines` and `minOverlap`,\nwith the same output. `unit` may also be a callable\n`(text, start) -> [(start, end, text)]` that splits a line's text itself.\n\nFor pandas:\n\n```python\nfrom refi_qda import read_project, to_table\n\ndf = to_table(read_project(\"project.qdpx\"), coder=\"each\").to_pandas()\n```\n\n| Function | Returns |\n|---|---|\n| `read_project(data)` | `Project`: `name`, `users` (GUID \u2192 name), `codes` (`Code(guid, name, parent, codable, description, parent_guid)`), `sources` (text, variables, coded spans), `skipped` |\n| `coders_of(project)` | `[Coder(guid, name, spans)]`: who coded something, and how many coded spans |\n| `to_table(project, coder=, unit=, lines=, min_overlap=)` | `Table(fields, rows, report)`, with `.to_pandas()`; `report[\"codebook\"]` is the hierarchy as `[{name, parent}]` per code column |\n| `to_csv(data, coder=, unit=, lines=, min_overlap=)` | `CSVResult`: `csv`, `fields`, `rows`, `report`, `coders`, `text_column` |\n| `write_csv(fields, rows)` | CSV text |\n\nThe XML inside a `.qdpx` is parsed with the standard library, with any\ndocument type declaration refused: a REFI-QDA project declares no DTD or\nentities, and refusing them rules out entity-expansion bombs and external\nentity references from an untrusted file.\n\nErrors are `QdaError`s with a `.code`: `not-zip`, `no-project`, `bad-xml`,\n`no-coder`, `misaligned`, `no-sources`. Their messages are written for the\nperson importing.\n\nThe table's columns, how lines become rows, the codebook hierarchy in\n`report[\"codebook\"]`, and how coded positions are checked and read are\ndescribed in the [main README](../README.md).\n\n## Develop\n\n```bash\ncd python\npip install -e '.[test]'\npytest\n```\n\nThe tests use `../tests/fixtures/`, shared with the JavaScript tests.\n\n## Release\n\nThe Python package releases on its own tag, apart from the npm package:\n\n```bash\n# set version = \"X.Y.Z\" in python/pyproject.toml, commit, then\ngit tag python/vX.Y.Z && git push origin python/vX.Y.Z\n```\n\nCI checks the tag against `python/pyproject.toml`, then cranqe builds the\nwheel and sdist and publishes them to qe-libs.org. A bare `vX.Y.Z` tag\nreleases only the npm package.",
  "description_content_type": "text/markdown",
  "license": "MIT",
  "name": "qe-refi-qda",
  "project_urls": [
   [
    "Repository",
    "https://gitlab.com/epistemic-analytics/qe-packages/refi-qda"
   ]
  ],
  "requires_dist": [
   "pandas; extra == \"pandas\"",
   "pytest; extra == \"test\""
  ],
  "requires_python": ">=3.9",
  "summary": "REFI-QDA projects (.qdpx from NVivo, ATLAS.ti, MAXQDA, QualCoder) as utterance \u00d7 code tables",
  "version": "0.1.2.9001"
 },
 "dev_metadata_from": "0.1.2.9001",
 "files": {
  "qe_refi_qda-0.1.0-py3-none-any.whl": {
   "published": "2026-11-10",
   "sha256": "8bd30375c546af1fa2dd6f4eb9c4f5c071b8eee2974be403b57f2a865a5f428c",
   "size": 10767,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/8bd30375c546af1fa2dd6f4eb9c4f5c071b8eee2974be403b57f2a865a5f428c/qe_refi_qda-0.1.0-py3-none-any.whl",
   "version": "0.1.0"
  },
  "qe_refi_qda-0.1.0.tar.gz": {
   "published": "2026-11-10",
   "sha256": "931fe47e9de97a6b5dcb89d61f5f0ec4c3de1fc0da2f63a2b03bcaf68c90e06d",
   "size": 13488,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/931fe47e9de97a6b5dcb89d61f5f0ec4c3de1fc0da2f63a2b03bcaf68c90e06d/qe_refi_qda-0.1.0.tar.gz",
   "version": "0.1.0"
  },
  "qe_refi_qda-0.1.1-py3-none-any.whl": {
   "published": "2026-11-10",
   "sha256": "41d62ec581a296f32ef23f3e1dee3772afd95b5fd232e1e31173f62cb53425f9",
   "size": 11199,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/41d62ec581a296f32ef23f3e1dee3772afd95b5fd232e1e31173f62cb53425f9/qe_refi_qda-0.1.1-py3-none-any.whl",
   "version": "0.1.1"
  },
  "qe_refi_qda-0.1.1.tar.gz": {
   "published": "2026-11-10",
   "sha256": "5433dc6f9bf1942e1abbd0b7371cd580ec3a81a81adde1384a787e63dddc0b92",
   "size": 14611,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/5433dc6f9bf1942e1abbd0b7371cd580ec3a81a81adde1384a787e63dddc0b92/qe_refi_qda-0.1.1.tar.gz",
   "version": "0.1.1"
  },
  "qe_refi_qda-0.1.2-py3-none-any.whl": {
   "published": "2026-11-11",
   "sha256": "b141c2182252f9a135d9a45be57e6c7bbf52743daa585c3f8c4c7c475b25d7ca",
   "size": 13173,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/b141c2182252f9a135d9a45be57e6c7bbf52743daa585c3f8c4c7c475b25d7ca/qe_refi_qda-0.1.2-py3-none-any.whl",
   "version": "0.1.2"
  },
  "qe_refi_qda-0.1.2.9001-py3-none-any.whl": {
   "published": "2026-11-11",
   "sha256": "136d33bcab8814c9b238fec7c9cdf8f04b0735a92b0ded7812388c37dd461a6c",
   "size": 13231,
   "version": "0.1.2.9001"
  },
  "qe_refi_qda-0.1.2.9001.tar.gz": {
   "published": "2026-11-11",
   "sha256": "9be53196d737a05b25cfeab64f683a454b1266aeea82ad2e6447853cfcff2e0a",
   "size": 17953,
   "version": "0.1.2.9001"
  },
  "qe_refi_qda-0.1.2.tar.gz": {
   "published": "2026-11-11",
   "sha256": "485f80b2fc1a8c8d0c817233764114743103344c315836cc5db0eca3635d3e8a",
   "size": 17949,
   "url": "https://gitlab.com/api/v4/projects/22522458/packages/pypi/files/485f80b2fc1a8c8d0c817233764114743103344c315836cc5db0eca3635d3e8a/qe_refi_qda-0.1.2.tar.gz",
   "version": "0.1.2"
  }
 },
 "metadata": {
  "author": "Cody L Marquart <cody.marquart@wisc.edu>",
  "description": "# qe-refi-qda\n\nReads REFI-QDA projects (`.qdpx`, exported by NVivo, ATLAS.ti, MAXQDA,\nQualCoder and others) into the table ENA works on: one row per utterance,\na 0/1 column per code. A port of the JavaScript package\n[`@qe-libs/refi-qda`](../README.md): the same functions, the same output\nbyte for byte, tested on the same fixtures. Pure Python, no dependencies.\n\n```bash\npip install qe-refi-qda --extra-index-url https://qe-libs.org/py/simple/\n```\n\nThen `import refi_qda`. Releases are on [qe-libs.org](https://qe-libs.org/py/)\n(the PEP 503 index at `py/simple/`; dev builds of every push to `main` at\n`py/dev/simple/`), published by cranqe.\n\n## Use\n\n```python\nfrom refi_qda import to_csv\n\nr = to_csv(\"project.qdpx\", coder=\"any\")\nr.csv          # CSV text\nr.fields       # column names\nr.rows         # one list per row\nr.report       # counts, coders, notes, skipped sources\nr.coders       # the project's coders by name\n```\n\n`to_csv` and `read_project` take a path, bytes, a bytes-like object or an\nopen binary file.\n\n`coder` chooses whose coding becomes the code columns, for projects coded\nby more than one person (see `coders_of`):\n\n| `coder` | Rows | A line is 1 for a code when\u2026 |\n|---|---|---|\n| `'any'` (default) | one per utterance | any coder coded it |\n| `'all'` | one per utterance | every coder coded it |\n| `'each'` | one per utterance per coder, with a `Coder` column | that row's coder coded it |\n| `'columns'` | one per utterance; each code once per coder, `Code [Coder A]` | that column's coder coded it |\n| a coder's name or GUID | one per utterance | that coder coded it |\n\n`unit=\"sentence\"` makes each sentence a row (a `Sentence` column follows\n`Line`); `lines=\"all\"` keeps lines without a `Speaker:` prefix, with the\nprevious speaker; `min_overlap=2` ignores spans that reach two characters or\nfewer into a row. They are the JS library's `unit`, `lines` and `minOverlap`,\nwith the same output. `unit` may also be a callable\n`(text, start) -> [(start, end, text)]` that splits a line's text itself.\n\nFor pandas:\n\n```python\nfrom refi_qda import read_project, to_table\n\ndf = to_table(read_project(\"project.qdpx\"), coder=\"each\").to_pandas()\n```\n\n| Function | Returns |\n|---|---|\n| `read_project(data)` | `Project`: `name`, `users` (GUID \u2192 name), `codes` (`Code(guid, name, parent, codable, description, parent_guid)`), `sources` (text, variables, coded spans), `skipped` |\n| `coders_of(project)` | `[Coder(guid, name, spans)]`: who coded something, and how many coded spans |\n| `to_table(project, coder=, unit=, lines=, min_overlap=)` | `Table(fields, rows, report)`, with `.to_pandas()`; `report[\"codebook\"]` is the hierarchy as `[{name, parent}]` per code column |\n| `to_csv(data, coder=, unit=, lines=, min_overlap=)` | `CSVResult`: `csv`, `fields`, `rows`, `report`, `coders`, `text_column` |\n| `write_csv(fields, rows)` | CSV text |\n\nThe XML inside a `.qdpx` is parsed with the standard library, with any\ndocument type declaration refused: a REFI-QDA project declares no DTD or\nentities, and refusing them rules out entity-expansion bombs and external\nentity references from an untrusted file.\n\nErrors are `QdaError`s with a `.code`: `not-zip`, `no-project`, `bad-xml`,\n`no-coder`, `misaligned`, `no-sources`. Their messages are written for the\nperson importing.\n\nThe table's columns, how lines become rows, the codebook hierarchy in\n`report[\"codebook\"]`, and how coded positions are checked and read are\ndescribed in the [main README](../README.md).\n\n## Develop\n\n```bash\ncd python\npip install -e '.[test]'\npytest\n```\n\nThe tests use `../tests/fixtures/`, shared with the JavaScript tests.\n\n## Release\n\nThe Python package releases on its own tag, apart from the npm package:\n\n```bash\n# set version = \"X.Y.Z\" in python/pyproject.toml, commit, then\ngit tag python/vX.Y.Z && git push origin python/vX.Y.Z\n```\n\nCI checks the tag against `python/pyproject.toml`, then cranqe builds the\nwheel and sdist and publishes them to qe-libs.org. A bare `vX.Y.Z` tag\nreleases only the npm package.",
  "description_content_type": "text/markdown",
  "license": "MIT",
  "name": "qe-refi-qda",
  "project_urls": [
   [
    "Repository",
    "https://gitlab.com/epistemic-analytics/qe-packages/refi-qda"
   ]
  ],
  "requires_dist": [
   "pandas; extra == \"pandas\"",
   "pytest; extra == \"test\""
  ],
  "requires_python": ">=3.9",
  "summary": "REFI-QDA projects (.qdpx from NVivo, ATLAS.ti, MAXQDA, QualCoder) as utterance \u00d7 code tables",
  "version": "0.1.2"
 },
 "metadata_from": "0.1.2",
 "name": "qe-refi-qda"
}
