Respect for requestPermissions?

Is there a way to respect scope/permissions requests passed by the application via options.requestPermissions?
For instance, in this google login example, the "scope" URL argument is passed to the dialog, asking for additional permissions from the end user: https://github.com/meteor/meteor/blob/devel/packages/google/google_client.js#L29
Is this possible in azureAd? Does combining request scopes into a URL element -- as in the google example -- work for azure oauth login?

Hi mccolin,
Currently scopes aren't (knowingly) implemented by this package. The reason is that by default, when you register an application in azure ad they are assigned the "UserProfile.Read" scope and this is sufficient to get the user name and email address. You can see a list of scopes supported by azure ad/ office 365 here-

(Accidently submitted the comment)
https://msdn.microsoft.com/office/office365/HowTo/application-manifest
To further confuse the issue, it seems that you can statically assign permissions to an app.
This is something I will be reviewing the the future as I will be aiming to integrate this package with the office 365 APIs. I'm on holiday until the 17th of February so this may take a while.
I hope this sheds some light on why scope isnt currently implemented. I'll update this issue once I know what needs to be done. If you want to add scope passing before this time, feel free to make a pull request and I'll merge it as soon as I can.
James

Thanks for the comments, James! I took a crack at adding the ability to pass scopes following the examples set forth by a third-party google lib, but the Azure Oauth dialogs don't seem to respect the scope URL parameter. I may be missing something configuration-wise, which I'll double-check when I have the time.
Have you worked with the app manifest file to specify permissions in the past? Documentation on the JSON schema is evading all of my best attempts at research and searching for it.
Cheers!
Colin

For reference, the changes I'd prepared for the parameter are viewable in this commit: https://github.com/emmerge/azure-active-directory/commit/2f0dc9b5e6cbc0907068e738c7adf5a0173f103d

Hey mccolin,
Apologies for dropping off the radar, it's been a hectic week. Your changes look good so it's curious that your report that scope isn't respected. What scopes did you try passing?
I've worked very briefly with the app manifests, I didn't like what I saw. I believe you should only have to touch this if your app wishes to expose permissions to other azure ad apps but I may be wrong.
Cheers,
James

Hi djluck,
I'm working with mccolin and I'm very interested into using your package!
For that particular matter, it seems that there is no way to select specific permissions at authentication time: instead, you have to chose them on the AzureAd management page. I may be wrong, but this is what I understood from the AzureAd management UI and this post:
http://blogs.msdn.com/b/exchangedev/archive/2014/10/28/oauth2-in-action-with-the-release-of-office-365-calendar-contacts-and-mail.aspx
That said, I'm having a different issue. The AzureAd management account we have is linked to our company's 365 domain of course, and from the AzureAd management page, we can set permissions for our app. Now, when trying to OAuth with your package, in our application, with a company 365's address, we are able to connect, although we are never asked if we agree to grant any permission... Fine. But when trying to connect with a 365 email account from another domain (not the one of our company that is used for AzureAd management, then), I systematically get the 403 error Authorization_RequestDenied with the message "The specified credentials do no have sufficient privileges to make this request".
I do not know if this is the right place to ask this, but the microsoft documentation being rather unhelpful, I decided to ask you: have you seen this error before? Am I trying to use your package in a way it was not originally designed for?
Thanks!

@qbalin,
I think you're right about the first point- permissions can only be granted ahead of time and never requested by the application at run time.
Regarding your second point, I think that would make sense- your meteor app is only authorized to access your company's Azure AD tenant (a 'tenant' is what the documentations refers to as an installation or domain instance). When a user from another Azure AD tenant tries to log into your meteor app it fails, as this tenant has not registered with your meteor app.
What is slightly confusing however is the existence of the office 365 sandbox- this seems to be able to authenticate any office 365 user across multiple Azure AD tenants without them registering the app before hand. I think that perhaps Microsoft has a granted special access for this app perhaps because the documentation suggests that this is impossible.

This domain limitation seems terrible to me, it would mean you cannot write an application using OAuth to offer a service for all 365 accounts (!!!) . I cannot believe Microsoft would have released such a poor interface; I will blame it on my incapacity to find the answer rather than the supposed lameness of this product for now :)
Well, thanks for your answer James, I am happy to have your thoughts on the subject.
I haven't asked Microsoft people yet, I think for now I'll try to access the necessary data without OAuth, by asking the users to provide us their password and username D: , although it is not the best security-wise.

I'm closing this issue now, thanks for all the assistance guys.


General Question - Azure Blob Storage - Retrieve user that reads or writes blob in Storage Container

Hello
I have a question regarding Blob Storage: how to know the AD user that writes or reads a blob file in a container. I cannot see the property at blob level, neither in Storage Account Activity Log (at least for a specific blob file).
Is there a way to know, for each blob in my container, which user has accessed it and how it dealt with the blob?
Many thanks for your help

@bertrandpons Please help with the link of document on which above document feedback request is created. In case your query in not related to document content, open a new forum thread in Azure Community forum as it could be better place to get help on your scenario. These forum community members could provide their expert guidance on your scenario based on their experience. Thanks.

@bertrandpons Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly reopen the issue and continue the discussion.


chore: add IpVersion guard to HashIpv6DifferentAddresses case

Commit Message: add IpVersion guard to HashIpv6DifferentAddresses case
Additional Description:
Risk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

/retest


Remove overused l.mkDefault

First commit: Just remove l.mkDefault to fix error.
Second commit: Remove l.mkDefault for list and configFiles
Q. Why?
A. Currently, it works like this
example_list = l.mkDefault [ "default-by-nix-mineral" ];

example_list = [ "this-is-defined-by-user" ];

# Result
#config.example_list: [ "this-is-defined-by-user" ]

# but *I think* user-defined-config should not override nix-mineral config but be appended.
#config.example_list: [ "default-by-nix-mineral" "this-is-defined-by-user" ]

So I remove l.mkDefault (except nix.settings.allowed-users). Same to configFiles.
Third commit: move l.mkForce. It's not huge change but works bit different.
For example
this = l.mkForce {
  is.example = "nix-mineral";
};

this = {
  is.example = l.mkForce "stronger!";
};

# Result
#config.this.is.example: "stronger!"

LGTM!

Thanks for the PR! Looks good.


unable to run the pretrained policy on leap hand

I followed the instructions in readMe. The pretrained policy works fine in simulation using the command below:
python3 train.py wandb_activate=false num_envs=1 headless=false test=true task=LeapHandRot checkpoint=runs/pretrained/nn/LeapHand.pth
For running on the real Leap Hand, I am using Leap Hand ROS API. .  I am able to send pose commands on topics
- /leaphand_node/cmd_leap
- /leaphand_node/cmd_ones

I am also able to query the position using the service
/leap_position
However, I could not successfully execute the following command:
python3 deploy.py wandb_activate=false num_envs=1 headless=false test=true task=LeapHandRot checkpoint=runs/pretrained/nn/LeapHand.pth
The fingers move a bit, but then received the following error:

The above error occurs on the terminal where I issued the deploy.py command. And specifically, it fails to retrieve the leap_position, and says index out of range.
Please, any information about how to fix this error to be able to run the pretrained policy on the actual leap hand.
thanks,

This error is pretty prescriptive.  Try killing all background processes and Dynamixel wizard.  Also make sure you have permissions on that serial port.

thanks @Lucky7Chess for response.

I checked the group owership of  /dev/ttyUSB0

ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 May 24 15:44 /dev/ttyUSB0
checking my groups
groups
zahid dialout sudo docker

id
uid=1003(zahid) gid=1004(zahid) groups=1004(zahid),20(dialout),27(sudo),1005(docker)

That means that I have permissions on the port.

I use the lsof command to list processes that are using ttyUSB0:

lsof -w /dev/ttyUSB0
COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
python3 668394 zahid   12u   CHR  188,0      0t0  462 /dev/ttyUSB0

I tried to kill process 668394 and run the program again.
This time, (at least, once) the deploy script was continuously running (i.e., without terminating in an error), but from the debug statement, it appeared that values were not updating. For example the print outs from the following call did not change
            obses, _ = leap.poll_joint_position()
Also, the fingers moved relatively more, but then stayed in the same position.  Sometimes, I received this error.
rospy.service.ServiceException: service [/leap_position] responded with an error: b'error processing request: device reports readiness to read but returned no data (device disconnected or multiple access on port?)'
Is there some values that are in violation of limits?
Which other background processes that can be killed.

thanks @Lucky7Chess for a quick response.
I tried to use the Dynamixel Wizard. I will attach some images that you can see, if after the scan the output seems ok.

it appears that it can list the 16 motors. Should I still check 'manually' on the dynamixel wizard by dragging.
On dynamixel wizard, as we can see, by default "current-based" control is selected. Keeping it that way and by manually rotating the wheel, I could check that all the motors/joints were working except
'9'
'10'
'0'

meaning, I did not see a response on the leap hand when changing it.
Any pointers for moving forward.

You have some ES error.  I think this is usually caused by a power supply that is not clean.  Try another 5v supply?

ok,
Motors 9 and 10 have an OL (overload error), what can be work around / solution  for that.

Reboot the motors to get rid of the OL error.  These are more low level Dynamixel issues that you can also find help more generically.

ok, I have some questions:
Rebooting solved the issue with errors. I reboot the hand (power supply switched off and on) and checked via Dynamixel wizard. None of the motors listed any errors ( I did not manually check their movements though).
Having done that, I follow the steps.
running example.launch
anddeployscript.
This time, the deploy script continues to run, though still the movement of the fingers is not very much, only the thumb shows some slow movements.
I close the two terminals, check the Dynamixel again and motor 0 has ES error.
could this be caused due to this specific error on motor 0
Finally, the readMe says that running example.launch should take the leap hand to a **home** pose. Is the joint configuration of this **home** pose is listed somewhere so I can use it to test.

Home pose is what the cad preview on the website looks like.  What size your power supply?  Make sure all cables are plugged right.  Other than that this is a Dynamixel setup issue.

I have an adapter that input is standard power 100-240 VAC, and its output is 5 V.
is this the home pose?

Is there any guidelines / tutorial for setting up Dynamixel?
thanks,

What is the max current for the PSU.  If it's not that then you may have a defective Dynamixel motor or something, contact their support.

Yes that's the home pose.

What is the max current for the PSU. If it's not that then you may have a defective Dynamixel motor or something, contact their support.

The adapter lists output 5V and 30 A.

Is it switched to the right voltage, 120v or 240v?  Common issue with this.

