Skip to content

Commit

Permalink
lfs
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-ya committed May 18, 2024
1 parent 741eaca commit 2be2967
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 149 deletions.
129 changes: 0 additions & 129 deletions outpostcli/lfs/client.py

This file was deleted.

20 changes: 3 additions & 17 deletions outpostcli/lfs/commands.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,25 @@
# ref: https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/commands/lfs.py
import json
import logging
import os
import subprocess
import sys
from typing import Dict, Optional

import click
from outpostkit.repository.lfs.logger import create_lfs_logger
from outpostkit.repository.lfs.transfer import MultipartTransferAdapter

from outpostcli.constants import CLI_BINARY_NAME
from outpostcli.lfs.utils import HTTPException
from outpostcli.utils import click_group

# from huggingface_hub.commands import BaseHuggingfaceCLICommand
# from huggingface_hub.lfs import LFS_MULTIPART_UPLOAD_COMMAND, SliceFileObj
# from ..utils import get_session, hf_raise_for_status, logging

# logger = logging.get_logger(__name__)

_log = logging.getLogger(__name__)
_log.handlers.clear()
file_handler = logging.FileHandler(
"./lfs_command.log", # maybe create a config dir at home, ~/.outpost
)
file_handler.setFormatter(
logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
)
_log.addHandler(file_handler)


@click_group()
def lfs():
pass


_log = create_lfs_logger(__name__)
MULTIPART_UPLOAD_COMMAND_NAME = "multipart-upload"
LFS_MULTIPART_UPLOAD_COMMAND = f"lfs {MULTIPART_UPLOAD_COMMAND_NAME}"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = { file = "LICENSE" }
authors = [{ name = "Outpost Innovations, Inc." }]
requires-python = ">=3.8"
dependencies = [
"outpostkit>=0.0.64",
"outpostkit>=0.0.66",
"click",
"rich",
"requests",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mdurl==0.1.2
# via markdown-it-py
mypy-extensions==1.0.0
# via black
outpostkit==0.0.64
outpostkit==0.0.66
# via outpostcli (pyproject.toml)
packaging==23.2
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
outpostkit==0.0.64
outpostkit==0.0.66
# via outpostcli (pyproject.toml)
packaging==23.2
# via outpostkit
Expand Down

0 comments on commit 2be2967

Please sign in to comment.