-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/ecmwf/fdb into develop
- Loading branch information
Showing
33 changed files
with
913 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: sync | ||
|
||
# Controls when the workflow will run | ||
on: | ||
|
||
# Trigger the workflow on all pushes | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '**' | ||
|
||
# Trigger the workflow when a branch or tag is deleted | ||
delete: ~ | ||
|
||
jobs: | ||
|
||
# Calls a reusable CI workflow to sync the current with a remote repository. | ||
# It will correctly handle addition of any new and removal of existing Git objects. | ||
sync: | ||
name: sync | ||
uses: ecmwf-actions/reusable-workflows/.github/workflows/sync.yml@v2 | ||
secrets: | ||
target_repository: mars/fdb5 | ||
target_username: ClonedDuck | ||
target_token: ${{ secrets.BITBUCKET_PAT }} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
5.11.30 | ||
5.12.1 |
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
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
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,41 @@ | ||
/* | ||
* (C) Copyright 1996- ECMWF. | ||
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation nor | ||
* does it submit to any jurisdiction. | ||
*/ | ||
|
||
/* | ||
* This software was developed as part of the EC H2020 funded project NextGenIO | ||
* (Project ID: 671951) www.nextgenio.eu | ||
*/ | ||
|
||
#include "fdb5/api/helpers/AxesIterator.h" | ||
|
||
namespace fdb5 { | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
AxesElement::AxesElement(Key&& dbKey, IndexAxis&& axes) : | ||
dbKey_(std::move(dbKey)), axes_(std::move(axes)) {} | ||
|
||
AxesElement::AxesElement(eckit::Stream& s) { | ||
s >> dbKey_; | ||
axes_ = IndexAxis(s, IndexAxis::currentVersion()); | ||
} | ||
|
||
void AxesElement::print(std::ostream& out) const { | ||
out << "Axes(db=" << dbKey_ << ", axes=" << axes_ << ")"; | ||
} | ||
|
||
void AxesElement::encode(eckit::Stream& s) const { | ||
s << dbKey_; | ||
axes_.encode(s, IndexAxis::currentVersion()); | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
} // namespace fdb5 |
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,74 @@ | ||
/* | ||
* (C) Copyright 1996- ECMWF. | ||
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation nor | ||
* does it submit to any jurisdiction. | ||
*/ | ||
|
||
/// @author Simon Smart | ||
/// @date January 2024 | ||
|
||
#pragma once | ||
|
||
#include "fdb5/database/Key.h" | ||
#include "fdb5/database/IndexAxis.h" | ||
#include "fdb5/api/helpers/APIIterator.h" | ||
|
||
namespace eckit { | ||
class Stream; | ||
class JSON; | ||
} | ||
|
||
namespace fdb5 { | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
class AxesElement { | ||
public: // methods | ||
|
||
AxesElement() = default; | ||
AxesElement(Key&& dbKey, IndexAxis&& axis); | ||
explicit AxesElement(eckit::Stream& s); | ||
|
||
[[ nodiscard ]] | ||
const Key& key() const { return dbKey_; } | ||
|
||
[[ nodiscard ]] | ||
const IndexAxis& axes() const { return axes_; } | ||
|
||
void print(std::ostream& out) const; | ||
|
||
private: // methods | ||
|
||
void encode(eckit::Stream& s) const; | ||
|
||
friend std::ostream& operator<<(std::ostream& os, const AxesElement& e) { | ||
e.print(os); | ||
return os; | ||
} | ||
|
||
friend eckit::Stream& operator<<(eckit::Stream& s, const AxesElement& r) { | ||
r.encode(s); | ||
return s; | ||
} | ||
|
||
private: // members | ||
|
||
Key dbKey_; | ||
IndexAxis axes_; | ||
}; | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
using AxesAggregateIterator = APIAggregateIterator<AxesElement>; | ||
|
||
using AxesAsyncIterator = APIAsyncIterator<AxesElement>; | ||
|
||
using AxesIterator = APIIterator<AxesElement>; | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
} // namespace fdb5 |
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 |
---|---|---|
|
@@ -38,7 +38,6 @@ Key ListElement::combinedKey() const { | |
combined.set(kv.first, kv.second); | ||
} | ||
} | ||
|
||
return combined; | ||
} | ||
|
||
|
Oops, something went wrong.