Commit Graph

26 Commits

Author SHA1 Message Date
15379c1c1a require Python 3.11
Python 3.9 reached end of life in October 2025, and 3.11 is where the
current ecosystem sits: it unlocks pyarrow 25 (we were held at 21, the
last release supporting 3.9), more-itertools 11, and pandas 3 for the
test suite, along with the large CPython 3.11 interpreter speedups on
exactly the kind of CPU-bound work wikiq does. Nothing in the code
needed changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 13:35:14 -07:00
ac8110894b resolve dependencies from PyPI instead of pinned git forks
Drop the [tool.uv.sources] pins of deltas, mwxml, and yamlconf to forks
under a personal github account:

- The deltas fork was byte-identical to upstream.
- The mwxml fork carried one patch to mwxml.map(), which wikiq does not
  call, and was missing eleven upstream commits of fixes. Require
  mwxml >= 0.3.8 for those fixes; note that 0.3.7 changed namespace
  handling to trust the dump's embedded <ns> tag rather than overriding
  it based on the title prefix.
- The yamlconf fork loosened an old pyyaml pin. yamlconf is not imported
  by wikiq and is only needed transitively via deltas, so drop the direct
  dependency. PyPI's 0.2.6 pinned pyyaml == 5.4.1, which has no wheels
  for 3.11+ and no longer builds from source; that was fixed upstream in
  0.2.7, and the project has since moved to the mediawiki-utilities
  organization.

With pywikidiff2 no longer a dependency at all, no uv-specific
configuration remains and the package installs with plain pip.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 13:35:14 -07:00
70b0ebcf0c make mediawiki-utilities an optional dependency
-p legacy is the only thing that uses mediawiki-utilities, and it exists
solely to reproduce numbers from research predating the mwxml and
mwtypes split. The package is a 2015 monolith that also contains
mw.database and mw.api, so it declares requests and pymysql
unconditionally: every wikiq install pulled a MySQL client and six other
packages to support one flag, building them from an sdist that has no
wheel.

Move it to a `legacy` extra. mw.lib.persistence imports nothing from
mw.database or mw.api, so nothing about -p legacy changes for people who
install the extra, and everyone else stops paying for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 66dcc6d8cea620a619fc19121b5c27a085b11991)
2026-08-13 13:32:08 -07:00
5725c66040 make pywikidiff2 an optional dependency
pywikidiff2 was imported at module scope, so every invocation of wikiq
required it -- including `wikiq --help`. It is not on PyPI, compiles a
C++ extension, and needs libthai, which made a compiler a hard
requirement for installing a tool that mostly does not need one.

Only --diff and -p wikidiff2 actually use it. Import it inside those two
code paths instead, and report what to install when it is missing rather
than failing with an ImportError traceback. The check also runs once at
startup, since both use sites sit deep in the per-revision loop and a run
can stream for hours before reaching them.

Dropping the dependency also removes the PEP 508 direct reference from
the package metadata, and with it the need for hatchling's
allow-direct-references. PyPI rejects uploads whose metadata contains a
direct URL, so this is a prerequisite for publishing wikiq there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 12325afd46670e949abf1c0e14799e212d7ff6ce)
2026-08-13 13:31:53 -07:00
6013e8c4e9 remove pyspark dependency and wikiq_spark packaging references
The spark indexing pass is moving out of this repository, and
src/wikiq_spark was never committed here: pyproject.toml declared a
wikiq-spark console script and wheel package that do not exist in the
tree, and pulled in pyspark for every install of a tool that never
imports it. The --print-schema flag and its Spark-format schema
converters remain, since they are pure Python and produce the schema
the external indexing pass consumes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 392211af17)
2026-08-13 13:30:25 -07:00
Nathan TeBlunthuis
3f1a9ba862 refactor and enable jsonl output. 2025-12-21 23:42:18 -08:00
Nathan TeBlunthuis
76626a2785 Start working on adding columns from mwparserfromhell. 2025-12-02 12:26:03 -08:00
Nathan TeBlunthuis
c40930d7d2 use ssh for gitea. 2025-11-24 11:01:36 -08:00
Nathan TeBlunthuis
d20075b323 add memray for debugging memory usage. 2025-07-17 15:17:23 -07:00
Nathan TeBlunthuis
37d095199a inc version. 2025-07-15 15:37:55 -07:00
Nathan TeBlunthuis
507335941d Revert "Merge branch 'compute-diffs' into HEAD"
This reverts commit 907a35323e, reversing
changes made to c40506137b.
2025-07-15 15:23:50 -07:00
Nathan TeBlunthuis
e53e7ada5d try fixing the memory problem. 2025-07-14 18:58:27 -07:00
Nathan TeBlunthuis
c597a6b7f4 refactor into src-layout package. 2025-07-07 20:14:13 -07:00
Nathan TeBlunthuis
14e819e565 compare pywikidiff2 to making requests to wikidiff2. 2025-07-07 10:51:11 -07:00
Nathan TeBlunthuis
4654911533 almost there. working out edge cases. 2025-07-03 21:32:44 -07:00
Nathan TeBlunthuis
5a3e4102b5 got wikidiff2 persistence working except for paragraph moves. 2025-06-30 15:37:54 -07:00
Will Beason
4bbed4a196 Merge branch 'parquet_support' into test-parquet 2025-06-17 12:20:19 -05:00
Will Beason
390499dd90 Pin to python 3.9
Since our execution environment requires this

Signed-off-by: Will Beason <willbeason@gmail.com>
2025-06-17 11:37:20 -05:00
Nathan TeBlunthuis
f39ceefa4a Merge branch 'parquet_support' of gitea:collective/mediawiki_dump_tools into parquet_support 2025-05-29 18:05:28 -07:00
Nathan TeBlunthuis
bd22d26291 update deps and add edit_summary to wikiq output. 2025-05-29 18:02:14 -07:00
Nathan TeBlunthuis
22d14dc5f2 Remove dependency on pytest. 2025-05-28 21:54:31 -07:00
Nathan TeBlunthuis
5a10f59dc4 Merge branch 'parquet_support' of gitea:collective/mediawiki_dump_tools into parquet_support 2025-05-28 23:52:59 -05:00
Nathan TeBlunthuis
b8cdc82fc2 add ipython for dev 2025-05-28 23:52:37 -05:00
Nathan TeBlunthuis
2a2b611d79 Fix issue with .7z archives
Before, only fandom wikis dumps were compressed with .7z.
These archives can have several .xml files in the .7z; not just one.
So we need to have a flag for the fandom-2020 dumps.

This fixes the bug so .7z archives work in either case.
2025-05-28 21:49:11 -07:00
Nathan TeBlunthuis
39fec0820d use my version of mwxml since it fixes a bug. 2025-05-28 21:13:18 -07:00
Nathan TeBlunthuis
15e9234903 adding pyproject.toml 2025-05-28 20:59:55 -07:00