Skip to content

Commit 5ba7b85

Browse files
authored
Release 5.13.5
2 parents 4696269 + e40d0a1 commit 5ba7b85

33 files changed

Lines changed: 732 additions & 211 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endif()
2424

2525
find_package( ecbuild 3.4 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild /workspace/ecbuild) # Before project()
2626

27-
project( ecflow LANGUAGES CXX VERSION 5.13.4 )
27+
project( ecflow LANGUAGES CXX VERSION 5.13.5 )
2828

2929
# Important: the project version is used, as generated CMake variables, to filter .../ecflow/core/ecflow_version.h.in
3030

Viewer/ecflowUI/src/SessionDialog.cpp

Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ SessionDialog::SessionDialog(QWidget* parent) : QDialog(parent) {
3030
// what was saved last time?
3131
std::string lastSessionName = SessionHandler::instance()->lastSessionName();
3232
int index = SessionHandler::instance()->indexFromName(lastSessionName);
33-
if (index != -1)
33+
if (index != -1) {
3434
savedSessionsList_->setCurrentItem(savedSessionsList_->topLevelItem(index)); // select this one in the table
35+
}
3536

36-
if (SessionHandler::instance()->loadLastSessionAtStartup())
37+
if (SessionHandler::instance()->loadLastSessionAtStartup()) {
3738
restoreLastSessionCb_->setCheckState(Qt::Checked);
38-
else
39+
}
40+
else {
3941
restoreLastSessionCb_->setCheckState(Qt::Unchecked);
42+
}
4043

4144
newButton_->setVisible(false); // XXX TODO: enable New Session functionality
4245

4346
// ensure the correct state of the Save button
44-
on_sessionNameEdit__textChanged();
4547
setButtonsEnabledStatus();
4648
}
4749

@@ -101,39 +103,7 @@ void SessionDialog::setButtonsEnabledStatus() {
101103
cloneButton_->setEnabled(true);
102104
}
103105
}
104-
105-
bool SessionDialog::validSaveName(const std::string& /*name*/) {
106-
/*
107-
QString boxName(QObject::tr("Save session"));
108-
// name empty?
109-
if (name.empty())
110-
{
111-
QMessageBox::critical(0,boxName, tr("Please enter a name for the session"));
112-
return false;
113-
}
114-
115-
116-
// is there already a session with this name?
117-
bool sessionWithThisName = (SessionHandler::instance()->find(name) != NULL);
118-
119-
if (sessionWithThisName)
120-
{
121-
QMessageBox::critical(0,boxName, tr("A session with that name already exists - please choose another
122-
name")); return false;
123-
}
124-
else
125-
{
126-
return true;
127-
}*/
128-
return true;
129-
}
130-
131-
void SessionDialog::on_sessionNameEdit__textChanged() {
132-
// only allow to save a non-empty session name
133-
// saveButton_->setEnabled(!sessionNameEdit_->text().isEmpty());
134-
}
135-
136-
void SessionDialog::on_savedSessionsList__currentRowChanged(int /*currentRow*/) {
106+
void SessionDialog::on_savedSessionsList__currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous) {
137107
setButtonsEnabledStatus();
138108
}
139109

