Weeknumbers

Hi. This is not so much an issue as a question.
I'm planning to use your excellent calendar in an app, but I have a requirement that the weeknumber (1-52) should be to the left of each week. It's a pretty common concept where I live, lots of people seem to live their life according to weeknumber.
Is this something you think should be included in the calendar, or is it better suited to be done in the same way as headers today, ie completely separate. If it fits inside the calendar, I'm happy to actually implement this, perhaps with some guidance from you regarding the optimal approach.
Best Regards,
Örjan

Can you show me a screen shot of what you want? I it hard to visualize what you want.
You can just drag and drop the image in your chat box on here.

Here's an example of what I'm trying to to. Disregard that the month doesn't start with the 1st, it's something I will look at later.
I do realize that I could have the weekdays and month name as a separate header inside or outside the calendar, and I could definitly have the week-number column as a separate view outside the calendar as well.
I guess my question is if this is something that you see as fitting within the calendar-functionality (JTAppleCalendar.showWeekNumbers or something), or if it's best left to outside views.

Hmm.. interesting. I never saw calendars like those before. Putting an 8th column would cause for a major change as pretty much every calculation in the calendarLayout right now works with a 7 column calendar in mind.
Man..... that's a damn lot of math to re-code haha. For now I would say that I think this should be on the outside. Will this look bad on your design if it is outside the calendar?

My plan would have been to use the normal cells, and just add a property to them so you can see if you're supposed to provide a "normal" cell or a "weekno" cell, and let the user of the lib style them there.
But as you say, the math to support both seven and eight columns, making sure the right type is set on each willDisplayCell and so on is pretty daunting.
How about this, though;
Extend the "inside header" functionality with more layout help. For example, a new header-registration method, that if used uses an internal collectionview in the same way as the normal calendar (using the same size/inset/etc values). That registration method would take a view that implements a new protocol, which will call willDisplayHeaderForRow and willDisplayHeaderForColumn that lets the delegate style those cells in the same way as the normal calendar. That could also be used to make the current "weekday" headers many calendears use easier to align with the actual calendar.
Also, the registration could take an optional parameter to indicate which side the header should be placed on (top, bottom, left, right).

Doing that new header is possible. But like i said, the math...
Lets assume this new header is on the left hand side.

This would mean I have to recalc for an extran column.
The hit-test calculation that i use in the layout will need to be changed
Cell positioning code will also need to be changed.
etc etc etc

So is all this possible? Of course yes :)
But that is not something that I will be able to implement right now. It will take some time.

Well, you wouldn't have to implement it. :)
I'm definitely going to need something similar to the layout I posted, it's a requirement for my project. Time-wise, it's not something that I can wait for another project/person to implement, so whatever solution I use will be implemented by me.
Since you have the best knowledge of the calendar, I was just bouncing some ideas off of you hoping to get more information before I make my decision. Do you have any idea about how much work it would be to do something like what I suggested? Are we talking a day or two, a week or two, or even more? Also, do you think it's a good idea, and would be interested in a pull request if I actually go ahead and do this?

can you join me here? -> https://gitter.im/patchthecode/JTAppleCalendar

Ok after looking into this some more. I think its possible. I'm currently thinking of a way to best implement it.  So i have added the enhancement label on this. However, I am not sure if i;ll finish it in time for your project.

will track this in projects.

+1
i have the similar requirements as ttorjan.
did not see how i could subscribe to a project to get notified and show interest. thats why i add a voice for this feature here =)
keep up the good work! this is a really nice framework

Yea. week numbers is something I was considering after @ttorjan mentioned it. It will require a pretty significant change, at the calculations deals with a 7 column calendar. I do have it in mind to do,
but first I have these working on:

Making spacing b/w the month sections to be flexible
Removing the caching to improve performance when users have start and end ranging more that 100 years.  -- This change is just as huge as the Week numbers.

I'll get to the week numbers soon, its just that i recently got tied up on another major project. So i'll be working on the smaller issues/bugs first till im free again.

Hi !
Is there any news about calendar and week numbers ? I'm currently designing one calendar that need such feature and for now I don't really know how to achieve this...

not many people asked for the feature... so i sorta slacked off on it.
I can take a look at it again

Actually even the Apple Calendar App is displaying week numbers in Germany. Weeknumbers would be awesome.

REALLY NEED THIS FEATURE!
@ttorjan  since it's been over a year, I am wondering if you solved it already? If so, how did you do it?

Even though week numbers does not come with this library, implementing one is easy.
I am creating an example of how it can be done now.

Example added on patchthecode.com.
Closing this issue.


ignore PyCharm's config folder

Coverage remained the same at 63.344% when pulling e6f8444d823c4afb3fb385f191d631ded751b902 on ignore-.idea into 485646875f44d8f4390e2b429f6c49915beffeb1 on master.


How to configure DDS and DevTools for special target device

When attempting to connect to the VM service URI output by the Flutter engine in the context of a custom embedder, users may encounter the following error:
This VM does not have a registered Dart Development Service (DDS) instance and is not currently serving Dart DevTools.
Platform:

IMX8QXP
IMX-WAYLAND

Flutter elinux release 3.13.0
Flutter target devices:

flutter-elinux devices
4 connected devices:
Linux (desktop)  • linux          • linux-x64      • Ubuntu 20.04.6 LTS 5.15.0-101-generic
eLinux (desktop) • elinux-wayland • flutter-tester • Ubuntu 20.04.6 LTS 5.15.0-101-generic
eLinux (desktop) • elinux-x11     • flutter-tester • Ubuntu 20.04.6 LTS 5.15.0-101-generic
> eLinux (mobile)  • gridania-pvt1  • flutter-tester • ion-imx-wayland

Step to Reproduce:

flutter-elinux create sample
cd sample
flutter-elinux pub get
flutter-elinux run -d gridania-pvt1 --profile -v

[  +32 ms] Unable to locate an Android SDK.
[  +10 ms] executing: uname -m
[   +2 ms] Exit code 0 from: uname -m
[        ] x86_64
[  +89 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +5 ms] Artifact Instance of 'ELinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[   +5 ms] executing: ping -w 500 -c 1 <IP_ADDRESS>
[  +11 ms] PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.309 ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.309/0.309/0.309/0.000 ms
[   +3 ms] Skipping pub get: version match.
[  +36 ms] Generating
/home/saydi/workdir/00_Sources/community/flutter/sample/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +19 ms] Launching lib/main.dart on eLinux in profile mode...
[   +1 ms] Uninstall sample from gridania-pvt1.
[        ] executing: ssh<EMAIL_ADDRESS>rm -rf "/tmp/sample"
[ +229 ms] Uninstallation Success
[   +2 ms] Install sample (build/elinux/arm64/profile/bundle) to gridania-pvt1
[        ] executing: scp -r build/elinux/arm64/profile/bundle root@<IP_ADDRESS>:/tmp/sample
[+2970 ms] Installation Success
[   +1 ms] Launch sample.name on gridania-pvt1
[ +317 ms] VM Service URL on device: http://<IP_ADDRESS>:43621/d4EXYYZKy2c=/
[        ] executing: ssh -o ExitOnForwardFailure=yes -L <IP_ADDRESS>:43621:<IP_ADDRESS>:43621<EMAIL_ADDRESS>
Result on Web-browser: debug and profile modes are the same result

Already tried start VM Dart on Host PC to connecting VM Server URL

Please ensure that you have set forwardPort and disable all proxy settings.
See https://github.com/sony/flutter-elinux/wiki/Remote-target-devices#flutter_custom_devicesjson-example

Please ensure that you have set forwardPort and disable all proxy settings.
See https://github.com/sony/flutter-elinux/wiki/Remote-target-devices#flutter_custom_devicesjson-example

{
  "custom-devices": [
    {
      "id": "gridania-pvt1",
      "label": "Gridania Pvt 1",
      "sdkNameAndVersion": "ion-imx-wayland",
      "enabled": true,
      "platform": "arm64",
      "backend": "wayland",
      "ping": [
        "ping", "-w", "500", "-c", "1", "<IP_ADDRESS>"
      ],
      "pingSuccessRegex": "ttl=",
      "install": [
        "scp", "-r", "${localPath}", "root@<IP_ADDRESS>:/tmp/${appName}"
      ],
      "uninstall": [
        "ssh"<EMAIL_ADDRESS>"rm -rf \"/tmp/${appName}\""
      ],
      "runDebug": [
        "ssh"<EMAIL_ADDRESS>"XDG_RUNTIME_DIR=/run/user/0 /tmp/${appName}/${appName} -b ."
      ],
      "stopApp": [
        "ssh"<EMAIL_ADDRESS>        "ps aux | grep \"/tmp/${appName}\" | grep -v grep | awk '{print $2}' | xargs kill"
      ],
      "forwardPort": [
        "ssh", "-o", "ExitOnForwardFailure=yes",
        "-L", "<IP_ADDRESS>:${hostPort}:<IP_ADDRESS>:${devicePort}"<EMAIL_ADDRESS>      ],
      "forwardPortSuccessRegex": "Linux"
    }
  ]
}

$ flutter-elinux run -d raspberry-pi4
Launching lib/main.dart on eLinux in debug mode...
Uninstall sample from raspberry-pi4.
<EMAIL_ADDRESS>password:
Uninstallation Success
Install sample (build/elinux/arm64/debug/bundle) to raspberry-pi4
<EMAIL_ADDRESS>password:
Installation Success
Launch sample.name on raspberry-pi4
<EMAIL_ADDRESS>password:
<EMAIL_ADDRESS>password:
Syncing files to device eLinux...                                  202ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

💪 Running with sound null safety 💪

An Observatory debugger and profiler on eLinux is available at: http://<IP_ADDRESS>:43237/xd6sW5hdEoE=/
Activating Dart DevTools...                                      1,830ms
The Flutter DevTools debugger and profiler on eLinux is available at:
http://<IP_ADDRESS>:9100?uri=http://<IP_ADDRESS>:43237/xd6sW5hdEoE=/

