Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

Changes notification qt6#2734

Open
mmalczak wants to merge 5 commits into
m-labs:masterfrom
elhep:changes_notification_qt6
Open

Changes notification qt6#2734
mmalczak wants to merge 5 commits into
m-labs:masterfrom
elhep:changes_notification_qt6

Conversation

@mmalczak

Copy link
Copy Markdown

ARTIQ Pull Request

Description of Changes

Add pencil sign next to the non-default experiment value.
Update the 'pencil' when there is new default value.
Add warning when settings have changed or when experiments settings layout has changed.

Related Issue

Type of Changes

Type
✨ New feature

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

  • Use correct spelling and grammar.
  • Check the copyright situation of your changes and sign off your patches (git commit --signoff, see copyright).

Code Changes

  • Run flake8 to check code style (follow PEP-8 style). flake8 has issues with parsing Migen/gateware code, ignore as necessary.
  • Test your changes or have someone test them. Mention what was tested and how.
  • Add and check docstrings and comments
  • Check, test, and update the unittests in /artiq/test/ or gateware simulations in /artiq/gateware/test

Git Logistics

  • Split your contribution into logically separate changes (git rebase --interactive). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.
  • Write short & meaningful commit messages. Review each commit for messages (git show). Format:
    topic: description. < 50 characters total.
    
    Longer description. < 70 characters per line
    

Licensing

See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>

@SimonRenblad SimonRenblad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not account for setting arguments from applets with set_argument_value.

modified_value_icon.setVisible_(True)

async def _recompute_argument(self, name):
async def _recompute_arguments(self, keys, update=True):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already exists a _recompute_arguments_task in this file hooked up to the Recompute all arguments button, and as such this is confusing. Instead of modifying this function, I would call compute_expdesc directly in _update_defaults and accept the code duplication that comes with it.

Comment thread artiq/gui/entries.py
logger = logging.getLogger(__name__)


class ModifiedValueLabel(QtWidgets.QLabel):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not disable (grey out) the reset entry button if the entry is already default? That way you don't need to add another label.

Comment thread artiq/gui/entries.py


class ScanEntry(LayoutWidget):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove blank line

argument = self.manager.get_submission_arguments(self.expurl)[name]
try:
procdesc = expdesc["arginfo"][name][0]
except KeyError:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens when removing an argument from the file and then refreshing the repository HEAD, correct? I am not certain that emitting a warning is the proper way to handle this. The behavior on master simply emits an error if attempting to reset to default, which also does not seem correct. Removing the widget from the EntryArea seems better to me. Whether this should be done at repository refresh or when resetting the individual entry is debatable (I lean towards the latter).

if hash(str(self.explist.raw_view)) != hash(str(new_explist)):
logger.warning("Experiments' settings have changed")
if not compare_keys(self.explist.raw_view, new_explist):
logger.warning("Experiments' layout has changed")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these warnings really necessary?

Comment thread artiq/gui/entries.py
self.modifiedValue.emit(not self.is_default())
self.stateChanged.connect(update)

def is_default(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to introduce a new method for this to all Entry widgets? Is it possible to compare argument["state"] with the result of default_state directly?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants