[$250] Deeplink - Duplicate concierge chat is displayed on LHN when deeplinking to concierge

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.2-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Issue found when executing PR https://github.com/Expensify/App/pull/44063
Action Performed:

Sign out from ND
Paste this link to the browser tab https://staging.new.expensify.com/concierge
Press Enter key
Enter a new user email address in the email field
Click Continue button
Click the Join button
While staying in the onboarding process, observe the LHN

Expected Result:
Only one concierge chat is displayed on the LHN
Actual Result:
Duplicate concierge chat is briefly displayed on the LHN
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/f12f02f1-b0a5-4f87-a2b3-7d3304ea975c
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01761bb8fe9958d8df
Upwork Job ID:<PHONE_NUMBER>862616294
Last Price Increase: 2024-10-16

Issue OwnerCurrent Issue Owner: @getusha

We think that this bug might be related to #vip-vsp

Hello, I'm from SoftwareMansion, an expert agency, and I'm going to work on this one

It's strange, I'm able to reproduce this issue on staging but when I try to do so on local build it works correctly:
https://github.com/Expensify/App/assets/56261019/5b08bb42-48b4-48f7-b956-3845af6df18d

Same, not able to reproduce this on local build.

@jnowakow @getusha I'm not sure how local build is created (not an engineer 😅), is the local build based on staging or is it possible for staging to be different from a local build? Maybe the builds have to be renewed?

Issue not reproducible during KI retests. (First week)

Seems like the issue is not reproducible anymore, i will confirm it tomorrow
https://github.com/Expensify/App/issues/44465#issuecomment-2238040878

Issue not reproducible during KI retests. (Second week)

Issue not reproducible during KI retests. (Third week)

Closing since it's not reproducible for 3 weeks

The issue is still reproducible with the latest build if you first go to the deep link in the browser. Build - v9.0.31-22
https://github.com/user-attachments/assets/a5d9ff11-701a-410e-9a06-2b793e218630

looking for proposals

Proposal
Please re-state the problem that we are trying to solve in this issue.
Duplicate concierge chat displayed on LHN when deeplinking.
What is the root cause of that problem?
In navigateToConciergeChat, we are trying to create the concierge chat when it's not found:
https://github.com/Expensify/App/blob/336e4782aec98bb29a06c28e0d630c276d4eddf6/src/libs/actions/Report.ts#L2155-L2159
Deeplinking can cause issues when there is a conflict between the existing concierge chat from the server and a newly created one. This can lead to the focus being moved to the existing chat or, optimistically, the newly created concierge report showing a "not found" page.
What changes do you think we should make in order to solve the problem?
If concierge chat doesn't exist, we should wait for the report to load instead of recreating it.
We can either add a new NVP_CONCIERGE_CHAT_REPORT_ID or utilize NVP_ONBOARDING's chatReportID (uncertain if NVP_ONBOARDING consistently represents concierge report id).
In this check code:
https://github.com/Expensify/App/blob/336e4782aec98bb29a06c28e0d630c276d4eddf6/src/libs/actions/Report.ts#L1390-L1394
We can fill NVP_CONCIERGE_CHAT_REPORT_ID value with report.reportID
    if (report?.reportID) {
        if (ReportUtils.isConciergeChatReport(report)) {
            conciergeChatReportID = report.reportID;
            Onyx.set(ONYXKEYS.NVP_CONCIERGE_CHAT_REPORT_ID, report.reportID);
        }
    }

Reset here:
https://github.com/Expensify/App/blob/336e4782aec98bb29a06c28e0d630c276d4eddf6/src/libs/actions/Report.ts#L168-L172
        // When signed out, val is undefined
        if (!value?.accountID) {
            conciergeChatReportID = undefined;
            Onyx.set(ONYXKEYS.NVP_CONCIERGE_CHAT_REPORT_ID, undefined);
            return;
        }

In src/libs/actions/Welcome/index.ts
Add new if condition to checkServerDataReady
function checkServerDataReady() {
    if (isLoadingReportData || isEmpty(conciergeChatReportID)) {
        return;
    }

    resolveIsReadyPromise?.();
}

And listen to the key
Onyx.connect({
    key: ONYXKEYS.NVP_CONCIERGE_CHAT_REPORT_ID,
    initWithStoredValues: false,
    callback: (value) => {
        conciergeChatReportID = value ?? '';
        checkServerDataReady();
    },
});

We navigate once the conciergeChatReportID is ready, without having to recreate the chat.
Change this code to
function navigate(reportID: string, shouldDismissModal: boolean, actionType?: string) {
    if (shouldDismissModal) {
        Navigation.dismissModal(reportID);
    } else {
        Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(reportID), actionType);
    }
}

function navigateToConciergeChat(shouldDismissModal = false, checkIfCurrentPageActive = () => true, actionType?: string) {
    // If conciergeChatReportID contains a concierge report ID, we navigate to the concierge chat using the stored report ID.
    // Otherwise, we would find the concierge chat and navigate to it.
    if (!conciergeChatReportID) {
        // In order to avoid creating concierge repeatedly,
        // we need to ensure that the server data has been successfully pulled
        Welcome.onServerDataReady().then(() => {
            // If we don't have a chat with Concierge then create it
            if (!checkIfCurrentPageActive()) {
                return;
            }

            if(!conciergeChatReportID){
                return;
            }

            navigate(conciergeChatReportID, shouldDismissModal, actionType);
        });
    } else {
        navigate(conciergeChatReportID, shouldDismissModal, actionType);
    }

Branch for this solution
What alternative solutions did you explore? (Optional)
Add small delay after data ready here:
https://github.com/Expensify/App/blob/336e4782aec98bb29a06c28e0d630c276d4eddf6/src/libs/actions/Report.ts#L2154-L2160
This ensure that the concierge chat loaded, there is a chance that chat not loaded even if isLoadingReportData is false, applying onyx updates, especially report take longer than setting isLoadingReportData to false.

Proposal Updated

Add optimization suggestion as alternative 2

I am not able to reproduce this
https://github.com/user-attachments/assets/5127c82a-38d2-4b80-a118-283f46b5c2ba

@getusha it's reproducible in desktop now,
no need for new user, you can use existing user, just access
https://staging.new.expensify.com/concierge (not direct concierge chat with id)
and then open link in desktop
Like this rep steps:
https://github.com/Expensify/App/issues/44465#issuecomment-2341834174

I can also still reproduce
When I open the link and log in, I am shown two Concierge messages in the LHN. If I click out of the one that's displayed first then it vanishes (I'm not in #focus mode) and the only way to get back to it is to click the browser back button.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Duplicate concierge chat displayed on LHN when deeplinking to /concierge path.
What is the root cause of that problem?
When users log out and deep link to the concierge page, logging back in should open the concierge chat. However, if the reports are not fully loaded from the server, the navigateToConciergeChat function creates a new report instead of navigating to the existing concierge chat.
https://github.com/Expensify/App/blob/ee772a9e599c1adfee46047ba27e961574617e62/src/pages/ConciergePage.tsx#L37-L50
The root cause is that the conciergeChatReportID is not populated when navigateToConciergeChat is called. This occurs because the function checks the conciergeChatReportID to determine whether to navigate to an existing report or create a new one. If the reports have not been loaded yet, the getChatByParticipants function defaults to using an empty reports parameter from ReportConnection.getAllReports(), which leads to it returning an empty object. Consequently, the navigateToAndOpenReport function incorrectly attempts to create a new concierge chat.
Here's the relevant source code for clarity:
https://github.com/Expensify/App/blob/ee772a9e599c1adfee46047ba27e961574617e62/src/libs/actions/Report.ts#L2155-L2176
The key issue lies within the navigateToAndOpenReport function, specifically in this block of code:
https://github.com/Expensify/App/blob/ee772a9e599c1adfee46047ba27e961574617e62/src/libs/actions/Report.ts#L1005-L1012
The getChatByParticipants function uses ReportConnection.getAllReports() as its default parameter:
https://github.com/Expensify/App/blob/ee772a9e599c1adfee46047ba27e961574617e62/src/libs/ReportUtils.ts#L6137
When the data isn’t ready, ReportConnection.getAllReports() returns an empty report collection. As a result, this leads to the creation of a new concierge chat instead of navigating to the existing one.
What changes do you think we should make in order to solve the problem?

We should implement a check to ensure that the reports are fully loaded before calling navigateToConciergeChat. If the reports are not yet available, we can delay the navigation or provide feedback to the user. This would involve modifying the function to wait for the reports to load before proceeding with navigation logic.
We can define a variable to check if the reports are still loading, using something like:
const [isLoadingReportData] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA, {initialValue: true});

Before navigating to the concierge chat, we should ensure that isLoadingReportData is defined and false. If it's still loading or undefined, we should not proceed with the navigation.
The revised source code for ConciergePage would look like this:
function ConciergePage({session}: ConciergePageProps) {
    const styles = useThemeStyles();
    const isUnmounted = useRef(false);
    const {shouldUseNarrowLayout} = useResponsiveLayout();
    const [isLoadingReportData] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA, {initialValue: true});

    useFocusEffect(
        useCallback(() => {
            if (session && 'authToken' in session) {
                App.confirmReadyToOpenApp();
                Navigation.isNavigationReady().then(() => {
                    if (isUnmounted.current || !!isLoadingReportData) {
                        return;
                    }
                    Report.navigateToConciergeChat(true, () => !isUnmounted.current);
                });
            } else {
                Navigation.navigate();
            }
        }, [session, isLoadingReportData]),
    );

    useEffect(() => {
        isUnmounted.current = false;
        return () => {
            isUnmounted.current = true;
        };
    }, []);

    return (
        <ScreenWrapper testID={ConciergePage.displayName}>
            <View style={[styles.borderBottom, styles.appContentHeader, !shouldUseNarrowLayout && styles.headerBarDesktopHeight]}>
                <ReportHeaderSkeletonView onBackButtonPress={Navigation.goBack} />
            </View>
            <ReportActionsSkeletonView />
        </ScreenWrapper>
    );
}

