[NestCam]Failed to request access token. Unexpected API Error - 405

Hi -
Having an issue with NestCam, trying to add it to my existing homebridge setup.
Homebridge starts up and then I get
"[NestCam]Failed to request access token. Unexpected API Error - 405"
I added it as shown in the guide.
Is this known?  I saw one person comment about it but no resolution was given.
Thanks

Hi there, having the same issue. Also can't add cameras as accessories in home app.
Novice user here (just started today) but thankful for help.

Worked like charm for more than 5 months, stopped working since yesterday. Restarted homebridge a couple of times but no luck: I think it has something to do with the plugin authentication with near. Something must have changed in the API.

Glad I jumped on here before I started tinkering, same issue here

HI
Same error here
[NestCam]Failed to request access token. Unexpected API Error - 405

The API probably changed recently. I can take a look this weekend.

My camera's stopped updating, I'm not getting any errors but I can only assume it is a general issue, thanks @KhaosT for taking a look at it.

I have the same error

Same here!!

Hey KhaosT,
Having the same issue... When will this be fixed? (when is your weekend) as I love this and would love to keep using it!
Thanks in advance.

Same. Glad I came here before I started dismantling Homebridge in the quest to fix.

thanks.
im getting
"{"url":"/session","message":"400 Bad Request"}curl: (6) Could not resolve host:" from the curl command however

did you copy the whole thing correctly?

nm. it worked to get token on the pi.  was getting that error on macos.

How do I handle a password to generate the token if I have an “!” in my password?  Looks like it’s not working correctly due to the character.

On Dec 15, 2018, at 8:40 PM, cbeale<EMAIL_ADDRESS>wrote:
nm. it worked to get token on the pi. was getting that error on macos.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/KhaosT/homebridge-nest-cam/issues/40#issuecomment-447613139, or mute the thread https://github.com/notifications/unsubscribe-auth/AHaL3fOx4c-MyshS8fmeJpFiDAQ7It26ks5u5bKhgaJpZM4ZQnMt.

I tried with ! and it's working for me... if not, try use %21 in place where it suppose to be !

I got it added to homebridge and it added the camera as a motion sensor.  How can I add it so it shows up with other cameras and displays the video?
Thanks so much for your work!

@cbeale if you go to Home app, add new accessory, the camera should show up?

Where did you put the "!" mark?

Strange, after I enter the email and pass with the ! in the pass, here is what I get:
 --data-urlencode “password=passwordpriortotheexclamationpointhomebridge -Ipasswordaftertheexclamationpoint"

{"error":"access_denied","error_description":"invalid user credentials","instance_id":"a97454fe-5a72-43e6-871d-2a874cd94ec6"}

On Dec 15, 2018, at 8:54 PM, cbeale<EMAIL_ADDRESS>wrote:
I got it added to homebridge and it added the camera as a motion sensor. How can I add it so it shows up with other cameras and displays the video?
Thanks so much for your work!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/KhaosT/homebridge-nest-cam/issues/40#issuecomment-447613658, or mute the thread https://github.com/notifications/unsubscribe-auth/AHaL3e5ZMW8ULrl84_XYJQd6oGKle-wcks5u5bXggaJpZM4ZQnMt.

where do you put the "!" mark???

@harryohalloran I'm confused, where is that -l coming from? the full command should be something like curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode<EMAIL_ADDRESS>--data-urlencode "password=blabla!!!!123"

where do you put the "!" mark???
I can see if it works

Works like a charm no issues with (0.0.12 update)

@KhaosT I removed the bridge from my phone and re added it.  All 13 accessories connected to the homebridge added/configured themselves and the camera only adds itself as a motion detector and not as a camera.

@cbeale if it's configured properly, you should see a separate camera accessory in there. If it's not showing up for you, please open a separate issue so we don't spam everyone else in the thread.

All good, looks like a specific combination of characters I had in my password was causing the issue.  Changed the password and got it working correctly.

On Dec 15, 2018, at 9:09 PM, Khaos Tian<EMAIL_ADDRESS>wrote:
@cbeale https://github.com/cbeale if it's configured properly, you should see a separate camera accessory in there. If it's not showing up for you, please open a separate issue so we don't spam everyone else in the thread.
https://user-images.githubusercontent.com/1725664/50049550-d9c56000-009c-11e9-90e3-4ae26de6d351.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/KhaosT/homebridge-nest-cam/issues/40#issuecomment-447614316, or mute the thread https://github.com/notifications/unsubscribe-auth/AHaL3degfrQMilC6W_0DB8nzIlfTVkgqks5u5bligaJpZM4ZQnMt.

Thanks everything works great now.

@black01gt Huh this is interesting... I'm not seeing the expires_in for access_token for account with 2FA enabled, and I'm not exactly sure if there is a way to refresh access token automatically... Please report back if this stop working after the expiration date.

I don't have 2FA enabled. Should I enable it and get a new token?

If you hate manually refresh token every month, maybe give that a try?

Thanks again. all set.

I cannot get the token with 2fa enabled: I get {"status":"INVALID_INFO"}

Never mind: it was character error, I was copying and pasting the code in Notes, and it changed the " char to another thing... I got the access token now, but Homebridge crashes and says:
ERROR LOADING PLUGIN homebridge-nest-cam:
[12/16/2018, 1:50:21 AM] Error: Cannot find module './Hello.js'

again, if anyone finds the same errors as me: I tried uninstalling the nom package and re installing it. It wouldn't install with sudo (as I always do it) I tried without sudo and it worked.
WORKING, thanks!!

[NestCam]Failed to request access token. Unexpected API Error - 403
When I use the code in terminal I get the next error:
{"url":"/session","message":"400 Bad Request"}/homebridge #

All working fine with 0.12 version...
I have used the curl command on this post as the one in the github didn't worked for me.

I got the access_token but I am not sure how to read it?  Does it end before / or "?

Oh nevermind. I was copying the wrong access_token all along.

So we have to do this every month? I also had the issue with "!" and %21 didn't work for me, so I just changed my password to get the access token.

This is not working for me. I added my access token without and afterwards with 2FA but both are not working. I'm not getting any errors ... what can be wrong? I get an access token returned but it does not seem to be valid

Do I need a Nest API developer account or something?

My access token is something like "b.10587059.OunaLccXhsEYERTYKK2341Kn4XRwnINSTbraPK0468PImYEJhUZoCr3kpSpxwaFU3l9jMDtkdcU7WACHANGEDSOMECHARS5WHhRHYqmOpik"

@coxfrederic can you create an new issue in this project and post log homebridge print at start?

After updating the plugin and copying the access code in my config, I'm still getting the 405 error. I'm seeing two access tokens being returned, I'm assuming it's the first one?

Love this plugin.    Unable to get token, I have 2FA.
When I paste command into terminal:
curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode<EMAIL_ADDRESS>--data-urlencode "password=XXYY"
In return I receive:
curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode "email=<EMAIL_ADDRESS>--data-urlencode "password= XXYY"platform": "Nest-cam",

I've updated the plugin and regenerated the token and added it to the config. All looks good in Homebridge, but I'm having trouble adding the camera back in. Any tips and tricks would be greatly appreciated.

@QandnotU can you create a new issue in this project and post log homebridge print there?

[NestCam]Failed to request access token. Unexpected API Error - 403
When I use the code in terminal I get the next error:
{"url":"/session","message":"400 Bad Request"}/homebridge #

I am having this issue as well, how did you resolve it?

I didn’t ☹

[NestCam]Failed to request access token. Unexpected API Error - 403
When I use the code in terminal I get the next error:
{"url":"/session","message":"400 Bad Request"}/homebridge #

I am having this issue as well, how did you resolve it?

Use the curl expresion provided above... the one on the github doesn't work for me
You just need to put your email address and your nest password
curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode<EMAIL_ADDRESS>--data-urlencode "password=blabla!!!!123"

I saw it mentioned above, but not sure it was ever resolved: When a password ends in a ! (as mine did) it results in : -bash: !": event not found
The only way around this seems to be changing one's password to not end in a ! (which I did). Would be lovely if that wasn't required however.

I have upgraded the plugin, was able to get a token using 2FA method and put it in the config but I still get [NestCam]Failed to request access token. Unexpected API Error - 405
I must be missing something...
Events with specific values removed:
curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode "email=MYEMAIL" --data-urlencode "password=MYPASSWORD"
{"status":"VERIFICATION_PENDING","2fa_token":"2FATOKENVALUE","truncated_phone_number":"5555"}
curl -X "POST" "https://home.nest.com/api/0.1/2fa/verify_pin" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/json; charset=utf-8' -d $'{"pin": "555555","2fa_token": "2FATOKENVALUE"}'
{"status":"ID_MATCH_POSITIVE","access_token":"TOKENVALUE"}
CONFIG:
{
"platform": "Nest-cam",
"access_token": "TOKENVALUE",
"useOMX": false
}

