Skip to content

Commit

Permalink
cli, reconstruction and changed CI/CD pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Nov 16, 2024
1 parent f5bd1c7 commit 52f295e
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 517 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest black pipreqs pip-tools
pip install -r requirements.txt
python3 update.py
pip install .
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -d/ -f3)" >> $GITHUB_ENV
Expand Down
21 changes: 21 additions & 0 deletions corkit/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import argparse
import asyncio
from .dataset import update

def main():
parser = argparse.ArgumentParser(
description="Corkit CLI dataset update manager."
)
parser.add_argument(
"--batch-size",
type=int,
default=100,
help="Batch size for dataset updates (default: 10)"
)
args = parser.parse_args()

try:
asyncio.run(update(batch_size=args.batch_size))
print("Datasets updated successfully.")
except Exception as e:
print(f"Error during dataset update: {e}")
Loading

0 comments on commit 52f295e

Please sign in to comment.