Unable to install grpc-tools on OSX using pip

(env) Clank:client doug$ pip --version
pip 8.1.2 from /Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages (python 2.7)

(env) Clank:client doug$ pip install grpcio.tools
Collecting grpcio.tools
  Using cached grpcio_tools-1.0.0-cp27-cp27m-macosx_10_10_intel.whl
Requirement already satisfied (use --upgrade to upgrade): grpcio>=1.0.0 in ./env/lib/python2.7/site-packages (from grpcio.tools)
Requirement already satisfied (use --upgrade to upgrade): protobuf>=3.0.0 in ./env/lib/python2.7/site-packages (from grpcio.tools)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in ./env/lib/python2.7/site-packages (from grpcio>=1.0.0->grpcio.tools)
Requirement already satisfied (use --upgrade to upgrade): futures>=2.2.0 in ./env/lib/python2.7/site-packages (from grpcio>=1.0.0->grpcio.tools)
Requirement already satisfied (use --upgrade to upgrade): enum34>=1.0.4 in ./env/lib/python2.7/site-packages (from grpcio>=1.0.0->grpcio.tools)
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./env/lib/python2.7/site-packages (from protobuf>=3.0.0->grpcio.tools)
Installing collected packages: grpcio.tools
Exception:
Traceback (most recent call last):
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/Users/doug/dev/clojure/learn/hello_microservice/client/env/lib/python2.7/site-packages/pip/wheel.py", line 348, in move_wheel_files
    assert info_dir, "%s .dist-info directory not found" % req
AssertionError: grpcio.tools .dist-info directory not found

OSX version: 10.12.1 (16B2555)

I've never seen that syntax before (pip install grpcio.tools as opposed to pip install grpcio-tools). Using it on my Mac OS X results in a failure similar to yours, but using pip install grpcio-tools results in success. Could you please try pip install grpcio-tools?

Ah, my apologies, that is indeed my mistake.
Strange, I also have no idea why pip doesn't return a normal 'Could not find a version that satisfies the requirement ...' error, but pip install grpcio-tools correctly installs and works.
Thanks very much!

Probably has to do with pip silently projecting out symbols to underscores, then uses the projections for file comparisons instead of the originals and the names within said files. I'unno.


SWDEV-321511 - Enable device related disabled tests on Nvidia platform

Change-Id: I95a62e9562a638cb3525862b9a5d2e640c10882c

@satyanveshd : FYI both these tests fail on nvidia platform in CI.

@mangupta The corresponding hipamd change which fixes this issue was merged internally, But I don't think it is reflected yet here in develop branch.


Windows 10 shared folders with smb2

Hello,
this vagrant box is really great, docker apps with shared folders works really fast on Mac, however i have problems with mounting shared folders on windows 10. I am doing everything according to documentation vagrant box starts properly i have access to docker in command line my docker-compose file starts containers correctly but when I try to enter inside container using docker exec shared folders are not present. Did you try it on windows 10, is there anything else that i need to make in order to make it work on windows 10?

Hi @Entaro, I'm testing this project primarily on a Windows 10 laptop, so it does work with Windows 10 for sure :)
Do you get any errors when the VM boots related to not being able to mount the SMB share?
Do you see the mounted folder in the VM itself? Do a vagrant ssh and check mount.

@lmakarov i don't see any errors when VM boots.
I see mounted folders in the VM, but when I run containers with docker-compose up -d they are not present in container. However i tried to run docker-compose up -d from inside vagrant and it worked.
Now I am experiencing another issue after about 30 minutes of work something happens and docker is no longer available on windows host, when i try to run docker command i get this message "An error occurred trying to connect: Get http://<IP_ADDRESS>:2375/v1.21/containers/json: dial tcp <IP_ADDRESS>:2375" But when i ssh into vagrant i can still display all docker processes with docker ps

@Entaro as for the mounts - you most likely have the volumes defined wrong in the docker-compose.yml file. It is best to define volume mappings using relative paths, e.g.:
  volumes:
    # Project root folder mapping
    - ".:/var/www"

As for the networking issue, see this and let me know whether that fixes the issue for you.

I have my volumes defined using relative paths. This is my folder structure (screenshot is from mac but i have the same structure on windows)

and here is my compose configuration
`mysql:
build: mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ./dbstorage:/var/lib/mysql
- ./db:/var/db
php:
build: php-fpm
links:
- mysql:mysql
ports:
- 9003:9000
volumes:
- ./www:/var/www
symfony:
build: php-fpm
links:
- mysql:mysql
ports:
- 9000:9000
volumes:
- ./www/symfony:/var/www/
nginx:
build: nginx
ports:
- 80:80 # HOST:CONTAINER
links:
- php:php
- symfony:symfony
volumes:
    - ./www:/var/www
    - ./sites-enabled:/etc/nginx/sites-enabled
    - ./logs/nginx/:/var/log/nginx

`
In terms of networking issue i can enter to VM console.

@Entaro is this still a relevant issue for you?

I stopped experimenting with it on windows, now I am mostly working on Mac and everything works fine there.


[Feature Request] Service Connection backed up by Certificate is not supported for running load test via Azure pipeline

Is your feature request related to a problem? Please describe.
We are running load test via Azure pipeline where Service connection is using client secret. We observed Load Testing is not supported certificate in Service connection though certificate is recommended for security standpoint .
Describe the solution you'd like
Please provide support for Service Connection backed up by Certificate to run load test via Azure pipeline.
Additional context
We are getting below error if we use Service Connection backed up by Certificate.
`(node:1600) UnhandledPromiseRejectionWarning: Error: Endpoint auth data not present: cd80e187-3750-431f-8d01-f70e51cba41b
at Object.getEndpointAuthorizationParameter (/home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/node_modules/azure-pipelines-task-lib/task.js:357:15)
at /home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/models/mappers.js:264:42
at Generator.next ()
at /home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/models/mappers.js:27:71
at new Promise ()
at __awaiter (/home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/models/mappers.js:23:12)
at getAuthInputs (/home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/models/mappers.js:260:12)
at Object.getInputParams (/home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/models/mappers.js:215:5)
at /home/vsts/work/_tasks/AzureLoadTest_b61b360c-31ac-4389-922b-303ea8befde7/1.1.87/index.js:48:17
at Generator.next ()
(node:1600) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1600) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`
AB#1464126

@agrawalamit31 thanks for the feedback. We will work on this to support service connections with certificates.

@ninallam - Any update for this feature ?


Monlam Dictionary Frontend Implementation

Abstract
This RFC proposes the design and implementation of the frontend for Monlam dictionary editor using React. The UI will provide an intuitive and user-friendly platform for managing dictionary entries, enabling users to interact with the backend API for tasks such as editing database values, searching entries, and managing user roles and permissions.
Tech Stack

Frontend:
- React, React Router (for navigation), and state management with Redux and others.
- Component Library: TailwindCSS
- API Integration: Axios or Fetch API
- Deployment: render

User Interface Design
Key Pages

Login Page

Dashboard

Overview of dictionary metrics and shortcuts to key features.

Dictionary Entries

List view with search, sort, and filter options.
Editable form modal for creating or editing entries.

User Management

Accessible to Admins only.
Display list of users and their roles.

Steps

[ ] Set up React project with required dependencies.
[ ] Implement authentication and role-based routing.
[ ] Implement utility functions to fetch and update data in the database.
[ ] Design and implement UI for the Dashboard and dictionary metrics display.
[ ] Develop dictionary entry management interface (list, form, modals)
[ ] Integrate search functionality and filters for dictionary entries
[ ] Implement form validation for creating/editing dictionary entries
[ ] Implement state management (e.g., Redux or React Context) to manage application state.
[ ] Add error handling for API interactions and form validation.
[ ] Ensure responsive design for mobile and tablet devices.

Card Reviewer

[ ] @tenkus47

design:
https://www.figma.com/design/XIUwbSgQSpT2viGFcXSkm8/Editor?node-id=226-8320&t=q5WB6wjSfVGEzyWo-1


Fix #5: Workaround for breaking docker.py v3 breaking docker-squash

obviated with the current Dockerfile, but thanks!


Connection should offer a subscriber interface instead of only #waitUntilClosed

Connection's interface is less than ideal for certain use cases. You can call #waitUntilClosed in order to detect a closure of the Connection w/o sending a message. This is less than ideal since it causes the calling thread to hang until the Connection is closed. It would be nice if you could asynchronously monitor the state of the Connection.
It would be nice to register an action w/ the Connection to be evaluated (in a new thread) when the Connection is shut down.
onClosure: aBlock
   "This method registers an action which is activated once the Connection has been closed.
   The action receives the Connection instance as an argument via #cull: and is evaluated in a new thread.
   The framework does not provide any Exception protection in the new thread."

"subscriber interface" / register to be notified when / etc. are the Announcements API.

While true, this does not take into account the Dolphin environment.

Actually, my understanding of Dolphin's support for Announcements was incorrect. It looks as though there is support for Announcements so I can just use Announcements assuming we move Announcements out of the Sparkle project and into a repo RSR can depend upon.

Pushed to development. Connection>>#waitUntilClose is now written in terms of an Announcement rather than storing a semaphore on the Connection.
Note, GemStone did not provide Object>>#initialize until a recent 3.7.0 build. GemStone's Announcer>>#initialize calls super initialize. This results in a DNU. You'll either need to implement Object>>#initialize or upgrade to a recent 3.7.0 in order to avoid the DNU.
See 2fb26466c92fdb7b89c1b4551a297eec9f0a1989


Mini Project: level 4 extra line of iterate

Description
Previous posts usually mentioned printing a extra line of takeWhile:  or filter: . However, I am printing out an extra line of iterate: . I thought the problem was with iterate so I changed its implementation, only to find out that in this way I would be missing a line of iterate:  in level 2&3 testcases. So the problem would be back to limit. Anyone had the same problem before can share how you solved it?

For example, let's say a list consisting of 1, 2, 3, 4, 5, ... is created via list = InfiniteListImpl.iterate(1, x -> {System.out.println("iterate"); return x + 1;});.
Applying list = list.limit(4), the list now should be 1, 2, ,3, 4, EmptyList.
If you evaluate the tail after 4 immediately after 4 is polled out using peek(), you actually triggered another print() method although the EmptyList wouldn't give you a 5.
If my guess is right, I suggest you make you evaluation of the next tail lazy in the method peek(). Don't return a tail immediately, instead, return a "promise" of a tail.