By wrapping the callback in useCallback, we can avoid unnecessary re-renders and ensure the effect only runs when necessary.
What alternative solutions did you explore? (Optional)
I considered a workaround where we immediately navigate to the chat but add logic to prevent creating a new report if the ID isn’t available. However, this could lead to inconsistencies, and ensuring the reports are fully loaded first is a more robust solution.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~0113b790fc6c7a1ad9

@getusha what do you think of the above proposal?

Reviewing, i'll update today

@ugogiordano seems like we already fixed/attempted to fix this as i can see
https://github.com/Expensify/App/blob/ee772a9e599c1adfee46047ba27e961574617e62/src/libs/actions/Report.ts#L2162-L2164
navigateToAndOpenReport is called on onServerDataReady. I am still trying to understand why isLoadingReportData remains true after onServerDataReady.

Proposal Updated

Add Alternative 3 -- Wait for ReportConnection.getAllReports()  not undefined
provide more description to the root cause

I am still trying to understand why isLoadingReportData remains true after onServerDataReady.

@getusha did you mean, why isLoadingReportData become false but we can't find concierge report?
isLoadingReportData supposed to be true if not all report data loaded.
The answer might be in my proposal https://github.com/Expensify/App/issues/44465#issuecomment-2345421832

there is a chance that chat not loaded even if isLoadingReportData is false, applying onyx updates, especially report take longer than setting isLoadingReportData to false.

There is a gap between isLoadingReportData become false and allReports being actually populated.
The situation can be described this way:

isLoadingReportData being set to false after getOnyxDataForOpenOrReconnect
Then applyingOnyxUpdate process will asynchronously update data from the 1st request
allReports data might be null or partially added, especially if we have huge number of reports
Then since isLoadingReportData already false onServerDataReady() will be executed, but 3rd step might not completed yet

My alternative 3 has the same pattern with checkRequiredData from ProrityMode
https://github.com/Expensify/App/blob/b027baaf086c4a8f57bec48dd1cbbfb3c317726b/src/libs/actions/PriorityMode.ts#L79-L85

@wildan-m @ugogiordano i am not able to reproduce this, could you please check?
https://streamable.com/ud25n3

@getusha you should trigger opening the desktop app from staging. dev not trigger open to desktop dialog

@wildan-m is there any way to reproduce it from dev so that we can test the solutions?

@getusha we can npm run desktop from dev and while the desktop version running, trigger the deeplinking through staging site, that way we can debug the issue

@getusha can I help with anything to get this issue resolved?

@wildan-m , @getusha This video guides you on how to test in the dev environment

https://github.com/user-attachments/assets/0ba7e383-7fd7-466e-8014-9063c4175b7b

Proposal Updated

Add missing details and branch for alternative 3

Issue is not reproducible on the  version v9.0.49-1
https://github.com/user-attachments/assets/3f3be0c7-5f93-4882-ace9-ae5fefd3fe95

Added this issue to the Migration project, which is a top priority for the company.

Issue not reproducible during KI retests. (First week)

Any updates on if the issue is reproducible? cc @getusha

We also have a Full Story video of a user running into it linked here: https://expensify.slack.com/archives/C07HPDRELLD/p1729192456274989
Let @anmurali and I know if you need more. We've seen it in multiple sessions. I think we should treat this as CRITICAL because it confuses real users.

Hi, I can work on a PR today but the Upwork job results as no longer available, so I can't apply to it.

@ugogiordano the upwork job is necessary for payment, in the case where the job closes before completion or isn't created for an issue, the BZ (in this case me) will manually send a payment after the issue is completed. You can work on the PR without the job being open. Since your proposal has been chosen and you've been assigned, please proceed with the PR :)

@sonialiap thanks for the clarification. I'll submit a PR by today.

Issue not reproducible during KI retests. (Second week)

@mvtglobally the issue is reproducible by following these steps:

Sign in at https://staging.expensify.com/.
Navigate to Support and then select Concierge.
Copy the URL into a new tab and replace the hostname with https://dev.new.expensify.com:8082/.
Verify that only one Concierge chat is displayed.

Video is here: https://github.com/Expensify/App/issues/44465#issuecomment-2416909187
The PR is on its way; I apologize for the delay. I’m currently gathering videos of the reproduction in all environments and will complete it by the end of the day.

I submitted the PR.
I was unable to build the Android app because of the following error:
Execution failed for task ':react-native-app-logs:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 17m 33s.

There have been no updates here for weeks. What's the latest update? This is a high-priority issue for #migrate.

Seems like the PR has some checks failing,  left a message asking to fix them

PR merged

Payment summary:

@getusha $250 via NewDot - please complete the checklist
@ugogiordano $250 - offer sent in upwork

@sonialiap, can I get the offer on the first "Upwork Profile for payment" you can see on my bio? I have attached the VAT ID to it.

@ugogiordano the offer should be sent to Rosaria V., is that correct?

@ugogiordano the offer should be sent to Rosaria V., is that correct?
Yes correct, thank you so much!

@ugogiordano offer sent!
https://www.upwork.com/nx/wm/offer/105173644

@getusha bumping for the checklist :)

BugZero Checklist:

[x] [Contributor] Classify the bug:

Bug classification

Source of bug:

