-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix usage of gdown and add --no-upsert flag
- Loading branch information
Showing
3 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
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 | ||
|
||
setup_logging() | ||
|
||
if __name__ == "__main__": | ||
def main(no_upsert): | ||
setup_logging() | ||
setup_pinecone() | ||
download_dataset() | ||
process_dataset() | ||
upsert_data() | ||
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.') | ||
|
||
args = parser.parse_args() | ||
|
||
main(no_upsert=args.no_upsert) |