Navigation scoring plugin port

Port of the navigation scoring plugin to new Gazebosim / ros2.
Requirements

Gazebosim must be installed from source.
Gamepad is needed for WAMV teleop.

Preparation
The following adjustments must be made to the individual repositories within the gazebo workspace before building:
gz-fuel-tools

Make sure gz-fuel-tools is checked out to commit 7b6ce8a4ab4cbfd724eefba7f2e57892671abfc0cd gazebo_ws/src/gz-fuel-tools
git checkout 7b6ce8a4ab4cbfd724eefba7f2e57892671abfc0

Previous commits may work, but the 2 subsequent commits have a bug that will cause a runtime crash.

enable teleoperation

We need to teleoperate the WAMV to make sure the gates are doing the right thing. This requires functionality that has not yet been merged from v6 to v7, so we need to use the 6-to-7 branch:cd gazebo_ws/src/gz-sim
git checkout 6-to-7-20221021

rebuild
After making the above changes, rebuild gazebo:
cd ~/gazebo_ws
colcon build --merge-install

Some warnings are expected. Building a second time should produce no stderr output.
Build
In a separate terminal, checkout the M1chaelM/navigation_scoring_plugin branch and build it:
cd ~/vrx_ws/src/vrx
git checkout M1chaelM/navigation_scoring_plugin
cd ~/vrx_ws
GZ_VERSION=garden colcon build --merge-install

Again, some warnings are expected for the first build.
Run
Open three new terminals. In each, source the Gazebo and VRX workspaces:
cd vrx_ws
source ~/gazebo_ws/install/setup.bash
. install/setup.bash

Run the simulation in one terminal:
ros2 launch vrx_gz competition.launch.py world:=navigation_task

Run teleop in a second terminal:
ros2 launch vrx_gz usv_joy_teleop.py

Echo the task/info topic in the third terminal:
ros2 topic echo /vrx/task/info

Test

Wait for the task to enter onrunning state.
Use the gamepad to drive the WAMV through the gates in the course.
Check that a "New gate crossed!" message is printed to terminal each time a gate is crossed.
Check that the simulation exits after all 3 gates are crossed.
Check that the score printed in the vrx/task/info message is reasonable. It should be equal to the elapsed time between the crossing the entrance gate the exit gate.
Check that crossing a gate out of order terminates the task.
Check that crossing a gate in the wrong direction terminates the task.

Known issues

The WAMV does not lock, so it is possible to drive through the first gate before the simulation enters the onrunning state. This will cause the gate to be ignored. Passing a second gate will then be treated as crossing a gate out of order, which terminates the simulation.
Currently the entire simulation terminates the moment the task is over. In Gazebo Classic, my memory is that it stayed up but  just froze in place.
If we use this task again we may want to revisit how we calculate the score. Starting the timer at the entrance gate seems odd.

Looks like the relative position of the gate is not being calculated correctly in the IsPoseInGate method, here:
const math::Vector3d robotLocalPosition =
    this->pose.Rot().Inverse().RotateVector(_robotWorldPose.Pos() -
    this->pose.Pos());

Either this transformation is not working for some reason, or the gate pose is wrong (or the vehicle pose, but this seems less likely).

It appears that the problem is related to our nested course model. The function:
auto leftMarkerPose = _ecm.Component<gazebo::components::Pose>(
    leftMarkerEntity)->Data();

returns the relative pose of the marker inside the course, rather than the pose in the world frame. I assume there is a way to ask for the pose relative to the world instead. It looks like this should be simply:
auto leftMarkerPose = _ecm.Component<gazebo::components::WorldPose>(
    leftMarkerEntity)->Data();

This compiles, but when I go to run it the simulation mysteriously shuts down right away.
@caguero or @j-herman do you know what's going on here? Or what is the right way to get the world pose of a nested model?

@M1chaelM I am accessing world pose info for nested models via the Link wrapper rather than directly via the ECM.  I don't have that part of the code working yet, so I can't verify that it gives good info, but it doesn't crash.  That might be an option, although your code looks like it should work...  gazebo::components::WorldPose is defined right along with gazebo::components::Pose, and so I would think that you should be able to access the component with the same code. (https://github.com/gazebosim/gz-sim/blob/ign-gazebo6/include/ignition/gazebo/components/Pose.hh)
You could also try an alternate function.  This comes from Link.cc:
_ecm.ComponentData<components::WorldPose>(this->dataPtr->id);
It returns std::optionalmath::Pose3d so you'd need to extract the information.

This is now working and is almost ready to be ported over to Garden. I have 3 hopefully quick questions to resolve first:

The "New Gate Crossed" message, which is printed using ignmsg << "New Gate Crossed does not display until the plugin has exited. Is there some flush command or something needed to get it to print immediately?
I'm confused about the the silent attribute of the NavigationScoringPlugin class. Do we need this or should it be part of the parent ScoringPlugin class instead?
I'm not sure what the GZ_ASSERT macro was doing here. Is there a version that works for the new Gazebo, and do we need it?

@caguero If you have a moment could you take a look at the above questions? I think they are all relatively minor but just want to get them resolved.

This is now working and is almost ready to be ported over to Garden. I have 3 hopefully quick questions to resolve first:

The "New Gate Crossed" message, which is printed using ignmsg << "New Gate Crossed does not display until the plugin has exited. Is there some flush command or something needed to get it to print immediately?
I'm confused about the the silent attribute of the NavigationScoringPlugin class. Do we need this or should it be part of the parent ScoringPlugin class instead?
I'm not sure what the GZ_ASSERT macro was doing here. Is there a version that works for the new Gazebo, and do we need it?

@caguero If you have a moment could you take a look at the above questions? I think they are all relatively minor but just want to get them resolved.

GZ_ASSERT is defined in gz-common with #include <gz/common/Util.hh. It works the same way as in Gazebo classic. If the condition isn't true, execution terminates with the associated message. Note that asserts are ignored when the code is compiled in release mode.
I see the silent attribute in the base scoring plugin already. It looks like we could remove all these print messages and the silent member from the Navigation plugin.
I'm actually not sure about why gzmsg doesn't flush the messages...

The "New Gate Crossed" message, which is printed using ignmsg << "New Gate Crossed does not display until the plugin has exited. Is there some flush command or something needed to get it to print immediately?

I think this may actually make it flush and output to the console:
ignmsg << "some msg" << std::endl;
std::cout << std::flush;

@caguero and @iche033 Somewhere in the switch to Garden I lost the ability to drive the WAMV. I've tried the following:
ros2 launch vrx_gz usv_joy_teleop.py

This runs and seems to be responding to the gamepad, but in an unexpected way. All I can do is change the angle of the thrusters. I can't apply thrust.
ros2 topic pub /wamv/thrusters/left/thrust std_msgs/msg/Float64 "data: 1.0"

This runs without error but the WAMV doesn't respond.
gz topic --pub "data: 1.0" --topic /wamv/thrusters/left/thrust --msgtype Double

This also runs without error but the WAMV doesn't respond.
Do you have any suggestions for troubleshooting?

That's expected until we forward port https://github.com/gazebosim/gz-sim/pull/1681 to Garden.

@caguero and @iche033 Somewhere in the switch to Garden I lost the ability to drive the WAMV. I've tried the following:
ros2 launch vrx_gz usv_joy_teleop.py

This runs and seems to be responding to the gamepad, but in an unexpected way. All I can do is change the angle of the thrusters. I can't apply thrust.
ros2 topic pub /wamv/thrusters/left/thrust std_msgs/msg/Float64 "data: 1.0"

This runs without error but the WAMV doesn't respond.
gz topic --pub "data: 1.0" --topic /wamv/thrusters/left/thrust --msgtype Double

This also runs without error but the WAMV doesn't respond.
Do you have any suggestions for troubleshooting?

That's expected until we forward port gazebosim/gz-sim#1681 to Garden.

Ah, OK. I think we should probably do that before merging this PR then. Otherwise it is difficult to test that we are correctly detecting when the WAMV passes through a gate.

I took the liberty of making some minor changes in b10ae43.

Thanks! If we have time I'd like to ask you about a few of these tomorrow.


Various updates and clarifications

Added teEnable control bit and renamed iEnable/dEnable to iTracing/dTracing
Enumerated privilege level encodings
Added vscause, vstval and vstvec
Clarifications around signal group replication
Clarifications around trigger on/off behaviour

Merged with Iain's changes


Rendering preview is not working when item is not published

The url used to rendering a preview of an unpublished page is
http://domain/?dtgePreview=1&nodeId=1949 which results to a redirect ?
If the item is published http://domain/1949?dtgePreview=1 is working.
Do we miss something in the Actionfilters or in the setup ?