Sorry I don't quite understand. peek() return a promise of the head? Isn't it supposed to return the tail?

Sorry I don't quite understand. peek() return a promise of the head? Isn't it supposed to return the tail?

Ah sorry, I didn't make myself clear here, peek() indeed needs to return a new list consisting of the new head and the new tail, where the new head comes from the head of your current tail.
So I mean don't evaluate what is inside the new head in the method peek()

What I did is just tail.get().get(). Will this cause the evaluation of the head in the tail?

What I did is just tail.get().get(). Will this cause the evaluation of the head in the tail?

I don't think so. Then is may be something else you didn't evaluated lazily enough. Try to check againt each line of code and think what still can be delayed later.
By the way, I don't think Optional::get is allowed for the mini project, try another method to circumvent this restriction.


Reenable TestStressEnvoy race test.

Looks like it doesn't fail anymore. address #3210

@xiaolanz: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
c5ad2e8baeba29150ee97d97351c445f137a2ea0
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/hold

/unhold

/lgtm
/approve

can we see #3780 pass first ?
/hold

No. We cannot wait for the other one. because there are a few other racetests to be fixed before I can enable for presubmits.

this PR didn't fix anything, it just made the test enabled... I hope it does pass

We tested locally. Neither Wayne nor me found it fail though.


"Rebuild project with Cabal's --enable-test flag"

Sorry, not sure if this is the correct forum in which to ask, but I'm a relatively new stack user and I'm trying to get haskell-vim-now to be able to guess types in my large haskell project. Right now, it can't guess anything. The wiki says:
"This relies on your project being built with Cabal's --enable-test flag. You may need to recreate your sandbox and rebuild with this option."
I'm not entirely sure how to do this. I've tried doing a fresh rebuild (package.cabal and stack.yaml retained, but nothing compiled), with
stack build --flag *:--enable-test
but it still can't guess any types. I'm not sure what to do.

Try stack build --test --no-run-tests. It's weird that ghc-mod can't guess any types, so I'm not sure that this will solve the problem but give it a try and let me know what happens.

I'm afraid it produced no change.

My attempts to reproduce the problem in a simple project and create a minimal working example have failed, so here are some steps to reproduce:
$ git clone git@github.com:buckie/juno.git
$ cd juno/
$ stack setup
$ stack  build --test --no-run-tests
$ vim src/Juno/Messaging/ZMQ.hs  # chosen pretty much arbitrarily
:33
,ht
:34
2w
,ht

It spits out ghcmod#command#type: Cannot guess type both times.
other stuff, like
,tg
:34
0
3w
C-\

works just fine.

So, am I just barking up the wrong tree, or missing something?

I'll make a todo for myself to look into this problem some more.

Is there something I can do to help?

Sorry to leave you hanging on this one! Been preoccupied with some other things. One thing you could try is to create a virtual machine or a server on EC2/Digitalocean and install Stack and haskell-vim-now there. Then clone your project and try to build it on the server. See if vim can guess the types. If it works on the server then maybe there is more to investigate about your machine configuration.

I have been trying to replicate the bug in a VM, but find myself unable to install haskell-vim-now due to a "stack paths" issue, which I've posted at https://github.com/begriffs/haskell-vim-now/issues/130

I merged a PR that should acommodate older stack options. Can you try again?

@isheff ping

I have been able to replicate this bug on a fresh Ubuntu virtual machine, and indeed am unable to guess types in the "juno" project.
This is an Ubuntu 16.0.4 VM, and the only things I've done on it are install juno from https://github.com/kadena-io/juno , as well as its prerequisites, run stack upgrade, downloaded haskell-vim-now, compiled everything, opened a file, and tried to guess a type.
user: user
password: xyzzy
The relevant vm is "Cannot_Guess_Type"
Sync: https://link.getsync.com/#f=VM&sz=56E8&t=1&s=JWLRXPY77NRLL2CNEWVSGCBFRKYZ74VH&i=CAYIGCJOAU2JW72AAHQWOUQ22B3CNVWZJ&v=2.3
Google Drive (available soon): https://drive.google.com/open?id=0B5fhtA7wViuec2o1Y2NudzRVYXc

OK I learned something new that may help. I suspect the GHC version used to build ghc-mod does not match the GHC version used to build your code (as explained here https://github.com/DanielG/ghc-mod/wiki#readpackagedb-inappropriate-type)
From inside your project directory try running
ghc-mod --version
stack ghc -- --version

If the GHC versions don't match up then I'll tell you what to do next to fix it. Once we get it working for you then I can update the Wiki.

I think that will solve your problem. Closing this issue on github. Reopen if my solution doesn't help.


Change InfluxDBClient verify_ssl default to True

Since the default behavior for a request in the requests library is to set verify=True, can the InfluxDBClient verify_ssl default be changed to mirror that of the requests defaults? Currently it's set to False, and using HTTPS (with a CA-signed cert) produces InsecureRequestWarning. The default behavior should be to follow the defaults of the request library to verify SSL. Should someone need to disable verification, they should be set explicitly when creating a new client (if you're using self-signed certs, for example). The choice to make the default False seems backwards.
Is there a reason the default is verify_ssl=False and can it be changed to verify_ssl=True?

I wouldn't think most users have SSL enabled on their InfluxDB instances.
Also, this would break the API.

For the reason above, I am closing this issue.
It is simple to configure, so I see no good reason to break the API for 30k users.

@aviau What's the best way to get the InfluxDB client to trust a self-signed certificate?

I got it to work by specifying : verify_ssl="path_to_your_cert" when initialising the InfluxDBClient.

I was very surprised by having to opt into security by adding verify_ssl=True when I encountered this warning message in my logs:
opt/venv/lib/python3.7/site-packages/urllib3/connectionpool.py:988: InsecureRequestWarning: Unverified HTTPS request is being made to host 'influxdb.example.test'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,

I at first thought that my CA bundle that includes some self-signed CA stuff was incorrectly configured, but alas, no: this influxdb client is not verifying certificates by default. The underlying functionality in requests recommends only disabling verification for testing purposes.
@julien10 Your suggestion isn't working how you think it is. That ends up evaluating truthy: the path to the cert isn't actually used, it seems, once passed to requests.


Linking to an anchor tag on different post/page prevents scrolling up

Can't find anything about this online or the general Foundation docs, so wondering if anyone here has run into this/has ideas on how this can be fixed.
How can this bug be reproduced?

This happens anywhere there is a link going to an anchor tag on another page or post. The above is just an example.
What did you expect to happen?
You should be able to scroll up to see the above content, etc as a normal page would function. I'm guessing that this has something to do with how foundationpress sizes the page to fit the window.  No idea, though. Issue does not occur when linking to an anchor tag on the same page.
I am using a js snippet to smooth scroll to anchor tags, but I've commented that out and the issue still persists. I'll include it though in case.
$('a[href*="#"]:not([href="#"])').click(function() {     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {       var target = $(this.hash);       target = target.length ? target : $('[name=' + this.hash.slice(1) +']');       if (target.length) {         $('html, body').animate({           scrollTop: target.offset().top         }, 500);         return false;       }     }   });
Thanks for any help you all can offer!
Please List the Following:

OS & version: Latest Chrome, Safari, and Firefox
Node version (node -v) [Node v4+ is required] : v4.4.4
Foundation version (bower list) : 6.2.2

Try removing the "sticky" behavior from the menu and see if that changes anything.

@colin-marshall Just tried that, but to no avail.  Here's what it is:
$(window).scroll(function() {   if ($(this).scrollTop() > 1){     $('#site-navigation').addClass("sticky");     $('.pre-nav').slideUp(400);   }   else{     $('#site-navigation').removeClass("sticky");     $('.pre-nav').slideDown(400);   } });
I also tried commenting out the stickyfooter.js , but that didn't work either :/

@ehrhino try removing all custom JS and also remove all the html markup that has to do with sticky.

@colin-marshall
I removed all custom JS, and the nav bar completely, but still nothing. However, when I commented out:
<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) == 'offcanvas' ) : ?>

			<?php get_template_part( 'template-parts/mobile-off-canvas' ); ?>
<?php endif; ?>

and it's closing tags in footer.php then the issue was solved...leading me to believe it's something with the off-canvas js (which I use for the mobile menu).

Good find! I will see if there are any similar bug reports in Foundation.

@colin-marshall any luck?  Did some poking around myself, but couldn't find anything.

I'm unable to reproduce this error. Is this still an issue? If yes, can you please try to reproduce with the latest version of FoundationPress (it has been updated to use Foundation 6.4.1). If no, can you please close the issue? :)


Deposit Header No. series is not extensible

Deposit Header No. Series is extendable.
No. Series code is not following the pattern same as sales/purchase header.
We need the same functions an triggers.
We need the same functions an triggers.
Look for these triggers in Sales Header table
OnAfterGetNoSeriesCode
OnBeforeTestNoSeries
OnAfterInitRecord

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Only small selected emojis are available

I noticed that only a limited amount of emojis are working by using the emojis aliases from http://unicode.org/emoji/charts/full-emoji-list.html as documented. For example sunglasses would work as in the example, and other face-positive emojis. But when I try to print out sun it gives me of not found error. Correct me if I am wrong, but is the package limited to the screenshot of READ.MD file?

There is a small list supported but it can be added onto. This file here determines what emojis can be used. When i get time in the next couple days I will try to update it.
https://github.com/unicodeveloper/laravel-emoji/blob/master/src/Emojis/emoji.php


Use relative font sizes where possible

I am no QML master, but the new design was unreadable to me. I had to remove the hardcoded font size to be able to use the app again.
This is not polished, if there is interest for it, I'll look into fetching the system's font size by default and adding a configuration option in the settings.
Also, I couldn't get the search input to play nicely so its placeholder is not horizontally aligned. If someone with experience knows what's up, feel welcome to point it out.

Screenshot before/after:

Thanks for the contribution! There is probably room for both increasing the default size a bit, and respecting the system font size. I'd like to avoid an extra setting if possible. It's a good direction, we just need to make sure it plays well across different OSes and resolutions.

