-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added "anemoi-datasets publish" * save user recipe * changelog * fix serialisation error --------- Co-authored-by: b8raoult <53792887+b8raoult@users.noreply.github.com>
- Loading branch information
1 parent
3130d73
commit 9049023
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
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,30 @@ | ||
import logging | ||
|
||
from . import Command | ||
|
||
LOG = logging.getLogger(__name__) | ||
|
||
|
||
class Publish(Command): | ||
"""Publish a dataset.""" | ||
|
||
# This is a command that is used to publish a dataset. | ||
# it is a class, inheriting from Command. | ||
|
||
internal = True | ||
timestamp = True | ||
|
||
def add_arguments(self, parser): | ||
parser.add_argument("path", help="Path of the dataset to publish.") | ||
|
||
def run(self, args): | ||
try: | ||
from anemoi.registry import publish_dataset | ||
except ImportError: | ||
LOG.error("anemoi-registry is not installed. Please install it to use this command.") | ||
return | ||
|
||
publish_dataset(args.path) | ||
|
||
|
||
command = Publish |
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