Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jasinliu committed Oct 25, 2024
1 parent 5125d9c commit 9e35d48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
libparquet-dev
sudo apt-get install -y ccache libcurl4-openssl-dev
- name: Install GraphAr CLI
- name: Install GraphAr CLI and Run Tests
working-directory: "cli"
run: |
pip install ./ -v
Expand Down
5 changes: 3 additions & 2 deletions cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ project(
${SKBUILD_PROJECT_NAME}
VERSION ${SKBUILD_PROJECT_VERSION}
LANGUAGES CXX)

set(CMAKE_CXX_FLAGS "-g -std=c++17 -lstdc++fs")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../cpp ${CMAKE_BINARY_DIR}/graphar)

# Find the module development requirements (requires FindPython from 3.17 or
Expand All @@ -36,7 +36,8 @@ find_package(pybind11 CONFIG REQUIRED)
# Add a library using FindPython's tooling (pybind11 also provides a helper like
# this)
python_add_library(_core MODULE src/main.cc WITH_SOABI)
target_link_libraries(_core PRIVATE pybind11::headers graphar)

target_link_libraries(_core PRIVATE pybind11::headers graphar stdc++fs)
target_include_directories(_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/src)
target_include_directories(_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/thirdparty)
Expand Down
7 changes: 4 additions & 3 deletions cli/src/graphar_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GraphArConfig(BaseModel):

@field_validator("path")
def check_path(cls, v):
path = Path(v)
path = Path(v).resolve().absolute()
if not path.exists():
path.mkdir(parents=True, exist_ok=True)
elif any(path.iterdir()):
Expand Down Expand Up @@ -94,8 +94,9 @@ class Source(BaseModel):

@field_validator("path")
def check_path(cls, v):
if not Path(v).is_file():
msg = f"{v} is not a file."
path = Path(v).resolve().absolute()
if not path.is_file():
msg = f"'{path}' is not a file."
raise ValueError(msg)
return v

Expand Down

0 comments on commit 9e35d48

Please sign in to comment.