I was checking on the Dynamixel wizard, and it is listing current limit 2352 mA. That means for 16 motors it should be
Total Current = 2.352 A×16 = 37.632 A
and 30 A may not be sufficient here.
but probably, that is the maximum and the motors do not draw that much current.
As for your question, I could not see any switch on the adapter that I could use to choose (100 - 240 VAC). It seems that it is just accepting ( in Germany, it is 230 V).

Hmm okay, can you contact Dynamixel support?  I do not know what your issue is with their motors.  Let me know what they say.

My guess is you have a bugged motor somewhere

@Lucky7Chess , on further inspection, we found out that several connections were lose (it could be assembly issue). Also, when the main ros script runs, it is supposed to take the hand to a home position as depicted above ( which I found from the code is all 180 deg joint angles). For some reasons, there was another error which caused one of the joints (motor id 9) to remain around ~250 deg even when home pose was commanded.

You have to assemble the motor with the horn at 180 degrees so it knows what orientation is home.  It may have been assembled not with the horn aligned to home into the home pose.  Rotate the mount so it goes to home.

another questions:
are all the motors the same type. If yes, then, what is the type/model if needed to order separately.


group software rather than million bajillion links, added Portworx Storage

group software rather than million bajillion links, added Portworx Storage

Could you break this into two PRs please so I can review each change indivudally?

Hi Brian, let me know how you’d need to see the PRs. This documentation page has 2 sections which got alphabetized, a similar treatment was done on the no-exporter-needed list, and the only software addition was the Portworx line for storage.


question about how transform is implemented

In adding in support for density and loess I was reminded that I wanted to ask you about how transform is implemented. At present you have

routines like density that generate a JSON list of properties, where the ordering depends on the transform type
transform takes this and generates the actual Vega Lite JSON object

In looking at this, I don't see why density doesn't just create the Vega Lite JSON object directly. There is one advantage to the current approach, in that transform can skip any input it doesn't know about, but I think that could be added to my approach.
An example, instead of
density field dnProps =
    (::)
        ( "density"
        , toList
            [ JE.string field
            , densityPropertySpec "groupby" dnProps
            , densityPropertySpec "cumulative" dnProps
            , densityPropertySpec "counts" dnProps
            , densityPropertySpec "bandwidth" dnProps
            , densityPropertySpec "extent" dnProps
            , densityPropertySpec "minsteps" dnProps
            , densityPropertySpec "maxsteps" dnProps
            , densityPropertySpec "steps" dnProps
            , densityPropertySpec "as" dnProps
            ]
        )

have density create the object from the following code (but without the need to decode the JSON since we know what options were defined by the user):
                "density" ->
                    case JD.decodeString (JD.list JD.value) (JE.encode 0 val) of
                        Ok [ dn, gbObj, cmObj, cnObj, bwObj, exObj, mnsObj, mxsObj, sObj, asObj ] ->
                            ([ ( "density", dn ) ]
                                ++ (if gbObj == JE.null then
                                        []

                                    else
                                        [ ( "groupby", gbObj ) ]
                                   )
                                ++ (if cnObj == JE.null then
                                        []

                                    else
                                        [ ( "cumulative", cnObj ) ]
                                   )
                                ++ (if cnObj == JE.null then
                                        []

                                    else
                                        [ ( "counts", cnObj ) ]
                                   )
                                ++ (if bwObj == JE.null then
                                        []

                                    else
                                        [ ( "bandwidth", bwObj ) ]
                                   )
                                ++ (if exObj == JE.null then
                                        []

                                    else
                                        [ ( "extent", exObj ) ]
                                   )
                                ++ (if mnsObj == JE.null then
                                        []

                                    else
                                        [ ( "minsteps", mnsObj ) ]
                                   )
                                ++ (if mxsObj == JE.null then
                                        []

                                    else
                                        [ ( "maxSteps", mxsObj ) ]
                                   )
                                ++ (if sObj == JE.null then
                                        []

                                    else
                                        [ ( "steps", sObj ) ]
                                   )
                                ++ (if asObj == JE.null then
                                        []

                                    else
                                        [ ( "as", asObj ) ]
                                   )
                            )
                                |> JE.object

                        _ ->
                            JE.null