Regarding to your trial on Rpi, i just confused about why did your target board already installed "Dart DevTools" and it will be activated automatically while executing flutter app.

Practice done already, with below notes:
I need to attach "--debug-url" manually after application started
Target Device:
LD_LIBRARY_PATH=/usr/share/flutter/3.19.3/profile/lib/ flutter-client --bundle=/usr/share/flutter/ion-hmi/3.19.3/profile/
flutter: The Dart VM service is listening on http://<IP_ADDRESS>:38867/LdVG8OhkIx8=/

Host PC:
Need to go into the project folder
Need to be sure PortForward already started before starting Host Dart Devtool
Ex: in my case is ssh -o ExitOnForwardFailure=yes -L <IP_ADDRESS>:38867:<IP_ADDRESS>:38867<EMAIL_ADDRESS>flutter-elinux attach --debug-url=http://<IP_ADDRESS>:38867/LdVG8OhkIx8=/
Syncing files to device eLinux...                                   6.2s

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on eLinux is available at: http://<IP_ADDRESS>:43373/-fXmCK4fbG0=/
The Flutter DevTools debugger and profiler on eLinux is available at: http://<IP_ADDRESS>:9100?uri=http://<IP_ADDRESS>:43373/-fXmCK4fbG0=/

Results on Web Browser

Practice on Flutter-eLinux release 3.9.13. Thank you!
@HidenoriMatsubayashi I am not sure why did my environment haven't started Devtools automatically as your practiced

I've confirmed that flutter-elinux with a remote-device works fine.
flutter-elinux version: 3.19.4
Remote device: Rapsberry-Pi5
 flutter-elinux run -d raspberry-pi5 --profile
Launching lib/main.dart on eLinux in profile mode...
Uninstall sample from raspberry-pi5.
<EMAIL_ADDRESS>password:
Uninstallation Success
Install sample (build/elinux/arm64/profile/bundle) to raspberry-pi5
<EMAIL_ADDRESS>password:
Installation Success
Launch sample.name on raspberry-pi5
<EMAIL_ADDRESS>password:
<EMAIL_ADDRESS>password:

Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on eLinux is available at: http://<IP_ADDRESS>:39075/I6EFzjm6EeE=/
The Flutter DevTools debugger and profiler on eLinux is available at:
http://<IP_ADDRESS>:9100?uri=http://<IP_ADDRESS>:39075/I6EFzjm6EeE=/

Ya i mean is we able to connect for debugging on target already after we attach debugger manuallly
flutter-elinux attach --debug-url=<Link to VM Service on target board>
I just concerned is why did it is not started automatically on our environment.
Maybe it is environment issues, thank for your confirmed.

Please try the followings to break down the issue.

Use the latest version of flutter-elinux
Use other devices such as Raspberry-Pi4/5

I'll close this issue as there is no additional update/comment.

Re-opening.

I used that url from the verbose log and did the same process with running the flutter-elinux attach from my development machine and I was able to get dev tools. Not sure why its not running the attachment by itself. Here is the forwardPort for this custom device.
"forwardPort": [
        "ssh", "-o", "ExitOnForwardFailure=yes",
        "-L", "<IP_ADDRESS>:${hostPort}:<IP_ADDRESS>:{$devicePort}", "ccs@<display IP>"
      ],
"forwardPortSuccessRegex": "Linux"

"-L", "<IP_ADDRESS>:${hostPort}:<IP_ADDRESS>:{$devicePort}", "ccs@"

Typo: {$devicePort}
=> Correct one is ${devicePort}

Good catch, but that is also how i have it in my custom devices. Working between different devices


Add support for the instance bootstrap method in BOSH links

Add new bootstrap field of the type boolean into JobInstance struct
Add unit tests for ensuring generated job instances have the proper information
Only set bootstrap to TRUE, if the instance is the one with index 0
Extend the redis bosh release asset, to support the rendering of
redis.conf.erb, where https://github.com/cloudfoundry-incubator/cf-operator/issues/596
was originated.

#168827598

resolves #596


streamlit-echarts 0.4.0 :snowflake:

streamlit-echarts 0.4.0 :snowflake:
Destination channel: Snowflake
Links

PKG-5226
dev_url:        https://github.com/andfanilo/streamlit-echarts/tree/v0.4.0
conda_forge:    None
pypi:           https://pypi.org/project/streamlit-echarts/0.4.0
pypi inspector: https://inspector.pypi.io/project/streamlit-echarts/0.4.0
additional PR's

required python 3.12 for pyechart: https://github.com/AnacondaRecipes/pyecharts-feedstock/pull/2

Explanation of changes:

...

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_5006xpk8_e/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:41: missing_description: The recipe is missing a description

===== ERRORS =====

clone/recipe/meta.yaml:41: missing_license_family: The recipe is missing the about/license_family key.
clone/recipe/meta.yaml:41: missing_documentation: The recipe is missing a doc_url or doc_source_url
clone/recipe/meta.yaml:41: missing_dev_url: The recipe is missing a dev_url
===== Final Report: =====
3 Errors and 1 Warning were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_84p7fnjk5d/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:41: missing_description: The recipe is missing a description

===== ERRORS =====

clone/recipe/meta.yaml:41: missing_dev_url: The recipe is missing a dev_url
clone/recipe/meta.yaml:41: missing_license_family: The recipe is missing the about/license_family key.
clone/recipe/meta.yaml:41: missing_documentation: The recipe is missing a doc_url or doc_source_url
===== Final Report: =====
3 Errors and 1 Warning were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_2f5n1aznfp/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:44: missing_description: The recipe is missing a description
===== Final Report: =====
0 Errors and 1 Warning were found


ada files

Hi,
when using your package I could see that files with an old ada extension have not been link the your syntax highlighter.
I modified the code in order to make it run but you should add the extension '.ada' to the set of ada files for your highlighter. (by the way thanks for your work! it is really useful to me!)
Regards,
Brice

thx for reporting this, should be fixed now. 1.1.0 is at atom.io =)...

Thanks! I'll check it out soon!! =)


Update musescore.sh

MuseScore released version 4, the name MuseScore 3 produces an exit code of 8. Path not found.

Sorry had to close this and re open because I accidentally pushed another fragment change in the same one.

New pull request here: https://github.com/Installomator/Installomator/pull/883


Added "Learning the elixir language" ebook

I didn't see this in the list or pending pull requests. Thanks for maintaining this- I am excited about using it now that I know it exists.
What does this PR do?
Add resource(s) | Remove resource(s) | Add info | Improve repo
For resources
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[ ] Read our contributing guidelines
[ ] Search for duplicates.
[ ] Include author(s) and platform where appropriate.
[ ] Put lists in alphabetical order, correct spacing.
[ ] Add needed indications (PDF, access notes, under construction)

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

use the direct link to pdf see #6153


Typeahead Performance

typeahead: Precompile regexes for removing diacritics.
Precompiling regexes gives a performance increase of around 10-15%
based on tests. See https://jsperf.com/typeahead-regex. This stacks
up when we have a lot of users in an organisation.
This concerns #13192.
Notes
On manual testing 4 runs of each type, profiling before and after reveals that we shave off close to 150ms on my machine (before: 480ms, after: 320ms) for the first keypress.

typeahead: Cache subsets of items to match.
Below are the test results for subsequent key presses for both, timelines are at the same scale, and we can see that the spikes are of lesser duration in the second case. Moreover, for the third and fourth letters, we do not observe significant loss of framerate.
Test data: 15000 users, their full_names hashed to md5 to create a varied dataset.

Calls to matcher()

Token
Before
After

2
15015
15015

23
15015
13845

234
15015
2162

2345
15015
142

234
15015
15015

23
15015
15015

2
15015
15015

Nice!  The first commit looks great; I merged it after renaming regexes to diacritic_regexes.

I think a more correct way to “strip diacritics” would be to normalize to NFKD and remove all characters of general category Mark:
s.normalize("NFKD").replace(/\p{M}/gu, "")

For today’s browsers, we’d need to turn on @babel/plugin-proposal-unicode-property-regex, which expands that to
s.normalize("NFKD").replace(/(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])/g, "")

I wonder how that compares performance-wise? (Probably with the same precompilation trick.)

It's definitely worth trying that approach instead and seeing how it performs.
I posted a longer comment on the caching commit; hopefully it mailed you because GitHub seems to have disappeared it.

One other thing I notice from those profiles: I see multiple calls to query_matches_person; I wonder if that's because we have the sender: and pm-with: checks for matches to a person if you just type a letter (without an operator); potentially, reorganizing things to reuse the results there (which should always be identical) could buy us a factor of 2.

Closing as https://github.com/zulip/zulip/pull/13561 and https://github.com/zulip/zulip/pull/13485 resolved this issue, thanks for all the investigation into this @aero31aero!


Save All not working if more than one source to be saved

Issue Type: Bug
Simply amend multiple files...go to the File menu and 'Save All' is disabled
VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:26:56.255Z)
OS version: Linux x64 5.0.0-32-generic
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz (4 x 2875)

GPU Status
2d_canvas: unavailable_softwaregpu_compositing: disabled_softwaremultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: disabled_offrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: disabled_softwarevulkan: disabled_offwebgl: unavailable_softwarewebgl2: unavailable_software

Load (avg)
1, 1, 1

Memory (System)
15.36GB (7.53GB free)

Process Argv
--no-sandbox --unity-launch --crash-reporter-id a08f0376-d3ed-4bc8-bfe3-06058f5d5b5c

Screen Reader
no

VM
0%

DESKTOP_SESSION
mate

XDG_CURRENT_DESKTOP
MATE

XDG_SESSION_DESKTOP
mate

XDG_SESSION_TYPE
x11

/duplicate of #126133 and fixed in upcoming 1.58, scheduled for release this week.

Thank You for Fixing This Issue.


@param {...(string|Buffer|number} items throws an unmatched regex exception

Instead, I need to use @param {...string|...Buffer|...number} items, which generates a warning during JSDoc validation with ESLint.

Please use @typedef.
/**
 * @param {...MyType} p
 */
export function foo(p){
}

/**
 * @typedef {string|Buffer|number} MyType
 */


Uglifyjs ascii_only option

Hello, I'm using webpack 3.5.4 with AngularJS 1.6.5.
I need to minify the application using the "ascii_only: true" option, but this option doesn't work.
I need the ascii_only option because when I use an angularjs currency filter, after the minification it prints "Â$ 345,000" instead of "$ 345,000".
this is the code that I use to minify the application:
    new webpack.optimize.UglifyJsPlugin({
      compress: { warnings: false, drop_console: true },
      comments: false,
      mangle: true,
      sourceMap: false,
      uglifyOptions: {
        output: {
          ascii_only: true
        }
      }
    }),

Is this option supported or it is a bug?

@cbranca webpack.optimize.UglifyJsPlugin contain 0.4.6 version (see https://github.com/webpack-contrib/uglifyjs-webpack-plugin/tree/v0.4.6), but you use arguments for latest version.
Solution:

Rewrite arguments for https://github.com/webpack-contrib/uglifyjs-webpack-plugin/tree/v0.4.6#usage
Add in package.json latest uglifyjs-webpack-plugin version and use new format arguments.

Thank for issue!

Thank you!

lol, webpack is still using "uglify-js": "~2.7.3"
Would a PR be welcome?


Reading & Writing to Datarefs

Hi, could you perhaps provide some sample code to show the proper way of reading & writing values to the following Datarefs?
Int
Float
Double
FloatArray
IntArray
Data
For Int, Float and Double I'm using the AsInt, AsFloat and AsDouble "getter" and "setter" methods, but I'm not too sure about the FloatArray, IntArray and Data drefs.
Thanks,
Jean

Writing floats is already included here https://github.com/wegylexy/XPLM/blob/main/XPL/Program.cs#L37-L43 and reading is similar, i.e. .Read(values), to copy into your buffer.
For data, you need to define your own unmanaged structure / blittable type.


Update Pages “teaching”

Automatically generated by Netlify CMS

👷 Deploy Preview for koytak processing.

Name
Link

🔨 Latest commit
fa05fa3c4dedc65ee48612f1316439b4100bf409

🔍 Latest deploy log
https://app.netlify.com/sites/koytak/deploys/655139f81ade210007a1af94


Docs: Confusions about contextual typing

Page URL:  https://www.typescriptlang.org/docs/handbook/type-inference.html#contextual-typing
Issue:
This is the example to illustrate contextual typing in docs.
However, I don't get desired result in TS playground with this version of code.
window.onmousedown = function (mouseEvent) { // Parameter 'mouseEvent' implicitly has an 'any' type.(7006)
  console.log(mouseEvent.button);
  console.log(mouseEvent.kangaroo);
};

When I change the code above to version below, I get desired result like doc's.
window.addEventListener('mousedown', function(mouseEvent) {
	console.log(mouseEvent.button); //<- OK
  console.log(mouseEvent.kangaroo); //<- Error!
})

I am confused about this. Can someone gives an explanation?
Thanks so much!

Interesting, this changed somewhere between 3.5 and 3.6:
works in 3.5.1 but doesn't in 3.6.3
Perhaps that's a side-effect of global function merging?  - the definition went from:
// 3.5.1
(property) GlobalEventHandlers.onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

// 3.6.3
(property) onmousedown: (((this: GlobalEventHandlers, ev: MouseEvent) => any) & ((this: Window, ev: MouseEvent) => any)) | null

Interesting, this changed somewhere between 3.5 and 3.6:
works in 3.5.1 but doesn't in 3.6.3
Perhaps that's a side-effect of global function merging?  - the definition went from:
// 3.5.1
(property) GlobalEventHandlers.onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

// 3.6.3
(property) onmousedown: (((this: GlobalEventHandlers, ev: MouseEvent) => any) & ((this: Window, ev: MouseEvent) => any)) | null

I think https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/972 fixes this

I think https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/972 fixes this


Add initializers/deinitializers

Allow initializers/deinitializers for hacks.
It seems to be a standard and expected functionlaity for plugin systems.
Execute them in forward order in Registry's enter and in reverse order in exit.

Closed in a41d9f5c84931de9765a696fd0c95e81fee3573e.


enable textbook versioning

this PR is part of a bigger set of changes required as the Textbook gets re-organized/versioned: https://github.com/Qiskit/platypus/issues/2046
Changes
Fixes https://github.com/Qiskit/platypus/issues/1844
this PR adds the support and includes current version and legacy version of textbook
Implementation details

textbook content moved to a separate repo
update URL to handle versioning
add versioning banner
support versioning translation workflow
remove references to beta

Related
https://github.com/Qiskit/qiskit.org/pull/3105

Is there a preview URL for this that I can peak at?

Is there a preview URL for this that I can peak at?

there are some merge conflicts we need to resolve before preview link

@frankharkins thank you! i created this PR so i can't mark it approved but when you are ready i can merge it


New Merger

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: joeyleondlovu sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


mrc-4577: Run orderly report with parameters

Pretty basic atm - this PR just implements orderly.parameters() which we never actually run! Instead we read the orderly.py before running anything in order to work out which parameters are required/accepted, validating this, modifying the defaults and then passing these in to create the eventual packet.
There's work not done here around what to do in an interactive session; in the R version we check the global environment (.GlobalEnv) but this is not obviously possible in python, though I'm sure it can be done. We could also look in the calling environment of orderly.parameters() but I've not set that up yet. Instead I suggest we look at all the interactive experience somewhat together as a whole later.

So this is linting fine locally but not remotely, which does nothing to improve my feeling that python packing and tooling is an absolute dumpster fire. Will investigate next week.


Update zh translation in self-hosting.md

Update zh translation in self-hosting.md

/lgtm
/approve


Feature: namespace metadata

We want to allow metadata to be added to a namespace, i.e. color themes, descriptions, SEO tags for the HTML, links and references and so forth.
We want to allow both JSON and YAML files for defining metadata.
The watchdog is tasked with watching for metadata.json|metadata.yaml files inside the namespaces.
On admission, the watchdog converts the pure file data into a javascript object (hence, YAML gets converted to JSON, see https://www.npmjs.com/package/js-yaml) to submit to the API.
The watchdog watcher observes all change events and therefore updates the metadata resource by submitting it to the API server again if change is recorded.
The API server picks up the service HTTP request and stores the metadata attached to the Namespace document inside the collection. On request, findOneAndUpdate attaches the submitted data to the document inside the MongoDB.
The API server serves the metadata out-of-the-box, hence only the client needs to adopt to the new changes, i.e. getting more data on request of GET /:namespace
The API server also implements naive validators for the metadata. As adding more variable data to a database increases the risk of injection, we need to validate that the received object is at least on the surface compliant to a rough definition. See the following example for a schematical YAML metadata object:
colors:
  primary: "#242424"
  accent: "#F58B44"
namespace: voyager
description: |
  # Voyager

  Voyager is Zoomoid's main release for 2020. He seeks to combine a spectrum of techno sub-genres
  with the idea of the Voyager probes that have left our solar system and seek new worlds. The album
  describes a journey away from earth along several objects that one might find traveling through space.
links:
  - link: "https://demo.zoomoid.de/voyager-1"
    label: voyager-1
  - link: "https://demo.zoomoid.de/voyager-2"
    label: voyager-2

The fields are respectively parsed by the client to display all metadata attached to a namespace.

Branch has been updated to include the global-player feature last added
The global-player feature still lacks a keep-alive tag for the AudioManager components to keep the queue alive: As soon as a user navigates away from the Page containing a specific, currently playing AudioManager, the autoplay feature breaks, as no AudioManager responds to the finish event and subsequently the updated playState.

7502185 to 9e7153b fixes several runtime issues that caused the containers to fail. No testing has been done yet, however. The system is steady at idle. Testing commences from here

890e000 to 8769344 fix severa runtime bugs concerning the way the service's responses were handled in the watchdog.
Some issues remain regarding checking the res.ok attribute, as it is no longer available as soon as the request is consumed by the res.json() consumer.

217c8b6 to 276ad28 fix more runtime bugs of the orchestration of Watchdog and API concerning the metadata feature.

89f389f to f25bb7c adopt the metadata display and settings to the client and also adopt the API changes.
Also fixes some design issues and the keep-alive of the queue to make auto-play work with navigation and the GlobalPlayer component

All required changes are done, platform works as expected and feature looks good.
Will close this, as the feature is complete.


UP-5000 Revised ticketValidationFilter bean to use serverName instead of service

Checklist

[x] the individual contributor license agreement is signed
[x] commit message follows commit guidelines
[ ] tests are included
[ ] documentation is changed or added
[ ] message properties have been updated with new phrases
[ ] view conforms with WCAG 2.0 AA

Description of change

https://issues.jasig.org/browse/UP-5000

:+1:
I looked through the CAS filter code & comments.  This change appears to be a good one.


Allow status and ssh to run without a lock

Prior to this patch long running operations, such as provisioners, would
prevent vagrant status or vagrant ssh from being run due to Vagrant
action locking. Attempting such actions would result in an error message. This
is inconvienant as shelling into a VM is a common debugging step in figuring
out why a provisioner is taking longer than usual.
Vagrant 1.7 introduced the ability to mark certain actions as not requireing a
lock. This patch adds lock: false to the get_state and get_ssh_info calls
which allows both vagrant status and vagrant ssh to function while a
long-running action is executing in another process.

Simple reproduction case:
Vagrant.configure('2') do |config|

  config.vm.provider :aws do |p, o|
    # AWS configuration.
  end

  config.vm.define :test do |node|
    # Some long-running provisioner
    node.vm.provision :shell, inline: 'sleep 300'
  end

end

Run vagrant provision test in one terminal. Open a separate terminal and attempt vagrant status or vagrant ssh test. Both will fail with:
An action 'get_state' was attempted on the machine 'test',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.

@rtyler Any thoughts on this patch? It's a small change that eases a lot of pain.

:+1: This fix would save me a lot of hassle when working with AWS instances.  Some of my provisioning scripts fail because of it.


Reorganize to comply with Arduino IDE 1.5 Library Specification

Reorganize to comply with Arduino IDE 1.5 Library Specification
Specification can be found at https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification.
Note: I just arbitrarily started the version at 1.0.0, since I did not see any existing version identifier.

Thanks for putting up this PR.

Note: I just arbitrarily started the version at 1.0.0, since I did not see any existing version identifier.

Yeah, I don't really bother with version numbers for my own libraries, I usually embed the git hash into my firmware at compile time (like this). I usually have the libraries as a git submodule, which are at a specific commit for the parent repository's commit. So that way I can always discern which version is running if.
Using version 1.0.0 or higher means that the public API should be considered stable. Which I guess we can just say it is, I have used a project that relied on this library almost daily for over a year and didn't run into issues / bugs. Since I don't have access to an OBD9141 port right now I certainly won't be changing the public API. Judging from the faq entry we are definitely past 1.0.0!

All your suggestions sounded good.  I did a force-push that should addressed them.

Thanks for your contribution.

Was the zip file intentional? I didn't spot that in the first version of the PR... It also contains a .git folder, but the repository in the zip file itself also has unstaged changes.
I presume this was included by accident (and I didn't spot that on the second review pass). Am I good to delete that zipfile?

Darn, I'm really sorry about that!  Yeah, I created that for testing the library.properties file and it it accidentally was added when I did the fixes.
As far as I'm concerned, you could even go ahead and re-write to get rid of it even if you are concerned about repo size and such.

No problem, mistakes happen. Next time its better to add additional commits to the PR, and then they can be squashed (if need be) just before the merge.

As far as I'm concerned, you could even go ahead and re-write to get rid of it even if you are concerned about repo size and such.

Even though that's not the prefered way to rewrite the history on the master branch once it has gone public I've done just that. Given that the other version of the branch was out there for just 5 minutes I think it's highly unlikely that someone already pulled the changes and has now ended up with a diverged repository. So I deleted the zip file, ammended the merge commit and force pushed the changes. Thanks for the quick response to resolve this.


fix refining list by using extend on an iterator

The interface for refining on extend for the typed list is a bit
'wobbly'. The type of the underlying thing to extend from, may be
encoded in three different ways. Specifically, certain kinds of
generators or iterators will expose the type of their items using the
yield_type attribute. So, we add a test to expose that missing
functionality via a test and add reading the attribute on extend to
enable this functionality.

FWIW: the error message was:
unable to extend list, iterable is missing either *dtype* or *item_type*

Yeah, I think the CI errors were due to a borked master, I re-ran them a few minutes ago and I am hoping the build will be green.

/azp run

Thanks for merge!


pre-commit: PR115728

Link: https://github.com/llvm/llvm-project/pull/115728
Requested by: @dtcxzyw

/close


fix-#362: fixed the bug of anchor tag in logo

Summary
To Resolve the bug : Adding the anchor tag in the logo
Description
Adding the anchor tag to logo is useful as it user to directly navigate to home page from any other page.
Images
https://github.com/krishnaacharyaa/wanderlust/assets/105008414/0a9261dc-7c40-4250-ac2d-488389ce3fd3
Issue(s) Addressed
Closes #362
Prerequisites

[X] Have you followed all the CONTRIBUTING GUIDELINES?

@Adityajparmar37 it is assigned and PR is already raised https://github.com/krishnaacharyaa/wanderlust/pull/375. If it is inactive for 2-3 days, then will merge yours... Similar comment as of #375 to you even

Closing as it was already assigned to the other person and it got merged!


Split Lovelace out to new module and add multi-asset Value types

Next step is to use the multi-asset Value.
This takes a slightly different tack on how to represent multi-asset values, namely by making 'AssetId' a disjoint sum so that ada has a label distinct from all other custom assets.
data AssetId = AssetId !PolicyId !AssetName
             | AdaAssetId

data Value

selectAsset :: Value -> (AssetId -> Quantity)
valueFromList :: [(AssetId, Quantity)] -> Value
valueToList :: Value -> [(AssetId, Quantity)]

plus derived convenience functions
selectLovelace :: Value -> Lovelace
lovelaceToValue :: Lovelace -> Value

bors merge


cssnano and sourcemaps

did someone tried to create correct sourcemaps after the extraction? and my 2nd question is: is it possible to run cssnano to minify all extracted files directly without any temporary folder? there is an option for that i know, but cssnano do a lot more than just minify.
thx!! great plugin!!

did someone tried to create correct sourcemaps after the extraction?

not supported yet
it's quite challenging to implement because I think it depends on the build tool and to support all is not trivial
what build tool do you use?

is it possible to run cssnano to minify all extracted files directly without any temporary folder?

at the moment not possible because the minimization is hard coded in the plugin but I've plans to change this with the next major release (v2) and support any other postcss plugin.
but I haven't had time to work on this plugin

@SassNinja Just noticed that csswring is deprecated. This plugin uses that for the minimize option. Would you be open to a PR that changes to using cssnano instead?

@kingmauri I've finally found some time to take (partially) care of your feature requests

and my 2nd question is: is it possible to run cssnano to minify all extracted files directly without any temporary folder? there is an option for that i know, but cssnano do a lot more than just minify.

yes, since v2 (released a minute ago) it's possible to use whatever you like for minification as I parse the postcss.config.js and apply all subsequent PostCSS plugins to the extracted CSS as well

did someone tried to create correct sourcemaps after the extraction?

I've tried hard to also add source map support in v2.0.0 but it's really complicated because there are inconsistencies across the build tools (gulp behaves different to e.g. webpack) and I haven't found a way yet to always access the map within my plugin.
For more information you may follow this discussion https://github.com/postcss/postcss/issues/1312

@qodesmith thanks for the offer!
however this has become obsolete since v2 because the minimize option has been removed

Hi @SassNinja,
first of all thanks for the nice plugin! :)
Did you get by any chance get any further with generating source maps?
Thanks!


[VS Code] [Audio] cannot stop call in Disconnected state

<!--
Attach verbose logs as follows:
1. Press F1 (or Ctrl-Shift-P), type export

Dupe of 1627.


Cannot found the nodes on the menu

I install this custom node with the manager.
When I try to find openpose node I didn't found it or any other node on the menu...
Is there some post installation to do ?

I've got the same issue. Running ComfyUI inside a Docker (in K8s) so if there are some changes outside of the ComfyUI folder, restarting ComfyUI (by deleting the pod & re-creating it) will fortify the outside changes.
Need some insights about that. Thanks!

I my case I just instal comfyUI in my local ubuntu (small card graphic yes). Everything in comfyUI work (other model lora or custom node) but not controlnet, I have no hint on where to search to fix it.
When I restart ComfyUI nothing change the controlnet only are missing (and if I try to install other extension they are here after the restart).

@levaleureux Can you post the log? Did it print any error?

I've tried installing this on Colab using the Manager and the installation fails without a descriptive error message.
The files all appear to be in their rightful place but the nodes don't show up in the menu. Anything else needs to be done for this work?


Need a noise suppressor for Roosters

Other things? Called it the Pakressor

Well it's called the Pakifier. Added in 12.2.46


Linter doesn't catch invalid template test

From https://github.com/pypi/warehouse/pull/13457
Raised a TemplateError for if foo is None
Why doesn't curlylint catch this?

During investigation, I learned that the test here doesn't actually render templates - rather the get_template() method calls the filesystem and loads the file only, doesn't actually render it (we'd need to inject piles of variables for that to happen).
This test will catch a class of errors like missing endif tags (jinja2.exceptions.TemplateSyntaxError), but doesn't perform the testing that would have surfaced an invalid test condition (aka jinja2.exceptions.TemplateRuntimeError)

I opened https://github.com/thibaudcolas/curlylint/issues/153 to discuss this kind of thing.


Build Release JS

Hi
sorry for yet another pull request but somehow with the last i forgot to run the release task after applying the changes, so the version that is pull from npm has the correct src file, but the build is still an old one.
You could either pul this reauest or just update it yourself,
sorry and thanks

Hah sorry dude rookie mistake, maybe I shouldn't have removed the commit-build check!

PS I can't publish this until later when I'm not on my work laptop (wrong npm user)

Thanks and sorry for the trouble.

Np, that's released now

👍


Prefix validation error messages with "Error:"

Description
Adds the prefix "Error:" to all validation error messages to improve a11y.
Checklist
General
Read the full guidelines for PRs here

[x] Added the correct label: < feature | enhancement | bug | dependencies | infrastructure | ignore-for-release | database >
[x] Assigned to a specific person, civiform/developers, or a more specific round-robin list.
[x] Created unit and/or browser tests which fail without the change (if possible)
[x] Performed manual testing (Chrome and Firefox if it includes front-end changes)
[x] Extended the README / documentation, if necessary

User visible changes

[x] Followed steps to internationalize new strings
[x] Wrote browser tests using the validateAccessibility method

Issue(s) this completes
Fixes https://github.com/civiform/civiform/issues/5484

@avaleske

Are we intentionally excluding admin validation messages?

Yes, we don't support screen readers in the admin UI


Pass indexes to the Dataset and DataArray constructors

Is your feature request related to a problem?
This is part of #6293 (explicit indexes next steps).
Describe the solution you'd like
A Mapping[Hashable, Index] would probably be the most obvious (optional) value type accepted for the indexes argument of the Dataset and DataArray constructors.
pros:

consistent with the xindexes property

cons:

need to be careful with what is passed as coords and indexes
multi-indexes: redundancy and order matters (e.g., pandas multi-index levels)

An example with a pandas multi-index
Currently a pandas multi-index may be passed directly as one (dimension) coordinate ; it is then "unpacked" into one dimension (tuple values) coordinate and one or more level coordinates. I would suggest depreciating this behavior in favor of a more explicit (although more verbose) way to pass an existing pandas multi-index:
import pandas as pd
import xarray as xr

pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar"))
idx = xr.PandasMultiIndex(pd_idx, "x")

indexes = {"x": idx, "foo": idx, "bar": idx}
coords = idx.create_variables()

ds = xr.Dataset(coords=coords, indexes=indexes)

The cases below should raise an error:
ds = xr.Dataset(indexes=indexes)
# ValueError: missing coordinate(s) for index(es): 'x', 'foo', 'bar'

ds = xr.Dataset(
    coords=coords,
    indexes={"x": idx, "foo": idx},
)
# ValueError: missing index(es) for coordinate(s): 'bar'

ds = xr.Dataset(
    coords={"x": coords["x"], "foo": [0, 1, 2, 3], "bar": coords["bar"]},
    indexes=indexes,
)
# ValueError: conflict between coordinate(s) and index(es): 'foo'

ds = xr.Dataset(
    coords=coords,
    indexes={"x": idx, "foo": idx, "bar": xr.PandasIndex([0, 1, 2], "y")},
)
# ValueError: conflict between coordinate(s) and index(es): 'bar'

Should we raise an error or simply ignore the index in the case below?
ds = xr.Dataset(coords=coords)
# ValueError: missing index(es) for coordinate(s): 'x', 'foo', 'bar'
# or
# create unindexed coordinates 'foo' and 'bar' and a 'x' coordinate with a single pandas index

Should we silently reorder the coordinates and/or indexes when the levels are not passed in the right order? It seems odd requiring mapping elements be passed in a given order.
ds = xr.Dataset(coords=coords, indexes={"bar": idx, "x": idx, "foo": idx})
list(ds.xindexes.keys())
# ["x", "foo", "bar"]

How to generalize to any (custom) index?
With the case of multi-index, it is pretty easy to check whether the coordinates and indexes are consistent because we ensure consistent pd_idx.names vs. coordinate names and because idx.get_variables() returns Xarray IndexVariable objects where variable data wraps the pandas multi-index.
However, this may not be easy for other indexes. Some Xarray custom indexes (like a KD-Tree index) likely won't return anything from .get_variables() as they don't support wrapping internal data as coordinate data. Right now there's nothing in the Xarray Index base class that could help checking consistency between indexes vs. coordinates for any kind of index.
How could we solve this?

A. add a .coords property to the Xarray Index base class, that returns a dict[Hashable, IndexVariable].

Ambiguous when an Index is created directly, i.e., like above xr.PandasMultiIndex(pd_idx, "x"). Should .coords return None and return the coordinates returned by the last .get_variables() call?
What if different sets of coordinates refer to a common index (e.g., after copying the coordinate variables, etc.)?

B. add a .coord_names property to the Xarray Index base class that returns tuple[Hashable, ...], and add a private attribute to IndexVariable that returns the index object (or return it via a very lightweight IndexAdapter base class used to wrap variable data).

Index.get_variables(variables) would by default return shallow copies of the input variables with a reference to the index object.
If that's necessary, we could also store the coordinate dimensions in coord_names, i.e., using tuple[tuple[Hashable, tuple[Hashable, ...]], ...].

I think I prefer the second option.
Describe alternatives you've considered
Also allow passing index types (and build options) via indexes
I.e., Mapping[Hashable, Index | Type[Index] | tuple[TypeIndex, Mapping[Any, Any]]], so that new indexes can be created from the passed coordinates at DataArray or Dataset creation.
pros:

Flexible.

cons:

This is complicated. Constructing the Dataset / DataArray (with default indexes) first then calling .set_index is probably better.
Hard to deal with multi-index (redundancy of build option, etc.)

Pass multi-indexes once, grouped by coordinate names
I.e., indexes keys accept tuples: Mapping[Hashable | tuple[Hashable, ...], Index]
pros:

No redundancy and easier to check consistency between indexes vs. coordinates

cons:

Not consistent with the .xindexes property
Complicated when eventually using tuples for coordinate names?

Additional context
No response

I wonder if it would help to have a custom type that unlike tuple is invalid for coordinates / data variables, but allows to reduce the redundancy? E.g.
indexes = {xr.combined("lat", "lon"): idx, xr.combined("z", "x", "y"): multi_index})

This would be immediately normalized to:
indexes = {"lat": idx, "lon": idx, "z": multi_index, "x": multi_index, "y": multi_index}

I realize there's a lot here and I've been out of this thread for a bit, so please forgive any naive questions!

I would suggest depreciating this behavior in favor of a more explicit (although more verbose) way to pass an existing pandas multi-index:

What's the rationale for deprecating this? I think my experience with users of xarray is mostly those coming from pandas; for them interop is quite important. If there's a canonical way of transforming the index, it would be friendlier to do that automatically.
import pandas as pd
import xarray as xr

pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar"))
idx = pd_idx

ds = xr.Dataset(coords={"x": idx})

i.e.
ds = xr.Dataset(coords=coords)
# ValueError: missing index(es) for coordinate(s): 'x', 'foo', 'bar'
# or
# create unindexed coordinates 'foo' and 'bar' and a 'x' coordinate with a single pandas index

I would have expected the later, both for coords=coords and for coords=pd_idx (again, with the disclaimer that I may be missing crucial parts of the puzzle here).

Should we silently reorder the coordinates and/or indexes when the levels are not passed in the right order? It seems odd requiring mapping elements be passed in a given order.

👍

What's the rationale for deprecating this? I think my experience with users of xarray is mostly those coming from pandas; for them interop is quite important.

Yes I agree that interoperability with pandas is important. Providing pandas (multi-)indexes via coords is convenient and worked pretty well so far because (1) indexes and dimension coordinates were not clearly distinct concepts and (2) multi-index levels were not "real" coordinates. However, this is not the case anymore.
Now that indexes are really distinct from coordinates, I'd rather expect the following behavior for the case of pandas multi-index:
pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar"))

# convert a pandas multi-index to a numpy array returns level values as tuples
np.array(pd_idx)
# array([('a', 1), ('a', 2), ('b', 1), ('b', 2)], dtype=object)

# simply pass the index as a coordinate would treat it as an array-like, i.e., like numpy does
xr.Dataset(coords={"x": pd_idx})
# <xarray.Dataset>
# Dimensions:  (x: 4)
# Coordinates:
#   * x        (x) object ('a', 1) ('a', 2) ('b', 1) ('b', 2)
# Data variables:
#     *empty*

In this specific case, I'd favor consistency with how Numpy handles Pandas indexes over more convenient interoperability with Pandas. The array of tuple elements is not very useful, though. There should be ways to create Xarray objects with Pandas indexes, but I think it's better if we eventually pass them via indexes instead of via coords, or via both indexes and coords even if that's slightly less convenient.
More generally, I don't know how will evolve the ecosystem in the future (how many custom Xarray indexes?). I wonder to which point in Xarray's API we should support special cases for Pandas (multi-)indexes compared to other kinds of indexes.

Thanks for the thoughtful reply @benbovy
(This is a level down and you can make a decision later, so fine if you prefer to push the discussion.)
How would we handle creating xarray objects from pandas objects where they have a multiindex?
To what extent do you think this is this the "standard case" and we could default to it?
idx = xr.PandasMultiIndex(pd_idx, "x")
indexes = {"x": idx, "foo": idx, "bar": idx}

How would we handle creating xarray objects from pandas objects where they have a multiindex?

For pandas.Series / pandas.DataFrame objects, DataArray.from_series() / Dataset.from_dataframe() already expand multi-index levels as dimensions.
For a pandas.MultiIndex, we could do like below but it is a bit tedious:
import pandas as pd
import xarray as xr
from xarray.indexes import PandasMultiIndex

pd_idx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("foo", "bar"))
idx = PandasMultiIndex(pd_idx, "x")

indexes = {"x": idx, "foo": idx, "bar": idx}
coords = idx.create_variables()

ds = xr.Dataset(coords=coords, indexes=indexes)

For more convenience, we could add a class method to PandasMultiIndex, e.g.,
# this calls PandasMultiIndex.__init__() and PandasMultiIndex.create_variables() internally
indexes, coords = PandasMultiIndex.from_pandas_index(pd_idx, "x")

ds = xr.Dataset(coords=coords, indexes=indexes)

Instead of indexes, coords raw dictionaries, we could return an instance of the Indexes class, which is already returned by Dataset.xindexes and which encapsulates the coordinate variables:
xmidx = PandasMultiIndex.from_pandas_index(pd_idx, "x")

ds = xr.Dataset(coords=xmidx.variables, indexes=xmidx)

For even more convenience, I think it might be reasonable to accept Indexes instances directly in Dataset / DataArray constructors and in .update(), i.e.,
# both cases below will implicitly add the coordinates found in `xmidx`
# (if there's no conflict with other coordinates)

ds = xr.Dataset(indexes=xmidx)

ds2 - xr.Dataset()
ds2.update(xmidx)

The same approach could be used for pandas.IntervalIndex (as discussed in #4579).

I'm thinking of only accepting one or more instances of Indexes as indexes argument in the Dataset and DataArray constructors. The only exception is when fastpath=True a mapping can be given directly.

It is much easier to handle: just check that keys returned by Indexes.variables do no conflict with the coordinate names in the coords argument
It is slightly safer: it requires the user to explicitly create an Indexes object, thus with less chance to accidentally provide coordinate variables and index objects that do not relate to each other (we could probably add some safe guards in the Indexes class itself)
It is more convenient: an Xarray Index may provide a factory method that returns an instance of Indexes that we just need to pass as indexes


Explicitly direct people to chat channels

A number of people have started using channel names as hashtags on the mailing lists. I want to make it obvious it is an actual chat channel, not a hashtag.

I am not married to the explicit wording here.


Integration tests flaky

I occasionally see the following flake when running integration tests locally:
exec curl output:000 i:1
thread 'integration_tests::remote_port_forwarding::simple_with_tokio' panicked at 'assertion failed: `(left == right)`
  left: `"000"`,
 right: `"200"`', async-ssh2-lite/tests/integration_tests/remote_port_forwarding.rs:121:17

It seems like something is occasionally corrupting data. Appears unrelated to the issue documented in #16, because I see this flake both with and without the change in #16.

@benesch I know this problem, but I also don't know the exact reason.

Hi @vkill, was this fixed? I don’t see anything related in the commit history.

@benesch , Don't fixed, Because I don't know how to fix it.

Could we keep this issue open until it's resolved? Even if you don't know how to fix it, perhaps someone else who does will come along!

Yes, maybe the problem is ssh itself.

Hi @benesch
Can you test https://github.com/bk-rs/ssh-rs/pull/23 ?

Hi, @benesch
This is not a bug, we should wait for the port to listen because the status 000 maybe is Connection failed.
Please refer to  https://github.com/bk-rs/ssh-rs/pull/25

https://github.com/bk-rs/ssh-rs/blob/b79d97f5653695dc4b9242635476d400023f4d3d/async-ssh2-lite/tests/integration_tests/session__channel_forward_listen.rs#L164
This problem still exists.


ENH: Name the 'main' event stream in built-in plans.

Recall the "baseline readings" use case. Building baseline readings
in by default may wait until the next cycle, but this lays the
groundwork by making the primary event stream addressable by name.

Do we want to bikeshed the name 'main' a bit?

core
primary
leader
principle
head
central

(I may have used a thesaurus)

I don't love 'main' but not of these jump out at me either. I guess I like 'primary'. No strong opinion (for once).

Opinions @ericdill @dchabot @klauer? I'd like to use this tomorrow.

main/primary sound fine.


PR: Fix tests by pinning testpath and switching to Python 3.5 on Windows

Conda package for testpath 0.4.1 contains wrong METADATA and that's breaking pip.
Easy way to reproduce:
conda create -n pip-break python=3.6 testpath
conda activate pip-break
pip install ipython

Then see the last command generate a long traceback.
Pinging @mingwandroid and @jjhelmus about this. This requires an urgent fix.

The testpath conda package was built with a version of flit which does not include takluyver/flit#212.  The result is that pkg_resources is not able to parse the Required-Dist line in the METADATA file.  I'll update the flit conda package and start new builds of testpath.

testpath 0.4.1 (build 1) packages with a correct METADATA file and 0.4.2 packages are now available.  I tested that pip works with both.

Thanks @jjhelmus for the quick response!


Implement a creature class

Inherit from Card Class and include 3 attributes:
attack : int
base_toughness : int
toughness : int
color : tuple

Need 1 extra method:
def fight(self, other): -> None

this should modify toughness in place.
Have a reset method:
def reset(self): -> None

Resets the toughness to base toughness.


Custom decode function

I'd like your thoughts on this concept. Since the datasource of the terrain tiles are now injected into the terrain provider via the *Resource classes, the last remaining assumption in the code is the worker-utils mapboxTerrainToGrid function decoding the RGB values to the Terrain-RGB spec.
For my use-case, the source of the terrain tiles defines the RGB encoding scheme. So providing a decodeRgb function with the resource allows me to configure everything in one place. The challenge is that the function reference must cross the web worker boundary - which is unsupported. So the function is encoded as a string, sent to the worker, parsed via regex and recreated using new Function.
Obviously it comes with some caveats:

If the Function.toString() method returns a string that doesn't match the function-parsing regex, it'll fallback to the Terrain-RGB decoding method.
The function must execute in it's own local scope - no global references, instance variables, etc. Only the provided parameters should be used. I haven't tested security implications of accessing global scoped variables.
CSP rules may block the Function constructor when using custom decode functions. This will fallback to the Terrain-RGB decoding method.

The default behaviour with MapboxTerrainProvider will simply pass nothing for a decoding function, and the worker will fallback to the default Terrain-RGB decode function. This should be equivalent to the current behaviour, without security concerns.
This feature removes the need to pass around interval/offset values too.
Another use-case for this feature can be seen in another fork of cesium-martini, where a developer has used the Mapzen Terrarium format at https://github.com/mlim15/cesium-martini/commit/15a3641018610a18fd505943a0e4c3a790a4428c
This example could be expressed like so:
const terrainResource = new DefaultHeightmapResource({
  url: "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/${z}/${x}/${y}.png",
  decodeRgb: (r, g, b) => (r * 256 + g + b / 256) - 32768,
});

const terrainProvider = new MartiniTerrainProvider({
  resource: terrainResource,
  requestVertexNormals: false,
  requestWaterMask: false,
});

For my specific use-case, I'm using the alpha component to determine if the cell contains NODATA, so I can construct a decode function like so:

alpha < 255 = NODATA
interval = 0.001m
offset = -11,200m (Mariana Trench)

decodeRgb: (r, g, b, a) => a < 255 ? 0 : (r * 256 * 256) * 0.001 + (g * 256) * 0.001 + b * 0.001 - 11200.0

I understand what you're trying to do, and making things work with arbitrary heightmap encodings is definitely super-interesting. I could see this being used to directly render from float32 COGs, for example (though the bandwidth would be a bit nuts). However, my intuition is that your solution might not be the best way to achieve this:

The stringification/extraction code presents a large API surface that seems out of scope for this module
The scope requirements are non-intuitive and probably inadequate to some of the more interesting tasks that might be used with custom decoding functionality.

What you're proposing is essentially to build a mini webworker compiler into the application. It seems that the answer might be just to extend/replace the current web worker, rather than integrating new capabilities into it. That way your function will have full access to the web-worker scope.
It seems like custom web workers compiled either upfront (which will be most peoples' preference) or within your application could just build whatever complexity into the decode functions that you want, as part of wrapper/application code.

Yes I think that's the way to go. In that case, I feel like removing the concept of workers from the provider would be worthwhile. This removes the maxWorkers/useWorkers options from the terrain provider, and allows it to be composed with or without workers depending on how you want to consume it.
By default, a worker farm can be instantiated using the existing logic if the consumer doesn't provide their own decoding implementation. This also means in testing, the worker farm can be omitted and the vanilla decodeTerrain function can simply be called.
I'll open a separate PR if you're happy with that approach?

Yeah, sounds good. I think the maxWorkers config is likely still useful, and we want to retain some way to pass options to the decoder in general. Maybe we can allow passing a decoderOptions object? Happy for another PR integrating this.


cannot import name '_png' from 'matplotlib'

I received this error, cannot import name '_png' from 'matplotlib' when trying to run the new plot command when using Google Colab.
It seems Colab has an older version of matplotlib running - 3.2.2
If I forced an install of matplotlib, pip install -U matplotlib and restarted the runtime, I could get the plot to work correctly.
Plot is helpful!

Did you run the first second cell?
!pip install -U diffusers-interpret
!pip install matplotlib==3.1.3

Because matplotlib has a strange bug in Colab and requires that version to work. I just ran the notebooks from top to bottom and they worked.

My bad, I was running the existing notebook I had. I didn't see you updated the example notebook.


Problem with light card

Good night.
I've realized a problem with light temperature card. When i click to see more information the color temperature is showed, but, the second information that i believe is color, is showed as "Undefined"

Adding a couple more issues with the light card I noticed in my setup (2024.1.4):
Toggle switch gets misaligned when the whole modal won't fit vertically on the screen:
Fits (plus see the undefined buttons)

Doesn't fit (brightness bar is reduced to 0 height)

Properties of the group entity (combination of dumb and smart lights)
min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
effect_list: Akemi, Android, Aurora, Black Hole, Blends, Blink, Blink Rainbow, Blobs, Blurz, Bouncing Balls, Bpm, Breathe, Candle, Candle Multi, Chase, Chase 2, Chase 3, Chase Flash, Chase Flash Rnd, Chase Rainbow, Chase Random, Chunchun, Colored Bursts, Colorful, Colorloop, Colortwinkles, Colorwaves, Crazy Bees, DJ Light, DNA, DNA Spiral, Dancing Shadows, Dissolve, Dissolve Rnd, Distortion Waves, Drift, Drift Rose, Drip, Dynamic, Dynamic Smooth, Fade, Fairy, Fairytwinkle, Fill Noise, Fire 2012, Fire Flicker, Firenoise, Fireworks, Fireworks 1D, Fireworks Starburst, Flow, Flow Stripe, Freqmap, Freqmatrix, Freqpixels, Freqwave, Frizzles, Funky Plank, GEQ, Game Of Life, Ghost Rider, Glitter, Gradient, Gravcenter, Gravcentric, Gravfreq, Gravimeter, Halloween Eyes, Heartbeat, Hiphotic, ICU, Juggle, Juggles, Julia, Lake, Lighthouse, Lightning, Lissajous, Loading, Matripix, Matrix, Metaballs, Meteor, Meteor Smooth, Midnoise, Multi Comet, Noise 1, Noise 2, Noise 3, Noise 4, Noise Pal, Noise2D, Noisefire, Noisemeter, Noisemove, Octopus, Oscillate, Pacifica, Palette, Percent, Perlin Move, Phased, Phased Noise, Pixels, Pixelwave, Plasma, Plasma Ball, Plasmoid, Polar Lights, Popcorn, Pride 2015, Puddlepeak, Puddles, Pulser, RSVD, Railway, Rain, Rainbow, Rainbow Runner, Random Colors, Ripple, Ripple Peak, Ripple Rainbow, Rocktaves, Rolling Balls, Running, Running Dual, Saw, Scan, Scan Dual, Scanner, Scanner Dual, Scrolling Text, Sindots, Sine, Sinelon, Sinelon Dual, Sinelon Rainbow, Soap, Solid, Solid Glitter, Solid Pattern, Solid Pattern Tri, Spaceships, Sparkle, Sparkle Dark, Sparkle+, Spots, Spots Fade, Squared Swirl, Stream, Stream 2, Strobe, Strobe Mega, Strobe Rainbow, Sun Radiation, Sunrise, Sweep, Sweep Random, Swirl, TV Simulator, Tartan, Tetrix, Theater, Theater Rainbow, Traffic Light, Tri Fade, Tri Wipe, Twinkle, Twinklecat, Twinklefox, Twinkleup, Two Dots, Washing Machine, Waterfall, Waverly, Wavesins, Waving Cell, Wipe, Wipe Random, blink, breathe, channel_change, finish_effect, okay, stop_effect
supported_color_modes: brightness, color_temp, onoff, rgb, xy
color_mode: null
brightness: null
color_temp_kelvin: null
color_temp: null
hs_color: null
rgb_color: null
xy_color: null
effect: null
entity_id: light.office, light.wled_monitor, light.corner_lamp_group, light.wled_board_main
icon: mdi:lightbulb-group
friendly_name: Office Lights
supported_features: 44

WLED light is missing the on/off toggle:

Light properties (when on)
effect_list: Akemi, Android, Aurora, Black Hole, Blends, Blink, Blink Rainbow, Blobs, Blurz, Bouncing Balls, Bpm, Breathe, Candle, Candle Multi, Chase, Chase 2, Chase 3, Chase Flash, Chase Flash Rnd, Chase Rainbow, Chase Random, Chunchun, Colored Bursts, Colorful, Colorloop, Colortwinkles, Colorwaves, Crazy Bees, DJ Light, DNA, DNA Spiral, Dancing Shadows, Dissolve, Dissolve Rnd, Distortion Waves, Drift, Drift Rose, Drip, Dynamic, Dynamic Smooth, Fade, Fairy, Fairytwinkle, Fill Noise, Fire 2012, Fire Flicker, Firenoise, Fireworks, Fireworks 1D, Fireworks Starburst, Flow, Flow Stripe, Freqmap, Freqmatrix, Freqpixels, Freqwave, Frizzles, Funky Plank, GEQ, Game Of Life, Ghost Rider, Glitter, Gradient, Gravcenter, Gravcentric, Gravfreq, Gravimeter, Halloween Eyes, Heartbeat, Hiphotic, ICU, Juggle, Juggles, Julia, Lake, Lighthouse, Lightning, Lissajous, Loading, Matripix, Matrix, Metaballs, Meteor, Meteor Smooth, Midnoise, Multi Comet, Noise 1, Noise 2, Noise 3, Noise 4, Noise Pal, Noise2D, Noisefire, Noisemeter, Noisemove, Octopus, Oscillate, Pacifica, Palette, Percent, Perlin Move, Phased, Phased Noise, Pixels, Pixelwave, Plasma, Plasma Ball, Plasmoid, Polar Lights, Popcorn, Pride 2015, Puddlepeak, Puddles, Pulser, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, Railway, Rain, Rainbow, Rainbow Runner, Random Colors, Ripple, Ripple Peak, Ripple Rainbow, Rocktaves, Rolling Balls, Running, Running Dual, Saw, Scan, Scan Dual, Scanner, Scanner Dual, Scrolling Text, Sindots, Sine, Sinelon, Sinelon Dual, Sinelon Rainbow, Soap, Solid, Solid Glitter, Solid Pattern, Solid Pattern Tri, Spaceships, Sparkle, Sparkle Dark, Sparkle+, Spots, Spots Fade, Squared Swirl, Stream, Stream 2, Strobe, Strobe Mega, Strobe Rainbow, Sun Radiation, Sunrise, Sweep, Sweep Random, Swirl, TV Simulator, Tartan, Tetrix, Theater, Theater Rainbow, Traffic Light, Tri Fade, Tri Wipe, Twinkle, Twinklecat, Twinklefox, Twinkleup, Two Dots, Washing Machine, Waterfall, Waverly, Wavesins, Waving Cell, Wipe, Wipe Random
supported_color_modes: rgb
color_mode: rgb
brightness: 255
hs_color: 232.941, 100
rgb_color: 0, 30, 255
xy_color: 0.136, 0.047
effect: Solid
icon: mdi:television-ambient-light
friendly_name: WLED-Monitor
supported_features: 36

Let me know if you need anything else

(not sure if you'd prefer a new bug... but)
Looks like the group header is picking up multiple "Color" options from the members:

Hmm, you're right, but I'm not sure how to solve this. It does, however, correctly list the available color modes.
supported_color_modes: color_temp, hs, rgbw, rgbww, white, xy


Odd Shapes - Different than in After Effects and Preview

I am having troubles getting shapes to keep the shape of what was created. Looks great in AE and when previewed, but really odd shapes when actually rendered. Here is an example of the shapes in after effects (left), then what is seen when rendered and viewed (right).

Can you let me know what I am doing wrong?
File attached is it helps.

hi, I think you missed the file attachment. If you can share the .aep, I'll check it out.
Make sure you 're using the correct player version.

Attached is the AE file along with the rendered animation files.
logo-test.zip

I've checked the animation here and it seems to work fine.
Can you share a link where it is failing?
Could it be related to using an old version of the player?

I only have locally so can't send you a link, but will try updating the player and see if that fixes the problem for me.
Thanks for the quick reply!

That fixed it, thanks for the help!


[NO-ISSUE] Added cockroachdb image name and tag to values.yaml

This is used for dark sites, where they need to pull the cockroach image from a local repo.
Also fixed some weird table formatting issues: I've attached a picture of the "rich" diff to show that it doesn't change content, just fixes some raw text bugs.


Improve Error Message: Assigning a list of Modules to self incorrectly

In setup(), submodules are expected to "know their name" when they are assigned to self, which is implemented by  overriding __setattr__. This can cause problems when appending modules to a list. Consider the following code.
class Test(nn.Module):
  def setup(self):
    self.layers = []
    for i in range(3):
      self.layers.append(nn.Dense(5))

  def __call__(self, x):
    for layer in self.layers:
      x = layer(x)  # <--- ValueError: Can't call methods on orphaned modules
    return x

The code is failing because self.layers.append() does not assign anything to self, so the overwritten __setattr__ isn't triggered. As a result, the Dense modules are not properly initialized and they are recognized as "orphaned" (no parent scope). The canonical way to fix this code is:
def setup(self):
  self.layers = [nn.Dense(5) for _ in range(3)]

Requiring the user to understand this distinction causes mental overload, especially since the error message is cryptic.
Some suggestions for improvements:

Improve the error message by explaining how modules should be assigned to self in setup.

Create a new abstraction ModuleList, and only allow lists of Modules here (similar to PyTorch).

Convert the list to a some data structure that tracks mutation properly.

Option (1) is a quick fix, but doesn't seem like a great long-term solution, since this error can appear in other cases as well, so we want to make sure the error message also covers the other cases.
Option (2) doesn't require much mental overload, but the user should remember that this abstraction exists.
Option (3) would also work, but I fear that this magic may lead to new special cases in the future that we should address.
I personally feel option (2) is most consistent and robust in the long-term. Since it doesn't have to be used in a particular way, it seems also easiest to understand for users.

I am sympathetic to option (2), but here are a few questions:

Could/should we raise an error if you assign a "vanilla" list of Modules?
What happens if you want to store a list that has both Modules and other things (e.g. the relu function, which is a common need for some Sequential patterns)

Also curious to hear from @levskaya who wrote the original "module list logic" in Modules.

Just came across the (lack of) these module containers and searched my way here. With the setup() approach it's definitely useful for more than just the setattr issue mentioned here.
As a PyTorch user, I find it useful to have both a Sequential and ModuleList, where sequential has a call that by default sequentially iterates over the contained modules saving the extra code in call. ModuleList requires manual iteration by iterator or index. On occasion I also use ModuleDict but definitely less than Sequential and ModuleList (in that order).
In PT one can specify the module names in the Sequential container by passing (name, module) pairs via OrderedDict. Otherwise the a sequence of numbers from '0' is generated for you.
Being able to place lambdas / fn in the containers, especially Sequential is important when you don't have module equivalents for activations.

My high-level view:
ModuleLists are much less useful here than pytorch, since we really don't want to be mucking about with the submodules state after setup, compared to pytorch - since we need to guarantee certain invariant functional behavior and we use lazy initialization everywhere.  I'm pretty sure supporting mutable ModuleLists is just going to open up a new nightmare dimension of bugs... and if you can't use them outside setup() I'm not sure there's much point.  I might be overly paranoid here, so feel free to push back, but the current approach follows the generally immutable design approach we take elsewhere in flax/linen.
@avital
I'm definitely not a fan of forcing a ModuleList container, and I lean against 2/3 for the above reasons.  I prefer 1 where we make it clearer in error messages, etc. these structures in self assignments are immutable by design.  We could support a very limited form of (3) safely inside setup(), but it's a lot of code for what seems like not much benefit, but I could be convinced otherwise.
Regarding your Question 2 - you can assign mixed functions/Modules in setattr, only the Modules inside the pytree will be treated specially and registered, otherwise it's just a list or dict or whatever containing anything you'd like.
@rwightman - a pleasure to see you here!  pytorch-image-models is a wonderful piece of work!
Below are two code sketches showing the two ways we'd approach setting up and using a sequential list of layers,
the approaches would work fine with functions mixed in as well.
About the only thing we do now that might be annoying is that we force a particular name scheme to lists, etc.
assigned to e.g. self.foo - we force the names to be foo_<tree_path>'.  For lists 'foo_0, foo_1 etc.  We could relax that
to just being the defaults if this is a pattern people want to use with custom names...  (part of the reason for forcing
a canonical name-scheme is to force all submodule names into a canonical relationship with the names on self, but I'd need
to think a bit if there's really strong benefits to doing that.)
Let me know if this illuminates anything about the current approach or raises other questions or complaints. ;)  Also if you're looking around the code, always feel free to reach out to us directly with questions!  We're trying to get a lot of docs and commentary out for the newer API soon, so apologies for the bare state of things at the moment - we've been focused on trials and refining things with a bunch of early users.
from jax import random, numpy as jnp
from flax import linen as nn
from typing import List

class Example1(nn.Module):
  feature_sizes: List[int]
  def setup(self):
    self.layers = [nn.Dense(sz)
                   for idx, sz in enumerate(self.feature_sizes)]
  def __call__(self, x):
    for lyr in self.layers:
      x = lyr(x)
    return x

#NB: this only works inside Modules, not as a top-level Module
#    due to a restriction we can probably remove soon.
class Sequential(nn.Module):
  layers: List[nn.Module]
  @nn.compact
  def __call__(self, x):
    for lyr in self.layers:
      x = lyr(x)
    return x

class Example2(nn.Module):
  feature_sizes: List[int]
  @nn.compact
  def __call__(self, x):
    return Sequential([nn.Dense(sz, name=f'layers_{idx}')
                       for idx,sz in enumerate(self.feature_sizes)])(x)

x = jnp.ones((10,))
key = random.PRNGKey(0)

mdl1 = Example1([3,5,2])
mdl2 = Example2([3,5,2])

variables1 = mdl1.init(key, x)
y1 = mdl1.apply(variables1, x)

variables2 = mdl2.init(key, x)
y2 = mdl2.apply(variables2, x)

jnp.all(y1==y2) # True

@levskaya thanks! I'm currently exploring jax via Flax (Linen) and Objax right now and still building up my mental model of how everything works by implementing my MBConvNet generator (EfficientNet, MixNet, MobileNet, etc) in way that Flax Linen Setup(), Flax Linen compact, or Objax can be plugged in to the same model config / layer builder. So far it's going well and I have models running validation with either TF or PyTorch origin weights. Hopefully I'll have something to share soon.
At this stage when I run into issues, I have a tendency to fall back to concepts I'm familiar with (PT). I wasn't thinking about the mutability. The Sequential approach mentioned above seems like it'd work. I do like having fairly fine grained control over naming, aside from the OCD aspect, it can be quite useful trying to keep naming schemes fairly similar across different frameworks, etc for weight portability.
I ran into this issue after having implemented the network using the compact decorator approach first as it was better documented and featured in more examples. When I started fiddling with the setup() variant I initially tried using append to fill out my stage/block repeats where I have a list of stages, each stage containing a list of blocks. In PT and Objax I impl those as Sequential of Sequential containers. I don't flatten them as feature map sizes fall along the stage boundaries and useful to keep that for extraction of features.

@levskaya
I agree I think we don't need a mutable ModuleList container (it seems that however you want to construct your module list, you could do so in setup code and then make the final list immutable when assigning it to an attribute). But raising errors in case of Example1 below would be very instructive compared to the current ValueError. Note that if we make the conversion to ModuleList implicit this still allows users to generate the confusing error like in the (hopefully less frequent) Example2 below.
class Example1(nn.Module):
  feature_sizes: List[int]
  final_size: int
  def setup(self):
    self.layers = [nn.Dense(sz) for sz in self.feature_sizes]
    self.layers.append(nn.Dense(final_size))  # Raises some ImmutableModuleList error

class Example2(nn.Module):
  feature_sizes: List[int]
  def setup(self):
    layers = [nn.Dense(sz) for sz in self.feature_sizes]
    self.layers = layers
    layers.append(nn.Dense(final_size))  # Would still fail with ValueError in __call__() ?

Thanks for the explanation @levskaya! Two questions:

I'm pretty sure supporting mutable ModuleLists is just going to open up a new nightmare dimension of bugs

Why can't we introduce a ModuleList abstraction that is immutable? At least we will have an abstraction with consistent behavior then. I think the main problem is that we currently are using Python lists but it is somewhat difficult to understand how they should be used.

I prefer 1 where we make it clearer in error messages, etc. these structures in self assignments are immutable by design.

When you mean "these structures", do you mean lists containing Modules? Or are there other structures you are referring to? I'm trying to understand how we can improve the error message. since currently the error message triggers in a bit of a weird place, and it would be good to catch it somewhere else.

@marcvanzee - curious though, what is the utility of an immutable ModuleList?  I thought the main point of them in pytorch was capturing and processing all updates like append, etc?  Is it just sort of a trivial wrapper to make it more familiar to PT users?  the lack of mutability in that case would be a big annoyance if we mirror their api.
re: "these structures" - we allow assigning any container (dict, list, struct.dataclass, any flax-registered container) containing sub-modules to self.  There certainly aren't the correct immutability guards set up yet and we could definitely improve errors messages.  I'm not 100% committed to this generality, though I think it could be handy for some advanced things in the future, but in the wild the most common use by far is just lists.

@andsteing - re (1) if we stick w. the current behavior, at a minimum we should certainly raise an Immutable error of some sort.
For (2) there's a real question whether we should allow setattr at all inside other functions.  We could allow it inside "compact" functions and probably have everything make sense, but for modules w. multiple "public" methods force setattr in setup() just like we do variables in general.
The problem w. setattr in general with anything dynamic is that I worry it could be easy for users to forget that we're not actually working in python with durable python state once things are jitted or pmap'd.

@levskaya: I don't have much experience with ModuleList of Pytorch, but I agree that if the behavior is different for Flax it will probably only confuse users. So in that case, I think trying to improve the error message seems like a good next step.

For (2) there's a real question whether we should allow setattr at all inside other functions.

Can we generally "forbid" this? Seems like there are some edges cases, like the one below. Do we ignore them and hope the user just doesn't use local variables to modify structures in self, or do you think there's a way to catch them?
class SimpleModule:
  def __setattr__(self, name, val):
    current_fn = inspect.stack()[1][3]
    if current_fn != 'setup' and current_fn != '__init__':
      raise ValueError('Can only assign to `self` in setup')
    object.__setattr__(self, name, val)

  def __init__(self):
    self.test = [0, 1, 2]
    self.foo()

  def foo(self):
    x = self.test
    x.append(3)   # No error is raised.

@levskaya since this issue came up again recently for Kevin Murphy, and it is quite an annoying sharp edge of Linen, I've increased the priority from P2 to P1.
Also I think you mentioned in the chat that it would be a good short-term solution to at least freeze the list/dict/... assigned to self so we can present a better error message. Do you think this is feasible, or do you think it may be a lot of work?

@levskaya since this issue came up again recently for Kevin Murphy, and it is quite an annoying sharp edge of Linen, I've increased the priority from P2 to P1.
Also I think you mentioned in the chat that it would be a good short-term solution to at least freeze the list/dict/... assigned to self so we can present a better error message. Do you think this is feasible, or do you think it may be a lot of work?

Actually the recent Frozen modules PR https://github.com/google/flax/pull/823 turns lists and dicts to tuples and frozen dicts. Not sure about a custom error message though

Actually the recent Frozen modules PR https://github.com/google/flax/pull/823 turns lists and dicts to tuples and frozen dicts. Not sure about a custom error message though

Actually we could of course make a ModuleDict and ModuleList that are mutable during setup and afterwards frozen (and track the modules correctly)

Actually we could of course make a ModuleDict and ModuleList that are mutable during setup and afterwards frozen (and track the modules correctly)

Today salayatana66@ ran into this issue again, and they indeed ran into the new error message referring to the frozen dicts. Still I think it took a while for them to understand it so improving the error message is definitely still high priority.

Today @salayatana66 ran into this issue again, and they indeed ran into the new error message referring to the frozen dicts. Still I think it took a while for them to understand it so improving the error message is definitely still high priority.

After reading all the thread I got an alternative proposal:

No ModuleList/Dict abstraction, users just use regular python lists/dicts.
The list -> tuple and dict -> FrozenDict conversion can happen after setup finishes, this way the user can mutate the list/dicts inside setup.
__setattr__ can keep track of the set of fields that need to be frozen instead of doing on the stop.

any update on this?


download_jss_scripts.sh downloads are empty

Heya, when running the download_jss_scripts.sh script all the files being downloaded are totally empty. I also get this error for each script:
DEBUG: Script name is: Microsoft Lync Uninstall
DEBUG: Script extension is: Microsoft Lync Uninstall
Downloaded script "Microsoft Lync Uninstall.sh"...
-:10: parser error : Opening and ending tag mismatch: br line 8 and p
</p>
    ^
-:11: parser error : Opening and ending tag mismatch: p line 8 and body
</body>
       ^
-:12: parser error : Opening and ending tag mismatch: body line 5 and html
</html>
       ^
-:13: parser error : Premature end of data in tag html line 1

^

Since I get that for each script download attempted it does not seem to be an issue with the scripts themselves since they can't all be completely identical.

I've copied this script from the main page and I'm running into the same issue that the OP ran into... I haven't made any changes to my script...


Dependency Injection for startup in test client

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
# currently:

@app.on_event("startup")
async def startup():
    load_defaults()
    await DB.start_db(settings=settings)
    return

# what I'd like
@app.on_event("startup")
async def startup(defaults_retriever=None):
    if not defaults_retriever:
        defaults_retriever = RealRetriever()
    load_defaults(defaults_retriever)
    await DB.start_db(settings=settings)
    return

# and then in tests I wouldnt need to mock the remote because I can do something like
client = TestClient(app, startup_args=[MockDefaultsRetriever])

Description
Is it possible to pass an argument to the startup function of the TestClient?
https://fastapi.tiangolo.com/advanced/testing-events/
The docs suggest using TestClient to ensure the startup function gets invoked, but what if the startup function has an argument that is a class that hits a remote and Id like to mock it. Since patching module can be finicky  dependency injection is a clean way to accomplish the goal of mocking an object and if something like I suggested in the example code was implemented it would make this very easy.
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.70.0
Python Version
Python 3.9.7
Additional Context
No response

I think that if that would have been made possible then all the startup & shutdown events would have gotten these args. I wouldn't have used this feature if it was available.
Would you consider using partial from functools for your use case?

Hi, maybe just mock/patch RealRetriever? Or call the decorator directly? I mean you're already passing an Argument to Testclient, namely app. The startup stuff is just buried in there. So doing such an Argument list would be like passing the same stuff twice to avoid changing the insides of the app parameter.

I think this duplicates the feature request in https://github.com/tiangolo/fastapi/issues/617

I agree, @adriangb. Closing.