Skip to content

Commit

Permalink
Release 5.13.5
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosbento authored Oct 31, 2024
2 parents 4696269 + e40d0a1 commit 5ba7b85
Show file tree
Hide file tree
Showing 33 changed files with 732 additions and 211 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif()

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

project( ecflow LANGUAGES CXX VERSION 5.13.4 )
project( ecflow LANGUAGES CXX VERSION 5.13.5 )

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

Expand Down
68 changes: 9 additions & 59 deletions Viewer/ecflowUI/src/SessionDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ SessionDialog::SessionDialog(QWidget* parent) : QDialog(parent) {
// what was saved last time?
std::string lastSessionName = SessionHandler::instance()->lastSessionName();
int index = SessionHandler::instance()->indexFromName(lastSessionName);
if (index != -1)
if (index != -1) {
savedSessionsList_->setCurrentItem(savedSessionsList_->topLevelItem(index)); // select this one in the table
}

if (SessionHandler::instance()->loadLastSessionAtStartup())
if (SessionHandler::instance()->loadLastSessionAtStartup()) {
restoreLastSessionCb_->setCheckState(Qt::Checked);
else
}
else {
restoreLastSessionCb_->setCheckState(Qt::Unchecked);
}

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

// ensure the correct state of the Save button
on_sessionNameEdit__textChanged();
setButtonsEnabledStatus();
}

Expand Down Expand Up @@ -101,39 +103,7 @@ void SessionDialog::setButtonsEnabledStatus() {
cloneButton_->setEnabled(true);
}
}

bool SessionDialog::validSaveName(const std::string& /*name*/) {
/*
QString boxName(QObject::tr("Save session"));
// name empty?
if (name.empty())
{
QMessageBox::critical(0,boxName, tr("Please enter a name for the session"));
return false;
}
// is there already a session with this name?
bool sessionWithThisName = (SessionHandler::instance()->find(name) != NULL);
if (sessionWithThisName)
{
QMessageBox::critical(0,boxName, tr("A session with that name already exists - please choose another
name")); return false;
}
else
{
return true;
}*/
return true;
}

void SessionDialog::on_sessionNameEdit__textChanged() {
// only allow to save a non-empty session name
// saveButton_->setEnabled(!sessionNameEdit_->text().isEmpty());
}

void SessionDialog::on_savedSessionsList__currentRowChanged(int /*currentRow*/) {
void SessionDialog::on_savedSessionsList__currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous) {
setButtonsEnabledStatus();
}

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

SessionRenameDialog renameDialog;
renameDialog.setWindowTitle("Clone Session");
renameDialog.exec();

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

SessionRenameDialog renameDialog;
renameDialog.setWindowTitle("Rename Session");
renameDialog.exec();

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

accept(); // close the dialogue and continue loading the main user interface
}

void SessionDialog::on_saveButton__clicked() {
/*
std::string name = sessionNameEdit_->text().toStdString();
if (validSaveName(name))
{
SessionItem* newSession =
SessionHandler::instance()->copySession(SessionHandler::instance()->current(), name); if (newSession)
{
//SessionHandler::instance()->add(name);
refreshListOfSavedSessions();
SessionHandler::instance()->current(newSession);
QMessageBox::information(0,tr("Session"), tr("Session saved"));
}
else
{
QMessageBox::critical(0,tr("Session"), tr("Failed to save session"));
}
close();
}*/
}
5 changes: 1 addition & 4 deletions Viewer/ecflowUI/src/SessionDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class SessionDialog : public QDialog, protected Ui::SessionDialog {
~SessionDialog() override;

public Q_SLOTS:
void on_saveButton__clicked();
void on_sessionNameEdit__textChanged();
void on_savedSessionsList__currentRowChanged(int currentRow);
void on_savedSessionsList__currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
void on_cloneButton__clicked();
void on_deleteButton__clicked();
void on_renameButton__clicked();
Expand All @@ -39,7 +37,6 @@ public Q_SLOTS:
private:
// Ui::SaveSessionAsDialog *ui;
void addSessionToTable(SessionItem* s);
bool validSaveName(const std::string& name);
void refreshListOfSavedSessions();
void setButtonsEnabledStatus();
std::string selectedSessionName();
Expand Down
7 changes: 7 additions & 0 deletions Viewer/ecflowUI/src/SessionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ SessionItem::~SessionItem() {
}
}

