Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.4.0 #313

Merged
merged 405 commits into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
405 commits
Select commit Hold shift + click to select a range
5c58811
[cli] fix unlink dialog
Dec 26, 2020
b60a1a5
[cli] removed space usage from account-info output
Dec 26, 2020
065e1a8
[config] removed default_dir_name from config
Dec 26, 2020
8983ed4
[config] simplify instance creation
Dec 26, 2020
2872e1e
[notify_macos] use public API to get / set notification categories
Dec 26, 2020
a4e263e
[logging] import from public API
Dec 26, 2020
5ee0136
[sync] get umask at import for thread safety
Dec 28, 2020
86717f6
[sync] rename _cpu_count -> cpu_count
Dec 28, 2020
46130bc
[sync] reordered imports
Dec 28, 2020
f0f0de8
[sync] fix typo in doc string
Dec 28, 2020
2dad037
[sync] improved logs on connection error
Dec 28, 2020
4407d29
[sync] use chmod instead of fchmod
Dec 28, 2020
d676dcd
[main] drop dbx_path argument from `diff`
Dec 29, 2020
ed51b32
[main] add rev to diff output in addition to mtime
Dec 29, 2020
5f4ef8a
[main] rename full_path -> local_path
Dec 29, 2020
d1af92d
[cli] some cleanup
Dec 29, 2020
7224d11
[sync] more specific error messages for CacheDirError
Jan 2, 2021
6ed01d7
[sync] increased number of retries to create cache dir
Jan 2, 2021
2077733
[sync] fixed retry logic when creating cache dir
Jan 2, 2021
cda3080
Bump sphinx-rtd-theme from 0.5.0 to 0.5.1
dependabot-preview[bot] Jan 5, 2021
4813f0d
Bump sphinx from 3.4.1 to 3.4.2
dependabot-preview[bot] Jan 5, 2021
3ccb177
Merge pull request #275 from SamSchott/dependabot/pip/sphinx-3.4.2
Jan 7, 2021
f9441fc
Merge pull request #274 from SamSchott/dependabot/pip/sphinx-rtd-them…
Jan 7, 2021
064c163
Bump sphinx from 3.4.2 to 3.4.3
dependabot-preview[bot] Jan 8, 2021
51153b6
Merge pull request #277 from SamSchott/dependabot/pip/sphinx-3.4.3
Jan 8, 2021
637cace
[tests] adapt diff test
Jan 7, 2021
c264cb7
allow providing refresh token for tests
Jan 8, 2021
0d26c6e
clarify warning about syncing a folder with multiple clients
Jan 12, 2021
69322c1
[notify_macos] keep reference to NSUserNotificationCenter delegate
Jan 12, 2021
f076808
[notify] clean up folder structure
Jan 12, 2021
d910678
[notify] remove app_id argument
Jan 13, 2021
bc25d9d
[notify] lazily initialise DesktopNotifier
Jan 13, 2021
d8fdde2
[notify.macos] delay authorisation until notification request
Jan 14, 2021
5d4790e
[notify.linux] delay connecting to dbus until first message
Jan 14, 2021
25d3520
[notify.main] default app name "Python"
Jan 14, 2021
692e4be
[notify.main] revert to early init
Jan 14, 2021
37968d4
[notify.base] added repr to Notification class
Jan 15, 2021
e49af28
[notify] use DesktopNotifierBase for unsupported platforms
Jan 15, 2021
1810560
[notify.linux] shorter warning on connection error
Jan 15, 2021
b555ca4
[tests] mark auth key as loaded
Jan 15, 2021
a0abf6e
[daemon] improve handling of SIGTERM, SIGINT, SIGHUP
Jan 15, 2021
3b95f98
[notify.main] fix bug in avoiding recursive notifications
Jan 16, 2021
2f897b1
Merge pull request #279 from SamSchott/fix-linux-test-deadlock
Jan 16, 2021
940b691
Update alembic requirement from <1.5,>=1.3 to >=1.3,<1.6
dependabot-preview[bot] Jan 19, 2021
a70fdcd
Use mignore when creating directorysnapshot
Nov 12, 2020
52ee2d9
Add changes to CHANGELOG.md
Jan 14, 2021
584a8b7
Merge pull request #219 from andrewsali/snapshot-with-mignore
Jan 19, 2021
8532da7
[sync] unify error handling and notifications from workers
Jan 19, 2021
d272e49
[oauth] don't log errors if we raise them
Jan 19, 2021
04ef7ae
[oauth] lazily load keyring
Jan 19, 2021
90cda06
remove MaestralDesktopNotificationHandler
Jan 19, 2021
0b04484
move bump2version config to setup.cfg
Jan 19, 2021
f4a52a8
[notify] simplify handling on notification levels
Jan 19, 2021
75ef5b6
[daemon] handle errors when starting sync
Jan 19, 2021
e9d2933
[tests] adapt tests
Jan 20, 2021
90cade0
[notify] move generic code to separate package
Jan 20, 2021
d0dc574
added desktop-notifier dependency
Jan 20, 2021
6000c98
Revert "[oauth] don't log errors if we raise them"
Jan 20, 2021
cee196b
Merge pull request #282 from SamSchott/explicit-dekstop-notifications
Jan 20, 2021
2f0128e
Bump sphinx-autoapi from 1.5.1 to 1.6.0
dependabot-preview[bot] Jan 21, 2021
46bbbe7
Merge pull request #283 from SamSchott/dependabot/pip/sphinx-autoapi-…
Jan 21, 2021
e3cc6ff
Merge pull request #281 from SamSchott/dependabot/pip/alembic-gte-1.3…
Jan 24, 2021
b7cca19
bump to keyring >=22, <23
Jan 25, 2021
68fffc0
[oauth] adapt keyring imports
Jan 25, 2021
a520bbb
[sync] migrate keyring backend entry in config file
Jan 25, 2021
ab42fa0
[sync] code cleanup
Jan 25, 2021
e2c6ff1
updated changelog
Jan 25, 2021
0141e58
don't set maximum version for keyring
Jan 27, 2021
34f7cd0
[cli] tweak formatting of start / stop messages
Jan 27, 2021
4994f47
add some log messages
Jan 28, 2021
5717e0a
[autostart] remove spaces around "=" for desktop entry
Jan 28, 2021
4503021
[autostart] remove Categories key from desktop entry
Jan 28, 2021
113b673
Merge pull request #285 from SamSchott/keyring-22.0
Jan 29, 2021
66de5d6
[sync] don't raise an error if we cannot chmod
Jan 29, 2021
d56251d
updated changelog
Jan 29, 2021
1d49b5e
[sync] minor code cleanup
Jan 30, 2021
273c147
update changelog
Jan 30, 2021
76b4abb
run tests in verbose mode
Jan 30, 2021
c925da6
[client] reduce duplicate code
Jan 28, 2021
733b44c
[client] remove `convert_api_errors_decorator`, use `convert_api_erro…
Jan 28, 2021
0f9f0ad
[sync] refactor sync cycle
Jan 28, 2021
07001dc
[sync] simplify locking
Jan 28, 2021
16e09fc
[sync] move check for local folder
Jan 29, 2021
44d3fc0
[sync] rename _handle_sync_thread_errors -> handle_sync_thread_errors
Jan 29, 2021
e897f27
[sync] remove recursive option from `get_remote_folder`
Jan 30, 2021
4c34bce
[sync] don't send desktop notifications while indexing
Jan 30, 2021
5ef2cac
added changelog entry on indexing
Jan 30, 2021
b43ef12
[sync] reverse startup order: fetch remote changes first, upload loca…
Jan 30, 2021
9781b8f
[sync] move check for deleted folder
Jan 30, 2021
2d22b15
update test fixtures
Jan 30, 2021
10a90b1
adapt tests
Jan 30, 2021
17594b1
[sync] always catch NotADirectoryError alongside FileNotFoundError
Jan 30, 2021
5137a7b
[sync] renamed some local variables
Jan 31, 2021
52baf43
[sync] retry errors before startup
Jan 31, 2021
1149a05
[tests] removed unused braces
Jan 31, 2021
9840308
[sync] added debug message
Jan 31, 2021
909533b
[sync] fix waiting for local changes
Jan 31, 2021
284a038
[main] verify revs before requesting diff
Jan 31, 2021
5ae161e
Merge pull request #296 from SamSchott/resumable-indexing
Jan 31, 2021
daaf0b7
[client] add API to create, list and revoke shared links
Nov 16, 2020
918c1b6
[client] improved typing
Nov 19, 2020
30bafd4
[client] corrections after rebase to develop
Jan 31, 2021
20360ab
[cli] use DropboxPath where appropriate
Jan 31, 2021
8a2923e
[cli] allow lower case choice parameters
Jan 31, 2021
61db924
[cli] fix typo
Jan 31, 2021
abbdb09
[cli] import datetime globally
Jan 31, 2021
ee7d6b6
[client] update doc strings and kwarg handling
Jan 31, 2021
8321a79
[main] add shared link API
Jan 31, 2021
3792190
[cli] add shared link CLI
Jan 31, 2021
17c5068
[errors] add SharedLinkError
Feb 1, 2021
b10ae80
[sync] whitelist which event types are handled
Jan 18, 2021
a6d015b
relax pinned dependencies where possible
Feb 1, 2021
f86afcd
[sevents] guard against import error in new release
Feb 1, 2021
fbd35d4
Bump sphinx-autoapi from 1.6.0 to 1.7.0
dependabot-preview[bot] Feb 1, 2021
06624b6
Merge pull request #298 from SamSchott/dependabot/pip/sphinx-autoapi-…
Feb 1, 2021
b9f6dc2
[client] added error handling for shared link api
Feb 1, 2021
17d2a51
[client] simplified error conversion logic
Feb 1, 2021
be773ee
[cli] show account type in status
Feb 1, 2021
e0b4c83
allow listing all shared links
Feb 1, 2021
0e69ac9
[cli] fix error handling
Feb 1, 2021
c71b323
[cli] rename sharedlink -> sharelink
Feb 1, 2021
bc4869c
[tests] added tests for sharedlink API
Feb 1, 2021
c0ab11c
[cli] tweak sharelink cli output
Feb 1, 2021
b9fd6e5
update changelog
Feb 1, 2021
2491e69
[cli] import CommunicationError from maestral.daemon
Feb 1, 2021
fb4724e
[cli] move datetime conversions to separate function
Feb 1, 2021
6ae6270
Merge pull request #299 from SamSchott/shared-link-api
Feb 1, 2021
bb73faa
[cli] removed restart command
Feb 2, 2021
e4e89d5
[cli] renames file_status -> filestatus
Feb 2, 2021
928b8a2
[docs] updated docs on sync event handling
Feb 2, 2021
ff5c52f
[daemon] added type hint for *argv
Feb 2, 2021
f1876d6
[docs] reordered TOC
Feb 2, 2021
92b0fb4
[cli] move account management and info to auth command group
Feb 2, 2021
7baa790
updated changelog
Feb 2, 2021
db8d56a
[tests] adapt tests
Feb 3, 2021
2e77a67
update changelog
Feb 3, 2021
4919e51
Merge pull request #301 from SamSchott/cleaner-cli
Feb 3, 2021
c09cbef
[constants] added CONNECTED and CONNECTING
Feb 3, 2021
2acf998
[sync] remove pause / resume methods
Feb 3, 2021
0652dfe
[main] adapt to new monitor API
Feb 3, 2021
eac1c43
[cli] adapt to new main API without pause / resume
Feb 3, 2021
574733a
[daemon] adapt to new main API without pause / resume
Feb 3, 2021
db11647
[constants] removed PAUSED
Feb 3, 2021
151bee5
[tests] adapt tests
Feb 3, 2021
ecaee51
updated changelog
Feb 3, 2021
23e3f39
bumped GUI requirements
Feb 3, 2021
00e0946
[sync] fix race condition when waiting for local changes
Feb 3, 2021
7d3437b
Merge pull request #302 from SamSchott/fix-sync-cycle
Feb 3, 2021
b9bcd59
[tests] run on macos-11.0 and ubuntu-20.04
Feb 4, 2021
7e29faa
moved indexing log messages from client to sync module
Feb 5, 2021
a6c36af
[sync] update `last_reindex` timestamp
Feb 5, 2021
5918ef7
[notify] adapt to changes in desktop-notifier
Feb 7, 2021
1d770c0
remove dbus-next dependency
Feb 8, 2021
a35d6ed
expanded acknowledgements section
Feb 8, 2021
b154534
[utils.integration] added method to get state of AC power supply
Feb 4, 2021
554bb8c
[main] updated doc strings
Feb 9, 2021
e1a0212
updated changelog
Feb 9, 2021
b6cefaf
Merge pull request #307 from SamSchott/charging-check
Feb 9, 2021
673a36b
[logger] tweak waiting for log message
Feb 9, 2021
f6e90d3
adapt to changes in desktop-notifier 2.0
Feb 9, 2021
f91c70c
suppress "Indexing 0..." log message
Feb 10, 2021
e5bb1f6
adapt to desktop-notifier changes
Feb 11, 2021
0cf7f27
fix timeout error handling
Feb 9, 2021
3fb04f0
move tests back to macos-latest and ubuntu-latest
Feb 12, 2021
6605ef7
remove our own fsevents module
Dec 11, 2020
9079098
[sync] detect deleted dropbox folder through DirDeletedEvent
Dec 11, 2020
670866e
bump watchdog to branch with macos fixes
Jan 7, 2021
58eafd6
[sync] add nice repr to `_Ignore`
Jan 8, 2021
3ee2350
[sync] ignore up to two FileCreatedEvents on move on macOS
Jan 8, 2021
f048dd2
[tests] minor cleanup
Jan 8, 2021
e3cc731
[sync] whitelist which event types are handled
Jan 18, 2021
600e12b
[tests] increase time to wait for idle
Jan 18, 2021
151bad7
[tests] prefer creating folder remotely
Jan 18, 2021
07e963f
[tests] increase test timeouts
Jan 19, 2021
dad6208
install watchdog from master branch
Jan 19, 2021
84e5791
[sync] remove unused import
Jan 20, 2021
d43aa38
switch to main watchdog repo
Jan 21, 2021
ed912ee
[fsevents] use our own polling observer again
Feb 3, 2021
475b7fb
[sync] remove special event ignores for macOS
Feb 3, 2021
35cb31c
[sync] simplify notification for local events
Feb 3, 2021
7eb78b8
[sync] move FSEventHandler to SyncEngine
Feb 4, 2021
e005ee0
[sync] added additional debug message
Feb 4, 2021
89691cd
[sync] don't emit DirModifiedEvent on startup scan
Feb 4, 2021
714656f
[database] show item type in SyncEvent repr
Feb 4, 2021
3e1bfe2
remove our own fsevents module
Dec 11, 2020
98ab286
bump watchdog to branch with macos fixes
Jan 7, 2021
4621fae
[sync] ignore up to two FileCreatedEvents on move on macOS
Jan 8, 2021
63a4e58
[tests] increase time to wait for idle
Jan 18, 2021
01e1a03
[tests] increase test timeouts
Jan 19, 2021
cd81374
install watchdog from master branch
Jan 19, 2021
d03e7bd
switch to main watchdog repo
Jan 21, 2021
f49d1ac
[fsevents] use our own polling observer again
Feb 3, 2021
be39d62
[sync] remove special event ignores for macOS
Feb 3, 2021
690d2a8
[tests] reduce wait_for_idle time
Feb 5, 2021
0218f26
bump to watchdog 2.0
Feb 11, 2021
78b2622
[fsevents] moved doc strings for polling emitter
Feb 11, 2021
4cbcacb
updated changelog
Feb 11, 2021
a0d231f
bump desktop-notifier to 3.1.2
Feb 11, 2021
4417257
[tests] record fsevents log
Feb 12, 2021
4c81529
[tests] use sync_lock instead of start / stop
Feb 12, 2021
1640cee
slightly relax performance requirement
Feb 12, 2021
4d03cec
Merge pull request #276 from SamSchott/watchdog-1.0
Feb 12, 2021
50accf7
improve fswatch error handling
Feb 8, 2021
f667b6f
moved all platform integrations to integration module
Feb 9, 2021
2e17d0c
advise to reload instead of reboot
Feb 9, 2021
8621caf
added changelog entry
Feb 9, 2021
47d7f67
don't raise InotifyError during startup
Feb 9, 2021
9329a64
[tests] added test for inotify error
Feb 12, 2021
edd9270
Merge pull request #308 from SamSchott/improve-inotify-error-handling
Feb 12, 2021
5093fd6
[sync] make `save_local_hash` private
Feb 1, 2021
60a5ad3
[sync] updated some doc strings and type hints
Feb 1, 2021
28b13ae
[sync] make SnyEngine.free_memory private
Feb 1, 2021
84ff937
[sync] make SyncEngine.get_remote_folder private
Feb 1, 2021
a23239d
[sync] remove `SnyEngine._dir_snapshot_with_mignore`
Feb 1, 2021
39e4e04
[sync] suppress "Indexing 0..." message
Feb 12, 2021
bd0816c
[sync] move expiry of ignore events
Feb 12, 2021
4a3caeb
added optional upload- or download-only sync
Feb 12, 2021
96e41c7
increase default reindexing interval to 2 weeks
Feb 12, 2021
628e390
removed analytics config value
Feb 12, 2021
3c5a757
[cli] renamed `configs` to `config-files`
Feb 12, 2021
04ae611
[config] be more restrictive in type conversion
Feb 12, 2021
902933b
[cli] added config command
Feb 12, 2021
7ddcad4
[cli] pretty print all exceptions
Feb 12, 2021
dcd53a8
updated changelog
Feb 12, 2021
9f83d68
[docs] updated config docs
Feb 12, 2021
c7a56f6
[cli] refine config help messages
Feb 12, 2021
8085856
[config] update DEFAULTS_CONFIG inline commends
Feb 12, 2021
9097996
Merge pull request #311 from SamSchott/one-way-sync
Feb 12, 2021
70e2b3a
[notify] use inequalities to compare levels
Feb 12, 2021
0cdd7dc
[notify] raise ValueError when converting level name to number fails
Feb 12, 2021
1b753e5
[notify] create ad-hoc level name if it doesn't exist
Feb 12, 2021
01f254b
[notify] update doc string
Feb 12, 2021
0fc9527
[docs] don't show module summary in api docs
Feb 13, 2021
f13ba54
give up on snap support
Feb 13, 2021
5e8642f
[docs] intersphinx link to watchdog latest
Feb 13, 2021
b7b379f
[cli] added config-file --clean option
Feb 13, 2021
e86c077
[errors] added CancelledError
Feb 13, 2021
8ee9b72
[sync] cancel running syncs by raising an error in the sync threads
Feb 13, 2021
c9e509a
[sync] tweak log messages
Feb 13, 2021
a727886
[sync] don't stop sync threads on low-latency connection error
Feb 13, 2021
44944f8
updated changelog
Feb 13, 2021
22581e7
updated change log
Feb 13, 2021
57f692f
Merge pull request #312 from SamSchott/fix-download-interrupted-by-co…
Feb 13, 2021
75d4b5b
[client] tweak error message for server errors
Feb 14, 2021
1891429
[sync] handle non-sync related server errors like other fatal errors
Feb 14, 2021
e7dddec
[main] catch errors in period update of account info
Feb 14, 2021
60f9490
Bump version: 1.3.2.dev0 → 1.4.0.dev0
Feb 14, 2021
99a85fe
update release notes to prepare for 1.4.0
Feb 14, 2021
0eea8a7
[sync] improve log messages when resuming indexing
Feb 14, 2021
0b25e70
updated change log
Feb 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .bumpversion.cfg

This file was deleted.

25 changes: 19 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- name: Checkout project

- name: Checkout merge commit
uses: actions/checkout@v2
if: github.event_name == 'pull_request_target'
with:
ref: 'refs/pull/${{ github.event.number }}/merge'

- name: Checkout head commit
uses: actions/checkout@v2
if: github.event_name != 'pull_request_target'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -34,19 +40,20 @@ jobs:
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
python -m pip install --upgrade pytest-cov
python -m pip install --upgrade pytest-rerunfailures
python -m pip install .

- name: Test with pytest
run: |
pytest --cov=maestral --cov-report=xml tests/offline
pytest --reruns 5 --cov=maestral --cov-report=xml tests/offline

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: pytest
env_vars: OS,PYTHON,TYPE
name: pytests
name: pytests -v
env:
OS: ${{ matrix.platform }}
PYTHON: ${{ matrix.python-version }}
Expand All @@ -71,11 +78,16 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- name: Checkout project
- name: Checkout merge commit
uses: actions/checkout@v2
if: github.event_name == 'pull_request_target'
with:
ref: 'refs/pull/${{ github.event.number }}/merge'

- name: Checkout head commit
uses: actions/checkout@v2
if: github.event_name != 'pull_request_target'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -86,6 +98,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
python -m pip install --upgrade pytest-cov
python -m pip install --upgrade pytest-rerunfailures
python -m pip install .

- name: Get short-lived Dropbox token
Expand All @@ -99,11 +112,11 @@ jobs:
-d client_id=2jmbq42w7vof78h)
token=$(echo $auth_result | python -c "import sys, json; print(json.load(sys.stdin)['access_token'])")
echo "::add-mask::$token"
echo "DROPBOX_TOKEN=$token" >> $GITHUB_ENV
echo "DROPBOX_ACCESS_TOKEN=$token" >> $GITHUB_ENV

- name: Test with pytest
run: |
pytest --cov=maestral --cov-report=xml tests/linked
pytest -v --reruns 5 --cov=maestral --cov-report=xml tests/linked

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down
134 changes: 126 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,124 @@
## v1.4.0

This release brings significant extensions to the command line interface: It introduces
commands to create and manage shared links, to compare older version of a file and print
the diff output to the terminal, and commands for direct access to config values (note
the warning below). It also adds optional one-way syncing, for instance to keep a mirror
of a remote Dropbox folder while ignoring local changes.

Several bugs have been fixed which could occur when resuming the sync activity after the
connection had been lost while indexing a remote folder.

Finally, this release removes automatic error reporting via Bugsnag. Please file any bug
reports as issues on GitHub where it is possible to follow up.

#### Added:

* Added a command `maestral diff` to compare different versions of a text file. The
resulting diff is printed to the console. Credit goes to @OrangeFran.
* Resurrected the command `maestral revs` to list previous versions (revisions) of a file.
* Added a command group `maestral sharelink` to create and manage shared links.
Subcommands are:

* `create`: Create a shared link for a file or folder, optionally with password
protection and an expiry date on supported accounts (business and professional).
* `list`: List shared links, either for a specific file or folder or for all items
in your Dropbox.
* `revoke`: Revoke a shared link.

* Added a command group `maestral config` to provide direct access to config values.
Subcommands are:

* `get`: Gets the config value for a key.
* `set`: Sets the config value for a key.

This provides access to previously inaccessible config values such as
`reindex_interval` or `max_cpu_percent`. Please refer to a Wiki for an overview of all
config values. Use the `set` command with caution: setting some config values may
leave the daemon in an inconsistent state (e.g., changing the location of the Dropbox
folder). Always use the equivalent command from the Settings group (e.g., `maestral
move-dir`).
* Added the ability to disable a single sync direction, for instance to enable download
syncs only. This can be useful when you want to mirror a remote folder while ignoring
local changes or when syncing to a file system which does not support inotify. To use
this, set the respective config values for `upload` or `download` to False. Note that
conflict resolution remains unaffected. For instance, when an unsynced local change
would be overwritten by a remote change, the local file will be moved to a
"conflicting copy" first. However, the conflicting copy will not be uploaded.

#### Changed:

* Changes to indexing:

* Avoid scanning of objects matching an `.mignore` pattern (file watches will still be
added however). This results in performance improvements during startup and resume.
A resulting behavioral change is that **maestral will remove files matching an
ignore pattern from Dropbox**. After this change it will be immaterial if an
`.mignore` pattern is added before or after having matching files in Dropbox.
* If Maestral is quit or interrupted during indexing, for instance due to connection
problems, it will later resume from the same position instead of restarting from the
beginning.
* Indexing will no longer skip excluded folders. This is necessary for the above
change.
* Defer periodic reindexing, typically carried out weekly, if the device is not
connected to an AC power supply. This prevents draining the battery when hashing
file contents.

* Changes to CLI:

* Moved linking and unlinking to a new command group `maestral auth` with subcommands
`link`, `unlink` and `status`.
* Renamed the command `file-status` to `filestatus`.
* Added a `--yes, -Y` flag to the `unlink` to command to skip the confirmation prompt.
* Renamed the `configs` command to list config files to `config-files`.
* Added an option `--clean` to `config-files` to remove all stale config files (those
without a linked Dropbox account).

* Improved the error message when the user is running out of inotify watches: Recommend
default values of `max_user_watches = 524288` and `max_user_instances = 1024` or
double the current values, whichever is higher. Advise to apply the changes with
`sysctl -p`.

#### Fixed:

* Fixes an issue with the CLI on Python 3.6 where commands that print dates to the console
would raise an exception.
* Properly handle a rare OSError "[Errno 41] Protocol wrong type for socket" on macOS,
see https://bugs.python.org/issue33450.
* Allow creating local files even if we cannot set their permissions, for instances on
some mounted NTFS drives.
* Fixes an issue with the selective sync dialog in the Qt / Linux GUI where the "Update"
button could be incorrectly enabled or disabled.
* Fixes an issue where a lost internet connection while starting the sync could lead to
a stuck sync thread or an endless indexing cycle.
* Fixes an issue where a lost internet connection during the download of a folder newly
included in selective sync could result in the download never being completed.
* Fixes an issue where pausing the sync during the download of a folder newly included
in selective sync could result in the download never being completed.

#### Removed:

* Removed automatic error reporting via bugsnag.
* Removed from CLI:

* The `maestral restart` command. Use `stop` and `start` instead.
* The `maestral account-info` command. Use `maestral auth status` instead.
å
* Removed the public API methods `Maestral.resume_sync` and `Maestral.pause_sync`. Use
`Maestral.start_sync` and `Maestral.stop_sync` instead.

#### Dependencies:

* Bumped survey to version >=3.2.2,<4.0.
* Bumped keyring to version >=22.
* Bumped watchdog to version >= 2.0.
* Added `desktop-notifier` dependency. This is spin-off project from Maestral, built on
the code previously in the `notify` module.
* Removed the bugsnag dependency.

## v1.3.1

#### Fixes:
#### Fixed:

* Fixes an incorrect entry point for the Qt GUI.

Expand All @@ -25,7 +143,7 @@ series of bug fixes for GUI and daemon.
#### Changed:

* Significant improvements to the command line interface:
* Overhauled all CLI dialogs with nicer formatting and more interactive prompts
* Overhauled all CLI dialogs with nicer formatting and more interactive prompts
using the `survey` package.
* Improved output of many CLI commands, including `ls`, `activity`, and `restore`.
* Increased speed of many CLI commands by importing only necessary modules.
Expand All @@ -42,7 +160,7 @@ series of bug fixes for GUI and daemon.
* The `Maestral.excluded_items` property is no longer read-only.
* Some refactoring of the `cli` module to prepare for shell completion support.

#### Fixes:
#### Fixed:

* Fixes an issue where all newly downloaded files would be created with 755 permissions.
They are now created with the user's default permissions for new files instead.
Expand All @@ -55,10 +173,10 @@ series of bug fixes for GUI and daemon.
* Fixes possible loss of data when excluding an item from syncing while it is
downloaded. This is no longer possible and will raise a `BusyError` instead.
* Fixes an issue where `maestral ls` would fail when run with the `-l, --long` flag.
* Fixes an occasional `IndexError` during a download sync when trying to query past
* Fixes an occasional `IndexError` during a download sync when trying to query past
versions of a deleted item.
* Fixes an issue which could cause a segfault of the selective sync dialog on macOS.
* Fixes an issue where the selective sync dialog on Linux would not load the contents of
* Fixes an issue where the selective sync dialog on Linux would not load the contents of
more than 10 folders.
* Fixes a regression with the autostart functionality of the Linux GUI. Autostart
entries created with v1.2.2 will need be reset by toggling the checkbox "start on
Expand Down Expand Up @@ -94,7 +212,7 @@ series of bug fixes for GUI and daemon.
This release focuses on bug fixes and performance improvements. In particular, memory
usage has been improved when syncing a Dropbox folder with a large number of items.

#### Changes:
#### Changed:

- `maestral file-status` now accepts relative paths.
- Runs the daemon in a Python interpreter with -OO flags. This strips docstrings and saves
Expand All @@ -112,7 +230,7 @@ usage has been improved when syncing a Dropbox folder with a large number of ite
- Switch from PyInstaller to [briefcase](https://github.com/beeware/briefcase) for
packaging on macOS.

#### Fixes:
#### Fixed:

- Fixes an issue which would prevent the daemon from starting on macOS when running with
Python 3.6.
Expand Down Expand Up @@ -155,7 +273,7 @@ full compatibility from macOS 10.13 High Sierra to macOS 11.0 Big Sur.
- Improves log messages when the connection to Dropbox is lost.
- Performance improvements to `maestral activity` in case of very large sync queues.

#### Fixes:
#### Fixed:

- Fixes a database integrity error due to an unfulfilled unique constraint.
- Fixes an issue when the daemon is launched with systemd where systemd would unexpectedly
Expand Down
42 changes: 32 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

## Guidelines
### Code

To start, install maestral with the `dev` extra to get all dependencies required for
development:
Expand All @@ -8,7 +8,8 @@ development:
pip3 install maestral[dev]
```