[ ] 1a. Result of the original design (eg. a case wasn't considered)
[x] 1b. Mistake during implementation
[ ] 1c. Backend bug
[ ] 1z. Other:

Where bug was reported:

[ ] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
[x] 2b. Reported on staging (eg. found during regression or PR testing)
[ ] 2d. Reported on a PR
[ ] 2z. Other:

Who reported the bug:

[ ] 3a. Expensify user
[ ] 3b. Expensify employee
[ ] 3c. Contributor
[x] 3d. QA
[ ] 3z. Other:

[x] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:  N/a this was fixed before https://github.com/Expensify/App/issues/17884

[x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/a

[x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

We already have a regression test created for this issue https://github.com/Expensify/App/issues/17884

Thanks!


Dataview Updating - Data not Refreshed?

Description
Workflow

infoj entry of type: dataview and queryCheck: true - initially returns some data.
Dataview is a dependent of another field.
Can see in the Network Tab - the response from the query shows new data.
Dataview is not updated with new data unless you manually refresh the location.

Possible Issues in lib\ui\locations\entries\dataview.mjs  (populate more tomorrow)
Why is the data nullish assigned, this means on the second query to same entry it won't be updated?
entry.data ??= entry.value

Why is the class set to entry.class - this results in undefined often. This should be more descriptive, ie query, key or field.
  // Dataview will be rendered into location view.
    entry.locationViewTarget = mapp.utils.html.node`
      <div class="${`location ${entry.class}`}">`

    entry.target = entry.locationViewTarget

Type of Issue
Please delete options that are not relevant, and select all options that apply.

✅ Bug

Completing as this was the use of the reload flag.


feat: Export TSDoc comments in declaration files

Codecov Report

Merging #219 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #219   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           21        21
  Lines          467       467
  Branches        29        29
=========================================
  Hits           467       467

Flag
Coverage Δ

#unittests
100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Issue parsing pointers in external files

Hi there,
Great work on swagger-parser. I'm having an issue though: bundling pointers inside an externally reffed file seems to include the name of the pointer, where it shouldn't. I'm guessing the pointers are pretty much ignored.
Try parsing https://github.com/OAI/OpenAPI-Specification/tree/master/examples/v2.0/yaml/petstore-separate from the OpenAPI specs (the entry point is spec/swagger.api), and then validating it.
File spec/swagger.apirefers to parameters.yaml#/tagsParam. Bundling will include the parameters.yaml file and even select tagsParam, but it also -- incorrectly -- includes the tagsParamtag itself, rendering the resulting swagger.json invalid.
Let me know if I missed something here! Thanks for taking a look.

Just to add - if the issue can be verified - I would guess this issue belongs more in json-schema-ref-parser than here.

Yeah, that's a bug that has been fixed in the latest version of json-schema-ref-parser, but there are some breaking changes, so Swagger Parser hasn't been updated yet.

Ah, excellent! Thank you for putting in the time.

Swagger Parser v4.0 beta is now available, and includes the fix for this issue.
You can install the beta using npm install swagger-parser@beta.

v4.0 code branch
v4.0 documentation
v4.0 changelog


Add support for email display names

RFC-2822 allows for optional display names in email addresses. These are of the format Some Name <regular-email-address>.
This pull request extends the isEmail function to accept an optional second boolean allowDisplayName argument which, if true, will allow display names when validating an email address. If this argument is missing or not true, email validation will proceed normally.

Coverage increased (+0.01%) to 97.39% when pulling bd35cbce0f08f0bd28e1bda963cd9f85c3c57362 on galniv:master into 8eeddba50562fbac8a457d7e8e84ef55c738da28 on chriso:master.

Can you move this out into a separate validator? It looks like this is what #295 was requesting.

Also it'd be great if it could reuse the email regex rather than copying it and modifying it.

@chriso I modified the code to reuse the email regex. However, since display names are actually a valid part of email addresses rather than a separate concern, they make more sense to me as part of the same isEmail validator; I also think that this satisfies https://github.com/chriso/validator.js/issues/295 as-is.
That being said, if you feel strongly about it being a separate validator, I will move it.

For now I'd prefer to not introduce any breaking changes. I imagine a lot of people use isEmail for login fields and would be surprised that these sorts of emails were allowed through.

This isn't a breaking change... the new isEmail will only allow display names if you pass true as the second argument. If you pass nothing (i.e. as it's been used until now), or false, then it will behave exactly as it has until this point.

Ok, fair enough. Can you change isEmail(str [, allowDisplayName]), to isEmail(str [, options]) and then use the allow_display_name key? This is consistent with other validators (isURL, isFQDN, etc.) and makes it easy to add additional functionality in future.

Done!

Coverage increased (+0.04%) to 97.43% when pulling d20874aa3acde0917f3a95f4115dc8781bde79ad on galniv:master into 8eeddba50562fbac8a457d7e8e84ef55c738da28 on chriso:master.

Coverage increased (+0.04%) to 97.43% when pulling 09ec5946e358ca4edf225809ebfbaf7a71ca4376 on galniv:master into 8eeddba50562fbac8a457d7e8e84ef55c738da28 on chriso:master.

Great, thanks!

Available in 3.29.0.


Local reply mapper - implementation

This is implementation of local reply mapper with ability to change format of response to custom Json. I haven't written any docs yet because I want to ensure you are ok with implementation proposition.
Description: Allows to create custom mapper of response code based on filters. Filter based on response headers might not work because when there is local reply we don't have any response headers. Also added possibility to map response to custom Text or Json format.
Risk Level: Low
Testing: I will add after implementation proposition review.
Docs Changes:
Release Notes:
Fixes #7537
Follow up https://github.com/envoyproxy/envoy/pull/8126

I'm working on docs so I'll write when it's ready : )

@lukidzi can you ping the reviewers on this PR when this is ready for another pass? It's a bit unclear with the current activity whether reviewer feedback is addressed.

I think it is ready for first review. I am trying to fix asan build but maybe you will see something that I missed. @htuch @alyssawilk @mattklein123

any progress？

@lukidzi, friendly ping =)

@lukidzi we need this feature,  are you going to finish this?  or you prefer someone else to take over?

@mattklein123 @htuch can you re-open this PR?

@qiwzhang I want this finished also. If you want to finish it can you just open a new PR if @lukidzi doesn't respond?

ok, sure.  I will wait for a couple days then.

cc @Augustyniak also ^ as you recently asked for this.


[Bug]: Appsmith Logo has gotten smaller

Is there an existing issue for this?

[X] I have searched the existing issues

Description
When I login to my account I can see that Appsmith logo has been resized and it looks too small.
Steps To Reproduce

log in
look at the top left corner for the logo

Public Sample App
No response
Environment
Production
Issue video log
No response
Version
Cloud v1.9.20

Related issue - https://github.com/appsmithorg/appsmith/issues/23184
@berzerkeer @abhvsn could you please take a look?
PS - Here's a slack thread where a conversation wrt this issue happened.
cc: @dilippitchika @somangshu

@dhruvikn I can see the expected size on release, is there anything that I can help you with?

Closing this, thanks @abhvsn the issue was raised because of the current size in production


Lifecycle hooks don't support methods

The docs do use the word function explicitly for before_request and after_request so based on that this probably isn't a bug, but bringing it up for sake of discussion.
import time
from typing import Any

from starlite import Starlite, get

class Timer:
    def __init__(self) -> None:
        self._start = 0.0

    def start(self, _: Any) -> None:
        self._start = time.time()

    def end(self, _: Any) -> None:
        print(f"Took: {time.time() - self._start:.5f}")

timer = Timer()

@get("/", before_request=timer.start, after_response=timer.end)
def hello_world() -> dict[str, Any]:
    """Hi"""
    return {"hello": "world"}

app = Starlite(route_handlers=[hello_world])

Hitting the route returns {"detail":"TypeError(\"Timer.start() missing 1 required positional argument: '_'\")"}. Which is because we explicitly unbind any instance handed to those parameters.
The example could be solved by using a higher order function to wrap the method calls, but the aesthetics of that aren't that great.
You can assign callables to attributes of already existing instances without any binding problems, e.g.:
class A: ...
a = A()
a.z = lambda: None
a.z()  # no worries

It's only when assigning a function to a class body that the binding becomes a problem:
class Z:
   a = lambda: None
Z().a()  # TypeError: Z.<lambda>() takes 0 positional arguments but 1 was given

Even assigning a method to a class var on the controller would work properly without the unbinding:
class A:
    def b(self):
        print(self)

class B:
    c = A().b

# note `self` not rebound to `__main__.B object`
B().c()  # <__main__.A object at 0x7f844e5c6b00>

The simplest change would be to raise an exception on startup if one of the lifecycle hook parameters is a method - at least it would fail fast. However, I think it is a shame we lose the ability to pass methods to these hooks in all cases when the only time it is actually a problem is when the handlers are normal functions assigned on the controller class body.
Maybe we could try and limit the unbinding to inside Controller.__init__(), I haven't tested this but something like:
class Controller:
    ...
    def __init__(self, ...) -> None:
        ...
        if self.after_request and not ismethod(type(self).after_request):
            self.after_request = ensure_unbound(self.after_request)
            ...

Other (more nuclear) options...
We could deprecate before_request, after_request and after_response and add collection parameters that allow more than one handler per hook type, e.g., before_request_handlers = [...] where each handler is called in sequence and in that example, the first handler to return a response would short circuit the chain. This would prevent binding of funcs to the class instances as they'd be wrapped in the collection type.
Another option might be to introduce a ControllerConfig object.. so instead of assigning to classvars directly on Controller subclasses, it would look something like this:
class AppController(Controller):
    config = ControllerConfig(path="/", before_request=...)

i agree that we should support methods, there is really no reason not to do this. You wanna do this?

Yep I'll do it in #280


docs: Modify options type in the Application class

Checklist

[x] I have ensured my pull request is not behind the main or master branch of the original repository.
[x] I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
[x] I have written a commit message that passes commitlint linting.
[x] I have ensured that my code changes pass linting tests.
[x] I have ensured that my code changes pass unit tests.
[x] I have described my pull request and the reasons for code changes along with context if necessary.

Added the types for compose and asyncLocalStorage.


 Ignore list could look like:
ignore: [
        `/\.comment\-form\ input\[type\=email\]`,
}

I tried a lot of options unsuccesfully. Thanks!

Try this:
ignore: [
        /\.comment-form input\[type=email\]/,
]

If this works for you, please close this issue. Thanks!

yes, thanks!


Remove unused locals

Cleaned up unused variables with _name so that more strict TypeScript compiler option can apply. This causes problems in a project using node module resolution
To accomplish above, I have also updated dependencies.
Thanks!

@ascoders  Will appreciate it if you could release a new version with this PR. Thanks!

deploy 2.0.5


Implement DFS style type resolution

Description:
This test case is disabled by PR:https://github.com/ballerina-platform/ballerina-lang/pull/32601
This issue is to track and enable the test case.
Test case is modelled around HTTP module which showed intermittent fails.
To Do

[ ] make sure this works https://github.com/ballerina-platform/ballerina-lang/issues/32044
[ ] revert the PR https://github.com/ballerina-platform/ballerina-lang/pull/32601

Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

This is not yet resolved.
Need to revert test diable on this PR after fix
https://github.com/ballerina-platform/ballerina-lang/pull/33328


Tried to add multiple arguments to options

Closes #15
So far the following greet.ts appears to work
import * as Line from "./mod.ts";

class GreetMainCommand extends Line.MainCommand {
  public signature = "greet [greeting] [name]"

  public arguments = {
    "greeting": "The greeting before the name.",
    "name": "The name of the thing to greet.",
  };

  public options = {
    "--some-option [arg_1] [arg_2]": "description",
  };

  public handle(): void {
    const someOption = this.option("--some-option");

    if (someOption) {
      console.log(`someOption: ${someOption}`);
    }

    const greeting = this.argument("greeting");
    const name = this.argument("name");

    console.log(`${greeting}, ${name}!`);
  }
}

const cli = new Line.CLI({
  name: "Greeter CLI",
  description: "A CLI that outputs greets",
  version: "v1.0.0",
  command: GreetMainCommand,
});

cli.run();

> deno run greet.ts --some-option 3 4 hello world
[debug output]
someOption: 3,4
hello, world

Changes not final and tests need to be written. It might be better to use regexes here.

Sorry @dXu23, didn't see that you made this ready for review. however im kind of confused because the code has commented out console log statements. still working on this?

Sorry about that. I kind of forgot to remove the console.log statements.


Is it cool if I turn this into a Twitter bot?

Hello,
I was browsing Twitter and came across your website --> this project. This is super duper cool.
I'm writing a tutorial on Twitter webhook and building a Twitter bot as an example. Is it cool if I turn this API into a Twitter bot?

Please do! That would be very cool.
I guess with the only caveat that this is running on the free Zeit tier, so there's a limit to the number of requests but that's not likely something that we'll encounter.

Hey @duffn, thanks for the response. After thinking more about this, I'm not entirely sure how the Twitter bot would work. What do you think?

Upon mention, bot will reply with Hey @personwhomentionme, you are great!.
In a reply to a tweet, a user can mention the bot. It will reply with Hey @ogtweet, you are great!.

I'm not sure what I'm saying makes sense. The 1st use case seems pretty odd, since you're asking the bot to praise yourself. The 2nd use case is, imo, better, but may seem vain since "why can't you just cheer in the first place yourself instead of asking for a bot to do so".

Yeah, you may be over thinking it. 😉
I think either use case is fine. If somebody wants to have a bot give them a pat on the back, so be it! It's really just meant to be a fun thing.


Ignore deprecation warnings in 3rd party libraries

Codecov Report

Merging #168 (ca9f1f7) into main (22e3fea) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #168   +/-   ##
=======================================
  Coverage   91.96%   91.96%
=======================================
  Files          17       17
  Lines        1854     1854
=======================================
  Hits         1705     1705
  Misses        149      149

Continue to review full report at Codecov.

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


remove parent ns from model proxy serializer

fixes issue #137

@psongers Hi
That is the intended behavior that a sub-model inherits the namespace from its parent.
But there is indeed a bug: empty entity namespace and empty model namespace are ignored since bool('') is False
the fix should be like this:
if ctx.entity_ns is not None:
    ns = ctx.entity_ns
elif model_cls.__xml_ns__ is not None:
    ns =  model_cls.__xml_ns__
else:
    ctx.parent_ns

@psongers Hi
That is the intended behavior that a sub-model inherits the namespace from its parent. But there is indeed a bug: empty entity namespace and empty model namespace are ignored since bool('') is False
the fix should be like this:
if ctx.entity_ns is not None:
    ns = ctx.entity_ns
elif model_cls.__xml_ns__ is not None:
    ns =  model_cls.__xml_ns__
else:
    ctx.parent_ns

gotchya. that makes sense. I'll update this PR

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9e2b126) 91.65% compared to head (2137120) 91.63%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #138      +/-   ##
==========================================
- Coverage   91.65%   91.63%   -0.02%
==========================================
  Files          25       25
  Lines        1366     1375       +9
