Skip to content

Commit 9f89e3f

Browse files
committed
Merge remote-tracking branch 'origin/v2-pull-integration' into pull-initial
2 parents a41258a + f326179 commit 9f89e3f

File tree

10 files changed

+332
-245
lines changed

10 files changed

+332
-245
lines changed

.github/workflows/autotests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Auto Tests
22
on: [push]
33
env:
44
TEST_MERGIN_URL: https://app.dev.merginmaps.com/
5-
TEST_API_USERNAME: test_plugin
6-
TEST_API_PASSWORD: ${{ secrets.MERGINTEST_API_PASSWORD }}
7-
TEST_API_USERNAME2: test_plugin2
8-
TEST_API_PASSWORD2: ${{ secrets.MERGINTEST_API_PASSWORD2 }}
95

106
concurrency:
117
group: ci-${{github.ref}}-autotests
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Notify releases repo
2+
3+
on:
4+
milestone:
5+
types: [created, edited]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Dispatch to releases repo
12+
env:
13+
GH_TOKEN: ${{ secrets.MM_RELEASES_SYNC_TOKEN }}
14+
run: |
15+
gh api repos/MerginMaps/releases/dispatches \
16+
--method POST \
17+
-f event_type=milestone-${{ github.event.action }} \
18+
-f 'client_payload[repo]=${{ github.repository }}' \
19+
-f 'client_payload[milestone_title]=${{ github.event.milestone.title }}' \
20+
-f 'client_payload[milestone_url]=${{ github.event.milestone.html_url }}'

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To download a specific version of a project:
9999
$ mergin --username john download --version v42 john/project1 ~/mergin/project1
100100
```
101101

102-
To download a sepecific version of a single file:
102+
To download a specific version of a single file:
103103

104104
1. First you need to download the project:
105105
```
@@ -183,13 +183,12 @@ For running test do:
183183

184184
```bash
185185
cd mergin
186+
# TEST_ related vairables are optional
186187
export TEST_MERGIN_URL=<url> # testing server
187188
export TEST_API_USERNAME=<username>
188189
export TEST_API_PASSWORD=<pwd>
189190
export TEST_API_USERNAME2=<username2>
190191
export TEST_API_PASSWORD2=<pwd2>
191-
# workspace name with controlled available storage space (e.g. 20MB), default value: testpluginstorage
192-
export TEST_STORAGE_WORKSPACE=<workspacename>
193192
pip install pytest pytest-cov coveralls
194193
pytest --cov-report html --cov=mergin mergin/test/
195194
```

mergin/local_changes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class FileChange:
4545
history: Optional[dict] = None
4646
# some functions (MerginProject.compare_file_sets) are adding location dict to the change from project info
4747
location: Optional[str] = None
48+
# list of diff filenames associated with this change
49+
diffs: Optional[List[str]] = None
4850

4951
def get_diff(self) -> Optional[FileDiffChange]:
5052
if self.diff:

mergin/merginproject.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ def compare_file_sets(self, origin: List[Dict], current: List[Dict]):
334334
335335
:Example:
336336
337-
>>> origin = [{'checksum': '08b0e8caddafe74bf5c11a45f65cedf974210fed', 'path': 'base.gpkg', 'size': 2793, 'mtime': '2019-08-26T11:08:34.051221+02:00'}]
338-
>>> current = [{'checksum': 'c9a4fd2afd513a97aba19d450396a4c9df8b2ba4', 'path': 'test.qgs', 'size': 31980, 'mtime': '2019-08-26T11:09:30.051221+02:00'}]
337+
>>> origin = [{'checksum': '1111111111111111111111111111111111111111', 'path': 'base.gpkg', 'size': 2793, 'mtime': '2019-08-26T11:08:34.051221+02:00'}]
338+
>>> current = [{'checksum': '2222222222222222222222222222222222222222', 'path': 'test.qgs', 'size': 31980, 'mtime': '2019-08-26T11:09:30.051221+02:00'}]
339339
>>> self.compare_file_sets(origin, current)
340-
{"added": [{'checksum': 'c9a4fd2afd513a97aba19d450396a4c9df8b2ba4', 'path': 'test.qgs', 'size': 31980, 'mtime': '2019-08-26T11:09:30.051221+02:00'}], "removed": [[{'checksum': '08b0e8caddafe74bf5c11a45f65cedf974210fed', 'path': 'base.gpkg', 'size': 2793, 'mtime': '2019-08-26T11:08:34.051221+02:00'}]], "renamed": [], "updated": []}
340+
{"added": [{'checksum': '2222222222222222222222222222222222222222', 'path': 'test.qgs', 'size': 31980, 'mtime': '2019-08-26T11:09:30.051221+02:00'}], "removed": [[{'checksum': '1111111111111111111111111111111111111111', 'path': 'base.gpkg', 'size': 2793, 'mtime': '2019-08-26T11:08:34.051221+02:00'}]], "renamed": [], "updated": []}
341341
342342
:param origin: origin set of files metadata
343343
:type origin: list[dict]

0 commit comments

Comments
 (0)