-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (44 loc) · 1.43 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Define variables
PYTHON := python3
PYTEST := pytest
PIP := pip3
PROJECT_NAME := web scraping using Python
.PHONY: install
install:
$(PIP) install -r requirements.txt
@echo "Set env vars LT_USERNAME & LT_ACCESS_KEY"
# Procure Username and AccessKey from https://accounts.lambdatest.com/security
export LT_USERNAME=himanshuj
export LT_ACCESS_KEY=Ia1Miq
.PHONY: test
test:
export NODE_ENV = test
.PHONY: test
scrap-using-pyunit:
- echo $(EXEC_PLATFORM)
- $(PYTHON) tests/pyunit/test_ecommerce_scraping.py
- $(PYTHON) tests/pyunit/test_yt_scraping.py
scrap-using-pytest:
- echo $(EXEC_PLATFORM)
- $(PYTEST) --verbose --capture=no tests/pytest/test_ecommerce_scraping.py
- $(PYTEST) --verbose --capture=no tests/pytest/test_yt_scraping.py
scrap-using-beautiful-soup:
- echo $(EXEC_PLATFORM)
- $(PYTHON) tests/beautiful-soup/test_ecommerce_scraping.py
- $(PYTHON) tests/beautiful-soup/test_infinite_scraping.py
.PHONY: clean
clean:
# This helped: https://gist.github.com/hbsdev/a17deea814bc10197285
find . | grep -E "(__pycache__|\.pyc$$)" | xargs rm -rf
@echo "Clean Succeded"
.PHONY: distclean
distclean: clean
rm -rf venv
.PHONY: help
help:
@echo ""
@echo "install : Install project dependencies"
@echo "clean : Clean up temp files"
@echo "scrap-using-pyunit : Web Scraping using Pyunit"
@echo "scrap-using-pytest : Web Scraping using Pytest"
@echo "scrap-using-beautiful-soup : Web Scraping using Beautiful Soup"