==========================================
+ Hits         1252     1260       +8
- Misses        114      115       +1

Flag
Coverage Δ

unittests
91.63% <95.45%> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

pydantic_xml/serializers/factories/mapping.py
88.75% <100.00%> (ø)

pydantic_xml/serializers/factories/model.py
95.16% <100.00%> (ø)

pydantic_xml/serializers/factories/raw.py
80.00% <100.00%> (ø)

pydantic_xml/serializers/factories/wrapper.py
95.12% <100.00%> (ø)

pydantic_xml/serializers/serializer.py
96.17% <100.00%> (+0.04%)
:arrow_up:

pydantic_xml/utils.py
94.87% <100.00%> (+0.75%)
:arrow_up:

pydantic_xml/serializers/factories/primitive.py
94.73% <80.00%> (-0.97%)
:arrow_down:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Adds support for an SBOM that will scan node_modules

Resolves #383
Checklist

[x] I have viewed, signed, and submitted the Contributor License Agreement.
[x] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[x] I have added an integration test, if necessary.
[x] I have reviewed the styleguide for guidance on my code quality.
[x] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Playing around with this, I see that for the angular_msbuild test app, the SBOM generation process takes a long time. On my machine, it took XXX. This makes me think it'd serve us well to add an environment variable that allows users to turn off this SBOM output. It should follow the disable SBOM RFC.

@fg-j first run on my end took ~11 seconds to generate the SBOM.

Still think the SBOM-disable feature is worth considering, but it seems less critical now!
Agreed, though!

@fg-j I think build-time makes more sense to me, considering they don't exist on the final application image. I actually think it would be more confusing to have it attached to the launch metadata, could you explain why that seems more intuitive to you?

@sophiewigmore good point. Attaching the node modules SBOM to the build metadata seems consistent with the approach in the web servers buildpack and similar. That sounds fine to me.

@fg-j will review tomorrow!


Update readme

Resolves #12

Theres nothing new but badges for now :)
I'd be thankful for suggestions
Regarding testcov badge:
It looks like testcov badges dont work for rust at the moment.

As for the coverage. We can try to run this https://blog.rust-lang.org/inside-rust/2020/11/12/source-based-code-coverage.html but I'd do separate issue for that. (We have codecov and tried to do it b4 but it didn't work well yet)


feat(tier4_autoware_api_launch): add rosbridge

Signed-off-by: Shumpei Wakabayashi<EMAIL_ADDRESS>Description
web_controller needs rosbridge server.
Previously, autoware universe does not launch rosbridge because of https://github.com/autowarefoundation/autoware.universe/pull/658#issuecomment-1096445703.
So I add launching rosbridge following original  tier4/autoware_launch.
Related discussion: https://github.com/autowarefoundation/autoware/discussions/208
Note that #318 removes rosbridge for fear of conflicting rosbridge in #175 as they mentioned.
However  #175 is under tier4 repos, but not under autowarefoundation.
Under tier4 repos, rosbridge is launched in autoware_api_launch, which cause conflict if other code lanches rosbridge.
On the other hand, under autoware foundation repos, neither tier4_autoware_api_launch (same as autoware_api_launch) nor web_controller does not launch rosbridge for fear of duplication.
See https://github.com/autowarefoundation/autoware.universe/pull/658#issuecomment-1096445703 and https://github.com/autowarefoundation/autoware.universe/pull/318.
Thus we can add launching rosbridge in autoware_api or web_controller under autoware foundation repos.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@shmpwk, in this case, I would propose to launch rosbridge in web_controller.launch.xml as the rosbridge is used by web_controller, launch it in autoware_api makes it confusing.

What's more, as mentioned in https://github.com/ros2/launch/issues/568 ,respawn fix has already been released into the launch packages in version 0.22.0.

FYI: https://github.com/ros2/launch/pull/569 was released in 0.22.0 but not in galactic.

@kosuke55 @Sharrrrk
Thank you for the infomation.
As for rospawn, leave <arg name="respawn" value="$(var respawn)"/> as it is.
As for in which pkg should we launch rosbridge, I asked here

@Sharrrrk
Throughout discussion here,
we decided to launch rosbridge in tier4_autoware_api_launch.
Also I added docs in web_controller about rosbridge.
@yabuta
Can you approve this PR?

@Sharrrrk Throughout discussion here, we decided to launch rosbridge in tier4_autoware_api_launch. Also I added docs in web_controller about rosbridge.

Thank you for the detailed explanation, may be we should consider add it directly in autoware.launch.  The main reason is that web_controller is now launched by autoware.launch in core and it's somehow a compulsory part to use autoware; while for API_launch, it's still in universe and under discussion. I think in this way, it's easier for current users to understand and also doesn't block the integration of API.

@Sharrrrk
Yes, I agree with you in that it is more straightforward to launch rosbridge in autoware.launch.xml.
My concern is rosbridge is for backend support and if it is written in autoware.launch (also in planning_simulator,launch, logging_simulator.launch), it reduces readability. A user don't have to know what is rosbridge.
If rosbridge is written in autoware.launch, do you think rosbridge should stand alone?

If rosbridge is written in autoware.launch, do you think rosbridge should be launched independently not in the module?

Yes, as far as rosbridge is a common requried component, I think it's better to be added to autoware.launch, in the tools section. Maybe with some comment like this to explain why:
<!-- This component allows webpages to talk with ROS, which is required by Web Controller and External API component-->

That seems to be a good way if rosbridge is launched with autoware_launch.
Still, I think it would be easier to use api_launch to launch rosbridge.
How about the concept that api_launch is an interface including rosbridge and web_controller is its use case?

@Sharrrrk That seems to be a good way if rosbridge is launched with autoware_launch.
Still, I think it would be easier to use api_launch to launch rosbridge.
How about the concept that api_launch is an interface including rosbridge and web_controller is its use case?

@Sharrrrk
Looking at tier4 repos (not autowarefoundation repos), currently we put rosbridge in autoware_api.launch.
https://github.com/tier4/autoware_launch/blob/awf-latest/autoware_api_launch/launch/autoware_api.launch.xml
So my suggestion is

following it as the current PR is
if the PR have problem, make another PR.


How to use keypath?

I have a question concerning keypath, I see how you created a param-compiled, but how do I pass it a list of params? The example shows (param-compiled :a :b :c), so how would I pass it a list (:a :b :c)? I have a "path" (i.e."/Shops/shop0001/cust0001") that I can split into (Shops shop0001 cust0001), but how do I pass it to select/transform? I have tried map and apply but everything gives me errors back.

I have tried:
Hard-coded example of using keypath:
(println (s/select [(s/keypath "Shops")(s/keypath "shop0001")(s/keypath "cust0001")] results))

I could write a function with an arity of  0, 1, 2, 3
I can create a reusable function:
(def param-compiled (s/comp-paths s/keypath s/keypath s/keypath s/keypath s/keypath))
(defn get-param-compiled [arg results]
  (let [args (split-path arg)
        arg0 (nth args 0)
        arg1 (nth args 1)
        arg2 (nth args 2)
        arg3 (nth args 3)
        arg4 (nth args 4)]
    (s/select [(param-compiled arg0 arg1 arg2 arg3 arg4)] results)
    ))

However, it seems like I have to hard-code everything for a query.  Is there a better way?
I guess I could wrap this in a macro, however I am getting to the edge of my Clojure skills here.

I'm not clear on what you were trying originally that wasn't working.
The list of strings starts out as a path:
"/Shops/shop0001/cust0001/veh0001/job0001"