Related: https://github.com/Yubico/yubioath-desktop/issues/307#issuecomment-534863764

I've removed the pixelSize definition on the root component. That should use the system's font.
I can't test it on linux right now and I don't have Windows to test it on so would love it if someone could test it there.

Screenshots from testing on Ubuntu 19.04. Will be able to test on Windows a bit tomorrow probably.

The main view looks pretty good I think
In settings, the describing text is no longer smaller than the heading, which it should be.
In add credential, the first heading is cropped

Made the header wrap and increased the font size of titles in expandable sections

Hi, thanks for the contribution again. We experimented a bit with both using font.pointSize and relative sizes, but the result differs to much on different platforms, and makes the design harder to control. We will not merge this, but we have done some work to increase the font sizes, and bundle the font on all platforms for consistency. That will be included in the next version of the app.


.run() with arg load_dotenv ignores FLASK_RUN_PORT env variable

Also same happens with .flaskenv usage
Minimal reproducer:
from flask import Flask
app = Flask(__name__)
app.run(load_dotenv=True)

App serves on default port instead of serving on a port set in .env file.
Environment:

Python version: 3.9.7
Flask version:2.0.0

Those are a feature of Click, they fill in the equivalent CLI option values.


Reconsider DataResidualArray

This should be more a dicussion than an issue, and it has been opened only because the discussion zone is not activated here.
Out of my proper experience in the need of LISA data containers, I would love to advocate amending the DataResidualArray class in the following manners,

Separate the containers for timeseries and frequency series. Each of them would be a subclass of a general base data container class to inherit common methods. A natural consequence of this would be, the transformation from timeseries to frequency series (and vice versa) would no longer be implicit, but rather explicitly performed when required. This has the advantage of,

allowing to easily apply arbitrary tapering window
allowing easy extension to time-frequency representations
conceptually decoupling measurements from theories (waveform model)

Provide interfaces that aggregate signals of multiple channels and harmonics. It would be easier for the likelihood computation classes to work with these interfaces since the information on channels (and in some scenarios, the harmonics as well) is needed by the likelihood calculation. Note the 'template' aggregation model could be different from that for 'data', as the latter models the measurements so that they are recorded at the same time grid and can be represented on the same frequency (or time-frequency) grid, whereas the former can be generated on grids of arbitrary choice, possibly different across harmonics according to the need.

Hi Senwen, thank you for the suggestions. I need to open the discussion setup I suppose.
Here is my response:

I think a lot of people get confused about transforms and units and setting up the inner product dealing with different domains. DataResidualArray is designed to be the user interface that makes all of that go under the hood. However, I completely agree about the setup you are suggesting. I think in my head, I was planning to set it up effectively exactly as you have described with DataResidualArray remaining the highest level user interface that uses your described implementation. Unfortunately, I did not do this yet because I ran out of time before the workshop.


feat(input-reader):create input-reader

Created PR #455 with cli commits

This is being deprecated in favor of https://github.com/cartesi/rollups-node/pull/512


Flurry Capture Event Duration?

In flurry docs
https://developer.yahoo.com/flurry/docs/analytics/gettingstarted/events/ios/
We can capture particular even duration but in ARAnalytics.h there is  no such function that wraps up
[Flurry endTimedEvent:@"Article_Read" withParameters:nil];
I went through the "FlurryProvider.h" and didn't find any usages of "endTimedEvent" method so was just curious how ARAanalytics predict the ending of timed event?

I think it does it by using the subclass' method for ending the timed event

Coming due to lack of a reply, doing an issues cleanup.


Fix contacts feature

Contacts screen issues:

Valid addresses are rejected as invalid.
Create button is white and is hardly visible over light grey background - get better color with more contrast from designer and use it. Maybe even a big green or purple button?
In transaction log screen, trying to create contract from an address fails - error box - address is invalid. In addition, auto-filled address is missing canonical 0x prefix.

sounds like something a beginner could attempt. can i jump on this?

@howy1993 this task is pretty straightforward, as contacts are added and saved to wallet file so the transactions with according addresses have to be updated. If you have any question contact me directly - ilya at spacemesh.io


Remove unused parameter in installCatalog.sh

The installCatalog.sh script currently has an unused parameter. This fix is to remove that unused parameter.

This should not have gone in without companion PR https://github.com/apache/incubator-openwhisk/pull/2437


Sync mofed 5.7-<IP_ADDRESS>-ubuntu20.04-amd64

For clouds with older versions of the operator deployed

Image syncing has been abandoned for now


Revert "Fix bug with allowed symbols"

Reverts MicrosoftDocs/visualstudio-docs#5790 per https://github.com/MicrosoftDocs/visualstudio-docs/pull/5790#issuecomment-683178281
cc: @sharwell

@Youssef1313 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks, I see how this was easy to miss reading the code


Building "Legacy" on Tiger

I have successfully built MacVim on Tiger after pulling e44d8aa, but there are two small issues it caused.
First, the PS Tab Bar stuff probably also needs to have a legacy-xcodeproj.  I got xcodebuild warnings about that both during the "make" and "make clean" phases.  I don't use the GUI tabs at all (just the same kind that you can get in the console version).  But just to test whether these warnings affected the build, I started up MacVim clean and created new tabs with Cmd-T.  The tab bar appeared, but no individual tabs appeared.  Also, MacVim spewed to the terminal the following:
2015-11-17 18:18:20.833 MacVim[9372] *** -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]: selector not recognized [self = 0x4650d0]
MacVim(9372) malloc: ***  Deallocation of a pointer not malloced: 0xbfffc7e0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
MacVim(9372) malloc: ***  Deallocation of a pointer not malloced: 0xbfffc970; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug

Maybe this was already broken before the "legacy" commit, I don't know.  I have a hunch that 34feb77c6 broke it, but maybe it's been long broken.  I'll do some digging.
Second, VERSION_INFO_STRING is being set, for some reason, to MacVim_legacy-78.  I don't know where that "78" is coming from.  We're on 82.  If someone points me to what to look at, I can try fixing it myself.

I reverted to 91152d1 and the GUI tabs work there.

Pull #144 doesn't fix either the PSMTab problem or the VERSION_INFO_STRING problem.  (It does fix the xcodebuild warnings about missing xcodeproj files).  VERSION_INFO_STRING remains the same (78), but at least now the compiler is spitting some messages about PSMTab that may be helpful.
macvim/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m: In function ‘-[PSMOverflowPopUpButton drawRect:]’:
macvim/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m:47: warning: ‘NSImage’ may not respond to ‘-drawInRect:fromRect:operation:fraction:respectFlipped:hints:’
macvim/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m:47: warning: (Messages without a matching method signature
macvim/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m:47: warning: will be assumed to return ‘id’ and accept
macvim/src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m:47: warning: ‘...’ as arguments.)

CompileC ../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/Objects-normal/ppc/PSMMetalTabStyle.o macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m normal ppc objective-c com.apple.compilers.gcc.4_0
    cd macvim/src/MacVim/PSMTabBarControl
    /Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -mmacosx-version-min=10.4 -Imacvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/PSMTabBarControl.hmap -Fmacvim/src/MacVim/PSMTabBarControl/../build/Release -Imacvim/src/MacVim/PSMTabBarControl/../build/Release/include -Imacvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/DerivedSources -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/AppKit-bnvgvxyjwsaeimbrubphbwbnnhaq/AppKit.h -c macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m -o macvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/Objects-normal/ppc/PSMMetalTabStyle.o
macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m: In function ‘-[PSMMetalTabStyle drawInteriorWithTabCell:inView:]’:
macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m:397: warning: ‘NSImage’ may not respond to ‘-drawInRect:fromRect:operation:fraction:respectFlipped:hints:’
macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m:397: warning: (Messages without a matching method signature
macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m:397: warning: will be assumed to return ‘id’ and accept
macvim/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m:397: warning: ‘...’ as arguments.)

CompileC ../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/Objects-normal/ppc/PSMUnifiedTabStyle.o macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m normal ppc objective-c com.apple.compilers.gcc.4_0
    cd macvim/src/MacVim/PSMTabBarControl
    /Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -mmacosx-version-min=10.4 -Imacvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/PSMTabBarControl.hmap -Fmacvim/src/MacVim/PSMTabBarControl/../build/Release -Imacvim/src/MacVim/PSMTabBarControl/../build/Release/include -Imacvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/DerivedSources -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/AppKit-bnvgvxyjwsaeimbrubphbwbnnhaq/AppKit.h -c macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m -o macvim/src/MacVim/PSMTabBarControl/../build/PSMTabBarControl_legacy.build/Release/PSMTabBarControlFramework.build/Objects-normal/ppc/PSMUnifiedTabStyle.o
macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m: In function ‘-[PSMUnifiedTabStyle drawInteriorWithTabCell:inView:]’:
macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m:393: warning: ‘NSImage’ may not respond to ‘-drawInRect:fromRect:operation:fraction:respectFlipped:hints:’
macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m:393: warning: (Messages without a matching method signature
macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m:393: warning: will be assumed to return ‘id’ and accept
macvim/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m:393: warning: ‘...’ as arguments.)

Obviously, -drawInRect:fromRect:operation:fraction:respectFlipped:hints is all guarded by
  #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6

And the compiler doesn't complain about the definition itself, thus those definition are defined and the values of the definition might be wrong. Could you investigate it and send a pull request? you are the (only) person who can do it.

See #72: Just as MAC_OSX_VERSION_10_5 is not defined in Tiger's AvailabilityMacros, neither is MAC_OSX_VERSION_10_10.
#73 fixes it by checking for defined(MAC_OSX_...).
I'm going to try a parallel fix here.  If it works, then we'll probably need to come up with some macro or wrapper, because there are MAC_OSX_VERSION-something-higher-than10.4's all over the place.

It did work: #148
There are lots of other places where a similar adjustment could be made, and I think it would eliminate some warnings on Tiger that up to now I've thought were harmless.
Should I really add defined(MAC_OS_X_VERSION_FOO) all over the place, or is there a way to define in one of our own headers every MAC_OS_X_VERSION all the way up through 10.11?

