Skip to content

Commit

Permalink
purge git lfs from repo
Browse files Browse the repository at this point in the history
  • Loading branch information
DSilva27 committed Aug 6, 2024
2 parents 9ab6a4e + a4e0f9e commit d1bd73e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
4 changes: 0 additions & 4 deletions .gitattributes

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,30 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies

- name: Install Git LFS
run: |
sudo apt-get update
sudo apt-get install git-lfs
git lfs install
- name: Pull LFS Files
run: git lfs pull
- name: Cache test data
id: cache_test_data
uses: actions/cache@v3
with:
path: |
tests/data
data
key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest omegaconf
- name: Get test data from OSF
if: ${{ steps.cache_test_data.outputs.cache-hit != 'true' }}
run: |
sh tests/scripts/fetch_test_data.sh
- name: Test with pytest
run: |
pytest tests/test_preprocessing.py
pytest tests/test_svd.py
pytest tests/test_map_to_map.py
pytest tests/test_distribution_to_distribution.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ data/dataset_1_submissions
data/dataset_2_ground_truth

# data for testing and resulting outputs
tests/data/Ground_truth
tests/data/dataset_2_submissions/
tests/data/unprocessed_dataset_2_submissions/submission_x/
tests/results/


Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.4
Expand Down
12 changes: 12 additions & 0 deletions tests/scripts/fetch_test_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mkdir -p tests/data/dataset_2_submissions tests/data/dataset_2_submissions tests/results tests/data/unprocessed_dataset_2_submissions/submission_x tests/data/Ground_truth/ tests/data/Ground_truth
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/tests/dataset_2_submissions/test_submission_0_n8.pt?download=true -O tests/data/dataset_2_submissions/test_submission_0_n8.pt
ADIR=$(pwd)
ln -s $ADIR/tests/data/dataset_2_submissions/test_submission_0_n8.pt $ADIR/tests/data/dataset_2_submissions/submission_0.pt # symlink for svd which needs submission_0.pt for filename
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/tests/Ground_truth/test_maps_gt_flat_10.pt?download=true -O tests/data/Ground_truth/test_maps_gt_flat_10.pt
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/tests/Ground_truth/test_metadata_10.csv?download=true -O tests/data/Ground_truth/test_metadata_10.csv
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/tests/Ground_truth/1.mrc?download=true -O tests/data/Ground_truth/1.mrc
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/mask_dilated_wide_224x224.mrc?download=true -O tests/data/Ground_truth/mask_dilated_wide_224x224.mrc
for FILE in 1.mrc 2.mrc 3.mrc 4.mrc populations.txt
do
wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/tests/unprocessed_dataset_2_submissions/submission_x/${FILE}?download=true -O tests/data/unprocessed_dataset_2_submissions/submission_x/${FILE}
done
4 changes: 2 additions & 2 deletions tutorials/1_tutorial_preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"# Select path to Config file\n",
"# An example of this file is available in the path ../config_files/config_preproc.yaml\n",
"config_preproc_path = FileChooser(os.path.expanduser(\"~\"))\n",
"config_preproc_path.filter_pattern = \"*.yaml\"\n",
"config_preproc_path.filter_pattern = '*.yaml'\n",
"display(config_preproc_path)"
]
},
Expand All @@ -265,7 +265,7 @@
"if os.path.isabs(output_path):\n",
" full_output_path = output_path\n",
"else:\n",
" full_output_path = os.path.join(os.getcwd(), \"..\", output_path)"
" full_output_path = os.path.join(os.getcwd(), '..', output_path)"
]
},
{
Expand Down

0 comments on commit d1bd73e

Please sign in to comment.