Skip to content

update dataset_list.toml, adding list_datasets #298

update dataset_list.toml, adding list_datasets

update dataset_list.toml, adding list_datasets #298

Workflow file for this run

name: CI Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Upload dapper binary
uses: actions/upload-artifact@v4
with:
name: dapper-binary-${{ runner.os }}
path: |
target/debug/dapper${{ matrix.os == 'windows-latest' && '.exe' || '' }}
- name: Run tests
run: cargo test --verbose
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: |
cargo clippy --version
cargo clippy -- -D warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: |
cargo fmt --version
cargo fmt -- --check
python-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
working-directory: python
- name: Run pytest
run: python -m pytest
working-directory: python
fetching-dataset-test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download dapper dataset
uses: actions/download-artifact@v4
with:
name: dapper-binary-${{ runner.os }}
path: target/debug/
- name: Make binary executable
run: chmod +x target/debug/dapper
- name: Download and Extract dataset
run: |
# Initilating XDG directory
mkdir -p $HOME/.local/share/dapper
# Download Linux package database
curl -L -o /tmp/debian-buster-v1.db.zip "https://huggingface.co/datasets/dapper-datasets/debian-buster/resolve/v1/debian-buster-v1.db.zip"
unzip /tmp/debian-buster-v1.db.zip -d /tmp/
mv /tmp/debian-buster-v1.db $HOME/.local/share/dapper/LinuxPackageDB.db
rm /tmp/debian-buster-v1.db.zip
# Download PyPI package database
curl -L -o /tmp/pypi-v1.db.zip "https://huggingface.co/datasets/dapper-datasets/pypi/resolve/v1/pypi-v1.db.zip"
unzip /tmp/pypi-v1.db.zip -d /tmp/
mv /tmp/PyPIPackageDB.db $HOME/.local/share/dapper/PyPIPackageDB.db
rm /tmp/pypi-v1.db.zip
- name: Test Dapper with downloaded artifact
run: |
mkdir -p /tmp/test-files
echo '#include <iostream>' > /tmp/test-files/test.cpp
./target/debug/dapper /tmp/test-files