Skip to content

Commit

Permalink
Merge branch 'main' into app-pack-build-service-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-gangl committed Aug 5, 2024
2 parents 73fc806 + 9f38273 commit 27dd90c
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 46 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/unity-py-python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ name: Unity-sds-client Python Build
# Run on an PR if it includes unity-py changes OR if the schema in health are changed.
on:
push:
branches:
branches:
- main
paths:
paths:
- 'libs/unity-py/**'
pull_request:
branches:
branches:
- main
paths:
- 'libs/unity-py/**'
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
src:
- 'libs/unity-py/**'
- name: Software Version Check
if: steps.filter.outputs.src == 'true'
if: steps.changes.outputs.src == 'true'
run: |
unity_py_proposed_version=`poetry version -s`
echo "curl -s -o /dev/null -w \"%{http_code}\" https://pypi.org/project/unity-sds-client/$unity_py_proposed_version/"
Expand Down Expand Up @@ -79,12 +79,12 @@ jobs:
UNITY_USER: '${{ secrets.UNITY_TEST_USER }}'
UNITY_PASSWORD: '${{ secrets.UNITY_TEST_PASSWORD }}'
run: |
poetry run pytest --cov-report=lcov --cov=unity_sds_client -o log_cli=true --log-cli-level=DEBUG
poetry run pytest --cov-report=lcov --cov=unity_sds_client -o log_cli=true --log-cli-level=DEBUG
- name: Coveralls
uses: coverallsapp/[email protected]
version:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -99,12 +99,12 @@ jobs:
uses: abatilo/[email protected]
with:
poetry-version: "1.5.1"
# Commented out the version bump code. Will publish new unity-py version to pypi on push to main.
# Commented out the version bump code. Will publish new unity-py version to pypi on push to main.
# This means we are always releasing. This will fail if the version already exists in Pypi.
# We must ensure that the version has been updated.
# ADded version check above.
# Future work: set PR test to ensure the version has been updated.

# - name: version-bump
# run: |
# poetry version prerelease
Expand Down
36 changes: 19 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ repos:
args:
- --allow-missing-credentials
- id: check-toml # Checks toml files for parsable syntax.

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "v0.39.0"
hooks:
- id: markdownlint
args: ["--config", ".markdownlintrc", "--ignore", "CHANGELOG.md"]
# unity-py markdown lint
#- repo: https://github.com/igorshubovych/markdownlint-cli
# rev: "v0.39.0"
# hooks:
# - id: markdownlint
# # args: ["--config", ".markdownlintrc", "--ignore", "libs/unity-py/CHANGELOG.md"]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
Expand All @@ -43,17 +43,19 @@ repos:
hooks:
- id: ruff

#- repo: https://github.com/PyCQA/bandit
# rev: "1.7.8" # you must change this to newest version
# hooks:
# - id: bandit
# args:
# [
# "--configfile=pyproject.toml",
# "--severity-level=high",
# "--confidence-level=high",
# ]
# additional_dependencies: [".[toml]"]
# unity-py bandit config
- repo: https://github.com/PyCQA/bandit
rev: "1.7.8" # you must change this to newest version
hooks:
- id: bandit
files: '^libs/unity-py/.*\.py'
args:
[
"--configfile=libs/unity-py/pyproject.toml",
"--severity-level=high",
"--confidence-level=high",
]
additional_dependencies: [".[toml]"]

- repo: https://github.com/hadolint/hadolint
rev: v2.13.0-beta
Expand Down
32 changes: 26 additions & 6 deletions libs/unity-py/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2024-08-05
### Added
* Added app-pacakge build system client and integrations
### Fixed
### Changed
### Removed
### Security
### Deprecated


## [0.5.0] - 2024-07-31
### Added
### Fixed
* cleaned up some README formatting
### Changed
* changed endpoints from cloudfront urls to DNS entries
### Removed
### Security
### Deprecated


## [0.5.0] - 2024-07-23

Expand Down Expand Up @@ -48,10 +68,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated


## [0.2.2] - 2024-01-03
## [0.2.2] - 2024-01-03
### Added
* Added project/venue support [5](https://github.com/unity-sds/unity-py/issues/58)
### Fixed
### Fixed
### Changed
### Removed
### Security
Expand All @@ -60,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.1] - 2023-11-29
### Added
* python code coverage via coveralls
### Fixed
### Fixed
### Changed
* updated install to support python 3.8 and above.
### Removed
Expand All @@ -70,7 +90,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.1] - 2023-11-29
### Added
* python code coverage via coveralls
### Fixed
### Fixed
### Changed
* updated install to support python 3.8 and above.
### Removed
Expand All @@ -80,9 +100,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.2.0] - 2023-08-10
### Added
* Added parsing of collection in stac items
* Added parsing of collection in stac items
### Fixed
* fixed release workflow to test against `unity-sds-client` not `unity_py`
* 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
Expand Down
2 changes: 1 addition & 1 deletion libs/unity-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "unity-sds-client"
version = "0.5.0"
version = "0.6.0"
description = "Unity-Py is a Python client to simplify interactions with NASA's Unity Platform."
authors = ["Anil Natha, Mike Gangl"]
readme = "README.md"
Expand Down
15 changes: 3 additions & 12 deletions libs/unity-py/unity_sds_client/envs/environments.cfg
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
[DEV]
client_id = 40c2s0ulbhp9i0fmaph3su9jch
auth_endpoint = https://cognito-idp.us-west-2.amazonaws.com
unity_href = https://d3vc8w9zcq658.cloudfront.net/
unity_href = https://api.dev.mdps.mcp.nasa.gov/

[TEST]
client_id = 71894molftjtie4dvvkbjeard0
auth_endpoint = https://cognito-idp.us-west-2.amazonaws.com
unity_href = https://dxebrgu0bc9w7.cloudfront.net/
unity_href = https://api.test.mdps.mcp.nasa.gov/

[PROD]
client_id = 7vehllplbone6p4usqgutqun35
auth_endpoint = https://cognito-idp.us-west-2.amazonaws.com
unity_href = https://d2zjsabg0fonik.cloudfront.net/

;[APPLICATIONS]
;
;
;[DATA]
;dapa_endpoint = https://58nbcawrvb.execute-api.us-west-2.amazonaws.com/test/
;
;[SPS]
;sps_endpoint = http://a22b9d7b66df24e6fb3326ecd4cb0614-676486270.us-west-2.elb.amazonaws.com:5001/
unity_href = https://api.mdps.mcp.nasa.gov/
4 changes: 2 additions & 2 deletions libs/unity-py/unity_sds_client/unity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class Unity(object):

def __init__(
self,
environment: UnityEnvironments = UnityEnvironments.TEST,
environment: UnityEnvironments = UnityEnvironments.PROD,
config_file_override: str = None,
):
"""
:param environment: the default environment for a session to work with. Defaults to 'TEST' unity environment.
:param environment: the default environment for a session to work with. Defaults to 'PROD' unity environment.
:param config_file_override: absolute path to a config file containing settings to override default config
"""
env = environment
Expand Down

0 comments on commit 27dd90c

Please sign in to comment.