-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from NOAA-GFDL/restructure
Restructure the layout of the repo and add the ability to work with fre-cli
- Loading branch information
Showing
41 changed files
with
204 additions
and
310 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
.github/workflows/add-analysis-scripts-core-to-noaa-gfdl-conda-channel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: add_to_noaa_gfdl_channel | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/noaa-gfdl/fre-cli:miniconda24.7.1_gcc14.2.0 | ||
steps: | ||
- name: Checkout Files | ||
uses: actions/checkout@v4 | ||
- name: Run Conda to Build and Publish | ||
run: | | ||
conda config --append channels conda-forge | ||
conda config --append channels noaa-gfdl | ||
conda install conda-build anaconda-client conda-verify | ||
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} | ||
conda config --set anaconda_upload yes | ||
conda build core/analysis_scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .base_class import AnalysisScript | ||
from .plugins import available_plugins, find_plugins, plugin_requirements, \ | ||
run_plugin, UnknownPluginError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package: | ||
name: analysis_scripts | ||
version: 0.0.1 | ||
|
||
source: | ||
path: . | ||
|
||
build: | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
number: 0 | ||
noarch: python | ||
|
||
requirements: | ||
host: | ||
- python | ||
- pip | ||
run: | ||
- python | ||
- pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from pytest import raises | ||
|
||
from analysis_scripts import AnalysisScript | ||
|
||
|
||
def test_no_init(): | ||
#The constructor is not overridden. | ||
with raises(NotImplementedError): | ||
class FakeAnalysisScript(AnalysisScript): | ||
pass | ||
_ = FakeAnalysisScript() | ||
|
||
|
||
def test_no_requires(): | ||
#The requires function is not overridden. | ||
with raises(NotImplementedError): | ||
class FakeAnalysisScript(AnalysisScript): | ||
def __init__(self): | ||
pass | ||
_ = FakeAnalysisScript().requires() | ||
|
||
|
||
def test_no_run_analysis(): | ||
#The requires function is not overridden. | ||
with raises(NotImplementedError): | ||
class FakeAnalysisScript(AnalysisScript): | ||
def __init__(self): | ||
pass | ||
_ = FakeAnalysisScript().run_analysis("fake catalog", "fake png directory") |
Oops, something went wrong.