Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Add Makefile #110

Closed
wants to merge 4 commits into from
Closed

Add Makefile #110

wants to merge 4 commits into from

Conversation

sjackman
Copy link
Collaborator

@sjackman sjackman commented Jul 30, 2020

make check downloads the test data from https://github.com/10XGenomics/enclone-data before running cargo test. It's effectively a substitute for a Git submodule. We are avoiding using Git submodule here due to this open Cargo bug: git submodules are not cached rust-lang/cargo#7987

This PR is a draft, because it depends on adding the data to https://github.com/10XGenomics/enclone-data and remove the data from this repo.

@sjackman sjackman self-assigned this Jul 30, 2020
@sjackman sjackman added the enhancement New feature or request label Jul 30, 2020
@sjackman
Copy link
Collaborator Author

sjackman commented Jul 30, 2020

Extract the test data from the enclone Git repo and create a new repo enclone-data. Store the test data using Git LFS.

all: enclone-orig enclone-code enclone-data

.DELETE_ON_ERROR:
.SECONDARY:
.PHONY: enclone-code enclone-data enclone-orig

# Clone the original Encode Git repository.
enclone-orig:
	git clone --single-branch https://github.com/10XGenomics/enclone enclone-orig

# Extract the code.
# Note:
# The large files enclone/src/english_wordlist and img/enclone_annotated_example.svg are not retained.
# GitHub Pages does not support LFS.
enclone-code:
	git clone --reference=enclone-orig https://github.com/10XGenomics/enclone enclone-code
	git -C enclone-code filter-repo --invert-paths --path=enclone/test --path=enclone_main/test --path=test --path=releases --path=enclone/src/english_wordlist --path=src/english_wordlist --path=img/enclone_annotated_example.svg
	git -C enclone-code lfs migrate info --include-ref=master --above=1MB
	git -C enclone-code rev-list --objects master \
	| git -C enclone-code cat-file --batch-check='%(objectname) %(objecttype) %(objectsize) %(rest)' \
	| awk '$$2 == "blob" && $$3 >= 1000000 { print substr($$1, 1, 7), $$3, $$4; fail=1 } END { exit fail }'

# Extract the test data.
enclone-data:
	git clone --reference=enclone-orig https://github.com/10XGenomics/enclone enclone-data
	git -C enclone-data filter-repo --subdirectory-filter=enclone/test --subdirectory-filter=enclone_main/test --subdirectory-filter=test
	git -C enclone-data lfs migrate info --include-ref=master -I'*.bin,*.h5,*.lz4,projection.csv'
	git -C enclone-data lfs migrate import --include-ref=master -I'*.bin,*.h5,*.lz4,barcodes.tsv.gz,matrix.mtx.gz,projection.csv'
	git -C enclone-data lfs migrate info --include-ref=master --above=1MB
	git -C enclone-data rev-list --objects master \
	| git -C enclone-data cat-file --batch-check='%(objectname) %(objecttype) %(objectsize) %(rest)' \
	| awk '$$2 == "blob" && $$3 >= 1000000 { print substr($$1, 1, 7), $$3, $$4; fail=1 } END { exit fail }'

Makefile Outdated Show resolved Hide resolved
@sjackman sjackman force-pushed the sj/makefile branch 3 times, most recently from aa8c567 to 3bbe821 Compare July 31, 2020 22:08
@sjackman sjackman closed this Aug 12, 2020
@sjackman sjackman deleted the sj/makefile branch August 12, 2020 19:19
@sjackman
Copy link
Collaborator Author

Superseded by PR #120

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants