Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import lsdb ASAP. #25

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.