Skip to content

Commit

Permalink
Merge pull request #443 from toriapetrova/main
Browse files Browse the repository at this point in the history
Update LFS article
  • Loading branch information
Brilator authored Aug 6, 2024
2 parents 087d5ce + d631cfb commit 31dba0d
Show file tree
Hide file tree
Showing 8 changed files with 324 additions and 6 deletions.
36 changes: 30 additions & 6 deletions src/docs/guides/arc_WorkingWithLargeDataFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,33 @@ In this guide we show you how you can actively handle large data files in your A

## Large File Storage (LFS)

ARCs and the DataHUB come with a mechanism to sync and store large files called *Large File Storage (LFS)*. LFS is an efficient way to store your large data files. These files are called "LFS objects". Rather than checking every file during every `arc sync`, the ARCitect or ARC Commander first checks *wether there was a change at all*. And only if this is the case, it scans *what* was changed. This way it saves time and computing power compared to always scanning all large files for possible changes.
ARCs and the DataHUB come with a mechanism to sync and store large files called *Large File Storage (LFS)*. LFS is an efficient way to store your large data files. These files are called "LFS objects". Rather than checking every file during every `arc sync` (ARC Commander) or DataHUB Sync (ARCitect), the tools first check *whether there was a change at all*. And only if this is the case, it scans *what* was changed. This way it saves time and computing power compared to always scanning all large files for possible changes.

### ARCitect

- The ARCitect offers to activate or deactivate the use of LFS via checkboxes in the "Download" as well as the "DataHUB sync" menus, respectively.
- In addition you can set a threshold for what you consider a large file in the "Commit" menu.
- Finally, you can individually download large files via right-click -> "Download LFS File"
The ARCitect offers to activate or deactivate the use of LFS:
- in the "Download ARC" (1) menu via the "LFS" checkbox (2)

<img src="./../img/ARCitect-download-lfs.drawio.svg" style="width:100%;display: block;margin: auto; padding: 30px 0px;">

- as well as in the "DataHUB Sync" menu (1) via the "Use Large File Storage" checkbox (2), which are available once an ARC has been open in ARCitect.

<img src="./../img/ARCitect-datahub-sync-lfs.drawio.svg" style="width:100%;display: block;margin: auto;padding: 30px 0px;">

In addition you can set a threshold (2) in megabytes (MB) for what you consider a large file in the "Commit" menu (1).

<img src="./../img/ARCitect-lfs-threshold.drawio.svg" style="width:100%;display: block;margin: auto;padding: 30px 0px;">

Finally, you can individually download large files via right-click -> "Download LFS File" (1)

<img src="./../img/ARCitect-download-lfs-file-right-click.drawio.svg" style="width:100%;display: block;margin: auto;padding: 30px 0px;">

### ARC Commander

By default, the ARC Commander tracks the following files via LFS:

1. All files stored in an assay's `dataset` folder, and
2. All files with a size larger than 150 MB.
2. All files with a size larger than 150 MB.

The threshold of 150 MB can easily be adjusted using the ARC Commander. For instance, if you want to decrease it to 5 MB (i.e. 5000000 bytes), run

Expand All @@ -68,7 +82,12 @@ git add .gitattributes
```

4. Sync your ARC to the DataHUB via `arc sync`
5. Open your ARC in the DataHUB and navigate to the folder with LFS objects and see them flagged as "LFS".
5. Open your ARC in the DataHUB and navigate to the folder with LFS objects and see them flagged as "LFS" (1).
<img src="./../img/ARCitect-lfs-flagged.drawio.svg" style="width:100%;display: block;margin: auto;padding: 30px 0px;">


:warning: Please avoid uploading large files without [git LFS](https://git-lfs.github.com/) (i.e. accidentally with pure git, when git-lfs is not available).


#### Downloading an ARC without large data files

Expand Down Expand Up @@ -105,3 +124,8 @@ If at some point you wish to download **all** LFS files of your ARC, you can use
```bash
git lfs pull --include "*"
```

#### Checking usage quota of LFS

If at some point you would like to check how much free storage you have for your ARC, you can easily do so by navigating to your ARC in the DataHUB and clicking on "Project Storage" in the right sidebar (1).
<img src="./../img/ARCitect-lfs-project-storage.drawio.svg" style="width:100%;display: block;margin: auto; padding: 30px 0px;">
56 changes: 56 additions & 0 deletions src/docs/img/ARCitect-datahub-sync-lfs.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/docs/img/ARCitect-download-lfs-file-right-click.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions src/docs/img/ARCitect-download-lfs.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/docs/img/ARCitect-lfs-flagged.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/docs/img/ARCitect-lfs-project-storage.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/docs/img/ARCitect-lfs-project-storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions src/docs/img/ARCitect-lfs-threshold.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 31dba0d

Please sign in to comment.