Skip to content

Commit 7cdd3c6

Browse files
authored
Added submodule for external data storage (#755)
* Added submodule for external data storage * added contributing page to describe submodule
1 parent ef41d55 commit 7cdd3c6

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
python-version: ["3.11"]
2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
submodules: true
2527
- name: Set up Python ${{ matrix.python-version }}
2628
uses: actions/setup-python@v5
2729
with:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "tests/data"]
2+
path = tests/data
3+
url = https://github.com/birdnet-team/birdnet-test-data.git

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Testdata (optional)
2+
3+
This project uses a submodule for its testdata.
4+
5+
If you want to run the tests locally you need to initialize the submodule:
6+
7+
```bash
8+
git submodule update --init --recursive
9+
```
10+
11+
Or checkout the submodule during cloning:
12+
13+
```bash
14+
git clone --recurse-submodules https://github.com/birdnet-team/BirdNET-Analyzer.git
15+
```
16+
17+
If the testdata has changed and you want to update the repo to use the new current testdata follow these steps:
18+
19+
```bash
20+
cd tests/data
21+
git pull origin main
22+
cd ..
23+
git add data
24+
git commit -m "Update testdata"
25+
git push
26+
```
27+
28+
This will set up the repo to use the current ref of the submodule.
29+
30+
**Note**: If you wan to add data you do so by either checking out the submodule as a regular repo and just add-commit-push from there or use the subdirectory containing the submodule like a regular git repository (don't forget to manually update the ref in the main repo)

tests/data

Submodule data added at b43d428

0 commit comments

Comments
 (0)