Where to place logic, Domain vs Service?

Started this post to gather feedback on some content i'm writing to help with the common question of 'Where to place my logic, Domain or Service'
Business Logic in the Domain class vs Service class?
Sometimes it can feel less than obvious where to place code. Lets go back to the Separation of Concerns principle and think about what the Service and Domain layers are concerned with.

Fowlers definitions...
Service Layer, “Defines an application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each operation.” Martin Fowler / Randy Stafford, EAA Patterns
Domain Model, “An object model of the domain that incorporates both behavior and data.”, “At its worst business logic can be very complex. Rules and logic describe many different cases and slants of behavior, and it's this complexity that objects were designed to work with...” Martin Fowler, EAA Patterns

I'd like a few views on the concerns i've listed above as well as other concerns we could list to help people understand where placement goes. I suspect sometimes just having some tightly written code in the service layer could be a preference at times to breaking things out into domain layer calcs or updates?

I have challenges with 3 and 4 around the suggestion of implementing cross-object behaviour at the Domain layer, especially when they are invoked by triggers.
At worst, such a design could inadvertently cause a chain reaction of triggers which results to a variety of problems (e.g. SOQL limits, CPU time limit, trigger recursions, etc) that are particularly difficult to troubleshoot and unwind without regression. It does not scale well in an enterprise-level application that is developed iteratively.
Refactoring the design typically involves implementing the behaviour back to Service layer which in SFDC also implies sacrificing SFDC's standard forms (new/edit pages) with custom controller or controller extensions.

Great feedback @jmrjulian thank you, will give this some thought!

@afawcett I am building a complex subscription management system in which bulk of the business logic is invoked through triggers. There are certain scenarios where I don't want subsequent triggers to fire (stop recursion as well as chaining of triggers). Can you please provide me some guidance on that? I don't want all trigger methods to stop but want to control which ones should be skipped. Can we build something in fflib_SObjectDomain class for this?

@afawcett also it would be great if we can build some control through custom settings so admins can turn on/off triggers when they want to perform certain operations like data load without invoking triggers.

I think this is what you're looking for :)
https://andyinthecloud.com/2016/04/13/disabling-trigger-events-in-apex-enterprise-patterns/
Chris Mail

On 10 Jun 2016, at 11:23, mustafaturabali<EMAIL_ADDRESS>wrote:
@afawcett also it would be great if we can build some control through custom settings so admins can turn on/off triggers when they want to perform certain operations like data load without invoking triggers.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mustafaturabali does at @Autobat's answer help?
(thanks btw @Autobat )

I'll close this issue for now, its bene open since Feb and really was just a feedback call out. Folks can still add to this issue even though its closed.


JSON Content Editor

Parent PR: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/pull/634
This PR adds an "Edit as JSON" button to the actions dropdown in the admin content item listing:

Clicking on it encodes the content item as JSON and displays it in the JSON editor:

This still requires write access to the content item so the security is the same as the regular content item editor. Clicking "Publish" will deserialize the received JSON into a ContentItem and saves it into the database.
The use-cases for this editor:

Inspect the raw content item JSON without having to export the content or directly access the backing YesSql database
Edit fields that normally don't have an editor, e.g. Author, DisplayText, set arbitrary creation date, etc.

@sarahelsaig @Piedone Just in case you missed the following comment I did but in a resolved section.

Just for info and from memory

With STJ we did a JConvert helper to serialize /deserialize a content item as before.
JConvert.DeserializeObject<ContentItem>(json)

Yes the Version column is not related to the ContentItemVersionId, it is used when we save an item with checkConcurrency: true, it throws if a given record is written concurrently.

Yes this is not obvious to call the right content manager methods and in the right order ;)
First I assume that the editor doesn't allow to modify some data that are still managed internally, like ContentItemId, ContentItemVersionId, Latest, Published and so on. And I saw that from the editor we only can publish, not save as a draft.
Why not if it is an advanced feature intended to act directly on a given version record, but yes here we don't follow the version management pattern, e.g. loading / activating a new version if the type is Versionable. Yes, the Latest may not be Published, hmm but if this is the one we are editing it will be, if an item is already Published, PublishAsync() does nothing, that why I think you needed to call _session.Save(). Okay there is no driver validations but as I can see no updating and validating handlers will be called too.

So what I suggest is to follow the pattern used in the ApiController.Post of the OC.Contents module.
It requests to load and activate a DraftRequired, a new version is built if the type is Versionable, the result being unpublished, if it doesn't exists here you can return NotFound, then it merges this existing item version with the provided one, here can be deserialized from the editor, then it calls UpdateAsync() and ValidateAsync() that calls validating handlers, finally it does SaveDraftAsync() or as here PublishAsync() (here the item is not already published) that may unpublish a previous version.
The whole without having to call any _session.Save().

Just to make sure: are you done and waiting for a review here? (Since you didn't re-request review.)

Yes, I'm done. Sorry.

Thank you!


Implement Column Mode selection/editing

Please Implement Column Mode selection/editing.
Previously requested here
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing
On Mac preferred shortcut is cmd+option(alt) like Sublime Text does.

+1

:+1: +1!

perhaps this requires also support for virtual space

This is a feature request, not a bug report/issue. Feature suggestions already have a place over at vscodes uservoice.

The repo readme says file feature requests to vscode/issues

@ZombieProtectionAgency Has a policy for this been established yet? More often than not, GitHub issues are suitable for everything from bugs to usability problems to feature requests. The benefit of supporting this is users who have never submitted feedback before don't need to understand everything about the project structure in order to provide meaningful commentary. :smile:

Fair enough, sorry. I was just letting them know there is already a place for feature requests.

+1

+1 here in addition to user voice I don't know which is  checked more

Isn't this mostly addressed by multi cursor support and the actions 'insert cursor above/below' (which will be changed for the Dec milestone to 'add cursor above/below).
@alexandrudima  fyi

+1

@jijojv Can you please help me out with some sort of spec regarding what exactly you want...
We already have:

add cursor below Ctrl+Alt+Down
add cursor above Ctrl+Alt+Up
add selection to next selection match Ctrl+D
move selection to next selection match Ctrl+K, Ctrl+D
add selections to all selection matches Ctrl+Shift+L
undo last cursor action Ctrl+U
Alt + Click adds a new cursor

I understand there might be more to it, I think something with Ctrl+Alt + Click which would add selections in a block-like manner, is that what you mean?

It very well maybe addressed by existing features but having it match expecting functionality of almost all other editors and IDEs would probably really help new users and thereby adoption.

@alexandrudima Its a common feature https://www.sublimetext.com/docs/2/column_selection.html . I believe VS has it http://joelabrahamsson.com/select-columns-of-text-in-visual-studio/ http://www.visualstudiotipsandtricks.com/blog/2013/04/20/select-and-edit-vertical-blocks/
but is missing from VS Code.

@jijojv So this is about adding more mouse gestures since we have this:

@alexandrudima it's not quite the same as it requires 2 separate actions which is error prone e.g if you don't let go but yes in a pinch this 2 steps do get you column mode selection and edits.
⌥⌘↓ then MUST let go , then press ⇧→ to get columns

The new title made this difficult to find.
With Programmer's Notepad, Atom (with Sublime Style Column Selection), Visual Studio 2015, and obviously Sublime, you can use Alt+Select.
It would make sense to support the same in VS Code.

Alt+Select would be fab!

That would be great

On 20 Jan 2016, at 16:24, Uristocles<EMAIL_ADDRESS>wrote:
Alt+Select would be fab!
—
Reply to this email directly or view it on GitHub.

This might be a bit much (or might not even fit this suggestion) but one feature I like in editors is being able to click then Alt-Shift-click to select an arbitrary block.

@alexandrudima What is required is the ability to press down Alt + Shift (or some other key combination, I'm not sure what the consensus is), select a starting position and ending position in the code, and end up with all characters within the bounding box of the start and end position. Obviously this is complicated by things like line wrap, but this is the general idea.

add cursor below Ctrl+Alt+Down
add cursor above Ctrl+Alt+Up

It is Ctrl+Shift+Down (or Up) on my Linux (Arch Linux / i3 if it matters)

@aloisdg context on why the Linux hotkey is different is that it conflicts with switching workspaces on many Debian-based distros.

@Tyriar I think debian-based distro should move the defaut key for window related stuff to the Windows-key (as an OS key), but this argument is for another issue. Thank you for the answer.

+1

Comes in March


Experiment JSON with multiple operation shouldn't be accepted by python

Experiment JSON with multiple operation shouldn't be accepted by python
{
"id" : "'${current_id}'",
 "url" : "http://localhost:8080/searchSpace",
 "operation" : "EXP_TRIAL_GENERATE_NEW",
 "operation" : "EXP_TRIAL_GENERATE_SUBSEQUENT"
}

The issue is fixed with the latest build


[SPARK-48461][SQL] Replace NullPointerExceptions with error class in AssertNotNull expression

What changes were proposed in this pull request?
This PR replaces NullPointerExceptions with a new error class in the AssertNotNull expression.
Why are the changes needed?
We bring the advantages from the Spark error class framework to this case, enabling better user experiences and error classification.
Does this PR introduce any user-facing change?
Yes, see above.
How was this patch tested?
This PR includes unit test coverage.
Was this patch authored or co-authored using generative AI tooling?
GitHub copilot

cc @cloud-fan

Alright @HyukjinKwon @cloud-fan I finally got all the tests updated :)

Merged to master.


Handle naga's SpecialTypes

Ray tracing APIs do not currently work with naga_oil. DerivedModule throws out special_type info.

a minimal example would be really useful - just the wgsl.

@group(0) @binding(0) var tlas: acceleration_structure;

fn trace_ray(ray_origin: vec3<f32>, ray_direction: vec3<f32>, ray_t_min: f32, ray_t_max: f32) -> RayIntersection {
    let ray_flags = RAY_FLAG_NONE;
    let ray_cull_mask = 0xFFu;
    let ray = RayDesc(ray_flags, ray_cull_mask, ray_t_min, ray_t_max, ray_origin, ray_direction);

    var rq: ray_query;
    rayQueryInitialize(&rq, tlas, ray);
    rayQueryProceed(&rq);
    return rayQueryGetCommittedIntersection(&rq);
}