Please don't close these until everything has been tested :)
Anyway, VERSION_INFO_STRING is still "78", so this should remain open until I can figure that out.

OK, PSMTab bar now works on Tiger.
VERSION_INFO_STRING no longer has the "78", but it ends in a hyphen: MacVim_legacy-.  Probably doesn't matter, but will look weird if it ends up being shown in "GetInfo" from Finder.


JSON Data Streaming not working

Hi
My movies variable has 200 items in it.
I need to be able to dynamically update this with new items (from the CMS), I have a file in the root called data.json, that I'm trying to load instead of using movies.js.
Inside my data.json I have...
 var movies = [
  {
    "id": 1,
    "name": "I am a title",
    "rating": "★★★★",
    "year": 2017
 ...

I've tried the following, but it doesn't seem to work. Streaming stays at 0% and no results load.
  var FJS = FilterJS(movies, '#movies', {
    template: '#movie-template',
    search: { ele: '#searchbox' },
    callbacks: {
      afterFilter: afterFilter
    },
    streaming: {
      data_url: '/data.json',
      stream_after: 0,
      batch_size: 50
    },
    pagination: {
      container: '#pagination',
      visiblePages: 5,
      perPage: {
        values: [12, 15, 18],
        container: '#per_page'
      },
    }
  });

  FJS.addCallback('afterAddRecords', function(){
    var percent = (this.recordsCount - 250)*100/250;

    $('#stream_progress').text(percent + '%').attr('style', 'width: '+ percent +'%;');

    if (percent == 100){
      $('#stream_progress').parent().fadeOut(1000);
    }
  });

I've also tried just using the following. But this doesn't work either.
  var FJS = FilterJS(movies, '#movies', {
    template: '#movie-template',
    search: { ele: '#searchbox' },
    callbacks: {
      afterFilter: afterFilter
    },
    pagination: {
      container: '#pagination',
      visiblePages: 5,
      perPage: {
        values: [12, 15, 18],
        container: '#per_page'
      },
    }
  });

 FJS.setStreaming({
  data_url: '/data.json',
  stream_after: 1,
  batch_size: 450
 });

  FJS.addCallback('afterAddRecords', function(){
    var percent = (this.recordsCount - 250)*100/250;

    $('#stream_progress').text(percent + '%').attr('style', 'width: '+ percent +'%;');

    if (percent == 100){
      $('#stream_progress').parent().fadeOut(1000);
    }
  });

If I add the json data into the HTML like this it works, but it's still not loading the data.json as streaming is at 0%, and the page obviously takes a lifetime to load.
I know I could add this into a movies.js file but then I can't add new movies dynamically using the CMS.
<script>
 var movies = [
  {
    "id": 1,
    "name": "I am a title",
    "rating": "★★★★",
    "year": 2017
 ...

I've also tried reverting to the example pagination.js file, but the same problem occurs. Could it be something to do with loading the json from my local MAMP setup?
I've tried using an explicit URL e.g. http://example.dev/data.json?
(I deliberately tried adding an incorrect url in e.g. http://example.dev/blah.json, I get an error in the console. So it seems like it is detecting the json file.)

Can you share a html, js or Site?


Fix package definitions for Connect

Fixes #544
This fixes the workaround for bundlers/module loaders that do not support subpath exports by changing the Connect package to be a CJS module and updating the workaround to use CJS.
Previously, for bundlers/module loaders that did not support subpath exports, they would fallback to our workarounds, which were using ESM. However, for any client using CJS, this was leading to the dual package hazard where the client loaded an entrypoint of CJS for Connect-Web and the fallback to ESM for Connect caused both CJS and ESM to run together. This led to issues where the instanceof ConnectError calls were returning false, which in turn caused Connect to wrap Connect errors in another Connect error, which was very confusing to users.
Note that we are now adding a dummy package.json to the connect/dist/esm directory with a type of module so that consumers can import from that directory as ESM modules. However, adding this file caused our bundle to inflate. This is because esbuild checks for a sideEffects map in the nearest enclosing directory with a package.json file (source). Our root directory already had this present, but once we started adding this new package.json, it's lack of a sideEffects map overrode the root file, which caused additional files to be added to the bundle. So, the code was updated to add this dummy package.json with an additional sideEffects: false property.
Tested on all projects in connect-es-integration to verify it works appropriately for different bundlers and different module systems.

@timostamm I believe the bundle issue is fixed. I added a summary in the PR description.

Looks like a reasonable solution to me 👍
Do we have confidence that this still fixes #544? IIRC we switched protocol.js to CommonJS late in the game, which might change behaviour.

Yep, I tested this with a few different bundlers in connect-es-integration (Parcel, Webpack4, etc.)


Access Annotated info in custom field type.

Initial Checks

[X] I have searched Google & GitHub for similar requests and couldn't find anything
[X] I have read and followed the docs and still think this feature is missing

Description
Hi,
I am very excited to see that V2 is out. I am playing with the custom field types in v2 and found that there no hook to allow the custom field type to access the annotations of the field:
import dataclasses
from typing import Annotated, Any

from pydantic import BaseModel, ConfigDict, Field
from pydantic_core import core_schema

@dataclasses.dataclass
class MyClass:
    a: str
    b: bool = True

    def __str__(self):
        return f"{self.a}({self.b})"

class MyClassField(MyClass):
    """A pydantic field type for `MyClass`."""

    @classmethod
    def __pydantic_modify_json_schema__(
        cls,
        field_schema: dict[str, Any],
    ) -> dict[str, Any]:
        field_schema.update(
            {
                "type": "string",
            },
        )
        return field_schema

    @classmethod
    def __get_pydantic_core_schema__(
        cls,
        **_kwargs,
    ) -> core_schema.PlainValidatorFunctionSchema:
        return core_schema.field_plain_validator_function(
            cls.validate,
            serialization=core_schema.to_string_ser_schema(),
        )

    @classmethod
    def validate(cls, value, _info) -> MyClass:
        if not isinstance(value, (str, MyClass)):
            raise ValueError()
        if isinstance(value, str):
            # how to retrieve the annotated constraints so that I can
            # set a different default here?
            # con = get_constraints_from_annotation(cls)
            # return MyClass(value, b=con.b)
            return MyClass(value)  # this always have b=True
        return value

@dataclasses.dataclass
class MyClassConstraint:
    """Additional hint to create `MyClass`."""

    b: bool

MyClassWithBTrue = Annotated[MyClassField, MyClassConstraint(b=True)]
MyClassWithBFalse = Annotated[MyClassField, MyClassConstraint(b=False)]

class SimpleModel(BaseModel):
    model_config = ConfigDict(validate_default=True)

    m_true: MyClassWithBTrue = Field(default="a")
    m_false: MyClassWithBFalse = Field(default="a")

def test_custom_field_constraints():
    m = SimpleModel.model_validate({})

    print(m)
    assert m.m_true.a == "a"
    assert m.m_true.b

    assert m.m_false.a == "a"
    assert not m.m_false.b  # this fails.

The same feature I can see are available for those built-in types, e.g, those different variations of Url defined in networks.py` (https://github.com/pydantic/pydantic/blob/5e92b9bfac0018874d6e74f44b98715c85c88347/pydantic/networks.py#L46). So maybe this feature already exists?
version: 2.0a2
Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[ ] Data serialization - .model_dump() and .model_dump_json()
[ ] JSON Schema
[ ] Dataclasses
[ ] Model Config
[X] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[ ] Other Model behaviour - model_construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

How does this sound for your use case:
import dataclasses
from typing import Annotated, Any

from pydantic_core import core_schema

from pydantic import BaseModel

@dataclasses.dataclass
class MyClass:
    a: str
    b: bool = True

    def __str__(self):
        return f'{self.a}({self.b})'

    @classmethod
    def __pydantic_modify_json_schema__(
        cls,
        field_schema: dict[str, Any],
    ) -> dict[str, Any]:
        return core_schema.str_schema()

@dataclasses.dataclass
class MyClassConstraint:
    """Additional hint to create `MyClass`."""
    b: bool

    def __get_pydantic_core_schema__(
        self,
        schema: core_schema.CoreSchema,
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_before_validator_function(
            lambda x: self.validate(x),
            schema=schema,
        )

    def validate(self, value: Any) -> MyClass:
        if not isinstance(value, (str, MyClass)):
            raise ValueError
        if isinstance(value, str):
            return MyClass(value, b=self.b)
        return value

MyClassWithBTrue = Annotated[MyClass, MyClassConstraint(b=True)]
MyClassWithBFalse = Annotated[MyClass, MyClassConstraint(b=False)]

class SimpleModel(BaseModel):
    m_true: MyClassWithBTrue
    m_false: MyClassWithBFalse

def test_custom_field_constraints():
    m = SimpleModel.model_validate({'m_true': 'a', 'm_false': 'b'})

    print(m)
    assert m.m_true.a == 'a'
    assert m.m_true.b

    assert m.m_false.a == 'b'
    assert not m.m_false.b  # this fails.

test_custom_field_constraints()

I removed the defaults stuff, I think it should still work with that but I wanted to simplify the problem a bit.

Thanks a lot for look into this. I believe my example was over simplified, in a sense that MyClass is a dataclass which pydantic natively supports out of box. Here is a fully customized MyClass2  class and my attempt to achieve the same thing:
import dataclasses
import json
from typing import Annotated, Any

from pydantic import BaseModel, ConfigDict, ValidationInfo
from pydantic_core import core_schema

class MyClass2:
    """A class from external lib that I cannot modify."""

    a: str
    b: bool

    def __init__(self, a, b=True):
        self.a = a
        self.b = b

    def __str__(self):
        return f"{self.a}({self.b})"

class MyClass2Field(MyClass2):
    """This is needed to accept str data and convert it to MyClass2 instance.

    This gives error on JSON serialization when doing model_dump, how to make it JSON serialzable?
    """

    @classmethod
    def __pydantic_modify_json_schema__(
        cls,
        field_schema: dict[str, Any],
    ) -> dict[str, Any]:
        return core_schema.str_schema()

    @classmethod
    def __get_pydantic_core_schema__(cls, **kwargs) -> core_schema.CoreSchema:
        return core_schema.no_info_plain_validator_function(
            # here during validation we convert str to cls.
            # here how to know what to specify the b when constructing cls??
            lambda x: x if isinstance(x, cls) else cls(x),
            serialization=core_schema.to_string_ser_schema(),
        )

@dataclasses.dataclass
class MyClass2FieldConstraint:
    """Additional hint to create `MyClass2`.

    Note that we use this to annotate both MyClass2 and MyClass2Field.
    In procipal we may want to use the same logic for
    validating very different classes, do we have a hook to
    to access the actual class type?
    """

    b: bool

    def __get_pydantic_core_schema__(
        self,
        schema: core_schema.CoreSchema,
    ) -> core_schema.CoreSchema:
        return core_schema.field_before_validator_function(
            lambda x, f: self.validate(x, f),
            schema=schema,
        )

    def validate(self, value: Any, info: ValidationInfo):
        # not sure if we check MyClass2 or MyClass2Field.
        # if would be nice if the field type is inccluded in the info dict.
        if not isinstance(value, (str, MyClass2, MyClass2Field)):
            raise ValueError
        if isinstance(value, str):
            # again, if we have access to the actual field type this containt is
            # applying to, we can make it work in a more generic sense.
            return MyClass2Field(value, b=self.b)
        return value

MyClass2WithBTrue = Annotated[MyClass2, MyClass2FieldConstraint(b=True)]
MyClass2WithBFalse = Annotated[MyClass2, MyClass2FieldConstraint(b=False)]

MyClass2FieldWithBTrue = Annotated[MyClass2Field, MyClass2FieldConstraint(b=True)]
MyClass2FieldWithBFalse = Annotated[MyClass2Field, MyClass2FieldConstraint(b=False)]

class SimpleModel(BaseModel):
    model_config = ConfigDict(arbitrary_types_allowed=True)

    # these fields does not accept string value because those
    # require MyClass2 instances.
    m2_true: MyClass2WithBTrue
    m2_false: MyClass2WithBFalse

    # these fields works, but cannot get serialized.
    m2f_true: MyClass2FieldWithBTrue
    m2f_false: MyClass2FieldWithBFalse

def test_custom_field_constraints():
    m = SimpleModel.model_validate(
        {
            "m2_true": "a2",
            "m2_false": "b2",
            "m2f_true": "a2f",
            "m2f_false": "b2f",
        }
    )
    print(m)

    print(json.dumps(m.model_dump(), indent=2))
    # print(json.dumps(m.model_json_schema(), indent=2))
    assert m.m2_true.a == "a2"
    assert m.m2_true.b

    assert m.m2_false.a == "b2"
    assert not m.m2_false.b  # this fails.

    assert m.m2f_true.a == "a2f"
    assert m.m2f_true.b

    assert m.m2f_false.a == "b2f"
    assert not m.m2f_false.b  # this fails.

test_custom_field_constraints()

There are a couple new things with MyClass2

I need to introduce MyClass2Field class to make it work with the BaseModel when I want to specify a string in the input data. Using MyClass2 directly like field m2_true does not work when the input data is string.

The code does not run because MyClass2Field cannot be serialized. After digging around I found the serialization calls to to_jsonable_python in pydantic_core? What do I need to do to allow MyClass2Field get serialized using the __str__ method, or more generally a custom method?

Most importantly, the main problem is still that I don't have access to the constraint class info in the MyClass2Field validate function, which is needed to construct MyClass2 instance with b=False when requested. Note that chaining the validation, i.e., construct MyClass2Field(b=True) in MyClass2Field validator and then update the instance when it gets validated in MyClass2FieldConstraint is not an acceptable solution, because in my actual working class, b=True/False may be used to decide what to do with value a in constructing MyClass2).

The last point is slightly off topic, but related: the Constraint class maybe generic and it would be great if it can be attached to different field types. This requires accessing the actual field class in the constraint class validate method. I checked the ValidationInfo object and found it is not included.

Let me know if this makes sense and if you need more info!

It sounds like what was missing from my example above is serialization. How about this?
import dataclasses
import json
from typing import Annotated, Any

from pydantic_core import core_schema

from pydantic import BaseModel

@dataclasses.dataclass
class MyClass:
    """A class from external lib that I cannot modify."""

    a: str
    b: bool = True

    def __str__(self):
        return f'{self.a}({self.b})'

@dataclasses.dataclass
class MyClassConstraint:
    """Additional hint to create `MyClass`."""
    b: bool

    @classmethod
    def __pydantic_modify_json_schema__(
        cls,
        _schema: dict[str, Any],
    ) -> dict[str, Any]:
        return core_schema.str_schema()

    def __get_pydantic_core_schema__(
        self,
        schema: core_schema.CoreSchema,
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_before_validator_function(
            lambda x: self.validate(x),
            schema=schema,
            serialization=core_schema.plain_serializer_function_ser_schema(self.serialize, info_arg=False)
        )

    def validate(self, value: Any) -> MyClass:
        if not isinstance(value, (str, MyClass)):
            raise ValueError
        if isinstance(value, str):
            return MyClass(value, b=self.b)
        return value

    def serialize(self, value: MyClass) -> str:
        return str(value)

MyClassWithBTrue = Annotated[MyClass, MyClassConstraint(b=True)]
MyClassWithBFalse = Annotated[MyClass, MyClassConstraint(b=False)]

class SimpleModel(BaseModel):
    m2f_true: MyClassWithBTrue
    m2f_false: MyClassWithBFalse

def test_custom_field_constraints():
    m = SimpleModel.model_validate(
        {
            'm2f_true': 'a2f',
            'm2f_false': 'b2f',
        }
    )
    print(m)

    print(json.dumps(m.model_dump(mode='json'), indent=2))
    print(json.dumps(m.model_json_schema(), indent=2))

    assert m.m2f_true.a == 'a2f'
    assert m.m2f_true.b

    assert m.m2f_false.a == 'b2f'
    assert not m.m2f_false.b

test_custom_field_constraints()

The last point is slightly off topic, but related: the Constraint class maybe generic and it would be great if it can be attached to different field types. This requires accessing the actual field class in the constraint class validate method. I checked the ValidationInfo object and found it is not included.

That is not currently possible. If MyClass is generic then the thing in a type annotation like foo: MyClass[int] isn't even if MyClass, it's a typing.GenericAlias. We could pass this into MyClassConstraint.__get_pydantic_core_schema__ but you'd still have to do a lot of work to get the generic arguments, etc.

@adriangb Thanks a lot for pointing out the serialization argument, which I was not clear what it does. I looked in the core schema module and found core_schema.to_string_ser_schema(), which I thought will do the __str__ based seriliazation automatically. I didn't know about the plain_serializer_function.
It appears that I still need to have the intermiediate MyClassField class to make it work when the external lib class MyClass (should have named it ThirdPartyClass) is not a dataclasss (or in general not a class that pydantic-core understands).  In this case, because there is no way to access the annotation class info in the definition of MyClassField, I have to use a no-op schema in the class to defer any validation to the constraint class. This adaptor class should not be used on its own and I marked it a private _MyClassField.
I also added some corner cases related to handling of validate_default=Trueand the tri-state of b. Most of the parts works, except for one warning emitted when I pass a MyClass object (or the annotated types like MyClassWithBTrue) as default.
This warning is due to the fact that none of MyClass or the annotated classes like MyClassWithBTrue can be json serialized:
/home/ma/.pyenv/versions/tolteca_v2/lib/python3.10/site-packages/pydantic/json_schema.py:1099: PydanticJsonSchemaWarning: Default value d(False) is not JSON serializable; excluding default from JSON schema [non-serializable-default]
  warnings.warn(message, PydanticJsonSchemaWarning)

I wonder if there is a way to get around this issue.
Here is the code I am using to test:
import dataclasses
import json
from enum import Enum
from typing import Annotated, Any, TypedDict

from pydantic import BaseModel, ConfigDict, Field
from pydantic_core import core_schema

class MyClass:
    """A class from external lib that I cannot modify."""

    a: str
    b: bool = True

    def __init__(self, a, b=True):
        self.a = a
        self.b = b

    def __str__(self):
        return f"{self.a}({self.b})"

@dataclasses.dataclass
class MyClassConstraint:
    """Additional hint to create `MyClass`."""

    class _MissingType(Enum):
        missing = "missing"

    b: _MissingType | bool = _MissingType.missing

    def __pydantic_modify_json_schema__(
        self,
        schema: dict[str, Any],
    ) -> dict[str, Any]:
        if not isinstance(self.b, self._MissingType):
            schema.update({"format": f"b={self.b}"})
        return schema

    def __get_pydantic_core_schema__(
        self,
        schema: core_schema.CoreSchema,
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_before_validator_function(
            lambda x: self.validate(x),
            schema=schema,
            serialization=core_schema.plain_serializer_function_ser_schema(
                self.serialize, info_arg=False
            ),
        )

    def validate(self, value: Any) -> MyClass:
        if not isinstance(value, (str, MyClass)):
            raise ValueError
        if isinstance(value, str):
            if isinstance(self.b, self._MissingType):
                # default
                return MyClass(value)
            return MyClass(value, b=self.b)
        if isinstance(value, MyClass):
            if value.b != self.b:
                raise ValueError(f"invalid data, b is required to be {self.b}")
        return value

    def serialize(self, value: MyClass) -> str:
        return str(value)

class _MyClassField(MyClass):
    """This a thin wrapper around MyClass to make it
    a pydantic field.

    Because we don't have access to contextual information in this class,
    we'll need to implement a no-op in this schema to pass the data
    over to any constriants class to finish the validation.

    This class should never be used without the accompanying constraint
    class.
    """

    @classmethod
    def __pydantic_modify_json_schema__(
        cls,
        _schema: TypedDict,
    ) -> TypedDict:
        return core_schema.str_schema()

    @classmethod
    def __get_pydantic_core_schema__(cls, **_kwargs) -> core_schema.CoreSchema:
        # we have to do an no-op validation.
        # Do we have a native way in pydantic_core doing this?
        # e.g., core_schema.no_op_schema()
        return core_schema.no_info_plain_validator_function(lambda x: x)

# this is the default case
MyClassDefault = Annotated[_MyClassField, MyClassConstraint()]

# this is explicit requiring b value
MyClassWithBTrue = Annotated[_MyClassField, MyClassConstraint(b=True)]
MyClassWithBFalse = Annotated[_MyClassField, MyClassConstraint(b=False)]

class SimpleModel(BaseModel):
    model_config = ConfigDict(strict=True, validate_default=True)
    m2f_default: MyClassDefault
    m2f_true: MyClassWithBTrue
    m2f_false: MyClassWithBFalse
    c_false: MyClassWithBFalse = Field(default="c")

    # this results in validation error because the value has b=true but
    # constraints requires it to be false.
    # d_false: MyClassWithBFalse = Field(default=MyClass(a="d"))

    # this works
    # however, the default value is of type MyClass, which cannot be
    # serailzied and emits a warning.
    # replacin `MyClass` to `MyClassWithBFalse` does not make the warning
    # go away
    d_false: MyClassWithBFalse = Field(default=MyClass(a="d", b=False))

def test_custom_field_constraints():
    m = SimpleModel.model_validate(
        {
            "m2f_default": "n2f",
            "m2f_true": MyClass("a2f"),
            "m2f_false": "b2f",
        }
    )
    print(m)

    print(json.dumps(m.model_dump(mode="json"), indent=2))
    print(json.dumps(m.model_json_schema(), indent=2))

    assert m.m2f_default.a == "n2f"
    assert m.m2f_default.b  # by default b is True

    assert m.m2f_true.a == "a2f"
    assert m.m2f_true.b

    assert m.m2f_false.a == "b2f"
    assert not m.m2f_false.b

    assert m.c_false.a == "c"
    assert not m.c_false.b

    assert m.d_false.a == "d"
    assert not m.d_false.b

test_custom_field_constraints()

Hey sorry it took a while to get back to you. I've gotten a bit lost in the conversation, but in the meantime, we've re-written these hooks to be much more powerful 💪🏻 .  I tried to translate your example, please let me know how it looks for your real-world use case:
import dataclasses
import json
from typing import Annotated, Any, Callable

from pydantic_core import CoreSchema, core_schema

from pydantic import BaseModel, ConfigDict, Field
from pydantic.json_schema import GetJsonSchemaHandler, JsonSchemaValue

@dataclasses.dataclass
class MyClass:
    """A class from external lib that I cannot modify."""
    a: str
    b: bool = True

@dataclasses.dataclass
class MyClassConstraint:
    """Additional hint to create `MyClass`."""

    _unset: Any = object()

    b: bool = _unset

    def __pydantic_modify_json_schema__(
        self,
        core_schema: CoreSchema,
        handler: GetJsonSchemaHandler,
    ) -> JsonSchemaValue:
        json_schema = handler(core_schema)
        if self.b is not self._unset:
            json_schema.update({'format': f'b={self.b}'})
        return json_schema

    def __get_pydantic_core_schema__(
        self,
        source_type: Any,
        handler: Callable[[Any], core_schema.CoreSchema]
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_before_validator_function(
            lambda x: self.validate(x),
            schema=handler(source_type),
            serialization=core_schema.plain_serializer_function_ser_schema(
                self.serialize, info_arg=False
            ),
        )

    def validate(self, value: Any) -> MyClass:
        if not isinstance(value, (str, MyClass)):
            raise ValueError
        if isinstance(value, str):
            if self.b is self._unset:
                # default
                return MyClass(value)
            return MyClass(value, b=self.b)
        else:
            if value.b != self.b:
                raise ValueError(f'invalid data, b is required to be {self.b}')
        return value

    def serialize(self, value: MyClass) -> str:
        return str(value)

# this is the default case
MyClassDefault = Annotated[MyClass, MyClassConstraint()]

# this is explicit requiring b value
MyClassWithBTrue = Annotated[MyClass, MyClassConstraint(b=True)]
MyClassWithBFalse = Annotated[MyClass, MyClassConstraint(b=False)]

class SimpleModel(BaseModel):
    model_config = ConfigDict(strict=True, validate_default=True)
    m2f_default: MyClassDefault
    m2f_true: MyClassWithBTrue
    m2f_false: MyClassWithBFalse
    c_false: MyClassWithBFalse = Field(default='c')

    # this results in validation error because the value has b=true but
    # constraints requires it to be false.
    # d_false: MyClassWithBFalse = Field(default=MyClass(a="d"))

    # this works
    # however, the default value is of type MyClass, which cannot be
    # serailzied and emits a warning.
    # replacin `MyClass` to `MyClassWithBFalse` does not make the warning
    # go away
    d_false: MyClassWithBFalse = Field(default=MyClass(a='d', b=False))

def test_custom_field_constraints():
    m = SimpleModel.model_validate(
        {
            'm2f_default': 'n2f',
            'm2f_true': MyClass('a2f'),
            'm2f_false': 'b2f',
        }
    )
    print(m)

    print(json.dumps(m.model_dump(mode='json'), indent=2))
    print(json.dumps(m.model_json_schema(), indent=2))

    assert m.m2f_default.a == 'n2f'
    assert m.m2f_default.b  # by default b is True

    assert m.m2f_true.a == 'a2f'
    assert m.m2f_true.b

    assert m.m2f_false.a == 'b2f'
    assert not m.m2f_false.b

    assert m.c_false.a == 'c'
    assert not m.c_false.b

    assert m.d_false.a == 'd'
    assert not m.d_false.b

test_custom_field_constraints()

@adriangb
Thanks a lot for working on this. I really like this "handler" API, it makes it really easy to create utility classes like the one you showed in the document AllowAnySubclass that can impose any constraints to any custom class.
I guess my main problem is solved at this point.
Maybe there is only one item left, that is when setting a custom type as default values, the json serializer emits a warning because it does not know how to serialize the default value. Is there any workaround to this?

Can you give an example of that?

@adriangb
Sorry for the long delay on this. Here is a minimum working example showing the warning when generating json schema:
import json
from typing import Annotated, Any

import pydantic
import pydantic_core
from pydantic import BaseModel, ConfigDict, Field
from pydantic.annotated import GetCoreSchemaHandler
from pydantic.json_schema import GetJsonSchemaHandler, JsonSchemaValue
from pydantic_core import CoreSchema, core_schema

print(f"pydantic version: {pydantic.__version__}")
print(f"pydantic_core version: {pydantic_core.__version__}")

class MyClass:
    def __init__(self, value):
        self.value = value

    def __str__(self):
        return f"{self.__class__.__name__}({self.value})"

class MyClassValidator:
    def __get_pydantic_json_schema__(
        self,
        core_schema: CoreSchema,
        handler: GetJsonSchemaHandler,
    ) -> JsonSchemaValue:
        return handler(core_schema)

    def __get_pydantic_core_schema__(
        self,
        source: type[Any],
        handler: GetCoreSchemaHandler,
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_plain_validator_function(
            lambda x: x if isinstance(x, MyClass) else MyClass(x),
            serialization=core_schema.plain_serializer_function_ser_schema(
                self.serialize, info_arg=False
            ),
        )

    def serialize(self, value: MyClass) -> str:
        return str(value)

class SimpleModel(BaseModel):
    model_config = ConfigDict(strict=True, validate_default=True)
    a: Annotated[MyClass, MyClassValidator()] = Field(default="a")
    b: Annotated[MyClass, MyClassValidator()] = Field(default=MyClass("b"))

def test():
    m = SimpleModel.model_validate({})
    print(f"model repr: {m}")
    print("model dump:")
    print(json.dumps(m.model_dump(mode="json"), indent=2))
    print("model schema dump:")
    print(json.dumps(m.model_json_schema(), indent=2))

test()

The output:
pydantic version: 2.0a4
pydantic_core version: 0.31.0
model repr: a=<__main__.MyClass object at 0x7fc8cd8d7550> b=<__main__.MyClass object at 0x7fc8ce1a1b40>
model dump:
{
  "a": "MyClass(a)",
  "b": "MyClass(b)"
}
model schema dump:
/home/ma/.pyenv/versions/tolteca_v2/lib/python3.10/site-packages/pydantic/json_schema.py:1223: PydanticJsonSchemaWarning: Default value MyClass(b) is not JSON serializable; excluding default from JSON schema [non-serializable-default]
  warnings.warn(message, PydanticJsonSchemaWarning)
{
  "type": "object",
  "properties": {
    "a": {
      "default": "a",
      "title": "A"
    },
    "b": {
      "title": "B"
    }
  },
  "title": "SimpleModel"
}

@Jerry-Ma one solution is to override the pydantic.json_schema.GenerateJsonSchema class and customize the behavior. You can either disable this warning by setting ignored_warning_kinds = {'skipped-choice', 'non-serializable-default'} in your subclass, or could provide an actual default by overriding pydantic.json_schema.GenerateJsonSchema.encode_default.
If you have a custom class, say MyGenerateJsonSchema, you'll just pass that when generating the schema via: m.model_json_schema(schema_generator=MyGenerateJsonSchema)

@Jerry-Ma I'm not quite following how the duplication of the serialization code is necessary. What you are saying makes sense in the abstract to me, but could you share the code you are using and expand a bit on "This can be avoided if there is a way to detect that this default value is assigned to the field of type Annotated[MyClass, MyClassValidator], which pydantic knows how to serialize."?
Happy to continue trying to help/improve things just need a bit more help understanding the problem

import json
from typing import Annotated, Any

import pydantic
import pydantic_core
from pydantic import BaseModel, ConfigDict, Field
from pydantic.annotated import GetCoreSchemaHandler
from pydantic.json_schema import (
    GenerateJsonSchema,
    GetJsonSchemaHandler,
    JsonSchemaValue,
)
from pydantic_core import CoreSchema, core_schema

print(f"pydantic version: {pydantic.__version__}")
print(f"pydantic_core version: {pydantic_core.__version__}")

class MyClass:
    def __init__(self, value):
        self.value = value

    def __str__(self):
        return f"{self.__class__.__name__}({self.value})"

class MyClassValidator:
    def __get_pydantic_json_schema__(
        self,
        core_schema: CoreSchema,
        handler: GetJsonSchemaHandler,
    ) -> JsonSchemaValue:
        return handler(core_schema)

    def __get_pydantic_core_schema__(
        self,
        source: type[Any],
        handler: GetCoreSchemaHandler,
    ) -> core_schema.CoreSchema:
        return core_schema.no_info_plain_validator_function(
            lambda x: x if isinstance(x, MyClass) else MyClass(x),
            serialization=core_schema.plain_serializer_function_ser_schema(
                self.serialize, info_arg=False
            ),
        )

    def serialize(self, value: MyClass) -> str:
        return str(value)

class MyGenerateJsonSchema(GenerateJsonSchema):
    def encode_default(self, dft: Any) -> Any:
        # this could be a built-in feature of pydantic, where
        # it detects the pydantic field that this `dft` value is
        # relevant to, and inovke the correct seraializer code.
        if isinstance(dft, MyClass):
            dft = MyClassValidator().serialize(dft)
        return super().encode_default(dft)

class MyBaseModel(BaseModel):
    model_config = ConfigDict(strict=True, validate_default=True)

    @classmethod
    def model_json_schema(cls, *args, **kwargs):
        """Dump model json schema."""
        kwargs.setdefault("schema_generator", MyGenerateJsonSchema)
        return super().model_json_schema(*args, **kwargs)

class SimpleModel(MyBaseModel):
    a: Annotated[MyClass, MyClassValidator()] = Field(default="a")
    b: Annotated[MyClass, MyClassValidator()] = Field(default=MyClass("b"))

def test():
    m = SimpleModel.model_validate({})
    print(f"model repr: {m}")
    print("model dump:")
    print(json.dumps(m.model_dump(mode="json"), indent=2))
    print("model schema dump:")
    print(json.dumps(m.model_json_schema(), indent=2))

test()

Here is the code I used to work around the problem.
The point is that the default implementation of encode_default can be made such that it knows about the fact that dft is associated with the field type, thus can directly use the field type's serialization method, rather than the user explicitly invoke it (which is a repeating).

Okay so if I'm understanding correctly, the point is, we should basically try to serialize the default the way we would for the pydantic field if we can. I suspect there may be a way to do this in GenerateJsonSchema, let me look into it.

@Jerry-Ma I'm thinking we could do something like this:
diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py
index 0b3a533c..f3f0d47b 100644
--- a/pydantic/json_schema.py
+++ b/pydantic/json_schema.py
@@ -24,7 +24,7 @@ from typing import (
 )

 import pydantic_core
-from pydantic_core import CoreSchema, PydanticOmit, core_schema
+from pydantic_core import CoreSchema, PydanticOmit, SchemaSerializer, SchemaValidator, core_schema
 from pydantic_core.core_schema import ComputedField
 from typing_extensions import Literal, assert_never

@@ -750,7 +750,7 @@ class GenerateJsonSchema:
             raise ValueError('`schema` has neither default nor default_factory')

         try:
-            encoded_default = self.encode_default(default)
+            encoded_default = self.encode_default(default, schema)
         except pydantic_core.PydanticSerializationError:
             self.emit_warning(
                 'non-serializable-default',
@@ -1443,8 +1443,13 @@ class GenerateJsonSchema:
     def get_schema_from_definitions(self, json_ref: JsonRef) -> JsonSchemaValue | None:
         return self.definitions.get(self.json_to_defs_refs[json_ref])

-    def encode_default(self, dft: Any) -> Any:
-        return pydantic_core.to_jsonable_python(dft)
+    def encode_default(self, dft: Any, schema: core_schema.CoreSchema | None = None) -> Any:
+        if schema is None:
+            return pydantic_core.to_jsonable_python(dft)
+
+        dft = SchemaValidator(schema).validate_python(dft)
+        result = SchemaSerializer(schema).to_python(dft)
+        return result

     def update_with_validations(
         self, json_schema: JsonSchemaValue, core_schema: CoreSchema, mapping: dict[str, str]

This causes a bunch of test failures now, but it's not clear to me how many of those failures are meaningful (probably at least some are) vs. tests that were essentially documenting behavior now breaking.
Does that approach make sense to you? It's something you could try in a custom subclass of GenerateJsonSchema. Either way, we could definitely make pydantic.json_schema.GenerateJsonSchema.encode_default accept an optional schema argument, even if by default we don't use it and expect you would have already loaded the default value.
The more I think about it, the more I think it at least makes sense to use the SchemaSerializer(schema).to_python(dft) thing to ensure the output value matches the schema. We could maybe call the dft = SchemaValidator(schema).validate_python(dft)) depending on whether validate_default is true?

@dmontagu Yes this is exactly what I was looking for.
I am not sure about the best way to integrate this but I guess it makes sense that these extra treatments are done when validate_default config is set.

@Jerry-Ma would you be interested in submitting a PR for this serialization issue? If not, feel free to create a new issue for this specifically (you can reference my comment above with the proposed diff).


Feature token discovery api

Changes:

Updated UMD Output from token-negotiator-alpha-dist to token-negotiator-dist & ReadMe
Removed onChainModule and related unit tests
Added token/nftProvider to Token Discovery API
Unit tests added for two methods to connect with Token Discovery API
Adjusted { client } module to consume the nftProvider instead of onChainModule

Added silent http error option, to allow the TN to load when collection items are not found (e.g. 500 from API).

@nicktaras I was wondering if we should be removing the other token sources completely. This change means the system relies solely on the uptime of the discovery API and there is no fallback. Maybe we should keep at least one fallback?

@nicktaras I was wondering if we should be removing the other token sources completely. This change means the system relies solely on the uptime of the discovery API and there is no fallback. Maybe we should keep at least one fallback?

Thanks good point to raise, I've reached out to Hu to better understand the stability of the API. Let's wait for his response and decide from there.

Update to status, reached out to Hu and Miccy to confirm for this current PR we can progress with the full migration to Token Discovery - moving this into staging for test / also include some stability testing before we migrate.


synset pos parameter

added pos parameter to .synsets(...) method so user can filter wordnet.synsets(...) directly

Hi @frascuchon
Any word on when this will be accepted/rejected?

Great work @it176131 !!!
Just a few code-style suggestions. Once they are resolve, we can merge the PR
Thanks!

Fixed! Thanks for the suggestions 🙂

Sorry @it176131
I've merged some older work. Could you resolve conflicts in your PR?

Resolved!

@frascuchon I've updated the docstring and added a couple assertion checks in the the unit test (one for when pos arg is a list of values and one for when the arg is None).
Waiting for your review

@frascuchon I'm going to update the docstring to reflect the recent changes and add an edge case to the unit test.


[Epic]: Airtable and Twilio Stability

Objective
This epic is meant to capture the services in scope for the next phase of SaaS integrations. It also includes efforts to fix issues with older integrations.
Success Metrics

Goal
Metric

Productionize 1 integrations

Reduce friction with older integrations

Requirements

Requirement
User Story

Must implement Twilio APIs
as a user, I want to be able to access Twilio APIs easily on Appsmith

Must fix Airtable issues
as a user, I want to be able to use all aspects of Airtable APIs

Must fix Twilio issues
as a user, I want to be able to use all aspects of Twilio APIs

Documentation
No response
Out of Scope

All other SaaS Integrations (Hubspot, Hugging Face, Zenhub, etc).

Developer Handoff Document in Figma
No response
RACI matrix

Role
Assignees

Responsible
@felixsuarez0727

Accountable
@felixsuarez0727

Consulted
@rohan-arthur , @kocharrahul7

Informed
@ajinkyakulkarni , @Nikhil-Nandagopal

not our focus for the foreseeable future, will get around to this at a later time.


Remove retry on 500 errors in the default config

Remove retry on 500 errors in the default config.
Google Cloud documentation has been updated to not consider 500 as a retryable error code. Update Admin SDK to align with that

Hi @chong-shao. This should be drafted against the dev branch, since we don't directly merge to master in this repo. Can you see if you can edit the PR, and change the base branch to dev?

Changed this pull request to merge to dev


script error line 49 char 221 failed to load external resource office

Hello everyone,
I tried to open my account on outlook 2016 and office 365, the following image appears to me and can't login through the web mail on my PC (outlook.office.com) or ( www.office.com) it's appear a blank page

anyone have solve for that problem

Thank you for the feedback! Because this is not related to docs.microsoft.com, we cannot address it in this forum. We recommend reaching out to the appropriate product support channel for faster resolution.


Add derive debug for public types

@sfackler Thank you! Could you please make a release for this?

Done!


Add companion icon to sidebar list entries

Could have sworn this was always here, and we have an interface icon entry for it, but seemingly we never used it? Did we remove it by accident? Did Rae eat it? idk.

Having done some expert digging, I can confirm it wasn't there even before I came on to the project. So I will vehemently deny having touched it, even if the paw looks ruff.
https://github.com/Total-RP/Total-RP-3/blob/c29dfda6790def95ee4968b25616367ca9454d45/totalRP3/Modules/Register/Main/RegisterList.lua#L118


After restarting the pcfdev, Unable to start an Application that was bind to local-volume service

I have an application that uses physical file system. so i have created local-volume service and bind to my application. It was working fine. And when i restart my pcfDev the application is crashing with an  error message "exit_description"=>"failed to mount volume". But when i create a new volume service and bind to an application it is working fine, till pcf dev restart. once i restart the pcfdev the application is crashing with new service.

Thanks for the report. You may be able to work around this behavior by suspending PCF Dev instead of stopping it. Use: cf dev suspend


Sitewide - Move server calls in frontend to redux Middleware

Description
Currently calls to the server happen in Thunk action creator functions. Moving this functionality to a middleware would allow it to be removed, or replaced with mock functionality, by reconfiguring the redux store. This will enable more testing, or use with Storybook.

[ ] This task requires a unit test.

This is mostly done, closing issue.


split README into separate files

This should make the content easier to locate and read.

LICENSE.md wasn't added, actually. There already existed a LICENCE file, I just renamed it directly (without a PR) when I did a couple minor fixes to it a right before sending this PR: 3579e53

Ah right, just realized. Thanks anyway, that 'C' was bugging me a bit too. :wink:

And yes, I'm planning on adjusting the releases (create tags and possibly releases for the old versions mentioned in CHANGELOG.md, if that won't screw up the ordering), and at that point I'll create a new release and update the README as well 👍

Just noticed an old typo: in USAGE, getAllSections(false, WikiPage:SECTIONLIST_BY_NAME) should have two colons in the class constant, WikiPage::SECTIONLIST_BY_NAME.
Speaking of class constants, the ones in class Wikimate aren't used. Since that functionality exists (and belongs) in WikiPage, I think they should be removed from Wikimate.
Lastly, I found three more lowercase mentions of 'api' in the doxygen blocks, above Wikimate query and WikiPage getText (twice). Might wanna fix those before creating the release.

I found a smal bug in the section processing, so I'll create a new issue for that in which the above Wikimate.php edits can hitchhike along. Then you don't need to include code edits in this documentation ticket.

Thanks for the detailed review. I would rather not make any changes to the text in this PR, because they get obscured in the larger edit. But I'll certainly do those fixes in a subsequent PR. In fact, lets merge this so that those changes can be made afterwards :)


Question about text mask

Hi, thanks for your contribution. I am very inspired by your work.
I run the code with released pretrained model, and the output of text prior module (VisionLAN) seems like one dimensional vector, shape of torch.Size([6, 37]) tensor([6.]) on the inference sequence.
Can you tell me the way to generate or visualize the mask of PGRM module output which is  represent ${P_G^i}$ and ${P_S^i}$ on Figure 3?
Thanks,
Best regards.

Thank you for your appreciation and valuable feedback! Indeed, the size of label_lr and label_length is what you mentioned, and I must point out that this is not $P_G^i$. As you can see in my code, we use the function test_acc_counter.convert(label_lr, label_length) to generate the recognition result of VisionLAN and then use the function make_standard_text to create $P_G^i$. If there is nothing wrong with your runtime environment, I think you can successfully get $P_G^i$. If you are interested in how to convert the tensor to characters, I think you need to refer to the paper and code of VisionLAN of help because we directly call the function provided by its author. If you are interested in how to render $P_G^i$, you need to read the code of make_standard_text and its origin paper (https://arxiv.org/abs/1908.03047).
According to your feedback, I checked my released model and I find that I forgot to add the --mask parameter in run_testing.sh. Without this parameter, you may fail to load the model and unable to get $P_S^i$. I feel very sorry for my mistake and I will update these scripts. You can add this parameter to the script and have another try.

Ah, below codes makes the artificial mask. I misunderstood that the VisionLAN directly make mask. Thanks for detail explanation.

You are welcome. Thank you again for your appreciation of our work.


Event Request Codeunit 99000831 "Reservation Engine Mgt." OnAfterCloseReservEntry

Hello, could you please add OnAfterCloseReservEntry event at the very end of the CloseReservEntry procedure in the codeunit 99000831 like this?
if ReTrack then begin
    TotalQty := ReservMgt.SourceQuantity(ReservEntry, true);
    ReservMgt.AutoTrack(TotalQty);
OnAfterCloseReservEntry(ReservEntry);

[IntegrationEvent(false, false)]
local procedure  OnAfterCloseReservEntry(var ReservEntry: Record "Reservation Entry")
begin

end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


optimal design for given contrast

Would it be desirable to implement in compute contrast the option to compute accordingly the optimal design. Particularly when combining this with permutation testing. Considering Smith 2007.

Closing for lack of activity.


The vendir docs have typo in spelling of dangerouSkipTLSVerify

What steps did you take:
I read the docs and used the example from the page:

https://carvel.dev/vendir/docs/v0.34.x/vendir-spec/

where example is:
      # specify wether to skip TLS verification; defaults to false (optional;v0.18.0+)
      dangerouSkipTLSVerify: false

but where changed value to true.
What happened:
Obviously there is a typo here in the documentation and it should be:
dangerousSkipTLSVerify

but the wrong spelling as given in docs was silently accepted so only knew there was an issue when it didn't actually work as expected.
What did you expect:
For the docs to be correct. ;-)
Anything else you would like to add:
This needs to be fixed in all versions of vendir docs in the repo, not just latest.

site/content/vendir/docs/*/vendir-spec.md

There are multiple places in file where needs to be fixed.

I'd like to work on this issue // @coreyti @GrahamDumpleton

Thanks @duckling69! I have assigned the issue to you.

Can I work on this project?

Is this issue stlill open, if yes, I would like to work on this.

The issue was closed with #715


Generic form component

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.53%. Comparing base (78160c2) to head (d93a388).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
+ Coverage   99.52%   99.53%   +0.01%
==========================================
  Files          22       23       +1
  Lines         209      214       +5
  Branches       65       65
==========================================
+ Hits          208      213       +5
  Misses          1        1

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


move simple TLS to file based SDS

Signed-off-by: Rama Chavali<EMAIL_ADDRESS>[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Thanks for this PR, Ref:https://github.com/istio/istio/issues/24921
I have concerns regarding the test coverage for this. I think it'd be better if we wait till https://github.com/istio/istio/pull/24786 gets merged first.
Any plans to document file-based SDS feature on istio.io @ramaraochavali

cc: @JimmyCYJ  @myidpt

I am planning to add integration tests for the entire file based certs in separate PR. Let us keep that issue https://github.com/istio/istio/issues/24921 open till tests are added. File based SDS for the certs specified in destination rule configuration is an implementation detail - we do not have to document that.

@ramaraochavali  agreed we should keep that issue open. By document I mean- there's TLS origination tasks in istio.io user guide which use old file mount approach, maybe adding/editing the task to show file watcher support is a plus. Not hugely important though as secret based SDS should be out soon anyways along with a new task on istio.io explaining usage

/retest

/retest all

@nschhina: The /retest command does not accept any targets.
The following commands are available to trigger jobs:

/test unit-tests_istio
/test release-test_istio
/test integ-galley-k8s-tests_istio
/test integ-mixer-k8s-tests_istio
/test integ-pilot-k8s-tests_istio
/test integ-security-k8s-tests_istio
/test integ-telemetry-k8s-tests_istio
/test integ-multicluster-k8s-tests_istio
/test integ-distroless-k8s-tests_istio
/test integ-ipv6-k8s-tests_istio
/test integ-operator-controller-tests_istio
/test integ-pilot-multicluster-tests_istio
/test lint_istio
/test gencheck_istio

Use /test all to run the following jobs:

unit-tests_istio
release-test_istio
integ-galley-k8s-tests_istio
integ-mixer-k8s-tests_istio
integ-pilot-k8s-tests_istio
integ-security-k8s-tests_istio
integ-telemetry-k8s-tests_istio
integ-multicluster-k8s-tests_istio
integ-distroless-k8s-tests_istio
integ-ipv6-k8s-tests_istio
integ-operator-controller-tests_istio
lint_istio
gencheck_istio

In response to this:

/retest all

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/test all

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-telemetry-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@ramaraochavali: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-telemetry-k8s-tests_istio

integ-security-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-security-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-security-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest integ-security-k8s-tests_istio

@nschhina: The /retest command does not accept any targets.
The following commands are available to trigger jobs:

/test unit-tests_istio
/test release-test_istio
/test integ-galley-k8s-tests_istio
/test integ-mixer-k8s-tests_istio
/test integ-pilot-k8s-tests_istio
/test integ-security-k8s-tests_istio
/test integ-telemetry-k8s-tests_istio
/test integ-multicluster-k8s-tests_istio
/test integ-distroless-k8s-tests_istio
/test integ-ipv6-k8s-tests_istio
/test integ-operator-controller-tests_istio
/test integ-pilot-multicluster-tests_istio
/test lint_istio
/test gencheck_istio

Use /test all to run the following jobs:

unit-tests_istio
release-test_istio
integ-galley-k8s-tests_istio
integ-mixer-k8s-tests_istio
integ-pilot-k8s-tests_istio
integ-security-k8s-tests_istio
integ-telemetry-k8s-tests_istio
integ-multicluster-k8s-tests_istio
integ-distroless-k8s-tests_istio
integ-ipv6-k8s-tests_istio
integ-operator-controller-tests_istio
lint_istio
gencheck_istio

In response to this:

/retest integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/retest

@ramaraochavali: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-security-k8s-tests_istio
ec88f620d675abe4c5b0a2fc3629ce02c7dabb9f
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


Update crud-controller.stub

Use double backslash in setModel (single backslash is used for escaping).

Hi,
Out of interest what does this actually achieve? I understand that your escaping them, but why do you think it's needed to be done?

@OwenMelbz Backslashes in double quotes need to be escaped in PHP. You should always escape backslashes, even in single quotes. If you use the generator with a model called e.g. nastybug (or anything starting with an n), the code looks like that:
$this->crud->setModel("App\Models\nastybug")
This is a problem, because now the backslash matches the linebreak \n, see here: https://3v4l.org/orlpa
Double backslashes avoid that problem: https://3v4l.org/Qre5Q

I guess the proper use of backslashes should also be updated throughout the documentation and other places where currently only single backslashes are used (e.g. found here: https://laravel-backpack.readme.io/docs/crud-example).

The other (perhaps prettier, because it avoids a lot of double backslashes) option would be to use single quotes, e.g.
$this->crud->setModel('App\Models\nastybug')
This only fails if the backslash is at the end of the string, so that the closing single quote is escaped.

Just noticed this PR. Just created one to change these methods to use single quotes. #22.

Why not omit the slashes altogether here and import the class at the top with use and use the ::class notation?

Hi guys,
Thanks a lot for the collaboration here. I agree there was a problem, but it's since been fixed using @pavoltanuska 's PR #22 - single quotes instead of double quotes. I think is this is the prettier solution.
Thank you @tholu for spotting the bug and submitting the PR, and everybody else for pitching in. Team Backpack!! :-)
Cheers!


PostgreSQL via Flight SQL

Is it possible to use Apache Arrow Flight SQL to directly access PostgreSQL from Java(how does JDBC do it)? If so, how?

No, Flight SQL is a wire protocol, which means the (Postgres) server, or some proxy, must implement it. It is not like JDBC where a client-side driver translates API calls into a server-specific protocol. (For that idea, see https://github.com/apache/arrow-adbc.)
For Postgres, either Postgres would need to implement Flight SQL, or a proxy must be implemented that translates Flight SQL to the Postgres wire protocol.

@konstantin-doncov do you have any other questions here?

That's all, thanks!