Skip to content

Commit

Permalink
Import lsdb ASAP. (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu authored Apr 26, 2024
1 parent fe8ad8d commit 7bf2d94
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11.8']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11.8']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
Expand Down
43 changes: 43 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import os

import hipscat as hc
import lsdb
import pytest
import shortuuid
from hipscat.io.file_io import file_io

from hipscat_cloudtests.temp_cloud_directory import TempCloudDirectory

SMALL_SKY_XMATCH_NAME = "small_sky_xmatch"
XMATCH_CORRECT_FILE = "xmatch_correct.csv"

ALMANAC_DIR_NAME = "almanac"
SMALL_SKY_DIR_NAME = "small_sky"
SMALL_SKY_ORDER1_DIR_NAME = "small_sky_order1"
Expand Down Expand Up @@ -113,3 +119,40 @@ def tmp_cloud_path(request, tmp_dir_cloud):
# Strip out the "test_" at the beginning of each method name, make it a little
# shorter, and add a disambuating UUID.
return f"{tmp_dir_cloud}/{name[5:25]}_{my_uuid}"


@pytest.fixture
def small_sky_xmatch_dir_cloud(cloud_path):
return os.path.join(cloud_path, "data", SMALL_SKY_XMATCH_NAME)


@pytest.fixture
def small_sky_catalog_cloud(small_sky_dir_cloud, storage_options):
return lsdb.read_hipscat(small_sky_dir_cloud, storage_options=storage_options)


@pytest.fixture
def small_sky_xmatch_catalog_cloud(small_sky_xmatch_dir_cloud, storage_options):
return lsdb.read_hipscat(small_sky_xmatch_dir_cloud, storage_options=storage_options)


@pytest.fixture
def small_sky_order1_hipscat_catalog_cloud(small_sky_order1_dir_cloud, storage_options):
return hc.catalog.Catalog.read_from_hipscat(small_sky_order1_dir_cloud, storage_options=storage_options)


@pytest.fixture
def small_sky_order1_catalog_cloud(small_sky_order1_dir_cloud, storage_options):
return lsdb.read_hipscat(small_sky_order1_dir_cloud, storage_options=storage_options)


@pytest.fixture
def xmatch_correct_cloud(local_data_dir):
pathway = os.path.join(local_data_dir, "xmatch", XMATCH_CORRECT_FILE)
return file_io.load_csv_to_pandas(pathway)


@pytest.fixture
def xmatch_with_margin(local_data_dir):
pathway = os.path.join(local_data_dir, "xmatch", "xmatch_with_margin.csv")
return file_io.load_csv_to_pandas(pathway)
46 changes: 0 additions & 46 deletions tests/lsdb/conftest.py

This file was deleted.

0 comments on commit 7bf2d94

Please sign in to comment.