Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124661
Makefile
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
View Options
FLAKE = flake8
BINDIR = bin
SRCDIR = swh
REPO_PATH=../debsources
# add -v for example
FLAG=
NOSE = nosetests3
TESTFLAGS = -s
TESTDIR = ./swh/tests
DB=swhgitloader
DB_TEST=swhgitloader-test
BIN=$(BINDIR)/swh-git-loader
deps:
sudo apt-get install -y python3 python3-pygit2 python3-psycopg2 python3-nose ipython3 tee
prepare:
mkdir -p swh-git-loader/log swh-git-loader/file-content-storage swh-git-loader/object-content-storage
clean:
rm -rf swh-git-loader/log swh-git-loader/file-content-storage swh-git-loader/object-content-storage
help: clean prepare
PYTHONPATH=`pwd` $(BIN) $(FLAG) -h
cleandb: clean prepare
PYTHONPATH=`pwd` $(BIN) $(FLAG) cleandb
initdb: clean prepare
PYTHONPATH=`pwd` $(BIN) $(FLAG) initdb
run:
PYTHONPATH=`pwd` $(BIN) $(FLAG) load $(REPO_PATH)
clean-and-run: clean prepare
PYTHONPATH=`pwd` $(BIN) $(FLAG) cleandb
PYTHONPATH=`pwd` $(BIN) $(FLAG) initdb
PYTHONPATH=`pwd` $(BIN) $(FLAG) load $(REPO_PATH)
check:
$(FLAKE) $(BINDIR) $(SRCDIR)
profile:
PYTHONPATH=`pwd` python3 -m cProfile ./scratch/profile-swhgitloader.py | tee ./scratch/swhgitloader.cProfile
PYTHONPATH=`pwd` python3 -m profile ./scratch/profile-swhgitloader.py | tee ./scratch/swhgitloader.profile
test:
$(NOSE) $(TESTFLAGS) $(TESTDIR)
test-connect-db:
psql -d $(DB_TEST)
test-drop-db:
sudo su -l postgres -c "dropdb $(DB_TEST)"
test-create-db:
sudo su -l postgres -c "createdb -O $(USER) $(DB_TEST)"
connect-db:
psql -d $(DB)
drop-db:
sudo su -l postgres -c "dropdb $(DB)"
create-db:
sudo su -l postgres -c "createdb -O $(USER) $(DB)"
check-meta:
@echo "Git Repository metadata:"
@$(BINDIR)/dir-git-repo-meta.sh $(REPO_PATH)
@echo
@echo "DB Repository metadata:"
@$(BINDIR)/db-git-repo-meta.sh
@echo
readme:
pandoc -f org -t markdown README.org > README
log:
tail -f swh-git-loader/log/sgloader.log
coverage:
$(NOSE) --with-coverage $(SRCDIR) -v --cover-package=$(SRCDIR)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 7:22 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3278740
Attached To
rDLDG Git loader
Event Timeline
Log In to Comment