You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
[INSERT SCREENSHOT OF YOUR SOFTWARE, IF APPLICABLE]
28
17
29
-
Authorization can be handled interactively, in which case you will be prompted for a username/password when calling the Unity() method, or can be handled by way of environment variables:
18
+
Unity-Py provides a seamless way to interact with NASA's Unity Platform using Python. Built to simplify the connection and data retrieval process, this client offers a programmatic interface to Unity's services.
19
+
20
+
## Features
30
21
22
+
* Pythonic interface to NASA's Unity Platform
23
+
* Support for interactive and environment variable-based authorization
Authorization can be handled interactively, in which case you will be prompted for a username/password when calling the Unity() method, or can be handled by way of environment variables:
31
61
```
32
62
export UNITY_USER=MY_UNITY_USERNAME
33
63
export UNITY_PASSWORD=MY_UNITY_PASSWORD
34
64
```
35
-
36
-
The order of Authentication Parameters is as follows:
37
-
65
+
Order of Authentication Parameters:
38
66
1. Environment variables
39
67
2. Prompt for username and password
40
68
41
-
### Running your first command
69
+
### Usage Examples
42
70
43
71
```
44
72
from unity_sds_client.unity import Unity
45
73
from unity_sds_client.unity_session import UnitySession
46
74
from unity_sds_client.unity_services import UnityServices as services
47
75
48
76
s = Unity()
77
+
# set the venue for interacting with venue specific services
78
+
# if your venue id is a single string, use the following
79
+
s.set_venue_id("unity-sips-test")
80
+
81
+
# otherwise set the project and venue:
82
+
# s.set_project("sbg")
83
+
# s.set_venue("dev")
84
+
49
85
dataManager = s.client(services.DATA_SERVICE)
50
86
collections = dataManager.get_collections()
51
87
print(collections)
@@ -54,19 +90,44 @@ cd = dataManager.get_collection_data(collections[0])
54
90
for dataset in cd:
55
91
print(f'dataset name: {dataset.id}' )
56
92
for f in dataset.datafiles:
57
-
print("\t" + f.location)
93
+
print("" + f.location)
58
94
```
59
95
60
-
## Testing
61
-
To run unit and regression tests:
96
+
### Test Instructions
62
97
63
-
```
64
-
# run all tests and include printouts:
65
-
poetry run pytest -s
98
+
1. Run all tests and include printouts:
99
+
```
100
+
poetry run pytest -s
101
+
```
66
102
67
-
# run non-regression tests:
68
-
poetry run pytest -m "not regression"
103
+
2. Run non-regression tests:
104
+
```
105
+
poetry run pytest -m "not regression"
106
+
```
69
107
70
-
# run regression tests (and include logs)
108
+
3. Run regression tests (and include logs)
109
+
```
110
+
(Not Available Yet)
111
+
```
71
112
72
-
```
113
+
## Changelog
114
+
115
+
See our [CHANGELOG.md](CHANGELOG.md) for a history of our changes.
116
+
117
+
See our [releases page](https://github.com/unity-sds/unity-py/releases) for our key versioned releases.
118
+
119
+
## Frequently Asked Questions (FAQ)
120
+
121
+
No questions yet. Propose a question to be added here by reaching out to our contributors! See support section below.
122
+
123
+
## Contributing
124
+
125
+
Interested in contributing to our project? Please see our: [CONTRIBUTING.md](CONTRIBUTING.md)
126
+
127
+
## License
128
+
129
+
See our: [LICENSE](LICENSE)
130
+
131
+
## Support
132
+
133
+
Please reach out to [@anilnatha](https://github.com/anilnatha), [@mike-gangl](https://github.com/mike-gangl)
0 commit comments