I have helper functions to "split" the path into a list or vector of strings:
(println "str/split:" (str/split "/Shops/shop0001/cust0001/veh0001/job0001" #"/"))
(println "map:" (map s/keypath (split-path "/Shops/shop0001/cust0001/veh0001/job0001")))

The result of these is:
split-path: (shop0001 cust0001 veh0001 job0001)
str/split: [ Shops shop0001 cust0001 veh0001 job0001]

The map looks like:
results: {Shops {shop0001 {cust0001 {:path /Shops/shop0001/cust0001, :last-name Stang, :first-name Mark, veh0001 {:path /Shops/shop0001/cust0001/veh0001, job0002 {:path /Shops/shop0001/cust0001/veh0001/job0002, :job-id job0002}, :make Ford, job0001 {:path /Shops/shop0001/cust0001/veh0001/job0001, :job-id job0001}}, veh0002 {:path /Shops/shop0001/cust0001/veh0002, :make VW}}}}}

So, what I want to be able to do is to do something like:
(println "select using map:" (s/select [(map s/keypath (split-path "/Shops/shop0001/cust0001/veh0001/job0001"))] results))

The solutions I have found are:
(println "five segments:" (s/select [(s/keypath "Shops")(s/keypath "shop0001")(s/keypath "cust0001")(s/keypath "veh0001")(s/keypath "job0001")] results))

five segments: [{:path /Shops/shop0001/cust0001/veh0001/job0001, :job-id job0001}]

and
(def param-compiled (s/comp-paths s/keypath s/keypath s/keypath s/keypath s/keypath))
(defn get-param-compiled [arg results]
  (let [args (split-path arg)
        arg0 (nth args 0)
        arg1 (nth args 1)
        arg2 (nth args 2)
        arg3 (nth args 3)
        arg4 (nth args 4)]
    (s/select [(param-compiled arg0 arg1 arg2 arg3 arg4)] results)
    ))
(println "param-compiled:" (get-param-compiled "/Shops/shop0001/cust0001/veh0001/job0001" results))

param-compiled: [{:path /Shops/shop0001/cust0001/veh0001/job0001, :job-id job0001}]

This combination def param-compiled and the function get-param-compiled example shows how I created a function that takes five path segments and does a select.  I could continue that paradigm and create a def/function combination for each possible combination of arguments(i.e. 1 arg, two args, three, args, four args, five args, ...).  Even going as far as to pass in the function (i.e. s/select or s/transform).
So, I guess my question is how to pass in a list of strings/parameters to a select or a transform that represents the path to be acted on?
It seems that keypath isn't composable.  So, is there a better way?
The actual code for this is in https://github.com/mstang/pathdatabase.git, starting at line 108 if that helps.

Wow, I will give that a shot.
Thanks!
On Fri, Oct 30, 2015 at 11:04 PM, Shaun Hannah<EMAIL_ADDRESS>wrote:

@mstang https://github.com/mstang - I think you want something like
this:
(defn path-selector [path]
(s/comp-paths (map s/keypath (.split path "/"))))
Given:
(def db
{"Shops" {"shop-1" {"cust-1" "PATH: Shops/shop-1/cust-1"
"cust-2" "PATH: Shops/shop-1/cust-2"}
"shop-2" {"cust-1" "PATH: Shops/shop-2/cust-1"
"cust-2" "PATH: Shops/shop-2/cust-2"}}})
Usage: Simple select
(select-one (path-selector "Shops/shop-2/cust-2") db);; =>;; "PATH: Shops/shop-2/cust-2"
Basic setval
(clojure.pprint/pprint
(s/setval [(path-selector "Shops/shop-2/cust-2")]
"CHANGED PATH: Shops/shop-2/cust-2" db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
basic transform
(clojure.pprint/pprint
(s/transform [(path-selector "Shops/shop-2/cust-2")
(s/putval "CHANGED ")]
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
compiled-transform Note the s/comp-paths in place of vector
(clojure.pprint/pprint
(s/compiled-transform (s/comp-paths (path-selector "Shops/shop-2/cust-2")
(s/putval "CHANGED "))
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
multi-path transform
(clojure.pprint/pprint
(s/transform [(path-selector "Shops/shop-2")
(multi-path (path-selector "cust-1")
(path-selector "cust-2"))
(putval "CHANGED ")]
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "CHANGED PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
—
Reply to this email directly or view it on GitHub
https://github.com/nathanmarz/specter/issues/33#issuecomment-152696384.

Are you running this in a Clojure environment?
I tried the "Simple select" inside of a ClojureScript environment and I get:
Uncaught Error: Protocol implementation cannot be found for object.
Extending Specter protocols should not be done inline in a deftype
definition
because that prevents Specter from finding the protocol
implementations for
optimized performance. Instead, you should extend the protocols via
an
explicit extend-protocol call.
(#com.rpl.specter.impl.CompiledPath{:transform-fns
#com.rpl.specter.impl.TransformFunctions{:executors
#object[com.rpl.specter.impl.ExecutorFunctions], :selector #object[Function
"function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return next_fn.call(null,cljs.core.get.call(null,structure,key));
}"], :transformer #object[Function "function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return
cljs.core.assoc.call(null,structure,key,next_fn.call(null,cljs.core.get.call(null,structure,key)));
}"]}, :params #js ["Shops"], :params-idx 0}
#com.rpl.specter.impl.CompiledPath{:transform-fns
#com.rpl.specter.impl.TransformFunctions{:executors
#object[com.rpl.specter.impl.ExecutorFunctions], :selector #object[Function
"function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return next_fn.call(null,cljs.core.get.call(null,structure,key));
}"], :transformer #object[Function "function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return
cljs.core.assoc.call(null,structure,key,next_fn.call(null,cljs.core.get.call(null,structure,key)));
}"]}, :params #js ["shop0001"], :params-idx 0}
#com.rpl.specter.impl.CompiledPath{:transform-fns
#com.rpl.specter.impl.TransformFunctions{:executors
#object[com.rpl.specter.impl.ExecutorFunctions], :selector #object[Function
"function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return next_fn.call(null,cljs.core.get.call(null,structure,key));
}"], :transformer #object[Function "function
(params21552,params_idx21553,vals__21554__auto__,structure,next_fn__21555__auto__){
var next_fn = (function (structure__21556__auto__){
return next_fn__21555__auto__.call(null,params21552,(params_idx21553 +
1),vals__21554__auto__,structure__21556__auto__);
});
var key = (params21552[(params_idx21553 + (0))]);
return
cljs.core.assoc.call(null,structure,key,next_fn.call(null,cljs.core.get.call(null,structure,key)));
}"]}, :params #js ["cust0001"], :params-idx 0})
Thanks!
Mark
On Sat, Oct 31, 2015 at 10:28 AM, Mark Stang<EMAIL_ADDRESS>wrote:

Wow, I will give that a shot.
Thanks!
On Fri, Oct 30, 2015 at 11:04 PM, Shaun Hannah<EMAIL_ADDRESS>wrote:

@mstang https://github.com/mstang - I think you want something like
this:
(defn path-selector [path]
(s/comp-paths (map s/keypath (.split path "/"))))
Given:
(def db
{"Shops" {"shop-1" {"cust-1" "PATH: Shops/shop-1/cust-1"
"cust-2" "PATH: Shops/shop-1/cust-2"}
"shop-2" {"cust-1" "PATH: Shops/shop-2/cust-1"
"cust-2" "PATH: Shops/shop-2/cust-2"}}})
Usage: Simple select
(select-one (path-selector "Shops/shop-2/cust-2") db);; =>;; "PATH: Shops/shop-2/cust-2"
Basic setval
(clojure.pprint/pprint
(s/setval [(path-selector "Shops/shop-2/cust-2")]
"CHANGED PATH: Shops/shop-2/cust-2" db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
basic transform
(clojure.pprint/pprint
(s/transform [(path-selector "Shops/shop-2/cust-2")
(s/putval "CHANGED ")]
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
compiled-transform Note the s/comp-paths in place of vector
(clojure.pprint/pprint
(s/compiled-transform (s/comp-paths (path-selector "Shops/shop-2/cust-2")
(s/putval "CHANGED "))
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
multi-path transform
(clojure.pprint/pprint
(s/transform [(path-selector "Shops/shop-2")
(multi-path (path-selector "cust-1")
(path-selector "cust-2"))
(putval "CHANGED ")]
str
db));; =>;; {"Shops";;  {"shop-1";;   {"cust-1" "PATH: Shops/shop-1/cust-1",;;    "cust-2" "PATH: Shops/shop-1/cust-2"},;;   "shop-2";;   {"cust-1" "CHANGED PATH: Shops/shop-2/cust-1",;;    "cust-2" "CHANGED PATH: Shops/shop-2/cust-2"}}}
—
Reply to this email directly or view it on GitHub
https://github.com/nathanmarz/specter/issues/33#issuecomment-152696384.

@mstang Yes, I was using clojure in my examples, (I was assuming the functionality would be the same in both). I pulled down your repo and got similar errors. It appears that this will only work in cljs if you use keyword keys. This modified function seams to work, provided your data structure uses keyword keys.
(defn path-selector [path]
  (let [segments (str/split path #"/")
        ;; On paths that begin with a slash, we will get an empty
        ;; string for the first segment; therefore we must remove it
        segments (filter (partial (complement empty?)) segments)
        segments (map keyword segments)]
    (into [] segments)))

Thanks for experimenting with that.  I don't want to change everything to use keywords unless that is my only choice.  I am waiting to see what Nathan says before I make my decision.

The code from @hooptie45 didn't work in CLJS because of a small bug in Specter where comp-paths wouldn't work on lazy seqs in CLJS. That bug will be fixed in 0.8.1. For now, with 0.8.0, you can make the code work in both environments by changing path-selector to either of these:
(defn path-selector [path]
  (apply s/comp-paths (map s/keypath (.split path "/"))))

(defn path-selector [path]
  (s/comp-paths (mapv s/keypath (.split path "/"))))

Great!  I will give it a try in my environment!
Thanks!
On Tue, Nov 3, 2015 at 8:56 AM, Nathan Marz<EMAIL_ADDRESS>wrote:

The code from @hooptie45 https://github.com/hooptie45 didn't work in
CLJS because of a small bug in Specter where comp-paths wouldn't work on
lazy seqs in CLJS. That bug will be fixed in 0.8.1. For now, with 0.8.0,
you can make the code work in both environments by changing path-selector
to either of these:
(defn path-selector [path]
(apply s/comp-paths (map s/keypath (.split path "/"))))
(defn path-selector [path]
(s/comp-paths (mapv s/keypath (.split path "/"))))
—
Reply to this email directly or view it on GitHub
https://github.com/nathanmarz/specter/issues/33#issuecomment-153396972.

Thanks! Very informative.

That works great!
Thanks!
On Tue, Nov 3, 2015 at 11:14 AM, Shaun Hannah<EMAIL_ADDRESS>wrote:

Thanks! Very informative.
—
Reply to this email directly or view it on GitHub
https://github.com/nathanmarz/specter/issues/33#issuecomment-153441381.

@hooptie45 Thanks for all your examples, they all work now with Nathan's work-around.


[bug] Compile on Linux (Debian). Target : Windows

Describe the bug
I am trying to build a Nuxt application, from Debian, and try to make an exe for Windows.
Reproduction
I am following this tutorial in official documentation :
https://tauri.app/v1/guides/building/cross-platform#experimental-build-windows-apps-on-linux-and-macos
Expected behavior
Make an executable for Windows.
Full tauri info output
[✔] Environment
    - OS: Debian 12 X64
    ✔ webkit2gtk-4.0: 2.44.2
    ✔ rsvg2: 2.54.7
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 18.20.3
    - pnpm: 9.1.4
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 1.6.8
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../.output/public
    - devPath: http://localhost:3000/
    - framework: Vue.js (Nuxt)
    - bundler: Webpack

Stack trace
Compiling webview2-com-sys v0.19.0
   Compiling tao v0.16.9
   Compiling app v0.1.0 (/media/emilie/7769912a-08ae-4a9e-b298-0104c2821d2a/emilie/Devel/my-project/src-tauri)
warning<EMAIL_ADDRESS>clang: warning: unknown argument ignored in clang-cl: '-xc' [-Wunknown-argument]
   Compiling webview2-com v0.19.1
   Compiling tauri-runtime v0.14.3
   Compiling wry v0.24.10
   Compiling tauri-runtime-wry v0.14.8
   Compiling tauri v1.6.8
    Finished `release` profile [optimized] target(s) in 1m 22s
        Warn Cross-platform compilation is experimental and does not support all features. Please use a matching host system for full compatibility.
        Warn ignoring msi
        Info Verifying NSIS package
 Downloading https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.3.0/nsis_tauri_utils.dll
        Info validating hash
       Error failed to bundle project: `No such file or directory (os error 2)`

Additional context
I tried this command  clang -xc hello.c on a hello world code :
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

I got no error, no output.
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

I also could create a .deb file for the same project and it works.

I tried this command clang -xc hello.c on a hello world code :

The error is happening after compilation when it tries to create the installer from your app binary. Can you share your tauri.conf.json file? Or at least your productName for now.

I am also having this issue with my SvelteKit application, trying to build for windows on Ubuntu:
tauri info:
[Γ£ö] Environment
    - OS: Ubuntu 22.4.0 X64
    Γ£ö webkit2gtk-4.1: 2.44.2
    Γ£ö rsvg2: 2.52.5
    Γ£ö rustc: 1.78.0 (9b00956e5 2024-04-29)
    Γ£ö cargo: 1.78.0 (54d8815d0 2024-03-26)
    Γ£ö rustup: 1.27.1 (54dd3d00f 2024-04-24)
    Γ£ö Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.14.0
    - yarn: 1.22.19
    - npm: 10.7.0
    - bun: 1.0.23

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.0
    - tao [RUST]: 0.28.0
    - tauri-cli [RUST]: 2.0.0-beta.20
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:5173/
    - framework: Svelte
    - bundler: Vite

tauri.conf.json:
{
        "build": {
                "beforeBuildCommand": "bun run build",
                "beforeDevCommand": "bun run dev",
                "frontendDist": "../build",
                "devUrl": "http://localhost:5173"
        },
        "bundle": {
                "active": true,
                "category": "DeveloperTool",
                "copyright": "",
                "targets": "all",
                "externalBin": [],
                "icon": [
                        "icons/32x32.png",
                        "icons/128x128.png",
<EMAIL_ADDRESS>                        "icons/icon.icns",
                        "icons/icon.ico"
                ],
                "windows": {
                        "certificateThumbprint": null,
                        "digestAlgorithm": "sha256",
                        "timestampUrl": ""
                },
                "longDescription": "",
                "macOS": {
                        "entitlements": null,
                        "exceptionDomain": "",
                        "frameworks": [],
                        "providerShortName": null,
                        "signingIdentity": null
                },
                "resources": [],
                "shortDescription": "",
                "linux": {
                        "deb": {
                                "depends": []
                        }
                }
        },
        "productName": "Game Chronicle",
        "version": "0.8.0",
        "identifier": "com.gamechronicle.www",
        "plugins": {
                "updater": {
                        "endpoints": ["https://github.com/ItsCentric/game-chronicle/releases"],
                        "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEM3OTUyQjJEMjA5Q0VFMzAKUldRdzdwd2dMU3VWeCswV21RQ1Vkd256TzhCN0l4STJ1M0d3Y1YwYzVYYnR1NVFaekxmS1RocGsK"
                }
        },
        "app": {
                "windows": [
                        {
                                "height": 600,
                                "resizable": true,
                                "title": "Game Chronicle",
                                "width": 800,
                                "minHeight": 600,
                                "minWidth": 800,
                                "label": "main"
                        },
                        {
                                "title": "Game Chronicle Updater",
                                "label": "updater",
                                "url": "/updater",
                                "height": 400,
                                "width": 600,
                                "resizable": false,
                                "decorations": false,
                                "hiddenTitle": true,
                                "center": true,
                                "visible": false
                        }
                ],
                "security": {
                        "csp": null
                }
        }
}

Hmm, i downloaded your repo and can compile it fine 🤔 Can you rerun it with the -vvv flag? Maybe it tells us a bit more.

Strange, shortly after running the tauri info command it somehow fixed it even though I didn't change anything

Tnaks @FabianLars for your quick reply. Here is my tauri.conf.json :
{
  "build": {
    "beforeBuildCommand": "pnpm run generate",
    "beforeDevCommand": "pnpm run dev",
    "devPath": "http://localhost:3000",
    "distDir": "../.output/public"
  },
  "package": {
    "productName": "MyProject-XR",
    "version": "0.1.0"
  },
  "tauri": {
    "allowlist": {
      "all": false
    },
    "bundle": {
      "active": true,
      "category": "DeveloperTool",
      "copyright": "",
      "deb": {
        "depends": []
      },
      "externalBin": [],
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
<EMAIL_ADDRESS>        "icons/icon.icns",
        "icons/icon.ico"
      ],
      "identifier": "com.MyProject",
      "longDescription": "",
      "macOS": {
        "entitlements": null,
        "exceptionDomain": "",
        "frameworks": [],
        "providerShortName": null,
        "signingIdentity": null
      },
      "resources": [],
      "shortDescription": "",
      "targets": "all",
      "windows": {
        "certificateThumbprint": null,
        "digestAlgorithm": "sha256",
        "timestampUrl": ""
      }
    },
    "security": {
      "csp": null
    },
    "updater": {
      "active": false
    },
    "windows": [
      {
        "fullscreen": false,
        "height": 600,
        "resizable": true,
        "title": "MyProject-XR Virtual",
        "width": 800
      }
    ]
  }
}

@FabianLars don't you think it is because of this warning ?
<EMAIL_ADDRESS>clang: warning: unknown argument ignored in clang-cl: '-xc'

No, this warning comes from compiling the rust part but the error where it fails is from the nsis installer bundler which happens way after. Also, this warning is "normal" (as in everyone should start seeing it now).
Can you remove the productName and test again? The productName caused issues in cross compiling before so maybe i missed something...

@FabianLars I deleted the key productName in tauri.conf.json. I got the same issue.

Whow ! But I have an .exe ! I will test it.

IT WORKS !

Well, the exe should have been there the whole time (if you mean the one in target/release/ not in bundle/nsis/).
That's the rust app the cl warning came from. It can be enough for usecase but for many it isn't as it doesn't support all of Tauris features and won't make sure the webview is installed (not a problem on win11).

I'll see if I can reproduce the error on my end today

Ah, i see. The No such file error was already fixed on the 1.x branch and will be part of the next release.


Latest foreman depends on newer term-ansicolor than is specified

Because of https://github.com/ddollar/foreman/pull/114, I got this when starting foreman 0.36.0:
/Users/nbudin/.rvm/gems/ruby-1.9.3-p0/gems/foreman-0.36.0/lib/foreman/engine.rb:21:in `<class:Engine>': undefined local variable or method `intense_cyan' for Foreman::Engine:Class (NameError)
	from /Users/nbudin/.rvm/gems/ruby-1.9.3-p0/gems/foreman-0.36.0/lib/foreman/engine.rb:12:in `<top (required)>'
	from /Users/nbudin/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /Users/nbudin/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /Users/nbudin/.rvm/gems/ruby-1.9.3-p0/gems/foreman-0.36.0/lib/foreman/cli.rb:2:in `<top (required)>'
	from /Users/nbudin/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /Users/nbudin/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /Users/nbudin/.rvm/gems/ruby-1.9.3-p0/gems/foreman-0.36.0/bin/foreman:5:in `<top (required)>'
	from /usr/local/bin/foreman:19:in `load'
	from /usr/local/bin/foreman:19:in `<main>'

I think intense_cyan is from a newer version of term-ansicolor than I had installed.  Updating to 1.0.7 fixed it.

This is fixed in later versions of foreman. Thanks for the report!


[AutoPR] web/resource-manager

Created to accumulate context: web/resource-manager

Codecov Report

Merging #2065 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #2065   +/-   ##
=======================================
  Coverage   53.06%   53.06%
=======================================
  Files        4774     4774
  Lines      119483   119483
=======================================
  Hits        63406    63406
  Misses      56077    56077

Impacted Files
Coverage Δ

azure-mgmt-web/azure/mgmt/web/version.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

@AutorestCI rebase

Rebase done and pushed to the branch

(message created by the CI based on PR content)

@AutorestCI rebase

Rebase done and pushed to the branch

@AutorestCI rebase

Rebase done and pushed to the branch

@AutorestCI rebuild https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md

Working on generating https://github.com/azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/readme.md for you!!!

Build SDK finished and cleaned

@lmazuel Is it possible to use --tag=package-2018-02 when regenerating? I think it is using the old API version (package-2016-09) since that is still the default. Alternatively I could update the default version in the readme file.

@Nking92 SDK teams are shipping the default, let the service teams decide when a tag is ready for release. It would create inconsistent SDK features across language if we don't.
If you feel that 2018-02 is ready for public release, yes the correct way to do it is definitely change the default.
Thanks,

All right, in that case we'll update the default version soon. ETA is end of this week.
Thanks!


⚠ Bofrost.lu has degraded performance

In 1066dbb, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2307 ms

Resolved: Bofrost.lu performance has improved in 84acbfb after 23 minutes.


ver 8.4.0 issue

HI, I am installing Cordova-plugin-firebasex which pulls this (and other) pods.  But I am getting the following error - its similar to another issue already closed, but it looks slightly different.
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
  In Podfile:
    FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `8.4.0`)

Specs satisfying the `FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `8.4.0`)` dependency were found, but they required a higher minimum deployment target.

Then when I try to install it directly, I get the following:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.4.0'

zsh: no such file or directory: https://github.com/invertase/firestore-ios-sdk-frameworks.git,

How can I resolve this?

Hi there!
This error message:

Specs satisfying the FirebaseFirestore (from https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag 8.4.0)` dependency were found, but they required a higher minimum deployment target.

...means exactly what it says. You need to have your Podfile specify a minimum iOS version at least as high as these frameworks in order to use them.
We require these minimum targets:
https://github.com/invertase/firestore-ios-sdk-frameworks/blob/5e2eaf436782e60e49448e2d852f2f171181d2a9/FirebaseFirestore.podspec#L23-L25
For the second error message, I can't say, sorry

@mikehardy - thanks.  I didn't realize it was referring to the iOS version.  I kept thinking it was related an SDK minimum target.  Thanks for explaining.


Optionalize more kernel features

Motivation for this change
Make it possible to disable some kernel features which are not required for NixOS.
Hopefully by having smaller commits it is more clear that these features can be disabled safely (compare with #18058). I have been running this configuration without any issues.
If this is accepted, expect more in the same vein.
Things done

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

cc @spacekitteh, who is likely interested in this

Your message doesn't address the concerns people raised on the original. Putting question marks doesn't make it easier for a user to disable certain features, right?

Currently, we don't have a structured kernel config so extraConfig must be used to disable features. However, when I add SOUND n for example to extraConfig, it will error out at build time, because the config options without questions marks (e.g. SND_DYNAMIC_MINORS) unconditionally select SOUND. Adding question marks turns them into recommendations, so that if SOUND is enabled they will also be set, but preventing an error if the user tries to disable SOUND.
I've scoped this PR to features which are clearly not required to run NixOS, so making them recommendations instead of required lets me disable them in my kernel, making it more customizable. A structured config would be better, but this is still useful in the short term.

Oh, I see. I'd personally rather someone keep pushing https://github.com/NixOS/nixpkgs/pull/12158 than do it this way, but I'm obviously biased. I've had very little time for Nix stuff recently, but putting effort into that space feels more useful long-term than adding question marks (not to demean your particular question marks, but text munging is always going to be painful)

I definitely want to see #12158 as well, but it doesn't seem like it's going to be in a mergeable place soon, and I'd rather not let the perfect be the enemy of the good here.
Text munging is never fun, but it's working today.

Sure, I agree with that in principle, but I'll let others who actually deal with the kernel expression weigh in on whether this is a good maintainability trade-off. Maybe one day I'll finish that PR 😄

If we're going to add ? to (nearly) every kernel option, we may as well either a) disable the check that options are used, and remove all the ?; or b) add an option to disable that check for people who want to override the default config.

For a), I think it is still a good idea to make it impossible to disable any options that are required for NixOS (there's way too many kernel options for me at least to know what they all do or if they're required). It does seem like many options are recommendations instead of requirements though, so maybe default to being optional, and have something to mark (maybe the suffix !) required options (which are the only ones checked)?
I don't know which options are actually required though, so I couldn't implement that.
For b), I think it's already possible to use  the configfile option with buildLinux directly if you want full control of the generated config, so I don't think another option to disable checks is useful.
Alternately I saw @cstrahan assigned himself to #12158, so maybe that will happen sooner rather than later.

Alternately I saw @cstrahan assigned himself to #12158, so maybe that will happen sooner rather than later.

Dunno when I might get to it, though...

@grahamc please tag as security, enhancement

This is quite an old PR and a lot has changed. Is this PR still relevant?

Might be related https://github.com/NixOS/nixpkgs/pull/55755

with the structured config, it's possible to disable specific items or make them optional. Closing.


Weather card

Hi Bjarne,
I just migrated from the Weatherflow integration to the Weatherflow forecast one, all seems good, I have my sensor data.
Already many thanks for keeping this project up to date !
I was also using your weather-card-extended, which seems deprecated by now ? I changed the entity-id to the new one, but lost my hourly forecast.
Is there any solution, or would you recommend another card ?
KR,
Geert

As you might know , as of 2023.9 of HA the Weather Entity has changed, so that Forecasts no longer use attributes. Except for the official Weather Card, all the other weather card struggle with the same issue as they depend of the Forecast Attributes.
I am not a front end developer, so I honestly don't know how to fix the old card you use. So for now use the built-in Weather Card


Registry entries: add missing .md suffix to file names

Three registry entry files don't have a file suffix:
$ cd content/en/registry
$ ls | grep -v 'd$'
exporter-dotnet-azure
exporter-js-azure
exporter-python-azure

As a consequence, these entries did not show up in the registry search.
This PR adds the required .md suffix to the files.
This is prep work for #2204.

Entries now show up in the registry, e.g., see https://deploy-preview-2220--opentelemetry.netlify.app/registry/?s=azure&component=&language=js.


redirect https://rebar3.org to https://www.rebar3.org/

if one types rebar3.org it just goes not found, it would be nice to redirect to the www subdomain for lazy people ;)

Dupe of https://github.com/rebar/rebar3/issues/702

damn sorry should have checked first.


Properly define users e.g. Editor, Viewer, Presenter, Audience, WebApp, Platform

To be continued in https://github.com/nus-mtp/lecture-note-2.0/wiki/3.4-Glossary


bug: partition() fails on a certain PDF

Describe the bug
Partitioning https://utic-dev-tech-fixtures.s3.us-east-2.amazonaws.com/pastebin/ravak-profi-2022_en.pdf
results in an error.
To Reproduce
Snippet and stack trace in https://gist.github.com/cragwolfe/8014dcc0ec1c13c2f4b00dfcd110cb5f
Expected behavior
No stack trace, partitioned elements are returned.
Additional context
One can work around the issue with sort_mode="basic" e.g.:
partition(filename=filename, strategy=strategy, sort_mode="basic")

CC @christinestraub

Another reproducer from the community slack: https://publicplansdata.org/reports/CA_ORANGECOUNTY-OCERS_CAFR_2021_142.pdf

Forward Partners Financials.pdf
The attached pdf gives a different error in sort_page_elements. I can make a separate bug if requires a different fix.
  File "/home/notebook-user/prepline_general/api/general.py", line 367, in pipeline_api
    elements = partition(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/auto.py", line 293, in partition
    elements = _partition_pdf(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/documents/elements.py", line 237, in wrapper
    elements = func(*args, **kwargs)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/file_utils/filetype.py", line 528, in wrapper
    elements = func(*args, **kwargs)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/pdf.py", line 97, in partition_pdf
    return partition_pdf_or_image(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/pdf.py", line 174, in partition_pdf_or_image
    extracted_elements = extractable_elements(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/pdf.py", line 118, in extractable_elements
    return _partition_pdf_with_pdfminer(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/utils.py", line 43, in wrapper
    return func(*args, **kwargs)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/pdf.py", line 339, in _partition_pdf_with_pdfminer
    elements = _process_pdfminer_pages(
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/pdf.py", line 424, in _process_pdfminer_pages
    sorted_page_elements = sort_page_elements(sorted_page_elements, sort_mode)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/utils/sorting.py", line 55, in sort_page_elements
    recursive_xy_cut(np.asarray(boxes).astype(int), np.arange(len(boxes)), res)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/utils/xycut.py", line 119, in recursive_xy_cut
    x_projection = projection_by_bboxes(boxes=x_sorted_boxes_chunk, axis=0)
  File "/home/notebook-user/.local/lib/python3.10/site-packages/unstructured/partition/utils/xycut.py", line 28, in projection_by_bboxes
    length = np.max(boxes[:, axis::2])
  File "/home/notebook-user/.local/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 2810, in max
    return _wrapreduction(a, np.maximum, 'max', axis, None, out,
  File "/home/notebook-user/.local/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 88, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity

Describe the bug Partitioning https://utic-dev-tech-fixtures.s3.us-east-2.amazonaws.com/pastebin/ravak-profi-2022_en.pdf results in an error.
To Reproduce
Snippet and stack trace in https://gist.github.com/cragwolfe/8014dcc0ec1c13c2f4b00dfcd110cb5f
Expected behavior No stack trace, partitioned elements are returned.
Additional context
One can work around the issue with sort_mode="basic" e.g.:
partition(filename=filename, strategy=strategy, sort_mode="basic")

I've also encountered this error, have you resolved it?


I can't set seed as null

When I set seed as null as instructed in the docs (seed: 1             # A seed to make sure faker generates data consistently across runs, set to null to disable):
hautelook_alice:
    db_drivers:
        mongodb: true
    locale: "%locale%"
    seed: null

I get:
[Symfony\Component\Config\Definition\Exception\InvalidTypeException]
  Invalid type for path "hautelook_alice.seed". Expected int, but got NULL.
  Hint: A seed to make sure faker generates data consistently across runs, set to null to disable

Hi, I've addressed this issue https://github.com/hautelook/AliceBundle/pull/255. Hope this helps

Closed via #255


nixos/powerdns: add secretFile option

Description of changes
This PR adds a secretFile option to the powerdns module. This allows to store secrets like gmysql-password in an environment file, which is then inserted into the correct config using envsubst and so the secrets won't be world-readable in the nix store.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[X] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

@ofborg test powerdns


Add redirect for older version of article

Why:
Closes #11810

What's being changed:

Adds a redirect from older version of article

Check off the following:

[x] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[ ] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[ ] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

@ramyaparimi
Great! Thanks.


BUILD_CONFIG[OS_ARCHITECTURE] displays 32 bit systems as 64 bit

Platform:
Windows, Solaris
Architecture:
x32 (Windows), x64 (Solaris)
We generate this parameter using uname -m as demonstrated here in config_init.sh
https://github.com/AdoptOpenJDK/openjdk-build/blob/b5941737145dfbe5c10030737f6c69bce6132749/sbin/common/config_init.sh#L354
https://github.com/AdoptOpenJDK/openjdk-build/blob/b5941737145dfbe5c10030737f6c69bce6132749/sbin/common/config_init.sh#L367
Looking at the documentation for uname -m...
-m, --machine
print the machine hardware name

Which usually prints out x86_64 for x64 systems. However, on windows x32, it seems to misidentify the architecture as x64:

See a recent build from windows/x32/hotspot. The BUILD_CONFIG[OS_ARCHITECTURE] value is saying that the system is x64

18:06:20  BUILD_CONFIG[OS_ARCHITECTURE]="x86_64"

See a recent solaris/x64/hotspot build which should output x86_64 as the BUILD_CONFIG[OS_ARCHITECTURE] but instead identifies the machine as a x32 system?

18:06:30  BUILD_CONFIG[OS_ARCHITECTURE]="i86pc"

@sxa Do you have any idea what may be causing this? I'd like to use this build config value for https://github.com/AdoptOpenJDK/openjdk-build/issues/2054 (determining what architecture we will need to download from the adopt api for use as a boot jdk)

Reposted reply from @Willsparker in Slack
I believe it's a non issue- the machine IS x64 - but it can still build x86_32. If you look at the log you gave for the windows one, in the configuration summary, it says:
18:11:27  * OpenJDK target: OS: windows, CPU architecture: x86, address length: 32

which I believe means it's building x86_32 🙂


What is the data format to perform fine turning of the phoGPT model?

I want to perform fine turning on the phoGPT model with the goal of answering the information in the text source. What format should the data have to be able to do this?

See: https://github.com/mosaicml/llm-foundry/blob/main/scripts/train/README.md#llmfinetuning
Here is the formatted example I used for fine-tuning the base PhoGPT with context-based QA.
formatted_example = {'prompt': "### Câu hỏi:\nDựa vào văn bản sau đây:\n{text}\nHãy trả lời câu hỏi: {question}\n\n### Trả lời:" , 'response': "{response_text}"}


Add figure object to return statement of draw method of EGraph

Context for changes
Analogous to #33, it is useful to return the figure object to the user. This PR adds the figure object to return statement of draw method of EGraph.

Improvements:

Figure object included in return statement of EGraph.draw

Documentation changes:

[x] added documentation for the relevant methods

Example usage and tests

[x] Not Applicable

Performance results justifying changes

[x] Not Applicable

Workflow actions and tests

[x] To be written

Expected benefits and drawbacks
Expected benefits:

Allows user more flexibility with using the figure and saving it for example.

Possible drawbacks:

Unforeseen changes where the return of the current implementation is used. If I missed calls these can easily be fixed by simply using the second index of the new return tuple.

Related Github issues
#46
Checklist and integration statements

[x] My Python and C++ codes follow the coding and commenting styles of this project as indicated by existing files. Specifically, the changes conform to given black, docformatter and pylint configurations.
[x] I have performed a self-review of these changes, checked my code (including for codefactor compliance), and corrected misspellings to the best of my capacity. I have synced this branch with others as required.
[x] I have added context for corresponding changes in documentation and README.md as needed.
[x] I have added new workflow CI tests for corresponding changes, ensuring codecoverage 95% or better, and these pass locally for me.
[x] I have updated CHANGELOG.md following the template. I recognize that the developers may revisit CHANGELOG.md and the versioning, and create a Special Release including my changes.

@ilan-tz during the writing of test_draw I noticed that the user is allowed to make an EGraph where the nodes are not given as (x,y,z) coordinates. Should we continue allowing this or force the user specify the nodes as a 3-tuple in the EGraph? This is mainly a problem for the corresponding draw method

@ilan-tz during the writing of test_draw I noticed that the user is allowed to make an EGraph where the nodes are not given as (x,y,z) coordinates. Should we continue allowing this or force the user specify the nodes as a 3-tuple in the EGraph? This is mainly a problem for the corresponding draw method

The EGraph can work with any kind of hashable node since it's a NetworkX graph. However, most methods and most FP functionality does not make sense for non-tuple nodes, so I think it makes sense for us to enforce 3-tuples.

@ilan-tz during the writing of test_draw I noticed that the user is allowed to make an EGraph where the nodes are not given as (x,y,z) coordinates. Should we continue allowing this or force the user specify the nodes as a 3-tuple in the EGraph? This is mainly a problem for the corresponding draw method

The EGraph can work with any kind of hashable node since it's a NetworkX graph. However, most methods and most FP functionality does not make sense for non-tuple nodes, so I think it makes sense for us to enforce 3-tuples.

Alright, then I'll make an issue out of it 👍🏼


Review and improve error handling throughout modules

May be done as part of Stargate v2 process, but if so, will create more specific/targeted issues to outline problems, plans.


Basic escaping of idref value

I ran across a book with idrefs like PROLOGUE.xhtml. Directly using this as a selector will look for a tag with id PROLOGUE and class xhtml rather than a tag with id PROLOGUE.xhtml.
This escaping is very basic. Something more involved is probably necessary to escape other CSS operators as well, but at this point I am unable to spend extra time researching and building something more robust.

I suggest using ReadiumSDK.Helpers.escapeJQuerySelector() instead:
https://github.com/readium/readium-shared-js/blob/develop/js/helpers.js#L585
Some time ago, I logged an issue about this:
https://github.com/readium/readium-shared-js/issues/47
These might need escaping as well (attribute value selectors, not # UID):
generatePackageDocumentCFIComponent:
$("itemref[idref='" + contentDocumentName + "']", $(packageDocument))
validatePackageDocument:
$("itemref[idref='" + contentDocumentName + "']", packageDocument)
@marcuswu, what do you think?

I think escapeJQuerySelector() is exactly the kind of thing that is needed. However as you mentioned in the readium-shared-js issue, I also agree that escapeJQuerySelector() is not really supposed to be visible to readium-cfi-js. It seems that both projects have a similar dependency. It would be nice if both requirements could be met without the dependency being included twice. If I am not mistaken, this project is built and the result included in the super project. It would be difficult for the sub projects to maintain their independence as stand-alone libraries while also eliminating duplicate dependencies in the super project.
I think you are also correct that there are other places that could use escaping.

Related: https://github.com/readium/readium-cfi-js/pull/66

This PR is now obsolete, thanks to https://github.com/readium/readium-cfi-js/pull/66 ( @JCCR ), and because @evanmuller updated the Bibliolabs codebase with @JCCR 's code.


Methods may be incorrectly identified

The current logic for identifying methods based on the provided argument values is incomplete. It may fail to correctly identify a method, producing unexpected results.
For example, given the following two methods, it is not possible to know which one will be executed if no arguments are provided:
public void foo();
public void foo(int bar);

If the foo(int) method is found first, bar it will be executed with a default value of 0 for bar, even though foo() is a better match.

This has been implemented but has not been documented yet. RequestDispatcherServlet now selected the method with the lowest miss count that uses all of the provided arguments.
In other words, the provided arguments must form a subset of the expected arguments. The method whose argument complement is the smallest is chosen.


Make test result directory used by Gradle test tasks configurable

Use command line option "-D testResultsDirName=" to change the default test results directory ("test-results"). Specify a path relative to the build directory or an absolute path.
My changes affect the following components

[ ] API
[ ] Controller
[ ] Message Bus (e.g., Kafka)
[ ] Loadbalancer
[ ] Invoker
[ ] Intrinsic actions (e.g., sequences, conductors)
[ ] Data stores (e.g., CouchDB)
[ ] Tests
[ ] Deployment
[ ] CLI
[x] General tooling
[ ] Documentation

Types of changes

[ ] Bug fix (generally a non-breaking change which closes an issue).
[x] Enhancement or new feature (adds new functionality).
[ ] Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

[x] I signed an Apache CLA.
[x] I reviewed the style guides and followed the recommendations (Travis CI will check :).
[ ] I added tests to cover my changes.
[ ] My changes require further changes to the documentation.
[ ] I updated the documentation where necessary.

@mhenke1 please merge immediately if you agree with the proposed change.