Skip to content

Commit 235f333

Browse files
authored
Merge pull request #9 from nasa/develop
Initial baseline sync - syncing develop with main to establish clean baseline - repair linting/formatting issues in main - still a part of the initial setup
2 parents c560537 + af0bec4 commit 235f333

22 files changed

Lines changed: 168 additions & 151 deletions

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ updates:
1919
gha-dependencies:
2020
patterns:
2121
- "*"
22-
target-branch: "develop"
22+
target-branch: "develop"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ _Explain how this change was integration tested. Provide screenshots or logs if
1616
* [ ] Unit tests added/updated and passing.
1717
* [ ] Integration testing
1818
* [ ] `CHANGELOG.md` updated
19-
* [ ] Documentation updated (if needed).
19+
* [ ] Documentation updated (if needed).

.github/workflows/build-pipeline.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: Build Harmony CASPER image
33

44
# Controls when the workflow will run
55
on:
6-
# Triggers the workflow on push events
76
push:
8-
branches: [ develop, release/**, main, feature/**, issue/**, issues/** , docs/**]
97

108
# Allows you to run this workflow manually from the Actions tab
119
workflow_dispatch:
@@ -136,6 +134,7 @@ jobs:
136134
registry: ${{ env.REGISTRY }}
137135
username: ${{ github.actor }}
138136
password: ${{ secrets.GITHUB_TOKEN }}
137+
139138
- name: Extract metadata (tags, labels) for Docker
140139
if: ${{ !startsWith(github.ref, 'refs/heads/main/') }}
141140
id: meta
@@ -145,6 +144,7 @@ jobs:
145144
tags: |
146145
type=raw,pattern={{version}},value=${{ env.software_version }}
147146
type=raw,value=${{ env.venue }}
147+
148148
- name: Build and push Docker image
149149
if: ${{ !startsWith(github.ref, 'refs/heads/main/') }}
150150
id: docker-push
@@ -154,7 +154,7 @@ jobs:
154154
file: Dockerfile
155155
build-args: |
156156
SOURCE=${{env.pyproject_name}}[harmony]==${{ env.software_version }}
157-
push: true
157+
push: false
158158
pull: true
159159
tags: ${{ steps.meta.outputs.tags }}
160160
labels: ${{ steps.meta.outputs.labels }}
@@ -168,4 +168,4 @@ jobs:
168168
git config user.name "${GITHUB_ACTOR}"
169169
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
170170
git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}"
171-
git push origin "${{ env.software_version }}"
171+
git push origin "${{ env.software_version }}"

.github/workflows/pull_request.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/release-created.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
name: Release Branch Created
1+
name: Release Created
22

33
# Run whenever a ref is created https://docs.github.com/en/actions/reference/events-that-trigger-workflows#create
44
on:
5-
create
5+
push:
6+
tags:
7+
- '[0-9]+.[0-9]+.[0-9]+'
68

79
env:
810
POETRY_VERSION: "2.1.3"
@@ -39,4 +41,4 @@ jobs:
3941
git config --global user.name 'casper bot'
4042
git config --global user.email 'casper@noreply.github.com'
4143
git commit -am "/version ${{ env.software_version }}"
42-
git push
44+
git push

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
with:
5151
token: ${{ secrets.CODECOV_TOKEN }}
5252
verbose: true
53-
flags: unittests
53+
flags: unittests

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ cython_debug/
182182
.abstra/
183183

184184
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
185+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186186
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
187+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188188
# you could uncomment the following to ignore the entire vscode folder
189189
# .vscode/
190190

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ default_language_version:
99

1010
repos:
1111
- repo: https://github.com/gitleaks/gitleaks
12-
rev: v8.28.0
12+
rev: v8.30.0
1313
hooks:
1414
- id: gitleaks
1515

@@ -33,18 +33,18 @@ repos:
3333
- id: end-of-file-fixer
3434
- id: mixed-line-ending
3535
- id: no-commit-to-branch # protects `main` by default
36+
args: [--branch, main, --branch, develop, --pattern, ^release/.*$]
3637
- id: debug-statements
3738
- id: trailing-whitespace
3839

3940
- repo: https://github.com/astral-sh/ruff-pre-commit
40-
rev: v0.14.3
41+
rev: v0.14.10
4142
hooks:
4243
- id: ruff
4344
args: ["--fix", "--exit-non-zero-on-fix"]
4445
- id: ruff-format
4546

4647
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: v1.18.2
48+
rev: v1.19.1
4849
hooks:
4950
- id: mypy
50-

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ poetry install
2424
For example:
2525

2626
```shell
27-
poetry run casper TEMPO_NO2_L2_V04_S009G07.nc
27+
poetry run casper TEMPO_NO2_L2_V04_S009G07.nc
2828
```
2929
For example (_note that these are pseudo-real, not actual, TEMPO file names_):
3030

@@ -93,4 +93,3 @@ Issues and pull requests welcome on [GitHub](https://github.com/nasa/harmony-cas
9393
## License & Attribution
9494

9595
CASPER is released under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
96-

casper/cli.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
21
"""A Harmony CLI wrapper around casper"""
32

43
import logging
54
import sys
65

76
from casper.convert_to_csv import convert_to_csv
87
from casper.file_ops import (
9-
valid_input_file,
10-
valid_workable_file,
8+
valid_input_file,
9+
valid_workable_file,
1110
)
1211

12+
1313
def run_casper(input_file: str):
1414
"""Parse arguments and run casper on specified input file."""
1515
if not valid_input_file(input_file):
16-
raise ValueError("Input filename not valid")
16+
raise ValueError("Input filename not valid")
1717

1818
if not valid_workable_file(input_file):
19-
raise ValueError("Input file not valid")
19+
raise ValueError("Input file not valid")
2020
zip_file_name = f"{input_file.split('/')[-1].split('.')[0]}.zip"
2121
convert_to_csv(input_file, zip_file_name)
2222

23+
2324
def main() -> None:
2425
"""Entry point for the casper command line tool."""
2526
logging.basicConfig(
@@ -29,5 +30,6 @@ def main() -> None:
2930
)
3031
run_casper(sys.argv[1])
3132

33+
3234
if __name__ == "__main__":
3335
main()

0 commit comments

Comments
 (0)