Thanks for pointing this out. I am struggling to recall my original rationale for creating these internal lists and decoding them. It may have been my early clumsy attempt to collapse multiple specifications into a single labelled spec, but I agree it appears to involve unnecessary encoding/decoding steps.
Because each transform function (density, loess etc.) involves adding a single labelledSpec to the ordered list of transforms (and I don't want to introduce a breaking change by changing the type sigs), we still need a way of grouping a collection of labelled specs, so I propose we create an internal labelledSpec in the form ("multSpecs", obj) where obj is the object storing the transform's parameters. As you say, this can then be generated in the transform function directly without relying on a list with fragile parameter orderings and null parameters to preserve sequence.
The pattern would then be something like this for any transform that returns more than one labelled specification (using the aggregate transform as an example):
aggregate : List Spec -> List String -> List LabelledSpec -> List LabelledSpec
aggregate ops groups =
    (::)
        ( "multiSpecs"
        , JE.object [ ( "aggregate", toList ops ), ( "groupby", JE.list JE.string groups )]
        )

The transform function would then be much simplified in that it just has to distinguish single from multiple spec transforms:
transform : List LabelledSpec -> ( VLProperty, Spec )
transform transforms =
     let
        assemble : LabelledSpec -> Spec
        assemble ( trName, val ) =
            case trName of
                "multiSpecs" ->
                    val
                 _ ->
                     JE.object [ ( trName, val ) ]
    in
    ( VLTransform, JE.list assemble transforms )

Does that seem sensible and would it work for you?

As I'm less concerned with API stability (due to having a smaller user base, and because I want to see how it works out), I went for an approach that creates a new type (TransformSpec) and then something like the following pseudo-Elm code
type TransformSpec = Spec

transform :: List TransformSpec -> ( VLProperty, Spec )
transform [] = ( VLTransform, JE.null )
transform ts = ( VLTransform, spec )

aggregate : List Spec -> List String -> List TransformSpec -> List TransformSpec
aggregate ops groups ols =
  (::) ( JE.object [ ("aggregate", toList ops)
                         , ("groupby", JE.list JE.string groups) ] )

For me I now have a set of functions I know can only be used with transform, which I think helps a user. I've also extended this to other routines, such as encoding, configure, resolve, selection. These are simpler than the transform version since in this case they are really just aliases for LabelledSpec as we still need the key and the value.
As you don't want to break your API - and I'm not sure this fits in with your overall design or Elm - I think your approach looks fine (I might argue that all logic for creating the object is in the routines and that transform just assembles them - ie it just strips out the label/trName value of the input - but I'm not sure it really matters).
For reference, the approach I'm playing with can be seen in https://github.com/DougBurke/hvega/pull/108 but not sure it really helps here. I don't think that any of the approaches are that hard to convert between for me.


[Requesting Change]: Changes required in the task

The Task
Build a Figma plugin using shadcn components, i.e: your plugin design should have shadcn components like button.
Eg:

The buttons and dropdown menu here must be shadcn components, refer https://ui.shadcn.com/docs/components/button
Requirements:

Your plugin must use tailwindCSS
Your plugin must make use of shadcn

Great efforts so far! Looking forward to the completed task 😃

Task completed: Figma plugin built using shadcn components and TailwindCSS as requested. Ready for review.

Thanks @AmanVarshney01 ! Do check your email 😉


Request/Response Builder with String targetURI

An additional constructor has been added to the WarcRequest.Builder and the WarcResponse.Builder that accepts a String instead of a URI, to support real-world uri strings that are not valid according to the Java URI class [RFC 2396].
https://github.com/iipc/jwarc/issues/63

Thanks. Released as 0.17.0


Add modeset module to nvidia-optimus.nix

Description of changes
The nvidia-modeset module is loaded, which in turn pulls in the nvidia module. This makes the bbswitch to fail to turn off the card since it would be in use by the module.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Oh dammit, changing the base to master automatically added a lot of reviewers :-/ sorry for that everyone!

It looks like you accidentally mass-pinged a bunch of people, which are now subscribed
and getting notifications for everything in this pull request. Unfortunately, they
cannot be automatically unsubscribed from the issue (removing review request does not
unsubscribe), therefore development cannot continue in this pull request anymore.
Please open a new pull request with your changes, link back to this one and ping the
people actually involved in here over there.
In order to avoid this in the future, there are instructions for how to properly
rebase between branches in our contribution guidelines.
Setting your pull request to draft prior to rebasing is strongly recommended.
In draft status, you can preview the list of people that are about to be requested
for review, which allows you to sidestep this issue.
This is not a bulletproof method though, as OfBorg still does review requests even on draft PRs.


Boolean variable casting from different type

Request enhancement (since it's not an official feature in the documentation)
One syntax that we use a lot daily in development :
string str = "abc";
boolean test = !!str;
boolean test2 = !str;

One is a boolean cast. Other is to check for not empty value ("0" included).
The compiler will throw the following error : Unknown type: string in ...
I believe other types other than string will not work too.
Note that the following syntax will work : if !str { ... } but not if !str || str === null {...} because || and && are not accepted after a string even thought it's type casted with !
Why do we need this? Because we don't want to bother to write everytime
str !== "" && str !== null && str !== 0 && str !== "0" && str !== false && str !== []

Well, how about empty(str) ?

That could work. Still !! is preferred over empty(empty()). It's also a C implementation.
Also when we use an external function in zephir, the compiler force us to use a var type variable
Returned values by functions can only be assigned to variant variables
Would be nice to do a cast
var bool;
let bool = (boolean) externalFunction(); //or use !!

or direct implementation
boolean bool;
let bool = externalFunction();

The aim of zephir is to achieve the maximum speed so little details for the compiler to optimize are important.
We can also implement a "header" for zephir for hinting. Ex: functions.zh (as Zephir header)
externalFunction(string arg1) -> boolean;
Classname::externalFunction2(object arg1) -> Closure;

Method header inside the same class or within the Zephir land should be recognized automatically.

I have find a solution for this,may be it not the best but working for me for php extension.
I am taking all my boolean variable as var  and then using regex for checking it.
var status; //define

if  preg_match("/^[0,1]{1}$/", status)
 {
                // your code goes here.. only will pass 0 or 1
 }

Two things about your regex. One, the {1} is superfluous - regular expressions already match only a single character (well, byte, in this case) unless told to match more. If you like it for clarity, that's fine, but it doesn't do anything functional at all. Second, though, is more important. The , in your [] character set doesn't have a syntactical purpose - it will be matched literally, meaning the strings 0, 1, and , will all match. You probably want to remove that.


Quick Fix for the Media Service Account Name description

"lowercase letters or numbers" instead of "lowercase letters or numbers"

Hi @mathieu-benoit, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Mathieu Benoit). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

FYI, this PR is ready to be reviewed and merged into master, thanks!

@Juliako Please review this contribution. Thanks.

#sign-off


SQL 2005 compatibility

Previously, the datetime2 field in the sql script prevented the sql storage for people running SQL 2005. I changed everything to datetime, giving compatibility. If you want to keep datetime2 for SQL 2008, let me know, and maybe we can add a configuration setting that will allow a user to select when they are running 2005.

Thanks! accepting. Ths will tie in nicely with the .net 3.5 work I'll be merging and releasing this weekend.


How to construct topology of the TensorSpace model if I have many self-defined layers in my keras model?

I'm facing the same problem as you...Have you solved it?

I'm facing the same problem as you...Have you solved it?

I've tried many times, but nothing works


Migrate to codecov

Add codecov step #176 in the github action

Coverage remained the same at 92.02% when pulling 0df97da38a8877d4a3dc7cf7a416a19af6f49e10 on gnomeria:feature/176-migrate-to-codecov into 77b3e7d0e6c35a3f8cca389d23e72924219cadfc on allegro:master.


Bump the Elixir 1.3.x version to 1.3.4

Coverage increased (+0.01%) to 99.0% when pulling 04f461304295c8c87e040d373e8f20a106a4f8ed on jparise:elixir-1.3.4 into 35ae1f1ca40354c75cc55b1700471ca718099283 on pinterest:master.


Wrap long words, file path and URL in messages

Expected behavior
Use multiple lines to show long url links & long words inside messages.
Actual behavior
Currently
Steps to reproduce

Set "Auto-fit message" ON
Open message that include long word, file path or URL

Some message with URL as https://github.com/k9mail/k-9/releases/tag/5.300
Some message with path info as D:/folder1/folder2/folder3/folder4/folder5/folder6/folder7/file.extension
Some message that include SomeLongWordWithoutSpaceInSingleLine

Message text size too tiny, because try fit all message according one long word.

Environment
K-9 Mail version: 5.3.0
Android version: 7.0

See #2821

See #2821

@cketti, You link this issue.

Sorry, see #3172.


explicit metadata

When reporting the metadata at the top of the report, I'd love to have it notate missing required items.  I ran it on a test file, and (of course) it does not have any of the accessibility metadata to report:
  },
  "dct:date": "8/7/2017, 11:52:29 AM",
  "dct:title": "ACE Report",
  "dct:description": "Accessibility Checker Report",
  "earl:testSubject": {
    "url": "/Users/nbrown1/Downloads/hack-epub.epub",
    "dct:title": "Hack Education: Top Ed-Tech Trends of 2016",
    "dct:identifier": "urn:isbn:hack-education",
    "metadata": {
      "dc:title": "Hack Education: Top Ed-Tech Trends of 2016",
      "dc:creator": "Audrey Watters",
      "dc:language": "en",
      "dc:identifier": "urn:isbn:hack-education",
      "dcterms:modified": "2016-12-28T21:26:35Z"
    }

I would like to see it report that these items (and others?) are missing, or empty:
accessMode
accessibilityFeature
accessibilityHazard
accessibilitySummary
accessModeSufficient
accessibilityAPI
accessibilityControl
a11y:certifiedBy

I agree, thanks for the feedback!
We also envisioned trying to propose values for missing metadata (or check existing metadata) based on what we found in the content.

added summary of accessibility metadata (incl what's missing) to the Ace report. the rest of this topic is to-be-continued: https://github.com/daisy/ace-core/issues/35


Analysis should consider .svc.cluster.local

If a DestinationRule specifies a host ending in .svc.cluster.local, and --use-kube is selected, check that the namespace exists.
A user showed me this DestinationRule.  The intention had been to deploy examples in a prod namespace, but they had been put into default, yet the full-qualified hostname the rule applied to was in the prod namespace.
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: frontend
spec:
  host: frontend.prod.svc.cluster.local
  subsets:
...

cc @sdake

If I understand the case correctly, this should be caught going forward by https://github.com/istio/istio/pull/18364, which will detect missing host references in destination rules.


pythonize PSS_utils

Rewrite PSS_utils.py routines with vectorization and readability in mind.  In progress.

None of these routines have been tested with a full work flow.  I've verified consistency with old routines using numpy.allclose() for the same input arrays.
These should still be checked with an end-to-end simulation for consistency.  @Hazboun6 do you have an example notebook I could use to do this?

@paulthebaker, what type of end-to-end simulation are you thinking about specifically. We are still working on the PSRFITS output. There is a notebook on the notebook server in the shared/simulator folder that uses the NANOGrav templates to simulate some pulses.

I'm tempted to rename top_hat_width() to dispersion_dt() since the width is the dispersion dt across the subband.  this would tie the function to the physics and possibly make it more obvious that it's generally useful for calculating dispersion times.
This function relies on a df<<f0 limit.  It may also be more common to see dt(f1, f2) instead of dt(df, f0).  We could provide both methods, or use kwargs and let the use choose.
Any thoughts on this?

Function PSS_utils.block_mean() isn't used anywhere in the code.  Is it safe to remove this?

It is safe to remove the block_mean(). I implemented it for some scintillation calculations, but didn't need it.

I think you're correct. It would be good to change the name of top_hat_width(). I have an REU implementing the DM broadening in a more structured way right now, and she is almost done with her project. Maybe it would be best if we (read, I) change it after she's done with the project to avoid merge conflicts and general confusion?

Re: text_search() question: Why do we need to open file twice?
readlines() leaves the read cursor at the end of the file, you need to manually move it back to the start (with seek()) or close and reopen the file.  It's more efficient to hold the whole file in memory and operate on that array (the function reads in the whole thing anyways), rather than read the file from the i/o buffer twice.
That's what I did in commit 48e1575.

@Hazboun6 what's the deal with the commented out functions DM_broaden_signal() and debug_print()?
Can those be deleted or modified and reinstated?

Now I've started looking at all of the functions in PSS_utils... summary of findings:
Needs action:

shiftit() -- redefined (duplicate code) as an ISM method.  Should this be moved there completely?  or the ISM method could call the function from PSS_utils, leaving the general function still available.
top_hat_width() -- used only once in ISM.disperse(), could be moved to ism.py.  This is a more general function than advertised.  Above I suggest rename and leave where it is for future uses.
DM_broaden_signal() -- commented out, unused. Delete?
savitzky_golay() -- unused. Delete?
find_nearest() --  used in PSS_plot.py, but possibly generally useful.  Is this the only foreseen use?  Can it just be moved there?
acf2d() -- same situation as find_nearest()...
text_search() -- only used in ISM.NG_scint_param().  Can it be moved there?  I can see this as one of a few file manipulation utilities, e.g. dealing with .par files.  Probably okay where it is
debug_print() -- commented out, unused.  Delete?

Looks good:

down_sample() -- used in Telescope.observe(), TODO'ed in some Pulsar methods
rebin() -- used in several places

My general philosophy (which seems to be inline with yours) is to put methods into PSS_utils.py that I think will be used in more than one place, either now or eventually. So my opinions are:

top_hat_width() probably will only be used to disperse, so should probably go to ism.py

DM_Broaden_signal() can go away. We are about to do a pull request with the new function(s) which live in ism.py

savitzky_golay() I use this, for various reasons when checking signals. It's maybe more for development. It's just a running average, but useful. I usually call it from a notebook.

shiftit() Basically I started PSS_utils.py with this function when I realized we might use it some where else. This is the function Michael wrote to dedisperse signal in PyPulse so it could be used to dedisperse if someone wanted to. I'm not sure whether to leave it or get rid of it for the one in ism.py.

The following three seem like they might/will be used multiple times in the future, but as you note, are currently only used once. I'd vote that they stay.

find_nearest() --  used in PSS_plot.py, but possibly generally useful.  Is this the only foreseen use?  Can it just be moved there?
acf2d() -- same situation as find_nearest()...
text_search() -- only used in ISM.NG_scint_param().  Can it be moved there?  I can see this as one of a few file manipulation utilities, e.g. dealing with .par files.  Probably okay where it is

I meant to write a debugging script that could be turned on and off with a flag, but never did. Feel free to delete. I can write it later if I need it again.

debug_print() -- commented out, unused.  Delete?

I agree with these assessments.
Looks good:

down_sample() -- used in Telescope.observe(), TODO'ed in some Pulsar methods
rebin() -- used in several places

As for text_search() you see that I wrote it as a general function, and then tweaked it to use for the specific text file I needed to read. As noted in the comments, I could not make the darn thing work without opening it twice. I spent too much time trying to get it to be pretty, so I settled for working code.
That was my first foray into the file i/o commands, so I'm very glad for the explanation! Have you tested that it works in your rewrite? If so then great! Let's definitely use your more efficient way.

Have you tested the shift_it() code to see if it's substantially faster vectorized? If so then Michael might be very interested in that.

I tested everything in a local notebook as individual functions, but not as part of a larger simulation.  For text_search(), I didn't have an example of the file you use.  I tested some stuff on a random file, but it should be tested with a file in the actual format


SPI: SCLK polarity (CPOL) is inverted

(derived from https://github.com/earlephilhower/arduino-pico/issues/1900)
Wikipedia says

so for CPOL = 0, the SCLK pin should idle LOW before and after a SPI transfer.
However, testing with
#include <hardware/spi.h>
static int _sck = 2;
static int _mosi = 3;
static int _miso = 4;
static int _cs = 5;
static spi_inst_t* _spi = spi0;

int main(){
  gpio_set_function(_sck, GPIO_FUNC_SPI);
  gpio_set_function(_mosi, GPIO_FUNC_SPI);
  gpio_set_function(_miso, GPIO_FUNC_SPI);
  gpio_set_function(_cs, GPIO_FUNC_SPI);

  spi_init(_spi, 100000);
  spi_set_format(_spi, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST);

  while(1) {
    uint8_t value = 0xAA;
    (void) spi_write_blocking(_spi, &value, sizeof(value));
    delay(100);
  }
  return 0;
}

I see

on GP2, 3, 4 and 5 respectively. This is exactly inverted, it idles HIGH. Wut?
Note that changing to SPI_CPOL_1 in the above example will make the clock idle low, which is again opposite to how it should be. No matter what, in my logic analyzer, I always have to select the opposite SPI mode / clock polarity than what I set in the code to make it decodable.

Push.

Sorry it took so long. I ran your code on rp2040 (and rp2350) and it seems to work correctly. So I'm at a bit of a loss why you're seeing that. Screen grab is where SPI_CPOL_0. If I change to SPI_CPOL_1 it uses clock idle high.

Checked again - seems to work ok for me. Mysterious!

Have there been multiple revisions of the RP2040 silicon, and this only happens on the older one? I'm very sure I measured this correctly on my board. Any way to read out the silicon rev from a register?

Yes. I would expect the following to show "2"
uint version = (chip_id & SYSINFO_CHIP_ID_REVISION_BITS) >> SYSINFO_CHIP_ID_REVISION_LSB;
printf("Chip version %d\n", version);

chip_version.zip
chip_version.uf2.zip

Running this on my Pico, I get
Chip version 1

though. Is that SPI thing a known errata there?

Is that SPI thing a known errata there?

No, the only non-ROM change between B1 and B2 was fixing the USB enumeration erratum (RP2040-E5)

I've manged to find B0 and B1 devices (can you check what you have by takin a photo of the text on the chip?) and it still appears as if CPOL works correctly. So I still don't understand what you're seeing. I was seeing CS behaving oddly on my B0 but changing it to GP1 fixed that - maybe just dodgy solder on this device? You could try using GP6 for the SPI0 clock or switch to SPI1 (e.g. GP10-13?). Just to see if the other peripheral behaves the same.

Have there been multiple revisions of the RP2040 silicon, and this only happens on the older one? I'm very sure I measured this correctly on my board. Any way to read out the silicon rev from a register?

I've been experiencing similar behavior where a Pico 1 board in SPI slave mode has to have CPOL and CPHA set oposite to what the master (Pico 2 in my case) has set in order to decode bits correctly.
Happy to do some testing with my available boards.
I'll try to come back and add some results of those tests in the next few days.

@jakerr Can you take a photo of the top of the chip? How old is the Pico 1?

Here's the patient. This is the best photo I could get with my poor phone camera.
Can you make out everything you need?
It's a Pico H ©2021
I think the chip says "RP2-B2 21/36"

It would be "interesting" if you could run the uf2 here https://github.com/user-attachments/files/17651433/chip_version.uf2.zip
Just to rule out the chip version.

@peterharperuk Thanks very much for testing this again.
I've run the code in this issue and the chip id snippet and determined that in master mode the my chip is behaving as specified in the datasheet. Sorry for the confusion.
That said I still do have the issue that the polarity and phase must be swapped in slave mode in order for it to properly decode received data. I will keep looking into that and file a new issue if I can discover a reproducible case.
I also did some consistency checking to make sure the set spi_set_format was having the expected effect on the spi cr0 register and that all looked fine to me.
Chip version 2
SPI before setting format
SPI(0) CR0: 0000 0000 0000 0000 1101 0000 0000 0111
            .... .... .... .... .... .... ││.. ....
                                          │└ CPOL: 0
                                          └─ CPHA: 0
SPI after setting format SPI_POL_0, SPI_CPHA_0
SPI(0) CR0: 0000 0000 0000 0000 1101 0000 0000 0111
            .... .... .... .... .... .... ││.. ....
                                          │└ CPOL: 0
                                          └─ CPHA: 0
SPI after setting format SPI_POL_1, SPI_CPHA_1
SPI(0) CR0: 0000 0000 0000 0000 1101 0000 1100 0111
            .... .... .... .... .... .... ││.. ....
                                          │└ CPOL: 1
                                          └─ CPHA: 1

SPI_POL_0, SPI_CPHA_0:

SPI_POL_1, SPI_CPHA_1:

I tried this test on the pins in the original issue:
static int _sck = 2;
static int _mosi = 3;
static int _miso = 4;
static int _cs = 5;

and also on these pins:
static int _sck = 18;
static int _mosi = 19;
static int _miso = 16;
static int _cs = 17;

The result was the same.

Ok, I'll check slave mode.

Hi @peterharperuk,
Thank you. Before sending you down that rabbit hole, I did some investigation today and think I've convinced myself that, at least the board I have, is behaving as specified.
I want to do a more thorough write up with some sample code for the next person that needs to investigate,
but here's what I discovered, briefly:
I was driving the communication from a pico 2 running in master mode and:
SPI_POL_0, SPI_CPHA_0 but without enabling the SPI function for the CS (Chip Select) pin.
I was driving the CS pin from software and sending it low for the duration of a transfer.
The thing I did wrong was failed to implement the pulse between words of the multi word
transfer that is required by the two modes that have SPI_CPHA_0.
So my communication of two words consecutively looked like this:
mosi:   <8-bits> <8-bits>
miso:   <8-bits> hangs
  cs: ─┐                  ┌─
       └──────────────────┘

mosi:   <8-bits>  <8-bits>
miso:   <8-bits>  <8-bits>
  cs: ─┐        ┌┐       ┌─
       └────────┘└───────┘

So I was saying the host is MODE_0 but it was actually more like MODE_2 or MODE_4 in its behavior (though with reversed polarity), so it's unsurprising that this was producing strage results.
The surprising thing was setting the slave to
SPI_POL_1, SPI_CPHA_1 while in that mode, the slave was able to adapt to the master's behavior because
at least the transaction framing was as expected for SPI_CPHA_1.
I suppose the slave peripheral adapted to the inverted phase of my invalid mode.

I tried this test on the pins in the original issue:
static int _sck = 2;
static int _mosi = 3;
static int _miso = 4;
static int _cs = 5;

Looking at https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#pinout-and-design-files-3 says that GP3 is SPI0 TX, i.e. the output from the SPI block. IIIRC this means that if you're running the SPI in master mode, then GP3 is MOSI; but if you're running the SPI in slave mode then GP3 is MISO. (Although I dunno if this has any bearing on the problem being discussed here or not?)


Unable to install

Hi, I have been unable to install Adonis for several days now, I am running windows 7. I keep getting stuck on the installing dependencies part. Attached is a screenshot. Kindly help.

Hey @kisese !
Do you get any errors?
May you try to clone the repository and install dependencies by yourself to see if it's working?

Hi Romain,
I tried again and it worked thanks for your help


Add Mauri's blog

Geeking with Mauri's blog 😄
Mostly about iOS and Swift-related stuff. A bit about general work as well

Thank you!


Consistency between DataTree methods and pathlib.PurePath methods

@eschalkargans suggested in #281 that the API of DataTree objects could more closely follow that of pathlib.PurePath objects. I think this aligning of APIs/nomenclature is a good idea. In general think it's conceptually useful to think of a DataTree object as if it were an instance of pathlib.PurePosixPath (even though the actual implementation should not work like that).
There are various methods we might want to add/change to make them more compatible:
Inspired by pathlib.PurePath:

[ ] DataTree.match should be renamed to DataTree.glob
[ ] Add a new method DataTree.match that returns a boolean like PurePath.match does
[ ] DataTree.lineage should be renamed to .parents
[ ] Add an .is_relative_to method (this is deprecated in pathlib)
[ ] A new .joinpath method could be useful
[ ] DataTree.relative_to should possibly have a walk_up method (see https://github.com/xarray-contrib/datatree/issues/258)
[ ] A new .with_name method might be useful
[ ] A new .with_segments method might be useful

Inspired by pathlib.Path (i.e. concrete paths):

[ ] A new DataTree.walk method might be a better way to expose the logic in iterators.py
[ ] A new .rename method might be useful
[ ] A new .replace method might be useful
[ ] A new .rglob method (though having this and .glob seems overkill)

Several of these might be useful abstractions internally, especially .joinpath, .walk, and .replace.
EDIT: Let's also document this similarity:

[ ] Add section to documentation explicitly pointing out this alignment of APIs (#287)
[ ] Reorganise api.rst to have a section Path-like methods

Sure @etienneschalk! I think each of these bullet points is really it's own little issue, so feel free to open a PR for any one of them. (Maybe leave the tree-walking related ones for now though because I think those will be a little more complicated.)

Pathlib
The following are some notes I taken while reading the pathlib documentation, thinking about equivalences in DataTree usage
Listing
Curated list
This list only contains methods I did not classified as "Irrelevant".
The "Irrelevant" tag is subjective to my understanding, I may have missed important methods
Pure Paths

PurePath.parts

"parsed" path

PurePath.root

Relevant to differentiate between absolute and relative paths. This is already done by PurePath.is_absolute()
For DataTree.root, same comment as parents
Note: root = parents[-1]? No, currently the parents are rewinded until finding a parent with root is None. Could it be simplified with parents[-1], if the path hierarchy is already known in advence?

PurePath.parents

The DataTree.parents should use the paths obtained via its NodePath identifier inside of the root's DataTree to produce the list of parents' DataTree.
Note: this means all Nodes must be aware of the root. Which is the case via the root attribute. Trees are aware of being a root or a subtree.

PurePath.parent

Same comment as parents
Note: parent == parents[0]?

PurePath.name

Might be useful if absolute paths are used as internal IDs inside of the tree, for string reprs. PurePaths are hashable and can be used as IDs

PurePath.is_absolute()

Interesting, as Node IDs should be absolute.

PurePath.is_relative_to_other()

Can be interesting for quickly knowing if a node is inside of a larger tree, with path-only lookup?

PurePath.joinpath

Cannot see the immediate utility for a end user, might be useful internally

PurePath.match

This is a "single-element" version of glob, only checking if a single path conforms to the pattern
Might be useful to implement DataTree.glob by mapping it against all paths contained in the tree.

PurePath.relative_to(_other_, _walk_up=False_)

Might be useful to detach a node from a tree, to generate its new paths identifiers.

PurePath.with_name(_name_)

Might be useful to rename a node and updating its path representing it inside of its root DataTree.

PurePath.with_segments(*pathsegments)

Can be useful because the doc says it can be used with classes deriving from  PurePaths eg PurePosixPath like NodePath

Concrete Paths
Concrete Paths. Could be implemented by a companion DataTreePath class attached to a DataTree instance.

Path.glob()

Can be used to map PurePath.match against all paths contained by the bound instance of DataTree
Regarding case_sensitivity, since DataTree works with PurePosixPath, keep the default POSIX config: True

Path.is_dir()

It might be useful to discriminate between DataTree and Dataset (directory-like) and DataArray (file-like))
Maybe a better name like is_group could help, or is_aggregation
Note: Dataset may actually be closer to a leaf? At first glance, no, as it is non-atomatic. One could argue that a DataArray is non-atomic too (it carries dimension coordinates)

Path.is_file()

Mirrors path.is_dir()
Maybe a better name like is_dataarray could help, or is_leaf

Path.is_symlink()

To be considered if symbolic nodes are to be implemented

Path.iterdir()

Like ls

Path.walk

A good candidate method to implement to explore a DataTree
Introduced in Python 3.12 only
Currently, from developer point of view, using Path.rglob("*") when needing to iterate through a directory, so maybe walk is dispensable.

Path.mkdir

Probably irrelevant, but kwargs like parents=True, exist_ok might be useful when working with groups.

Path.rename

Might be useful to rename a node inside of the root tree

Path.replace

Similar to Path.rename for DataTree, see https://bugs.python.org/issue27886 for discussion on that topic. replace is more "expeditive" than rename, as if a path already exists it will be surely replaced.

Path.absolute()

Can be useful for browsing the DataTree

Path.resolve()

Similar to absolute, but also takes into accounts symlinks. To be considered if symbolic links are to be implemented in DataTree

Path.rglob

Similar to Path.glob, with the ** prefix. Depends on developer's taste

Path.rmdir

To remove an entire subtree from the tree? Might be useful in conjunction with relative_to

Path.samefile

I cannot see an utility rn

Path.symlink_to

To be considered if symbolic links are to be implemented in DataTree

Path.touch

Create an empty DataArray at that location?

Path.unlink

The naming might be confusing to work with DataTree.

Full list

Pure Paths

PurePath.parts

"parsed" path

PurePath.drive Irrelevant

Irrelevant for PurePosixPath implementation of PurePath

PurePath.root

Relevant to differentiate between absolute and relative paths. This is already done by PurePath.is_absolute()
For DataTree.root, same comment as parents
Note: root = parents[-1]? No, currently the parents are rewinded until finding a parent with root is None. Could it be simplified with parents[-1], if the path hierarchy is already known in advence?

PurePath.anchor Irrelevant

drive + root = same as root for PurePosixPath = irrelevant

PurePath.parents

The DataTree.parents should use the paths obtained via its NodePath identifier inside of the root's DataTree to produce the list of parents' DataTree.
Note: this means all Nodes must be aware of the root. Which is the case via the root attribute. Trees are aware of being a root or a subtree.

PurePath.parent

Same comment as parents
Note: parent == parents[0]?

PurePath.name

Might be useful if absolute paths are used as internal IDs inside of the tree, for string reprs. PurePaths are hashable and can be used as IDs

PurePath.suffix Irrelevant
PurePath.suffixes Irrelevant
PurePath.stem Irrelevant
PurePath.as_posix() Irrelevant
PurePath.as_uri() Irrelevant
PurePath.is_absolute()

Interesting, as Node IDs should be absolute.

PurePath.is_relative_to_other()

Can be interesting for quickly knowing if a node is inside of a larger tree, with path-only lookup?

PurePath.is_reserved() Irrelevant
PurePath.joinpath Irrelevant for end user

Cannot see the immediate utility for a end user, might be useful internally

PurePath.match

This is a "single-element" version of glob, only checking if a single path conforms to the pattern
Might be useful to implement DataTree.glob by mapping it against all paths contained in the tree.

PurePath.relative_to(_other_, _walk_up=False_)

Might be useful to detach a node from a tree, to generate its new paths identifiers.

PurePath.with_name(_name_)

Might be useful to rename a node and updating its path representing it inside of its root DataTree.

PurePath.with_stem(_stem_) Irrelevant

Irrelevant (same reason as stem, there is no concept of extension in DataTree paths)

PurePath.with_suffix Irrelevant for same reason
PurePath.with_segments(*pathsegments)

Can be useful because the doc says it can be used with classes deriving from  PurePaths eg PurePosixPath like NodePath

Concrete Paths
Concrete Paths. Could be implemented by a companion DataTreePath class attached to a DataTree instance.

Path.cwd() irrelevant
Path.home() irrelevant
Path.stat() irrelevant
Path.chmod() irrelevant
Path.exists() irrelevant

Can be used to determine if the path is contained in the bound instance of DataTree

Path.expanduser() irrelevant
Path.glob()

Can be used to map PurePath.match against all paths contained by the bound instance of DataTree
Regarding case_sensitivity, since DataTree works with PurePosixPath, keep the default POSIX config: True

Path.group() irrelevant
Path.is_dir()

It might be useful to discriminate between DataTree and Dataset (directory-like) and DataArray (file-like))
Maybe a better name like is_group could help, or is_aggregation
Note: Dataset may actually be closer to a leaf? At first glance, no, as it is non-atomatic. One could argue that a DataArray is non-atomic too (it carries dimension coordinates)

Path.is_file()

Mirrors path.is_dir()
Maybe a better name like is_dataarray could help, or is_leaf

Path.is_junction() irrelevant
Path.is_mount() irrelevant
Path.is_symlink()

To be considered if symbolic nodes are to be implemented

Path.is_socket() irrelevant
Path.is_fifo() irrelevant
Path.is_block_device() irrelevant
Path.is_char_device() irrelevant
Path.iterdir()

Like ls

Path.walk

A good candidate method to implement to explore a DataTree
Introduced in Python 3.12 only
Currently, from developer point of view, using Path.rglob("*") when needing to iterate through a directory, so maybe walk is dispensable.

Path.lchmod irrelevant
Path.lstat irrelevant
Path.mkdir

Probably irrelevant, but kwargs like parents=True, exist_ok might be useful when working with groups.

Path.open irrelevant
Path.owner irrelevant
Path.read_bytes irrelevant
Path.read_text irrelevant
Path.readlink irrelevant
Path.rename

Might be useful to rename a node inside of the root tree

Path.replace

Similar to Path.rename for DataTree, see https://bugs.python.org/issue27886 for discussion on that topic. replace is more "expeditive" than rename, as if a path already exists it will be surely replaced.

Path.absolute()

Can be useful for browsing the DataTree

Path.resolve()

Similar to absolute, but also takes into accounts symlinks. To be considered if symbolic links are to be implemented in DataTree

Path.rglob

Similar to Path.glob, with the ** prefix. Depends on developer's taste

Path.rmdir

To remove an entire subtree from the tree? Might be useful in conjunction with relative_to

Path.samefile

I cannot see an utility rn

Path.symlink_to

To be considered if symbolic links are to be implemented in DataTree

Path.hardlink_to Irrelevant ?
Path.touch

Create an empty DataArray at that location?

Path.unlink

The naming might be confusing to work with DataTree.

Path.write_bytes Irrelevant
Path.write_text Irrelevant

Ideas

Use the NodePath as the DataTree's identifier, and use path.name in the repr
Systematically accept PurePosixPath | str for methods expecting a path
Do not forbid dots in names, we cannot make assumptions of the variable names in a DataTree

Ideas of question for a FAQ.
A FAQ is a powerful documentation format, it is used for instance in the ruff documentation: https://docs.astral.sh/ruff/faq/
The idea is to answer as quickly as possible as the seamingly mundane questions for someone knowing the tool, but not immediate at all for someone starting to use it

Question:Can a Node belong to multiple trees?
Answer: I think not, as the parent has cardinality of 0..1 (0 if root, 1 if subtree)

See https://github.com/pydata/xarray/blob/fffb03c8abf5d68667a80cedecf6112ab32472e7/xarray/datatree_/datatree/datatree.py#L425
@property
def parent(self: DataTree) -> DataTree | None:

Closing in favour of https://github.com/pydata/xarray/issues/9448 upstream.


Devise automatically logs off current user on password change

I am using 1.3.0.dev
Ive got an admin account which enables him to change other user's passwords. Every time this happens, Devise logs out the user. I don't understand why Devise needs to log out users whose passwords have been changed. Really strange behavior.
What is the recommended workaround / solution for this.
My code can be found here: https://gist.github.com/903366
A temporary solution I have come up with is:
def update
  @admin = Admin.find(params[:id])
  authorize! :manage, current_admin

  respond_to do |format|
    if @admin.update_attributes(params[:admin])
      sign_in(@admin, :bypass => true)
      format.html { redirect_to([:admin, @admin], :notice => 'Admin was successfully updated.') }
      format.xml  { head :ok }
    else
      format.html { render :action => "edit" }
      format.xml  { render :xml => @admin.errors, :status => :unprocessable_entity }
    end
  end
end

However, with above code, I am concerned that if I change an admins password who is logged on, it will force him to log off, if he is already logged in. Could be wrong here...

Hi Jose,
I just upgraded devise, and now I'm having the same issue when a user updates their own password. Is that the correct behavior?

I saw logouts when updating password, after upgrading to devise 1.5.0. The only fix I need was to add :bypass => true to sign_in(@user).

I am also having this issue. I added :bypass => true to sign_in(@user, :bypass => true). If the password change is successful I doesn't sign_out the user but if it fails. if the new provided password and password_confirmation do not math it signs out the user...

here's my code
    @artist = current_artist
    password = params[:artist][:password]
    verify_password = params[:artist][:password_confirmation]

    @artist.update_with_password(params[:artist])
    sign_in(@artist, :bypass => true)

I am not redirecting, since I am using an AJAX request to do this I just render JSON in the end.

This feature was added exactly for such scenarios, an admin, when edits someones password, can be sure that the person will be signed out.

This is very reasonable. However, the current user (who made the password change) is logged out as well, which is a bit counter intuitive, IMO. BTW, I am using devise 4.1.1.


Multi-threaded CP-SAT solver is crashed

What version of OR-tools and what language are you using?
Version: stable/v7.6
Language: C++ (Visual Studio 2019, version 16.5.4)
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
CP-SAT
What operating system (Linux, Windows, ...) and version?
Windows 10, build 18363.778
What did you do?
Solved the following multiple knapsacks problem using the CP-SAT solver
#include "ortools/sat/cp_model.h"

struct DataModel {
    const std::vector<int> weights = { 48, 30, 42, 36, 36, 48, 42, 42,
        36, 24, 30, 30, 42, 36, 36 };
    const std::vector<int> values = { 10, 30, 25, 50, 35, 30, 15, 40,
        30, 35, 45, 10, 20, 30, 25 };
    const int num_items = (int)weights.size();
    const std::vector<int> bin_capacities = { 100, 100, 100, 100, 100 };
    const int num_bins = (int)bin_capacities.size();
};

namespace operations_research {
    namespace sat {

        void MulitpleKnapsackSat() {
            DataModel data;
            std::vector<BoolVar> variables(data.num_items * data.num_bins);
            auto x = [&](int item_index, int bin_index) -> BoolVar& {
                return variables[item_index * data.num_bins + bin_index];
            };
            CpModelBuilder cp_model;
            for (auto i = 0; i < data.num_items; ++i) {
                for (auto j = 0; j < data.num_bins; ++j) {
                    x(i, j) = cp_model.NewBoolVar();
                }
            }
            for (auto i = 0; i < data.num_items; ++i) {
                LinearExpr sum;
                for (auto j = 0; j < data.num_bins; ++j) {
                    sum.AddTerm(x(i, j), 1);
                }
                cp_model.AddLessOrEqual(sum, 1);
            }
            for (auto j = 0; j < data.num_bins; ++j) {
                LinearExpr sum;
                for (auto i = 0; i < data.num_items; ++i) {
                    sum.AddTerm(x(i, j), data.weights[i]);
                }
                cp_model.AddLessOrEqual(sum, data.bin_capacities[j]);
            }
            LinearExpr obj;
            for (auto i = 0; i < data.num_items; ++i) {
                for (auto j = 0; j < data.num_bins; ++j) {
                    obj.AddTerm(x(i, j), data.values[i]);
                }
            }
            cp_model.Maximize(obj);

            SatParameters parameters;
            parameters.set_num_search_workers(16);
            const CpSolverResponse responce = SolveWithParameters(cp_model.Build(),
                parameters);
        }
    }  // namespace sat
}  // namespace operations_research

int main() {
    operations_research::sat::MulitpleKnapsackSat();
    return EXIT_SUCCESS;
}

What did you expect to see
Successful solving of the problem as the single-threaded solver does
What did you see instead?
The solver is crashed in the destructor LinearConstraintManager::~LinearConstraintManager() while trying to check the flag sat_parameters_.log_search_progress()
Make sure you include information that can help us debug (full error message, model Proto).
Anything else we should know about your project / environment
The library was built from the sources using cmake

Works flawlessly on mac.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le dim. 3 mai 2020 à 18:10, vaidzelevich<EMAIL_ADDRESS>a
écrit :

What version of OR-tools and what language are you using?
Version: stable/v7.6
Language: C++ (Visual Studio 2019, version 16.5.4)
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP,
Gurobi)
CP-SAT
What operating system (Linux, Windows, ...) and version?
Windows 10, build 18363.778
What did you do?
Solved the following multiple knapsacks problem using the CP-SAT solver
#include "ortools/sat/cp_model.h"
struct DataModel {
const std::vector weights = { 48, 30, 42, 36, 36, 48, 42, 42,
36, 24, 30, 30, 42, 36, 36 };
const std::vector values = { 10, 30, 25, 50, 35, 30, 15, 40,
30, 35, 45, 10, 20, 30, 25 };
const int num_items = (int)weights.size();
const std::vector bin_capacities = { 100, 100, 100, 100, 100 };
const int num_bins = (int)bin_capacities.size();
};
namespace operations_research {
namespace sat {
    void MulitpleKnapsackSat() {
        DataModel data;
        std::vector<BoolVar> variables(data.num_items * data.num_bins);
        auto x = [&](int item_index, int bin_index) -> BoolVar& {
            return variables[item_index * data.num_bins + bin_index];
        };
        CpModelBuilder cp_model;
        for (auto i = 0; i < data.num_items; ++i) {
            for (auto j = 0; j < data.num_bins; ++j) {
                x(i, j) = cp_model.NewBoolVar();
            }
        }
        for (auto i = 0; i < data.num_items; ++i) {
            LinearExpr sum;
            for (auto j = 0; j < data.num_bins; ++j) {
                sum.AddTerm(x(i, j), 1);
            }
            cp_model.AddLessOrEqual(sum, 1);
        }
        for (auto j = 0; j < data.num_bins; ++j) {
            LinearExpr sum;
            for (auto i = 0; i < data.num_items; ++i) {
                sum.AddTerm(x(i, j), data.weights[i]);
            }
            cp_model.AddLessOrEqual(sum, data.bin_capacities[j]);
        }
        LinearExpr obj;
        for (auto i = 0; i < data.num_items; ++i) {
            for (auto j = 0; j < data.num_bins; ++j) {
                obj.AddTerm(x(i, j), data.values[i]);
            }
        }
        cp_model.Maximize(obj);

        SatParameters parameters;
        parameters.set_num_search_workers(16);
        const CpSolverResponse responce = SolveWithParameters(cp_model.Build(),
            parameters);
    }
}  // namespace sat

}  // namespace operations_research
int main() {
operations_research::sat::MulitpleKnapsackSat();
return EXIT_SUCCESS;
}
What did you expect to see
Successful solving of the problem as the single-threaded solver does
What did you see instead?
The solver is crashed in the destructor
LinearConstraintManager::~LinearConstraintManager() while trying to check
the flag sat_parameters_.log_search_progress()
Make sure you include information that can help us debug (full error
message, model Proto).
Anything else we should know about your project / environment
The library was built from the sources using cmake
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2001, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3IKBQLDRJOX424SIDLRPWJPJANCNFSM4MYF6V4Q
.

could be related to #1958 aka https://github.com/google/or-tools/commit/929f3ea8733843ce75b005905870a48dc5900a11 which is not in v7.6 but on master

Thank you very much for so quick answer.
I have tried the master branch. Unfortunately, the CP-SAT solver still crashes with error.

The fix is useful when you run multiple solvers in parallel (as in a
server).
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le dim. 3 mai 2020 à 23:52, vaidzelevich<EMAIL_ADDRESS>a
écrit :

Thank you very much for so quick answer.
I have tried the master branch. Unfortunately, the CP-SAT solver still
crashes with error.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2001#issuecomment-623188144,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3PPDRR4HHHOPOKSCR3RPXRQPANCNFSM4MYF6V4Q
.

I believe this was just fixed.
Can you rebuild from master and try it ?


EventLoop or EventLoopInterface

Should we add the word 'Interface' to the end of the interface class paths?
PSRs 3, 6 and 7 do (except in PSR-6 for the exception interfaces).
Created an issue for this as I know there are people who don't agree with doing this (indeed it isn't done in Icicle or AMP).
My personal vote is consistency with existing PSRs.

Inclined towards consistency with other PSRs as well...

I am agree adding 'Interface'.
This like PSR 3, 6 and 7, container-interop

:+1: for consistency with other PSRs

Hi all! We had the same reasons for having the suffix in container-interop, and that's the only thing I regret ;) (the interface name is sooo long and unreadable compared to what it could be…). Maybe it's too late to change the FIG's internal conventions, but I wish it was possible. Right now new container's interop classes (still WIP, not stable) don't follow this convention, I don't know if it will stay like that until the stable version…

Drop the interface! It's such a non-sense to write type declarations always with such a long name.

Yes, please drop it. It's a general flaw of the PSRs.

:+1: Consistency wins!

I asked FIG for opinions: https://groups.google.com/forum/#!topic/php-fig/Zgfd0gHUUoc

@AndrewCarterUK not sure if that discussion is going to be very productive … you should rather ask what their rationale behind this is.

Please consider, if we drop the suffix, it will be a valid reason for people to vote against the entrance of this PSR. We have to overturn the suffix precedent or accept that there will be people voting (justifiably) against the PSR on the basis of this inconsistency.

@assertchris It's a bylaw, it won't be accepted as PSR without that suffix. We either have to change the bylaw or have async standards published by our own group separate from FIG. Since FIG is totally synchronous anyway, it could even make sense to separate all async things into a separate group.

That's an interesting idea. Perhaps we should explore it further...

Interesting idea. AIG/Async Interop Group?

Let's move that discussion here: https://github.com/async-interop/event-loop/issues/11

Are we in agreement about dropping the Interface suffix? Could this issue be closed as resolved?

I think in light of the previous discussion involving FIG, we are probably good to drop the suffix.

There's a second part to this question that complicates things slightly over here: https://github.com/async-interop/event-loop/issues/14
If we do go down the route of a static proxy class to an underlying event loop driver then the proxy class could be named EventLoop and the underlying driver could have to implement the EventLoopInterface:
class LibEvLoop implements EventLoopInterface { ... }

EventLoop::execute(function () {
    // ...

    EventLoop::onReadable($stream, function ($stream) {
        // do handling
    });

    // ...
}, new LibEvLoop());

What's being discussed really is quite a bold design move - so I'd appreciate some sceptical eyes on it before we travelled too far down that road - but it obviously would have implications for the question on naming conventions.

If we use functions instead of static methods, we don't have that problem. We can easily call it interface EventLoop. :stuck_out_tongue_winking_eye:

If we use functions we lose encapsulation.

Where do we loose encapsulation if we do it like Amp does?

The underlying event loop driver should be encapsulated. AMP uses the reactor() function to encapsulate the active reactor. I've got several problems with that design, all of these are solved by proper encapsulation using a class:

reactor() function which actually has two functions - getting and setting the reactor.
It doesn't make it possible (or at least clean) to stack multiple event loops (to run one inside another)
There is no way to make the reactor() function drop its reference to the underlying event loop driver.

On the other hand, I can't see a single advantage that functions would have over a static class.
We have to find a middle ground between the boiler plate code of passing the event loop around and injecting it as a dependency everywhere and global objects that have no obvious end-of-life and leave hidden references. I believe we're getting very close to that in the other thread, with the concept of running a callable within the scope of an event loop and having that loop being detached once that scope has been left. It gives a very clear start and end point to the life of an event loop.

Is it that bad to have the reactor() function get and set? I see nothing wrong with that.
I don't see any implementation wise problems for stacking? Not sure what the problem would be.
Not sure what you mean with dropping the reference to the underlying driver? Just reset the value to null?
The advantage though would be that you can easily add functions when you have some reason to extend your concrete implementation by some function which isn't mandated by the interface.
So, I don't see any advantage of static classes, only a potential disadvantage.
Bob Weinand (iPhone)

Am 17.03.2016 um 11:22 schrieb Andrew Carter<EMAIL_ADDRESS>The underlying event loop driver should be encapsulated. AMP uses the reactor() function to encapsulate the active reactor. I've got several problems with that design, all of these are solved by proper encapsulation using a class:
reactor() function which actually has two functions - getting and setting the reactor.
It doesn't make it possible (or at least clean) to stack multiple event loops (to run one inside another)
There is no way to make the reactor() function drop its reference to the underlying event loop driver.
On the other hand, I can't see a single advantage that functions would have over a static class.
We have to find a middle ground between the boiler plate code of passing the event loop around and injecting it as a dependency everywhere and global objects that have no obvious end-of-life and leave hidden references. I believe we're getting very close to that in the other thread, with the concept of running a callable within the scope of an event loop and having that loop being detached once that scope has been left. It gives a very clear start and end point to the life of an event loop.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@bwoebi - You can't reset the value to null, because that's the same as not passing a parameter, which is the same as asking it to 'get' rather than 'set'. It's a definite memory leak, you'd need to replace it with a null object to get it to drop the reference.
My opinion is that having single function that performs two functions is bad design. In all my experience programming, I've found that simple functions with clear and obvious intentions are more maintainable, understandable and produce cleaner code that is easier to read. I don't think I'm alone in this, as I hear similar design practices at conferences and in programming material that I read online. The hidden reference in the reactor() function is a single example of the multitude of issues that can present themselves when functions aren't kept simple.
I'm not factoring extensibility into the design goals of the work we are doing here (allowing people to add functionality beyond what is provided by the standard). As soon as an implementation adds functionality beyond the specification - they aren't using the standard - because they can't guarantee that implementations of the standard will be interoperable with them. The obvious example with this is the Slim helper methods for PSR-7 - they are effectively useless for writing interoperable code - because people couple themselves to the Slim implementation of PSR-7 rather than PSR-7. These applications break if people try using Zend PSR-7 objects and they break in a very nasty way that isn't usually detected by unit tests (only smart functional tests that can foresee the problem).
With regards to stacking, the problem is that with a reactor() style function is that any code at any time can change the event loop for the whole application.
With a static class I can guarantee that (in the scenario below) I am using the event loop that I specified - and that some external library hasn't interfered with the driver that I am proxying to. With the AMP design, any library at any time could call the reactor function and my application simply can't assume that the event loop it originally specified was the one it is actually communicating with.
EventLoop::execute(function () {

   // call another library
   // do something else

   EventLoop::execute(function () {
     // this call is guaranteed to use OtherEventLoopDriver
     EventLoop::onReadable($stream, ...);
   }, new OtherEventLoopDriver());

   // this call is guaranteed to use EventLoopDriver
   EventLoop::onReadable($stream, ...);

}, new EventLoopDriver());

You can't reset the value to null, because that's the same as not passing a parameter, which is the same as asking it to 'get' rather than 'set'.

I think @AndrewCarterUK makes an interesting point here. It may certainly be useful to drop the event loop instance, especially when working with fickle things like threads or forked processes.
However, making it a static class isn't what offers you the guarantee of a particular event loop; its the use of closures. You could write a static function that does the same thing as EventLoop::execute, but there would be no way for onReadable to access the current instance.
Either way, this kind of depends on #14, unless they have a different name. Like interface Loop and class EventLoop. No conflict that way, I suppose.

@coderstephen - What if my closure calls some third party library that has a call in it to the reactor() function?

I was suggesting to not have a reactor() function, only an execute() function.

But then what would encapsulate the event loop? With functions there's no way of making something private - so you either need a function such as reactor() to encapsulate it or leave it as a global variable hanging around somewhere. All of which are publicly accessible and don't guarantee the scope of the event loop.
These are all solved problems!

I don't believe it is technically possible using functions. I was just clarifying the reasons behind the stance, and then why the particular approach doesn't work with static functions.

@coderstephen Back to your earleir point, there is an option for going back to just different names.
I'm not a fan of 'EventLoop' and 'Loop'  - they're the same thing and it'd be easy to confuse them.
I'm thinking that leads us to EventLoop and EventLoopDriver - as that explains more clearly what they would do.
On that reasoning we can close this - as @assertchris said the discussion about the interface suffix has closed.

I'm thinking that leads us to EventLoop and EventLoopDriver - as that explains more clearly what they would do.

Ooh, I sort of like that.
But yes, the reasons for this issue have been resolved.


ruff-lsp: ruff is now a python package

Followup on #350654
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Couldn't we simply patch the absolute path of the ruff binary here instead ?

Couldn't we simply patch the absolute path of the ruff binary here instead ?

That would probably defeat the intent:
# prefer ruff from user's PATH, that's usually desired behavior

That would probably defeat the intent:

Fair enough.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 350729

x86_64-linux

:white_check_mark: 2 packages built:

ruff-lsp
ruff-lsp.dist

aarch64-linux

:white_check_mark: 2 packages built:

ruff-lsp
ruff-lsp.dist

x86_64-darwin

:white_check_mark: 2 packages built:

ruff-lsp
ruff-lsp.dist

aarch64-darwin

:white_check_mark: 2 packages built:

ruff-lsp
ruff-lsp.dist


Does the BODY PARAMETERS query not support

This does not take effect when in:body is passed to the parameters object

in can only have "query", "header", "path" or "cookie". https://spec.openapis.org/oas/latest.html#fixed-fields-9
to define request body check out https://swagger.io/docs/specification/describing-request-body/


Copying junit to system dir for Time 27 when there is a system-wide Ant installation

This issue seems to be the same as #254 .
Environment:

OS: ubuntu 20.04
defect4j version: master, 397075d427d44d153fa5436f4b82d58f0afea712

When there is a system-wide Ant installation, if I run gen_tests.pl for Time 27b and then execute run_bug_detection.pl on the generated test suites, I will encounter the following build failure:
Attempt to copy /path/defects4j/framework/projects/lib/junit-4.11.jar to /usr/share/ant/lib/junit-4.11.jar using NIO Channels failed due to '/usr/share/ant/lib/junit-4.11.jar'.  Falling back to streams.

If I uninstall the system-wide Ant, everything becomes ok.
Is this the expected behavior or a bug?
Steps to reproduce:
# install defects4j
gen_tests.pl -g evosuite -p Time -v 27b -n 1 -o . -b 180
run_bug_detection.pl -p Time -d Time/evosuite/1 -o .
# everything is ok

sudo apt install ant
gen_tests.pl -g evosuite -p Time -v 27b -n 1 -o . -b 180
run_bug_detection.pl -p Time -d Time/evosuite/1 -o .
# encounter the build failure

sudo apt remove ant
gen_tests.pl -g evosuite -p Time -v 27b -n 1 -o . -b 180
run_bug_detection.pl -p Time -d Time/evosuite/1 -o .
# everything becomes ok again

D4J version 3 reverted back to using the version of Ant that is shipped with Major. This avoids configuration problems and improves reproducibility.


GEOMESA-850 Allowing configuration of kafka DS timeout

Signed-off-by: Emilio Lahr-Vivaz<EMAIL_ADDRESS>

Looks good . . . merging.


django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. | fresh gethue/hue:latest

I just want to start a fresh docker-compose instance of hue, but I'm getting the following error:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient? Traceback (most recent call last):   File "/usr/share/hue/build/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>     import MySQLdb as Database ModuleNotFoundError: No module named 'MySQLdb'
That happen since the latest image of gethue/hue:latest. Is it an image problem?

Hi @Basserado, most probably image is missing the mysqlclient package. Can you install it explicitly and see if that works for you?

I am also facing exact same issue
ModuleNotFoundError: No module named 'MySQLdb'
hue             |
hue             | The above exception was the direct cause of the following exception:
hue             |
hue             | Traceback (most recent call last):
hue             |   File "/usr/share/hue/build/env/bin/hue", line 33, in

I have create a PR and fix the problem

We have removed the mysqlclient package from our requirements.txt because of licence issues.
mysqlclient is GPL licensed vs Hue which is Apache licensed.
Users can add the package explicitly if they want to have MySQL.
For Hue's database, you can alternatively use other database like postgres!
https://docs.gethue.com/administrator/installation/dependencies/#postgresql
https://docs.gethue.com/administrator/installation/dependencies/#macos (refer postgres steps)


Vulnerability roundup 93: bazaar-2.7.0: 1 advisory [8.8]

search, files

[ ] CVE-2017-14176 CVSSv3=8.8 (nixos-20.03)

Scanned versions: nixos-20.03: 0d0660fde3b.

Patch present already so FP.
BUT.. removed from 20.09 / master.
It's fine so not removing it.


on delete; InvalidChangeBatch

I have spoken on slack about this issue and I am now seeing it again:
settings and version, etc:
          imagePullPolicy: Always
          env:
            - name: EXTERNAL_DNS_DEBUG
              value: "false"
            - name: EXTERNAL_DNS_LOG_LEVEL
              value: error
            - name: EXTERNAL_DNS_SOURCE
              value: ingress
            - name: EXTERNAL_DNS_PROVIDER
              value: aws
            - name: EXTERNAL_DNS_POLICY
              value: sync
            - name: EXTERNAL_DNS_REGISTRY
              value: txt
            - name: EXTERNAL_DNS_TXT_OWNER_ID
              value: luke
            - name: EXTERNAL_DNS_DOMAIN_FILTER
              value: |-
                kubernetes.domain1.com.au.
                k8s.domain2.com.au

error:
[external-dns-f65cc6dfd-sj6ld] time="2018-10-07T23:33:39Z" level=error msg="InvalidChangeBatch: Tried to delete resource record set [name='flex-579-opus.k8s.domain2.com.au.', type='A'] but the values provided do not match the current valuesntstatus code: 400, request id: 6a96ada9-ca89-11e8-8889-7146c770a10d"

This error matches all of the records it is trying to delete, if I manually remove this record it will just get stuck on the next one until I remove them all.
the error is an AWS error:
https://aws.amazon.com/premiumsupport/knowledge-center/troubleshoot-route53-resource-record/
An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: Tried to delete resource record set [name='a.domain.com.', type='A'] but the values provided do not match the current values

You're trying to delete a resource record set using a JSON file but the content doesn't match the values of the existing record set.

Check and update the values for Name, Type, and TTL in your configuration file. Then, try to delete the resource record set again.

maybe related to this recent change? https://github.com/kubernetes-incubator/external-dns/issues/679

@jurgenweber are the affected records all ALIAS records?

considering that the only records in this route53 zone are Alias records I think it is safe to say 'yes'.

@jurgenweber Then you're most likely running into this issue: https://github.com/kubernetes-incubator/external-dns/issues/720. There's an open PR with a fix for it which you could give try: https://github.com/kubernetes-incubator/external-dns/pull/724.
I pushed an image as well: https://github.com/kubernetes-incubator/external-dns/pull/724#issuecomment-427864053

ok, I am trying the image. I will let you know if I run into issues (and assume no news is good news).

closing as your image solved the issue and I saw the release just now with the fix in there.

np


[scan] Scan does not return output when there are test failures

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description

When running scan with fail_build set to false the result is not returned as an output. Instead only a nil object is received
Command executed

Sample from FastFile
# running with failing tests
scan_output = scan(fail_build: false)
# expecting `scan_output` to not be nil but received nil

Details
On this line it looks like UI.test_failure! is called which raises an exception and that exception is caught when fail_build is false so it doesn't fail the step but because an exception was raised Line 316 was never called so no output is returned.
Thank you @kamvoick for pointing it out.

I created https://github.com/fastlane/fastlane/pull/20237 to fix this


[CMake] Move the _add_swift_target_library_single() call for BlocksRuntimeStub under the SWIFT_BUILD_STDLIB check

Since the stub for BlocksRuntime library is to "be used for the reflection tests", don't set it up unless the reflecting tests are also setup.

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - 85a5e5a493cc4a59f475e40b3d67941d9acff324

@swift-ci test linux platform

@swift-ci test Windows platform

test failure on windows shows up in master as well

Good call :)


@sentry/electron v1.2.1 build fail with Electron v7.0.0

[x] Review the documentation: https://docs.sentry.io/platforms/javascript/electron/
[x] Search for existing issues: https://github.com/getsentry/sentry-electron/issues
[x] Use the latest release: https://github.com/getsentry/sentry-electron/releases
[ ] Provide a link to the affected event from your Sentry account

Versions + Platform

[x] SKD version -<EMAIL_ADDRESS>[x] Electron version -<EMAIL_ADDRESS>[x] Platform - macos

Description
When I updated @sentry/electron from v0.8.1 to v1.2.1 I got the following build error:
node_modules/@sentry/electron/dist/common.d.ts:53:32 - error TS2503: Cannot find namespace 'Electron'.
    getRendererName?(contents: Electron.WebContents): string | undefined;

I did not run into this issue on a separate project that also uses electron v7.0.0 in macOS. Any pointers or help would be appreciated.

Relevant dependencies from yarn.lock:
"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-rPeAFsD/6ontvs7bsuHh+XAg1ohWo04ms08SNWqEvLRQJx7WfiWnjziyC0S3dXIYZDGdhruSsqQJPJN8r6Aj5g==
  dependencies:
    "@sentry/hub" "5.10.2"
    "@sentry/minimal" "5.10.2"
    "@sentry/types" "5.10.0"
    "@sentry/utils" "5.10.2"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-r3eyBu2ln7odvWtXARCZPzpuGrKsD6U9F3gKTu4xdFkA0swSLUvS7AC2FUksj/1BE23y+eB/zzPT+RYJ58tidA==
  dependencies:
    "@sentry/core" "5.10.2"
    "@sentry/types" "5.10.0"
    "@sentry/utils" "5.10.2"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-sKVeFH3v8K8xw2vM5MKMnnyAAwih+JSE3pbNL0CcCCA+/SwX+3jeAo2BhgXev2SAR/TjWW+wmeC9TdIW7KyYbg==
  dependencies:
    "@sentry/hub" "5.10.2"
    "@sentry/minimal" "5.10.2"
    "@sentry/types" "5.10.0"
    "@sentry/utils" "5.10.2"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>  version "1.2.1"
  resolved<EMAIL_ADDRESS>  integrity sha512-8HtBjMvLpKbGRnf/iMWd/EXYatkepf1hsY6myIjH8egyPoRNbyxJhiAFoJeZ5GLbWRCWm7UuHkG4hBeyxUNZhg==
  dependencies:
    "@sentry/browser" "~5.10.2"
    "@sentry/core" "~5.10.2"
    "@sentry/minimal" "~5.10.2"
    "@sentry/node" "~5.10.2"
    "@sentry/types" "~5.10.0"
    "@sentry/utils" "~5.10.2"
    electron-fetch "^1.4.0"
    form-data "2.5.1"
    util.promisify "1.0.0"

"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-hSlZIiu3hcR/I5yEhlpN9C0nip+U7hiRzRzUQaBiHO4YG4TC58NqnOPR89D/ekiuHIXzFpjW9OQmqtAMRoSUYA==
  dependencies:
    "@sentry/types" "5.10.0"
    "@sentry/utils" "5.10.2"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-GalixiM9sckYfompH5HHTp9XT2BcjawBkcl1DMEKUBEi37+kUq0bivOBmnN1G/I4/wWOUdnAI/kagDWaWpbZPg==
  dependencies:
    "@sentry/hub" "5.10.2"
    "@sentry/types" "5.10.0"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-1ib1hAhVtmfXOThpcCfR4S6wFopd6lHqgOMrAUPo9saHy8zseZPRC7iTWGoSPy2RMwjrURAk54VvFnLe7G+PdQ==
  dependencies:
    "@sentry/apm" "5.10.2"
    "@sentry/core" "5.10.2"
    "@sentry/hub" "5.10.2"
    "@sentry/types" "5.10.0"
    "@sentry/utils" "5.10.2"
    cookie "^0.3.1"
    https-proxy-agent "^3.0.0"
    lru_map "^0.3.3"
    tslib "^1.9.3"

"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>  version "5.10.0"
  resolved<EMAIL_ADDRESS>  integrity sha512-TW20GzkCWsP6uAxR2JIpIkiitCKyIOfkyDsKBeLqYj4SaZjfvBPnzgNCcYR0L0UsP1/Es6oHooZfIGSkp6GGxQ==

"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>  version "5.10.2"
  resolved<EMAIL_ADDRESS>  integrity sha512-UcbbaFpYrGSV448lQ16Cr+W/MPuKUflQQUdrMCt5vgaf5+M7kpozlcji4GGGZUCXIA7oRP93ABoXj55s1OM9zw==
  dependencies:
    "@sentry/types" "5.10.0"
    tslib "^1.9.3"

The latest version of @sentry/electron is 2.4.1 so I'm going to close this as stale and probably fixed but feel free open a new issue if the problem persists!


[SPARK-16268][PySpark]SQLContext should import DataStreamReader

What changes were proposed in this pull request?
Fixed the following error:
>>> sqlContext.readStream
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...", line 442, in readStream
    return DataStreamReader(self._wrapped)
NameError: global name 'DataStreamReader' is not defined

How was this patch tested?
The added test.

Test build #61424 has started for PR 13958 at commit 0e2c3d8.

cc @tdas @brkyvz

LGTM pending tests

Test build #61424 has finished for PR 13958 at commit 0e2c3d8.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61424/
Test PASSed.

Merged build finished. Test PASSed.

My patch #13955 has the partial fix, but I realized that there are no tests so my patch did not actually fix this. Let merge this and then update my patch.


Improve tap docs

Simplify TAP ops steps (and modernise a bit)
Stop piping cats
Wrap at 80c according to best practices

@Arau a recommendation would be to remove the $ in the code snippets to make it easier for users to copy the command and run it without mistakenly copying the $ that occurs at the beginning of the snippet.
Overall, LGTM.


parse headers sent by the server without knowing the version

Chrome never uses 6 byte packet numbers for the Public Headers. By doing the same, we can parse headers sent by the server without knowing the version in advance, since the third and fourth bit will never be both set in Public Headers, but they are in all IETF QUIC packets (except the version negotiation packet).

Codecov Report

Merging #1370 into master will decrease coverage by 0.03%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #1370      +/-   ##
==========================================
- Coverage   89.98%   89.96%   -0.03%
==========================================
  Files         119      119
  Lines        8346     8344       -2
==========================================
- Hits         7510     7506       -4
- Misses        550      551       +1
- Partials      286      287       +1

Impacted Files
Coverage Δ

client.go
90.18% <100%> (ø)
:arrow_up:

internal/wire/header.go
100% <100%> (ø)
:arrow_up:

internal/wire/public_header.go
90% <60%> (-1.43%)
:arrow_down:

Continue to review full report at Codecov.

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


Is this image will be fixed on freebsd9?

Thanks for this work, we are using the image for https://github.com/behdad/harfbuzz/pull/595 for testing compile of the project with freebsd9 and gcc4. My question is, is the image supposed to be fixed on the version or we should use a permanent version to ensure it will not be changed over the time? If it supposed to be changed, it would be nice if some tags would be added. Thanks.

I guess the build script could be modified to fetch each set of iso, and then build containers for each w/ tags.

Oh great, if so, I like to suggest the particular version of the uploaded image on dockerhub https://hub.docker.com/r/donbowman/freebsd-cross-build/tags/ to be tagged with the freebsd version. Thanks.

Closing this as it is not related to the repo directly, thank you :)


