Skip to content

Commit 5c39639

Browse files
authored
contribution.rst dropbox/maestral (#243)
* contribution.rst dropbox/maestral Now recommending Dropboxignore & its `.dropboxignore` file in conjunction w/ `.mignore` (Dropbox/Maestral) * line too long
1 parent 10aae35 commit 5c39639

File tree

1 file changed

+41
-28
lines changed

1 file changed

+41
-28
lines changed

docs/Contribution.rst

+41-28
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ notify you of most issues before you commit.
112112
We provide a ``.devcontainer.json`` file that allows you to develop locally
113113
using VSCode and the repository's Docker image (it should not be too hard to
114114
adapt this file to other IDEs). In order to use it, you will need to install
115-
the `Remote - Containers` extension.
115+
the ``Remote - Containers`` extension.
116116

117117
.. code-block:: bash
118118
@@ -133,9 +133,10 @@ There are so far two small pain points:
133133

134134
- The esbonio server will sometimes announce a build error (bottom right),
135135
which will prevent further documentation visualization. To fix this, you
136-
should delete the contents of the ``docs/_build`` (do not delete the folder
137-
itself if you use Dropbox/Maestral) and ``docs/_autosummary`` folders and
138-
and restart the esbonio server (by pressing its icon).
136+
should delete the contents of the ``docs/_build`` and ``docs/_autosummary``
137+
folders and restart the esbonio server by pressing its icon. If you use
138+
Dropbox/Maestral, make sure to re-run ``dropboxignore <DROPBOX_PATH>/.``
139+
else the folders will start synchronizing again. See below.
139140

140141
GitHub Copilot is installed in the DevContainer. Simply discard the log-in
141142
notifications if you do not want to make use of it.
@@ -234,15 +235,16 @@ by pressing the ``esbonio`` button on the bottom right of the editor and then
234235
opening the locally created ``.html`` files.
235236

236237
Setting up Maestral/Dropbox to move code across machines
237-
-----------------------------------------------------------
238+
--------------------------------------------------------
238239

239240
Rather than having to manually move code across machines, we suggest that you
240-
use a Dropbox folder to automatically sync your code across machines.
241+
use a Dropbox folder to automatically sync your code across machines. This is
242+
especially useful when making small config/code changes on any machine.
241243

242-
On machines where you have root access, you can simply install Dropbox.
243-
On machines where you do not have root access, you can install Maestral as a
244-
drop-in replacement for Dropbox (Make sure not to install both Dropbox and
245-
Maestral on the same machine).
244+
On machines where you have GUI & root access, you can simply install Dropbox.
245+
On other machines, you can install Maestral as a drop-in replacement for
246+
Dropbox (Make sure not to install both Dropbox and Maestral on the same
247+
machine).
246248

247249
.. code-block:: bash
248250
@@ -256,13 +258,13 @@ your account?**
256258

257259
Choose: **Print auth URL to console**
258260

259-
Open the URL and press Allow.
261+
Open the URL and press **Allow**.
260262

261263
Copy the code that appears in the browser.
262264

263-
**Enter the auth code:** Paste.
265+
**Enter the auth code:** (paste).
264266

265-
**Please choose a local Dropbox folder:** ``/scratch/<USER>/Dropbox``
267+
**Please choose a local Dropbox folder:** ``<DROPBOX_PATH>``
266268

267269
Would you like sync all folders? **No**
268270

@@ -280,26 +282,16 @@ synchronization by running:
280282
python -m maestral status
281283
282284
Finally, there are some files that you probably do not want to sync across
283-
all machines. On a machine with Dropbox, run:
285+
all machines. On a machine with Dropbox, first install Dropboxignore:
284286

285287
.. code-block:: bash
286288
287-
mkdir -p data/ docs/_build/ .vscode/ .coverage
288-
mkdir -p .mypy_cache/ .pytest_cache/ .ruff_cache/
289-
sudo attr -s com.dropbox.ignored -V 1 data/
290-
sudo attr -s com.dropbox.ignored -V 1 docs/_build/
291-
sudo attr -s com.dropbox.ignored -V 1 .vscode/
292-
sudo attr -s com.dropbox.ignored -V 1 .coverage
293-
sudo attr -s com.dropbox.ignored -V 1 .mypy_cache/
294-
sudo attr -s com.dropbox.ignored -V 1 .pytest_cache/
295-
sudo attr -s com.dropbox.ignored -V 1 .ruff_cache/
289+
snap install dropboxignore
296290
297-
On a machine with Maestral, edit your `.mignore` file to exclude the files you
298-
do not want to sync.
291+
Create a ``.dropboxignore`` file in your root Dropbox folder with the
292+
following content:
299293

300-
Example of the contents of a `.mignore` file:
301-
302-
.. code-block:: python
294+
.. code-block:: bash
303295
304296
/cneuromax/.mypy_cache/
305297
/cneuromax/.pytest_cache/
@@ -309,6 +301,27 @@ Example of the contents of a `.mignore` file:
309301
/cneuromax/docs/_build/
310302
/cneuromax/docs/_autosummary/
311303
304+
To apply the changes run:
305+
306+
.. code-block:: bash
307+
308+
dropboxignore ignore <DROPBOX_FOLDER>
309+
310+
.. note::
311+
312+
Make sure to re-run this command whenever you delete any of those folders.
313+
314+
Copy the ``.dropboxignore`` file to work for Maestral:
315+
316+
.. code-block:: bash
317+
318+
cp <DROPBOX_PATH>/.dropboxignore <DROPBOX_PATH>/.mignore
319+
320+
.. note::
321+
322+
Do not create a symbolic link else the ``.mignore`` file will not be
323+
synchronized across devices.
324+
312325
Freezing the repositories for publication
313326
-----------------------------------------
314327

0 commit comments

Comments
 (0)