If I understood what's going on correctly when experimenting, naga can interpret acceleration_structure type correctly from , but it cannot write valid WGSL code, because

@robtfm I modified naga to support writing out acceleration_structure. However we still need to populate the RT SpecialTypes. I worked around it by hardcoding them: https://github.com/JMS55/naga_oil/commit/9bcdd3b90d3f2d78efcdde84b02332db2acb4668

The fix for being unable to write the acceleration structure binding is https://github.com/gfx-rs/wgpu/pull/5261, but using RayIntersection across modules and stuff is still and issue and needs to be fixed by populating the special types.


Error on Categories load

When loading the categories page the following error is shown: ReferenceError: $localStorage is not defined. This occurs accros all browsers and is reproduceable every single time.
Stacktrace:
ReferenceError: $localStorage is not defined
    at ChildScope.e.getAllCategories (categoryController.js:1)
    at fn (eval at compile (angular.js:15358), <anonymous>:4:168)
    at ChildScope.$eval (angular.js:18161)
    at Object.pre (angular.js:27912)
    at angular.js:1346
    at invokeLinkFn (angular.js:10426)
    at nodeLinkFn (angular.js:9792)
    at compositeLinkFn (angular.js:9055)
    at compositeLinkFn (angular.js:9058)
    at compositeLinkFn (angular.js:9058) "<table class="table" ng-init="getAllCategories()">"

@Desyon Should be fixed, please confirm

Confirmed

Unluckily now the colors of all categories are gone. The color code is still displayed but not applied as background color...

Cannot recreate problem


Real-Time Liveness Based Face Recognition System

Related Issuse or bug

Real-Time Liveness Based Face Recognition System

Fixes: #200
Proposed Changes

Added trained models so as they can detect between a fake/spoofed face and real face.

Additional Info

Read here

please put all your implementation inside this folder https://github.com/akshitagupta15june/Face-X/tree/master/Realtime-liveness-recognition-system

I am not sure but if you merge the PR then won't the changes will be reflected in your master branch?

i havent merge til;l now whatever the changes you will make it will be reflected.

https://github.com/akshitagupta15june/Face-X/tree/master/Realtime-liveness-recognition-system

I will generate a new PR since uploading directly in the above link is prohibited.


Problem on Wi-fi Direct Discovery Policy

Currently, when ANT manager app tries to turn on large data mode, it discovers a Wi-fi Direct peer which name is "ANT".
This "name-based discovery" can make a trouble when multiple ANT devices are active nearby. ANT manager app can be confused to select which peer to choose.
Therefore, it should be changed to "MAC address-based discovery".
Proposal: MAC Address-based Discovery

ANT manager app tries to turn on large data mode (send "on" command to ANT device through control port)
CommChannel on ANT device receives "on" command
CommChannel on ANT device send 3 parameters to ANT manager app; "Wi-fi Direct Name", "Wi-fi Direct host IP address(commonly, <IP_ADDRESS>)" and "Wi-fi Direct MAC Address".

Previously, it sent only 2 parameters; "Wi-fi Direct Name" and "Wi-fi Direct host IP address".

ANT manager app receives those parameters
ANT manager app starts to discover Wi-fi Direct P2P peers.
When P2P peer list is given, ANT manager app finds a peer device, which of MAC address is same as given MAC address through control port.
ANT manager app establishes a connection to the peer device.

I tried to implement this discovery policy.

Main Part
Android Part

However, I met another issue.
Wi-fi Direct MAC address retrieved by ioctl on ANT device is not same as one which is discovered by Android WifiP2pManager.

Retrieved by ioctl: ba:27:eb:03:0d:46
Discovered by Android WifiP2pManager: ba:27:eb:03:8d:46

I guess that I am misunderstanding MAC address policy of Wi-fi Direct.
Anyone knows this issue?
ANT Manager Log (Android Logcat)
10-09 01:18:20.277 32149-32324/com.ant.ant_manager D/CommChannelService: Target WFD device: IP=<IP_ADDRESS> / name=ANT / MAC=ba:27:eb:03:0d:46
10-09 01:18:20.326 32149-32149/com.ant.ant_manager D/WFDController: Request peer list
10-09 01:18:20.329 32149-32149/com.ant.ant_manager D/WFDController: Peer List Received
10-09 01:18:20.329 32149-32149/com.ant.ant_manager D/WFDController: Wi-fi Direct device: name=ANT / MAC address=ba:27:eb:03:8d:46

As shown in Issue #29, the problem is shown in Raspbain Stretch.
Due to this problem, we cannot use more than two Raspberries nearby.
Since discovering by Wi-fi direct MAC address is unavailable, we need to use P2P name for discovery.

It is resolved in recent version of selective-connection.
Therefore, I close this issue.


Ubuntu Server 24.04 ARM64 Stuck at Grub

Describe the issue
I downloaded Ubuntu Server 24.04.1 ARM64 ISO from official Ubuntu website, creating a new VM in UTM, selecting Display driver to be "virtio-ramfb-gl (GPU supported)".
I can boot the ISO and see the Grub2 interface, but after go to the next step for installation, graphic stucks at this page:

Configuration

UTM Version: 4.5.4
macOS Version: 15.1
Mac Chip (Intel, M1, ...):  Apple M2

I think I used noble-server-cloudimg-arm64.img and it works fine. Also with some images (20.04) you need Serial (another terminal from settings) to be turned on to proceed with install.

I think I used noble-server-cloudimg-arm64.img and it works fine. Also with some images (20.04) you need Serial (another terminal from settings) to be turned on to proceed with install.

OK, it's strange that the Ubuntu official ISO-format Server works fine for VirtualBox for Mac Silicon. Can you explain more about configuring Serial (another terminal from settings)?

You just see terminal output during initiaization and boot, there are these weird services (network/cups) that it looks like nothing is happening without Serial, but you can see continuation...I recommend adding them at least during setup

@martincerven If serial is enabled, is it still compatible with graphic 2D like showing GNOME desktop?

