Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mxcubeweb #6

Open
wants to merge 160 commits into
base: main
Choose a base branch
from

Conversation

fhernandezvivanco
Copy link
Collaborator

No description provided.

Dan Costin and others added 30 commits December 3, 2024 15:37
and change get_sample_info to get_sample_by_id
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.6 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.6...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
also makes remember_parameters_between_samples and centring_method have their default values configurable
Handle the cases, where during loss of connection to the backend,
our session becomes invalid.

If no valid session exist, swith to login page.
fabcor-maxiv and others added 30 commits February 21, 2025 15:07
Also remove some unused CSS style.
Move all usage of  react-copy-to-clipboard to a single component
The original list was created by hand. Some mistakes were introduced.
This version is mostly machine generated with some minor manual edits.

Also the `UP` ignores are now split.
The intention was to handle all `UP` violations at once.
But this would be much more complex than initially thought.
Handling the `UP` violations separately will be easier.
Fix some violations from the "pyupgrade `UP`" Ruff linter rules group:

* `UP006`
    * "Use `{to}` instead of `{from}` for type annotation"
    * <https://docs.astral.sh/ruff/rules/non-pep585-annotation/>
* `UP007`
    * "Use `X | Y` for type annotations"
    * <https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/>
* `UP008`
    * "Use `super()` instead of `super(__class__, self)`"
    * <https://docs.astral.sh/ruff/rules/super-call-with-parameters/>
* `UP009`
    * "UTF-8 encoding declaration is unnecessary"
    * <https://docs.astral.sh/ruff/rules/utf8-encoding-declaration/>
* `UP015`
    * "Unnecessary mode argument"
    * <https://docs.astral.sh/ruff/rules/redundant-open-modes/>
* `UP026`
    * "`mock` is deprecated, use `unittest.mock`"
    * <https://docs.astral.sh/ruff/rules/deprecated-mock-import/>
* `UP035`
    * "Import from `{target}` instead: `{names}`"
    * <https://docs.astral.sh/ruff/rules/deprecated-import/>

These were all fixed automatically by Ruff itself.

The remaining violations in the "pyupgrade `UP`" rules group
are all related to "string interpolation".
Fix Ruff rule violations from the "`C4` flake8-comprehensions" group:

* `C404`
    * "Unnecessary list comprehension (rewrite as a dict comprehension)"
    * <https://docs.astral.sh/ruff/rules/unnecessary-list-comprehension-dict/>
* `C408`
    * "Unnecessary `{kind}()` call (rewrite as a literal)"
    * <https://docs.astral.sh/ruff/rules/unnecessary-collection-call/>
* `C411`
    * "Unnecessary `list()` call (remove the outer call to `list()`)"
    * <https://docs.astral.sh/ruff/rules/unnecessary-list-call/>
* `C416`
    * "Unnecessary `{kind}` comprehension (rewrite using `{kind}()`)"
    * <https://docs.astral.sh/ruff/rules/unnecessary-comprehension/>

All fixes were done automatically by Ruff itself.
Fix Ruff rule violations from the "flake8-errmsg `EM`" group:

* `EM101`
    * "Exception must not use a string literal, assign to variable first"
    * <https://docs.astral.sh/ruff/rules/raw-string-in-exception/>

All fixes were made automatically by Ruff itself.
Fix violations of Ruff rules in the "flake8-return `RET`" group:

* `RET502`
    * "Do not implicitly return None in function able to return non-`None` value"
    * <https://docs.astral.sh/ruff/rules/implicit-return-value/>
* `RET503`
    * "Missing explicit `return` at the end of function able to return non-`None` value"
    * <https://docs.astral.sh/ruff/rules/implicit-return/>
* `RET504`
    * "Unnecessary assignment before `return` statement"
    * <https://docs.astral.sh/ruff/rules/unnecessary-assign/>
* `RET505`
    * "Unnecessary branch after return statement"
    * <https://docs.astral.sh/ruff/rules/superfluous-else-return/>
* `RET506`
    * "Unnecessary branch after raise statement"
    * <https://docs.astral.sh/ruff/rules/superfluous-else-raise/>

All fixes done automatically by Ruff itself.
Fix violations of Ruff rules in the "flake8-pytest-style `PT`" group:

* `PT018`
    * "Assertion should be broken down into multiple parts"
    * <https://docs.astral.sh/ruff/rules/pytest-composite-assertion/>
* `PT022`
    * "No teardown in fixture, use `return` instead of `yield`"
    * <https://docs.astral.sh/ruff/rules/pytest-useless-yield-fixture/>

All fixes were made automatically by Ruff itself.
Fix violations of Ruff rules in the `flake8-simplify SIM` group:

* `SIM101`
    * Multiple `isinstance` calls, merge into a single call
    * <https://docs.astral.sh/ruff/rules/duplicate-isinstance-call/>
* `SIM102`
    * Use a single if statement instead of nested if statements
    * <https://docs.astral.sh/ruff/rules/collapsible-if/>
* `SIM105`
    * Use `contextlib.suppress` instead of `try`-`except`-`pass`
    * <https://docs.astral.sh/ruff/rules/suppressible-exception/>
* `SIM108`
    * Use ternary operator instead of `if`-`else`-`block`
    * <https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp/>
* `SIM114`
    * Combine `if` branches using logical `or` operator
    * <https://docs.astral.sh/ruff/rules/if-with-same-arms/>
* `SIM118`
    * Use `key {operator} dict` instead of `key {operator} dict.keys()`
    * <https://docs.astral.sh/ruff/rules/in-dict-keys/>
* `SIM201`
    * Use `{left} != {right}` instead of `not {left} == {right}`
    * <https://docs.astral.sh/ruff/rules/negate-equal-op/>
* `SIM210`
    * Remove unnecessary `True if ... else False`
    * <https://docs.astral.sh/ruff/rules/if-expr-with-true-false/>
* `SIM212`
    * Use `{expr_else} if {expr_else} else {expr_body}`
        instead of `{expr_body} if not {expr_else} else {expr_else}`
    * <https://docs.astral.sh/ruff/rules/if-expr-with-twisted-arms/>

Most fixes were done by Ruff itself automatically.
For some fixes some light manual editing was done beforehand.

Violations that have no automatic fix and are left untouched:

* `SIM115`
    * Use a context manager for opening files
    * <https://docs.astral.sh/ruff/rules/open-file-with-context-handler/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants