Crystal Budget app

In this PR I did the following:
Interactions

Sign up and log in pages

The user should be able to register in the app with full name, email and password (all mandatory).
The user can log into the app using email and password.
If the user is not logged in, they can't access pages that require the user to be logged in (all the pages described below).

Home page (catagories page)

When the user logs in, they are presented with the categories page.
For each category, the user can see their name, icon and the total amount of all the transactions that belongs to that category.
When the user clicks (or taps) on a category item, the application navigates to the transactions page for that category.
There is a button "add a new category" at the bottom that brings the user to the page to create a new category.

Transactions page

For a given category, the list of transactions is presented, ordered by the most recent.
At the top of the page the user could see the total amount for the category (sum of all of the amounts of the transactions in that category).
There is a button "add a new transaction" at the bottom that brings the user to the page to create a new transaction.
When the user clicks on the "Back" button (<), the user navigates to the home page.

"Add a new category" page

The user fills out a form to create a new category, indicating their name and icon (both mandatory).
The user click (or taps) the "Save" button to create the new category, and is taken to the home page on success.
When the user clicks on the "Back" button (<), the user navigates to the home page.

"Add a new transaction" page

The user fills out a form to create a new transaction with:

name (mandatory)
amount (mandatory)
categories (mandatory at least one)

The user click (or taps) the "Save" button to create the new transation, and is taken to the transactions page for that category.
When the user clicks on the "Back" button (<), the user navigates to the transactions page for that category.

Testing requirements

Created unit and integration tests for all the most important components of your RoR application.

Technical requirements

Used Postgres as your database.

Used devise for authentication.

The project is deployed and accessible online.

Link to video of Project description

❌ ❌ ❌ STATUS: INVALID  ❌ ❌ ❌

Hello @Pazzo97  ✋🏼
You have submitted a project, that is not using the correct flow. You should open pull request dev from the feature branch. Kİndly change it. Requirement.
Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers and Happy coding! 💻 👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
Invalid Code Review Request does not count into the code reviews limit.

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


SPIKE: Get Mermaid charts rendering

Context
Getting diagrams rendering in chat, using Mermaid:

Still to explore

I've had to allow "unsafe-inline" to allow inline-styles. A workaround could be to select all elements inside the SVG with inline styles and, instead, apply them programmatically.
A few console errors around this type of theme: Error: <circle> attribute cy: Expected length, "NaN"
We'll need to add something to the system prompt to provide diagrams in Mermaid format
Anything else we need to consider? Alternatives?

Things to check

[ ] I have added any new ENV vars in all deployed environments
[ ] I have tested any code added or changed
[ ] I have run integration tests

A nice elegant change. As you note in an above thread, server side rendering is going to be prickly with the streaming which makes me think this is a client side thing for now.
My main thought is that LLM's can screw up in the validity of their mermaid definition which could cause errors. We might want to wrap that in our current "Redbox had an error" styling.
Finally, a copy and paste/download button specifically for the diagram would be really useful for people to grab and use these in documents and presentations

If/when we come back to this, now we have Lit SSR running this will likely give us good options.


Suggestion: implementing pygame.Surface methods

Hi! I am really enjoying your work so far :)
I am currently in the process of implement the lighting system in my 2D game - it was already quite advanced so I had to modify quite a lot of things. That led me to think there are a few things that could slightly improve the experience, i'm leaving them here :)
1. render_texture parameters
The behavior of the render_texture's parameters should mimic the one from the Pygame blit method. dest should accept tuples on top of Rect (maybe adding a type assertion in the function, and turning the tuple into pygame.Rect(dest[0], dest[1], 0, 0); in the same idea, the parameter area should accept None (in that case, the whole sprite area would be selected, just as for blit). That way, blit methods could almost seamlessly be turned into render_texture methods. In other words, right now I have to turn:
window.blit(sprite, (0, 0))
into
light_engine.render_texture(sprite, pl2d.BACKGROUND, pygame.Rect(0, 0, sprite.width, sprite.height), pygame.Rect(0, 0, sprite.width, sprite.height)
while a easier way would be
light_engine.render_texture(sprite, pl2d.BACKGROUND, (0, 0))
2. Blitting on a Surface
In my project, I have a function allowing me to create character surfaces holding an item by blitting the item on top of the character surface: for example, I am adding a torch on top of my character "holding an item" sprites. I do it via:
character_holding = pygame.image.load("character_holding.png")
torch = pygame.image.load("torch.png")
character_holding_torch = character_holding.blit(torch, (0, 0))

Right now it doesn't seem possible to render a texture on top of another texture, so I have to do the pygame blit, before using the surface_to_texture method. Do you think it would be possible to render directly on textures in the future?
3. Allow for resizable windows
I wanted my game to be adaptable for any resolution, so I made a function that reacts to a window resize to re-render all of the loaded sprites at the correct resolution. This implies that the window was created with the pygame.RESIZABLE flag, which doesn't seem to be accepted by the LightingEngine function. I went and tried to add it manually in your code, and it seems to work. Could you add this option as a parameter?
Thank you again for all your work :)

Hey @RomainPastureau this is awesome, very glad you like my project! I'm not sure what to do since I am considering reimplementing the whole engine using my shader package for pygame. Nevertheless, I will be implementing your suggestions soon, during summer. Thank you :)

Glad it helps, and cannot wait to see the result!

shader package for pygame.

you have a shader package for pygame :D , i did not know about that , so maybe add a sneaky mention in readme.md?

Good idea @tigercoding56, this engine isn't compatible with the shader package for now, but I'll add a mention in the readme once I reimplement it

Hi! I rewrote the lighting engine using my shader package, you can install it with pip3 install pygame-light2d>=2.1.1.
1. render_texture parameters
The engine now has a method for rendering sprites with transformations:
light_engine.render_transformed(sprite, pl2d.BACKGROUND, position=(0, 0), scale=2, angle=45)

The following code resembles window.blit(sprite, (0, 0)):
light_engine.render_transformed(sprite, pl2d.BACKGROUND, (0, 0))

2. Blitting on a Surface
If you are doing this during initialization, your method of using pygame and surface_to_texture should be fast enough, so I wouldn't bother with finding alternatives.
If you need to do this dynamically, you may want to use the shader package to avoid dropping frames. Even then, you would need to call surface_to_texture multiple times a frame to notice any lag.
You can access the graphics engine with:
lighting_engine.graphics

A texture cannot directly be rendered to another texture. Instead, you need to create a pygame_render.Layer and render onto it:
character_holding = lighting_engine.load_texture('...')
torch = lighting_engine.load_texture('...')
character_holding_layer = lights_engine.graphics.make_layer(size=character_holding.size, data=character_holding.read())
lights_engine.graphics.render(torch, character_holding_layer, <other args, you can even use shaders here>)
character_holding_torch = character_holding_layer.texture

Again, I would only do this if you need to render a texture to another texture every frame, in which case you can reuse the layer object.
Allow for resizable windows
You can now pass many arguments to specify the behavior of the window:
class LightingEngine(
    screen_res: tuple[int, int],
    native_res: tuple[int, int],
    lightmap_res: tuple[int, int],
    fullscreen: int | bool = 0,
    resizable: int | bool = 0,
    noframe: int | bool = 0,
    scaled: int | bool = 0,
    depth: int = 0,
    display: int = 0,
    vsync: int = 0
)

Incredible work! Cannot wait to test it when I have the time!


Problem in function get_dac_provider of esp_matter_providers.cpp (CON-1237)

Description
I recently updated esp-idf to version 5.2.1 as suggested by the esp-matter 1.2 documentation, doing so created compilation and linker problems.
I would like to point out that in my code I use a custom provider for the Device Atterestation Credentials (DAC), so CONFIG_CUSTOM_DAC_PROVIDER is active in my sdkconfig.
When I compile I have problems in the esp-matter-providers.cpp file in the get_dac_provider function, in which:

ESP_LOGE(TAG, "custom_dac_provider cannot be NULL"); gives an error during compilation because apparently #include <esp_log.h> is missing
return chip::Credentials::Examples::GetExampleDACProvider(); problems because I changed the value of CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID and CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID, inserting the values of my product. This causes a chain reaction that causes:
a) In ExampleDACs.cpp the following are never defined:
- kDacCert
- kDacPrivateKey
- kDacPublicKey
b) In ExamplePAI.cpp the following are never defined:
- kPaiCert
- kPaiPrivateKey
- kPaiPublicKey

Additional details
I tried to solve the problem by adding the #include <esp_log.h> and declaring the missing variables, it worked, but i'm not the only one that is working at the current project, and all my coworkers, with a clean build of esp_matter and connectedhomeip, may need to make the same changes in the code.
I Attached the Logs to let you know exactly what's the problem.
Environment

ESP-Matter Commit Id: 1a35c738dff33e5e988d92d0028ed7a60d4336f6 (HEAD -> release/v1.2, origin/release/v1.2)
connectedhomeip Commit Id: ba43f9d8a83821aa5724282b64d2e6a6c07e06f6 (HEAD -> v1.2-branch, origin/v1.2-branch)
ESP-IDF Commit Id: a322e6bdad4b6675d4597fb2722eea2851ba88cb (HEAD, tag: v5.2.1)
SoC: ESP32-S3
Device Logs:
Host Machine OS: Ubuntu 22.04.3 (WSL)
Device Logs (with the ESP_LOGE problem): Log1.txt
Device Logs (with the GetExampleDACProvider):  Log2.txt

For the first problem, we will add the missing header ASAP.
And for the second problem, the ExampleDACProvider only provides DAC with vendorID 0xFFF1/0xFFF2 and productID 0x8000-0x801F, and it is only for development test,  so you can not use that DAC Provider for your product.

Hi @wqx6

This is part of the code in esp_matter_providers.cpp. The function get_dac_provider() is used to set the correct DAC provider to use in the  function setup_providers();
I can't understand why, the "return chip::Credentials::Examples::GetExampleDACProvider();" is compiled every time, this causes compilation problem for everyone that uses a VENDOR_ID or a PRODUCT_ID different from the ones in the range 0x8000-0x801F.
To explain myself better, if I have a VENDOR_ID of 0x1349, the file DeviceAttestationCredsExample.cpp is compiled anyways.
Inside it's functions the variables DevelopmentCerts::kDacCert, DevelopmentCerts::kPaiCert, DevelopmentCerts::kDacPrivateKey and DevelopmentCerts::kDacPublicKey are used as you can see in the image:

Checking the way these variables are defined inside the files ExampleDACs.h and ExamplePAI.h, we can see this:

The variables are defined with the extern but ther's not a definition of these variables for the case VENDOR_ID=0x1349 because in the ExampleDACs.cpp and ExamplePAI.cpp the #if that checks the value of the VENDOR_ID and the PRODUCT_ID, prevent the definition of these variables.
The way it can be solved is to provide a default definition of the different variables if none of the previous #if is compiled.
For Example adding this at the end of the code:

It's not the bast way to solve this problem and I don't know if it creates other issues, but for now at least is compiling.

@FMistrorigo , from the edited description it seems that your issue is addressed using DAC Provider Options here i.e setting the appropriate custom_dac_provider before esp_matter::start().
Please close the issue if it is solved.

Hi,
As I said before the code in esp_matter_providers.cpp is this:

And if you consider that CONFIG_CUSTOM_DAC_PROVIDER=y, the way it works is like this:

If you look at the code you will see that  return chip::Credentials::Examples::GetExampleDACProvider(); is compiled every time and this is the problem. Please read again this post and follow the steps where I explain where the problem is.
I'm sure that I'm using my custom DAC provider, and I'm sure it works fine because with my edit to the code everything is perfect.
The only thing I'm not sure about is that in my configuration file i define the VendorID and ProductID like this:

The problem might be the name of these two variables, because the same name is used for the test ones, but in this case they are not in the range vendorID 0xFFF1/0xFFF2 and productID 0x8000-0x801F.

@FMistrorigo , can you please try the patch below. I have tried it by using set_custom_dac_provider and the below patch. The compilation went through without any linking errors and the code changes.
compilation_fix.txt

@FMistrorigo, any updates here. If you want to try out the change, you can try it out with latest esp-matter as the change is merged here.

I just tryed it and it works fine without problems, Thank you very much.


Cristobal Lopez:  Asynchronous programming, 3 weeks

Learning Objectives

[ ] 🥚 You understand the JavaScript Event Loop, and can demonstrate this by using setTimeout and setInterval to schedule simple tasks.
[ ] 🥚 You can explain why Asynchronous Programming is important for programs that have blocking and non-blocking tasks.
[ ] 🥚 You can explain the basics of the Client/Server model and HTTP requests and can fetch data from RESTful APIs.
[ ] 🐣 You can break down an asynchronous problem into smaller tasks and solve it using promises. This includes identify which tasks depend on each other and which are independent:

[ ] dependent tasks: The return value from one task is required to start the next task, these must be completed in a specific order - .then
[ ] independent tasks: These tasks do not use each other's return values, they can be completed at the same time - Promise.allsystem.

[ ] 🐣 You can fetch data from an API and render it into the DOM using /api-calls, /handlers and async/await syntax.
[ ] 🐣 You can write unit tests for functions that return promises using async/await syntax.

Week 1
I Need Help With:

I need help understanding what defines the order in which the tasks will be performed. Let's say that we have 4 functions in a program. 2 of them have 0 as SetTimeOut value, the other two have 2000 milliseconds and 4000 milliseconds respectively. Is the system going to process the functions with the greatest values first and execute the ones with 0 milliseconds last or viceversa? Or does the system read  in a descending way?

Does the system execute all the functions at the same time but prioritises the ones on top and with higher millisecond values?

How can we print blank spaces in the left side of our code? Ex: innerHTML = "       blue";

What went well?

I practiced the three new functions setInterval, setTimeOut and clearInterval/TimeOut and everything went perfect.

I can describe what the use of the above mentioned functions is.

I made a counter using the asynchronous programming methodology.
Counter repository

What went less well?

I was not able to separate all the concerns in my small project, I am still working on it but I cannot figure it out yet.

Lessons Learned
I will keep reviewing the study lenses material and try completing as many exercises as possible.

I need help understanding what defines the order in which the tasks will be performed. Let's say that we have 4 functions in a program. 2 of them have 0 as SetTimeOut value, the other two have 2000 milliseconds and 4000 milliseconds respectively. Is the system going to process the functions with the greatest values first and execute the ones with 0 milliseconds last or viceversa? Or does the system read in a descending way?

the number represents the time in milliseconds, how long the delay, or time out shall be to start executing the function, once the event queue is empty..in your example, once the queue is empty, the two with 0, then 2000, then 4000 will be the order in which they will run

Week 2
I Need Help With:

I do not know how to recall specific information from the API. @samirm00 gave me a hint but I was not able to figure out the rest.

function getUser (id)
{
    const user =  fetch(`[https://jsonplaceholder.typicode.com/users/${id}](https://jsonplaceholder.typicode.com/users/$%7Bid%7D)`)
    .then( res =>
    {
        // CHECK res STATUS
        if ( res.status === 200)
        {
            return res.json();
        }
        else
        {
            return false;
        }

    })
    .catch( err =>  console.error(err));

    return user;
}

export default getUser;

Why is the difference between script type="module" and script type="text"?
Let's say that I created a list  dynamically with JS. Why when I try to use this list inside another function, it cannot be found? It looks like the list only exists within the function where it was created.
How can we make our API DATA a global variable to have it available for our entire program without recalling it from the server every time we need it?

What went well?

I was able to undertand how the API works and how to fetch some data.
I worked in the small project and was able to display all the contact's information from the API.

What went less well?

I understand the separation of concerns in theory but I am having a really hard time separating my files.
I cannot understand clearly what await does. I might need a basic example but the tutorials are really complex.

Lessons Learned

I learned what promises are in general.
I understand a bit about asynchronous programming.

Sunday Prep Work

The exercises are too difficult in study lenses to complete them by myself (since the last 2 modules). I will do my best to resolve them.

No worries , I will explain again with examples tomorrow

Week 3
I Need Help With:

Going back to separation of concerns, is this the standard convention that they follow in companies in real life? Or do they have different ways to distribute the JS code in companies? I am still struggling with this topic.

Can I see a very simple and basic example of separation of concerns please? I have tried creating a chart to better understand it but I am still confused. (And separations of concerns on Youtube is something different, they associate it to isolating HTML, CSS and JS, I have not found a good tutorial).

What went well?

I am able to fetch data from the server.
I can push new data to the server.

What went less well?

Separation of concerns again. A very difficult topic.
I do not know how to use the keyword this(), it have seen it many times in many tutorials.

Lessons Learned

The use of fetch, asynch, and await.

Sunday Prep Work

I will try finishing my To-Do-List

Going back to separation of concerns, is this the standard convention that they follow in companies in real life? Or do they have different ways to distribute the JS code in companies? I am still struggling with this topic.

yes, most big codebases are separated.. the way it is done can be different, but the goal is always the same..to separate different sections of the code for easier teamwork and debugging

Can I see a very simple and basic example of separation of concerns please?

all the examples in the SoC repo

I do not know how to use the keyword this(), it have seen it many times in many tutorials.

avoid those tutorials :) this is something used in JS classes, that we do not use at all at HYF


Could you provide some demo meshes?

Thanks for your great work!
Could you provide some demo meshes to compare with another implementation of tetrahedral splatting from https://arxiv.org/pdf/2405.20283 ?

Hi, here is a mesh generated using "a bald eagle carved out of wood"
eagle.zip


Unable to launch on device via extension and unable to create a launch.json

Hi,
I try to launch on my device from titanium extension panel but it always start on the emulator regardless of the button I click, both have the same effect, it start on the emulator :

Also I am enalbe to create a new lauch.json configuration as it throw an error :

Titanium configuration looks ok :

I have to give some more information, I am talking about a "module" project, it works on "application" project.
So the problem is only that for a "module" project the command line launched is not the same as for an application, because the device is not specified and then it always start on emulator

Module project support is kind of half baked to be honest. Some of the features need to be restricted to those only supported by the CLI (i.e. no device/specific target builds as that's what's supported in the CLI) and no support for debugging a project.
The fixes here are most likely to not show devices or specific emulators for module projects, then maybe work in tandem to improve the CLI/SDK side to allow this to be exposed (but that's a much bigger task imo).

Ok, I understand, so you are right, as a first correction hidding devices & emulator would be a good choice, then it wont look anymore as a bug.
I got another question, is that possible to add a pre/post build/package script in vscode ?
What I am looking for is to improve my module development workflow and make it less tedious, so I would like to be able to pre-build the module when I build & deploy any other application that use it. I know how to do it by script (bat/sh) as it is pretty simple, but is that possible to add something in vscode to do it ? like in a launch.json ? or other ?

You might want to look at creating a compound task, they're briefly mentioned in the docs in this repo. So you'd be creating a task to build, a task to unzip, and then a compound task that runs the two in sequence. You could then also add a titanium-build task for the app if you wanted to go the whole way.
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "titanium-package",
			"label": "iOS Module Build",
			"titaniumBuild": {
				"platform": "ios",
				"projectType": "module"
			}
		},
		{
			"type": "shell",
			"label": "Extract Module",
			"command": "unzip ${workspaceFolder}/ios/dist/*.zip -d ~/Documents/Workspace/testing/"
		},
		{
			"label": "Build and Extract",
			"dependsOrder": "sequence",
			"dependsOn": ["iOS Module Build", "Extract Module"]
		}
	]
}

It might be useful for the extension to offer the same outputs that Studio used to when packaging a module. Alongside the directory to place the zip into, it would offer to install the module globally or in an app for you. Do you think that would be useful? (pretty much just performing the Extract Module task above for you)

@DzzD I have a PR open for a change to improve this at #998. When a module project is selected (i.e. the first Titanium project in the workspace) the explorer will now only show Build and Package options. If you wanted to give it a try you can download the built vsix from the run artifacts and install it using code --install-extension <path-to-vsix>

Module project support is kind of half baked to be honest. Some of the features need to be restricted to those only supported by the CLI (i.e. no device/specific target builds as that's what's supported in the CLI) and no support for debugging a project.
The fixes here are most likely to not show devices or specific emulators for module projects, then maybe work in tandem to improve the CLI/SDK side to allow this to be exposed (but that's a much bigger task imo).

After looking a bit more on the build process of module, it does not seems so much complicated (but I may be wrong).
I saw two problems :
1 - The vscode extension does not provide the target & device ID arguments (--target device|emulator  --device-id id)
2 - The tianium_mobile source code does not take care of thoses paramameters :
https://github.com/tidev/titanium_mobile/blob/master/android/cli/commands/_buildModule.js#L891
I would happily like to help and try to correct this, but I am a bit lost on how to test my modification/use my own Titanium mobile build locally ?

I just finished the modification :
https://github.com/tidev/vscode-titanium/pull/999

In the meantime how can I use this WIP extension in replacment of the official release I use ?
I mean can I built it and install it in replacement of the official VSCodeTitanium extension ?
(Never worked on VSCode extension before so I did not really know a lot about it)

Once the CI has ran you can download a built vsix that you can install in VS Code. In the artifacts for your CI run you can download that and do code --install-extension <path-to-vsix>. If you make changes you can also package it locally using npx vsce package in your vscode-titanium directory and install that the same way

Once the CI has ran you can download a built vsix that you can install in VS Code. In the artifacts for your CI run you can download that and do code --install-extension <path-to-vsix>. If you make changes you can also package it locally using npx vsce package in your vscode-titanium directory and install that the same way

And that's work perfecly ! thanks


Changed DefaultWritableBufferExtensions.Write to take ReadOnlySpan

The Write method currently takes Span as a parameter.
It should take ReadOnlySpan as the method does not mutate the contents of the data it writes.
This will enable writing new Utf8String("Hello World!).Bytes, and no technology can succeed without supporting the Hello World.
cc: @botaberg, @joshfree, @davidfowl, @AtsushiKan

new Utf8String("Hello World!).Bytes is pretty ugly 😄

Since Span<T> has an implicit conversion to ROS<T> it should be fine

new Utf8String("Hello World!).Bytes` is pretty ugly 😄

once we have UTF8 literals (and of course the representation for them) we will add an extension method to write it directlu. And so the sample will be:
buffer.Write("Hello World"u8);


create cloud credentials resource

[ ] exoscale https://github.com/SixSq/SlipStreamConnectors/issues/103
[ ] otc https://github.com/SixSq/SlipStreamConnectors/issues/104


disable[] disabling date+time

When I add a time and date to stop it, it turns off the whole day
How can I disabling a certain date and time?

https://codepen.io/sameh-doush/pen/wvPZeOW
Your Environment

flatpickr version used: 4.6.9
Browser name and version:  Chrome Version 98.04758.102 (Official Build) (64-Bit)
OS and version: windows 11

Also looking for a similar feature but a different use case.
I have opening times for each week day and exeptions when it is closed. So I would be looking for something like this:
{
    enableTime: true,
    noCalendar: true,
    dateFormat: "H:i",
    minTime: {
      0: "06:00",
      1: "05:00",
      2: "07:00",
      3: "08:00",
      4: "09:00",
      5: "02:00",
      6: "01:00"
    },
    maxTime: {
      0: "16:00",
      1: "15:00",
      2: "17:00",
      3: "18:00",
      4: "19:00",
      5: "12:00",
      6: "11:00"
    },
}

Where the key in the example is the wday.

up


Inconsistent behaviour in change password from user-portal

Login to user-portal

Goto Change password view under the Security section

Provide Current password, New password and Confirm password fields and hit enter' from the keyboard. Make sure you don't click submitbutton, instead pressEnter` from the keyboard.

Following message is displayed.

Some times it doesn't happen when some other place in the page is clicked and then enter.

Resolved by https://github.com/wso2/identity-apps/pull/1250


Sunricher wall switch not working

Issue description
I'm new in the Zigbee world but not with Domoticz. Decided to try out some Zigbee stuff since I'm extremely tired of 433MHz devices. I have added a cc2652 dongle to my Rasp, installed zigbee2mqtt, Mosguito mqtt broker and this Domoticz plugin. I have also managed to set up a Agara temp&humidity sensor and it works fine as far as I can see. Next on my list is to integrate a wall-switch. I have added Sunricher ZG9100A-S switch which should be a supported by zigbee2mqtt. Pairing is OK. However, the only thing that shows up in the list in zigbee2mgtt tab is a router, no end device. I

Looking in my zigbee2mqtt logs, it seems like the switch is paired but it is not supported. => Zigbee model 'HK-SL-RELAY-A' and manufacturer name 'Sunricher' is NOT supported.
So it looks like a zigbee2MQTT issue to begin with. It is a bit strange, since this switch should be supported according to this page: https://www.zigbee2mqtt.io/devices/SR-ZG9100A-S.html
I have tried to follow the guide to change settings in the devices.js file, but have not suceeded yet.
Does anyone know a wall switch supported by zigbee2mgtt and Domoticz by means of this plugin?
Edit: I think I figured out the answer myself since I found the list of supported devices. I will give Sonoff a try. Both switch and temperature sensors.
Additional information
info  2021-04-23 09:04:49: Starting Zigbee2MQTT version 1.18.2 (commit #abd8a092)
info  2021-04-23 09:04:49: Starting zigbee-herdsman (0.13.88)
info  2021-04-23 09:05:07: zigbee-herdsman started
info  2021-04-23 09:05:07: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"}'
Python version: 2.7.16
Domoticz version: 2021.1
Plugin version:
Latest, downloaded a few days ago (where do I find this info? Would be nice to have this on the zigbee2mqtt web page in Domoticz)
**Logs**
info  2021-04-23 20:16:41: Device '0x60a423fffec8a4d8' joined
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x60a423fffec8a4d8","ieee_address":"0x60a423fffec8a4d8"},"type":"device_joined"}'
info  2021-04-23 20:16:41: Starting interview of '0x60a423fffec8a4d8'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x60a423fffec8a4d8","ieee_address":"0x60a423fffec8a4d8","status":"started"},"type":"device_interview"}'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x60a423fffec8a4d8"},"type":"device_connected"}'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x60a423fffec8a4d8"},"type":"pairing"}'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x60a423fffec8a4d8","ieee_address":"0x60a423fffec8a4d8"},"type":"device_announce"}'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x60a423fffec8a4d8"},"type":"device_announced"}'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/config/devices', payload '[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc46cb","lastSeen":1619201801843,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"},{"dateCode":"20191205","description":"Aqara temperature, humidity and pressure sensor","friendly_name":"0x00158d000588cd68","hardwareVersion":30,"ieeeAddr":"0x00158d000588cd68","lastSeen":1619201503171,"manufacturerID":4151,"manufacturerName":"LUMI","model":"WSDCGQ11LM","modelID":"lumi.weather","networkAddress":59174,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"description":"-","friendly_name":"0x60a423fffec8a4d8","ieeeAddr":"0x60a423fffec8a4d8","lastSeen":1619201801824,"networkAddress":13799,"type":"Unknown","vendor":"-"}]'
info  2021-04-23 20:16:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc46cb","lastSeen":1619201801851,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"},{"dateCode":"20191205","description":"Aqara temperature, humidity and pressure sensor","friendly_name":"0x00158d000588cd68","hardwareVersion":30,"ieeeAddr":"0x00158d000588cd68","lastSeen":1619201503171,"manufacturerID":4151,"manufacturerName":"LUMI","model":"WSDCGQ11LM","modelID":"lumi.weather","networkAddress":59174,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"description":"-","friendly_name":"0x60a423fffec8a4d8","ieeeAddr":"0x60a423fffec8a4d8","lastSeen":1619201801824,"networkAddress":13799,"type":"Unknown","vendor":"-"}],"type":"devices"}'
info  2021-04-23 20:16:43: Successfully interviewed '0x60a423fffec8a4d8', device has successfully been paired
warn  2021-04-23 20:16:43: Device '0x60a423fffec8a4d8' with Zigbee model 'HK-SL-RELAY-A' and manufacturer name 'Sunricher' is NOT supported, please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
info  2021-04-23 20:16:43: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":null,"friendly_name":"0x60a423fffec8a4d8","ieee_address":"0x60a423fffec8a4d8","status":"successful","supported":false},"type":"device_interview"}'
info  2021-04-23 20:16:43: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"friendly_name":"0x60a423fffec8a4d8","supported":false},"type":"pairing"}'

The log you've posted indicates a problem with zigbee2mqtt itself, so it might be best to ask for help there first. When that's fixed it is possible the plugin will be ok too.
https://github.com/Koenkk/zigbee2mqtt/issues

Ok, my conclusion as well. I have posted an issue on Koenkk's github


runtime: fatal error: free list corrupted

See http://build.golang.org/log/b299c1d60cfc629928282e042e2cbcb1277b4101
Hope this is a NaCl-specific issue.
--- FAIL: TestTraceStressStartStop (0.91s)
	trace_test.go:365: failed to parse trace: g 85 is not running while GoBlock (offset 133954, time 75555878)
runtime: free list of span 0xfeec8b88:
0x10da7420 -> 0x75da75e0 (BAD)
fatal error: free list corrupted

runtime stack:
runtime.throw(0x28a738, 0x13)
	/tmp/workdir/go/src/runtime/panic.go:527 +0x100
runtime.mSpan_Sweep(0xfeec8b88, 0x0, 0x51, 0x5000)
	/tmp/workdir/go/src/runtime/mgcsweep.go:186 +0x960
runtime.sweepone(0x10900460, 0x10901260)
	/tmp/workdir/go/src/runtime/mgcsweep.go:97 +0x1c0
runtime.gosweepone.func1()
	/tmp/workdir/go/src/runtime/mgcsweep.go:109 +0x40
runtime.systemstack(0x0)
	/tmp/workdir/go/src/runtime/asm_amd64p32.s:215 +0xa0
(snip)

/cc @aclements, @rsc

It just happened on 2015-06-29T16:07:14-434e0bc/openbsd-amd64-gce56: http://build.golang.org/log/a8139726d53bba365ad3e843efbf0886d559958b :(
It's happened twice so far on nacl:
2015-06-26T03:38:21-8628688/nacl-amd64p32: http://build.golang.org/log/b299c1d60cfc629928282e042e2cbcb1277b4101 (original report)
2015-06-26T18:54:11-77132c8/nacl-amd64p32: http://build.golang.org/log/e8d8fd09fa5e3bd5ba026308c0d19ec842a761b1
On nacl, both failures were in the runtime/pprof test. They were in different tests, but since this is a delayed effect, that's not surprising. On openbsd, it happened in when linking test/fixedbugs/issue8961.go (so the actual test is probably immaterial).

Still happening?

We haven't seen this since the three failures in my comment and we've fixed at least two memory corruption issues since the last occurrence (8c3533c and cc8f544). I'm closing, but of course please reopen if it happens again.


Cache worker pool

Description

Related Issue

Type of Change

[ ] 📚 Examples / docs / tutorials / dependencies update
[ ] 🔧 Bug fix (non-breaking change which fixes an issue)
[ ] 🥂 Improvement (non-breaking change which improves an existing feature)
[ ] 🚀 New feature (non-breaking change which adds functionality)
[ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🔐 Security fix

Checklist

[ ] I've read the CODE_OF_CONDUCT.md document.
[ ] I've read the CONTRIBUTING.md guide.
[ ] I've updated the code style using make codestyle.
[ ] I've written tests for all new methods and classes that I created.
[ ] I've written the docstring in Google format for all the methods and classes that I used.

Cleaned up and updated up to main. Ready for review but since I worked on it maybe we need another reviewer @Hartorn ?

Cleaned up and updated up to main. Ready for review but since I worked on it maybe we need another reviewer @Hartorn ?

I will do some more clean up and review, should be somehow fine.
Will see if @andreybavt have some time, else we'll handle it


Lets encrypt certificate for neko rooms.

Hello. I need to set lets encrypt certificate for neko rooms, how can I do this? Is there some param in env variables to pass path to my certificate keys?
Thanks fo advance.

Normally that should be handled by your reverse proxy, but you can pass cetrificate directly to neko-rooms as vell using:

NEKO_ROOMS_CERT=/opt/certs/neko-rooms.crt - path to the SSL cert used to secure the neko_rooms server
NEKO_ROOMS_KEY=/opt/certs/neko-rooms.key - path to the SSL key used to secure the neko_rooms server

Thanks, where can I set this?

As environment variables to the docker container.

ok, thank you for your time!


Doxygen 1.9.6 support?

Hello, doxygen 1.9.6 has just been released. I wanted to know how it is with compatibility. 1.9.5 was not supported due to a problem that was fixed in 1.9.6. Merry Christmas and a happy new year! Take your time with the development.

The theme seems to work great with doxygen 1.9.6! I'll update the documentation accordingly.
If you encounter any issues as an early adopter, pls let me know!
Happy new year! ✨

I found a "bug". When you try to disable dark mode doxygens dark mode is still active. You can work around it by changing the HTML_COLORSTYLE variable to TOGGLE. Would be good to mention this in the README.

Same bug here. The workaround in https://github.com/jothepro/doxygen-awesome-css/issues/105#issuecomment-1380537133 works for me, too.

Doxygen 1.9.6 is now officially supported in the latest release v2.2.0.
I've added documentation on how to configure it properly here.


Make FPScounter optional

Trying to simplify the basic setup and to make some other things optional

Pull Request Test Coverage Report for Build 101

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 31.53%

Totals

Change from base Build 99:
0.0%

Covered Lines:
169

Relevant Lines:
536

💛  - Coveralls


KeyNotFoundException whenever opening magical storage crafting interface

Whenever I open the crafting interface from magical storage the following error appears in the chat but doesn't crash the game

This error spams the chat until magical storage loads the crafting recipe I searched
Mod List

Magic Storage - Extra
Utility Bombs Reborn
Zenith Gun
Cheat Sheet
Recursive Craft
No Breaking Doors
Recipe Browser
Fargo's Crafting Tree Generator
Extended Crafting Recipes
Smart Doors
Spirit Mod
Fargo's Souls Mod
Luiafk
Shadows of Abaddon
Thorium Mod
VeinMiner
Fargo's Mutant Mod
Dragon Ball Terraria
Calamity Mod
Boss Checklist
AlchemistNPC Lite

Can you send the log file please ?

Where would I find the log file, because this bug seems to happen seemingly randomly (for hours at a time it occurs, and then it stops for hours and then occurs again)

Does this error happen on 32bit tModLoader?

Yep, its consistently reproduceable by taking all the bottles out of my storage, and trying to craft a bottle from sand on both 32bit and 64bit


not letting me to add ngModel in toolbar component

Steps to reproduce and a minimal demo of the problem
<input  [(ngModel)]="searchTerm" class="form-control">
What steps should we try in your demo to see the problem?
you can use ngModel in the tool bard or nav bar.
Current behavior
Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'input'. ("Angular 2 Seed
<input  [ERROR ->][(ngModel)]="searchTerm"
Expected/desired behavior
it should let me use ngmodel in toolbar component.
Other information

You need FormsModule.

where do i add? I mean which file. I have added in shared.module.ts


⚠ File access (beta) has degraded performance

In 7594c10, File access (beta) (https://beta.fyle.uk/file/fish) experienced degraded performance:

HTTP code: 200
Response time: 2632 ms

Resolved: File access (beta) performance has improved in d160f5c.


[Feature]: Trusted by section in https://suspensive.org

Package Scope
etc
Possible Solution

Add Trusted by section (In last private meeting, Toss OSS team approved this way to promote usage of our library)
Make way for member of company or group to list their own company in the Trusted by section.

Stroybook

TypeScript

related: #1136


Create ruby: 1929, 0392

File(s) Modified: 1929-concatenation-of-array.rb, 0392-is-subsequence.rb
Language(s) Used: ruby
Submission URL: https://leetcode.com/submissions/detail/1127820832/, https://leetcode.com/submissions/detail/1127851858/

@sourabhkourav Thank you for your contribution 👍


Psych Engine will not compile

Describe your problem here.
I was compiling a build of psych engine when I got this error:

how to fix
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.


setState fast multiple times, app will anr

Repeatedly and quickly click on two items in the recyclerView, and each time one item is clicked, setState will be called. After a while, app not response

Do you have an ANR stack trace? Are you sure it's from Mavericks?


Remove hard angular dependency

Description
We want this lib to be generally useful as part of the wider OpenSpending ecosystem. Therefore, we'd want a core lib which is just a JS wrapper for OS Auth calls, not tied to any framework.
Of course, as we use Angular in all the core OpenSpending apps, it makes a lot of sense that we would also ship the Angular bindings with the auth client for ease of use. We might want that to be in some contrib module or something, which would establish a pattern for other users to do PRs for other bindings (React, Ember, whatever will be hot in JS land by mid 2016 :)).
Tasks

[ ] TBD

https://github.com/openspending/openspending/issues/890


the close icon of Create Collection - Simple Mode on top of address difficult to see for customer

simple mode once its open and we dont want to create any more then we close but the close button is on top of address very difficult to spot
browser = firefox

Need more info about your brower config.
Currently, background will blur on all case Modal open.
That's kind of weird but I tried all kind of browsers as below.
I check on:

my Window/Chrome

my Window/MS EDGE

my Window/Firefox

my Window/Opera (Not wallet add on install but still blur background)

my Window/Brave

yeah it is strange, the text buttons on the top bar are still visible from my firefox


Max Size on 2D items

I've just been trying to create some 2d ui, and I'd like to have a max_size.
I'm sure other people can see the usefulness in this?

Could you be more specific? I don't understand what you mean. Do you mean there should be a maximum size for UI controls when resizing the UI?

Do you mean there should be a maximum size for UI controls when resizing the UI?

Yes:

https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#maximumWidth-attached-prop
https://doc.qt.io/qt-5/qlayoutitem.html#maximumSize
https://doc.qt.io/qt-5/qboxlayout.html#maximumSize
https://doc.qt.io/qt-5/qwidget.html#maximumSize-prop


Add project

Hi @vasile! :)
Here's the complete source code of the project we've been working on for the last couple of months.
The project is pretty straight forward and we've also written some documentation (located in /docs/). There's also a Dockerfile to easily deploy it using NGINX.
Let us know if you need any assistance.
Cheers,
@Tandoraz and Christian

Hi @cblaettl wanted to follow-up but @Tandoraz already merged it :)
My main point was if we can we do something about the docs content, total is 14mb, can we scale down the photos?


Adopt ensureNoDisposablesAreLeakedInTestSuite in terminal

Part of #190503

Think it's ready now 🤞

Oh there was a change in main that broke some, running the full suite locally...


tpl: Use go:embed to load internal templates

Fixes #8297

Seems go:embed treats newlines on Windows differently: https://github.com/bep/test-goembed-newlines/actions/runs/1822443183
Hmm...


Fixed typing mistake

additionalTime was handeld as additionaTime

Yup, also just stumbled over this, pls pull 😅


[FEATURE] Enable search for type "Database table"

Starting with ABAP Release 7.52, database tables are displayed as source code in a native Eclipse ADT editor. It should be possible to search them in this source code representation.

Closed with #25 and #28


added integration tests

these live in the integration/ dir under root.  There are only ones
written for abs right now but we can add more over time.
https://github.com/OpenMined/PySyft/issues/633

Cool, this is a great idea. We should be able to run them automatically by also sunning the Unity app automatically. Have you thought about this?

Though I would strongly suggest to move these tests to PySyft

Cool, this is a great idea. We should be able to run them automatically by also sunning the Unity app automatically. Have you thought about this?

Yes was going to look into that next.

Though I would strongly suggest to move these tests to PySyft

I don't disagree. However since the unity app is required for these to run and there is already lots of code depending on pysyft being available in this environment I put them here

You could also argue that they are integration tests for Openmined moreso than pysyft .. openmined is the black box under test

+1 to both thoughts @bendecoste  and @diegoalejogm

You’re right. Let’s leave them on OpenMined and move ignore we find a strong reason to.

Good job!


As a router, I need to check to make sure Nomad updater update is correctly signed

Problem
Router currently does not check for updater fraud.
Ideas to solve this
Check updater signature on home chain before sending bid to sequencer.
Acceptance Criteria
[ ] If signature valid, proceed with bid.
[ ] If signature invalid, log error and hold off on bid.
Other
SDK should also show some kind of alert if this is the case?

more details in discord message thread https://discord.com/channels/454734546869551114/925716372707749938/986752407151214692

Check if fraud committed before fronting transfers

Closing per hack


Add support of the command MOVE

Refer to https://redis.io/commands/move/

Kvrocks don't have DB, we have namespace instead.
So should we use namespace token in this command?
move key namespace_token

Kvrocks don't have DB, we have namespace instead. So should we use namespace token in this command?
move key namespace_token

Looks good to me. cc @git-hulk

Kvrocks don't have DB, we have namespace instead. So should we use namespace token in this command?
move key namespace_token

Looks good to me. cc @git-hulk

Good to me +1

proposal is ok to me

This command was implemented by @enjoy-binbin  in #1723  but now it is a dummy command. Are we sure  to change the actual operation of the command which is different from Redis?

I think it’s better to keep the redis style MOVE key db.
If we specifially need such a feature, we should add a new command, or at least do it in a way that is compatible with redis style.

@enjoy-binbin
Add a new command looks good to me.
I provide a compatible solution:
When command args size is 3, MOVE key db , we treat it a dummy command.
When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

@enjoy-binbin Add a new command looks good to me.
I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

I'll work on this

@enjoy-binbin Add a new command looks good to me.
I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

This has not been implemented right? I'll work on this.

No. But let's check with @git-hulk @PragmaTwice to make sure this is the ok behavior.

I'm fine with @enjoy-binbin solution. BTW, we must forbid using this command if the cluster mode is enabled.

Hi @haanhvu, according to @git-hulk's suggestion, we can use @enjoy-binbin's solution.
You can add a new command.
Be bold in doing it, and feel free to continue raising questions here if any.

I think it’s better to keep the redis style MOVE key db.
If we specifially need such a feature, we should add a new command, or at least do it in a way that is compatible with redis style.

@enjoy-binbin Add a new command looks good to me.
I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

This has not been implemented right? I'll work on this.

Are you still working on this?

Hi @Chiro11
It seems like nobody has work now.
If you want to do it, you can send a PR directly.


[Meru] Split Assistant builder in 3 screens

Description
Fixes #3776

Each screen (instructions, actions, naming) keeps the same layout as before
The "Delete assistant" button is removed (useless since available more straightforwardly in menu)

Risk
Only layout change. Available to test on front edge
Deploy Plan
TBD: Ship VS wait full-finish
The PR splits the previous builder in 3 screens but the screens are the same as their previous version in builder (as can be seen on front edge)
IMHO, although not perfect, this is an improvement from previous AB and can be shipped (also eases transition for users). I understand this opinion is debatable, so pinging you.
If there is a strong argument to not ship, and wait until the 3 screens are fully finished as per figma => we can still work, by using this branch as base branch for Meru.
This will have an efficiency impact though, the overall ship risk being slower and/or more issue prone--since we build on something not shipped yet while the main codebase still progresses.

@Duncid @gabhubert @spolu
Meru deployment - cf Deploy section above. My opinion is that shipping would be an improvement over the existant. But if the consensus is that it would be a regression, perfectly fine by me to work on a separate branch until deemed good enough.

Hey @philipperolet !
Thank you for the PR.
There is a little bit of love to bring to spacing between titles and blocks:

And to copy (not following https://www.figma.com/file/QOxHwppG64GtPocpDhS6Y7/Product?type=design&node-id=3366%3A31345&mode=design&t=wnTu0BLhoqlNaNXH-1)

@Duncid this is just the initial layout change we will rapidly iterate on wording + layout :+1:
@philipperolet the try / next overlapping each other is a bit disatisfying but we will iterate on it rapidly so :+1:

Hey @philipperolet ! Thank you for the PR.
There is a little bit of love to bring to spacing between titles and blocks:
And to copy (not following https://www.figma.com/file/QOxHwppG64GtPocpDhS6Y7/Product?type=design&node-id=3366%3A31345&mode=design&t=wnTu0BLhoqlNaNXH-1)

Thanks for the reply;  Did you get a chance to read the PR description & in particular the deploy section I've pinged you on? I think this explains why spacing & copy does not fit

As @spolu said we'll quickly iterate and make other screens fit. @spolu I understand you are in favor of shipping

I am in favor of shipping


make Array[T] compile to native array in js target

To make diff of future commits minimal

Pull Request Test Coverage Report for Build 3178
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 29.56%

Totals

Change from base Build 3177:
0.0%

Covered Lines:
47

Relevant Lines:
159

💛  - Coveralls


(Feature) Autosave all stores and clear localStorage after stepFour

This is the first step in the local storage feature. Please note that this PR is using a feature branch (persist-crowdsale-state-#529) as the base branch, since this is not ready for production yet. I expect this feature to have a lot of corner cases, so doing multiple reviews and PRs should help us to eventually merge this in master with less risk.
In this change, all the stores are autosaved to localStorage, and get their data from there in the constructor. This makes the deploy to be resumable: to test it, just reject a transaction and refresh the page; it should allow you to continue the deploy. (As a side effect, that might be a feature or a bug, you can also refresh in the step two and three and most inputs are preserved.)
The main issue with this is that if you deploy a crowdsale and then go back to the start and try to deploy a new one, some of the data from the previous crowdsale is already loaded. If you want to try several deploys, you have to go to the home page, open devtools, run localStorage.clear() and refresh the page.
(The same issue happens if you just visit a crowdsale or invest page and then try to deploy your own crowdsale: the data from the crowdsale you visited is pre-loaded.)
Another major issue is that for you to resume the deploy, you have to go to step four. So, for example, if your browser crashes in the middle of a deploy, and you go to the main page of the wizard, you'll not be redirected to the deploy.
My idea for improving this is that if you go to the home page of the wizard and the data in local storage indicates that you have an incomplete deploy, a modal appears telling you this and asking if you want to resume the deploy. If you accept, you are redirected to the step four and things should just work. If you cancel, the local storage data is cleared.

My idea for improving this is that if you go to the home page of the wizard and the data in local storage indicates that you have an incomplete deploy, a modal appears telling you this and asking if you want to resume the deploy. If you accept, you are redirected to the step four and things should just work. If you cancel, the local storage data is cleared.

I agree. We need this to implement. Also, we have a similar bug in the current version: when we successfully passed through the deployment process and returned back to the main page again, for example, through the left-top logo, all fields in step 2,3 are filled from the previous deployment. I think it should be fixed in the frame of future PR implementing local storage too.


No Issue but How to build this on a M5Core2

Hello,
this is a very lovely idea!!
And it is very easy to port it to a M5Core2: Just 3 steps to go

Just include the Core2 lib instead of M5stack:

#include <M5Core2.h>

Comment out all defines before this - they are not necessary for the Core2

In the setup comment out the second line:

// M5.Power.begin();

Ready to go! Enjoy!
And thanks again for this nice idea!!
Best regards
Tom

Hello Tom,
Thanks a lot. Very helpful.
I have extended the code so that you can choose between the three devices.
Thanks for the hint.
Hans-Günther


fix an error occurred on  using keyframes before using styled

A following error happened when it uses keyframes before using styled on Server Side Rendering (like a nuxt.js ).
TypeError: Cannot read property 'insertRule' of undefined

It is occurred by this.sheet is undefined.
https://github.com/styled-components/vue-styled-components/blob/master/src/vendor/glamor/sheet.js#L137
I don't know a correct way to solve this issue,
but I think it needs to call StyleSheet.inject().
I'm sorry that I do not commit an appropriate test file.
Instead this, the following test is failed,
and I checked pass this same test on this branch.
error-occurred-test
npx mocha src/test/keyframes.test.js --require babel-core/register --require ./mocha-bootstrap --timeout 5000

error-occurred-sample.vue
<template>
   <wrapper>sample</wrapper>
</template>

<script>
import styled, { keyframes } from 'vue-styled-components'

const turn = keyframes`
  100% {
    transform: rotateX(0deg);
  }
`;

const Wrapper = styled.div`
  animation: ${turn} 2s linear forwards 1s;
  transform: rotateX(180deg);
`;

export default {
  components: { Wrapper },
}

</script>

Merged in 1.4.9
Thank you <3


"]633;SetMark;Id=s0;Hidden" shows up in Test Peek Error windows

When I'm running tests recently, I'm seeing this weird markup show up in the "Peek Error" pane:

This markup is not in the original text I'm providing to the TestRun.appendOutput call, but it looks like it's something VS Code is using itself:
https://github.com/microsoft/vscode/blob/90e165a528b5c81f884eb35eadb2f653921610ce/src/vs/workbench/contrib/testing/common/testResult.ts#L131
I'm not sure what's triggering it (it doesn't seem to show up in all output messages, only some) but perhaps @connor4312 (who seems to have worked on that code) will understand what's going on.

Also, I don't know if it's related, but the last item seems to be duplicated in the test output compared to what was sent to appendOutput:

This happens to me too.

@connor4312 thanks! The markers are gone, although I still see the last item duplicated (the last one has line numbers but the one before does not, oddly). Not sure if I'm causing this or not?

Marking as verified as the fix for the original issue got verified.
@DanTup Can you file a new issue for the duplicate entry?


Problem with Generic types

I have a problem to check types that have methods with generic types.
The explementation for the failing type is "Has dependency on: T1&"
How I can allow this dep or ignore it?
Test
PolicyResults results = Policy.Define("Deps", "Desc")
            .For(Types.InAssembly(typeof(KeyValuePairExtensions).Assembly))
            .Add(types => types.That()
                .ResideInNamespace("NetArchExample.Utils")
                .ShouldNot()
                .HaveDependencyOtherThan("NetArchExample.Utils", "System"))
            .Evaluate();

        foreach (var result in results.Results)
        {
            Assert.IsTrue(result.IsSuccessful);
        }

Code
namespace NetArchExample.Utils
{
    using System.Collections.Generic;

    /// <summary>
    /// Class KeyValuePairExtensions.
    /// </summary>
    public static class KeyValuePairExtensions
    {
        /// <summary>
        /// Deconstruct a key value pair.
        /// </summary>
        /// <param name="tuple">The tuple.</param>
        /// <param name="key">The deconstructed key.</param>
        /// <param name="value">The deconstructed value.</param>
        /// <typeparam name="T1">The type of the key.</typeparam>
        /// <typeparam name="T2">The type of the value.</typeparam>
        public static void Deconstruct<T1, T2>(this KeyValuePair<T1, T2> tuple, out T1 key, out T2 value)
        {
            key = tuple.Key;
            value = tuple.Value;
        }
    }
}

Type placeholders out T1 and out T2 were incorrectly detected as dependencies, it should work on v1.3.6 without any change.


Discussion: Transition from Security Quality Gates to Continuous Security Assessment

The objective of this issue is to discuss the possible transition from relying on Security Quality Gates (QGs) to adopting a more continuous approach for security assessments. This change aims to make security a continuous process rather than a one-time gate, better aligning with the dynamic nature of security risks and challenges.
While Security Quality Gates have served as a mechanism to ensure a minimum security standard before production, they also possess limitations. The most notable limitation is their 'point-in-time' nature; they are unable to account for the continuously evolving threat landscape, such as newly discovered vulnerabilities in dependencies.
Rationale for Change

Continuous Security: Security is an ongoing process and cannot be guaranteed by a one-time check.
Dynamic Threat Landscape: New vulnerabilities may appear in dependencies, even without changes in the project code.
Developer Responsibility: Enabling developer teams to continuously assess and manage security findings promotes ownership and faster remediation.

Proposed Approach
Instead of a single Security Quality Gate, we propose:

Regular Security Scanning: Weekly or bi-weekly automated scans, with findings to be reviewed by the responsible developer team.
Peer Reviews: Incorporate security as a mandatory point of discussion during code reviews.
Security Team Support: The Security Team is available for questions or necessary guidance at all times. They can be integrated into the developer workflow through issue assignments, PR reviews, and participation in forums like the DevSecOps Hour.

Request for Comments

Do you agree with the move from Security QGs to a more continuous approach? Why or why not?

Also, no security TRGs.

Memento mori

I like this approach. We as a security Team do a step back and the responsibility is with the product teams to contact us. Let's discuss on our WS :-)

Workshop discussion and results:

Write a Security Code of Conduct (-> Include developer resposibility and personal obligation to follow the specified security rules within the TRGs)

It may also be interesting to have some kind of due diligence process to enable future users of the software (who in the most cases wouldn't have access to the security tab in GitHub) to make sure that the security requirements are implemented.

Workshop discussion and results:
* Write a Security Code of Conduct (-> Include developer resposibility and personal obligation to follow the specified security rules within the TRGs)

There are no security TRGs. Do you want to create even more TRGs?

It may also be interesting to have some kind of due diligence process to enable future users of the software (who in the most cases wouldn't have access to the security tab in GitHub) to make sure that the security requirements are implemented.

Sounds interesting, please elaborate.

Security TRG 8.0 coming soon for Security


feat: Add YouTube transcript server

Description
Adding a new MCP server that enables extraction of transcripts from YouTube videos. This server provides a simple and robust interface for retrieving video captions with multi-language support.
Server Details

Server: youtube-transcript
Changes to: New tools for transcript extraction

get_transcript tool for fetching video transcripts
Support for both URL and video ID inputs
Language specification options

Motivation and Context
LLMs often need to analyze or understand video content through transcripts. This server provides a standardized way to access YouTube video transcripts, enabling better video content analysis and making video content more accessible to LLMs through the MCP protocol.
How Has This Been Tested?

Tested with various YouTube video formats:

Standard youtube.com URLs
Short youtu.be URLs
Direct video IDs

Tested multi-language support
Verified error handling with:

Invalid URLs/IDs
Non-existent videos
Unavailable transcripts
Network errors

Breaking Changes
No breaking changes. This is a new server that doesn't affect existing functionality.
Types of changes

[x] New MCP Server
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] Documentation update

Checklist

[x] I have read the MCP Protocol Documentation
[x] My server follows MCP security best practices
[x] I have updated the server's README accordingly
[x] I have tested this with an LLM client
[x] My code follows the repository's style guidelines
[x] New and existing tests pass locally
[x] I have added appropriate error handling
[x] I have documented all environment variables and configuration options

Additional context

Uses youtube-captions-scraper library for reliable transcript extraction

Thank you for taking the time to build this! We've now made some changes to how we'll manage the servers repo going forward.
TLDR: We're restructuring the MCP servers repository to focus on reference implementations only. New server implementations should be developed in separate repositories and can be added as links to our README, rather than submitted as PRs to this repository.
In line with that new approach, I'll close out this PR, but we would love to include a link to this server once it's in its own repo. Please do submit a new PR when it's ready!


Shorter Words are not centered in nodes

I just merged your latest release into my fork and noticed that shorter words are not being middle aligned as they were before.

That's really strange. Can you some sample data so I can use your strings? Also, how are you setting the font-family?

I am setting the font like this.
d3plus.viz()
      .font("Open Sans Condensed")

Other than that I have a css definition.
 svg text {
    font-family: "Open Sans";
    font-weight: 800;
}

Here is a simplified Data set: In this set none of the text nodes are middle aligned.
[
  {
    "type": "ecocategory",
    "ref": "root",
    "name": "Acme Co.",
    "color": "brown"
  },
  {
    "type": "ecocategory",
    "ref": "category_3",
    "name": "Other",
    "color": "blue",
    "ecoSubCategory": [
      {
        "type": "ecosubcategory",
        "ref": "category_3_subcategory_1",
        "name": "child node 1",
        "color": "blue-light"
      },
      {
        "type": "ecosubcategory",
        "ref": "category_3_subcategory_2",
        "name": "child node 2",
        "color": "blue-light"
      },
      {
        "type": "ecosubcategory",
        "ref": "category_3_subcategory_3",
        "name": "child node 3",
        "color": "blue-light"
      }
    ],
    "hasChildren": true
  }
]

Generated SVG from node with uncentered text:
<g class="d3plus_rect gray" opacity="1" style="cursor: pointer;" transform=
    "translate(650,225),scale(1,1)">
        <rect class="d3plus_data" fill="#A2A4AB" height="90" opacity="1" rx=
        "46" ry="46" shape-rendering="auto" style="stroke: rgb(130, 132, 138);"
        transform vector-effect="non-scaling-stroke" width="90" x="-45" y=
        "-45"></rect>
        <text class="d3plus_label" fill="#565758" font-family="sans-serif"
        font-size="427px" font-weight="200" id="d3plus_label_category_3_rect"
        opacity="1" pointer-events="none" style="font-size: 427px;"
        text-anchor="middle" transform=
        "rotate(0,0,0)scale(0.0532670528243478)translate(0,0)rotate(0, 0, 0)translate(0,271.15988311707343)"
        x="-834.7998831170735" y="-834.7998831170735">
            <tspan dominant-baseline="alphabetic" dx="834.7998831170735px" dy=
            "469.70000000000005px" style="baseline-shift: 0%;" x=
            "-834.7998831170735px"></tspan>
            <tspan dominant-baseline="alphabetic" dx="834.7998831170735px" dy=
            "469.70000000000005px" style="baseline-shift: 0%;" x=
            "-834.7998831170735px">
                Other
            </tspan>
        </text>
    </g>

FYI I'm seeing this too. Font styles are inherited from the body. Generated SVG of the uncentered node:
<g transform="translate(2.0630937268983054e-14,-336.92877462052104)">
	<circle r="37.26741194812636"></circle>
	<text class="ng-label text-wrap" text-anchor="middle" font-size="14px" x="-37.26741194812636" y="-37.26741194812636" style="font-size: 14px;" transform="rotate(0, 0, 0)translate(0,18.787411948126355)"><tspan x="0px" dy="15.400000000000002px" dominant-baseline="alphabetic" style="baseline-shift: 0%;"></tspan><tspan x="0px" dy="15.400000000000002px" dominant-baseline="alphabetic" style="baseline-shift: 0%;">Discharges</tspan></text>
</g>

hmm, in both examples it looks like there's an empty <tspan> element that's created before the actual used one. thanks everybody for giving such detailed reporting.
only other thing I can think to ask is: what browser is everybody using?

I use Chrome and Firefox. My users have reported it on IE and Safari on Mac and Windows.

I'm seeing it on Chrome and Safari on Mac and IE9 and 10 on my VMs. Haven't tested on newer IEs.

Seeing it on IE11 too.

Oh - I tried to cherry pick the fix for labels in Edge onto my working branch, and I saw this bug. I think this is the offending commit.

wait, is everyone seeing this in the public build or in the current dev build in the repo?

I'm using a dev build :)

Fixed this! You guys can grab the dev build of d3plus.js from the main directory until I get the full release out the door.
Thanks again for all the help.

Thanks so much Dave!


ghc on musl: Crude hack to allow integer-simple

as per discussion on
https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922275844 this
seems to be enough to make
nix-build -A pkgsMusl.haskell.packages.integer-simple.ghc884.hello

work again.
This is likely not the right patch (maybe gmp should be
nativeBuildInput? Or a propagated build input from the boot ghc?), but
this way I we can discuss (and I can pull the patch into my project...)

@ofborg pkgsMusl.haskell.packages.integer-simple.ghc884.hello pkgsMusl.haskell.packages.integer-simple.ghc8107.hello

@ofborg build pkgsMusl.haskell.packages.integer-simple.ghc884.hello pkgsMusl.haskell.packages.integer-simple.ghc8107.hello

cc @nh2 about this as well

Answering https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922443078

is a fix along the lines of #138429 the wrong direction?

Based on my write-up https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922452843 just now, this PR is probably not the "proper fix".
It is pkgsMusl.haskell.compiler.ghc8102BinaryMinimal that should be fixed (it forgets its GMP path), not the compilers that are compiled with it.
That said, ghc8102BinaryMinimal is mainly used to bootstrap other compilers, so injecting the GMP dependencies into the derivations of those compilers looks like a reasonable workaround.
It would be very beneficial though to check that gmp is no longer referred to at all by the bootstrapped compilers, or leaked into the outputs built with them (as people use integer-simple specifically to be sure not to have a gmp dependency). Even better to assert it programmatically, but I don't know how to do that; https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922278984 mentioned disallowedRequisites but I don't know yet what that is.

I have put out an alternative PR #138524, which switches ghc8102Binary -> ghc8107Binary as the bootstrap compiler instead.
If it works, that should be cleaner than this workaround.

Thanks for your help! I’ll close this then


use zipper in scala.bzl no_src_jar

see:
https://github.com/bazelbuild/rules_scala/blob/master/scala/scala.bzl#L107
and do the same as we did in #286

actually, since the https://github.com/johnynek/bazel-deps/ style is to create a lot of empty jars (one for each dependency) this could be a significant performance boost.


Don't collapse with a letter difference.

Steps to reproduce
When we type the command ".song yan Diyarbakır" in a WhatsApp group, it causes an error. However, when I tried it as ".song yan diyarbakır", I noticed that we did not encounter any errors.
Failure Logs
InnertubeError: SearchHeader not found!

This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues!

at Parser._Parser_printError (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:299:29)

at Parser.parseItem (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:161:77)

at Parser.parse (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:205:53)

at Parser.parseResponse (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/index.js:71:45)

at new Feed (/railway/Raganork/node_modules/youtubei.js/dist/src/core/Feed.js:83:70)

at new Search (/railway/Raganork/node_modules/youtubei.js/dist/src/parser/youtube/Search.js:25:9)

at Innertube.<anonymous> (/railway/Raganork/node_modules/youtubei.js/dist/src/Innertube.js:90:20)

at Generator.next (<anonymous>)

at fulfilled (/railway/Raganork/node_modules/youtubei.js/dist/src/Innertube.js:5:58)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

info: {

chipBar: { chipCloudRenderer: [Object] },

searchFilterButton: { buttonRenderer: [Object] },

trackingParams: 'CBAQiOoKIhMI3avxlcmMgwMVGExMCB0Q6Qus'

},

date: 2023-12-13T13:59:18.742Z,

version: '2.9.0'

}

Expected behavior
To download the song smoothly
Current behavior
He's trying to download the song, but I discovered that he got into an endless loop and caused the WhatsApp bot to crash
Version
Default
Anything else?
No response
Checklist

[X] I am running the latest version.
[X] I checked the documentation and found no answer.
[X] I have searched the existing issues and made sure this is not a duplicate.
[X] I have provided sufficient information.

Please upgrade to the latest version of YouTube.js. You are using version 2.9.0 which was released in January 2023, so understandably it doesn't know how to handle recent YouTube changes. (Your log clearly states that the version is 2.9.0, please don't lie on the latest version checkbox next time).

Please upgrade to the latest version of YouTube.js. You are using version 2.9.0 which was released in January 2023, so understandably it doesn't know how to handle recent YouTube changes. (Your log clearly states that the version is 2.9.0, please don't check that checkbox, unless you are actually on the latest version next time).

How do I update to the latest version?


Elysia application does not load swagger documentation if using elysia-helmet lib

I'm facing a problem when using swagger() and helmet() together in an Elysia application. When I configure the application as follows:
import Elysia from 'elysia'
import swagger from '@elysiajs/swagger'
import { helmet } from 'elysia-helmet'

const app = new Elysia()
  .use(swagger())
  .use(helmet())
  .get('/root', () => 'Hello World')
  .listen(3333)

Swagger should automatically add a /swagger route to document API routes. However, when using helmet(), the /swagger route does not load correctly; the page is completely blank.
It seems that helmet() is enforcing some security restrictions that prevent Swagger from working as expected. If anyone has experienced this or knows of a solution, I would appreciate your help!

You can use something like this to make it work
  helmet({
    contentSecurityPolicy: {
      directives: {
        defaultSrc: ["'self'"],
        scriptSrc: [
          "'self'",
          "'unsafe-inline'",
          'unpkg.com',
          'cdn.jsdelivr.net',
        ],
        styleSrc: ["'self'", "'unsafe-inline'", 'unpkg.com'],
        imgSrc: ['data:'],
      },
    },
  })
)


skip_serializing_none does not work

I tried asking this question on the actual PR https://github.com/graphql-rust/graphql-client/pull/431 that was meant to solve this issue, but got no response, so I'm just gonna move the question into this issue.
I've added skip_serializing_none to the struct as stated in the README, but doing so still leaves me with null values after serialization.
My first guess was that this hasn't been released yet, so I switch over to the main branch in Cargo.toml, but that changed nothing. Here's the code I'm using:
#[derive(GraphQLQuery)]
#[graphql(
    schema_path = "graphql/schema.graphql",
    query_path = "graphql/insert_mutation.graphql",
    response_derives = "Debug",
    skip_serializing_none
)]
pub struct InsertMutation;

let vars = Variables {
    // .. omitted
    user_id: None,
    // .. omitted
};

let q = crate::graphql::InsertMutation::build_query(vars);

let skipped = serde_json::to_string_pretty(&q).unwrap();
println!("{skipped}");

Output:
{
  "variables": {
    // .. omitted
    "user_id": null,
    // .. omitted
  },
  ...
}

Is there something obvious I'm missing here to make this work, or is this something that warrants it's own issue?

I unfortunately don't have time to spend on this project to investigate further or fix things, but I'm happy to review PRs. FWIW it looks like a bug.

Thanks for the quick reply.
This is unfortunately a blocking issue for me, unless there's some way to work around this issue. Since hasura 2.x now reports an error if input fields with null values are present, it's no longer possible to get the mutations to work.
I might try opening a PR if I get the time. Any hints on how approach fixing this issue would be appreciated.

So I tried to switch to the git version again, and this time it seems to fix the problem, it's only v0.11.0 that doesn't work. So my first assumption was correct, that this features has not yet been released. Not sure why switching last time didn't work, might have been a caching issue or something.
Hoping we'll see a v.0.12.0 soon! Until then, I'm just gonna depend on the git repo directly.

I am also running into this issue in v0.12.0, I think this issue should be reopened.
When expanding macro with skip_serialize_none, it doesn't seem like it is applied to the variables.
Example:
#[derive(GraphQLQuery)]
#[graphql(
    schema_path = "./github.schema.graphql",
    query_path = "./github.query.graphql",
    response_derives = "Debug, PartialEq",
    skip_serialize_none
)]
pub struct BranchProtectionsView;

github.schema.graphql: https://docs.github.com/public/schema.docs.graphql
github.query.graphql:
query BranchProtectionsView($owner: String!, $name: String!, $cursor: String, $first: Int = 90) {
    repository(owner: $owner, name: $name) {
        branchProtectionRules(first: $first, after: $cursor) {
            pageInfo {
                endCursor
                hasNextPage
            }
            totalCount
            edges {
                cursor
                node {
                    pattern
                    requiresApprovingReviews
                }
            }
        }
    }
}

I am encountering the same issue in v0.13.0. This problem should be reopened. When expanding a macro with skip_serialize_none, it appears that it is not being applied to the variables in the query.

It seems like it only works for nested variables. Here's a test patch to reproduce:
diff --git a/graphql_client/tests/skip_serializing_none.rs b/graphql_client/tests/skip_serializing_none.rs
index 0d26184..40b0f9f 100644
--- a/graphql_client/tests/skip_serializing_none.rs
+++ b/graphql_client/tests/skip_serializing_none.rs
@@ -13,6 +13,7 @@ fn skip_serializing_none() {
     use skip_serializing_none_mutation::*;

     let query = SkipSerializingNoneMutation::build_query(Variables {
+        foo: None,
         param: Some(Param {
             data: Author {
                 name: "test".to_owned(),
@@ -26,4 +27,5 @@ fn skip_serializing_none() {
     println!("{}", stringified);

     assert!(stringified.contains(r#""data":{"name":"test"}"#));
+    assert!(stringified.contains(r#""variables":{"param":{"data":{"name":"test"}}}"#));
 }
diff --git a/graphql_client/tests/skip_serializing_none/query.graphql b/graphql_client/tests/skip_serializing_none/query.graphql
index 028ae76..f648300 100644
--- a/graphql_client/tests/skip_serializing_none/query.graphql
+++ b/graphql_client/tests/skip_serializing_none/query.graphql
@@ -1,4 +1,4 @@
-mutation SkipSerializingNoneMutation($param: Param) {
+mutation SkipSerializingNoneMutation($param: Param, $foo: Int) {
   optInput(query: $param) {
     name
     __typename

@Akremkadri looks like you also ran into this issue recently, I submitted a PR here: https://github.com/graphql-rust/graphql-client/pull/485
Does it work for you?


Export Trend Analysis data (My Assets)?

Hi, is there a way we can export Trend Analysis data (My Assets)?

Data of daily cumulative P/L with timestamps
Data should be enough to plot Trend Analysis as shown in the app.

Not supported currently
发件人: @.*** @.> 代表 kelvinxuande
发送时间: 2024年1月1日 11:57
收件人: MoomooOpen/py-moomoo-api @.>
抄送: Subscribed @.***>
主题: [MoomooOpen/py-moomoo-api] Export Trend Analysis data (My Assets)? (Issue #3)
Hi, is there a way we can export Trend Analysis data (My Assets)?

Data of daily cumulative P/L with timestamps
Data should be enough to plot Trend Analysis as shown in the app.

—
Reply to this email directly, view it on GitHub https://github.com/MoomooOpen/py-moomoo-api/issues/3 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BBDO3CQ477GQFCFKXSTO5GDYMIX2BAVCNFSM6AAAAABBIWS5PGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DCMRZGQ2TQMA .
You are receiving this because you are subscribed to this thread.  https://github.com/notifications/beacon/BBDO3CUNYR4ZGX7P23Y7G4TYMIX2BA5CNFSM6AAAAABBIWS5PGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHVXG36Q.gif Message ID: @.***>


Rewrite documentation

View built version at http://portphp.readthedocs.org/en/docs/.
Note: this is WIP; there’s much that still needs to be done.
Fix #3.

Fix #38.


UBSAN: mi_slice_t index out of bounce

CPython's test suite for liblzma is failing under undefined behavior sanitizer mimalloc/segment.c:750:23: runtime error: index 1089 out of bounds for type 'mi_slice_t [1024]'. CPython overrides liblzma's allocator with a custom allocator. In my mimalloc branch the allocator uses mimalloc. The undefined behavior occurs every time when lzma_alloc requests a block of about 67 MB from mimalloc:
Breakpoint 2, lzma_alloc (allocator=0x2117081f990, size=67108872) at common/common.c:48
48                      ptr = allocator->alloc(allocator->opaque, 1, size);
(gdb) s
PyLzma_Malloc (opaque=<optimized out>, items=1, size=67108872) at /home/heimes/dev/python/cpython/Modules/_lzmamodule.c:171
171         if (size != 0 && items > (size_t)PY_SSIZE_T_MAX / size) {
(gdb) n
176         return PyMem_RawMalloc(items * size);
(gdb) s
PyMem_RawMalloc (size=67108872) at ../../Objects/obmalloc.c:717
717         if (size > (size_t)PY_SSIZE_T_MAX)
(gdb) n
719         return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);
(gdb) s
_PyMimalloc_Malloc (ctx=0x0, size=67108872) at ../../Objects/obmalloc.c:141
141     {
(gdb) n
142         if (size == 0)
(gdb) n
144         void *r = mi_malloc(size);
(gdb) s
_Py_mi_malloc (size=67108872) at ../../Objects/mimalloc/alloc.c:119
119       return mi_heap_malloc(mi_get_default_heap(), size);
...

reproducer

install clang and CPython build dependencies
get my mimalloc branch from https://github.com/python/cpython/pull/31164
configure CPython with CC=clang LD=clang CFLAGS="-fno-sanitize-recover -g -fno-omit-frame-pointer" ./configure -C --with-undefined-behavior-sanitizer
make
run test suite with UBSAN_OPTIONS=print_stacktrace=1 ./python -m test test_lzma

full traceback
$ UBSAN_OPTIONS=print_stacktrace=1 ./python -m test test_lzma
0:00:00 load avg: 0.48 Run tests sequentially
0:00:00 load avg: 0.48 [1/1] test_lzma
../../Objects/mimalloc/segment.c:750:23: runtime error: index 1089 out of bounds for type 'mi_slice_t [1024]'
    #0 0x547de7 in mi_segment_span_allocate /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/segment.c:750:23
    #1 0x54866e in mi_segment_init /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/segment.c:939:18
    #2 0x538fac in mi_segment_alloc /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/segment.c:950:10
    #3 0x538fac in mi_segment_huge_page_alloc /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/segment.c:1512:27
    #4 0x538fac in _Py__mi_segment_page_alloc /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/segment.c:1562:12
    #5 0x548d24 in mi_page_fresh_alloc /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/page.c:248:21
    #6 0x548a18 in mi_large_huge_page_alloc /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/page.c:785:21
    #7 0x53af95 in _Py__mi_malloc_generic /home/heimes/dev/python/cpython/builddir/usan/../../Objects/mimalloc/page.c:856:21
    #8 0x7f7f53538fd1 in lzma_alloc /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/common.c:48:9
    #9 0x7f7f53538fd1 in lz_encoder_init /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/lz/lz_encoder.c:422:13
    #10 0x7f7f53538fd1 in lzma_lz_encoder_init /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/lz/lz_encoder.c:577:6
    #11 0x7f7f5352a9cb in lzma_raw_coder_init /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/filter_common.c:286:23
    #12 0x7f7f5352f1de in block_encoder_init /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/stream_encoder.c:75:9
    #13 0x7f7f5352f1de in stream_encoder_update /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/stream_encoder.c:244:24
    #14 0x7f7f5352ffdd in stream_encoder_init /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/stream_encoder.c:323:9
    #15 0x7f7f53530132 in lzma_stream_encoder /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/stream_encoder.c:331:2
    #16 0x7f7f5353443a in lzma_easy_encoder /usr/src/debug/xz-5.2.5-7.fc35.x86_64/src/liblzma/common/easy_encoder.c:23:9
    #17 0x7f7f5357d190 in Compressor_init_xz /home/heimes/dev/python/cpython/Modules/_lzmamodule.c:657:17
    #18 0x7f7f5357c072 in Compressor_init /home/heimes/dev/python/cpython/Modules/_lzmamodule.c:820:17
    #19 0x560a8c in type_call /home/heimes/dev/python/cpython/builddir/usan/../../Objects/typeobject.c:1141:19
    #20 0x4b911c in _PyObject_MakeTpCall /home/heimes/dev/python/cpython/builddir/usan/../../Objects/call.c:214:18
    #21 0x61e624 in _PyEval_EvalFrameDefault /home/heimes/dev/python/cpython/builddir/usan/../../Python/ceval.c
    #22 0x613361 in _PyEval_EvalFrame /home/heimes/dev/python/cpython/builddir/usan/../../Include/internal/pycore_ceval.h:53:16
    #23 0x613361 in _PyEval_Vector /home/heimes/dev/python/cpython/builddir/usan/../../Python/ceval.c:6111:24
    #24 0x62348e in do_call_core /home/heimes/dev/python/cpython/builddir/usan/../../Python/ceval.c
...
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../Objects/mimalloc/segment.c:750:23 in

I can reproduce the problem with just allocator a large chunk, see #544.

Hi @tiran, yikes that is scary .. but I think it is a "bug" in ubsan perhaps. It the offending line in segment.c:750 of v2.0.3 ?,  i.e.
mi_slice_t* last = &segment->slices[slice_index + slice_count - 1];

This is only an address calculation and I don't think any memory is accessed (also due to the if after it). Perhaps if we rewrite it as:
mi_slice_t* last = segment->slices + (slice_index + slice_count - 1);

ubsan will be happy?  I will try to repro with ubsan using your commit but if you can try easily let me know.

I pushed a commit that fixes this as the ubsan check was 'wrong'. Thanks so much.
(I will push a new release of mimalloc soon that will include the fix)

Yes, for "huge" allocations the "span" may be more than the fixed array of slices; the segment_t::segment_slices (in mimalloc-types.h) contains the actual allocated slices for huge allocations. (it is set up this way to share common structures and code and reduce the amount of special cases in the code (and avoid branching etc))


[Snyk] Upgrade drivelist from 11.0.0 to 11.0.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade drivelist from 11.0.0 to 11.0.2.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 5 versions ahead of your current version.
The recommended version was released a day ago, on 2022-10-25.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Drivelist is now on 11.1.0.


Restructuring

Everything that was mention in previous PR is here
pepdbagent divided into 5 Modules:

PEPDatabaseAgent
BaseConnection

PEPDatabaseProject
PEPDatabaseAnnotation
PEPDatabaseNamespace

Let me know if you have any questions
Few things to add before merging:

[x] Docs
[x] Structured tests
[x] Add error throwing
[x] Improve sql performance by reducing LIKE statements and creating indexing

So, are we going to close the other PR?

Hey @Khoroshevskyi  this API is really nice, I really like it. This is way more clear now!
I went through the tutorial and edited it a bit. There are few things that still confused me, and I wasn't sure how to edit it. Can you rephrase these points:

[ ] "- Submitting/editing projects (+editing metadata)"  (what is "+ editing metadata"? isn't that what annotation does? Please explain
[ ] can you provide a bit more insight/example onto how agetn.project.edit works? is this how you update a project or just its annotation? can you provide some more examples? Why isnt't there agent.annotation.edit ?
[ ]  "retrieves information about namespaces and provides search functionality." -> can you clarify how this differs from the search functionality described earlier? just be a bit more specific about the differences here.
[ ]  This is not clear to me: "# Additionally, to get annotations from private projects you should provide # admin or list of admins."
[ ] This is also not clear to me: "# The same way as in annotation you should provide admin list, to have # information about private projects added to information about namespaces"

Here are some ideas for word changes, what do you think?

change agent.project.edit to agent.project.update.
change agent.project.submit to agent.project.create.

+1 for word changes @nsheff suggested.

"# submit a project" -> "# create a project"

Why is there only a _by_rp function for annotation.get_by_rp? Do you need functions create_by_rp and update_by_rp, et. and put them on project, annotation, namespace modules?

Instead of "NamespaceReturnModel" it doesn't make sense to put the word "Return" in this object, because it's not always going to be "Returned" it could be used for lots of other things.
What is this really? Can you name it appropriately?
NamespaceList? Similar for Annotation? AnnotationList object maybe?

Why is there only a _by_rp function for annotation.get_by_rp?

I don't really understand this question

Do you need functions create_by_rp and update_by_rp, et. and put them on project, annotation, namespace modules?

If we need I will add it, but I am not sure if we are using it. https://en.wikipedia.org/wiki/You_aren't_gonna_need_it

Instead of "NamespaceReturnModel" it doesn't make sense to put the word "Return" in this object, because it's not always going to be "Returned" it could be used for lots of other things.
What is this really? Can you name it appropriately?
NamespaceList? Similar for Annotation? AnnotationList object maybe?

Yes, probably we should use different name for it. Your suggestions??
(p.s. In my experience all model naming should end on Model so in will be obvious that it's model)

The pydantic docs don't suggest ending every model with Model: https://docs.pydantic.dev/usage/models/
I would suggest NamespaceList and AnnotationList ...

Is this model an Annotation or Annotations ? Can you sync the model name and docstring one way or the other?
https://github.com/pepkit/pepdbagent/blob/9621f05e61e14b11af61e7800ca6c28a2f4288ae/pepdbagent/models.py#L9-L11

Can you justify why you're prefixing double underscores here? I'm not familiar with that convention, can you explain why you're not just using the single underscore approach that I'm familiar with?
https://github.com/pepkit/pepdbagent/blob/9621f05e61e14b11af61e7800ca6c28a2f4288ae/pepdbagent/pepdbagent.py#L37-L43

What's the advantage of attaching an object at _project (or __project) and then defining a @property called project separately?
How is this superior to just sticking the object on .project in the first place?

two underscore means private object, it means that you can't change it outside of the object. (You can but in different way)
if I am using property, no one can change __project or __namespace variable outside pepdbagent

The pydantic docs don't suggest ending every model with Model.

I was going to ask also about the naming of the models. What's the difference between ____ResultModel and ___ReturnModel? I was getting them mixed up a bit.

The pydantic docs don't suggest ending every model with Model.

I was going to ask also about the naming of the models. For example, what's the difference between NamespaceResultModel and NamespaceReturnModel? I was getting them mixed up a bit.

Yeah, again naming... I changed it already. so now you will have:
NamespaceList: it returns model that has list of NamespaceRetrunModel
NamespaceResultModel: is ONE result
AnnotationList: it returns model that has list of Annotation
Annotation: is ONE annotation

Can NamespaceResultModel just be Namespace then, for consistency with Annotation ?


Fix collection field alignment in drop zone (multi-upload)

Fixes #10280
Note: May need to backport to previous releases, would likely be broken in 4.1 & 4.2

Before

After

I don't think the CI failures have anything to do with this PR.

Any chance for an approval on this one @nmorduch ? Would love to get this small clean up item into 5.0.

It looks like this is no longer relevant as d8731c2dc6bd6e1865fa5985d3da91e07c2974f3 does the same change for all fields at once, so I’ll close this now and manually merge the change for v4.1.