@cmwalolo Which version are you using, the latest, v0.4.0?
The preview doesn't really work with unpublished pages - it's a flaw in the preview mechanism, (we'd love to rewrite it, if we had the time).  We did add a fix in v0.4.0 to prevent it falling over if the unpublished page tries to redirect.

Hi,
0.3.0.  I guess we should already start with the upgrade. Could it be solved by launching the rendering in preview mode as it does with the "Preview button" on the item ?

Closing this specific ticket.  The issue still remains, but want to combine it with ticket #59 - for an overhaul of the preview mechanism.


Components responsiveness (when resizing window)

Hi, I started using Material-ui recently and despite the fact that I am not so much aware of the Material design principles, there is a few components behaviour that does not make sense to me.
Let's take for instance one of the AppBar from the demo page (https://material-ui.com/components/app-bar/#app-bar-with-a-primary-search-field).
When in "desktop view" (> md breakpoint) I can open the user profile "sub menu" by clicking on the avatar icon.
If I resize the window from that point to "mobile view" (< md breakpoint), the app bar links / icons are replaced by the "3 dot icon".
Expected Behavior
The menu would close itself (eventually re-open if resizing back to desktop view)
Actual Behavior
The menu stays open and the anchor is changed.
I am totally aware that I can handle this behaviour and close the menu myself but I can't picture any good use case where the menu would stay open.
Another good example is from the drawer demo page, for instance the Responsive drawer (https://material-ui.com/components/drawers/#responsive-drawer).
Here I start in "mobile view"; I click the burger menu icon in order to open the "temporary" drawer.
Then I resize the window to switch in "desktop view".
Expected Behavior
The "temporary menu" would close (or get hidden thanks to the Hidden component) because the "permanent" drawer is now visible in "desktop" view.
Actual Behavior
It stays opened and if we close it from here, it reveals the "permanent drawer" (which almost feels like a bug)
Again, maybe this is all fine; but I feel that at least the demo examples should behave in a more "expected" way.

@ErnestBrandi Closing as a low-priority.

Still, this AppBar (https://material-ui.com/components/app-bar/#app-bar-with-a-primary-search-field), shows the following warning when mobile menu is open and screen width goes above "md".
Material-UI: The `anchorEl` prop provided to the component is invalid.
The anchor element should be part of the document layout.
Make sure the element is present in the document or that it's not display none.

I believe the example code given is wrong and this
sectionMobile: {
    display: "flex",
    [theme.breakpoints.up("md")]: {
      display: "none"
    }
  }

should be something like this
sectionMobile: {
    display: "flex",
    [theme.breakpoints.up("md")]: {
      visibility: "hidden",
      width: "0"
    }
  }


ts2367 not implemented, unintentional comparison

Currently implementing something for fastify, which can be simplified to:
const b: 'GET' | 'POST' = 'GET'

expectError(b === 1)

✖  534:4   Found an error that tsd does not currently support (ts2367), consider creating an issue on GitHub.
  ✖  534:16  This comparison appears to be unintentional because the types string | (string & Record<never, never>) | HTTPMethods[] and number have no overlap.

And yes I could do
expectAssignable<string>(b)

but it is less expressive imho

Perhaps: expectType<'GET'>(b)?
But just like expectError(b === 1) these lines only proof that TypeScript works as expected. I understand the example you provided is simplified. It made me curious: what are you trying to test?


Let's try to clean it up a bit. Some tests won't go amiss either!

This will be done inside #74


Unable to view project versions inside folders

Test case:

Add multiple projects.
Add multiple folders.
Move the projects inside the folders.
Run oVersion.

I'll fix that as soon as I have some time.

@DamianMorozov  I've tried to fix it, but I couldn't find the issue, I'de appreciate if you can upload a zip file with a test code that contains your structure.


[profiler] add MemProfiler

TODOs:

[x] offline implementation

[x] save to a specific file
[x] show results in CLI
[x] show on TensorBoard

[ ] realtime implementation

[x] trainer hook
[x] save data

The display of TB is shown as follow,


Add a gitter channel for user questions

Not all issues are bugs and maintainers could be overloaded to answer all the questions. It will be convenient to add a gitter channel for user questions where we may help each other.

https://gitter.im/sbt/sbt-assembly


Begin using upstream logs sdk

This will be the first in a series of incremental enhancements that move us in the direction of using logs from upstream (rather than our own implementation).
Two main things in this PR:

Our core log model object is called LogEntry and it is a concrete class with no interfaces. This PR lets that class implement the upstream LogData class. In doing this, it made sense to change the individual spanId and traceId fields to spanContext, which also made sense to make the other change....
Add a new byte field for traceFlags into the ContextAttached events in order to more accurately reinflate the span context.

Following PRs can migrate usages of LogEntry to the interface, and once the direct references are gone we can migrate to the upstream data object.

Does https://github.com/open-telemetry/opentelemetry-java/pull/3880 impact this PR somehow? Should we wait?


update elixir versions for builds

I think we already should not support versions 1.1.x and 1.2.x

Out of interest, why not?
As a library, I think we should support the oldest version we can until we need something from a more recent version.

@andrewtimberlake
I thought about it after this PR #74
String.trim_leading added in 1.3.0 version and now in 1.5.0 deprecated.
In such cases, I think we should not support older versions.


End to end test scripts

Starting a place to store end to end testing via scripts.  I'm open to naming advice for files.

There seems to be two distinct changes here. Is that on purpose? I am guessing it is, one is a drive-by.

Otherwise, this is fine with me, but it's more of a team thing so others will want to comment, possibly @levicook .

@otoolep if by distinct changes you are talking about the "format" commit, it's because with the hooks I have it won't even let me commit without formatting.  I know I could of worked around this, but didn't feel worth it.  A "go fmt" commit is pretty much noise, regardless of the branch/commit it finds it way to.  In general, we should never see them once we all start using the hooks.


Invalid domains

Internationalized Domain Names (IDN) should be converted to ASCII-Compatible Encoding (ACE) form before entering it into the DNS server. The hosts file should only contain ASCII compatible domains.
Sample of invalid domains:
      - discörd.com
      - discördapp.com
      - disçordapp.com
      - minecräft.com
      - rëddït.com

Reference: Internationalized Domain Name (IDN) Conversion Tool - VeriSign

Oh, thanks! These ones were making errors in my scripts :-)
Also, I found some more such non-ASCII domains and replaced them too, and removed duplicates.


Wallet V<IP_ADDRESS> - Major Update

This pull request holds the next major update of the wallet.
This is not yet a release version!
Nisan.

Pull request closed.


Turning on Transfer Audience type on systems site

Hey Jay,
We'd like to be able to turn ON the Transfer audience on http://risd-undergraduate-welcome.risd.systems/ but KEEP IT OFF ON http://congratulations.risd.edu/ until NEXT THURSDAY (4/20/17)
Thanks!
-Carrie

I am closing this ticket since we were ready to turn on the Transfer audience on both sites and I did that this afternoon.
Thanks,
Carrie


Angular ChangeDetection doesn't work

Hi,
does anybody know why the angular ChangeDetection is not working with cordova-plugin-wkwebview-file-xhr? I load data in my angular 9+ project and get the correct response from api but the view can not be refreshed.
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';

import { ICaseLibrary } from '@shared/model';
import { AdminService } from '../admin.service';

@Component({
    selector: 'app-caselibrary',
    templateUrl: './caselibrary.template.html',
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CaseLibraryComponent implements OnInit {
    casesFromDB: ICaseLibrary[];

    constructor(
        private adminService: AdminService,
        private cdRef: ChangeDetectorRef) { }

    ngOnInit(): void {
        this.adminService.getCasesForCaseLibrary().subscribe(
            response => {
                this.casesFromDB = response;
                this.cdRef.markForCheck(); // <== does not work in cordova using the WKWebView
            });
    }
}

As soon as this.cdRef.markForCheck(); is run in NgZone the view is going refreshed:
            this.ngZone.run(() => {
                this.cdRef.markForCheck();
            });

Does cordova-plugin-wkwebview-file-xhr provides its own promise polyfill causing the angular change detection to break? Do I miss something? How to get the angular change detection work without run markForCheck() in NgZone? My angular code is shared between web, desktop and mobile platforms and the change detection should not be run outside of angular zone. Any idea?

Same problem

@kzimny Let me tru to reproduce this issue. Will get back to you.

@manish2788 yes, please fix the issue asap. With the ngZone.run(...) I found a temporary workaround. When I use cordova-plugin-wkwebview without cordova-plugin-wkwebview-file-xhr there is no issue with angular change detection. As soon as cordova-plugin-wkwebview-file-xhr is installed, change detection doesn't work as expected. cordova-plugin-wkwebview cannot deal with http cookies, that the reason why I installed cordova-plugin-wkwebview-file-xhr. What causes the misbehavior? There are no errors or warnings in the console.

I think the problem is about the plugin change the reference of XMLHttpRequest and because of this the code added/modify with ngZone is put it out.
I think to solve this problem we have have to see what ngZone work with XMLHttpRequest and ssee what is missing.

@nicearma ngZone is a temporary workaround.

have to see what ngZone work with XMLHttpRequest

No, cordova-plugin-wkwebview-file-xhr should work without calling ngZone.run(...).

I din't make reference to your code, you can see at https://github.com/angular/angular/search?q=XMLHttpRequest&unscoped_q=XMLHttpRequest that ngZone use the native XMLHttpRequest, so i think the solution at this problem is study the ngZone repository and see the interaction with XMLHttpRequest and compare with the custom XMLHttpRequest.
ngZone add the magic around all kind of JS code (xhr, rxjs, etc - you can see in the repository), normally in angular you dont need to do this.
this.adminService.getCasesForCaseLibrary().subscribe(             response => {                 this.casesFromDB = response;                 **this.cdRef.markForCheck();** // <== Normally Angular doesn't need this, only if you use functions that ngZone doesn't add the magic, like one special async function, normally all rxjs functions have the ngZone detectors             });
I think one simple test could be to add the js this plugin before the ngZone JS and see if work like it should
You can see more about the interaction with ngZone here See https://github.com/angular/angular/blob/698b0288bee60b8c5926148b79b5b93f454098db/packages/zone.js/lib/browser/browser.ts#L95

Thank you for the hints. If you use changeDetection: ChangeDetectionStrategy.OnPush, in your component this.cdRef.markForCheck(); is needed to refresh the view.

I'm having the same issue with Angular 9. Forcing refresh by interacting with the app will trigger an update. It would be very nice to have a fix, this plugin will saves us a lot of trouble.

@manish2788 any chance to get the plugin work with angular ChangeDetection?

Hi @kzimny,
Will it be possible for you to share a sample angular app which demonstrates the erratic behaviour pointed by you.

Hi @manish2788 , here's a demo app that expose the problem, i've added the necessary to the readme to be able to setup and start both web and cordova version so you can compare. The Angular build has sourcemap enabled, app.component.ts is the one that trigger the call and should refresh it's view at the same time.
https://github.com/ygodin/cordova-angular-refresh-problem

Thank you. Your example should work on android in windows environment but it doesn't in my case. When I start cordova run android on the app loads. The message LOADING does not disappear. npm run web doesn't work on windows. I get the message Cannot GET /. If the oracle guys work on windows your example will probably not work for them.

@kzimny the refresh problem happen only on IOS, this plugin doesn't replace xmlhttprequest on Android so no refresh problem. Not the point of this issue i think, but after adding the android platform (not included in the setup.sh) it works fine.
For the web version it might have something to do with the base path, i'll check.

@ygodin agree that the problem does not exist on android platform. But that's the point. Your example doesn't work on android on my side. The message LOADING does not disapper on android running on windows environment. Hope it works for oracle guys.

@kzimny Do you see any error in the debugger ?

Cordova 9.0.1, I found that it works fine on real device bot not on android emulator. Maybe something is wrong with my emulator settings. Anyway, android was newer a problem. The problem exist on iOS. Hope @manish2788 can find the solution soon.

@kzimny i just pushed a fix for the windows web version, the baseDir had to be changed so it works on both platform.

In the meatime, here's how we fixed it, we load this service at the root level of our app, this catch everything, not only HTTPClient. From what i see it looks like a race condition between the plugin polyfill and zone, both trying to patch xmlhttprequest.
@Injectable()
export class XmlHttpRequestWkwebviewPatcher {
  constructor(
    private readonly appRef: ApplicationRef,
    @Inject(WINDOW) private readonly window: Window,
    @Inject(DOCUMENT) private readonly document: Document
  ) {
    if (window.cordova && document.URL.includes('ionic://')) {
      const origOpen = XMLHttpRequest.prototype.open;
      XMLHttpRequest.prototype.open = function() {
        this.addEventListener(
          'load',
          () => {
            setTimeout(() => {
              appRef.tick();
            });
          },
          {once: true}
        );
        origOpen.apply(this, arguments);
      };
    }
  }
}

Thanks for sharing the app and relevant informations. Will get back upon this.

In the meatime, here's how we fixed it, we load this service at the root level of our app, this catch everything, not only HTTPClient. From what i see it looks like a race condition between the plugin polyfill and zone, both trying to patch xmlhttprequest.
@Injectable()
export class XmlHttpRequestWkwebviewPatcher {
  constructor(
    private readonly appRef: ApplicationRef,
    @Inject(WINDOW) private readonly window: Window,
    @Inject(DOCUMENT) private readonly document: Document
  ) {
    if (window.cordova && document.URL.includes('ionic://')) {
      const origOpen = XMLHttpRequest.prototype.open;
      XMLHttpRequest.prototype.open = function() {
        this.addEventListener(
          'load',
          () => {
            setTimeout(() => {
              appRef.tick();
            });
          },
          {once: true}
        );
        origOpen.apply(this, arguments);
      };
    }
  }
}

@ygodin can you specify any details on how to use/load this service?

Thanks for sharing the app and relevant information. Will get back upon this.

@manish2788 is there any progress on this?

@sanket-bhalerao Hi Sanket, We are working on the reported issues. Next week we be sharing the updates.

@manish2788 any updates on this?

@sanket-bhalerao We have been verifying the sample app provided by @ygodin.
@ygodin I was not able to replicate the behaviour you mentioned in Read Me file of your repo. Does your repo contains any changes on top of our plugin to resolve the issue.

so there is a simple fix for this.
the only thing which has to be done is applying a monkey patch to RXJs.
so in a HTTP Interceptor:
 @Injectable()
 export class RequestInterceptor implements HttpInterceptor {

    runInThisZone(zone) {
     return function patchedobsverables(source) {
       return Observable.create(observer => {
        const onNext = (value) => zone.run(() => observer.next(value));
         const onError = (e) => zone.run(() => observer.error(e));
        const onComplete = () => zone.run(() => observer.complete());
        return source.subscribe(onNext, onError, onComplete);
       });
     };
  }

so there is a simple fix for this. ✔
the only thing which has to be done is applying a monkey patch to RXJs.
so I have done it inside my HTTP Interceptor for all requests.
// your imports

 @Injectable()
 export class RequestInterceptor implements HttpInterceptor {

    runInThisZone(zone) {
     return function patchedobsverable(source) {
       return Observable.create(observer => {
        const onNext = (value) => zone.run(() => observer.next(value));
         const onError = (e) => zone.run(() => observer.error(e));
        const onComplete = () => zone.run(() => observer.complete());
        return source.subscribe(onNext, onError, onComplete);
       });
     };
  }

constructor(private zone: NgZone) {}

intercept(req: HttpRequest < any > , next: HttpHandler): Observable < HttpEvent < any >> {
    if (window.usingCordova) { // your cordova/platform check here
        req = req.clone();
        return this.zone.run(() => next.handle(req).pipe(this.runInThisZone(this.zone)));
    } else {
        return next.handle(req);
    }
  }
}

so there we are. all request are forced into the right zone and the angular change detection frees correctly. 😄

Plugin doesn't support out of the box fix for Angular. Closing the issue.


Don't index array keys in querystring

Now it'll behave the same way that the querystring does by default and
should work with more parsers.

+1 I think this makes the most sense. We have some breaking changes in master anyways. The fancy querystrings are too unusable by default when working with other services.

@defunctzombie you cool w/ this? Gonna cut a 1.0.0-something release if you are.

@gjohnson yea, I am cool with it.
I don't remember if I merged in the first part of the error refactor (remove arity) but that would be nice to merge for 1.0.0-something.
The rest of the error stuff I have not tackled yet. I want to get close to the success/error behavior of jquery so that it is very clear that no error is a successful response and everything else is an error.


配置 oracle 报错 Got minus one from a read call,code: 17002.

Question
配置 oracle 服务，配置界面一直转圈，docker 容器中报错如下：
org.dromara.hertzbeat.collector.collect.database.JdbcCommonCollect - Jdbc sql error: IO Error: Got minus one from a read call (CONNECTION_ID=37z/8u2BTQ6uzXBWGTOsCg==), code: 17002.
其他客户端连 oracle 没问题；
oracle 版本：19c，docker 部署的

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿

Question
Configure the oracle service, the configuration interface keeps turning around, and the error is reported in the docker container as follows:
org.dromara.hertzbeat.collector.collect.database.JdbcCommonCollect - Jdbc sql error: IO Error: Got minus one from a read call (CONNECTION_ID=37z/8u2BTQ6uzXBWGTOsCg==), code: 17002.
Other clients have no problem connecting to oracle;
oracle version: 19c, deployed by docker

监听其他 docker 安装的 oracle 没问题，可能是有什么限制导致的

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿

It is no problem to listen to oracle installed by other dockers, which may be caused by some restrictions


Encapsulate events JavaScript

There's a small bit of JavaScript that has been used in both _includes/events-card.html and _layouts/events.html that dynamically updates the list of events so that upcoming and past events are organized correctly without having to rebuild the site.
In the starter site I added the events card to the events page as an example. This broke the page because the layout and card were trying to declare the same variables in this JavaScript. For this reason the script needs to be encapsulated in a common script.

Done in commit 8a00615f77f5e3a7fd52ab2325ad791d5647cf0e.


Release Notes Sprintr and update to the developer portal guide

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


false positive

eonline.com -> celebrity news portals
justjared.com -> celebrity news portals
Reference
https://github.com/nextdns/metadata/issues/159

I can confirm all 3 domains from the link above
<IP_ADDRESS>/hosts:<IP_ADDRESS> www.justjared.com
<IP_ADDRESS>/hosts:<IP_ADDRESS> www.justjared.com
Mobile_0_0_0_0/hosts:<IP_ADDRESS> m.justjared.com
SafeSearch/hosts:<IP_ADDRESS> www.justjared.com

<IP_ADDRESS>/hosts:<IP_ADDRESS> www.eonline.com
<IP_ADDRESS>/hosts:<IP_ADDRESS> www.eonline.com
Mobile_0_0_0_0/hosts:<IP_ADDRESS> m.eonline.com
SafeSearch/hosts:<IP_ADDRESS> www.eonline.com

<IP_ADDRESS>/hosts:<IP_ADDRESS> www.thehollywoodgossip.com
<IP_ADDRESS>/hosts:<IP_ADDRESS> www.thehollywoodgossip.com
Mobile_0_0_0_0/hosts:<IP_ADDRESS> m.thehollywoodgossip.com
SafeSearch/hosts:<IP_ADDRESS> www.thehollywoodgossip.com

As I don't see any adult related content on these sites, I would't mind to remove them, But I'll awaits @Clefspeare13's opion for let's say a week before I'll take further action without approval
Screenshots
![image](https://user-images.githubusercontent.com/44526987/80541906-5912b580-89ac-11ea-90dc-f104094f9c33.png)

Thanks! Fixed in 9c2ba36


Fix for Apache Mirror URLs

I have added some minor modification to get one of the closet Apache Mirrors instead of having hardcoded mirrors. That also fixes a 502 Bad Gateway error that the stream-bench.sh script was returning while trying to download the Apache Flink from the URL present in the script.

+1 looks good, just waiting for the CLA bot to mark this as good.

CLA is valid!


feat: Custom keyword validation

Add support for user defined custom keyword validation. The user provides and registers custom validator functions when configuring a JSONSchema.
Custom keyword validators may be used when the user wants to enforce constraints that can't, or can't easily, be expressed in JSON schema.
This PR addresses at least some of the features requested in #379 by @tamasfe as well as my own. The same pros and cons described in #379 apply. The PR also follows the structure of #354, but of course uses validation functions as opposed to sub-schema for validation.
We could collapse the two user implementable validation functions into a single trait, mirroring the internal Validate trait. Implementations would have to sit behind an Arc.
Example usage
use jsonschema::{CustomKeywordDefinition, ErrorIterator, JSONSchema, paths::JSONPointer};
use serde_json::{json, Value};
use std::sync::Arc;

fn validate(
    instance: &Value,
    instance_path: JSONPointer,
    schema: Arc<Value>,
    schema_path: JSONPointer,
) -> ErrorIterator {
    // ... validate instance ...
    Box::new(None.into_iter())
}
fn is_valid(instance: &Value, schema: &Value) -> bool {
    // ... determine if instance is valid ...
    return true;
}
let definition = CustomKeywordDefinition::Validator { validate, is_valid };
assert!(JSONSchema::options()
    .with_custom_keyword("my-type", definition)
    .compile(&json!({ "my-type": "my-schema"}))
    .expect("A valid schema")
    .is_valid(&json!({ "a": "b"})));

Hi @Stranger6667, Do you think this feature PR is aligned with the libraries goals? I can appreciate it might not add value to enough of users to make it the addition and maintenance of the extra code worth it. However, if it is a use case you're interested supporting, I'd be happy to work on any improvements necessary to make it a better fit.

Hey! Thank you for pinging me! I’ll take a look this week

Thank you so much and sorry for my late reply!
I like the simplicity of providing two functions & the API, however, having a trait allows the end user to carry some extra data within a custom struct that implements such a trait. It might make this feature more flexible and cover more use cases. What do you think?

@bnjt
I like the implementation very much! I have a few bikeshedding ideas regarding naming, but I'd like to discuss them later on. The main two points I'd like to discuss are:

Using trait instead of two functions to allow the users to carry some extra data in a struct. What user-facing API could it have? would it be convenient to use?
Extending the CustomKeywordDefinition enum in the future. What use cases could we think of in order to avoid possible backward-incompatible changes? I guess it is an alternative to having a trait

I don't have many specific thoughts about these topics yet, but I'd like to hear your opinion :)
cc @tamasfe As you created #379 I'd love to hear your thoughts as well :)
Tagging @antouhou as the author of #354 and @hadrien-toma & @Arcahub as you reacted on that PR. It would be amazing if you could share your use cases & whether this PR would cover them.

Also cc-in @ryderjgillen as the author of #342 (and @manuschillerdev as you reacted there). Your input is welcome too! :)

As you created https://github.com/Stranger6667/jsonschema-rs/issues/379 I'd love to hear your thoughts as well :)

Thanks, this is along the lines of what I described more or less, if it was up to me I'd take it a step further and not try to restrict it to custom keywords, I'd just have a factory exposed to users that looks something like Fn(schema, path) -> Option<Box<dyn Validator>> that hooks into the compilation process and works for every schema regardless of keywords.
And Validator is pretty much the trait what already exists internally, one more thing I'd add is a catch-all error type for user-provided validator errors.

Hi @Stranger6667, thank you for the response. Apologies for being late on my side.
Re point 1 to use a trait

Using trait instead of two functions to allow the users to carry some extra data in a struct.

I agree. I don't recall, but I think I might have gone that route and then backed out due to needing a lifetime. But a trait is a cleaner approach and I'm sure whatever issue I ran into is solvable.

What user-facing API could it have?

Much like @tamasfe I was thinking a public version of Validate but narrowed down to just

validate(instance, path) -> ErrorIterrator and
`is_valid(instance) -> bool

would it be convenient to use?

IMHO that's a friendly API. We could also provide a trait default implementation for is_valid().
Simple implementations with immutable state are simple. Implementers who want mutable state, would have expend some effort to provide their own interior mutability. But that seems reasonable to me.
Re. point 2 Extending the CustomKeywordDefinition

Extending the CustomKeywordDefinition enum in the future. What use cases could we think of in order to avoid possible backward-incompatible changes? I guess it is an alternative to having a trait

I don't have any immediate suggestions, but will give this some thought along with @tamasfe's suggestion to generalize.

Hi @Stranger6667 and @bnjt. Thank you for all your work here! I took a look myself and wanted to make sure this feature would work for my use case, which I describe over here https://github.com/Stranger6667/jsonschema-rs/issues/379#issuecomment-1643959341.
It was 90% of the way there, so I tried to take it the remaining 10% with a PR against this PR: https://github.com/bnjt/jsonschema-rs/pull/1
Please let me know what you think!

Is this feature available to the public yet?
Which version?

@platoscave as far as I know this was never merged to the project. I made a fork a while ago that merged @bnjt's work plus an additional piece I needed for my use case I mention in an earlier comment. The last 3 commits of the fork's main branch show that work https://github.com/samgqroberts/jsonschema-rs/commits/master/. For what it's worth I've been using that version of jsonschema-rs in my production workflow for the past 9 months. I'd be more than happy to re-create @bnjt's PR here based off of my fork – @Stranger6667 would you want that?

Hi, @bnjt @platoscave @samgqroberts and others
I'm working on a model generator from JSON Schema.
Could you please provide some real world application of such custom fields so I could think how to provide ways to handle such situations in my tool?

In my use case I use a custom string format called "currency", defined as 1 or more digit characters followed by a period followed by 2 digits. This is used as an encoding for currency values to ensure no floating point precision losses, and in lieu of a fixed point data type in JSON. The way that I use the custom keyword validation requires the feature that I added on my fork that allows overriding existing keyworld validation with custom logic, and I do that to override the traditionally numeric keywords minimum, exclusiveMinimum, maximum, exclusiveMaximum, and multipleOf to apply also to strings if the format is "currency".

@platoscave as far as I know this was never merged to the project. I made a fork a while ago that merged @bnjt's work plus an additional piece I needed for my use case I mention in an earlier comment. The last 3 commits of the fork's main branch show that work https://github.com/samgqroberts/jsonschema-rs/commits/master/. For what it's worth I've been using that version of jsonschema-rs in my production workflow for the past 9 months. I'd be more than happy to re-create @bnjt's PR here based off of my fork – @Stranger6667 would you want that?

Yep, it would be amazing to have! :) Thank you
FWIW, I will get back to working on this crate rewrite somewhere mid-April and will incorporate all the new changes in the new version :)

@Stranger6667 I've put a copy of this PR + my additional commit up here #473, happy to work with you to get it in

@samgqroberts it's a nice application. If I'd made it myself using only standard schema, I'd use integers (fixed decimal point emulation) for that role or created a string type with a pattern (as floats won't transfer values exactly for all languages) with extra validation in code. I worked in few various projects where the same problem has ben solved in these 2 ways. The only downside of fixed point values is lack of extensibility if you'd want to add more digits than 2 at the start after the decimal dot.


Upgrade to phpseclib 2.0

I have updated the tests.

I have removed the base_64 encoding and it works as it should.
The config-https-option is set to false, so the requests are in the old way.

Looks like some of the test requests are still done with SSL.

testIndex
testApiPostCredentialsAndGetLinkToPasswordPage
testApiPostCredentialsEmpty

All tests are requesting the ssl-routes, excepting one, which is expecting the redirect to https.


Improve speed of pow function of polynomial_dfs.

As suggested by @Zerg1996, our field elements have pow functions, and it's faster to take the power for each element of polynomial, rather than use polynomial_dfs multiplication operator multiple times to compute the power.
Here's a description of how the powers are taken: http://koclab.cs.ucsb.edu/teaching/cs154/docx/Notes7-Montgomery.pdf

https://github.com/NilFoundation/crypto3-math/blob/50707f825548ba2c5f3990d18db8049ba4abf5cc/include/nil/crypto3/math/polynomial/polynomial_dfs.hpp#L638
Instead of this, just resize the current poly, and call pow function for each element.


remove unnecessary escaping for Adelie logo

Sadly, a logo comprised largely of characters that need to be escaped looks really weird on flashfetch.
I was responsible for the PR to hyfetch that resulted in Adelie being added, so it seemed I should clean up on fastfetch also.
I trust this will prove useful.

Thanks


Filter flake message for install_git_public_https_missing_commit on win32

e.g. https://github.com/astral-sh/uv/actions/runs/8472074279/job/23213407254


Sort alerts in correct order

This PR adds unit tests on top of #1339.

cc @tzz

That's at least 10 times better than my code :) Thanks for giving it so much thought.


PoS for Huawei

Add PoS for huawei

Enabling Modbus TCP/IP for Huawei Inverters
Guide for Dongle Users:
For users with a dongle, refer to the Huawei Modbus TCP/IP Guide for detailed instructions.
Without Dongle:
Discussions on the Huawei forum suggest that Huawei is no longer exposing Modbus TCP/IP on port 502 via the integrated inverter WiFi, limiting access to this functionality exclusively to those using their dongle. However, there is a known workaround for overcoming this restriction.
Workaround for Connection Issues:

Device Commissioning Access: Use the installer password to connect to your inverter.
Navigate to Settings: Proceed to Settings → Communication Configuration → Router Connection Settings.
Select WiFi Access Point: Identify and select your local WiFi access point.
Input WiFi Password: Provide the password for your WiFi network.
Enable Local O&M: Ensure to check the "Local O&M" option. "O&M" stands for Operation and Maintenance.
Connect: By clicking connect, you initiate reconnection to your access point, which results in opening port 6607 on the local LAN.
Verification: Post-reconnection, the "Local O&M" option might seem disabled, but port 6607 should now be open and operational.

It's important to note that the inverter uses Modbus device address 0, as opposed to the dongle's device address 1. This distinction is crucial when attempting to connect to or read registers without a dongle.
This workaround has successfully unblocked Modbus TCP port 6607, enabling data communication over the local LAN.
Is Modbus TCP/IP just moved to port 6607? 🤔


home-assistant: 0.92.2 -> 0.93.2

Motivation for this change
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

It seems the asynctest bump leads to one mitmproxy check failing:
Result of nix-review pr 61754

1 package failed to build:

mitmproxy

7 package were build:

home-assistant
home-assistant-cli
python37Packages.aioresponses
python37Packages.asynctest
python37Packages.pyatv
python37Packages.pyhomematic
python37Packages.zeep

The failing test trace:
__________ TestTermLog.test_output[None-expected_out0-expected_err0] ___________

self = <test.mitmproxy.addons.test_termlog.TestTermLog object at 0x7fffeb8d4940>
outfile = None, expected_out = ['one', 'three'], expected_err = ['four']
capfd = <_pytest.capture.CaptureFixture object at 0x7fffeb8cc5c0>

    @pytest.mark.usefixtures('capfd')
    @pytest.mark.parametrize('outfile, expected_out, expected_err', [
        (None, ['one', 'three'], ['four']),
        (sys.stdout, ['one', 'three', 'four'], []),
        (sys.stderr, [], ['one', 'three', 'four']),
    ])
    def test_output(self, outfile, expected_out, expected_err, capfd):
    # ...

@GrahamcOfBorg test home-assistant

@c0bw3b That bump was already merged in #61880.

@GrahamcOfBorg build mitmproxy

It still builds fine on Hydra so I guess my local test was a transient failure...


more options to parse

Maybe, if @reynir has some time, could do a review? Thanks a lot.

I pushed some changes.
About comments, it seems you can have comments at the end of lines as long as there is whitespace immediately before the #:
bind-interfaces # this is a comment

Otherwise it's not allowed
bind-interfaces# this is an illegal comment

I'm not sure how to adapt the parser for this. I think it's fine to defer that to another PR.

fails in CI, I'll push my changes from my laptop in the morning (I did some changes in lib that I forgot to push)


jQuery

Don't think I'm the only one but one would expect vanilla JS in favor of jQuery these days. I understand the "it's easy" and "get started quickly" aspect of jQuery, and that it's been there for ages - since the beginning of ASP.NET MVC, but surely there must be a different approach now after all these years? Or is it because it is deeply rooted in the ASP.NET MVC/Razor Pages templates/framework that it's still being used?

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

ID: 39b6d0f3-9bc7-d091-0d45-9fc1e2e7aac8
Version Independent ID: 20e7eb53-215b-09ab-205d-d20177221278
Content: Add validation to an ASP.NET Core Razor Page
Content Source: aspnetcore/tutorials/razor-pages/validation.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

The validation was written in jQuery. Most of the Validation is automatic, you don't need to write jQuery.

Not sure I follow..
Read through the first tutorials of Razor Pages and most of the validation code look similar to MVC tutorials with validationsummary etc
Haven't checked the RP validation tutorial.. maybe it's explained there in more detail.

It's nice that it's auto but I still would use client side validation with something that is not jquery.  Is this possible and if so , how?


Child router keeps view alive after navigating away to parent router

I'm submitting a bug report

Library Version:
1.6.2

Please tell us about your environment:

Operating System:
OSX 10.13.6

Node Version:
8.11.3

NPM Version:
6.3.0

JSPM OR Webpack AND Version
webpack 3.12.0

Browser:
Chrome 68

Language:
TypeScript 3.0.1

Current behavior:
We have our application setup in such a way that we have a root route and a couple of child routers which handle navigation in various modules. This has been working well for us so far, but lately we have noticed that we are leaking quite a bit of memory. One of the things we are seeing is that when we navigate away from a view inside on of the modules (which is essentially in a child router) back to the root route, that the view that was loaded in the child router is being kept around.
Expected/desired behavior:
We are expecting the view to go away entirely, rather than being kept around unnecessarily. I've tried to create a gist.run, but unfortunately that seems to be broken right now (as in I can't edit the gist at all).

What is the expected behavior?
I expect the view being loaded into the child router to go away, when we navigate back to the parent router.

What is the motivation / use case for changing the behavior?
Entirely removing the view should avoid leaking memory unnecessarily.

@bigopon I've managed to create a small repro for the issue at https://aurelia-javascript-kqydff.stackblitz.io/. Interestingly enough I'm not seeing the same issue as we're seeing in our application. In the repro when I navigate from child back to home (using the buttons at the top) and take a memory snapshot I don't see the ChildRouter and Child components. But in our application we are actually seeing that it is still alive, and being referenced by the RouterView component. Not sure what's different here, any ideas?

@jmezach My guess is your issue is similar to this https://github.com/aurelia/router/issues/614
Can you verify if bluebird is the issue ?

We are not using bluebird anymore. We used to, but we've moved away from it a couple of weeks ago.

I see your 👍 in this issue https://github.com/aurelia/templating/pull/637 but I'm not sure if you have already applied that fix. Can you apply the following if not:
// in main.js
import { ViewSlot, ShadowDOM } from 'aurelia-framework';

ViewSlot.prototype._projectionRemoveAll = function(returnToCache) {
    ShadowDOM.undistributeAll(this.projectToSlots, this);

    let children = this.children;
    let ii = children.length;

    for (let i = 0; i < ii; ++i) {
      if (returnToCache) {
        children[i].returnToCache();
      } else if (this.isAttached) {
        children[i].detached();
      }
    }

    this.children = [];
  }

@bigopon ;) FYI @dannyBies are on the same team, so I'm very aware of the above fix. I've just applied it locally, but I'm still seeing the issue where our view is being kept around:

Then my next guess is somewhere in your app, not at the root direct child level, you are injecting Router. Though theoretically it should be garbage-collected when the parent route is gone, but I'm not so sure about it, as as long as there is a reference to that injected Router, the view persists.

@jmezach Since it seems that the issue is not intrinsic to the framework, the best thing for your team might be to reach out to either official or third party support to drill into this issue in your production app. Please reach out to me personally if you need help getting help.

It turned out to be an issue where objects were being logged to the console, which kept elements alive unnecessarily. After fixing that we're no longer seeing the Router being kept around.


Critical bug in refund callback processing

There is a typo in the custom query variable handling for "checkout_refund_unique_id". The meta query is missing the "value" key, which results in the value not being considered when retrieving refunds by their unique id. This can result in the wrong refund being processed when the callback is received from Paytrail. We have already encountered several instances of the wrong refund being deleted when a refund cancellation was processed.
https://github.com/paytrail/paytrail-for-woocommerce/blob/7a6cba1dc96197512102b2f6c41da29a5422aeb2/src/Gateway.php#L2226
The current implementation leads to the following SQL query when fetching refunds by their unique id:
SELECT wp_posts.ID
FROM wp_posts
INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE 1=1
AND ( wp_postmeta.meta_key = '_checkout_refund_unique_id' )
AND wp_posts.post_type = 'shop_order_refund'
AND ((wp_posts.post_status = 'wc-pending'
OR wp_posts.post_status = 'wc-processing'
OR wp_posts.post_status = 'wc-on-hold'
OR wp_posts.post_status = 'wc-completed'
OR wp_posts.post_status = 'wc-cancelled'
OR wp_posts.post_status = 'wc-refunded'
OR wp_posts.post_status = 'wc-failed'))
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10

Thanks for reporting @thannus, we will update this asap.


I can't get the variables

When i open the ncfile,I can't get the varialbes
root, is_new = nc.open('/mnt/tmp/a.nc')

root.variables
{}
and then I called " root.getvar('area')"
and showed variables like below:
root.variables
{ 'area': <netcdf.netcdf.SingleNCVariable object at 0x1d67a50>}

How can I get the variables after I opened the NCFile?

Hi, you also should include the root variable as the first argument of the nc.getvar:
area = nc.getvar(root, 'area')

Then, from a SingleNCVariable you can obtain a numpy matrix when you select with squared brakets:
print area[:]
area_squared = area[:] ** 2


Untar app with AppController's permissions

been confirmed on the user installation :+1:

https://ocd.appscale.com:8080/job/Daily Build/857/

@cdonati the run looks pretty good, a part from one test at https://ocd.appscale.com:8080/job/Hawkeye/3111/console. What's your take there? It seems odd that only one failed. Do you think it's the cluster that failed?

I'm not sure if it's the cluster, but I did another run and didn't see that error: https://ocd.appscale.com:8080/job/Daily Build/863/


⚠ Bofrost.lu has degraded performance

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

HTTP code: 200
Response time: 1292 ms

Resolved: Bofrost.lu performance has improved in 805ff01 after 8 minutes.


Full support for nested pydantic, sqlmodel and ormar models

This PR add the following features:

Full support for deriving nested pydantic models (including when using List, Optional, Union and ForwardRef)
Deriving ormar models with relationships (ForeignKey, ManyToMany, and reverse relations)
Deriving SQLModel models with Relationship fields
Strawberry types declarations don't have to follow model declaration order (eg: children can be defined before parents)
Add a new exclude param to the strawberry.experimental.pydantic.type decorator, allowing to include all fields while excluding some

Description
Pydantic
Nested pydantic models should works in most situations, as long as it's GraphQL typed.
Example :
class User(pydantic.BaseModel):
    name: str
    hobby: Optional[List["Hobby"]]

class Hobby(pydantic.BaseModel):
    name: str

@strawberry.experimental.pydantic.type(User, all_fields=True)
class UserType:
    pass

@strawberry.experimental.pydantic.type(Hobby, all_fields=True)
class HobbyType:
    pass

The order in which strawberry types are defined doesn't matter (doesn't have to follow pydantic models declaration order):
class Hobby(pydantic.BaseModel):
    name: str

class User(pydantic.BaseModel):
    name: str
    hobby: Hobby

@strawberry.experimental.pydantic.type(User, all_fields=True)
class UserType:
    pass

@strawberry.experimental.pydantic.type(Hobby, all_fields=True)
class HobbyType:
    pass

Ormar
Omar is an orm that uses pydantic as its base: all ormar models are pydantic models.
ForeignKey, ManyToMany and reverse relations (related fields in Django) are supported.
When using the pydantic decorator to generate a strawberry type, ormar fields will be mapped as you would expect:
class Hobby(ormar.Model):
    name: str

class User(ormar.Model):
    name: str = ormar.String(max_length=255)
    hobby: Hobby = ormar.ForeignKey(Hobby, nullable=False)

@strawberry.experimental.pydantic.type(Hobby, all_fields=True)
class HobbyType:
    pass

@strawberry.experimental.pydantic.type(User, all_fields=True)
class UserType:
    pass

Will gives the following GraphQL schema:
type HobbyType {
  name: String!
}

type UserType {
  name: String!
  hobby: HobbyType!
}

When using all_fields=True it also includes the reverse relation users that ormar automatically created in the Hobby model:
@strawberry.experimental.pydantic.type(Hobby, all_fields=True)
class HobbyType:
    pass

type HobbyType {
  name: String!
  users: [UserType]
}

type UserType {
  name: String!
  hobby: HobbyType!
}

SQLModel
SQLModel is another pydantic-based orm, that uses SQLAlchemy to define models. All relations are defined using the Relationship field:
class Hobby(SQLModel):
    name: str
    users: List["User"] = Relationship(back_populates="hobby")

class User(SQLModel):
    name: str = Field()
    hobby: Hobby = Relationship(back_populates="users")

@strawberry.experimental.pydantic.type(Hobby, all_fields=True)
class HobbyType:
    pass

@strawberry.experimental.pydantic.type(User, all_fields=True)
class UserType:
    pass

Will translate in the following schema:
type HobbyType {
  name: String!
  users: [UserType!]!
}

type UserType {
  name: String!
  hobby: HobbyType!
}

Types of Changes

[ ] Core
[ ] Bugfix
[ ] New feature
[x] Enhancement/optimization
[ ] Documentation

Issues Fixed or Closed by This PR

#1183

Checklist

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Hi @gazorby! Thanks for this PR, I'll try to take a look in the weekend <3

Hi @patrick91!
Will update the doc accordingly once API changes have been finalized

@gazorby thank you so much for doing this! is there any chance we can split this PR into multiple ones? it would make it easier to get things merged 😊

@gazorby @patrick91 I wonder how we could move this forward / split the PR if required. I've used @gazorby 's fork in a POC for a while (the Pydantic features, not ormar or SQLModel) and I feel features like the nested models delivered here are essential for most non-trivial Strawberry implementations using Pydantic.
With the (thankfully!) frequent releases of Strawberry though this is not sustainable for long as we want to uptake the latest features and releases, and some pydantic related code has also been moving again. Would be fantastic to be able to merge the functionality soon.

Hi @alexhafner, thanks for the message, that's great to know! I might need to do some pydantic+strawberry stuff for work so I should be able to take a look at this PR :)
Are you on discord by the way? I might want to ask you some questions regarding this PR 😊

@patrick91 sure thing, I'll message you there

Hi @alexhafner @patrick91
Sorry for being silent here, was busy on other projects.
I think nested model generation is important for any advanced use-case making use of pydantic or any other model-like abstraction. I recently came throught the great expedock/strawberry-sqlalchemy-mapper library that help generating strawberry types from sqlalchemy models, and forked it to add input types generation and full relay support (including pagination) to their already exisiting relay implementation.
I realized that doing the same in strawbrry if this PR was merged would be quite cumbersome as it lacks some way of customizing what's happening during nested generation (eg: define a resolver that would accept a page input and return a connection). Of course we don't to bloat more this PR by adding relay support, but maybe some bindings (decorator param?) to let strawberry users customize how nested types would be generated.

Hi @alexhafner @patrick91
Sorry for being silent here, was busy on other projects.

no worries at all!

I think nested model generation is important for any advanced use-case making use of pydantic or any other model-like abstraction.

Yup, I agree 😌

I recently came throught the great expedock/strawberry-sqlalchemy-mapper library that help generating strawberry types from sqlalchemy models, and forked it to add input types generation and full relay support (including pagination) to their already exisiting relay implementation.

Did you make a PR? would be interesting to see how you implemented it

I realized that doing the same in strawbrry if this PR was merged would be quite cumbersome as it lacks some way of customizing what's happening during nested generation (eg: define a resolver that would accept a page input and return a connection). Of course we don't to bloat more this PR by adding relay support, but maybe some bindings (decorator param?) to let strawberry users customize how nested types would be generated.

Would you be able to write a summary for this?
Also what do you think of splitting this PR in multiple pieces?

Hi! Is this feature development still in active development?

@gazorby  a lot of great work here. Worth breaking down what can be merged straight away into a separate pr?

@gazorby These are fantastic changes! Any chance we can get them merged soon?

hi, I need exclude pls this PR looks great

Unfortunately I have no more interest in deriving strawberry types from sqlmodel/ormar models and pydantic first class support is tracked in #2181.
For anyone willing to iterate from there, initial work is at https://github.com/gazorby/strawberry/tree/ref/simpler-orm-implementation


fix postgresql backup

Crontab was broken and never fired, fixed that and added it to the postgres users crontab instead of sudo -u from roots

This is good for merge, if the sudo reference is actually required. Otherwise best to remove it.


Provide shorter aliases for static factories

From
Tuple.of(1,2,3)
List.of(1,2,3)

To
tuple(1,2,3)
list(1,2,3)

By providing a sort of Aliases like this :
public final class Aliases {

    public static <A, B> Tuple2<A, B> tuple(A a, B b) {
        return Tuple.of(a, b);
    }

    public static <A, B, C> Tuple3<A, B, C> tuple(A a, B b, C c) {
        return Tuple.of(a, b, c);
    }

    public static <T> List<T> list(T element) {
        return List.of(element);
    }

    public static <T> List<T> list(T... elements) {
        return List.of(elements);
    }

   // many more...
}

I like the idea of static importing, but not sure an Aliases would be the place to do it: it would have a very low cohesion.

@ronanM yes, great idea! We have to take case to return the general types instead of special types, e.g. Option.none() and Option.some() return Option etc.
I would place them in javaslang.API (which is generated) instead of Aliases. Maybe we should also provide f1(Function1), ..., f8(Function8) as shortcut for Function1.of(Function1), ...
@paplorinc You are right (low cohesion) but on the other hand it would be great to just
import static javaslang.API.*
and have everything at hand :-)

If we don't want to include all variants for all primitives and wrappers and iterables etc, it might work :)

Yes, we should cover:
Functions

Function0, ..., Function8 - f0, ..., f8
CheckedFunction0, ..., CheckedFunction8 - chk_f0, ..., chk_f8 <-- better names?

Tuples

Tuple0, ..., Tuple8 - tuple(T1), ..., tuple(T1, ..., T8) (but no aliases like pair etc!)

Single-Valued Types

Either - left, right
Future- future (successful, failed would be too confusing, see Try)
Lazy - lazy
Option - option, some, none, nothing
Try - try_ or _try, success, failure
Validation - valid, invalid

Multi-Valued Types

And all collections of the last layer of the following overview (e.g. charSeq, array, vector, (not stack), list, stream, queue, hashMap, ...)

:+1: (btw, the tree should be updated with BitSet and PriorityQueue)

Yes, I will create an issue (or I will forget it...)

The scope changed:
@paploric stated:

public static <T> $OptionType<T> some(T value) {
do we need these?
What's the difference between importing statically Option or API?
I mean these are already available to us by importing Option statically.

This is a valid point. Several types already have the static factory methods with similar names:

[x] controls (Either, Option, Try, Validation)
[x] Future has successful() and failed() (Promise has the same method names...)
[ ] Collections
[ ] Tuples
[ ] Functions

We still have additional problems here - some API is ambiguous, e.g.
// returns a success
public static <T> $FutureType<T> future(T result) { ... }

// returns a failure
public static <T> $FutureType<T> future(Throwable exception) { ... }

It was a design decision to use consequently use of throughout our whole codebase, e.g.

Tuple.of(1, true, "nice")
List.of(1, 2, 3)
Try.of(() -> computation())

Main reasons:

Java also uses the of API. It looks familiar to the user.
Lower case 'constructors' look alien to Java developers.
Scala has companion objects which give use upper case constructors without the use of new - that is what we really want. But the upper-case names are already taken by the Pattern Match API in order to deconstruct objects.
Minor: Static imports are always a few keystrokes more for the developer, even with an IDE.

But: The of notation is not concise enough.
Like @paplorinc said, we do not need to duplicate the existing API. What we really want are shortcuts for the of factory methods only.
I would like to have first char upper-case static factory method names within javaslang.API, e.g.

Tuple(1, 2), Tuple(1, 2, 3, 4)
Function1(obj::methodRef), CheckedFunction1(obj::methodRef)
Try(() -> computation()), Option(value), Future(() -> computation())
List(1, 2, 3)
HashMap(1, "a", 2, "b", 3, "c")

This would go adhere with API.Match() and API.Case() etc.
To this day static factory methods for (most) collection interfaces were out of scope, e.g.

Seq(1, 2, 3)
Set(1, 2, 3)
Map(1, "a", 2, "b", 3, "c")

But maybe it would be nice to have these too.

Q: So, what to do with the names of generated patterns? They will clash with the new API.
A: We will break backward compatibility and change the annotation processor of javaslang-match. We will generate a preceding $ for patterns. This goes adhere with the use of $ for standard patterns like

$() - any
$(value) - equality
$(predicate) - condition

Example:
T result = Match(value).of(
    Case($Tuple($(1), $(true), $("nice")), (v1, v2, v3) -> ...),
    Case($List($(1), $()), (head, tail) -> ...)
);

We determine these specialities:

$Tuple($(Tuple(1, 2, 3)) will contain a $Tuple pattern and a Tuple constructor. Hard to read?
$List($(), $()) deconstructs head element and tail list
List(v1, v2) constructs a List containing two values v1, v2

The bottom line is that this will be a breaking change that will be targeted for 3.0.0
However, the first char upper case constructors can be already introduced but they will raise problems when used in conjunction with the Match API (, e.g. import static javaslang.API.*;).

oh boy, I really love breaking changes :D

Yes, breaking the lib is a hard decision.
I think evolution is not possible without changing existing things. Java doesn't do it. Scala did it in the past but got more conservative. Swift 3 will include many breaking changes to make the language better.
We use semantic versioning. Major versions break things by definition. But major version should not appear often.
Our users need a reliable lib. Having that said, we need to maintain the 2.x streamline. The 3.x streamline will be the next evolution step. I can't foresee all possibilities. Evolution is a feedback-loop considering the outer world.

There is one thing that still bothers me - we will have mixed upper case and lower case factory methods, e.g.

upper case API.Option() but lower case Option.some(), Option.none()

This idea is still unfinished... We need to solve this until 3.0.0

@paplorinc asked:

There is one thing that still bothers me - we will have mixed upper case and lower case factory methods, e.g.

Could you please explain the need for upper-camel? If it's simply to model Scala's companion constructor, we could simply translate that to statically-importable lowercase static factories, e.g. option, some, checkedFunction.
About API, well, it could have a prefix of e.g. $ or _, but still lowercase, e.g. $option.

These are my thoughts:
First view of things: Have consistent/equal naming throughout all Javaslang classes and interfaces
Deconstructors (read: unapply patterns) and constructors are dual. This should be reflected by the name. I think we have two options: both upper- or both lower case. Distinguishing them is mandatory. A prefix should work fine ('$' would integrate well for the patterns).
These are our options:

All methods upper or all lower case, e.g. Some()/$Some() vs some()/$some()
Define all methods within javaslang.API or all within related types or a hybrid solution

Each type has several of and ofAll methods in general. When adding new factory methods we concentrate on of(T) and of(T...).
Looking at Option we will take one of these approaches:

API.Option(T), API.Option(T...) and Patterns.$Option()
API.option(T), API.option(T...) and Patterns.$option()
Option.Option(T), Option.Option(T...) and Patterns.$Option()
Option.option(T), Option.option(T...) and Patterns.$option()

Second view of things: We could define the following in idiomatic Javaslang
I like to just import static javaslang.API.* and then start to write Javaslang using Match, For and almost all of the Values, Tuples and (Checked)Functions.

Static factory methods related to types are lower case and not intended to be imported statically, e.g. we always use Option.some(...) instead of some(...). This would go adhere with of and ofAll.
The javaslang.API is intended to be used as static import only. E.g. we write For and Match instead of API.For and API.Match.
API contains the keywords of the Java slang. These keywords are all upper-case in order to circumvent name-clashes with default Java. E.g. we have For and Try(() -> computation) instead of for and try(() -> computation()).
We would then add also API.Some() and API.None() in addition to Option.some() and Option.none().

In other words Some(...) and Option.some() are different in the way they are used, the former as static import, the latter full qualified. The case indicates the usage.
Patterns are prefixed upper-case, e.g. $Some(...).

May be this issue must be in milestone 2.1.0 as PR?

Right!


Support Git in Git please!

Say we have a main git repository that has sub repositories.  It would be nice if you checked for a git repository in the files directory before you checked for a git repository in the parents directory (or even asked which repository to use.)
This is common for us as our build server has a ports directory that is a git repo but we also store repos we maintain for other projects (like octopress/docker and jekyll-docker.)

Right now the implementation works like this:

get current file path
check if the file belongs to an open project in atom

If it does

check if that project is a git repo

is that repo a submodule

Are you using submodules or just sub repositories?

We use sub-repositories only for this project because git 1.7+ supports repos in repos in repos.  So what happens is this:

https://github.com/envygeeks/docker

https://github.com/jekyll/docker
https://github.com/octopress/docker

Now what would be nice if that if we are in the root of the project then use the projects git repository but if we are ctrl+x on a file and that file belongs to a repo that is in the projects repo, use that repo.
So say I am in https://github.com/envygeeks/docker/tree/master/dockerfiles/jekyll/Dockerfile and I edit something, at that point I would prefer it to commit to https://github.com/jekyll/docker, but when I add all files in the parent of the project, I would prefer it to use https://github.com/envygeeks/docker.
This might be complicated logic because I'm bad at explaining things but hopefully that clears everything up at least a bit.

That makes sense. It is complicated logic and that's actually how the package used to work while atom was still pre-1.0.0. That release of atom allowed opening multiple projects in the same window and I removed all the complex logic to just use what atom was now providing. A solution for what you want is to open atom with atom . */. This will open the parent and all the child directories as their own projects.
I'll explore a way to bring back that old behavior in a clean way though

If you're using proper submodules, then you should be able to do most things now from atom. I made some changes a few months ago that support using submodules.


Authentication Support for Swagger 2.0

Are there any intentions to support authentication based on Security information in a Swagger 2.0 description?

I'd like to but I don't have much time to do so for the moment ...
Feel free to implement it and share :-)

partially implemented in 0.3.5
oauth is not implemented

done in release 0.5.4


Added a file of merge sort algorithm

Kindly review and add the pr to your repository
Assigned Issue Number?
#001
Language Opted?
C/C++/Python/Java/...
Number of files added or updated?
1/2/3
Name of these files?
main folder => sub_folder => ... => ... =>  file.py
example :
Algorithms => Searching => Linear_Search => Linear_Search.py
Checklist

[ ] I was assigned for this otherwise my PR will be rejected.
[ ] I've read the contribution guidelines.
[ ] I've written code by myself. No Plagiarism allowed
[ ] I've referred the correct issue number.
[ ] I've filled up this entire template correctly.

:star2: this repository and support.

this is spam pr for the hacktoberfest event pls tag this as spam


Get class from source  into select2-container

Hello everybody.
I met following: any class of source input will be "copied" to select2-container. This is very usefull when I want to style different instances of inputs - if you want to style select2 alike bootstrap do (for example using classes *-xs, *-lg ).
But there is some exception/issue: classes names starting with "select2" are not copied.
Kind regards.

In 3.x you can use the syncCssClasses setting.  For 4.x, this issue is discussed in #3790.


Background turns black when in full screen on Android Chrome

Background turns black when in full screen on Android Chrome.

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API

This packages has nothing to do with that behavior.


Accessible hashes

This PR makes accessible:
@attributes_hash, @links_hash and @relationships_hash from JSON::API::Resource
@data_hash and @links_hash from JSON::API::Relationship
Motivation:
Hash API is way more generic and can be used directly by Sequel or ActiveRecord for example. Getting these hashes from the JSON::API::Document is much nicer than keeping both JSON::API::Document and whatever hash it originally parsed in your application. You can now pass around JSON::API::Document objects within your application without having to access @the_original_hash_or_json_string as well.
Tests added. Let me know if there is something to be improved or clarified.

Hi @aars, thanks for the PR!
A few remarks:

I'd rather have a to_hash method on the Attributes/Links/Relationships classes (this is just a naming concern).
You might be interested in a proof-of-concept gem I made to tailor jsonapi_parser to Rails needs: jsonapi_parser_rails (which currently just enriches the JSON::API::Resource class with a to_active_record_hash method that takes care of mapping singular/plural relationships to #{key}_id/#{key}_ids.
Regardless, I think you're right, it makes sense keeping the initial hash around for each JSON API object to allow maximum flexibility.

TL;DR: Looks good for merging once the methods have been moved to the collection objects as to_hash.

I've updated the PR. Have a look.
As you might have guessed, I'm not (yet) fluent in Ruby and it's idioms/patterns. I tried to find an elegant solution, let me know what you think and how I can improve it.
Thanks for linking the to_active_record_hash, that gives me some clues on how I could handle the same thing. But I'll figure that out when I need it. Currently I have an Ember Data client and I'm implementing it's requests and requirements as I go. Haven't looked into how it wants to update relationships (or in how far this is manual labor on either client- or server side)
Cheers

Renamed *Array to *Collection
About the mixin: If the hash name changes the to_hash would always have to change, no matter the implementation, right?
Would you prefer a simple def to_hash in the appropriate classes?
I know the ToHash module doesn't add much (now), but this does force the separation of "a class having the to_hash feature" and "this is what the class has available to hash".
In the current implementation we're exposing the original unfiltered, unmodified input. That might not always be the best idea when the JSON::API classes start to filter or represent the original input differently. You would probably want the to_hash to output the same (re-)representation.
The classes itself would then be concerned with providing the hash (be it new or old), and JSON::API::ToHash would provide an interface for outputting the provided hash (@exposed_hash, or maybe a method?).
It would be the interface that your jsonapi_parser_rails would use for example.
Much cleaner than having def to_hash floating around every other class IMHO.
Or, it could very well be a case of premature overengineering :)
What would you like me to do?

Merged master and resolved conflicts.

For now it does seem like over-engineering to me. Plus, we might want to support building JSON API objects in other ways than by parsing a payload, in which case the to_hash method would have to be customized for each object.
So let's have it as simple methods for now, and if it makes sense to factor it out into a mixin down the line, we'll do it then.

Coming up!

Done!

Current implementation ok?

@beauby Ping!

Hey, sorry for the delay, I have been unexpectedly busy lately. Would you mind giving me commit rights on your fork so that I can make some final cosmetic changes and get this merged?

@beauby I've added you as a collaborator. That should be enough, right?
(also sorry for the delay ;) I've been sick.)

Rebased and squashed, will add a few minor changes before merging (probably later tonight or tomorrow). Thanks @aars!

Awesomesauce!

I haven't forgotten about this, will take care of it later tonight!

Took longer than expected, but we're finally there! Thanks for your work @aars.


Add store_action_inputs?-feature

This adds a store_action_inputs?-flag, which will store any attributes/arguments that was passed to the resource action.

Hey @Torkan looks good to me! Please run mix spark.formatter and mix spark.cheat_sheets :)

Great! Done! @zachdaniel

🚀 Thank you for your contribution! 🚀


PATHWAY_COMMONS import fails

ERROR:ebel.manager.orientdb.odb_meta:https://www.pathwaycommons.org/archives/PC2/v13/PathwayCommons13.Detailed.hgnc.txt.gz could not be downloaded!

I could not find v13 in the FTP server , I went with the latest version I could find: https://www.pathwaycommons.org/archives/PC2/v12/PathwayCommons12.Detailed.hgnc.txt.gz


Support minimum JDK of 11+ and minimum of Android API 33+

Per Jakarta EE Platform 10:

Minimum Java SE Version
Java SE 11 or higher

This means that jap-api would no longer be building for JDK 8.  Moving an Android API version 26+ or greater will give access to java.lang.invoke, java.util.Base64, and java.time.  However, all versions prior to Android 13 (API level 33) will be deprecated so we must assume API level 33 Android is required.  API 26+ may be able to run with jar-api but, is not supported and we will close any tickets that are not meeting the API requirements.
Per Meet Google Play's target API level requirement:

Starting on August 31, 2023:
New apps must target Android 13 (API level 33) or higher; except for Wear OS apps, which must target a version between Android 11 (API level 30) and Android 13 (API level 33), inclusive.
App updates must target Android 13 or higher and adjust for behavioral changes in Android 13; except for Wear OS apps, which must target Android 11.
Permanently private apps—which are restricted to users in a specific organization and are intended for internal distribution only—aren't required to meet the target API level requirements.

[snip]

...Furthermore, as of Android 10 (API level 29), users see a warning when they start an app for the first time if the app targets Android 5.1 (API level 22) or lower.

Per Which Java APIs can I use in my Java or Kotlin source code? the API level 32 and API level 33 are versions that support Java 11 source syntax.  API level 34 supports Java 17 source syntax.
The Android API Levels site shows the usage of devices.
/cc @lukasj

https://github.com/jakartaee/jaf-api/blob/master/doc/spec/JAF-2.1-changes.txt
TODO: create a JAF-2.2-changes.txt to cover requirements.

master is on SE 11 already, leaving this open as a reminder to update JAF-2.2-changes.txt


jujud binary version check error

I'm hitting the following sometimes:
2024-05-14 02:03:17,949 253975 ERROR hotsos.plugin.juju [-] requires.YRequirementTypeBinary.result raised the following
2024-05-14 02:03:17,949 253975 ERROR hotsos.plugin.juju [-] caught exception when running requirement: [Errno 8] Exec format error: 'sosreport-foo-00123-2024-04-29-qwhzott/var/lib/juju/tools/machine-70/jujud'
2024-05-14 02:03:17,949 253975 ERROR hotsos.plugin.juju [-] something went wrong while executing check has_affected_juju_binary
Traceback (most recent call last):
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/checks.py", line 152, in result
    result = self.fetch_item_result(item)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/checks.py", line 37, in fetch_item_result
    result = item.result
  File "/home/ubuntu/git/dosaboy/propertree/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/requires/requires.py", line 101, in result
    result = item.result
  File "/home/ubuntu/git/dosaboy/propertree/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/requires/common.py", line 178, in result
    return self._result
  File "/home/ubuntu/git/dosaboy/propertree/propertree/propertree2.py", line 343, in __getattribute__
    return super().__getattribute__(name)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/requires/common.py", line 19, in intercept_exception_inner
    return f(*args, **kwargs)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/requires/types/binary.py", line 52, in _result
    _result = items.package_version_within_ranges(binary, versions)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/ycheck/engine/properties/requires/types/apt.py", line 136, in package_version_within_ranges
    pkg_version = self.packaging_helper.get_version(pkg)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/plugins/juju/resources.py", line 250, in get_version
    return self.version
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/plugins/juju/resources.py", line 176, in version
    return self.machine.version
  File "/usr/lib/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/home/ubuntu/.local/pipx/venvs/hotsos/lib/python3.10/site-packages/hotsos/core/plugins/juju/resources.py", line 75, in version
    out = subprocess.check_output([self.agent_bin_path,
  File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'sosreport-foo-00123-2024-04-29-qwhzott/var/lib/juju/tools/machine-70/jujud'

It's because the sosreport is from aarch64 (ARM), which obviously won't run x86-64.
W're attempting to exec juju --version to get the version which won't be possible.
We can probably get the info by reading the binary.


Move 3rd party libraries to sherpa

I noticed html5-shiv, jquery, lodash and modernizr all checked in to scenery/tests/troubleshooting.  We should delete/move these and use the sherpa ones.

Or move it to the website, since it's main purpose is to be the end-point for report-a-problem?

That makes sense to me.

@aaronsamuel137 is this something you can do (or delegate?)

I'm not sure what is wanted here. @jonathanolson, are you suggesting we actually host these js files on the website or just move them to the website repo?

Right now it's placed under /files (Report a Problem uses "http://phet.colorado.edu/files/troubleshooting/"), so the minimum would probably be to move it to the website repo.
We could also look into ways to improve it.

Just FYI, I probably won't get to this until after my vacation.

I like the idea of serving from the website. Since modernizer and jquery are already on the website, we could delete these altogether and just use the existing versions on the website.
For the other files we could move them to root/js in website and just add "/js/" to the beginning of the script paths. The downside of this would be that it would be harder to test locally. I guess we could also use the whole path of "http://phet.colorado.edu/js/" and then it work either way.
Thoughts on this approach @jonathanolson?

That sounds fine to me.

Moved these js files to website, updated the html file to point to the website files, and copied to figaro. All seems to be working as expected.
Assigning to @jonathanolson  for review.

Looks good, thanks!


fix(wizard): hide the cancel button

Summary

Hide the cancel button unless we're on the first page of the wizards

Change List (commits, features, bugs, etc)

Hide the cancel button if we're not on the first page

Related Issues

Closes IBM/carbon-addons-iot-react#169

Acceptance Test (how to verify the PR)

Verify that the Wizard only shows the Cancel button if we're on the first page

:tada: This PR is included in version 1.42.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.42.2 :tada:
The release is available on npm package (@release-1.x dist-tag)
Your semantic-release bot :package::rocket:


linux-firmware: install lt9611uxc firmware

While we are waiting for lt9611uxc firmware to be accepted into
linux-firmware repo, bbappend respective recipe to download and install
lt9611uxc firmware file.
Signed-off-by: Dmitry Baryshkov<EMAIL_ADDRESS>

lt9611uxc firmware has been accepted into linux-firmware upstream (which got released today). I'd hold this for now and try getting updated linux-firmware into OE-core instead.

lt9611uxc firmware has been accepted into linux-firmware upstream (which got released today). I'd hold this for now and try getting updated linux-firmware into OE-core instead.

@ndechesne
Updated linux-firmware has hit the oe-core, so this PR has been updated and is ready for the review.


Add support for the dot (Graphviz) output format

@0xced It will also be good to escape + signs in the filenames somehow, so it will work fine for categories

Done in #24.


Move sr-only span from data to include to allow expansion of title.

Addressing #29 .

Thank you for fixing this :-) I can confirm that your change eliminates the {{ title }} shown in @ilessing's screenshot, plus 4 others.
1 remains, but I'm not sure why. I checked that it's not due to the & (& in the blog post's title).

No reason to delay this PR, IMHO.
@libcce: Please add a fix #29 into the merge commit message or description so GitHub can do its magic ;-)

Thanks @ilessing for spotting this, @jscaffrey for the PR, and @katrinleinweber for testing! All of you are amazing 😃


v8 Updates

Hello! These are the final changes I have made based on our discussion here
The transition was fairly easy, with the exception of one example: slurm-native. Because the --slurm flag is removed in snakemake>8.0.0, and all cluster support should use the --cluster-generic-*-cmd flags, it didn't quite make sense to re-explain the changes introduced in Snakemake 8.0.0, and I feel the default config.v8+.yaml configuration is a good starting point for slurm
If there's any changes or further updates you'd like to see be done, let me know!

I deleted the v8 branch. Please submit any potential future PRs to be merged directly into main. Thanks again!


communities: enabling search by id

Allows search by id. (closes zenodo/zenodo#91)

PEP8 Fixes.

Signed-off-by: Adrian Pawel Baran<EMAIL_ADDRESS>

Reviewed-by: me

@jirikuncar, thanks for the review. All green now.


add style-elements compatible Attributes

I wanted to use the library for style-elements which does not expose Html.Attribute. I've added two new versions of the draggable and droppable which can be used for style-elements.
Not sure you want to pull in the extra dependency though. If you prefer I can also publish a forked package.

Thanks for taking the time to make a pull request.
I think it's best to keep this as an elm-html only package, so it's probably better to make a separate package. Maybe there is even a better way to integrate with the style-elements Element type, I haven't looked into that.

Created new package, thanks: http://package.elm-lang.org/packages/tilmans/elm-style-elements-drag-drop/latest

Now that style-elements has the toAttr function, maybe this is not needed anymore? http://package.elm-lang.org/packages/mdgriffith/style-elements/3.3.0/Element-Attributes#toAttr

Yes, probably. Won't have time to look at it at the moment but I'll add a note to the project.


My Dyson No longer Showing up in HA ?

OK so  this integration has worked flawlessly for months, So not sure what happened but my device ( Big and Quiet )  is no longer showing correctly I have done the following:
removed the device
Deleted the associated account
Yes I restarted HA
Re-added the device
and re -authenticated the account
Device is showing and all of its entities , however none are available
here is the log, hope it means something to you all ???  Not sure if its isolated to me ???
Logger: homeassistant.config_entries
Source: config_entries.py:809
First occurred: 9:02:28 AM (2 occurrences)
Last logged: 9:02:36 AM
Error unloading entry MyDyson: P-------@ ------.com (CA) for dyson_local
Error unloading entry Living room for dyson_local
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 809, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dyson_local/init.py", line 181, in async_unload_entry
device: DysonDevice = hass.data[DOMAIN][DATA_DEVICES][entry.entry_id]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: '01J6X2SAT65CMGD3V7DK7YN2RQ'

@dotvezz  Any idea on this issue or suggestions ?

Magically started working, IM sure it was isolated to my instance .... Ill leave this up for now


[Feature request] Linux support

Please.

Genious 👏🏻

This is a Windows project. Linux is not in our plan.

https://github.com/microsoft/Terminal/issues/498#issuecomment-490091740 covers some technical reasons for why this would be difficult.

This is a Windows project. Linux is not in our plan.

Uh, https://twitter.com/windowsdev/status/1125476958794539008 has

Sure, you'll be able to launch into any of your WSL distros straight from the new tab drop down, but running on linux is not part of our strategy at this time.

Hey @probonopd, those are WSL instances! The Windows Subsystem for Linux lets you run unmodified Linux distributions (and unmodified ELF64 binaries!) natively on Windows.
Running the terminal on linux is not in our plan. :)

Port this to linux anyways , just need to replace directx with opengl calls.

@v3ss0n It's definitely not "just replace directx with opengl". The entirety of the Terminal UI is written using UWP XAML, which definitely doesn't work on linux, and neither does C++/WinRT. Without both of those, the Terminal won't be possible to port to linux.
The core of the logic might be possible to port, but there's already a plethora of good terminal abstractions on linux.

Thanks , but Graphic accelerated Terminal is very interesting , hope this will spark inspirations on linux

I believe jwilm/alacritty is a OpenGL terminal for linux, if you need a linux terminal.

Don't need to replace DirectX calls. You could use VKD3D to translate them to Vulkan calls. :D
Once it's ported to Linux we will have to figure out how to run doom in it.


Feature/29 market list table

Diff looks funky, not sure what's happeneing here but appears to have all the deal ticket changes in it as well? Maybe just needs a rebase


Getting "Not Found" when wrapping styles in {#if} blocks

Describe the bug
I made a component in SvelteKit that will have different styles based on the data provided.
Part of the conditional styles are some background images that should be one of either two:
The style tag looks like this:
{#if true}
  <style>
  ...
  .branch {
      background-image: url('$lib/assets/ezzeddin-logo-minified.png');
  }
  ...
  </style>
{/if}

Reproduction
With this {#if} block I get the following error that the image doesn't exist, because somehow the compiler takes in the image url string as is and doesn't link to the actual image:
Error: Not found: /$lib/assets/ezzeddin-logo-minified.png
    at resolve (C:/Users/hosam/Desktop/Work/Dev/recruitement-interface/node_modules/@sveltejs/kit/src/runtime/server/respond.js:430:13)
    at resolve (C:/Users/hosam/Desktop/Work/Dev/recruitement-interface/node_modules/@sveltejs/kit/src/runtime/server/respond.js:277:5)
    at Object.#options.hooks.handle (C:/Users/hosam/Desktop/Work/Dev/recruitement-interface/node_modules/@sveltejs/kit/src/runtime/server/index.js:49:56)
    at Module.respond (C:/Users/hosam/Desktop/Work/Dev/recruitement-interface/node_modules/@sveltejs/kit/src/runtime/server/respond.js:274:40)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

When I remove the {#if} block everything works fine, but some styles get applied that I don't want to.
And I don't want to separate the logic into two components because otherwise I'll end up with so many duplicate code.
Logs
ezzeddin-logo-minified.png:1

        GET http://<IP_ADDRESS>:5173/$lib/assets/ezzeddin-logo-minified.png 404 (Not Found)

System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 8.30 GB / 15.95 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    npm: 9.8.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 7.24.3 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Spartan (44.22621.2134.0), Chromium (115.0.1901.188)
    Internet Explorer: 11.0.22621.1

Severity
serious, but I can work around it
Additional Information
No response

<style> blocks that aren't at the top level aren't processed by Svelte at all (meaning they won't be scoped). They're treated just as any other element would be, and don't have asset handling run on them either. Even if we ran asset handling and URL rewriting on this code, it would still result in global styles that affect every matching element on the whole page, not just this instance of this component.
One of the proper ways of dealing with this is to have a class conditionally added on a top-level element in the component, and then to style according to the presence of that class in a single top-level (scoped) <style> block.


libdazzle: 3.32.2 -> 3.32.3

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libdazzle/versions.
meta.description for libdazzle is: '"A library to delight your users with fancy features"'.
meta.homepage for libdazzle is: '"https://wiki.gnome.org/Apps/Builder"

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
/bin/sh passed the binary check.
1 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
found 3.32.3 with grep in /nix/store/1bc807d3xi50c8ir0bcccbcbwgv4gcd6-libdazzle-3.32.3
directory tree listing: https://gist.github.com/450c4d91bbd8ae1df5fb4bb104299b94
du listing: https://gist.github.com/038b806beb68493f9efc9152a3cda333

Rebuild report (if merged into master) (click to expand)

42 total rebuild path(s)
14 package rebuild(s)
14 x86_64-linux rebuild(s)
13 i686-linux rebuild(s)
2 x86_64-darwin rebuild(s)
13 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
ephemeral
epiphany
gitg
gnome-builder
gnome-usage
gnome3.epiphany
gnome3.gitg
gnome3.gnome-calendar
gnome3.gnome-music
gnome3.gnome-photos
gnome3.gnome-usage
gnome3.libdazzle
libdazzle
pantheon.elementary-gsettings-schemas

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1bc807d3xi50c8ir0bcccbcbwgv4gcd6-libdazzle-3.32.3 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A libdazzle https://github.com/r-ryantm/nixpkgs/archive/3f317eb47620c8c13b6ec72f5bc404e6c062ba3a.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1bc807d3xi50c8ir0bcccbcbwgv4gcd6-libdazzle-3.32.3
ls -la /nix/store/1bc807d3xi50c8ir0bcccbcbwgv4gcd6-libdazzle-3.32.3/bin

cc @lethalman @jtojnar @hedning @worldofpeace for testing.

Hah, completely forgot about this.
Here is the changelog:
https://gitlab.gnome.org/GNOME/libdazzle/blob/3.32.3/NEWS#L1-7