Skip to content

Commit eaded3d

Browse files
Stepheny Perezcqbanhnchungpodaac-cloud-IandAngachung
authored
Release/1.6.1 (#38)
* Feature/push pypi (#30) * Updated release.md * /version 1.6.0-rc.2 [skip actions] * /version 1.6.0 [skip actions] * added build and publish for pypi * update GHA build - install python wheel Co-authored-by: nchung <nga.t.chung@jpl.nasa.gov> Co-authored-by: podaac-cloud-IandA <podaac-cloud-IandA@jpl.nasa.gov> Co-authored-by: Nga Chung <17833879+ngachung@users.noreply.github.com> * /version 1.6.0-alpha.0 [skip actions] * Feature/push pypi (#31) * Updated release.md * /version 1.6.0-rc.2 [skip actions] * /version 1.6.0 [skip actions] * added build and publish for pypi * update GHA build - install python wheel * GHA - took out publish pypi condition * exclude feature branch from pypi publish Co-authored-by: nchung <nga.t.chung@jpl.nasa.gov> Co-authored-by: podaac-cloud-IandA <podaac-cloud-IandA@jpl.nasa.gov> Co-authored-by: Nga Chung <17833879+ngachung@users.noreply.github.com> * /version 1.6.0-alpha.0 [skip actions] * Feature/push pypi (#32) * Updated release.md * /version 1.6.0-rc.2 [skip actions] * /version 1.6.0 [skip actions] * added build and publish for pypi * update GHA build - install python wheel * GHA - took out publish pypi condition * exclude feature branch from pypi publish * specified python package location Co-authored-by: nchung <nga.t.chung@jpl.nasa.gov> Co-authored-by: podaac-cloud-IandA <podaac-cloud-IandA@jpl.nasa.gov> Co-authored-by: Nga Chung <17833879+ngachung@users.noreply.github.com> * Update cumulus_sns_schema.json Fixed format * Update cumulus_sns_schema.json removed alpha version * GSFC PR: Allow collection to be a JSON object including short name and version #34 (#37) * Updated release.md * /version 1.6.0-rc.2 [skip actions] * /version 1.6.0 [skip actions] * allowed collection to be either a string or an object in message schema * fixed a broken hyperlink * updated the collection description in README * Updated changelog * Bump version to 1.6.1 * /version 1.6.1-alpha.0 [skip actions] Co-authored-by: Curtis Banh <30607061+cqbanh@users.noreply.github.com> Co-authored-by: nchung <nga.t.chung@jpl.nasa.gov> Co-authored-by: podaac-cloud-IandA <podaac-cloud-IandA@jpl.nasa.gov> Co-authored-by: Nga Chung <17833879+ngachung@users.noreply.github.com>
1 parent b9ef05e commit eaded3d

6 files changed

Lines changed: 109 additions & 4 deletions

File tree

.github/workflows/build-pipeline.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- name: Install Python dependencies
3333
run: |
3434
pip3 install -r builder/requirements.txt
35+
python3 -m pip install setuptools wheel twine
3536
- name: Get Version
3637
run: echo ::set-output name=current_version::$(python3 builder/get-version.py -f cumulus_sns_schema.json)
3738
id: get-version
@@ -82,6 +83,9 @@ jobs:
8283
echo "New Version is: ${{ env.software_version }}"
8384
python3 builder/update-version.py -f cumulus_sns_schema.json -v ${{ env.software_version }}
8485
python3 builder/builder.py -d . -a ${{env.ARTIFACT_BASE_NAME}}
86+
- name: Build Python package
87+
run: |
88+
python3 setup.py sdist bdist_wheel
8589
- name: Prepare Artifacts
8690
run: |
8791
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
@@ -138,6 +142,12 @@ jobs:
138142
asset_path: "${{ env.ARTIFACT_FILE }}"
139143
asset_name: "${{ env.ARTIFACT_FILE }}"
140144
asset_content_type: application/zip
145+
- name: Publish to PyPI
146+
if: ${{ !startsWith(github.ref, 'refs/heads/feature/') }}
147+
uses: pypa/gh-action-pypi-publish@release/v1
148+
with:
149+
user: __token__
150+
password: ${{ secrets.PYPI_API_TOKEN }}
141151
- name: Commit Version Bump
142152
# If building develop, a release branch, or master then we commit the version bump back to the repo
143153
if: |

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.6.1] -- 2022-11-11
8+
### Added
9+
### Changed
10+
### Deprecated
11+
### Removed
12+
### Fixed
13+
- Allow collection to be a JSON object including short name and version #34
14+
### Security
15+
716
## [1.6.0] - 2022-03-10
817
### Added
918
### Changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Upon completion, a CNM Response messages can optionally be sent to a previously
3737
## Specification
3838
There are two types of messages valid in the CNM. The first message is the notification of new data to a DAAC. The second is the optional response message sent from a DAAC to a SIPS.
3939

40-
See https://git.earthdata.nasa.gov/projects/CUMULUS/repos/cumulus-sns-schema/browse/cumulus_sns_schema.json for an up-to-date JSON Schema.
40+
See https://git.earthdata.nasa.gov/projects/CUMULUS/repos/cumulus-sns-schema/browse/cumulus_sns_schema.json for an up-to-date JSON Schema.
4141

4242
### Notification Message Fields
4343

@@ -48,7 +48,7 @@ The below fields are for sending a CNM submission, most often from a SIPS or SDS
4848
|version | yes | Version of the CNM to use/parse with | 1.0, 1.1, 1.2, 1.3 |
4949
| submissionTime | yes | The time the message was created (and presumably sent) to the DAAC Topic/Stream. | |
5050
| identifier | yes | Unique identifier for the message as a whole. It is the senders responsibility to ensure uniqueness. This identifier can be used in response messages to provide traceability. | |
51-
| collection | yes | The collection to which the granule belongs. | This may be used if a generic SNS topic for multiple providers. |
51+
| collection | yes | The collection to which the granule belongs. | This may be used if a generic SNS topic for multiple providers. <br> It can be either a string for the collection short name (e.g. <i> GLDAS_NOAH025_3H </i>), or a JSON object including the collection name and version (e.g. <i> {"name":"GLDAS_NOAH025_3H", "version":"2.0"} </i>). |
5252
| provider | no | The provider/SIPS identifier which created this message. | |
5353
| product | yes | A product object (typically a granule), defined below. Only a single product can be defined in each message. |
5454
| trace | no | Information on the message or who is sending it. This is not used in the processing of the product. informational only. |

cumulus_sns_schema.json

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@
7373
"id",
7474
"files"
7575
]
76+
},
77+
"collection": {
78+
"description": "The collection short name and version.",
79+
"type": "object",
80+
"properties": {
81+
"name": {
82+
"type": "string",
83+
"description": "collection short name."
84+
},
85+
"version": {
86+
"type": "string",
87+
"description": "collection version."
88+
}
89+
},
90+
"required": [
91+
"name",
92+
"version"
93+
]
7694
}
7795
},
7896
"title": "Cloud Notification Message (cnm) 1.2 ",
@@ -91,7 +109,8 @@
91109
"1.4.1",
92110
"1.5",
93111
"1.5.1",
94-
"1.6.0"
112+
"1.6.0",
113+
"1.6.1-alpha.0"
95114
]
96115
},
97116
"receivedTime": {
@@ -115,7 +134,14 @@
115134
},
116135
"collection": {
117136
"description": "The collection to which these granules will belong.",
118-
"type": "string"
137+
"anyOf": [
138+
{
139+
"type": "string"
140+
},
141+
{
142+
"$ref": "#/definitions/collection"
143+
}
144+
]
119145
},
120146
"provider": {
121147
"description": "the name of the provider (e.g. SIP, SDS, etc. ) producing these files.",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version":"1.6.1",
3+
"provider": "PODAAC_SWOT",
4+
"collection": {
5+
"name": "SWOT_Prod_l2:1",
6+
"version": "1.0"
7+
},
8+
"submissionTime":"2020-07-28T04:48:22.405460Z",
9+
"identifier": "1234-abcd-efg0-9876",
10+
"product":
11+
{
12+
"name": "sampleGranuleName001",
13+
"dataVersion": "001",
14+
"dataProcessingType": "forward",
15+
"files": [
16+
{
17+
"type": "data",
18+
"uri": "s3://sampleIngestBucket/prod_20170926T11:30:36/production_file.nc",
19+
"name":"production_file.nc",
20+
"size": 123456
21+
},
22+
{
23+
"type": "browse",
24+
"uri": "s3://sampleIngestBucket/prod_20170926T11:30:36/production_file.png",
25+
"name":"production_file.png",
26+
"checksum":"12312312312313",
27+
"checksumType":"SHA512",
28+
"size": 12345
29+
}
30+
]
31+
}
32+
}

setup.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from setuptools import setup, find_packages
2+
3+
# with open("README.md", "r", encoding="utf-8") as fh:
4+
# long_description = fh.read()
5+
6+
with open('version.txt', "r", encoding="utf-8") as f:
7+
version = f.read().strip()
8+
9+
setup(
10+
name="podaac-cloud-notification-message-schema",
11+
version=version,
12+
description="PO.DAAC Cloud Notification Message Schema",
13+
url='https://github.com/podaac/cloud-notification-message-schema',
14+
author='PO.DAAC',
15+
author_email='podaac@podaac.jpl.nasa.gov',
16+
install_requires=[
17+
],
18+
extras_require={
19+
'testing': [
20+
'pytest==5.3.5'
21+
]
22+
},
23+
packages=['.'],
24+
package_data={
25+
'samples': ['*.json']
26+
},
27+
include_package_data=True
28+
)

0 commit comments

Comments
 (0)