Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8392878
Makefile.local
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
Makefile.local
View Options
# -*- makefile -*-
FLAKE = flake8
BINDIR = bin
SRCDIR = swh
REPO_PATH=./swh-loader-git-testdata
# add -v for example
FLAG=
DB=softwareheritage-dev
SWH_LOADER=$(BINDIR)/swh-loader-git
SWH_DB_MANAGER=$(BINDIR)/swh-db-manager
SWH_BACK=$(BINDIR)/swh-backend
SQL_FOLDER=../swh-storage/sql/
# could use cProfile
PROFILE_TYPE=profile
FOLLOW_LOG=-f
SWH_DB_MANAGER_CONFIG=~/.config/swh/db-manager.ini
deps:
apt-get install -y \
python3 \
python3-pygit2 \
python3-psycopg2 \
python3-nose \
python3-flask \
python3-requests \
python3-retrying \
ipython3
clean:
rm -rf /tmp/swh-loader-git/content-storage
prepare:
mkdir -p /tmp/swh-loader-git/content-storage
clean-db: clean
$(SWH_DB_MANAGER) $(FLAG) --config $(SWH_DB_MANAGER_CONFIG) cleandb
init-db:
$(SWH_DB_MANAGER) $(FLAG) --config $(SWH_DB_MANAGER_CONFIG) initdb
run-remote:
$(SWH_LOADER) $(FLAG) --config ./resources/remote-loader-git.ini load $(REPO_PATH)
run-local:
$(SWH_LOADER) $(FLAG) --config ./resources/local-loader-git.ini load $(REPO_PATH)
run:
# works with the default ~/.config/swh/loader-git.ini file
$(SWH_LOADER) $(FLAG) load $(REPO_PATH)
run-back:
$(SWH_BACK) $(FLAG)
connect-db:
psql -d $(DB)
create-db:
make -C $(SQL_FOLDER) clean filldb DBNAME=$(DB)
drop-db:
make -C $(SQL_FOLDER) clean dropdb DBNAME=$(DB)
check-meta:
@echo "Repository: $(REPO_PATH)"
@echo "Git metadata:"
@$(BINDIR)/dir-git-repo-meta.sh $(REPO_PATH)
@echo
@echo "DB metadata:"
@$(BINDIR)/db-git-repo-meta.sh $(DB)
@echo
log-loader:
tail $(FOLLOW_LOG) /tmp/swh-loader-git/log/sgloader.log
log-back:
tail $(FOLLOW_LOG) /tmp/swh-loader-git/log/back.log
profile-run:
python3 -m $(PROFILE_TYPE) -o ./scratch/swhgitloader.$(PROFILE_TYPE) ./scratch/profile-swhgitloader.py
profile-stats:
./scratch/analyse-profile.py
include Makefile.tests
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 7:04 PM (10 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398925
Attached To
rDLDG Git loader
Event Timeline
Log In to Comment