Likely your plugin is not updated
Juan Felsmann
<EMAIL_ADDRESS>On Dec 22, 2018, at 08:03, Harold<EMAIL_ADDRESS>wrote:
I have upgraded the plugin, was able to get a token using 2FA method and put it in the config but I still get [NestCam]Failed to request access token. Unexpected API Error - 405
I must be missing something...
Events with specific values removed:
curl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode "email=MYEMAIL" --data-urlencode "password=MYPASSWORD"
{"status":"VERIFICATION_PENDING","2fa_token":"2FATOKENVALUE","truncated_phone_number":"5555"}
curl -X "POST" "https://home.nest.com/api/0.1/2fa/verify_pin" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/json; charset=utf-8' -d $'{"pin": "555555","2fa_token": "2FATOKENVALUE"}'
{"status":"ID_MATCH_POSITIVE","access_token":"TOKENVALUE"}
CONFIG:
{
"platform": "Nest-cam",
"access_token": "TOKENVALUE",
"useOMX": false
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi -
Having an issue with NestCam, trying to add it to my existing homebridge setup.
Homebridge starts up and then I get
"[NestCam]Failed to request access token. Unexpected API Error - 405"
I added it as shown in the guide.
Is this known? I saw one person comment about it but no resolution was given.
Thanks

Having same Issue. Tried all the steps. I'm wondering if using the homebridge-nest plugin causes a conflict. Any ideas?

I’m yawing the homebridge nest plugin also with no issues. Everything is working great. Make sure you follow the steps closely.

I am able to request a token using the first curl sequence and I do receive my SMS message code. When I try to send the second curl command to verify I receive {"error":"access_denied","error_description":"permission denied","instance_id":...

Did you resolve this? I'm getting the same. Even through postman nor curl can I get a token based on the verification PIN and token from previous command..

Still unresolved. I ended up having to turn off 2 factor authentication to get it to work.

For those who have a "!" at the end of a password, and trying to run the command which results in the following error: !": event not found
Try running "set +H" in Terminal and then running curl express, it should fix the issue


Fix RISC-V CSRRW, CSRRS, and CSRRC instr disass

Make the CSR instructions show the CSR 12-bit immediate operand as an unsigned integer.
This is a special case of the I-instruction format, where it is same except that the 12-bit immediate is treated as unsigned rather than signed.

@D0ntPanic here I only change the interpretation of the CSR number as unsigned rather than signed.
My other PR where I changed the order in which the operands are displayed was incorrect, at least compared to how the GNU assembler expects the instruction operands.


Session management and rate limit conformance

I recently ran into rate limits while using this package.
https://docs.bsky.app/docs/advanced-guides/rate-limits describes the following rate limits:

com.atproto.server.createSession

Measured per account
30 per 5 minutes
300 per day

Python logging shows records similar to:
2024-11-15 17:54:54,199 HTTP Request: POST https://bsky.social/xrpc/com.atproto.server.createSession "HTTP/1.1 200 OK"
2024-11-15 17:54:54,447 HTTP Request: GET https://bsky.social/xrpc/app.bsky.actor.getProfile?actor=xxx "HTTP/1.1 200 OK"
2024-11-15 17:54:54,776 HTTP Request: GET https://bsky.social/xrpc/app.bsky.feed.getAuthorFeed?actor=xxx "HTTP/1.1 200 OK"
2024-11-15 17:54:59,727 HTTP Request: POST https://bsky.social/xrpc/com.atproto.server.createSession "HTTP/1.1 200 OK"
2024-11-15 17:55:00,009 HTTP Request: GET https://bsky.social/xrpc/app.bsky.actor.getProfile?actor=xxx "HTTP/1.1 200 OK"
2024-11-15 17:55:00,333 HTTP Request: GET https://bsky.social/xrpc/app.bsky.feed.getAuthorFeed?actor=xxx "HTTP/1.1 200 OK"
2024-11-15 17:55:05,437 HTTP Request: POST https://bsky.social/xrpc/com.atproto.server.createSession "HTTP/1.1 200 OK"

I invoke get_author_feed() in my code like this (based on atproto documentation):
https://github.com/v-p-b/rss2bsky.py/blob/f4701dbf3e69255aac5b68399434e6e56e0c50b4/rss2bsky.py#L13
This suggests, that a new session is created every time I get an item from the feed that triggers the rate limit. It'd be nice to have some guidance about how to use the AT API while reusing a single session for similar tasks.

Hello, I thought that I covered this topic here: https://atproto.blue/en/latest/atproto_client/auth.html.

Thanks for the fast reply, this part of the linked docs applies to my use-case:

The access and refresh tokens are stored in the client object and are used for subsequent requests. SDK will automatically
refresh the access token when it expires. So, you don’t need to worry about it at all.
It works amazingly well until you don’t recreate the client instance many times. If it’s possible, try to keep the client instance alive > as long as possible. For example, instead of starting the script by cron every 5 minutes, keep it running and use the sleep
function.

What is bugging me is that as far as I can tell my code does exactly this (creates one client, then uses it an infinite loop with sleep), yet the above debug output suggests that create_session() is invoked in a tight loop, possibly while iterating through timeline.feed.
I had to wait until my block was lifted so I could debug this further, and found that atproto throws an exception while parsing Bluesky response, so I updated the package to 0.0.55. Now I can't observe the unnecessary createSession calls in my logs so I'm closing this.


Call valueOnChange as its sliding

Hey, great library here
I am currently using the single knob Slider and wondering if you think it would be hard to add functionality to call the valueOnChange handler as the gesture is happening, so my interface can update as a gesture is in progress
I'm looking into the code at the moment trying to work out how to implement it, but thought I would ask if you had any ideas while I was doing it

Hey
Look for rows 140-141.
If you'll add another prop (of type ref) you can set it the vaule on the fly.


help appreciated

Hi Patrick,
been trying to import  some daily data form the past 6 months, as my data is not from Toon but from Oxxio I created the .CSV files using excel. With these i followed your instructions. I can see that the *_NEW tables are created and filled but somehow the data is not imported into the statistics and statistics_short_term tables. even as executing the SQL  script doesn't report any errors.
As I'm not a developer and lack the skills, I'm hoping you can help me out and put me in the right direction.
attached: the .CSV files, database and SQLlite project.
thank you!
files.zip

Hi,
I looked at the script. The daily data from the CSV files was not imported into the *_NEW tables because the import of the hourly data was commented out. The first checks if it already has information with a finer resolution before importing the daily information. I changed the script and removed the check (see attached script).
The CSV files do not contain a lot of data is that correct?
Script.zip

thanks for your swift reply!
my CSV files are indeed quite short, the solar panels are only two months old and the current provider is since last June. Once I got this data in, I look into the older data.
I will check the new script this weekend, keep you posted.

Oke... I got it!
the correct solar data was cumulative and in wH * 1000 like beneath. this resulted in a script error because in the "cleanup wrongs" part there was a control check: - Diff > 1000	=> Incorrect value.
eventually I got all the historical data restored.
tnx!
elec_solar_quantity_CurrentElectricityQuantity_10yrdays.csv:
1699142400,0
1699228800,743000
1699315200,20813000
1699401600,29749000
1699488000,45439000
1699574400,48537000
1699660800,62699000
1699747200,67513000
1699833600,69933000
1699920000,75297000
1700006400,88457000
1700092800,90051000
1700179200,110948000
1700265600,111879000

footnote:

Maybe its possible to update the readme and add the importance to make a backup before tweaking the database ;) I totaly forgot........
in the script the are several places where I needed to /change / the sensor ID's, is it possible to make use of variables? because i forgot to change one or two, and it screwed up the database........

anyway Tnx-A-Lot!

Last weekend I completly rewrote the script and incorporated your feedback. I made the script generic and more robust.
Can you share with me how you prepared your data from Oxxio so that I can add is as a datasource (see new setup)?

Hi Patrick,
I'm looking into your request. Been preparing a new dataset based on Oxxio and the new script. Do to a lack of time i hope to have some results next week.
Regards!

@vGelder Thank you very much!
It would already help just for starters to have a sample file.

Hi,
I got the following files for you:
At 'mijn-0xxio.nl' I got two options. the first is to download the data direct from oxxio which gave me the following XLS:
Oxxio Verbruik_05-06-2023-22-01-2024.xlsx
the second option was to request the data from the 'netwerkbeheerder' in my case that is Liander they gave the following CSV:
csv_bijlage.csv
each file represents only the time I'm an Oxxio customer.
Prior to Oxxio I was a customer of Engie, from their App I downloaded the following CSV:
Export verbruiken ENGIE.csv
note that during the Engie period I didn't produce energy jet so that data is not present.
Using the URL provided by @ndewijer: (https://github.com/ndewijer/HA-Import-Historical-Data/tree/main/SolarEdge_API) I got the following output for solar data:
Solar Edge.txt
Hope this helps you with the script.
Please feel free if I can help you with some testing.

New request ;)
I have now the data of multiple energy providers imported into HA which is great.  Maybe it's also possible to add the costs according the imported data?
I was thinking that it shout be possible to

add a table with the columns change_date and new_costs
delete currents costs from database
insert new costs into the database

Obviously I not a developer... ;) but what do you think?

New request ;)
I have now the data of multiple energy providers imported into HA which is great.  Maybe it's also possible to add the costs according the imported data?
I was thinking that it shout be possible to

add a table with the columns change_date and new_costs
delete currents costs from database
insert new costs into the database

Oviously

Interesting idea, I will have to dive into it to determine whether it is doable.
Thank you for the sample data. I already created the script for Engie and Oxxio and working on Liander.


DataFrame interchange protocol: should NaT be like NaN or a sentinel?

In the describe_null we currently list the following options:

0 : non-nullable
1 : NaN/NaT
2 : sentinel value
3 : bit mask
4 : byte mask