void SessionItem::name(const std::string& name) {
name_ = name;
// Since the name changes, we need to update the related directory paths
dirPath_ = SessionHandler::sessionDirName(name_);
qtPath_ = SessionHandler::sessionQtDirName(name_);
}

void SessionItem::checkDir() {
dirPath_ = SessionHandler::sessionDirName(name_);
DirectoryHandler::createDir(dirPath_);
Expand Down
2 changes: 1 addition & 1 deletion Viewer/ecflowUI/src/SessionHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SessionItem {
explicit SessionItem(const std::string&);
virtual ~SessionItem();

void name(const std::string& name) { name_ = name; }
void name(const std::string& name);
const std::string& name() const { return name_; }

std::string sessionFile() const;
Expand Down
4 changes: 2 additions & 2 deletions Viewer/ecflowUI/src/SessionRenameDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Add variable</string>
<string></string>
</property>
<property name="modal">
<bool>true</bool>
Expand All @@ -26,7 +26,7 @@
</sizepolicy>
</property>
<property name="text">
<string>New name:</string>
<string></string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@


def get_ecflow_version():
version = "5.13.4"
version = "5.13.5"
ecflow_version = version.split(".")
print("Extracted ecflow version '" + str(ecflow_version))
return ecflow_version
Expand Down
24 changes: 23 additions & 1 deletion docs/glossary.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.. index::
single: Glossary

Expand Down Expand Up @@ -87,6 +86,18 @@
responsible for polling the Aviso server, and periodically processing the
latest notifications.

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>`_:

.. code-block:: json
{
"url" : "https://api.ecmwf.int/v1",
"key" : "<your-api-key>",
"email" : "<your-email>"
}
Only the fields :code:`url`, :code:`key`, and :code:`email` are required; any additional fields are ignored.

check point
The check point file is like the :term:`suite definition`, but includes all the state information.

Expand Down Expand Up @@ -1417,6 +1428,17 @@
responsible for polling the remote ecFlow server, and periodically
synchronise node status.

The authentication credentials file is expected to be in JSON, according to the following format:

.. code-block:: json
{
"username" : "<your-username>",
"password" : "<your-password>",
}
Only the fields :code:`username`, and :code:`password` are required; any additional fields are ignored.

node
:term:`suite`, :term:`family` and :term:`task` form a hierarchy.
Where a :term:`suite` serves as the root of the hierarchy.
Expand Down
2 changes: 2 additions & 0 deletions docs/python_api/AvisoAttr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Usage:
t2 = Task('t2')
t2.add_aviso('name', '{...}', 'http://aviso.com', '60', '/path/to/auth')
The parameters `url`, `schema`, `polling`, and `auth` are optional


.. py:method:: AvisoAttr.auth( (AvisoAttr)arg1) -> str :
:module: ecflow
Expand Down
2 changes: 2 additions & 0 deletions docs/python_api/MirrorAttr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Usage:
t2 = Task('t2')
t2.add_aviso('name', '/remote/task', 'remote-ecflow', '3141', '60', True, '/path/to/auth')
The parameters `remote_host`, `remote_port`, `polling`, `ssl`, and `auth` are optional


.. py:method:: MirrorAttr.auth( (MirrorAttr)arg1) -> str :
:module: ecflow
Expand Down
27 changes: 27 additions & 0 deletions docs/release_notes/version_5.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ Version 5.13 updates
.. role:: jiraissue
:class: hidden

Version 5.13.5
==============

* `Released <https://confluence.ecmwf.int/display/ECFLOW/Releases>`__\ on 2024-10-31

General
-------

- **Fix** correct the token used for Aviso authentication :jiraissue:`ECFLOW-1982`

ecFlow UI
---------

- **Fix** correct the disabled/enabled status of Session dialog buttons :jiraissue:`ECFLOW-1980`

ecFlow HTTP
-----------

- **Fix** reorganise :code:`inherited_variables` to allow repeated names of Node ancestors :jiraissue:`ECFLOW-1978`
- **Fix** add missing inherited variables to response of endppoint :code:`.../tree` :jiraissue:`ECFLOW-1977`

Python
------

- **Fix** correct :code:`check_job_creation()` crash on suite with Mirror/Aviso attribute :jiraissue:`ECFLOW-1976`
- **Fix** allow default parameters in Aviso/Mirror attribute constructors :jiraissue:`ECFLOW-1981`

Version 5.13.4
==============

Expand Down
Loading

0 comments on commit 5ba7b85

Please sign in to comment.