cannabis_results / dev /readme.md
keeganskeate's picture
latest-2024-08-11 (#6)
d1ae506 verified

cannabis_results Developer Documentation

Cloning the Dataset

Install Git Large File Storage (LFS):

git lfs install

Clone the repository:

git clone https://huggingface.co/datasets/cannlytics/cannabis_results

Testing a Dataset

You can load the dataset locally for testing with the loading script:

from datasets import load_dataset

# Load the dataset.
dataset = load_dataset('cannabis_results.py', 'ca')
data = dataset['data']
assert len(data) > 0
print('Read %i data points.' % len(data))

Updating the Dataset

When you want to make a pull request to a specific dataset, first, create a pull request branch on Hugging Face, then checkout the branch, e.g.:

git fetch origin refs/pr/2:pr/2
git checkout pr/2

Next, do your modifications and track all of your changes, including any large data files, e.g. .csv files:

git lfs track *.csv
git add *.csv
git commit -m "Added all `.csv` files"
git lfs track *.xlsx
git add *.xlsx
git commit -m "Added all `.xlsx` files"
git lfs track *.zip
git add *.zip
git commit -m "Added all `.zip` files"
git add --all
git status
git commit -m "Updated `cannabis_results` dataset."

Finally, make the pull request:

git push origin pr/x:refs/pr/x

🎉 Congratulations, your pull request is now ready to be reviewed and merged by the repository admin!