While looking at the pandas implementation, I was wondering if we shouldn't treat NaT differently from NaN and see it as a sentinel value (option 2 in the list above).
While NaN could also be seen as a kind of sentinel value, there are some clear differences: NaN is a floating point concept backed by the IEEE754 standard (while as far as I know "NaT" is quite numpy specific? eg Arrow doesn't support it). NaNs also evaluate as non-equal (following the standard), and while for datetime64 with NaT that's also the case in numpy, if you view the data as int64 it's not (and eg for dlpack those values will be regarded as int64? And the actual Buffer object might be agnostic to it)

Yes I agree, NaT is a custom thing so is best treated as a sentinel value. Thanks for pointing that out! I'll open a PR to change that.

This was fixed in gh-74. I just noticed that that change is not yet reflected in the deployed docs at https://data-apis.org/dataframe-protocol/latest/API.html, so I'll fix that now. The content in this repo is fine though, so I'll close this issue.

Do we have a specific test for this in https://github.com/data-apis/dataframe-interchange-tests? That might be useful to ensure that all implementations follow this (although of course not every implementation necessarily uses NaT for missing values in datetime data, so this might be hard to test library-independenty. But a minimum test could be to ensure it does not indicate to use NaN)

Currently there are no assertions on values when sentinel (kind=2), but I like your idea of ensuring it's not None-y. Though I suppose None/float("nan")/etc. are valid sentinel values?

Though I suppose None/float("nan")/etc. are valid sentinel values?

Theoretically yes (I don't think we said anywhere that it is not allowed), but since we have a specific flag for NaN, I think we should certainly strongly recommend using that flag (1) instead of a sentinel (2) with value NaN (or maybe even consider disallowing this)
(note that None can never be a valid sentinel, since we only support primitive arrays right now (no object dtype), so those can never hold None)

The test I am thinking about would involve a dtype specific check. In pseudo-code (for that test you linked to):
if col.dtype == "datetime":
    assert col.describe_null[0] != 1

with the idea that a datetime dtype can never have NaNs, since it is backed by a int array (although this last part is not really clear if that's required by the spec ..)

(looks like I edited my comment just as you submitted yours heh)

The test I am thinking about would involve a dtype specific check. In pseudo-code (for that test you linked to):
if col.dtype == "datetime":
    assert col.describe_null[0] != 1

Ayup makes sense, will explore thanks.


Support get/set variable from the CLI

Dear Airflow Maintainers,
Currently we only support get/set Variables via the UI or code. It would be useful to get/set Variables from the CLI.

Closed via #1387


Padding on Admin back button

Description
The "Back to Accounts" link is glued to the side of the window
Steps to reproduce

Sign in on an account with admin privileges
Go to "Your account" > "Administration" > "Accounts" > "Manage forms"
See the back button with no spacing

Details

Browser: Chrome
Operating system: Mac
Environment: Staging
Language: English
Viewport: Desktop

Expected behaviour
A consistent margin across the application
Screenshot

Noting we'll be updating the left nav
https://github.com/cds-snc/platform-forms-client/issues/3219
So we should likely follow suit and move the back button out of the left nav per https://github.com/cds-snc/platform-forms-client/pull/3115

Issue no longer persists


Question about transpiled code not running

Related issues (if any): none
Type of issue: ❓question (didn't really fit one the given categories, hope this is okay 🙂)
Urgency:  📆Whenever
Description:
I Converted my entire package to Typescript following our discussion on the other issue and now that I actually have the time to play around with Atom packages again. This isn't quite a bug report because I could be doing something silly and that's why this is happening so I wanted just to ask the question first. I've included the output from the atom-transpiler-debug-tool (which is 💯 by the way) below and it recognizes that there are files that need transpiled and I also see the transpilation happen in the console when I load up the package but the code that I want to run doesn't run.
The main key in my package.json is set to ./lib/test-package and I don't have an outDir key in tsconfig.json. I'm happy to provide both of those files too if you want. Oh, and when I run tsc in the project directory, it works without errors.
Expected behavior: TS -> JS transpiled code should run as usual and print the sha for HEAD in the console and change text in the editor pane.
Actual behavior: None of the code in the package runs, no console output and no change of text in the editor pane.
Debug Info:
$ npm run debug

><EMAIL_ADDRESS>debug /Users/yash/git-yash/test-package
> atom-transpiler-debug-tool

Transpiler 1 of 1: atom-ts-transpiler
Glob: lib/**/*.ts (matches 3 files)

  Filename             Current Version Hash
  lib/test-package-view.ts 9f758aaec16da0aff743d03b605a4c1d0c173c6c
  lib/test-package.ts      62b259a5304bb2da1801f77e8f0525f36e42618e
  lib/git.ts               05ebef7223cca38e5ffafcbb5c34c2df2de9cd2a

--------------------------------------------------------------------------------

The following directories and files were not matched by any glob:
.git/
keymaps/
menus/
node_modules/
spec/
styles/
.eslintignore
.eslintrc.json
.gitignore
CHANGELOG.md
LICENSE
README.md
package-lock.json
package.json
test.log
tsconfig.json

5 additional outdated entries were also found in the cache.

Hey, good to hear from you again. "Question" or "Support" really should have been one of the issue categories, that slipped my mind when I was making the template. 😛
I'm going to go ahead and mark this as a bug report, just because this early in the adoption of the package, I'd prefer to err on the side of assuming every issue is internal until proven otherwise. Better than assuming everything works correctly and then having to "take it back" later. A few quick questions come to mind:

I'm assuming that you didn't make any changes between running the package in Atom and using atom-transpiler-debug-tool? If so, that's interesting, because it seems to be saying that the cache is out-of-date... which it shouldn't be, since it was presumably just updated (or found to be up-to-date by atom.)
When you say "I also see the transpilation happen in the console when I load up the package" you mean that you're running with verbose enabled and you see the "Transpiling path/to/the/file.ts with options: { etc. etc. }" message come up?
If so, does this happen every time you load the package, or just once? If you load the package, then close Atom completely and re-launch it, does the "transpiling" message appear again?

I can see a few potential sources of this behavior, ranging from super-simple to "wtf," so I'm hoping it's not the latter. xD

Yeah, sounds good to me, I didn't want to start off with throwing around accusations 🙂
Anyway, here's are the answers to them questions

I didn't make any changes between running atom-transpiler-debug-tool and apm link and reloading the window (I had uninstalled the package just so I didn't run into any weird caching issues but I also don't know anything about how Atom caches things).
Yeah, that's exactly it. I enabled the verbose option and I'm seeing that atom-ts-transpiler print out each file and the options it's compiling with.
It doesn't run every time I load the package, no. It's only the first time. And I can even restart Atom and load up the package but since I have the cache control key in there, I think it only invalidates the cache when one of those files change so it doesn't transpile them again. Although when I run atom-transpiler-debug-tool, the file hashes are red and there isn't a Cbefore the files names which I find interesting. Even when I run atom-transpiler-debug-tool after I can see the transpilation happen in the Atom console, I still don't see Cs before the file names in the terminal output. Unless I'm misunderstanding what the debug tool is looking at which is what I think is happening.

Anyway, I'll run more tests if I get the time tonight. The code that I'm writing is in a private repo because I'm not quite at the point of talking about it/showing it off publically but I can add you to the repo if you actually want to see the code.

Hmmm... that makes me wonder whether the debug utility is actually
calculating the cache keys correctly. Atom itself seems to be behaving
"normally" for the most part. It's asking for the files to be transpiled,
then using the cached version afterwards rather than asking for
transpilation again. I'll try to verify that the debug tool is actually
using the cache key files correctly, I think that may be what's causing the
confusing output. My hunch is that the cache actually is valid, but the
debug tool doesn't realize it because it's looking for the wrong key.

It sounds like you're just not exporting correctly from that main file. None of the files would be compiled at all if Atom weren't trying to access them.

I could probably second that because that's been my experience. Any idea why Atom doesn't run the transpiled code? Because if I switch lib/test-package.ts back to lib/test-package.js, it runs the code again and it even includes the typescript file correctly, runs code from that too. Does that first file have to be Javascript, I wonder, for Atom to realize that it needs to do stuff with this package...
Either way, I'm not blocked per se with this because I can live with having two files that are Javascript that probably won't change much but I was trying to have a complete Typescript project for the sake of uniformity.

@GlenCFL, I posted my reply before seeing your comment. I'm just doing
export default {
}

from the main file and it's working in when I use the JS version of that file.

Hmm... try doing export = { ... } rather than export default { ... }
and see if that changes anything?
On Oct 22, 2017 5:03 PM, "Yash Kulshrestha"<EMAIL_ADDRESS>wrote:

@GlenCFL https://github.com/glencfl, I posted my reply before seeing
your comment. I'm just doing
export default {
}
from the main file and it's working in when I use the JS version of that
file.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/smhxx/atom-ts-transpiler/issues/16#issuecomment-338512796,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAzOSECKBHgbAEgmTvaST-YzDCkBeYjYks5su7uWgaJpZM4QB0_n
.

Alright, I'll try that.

 Sorry for the language but my package runs now!

Hah, no problem. ^.^
export default is actually equivalent to module.exports.default =, so
Atom's module resolution didn't seem to be finding your activate()
method. Changing it to export = is the same as doing module.exports =,
which puts the exports where Atom expects them.
I do think that there is a bug in atom-transpiler-debug-tool, though,
so I'll do some investigation tonight and see if I can fix the incorrect
cache key calculation.
 Sorry for the language but my package runs now!
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/smhxx/atom-ts-transpiler/issues/16#issuecomment-338513263,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAzOSMleC32y0fTHldffVvK9EdGHOx4Eks5su72XgaJpZM4QB0_n
.

Oh I see, subtle but important difference there! I'm actually still doing a happy dance. My package is almost all typescript now!
Also, I don't think the atom spec runner respects the atomTranspilers option, doesn't even start but then again, I don't really want to use Jasmine 1.3 to test my stuff, I think I'm just going to create my own scaffolding for testing in the package and use whatever tooling I want 😄
This is awesome, thanks for all the help!

Yeah, the test runner is definitely not as flexible as Atom is in regards
to support for multiple languages. I believe Glen has an example of how to
get tests running with mocha using a helper file, that might be of some use
to you.

I've just pushed out a 1.0.1 of atom-transpiler-debug-tool which should now use the correct cache key data when calculating the current version hash; if you want to check, this should result in your files showing up green (up-to-date) rather than red (invalid.)

Perfect, I'll check it out tonight and report back!

I might wait for 1.0.2, which I hope to have out tonight if I can figure out what's wrong. I think there's something more involved going on here, which may be a second bug or could be related to this one. Hopefully I can knock them both out simultaneously and get the new patch published ASAP.

It's all good, the verbose flag is very helpful and the debug tool is already very helpful. I tested 1.0.1 and I'm getting - in front of the files but the hashes are still red. This time, it didn't even re-transpile even when I uninstalled, quit Atom, apm linked again and then ran the code again.

Dang it, I think I just figured it out. Dumb scoping issue, I thought I was being clever by using a bit of a functional programming trick, but I forgot to wrap the function in a closure so it would retain the correct this context. The result was apparently that getCacheKeyData() was never called at all, meaning the data didn't actually get added to the hash calculation, and the wrong hash got spit out. Will push out 1.0.2 momentarily once I verify that the issue is fixed.

@YashdalfTheGray<EMAIL_ADDRESS>is out now and should actually fix the bug I said was fixed earlier. If you run the newest version, it should calculate the correct cache key and find the matching files properly (meaning they'll show up in green as they should.)

Yay! I gotta say, I've loving writing my stuff in Typescript and it's all thanks to you!

You're very welcome. :)
To be honest, the reason I went through the process of making this is that I feel the same way you do - working with TypeScript is really just a huge quality-of-life improvement over vanilla JS.  The fact that it's not JavaScript does, of course, add an additional hurdle to jump over before you can "just use it," but that's what projects like this one, ts-node, etc. are for!

Right?!
I reach for vanilla JS when I'm doing small projects but I'm working on this package that I expect to have a many moving parts and probably have other people working on it at some point, Typescript has become a necessity and I'm happy that there are tools that I can use to do more and more things in Typescript and for projects like this, that additional hurdle to jump is totally worth it!
Also<EMAIL_ADDRESS>works like a charm!


Support ILI9488

Is it possible to support the IL9488? As far as I understand, the differences are quite minimal. Thanks

It's not supported by default, but it'd be great if you could add it.
It can be a Kconfig option the choose between the drivers.
cc
@jeremyjh @C47D

Hi,
I don't have any ILI9488 at hand but I will check the datasheet for it, so if @rdelcorro have one it would be very helpful if you can help us with the validation.
In regards of choosing the LCD driver on the esp configuration it's possible, but I would like to ask @jeremyjh for suggestions on how to implement it, I would suggest to abstract the LCD driver, something like this:
diff --git a/main.c b/main.c                                                                                index 6fc45cb..2d98823 100644                                                                                --- a/main.c                                                                                +++ b/main.c
@@ -11,7 +11,7 @@

 #include "disp_spi.h"
-#include "ili9341.h"
+#include "disp_driver.h"

 #include "tp_spi.h"
 #include "xpt2046.h"
@@ -23,7 +23,7 @@ void app_main()
        lv_init();

        disp_spi_init();
-       ili9341_init();
+       disp_driver_init();

 #if ENABLE_TOUCH_INPUT
        tp_spi_init();
@@ -37,7 +37,7 @@ void app_main()

        lv_disp_drv_t disp_drv;
        lv_disp_drv_init(&disp_drv);
-       disp_drv.flush_cb = ili9341_flush;
+       disp_drv.flush_cb = disp_driver_flush;
        disp_drv.buffer = &disp_buf;
        lv_disp_drv_register(&disp_drv);

I have some free time this saturday, I can work on this then.
Regards

Thanks @C47D, I can help with the validation.

Is it possible to support the IL9488? As far as I understand, the differences are quite minimal. Thanks

Hi, do you happen to know the differences between the ILI9341 and ILI9488 drivers? I'm still stuck trying to figure out how to setup the project configuration to be able to choose between diferent drivers.

@C47D this is the aliexpress link: https://www.aliexpress.com/item/33057812377.html?spm=a2g0s.122695<IP_ADDRESS>b636d3APjqbt
I was also able to use the screen with this code: https://gist.github.com/rdelcorro/beb7ebe929064797b926f3affcd9e0ac which uses this library: https://github.com/Bodmer/TFT_eSPI.
As far as I understand, the difference is:

Initialization sequence (can be seen in the repo above)
16 bit color mode (my screen) but it supports up to 24

Thanks!

@rdelcorro Thanks for the information, I'm still trying to figure out how to handle the driver abstraction and also learn how to use the Kconfig lang to extend the menuconfig interface. Please give me some more time to arrive to something that handle your display driver and maybe others in the future.

@C47D I think I'd just define some constants for the driver such that ILI9341 = 1, ILI9488 = 2 and then use a menu choice group to select from the two options, similar to how the pre-defined displays work. In the driver code we could have multiple init functions defined and call the correct one based on this value.
My fork of the loboris TFT driver has a KConfig for exactly that purpose: https://github.com/jeremyjh/ESP32_TFT_library/blob/master/components/tft/Kconfig#L31
We use the config value to define a controller (defaults to ILI9341): https://github.com/jeremyjh/ESP32_TFT_library/blob/master/components/tft/tftspi.h#L210
Then we use that value to select the init commands:
https://github.com/jeremyjh/ESP32_TFT_library/blob/master/components/tft/tftspi.c#L908

Thanks for the links @jeremyjh, it's much clearer now.
I see you share the SPI and control signals across the drivers:
https://github.com/jeremyjh/ESP32_TFT_library/blob/cf347104a635a876fe9614ff465d5b9dec10f255/components/tft/tftspi.h#L54-L64
After checking the ILI9488 datasheet and @rdelcorro ali link we can notice it in fact uses the same pins as the ILI9341 driver, so i think the first step is to modify below pin naming so it becomes more generic? Or should i add an .h and .c files for the ILI9488?
https://github.com/littlevgl/lv_port_esp32_ili9341/blob/1f2a6f3790244cd39c58d02b246580be6b45c9b1/components/lvgl_ili9341/ili9341.h#L24-L26

@Mat-Alm could you test @C47D's version here?

@Mat-Alm could you test @C47D's version here?

How to download/clone the full project with this changes?

@Mat-Alm , you need to clone my repo and track the ili9488_support branch, something like this:
$ git clone --recurse-submodules https://github.com/C47D/esp32_ili9341.git
$ cd esp32_ili9341
$ git checkout --track origin/ili9488_support


Tundra2 lc

Fixes to FunctionInvoker.
Register tundra:// protocol handler in NSIS installer.

Commented on a couple of commits, mostly observation for maybe nice to do things. Not blocking the merge though so go ahead when you feel like it.


CLI smart autocompletion

This pull request introduces auto completion functionality for the flexmeasures command-line interface. To enable auto completion, you need to save the path of the auto-completion script, which is located at ~/flexmeasures/data/scripts/click-complete.<extension>, in the user's shell configuration file (.bashrc, .zshrc, or .fishrc). The extension should be either bash, zsh, or fish. To activate auto completion, execute the following make command: make cli-autocomplete extension=bash for users with .bashrc.
Once the activation process is successful, you will need to restart your terminal and run the command flexmeasures <command> <tab><tab>. The <command> can be replaced with commands like show, add, db, and others. Please note that although the options should appear quickly, it might still take up to 10 seconds for them to display, which is an aspect we plan to improve in the future.

Should we add the make cli-autocomplete extension=bash command to our docker-compose.yaml, and add a documentation note for Docker users (e.g. here)?

If the 10-second delay condition is still given, this is not yet developer-friendly.

I would actually find this convenient already, compared to typing --help or going into the code. I agree I shouldn't be advertised as a feature right now due to the currently high response time of running a CLI command.


IR: add support for switch statements

Fixes #273
This is just something we hadn't gotten to yet on the IR. The actual design of the instruction is unsurprising (once you take into consideration the requirement for structured control flow). A switch instruction takes the form:
switch <condition> <breakLabel> <defaultLabel> [<caseVal> <caseLabel>]*

Where condition is the value to switch on, breakLabel is the "join point" after the original switch statement, defaultLabel is where to go if the value doesn't match any case, and each pair of caseVal and caseLabel is what to do on a particular value. It is required that caseVal be a literal, but this isn't currently being enforced in the IR (the front-end should be making a check and constant-folding the case labels).
For structured control flow, we also make the assumption that the cases are in order: cases with the same label must be grouped together, and any case that falls through to another must come right before it.
Given this representation, the emit logic can reconstruct a switch statement with relative ease, given the machinery we already have. It makes sure to group together case values with the same label (again, assuming they are contiguous), and will insert the default: label in with whatever group it belongs to.
Actually emitting code for a switch statement seems superficially simple, until you realize that a complete implementation needs to handle stuff like "Duff's Device." The current implementation makes the assumption that all case and default statements are directly nested under a switch, and that there is no way for control flow to enter a case except by the switch itself, or fall-through.
In order to facilitate the grouping of cases in the IR-to-HLSL emit logic, the AST-to-IR lowering logic tries to detect cases where there are multiple cases in a row, and emit only a single label for them.
One big/annoying gotcha is that we don't properly handle the case where a default: case has a non-trivial fall-throguh to another case. That seems fine for now since HLSL doesn't support fall-through anyway, but it probably needs to get detected somewhere in the Slang compiler (e.g., maybe we should add a diagnostic pass over the IR that detects target-specific problems like that and emits errors).

@csyonghe Wait a second on the review. I'm going to add another fix to this PR so that we handle EmptyStmt as well (seems to minor to get its own PR).

@csyonghe Okay, this should be ready to review now.

@csyonghe On the subject of breaks and nesting: the front-end keeps track of the "parent" statement for any break or continue, and during lowering to IR they will target the label that has been registered for their "parent" statement. This means that the front end and IR lowering can technically handle multi-level (or named) break if we ever wanted to add it.
For the IR->HLSL stuff, we basically always turn a break instruction into a break statement, and assume that the IR doesn't include anything that encodes a multi-level break.
So it all should Just Work for now, but if we ever introduce multi-level breaks (even if just as a result of doing inlining optimizations), we'll need to revise the IR->source pass.


new feature: file provisioner

First, let me start by saying I have been using this project and really enjoy it. Thank you for your work.
I am attempting to use the file provisioner here: https://developer.hashicorp.com/terraform/language/resources/provisioners/file
but I am getting the following error:
Error: file provisioner error
│
│   with multipass_instance.ingress,
│   on main.tf line 24, in resource "multipass_instance" "ingress":
│   24:   provisioner "file" {
│
│ Missing connection configuration for provisioner.

My question is how much effort would it be to add support for the file provisioner to this provider?
Thanks again!

Actually, after digging a little further, it looks like I need to add a configuration to allow ssh access - so it may work and I just have my terraform currently misconfigured. Closing for now. Thanks!


ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' for tf-agents

Hey, not sure if this is for here, for I should move it to tf-agents. I figured since the deepest part of the traceback was in tensorflow, it should be here. Please let me know if I'm wrong and I'll move to tf-agents.
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No, using this example: https://www.tensorflow.org/agents/tutorials/1_dqn_tutorial
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux 5.6.15-arch1-1
TensorFlow installed from (source or binary): built from source
TensorFlow version (use command below): v1.12.1-33853-gc674577870 2.2.0
Python version: 3.8
Bazel version (if compiling from source): 2.0.0
GCC/Compiler version (if compiling from source): 10.1.0
CUDA/cuDNN version: 10.2 / 7.6.5
GPU model and memory: GTX 1080 Ti  11GB

Describe the current behavior
Errors out when importing anything from tf-agents.
Describe the expected behavior
Should run without error.
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
from tf_agents.agents.dqn import dqn_agent
Other info / logs Full traceback of error:
  File "/home/frodo/Desktop/gym_project/gym-open.py", line 14, in <module>     from tf_agents.agents.dqn import dqn_agent   File "/home/frodo/.local/lib/python3.8/site-packages/tf_agents/agents/__init__.py", line 17, in <module>     from tf_agents.agents import tf_agent   File "/home/frodo/.local/lib/python3.8/site-packages/tf_agents/agents/tf_agent.py", line 26, in <module>     from tf_agents.specs import tensor_spec   File "/home/frodo/.local/lib/python3.8/site-packages/tf_agents/specs/__init__.py", line 20, in <module>     from tf_agents.specs.distribution_spec import DistributionSpec   File "/home/frodo/.local/lib/python3.8/site-packages/tf_agents/specs/distribution_spec.py", line 22, in <module>     import tensorflow_probability as tfp   File "/home/frodo/.local/lib/python3.8/site-packages/tensorflow_probability/__init__.py", line 76, in <module>     from tensorflow_probability.python import *  # pylint: disable=wildcard-import   File "/home/frodo/.local/lib/python3.8/site-packages/tensorflow_probability/python/__init__.py", line 24, in <module>     from tensorflow_probability.python import experimental   File "/home/frodo/.local/lib/python3.8/site-packages/tensorflow_probability/python/experimental/__init__.py", line 34, in <module>     from tensorflow_probability.python.experimental import auto_batching   File "/home/frodo/.local/lib/python3.8/site-packages/tensorflow_probability/python/experimental/auto_batching/__init__.py", line 24, in <module>     from tensorflow_probability.python.experimental.auto_batching import frontend   File "/home/frodo/.local/lib/python3.8/site-packages/tensorflow_probability/python/experimental/auto_batching/frontend.py", line 45, in <module>     from tensorflow.python.autograph.core import naming ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' (/home/frodo/.local/lib/python3.8/site-packages/tensorflow/python/autograph/core/__init__.py)

@vonadz,
I was able to run the code without any issues on TF v2.2. Please find the gist of it here.
Could you please try running the same code in a virtual environment and check if it works. Thanks!

@amahendrakar thanks for replying.
Using pip install tensorflow for the virtual env makes the code run. But when installing the tensorflow package I built from source, it fails with the same error presented in the issue. I built it with all defaults, for CUDA support, following this guide: https://www.tensorflow.org/install/source, using r2.2.

I have the exact same issue, Tensorflow 2.2.0 compiled from source following the official documentation.

@vonadz I found something rather interesting, with the Tensorflow binary I compiled myself (version 2.2.0) I am able to use Tensorflow Probability (both self compile or installed from PIP) version 0.7, anything newer than that gives the same error:
tensorflow.python.autograph.core import naming ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' (/home/frodo/.local/lib/python3.8/site-packages/tensorflow/python/autograph/core/__init__.py)

I found something rather interesting, with the Tensorflow binary I compiled myself (version 2.2.0) I am able to use Tensorflow Probability (both self compile or installed from PIP) version 0.7, anything newer than that gives the same error:
tensorflow.python.autograph.core import naming ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' (/home/frodo/.local/lib/python3.8/site-packages/tensorflow/python/autograph/core/__init__.py)

@vonadz,
Could you please check @cfabio's comment and let us know if it helps. Thanks!

@cfabio yes it worked! Thanks.

Marking the issue as closed, as it is resolved. Please feel free to re-open the issue if necessary. Thanks!

I am not sure we can consider this resolved, since to "make it work" I had to downgrade to an older version of Tensorflow Probability.
My impression is that the Tensorflow (not Probability) me and @vonadz compile from source is missing something, which is even weirder since we both followed the official documentation.
For now I might be able to live with Tensorflow Probability version 0.7, but in the future I would like to be able to use the latest version.

I am not sure we can consider this resolved, since to "make it work" I had to downgrade to an older version of Tensorflow Probability.

@cfabio,
Could you please submit a new issue from this link and fill in the template so that we can track the issue there. Thanks!

I have the exactly same problem.

Same problem when I try to import from tensorflow_probabilty.
I'm using the official TensorFlow docker.
tf install reference
docker run -it -p 8888:8888 tensorflow/tensorflow:nightly-jupyter

@yaowang1111, @Echo9k,
Please take a look at #40584. The issue is already being tracked there. Thanks!

I managed to run tensorflow-probability with this combination:
pip install tensorflow==2.1.0
pip install tensorflow-probability==0.9.0```


fix: add ps4/ps5 crash types

Description
For use in pulse tests.
Checklist

[x] Tested manually
[x] Unit tests pass with no errors or warnings
[x] Documentation updated (if applicable)
[x] Reviewed by at least 1 other contributor

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Planning to incubate?

I saw this pop onto the TAG review repo, but wondered why I haven't seen this anywhere in WICG? Did I miss the post? Do you not intend to incubate it?

I imagine this can be closed now, since it's been moved to WICG.


Setting UpperValue > MaximumValue in code/xaml should throw an Exception

I am using Range-Slider on Droid, iOS and UWP with Xamarin.Forms 3.0. I accidentally set uppervalue=100 and maximumvalue=30. On All Platforms  the view loaded but only UWP showed both thumbs. On iOS and Android I only saw the left thumb since the right thumb wasn't drawn at all or outside of the viewport. It took me quite a long time to find my mistake especially since it seemed to work on UWP.
I think it would be best to throw an Exception like "UpperValue cannot be greater than MaximumValue".

Sorry, can't agree. Throwing an exception will cause a lot of random problems on component initialisation as there is no specific order in which component should be initialised.

Sliders have a lot of problems with this since they often involve the mutating of different variables (min, max, value, etc.) separately (e.g. through bindings). Really they shouldn't do this as it enables invalid data; instead there should be a method to set all variables simultaneously, which should throw an error on invalid data. But separate variables allowing temporary invalid data is what we are stuck with. So @MarcusSpecht is right in theory but @halkar in practice.


Add Transport::new(inbuf, outbuf) for testing.

Currently it is not possible to create transports to test
code based on rotor without creating a real socket.

Looks nice. Thanks!


Don't Merge! PR real time test for source branch full build

Docs Build status updates of commit 3732ffa:
:clock10: Pending: waiting for processors (22 builds ahead of you)
:warning: Docs Build is busy, currently there are 22 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 3732ffa:
:clock10: Full build: the average full build time is 5 min(s) 6 sec(s), this is based on the last 30 build(s) for this repository.

Docs Build status updates of commit 3732ffa:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


StateFn makes OperatorStateFn out of PauliOp or ListOp containing anything

StateFn is meant to construct something representing a quantum state, pure or mixed.
OperatorStateFn is meant to represent a density operator. But, for some objects, such as a PauliOp or a ListOp containing anything, StateFn constructs a OperatorStateFn, which does not agree with these semantics.
In [1]: from qiskit.aqua.operators import *

In [2]: StateFn(ListOp([X, Y]))
Out[2]: OperatorStateFn(ListOp([PauliOp(Pauli(z=[False], x=[True]), coeff=1.0), PauliOp(Pauli(z=[True], x=[True]), coeff=1.0)], coeff=1.0, abelian=False), coeff=1.0, is_measurement=False)

In [3]: StateFn(ListOp([1, "zebra"]))
Out[3]: OperatorStateFn(ListOp([1, 'zebra'], coeff=1.0, abelian=False), coeff=1.0, is_measurement=False)

This behavior is more or less relied on in the test suite. For example here https://github.com/Qiskit/qiskit-aqua/blob/63b5029f739e30dfd08bb6321d3567b1f08c40a6/test/aqua/operators/test_aer_pauli_expectation.py#L71-L72
and  here https://github.com/Qiskit/qiskit-aqua/blob/63b5029f739e30dfd08bb6321d3567b1f08c40a6/test/aqua/operators/test_aer_pauli_expectation.py#L98-L99
In the latter example, we have
In [6]: StateFn(X)
Out[6]: OperatorStateFn(PauliOp(Pauli(z=[False], x=[True]), coeff=1.0), coeff=1.0, is_measurement=False)

But X is not a density operator (not trace 1 or positive).
The results of the tests are apparently correct and meaningful, but the intermediate steps need to be cleaned up conceptually.

This is still valid. It may be best dealt with as part of a moderate refactoring of the opflow.

This is still valid. It may be best dealt with as part of a moderate refactoring of the opflow.


Add support for add-remove-device-fom-to-collection

Ready to Review!

@mentos when you have a moment, can you please review?

@kristinpeterson @sankarsubramanian looks good 👍


Uses curl-sh for top-level quick-start

Thanks to @abesto, here's how to get the latest zipkin jar
$ curl -sSL https://zipkin.io/quickstart.sh | bash -s

And here's how to get a module, like our kafka10+ addon
$ curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.java:zipkin-autoconfigure-collector-kafka10:LATEST:module kafka10.jar

See https://github.com/openzipkin/openzipkin.github.io/pull/90

FWIW, LGTM :)
(Need more acronyms?)

this doesn't work on my machine (it was working yesterday though). Looking at the debug output it seems that the URL to download the jar from bintray contains some backslashes ("maven/io/zipkin/java") and this is why curl downloads nothing - at least on my machine.
+ echo 2.4.0
+ grep -E '^[0-9]+\.[0-9]+\.[0-9]+$'
+ echo 'Downloading io.zipkin.java:zipkin-server:2.4.0:exec to zipkin.jar...'
Downloading io.zipkin.java:zipkin-server:2.4.0:exec to zipkin.jar...
+ local 'url=https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'
+ echo 'https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar -> https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'
https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar -> https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar
+ curl -L -o zipkin.jar 'https://dl.bintray.com/openzipkin/maven/io\/zipkin\/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    33    0    33    0     0    123      0 --:--:-- --:--:-- --:--:--   146

Thanks for reporting! At first glance it smells like a bash version issue.
I'll investigate and fix up the script later today.
On Nov 29, 2017 12:07 PM, "Jorg Heymans"<EMAIL_ADDRESS>wrote:

this doesn't work on my machine (it was working yesterday though). Looking
at the debug output it seems that the URL to download the jar from bintray
contains some backslashes ("maven/io/zipkin/java") and this is why curl
downloads nothing - at least on my machine.

echo 2.4.0
grep -E '^[0-9]+.[0-9]+.[0-9]+$'
echo 'Downloading io.zipkin.java:zipkin-server:2.4.0:exec to zipkin.jar...'
Downloading io.zipkin.java:zipkin-server:2.4.0:exec to zipkin.jar...
local 'url=https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'
echo 'https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar -> https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar -> https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar
curl -L -o zipkin.jar 'https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar'
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0    33    0    33    0     0    123      0 --:--:-- --:--:-- --:--:--   146

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openzipkin/zipkin/pull/1826#issuecomment-347827436,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADqTtu-4lvy7WRSJAoYMm4crehYRE_Hks5s7TrSgaJpZM4QrnbA
.

@jorgheymans I've uploaded a version that works on the machine where I managed to reproduce the issue (https://github.com/openzipkin/openzipkin.github.io/commit/d114d9a24ddda8526e5690127eb2215b3504b1ff). It'd be great if you could re-run the same command you used originally and let me know the results.

gonna merge this one.. true that our "download" link is not great as that still has a problem. We should merge this anyway as the quick start is certainly busted and this fixes that.


[statiq-data] Generated bindings to data file

The goal is to have the records generated some way. TBD

as seen in example #19 yaml with this:
categories:
  - category: Core
    cat-id: core
    extensions:
      - name: Configuration
        description: "Included: MicroProfile Configuration via SmallRye"
      - name: Logging
        description: "Included: centralized log management for Quarkus"
      - name: ArC
        description: "Build time CDI dependency injection"
        labels:
        - arc
        - cdi
        - dependency-injection
        - di
        groupId: io.quarkus
        artifactId: quarkus-arc
  - category: Web
    cat-id: web
    extensions:
      - name: Netty
        description: "Netty is a non-blocking I/O client-server framework. Used by Quarkus as foundation layer."
        groupId: io.quarkus
        artifactId: quarkus-netty
      - name: RESTEasy JAX-RS
        description: "REST framework implementing JAX-RS and more"
        labels:
        - resteasy
        - jaxrs
        - web
        - rest
        groupId: io.quarkus
        artifactId: quarkus-resteasy

could be:
record Categories(
    List<Category> categories
) {}

record Category(
    String category,
    @JsonProperty("cat-id") String catId,
    List<Extension> extensions
) {}

record Extension(
    @JsonProperty("name") String name,
    @JsonProperty("description") String description,
    @JsonProperty("labels") List<String> labels,
    @JsonProperty("groupId") Optional<String> groupId,
    @JsonProperty("artifactId") Optional<String> artifactId
) {}

that would be the generation - but imagine also that user can write the above and have that validated against the data as seen in #18.

as discussed on zulip we should evaluate using SmallryeConfig to achieve this

as concluded on zulip, Jackson seems like a better fit

@melloware let me know when you start this?

@ia3andy so wait I am confused.... is this ripping out what has been done in roq-data that provides JsonObject from Vertex with Jackson converting them ?
I am not quite clear what needs to be done?

@melloware
We should have a config in roq-data: quarkus.roq.data.enforce-bean
When this is enforced, you will look for a data file named foo.yml/json/yaml for any DataMapping found @DataMapping('foo')

if there is no file = error
same in the other direction, if there is a data file named foo without any DataMapping = error
if the mapping is not working = error

if this is not enforced, then if you have a mapping without any file, just a warning
if you have a file without any mapping => JsonObject (current behaviour)

@melloware let me know, if you don't feel like it, @mcruzdev or I can do it ;-)

Sorry i won't have time for this one!

Hello @ia3andy!
To see if I understand well...
@ApplicationScoped
    @Path("/persons/1")
    public static class PersonResource {

        @DataMapping("person")
        Person person;

        @GET
        public String getPerson() {
            return person.name();
        }
    }

    public record Person(String name, int age) {
    }

Having this resource with a data file like:
{
"name": "Matheus", "age": 9999
}

The Person field must be populated with the data file values, right?

I was thinking more something like this:
@ApplicationScoped
    @Path("/persons/1")
    public static class PersonResource {

        @Inject
        Person person;

        @GET
        public String getPerson() {
            return person.toString();
        }
    }

    @DataMapping("person")
    public record Person(String name, int age) {
    }

but maybe I am biased by Hibernate.
cc @maxandersen @melloware


Choose version to activate in production/staging

When using "akamai property-manager activate", we can't choose the version to activate. It would be great to be able to chose the version, we may not want to choose the latest everytime

A new command activate-version is added in the 0.7.0 version. This command lets you choose the version to activate.

An example of this command:
akamai property-manager activate-version -p test.example.com -n stag --propver 2 -m "activating version 2 in staging environment"


New Suppressor for callsites

Expected Behavior

ability to suppress a specific function by name (all overloads) [example for this in Context below]
ability to suppress a specific function by name (specific overload, e.g. assertEquals(String, String))
ability to suppress a specific function by name (specific overload group, e.g. assertEquals(String, *, *))
ability to suppress a specific function specific argument (by name)
ability to suppress a specific function specific argument (by position/type) [example for this in Context below]

As a side-note: I would add this suppressor to the list of https://detekt.dev/docs/current/introduction/suppressors/ BEFORE it's implemented to gain visibility in advance and maybe a contributor.
Current Behavior
Feature not available. Workaround would be to turn off the built-in rule, create a new rule that wraps the rule and call the rule conditionally, or post-process its findings, but this is tedious. Another alternative would be https://github.com/detekt/detekt/issues/4932.
Context
There are some rules which are useful, except in certain cases where a known function is being called, where we would like to be able to "ignore" them.
Let's see an example: https://github.com/detekt/detekt/issues/5430
TrimMultilineRawString:
  ignores:
    # These function calls receive JSON, but their formatting/indentation doesn't matter because they're only semantically processed (parsed).
    - org.skyscreamer.jsonassert.JSONAssert.assertEquals(*: kotlin.String, *: kotlin.String, _: org.skyscreamer.jsonassert.JSONCompareMode)
    - io.ktor.client.engine.mock.MockUtilsKt.respond(_: io.ktor.client.enginemock.MockRequestHandleScope, *: java.lang.String, _: io.ktor.http.HttpStatusCode, _: io.ktor.http.Headers)

Another example: https://github.com/detekt/detekt/discussions/4527
SpreadOperator:
  ignores:
    # There's no other way to call this function when the migrations are already in a pre-gathered array.
    # https://developer.android.com/reference/kotlin/androidx/room/RoomDatabase.Builder#addMigrations(kotlin.Array)
    - androidx.room.RoomDatabase.Builder.addMigrations

Known issues it would address:

[x] #5430
[ ] #4527
[x] #6081

I feel that something like that would be too "sophisticated". I would not allow to decide over wich argument of the function the issue should be suppressed. And, if we need that, I would create a different suppressor.
I would start simple, create a suppressor that suppresses any issue raised over the defined function call or any of it's arguments. If, later, we need to have another suppressor more "precise" I would create it. The main reason for this is that define a function signature is complex. I don't want to think about adding even more information to the signature to say "I only care about this argument of this function".

I would start simple, create a suppressor that suppresses any issue raised over the defined function call or any of it's arguments

+1 to this, function name sounds like a good starting point here.

Yeah, that's a "good enough" implementation to start with. It can be extended later, if we design it that way, rather than having to deprecate or duplicate to extend.

Re "The main reason for this is that define a function signature is complex."
Is there a way to say: "Kotlin, please parse fun Foo.bar(baz: suspend Qux.() -> Qar?, vararg... Fooz): Boolean" code fragment in type resolution context? Because at that point signaling which overload you want is trivial, signaling which argument to ignore is as much as annotating the parameters because it's Kotlin code. Alternatively baseline already has a capability to serialize signatures...

Implementation-wise we need

[ ] name for the suppressor that will be available in every rule
The ignore above was just to communicate.
[ ] find other rules that already partially implement something like this
[ ] consider supporting val/var,
As in foo.x = """...""" would be considered a callsite for TrimMultilineRawString, right?

It can be extended later, if we design it that way, rather than having to deprecate or duplicate to extend.

Addign to this, we should try to stick to the same syntax we use for rules such as ForbiddenMethod

This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

I'm not sure, but being able to suppress a finding inside mockk.verify { ... } lambda might also come into scope here? See https://github.com/detekt/detekt/issues/6134

This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

I'm not sure, but being able to suppress a finding inside mockk.verify { ... } lambda might also come into scope here? See https://github.com/detekt/detekt/issues/6134

Yes, that seems into the scope.
As said before I think that this suppressor should use the same matcher as forbidden method. That should make the suppressor way easier to implement because that should be the most difficult part.


Complete 0xFable Proof-of-Concept

We're almost there. Let's plan it out.

Frontend

[ ] https://github.com/0xFableOrg/0xFable/issues/24
Itself a collection of issues. Aritra is doing good work there. Additionally needs...
[x] https://github.com/0xFableOrg/0xFable/issues/89
Which I'll do ASAP.
[x] #99
[x] [optional] #107
[ ] [optional??] https://github.com/0xFableOrg/0xFable/issues/91
I'd expect if we get any traffic on the PoC (but why? it's not a fun game to play yet), the RPC would be the first thing to failover and this would be the main culprit.
[ ] [optional] https://github.com/0xFableOrg/0xFable/issues/93
If we don't have this, we can just not have a collection display at all, it's not essential for the PoC.

Infrastructure
We'll run with a burner account for now, and will deploy on a devnet using rollop (own L1 & L2).

[x] https://github.com/0xFableOrg/roll-op/issues/71
Make sure roll-op works correctly!
[x] https://github.com/0xFableOrg/roll-op/issues/46
Can't run the thing for any good amount of time if the logs end up taking up the whole disk.
[ ] [optional] https://github.com/0xFableOrg/roll-op/issues/83
We should be able to deploy everything on a beefy server if this is not ready.
[ ] [optional] roll-op Celestia integration
This one is more strategic. We don't need it, but I think people at Celestia would be happy to announce a game using their stuff and co-marketing would be good to get the word out.
[ ] https://github.com/0xFableOrg/0xFable/issues/31
Let's create a burner wallet randomly, store it in browser storage, then use it to control a simple-account. With roll-op AA support, we can specify the game contracts to be gas sponsored.
[ ] https://github.com/0xFableOrg/0xFable/issues/37
If there's no bot, testers won't be able to find a game easily. Because the game is really a PoC, this bot can just random stuff pretty much. Just a program that listens to events and answers.

Assets / Design

[ ] https://github.com/0xFableOrg/0xFable/issues/90

Smart contracts
I don't think there's anything consequent to do here, except maybe adjustments related to other task (update the airdrop contract, etc...). I should still re-read everything to look for TODOs.

[x] https://github.com/0xFableOrg/0xFable/issues/92

Hi @norswap, Kindly assign this to me. I would like to solve these issues.


Search endpoint has incorrect "self link"

Describe the bug
When using the UI, there appears a ensureSelfLink warning in the browser console when searching. Open your browser's console for warning messages and issue a search request: You will find this warning in your console:

The response for 'https://api7.dspace.org/server/api/discover/search?configuration=default' has the self link 'https://api7.dspace.org/server/api/discover/search'. These don't match. This could mean there's an issue with the REST endpoint

I experience this with our own installation of DSpace and it can be observed on https://demo7.dspace.org
There has been a similar issue a while ago opened and closed on the backend project: https://github.com/DSpace/DSpace/issues/3138
To Reproduce
Steps to reproduce the behavior:

Go to https://demo7.dspace.org
Enter a search term and click search
Open your browser's console and read: "The response for 'https://api7.dspace.org/server/api/discover/search?configuration=default' has the self link 'https://api7.dspace.org/server/api/discover/search'. These don't match. This could mean there's an issue with the REST endpoint"

I would like to sign up for this issue along with issue #8577 as my first contribution to DSpace, on behalf of DLCorp. I am currently finishing setting up a development environment and hopefully, are able to create a fix for both issues this week.

@buithaihai : Thank you for volunteering!  Please feel free to send us a Pull Request for one or both fixes when you have the chance.  See our contribution guide for more information: https://github.com/DSpace/DSpace/blob/main/CONTRIBUTING.md


fix: citibike-status-app refactoring

This pull request aims to improve project reproducibility and better code structuring.
Changes proposed:

🔧 exact versioning for requirements.txt
this allow other contributor to reproduce this project without focusing on which version of libraries to be used.
🎨 name-main idiom just a guard block for avoid unintended invoking script
⚡ streamlit app refactoring with more understandable variables
📝 update README.md which including local deployment

Note to reviewers:
I disabled lottie image in code for now. I'm not sure that it will be available in next version or not.
Thank you so much. 😉

@Kawaeee hey thanks for the contribution, but make sure you create an issue before working on anything. So it doesn't get messy.

@Kawaeee  I went through the changes everything looks pretty clean & good job there!

Alright, I will raise an issue ticket before working on it then other one will not do the same tasks and be conflicted. 🙏


perf: per-chunk constant time command evaluation

When doing
bot.command(..)
bot.command(..)
bot.command(..)

then these three handlers will be checked in sequence. It would be faster to compress them down into a map, and to look up the correct handlers.
This will actually circumvent how middleware works, but that's fine because we can make certain assumptions about the routing here.
Note that if any other method (not bot.command) is called in between, the optimisation needs to take this into account and make sure to not merge across this line.

When looking into the implementation of this, such changes would makes the code a lot less readable, duplicate the command matching logic, and reduce consistency. Also, it is questionable whether the performance gains are actually that significant:

it is uncommon to have more than a handful of commands, so the potential here is to use a map instead of iterating over 5 checks
it there are a lot of commands, people usually group them via composers, which prevents the described optimization from happening

Instead of adding a lot of complexity for little gain, I would prefer to implement this in the commands plugin. If people need commands on steroids, let them use the plugin.


Upgrade Ammonium

@alexarchambault what do you think?

Sorry for only coming back to this now :/
The difference between ammonium 0.8.3-1 and 0.8.3-2 is that the latter shades coursier. If I remember correctly, I ran into issues because of that, in jupyter-scala (not 100% sure, but I think it was because one can't directly call shaded APIs from scala code, and the spark module of jupyter-scala does just that, to fetch some spark jars it needs via coursier).
Overall, about bumping the version of Ammonite in jupyter-scala, I ran into hard-to-disentangle issues while trying to merge ammonium with the latest Ammonite main line (owing to the fact that Ammonite now relies on coursier too, but its own way, plus there were other issues I can't remember right now).
So to have jupyter-scala rely on a more recent Ammonite, I'd like to finally send its changes as PRs to Ammonite… I've done a few things for that locally, that I'll submit after some clean up.

Closing this, now that the develop branch is there.


Guidance on how to deploy an already running app

Can someone point me to the official guidance on how to deploy an already running app when running dotnet behind either IIS or NGINX? I've searched, of course, and found all kinds of references to app_offline.htm, but that means nothing on Linux or Mac or when simply debugging with dotnet run.

This is really deployment specific. The app_offline.htm trick works because the IIS launcher (AspNetCoreModule) listens for the file and kills your app.
Having something listen for a signal and shut down your app is the easy part. Keeping it from restarting your app until you're ready, and sending something meaningful to your clients in the meantime is where things get harder.
The dotnet run dev loop is an interesting special case. Several people have reported success by combining dotnet watch with dotnet run to run their app and kill it whenever files changes so it can restart. However, there are no official docs on this scenario. @natemcmaster do you have any references?

dotnet-watch is a development tool. I wouldn't use it for deployments. dotnet-watch only restarts the server when *.cs or *.csproj files change. It doesn't have retry logic, support 'offline' responses when the app is down, or watch changes the *.dll files.

Where should I go to request/suggest this kind of guidance?

@shirhatti

It really depends on your situation : Are you deploying to the cloud? on prem? just local? How many people are working on the solution?
There can be vastly different approaches to deployment based on these questions, and these needs to be clarified.
if you are deploying to IIS, one option is to use powershell scripts/modules.

It depends. for instance, you could be running a microservice architecture, and applications running on linux but managed through an orchestrator such as k8s.

We periodically close 'discussion' issues that have not been updated in a long period of time.
We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.


feat: include latest probe in lineage response

Return node attributes in Lineage response for GetGraph call. Node
attributes include latest probe for asset nodes in the Graph. This
enables showing live lineage.
Use context for gRPC dial and compass service handler in server.
Add support for fetching probes with filters from asset repository.
Supported filters:

AssetURNs - zero or more asset URNs.
MaxRows - Number of rows for each Asset URN ordered by latest first.
OlderThan,NewerThan - Data range.

Fix some lint errors.

Should be merged after #178 (would be rebased on main)

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

129 of 137 (94.16%)  changed or added relevant lines in 6 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.06%) to 86.173%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/server/v1beta1/lineage.go
21
25
84.0%

internal/store/postgres/asset_repository.go
31
35
88.57%

Totals

Change from base Build<PHONE_NUMBER>:
0.06%

Covered Lines:
4961

Relevant Lines:
5757

💛  - Coveralls

LGTM, but found an issue that may or may not be solved in this PR
https://github.com/odpf/compass/issues/182
It is out of scope for sure, but can this be easily solved in this PR?
@sudo-suhas

Created a different PR to fix that issue - https://github.com/odpf/compass/pull/183
This way git history is cleaner and we are not including unrelated change in this PR.


'declare method' code action creating invalid code

TypeScript Version:  2.6.0-dev.20171013
Code
main.ts
import Foo from "./foo";

const x = new Foo();
x.bar()

foo.ts
import {} from 'path'

export default class Foo {
}

Trigger the declare method 'bar' code action on f.bar
Expected behavior:
foo.ts becomes:
import {} from 'path'

export default class Foo {
    bar() {
        throw new Error("Method not implemented.");
    }
}

Actual behavior:
foo.ts becomes:
import {} from 'path'

export default class Foo {
}    bar() {
        throw new Error("Method not implemented.");
    }

Here is the returned action:
[Trace  - 11:52:35] Response received: getCodeFixes (645). Request took 3 ms. Success: true
Result: [
    {
        "description": "Declare method 'bar'.",
        "changes": [
            {
                "fileName": "/Users/matb/projects/san/foo.js",
                "textChanges": [
                    {
                        "start": {
                            "line": 4,
                            "offset": 4
                        },
                        "end": {
                            "line": 4,
                            "offset": 4
                        },
                        "newText": "    bar() {\n        throw new Error(\"Method not implemented.\");\n    }\n"
                    }
                ]
            }
        ]
    }
]

You can see that offsets in this case are incorrect

The repro steps produce the expected output in VS.  In VS Code, the behavior seems to depend on the presence of a semicolon after the import in foo.ts.
With (blank line eliminated):
import {} from 'path';
export default class Foo {
    bar(): any {
        throw new Error("Method not implemented.");
    }
}

Without (all whitespace discarded - result doesn't compile):
import {} from 'path'export default class Foo {
    bar(): any {
        throw new Error("Method not implemented.");
      Empirically, it appears to be getCodeFixes, change (which must be specific to VS Code?), getCodeFixes.  The first getCodeFixes response is indicates a different line number depending on the presence of the semicolon, which is probably a server bug.  The change request surprises me a bit since the start offset always appears to be 4 less than the start offset in the getCodeFixes response.  That may or may not be causing problems.  The second getCodeFixes call seems like it might be the product of a race - after the fix has been applied, it should not be offered again.  However, it is and the response contains a different line number and different insertion text (it appears to be trying to synthesize a new member, rather than replacing the entire type declaration the way it did the first time around).

I think the map from offset to line-column might be returning bad values.  I've seen at least one case where it's beyond the end of a line.  It's possible the change message includes a different position because an attempt has been made to correct the position.

The insertion text differs when getCodeFixes is called again after the fix is applied because insertNodeAtClassStart handles classes with no members specially.

Oh, the conversion is using the ScriptInfo for main.ts, rather than the one for foo.ts.  That would explain why the result is incorrect.


Unhelpful UnsatisfiedRequirement error message

Whenever there is an unsatisfied requirement, I see the message,
injector.UnsatisfiedRequirement: <exception str() failed>

I am using Python 3.5.7.
I think the cause of this is
https://github.com/alecthomas/injector/blob/a461f722adcf8e23f0fdd4e122f101029a74877c/injector/__init__.py#L585
which creates a new UnsatisfiedRequirement object with only one argument, but the __str__() function
https://github.com/alecthomas/injector/blob/a461f722adcf8e23f0fdd4e122f101029a74877c/injector/__init__.py#L181-L186
utilises self.args[0] and self.args[1], which causes an exception.
I'm not sure what self.args[0] and self.args[1] are meant to represent but modifying line 585 to
raise UnsatisfiedRequirement(None, interface)

seems to output a sensible message when the error is thrown.

Thanks!

The fix for this has just been released as part of the version 0.18.1.

Oh sorry, I've just realised I forgot to mention that I also had to change line 186
https://github.com/alecthomas/injector/blob/a461f722adcf8e23f0fdd4e122f101029a74877c/injector/__init__.py#L186
to
return '%sunsatisfied requirement on %s' % (on, _describe(self.args[1]))

since I was getting an AttributeError that self.args[1] doesn't have an attribute interface. I don't really know what self.args[1] is supposed to be so I don't know if this is the right way to fix it.
My bad.

Short example:
from injector import Injector, inject

@inject
def main(password: str):
    print(password)

injector = Injector(auto_bind=False)
injector.call_with_injection(main)

Thanks, https://github.com/alecthomas/injector/commit/dd5f407a945ca28ad7e4cc3fc3b824d52ecd93b5 should address this.

Just released in version 0.18.2.


Bug: Pydantic fields with constraints and multiple type hints cause ParameterException

Description
One of our pydantic models has the following field definition among others:
property: StrictInt | StrictFloat = Field(le=1000000)

In polyfactory 2.13.0, a boilerplate factory for this model worked fine. However, with the upgrade to 2.14.0, we started seeing the exception in the title.
URL to code causing the issue
No response
MCVE
from polyfactory.factories.pydantic_factory import ModelFactory
from pydantic import (
    BaseModel,
    Field,
    StrictFloat,
    StrictInt,
)

class Config(BaseModel):
    property: StrictInt | StrictFloat = Field(le=1000000)

class ConfigFactory(ModelFactory[Config]):
    ...

if __name__ == "__main__":
    ConfigFactory.build()

Steps to reproduce
1. Install packages pydantic~=2.5.3 and polyfactory==2.14.0
2. Execute the file with python
3. See error

Screenshots
No response
Logs
Traceback (most recent call last):
  File "/Users/berkaycagir/test.py", line 19, in <module>
    ConfigFactory.build()
  File "/Users/berkaycagir/.pyenv/versions/test-env/lib/python3.12/site-packages/polyfactory/factories/pydantic_factory.py", line 385, in build
    processed_kwargs = cls.process_kwargs(**kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/berkaycagir/.pyenv/versions/test-env/lib/python3.12/site-packages/polyfactory/factories/base.py", line 955, in process_kwargs
    field_result = cls.get_field_value(
                   ^^^^^^^^^^^^^^^^^^^^
  File "/Users/berkaycagir/.pyenv/versions/test-env/lib/python3.12/site-packages/polyfactory/factories/base.py", line 694, in get_field_value
    return cls.get_constrained_field_value(annotation=unwrapped_annotation, field_meta=field_meta)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/berkaycagir/.pyenv/versions/test-env/lib/python3.12/site-packages/polyfactory/factories/pydantic_factory.py", line 368, in get_constrained_field_value
    return super().get_constrained_field_value(annotation, field_meta)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/berkaycagir/.pyenv/versions/test-env/lib/python3.12/site-packages/polyfactory/factories/base.py", line 660, in get_constrained_field_value
    raise ParameterException(msg)
polyfactory.exceptions.ParameterException: received constraints for unsupported type typing.Union[typing.Annotated[int, Strict(strict=True)], typing.Annotated[float, Strict(strict=True)]]

Release Version

Python 3.12.1
pydantic 2.5.3
polyfactory 2.14.0

Platform

[ ] Linux
[X] Mac
[ ] Windows
[ ] Other (Please specify in the description above)

[!NOTE]
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard

If you would like to see an issue prioritized, make a pledge towards it!
We receive the pledge once the issue is completed & verified
This, along with engagement in the community, helps us know which features are a priority to our users.

@berkaycagir thanks for reporting this! I can reproduce this, and it most likely has to do with the changes introduced in #468 which slightly changed how unions are handled.


Autoname providers from module returns when loaded via preload

Prvd 'M Wrong gives every unnamed provider a random hash... which has shown to have bad debugging. Historically we've used debug.info, though I chose to drop it as calling it for several providers... is not good!
Instead, perhaps some functionality baked to preload can append an identifier for unnamed provider returned via return prvd(MyProvider). This should significantly buff debugging Prvd 'M Wrong.

Related to #30


topology_recovery: Failure: no replica promoted

Hi @shlomi-noach ,
Hope you are doing well.!
I have a orchestrator running for the production which have multiple cluster, yesterday one of the master in a particular cluster got failed but orchestrator did not promoted candidate master to a new maser (failover failed), when I started debugging I found
INFO topology_recovery: Failure: no replica promoted.. in the logs.
concerned cluster topology
<IP_ADDRESS> Master
<IP_ADDRESS> Candidate Master
<IP_ADDRESS> Slave
<IP_ADDRESS> Slave

orchestrator.conf.json
"PromotionIgnoreHostnameFilters": ["<IP_ADDRESS>","<IP_ADDRESS>","<IP_ADDRESS>","<IP_ADDRESS>"],

Code :instance_topology.go
func IsBannedFromBeingCandidateReplica(replica *Instance) bool {
	if replica.PromotionRule == MustNotPromoteRule {
		log.Debugf("instance %+v is banned because of promotion rule", replica.Key)
		return true
	}
	for _, filter := range config.Config.PromotionIgnoreHostnameFilters {
		if matched, _ := regexp.MatchString(filter, replica.Key.Hostname); matched {
			return true
		}
	}
	return false
}

The above function is returning true when <IP_ADDRESS> is being compared in PromotionIgnoreHostnameFilters list due to <IP_ADDRESS> and <IP_ADDRESS>  therefore promotion is not happening.
Please check and fix.
Thanks in advance.

Hi! Thank you for this. You are correct and <IP_ADDRESS> matches as regular expression to <IP_ADDRESS>. I'm looking into this.

Fixed in https://github.com/openark/orchestrator/pull/1318


[plot] Add doc of PlotTools and Profile

This PR add PlotTools and Profile modules to the documentation.
closes #287

Under review

Looks good to me


Passing variables to transformChildren()

I'm attempting to pass in additional variables when calling node.transformChildren(), but they seem to be ignored in favor of the variables passed in on transform(). I expected it to work similar to the partial tag, but it doesn't seem to.
Example
const source = `
{% custom %}
# {% $name %}
{% /custom %}
`;

const custom = {
  transform(node, config) {
    const variables = { ...config.variables, name: "custom" };
    const scopedConfig = { ...config, variables };
    return node.transformChildren(scopedConfig);
  },
};

const ast = Markdoc.parse(source);
const config = { tags: { custom }, variables: { name: "original" } };
const content = Markdoc.transform(ast, config);
const html = Markdoc.renderers.html(content);

Output

original

Any ideas what I'm doing wrong here?

I dug through the code and realized that Markdoc.transform() cascades a resolve() call through the tree before reaching calling the tag's custom transform()... which seems strange to me 🤔 Maybe there should be a custom resolver per tag or something.
I ended up having to hack a solution by walking the tree and saving the original children for certain tags
const ast = Markdoc.parse(source);

for (const node of ast.walk()) {
  if (node.tag === "custom") {
    // save original ast
    // can't save in node.attributes because it also gets resolved before transform()
    node.template = [...node.children];
  }
}

then in my tag I pull that template and use the root transform
const custom = {
  transform(node, config) {
    const variables = { ...config.variables, ...item };
    const scopedConfig = { ...config, variables };
    return Markdoc.transform(node.template, scopedConfig);
  }
}

So if folks are looking for a way to loop through an array and render, here's my very hacky solution.
// the array of data to loop through
const lines = [{ text: "hello" }, { text: "world" }];

// the template to use for each iteration of the loop
const source = `
{% each items=$lines %}
{% $text %}
{% /each %}
`;

// the custom tag's transform logic
const each = {
  attributes: {
    items: {
      type: Array,
      required: true,
    },
  },
  transform(node, config) {
    return node.attributes.items.map((item) => {
      const variables = { ...config.variables, ...item };
      const scopedConfig = { ...config, variables };
      return Markdoc.transform(node.template, scopedConfig);
    });
  },
};

const config = { tags: { each }, variables: { lines } };
const ast = Markdoc.parse(source);

// yuk! hack to save the original ast (before it's resolved)
for (const node of ast.walk()) {
  if (node.tag === "each") {
    // save original ast
    node.template = [...node.children];
  }
}

const content = Markdoc.transform(ast, config);
const html = Markdoc.renderers.html(content);


Keep Namespace up when moving around menu

Version - master 5/5
Comment:
If I move to any menu item except those within the kubernetes menu item, the Namespace menu item disappears.  It should stay up.  I know that most menu goes across namespaces, but so does Admin for environment and we leave it up.

Version - master 5-24
Verified fixed


[Swift 4] Update Minimum Coin Change

Checklist

[x] I've looked at the contribution guidelines.
[x] This pull request is complete and ready for review.

Description
Update to Swift 4
#507

Looks good, thanks!


docs: fix error

Short description of changes:
Just fix an error.

Coverage remained the same at 80.578% when pulling e2b9825a2c3be2494108225be9eb4e1633873a6a on ivc369:patch-1 into 44fbf00843cebd98aef254002ffe55e7117fc3f4 on katspaugh:master.

thanks!


[SDA-7847] Add byo oidc support

@gdbranco please update the example and the readme files as well

@bardielle Is it okay to merge this?


use multiprocess manager for windows compatibility

@datarobot/predictions  These changes should allow the script to run on windows. The only caveat is that I had to hack the logger so that it sends all logs to stdout by default on windows. Apparently you can't have multiple file handles opened to a single file on that platform.

Coverage increased (+0.4%) to 85.4% when pulling 6bf4bb4e0175f4ef244c1c6576d9229d89b1ffe1 on windows_compatibility into 5f42493d949adc35a0ea89105697c2e70469ef32 on master.

Coverage decreased (-0.5%) to 84.473% when pulling 6bf4bb4e0175f4ef244c1c6576d9229d89b1ffe1 on windows_compatibility into 5f42493d949adc35a0ea89105697c2e70469ef32 on master.


Create ProblemList_openjdk18.txt and ProblemList_openjdk18-openj9.txt

Since jdk18 is now being built and tested, we need to add exclude files for it (in https://github.com/adoptium/aqa-tests/tree/master/openjdk/excludes).
While the contents of the 2 new files that we wish to add could start by copying the contents of the ProblemList_openjdk17.txt and ProblemList_openjdk17-openj9.txt files, it is necessary to assess the openjdk test results of a jdk18 test run by looking at Test_openjdk18* test jobs found in https://ci.adoptopenjdk.net/view/Test_openjdk/ to include what tests are failing.

Closed via #3044