Apply ruff auto fixes (part 1)

Partially fixes https://github.com/beartype/beartype/issues/366

ruff.toml was added
A big group of rules was resolved with auto fix + review
0.1% (in lines) of fixes manually corrected (most often it's a change in comments)

Hurk! Massive changeset: INCOOOOOOOOMING!!!!
This is the point at which I have to be a jerk, huh?    I deeply respect and adore almost everything you do. You know this. But...
Style enforcement is a bridge too far. I love my autistic coding style. It may not be much. It may not be rational, readable, aesthetic, or uniform – but it's distinctly mine. I will defend my autistic coding style with my last shuddering breath. So long as I can grip the keys of a dusty mechanical keyboard from the 1980's with white knuckles, I will defend my style.
In fact, I defend all uniquely personal coding styles. I abhor the cognitive horrors that automated style enforcers like black and now ruff have wrought on the mind sphere of the Pythonista community. Generally speaking, black and ruff are not superior to personal coding styles; they're inferior and vastly so.
Presenting...
101 Examples of How Sucky ruff Is
Cue the industrial dance music. We doin' this.
# This autistic coding style...
            raise RuntimeError(
                f'Beartype requires at least Python {PYTHON_VERSION_MIN}, but '
                f'the active interpreter only targets Python {_PYTHON_VERSION}. '
                f'We feel unbearable sadness for you.'
            )

# ...is vastly preferable to this overly and needlessly verbose
# "ruff"-enforced coding style.
            msg = (
                f'Beartype requires at least Python {PYTHON_VERSION_MIN}, but '
                f'the active interpreter only targets Python {_PYTHON_VERSION}. '
                f'We feel unbearable sadness for you.'
            )
            raise RuntimeError(
                msg
            )

# This autistic coding style...
        attr_deprecated_name_to_nondeprecated_name={'abby': 'door',},

# ...is vastly preferable to this needlessly terse
# "ruff"-enforced coding style. Why? Because the
# autistic coding style is resilient to adding additional
# key-value dictionary pairs. In the autistic coding style,
# you just add additional key-value dictionary pairs.
# You don't have to worry about whether or not there's a
# trailing comma, because there's *ALWAYS* a trailing comma.
# Autistic coding style states that the last item of *ANY*
# container should *ALWAYS* be suffixed by a trailing comma.
# Violating this maxim makes code more fragile -- not better.
        attr_deprecated_name_to_nondeprecated_name={'abby': 'door'},

# This autistic coding style...
    #FIXME: To support attribute-based deferred importation ala "lazy loading"
    #of heavyweight subpackages like "beartype.door" and "beartype.vale", it
    #looks like we'll need to manually add support here for that: e.g.,
    #    elif attr_name in {'cave', 'claw', 'door', 'vale',}:
    #        #FIXME: Dynamically import this attribute here... somehow. Certainly, if
    #        #such functionality does *NOT* exist, add it to the existing
    #        #"utilmodimport" submodule: e.g.,
    #        attr_value = import_module_attr(f'beartype.{attr_name}')
    #        attr_nondeprecated_name_to_value = {attr_name: attr_value}

# ...is vastly preferable to this needlessly ambiguous
# "ruff"-enforced coding style. Why? Because the
# autistic coding style explicitly disambiguates between:
# * "#FIXME:" comments, which are *ALWAYS* intentionally
#   formatted so that there exists *NO* space between the
#   leading "#" delimiter and the following character.
# * Standard comments, which are *ALWAYS* intentionally
#   formatted so that there exists a space between the
#   leading "#" delimiter and the following character.
#
# This allows me to trivially differentiate between
# "#FIXME:" comments and standard comments at a glance.
# This is critical, because "#FIXME:" comments and
# standard comments are commonly situated adjacent to
# one another. With the autistic coding style,
# uncommenting and commenting commented-out code is trivial.
# Just <Ctrl-/> all lines formatted as standard comments.
# With the "ruff"-enforced coding style, however,
# uncommenting and commenting commented-out code is no
# longer trivial. Deciding which comments constitute
# "#FIXME:" comments and which comments constitute
# standard comments now consumes cognitive load,
# reducing developer efficiency and "flow state."
#
# Moreover, note how "ruff" fails to apply its own stylistic
# conventions uniformly. The outermost "# FIXME:" has a
# delimiting space, but the innermost "#FIXME:" does not.
# What are you even trying to accomplish here, "ruff"? *sigh*
    # FIXME: To support attribute-based deferred importation ala "lazy loading"
    # of heavyweight subpackages like "beartype.door" and "beartype.vale", it
    # looks like we'll need to manually add support here for that: e.g.,
    #    elif attr_name in {'cave', 'claw', 'door', 'vale',}:
    #        #FIXME: Dynamically import this attribute here... somehow. Certainly, if
    #        #such functionality does *NOT* exist, add it to the existing
    #        #"utilmodimport" submodule: e.g.,
    #        attr_value = import_module_attr(f'beartype.{attr_name}')
    #        attr_nondeprecated_name_to_value = {attr_name: attr_value}

# This autistic coding style...
    assert callable(make_code_check), f'{repr(make_code_check)} uncallable.'

# ...is vastly preferable to this needlessly sugary
# "ruff"-enforced coding style. Syntactic sugar like "!r"
# only impedes the readability and maintainability of
# f-strings, which are already difficult enough to read
# and maintain as it stands -- especially multi-line
# f-strings sprawling over multiple lines. Since there
# exists no "!r" syntax outside of f-strings,
# orthogonality in language design suggests that there
# should exist no "!r" syntax inside of f-strings either.
# This isn't simply stylistic. This is about debuggability
# and my own ability to easily maintain the corpulent
# @beartype cobebase against the forces of entropy and
# bit rot that continually assail it.
    assert callable(make_code_check), f'{make_code_check!r} uncallable.'

Please, @minmax
You know I love and appreciate you. But I won't voluntarily disembowel the @beartype codebase for anybody – not even you, bro. Emoji man sobs. :sob:

I fully understand that the effect of this pull request is an overkill.
Actually, the main goal is to show you what ruff and its ruleset can do (for example, it found a couple (1) of micro bugs https://github.com/minmax/beartype/commit/90dd5911f9ebda9eb865c71d71dd3f3e5faedb00).
99% of fixes from this pull request are done automatically and can be configured (for example, the rule adding " " after "#") or ignored (as it was in the first version of ruff.toml from the first commit).
As I understand it, you are generally not against connecting ruff to the project, but apparently in some minimal version of it. How do you feel about adding a config version with ignoring all existing errors and then creating a separate pull request for each of the rules?
Regarding this particular place - extra lines are "artifacts" of ruff check running without using ruff format.
If (and as I understand it, this is what you want) ruff format is not going to be used, then apparently it is not worth applying this particular rule fix.
            raise RuntimeError(
                msg
            )


Enhancement: Consider adding a service to allow date/time sync w/ HA

The keypads can display time when switched off.
Due to daylight saving change or just drift, the time displayed may not be accurate.
A simple service used in an automation to sync date and time would be useful
the command to be sent to nuvo GC multizone is " *CFGTIME yyyy,mm,dd,h,mm "
the response is a simple #OK or error (#?) in case of formatting error

There's a new beta release which contains a configure_time service to do this. See this for install details: https://community.home-assistant.io/t/legrand-nuvo-multi-room-audio-support/63483/102
The visual automation wizard has a datetime picker for manual setting, but you can switch to yaml mode and use:
service: nuvo_serial.configure_time
data:
  device_id: the-grandconcerto-id-filled-from-visual-device-picker
  datetime: '{{ now() | as_local() }}'

Hello there,
so great to hear from you.
Sorry for the delay in responding.
My HA install along with the Nuvo device has been working great.
Actually, got tired of the constant changes introduced by the HA devs and stopped updating pretty much for almost a year, so until today was using 2021.11.5 in docker in vm.
Rock solid this way.
Your new beta needed the most recent version, so found some time to test and migrate to the newest, but was rather painless.
With that also updated the nuvo integration, and so far everything seems to work fine. I love the new service to adjust the time.
The new switches and button are also very sleek.
Dashboards are not my forte, but may have to reconsider what these offer.
One minor aspect, probably more related to the nuvo library, is that slave zones are picked up as separate zones. Given that all adjustments regarding media source, volume and other adjustments are synced in the background by Nuvo, I do not see any benefit of having slave zones under their own. For now I just disable those entities that appear and are redundant.
Something else [#maybe]
After you made it clear that you are not willing to do anything with the nuvonet protocol, I looked into to use parts of your library code to create something that would integrate nuvonet players like the nuvonet adapter or music port (MPS4) in HA, as the serial connection and some basic protocol elements are very similar. HA also pivoted more toward media and and media_player integrations, and now has some browser and player builtin.
The concept I had in mind includes a library just like nuvo-serial, maybe called nuvonet-serial to establish the connection to the device, and a custom component media player, something like the universal media_player from HA, which would be linked with any existing media_player in HA, say spotify or logitechmediaserver. Upon of changes in select fields of the linked media_player, component would send metadata to nuvo keypads, or pass key presses and menu selections from keypads to HA.
This remains a need, but unfortunately is above my head. [/#maybe]
in any case, hope all is well. So glad that you are able to continue to improve your component. Is it still your plan to submit for inclusion in HA?
Yours trully, Lleo
-----Original message-----
From: @.>
Sent: Wednesday September 21st, 2022 0:23
To: sprocket-9/hacs-nuvo-serial @.>
Cc: Lorant Leopold @.>; Author @.>
Subject: Re: [sprocket-9/hacs-nuvo-serial] Enhancement: Consider adding a service to allow date/time sync w/ HA (Issue #3)
There's a new beta release which contains a configure_time service to do this. See this for install details: https://community.home-assistant.io/t/legrand-nuvo-multi-room-audio-support/63483/102
The visual automation wizard has a datetime picker for manual setting, but you can switch to yaml mode and use:
service: nuvo_serial.configure_time
data:
device_id: the-grandconcerto-id-filled-from-visual-device-picker
datetime: '{{ now() | as_local() }}'
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Actually, got tired of the constant changes introduced by the HA devs and stopped updating pretty much for almost a year, so until today was using 2021.11.5 in docker in vm.

Yeah it can be a pain.  I sometimes go long periods of not updating when everything is working well, but then when I do decide to upgrade there's more problems to fix so it's often better to upgrade more frequently.

One minor aspect, probably more related to the nuvo library, is that slave zones are picked up as separate zones. Given that all adjustments regarding media source, volume and other adjustments are synced in the background by Nuvo, I do not see any benefit of having slave zones under their own. For now I just disable those entities that appear and are redundant.

That's how you should configure things for your needs.  There's no harm or overhead in having the slave zone in HA, just disable the entity or don't bother including your dashboard.  That's what I do - I have all zones/sources included in HA, then only display on the dashboard the ones I'm interested in.  Using the default dashboard which includes every entity HA knows about is really just to get someone started using HA quickly, a custom dashboard is the way to go.

Is it still your plan to submit for inclusion in HA?

Likely at some point, but not right now while I'm still working on things -  releasing through HACS on my own schedule is much more flexible.

so far everything seems to work fine. I love the new service to adjust the time

That's great news!  Happy the new beta and time service is working well for you.
I'll close this issue now as it's resolved - all the best.


[api] [nuget.org] api/v2/FindPackagesById()/$count endpoint is broken

From @evil-shrike on September 27, 2017 13:12
Previously url api/v2/FindPackagesById()/$count worked - for example:
https://www.nuget.org/api/v2/FindPackagesById()/$count?includePrerelease=false&$top=160&id='Rx-Linq'&includeAllVersions=false
Now it returns 404 Not Found.
I couldn't find any announcements about such API breaking changes.
We use Artifactory extensively as out internal nuget server, it also is used as proxy for nuget.org (for CI builds). Now we're getting errors.
Copied from original issue: NuGet/Home#5947

Hey @evil-shrike, when was the last time you saw this endpoint work? I have dug back in the source code and found that it probably regressed with this commit https://github.com/NuGet/NuGetGallery/commit/3f92c55e42f2905dd415a8bb765fe4adef714c5a (circa February, 2016).
Either way, I have reproduced the issue and I am working on a fix.

@joelverhagen I can only say that on 2017-08-18 (18th of Aug) it started failing. Not sure about what was before that time.

I am looking at our server logs and it seems like Artifactory 5.2.1 and newer are using this non-existent FindPackagesById()/$count endpoint. As far as I can tell, this is a regression on the NuGet.org side. Thanks for letting us know,

@evil-shrike, this issue is now resolved on www.nuget.org.


feat: add pull request preview workflow

@iambumblehead
Let's try to use PR previews
in order to do this.

[ ] you would need to create a surge account
[ ] get a token $ surge token
[ ] create a secret in the github project SURGE_TOKEN with the value you got
[x] When all that is done we can then check it works

See links:

https://github.com/marketplace/actions/surge-pr-preview
https://surge.sh/help/getting-started-with-surge

sweet.. seems. to work 😸

hm

What version of node are you running?

node 15.0.1

try 14, hopefully you are using nvm and this is a simple switch

my work computer uses node 14. I'll use that "tomorrow" eg, in a few hours :)

i see the same warning as you and still able to create the account..
try typing your email and hit enter

super cool @lwhiteley


Errors when adopting to esphome dash board

I hope somebody can help me. I installed RATGDO25 on a esp32 d1 mini and integrated with HA no problems. I don't have a motion
sensor and I would like implement BT on the ESP32 for remote sensors. But when I try to adopt it to ESPHome dashboard I get the following errors: What am I doing wrong. I also posted this on the esphome-ratgdo site.

dov25-27e468.yaml
INFO Reading configuration /config/esphome/ratgdov25-27e468.yaml...
INFO Updating https://github.com/ratgdo/esphome-ratgdo@None
INFO Updating https://github.com/ratgdo/esphome-ratgdo@None
ERROR Unable to load component ratgdo.number:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/74f605c3/components/ratgdo/number/init.py", line 23, in
number.number_schema(RATGDONumber)
AttributeError: module 'esphome.components.number' has no attribute 'number_schema'
ERROR Unable to load component ratgdo.number:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/74f605c3/components/ratgdo/number/init.py", line 23, in
number.number_schema(RATGDONumber)
AttributeError: module 'esphome.components.number' has no attribute 'number_schema'
ERROR Unable to load component ratgdo.number:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/74f605c3/components/ratgdo/number/init.py", line 23, in
number.number_schema(RATGDONumber)
AttributeError: module 'esphome.components.number' has no attribute 'number_schema'
ERROR Unable to load component ratgdo.number:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/esphome/.esphome/external_components/74f605c3/components/ratgdo/number/init.py", line 23, in
number.number_schema(RATGDONumber)
AttributeError: module 'esphome.components.number' has no attribute 'number_schema'
INFO Detected timezone 'America/New_York'
Failed config
number.ratgdo: [source /config/esphome/.esphome/packages/74f605c3/base.yaml:144]
Platform not found: 'number.ratgdo'.
platform: ratgdo
id: ratgdov25_rolling_code_counter
type: rolling_code_counter
entity_category: config
ratgdo_id: ratgdov25
name: Rolling code counter
mode: box
unit_of_measurement: codes
number.ratgdo: [source /config/esphome/.esphome/packages/74f605c3/base.yaml:153]
Platform not found: 'number.ratgdo'.
platform: ratgdo
id: ratgdov25_opening_duration
type: opening_duration
entity_category: config
ratgdo_id: ratgdov25
name: Opening duration
unit_of_measurement: s
number.ratgdo: [source /config/esphome/.esphome/packages/74f605c3/base.yaml:161]
Platform not found: 'number.ratgdo'.
platform: ratgdo
id: ratgdov25_closing_duration
type: closing_duration
entity_category: config
ratgdo_id: ratgdov25
name: Closing duration
unit_of_measurement: s
number.ratgdo: [source /config/esphome/.esphome/packages/74f605c3/base.yaml:169]
Platform not found: 'number.ratgdo'.
platform: ratgdo
id: ratgdov25_client_id
type: client_id
entity_category: config
ratgdo_id: ratgdov25
name: Client ID
mode: box
esphome: None
name: ratgdov25
[friendly_name] is an invalid option for [esphome]. Please check the indentation.
friendly_name: RATGDOv2.5 None
name_add_mac_suffix: False
project:
name: ratgdo.esphome
version: 2.5
build_path: .esphome/build/ratgdov25
wifi: [source /config/esphome/.esphome/packages/bf922882/v25board_esp32_d1_mini.yaml:48]
expected a dictionary.
ap: [source /config/esphome/.esphome/packages/bf922882/v25board_esp32_d1_mini.yaml:49]

Sorry mate, but this is an ESPHome issue that wouldn't be impact by this project.


Unlock or extend the range of acceptable PhantomJs modules

See: https://github.com/jdcataldo/grunt-mocha-phantomjs/issues/36#issuecomment-121789305

:+1: what's the deal with this? Shouldnt the dep be defined as ^1.9.1 instead of ~1.9.1? This is causing major breakage in our tools, especially with gulp-mocha-phantomjs.

The issue is detailed in #167. PhantomJS 1.9.8 has a bug that is causing breaks for other people.
I have republished 3.5.6 with the ~1.9.8 depedency range, and I'll set the 1.9.1 - 1.9.7-15 for 3.6.0.

Thanks!

Thank you!


Quiz exercises: Fix batch quiz editing when batch is added

Checklist
General

[ ] This is a small issue that I tested locally and was confirmed by another developer on a test server.
[x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
[x] I chose a title conforming to the naming conventions for pull requests.

Client

[x] I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
[x] I documented the TypeScript code using JSDoc style.
[ ] I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Description

Steps for Testing

Prerequisites:

1 Instructor
2 Students
1 Programming Exercise with Complaints enabled

Log in to Artemis
Navigate to Course Administration
...

Review Progress

Code Review

[ ] Review 1
[ ] Review 2

Manual Tests

[ ] Test 1
[ ] Test 2

Test Coverage

Screenshots

Codecov Report

Merging #6013 (4efd72b) into develop (9042648) will increase coverage by 4.14%.
The diff coverage is 78.94%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #6013      +/-   ##
=============================================
+ Coverage      75.76%   79.91%   +4.14%
- Complexity         0    12379   +12379
=============================================
  Files           1118     2125    +1007
  Lines          44457    84511   +40054
  Branches        8380    12681    +4301
=============================================
+ Hits           33684    67539   +33855
- Misses          5600     9437    +3837
- Partials        5173     7535    +2362

Impacted Files
Coverage Δ

.../exercises/quiz/shared/quiz-manage-util.service.ts
62.50% <62.50%> (ø)

...ises/quiz/manage/quiz-exercise-detail.component.ts
79.79% <85.71%> (+0.08%)
:arrow_up:

...p/exercises/quiz/manage/quiz-exercise.component.ts
89.65% <100.00%> (+1.51%)
:arrow_up:

...rtemis/web/rest/hestia/CoverageReportResource.java
80.00% <0.00%> (ø)

.../java/de/tum/in/www1/artemis/domain/Authority.java
85.71% <0.00%> (ø)

...temis/config/ProgrammingLanguageConfiguration.java
97.91% <0.00%> (ø)

...w1/artemis/service/connectors/ConnectorHealth.java
88.00% <0.00%> (ø)

...emis/domain/StaticCodeAnalysisDefaultCategory.java
94.73% <0.00%> (ø)

.../tum/in/www1/artemis/service/TextBlockService.java
95.83% <0.00%> (ø)

...rs/bitbucket/dto/BitbucketChangeActivitiesDTO.java
100.00% <0.00%> (ø)

... and 999 more

Flag
Coverage Δ

client
75.77% <78.94%> (+<0.01%)
:arrow_up:

server
84.52% <ø> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9042648...4efd72b. Read the comment docs.


Fix channel drawer lagging

Summary
Sorry that I forgot that part of logic, without it channel drawer is lagging on channel switch.
I 100% tested it this time.
It clearly fixes the effect of lagging drawer close.
Ticket Link
[Please link the GitHub issue or Jira ticket this PR addresses.]
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] Added or updated unit tests (required for all new features)
[ ] All new/modified APIs include changes to mattermost-redux (please link)
[ ] Has UI changes
[ ] Includes text changes and localization file updates

Device Information
This PR was tested on: [Device name(s), OS version(s)]
android 7, samsung s7
Screenshots
[If the PR includes UI changes, include screenshots (for both iOS and Android if possible).]

224:1   error  Trailing spaces not allowed                          no-trailing-spaces
226:39  error  Too many nested callbacks (3). Maximum allowed is 2  max-nested-callbacks
233:16  error  Trailing spaces not allowed                          no-trailing-spaces
eslint... >.<


Update ROS interface node to ensure alignment with the other teams

The "contract" in communication is constantly updated, make sure units and such align. TODO: Connect with Brielle/Simon to find relevant confluence pages with documentation.

Resolved in #203.


Update docs to use Kubernetes 1.17 as the minimum version

Changes
As of v0.20, Tekton Pipelines requires Kubernetes 1.17
(https://github.com/tektoncd/pipeline/releases/tag/v0.20.0), but the
docs were not updated. This updates all references of Kubernetes 1.16 to
1.17 as necessary.
/kind documentation
Fixes #3803
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[n/a] Includes tests (if functionality changed/added)
[x] Includes docs (if user facing)
[x] Commit messages follow commit message best practices
[x] Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.
Double check this list of stuff that's easy to miss:

If you are adding a new binary/image to the cmd dir, please update
the release Task to build and release this image.

Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
#3700
Additional Notes
Once this is submitted, we probably want to cherrypick this commit onto the release branches so that the tekton.dev docs are updated as well.

/release-note none

/release-note-none

/release-note-none

/lgtm


Manifest file is always named unkown-1337.json even if network id is different

When using the @openzeppelin/truffle-upgrades plugin, it always calls the manifest file unkown-1337.json if the network isn't known, even if the network id is different to 1337.
To test this you can run ganache with different network ids. eg. ganache-cli --networkId 321
This behaviour also happens for other networks (not just ganache), eg binance smart chain testnet has network id 97, but it still calls the manifest file unkown-1337.json.

Hi @JasoonS, this is because the number we use is not the network id but the chain id. There seems to be a --chainId option in Ganache according to https://github.com/trufflesuite/ganache-core/issues/515#issuecomment-700301787. Can you try that and let me know if it achieves the effect you want?
As for binance testnet, is this a local network like Ganache or a remote network you're connecting to?

Feel free to reopen is this is not solved.


Noticeably slow file renaming and file deletion

Please check that this issue hasn't been reported before.

[X] I searched previous Bug Reports didn't find any similar reports.

Steps to reproduce

My vault is kinda large (~1120 notes).
First I will open a note that have a Tasks query (from all daily notes so this is quite of a big query).
Then on another pane I will open a note.
Then file renaming will take around 4-5 seconds (which is incredibly slower than turning the plugin off (0.5 second)).
Note that the Tasks query and the note I renamed (or deleted) isn't related (so the query shouldn't be reloaded or sth).

I noticed this only recently.
Expected Behavior
It should be fast as normal (0.5 second).
Current behaviour
File renaming and deletion took around 4-5 seconds
Which Operating Systems are you using?

[ ] Android
[ ] iPhone/iPad
[X] Linux
[ ] macOS
[ ] Windows

Obsidian Version
1.7.7
Tasks Plugin Version
7.13.0
Checks

[X] I have tried it with all other plugins disabled and the error still occurs

Possible solution
Probably something related to reindexing the entire cache when a file is renamed, but I'm not sure.

Maintainer note from @ClareMacrae: I have edited the 'Steps to reproduce' to convert them to a bullet list, for readability...

This is odd. I rename notes fairly often without performance problems, and have around 9,000 notes in my vault.
I understand that this is a problem for you - so we need to figure out what is different about your vault.

First I will open a note that have a Tasks query (from all daily notes so this is quite of a big query).

Please first run the Show debug info command and paste the output in here.
Use the GitHub website, don't paste the info to an email, so that readable formatting is preserved...

Oh one more thing, the query is
root includes Periodic
status.name includes unprocessed
group by filename
short mode

I changed it to
filter by function task.file.folder.includes("01. Periodic/2024")
status.name includes unprocessed
group by filename
short mode

which make things significantly better. Maybe the root ... filter forces an update for file renaming or deletion?

As for the debug info
SYSTEM INFO:
	Obsidian version: v1.7.7
	Installer version: v1.7.5
	Operating system: #1-NixOS SMP PREEMPT_DYNAMIC Fri Nov  8 15:31:04 UTC 2024 6.11.7
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: light
	Community theme: Primary v2.10.0
	Snippets enabled: 5
	Restricted mode: off
	Plugins installed: 41
	Plugins enabled: 22
		1: Focus Mode v1.11.5
		2: Tasks v7.13.0
		3: Templater v2.9.1
		4: Supercharged Links v0.12.1
		5: Style Settings v1.0.9
		6: Spaced Repetition v1.13.2
		7: Reveal Active File Button v2.0.3
		8: Periodic Notes v0.0.17
		9: Quick Switcher++ v4.6.2
		10: QuickAdd v1.11.5
		11: Another Quick Switcher v12.1.0
		12: Calendar v1.5.10
		13: Commander v0.5.2
		14: Dataview v0.5.67
		15: Day Planner v0.27.0
		16: Google Photos v1.6.8
		17: Hotkeys for specific files v1.4.1
		18: Iconize v2.14.4
		19: List Callouts v1.2.9
		20: Meld Encrypt v2.3.7
		21: Meta Bind v1.2.5
		22: Omnisearch v1.25.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Thanks for the info.
If you have said how many tasks are shown in the open query, I have missed it.
When you rename the file in question, how many other files contain links to that file, such that the other files are edited to update their links to the renamed file?
I am asking because currently Tasks is a bit inefficient in redrawing search results, in that for each edited file that contains one or more tasks, it redraws all open search results.
And the speed of redraw of search results is almost entirely dependent on the number of tasks matching the search.
So if the file you rename is linked to by 20 other files, that is 21 files that have been edited. And if they all contain any tasks, that is 21 redraws of all your open queries...
It will be made more efficient at some point.

The number of tasks shown is ~80 (but it only filter out tasks begin with [>]). As for the raw number of tasks it can reach ~500 tasks though.
I tested on newly created file so it doesn't relate anything to the query.

The culprit was the filtering root includes ... so when a note that in the root directory changed (either by deletion or renaming), would Tasks redrawing the results again?

That's a surprise to me, it doesn't match my understanding of the code.
You might want o try turning off your 5 snippets and switching to the Default theme to do an experiment and see if that speeds up rendering. I have seen user reports of some snippets and/or themes really impacting rendering performance...
For example:

Tracked it down to the theme.  Default and Anapucin themes it takes 10 seconds to load, Minimal, 20 seconds, Border almost a minute, Fancy a Story almost a minute and a half

Oh, it's probably the snippets' fault. I couldn't reproduce the lag anymore with all the snippets turned off. Thanks for your time, btw.

Oh, one more question: are there any benchmarks or guides on creating fast queries (or fast filtering)? Some filters might be faster than others, right?

Oh, one more question: are there any benchmarks or guides on creating fast queries (or fast filtering)? Some filters might be faster than others, right?

Not yet.

https://github.com/obsidian-tasks-group/obsidian-tasks/issues/891

Thanks for the update.
It would really help if you work out which snippet was the culprit, and paste it in here, so I can advise what to avoid.


Aspire component in VS installer needs better description

Moved this from internal VS work item since this string comes from the workload itself...
the suggestion is "Need a better description instead of just the title reproduced.   would probably suffice: ".NET SDK Workload including templates for building Aspire applications"

Recommend (consistent with others): ".NET SDK workload for building Aspire cloud-native web applications"
https://github.com/dotnet/aspire/blob/6fe5242f1ccc8352809519643d1e4402b0cd538b/eng/workloads/workloads.csproj#L57

@joperezr closing as complete. LMK if I misunderstand.

Fixed in the final 8.0 GA VS insertion PR


Bring back line ending correction

Relates to #257, #251
Must say that I’m not sure if I’m super happy with that because using the line ending corrector was a no brainer before. It was bundled into the gulp default task as well as the watch task.
So I’m asking what to do about it.
Ideas:

Document that with more details in the README?

I guess people won’t read this 😕

Add an additional npm script like build ?

So the scripts section could look like:"scripts": {
    "prepublish": "nsp check",
    "pretest": "eslint **/*.js --fix",
    "test": "jest",
    "fixLineEndings": "lec lib/cli.js"
    "build": "npm run fixLineEndings && npm test"
}

Any feedback appreciated 😗

Initialy we fix line endings in a prepublish gulp task.
So
"scripts": {
    "prepublish": "lec lib/cli.js && nsp check",
    "pretest": "eslint **/*.js --fix",
    "test": "jest"
}

Jup, also thought about that.
But Isn’t it a bit weird to run CLI which potentially changes files in the »prepublish« phase?
Reason: This might change a file which make it in the changed state into your npm release but the changes aren’t in your version control at this time?
Get what I’m trying to say?

This might change a file which make it in the changed state into your npm release but the changes aren’t in your version control at this time

Agree :thinking:

But that's how it was before. This really is a hot fix for a common mistake that'll break a package on OSx

Alright. Pushed another commit to change that.

great :)


Speech Edit Glitch

There is a sporadically occurring bug that causes edited speech to be applied to all states instead of just the one being edited.
It is not easily reproduced but might have something to do with debouncing of edits.

Seems like this only happens when selecting/replacing/pasting text

Finally got it. Apparently my way of setting the contents of a textarea was wrong. I should have used v-bind:value but i used v-text.


Angular2 templates : use () and [] to surround text

VSCode Version: 1.7.1
OS Version: MacOs X

This is more a question than a bug.
I'm working with Angular2 and in html templates i got some problem of productivity.
When i select some text like this :

Then i press the quote " , it surround the text :

If i press instead parenthesis ( or this bracket [ it just simply delete the text :

I'm looking for a config or something to allow me to surround text with more than simple or double quotes.
Or maybe an extension can help doing that ?
Thanks for considerating

This happens in a normal html file as well.

This feature is decided by language configuration surroundingPairs, see code here https://github.com/Microsoft/vscode/blob/master/extensions/html/language-configuration.json#L18. IMHO brackets surrounding is not a generic thing for HTML, it would be better to customize this setting in a specific Angular 2 extension, make sense?
I'd like to close it first here and you may want to file feature request to existing Angular extensions out there https://marketplace.visualstudio.com/search?term=angular&target=VSCode&sortBy=Relevance or even create your own extension! Thanks!


Error while creating mount source path: mkdir permission denied

Describe the bug
Summary: When trying to create a new instance with Canasta CLI
sudo canasta -v create -i 'bubble' -w "Bubble" -a admin -o compose

I get this error:
Error response from daemon: error while creating mount source path '/host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images':
 mkdir /host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images: permission denied

Note that this is a almost a normal path on my filesystem, if you were to remove the /host_mnt at the beginning it would be valid.
Log:
brent@MacBook-Pro ~/c/d/Canasta-CLI (main)> sudo canasta -v create -i 'bubble' -w "Bubble" -a admin -o compose
Password:
2024/09/09 14:04:34 Using /etc/canasta for configuration...
Setting verbose
Enter the admin password (Press Enter to get saved password or, if one does not exist, autogenerate a password):
Retrieved admin password from /Users/brent/code/docks/Canasta-CLI/.admin-password
⠋ Creating Canasta installation 'bubble'...  [0s] Successfully written to wikis.yaml
Cloning the compose stack repo to /Users/brent/code/docks/Canasta-CLI/bubble
git clone https://github.com/CanastaWiki/Canasta-DockerCompose.git /Users/brent/code/docks/Canasta-CLI/bubble
Cloning into '/Users/brent/code/docks/Canasta-CLI/bubble'...
⠦ Creating Canasta installation 'bubble'...  [0s] Copying /Users/brent/code/docks/Canasta-CLI/wikis.yaml to /Users/brent/code/docks/Canasta-CLI/bubble/config/wikis.yaml
cp /Users/brent/code/docks/Canasta-CLI/wikis.yaml /Users/brent/code/docks/Canasta-CLI/bubble/config/wikis.yaml
Copying /Users/brent/code/docks/Canasta-CLI/bubble/.env.example to /Users/brent/code/docks/Canasta-CLI/bubble/.env
cp /Users/brent/code/docks/Canasta-CLI/bubble/.env.example /Users/brent/code/docks/Canasta-CLI/bubble/.env
Copying /Users/brent/code/docks/Canasta-CLI/bubble/config/wikis.yaml to /Users/brent/code/docks/Canasta-CLI/bubble/.env
cp /Users/brent/code/docks/Canasta-CLI/bubble/config/SettingsTemplate.php /Users/brent/code/docks/Canasta-CLI/bubble/config/Bubble/Settings.php
Starting Canasta
docker compose up -d
⠧ Creating Canasta installation 'bubble'...  [6s]  Network bubble_default  Creating
⠇ Creating Canasta installation 'bubble'...  [6s]  Network bubble_default  Created
 Volume "bubble_mysql-data-volume"  Creating
 Volume "bubble_mysql-data-volume"  Created
 Volume "bubble_sitemap"  Creating
 Volume "bubble_sitemap"  Created
 Volume "bubble_elasticsearch"  Creating
⠏ Creating Canasta installation 'bubble'...  [6s]  Volume "bubble_elasticsearch"  Created
 Volume "bubble_caddy-data"  Creating
 Volume "bubble_caddy-data"  Created
 Container bubble-db-1  Creating
 Container bubble-caddy-1  Creating
 Container bubble-varnish-1  Creating
 Container bubble-elasticsearch-1  Creating
⠙ Creating Canasta installation 'bubble'...  [7s]  Container bubble-varnish-1  Created
⠹ Creating Canasta installation 'bubble'...  [7s]  Container bubble-db-1  Created
 Container bubble-caddy-1  Created
 Container bubble-elasticsearch-1  Created
 Container bubble-web-1  Creating
⠼ Creating Canasta installation 'bubble'...  [7s]  Container bubble-web-1  Created
⠴ Creating Canasta installation 'bubble'...  [7s]  Container bubble-varnish-1  Starting
 Container bubble-elasticsearch-1  Starting
 Container bubble-db-1  Starting
 Container bubble-caddy-1  Starting
⠸ Creating Canasta installation 'bubble'...  [8s]  Container bubble-elasticsearch-1  Started
⠴ Creating Canasta installation 'bubble'...  [8s]  Container bubble-db-1  Started
 Container bubble-web-1  Starting
⠧ Creating Canasta installation 'bubble'...  [8s]  Container bubble-varnish-1  Started
⠇ Creating Canasta installation 'bubble'...  [8s]  Container bubble-caddy-1  Started
⠋ Creating Canasta installation 'bubble'...  [9s] Error response from daemon: error while creating mount source path '/host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images': mkdir /host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images: permission denied
 Network bubble_default  Creating
 Network bubble_default  Created
 Volume "bubble_mysql-data-volume"  Creating
 Volume "bubble_mysql-data-volume"  Created
 Volume "bubble_sitemap"  Creating
 Volume "bubble_sitemap"  Created
 Volume "bubble_elasticsearch"  Creating
 Volume "bubble_elasticsearch"  Created
 Volume "bubble_caddy-data"  Creating
 Volume "bubble_caddy-data"  Created
 Container bubble-db-1  Creating
 Container bubble-caddy-1  Creating
 Container bubble-varnish-1  Creating
 Container bubble-elasticsearch-1  Creating
 Container bubble-varnish-1  Created
 Container bubble-db-1  Created
 Container bubble-caddy-1  Created
 Container bubble-elasticsearch-1  Created
 Container bubble-web-1  Creating
 Container bubble-web-1  Created
 Container bubble-varnish-1  Starting
 Container bubble-elasticsearch-1  Starting
 Container bubble-db-1  Starting
 Container bubble-caddy-1  Starting
 Container bubble-elasticsearch-1  Started
 Container bubble-db-1  Started
 Container bubble-web-1  Starting
 Container bubble-varnish-1  Started
 Container bubble-caddy-1  Started
Error response from daemon: error while creating mount source path '/host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images': mkdir /host_mnt/Users/brent/code/docks/Canasta-CLI/bubble/images: permission denied

A fatal error occured during the installation.
Do you want to keep the files related to it? (y/n)
n
Removing containers

System info

Canasta-CLI: built from current master
MacOS 12.7.6 Monterey

This seems like an issue with the CLI, not Canasta itself.


Deprecate Jupyter Spark Monitor init action for 2.0+

Reason: Jupyter Spark Monitor is not supported for Spark 3.

/gcbrun


v2.9.1: Cannot find module 'colors'

After successful install via: npm install -g:
[12:51:31] eviljordan@shruggy ../dev/sfra/sfcc-ci $ sfcc-ci -V
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'colors'
Require stack:
- /Users/eviljordan/dev/sfra/sfcc-ci/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/eviljordan/dev/sfra/sfcc-ci/cli.js:8:14)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/eviljordan/dev/sfra/sfcc-ci/cli.js' ]
}

hi @EvilJordan , tried to reproduce this:
$ git clone git@github.com:SalesforceCommerceCloud/sfcc-ci.git issue-290
$ cd issue-290
$ npm install -g
added 223 packages from 196 contributors in 6.79s
$ sfcc-ci -V
2.9.1

which succeeds here. Any detailed info you share to reproduce this?

Hmmm, I am now getting respectable build results by doing the following:
$ git clone git@github.com:SalesforceCommerceCloud/sfcc-ci.git
$ cd sfcc-ci
$ sudo npm install # this appears to be necessary so snyk can run

However, which sfcc-ci is pointing to /opt/local/bin/sfcc-ci, which in turn is a symlink to: sfcc-ci@ -> ../lib/node_modules/sfcc-ci/cli.js which in turn is: sfcc-ci@ -> ../../../../Users/eviljordan/dev/sfra/sfcc-ci (the directory where everything was just built).
Running sfcc-ci -V outputs 2.7.2, and I'm not sure why...

@EvilJordan thanks! That seems to explain, why the error is thrown as it's using an older CLI version. Were you able to check, why it is using the older version although you just cloned from the repo using the default branch master? You can double check, by cd into the directory you just cloned into and then run
$ ./cli.js -V

If which sfcc-ci is pointing to an older version, you can also try running npm link in the fresh clone.


Ban Appeal

Unban me.

You know perfectly well why you were banned before. You just happened to log onto the reset server before we instituted our old ban settings. Furthermore, your appeal is quite demanding. The old ban will stand.

I thought it was pretty convincing, took me all night to write that appeal.


Weird delegate issue

I'm facing a weird issue with delegates of the view, I added the function and I still get it's required and added wrongly when click fix, anyone knows what's wrong?

it keeps adding same function

Can you please provide a sample project where this issues can be reproduced?

Closing due to inactivity.


NFTikets(NFT Tickets) Marketplace

NFTikets(NFT Tickets) Marketplace

Website
https://nftikets.io/
Grant category
Please select one or more of the:

[ ] Open source maintenance
[#] Developer tools/services
[ ] Educational material

Description
Nftikets has changed NFT minting narrative with our wallet-less minting architecture giving web2 users massive adoption of our e-ticketing Dapp. it is on this note we are moving forward to build the NFtikets marketplace where event organizers and ticket owners can add more value to their Tickets by adding videos, audio, and picture to these NFTs and reselling them in the marketplace if they wish or holding on to them for a later time.
It is also important to mention that the event organizer who originally sold these Tickets gets a Royalty of 5% every time the ticket is sold in the marketplace creating more value for the organizers even after the event.
An entire economy of ticket trading will be birthed from this as individual tickets will maintain their value long after the events are over.
Problem Statement

Tickets lose value post-event
Reselling tickets is usually a difficult task as it has to be done offline.
Event organizers have no control and make little to no profit over ticket Scalping.
Tickets have no beyond what has been printed.
Users are required to connect their wallets to an NFT marketplace (opensea, rarible and etc) before purchasing NFTs.

Target audience

Event organizers looking to create, manage and sell tickets to a global audience without avoiding payment portal issues.
Ticket Scalpers looking to make a profit
Tickets holders looking to increase the value of their tickets

## Evidence for the need
Proposed solution

A user marketplace that allows the selling and buying of NFTs
Allow users to purchase tickets without going through the hassle of connecting their wallet, payments can be made via debit or credit cards and crypto.
Increase the value of Tickets for both attendees and event organizers - pre and post-event.
Give event organizers the opportunity of profiting from Ticket scalping.
Create an NFT marketplace with high adoption for web2 users as no wallet connection or technicality is needed to trade NFTs.

Impact

Create a better profitability model for event organizers to make more revenue via ticket reselling.
Create accountability for Ticket scalpers
The marketplace will present a new opportunity for ticket trading
Reduce redundancy of tickets post events by giving real-world value to event ticketing via NFTs
Reduce carbon footprint due to less paper printing

In what ways does this benefit the broader Flow developer ecosystem?

Increase the use case for the flow ecosystem
More users interacting with the flow blockchain

Milestones and funding

Note: You can leave the USD proposal empty / "TBD". Please consider adoption and/or maintenance milestones at the end of your project.

Milestone
Deliverables
Timeline
Risks
USD proposal

1 - MVP
Marketplace build with Credit/Debit card checkout. Royalty on tickets sells
6 weeks
-
16850

2- Maintenance
Resolving issuing and fixing bugs
6 weeks
-
9270

Team

Name
Role
Bio
Contact

Godwin Jimmy
Product Manager
As a Product Manager, I have managed the development and deployment of various blockchain applications some of which are: Plutoswap (DEX), Dantown (https://www.dantownms.com/), Social Stack (https://www.socialstack.co), Cyrus NFT (https://www.cyruspahlavi.com/), Zoo NFT  (https://zoolabs.io/).
<EMAIL_ADDRESS>

David Esser
Advisor(Product)
Chief Product Officer at Minterestt, Serial entrepreneur building blockchain, Defi, internet, mobile, and IoT applications Specialties: -- Product Management for enterprise blockchain, internet, and mobile applications.-- Strategy and implementation for complex technology products.-- Building & leading competent teams of technologists to deliver amazing quality and productivity results
<EMAIL_ADDRESS>

Joseph Iroghama
Lead Frontend
A frontend engineer with 3 years of experience in javascript, react, next, web3.js and threejs.
<EMAIL_ADDRESS>

Helen
UI/UX Designer
UI/UX design with 4 years of experience in design.
<EMAIL_ADDRESS>

Gift Elenwo
Frontend Developer
A computer science graduate with 6 months of experience in javascript and react
<EMAIL_ADDRESS>

Juliet Babatunde
Content Developer
Content Developer and Copyright with 2 years experience.
<EMAIL_ADDRESS>

Good to see the progress on the project and sorry for the delayed response @Jimmygodwin.
We reviewed this new proposal in detail and decided to pass because it is unclear if the impact on developer ecosystem will be high enough. We do recognize the need for use cases emerging as examples for developers. However, the deliverables aren't going to directly help developers become more productive on Flow.
Thanks for taking the time to submit your proposal and feel free to reach me directly on Discord in case you have further questions: alx-flw.find#6198.


Use Range instead of start & end in Rope impl

Closes #571
Related to #575
Realized that slice_to_string isn't a function that returns an iterator, as per the request in #571 - maybe I should change that back?
Hoping I'm on the right track here. :)
cc @cmyr

TODO:

[x] Change functions returning iterators, so they now use RangeBounds instead of start and end
[x] Update tests
[x] Update external calls to changed functions
[x] Wait for RangeBounds to become stable

Interesting, I hadn't noticed that this wasn't stabilized. I think in that case we should probably wait for it to land. :(

So let's hold this now, waiting for https://github.com/rust-lang/rust/issues/30877

Okay, I believe this is on track to stabilize soon; let's wait until that happens, and then can give this a proper review. :)

Fairly sure this was stabilized in 1.28 - any thoughts on when we'll be moving on to that version of rust for the CI?

@LiHRaM good question. If this is stable in 1.28 that's a reasonably good argument to bump shortly; and then our next major bump will probably be for the rust 2018 release in early december? I don't believe there's any blocking reason for us to stay on 1.26, so if going to 1.28 would get this merged then that sounds good to me. @raphlinus?

@LiHRaM something else before this gets merged: we'll need to update the .travis.yml file to build with rust 1.28, and we'll need to update the readme to note the new minimum version.

Alright. Pretty sure I've made all changes as requested. I think it's ready to merge?
@cmyr


Include changes from QuantumCitations.jl

See https://github.com/JuliaQuantumControl/QuantumCitations.jl. Personally I think everything there should be included here. Perhaps it would be easier to rename that repository and move it here instead if replaying all commits? Thoughts @goerz?

Given that the commit histories are completely disjoint now, one option would be to do the following:

Make a commit to this repo which simply deletes everything
Replay all current commits in https://github.com/JuliaQuantumControl/QuantumCitations.jl in this repository

This would preserve the full "history" inside this repo, which I think would be a nice thing to do. I did this once for https://github.com/JuliaSparse/Metis.jl in https://github.com/JuliaSparse/Metis.jl/pull/29

Oh, right, I forgot I did a "hard fork". The "initial commit" of QuantumCitations is a copy of https://github.com/ali-ramadhan/DocumenterCitations.jl/tree/fb9e2c253c6b714379990e99636a4d815dea95fc, though, so I can restore this as a proper branch for the QuantumCitations code off DocumenterCitations, and thus keep the full history of both repositories.
On that branch, I'd also have to make additional changes to properly rename QuantumCitations back to DocumenterCitations. This includes changing the name in the README and documentation, but also changing the discussion away from "this is a fork DocumenterCitations with these additional features…"), as well as changes to the CI setup.
There are two caveats:

Do we want to keep DocumenterCitations' current default author-year style citation? As far as the QuantumCitations code is concerned, this is trivial (just change the default style=:numeric to style=:authoryear), but obviously https://juliaquantumcontrol.github.io/QuantumCitations.jl/stable/syntax/ should be adapted to illustrate whatever the default style is. Changing to author-year as the default would create the least amount of friction for existing DocumenterCitations users, but takes more work on my end to rewrite the documentation.

Should we wait for Documenter 0.28 to come out? The plugin will have to adapt fairly substantially to the new Documenter internals, and if we're doing one big change-almost-everything-PR, we might as well do everything at once. On the other hand, if Documenter 0.28 isn't coming out for a while, or if we foresee that a lot of people will want to stick to Documenter 0.27.x for some time, we could also merge the projects now, and then adapt to the new Documenter internals separately.

I'm not sure if I'll get around to updating the documentation for the merge before JuliaCon, so we have some time to think about this.

I like numeric as the default, but it is easy to customize anyway so it doesn't matter much. I would assume we would make a new release anyway, so I think it is fine to change the default if you want.
I started looking at upgrading to 0.28 (well, 1.0) at least, I don't expect any more breaking changes. Might not be worth it to get a more full featured DocumenterCitations package out for 0.27. Can point people to your package in that case.

If you don't mind, I am happy to give the history merge a go.

Just wanted to say thank you, guys! I really appreciate someone is taking care of this!


Add guidance to image cropping feature

On the back of the accessibility review, adding guidance text so that non-sighted people know they  can skip the cropping.
Trello card
⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠
Follow these steps if you are doing a Rails upgrade.

lgtm!

Thanks, David. Was just waiting for Rosa's final OK here. Will merge.


Merge KV 2.2 Changes to riak_kv_vnode to TS

Hopefully this is the final change of Riak KV 2.2

+1
The changes by way of "reasoning about" are good. Validating the changes for zero negative impact for Riak TS is conflated w/ previously merged content into riak_ts-develop causing riak_test issues, so IMHO merge and address the issues from previous merges separately immediately.

@borshop merge


History: Changing historyIndex triggers updateTab on load (which increases historyIndex erroneously)

When navigating backwards/forwards a new history entry is added instead of reducing the history index by one, to show that its relative place in the history

So, actually the updateTab triggerd on load when loading the new history updates the tab (as it should).
But we don't want this to be added to history, nor change the index...

To check, try adding new urls, then progress backwards a few times / forwards a few times.
Things should go in order now (where history was being broken previous)

QA verified


Port to ROS2

This pull request is to preserve the wincapture.cpp (which is for the WMF raw integration) and add the ROS2 wrapper onto it. Since the interface is largely different between ROS1 and ROS2, the new code on ROS2 part is pretty much a rewrite.

Should this be merged into the Foxy branch instead of the ros2 branch?


I would like to suggest more sounds when the time expires.

Like a school bell ringing
Or anything really, cause the default sounds are so subtle that sometimes I miss them. C:

I agree! A selector for additional sounds would be great
Also, the ability to choose a custom sound would be even better! Something simple in the GUI for us less-technical users, or maybe a folder where you can drop sound files in the appropriate format

Agree with this opinion!!

Yes, we really need this. I want to play my own music files during the break or during the focus.


Create seaprate PCP img and deployment

PR Title :boom:
Please title this PR with a summary of the change, along with the JIRA card number.
Suggested formats:

Fixes/Refs #RHIROS-XXX - Title
RHIROS-XXX Title

Feel free to remove this section from PR description once done.
Why do we need this change? :thought_balloon:
Please include the context of this change here.
Documentation update? :memo:

[ ] Yes
[ ] No

Security Checklist :lock:
Upon raising this PR please go through RedHatInsights/secure-coding-checklist
:guardsman: Checklist :dart:

[ ] Bugfix
[ ] New Feature
[ ] Refactor
[ ] Unittests Added
[ ] DRY code
[ ] Dependency Added
[ ] DB Migration Added

Additional :mega:
Feel free to add any other relevant details such as links, notes, screenshots, here.

/retest

This is not needed anymore as PCP images are available based on UBI which can be used directly, closing this one


Update README.md

Hi , this is approved project. I repeat 2 weeks so just sending it for dashboard submit this time again

Approved ✔
Hi @VuDej
Congratulations on completing this project! 👏🏼 🎉
You have correctly implemented all of the requirements📃 correctly and without any errors⚠ or bugs🪲.
Cheers and good luck in your next milestones! 🍀
Feel free to leave any questions or comments in the PR thread(don't forget to tag me 😄) if something is not 100% clear.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Reimplement default profile / binding builder as function

https://github.com/JujuAdams/Input/commit/5b2116a061e6af925a858edde0a4a365e74f9938


fix errors on non-UTF-8 encodings

Description
Some files failed with "invalid byte sequence in UTF-8 (ArgumentError)"
when BlobHelper#lines was called. Some problematic files include
UTF-16LE samples such as test/fixtures/Data/utf16le.
Errors were not present when computing stats from git repositories,
since git blobs are always read as ASCII-8BIT and that was working
correctly. However, when using FileBlob, encoding could be ASCII-8BIT,
UTF-8 or other, depending on the runtime value of Encoding.external_encoding.
Tests were not catching the error since they were forcing
Encoding.external_encoding to be ASCII-8BIT (introduced in #1211). So the
error would only be seen in wild usage (see issue #353).
This commit forces ASCII-8BIT on File.read calls. The error is still
present if using memory blobs with other encodings.

Note that the pull request removes tests about BlobHelper#lines encoding. These were introduced in #1211:

@alindeman Awkwardly enough, we've made an implicit guarantee that the data exposed through lines is encoded in its original form (in practice, ASCII-8BIT or UTF-8) even if the file is detected as a different encoding. Certain other code seems to actually depend on this.

Strictly speaking, this guarantee is still in place: lines result is ASCII-8BIT just as the files are read. However, that wouldn't be the case if an in-memory blob is created. I lack context of the original issue about this behavior, so it's hard to tell if this change is breaking any third party code.

A quick test suggests this does the trick for the samples mentioned in https://github.com/github/linguist/issues/353. More extensive testing would be needed on GitHub.com as I don't have the context around the comment you referenced @smola and I have no idea how this change would impact GitHub.com without testing it.
I'll try schedule some time this week to test this locally and in our staging env.

Missed the deploy window before the Christmas freeze so will try test this sometime in the next two-to-three weeks, depending on availability etc.

I've done some testing over the past few days and haven't spotted any problems so I'm going to approve and merge this. Thanks @smola 🙇


lsp: Support goToDefinition from a Go file to a templ file

If I ctrl-click on page() then ...

then I get to the autogenerated Go code:

It would be great if I could get to the templ-file instead:

Yes, that would be much more useful!
If you're in a *.templ file, then the templ LSP is operating and will carry out a remapping operation from templ position -> go file position -> gopls -> templ position, as per here: https://github.com/a-h/templ/blob/c674f647606fe180063d074ff12720ec1dd92350/cmd/templ/lspcmd/proxy/server.go#L507-L512
But currently, if you start from a *.go file, then gopls is operating and there's no templ code running at all. To rewrite the responses from gopls, templ would have to proxy all Go LSP operations (i.e. for all *.go files) and work out that if a _templ.go file was being referenced, then, it should look up the various source code mapping positions and switch it to *.templ instead. I'm not sure if replacing (as a proxy) gopls for all projects is ideal (higher risk?), but it would work.
It may also possible for the templ LSP to capture *_templ.go file usage too, and be able to ctrl+click on the function name to get to the *.templ file. (Worse UX, but maybe a good first step)

I know you can have multiple LSPs attached to a file, but I wonder what would happen if you had 2 trying to respond to a jump to definition request.

I asked the gopls maintainers. Maybe they know a hook which templ could implement: https://github.com/golang/go/issues/65001

We have the following issue to implement the line directive https://github.com/a-h/templ/issues/415, and then I think it's a case of closing this ticket and helping the gopls team implement https://github.com/golang/go/issues/65001

@joerdav thank you for your work! This is great!

Thank @af-md !

Here's a quick and dirty fix for anyone using neovim. It doesn't go directly to the location of the definition in the file, but at least it opens the correct file.
local go_to_definition = function()
    if vim.bo.filetype == "go" then
        vim.lsp.buf.definition({
            on_list = function(options)
                if options == nil or options.items == nil or #options.items == 0 then
                    return
                end

                local targetFile = options.items[1].filename
                local prefix = string.match(targetFile, "(.-)_templ%.go$")

                if prefix then
                    options.items[1].filename = prefix .. ".templ"
                end

                vim.fn.setqflist({}, ' ', options)
                vim.api.nvim_command('cfirst')
            end
        })
    else
        vim.lsp.buf.definition()
    end
end

and then in your key map
vim.keymap.set("n", "gd", go_to_definition)

Note that the check for being in a go buffer will run every time you try to go to definition. You probably would want to add this modification only if you are using templ a lot and should remember to remove it once the actual fix is implemented.

does anyone have a workaround in vscode? its not a big deal but a little annoying.

Quick and dirty addition to @meistertigran's quick and dirty fix, this'll attempt to search for the the line in the templ file
local go_to_definition = function()
  if vim.bo.filetype == "go" then
    vim.lsp.buf.definition({
      on_list = function(options)
        if options == nil or options.items == nil or #options.items == 0 then
          return
        end

        local targetFile = options.items[1].filename
        local prefix = string.match(targetFile, "(.-)_templ%.go$")

        if prefix then
          local function_name = vim.fn.expand('<cword>')
          options.items[1].filename = prefix .. ".templ"
          vim.fn.setqflist({}, ' ', options)
          vim.api.nvim_command('cfirst')
          vim.api.nvim_command('silent! /templ ' .. function_name)
        end
      end
    })
  else
    vim.lsp.buf.definition()
  end
end

In Neovim I use Telescope.  This works decent enough for me...  I might change it since I'm annoyed that the telescope window pops up for a few ms.
  vim.keymap.set('n', '<leader>gm', function()
    local ts_utils = require 'nvim-treesitter.ts_utils'
    local node = ts_utils.get_node_at_cursor()
    if node == nil then
      return
    end
    if vim.bo.filetype == "go" then
      if node:parent():type() == "call_expression" then
        local funcName = vim.fn.expand("<cword>")
        require("telescope.builtin").live_grep {
          default_text = 'templ ' .. funcName .. "\\(",
          glob_pattern = '*.templ',
          on_complete = {
            function(picker)
              if picker.manager.linked_states.size == 1 then
                require("telescope.actions").select_default(picker.prompt_bufnr)
              end
            end
          }
        }
      end
    end
  end),

Given that the line compiler directive MR has been closed, is there any work being done to address this / new ideas on how this could be tackled properly?
In the meantime for VSCode users, I have quickly created a very small extension (with the help of ChatGPT) to redirect definitions in _templ.go files to .templ in the same directory - which should cover the large majority of cases (mine at least). Sharing it here in case it is useful to others, the repo and VSIX file to install the extension is here

j

Quick and dirty addition to @meistertigran's quick and dirty fix, this'll attempt to search for the the line in the templ file
local go_to_definition = function()
  if vim.bo.filetype == "go" then

    vim.lsp.buf.definition({
      on_list = function(options)
        if options == nil or options.items == nil or #options.items == 0 then
          return
        end

        local targetFile = options.items[1].filename
        local prefix = string.match(targetFile, "(.-)_templ%.go$")

        if prefix then
          local function_name = vim.fn.expand('<cword>')
          options.items[1].filename = prefix .. ".templ"

          vim.fn.setqflist({}, ' ', options)
          vim.api.nvim_command('cfirst')

          vim.api.nvim_command('silent! /templ ' .. function_name)
        else
          vim.lsp.buf.definition()
        end

      end
    })
  else
    vim.lsp.buf.definition()
  end
end

I think it might be useful to override

Quick and dirty addition to @meistertigran's quick and dirty fix, this'll attempt to search for the the line in the templ file
local go_to_definition = function()
  if vim.bo.filetype == "go" then

    vim.lsp.buf.definition({
      on_list = function(options)
        if options == nil or options.items == nil or #options.items == 0 then
          return
        end

        local targetFile = options.items[1].filename
        local prefix = string.match(targetFile, "(.-)_templ%.go$")

        if prefix then
          local function_name = vim.fn.expand('<cword>')
          options.items[1].filename = prefix .. ".templ"

          vim.fn.setqflist({}, ' ', options)
          vim.api.nvim_command('cfirst')

          vim.api.nvim_command('silent! /templ ' .. function_name)
        else
          vim.lsp.buf.definition()
        end

      end
    })
  else
    vim.lsp.buf.definition()
  end
end

My approach is to override vim.lsp.buf.definition for go filetype in LspAttach event:
  local function go_goto_def()
    local old = vim.lsp.buf.definition
    local opts = {
      on_list = function(options)
        if options == nil or options.items == nil or #options.items == 0 then
          return
        end
        local targetFile = options.items[1].filename
        local prefix = string.match(targetFile, "(.-)_templ%.go$")
        if prefix then
          local function_name = vim.fn.expand("<cword>")
          options.items[1].filename = prefix .. ".templ"
          vim.fn.setqflist({}, " ", options)
          vim.api.nvim_command("cfirst")
          vim.api.nvim_command("silent! /templ " .. function_name)
        else
          old()
        end
      end,
    }
    vim.lsp.buf.definition = function(o)
      o = o or {}
      o = vim.tbl_extend("keep", o, opts)
      old(o)
    end
  end

  vim.api.nvim_create_autocmd("LspAttach", {
    group = vim.api.nvim_create_augroup("UserLspConfig", {}),
    callback = function(event)
      if vim.bo.filetype == "go" then
        go_goto_def()
      end
      vim.keymap.set, ("n", "gd", vim.lsp.buf.definition, bufopts)
    end
  }

https://github.com/catgoose/templ-goto-definition
I made this plugin if it makes it easier for anyone.

I am looking into a different approach. I think it might be easier (and more useful for other tools) to extend your editor to be able to respond to multiple textDocument/definition providers. If a single LSP responds with multiple places (such as typescript showing both the react component and memoed component), it will put them in a list where you can select between them. Here is a very basic lua script for collecting all the responses from definition requests. you can run it with :luafile <file>.lua in neovim (same thing as pressing gd)
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")

local locations = {}

local params = vim.lsp.util.make_position_params()
local results_lsp = {}
local results = {}
local timeout = 1000 -- ms

for _, client in pairs(vim.lsp.get_active_clients()) do
	if client.server_capabilities.definitionProvider then
		local request_result =
			client.request_sync("textDocument/definition", params, timeout, vim.api.nvim_get_current_buf())
		if request_result and request_result.result then
			table.insert(results_lsp, request_result.result)
		end
	end
end

for _, lsp_result in ipairs(results_lsp) do
	if lsp_result then
		vim.list_extend(results, lsp_result)
	end
end

for _, result in ipairs(results) do
	if result.targetUri then
		table.insert(locations, {
			filename = vim.uri_to_fname(result.targetUri),
			lnum = result.targetRange.start.line + 1,
			col = result.targetRange.start.character + 1,
			text = "Definition",
		})
	elseif result.uri then
		table.insert(locations, {
			filename = vim.uri_to_fname(result.uri),
			lnum = result.range.start.line + 1,
			col = result.range.start.character + 1,
			text = "Definition",
		})
	end
end

pickers
	.new({}, {
		prompt_title = "LSP Definitions",
		finder = finders.new_table({
			results = locations,
			entry_maker = function(entry)
				return {
					value = entry,
					display = entry.filename .. ":" .. entry.lnum .. ":" .. entry.col .. " " .. entry.text,
					ordinal = entry.filename .. " " .. entry.lnum .. " " .. entry.col .. " " .. entry.text,
					filename = entry.filename,
					lnum = entry.lnum,
					col = entry.col,
				}
			end,
		}),
		sorter = conf.generic_sorter({}),
		attach_mappings = function(prompt_bufnr, map)
			actions.select_default:replace(function()
				actions.close(prompt_bufnr)
				local selection = action_state.get_selected_entry()
				vim.api.nvim_command("edit " .. selection.filename)
				vim.api.nvim_win_set_cursor(0, { selection.lnum, selection.col - 1 })
			end)
			return true
		end,
	})
	:find()

But when would you ever want the generated go from a templ file? It should
just take you to the templ definition and not the go file.
I made a plug-in like that for vue:
https://github.com/catgoose/vue-goto-definition.nvim
And one for templ:
https://github.com/catgoose/templ-goto-definition
I know a choice is good, but I prefer to just gd and be where I need to go.
On Fri, Sep 13, 2024 at 7:35 PM Alex Ott @.***> wrote:

I am looking into a different approach. I think it might be easier (and
more useful for other tools) to extend your editor to be able to respond to
multiple textDocument/definition providers. If a single LSP responds with
multiple places (such as typescript showing both the react component and
memoed component), it will put them in a list where you can select
between them. Here is a very basic lua script for collecting all the
responses from definition requests. you can run it with :luafile
.lua in neovim (same thing as pressing gd)
local pickers = require("telescope.pickers")local finders = require("telescope.finders")local conf = require("telescope.config").valueslocal actions = require("telescope.actions")local action_state = require("telescope.actions.state")
local locations = {}
local params = vim.lsp.util.make_position_params()local results_lsp = {}local results = {}local timeout = 1000 -- ms
for _, client in pairs(vim.lsp.get_active_clients()) do
if client.server_capabilities.definitionProvider then
local request_result =
client.request_sync("textDocument/definition", params, timeout, vim.api.nvim_get_current_buf())
if request_result and request_result.result then
table.insert(results_lsp, request_result.result)
end
endend
for _, lsp_result in ipairs(results_lsp) do
if lsp_result then
vim.list_extend(results, lsp_result)
endend
for _, result in ipairs(results) do
if result.targetUri then
table.insert(locations, {
filename = vim.uri_to_fname(result.targetUri),
lnum = result.targetRange.start.line + 1,
col = result.targetRange.start.character + 1,
text = "Definition",
})
elseif result.uri then
table.insert(locations, {
filename = vim.uri_to_fname(result.uri),
lnum = result.range.start.line + 1,
col = result.range.start.character + 1,
text = "Definition",
})
endend
pickers
.new({}, {
prompt_title = "LSP Definitions",
finder = finders.new_table({
results = locations,
entry_maker = function(entry)
return {
value = entry,
display = entry.filename .. ":" .. entry.lnum .. ":" .. entry.col .. " " .. entry.text,
ordinal = entry.filename .. " " .. entry.lnum .. " " .. entry.col .. " " .. entry.text,
filename = entry.filename,
lnum = entry.lnum,
col = entry.col,
}
end,
}),
sorter = conf.generic_sorter({}),
attach_mappings = function(prompt_bufnr, map)
actions.select_default:replace(function()
actions.close(prompt_bufnr)
local selection = action_state.get_selected_entry()
vim.api.nvim_command("edit " .. selection.filename)
vim.api.nvim_win_set_cursor(0, { selection.lnum, selection.col - 1 })
end)
return true
end,
})
:find()
—
Reply to this email directly, view it on GitHub
https://github.com/a-h/templ/issues/387#issuecomment-2350742245, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFAJNGFO2BRCXPW5KC37L5LZWOAGDAVCNFSM6AAAAABBKOZJ7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJQG42DEMRUGU
.
You are receiving this because you commented.Message ID:
@.***>

I'm making an LSP that can jump from generated typescript http functions to the respective api route in go (inspired by how in https://trpc.io/ you can see type errors quickly when you make changes) and thought it was a similar use case. I do agree that in this specific case, you probably wouldn't want to jump to the generated code, but it seemed like a similar problem.

Another vscode extension, this one nests definition providers and jumps to the templ definition if it finds one.
https://marketplace.visualstudio.com/items?itemName=lsl.vscode-templ-go-to-definition
https://github.com/lsl/vscode-templ-go-to-definition
ext install lsl.vscode-templ-go-to-definition

I use helix. And it only depends on lsp. So how to implement this line option with templ and go lsp ?

I saw your comment in #476
@noor-tg I think the answer will be to run templ lsp on go files. I've been playing around with it to see if that's viable. At the moment the behaviour is odd, a goToDefinition request is handled by both templ lsp and gopls, so you end up with 2 new files open! I imagine there would be similar cases for other LSP actions, but I think this will be the answer.
Does helix support assigning multiple lsps to a file?

I saw your comment in #476
@noor-tg I think the answer will be to run templ lsp on go files. I've been playing around with it to see if that's viable. At the moment the behaviour is odd, a goToDefinition request is handled by both templ lsp and gopls, so you end up with 2 new files open! I imagine there would be similar cases for other LSP actions, but I think this will be the answer.
Does helix support assigning multiple lsps to a file?

Yes helix support multiple lsp to file type

But when I add templ lsp last it use golsp and go to generated file. And if I set it first, it shows error def not found

But when I add templ lsp last it use golsp and go to generated file. And if I set it first, it shows error def not found

Yes, currently templ lsp rejects gotodefenition requests from anything but templ files. https://github.com/a-h/templ/blob/9b77eee3565cae549a7d4b371d54c2af17a5530b/cmd/templ/lspcmd/proxy/server.go#L619
I had to remove this in my local version to get this working, but I think there is more testing to be done to ensure running on go files doesn't have other odd effects.

But when I add templ lsp last it use golsp and go to generated file. And if I set it first, it shows error def not found

Yes, currently templ lsp rejects gotodefenition requests from anything but templ files.
https://github.com/a-h/templ/blob/9b77eee3565cae549a7d4b371d54c2af17a5530b/cmd/templ/lspcmd/proxy/server.go#L619
I had to remove this in my local version to get this working, but I think there is more testing to be done to ensure running on go files doesn't have other odd effects.

I used the same . and it working correctly. thanks @joerdav

I'm making an LSP that can jump from generated typescript http functions to the respective api route in go (inspired by how in https://trpc.io/ you can see type errors quickly when you make changes) and thought it was a similar use case. I do agree that in this specific case, you probably wouldn't want to jump to the generated code, but it seemed like a similar problem.

@AlexanderHott any link to the mentioned project ?

I'm making an LSP that can jump from generated typescript http functions to the respective api route in go (inspired by how in https://trpc.io/ you can see type errors quickly when you make changes) and thought it was a similar use case. I do agree that in this specific case, you probably wouldn't want to jump to the generated code, but it seemed like a similar problem.

@AlexanderHott any link to the mentioned project ?

It's on the back burner right now, and not very done. My team paused our migration to a go backend, but when that picks up again, I think I'll start working on it. https://github.com/AlexanderHOtt/longjump

Quick and di

For any LazyVim users who could not get catgoose's plugin to work, here's a solution that works for me. Put the following in lua/plugins/lsp.lua:
return {
  "neovim/nvim-lspconfig",
  opts = function(args)
    local go_to_definition = function()
      if vim.bo.filetype == "go" then
        vim.lsp.buf.definition({
          on_list = function(options)
            if options == nil or options.items == nil or #options.items == 0 then
              return
            end

            local targetFile = options.items[1].filename
            local prefix = string.match(targetFile, "(.-)_templ%.go$")

            if prefix then
              local function_name = vim.fn.expand("<cword>")
              options.items[1].filename = prefix .. ".templ"

              vim.fn.setqflist({}, " ", options)
              vim.api.nvim_command("cfirst")

              vim.api.nvim_command("silent! /templ " .. function_name)
            else
              vim.lsp.buf.definition()
            end
          end,
        })
      else
        vim.lsp.buf.definition()
      end
    end
    local function go_goto_def()
      if vim.bo.filetype == "go" then
        return go_to_definition()
      else
        return vim.lsp.buf.definition()
      end
    end
    local keys = require("lazyvim.plugins.lsp.keymaps").get()
    keys[#keys + 1] = { "gd", go_goto_def }
  end,
}


Not publishing map

I'm running google cartographer but it doesn't publish the map. I'm working with a laser scanner (rplidar).
The rqt_graph looks like this:

launch:

urdf:

rqt:

map:

lua:

trajectory_2d:

terminal:

I can see the topic map in the rostopic list:
/constraint_list
/joint_states
/landmark_poses_list
/map
/rosout
/rosout_agg
/scan
/scan_matched_points2
/submap_list
/tf
/tf_static
/trajectory_node_list
I don't know what exactly my problem is. I have these assumptions:
-cartographer is not receiving any sensor data
-I don't know if I need a tf_listener. I didn't transform the sensor data from base_laser to base_link

Please check the message type that your laser scanner publishes.
When you set num_laser_scans = 1, cartographer_ros subscribes to type "LaserScan" messages on the topic "scan".

the topic "scan" has the message type "LaserScan"

Ok, it's working now. After I inserted a world and map frame it worked.

Can you tell me how you did it? My question is the same as yours.

Ok, it's working now. After I inserted a world and map frame it worked.

Can you tell me how you did it? My question is the same as yours.


ci, tests: fix testing in GH runners for kfp-api individual integration tests

In this PR:

tests: fix kfp-api integration tests in multiple places
The kfp-api individual tests were failing due to a number of reasons, mainly caused by how
this charm's dependencies are deployed and the time it takes for those to be up and ready.
This commit ensures those dependencies (mysql, minio, prometheus) are active and idle within
a reasonable time to avoid timeouts and charms misconfigurations.

For mysql-k8s, the charm is now deployed from channel 8.0/edge, a version that contains the testing
profile option, which constraints the charm in a recommended way to deploy on GitHub runners.
For prometheus-k8s, since this charms requires a significant amount of time to deploy, the wait
for idle timeout is increased to 90*20. This change was introduced by canonical/kfp-operators#178,
but incorrectly reverted by canonical/kfp-operators#197.

Part of #243

ci: increase GitHub runners storage space for individual integration tests
Increasing the storage space will prevent individual charms to fail by ensuring
charms can be deployed in an environment with enough storage space.
Part of #243

Expected CI failures

integration tests (charm and repo level) may fail due to https://github.com/canonical/bundle-kubeflow/issues/648

Also on other tests where we check two relations and blocking status, we can move the to unit OR leave them in and drop them at 1.8 mark, because as of 1.8 we won't be supporting MariadDB.


Get repeated headers and footers

Hi, is there a way to get the footers and repeated headers? maybe on a different object or as an option.

It is not available via the API. The headers and footers are stripped here: https://github.com/nlmatics/nlm-ingestor/blob/main/nlm_ingestor/ingestor/visual_ingestor/visual_ingestor.py#L369. You can retain what is stripped and then return it via the API -- it is a bit of work, but if you are interested in putting together a PR, happy to review.


Move i18next and react-i18next to peerDependencies

This PR moves i18next and react-i18next to peerDependencies, so that consuming Yarn PnP projects aren't forced to have multiple instances of i18next if they themselves depend on react-i18next.
After this PR, projects that use next-i18next will have to ensure they have react-i18next and i18next in their own dependencies:
npm i react-i18next i18next
yarn add react-i18next i18next

See discussion in https://github.com/i18next/next-i18next/issues/1917

Checklist

[x] only relevant code is changed (make a diff before you submit the PR)
[x] run tests npm run test
[ ] ~tests are included~
[x] commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

[x] only relevant documentation part is changed (make a diff before you submit the PR)
[x] motivation/reason is provided
[x] commit message and code follows the Developer's Certification of Origin

@stale not stale!

not stale

I unfortunately don't see this getting merged @rikkit  😞

I am happily using this via the @rikkilt/next-i18next package so know it works... without this change this library is not compatible with any package manager that does not use node_modules to link packages i.e. Yarn in PnP mode or pnpm.

@belgattitude the problem is, this: https://github.com/i18next/next-i18next/issues/1917
especially: https://github.com/i18next/next-i18next/issues/1917#issuecomment-1258137642

Closing in favour of #1966


SDL2 Missing

I followed instructions in README. When I try to run I get this error, need help.

For now I just downloaded SDL2.dll and put it in debug directory https://www.libsdl.org/download-2.0.php


can't create a valid amazon cloud drive account

What is your rclone version (eg output from rclone -V)

rclone v1.29

Which OS you are using and how many bits (eg Windows 7, 64 bit)

ubuntu 16.04

Which cloud storage system are you using? (eg Google Drive)

Amazon Cloud Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

an initial rclone lsd default:

A log from the command with the -v flag (eg output from rclone -v copy /tmp remote:tmp)

$ rclone -v lsd default:
2016/05/20 16:13:05 Failed to create file system for "default:": Failed to get endpoints: HTTP code 403: "403 Forbidden", reponse body: {"message":"'Atza|IQEBLjAsAhRYY2q7ynpDiN4c1HLKiTJDb03N_wIURbs2AsesLTwxF0J67byNaJHnPRpvjIQzvGHiqxd7XnxXvxegyWAo9sJzU2-RntBwV7ShhZPGg8JGXUS4gMayRKccnDUk6AA4M-OMcSBRmbPQSoSdqTV1PJuDMsqfbBQC2xhMIh1SoZLtBCYEQroIUAFTsC0pXBxgdfwWg8oyXeDQEo4Cvys1TpYsMp_6yaNzt8WEWcFGkzwoexDOkFYbU6TgUk6KrQTQO753F5LmbNbg1dIqdJT0-h4u5-IlotLrFYT7wcjTit10A4WRywne6fzQUeUBgMafCKmn9u561tLPnNrkvFvtJI-pHth-L95k5xnLyGGvq75_OSAshEiLzax0aerqovMdnk3GsE_GVpKAqibGNEixTSRuD2p_ZuaVzcQfn0AGaoQLEX62IY25JcnmrUT-yrkZ28_EQTs_ZiACLjvu6bcvz7AI3nG3H9MEeTVsH_jizGximaS8O4GJ_KHDz5ZdstAfNvDxvriPhywrWWPjX3ZSfAqiNS2evRQyq0TE8COeqg5ECNizt1U88SgPVh9qxkExMFCnxzI62HCwpsWeZlTPHixQRnRJnpTa9Fks1B8' not a valid key=value pair (missing equal-sign) in Authorization header: 'bearer Atza|IQEBLjAsAhRYY2q7ynpDiN4c1HLKiTJDb03N_wIURbs2AsesLTwxF0J67byNaJHnPRpvjIQzvGHiqxd7XnxXvxegyWAo9sJzU2-RntBwV7ShhZPGg8JGXUS4gMayRKccnDUk6AA4M-OMcSBRmbPQSoSdqTV1PJuDMsqfbBQC2xhMIh1SoZLtBCYEQroIUAFTsC0pXBxgdfwWg8oyXeDQEo4Cvys1TpYsMp_6yaNzt8WEWcFGkzwoexDOkFYbU6TgUk6KrQTQO753F5LmbNbg1dIqdJT0-h4u5-IlotLrFYT7wcjTit10A4WRywne6fzQUeUBgMafCKmn9u561tLPnNrkvFvtJI-pHth-L95k5xnLyGGvq75_OSAshEiLzax0aerqovMdnk3GsE_GVpKAqibGNEixTSRuD2p_ZuaVzcQfn0AGaoQLEX62IY25JcnmrUT-yrkZ28_EQTs_ZiACLjvu6bcvz7AI3nG3H9MEeTVsH_jizGximaS8O4GJ_KHDz5ZdstAfNvDxvriPhywrWWPjX3ZSfAqiNS2evRQyq0TE8COeqg5ECNizt1U88SgPVh9qxkExMFCnxzI62HCwpsWeZlTPHixQRnRJnpTa9Fks1B8'."}

I'm register this account, it goes to the local web page and it gets the token, but it never works.  the only thing I can think of is that the token produced is expired already?  "expiry":"2016-05-20T17:11:02.254901677-07:00" (is what was at the end of the token

Its been happening here too. Culprits could be acd-cli or amazon endpoints themselves.
#427

ok, but it seems that this is an old issue now, so not something i can expect to get fixed soon.  :(

I'd like to fix this but I haven't figured out what is the problem :-(
Can you check the time and very importantly the timezone on your computer? Oauth2 relies on the time being correct.
So on Linux check that
TZ=UTC date
Agrees with searching for "UTC time"  on google - that will check you've got the timezone right.

look right to me
$ date
Sun May 22 02:24:59 PDT 2016
$ TZ=UTC date
Sun May 22 09:25:00 UTC 2016

Here is a test for you to try: http://pub.rclone.org/v1.29-30-g53ead43β/
It redoes the oauth on 401 errors.  This may or may not be helpful!

$ ./rclone-v1.29-30-g53ead43β-linux-amd64/rclone lsd acd:
-1 2012-07-27 13:23:43        -1 Videos
-1 2012-07-27 13:23:43        -1 Documents
-1 2013-01-10 16:49:56        -1 Archived Music
-1 2012-07-27 13:23:43        -1 Pictures
-1 2016-04-15 00:28:44        -1 My Send-to-Kindle Docs
-1 2016-05-23 00:52:40        -1 media
Transferred:            0 Bytes (   0.00 kByte/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:        1.9s
$ ~/rclone lsd acd:
2016/05/23 10:43:59 Failed to create file system for "acd:": Failed to get endpoints: HTTP code 403: "403 Forbidden", reponse body: {"message":"'Atza|IQEBLjAsAhQmOfJfZSJDH67xic3ieKwuKFrBbwIUSZzVEnIT7vicdqbMErD5ZVDsZfLKkQFLzVKsR2B7kvMFff1UfgMt9vRI0rvGMboaCyZZcKSN9NYr8hPGfxDVR1i3PUtwhdCR-ACxtpyC3VtvBPbq4MF3asSJzMUa501pdMORzZtjK_Xy7pShOFyeCuwn_KQ3Y2rbSJy-9w-G5f1gxFaintHGMMDZY_T2VOW-_7Pg_mdfRLzNVj3hfTfYT-ilHY8OD6a0xt7gidT8z9pOABTEe3H4Ht_YztMZXdcdtZlGHgY_X66-i7Tt5e17XfZ1mQH2jOBQ1u6yKgDi_tabjDjE-Xf38VqdBWQoiFqHjloDmt6mguxWu8P5VDywWF2VEOU_fk7YfEP5P2cwDwiz0vRJbgwYAgweObBx6gbd6f_gs_NXw2AivMPBlnnxDI31AJutKCluAzuGLdqF4H-H4PUQqsFvSrO4J2C2h1-j2y_rqsWKB_rOKNtg-FRGtDPeV1259o5wiUmCBbRL5lZDzJkn58Q3wGRTVp2AXIssekApIh_7wP4XChNhC7bgIcNx7T5gkpeNZ7wHgyM5z0_k41LC2GjZyxil8joP1pn2wvvoW-w5RRBxma1XBXqg5HffNDFd' not a valid key=value pair (missing equal-sign) in Authorization header: 'bearer Atza|IQEBLjAsAhQmOfJfZSJDH67xic3ieKwuKFrBbwIUSZzVEnIT7vicdqbMErD5ZVDsZfLKkQFLzVKsR2B7kvMFff1UfgMt9vRI0rvGMboaCyZZcKSN9NYr8hPGfxDVR1i3PUtwhdCR-ACxtpyC3VtvBPbq4MF3asSJzMUa501pdMORzZtjK_Xy7pShOFyeCuwn_KQ3Y2rbSJy-9w-G5f1gxFaintHGMMDZY_T2VOW-_7Pg_mdfRLzNVj3hfTfYT-ilHY8OD6a0xt7gidT8z9pOABTEe3H4Ht_YztMZXdcdtZlGHgY_X66-i7Tt5e17XfZ1mQH2jOBQ1u6yKgDi_tabjDjE-Xf38VqdBWQoiFqHjloDmt6mguxWu8P5VDywWF2VEOU_fk7YfEP5P2cwDwiz0vRJbgwYAgweObBx6gbd6f_gs_NXw2AivMPBlnnxDI31AJutKCluAzuGLdqF4H-H4PUQqsFvSrO4J2C2h1-j2y_rqsWKB_rOKNtg-FRGtDPeV1259o5wiUmCBbRL5lZDzJkn58Q3wGRTVp2AXIssekApIh_7wP4XChNhC7bgIcNx7T5gkpeNZ7wHgyM5z0_k41LC2GjZyxil8joP1pn2wvvoW-w5RRBxma1XBXqg5HffNDFd'."}

first is yours, 2nd is mine

That is looking good. Have you tried some longer transfers?

started some 10+ hour transfers and its been over an hour without a problem.  will know more tomorrow if they succeeded :)

so, its "works" but I can't complete my uploads, get errors like
Received error: Post https://content-na.drive.amazonaws.com/cdproxy/nodes?suppress=deduplication: Post https://api.amazon.com/auth/o2/token: dial tcp: lookup api.amazon.com on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:58874-><IP_ADDRESS>:53: i/o timeout - low level retry 4/10

and
Received error: HTTP code 504: "504 GATEWAY_TIMEOUT", no response body - low level retry 1/10

that seem to cause the uploade to restart
though in looking closer, I'm thinking that this might have been a network issue on my side.  the first error occured after the second error (the second error I listed is what reset the dowload) and I while the first error was happening, nothing was being uploaded, as if it couldn't connect.
With that said, my ssh connection to the host where this is running stayed alive, so a bit confused if it was actually networking issue on my side.  perhaps on amazon's side.

Running root@dschmorrison:~/work/src/rclone-v1.29-30-g53ead43#U03b2-linux-amd64# ./rclone -v ls b:/ for only a minute, old token from yesterday:
2016/05/23 21:05:59 Amazon cloud drive root '': 401 error received - invalidating token
2016/05/23 21:05:59 pacer: Rate limited, sleeping for 286.183907ms (1 consecutive low level retries)
2016/05/23 21:05:59 pacer: low level retry 1/1
2016/05/23 21:05:59 Amazon cloud drive root '': Directory listing error for "GDriveBackup/Filepath/filepath/filepath": HTTP code 401: "401 Unauthorized", reponse body: {"message":"Token has expired"}
 - low level retry 1/10
2016/05/23 21:05:59 Amazon cloud drive root '': 401 error received - invalidating token
2016/05/23 21:05:59 pacer: Rate limited, sleeping for 1.360303173s (2 consecutive low level retries)
2016/05/23 21:05:59 pacer: low level retry 1/1
2016/05/23 21:05:59 Amazon cloud drive root '': Directory listing error for "GDriveBackup/filepath/filepath/filepath": HTTP code 401: "401 Unauthorized", reponse body: {"message":"Token has expired"}

The 504 GATEWAY_TIMEOUT errors are a known problem with ACD itself - see this thread: https://forums.developer.amazon.com/questions/22563/408-request-timeout-errors.html

Just noticed there is a thread on the forum about the 401 errors: https://forums.developer.amazon.com/questions/27740/401-messagetoken-has-expired.html

Tested the -30 beta and the issue is the same and appears to lock even faster than -28.  That could just be a coincidence however.
The only way I've gotten around restarting a transfer is to reauth via rclone config and then try again.
I wonder if there could be a way to just submit a reauth on token failure?  Brute force but seems to work to get things going again at least for another 45 seconds or so.   Same thing though, if the sync dir list is short or null at the front, then the transfers at least commence for the first uploads.  But later on it's near impossible at this point to make and sync changes on large folder sets that have to be read first.
I wonder if we can assign which endpoint we attach too like the fellow in the Amazon forumn.  Could be a cluster setting that has propagated but not to ALL yet perhaps.
Thanks for your amazing product though!  It's been the only solution for me to get backups of my nearly 6TB of data.  I'm only on 3.0TB at present though.

The - 30 beta is supposed to reauth on a 401 error. It obviously isn't working properly yet though - can you post some logs of what happens around the 401 error please?
As for choosing the endpoint that would be possible. I don't know whether would work though due to the way the underlying s3 storage is structured.

Looks like since I've stopped the one new copy job, it can no longer be restarted due to 401 issues.. Bummer.  Here is a giant log that may or may not help.   ETA: -

    images/hardware/io/GraphicsTablet.SHK:  0% done. avg:    0.0, cur:    0.0 kByte/s. ETA: -

2016/05/25 05:20:57 Amazon cloud drive root 'z0/Asimov': 401 error received - invalidating token
2016/05/25 05:20:57 pacer: Rate limited, sleeping for 2.895730807s (4 consecutive low level retries)
2016/05/25 05:20:57 pacer: low level retry 3/10
2016/05/25 05:21:00 Amazon cloud drive root 'z0/Asimov': 401 error received - invalidating token
2016/05/25 05:21:00 pacer: Rate limited, sleeping for 14.529358657s (5 consecutive low level retries)
2016/05/25 05:21:00 pacer: low level retry 4/10
2016/05/25 05:21:03 Amazon cloud drive root 'z0/Asimov': 401 error received - invalidating token
2016/05/25 05:21:03 pacer: Rate limited, sleeping for 21.592368908s (6 consecutive low level retries)
2016/05/25 05:21:03 pacer: low level retry 5/10
2016/05/25 05:21:18 Amazon cloud drive root 'z0/Asimov': 401 error received - invalidating token
2016/05/25 05:21:18 pacer: Rate limited, sleeping for 18.625537313s (7 consecutive low level retries)
2016/05/25 05:21:18 pacer: low level retry 6/10
2016/05/25 05:21:39 Amazon cloud drive root 'z0/Asimov': 401 error received - invalidating token
2016/05/25 05:21:39 pacer: Rate limited, sleeping for 31.4449951s

Here is a second attempt to fix the 401 errors - I think this one will work properly (cross fingers!)
http://pub.rclone.org/v1.29-30-g33611beβ/

Here is a second attempt to fix the 401 errors - I think this one will work properly (cross fingers!)
http://pub.rclone.org/v1.29-30-g33611beβ/

That version seems to work! I've hit 401s several times but your fix seems to hold and the command continues.  I'll keep running tests.

So far if the directory scans/listing/walks at the beginning of my syncs take <15 mins or so to process the new 401 handling seems to be working great.  If I start at the top of my volumes that I've synced before and they range on the order of 600g to 1.4T then I get the weird s3 errors in that 15-25 minute range.  I wonder if it's just we have to also slow down the directory reads in general to some magic rate?  At this time if the directory is shallow then it gets right to copying new data just fine even across smaller files.  I'm rate limited to 5mb outbound if that matters too.  Great work!!!!!!  And thanks.  I'll grab you the detailed log this evening when I get home from work.  I'm letting some new files get uploaded at the moment :)

Oops sorry, I forgot to post the beta to this thread...
OK Here is beta 3 which

does a re-authentication on 401 errors (working as per attempt 2)
does a retry on that particular 403 error

http://pub.rclone.org/v1.29-33-g085677dβ/
In my testing this works perfectly now - hopefully it will for you too.

This code base seems to work for the errors that are at hand.
I have now noticed that it takes longer though between remote list done to local list done to start of actual activity though.  On one of the larger syncs, it still takes about 25 mins to get the remote list done part, and the it appears the local list finishes in another 10 mins or so.  BUT now it waits upwards of 20 more mins or longer don't know because I get the "kill" at the last line at 1 hour 5 seconds.. So I guess if no transfers are being setup before the one hour mark then the token expires silently and then done?  On smaller directory syncs this and the previous build seemed to work but have the same processing quirk it seems.  I can open a new issue if desired too.

@ppuskari A new issue would be a good idea. Can you attach a log with -v to the issue too please? Something showing 'the kill'  because I'm unsure what you mean by that. Thanks Nick