### Checking the Format, Coding Style, and Type Hints
This will install packages to check and enforce the code style, use pre-commit hooks and
bump the current version.

Code is formatted with [black](https://github.com/psf/black).
Coding style is checked with [flake8](http://flake8.pycqa.org).
Expand All @@ -23,7 +24,8 @@ pre-commit run -a
```

You can also install the provided pre-commit hook to run checks on every commit. This
will however significantly slow down commits.
will however significantly slow down commits. An introduction to pre-commit commit hooks
is given at [https://pre-commit.com](https://pre-commit.com).

### Documentation

Expand All @@ -40,7 +42,7 @@ pip3 install maestral[docs]
The API documentation is mostly based on doc strings. Inline comments should be used
whenever code may be difficult to understand for others.

## Tests
### Tests

The test suite uses a mixture of [unittest](https://docs.python.org/3.8/library/unittest.html)
and [pytest](https://pytest-cov.readthedocs.io/en/latest/), depending on what is most
Expand All @@ -56,10 +58,30 @@ indexing and cleaning up sync events, and for particularly complex functions tha
prone to regressions.

The current test suite uses a Dropbox access token provided by the environment variable
`DROPBOX_TOKEN` to connect to a real account. The GitHub action which is running the
tests will set this environment variable for you with a temporary access token that
`DROPBOX_ACCESS_TOKEN` or a refresh token provided by `DROPBOX_REFRESH_TOKEN` to connect
to a real account. The GitHub action which is running the tests will set the
`DROPBOX_ACCESS_TOKEN` environment variable for you with a temporary access token that
expires after 4 hours. Tests are run on `ubuntu-latest` and `macos-latest` in parallel
on different accounts and you should acquire a "lock" on the account before running
tests. Fixtures to create and clean up a test config and to acquire a lock are provided
in the `tests/linked/conftest.py`. If you run the tests locally, you will need to
provide an access token for your own Dropbox account.
on different accounts.

When using the GitHub test runner, you should acquire a "lock" on the account before
running tests to prevent them from interfering which each other by creating a folder
`test.lock` in the root of the Dropbox folder. This folder should have a
`client_modified` time set in the future, to the expiry time of the lock. Fixtures to
create and clean up a test config and to acquire a lock are provided in the
`tests/linked/conftest.py`.

If you run the tests locally, you will need to provide a refresh or access token for
your own Dropbox account. If your account is already linked with Maestral, it will have
saved a long-lived "refresh token" in your system keyring. You can access it manually or
through the Python API:

```Python
from maestral.main import Maestral

m = Maestral()
print(m.client.auth.refresh_token)
```

You can then store the retrieved refresh token in the environment variable
`DROPBOX_REFRESH_TOKEN` to be automatically picked up by the tests.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ or downloading a file if it already exists with the same content locally or in t

## Warning

- Never sync a folder with both the official Dropbox client and Maestral at the same time.
- Never sync a local folder with both the official Dropbox client and Maestral at the same
time.
- Network drives and some external hard drives are not supported as locations for the
Dropbox folder.

Expand Down Expand Up @@ -167,6 +168,22 @@ month to offset the cost of an Apple Developer account to sign and notarize the

# Acknowledgements

Maestral directly uses code from the following projects:

- The config module uses code from the [Spyder IDE](https://github.com/spyder-ide)
- The DropboxClient is inspired by work from [Orphilia](https://github.com/ksiazkowicz/orphilia-dropbox)
- Error reporting is powered by bugsnag.
- The DropboxClient module is inspired by work from [Orphilia](https://github.com/ksiazkowicz/orphilia-dropbox)

It also would not be possible without the following excellent Python packages:

- Communication between sync daemon and frontends uses [Pyro5](https://github.com/irmen/Pyro5).
- The command line interface is built with [click](https://github.com/pallets/click) and
uses beautiful interactive prompts by [survey](https://github.com/Exahilosys/survey).
- The Cocoa GUI is built using [toga](https://github.com/beeware/toga) and the macOS app
bundle is built using [briefcase](https://github.com/beeware/briefcase), both part of
the [beeware](https://beeware.org) project for writing cross-platform Python applications.
- Credential storage uses system keychains via [keyring](https://github.com/jaraco/keyring).
- [watchdog](https://github.com/gorakhargosh/watchdog) allows us to receive local file
system events.
- Error reporting is generously provided by [bugsnag](https://www.bugsnag.com).
- Many more well known libraries that have become the backbone of Python projects
such as requests, sqlalchemy, etc.
Loading