Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas committed Jun 17, 2024
1 parent 6e4dcd1 commit 49ae495
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pypi_scout/scripts/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import argparse

from pypi_scout.scripts.download_dataset import download_dataset
from pypi_scout.scripts.process_dataset import process_dataset
from pypi_scout.scripts.setup_pinecone import setup_pinecone
from pypi_scout.scripts.upsert_data import upsert_data
from pypi_scout.utils.logging import setup_logging


def main(no_upsert):
setup_logging()
setup_pinecone()
Expand All @@ -13,10 +15,11 @@ def main(no_upsert):
if not no_upsert:
upsert_data()


if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run the setup script with optional flags.")
parser.add_argument('--no-upsert', action='store_true', help='If set, do not upsert data to the Pinecone database.')
parser.add_argument("--no-upsert", action="store_true", help="If set, do not upsert data to the Pinecone database.")

args = parser.parse_args()

main(no_upsert=args.no_upsert)

0 comments on commit 49ae495

Please sign in to comment.