Skip to content

Commit 3f9224f

Browse files
Merge branch 'development' into alex_fixes
2 parents 991ffda + b6f5304 commit 3f9224f

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

.github/workflows/code_quality_checks.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ name: Code Quality Check
44
permissions:
55
contents: read
66

7-
on: [pull_request]
7+
on:
8+
- pull_request
9+
- workflow_dispatch
810

911
jobs:
1012
pre-commit:
@@ -13,11 +15,10 @@ jobs:
1315

1416
steps:
1517
- uses: actions/checkout@v3
16-
- name: setup environment
17-
run: |
18-
./dev-setup.sh
19-
- name: run pre-commit hooks
18+
- name: setup environment and run pre-commit hooks
19+
shell: bash
2020
run: |
21+
source ./dev-setup.sh
2122
pre-commit run --all-files --show-diff-on-failure --color=always
2223
- name: Print message on failure
2324
if: failure()

.github/workflows/unit-test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v3
1919

20-
- name: Install package
21-
run: |
22-
./dev-setup.sh
23-
2420
- name: Install xmllint
2521
run: |
2622
apt-get update
2723
apt-get install -y libxml2-utils bc
2824
29-
30-
- name: Run unit tests with coverage
25+
- name: Install package and run unit tests with coverage
3126
id: extract_coverage
27+
shell: bash
3228
run: |
29+
source ./dev-setup.sh
3330
pytest test/unit -s --cov=nodescraper --cov-report=xml --cov-report=term --cov-fail-under=70 --maxfail=1 --disable-warnings -v
3431
3532
- name: Print coverage

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@ a python virtual environment and also configures the pre-commit hooks for the pr
3232
source dev-setup.sh
3333
```
3434

35+
Alternatively, follow these manual steps:
36+
37+
### 1. Virtual Environment (Optional)
38+
```sh
39+
python3 -m venv venv
40+
source venv/bin/activate
41+
```
42+
On Debian/Ubuntu, you may need: `sudo apt install python3-venv`
43+
44+
### 2. Install from Source (Required)
45+
```sh
46+
python3 -m pip install --editable .[dev] --upgrade
47+
```
48+
This installs Node Scraper in editable mode with development dependencies. To verify: `node-scraper --help`
49+
50+
### 3. Git Hooks (Optional)
51+
```sh
52+
pre-commit install
53+
```
54+
Sets up pre-commit hooks for code quality checks. On Debian/Ubuntu, you may need: `sudo apt install pre-commit`
55+
3556
## CLI Usage
3657
The Node Scraper CLI can be used to run Node Scraper plugins on a target system. The following CLI
3758
options are available:

dev-setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
#!/usr/bin/env bash
2+
13
# Create venv if not already present
24
if [ ! -d "venv" ]; then
3-
python3 -m pip install venv
45
python3 -m venv venv
56
fi
67

0 commit comments

Comments
 (0)