Yes, you can still keep Serial enabled and video output would still be displayed - you might need to wait for a while though.
In my case the culprit was NetworkManager-wait-online.service so after logging in I was able to run sudo systemctl mask NetworkManager-wait-online.service and fix that.
Once in the Serial terminal you are asked to input your credentials make sure to wait 10/20 seconds more and the greeter should then be displayed.
Additionally, make sure to choose virtio-ramfb as the Emulated Display Cart in the VM settings.
I also tried virtio-ramfb-gl which is snappier but it a lot more glitchy and unstable (maybe it's still related to https://github.com/utmapp/UTM/issues/5749?)

@sav-valerio  there is nice writeup on  utm subreddit and according to them:

virtio-gpu-gl-pci is typically your go-to card for modern Linux distros

Which kinda seems to make sense.
@ghostplant  yeah GUI and Serials are unrelated, but if something breaks (you uninstall your ubuntu-desktop) your only choice is to have a terminal acess.
It seems that sudo systemctl mask NetworkManager-wait-online.service timeout is present on all 24.04 and it should be okay to just turn it off.
It's especially bad if u don't have terminal output so you don't see it's hanging on a weird service, and you only see black GUI.

It works, but the systemd loading speed is too slow, much slower than VirtualBox for Mac M2


support pass function to loader for better support for prebundle

Feature request
support pass loader as a function
What is the expected behavior?
support the following usage
// webpack.config.js
module.exports = {
   module: {
     rules: [{use: function inilne_loader(x){ do_some_transform(x)}}]
  }
}

What is motivation or use case for adding/changing the behavior?
it's hard to prebundle loader with webpack for tools wrapping webpack if loader only supports string,
and prebundle is key to the stability of these tools
How should this be implemented in your opinion?
support pass function to loader
Are you willing to work on this yourself?
yes

Sorry, no, we already diccussed about it and decide don't do it (also it will be bad for cache), anyway you can do it in your configuration.
Just create a file, and do this:
module.exports = function loader(options) {
 const options = this.getOptions();

 // Logic
};

And pass required logic using loader's options.
feel free to feedback

why is it bad for cache？

Because we can invalidate cache from your variables

Because we can invalidate cache from your variables
so webpack use loader path as cache key, if support loader as function then webpack don't know what to use as loader key?

No, it is not working in this way, we use content of file (i.e. hash) and timestap

then why loader function is bad for cache is it's not used as cache key?

Options are also cached, but when you use own variables we can't track their value


Reduce sprintf overhead in code showing up during sync profiles

Reduce some sprintf overheads
This is a pretty micro-optimization. It likely has more impact for txs than epoch. In epoch it shaves like 100ms (there are way better things to shave time on there)

Added check for it in #7203


Multiple prec attributes by 100

#UpperId and #LowerId have prec(2) while KLabel and #KVariable have prec(1). That does not leave much room for other priorities. Even if KLabel, #KVariable aren't a problem, since we can't have negative precedences, only prec(0) and prec(1) are available to users. Perhaps we should multiply these by 100?
To make it backward compatible we could introduce a new precedence attribute with prec(N) synonymous with precedence(N * 100).

The prec attribute is more of a special purpose hack to get around certain restrictions in the current scanner than a general purpose mechanism. While what you describe sounds nice in theory, I suspect actually trying to put it into practice would break the very delicate balance that exists between scanner and parser in K currently. I'm willing to be persuaded that I'm wrong and something like this is actually necessary, but you're going to need to provide an example of something where it's necessary first.

I'm not sure why we need to multiply by 100, would just shifting by 20 work? So 21 and 22? That way they are still close to each other? Or if @nishantjr provides an example of where you would want precedence between the two, we could do 20 and 40 or something.
But if those are the only two places where precedence are used, my gut says it shouldn't break anything to monotonically shift all the ones that show up in kast.k and domains.k.

@nishantjr can you either:

Close this because it's not needed.
Provide an example where it is needed.
Respond to our questions.

I don't have  a particular use for this, and wrote it up as a comment when I was writing the documentation for the attribute.


chore(master): release loose-dependency-manager 0.1.1

:robot: I have created a release beep boop
0.1.1 (2024-05-09)
Bug Fixes

loading env var (930179b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/01Joseph-Hwang10/loose-dependency-manager/releases/tag/loose-dependency-manager-v0.1.1 :sunflower:


Cookiebot Cyber Self-Assessment - October 2024

Initiative to complete Cyber self-assessment (CSA) for all applications in Equinor.com scope by end of 2024.
CSA are created via link below:
https://security.surecloud.com/core/home/(show:application_group/24367)
Cookiebot CSA is requested to be completed by end of October 2024.

these are completed


Docker for Mac beta status

I am sorry, I have been trying my best not to post this here, but finally my eagerness got the better of me. I signed up for the beta within 24 hours of the announcement, and have been checking my email every day expecting an invite. I haven't received one yet and I keep seeing tweets and posts from people saying how good it is.
How is the beta going? How long is the beta invite list? How often does docker send out beta invites? Are the invitees selected on first come first serve basis? And most importantly, is there an end in sight to this waiting?

Closing the issue as it is off-topic. But if anyone has answers to my questions above, please respond.

🐳 📨

Any update on this? 😞

@JoyceBabu Please get in touch with Docker Inc using this form https://goto.docker.com/contact-us.html
This issue tracker is for the open source Docker Engine. Generally speaking, you'll find the Docker Engine community on this issue tracker and we can't help with Docker for Mac beta/Docker for Windows beta.
Docker Inc. should also be able to provide more information after your inquiry.

I had already tried contacting them by replying to the confirmation email. I was hoping someone here would be having information on how it is going.

I just found out that I had received the invitation earlier. Gmail tagged it as 'Promotion' and hid it somewhere. A search for mails from docker.com turned it up. 😃

A search for mails from docker.com turned it up.

@JoyceBabu I just realized I got an invite a month ago! Thanks for pointing that out 😄


Round float state to 2 digits.

Not sure whether we can get integer states.
If not we can simplify by removing the if statement and rounding all the time.
Github Issue: #163

Actually, python rounds an int without trouble. shall we just remove the if?


Sign-up not working

Describe the bug
I cannot sign-up on https://near.academy/sign-up
To Reproduce
Steps to reproduce the behavior:

Go to https://near.academy/sign-up
Complete the fields
Press the Sign Up button
Nothing happens

Expected behavior
Sign up should work.
Desktop (please complete the following information):

OS: macOS
Browser chrome
Version 98

Additional context
CORS error seem to appear in the Console tab

Access to fetch at 'https://api.near.academy/user/sign-up' from origin 'https://near.academy' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Thank you for reporting this! We are trying to move this website to a different server and thought the transition would be faster and smoother. We're working now to either finish the transition or revert back to where it was. Thanks.

Fixed with https://github.com/NEAR-Edu/near.academy/commit/dc01d6b55459d0f331f1c8be3a418bcbce2baaaa


(new3ds) crash in modify in kr.bcfnt

When i used "KOR" machine, I apply the font(menu 10) I've made, always Crash.
But, This does not happen if I used "JP" machine.
Some peoples have found that if they check the "Disable ARM11 Exception handlers" in Luma.
But, I think this method is dangerous.
Can you help me uncheck the Disable ARM11 exception handlers and use SfontT?
Thank you.

An exception occurred
Processor: ARM11(core 0)
Exception type: data abort
Fault status: Translation - Page
Current process: menu(000400300000A902)

struct SFontTextureGlyph
{
u8 CellWidth;
u8 CellHeight;
n8 BaselinePos;
u8 MaxCharWidth;
u32 SheetSize;
u16 SheetNum;
u16 SheetFormat;
u16 SheetRow;
u16 SheetLine;
u16 SheetWidth;
u16 SheetHeight;
u32 SheetImage;
};
Make sure "SheetNum" <= 0x15, so let "SheetSize" bigger.
If you create .bcfnt file by ctr_FontConverterConsole.exe, you can set the option "-os 512"(means SheetSize is 512KB) to solve forever.
The .bcfnt file size limit is 3350400Bytes.
You can reference cbf_cj.bcfnt
https://github.com/dnasdw/cbf_cj/blob/master/bin/make_cbf.bat


wizard: Wizard snapshot cannot handle citation full with line breaks

One-liner
Wizard snapshot cannot handle citation full with line breaks.
Context & details
The .dvc file that is created when the citation_full entered through the browser contains multiple paragraphs is not properly indented. This issue probably affects other fields, not just citation_full.

hi @pabloarosado,
Can you provide your example? snapshot / how-to-reproduce?

hi @pabloarosado, Can you provide your example? snapshot / how-to-reproduce?

I couldn't give an example since the code wasn't yet pushed. Here's the dvc file that failed (after correcting citation_full).
To reproduce, run etl-wizard --dummy-data and then, in citation_full, add a line break. For example:
Dummy description for a dummy snapshot.
Another sentence.

This will generate a broken dvc file.


Wrap BadHttpRequestExceptions thrown from FrameRequestStream.Read* in IOExceptions

https://github.com/aspnet/Mvc/issues/5341#issuecomment-250827099

Nvm. BadHttpRequestExceptions are IOExceptions


Update Kusto.json with TSVE data format

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-python

Can one of the admins verify this patch?

Automation for azure-sdk-for-go

Please let me know before merging

@docohe when is this PR ready to merge? Just to double confirm, this is not a breaking change to customer?

@yungezz, not yet, I'm waiting to complete the schema PR first. I'll keep you update.

@yungezz We can merge. This is not breaking change, just adding new data format type that the customer can use.

@yungezz We can merge. This is not breaking change, just adding new data format type that the customer can use.

ok to merge it now? or waiting for your notification?

@yungezz you can merge.

Any updates on the merge ?


why GET operation is so fast

Hello Everyone,
I hope that I ask my question in the correct place.
I have a simple question about the get, put, and delete operations in the key/value data model.
I am experimenting with the effect of the number of keys with a specific key size in the put/get and delete operations. I calculated the time of each operation to realize the impact of key numbers. In my test, I created an array of key numbers, [1,10,100] with the size of 100K to generate the result.
The result shows that the GET operation did very fast in comparison to PUT and DELETE operations. There is a huge difference between put and delete operations with get.
I put the code that I have written in this link OrbitDB.
I would be grateful if you could let me know your idea about it and the result that I have got.
Thank you so much.

The reason the get method is so fast is because it is not an operation. The get method is synchronously retrieving a value that is already kept in memory. The put and delete methods create put and delete operations which must be appended to the operation log. Appends to the operation log involve creating + digitally signing + hashing a new object, and writing data to disk.

Thank you for your reply,
Based on your explanation, this comparison does not make sense. So, I have to experiment based on PUT and DELETE operations.

@mosTavassoli if you could expand on what doesn't make sense from @tabcat 's explanation. For now I'll close this issue but feel free to re-open if you would like to discuss further.


Images not working when we upload them in zip as Images/speakers and images/sponsors

@mariobehling Solved here #588

This is done!!


Cloud Flex credit accounts

Dochub team,
Documentation indicates that "Tracing" is available in our Enterprise Security package.  It's not. Can we get the checkbox removed for that package reference?  Thanks
Slack Message

Jeff, this is fixed! Tracing removed.


Documentation on available alert command parameters

Hi, I'm trying to dump Alerter object properties as parameters to the AlerterCommand, but no luck so far.
I've been through this:
http://elastalert.readthedocs.io/en/latest/ruletypes.html#command, plus the related questions found on issues:
https://github.com/Yelp/elastalert/issues/231
https://github.com/Yelp/elastalert/issues/1357
https://github.com/Yelp/elastalert/issues/1082
and even the "alerter" and "CommandAlerter" classes on the code (elastalert/alerts.py) but so far, I have not been able to find following information:

available fields from rules and matches that can be dumped to the command alerter (I've tried class properties, not sure if able to return a value from a method).
working examples  that actually pass said information and the expected use of the new_format  item.

Is this something you can help me with?
i.e.
I have this alert configuration:
---
# Alert when there is no activity on endpoint
name: drop in endpoint calls
type: flatline
index: apm-*

timeframe:
  minutes: 3

threshold: 400
doc_type: doc

run_every:
  minutes: 2

realert:
  minutes: 0

filter:
  - query:
      query_string:
        query: "context.service.name:some_servicel AND context.request.url.pathname:\"/some_uri/this_endpoint\""

alert:
  - command

command:
  - "/sites/monitoring-elastalert.internal/bin/alerter_venv/bin/python"
  - "/sites/monitoring-elastalert.internal/bin/parse_alert.py"
  - "-a"
  - "{match[rule_name]}"
new_style_string_format: true

and this is my dump on the script:
2019-04-22 08:23:09,895 - CRITICAL:Failed to parse arguments.
2019-04-22 08:23:09,895 - CRITICAL:dumping arguments:
2019-04-22 08:23:09,895 - CRITICAL:/sites/monitoring-elastalert.internal/bin/parse_alert.py
2019-04-22 08:23:09,895 - CRITICAL:-a
2019-04-22 08:23:09,895 - CRITICAL:{match[rule_name]}

I don't get the rule name passed to my script, nor am I able to dump any CommandAlerter property (like self.rule, self.match, self.pipeline)....
even if changing to "old format" , and reconfiguring the rule as follows:
include:
  - "rule_name"
  - "@timestamp"
  - "matches"
alert:
  - command
command:
  - "echo"
  - "%(@timestamp)s"
  - "%(rule_name)s"
  - ">>"
  - "/tmp/alert.log"

I don't get the required values on the journalctl:
Apr 22 09:04:37 monitoring-elastalert-1.mdev.internal elastalert[6881]: <MISSING VALUE> <MISSING VALUE> >> /tmp/alert.log
Apr 22 09:04:37 monitoring-elastalert-1.mdev.internal elastalert[6881]: <MISSING VALUE> <MISSING VALUE> >> /tmp/alert.log
Apr 22 09:04:37 monitoring-elastalert-1.mdev.internal elastalert[6881]: <MISSING VALUE> <MISSING VALUE> >> /tmp/alert.log
Apr 22 09:04:37 monitoring-elastalert-1.mdev.internal elastalert[6881]: <MISSING VALUE> <MISSING VALUE> >> /tmp/alert.log

and the output is not redirected to the /tmp/alert.log file.
Thanks in advance
p.s., I'm trying to avoid writing a python alerter to expose the value, as it would be heavy maintenance on moving script functions to the exporter module

Unfortunately you can't use the rule configuration properties in the command alert. Writing a Python module would actually be quite easy though, if that's the only thing you want to add.
class NewCommandAlerter(CommandAlerter):
    def alert(self, matches):
        matches[0].update(self.rule)
        super(NewCommandAlerter, self).alert(matches)

If you want >> file redirection to work you just need to put the entire command in a string. If it's in a string, it will be passed to the shell rather than directly execve'd.
command: "echo %(@timestamp)s %(rule_name)s >> /tmp/alert.log"

Thanks. I'll use the info and move forward with it.
Best Regards,


Use radio buttons on equality and diversity start page

Context
The equality and diversity start page has seen many revisions, but none have addressed us using a button and a link to direct users to different routes – a situation that’s been made worse since the nearby inclusion of a link to our privacy policy as well or would had that link appeared 😱.
Changes proposed in this pull request

Use radio buttons to show the two choices instead of a link and a button
Fix link to privacy policy not being rendered
Update tests to reflect new behaviour on this page
Localise most of the strings in this section (which also ensures section title is used consistently across pages in this section)
Use new caption attribute in the form builder, removing need for equality_and_diversity_caption helper
Move grid layout out from review component and into view

Guidance to review
Perhaps best to view each commit individually - the one that localises strings obviously touches a lot of code.

Before
After

Link to Trello card
https://trello.com/c/jenqB5nt
Things to check

[ ] This code does not rely on migrations in the same Pull Request
[ ] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[ ] API release notes have been updated if necessary
[ ] New environment variables have been added to the Azure config

Hmmm, wonder if there should be a test to ensure privacy policy is linked to…

Hmmm, wonder if there should be a test to ensure privacy policy is linked to…

Added in https://github.com/DFE-Digital/apply-for-teacher-training/pull/3242/commits/e52ba8e35589f0b47dcbcc3158acfb4cdac1a6c4


Namespace URL is not accessible.....

This link is not found:
http://schemas.microsoft.com/appx/manifest/uap/windows10/3

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d9ce8a68-18ba-b0fa-f575-27d2aa93fd38
Version Independent ID: 0629c9c3-2c48-4945-8ca3-d812283eb868
Content: uap3:AppExecutionAlias - Windows UWP applications
Content Source: winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap3-appexecutionalias.md
Product: uwp
Technology: winrt-reference
GitHub Login: @GrantMeStrength
Microsoft Alias: jken

Thanks for your feedback.
Although it looks like a web-accessible URL, this is just a namespace name that Microsoft has devised to uniquely identify XAML elements.


Fix no depletion X and LQ tokens guarantee

Updates summary:

epochAlloc   = (programBudget - 1L) / epochNum in all calculations (contracts and simulations, including LMpool object);
reservesLQ are also replaced to (reservesLQ - 1L) in all calculations;
Pool contract and Staking Bundle contract have new mappings and trees;
simulations updated with generators and additional test fixes.

Updates v2 summary:

New reward distribution math in the LMPool simulations:

    val actualLQ = reserves.supplyTMP - (reserves.LQ - 1L) * epochsToCompound
    val allocRem = reserves.X - BigInt(conf.programBudget) * epochsToCompound / conf.epochNum - 1L

    val reward = if (actualLQ > 0 && epochsBurned > 0) (allocRem * bundle.vLQ * epochsBurned / actualLQ).toLong - 1L else 0L

Also new reward validation math in the Pool contract:

    val actualLQ = 0x7fffffffffffffffL - poolTMP0._2 - (reservesLQ - 1L) * epochsToCompound
    val allocRem = reservesX - programBudget0.toBigInt * epochsToCompound / epochNum - 1L

    val reward  = allocRem * deltaTMP / actualLQ

prevEpochsCompoundedForDeposit validation removed from Pool contract since math above allows to calculate correct epoch reward regarding of depositing

Additional -1L added to validReward validations in Pool and StakingBundle contracts to prevent errors from different rounding in reward calculation

No depletion TMP tokens fix added to StakingBundle contract

      val bundleKey0 = {
        if (SELF.tokens.size == 3) {
          SELF.tokens(2)._1
        } else SELF.tokens(1)._1
      }

ErgoTreeHash and ErgoTreeTemplateHash printing methods fixed


[NP-2792] Unify CapabilityWizardlet

Composition + Polymorphism solution to duplicate code: https://nanopay.atlassian.net/browse/NP-2792
Issue was CapabilityWizardlet and CapableObjectWizardlet had their own implementations of save, and any CapabilityWizardlet subclasses (MinMaxCapabilityWizardlet) would need to have a duplicate extending the other one (CapableMinMaxCapabilityWizardlet).
By creating an interface (WizardletDataController) for save,cancel,load, it became possible to extend just CapabilityWizardlet and provide an implementation for WizardletDataController to handle the separate Capability/Capable cases.

pulled branch and running with master merged and latest dev.
Getting build error:
error: UCJWizardletDataController is not abstract and does not override abstract method load() in WizardletDataController

public class UCJWizardletDataController implements foam.u2.wizard.WizardletDataController, foam.core.FObject {
       ^

although the method is there - trying something - if it works will delete this comment

Probably needs flags: ['web'] in the model... I'll try that

flags fixes it

Ctrl/Controller usually has a different meaning in FOAM and other MVC frameworks. How about naming it WAO (pronounced WOW), for Wizardlet Access Object, which would draw the analogy of being similar to a DAO, in that it is an abstract storage mechanism.


inParX & inParY shouldn't be able to be 'true' for autosomes

As the docs state, inParX should be "true if in pseudo-autosomal region on chromosome X."  Likewise, inParY should be "true if in pseudo-autosomal region on chromosome Y."  However, these flags are currently being applied regardless of chromosome.
That is, currently any variant that meets (60001 <= start && start <= 2699520) || (154931044 <= start && start <= 155260560) gets inParX = true, and similarly for inParY.
This is confusing and, I would guess, in error.  inParX should only be able to be true if v.contig == "X" is true, and inParY should only be able to be true if v.contig == "Y" is true.

Addressed by #499


Button should be enabled after selecting the terms and conditions checkbox but not enabling.

Originally submitted to Google Code by srijoba... on 1 Sep 2013

In my application after selecting the checkbox for terms and conditions a register button should be enabled which happens manually but with Robotframework seleniumlibrary when I used select checkbox it selects the checkbox but the Register button is not enabled not sure what the problem could be
Iam using robotframework with jython...

Originally submitted to Google Code by @jussimalinen on 13 Aug 2015

We are moving Selenium Library to github and creating a last release with Robot 2.9 support before stopping the support of this project entirely.
As this project is deprecated, moving to Selenium2Library is necessary for further support and development.


function for dataset selection

Why not call the function curatedMetagenomicData()?  Something like this, with the ability to return convenience function names or actual datasets:
#' Title Easy and flexible selection of datasets in curatedMetagenomicData.
#'
#' @param pattern
#' A pattern, potentially containing wildcards (see ?glob2rx), matching to
#' the names of datasets in curatedMetagenomicData.
#' @param disease
#' A vector of one or more disease states to fetch. By default "*" fetches any
#' disease state. Currently available values are:
#' (list available disease states)
#' @param bodysite
#' A vector of one or more body sites to fetch. By default "*" fetches any
#' body site. Currently available values are:
#' (list available body sites)
#' @param provides
#' Select only datasets providing this metadata. A list of all available
#' metadata is available in inst/extdata/template.csv, e.g.:
#' file = system.file("extdata/template.csv", package="curatedMetagenomicData")
#' View(read.csv(file))
#' @param datatype
#' A character vector of data types, including one or more of:
#' metaphlan_bugs_list, marker_presence, marker_absence, genefamilies_relab,
#' pathabundance_relab, pathcoverage.
#' @param download
#' If TRUE, actually download the datasets as a list of ExpressionSet objects.
#' If FALSE, just create a list of the names of the convenience functions for
#' matching datasets.
#' @param version
#' Which version of the datasets to use (currently not supported)
#' @return
#' If download=FALSE, a list containing the names of convenience functions
#' for datasets matching the search.
#' If download=TRUE, a list of ExpressionSet objects containing the actual
#' datasets.
#' search.
#' @export
#' curatedMetagenomicData
#' @examples
#' res = curatedMetagenomicData("HMP*", bodysite=c("*plaque"))
#' esetlist <- lapply(res, function(x) do.call(get(x)))
curatedMetagenomicData <- function(pattern,
                                   disease="*",
                                   bodysite="*",
                                   provides="subjectID",
                                   datatype="metaphlan_bugs_list",
                                   version=NULL){

}

provides argument depends on #38

Here's a bit of code in case it's helpful, to return a named list of all datasets matching a pattern (glob2rx used just to help non-regexers) - I even used magrittr :D. But here's
pattern <- glob2rx("LomanNJ_2013_Hi*")
ls("package:curatedMetagenomicData") %>%
  grep(pattern, ., val=TRUE) %>%
  {
    res <- lapply(., function(x) do.call(get(x), args=list()))
    names(res) <- .
    res
  } -> res

I am going to call the function filterDatasets() to avoid collision with the package docs and will use that title to write about the functionality in our manuscript

Part of the rationale for curatedMetagenomicData() was to replace the currently rather unhelpful ?curatedMetagenomicData with something really useful - I consider this collision a benefit rather than a drawback!

Ok, I will keep the name then.

I just committed a basic working function with roxygen markup... I'm not tied to the API, let's discuss anything you don't like, then roxegenize it and get it in the package :)

Ok, that sounds like a plan. I am just about to push the site fixes too.

Don't forget to bump the version...

@lwaldron I don't see your function in the commits, or even in your branch. Could you do a quick check or should I just copy the function code from above?

It's there:
https://github.com/waldronlab/curatedMetagenomicData/blob/master/R/curatedMetagenomicData.R

Done (in the future will add use options for filtering by pData, body site)


List item gets lost in infinite scroll

Hi
I am using CarouselLayoutManager to create a carousel list of items. In a small list with a few items, when set to infinite scroll, after the first round, one of the items gets hidden! What does cause this?

Hi @jasonMisaq. Someone had reported this issue for version 2.0.0. And I fixed it in 2.0.1 by 9dd65d7. Are you using version 2.0.1?

@leochuan  I upgraded to 2.0.1 and now it works fine. Thanks


Change image content mode in InitialPageViewController from aspect fit to aspect fill

Why don't you provide a property for that, so the users can choose the Content Mode that best fits their needs?

Actually, that is the issue I had now and it would be nice to do just that. I was here to write the issue, but I guess you thought about it too :)

Done on OnTapDelegate branch


Fix multiline in spec description

Fix description multiline so that won't look like this when tweet 😄

Added in version 0.3.0


This version of Node.js requires NODE_MODULE_VERSION 115

Describe the bug
Hi there! Would appretiate any help here...
I'm building an Electron app, have better-sqlite3 library in the project. On "postinstall" hook I rebuild the native module (better-sqlite3) for my version of node js (20.14.0). Rebuilding works fine (verified). Then I have a test where I try to test a connection to the DB. Here I get the error:
Error: The module 'node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 125. This version of Node.js requires
NODE_MODULE_VERSION 115. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

I've created another test where just run console.log(Node.js version: ${process.version});, it shows me the same 20.14.0.
I don't understand from where this "NODE_MODULE_VERSION 115" comes from, wtf? What is 115? Is it v19.x?

Reproduction

System Info
System:
    OS: macOS 14.5
    CPU: (16) arm64 Apple M3 Max
    Memory: 3.30 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
  Browsers:
    Chrome: 127.0.6533.89
    Safari: 17.5
  npmPackages:
    @vitejs/plugin-vue: 5.1.2 => 5.1.2
    vite: 5.3.5 => 5.3.5
    vitest: ^2.0.5 => 2.0.5

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Electron has its own NODE_MODULE_VERSION. Try doing what the error says and recompile it against the same Node.js version.
The NODE_MODULE_VERSION was previously mentioned in https://nodejs.org/en/about/previous-releases but it was removed, so I don't know what Node.js version corresponds to NODE_MODULE_VERSION, but this is clearly not related to Vitest.

@sheremet-va Yes, I know about Electron bundled with their own node version. I tried the way "switching to electron node version" but then vitest fails on Windows:
cross-env ELECTRON_RUN_AS_NODE=1 electron node_modules/.bin/vitest run -r packages/main

Anyway... you said vitest just using the local version of node and this error comes from node itself?
I just tried all the variants that I had in mind, where should I ask for help? Nodejs community? But the problem only when I run the test...

I tried the way "switching to electron node version" but then vitest fails on Windows:

Well, you can't run Vitest under Electron.
Make sure you have the same version globally as you have in Electron.

Anyway... you said vitest just using the local version of node and this error comes from node itself?

The error comes from better-sqlite3 because the versions of Node.js that you run locally and in Electron are different. There is nothing here to add, make sure they are the same, this is not a bug, you have misconfigured environment.

The error comes from better-sqlite3 because the versions of Node.js that you run locally and in Electron are different.

Thank you for the answer, just trying to figure out what's going on... I'm pretty sure I have the same node versions locally and in Electron.

npm ls electron
<EMAIL_ADDRESS>/Volumes/code/pos
└──<EMAIL_ADDRESS>
In Electron v31.3.0 changelog: Updated Node.js to v20.15.1. Locally I switched to v20.15.1 as well:

node -v
v20.15.1

So I have the same versions 100%. And I have no problems with Electron, I can run dev/prod builds with no errors. But I have a problem only when I try to run the test, this is confusing me. I'm eager to ask this question in better-sqlite3 repo but don't know how to explain them that the problem only when I try to run the test..

I'm eager to ask this question in better-sqlite3 repo but don't know how to explain them that the problem only when I try to run the test..

The problem is not when you run a test, but when you run the code in local Node.js. Create a js file with your code and run it using node your-file.js - you should see the same error.

I'm eager to ask this question in better-sqlite3 repo but don't know how to explain them that the problem only when I try to run the test..

The problem is not when you run a test, but when you run the code in local Node.js. Create a js file with your code and run it using node your-file.js - you should see the same error.

Indeed, you are correct. The same error running a simple js file (with local node) where I init better-sqlite3 connection. Will continue in this directions, thank you.


Update README.md

Update README file from Chinese to English

Merge master with chinese-to-english branch.


accumulate: update tests

see #414
Also removed unnecessary else block

I realise there is a question mark over the status of accumulate at the moment (#555) but I just wanted to be able to close #414

now:
--- FAIL: TestAccumulate (0.00s)
	accumulate_test.go:41: Accumulate(["echo" "echo" "echo" "echo"], "echo"): expected ["echo" "echo" "echo" "echo"], actual ["echo echo echo echo"]


Swift 4.0 support

Some code isn't compatible with swift 4. Do you have any plans on supporting the project or is it abandoned? Not sure if I should push a PR with a fix.

@nyekimov Thanks for your feedback! Yes, I still continue supporting this library but just haven't had time to run it against Swift 4 and apply the fixes. You are more than welcome to make the fixes yourself and create a PR (in fact I would greatly appreciate it!). Otherwise I will try to do it myself in the next few weeks when my schedule opens up a bit more.
Cheers! 🍻

@ghost I've pushed up a PR to upgrade the pod to support Swift 4.2 - https://github.com/Appmazo/NWSTokenView/pull/26. Could you please review it?
Thanks

@nyekimov Swift 4.2 is now supported thanks to @mike011 (#26 ).
Cheers 🍻


Include information on the tools for creating gbnf grammar files in the llama-cpp notebook

Hi,
I recently experimented with grammar-based sampling and discovered two methods for speeding up the creation of gbnf grammar files:

Online grammar generator app introduced here
Script for parsing json schema to gbnf grammar

I believe it is a good idea to include the information that leads to them in the llama-cpp notebook.

Codespell check fails but due to the unrelated script

thanks @eryk-dsai!


show/hideEasing not working

The toastr message appears but without an animation. This properties can be handle from .config?
My version of angular is 1.3.2 with it's respective ngAnimate.

Do you have the latest angular-toastr and also ngAnimate imported as a dependency on your module?

Sure, I have the latest release of angular-toastr imported also with the ngAnimate version 1.3.2. Animations work right with this version?
Thanks

yes, it should work, can you gist some code?

Here's my app dependencies
https://gist.github.com/mrchacon/12a13d55f81b5cce3dbb#file-gistfile1-txt

There is no need to override all the options, just the ones you want to change. Still, that shouldn't cause your "non" animations.

Please, reopen if you have a plunker or something, but I can't reproduce it.


Pattern should match on word boundary

This should not match:
do_not_require "lib"

Yet it does.

This is intended, because you might write a wrapper around require and still want to include it.
eg:
function safe_require(module)
  local ok, err = pcall(require, module)
  if ok then return err end
  -- custom error handler etc
end

safe_require("test")  -- still includes it


Hotfix selfexciting process

Hi Victor,
I saw you've already modified the def of _initial_kernel.
lambda_s should not be 0 initially, but rather the distribution of xi or
lambda_t (let's say it is an assumption / simplification).
Doing so we overcome the difficulties to spot jumps in the first periods.
By saying "You'll also need to add the "initial sample" for lamda_s in the
"initial_kernel", guess it should be 0?" you meant in the example (ipynb)
or in the self_exciting_process.py file?
Thankssssssss,
Andrea
lambda_s should not be 0
Il giorno sab 4 mar 2023 alle ore 07:57 tingiskhan @.***>
ha scritto:

@.**** commented on this pull request.
In stochproc/timeseries/models/self_exciting_process.py
https://github.com/tingiskhan/stoch-proc/pull/36#discussion_r1125385610:

@@ -76,7 +76,7 @@ def kernel(self, x: TimeseriesState, alpha, xi, eta) -> Distribution:
diffusion = eta * dl_t.abs()
lambda_t = (lambda_s + deterministic + diffusion).clip(min=0.0)

   combined = torch.stack((lambda_t, dl_t), dim=-1)

   combined = torch.stack((lambda_t, dl_t, lambda_s), dim=-1)

You'll also need to add the "initial sample" for lamda_s in the
"initial_kernel", guess it should be 0?
—
Reply to this email directly, view it on GitHub
https://github.com/tingiskhan/stoch-proc/pull/36#pullrequestreview-1324948758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEAKB7YUUTBNAHHSDFG6GC3W2LRW3ANCNFSM6AAAAAAVO7SHXY
.
You are receiving this because you authored the thread.Message ID:
@.***>


feat: Migrate to v9

Migrates commitment to v9 (ESM support migration)
BREAKING!: Drops CJS support (will try to add CJS support again later)

Welp that was a nice try...


[WIP] initial httplib patch

This is what we're going to use in production.  It's important for tracing things like the old google API, which uses httplib2 which uses httplib.
Will update the tests ASAP.
NOTE: perhaps this should replace the requests patch as requests uses httplib

oo, should get the unittests setup via Travis/etc

one question for this PR is it has three segments, I'm not sure I can coalesce it to two given redirects

is it possible to quickly add travis or circle ci support to this project?  It's pretty simple and free and I think will help a lot, here's an example: https://github.com/aio-libs/aiobotocore/blob/master/.travis.yml

The PR looks good on most part. But I would like to point out some concerns on the structure of the subsegments this patching code is generating.
In a steady state one http outbound call is broken into two subsegments. One is for pre_req and one is for getresponse. These two are siblings with the same name (the url without query string). The service graph statistics will be impacted on both call rate and avg latency on that node.
Ideally in a successfully case there should be only one subsegment representing one complete round trip. In a failure case there is one subsegment representing the failed connection.
I understand the ideal case could be a challenge given this is a low level library and a logical operation is broken into several functions. But on the X-Ray service graph level one endpoint should be abstracted to one node with correct statistics.
Another question is that you are saying one http call will generate three subsegments? From the PR I can only see two.

I agree on only keep the subsegment for actual internet round trip on a successful case. Also read() is probably not necessary here as it is purely cache read? Otherwise your avg latency will be cut almost in half due to those read() operations.

ok cool, will update ASAP.  Read should read the body of the response, normally the headers come first, followed by optionally reading the body (remember the body can be megabytes in length).  So 204s will have no body and no subsegment, whereas something like downloading a 2MB file will.

another reason is that you may perform logic between getting the headers and the read and don't want to reflect that processing time in your read segment.

furthermore you may have multiple reads (it can get complicated quickly)  :)   If you have a fixed-size connection pool now imagine you may want even more segments:

wait for connector to be available from pool
connect time
wait for headers
3.1) if redirect, goto 2
(optional) read

Agreed. It really depends on the use cases and having the SDK to be able to provide more insights on a single logical operation is always better. But this could be a good first step.
The main thing to keep in mind is the granularity on the segments structure. You can take a look at X-Ray Go SDK as an example: https://github.com/aws/aws-xray-sdk-go. In the screenshot shown at landing page you can see the DynamoDB call as a top level parent and its children subsegments provides insights on the timing on DNS lookup and SSL handshake and retries etc. But you only drill down to this level of details when you see a "slow DynamoDB operation".
As long as the top level segment capture provides necessary information so service back-end can aggregate them correctly, more children subsegments are always useful.

cool, will get to the changes soon hopefully, working with two broken arms at the moment due to VB accident :)

@haotianw465 so I take it back, after investigating this a bit more, I realized that each subsegment is a separate operation, note the following in the test:
    conn.request(method, path)
    resp = conn.getresponse()

this could then further have a resp.read()
so my current subsegment layout I believe is correct, where you have one subsegment per operation, which can be separated by user code.

OK cool. In that case user will need to use @xray_recorder.capture() annotation to group httplib operations if necessary.

i could create a group too in _prep_request, how would I do that?

ya I just realized I can't create a segment because I won't know when it should end beyond when the instance gets GC'd ;)

You will have to do the following per README.md about function capture:
@xray_recorder.capture('example.com')
def myfunc():
    conn.request(method, path)  # sends headers
    resp = conn.getresponse()
    resp.read()

Then you will have one subsegment named "example.com" which has three children representing those three operations, if this is what you expect.

cool, so anything left?

No it looks good. I will approve and merge this PR.

The httplib_test failed under Python2.7. Did you run it successfully on your side?

will try now

fixes in https://github.com/aws/aws-xray-sdk-python/pull/23, let me know if you want in a clean branch, or squashing is ok on your side

No worries. Already merged.

@haotianw465 looks like I forgot to update changelist.rst and add this as a new unrelease feature

You can have a PR adding this feature to "unreleased".
The other thing I noticed is that since httplib_test monkey patches httplib during test run, it breaks other two tests: requests_test under py2 and pynamodb_test under py2/py3. This is because before adding httplib support, all the SDK patched libraries are independent.  But httplib is a dependency of requests and pynamodb.
The fix is to have some unpatch logic on httplib patcher so that upon httplib_test finish it reverts the module in the runtime to the original one so other tests are not impacted. I'd really appreciate if you have extra time to this fix.
The broken tests also show us how you can deliberately patch httlib (even you don't directly use it) to get more insights for some libraries depend on it. But also this would be dangerous as per https://github.com/aws/aws-xray-sdk-python/blob/master/aws_xray_sdk/ext/httplib/patch.py#L57 this line throws an error if _prep_request is not called. If an upstream library (in this case requests) use its own prepare_request method, this will break. It would be better if xray_data = getattr(instance, _XRAY_PROP) also handles key doesn't exist so that all three methods patched in httplib can be called independently.
These are some useful information I think I could share with you since you mentioned on patching httplib for X-Ray usage.

ya, this module is missing unpatch logic from all the modules, will open a PR with fixes

ok opened https://github.com/aws/aws-xray-sdk-python/pull/24, however I wasn't able to reproduce your second issue in python3, is this a python2 only issue, or specific requests issue?

I'm not sure if this is the one you was unable to reproduce.

seems to be fixed with https://github.com/aws/aws-xray-sdk-python/pull/24/commits/5816eabb1be7e01057811ef1eec38700f9d9cf3e in my new PR

For unit tests unpatch should solve all the problems. My point is that the following patch code
def patch():
    wrapt.wrap_function_wrapper(
        httplib_client_module,
        'HTTPConnection._send_request',
        _send_request
    )

    wrapt.wrap_function_wrapper(
        httplib_client_module,
        'HTTPConnection.getresponse',
        _xray_traced_http_getresponse
    )

    wrapt.wrap_function_wrapper(
        httplib_client_module,
        'HTTPResponse.read',
        _xray_traced_http_client_read
    )

In order to capture the 2nd and 3rd operation correctly, 1st must be called, as 2nd and 3rd operation assumes an attribute _XRAY_PROP set by 1st. This is not an issue for using httplib itself since its standard usage is to call the 1st at the beginning. Just putting a note here, not a blocking issue.

ya I also tested this with requests and reproduced the issue you saw, and fixed with the above commit.  From the impl of HTTPConnection I think it'll always get called or else you'd be rewriting major portions of the underlying class


chore(acir)!: Remove Oracle opcode

Description
Problem*

Resolves #298
Summary*
This PR removes the Oracle opcode as it has been superceded by Brillig foreign calls.
Additional Context

PR Checklist*

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.

Marking as ready-for-review as next release will be breaking.


Lexer still recognizes numbers preceded by '  :  or /  as lit/get-word!  resp. refinement!

This is because the fact that a word cannot begin with a digit is not reflected in the grammar. There should probably be two rules: one for word-starting characters and one for subsequent characters.

Right, I forgot to add a rule for the first word character.

Issue fixed for numbers preceded by ' or :, but / is allowed.


[Icon Size] GBR, RBR & related icon size 20x20

Details

With this PR, we are changing the size of the DotIndicator to be 20x20 in all places in the app. In addition, we also changed the position of the Pencil Icon in the LHN to be adjacent to the Pin Icon instead of being leftmost.
Fixed Issues

$ https://github.com/Expensify/App/issues/17163
PROPOSAL: https://github.com/Expensify/App/issues/17163#issuecomment-1511970208
Tests

Login to ND with account A.
Request money from account B.
Login to ND with account B.
Go to the chat with account A, pin it and type any text as draft.
Check the LHN and ensure that the Green dot, Pencil and Pin Icon are shown in this order. Also ensure that the spacing between them is consistent of 8px.

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

Same as above.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://user-images.githubusercontent.com/54077356/235493904-d775d5a6-36b0-4d89-95f4-dc7e73a0f87c.mp4

Mobile Web - Chrome
https://user-images.githubusercontent.com/54077356/235493919-6d95974b-ea78-4bcf-b18e-2b6dc87f3c01.mp4

Mobile Web - Safari
https://user-images.githubusercontent.com/54077356/235493932-aefda0c4-a028-47fd-99b4-624860e34c01.mp4

Desktop
https://user-images.githubusercontent.com/54077356/235493945-140cae7a-017d-490c-9daf-51ab99114e8f.mp4

iOS
https://user-images.githubusercontent.com/54077356/235493961-c8e88a0e-7f97-4de2-9615-62c0be097406.mp4

Android
https://user-images.githubusercontent.com/54077356/235493969-7a9a95dd-f0ec-48a4-b816-d75966278dca.mp4

@joelbettner @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Good catch on the avatar indicator. I'd be curious to see it at 20x20 so we are consistent. Not a deploy blocker or anything, we just forgot to catch it.
LHN pins look good at 20x20 though.

I think we just leave it as-is for now. For the avatar indicator, it looks like we are just using a shape and not the actual svg for the dot indicator right? Because the svg actually has some negative space baked around the shape and thus the dot appears slightly smaller than 20px. So yeah, let's just leave it as-is.

I think it should be success

🚀 Deployed to staging by https://github.com/joelbettner in version: 1.3.9-12 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Do we have circle skywalking logo (vector)?

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?

Hi, do we have the circle skywalking logo vector(svg)? so it will show properly on the plugin market page :D

You could find from here, https://apache.org/logos/#skywalking.


Alexey-Ben meeting 2020-02-06

Alexey's end date most likely Friday 2/7 (start at GSFC 2/18, take a week off in between).
Projects I'm handing off to other people:

Hector RCMIP phase 2
FoRTE ED2 modeling work
PEcAn at SERC (if funded)

Things to get done before I leave:

"Progress on Hector permafrost" -- need to discuss with Corinne
System / training / documentation for running ED2 for Stephanie, Kalyn, and/or other LTE
Robust PEcAn setup (related to ^^)?

Other things to discuss:

PEcAn meeting in June 2020
PNNL offboarding (is that a word?) process

GlobalC: any interest in contributing further?

GlobalC: any interest in contributing further?

Yes, definitely.
Also, that reminded me of the RUBISCO GPP modeling. At the very least, I'd like to clean up what we have so far so others can build off of it. But I might be able to get some support to work on that at NASA.

I believe we said @ashiklom 's time next five weeks will be roughly:

Hector RCMIP phase 2 - 5%
FoRTE ED2 modeling (documentation, hardening, hopefully training) - 30%
Hector permafrost - 50% (software, producing detailed outline / early first draft)
Rubisco - 10-15%
Make a list of what to document (code, data, processes) and iterate with BBL

@bpbond to initiate outboarding email


bug: tsc : error TS18003: Build:No inputs were found in config file

after installing the nuget package the build fails with:
tsc : error TS18003: Build:No inputs were found in config file 'C:/Users/xxx/.nuget/packages/dexienet/1.0.0/contentFiles/any/net7.0/npm/tsconfig.json'. Specified 'include' paths were '["**/*.ts"]' and 'exclude' paths were '["node_modules"]'.
After creating an empty .ts file in the 'dexienet/1.0.0/contentFiles/any/net7.0/npm/src' it works.

Thanks for the report. I can build fine and get only a warning but those files shouldn't be in the Nuget anyway.Will be solved along with .NET8.0 support in the near future.

Fixed with latest release e56e30c


Update table output for nsg show

To provide a middle ground of information between the json and table outputs.
Often times the json output is too much detail and the table output is not enough.
Example
az network nsg show -n {NSG_NAME} -g {RESOURCE_GROUP} -o table
Gives an output with 5 pieces of information of which you supplied 2 pieces of the information and you probably already saw the rest of the info from a az network nsg list command.
In the above example selecting either the json or jsonc arguments provides a very detailed list of the rules thats hard to use in a summary of the information.

You can filter the data shown using --query.  This can be used to limit the returned info using JSON format or to specify which info you want to display using table format.
Since you cite nsg show in your example, what would you consider the ideal amount of information to display?  The default table formats (using -o table without --query) for each command can be updated in code.

Thanks for responding @tjprescott
For the task specific task I was working on was on some nsg 😁
For that specific command I'd say the same fields that are in the portal would be enough.
i.e.
Priority, Name, Port(s), Protocol, Source, Destination and Action

I believe the command you are looking for then is az nsg rule list … -o table which already has a custom table format. We wouldn't show the rules in the nsg show table because we don't have the capability to display tables within tables, which this would require.

@tjprescott Uhhhh no.
az nsg rule list … -o table is not what I'm looking for at all.
I don't need to see a list of nsg's I need to see a summary of the rules of a specific nsg. There's no nested tables. Just a single simple table with a summary of the rules that are in a nsg.

That's what az nsg rule list does...

Sorry - I just re-read your message (need more coffee I guess)
Yes az network nsg rule list -g {ResourceGroup} --nsg-name {NsgName} -o table works! Thanks for pointing me in that direction.
However ^^^^ this is rather convoluted and not obvious esp when az network nsg show -g {ResourceGroup} -n {NsgName} -o json provides you with the list of rules in json format. It would be more obvious that switching the output to a table would provide the list of rules instead of having to use a different command path && (slightly) different arguments (--nsg-name instead of -n).


No access to google drive

Hi, I have no access to google drive for the trained model, could you please give me a hand?

Found it in issue #16.


Defining behavior for circuit breaker open state

Problem describe
I need to know the Resilience4j implementation to define the behavior of the CircuitBreaker when it is opened. Here's why
import io.github.resilience4j.circuitbreaker.CallNotPermittedException

factory.create(name).run(block) { e ->
	when(e) {
		is CallNotPermittedException -> // Open
		else -> // Not open
	}
}

I only want to know the Spring cloud circuit breaker interface, not the resilience4j implementation, because I want to be able to easily change to a different implementation in the future.
Solution

When the circuit breaker is open, an exception specifically defined by Spring Cloud Circuit Breaker is thrown.
The result of the CircuitBreaker's run function is encapsulated in a custom Response model, which will indicate whether the CircuitBreaker is open.
The run function of the Circuitbreaker is given a function that is only executed when the CircuitBreaker is open.
There is a way to check the current status of the circuit breaker.

Alternatives
I'm currently using a custom exception to handle the situation when the circuit breaker is open. For more details, you can refer to this implementation: https://github.com/kyle-log/circuit-breaker-without-annotation"

The exception that should be thrown when the circuit breaker is open is CallNotPermittedException.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Thanks for the answer. It seems that CallNotPermittedException is a specific exception used in the Resilience4j framework.
// as is
import io.github.resilience4j.circuitbreaker.CallNotPermittedException;

factory.create(name).run(
    () -> { /* block */ },
    e -> {
        if (e instanceof CallNotPermittedException) {
            // Open
            return DefaultValue()
        } else {
            // Not open
            throw e
        }
    }
);

// to be, (example)
import org.springframework.cloud.client.CircuitOpenException

factory.create(name).run(
    () -> { /* block */ },
    e -> {
        if (e instanceof CircuitOpenException) {
            // Open
            return DefaultValue()
        } else {
            // Not open
            throw e
        }
    }
);

This is to provide flexibility in case the circuit breaker implementation changes to something else..

Sorry I am not following what you are saying


Cannot cd into directory with illegal Windows filename characters (in permitting filesystem)

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
Create a directory whose name contains what Windows would consider an illegal character, e.g. * or :.
Attempt to cd into said directory. You may attempt to \-escape or -LiteralPath it to circumvent the usual bash-esque globbing some cmdlets automatically do.
Expected behavior
Entering the directory

Actual behavior
Set-Location: Cannot find path '*' because it does not exist.
#or
Set-Location: Cannot find drive. A drive with the name 'hello' does not exist.

Error details
No response
Environment data
Name                           Value
----                           -----
PSVersion                      7.4.0-preview.4
PSEdition                      Core
GitCommitId                    7.4.0-preview.4
OS                             Debian GNU/Linux 11 (bullseye)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals

NB that outside of pwsh you may enter the directory successfully, and starting the session directly within it has powershell operate fine otherwise.

I can reproduce it. Note: OS is Linux.
Currently I can use
cd ./aaa: bbb

enters the directory
This should be a bug,
No need "./" Without a colon.

@kasini3000 ah interesting, I mean if this were windows I'd say ./ is a fine workaround, but there's still directories containing * and probably others

I can reproduce it. Note: OS is Linux.
Currently I can use
cd ./aaa:bbb

enters the directory
This should be a bug, No need "./" Without a colon.

I think there is a basic parsing problem. PSDrives like  Function, Alias, Variable, Env  are all separated by a colon.
so aaa:bbb  reads "From the PSDrive aaa but   ./aaa:bbb  reads "From a known starting point on the current drive..
There probably IS a way that if the "No such PS Drive as aaa"  error occurs on linux one can fall back and test for "is aaa:bbb the name of a file or directory" but whether there are reasons it can't be implemented is another question.
When I tested this, I accidentally typed two colons and the work round fails because now it is seeing a provider name.  AND this broke tab completion for directory (which is probably a bug all of its own).
After I removed the :: directory tab completion filled in the single : directory with the leading ./

@Hashbrown777  when you say

-LiteralPath it to circumvent the usual bash-esque globbing some cmdlets automatically do.

PowerShell typically treats [range] ? and * as wildcards, which causes occasional grief (even on Windows where * and ? are not legal in file names but [] are)   and has literalpath to sidestep this.
Sometimes - as in the example above when the wildcard resolves to a single container, things will work. Others where we have Data[20230715] as a name cd  Data[20230715]  will fail, tab expansion will use a single quoted string so
cd  'Data`[20230715`]'

sends the back ticks trough in the string
but cd  *0715* will also work.


[Possible BUG] MJSONWP protocol requires type and ms" and you sent {"script": 1000}

Hello,
What are you trying to achieve?
I'm using Codeceptjs with webdriverio and browserstack (automate) and I’m facing an issue related with MJSONWP endpoint to fetch the timeouts and makes my test suite to crash.
What do you get instead?
Error: Parameters were incorrect. We wanted "MJSONWP protocol requires type and ms" and you sent {"script":1000}

-- FAILURES:

  1) Commit valid answer
       "before each" hook: codeceptjs.before for "Commit a valid answer for an explicit commit block":
     Parameters were incorrect. We wanted "MJSONWP protocol requires type and ms" and you sent {"script":1000}
  rror: Parameters were incorrect. We wanted "MJSONWP protocol requires type and ms" and you sent {"script":1000}
      at getErrorFromResponseBody (node_modules/webdriver/build/utils.js:336:12)
      at Request._callback (node_modules/webdriver/build/request.js:116:64)
      at Request.self.callback (node_modules/request/request.js:185:22)
      at Request.EventEmitter.emit (domain.js:441:20)
      at Request.<anonymous> (node_modules/request/request.js:1161:10)
      at Request.EventEmitter.emit (domain.js:441:20)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1083:12)

Details

CodeceptJS version: 2.0.4

NodeJS Version: 10

Operating System: Mac OS 10.13

WebDriverIO 5.6.3

Using inside browserstack: appium_version: 1.9.1 (Tried with 1.6.5, 1.7.1, etc...)**

Configuration file:
What I found interesting is that Inside my config file (codeceptjs config file) I do not specify any timeout option.

exports.config = {
  tests: './test_codecept/*.js',
  output: './test_codecept/output',
  helpers: {
    WebDriver: {
      host: 'hub.browserstack.com',
      path: '/wd/hub',
      url: 'http://WEBSITE:8080/renderer',
      user: 'xx',
      key: 'xx',
      browser: 'iphone',
      desiredCapabilities: {
        'os_version' : '11',
        'device' : 'iPhone 8',
        'real_mobile' : 'true',
        'browserstack.local' : 'true',
        'browserstack.debug' : 'true',
        'browserstack.networkLogs' : 'true',
        'browserstack.appium_version' : '1.9.1',
        'browserstack.user' : 'xx',
        'browserstack.key' : 'xx'
      }
    }
  }
}

After failing a few times, I tried to specify a timeout option inside the helper like mention in the w3c WebDriver spec
and didn't work neither, appeared that I was sending an empty object to the sessionId/timeouts.
timeouts: {
  type: 'script',
  ms: 1000
}

After that I tried to setup the timeouts like the error message propose: "type" and "ms", didn't work neither.
timeouts: {
  type: 'script',
  ms: 1000
}

Thanks for reading

Codecept with WebDriver/WebDriverIO/Appium calls defineTimeout after browser starts.
I think, problem in "browser" field. What it you fill it as "safari" ?
Maybe, it's WebDriverIO issue.

@LukoyanovE I tried both options for browser. Interesting is that running tests on Android (same Appium version) works.
I opened an issue on WebdriverIO but they indicated it was a Codeceptjs issue.

@raquelgs, which two options did you use?
Can You place config for android, if it works?

exports.config = {
  tests: './test_codecept/*.js',
  output: './test_codecept/output',
  helpers: {
    WebDriver: {
      host: 'hub.browserstack.com',
      path: '/wd/hub',
      url: process.env.URL,
      user: 'SECRET_USER',
      key: 'SECRET_KEY',
      browser: 'DOESNOTMATTER', // Here we can specify anything, because it's ignored once you are running in BrowserStack.
      desiredCapabilities: {
        os_version: '7.0',
        device: 'Samsung Galaxy S8',
        real_mobile: 'true',
        'browserstack.local': 'true',
        'browserstack.debug': 'true',
        'browserstack.networkLogs': 'true',
        'browserstack.appium_version': '1.9.1'
      }
    }
  }
}

@LukoyanovE I've been checking with webdriverio 4.14.1 and same test on iOS works. Here the traces:
[HTTP]
[HTTP] --> POST /wd/hub/session/a7ed46dd-7a34-4658-aa19-e270b658c622/timeouts
[HTTP] {"type":"script","ms":1000}
[debug] [MJSONWP (a7ed46dd)] Calling AppiumDriver.timeouts() with args: ["script",1000,null,null,null,"a7ed46dd-7a34-4658-aa19-e270b658c622"]
[debug] [XCUITest] Executing command 'timeouts'
[debug] [BaseDriver] MJSONWP timeout arguments: {"type":"script","ms":1000}}
[debug] [iOS] Set async script timeout to 1000ms
[debug] [MJSONWP (a7ed46dd)] Responding to client with driver.timeouts() result: null```

@LukoyanovE Do you have any update? Thanks!

Seems like a bug in appium - https://github.com/appium/ruby_lib_core/issues/128, But the fix itself has landed in 1.9.1 and still the issue exists. Worth a try if you can try with the new appium release.

Hi, Is this issue resolved?

@lokesh-rj I still need to try with appium latest release. Without having investigated more, using same appiume version (1.9.1) with webdriverio 4 it was working fine

@lokesh-rj @raquelgs any updates on this? We are using Sauce Labs and I reached out to their support team and they seemed to say the same thing that it was a bug in CodeceptJS.

@danieltisdale I was not able to try with a version higher than 1.9.1 (no device available with this version, I've contacted Browserstack support team)

@raquelgs : is this issue resolved?
I'm facing the same issue in IOS devices, but the same code is working in Android.

I have the same problem.
@raquelgs what does the BrowserStack support answered, could they help you to fix it?

@pablopaul copy&paste of their response:
To execute the tests on iOS, XCUITest driver is used, however, to execute the tests on Android, Appium Driver is used. From the Appium Logs, I observed that the client bindings at your end are sending the request in W3C mode, however, WebdriverIO understands the request in W3C mode, only when Appium Driver is used. Hence setting timeouts is being executed successfully on Android since to execute tests on Android, Appium driver is used and to execute tests on iOS, XCUItest Driver is used. Hence, using WebdriverIO, you are able to set the timeouts when running the test on Android device, whereas setting the timeouts on an iOS device, throws the error 'Error: Parameters were incorrect. We wanted "MJSONWP protocol requires type and ms" and you sent {"script":1000}'.

thanks @raquelgs I am confused now :)

Hi,
We still have this issue active. When I tried to remove timeouts from WebDriver helper, Things seems to be working fine. Can someone help me to close fix this?

Seeing this issue when testing on Sauce Labs iOS Real Devices (aka TestObject)...

@michaeldrews which Appium version is running on Sauce Labs in your case?

@pablopaul seeing this when using Appium 1.9.1 and 1.13.0

thanks @michaeldrews , I expected this to be resolved on iOS with Appium version later then 1.9.1.
Why? Because Android with Appium 1.12.1 is running fine with CodeceptJS and BrowserStack.

@michaeldrews can you please double check the Appium version on iOS you used?

@pablopaul @michaeldrews
With Saucelabs
1.9.0' -> Error: Appium version '1.9.0' is not available for 'WEB' apps on 'IOS'
1.9.1 /1.13.0->  Parameters were incorrect. We wanted "MJSONWP protocol requires type and ms" and you sent {"script":1000}
FYI: Saucelabs has 1.13.0 as default Appium version

I digged deeper.
I tested Appium 1.9.1 with CodeceptJS locally running a test on iOS works fine, this seems to be a BrowserStack and Appium specific problem.
I contacted BrowserStacks support but I do not expect a fix in short time.
Maybe its time to report the issue in the Appium repo, maybe they can fix it - but as there is only a "old" Appium version 1.9.1 available on BrowserStack, this also would not really solve it by now. Difficult.

I also created an issue in the Appium repo as I am unsure where the fix need to happen: On BrowserStack side or on Appium side?
See https://github.com/appium/appium/issues/12991

For reference https://github.com/webdriverio/webdriverio/issues/4273

I did the following patch mechanism to temporarily fix this issue in our side:
Added "postinstall" to the "scripts" objects in the package.json:
  "scripts": {
    "postinstall": "patch-package"
  },

Install "patch-package" via  npm i patch-package --save-dev
Remove  the following lines from node_modules/lib/helper/WebDriver.js:
      timeouts: {
        script: 1000, // ms
      },

Run npx patch-package codeceptjs.
Commit the changes and the new patch file and start running your iOS tests on BrowserStack :)

@pablopaul , with this new patch added in your previous reply, will this work on Sauce Labs also on Appium 1.13.0?

@prasadam: Yes, It does work.

Just landed here after a bit of Googling. I might not be addressing the right version.
I experimented with specifying the helper like so:

config.helpers = {
  Appium: {
    host: 'hub-cloud.browserstack.com',
    port: 4444,
    user: BROWSERSTACK_USERNAME,
    key: BROWSERSTACK_ACCESS_KEY,
    platform: 'iOS',
    url: 'https://padlet.com',
    desiredCapabilities: {
      'bstack:options': {
        osVersion: '11',
        deviceName: 'iPhone 8',
        appiumVersion: '1.11.1',
        userName: BROWSERSTACK_USERNAME,
        accessKey: BROWSERSTACK_ACCESS_KEY,
        local: false,
        realMobile: true,
      },
  },
  REST: {},
  BrowserstackHelper: {
     require: 'codeceptjs-bshelper',
     user: BROWSERSTACK_USERNAME,
     key: BROWSERSTACK_ACCESS_KEY,
     shortUrl: false,
  }
}

In the config, I explicitly specified the appiumVersion and didn't need to patch node_modules/codeceptjs/lib/helpers/WebDriver.js or node_modules/codeceptjs/lib/helpers/Appium.js. (At first I did, and I later removed the patches to see if the config still works). Seems to work. YMMV.
This is on CodeceptJS version 2.3.0, webdriverio version 5.12.4, codeceptjs-bshelper version 1.1.4.

Yeah using the "W3C protocol" instead of "legacy protocol" of BrowserStack fixes this issue for me as well. See the above example from @quekshuy how the new "W3C protocol" for BrowserStack looks like, I close this issue for now.


Unable to see export JSON option

Describe the bug
In the docs (https://docs.langflow.org/guidelines/features), I see there should be a button to export the current flow as a JSON file.
However, I do not see this button. I do see a 'Share' button, but it is disabled with the hover text: "Please review your API key."
Not sure what I need to do. I am able to run the flow fine, so my API key is working correctly.
Browser and Version

Browser: chrome
Langflow version: 0.6.2

To Reproduce
Steps to reproduce the behavior:

langflow run
Go to a flow
Don't see Export button

Screenshots

Hello @shimizust,
Thank you for bringing up this issue, and we appreciate your collaboration.
I've addressed the problem in hotfix #1237, and it will be available for you shortly. If you encounter any further issues or have additional feedback, please feel free to let me know.
Thank you once again for your contribution and patience.
Best regards,

@ogabrielluiz  This issue was not fixed by your commit, and the "Export" button is still not shown in latest v.0.6.3.
The button should show without any condition, as "Import" button.

@ogabrielluiz This issue was not fixed by your commit, and the "Export" button is still not shown in latest v.0.6.3. The button should show without any condition, as "Import" button.

Hi @qdaoming,
Did you checked in the correct branch? This fix was introduced on "main".
Thank you.

Thanks @Cristhianzl !

@ogabrielluiz This issue was not fixed by your commit, and the "Export" button is still not shown in latest v.0.6.3. The button should show without any condition, as "Import" button.

Hi @qdaoming,
Have you ensured that you checked out the correct branch? The fix was implemented on the "main" branch. Thank you.

Hi @Cristhianzl
Thanks!
But this fix is integrated into v0.6.3 from its release notes at: https://github.com/logspace-ai/langflow/releases/tag/v0.6.3
So its release note is incorrect?

Hey!
The main branch is the last released version. I think that is what he was referring to.


Implement a mechanism for setting script variables

Some Lua scripts (e.g. the NEB example driver) have hard-wired
operational variables, such as the number of images, or the NEB spring constant.
A mechanism has been implemented to set those variables externally, through the
use of a 'configuration file' (typically named 'config.lua') and a new
variable environment.
A sample 'config.lua' file is provided for parametrizing 'neb_simple.lua'. Note that
both scripts must be present in the same directory.

Thanks!
My main motivation for the examples was not full fledged scripts for production runs. Merely examples.
I would like not to obfuscate the examples with another configuration file like this. However, your configuration environment could go in the flos package it self if people want to?
Let me note that using configuration files is quite easy in lua:
t1.lua:
t = "Foo bar"

t2.lua:
dofile("t1.lua")
print("Hello ".. t)

then do lua t2.lua and you'll see:
$> lua t2.lua
Hello Foo bar

This is basically equivalent to source in shell scripts.
In your example a user edits the configuration file, or they edit the top of the driver program, either way an edit is necessary.
I would prefer to have stuff directly in one file and then just document that at the top. So moving the variables to the top would be better. Wouldn't this be clearer and less error-prone? I.e. if the get_env provides defaults then it is another layer of debugging that seems a bit unnecessary for these small cases?

Sure, an advanced sub-directory sounds like a good idea!

@albgar note I have changed the (main) branch name to main. This is the new default for github, and I have changed it accordingly. :)

I will be creating a new pull request, as I rebased my branch...