2024-12-06 19:46:27 +01:00
|
|
|
all: ensure_env build sync clean export_dataset export_stats merge_images export_statistics export_mentions
|
2024-11-25 20:47:34 +01:00
|
|
|
|
|
|
|
|
ensure_env:
|
|
|
|
|
-@python3 -m venv venv
|
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 19:56:52 +01:00
|
|
|
|
|
|
|
|
build:
|
2024-11-25 20:50:20 +01:00
|
|
|
./venv/bin/python -m pip install build
|
|
|
|
|
./venv/bin/python -m build .
|
|
|
|
|
./venv/bin/python -m pip install -e .
|
2024-11-23 19:56:52 +01:00
|
|
|
|
|
|
|
|
sync:
|
2024-11-25 20:15:31 +01:00
|
|
|
./venv/bin/dr.sync
|
2024-11-23 19:56:52 +01:00
|
|
|
|
2024-11-23 20:07:19 +01:00
|
|
|
clean:
|
|
|
|
|
-@rm -r export
|
|
|
|
|
mkdir -p export
|
|
|
|
|
|
2024-11-23 19:56:52 +01:00
|
|
|
export_stats:
|
2024-11-23 19:56:52 +01:00
|
|
|
@echo "Make sure you have ran 'make sync' first. Results will be in ./export/"
|
2024-11-26 18:15:45 +01:00
|
|
|
@echo "Exporting statistics."
|
2024-11-26 09:28:21 +01:00
|
|
|
./venv/bin/dr.stats
|
2024-11-23 19:56:52 +01:00
|
|
|
|
2024-11-23 19:56:52 +01:00
|
|
|
export_dataset:
|
2024-11-23 19:56:52 +01:00
|
|
|
@echo "Make sure you have ran 'make sync' first."
|
|
|
|
|
@echo "Exporting dataset to be used for LLM embedding. Result will be ./export/0_dataset.txt"
|
2024-11-25 20:15:31 +01:00
|
|
|
./venv/bin/dr.dataset > export/0_dataset.txt
|
2024-11-23 19:56:52 +01:00
|
|
|
|
2024-11-24 07:09:50 +01:00
|
|
|
export_statistics:
|
|
|
|
|
@echo "Exporting statisticts. Result will be ./export/2_statistics.txt"
|
2024-12-06 23:01:01 +01:00
|
|
|
cat export/0_dataset.txt | grep "Statistics: "
|
|
|
|
|
cat export/0_dataset.txt | grep "Statistics: " > export/2_statistics.txt
|
2024-11-24 07:09:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
export_mentions:
|
|
|
|
|
@echo "Exporting mentions. Result will be ./export/3_mentions.txt"
|
2024-12-06 23:01:01 +01:00
|
|
|
cat export/0_dataset.txt | grep "times ment"
|
|
|
|
|
cat export/0_dataset.txt | grep "times ment" > export/3_mentions.txt
|
2024-11-24 07:09:50 +01:00
|
|
|
|
|
|
|
|
|
2024-11-23 19:56:52 +01:00
|
|
|
merge_images:
|
|
|
|
|
@echo "Merging images to one big image. Result will be ./export/1_graphs_compliation.png."
|
2024-11-25 20:15:31 +01:00
|
|
|
./venv/bin/python merge_images.py
|
2024-11-24 07:09:50 +01:00
|
|
|
|
|
|
|
|
|