Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit c59ec59

Browse files
authored
Merge pull request #1 from unity-sds/poetry-install
Poetry install
2 parents 34df0e7 + 7bdff6d commit c59ec59

File tree

6 files changed

+490
-14
lines changed

6 files changed

+490
-14
lines changed

.github/workflows/python-app.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python Build
5+
6+
on:
7+
push:
8+
branches: [ main, develop ]
9+
pull_request:
10+
branches: [ main, develop ]
11+
12+
jobs:
13+
build:
14+
strategy:
15+
fail-fast: false
16+
max-parallel: 2
17+
matrix:
18+
python-version: [ "3.9", "3.10" ]
19+
poetry-version: [ "1.1.14" ]
20+
# os: [ ubuntu-18.04, macos-latest, windows-latest ]
21+
os: [ ubuntu-18.04, macos-latest ]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Set up Python
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install Poetry
30+
uses: abatilo/actions-poetry@v2.0.0
31+
with:
32+
poetry-version: ${{ matrix.poetry-version }}
33+
- name: Install dependencies
34+
run: |
35+
poetry install
36+
- name: Lint with flake8
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41+
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42+
- name: Test with pytest
43+
run: |
44+
poetry run pytest -m "not regression"
45+
- name: Regression Test with pytest
46+
env:
47+
PODAAC_LOGLEVEL: "DEBUG"
48+
run: |
49+
poetry run pytest -o log_cli=true --log-cli-level=DEBUG -m "regression"

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
11
# Unity-Py
22

3-
Unity-Py is a Python client to simplify interactions with NASA's Unity Platform.
3+
Unity-Py is a Python client to simplify interactions with NASA's Unity Platform.
4+
5+
## Installation
6+
7+
### Install from Github
8+
```
9+
python -m pip install git+https://github.com/unity-sds/unity-py.git
10+
```
11+
12+
### Building and installing locally using poetry
13+
14+
```
15+
git clone https://github.com/unity-sds/unity-py.git
16+
cd unity-py
17+
poetry install
18+
```
19+
20+
## Testing
21+
To run unit and regression tests:
22+
23+
```
24+
# run all tests and include printouts:
25+
poetry run pytest -s
26+
27+
# run non-regression tests:
28+
poetry run pytest -m "not regression"
29+
30+
# run regression tests (and include logs)
31+
32+
```

0 commit comments

Comments
 (0)