Skip to content

Commit cf91d9e

Browse files
committed
feat: add ./pre-push.sh script for local validation
1 parent 7c71861 commit cf91d9e

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.lycheeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
https://slack.com/shortcuts/Ft09CHNNHZNX/8d0d6f7d69a1350a91b2ef33fc6d5704
2-
http://www.mdpi.com/2072-4292/8/10/859
2+
https://www.mdpi.com/2072-4292/8/10/859

pre-push.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash -e
2+
3+
RED='\033[0;31m'
4+
GREEN='\033[0;32m'
5+
YELLOW='\033[1;33m'
6+
NC='\033[0m' # No Color
7+
8+
log_success() {
9+
echo -e "${GREEN}$1${NC}"
10+
}
11+
12+
log_error() {
13+
echo -e "${RED}$1${NC}"
14+
}
15+
16+
log_warning() {
17+
echo -e "${YELLOW}$1${NC}"
18+
}
19+
20+
21+
if ! command -v pre-commit &>/dev/null; then
22+
log_error "pre-commit is not installed."
23+
log_error "Follow https://pre-commit.com/#installation"
24+
exit 1
25+
fi
26+
27+
if ! command -v lychee &>/dev/null; then
28+
log_error "lychee is not installed."
29+
log_error "Follow https://github.com/lycheeverse/lychee#installation"
30+
exit 1
31+
fi
32+
33+
echo "▶️ Running pre-commit"
34+
pre-commit run --color=always --all-files
35+
36+
echo "▶️ Running lychee"
37+
lychee --root-dir $(pwd)/ ./
38+
39+
log_success "✅ All good"

project_types/project_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MapSwipe Project Types and Data Model
22
## MapSwipe's Crowdsourcing Approach
3-
The MapSwipe crowdsourcing workflow is designed following an approach already presented by [Albuquerque et al. (2016)](http://www.mdpi.com/2072-4292/8/10/859). The main ideas about MapSwipe's crowdsourcing approach (and many other crowdsourcing tasks) lies in
3+
The MapSwipe crowdsourcing workflow is designed following an approach already presented by [Albuquerque et al. (2016)](https://www.mdpi.com/2072-4292/8/10/859). The main ideas about MapSwipe's crowdsourcing approach (and many other crowdsourcing tasks) lies in
44
1. **Defining** the mapping challenge by posing a simple question (e.g. "Which areas are inhabited in South Kivu?")
55
2. **Dividing** the overall challenge into many smaller manageable components (e.g. *groups* and *tasks* based on satellite imagery tiles)
66
3. **Distributing** *groups* and *tasks* to many users redundantly (e.g. every area gets mapped by at least three different users)

0 commit comments

Comments
 (0)