Commit Graph

15 Commits

Author SHA1 Message Date
05c8b489a8 fix: update grep source file from dataset.txt to 0_dataset.txt in Makefile
The export_statistics and export_mentions targets in the Makefile were reading from
the incorrect file export/dataset.txt instead of the renamed export/0_dataset.txt,
causing grep operations to fail silently. This commit corrects both the display
and redirect commands to use the proper source filename.
2024-12-06 22:01:01 +00:00
cbf6330b94 feat: add clean target to all prerequisite list in Makefile
The `clean` target was added as a prerequisite to the `all` target in the Makefile, ensuring that cleanup occurs before the export and build steps during a full build cycle.
2024-12-06 18:46:27 +00:00
3853d78c6b fix: correct typo in Makefile export_stats echo message from 'statisticts' to 'statistics' 2024-11-26 17:15:45 +00:00
7f19248052 chore: remove deprecated sync_excempt target and switch export_stats to dr.stats
- Delete the sync_excempt Makefile target that was stubbed with a timeout warning
- Change export_stats to call dr.stats instead of dr.stats_all
- Remove extraneous blank lines in Makefile for cleaner formatting
2024-11-26 08:28:21 +00:00
a03c6eb774 chore: prefix pip and python commands with venv path in Makefile build target 2024-11-25 19:50:20 +00:00
f816a73efa chore: add ensure_env target to Makefile for automatic venv creation 2024-11-25 19:47:34 +00:00
2f3a4431b6 fix: re-add sync target to Makefile all and fix asyncio loop reference in get_recent_rants
The Makefile's `all` target was missing the `sync` step, which has now been restored alongside a fix in `src/drstats/sync.py` where `asyncio.wait_for` incorrectly called `asyncio.run_in_executor` instead of the proper `loop.run_in_executor` to avoid event loop context errors during async execution.
2024-11-25 19:44:33 +00:00
ed190ec774 fix: prefix dr.sync, dr.stats_all, dr.dataset, and merge_images.py with ./venv/bin/ in Makefile targets 2024-11-25 19:15:31 +00:00
9497cde9c8 feat: add export_statistics and export_mentions make targets with dataset prefix markers
Add two new Makefile targets for exporting statistics and mentions data from the dataset file, each prefixed with "===" markers in the dataset.py dump function to enable clean grep extraction. The export_statistics target filters lines containing "Statistics:" while export_mentions filters lines containing "times ment", both writing results to separate export files.
2024-11-24 06:09:50 +00:00
b4c969e62a chore: remove clean step from all target and update dataset export path in readme
The clean step was removed from the default build pipeline to preserve historic statistics across builds, as deleted data still consumes git storage. Additionally, the dataset export filename was changed from dataset.txt to 0_dataset.txt, and the corresponding link in the README was updated to reflect this new path.
2024-11-23 20:05:45 +00:00
513dbaf095 chore: remove time prefix from pip install and dr commands in Makefile targets 2024-11-23 19:18:21 +00:00
26d883e0cb feat: add CI workflow, clean target, and fix user_stats view with deduplicated columns
Add .gitea/workflows/export.yaml for automated build on push, introduce `clean` target in Makefile to recreate export directory, remove stale `dump_text.py` from SOURCES.txt, and correct duplicate column definitions in the `user_stats` SQL view creation inside db.py.
2024-11-23 19:07:19 +00:00
768477df2a feat: add merge_images script, dataset module, and rename dr.rant_stats_all to dr.stats_all
Add new merge_images.py script that compiles all exported PNG graphs into a single composite image with 2-column layout and 480x320 per-image sizing. Introduce drstats/dataset.py with dump() function that outputs per-user contribution statistics and all rants/posts for LLM embedding. Rename the console script entry point from dr.rant_stats_all to dr.stats_all across setup.cfg, entry_points.txt, README.md, and PKG-INFO. Update Makefile to replace sync with sync_excempt target, add merge_images target, and add prerequisite reminders for export targets. Refactor db.py view creation queries to use compact string formatting. Redirect Duration class timing output and dataset.py printr calls to stderr.
2024-11-23 18:56:52 +00:00
d1594ed798 feat: add dataset export command and contributions views with user stats aggregation
Add dr.dataset console script entry point and implement dump function in new dataset module. Create SQL views for contributions, contributions_extended, rants_of_user, and posts_of_user in db.py to aggregate user activity metrics. Update Makefile with sync, export_stats, and export_dataset targets. Add timeout parameter to HTTP requests in devrant.py and remove demo code. Extend README with usage instructions for environment setup and available dr.* commands.
2024-11-23 18:56:52 +00:00
c32565621d feat: scaffold drstats project with setuptools build, gitignore, and utro CLI entry point
Initialize the dRStats repository with core project structure: add .gitignore excluding dist and venv directories, create Makefile for pip-based build and editable install, write README.md describing the devrant health monitoring purpose, define pyproject.toml using setuptools build backend, configure setup.cfg with metadata (name drstats, version 0.1.1, MIT license, aiohttp dependency) and console_scripts entry point mapping 'utro' to drstats.statistics:rant_stats, and include generated egg-info metadata files.
2024-11-23 18:56:52 +00:00