@@ -142,6 +112,7 @@ void SessionDialog::on_cloneButton__clicked() {
142112
assert(!sessionName.empty()); // it should not be possible for the name to be empty
143113

144114
SessionRenameDialog renameDialog;
115+
renameDialog.setWindowTitle("Clone Session");
145116
renameDialog.exec();
146117

147118
int result = renameDialog.result();
@@ -176,6 +147,7 @@ void SessionDialog::on_renameButton__clicked() {
176147
assert(item); // it should not be possible for the name to be empty
177148

178149
SessionRenameDialog renameDialog;
150+
renameDialog.setWindowTitle("Rename Session");
179151
renameDialog.exec();
180152

181153
int result = renameDialog.result();
@@ -202,25 +174,3 @@ void SessionDialog::on_switchToButton__clicked() {
202174

203175
accept(); // close the dialogue and continue loading the main user interface
204176
}
205-
206-
void SessionDialog::on_saveButton__clicked() {
207-
/*
208-
std::string name = sessionNameEdit_->text().toStdString();
209-
210-
if (validSaveName(name))
211-
{
212-
SessionItem* newSession =
213-
SessionHandler::instance()->copySession(SessionHandler::instance()->current(), name); if (newSession)
214-
{
215-
//SessionHandler::instance()->add(name);
216-
refreshListOfSavedSessions();
217-
SessionHandler::instance()->current(newSession);
218-
QMessageBox::information(0,tr("Session"), tr("Session saved"));
219-
}
220-
else
221-
{
222-
QMessageBox::critical(0,tr("Session"), tr("Failed to save session"));
223-
}
224-
close();
225-
}*/
226-
}

Viewer/ecflowUI/src/SessionDialog.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ class SessionDialog : public QDialog, protected Ui::SessionDialog {
2828
~SessionDialog() override;
2929

3030
public Q_SLOTS:
31-
void on_saveButton__clicked();
32-
void on_sessionNameEdit__textChanged();
33-
void on_savedSessionsList__currentRowChanged(int currentRow);
31+
void on_savedSessionsList__currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
3432
void on_cloneButton__clicked();
3533
void on_deleteButton__clicked();
3634
void on_renameButton__clicked();
@@ -39,7 +37,6 @@ public Q_SLOTS:
3937
private:
4038
// Ui::SaveSessionAsDialog *ui;
4139
void addSessionToTable(SessionItem* s);
42-
bool validSaveName(const std::string& name);
4340
void refreshListOfSavedSessions();
4441
void setButtonsEnabledStatus();
4542
std::string selectedSessionName();

Viewer/ecflowUI/src/SessionHandler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ SessionItem::~SessionItem() {
3636
}
3737
}
3838

39+
void SessionItem::name(const std::string& name) {
40+
name_ = name;
41+
// Since the name changes, we need to update the related directory paths
42+
dirPath_ = SessionHandler::sessionDirName(name_);
43+
qtPath_ = SessionHandler::sessionQtDirName(name_);
44+
}
45+
3946
void SessionItem::checkDir() {
4047
dirPath_ = SessionHandler::sessionDirName(name_);
4148
DirectoryHandler::createDir(dirPath_);

Viewer/ecflowUI/src/SessionHandler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SessionItem {
2121
explicit SessionItem(const std::string&);
2222
virtual ~SessionItem();
2323

24-
void name(const std::string& name) { name_ = name; }
24+
void name(const std::string& name);
2525
const std::string& name() const { return name_; }
2626

2727
std::string sessionFile() const;

Viewer/ecflowUI/src/SessionRenameDialog.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
14-
<string>Add variable</string>
14+
<string></string>
1515
</property>
1616
<property name="modal">
1717
<bool>true</bool>
@@ -26,7 +26,7 @@
2626
</sizepolicy>
2727
</property>
2828
<property name="text">
29-
<string>New name:</string>
29+
<string></string>
3030
</property>
3131
</widget>
3232
</item>

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494

9595
def get_ecflow_version():
96-
version = "5.13.4"
96+
version = "5.13.5"
9797
ecflow_version = version.split(".")
9898
print("Extracted ecflow version '" + str(ecflow_version))
9999
return ecflow_version

docs/glossary.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. index::
32
single: Glossary
43

@@ -87,6 +86,18 @@
8786
responsible for polling the Aviso server, and periodically processing the
8887
latest notifications.
8988

89+
The authentication credentials file is expected to be in JSON format, following the `ECMWF Web API <https://www.ecmwf.int/en/computing/software/ecmwf-web-api>`_:
90+
91+
.. code-block:: json
92+
93+
{
94+
"url" : "https://api.ecmwf.int/v1",
95+
"key" : "<your-api-key>",
96+
"email" : "<your-email>"
97+
}
98+
99+
Only the fields :code:`url`, :code:`key`, and :code:`email` are required; any additional fields are ignored.
100+
90101
check point
91102
The check point file is like the :term:`suite definition`, but includes all the state information.
92103

@@ -1417,6 +1428,17 @@
14171428
responsible for polling the remote ecFlow server, and periodically
14181429
synchronise node status.
14191430

1431+
The authentication credentials file is expected to be in JSON, according to the following format:
1432+
1433+
.. code-block:: json
1434+
1435+
{
1436+
"username" : "<your-username>",
1437+
"password" : "<your-password>",
1438+
}
1439+
1440+
Only the fields :code:`username`, and :code:`password` are required; any additional fields are ignored.
1441+
14201442
node
14211443
:term:`suite`, :term:`family` and :term:`task` form a hierarchy.
14221444
Where a :term:`suite` serves as the root of the hierarchy.

docs/python_api/AvisoAttr.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Usage:
3333
t2 = Task('t2')
3434
t2.add_aviso('name', '{...}', 'http://aviso.com', '60', '/path/to/auth')
3535
36+
The parameters `url`, `schema`, `polling`, and `auth` are optional
37+
3638

3739
.. py:method:: AvisoAttr.auth( (AvisoAttr)arg1) -> str :
3840
:module: ecflow

docs/python_api/MirrorAttr.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Usage:
3434
t2 = Task('t2')
3535
t2.add_aviso('name', '/remote/task', 'remote-ecflow', '3141', '60', True, '/path/to/auth')
3636
37+
The parameters `remote_host`, `remote_port`, `polling`, `ssl`, and `auth` are optional
38+
3739

3840
.. py:method:: MirrorAttr.auth( (MirrorAttr)arg1) -> str :
3941
:module: ecflow

0 commit comments

Comments
 (0)