As the Designer, I want the ability to find a Node in my LinkList so that I can use this information to optimize individual coding decision.

[ ] Write find method.
[ ] Test find method.

Build #16 completed successfully.


KeyError: ('Evt11', 'Sta1')

For some files I sometimes, but not always get the following error:

Exception in thread Thread-63:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pynetdicom-0.8.1-py2.7.egg/netdicom/DULprovider.py", line 264, in run
    self.SM.Action(evt, self)
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pynetdicom-0.8.1-py2.7.egg/netdicom/fsm.py", line 481, in Action
    action_name = TransitionTable[(event, self.CurrentState)]
KeyError: ('Evt11', 'Sta1')

This only happens when I create the association as:
 ts = [dicom_file.file_meta.TransferSyntaxUID]
MyAE = AE(aet_client, 0, SupportedTransferSyntax, [], ts)

If I set ts to:
   ts = [
        ExplicitVRLittleEndian,
        ImplicitVRLittleEndian,
        ExplicitVRBigEndian
        ]

then I do not get this error.

Original issue reported on code.google.com by agrothberg on 29 Oct 2014 at 4:45

I just got the same error. The transfer was otherwise successful.


docs: add endpoint field to aws sns binding

Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:

[ ] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[ ] Read the contribution guide
[ ] Commands include options for Linux, MacOS, and Windows within codetabs
[ ] New file and folder names are globally unique
[ ] Page references use shortcodes instead of markdown or URL links
[ ] Images use HTML style and have alternative text
[ ] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:
Description
Make docs in align with the aws.sns metadata schema defined here: https://github.com/dapr/components-contrib/pull/3433
Issue reference

@holopin-bot @Eileen-Yu Enjoy your Dapr docs badge!