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

Set up git-lfs and track relevant files #315

Merged
merged 9 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Track all images through git-lfs
*.webp filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
# but keep the brand images as regular images
docs/assets/brand/logo-**/* !filter !diff !merge binary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavithraes Found the issue. You reset the type to text here, which led to the files being compared as text although they are binaries.

13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ build:
python: "mambaforge-22.9"
jobs:
post_checkout:
# Check out the full depth for setuptools-scm
- git fetch --unshallow || true
# Check out git-lfs files
# See https://docs.readthedocs.io/en/stable/build-customization.html#support-git-lfs-large-file-storage
- wget
https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz
- tar xvfz git-lfs-linux-amd64-v3.4.0.tar.gz
- ln -s git-lfs-3.4.0/git-lfs git-lfs
- git config filter.lfs.process "`pwd`/git-lfs filter-process"
- git config filter.lfs.smudge "`pwd`/git-lfs smudge -- %f"
- git config filter.lfs.clean "`pwd`/git-lfs clean -- %f"
- ./git-lfs install
- ./git-lfs fetch
- ./git-lfs checkout

mkdocs:
configuration: mkdocs.yml
Expand Down
23 changes: 23 additions & 0 deletions docs/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,29 @@ mkdocs serve

This serves the docs website at [http://127.0.0.1:8000](http://127.0.0.1:8000).

### View, add, or update images

Ragna tracks most image files with [`git-lfs`](https://git-lfs.com).

As a first-time user of `git-lfs`, set it up with:

```bash
git lfs install
```

To pull all image files to your local repository, run:

```bash
git lfs pull
```

All new or updated images will be tracked by `git-lfs`. To verify the files being
tracked, run:

```bash
git lfs ls-files
```

## Contribution best practices

- Before opening new issues, go through the tracker to ensure there aren't any previous
Expand Down
Binary file modified docs/how-tos/images/ragna-config-wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- python =3.9
- pip
- git-lfs
- pip:
- python-dotenv
- boto3
Expand Down
Loading