Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
* fixed release workflow to test against `unity-sds-client` not `unity_py`
### Changed
* updated package name so that imports reference `unity_sds_client` not `unity_py`
### Removed
### Security
### Deprecated
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ The order of Authentication Parameters is as follows:
### Running your first command

```
from unity_py.unity import Unity
from unity_py.unity_session import UnitySession
from unity_py.unity_services import UnityServices as services
from unity_sds_client.unity import Unity
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.unity_services import UnityServices as services

s = Unity()
dataManager = s.client(services.DATA_SERVICE)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## mercury-dashboard.ipynb

An example notebook using the unity-py client to create a pseudo operator dashboard. Proof of concept and a way of defining what items need to be in the client, and what metadata/data services need to return.
An example notebook using the unity-sds-client Python package to create a pseudo operator dashboard. Proof of concept and a way of defining what items need to be in the client, and what metadata/data services need to return.

### requirements
```
Expand Down
53 changes: 45 additions & 8 deletions notebooks/mercury-dashboard.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
repository = "https://github.com/unity-sds/unity-py"
exclude = ['img', 'tests']
packages = [
{ include = "unity_py" },
{ include = "unity_sds_client" },
]

[tool.poetry.dependencies]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_unity_py.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unity_py.unity import Unity
from unity_py.unity_session import UnitySession
from unity_py.unity_services import UnityServices as services
from unity_sds_client.unity import Unity
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.unity_services import UnityServices as services

import pytest

Expand Down
4 changes: 2 additions & 2 deletions tests/test_unity_stac.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unity_py.unity_exception import UnityException
from unity_py.resources.collection import Collection, Dataset, DataFile
from unity_sds_client.unity_exception import UnityException
from unity_sds_client.resources.collection import Collection, Dataset, DataFile
import datetime
import pytest
import os
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unity_py.unity_exception import UnityException
from unity_py.resources.dataset import Dataset
from unity_py.resources.data_file import DataFile
from unity_sds_client.unity_exception import UnityException
from unity_sds_client.resources.dataset import Dataset
from unity_sds_client.resources.data_file import DataFile
from pystac import Catalog, get_stac_version, ItemCollection, Item, Asset
from pystac.errors import STACTypeError
import json
Expand All @@ -17,7 +17,7 @@ class Collection(object):
"""

def __str__(self):
return f'unity_py.resources.Collection(collection_id={self.collection_id})'
return f'unity_sds_client.resources.Collection(collection_id={self.collection_id})'

def __repr__(self):
return self.__str__()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class DataFile(object):
"""

def __str__(self):
return f'unity_py.resources.DataFile(location={self.location})'
return f'unity_sds_client.resources.DataFile(location={self.location})'

def __repr__(self):
return self.__str__()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from unity_py.resources.data_file import DataFile
from unity_sds_client.resources.data_file import DataFile

class Dataset(object):
"""The Dataset object contains metadata about a collection within the Unity system, and also is a container for the data_files within a dataset.
Expand All @@ -7,7 +7,7 @@ class Dataset(object):
"""

def __str__(self):
return f'unity_py.resources.Dataset(data_id={self.id})'
return f'unity_sds_client.resources.Dataset(data_id={self.id})'

def __repr__(self):
return self.__str__()
Expand Down Expand Up @@ -50,7 +50,7 @@ def add_data_file(self, datafile: type=DataFile):
Parameters
----------
datafile : DataFile
a unity_py.resource.datafile object containing the location of data products.
a unity_sds_client.resource.datafile object containing the location of data products.

"""
self.datafiles.append(datafile)
Expand Down
10 changes: 5 additions & 5 deletions unity_py/resources/job.py → unity_sds_client/resources/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
from typing import TYPE_CHECKING
import requests

from unity_py.unity_session import UnitySession
from unity_py.resources.job_status import JobStatus
from unity_py.utils.http import get_headers
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.resources.job_status import JobStatus
from unity_sds_client.utils.http import get_headers

if TYPE_CHECKING:
from unity_py.resources.process import Process
from unity_sds_client.resources.process import Process


class Job(object):

def __str__(self):
return '''unity_py.resources.Job(
return '''unity_sds_client.resources.Job(
id="{}",
status="{}",
inputs={}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import requests
from unity_py.unity_session import UnitySession
from unity_py.resources.job import Job
from unity_py.utils.http import get_headers
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.resources.job import Job
from unity_sds_client.utils.http import get_headers

class Process(object):

def __str__(self):
return '''unity_py.resources.Process(
return '''unity_sds_client.resources.Process(
id="{}",
title="{}",
abstract="{}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import requests
from unity_py.unity_session import UnitySession
from unity_py.resources.collection import Collection
from unity_py.resources.dataset import Dataset
from unity_py.resources.data_file import DataFile
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.resources.collection import Collection
from unity_sds_client.resources.dataset import Dataset
from unity_sds_client.resources.data_file import DataFile


class DataService(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import requests
from typing import List

from unity_py.unity_session import UnitySession
from unity_py.resources.process import Process
from unity_py.resources.job import Job, JobStatus
from unity_py.utils.http import get_headers
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.resources.process import Process
from unity_sds_client.resources.job import Job, JobStatus
from unity_sds_client.utils.http import get_headers

class ProcessService(object):
"""
Expand Down
12 changes: 6 additions & 6 deletions unity_py/unity.py → unity_sds_client/unity.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os
from configparser import ConfigParser, ExtendedInterpolation
from unity_py.services.data_service import DataService
from unity_py.services.process_service import ProcessService
from unity_py.unity_session import UnitySession
from unity_py.unity_exception import UnityException
from unity_py.unity_environments import UnityEnvironments
from unity_py.unity_services import UnityServices
from unity_sds_client.services.data_service import DataService
from unity_sds_client.services.process_service import ProcessService
from unity_sds_client.unity_session import UnitySession
from unity_sds_client.unity_exception import UnityException
from unity_sds_client.unity_environments import UnityEnvironments
from unity_sds_client.unity_services import UnityServices


class Unity(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class UnityServices(Enum):
"""
The UnityServices class is used to specify a service, when needed, when interacting with the unity_py library.
The UnityServices class is used to specify a service, when needed, when interacting with the unity_sds_client package.
"""

DATA_SERVICE = "data_service"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import requests

from configparser import ConfigParser
from unity_py.unity_environments import UnityEnvironments
from unity_sds_client.unity_environments import UnityEnvironments


class UnitySession(object):
Expand Down
File renamed without changes.