Service for updating Person attributes like Latitude

Home Assistant release with the issue:

hass.io 98
Last working Home Assistant release (if known):
98
Operating environment (Hass.io/Docker/Windows/etc.):

hass.io
Component/platform:

Person https://www.home-assistant.io/components/person/
Description of problem:
Is there a Service call to update the Person attributes through automation?  I am getting a webhook request which passes the Latitude and Longitude data. I have extracted the data through {{ {{ trigger.data.latitude }}  & {{ trigger.data.longitude}} and I want to use this data to set the Person latitude and longitude.  I could find no Service call which I could use in automation script.
The YAml below just indicates the webhook received and passing that data to telegram. I wist to add an action to update Person attributes
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- id: '01010292'
  alias: GPSUpdater
  trigger:
    platform: webhook
    webhook_id: customwebhook
  condition: []
  action:
  - service: notify.telenotify
    data_template:
      message: '{{ trigger.data.latitude }}'

**Traceback (if applicable):**

**Additional information:**

You could write a simple python script to update latitude and longitude for you. Then in the automation you could call that python script with the extracted data.

@springstan sure i could do that, but this seems to be a "relatively" long way than some existing API - I mean how does device_tracker update the Person object and display that in the map? maybe I could call that existing service.
Note: I am still trying to get my head around understanding the docs for the API, I come from the Java background and expected docs to be arranged in like classes and method which I could reference and use accordingly.

Have you tried something like this?
- id: '01010292'
  alias: GPSUpdater
  trigger:
    - platform: webhook
      webhook_id: customwebhook
  condition: []
  action:
    - service: device_tracker.see
      data_template:
        dev_id: custom_device_1
        location_name: not_home
        gps: >
          {% set coordinates =  [trigger.data.latitude | int, trigger.data.longitude | int] %}
          {{coordinates}}

@springstan Tried, not working.
Error Message:
Invalid data for call_service at pos 2: None for dictionary value @data['gps']
Just to be sure that trigger.data.latitude and longitude is giving the data correctly, I kept the telegram messages to be sent in this action.  The telegram messages are sent correctly with the co-ordinates sent from the webhook. So  trigger.data.latitude & trigger.data.longitude are returning the data. So it is just this assignment of 'gps' value which is having this issue
action:

service: notify.telenotify
data_template:
message: "{{ trigger.data.latitude }} , {{ trigger.data.longitude}}"
service: device_tracker.see
data_template:
dev_id: custom_device_1
location_name: not_home
gps: >
{% set coordinates =  [trigger.data.latitude | int, trigger.data.longitude | int] %}
{{coordinates}}

@apop I see that you have resolved a similar issue in this thread.  Can you check if you have suggestions for above or is it is bug
https://community.home-assistant.io/t/device-tracker-from-script/97295/21

This is resolved.    Since I was using the IDE and not the configuration, I did not notice the error :-)
action:
-service: device_tracker.see
data_template:
dev_id: custom_device_1
location_name: not_home
gps: [ '{{trigger.data.latitude}}' , '{{trigger.data.longitude }}' ]

Great to hear that! :) Do not forget to close this issue.


style: use HOMEBREW_RUBY_EXEC_ARGS

So we really are passing the disable options everywhere.

Review period skipped due to critical label.

This change caught a legitmate bug where some cops were actually failing due to incorrect handling of an empty body.


Add supporting documentation link to contribution

Contributions do not show the link in read mode, See Clare - Brand Strategy & Activation (including hours and tangibles). Urgent, because there's a week left to approve her contribution and it does not fit in the descr field.

Can you add the drop shadow to the member profile cards?

What does a drop shadow has to do with this current issue?
It's not the subject here.

Oh shoot, wrong issue


fix: semgrep in git precommit hook is silent

Blocked on https://github.com/returntocorp/semgrep/issues/7756

Blocked on returntocorp/semgrep#7756

Quoted issue was auto-closed by a "stale bot"

Use just semgrep instead, at least for now.


No systemd on nonstandard home

Continued from https://github.com/keybase/client/pull/19897/files

cc @maxtaco.


🚀 Add PreProcessor to AnomalyModule

📝 Description
This PR,

Adds PreProcessor to AnomalyModule
Removes transforms from datamodule datasets.

✨ Changes
Select what type of change your PR is:

[ ] 🐞 Bug fix (non-breaking change which fixes an issue)
[x] 🔨 Refactor (non-breaking change which refactors the code base)
[x] 🚀 New feature (non-breaking change which adds functionality)
[ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] 📚 Documentation update
[ ] 🔒 Security update

✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:

[ ] 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
[ ] 📚 I have made the necessary updates to the documentation (if applicable).
[ ] 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

A sub-feature request that would fit here: (optionally?) keep both the transformed and original image/mask in the batch.
So instead of
            image, gt_mask = self.XXX_transform(batch.image, batch.gt_mask)
            batch.update(image=image, gt_mask=gt_mask)

something like
            batch.update(image_original=batch.image, gt_mask_original=batch.gt_mask)
            image, gt_mask = self.XXX_transform(batch.image, batch.gt_mask)
            batch.update(image=image, gt_mask=gt_mask)

It's quite practical to have these when using the API (i've re-implemented this in my local copy 100 times haha).

A sub-feature request that would fit here: (optionally?) keep both the transformed and original image/mask in the batch.
So instead of
            image, gt_mask = self.XXX_transform(batch.image, batch.gt_mask)
            batch.update(image=image, gt_mask=gt_mask)

something like
            batch.update(image_original=batch.image, gt_mask_original=batch.gt_mask)
            image, gt_mask = self.XXX_transform(batch.image, batch.gt_mask)
            batch.update(image=image, gt_mask=gt_mask)

It's quite practical to have these when using the API (i've re-implemented this in my local copy 100 times haha).

yeah, the idea is to keep batch.image and batch.gt_mask original outside the model. It is not working that way though :)

yeah, the idea is to keep batch.image and batch.gt_mask original outside the model

exactly, makes sense : )
but it's also useful to be able to access the transformed one (eg. when using augmentations)

it is not working that way though :)

didnt get this. cause it's not backcompatible?

yeah, the idea is to keep batch.image and batch.gt_mask original outside the model

exactly, makes sense : )
but it's also useful to be able to access the transformed one (eg. when using augmentations)

it is not working that way though :)

didnt get this. cause it's not backcompatible?

oh I meant, it is currently not working, I need to fix it :)


Edit hdinsight-hadoop-manage-ambari.md

Edit complete.
The bold text on line 35 says "Resource Manager," but the name of the tool seems to be "ResourceManager." Please confirm that the UI doesn't show the one-word spelling.

Hi @ShawnJackson, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (v-shawja). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


UI : Home Page

Describe the bug/feature
#19 #24
I  will write entire code for the frontend (homepage) using the above designs.
(Under gssoc22)

hi @akankshat05 go ahead and please keep the frontend responsive:

Home -  https://www.figma.com/file/C9s7Lm4ALV7XZIxlpW9e0P/DoctorVerse?node-id=0%3A1

Happy coding 👍

sure! @naveen8801

@naveen8801 I will make a PR in a few days

@naveen8801 I will make a PR in a few days

okay

@akankshat05 any updates ?

I'm working on it @naveen8801

@naveen8801 Can I work on this issue??

Hi i would like to work on this issue as well, could you please assign this to me? I am GSSoC'2023 participant

Hey! Let's wait for the mentors to get assigned and then we can decide on this! Thanks


Added search topology resources

@caadam @camiloborges First one to code review wins - go!

cool. I might be able to review it at some point today.
On Fri, Dec 11, 2015 at 8:55 AM, Brian Farnhill<EMAIL_ADDRESS>wrote:

@caadam https://github.com/caadam @camiloborges
https://github.com/camiloborges First one to code review wins - go!
—
Reply to this email directly or view it on GitHub
https://github.com/PowerShell/xSharePoint/pull/118#issuecomment-163760747
.


Having trouble installing (upgrading) Linphone

$ brew cask install --force --verbose linphone
==> Downloading http://download-mirror.savannah.gnu.org/releases/linphone/3.9.x/macos/linphone-3.9.1.pkg
Already downloaded: /Library/Caches/Homebrew/linphone-3.9.1.pkg
==> Verifying checksum for Cask linphone
tar: Error opening archive: Failed to open '/opt/homebrew-cask/Caskroom/linphone/3.9.1/linphone.pkg/Payload'
Error: It seems the symlink source is not there: '/opt/homebrew-cask/Caskroom/linphone/3.9.1/Linphone.app'
Error: Kernel.exit

I have tried deleting the cached file and letting it re-download, but the same thing happens.

Closing in favour of https://github.com/caskroom/homebrew-cask/issues/19847.


ORDER BY query performance difference between ASC and DESC

I have a relatively simple query but if the ORDER BY ASC is used it never returns, whilst the ORDER BY DESC is very quick.
The server is running RDF4J 3.0.0
The repository uses a native store + Lucene with indices spoc,pocs,cpso,cspo,oscp,ocsp
The query is as follows. Changing order by ASC tyo order by DESC allows results to be returned immediately.
select *
WHERE {
	{	SELECT *
		{
			{	SELECT DISTINCT
					?FileFormat_s ?FileFormatpuidIndex_o
				WHERE {
						?FileFormat_s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?class .
         				OPTIONAL{?FileFormat_s  <http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex>  ?FileFormatpuidIndex_o}
          				VALUES(?class){(<http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat>)}
        }
			}
		}  order by ASC(?FileFormatpuidIndex_o )limit 5
	}
	{
		VALUES(?FileFormat_p){(<http://data.nationalarchives.gov.uk/formatregistry/def/fileFormat.Version>)(<http://data.nationalarchives.gov.uk/formatregistry/def/file_formats.ID>)(<http://data.nationalarchives.gov.uk/formatregistry/def/registry.Note>)(<http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex>)(<http://data.nationalarchives.gov.uk/formatregistry/def/seeExternal>)(<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>)(<http://www.w3.org/2000/01/rdf-schema#comment>)(<http://www.w3.org/2000/01/rdf-schema#label>)}
		?FileFormat_s ?FileFormat_p ?FileFormat_o .
	}
}

Peculiar - off the top of my head I can't think of any reason why the sorting order would make that much of a difference. It needs to sort the complete result in both cases before it can apply a limit, anyway.
Does the same thing happen if you only execute the subquery:
SELECT *
{
	{	SELECT DISTINCT ?FileFormat_s ?FileFormatpuidIndex_o
		WHERE {
			?FileFormat_s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?class .
       		OPTIONAL{?FileFormat_s  <http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex>  ?FileFormatpuidIndex_o}
          		VALUES(?class){(<http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat>)}
                 }
	}
}  order by ASC(?FileFormatpuidIndex_o ) limit 5

or simplified even further:
SELECT DISTINCT ?FileFormat_s ?FileFormatpuidIndex_o
WHERE {
	?FileFormat_s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?class .
        OPTIONAL{ ?FileFormat_s  <http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex>  ?FileFormatpuidIndex_o }
        VALUES(?class){(<http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat>)}
 }
order by ASC(?FileFormatpuidIndex_o ) limit 5

Yes all of these perform well. The 'conflict' appears to be with the last
graph pattern, so commenting it out for clarity, the following performs
well:
select *
WHERE {
{ SELECT *
{
{ SELECT DISTINCT
?FileFormat_s ?FileFormatpuidIndex_o
WHERE {
?FileFormat_s http://www.w3.org/1999/02/22-rdf-syntax-ns#type ?class .
OPTIONAL{?FileFormat_s  <
http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex>
?FileFormatpuidIndex_o}
VALUES(?class){(<
http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat>)}
}
}
}  order by ASC(?FileFormatpuidIndex_o) limit 5
}
{
VALUES(?FileFormat_p){(<
http://data.nationalarchives.gov.uk/formatregistry/def/fileFormat.Version

)(<http://data.nationalarchives.gov.uk/formatregistry/def/file_formats.ID
)(http://data.nationalarchives.gov.uk/formatregistry/def/registry.Note)(<
http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex
)(http://data.nationalarchives.gov.uk/formatregistry/def/seeExternal)(<
http://www.w3.org/1999/02/22-rdf-syntax-ns#type>)(<
http://www.w3.org/2000/01/rdf-schema#comment>)(<
http://www.w3.org/2000/01/rdf-schema#label>)}
?FileFormat_s ?FileFormat_p ?FileFormat_o .

}
}
Just in case it was data related, I also chose different values in the last
graph patterns VALUE statement but still had the same effect.
Peter J. Lawrence
inova8
Providing answers for users' information questions
Mobile:  +44 7546 095977 | +1<PHONE_NUMBER> | Phone: +44 1298 872375 |
Skype: PeterJLawrence
Email<EMAIL_ADDRESS>|<EMAIL_ADDRESS><EMAIL_ADDRESS>| Web: www.inova8.com
*LinkedIn: *
http://www.linkedin.com/in/peterjohnlawrence
http://www.linkedin.com/in/peterjohnlawrence
On Thu, 26 Mar 2020 at 00:43, Jeen Broekstra<EMAIL_ADDRESS>wrote:

Peculiar - off the top of my head I can't think of any reason why the
sorting order would make that much of a difference. It needs to sort the
complete result in both cases before it can apply a limit, anyway.
Does the same thing happen if you only execute the subquery:
SELECT *
{
{	SELECT DISTINCT ?FileFormat_s ?FileFormatpuidIndex_o
WHERE {
?FileFormat_s http://www.w3.org/1999/02/22-rdf-syntax-ns#type ?class .
OPTIONAL{?FileFormat_s  http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex  ?FileFormatpuidIndex_o}
VALUES(?class){(http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat)}
}
}
}  order by ASC(?FileFormatpuidIndex_o ) limit 5
or simplified even further:
SELECT DISTINCT ?FileFormat_s ?FileFormatpuidIndex_o
WHERE {
?FileFormat_s http://www.w3.org/1999/02/22-rdf-syntax-ns#type ?class .
OPTIONAL{ ?FileFormat_s  http://data.nationalarchives.gov.uk/formatregistry/def/registry.puidIndex  ?FileFormatpuidIndex_o }
VALUES(?class){(http://data.nationalarchives.gov.uk/formatregistry/def/FileFormat)}
}
order by ASC(?FileFormatpuidIndex_o ) limit 5
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/eclipse/rdf4j/issues/2041#issuecomment-604163450, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMJVMFLKF3DKGTLWGUFHNTRJKQKRANCNFSM4LTJ4VCQ
.

Only thing I can think of is that the query planner changes the execution order unfavourably, though not sure why it'd do that for ASC but not DESC. I'll try and take a closer look.

@peterjohnlawrence apologies for not getting back to this sooner, I'm afraid it rather slipped my mind.
We've just released RDF4J 3.2, with the new query explain feature.

Upgraded but cannot run the test java as the 3.2.0 release for HTTPTupleQuery only raises and exception for HTTPTupleQuery.explain
However I have noticed something with the 3.2.0 repository query. If I remove the predicate IRI http://www.w3.org/2000/01/rdf-schema#comment from the VALUES list both ascending and descending queries perform well via Workbench (sub-second).
If I include this predicate in the list, then the DESC behaves well but the ASC never (or limits of my patience:-)) returns.
The object values associated with this predicate are long strings often with non-ascii charactaers. To test this I included an OFFSET and sure enough I start getting an immediate response.
From this I conclude it is data-related. If I can get the Explain work I will be able to test out what is happening and report back.

Checking the 'data' that is causing the issue with RDF4J-Workbench, it is a UTF-8 string of 1196 characters but without any non-ASCII characters. Is there a string limit within Workbench?
If I test the same query within a simple java test then there is no issue and all results are returned correctly.

Following up here quickly. @peterjohnlawrence could you try the latest version of RDF4J, we have drastically improved sorting, which could potentially impact your issue.

Also. I came across some issues with combining order by with limit. I was under the impression that limit was applied first.


Using Civitai model instead of huggingface.

The Stable Diffusion engine is using the custom stable diffusion openvino model on hugging face
Is there any workaround to use civitai model.

You would need to convert it first to diffusers. For example: https://gitlab.com/-/snippets/2505243


BUG: Prisma token missing from token lists.

What is happening?

Section description
Provide as much context as you can. Give as much context as you can to make it easier for the developers to figure what is happening.

BUG: Prisma token missing from token lists on the bots.
Prisma token: https://www.coingecko.com/en/coins/prisma-governance-token

Fixed due to failing curve token cron job update. @rootedbox adding curve token-updater to better-uptime.


Enhancement : Edit Event Form in New Events Page

Proposed UI

I think this form will be more crisp and professional. This would provide the user with a more compact look which would make him say yes to filling a form. Kindly assign me this under the hacktoberfest badge

Plz assign to me

@akash205sharma this issue is assigned to someone else plz create another issue you'd like to work on


add org id cluster id paras

Codecov Report

Merging #1390 (cc9dd83) into master (e9a1b1d) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1390   +/-   ##
=======================================
  Coverage   29.43%   29.44%
=======================================
  Files         128      128
  Lines       10516    10516
  Branches       99       99
=======================================
+ Hits         3095     3096    +1
+ Misses       7241     7240    -1
  Partials      180      180

Flag
Coverage Δ

be_unit_test
27.59% <ø> (+0.01%)
:arrow_up:

e2e_test
63.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


cleanup: remove demo

I have plans to set up a proper docs site using Astro Starlight so this can be migrated there and removed from this repo. I will of course also need to provide a link to the docs site once it it ready.

Closed by #69


[Bug?]:  .pending not be updating

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
Given the code below, the pending spinner and error message are never shown.
import { createServerAction$, redirect } from "solid-start/server";
import { client } from "~/utils/graphql-client";
import { insertProductsUomMutation } from "./queries";
import { Show } from "solid-js";
import { FormError } from "solid-start";

export default function ProductUomForm() {
  const [mutating, { Form }] = createServerAction$(
    // this is the request from the front end
    async (form: FormData, { request }) => {
      const uom_desc = form.get("uom_desc") as string;
      throw new FormError("unknown");
      // await client.mutation(insertProductsUomMutation, { uom_desc });
      // return redirect("/dashboard/products/uoms");
    }
  );

  return (
    <Form>
      <Show when={mutating.error}>

          {mutating.error.message}

      </Show>
      {/* Comment Form */}

              Add a unit of measure

          {/* Card */}

            <form>

                  Description

                <input
                  type="text"
                  name="uom_desc"
                  id="hs-uom-desc"
                  class="py-3 px-4 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 sm:p-4 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400"
                  placeholder="each"
                  required
                />

                <button
                  type="submit"
                  class="py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all dark:focus:ring-offset-gray-800"
                >
                  {/* TODO: this doesn't seem to be working */}
                  <Show when={mutating.pending}>

                  </Show>
                  Submit
                </button>

            </form>

          {/* End Card */}

      {/* End Comment Form */}
    </Form>
  );
}

The request is submitted, and response is an error:
{
   "error":{
      "message":"unknown",
      "stack":"The stack for FormErrors are only logged during development. In production you should handle these errors with an ErrorBoundary that can display the error message appropriately to the user.\n\nFormError: shsihsi\n    at Object.$$serverHandler0 (/workspace/solidstart-netlify/src/routes/dashboard/products/uoms/form.tsx:37:9)\n    at execute (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/server/server-functions/server.ts:189:37)\n    at Object.fn (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/server/server-functions/server.ts:201:12)\n    at Module.handleServerRequest (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/server/server-functions/server.ts:164:34)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async eval (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/server/middleware.ts:39:30)\n    at async eval (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/api/middleware.ts:40:12)\n    at async eval (/workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/entry-server/StartServer.tsx:45:12)\n    at async devFetch (file:///workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/dev/server.js:111:12)\n    at async startHandler (file:///workspace/solidstart-netlify/node_modules/.pnpm/solid-start@0.3.7_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q/node_modules/solid-start/dev/server.js:134:20)",
      "formError":"shsihsi",
      "fields":{

      },
      "fieldErrors":{

      }
   }
}

Expected behavior 🤔
Basically, the page, on submit, should display ~an error after setting~ the spinner on the button.
Steps to reproduce 🕹
Steps:

Using the code provided, click submit

Context 🔦
Feedback from forms is impossible.
Your environment 🌎
System:
  OS: Ubuntu 22.04.3 LTS

Binaries:
  Node: 18.18.1
  pnpm: 8.9.0

npmPackacges:
    "@solidjs/meta": "^0.28.6",
    "@solidjs/router": "^0.8.3",
    "@urql/core": "^4.1.4",
    "graphql": "^16.8.1",
    "preline": "^1.9.0",
    "solid-js": "^1.8.3",
    "solid-start": "^0.3.7",
    "solid-start-netlify": "^0.3.7"

Ok, issue is isolated to the pending status.
Does this work with the Form?

Without capital <Form> it does a full page reload which means pending state could never be seen from the client.

Ah @ryansolid, I see what I've managed to do. I've tried to combine two different sets of code and have succeeded in getting neither right!
Thanks so much for replying, and all the effort you've put into an incredible framework.

Without capital <Form> it does a full page reload which means pending state could never be seen from the client.

I've switched up to this code, which I hope is now correct. The page appears to be reloading, and I'm still unable to get the pending status:
import { createServerAction$, redirect } from "solid-start/server";
import { client } from "~/utils/graphql-client";
import { insertProductsUomMutation } from "./queries";
import { Show } from "solid-js";
import { FormError } from "solid-start";

// https://github.com/niliadu/solid-js-form
export default function ProductUomForm() {
  const [mutating, { Form }] = createServerAction$(
    // this is the request from the front end
    async (form: FormData, { request }) => {
      const uom_desc = form.get("uom_desc") as string;
      throw new FormError("unknown error");
      // await client.mutation(insertProductsUomMutation, { uom_desc });
      // return redirect("/dashboard/products/uoms");
    }
  );

  console.log("pending", mutating.pending);

  return (
    <>
      {/* Comment Form */}

        <Show when={mutating.error}>

            Error: {mutating.error.message}

        </Show>

              Add a unit of measure

          {/* Card */}

            <Form>

                  Description

                <input
                  type="text"
                  name="uom_desc"
                  id="hs-uom-desc"
                  class="py-3 px-4 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 sm:p-4 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400"
                  placeholder="each"
                  required
                />

                <button
                  type="submit"
                  class="py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all dark:focus:ring-offset-gray-800"
                >
                  {/* TODO: this doesn't seem to be working */}
                  <Show when={mutating.pending}>

                  </Show>
                  Submit
                </button>

            </Form>

          {/* End Card */}

      {/* End Comment Form */}
    </>
  );
}

Console logs:
POST http://localhost:3000/_m/src/routes/dashboard/products/uoms/form.tsx/0/mutating
GET http://localhost:3000/dashboard/products/uoms/form?form=%7B%22url%22%3A%22%2F_m%2Fsrc%2Froutes%2Fdashboard%2Fproducts%2Fuoms%2Fform.tsx%2F0%2Fmutating%22%2C%22entries%22%3A%5B%5B%22uom_desc%22%2C%22ttttt%22%5D%5D%2C%22error%22%3A%7B%22message%22%3A%22shsihsi%22%2C%22stack%22%3A%22The%20stack%20for%20FormErrors%20are%20only%20logged%20during%20development.%20In%20production%20you%20should%20handle%20these%20errors%20with%20an%20ErrorBoundary%20that%20can%20display%20the%20error%20message%20appropriately%20to%20the%20user.%5Cn%5CnFormError%3A%20shsihsi%5Cn%20%20%20%20at%20Object.%24%24serverHandler0%20(%2Fworkspace%2Fsolidstart-netlify%2Fsrc%2Froutes%2Fdashboard%2Fproducts%2Fuoms%2Fform.tsx%3A44%3A9)%5Cn%20%20%20%20at%20execute%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fserver%2Fserver-functions%2Fserver.ts%3A189%3A37)%5Cn%20%20%20%20at%20Object.fn%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fserver%2Fserver-functions%2Fserver.ts%3A201%3A12)%5Cn%20%20%20%20at%20Module.handleServerRequest%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fserver%2Fserver-functions%2Fserver.ts%3A164%3A34)%5Cn%20%20%20%20at%20process.processTicksAndRejections%20(node%3Ainternal%2Fprocess%2Ftask_queues%3A95%3A5)%5Cn%20%20%20%20at%20async%20eval%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fserver%2Fmiddleware.ts%3A39%3A30)%5Cn%20%20%20%20at%20async%20eval%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fapi%2Fmiddleware.ts%3A40%3A12)%5Cn%20%20%20%20at%20async%20eval%20(%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fentry-server%2FStartServer.tsx%3A45%3A12)%5Cn%20%20%20%20at%20async%20devFetch%20(file%3A%2F%2F%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fdev%2Fserver.js%3A111%3A12)%5Cn%20%20%20%20at%20async%20startHandler%20(file%3A%2F%2F%2Fworkspace%2Fsolidstart-netlify%2Fnode_modules%2F.pnpm%2Fsolid-start%400.3.7_%40solidjs%2Bmeta%400.28.6_%40solidjs%2Brouter%400.8.3_solid-js%401.8.3_solid-start-netli_bpsp2xn2i2ojyzzv2edztvll7q%2Fnode_modules%2Fsolid-start%2Fdev%2Fserver.js%3A134%3A20)%22%2C%22formError%22%3A%22shsihsi%22%2C%22fields%22%3A%7B%7D%2C%22fieldErrors%22%3A%7B%7D%7D%7D

Updated packages and changed <form> --> <Form> has resolved all issues.


feature/gh_actions_build_test

See iss #105

Unclear while build 3.7.5 stalled. I cancelled the run. It looks like the script execution behaved as intended otherwise.

Not sure why it triggered on pull_request as paths-ignore exclude markdown files.


Develop

提交关于DeeplabV3的分支，本任务由我的另一个账号在issue申请，以后使用本账号提交后续修改。

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

提交关于GAN综述任务的相关文档，issue由本人另外一个账号评论申请，后续的更改添加由本账号进行，辛苦您！


Permission About Personal Use

Hi, I am sorry to ask this simple question but am confused about permissions:
"The code provided is for educational purposes only. Apple is a trademark of Apple Inc., registered in the U.S. and other countries."
Does it mean there's no permission for personal use this font (Downloading the font file from releases and using it)?

Hi @rustacean112, the following is by no means intended to be legal advice. I'm not a lawyer neither I will probably ever be.
Educational purposes could be considered fair use of copyright. As long as you only use it for intended purposes, everything should be fine. Of course, a court could always have a different opinion and Apple would obviously be in the more advantaged position.

As I understand that using for personal usage is not allowed because this project intended for educational purposes, not personal use.
Thanks for response!

I don't see personal and educational purposes mutually exclusive, e.g., it could be argued that autodidacticism is of personal purpose since you are personally benefiting from it, but yet educational at the same time.
In any case, we leave it to the best of your judgement ;)

Thank you!


Article on errors vs exceptions

Why OK, does not capture errors
user input = exception
code failure = error
configuration can be either

Done, article is available here http://crowdhailer.me/2018-08-26/errors-are-not-exceptional/


adds +-gaf:by (non-colliding gas)

"gas, fail on dupe" -- as suggested in #199 ...
> =m (malt (limo ~[[1 2] [3 4] [5 6]]))
{[p=5 q=6] [p=1 q=2] [p=3 q=4]}
> (~(gas by m) (limo ~[[5 7]]))
{[p=5 q=7] [p=1 q=2] [p=3 q=4]}
> (~(gaf by m) (limo ~[[5 7]]))
ford: build failed ~[/g/~zod/use/dojo/~zod/inn/hand /g/~zod/use/hood/~zod/out/dojo/drum/phat/~zod/dojo /d //term/1]

Note: I used
|=  b/(list _?>(?=(^ a) n.a))

instead of
|*  b/(list {p/* q/*})
=>  .(b `(list _?>(?=(^ a) n.a))`b)

which is what +-gas:by does. Those seem semantically equivalent ... Are they?

Most gates that can "fail" produce a unit (see +-get:by), while some have variants that crash (+-got:by). In many cases, the cause of the failure will be obvious, but, in this case, any one of the pairs could've caused the failure. It'd be useful to know which one...
In other langs, I'd use some type of runtime exception.
Is there some kind of type pattern for producing error details? Something like
?|  {$| _?>(?=(^ a) p.n.a)}
    {$& (map _?>(?=(^ a) p.n.a) _?>(?=(^ a) q.n.a))}
==

Or should I just use ~|?
~|  duplicate-key+p.i.b
?<  (has p.i.b)

++each is the unit-like error format, but I'd just use ~| yeah. The
hoon parser should make a best effort to not to crash when syntax-checking,
but since this requires a value as well as a key I don't think it could be
triggered by partial input in dojo; something like the json reader should
definitely crash(duplicate keys are disallowed by spec).
On Sunday, 31 July 2016, Joe Bryan<EMAIL_ADDRESS>wrote:

Most gates that can "fail" produce a unit (see +-get:by), while some have
variants that crash (+-got:by). In many cases, the cause of the failure
will be obvious, but, in this case, any one of the pairs could've caused
the failure. It'd be useful to know which one...
In other langs, I'd use some type of runtime exception.
Is there some kind of type pattern for producing error details? Something
like
?|  {$| _?>(?=(^ a) p.n.a)}
{$& (map _?>(?=(^ a) p.n.a) _?>(?=(^ a) q.n.a))}
Or should I just use ~|?
~|  duplicate-key+p.i.b
?<  (has p.i.b)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236485960, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhmAGycsjq0EWpSJAcfTdFyCCr_xmks5qbXNygaJpZM4JY756
.

@confirms ~|.
On Mon, Aug 1, 2016 at 8:45 AM, Anton Dyudin<EMAIL_ADDRESS>wrote:

++each is the unit-like error format, but I'd just use ~| yeah. The
hoon parser should make a best effort to not to crash when syntax-checking,
but since this requires a value as well as a key I don't think it could be
triggered by partial input in dojo; something like the json reader should
definitely crash(duplicate keys are disallowed by spec).
On Sunday, 31 July 2016, Joe Bryan<EMAIL_ADDRESS>wrote:

Most gates that can "fail" produce a unit (see +-get:by), while some have
variants that crash (+-got:by). In many cases, the cause of the failure
will be obvious, but, in this case, any one of the pairs could've caused
the failure. It'd be useful to know which one...
In other langs, I'd use some type of runtime exception.
Is there some kind of type pattern for producing error details? Something
like
?| {$| _?>(?=(^ a) p.n.a)}
{$& (map _?>(?=(^ a) p.n.a) _?>(?=(^ a) q.n.a))}
Or should I just use ~|?
~| duplicate-key+p.i.b
?< (has p.i.b)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236485960, or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/ABxXhmAGycsjq0EWpSJAcfTdFyCCr_xmks5qbXNygaJpZM4JY756
.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236619913, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALyAf_AubOY2dIa3GjoG8tuQv31XbDUks5qbhSXgaJpZM4JY756
.

I also wrote an email saying to use ~|, but apparently didn’t press send.

On Aug 1, 2016, at 11:24 AM, cgyarvin<EMAIL_ADDRESS>wrote:
@confirms ~|.
On Mon, Aug 1, 2016 at 8:45 AM, Anton Dyudin<EMAIL_ADDRESS>wrote:

++each is the unit-like error format, but I'd just use ~| yeah. The
hoon parser should make a best effort to not to crash when syntax-checking,
but since this requires a value as well as a key I don't think it could be
triggered by partial input in dojo; something like the json reader should
definitely crash(duplicate keys are disallowed by spec).
On Sunday, 31 July 2016, Joe Bryan<EMAIL_ADDRESS>wrote:

Most gates that can "fail" produce a unit (see +-get:by), while some have
variants that crash (+-got:by). In many cases, the cause of the failure
will be obvious, but, in this case, any one of the pairs could've caused
the failure. It'd be useful to know which one...
In other langs, I'd use some type of runtime exception.
Is there some kind of type pattern for producing error details? Something
like
?| {$| _?>(?=(^ a) p.n.a)}
{$& (map _?>(?=(^ a) p.n.a) _?>(?=(^ a) q.n.a))}
Or should I just use ~|?
~| duplicate-key+p.i.b
?< (has p.i.b)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236485960, or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/ABxXhmAGycsjq0EWpSJAcfTdFyCCr_xmks5qbXNygaJpZM4JY756
.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236619913, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALyAf_AubOY2dIa3GjoG8tuQv31XbDUks5qbhSXgaJpZM4JY756
.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Added ~|:
> =m (malt (limo ~[[1 2] [3 4] [5 6]]))
{[p=5 q=6] [p=1 q=2] [p=3 q=4]}
> (~(gas by m) (limo ~[[5 7]]))
{[p=5 q=7] [p=1 q=2] [p=3 q=4]}
> (~(gaf by m) (limo ~[[5 7]]))
[%duplicate-key 5]
ford: build failed ~[/g/~zod/use/dojo/~zod/inn/hand /g/~zod/use/hood/~zod/out/dojo/drum/phat/~zod/dojo /d //term/1]

Would some formatting be preferable? Such as ~_(leaf+"duplicate key: {<p.i.b>}" ...), printing duplicate key: 5?

I would go for raw ~|, the formatted version is harder to search for and
e.g. squashes p.i.b onto one line.
On Mon, Aug 1, 2016 at 12:09 PM, Joe Bryan<EMAIL_ADDRESS>wrote:

Added ~|:

=m (malt (limo ~[[1 2] [3 4] [5 6]]))
{[p=5 q=6] [p=1 q=2] [p=3 q=4]}
(~(gas by m) (limo ~[[5 7]]))
{[p=5 q=7] [p=1 q=2] [p=3 q=4]}
(~(gaf by m) (limo ~[[5 7]]))
[%duplicate-key 5]
ford: build failed ~[/g/~zod/use/dojo/~zod/inn/hand /g/~zod/use/hood/~zod/out/dojo/drum/phat/~zod/dojo /d //term/1]

Would some formatting be preferable? Such as ~_(leaf+"duplicate key:
{<p.i.b>}" ...), printing duplicate key: 5?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/pull/225#issuecomment-236676930, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhiy9NLecdNcCJqnKaAK-i8__-Nn-ks5qbkR-gaJpZM4JY756
.

Right, I hadn't thought about complex keys ...


JavaScript plugin hooks mechanism similar to pluggy

It would be neat to provide a JavaScript plugin hook that plugins can use to add their own options to this menu. No idea what that would look like though.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/981#issuecomment-701616922

I had a look around and there isn't an obvious pluggy equivalent in JavaScript world at the moment.  Not quite as full-featured as Pluggy though - in particular I like how Pluggy supports multiple plugins returning results for the same hook that get concatenated into a list of results.
https://css-tricks.com/designing-a-javascript-plugin-system/ has some ideas.

@yozlet just spotted this comment. Wow that is interesting!
With the right plugin hooks on the page (see also #987) one relatively simple way to do that could be with bookmarklets - users could install bookmarklets which, when executed against a Datasette page in their browser, use the existing JavaScript plugin integration points to add all kinds of functionality.
Doing full sandboxing is certainly daunting, but it looks like Figma figured it out so TIL it's technically feasible.

I think I'm going to try building a very lightweight clone of the core API design of Pluggy - not the advanced features, just the idea that plugins can register and a call to plugin.nameOfHook() will return the concatenated results of all of the registered hooks.

I'm going to introduce a global datasette object which holds all the documented JavaScript API for plugin authors.

Pluggy does dependency injection by introspecting the named arguments to the Python function, which I really like.
That's tricker in JavaScript. It looks like the only way to introspect a function is to look at the .toString() representation of it and parse the (parameter, list) using a regular expression.
Even more challenging: JavaScript developers love minifying their code, and minification can shorten the function parameter names.
From https://code-maven.com/dependency-injection-in-angularjs it looks like Angular.js does dependency injection and solves this by letting you optionally provide a separate list of the arguments your function uses:
   angular.module('DemoApp', [])
   .controller('DemoController', ['$scope', '$log', function($scope, $log) {
       $scope.message = "Hello World";
       $log.debug('logging hello');
   }]);

I can copy that approach: I'll introspect by default, but provide a documented mechanism for explicitly listing your parameter names so that if you know your plugin code will be minified you can use that instead.

Potential design:
datasette.plugins.register('column_actions', function(database, table, column, actor) {
    /* ... *l
})

Or if you want to be explicit to survive minification:
datasette.plugins.register('column_actions', ['database', 'table', 'column', 'actor'], function(database, table, column, actor) {
    /* ... *l
})

Then to call the plugins:
datasette.plugins.call('column_actions', {database: 'database', table: 'table'})

The column_actions hook is the obvious first place to try this out. What are some demo plugins I could build for it?

Word cloud for this column
Count values (essentially linking to the SQL query for that column, as an extended version of the facet counts) - would be great if this could include pagination somehow, via #856.

Initial prototype:
window.datasette = {};
window.datasette.plugins = (function() {
    var registry = {};

    function extractParameters(fn) {
        var match = /\((.*)\)/.exec(fn.toString());
        if (match && match[1].trim()) {
            return match[1].split(',').map(s => s.trim());
        } else {
            return [];
        }
    }

    function register(hook, fn, parameters) {
        parameters = parameters || extractParameters(fn);
        if (!registry[hook]) {
            registry[hook] = [];
        }
        registry[hook].push([fn, parameters]);
    }

    function call(hook, args) {
        args = args || {};
        var implementations = registry[hook] || [];
        var results = [];
        implementations.forEach(([fn, parameters]) => {
            /* Call with the correct arguments */
            var callWith = parameters.map(parameter => args[parameter]);
            var result = fn.apply(fn, callWith);
            if (result) {
                results.push(result);
            }
        });
        return results;
    }
    return {
        register: register,
        _registry: registry,
        call: call
    };
})();

Usage example:
datasette.plugins.register('numbers', (a, b) => a + b)
datasette.plugins.register('numbers', (a, b) => a * b)
datasette.plugins.call('numbers', {a: 4, b: 6})
/* Returns [10, 24] */

This implementation doesn't have an equivalent of "hookspecs" which can identify if a registered plugin implementation matches a known signature. I should add that, it will provide a better developer experience if someone has a typo.

datasette.plugins.define('numbers', ['a' ,'b'])

This version adds datasette.plugins.define() plus extra validation of both .register() and .call():
window.datasette = {};
window.datasette.plugins = (function() {
    var registry = {};
    var definitions = {};

    function extractParameters(fn) {
        var match = /\((.*)\)/.exec(fn.toString());
        if (match && match[1].trim()) {
            return match[1].split(',').map(s => s.trim());
        } else {
            return [];
        }
    }

    function define(hook, parameters) {
        definitions[hook] = parameters || [];
    }

    function isSubSet(a, b) {
        return a.every(parameter => b.includes(parameter))
    }

    function register(hook, fn, parameters) {
        parameters = parameters || extractParameters(fn);
        if (!definitions[hook]) {
            throw new Error('"' + hook + '" is not a defined plugin hook');
        }
        if (!definitions[hook]) {
            throw new Error('"' + hook + '" is not a defined plugin hook');
        }
        /* Check parameters is a subset of definitions[hook] */
        var validParameters = definitions[hook];
        if (!isSubSet(parameters, validParameters)) {
            throw new Error('"' + hook + '" valid parameters are ' + JSON.stringify(validParameters));
        }
        if (!registry[hook]) {
            registry[hook] = [];
        }
        registry[hook].push([fn, parameters]);
    }

    function call(hook, args) {
        args = args || {};
        if (!definitions[hook]) {
            throw new Error('"' + hook + '" hook has not been defined');
        }
        if (!isSubSet(Object.keys(args), definitions[hook])) {
            throw new Error('"' + hook + '" valid arguments are ' + JSON.stringify(definitions[hook]));
        }

        var implementations = registry[hook] || [];
        var results = [];
        implementations.forEach(([fn, parameters]) => {
            /* Call with the correct arguments */
            var callWith = parameters.map(parameter => args[parameter]);
            var result = fn.apply(fn, callWith);
            if (result) {
                results.push(result);
            }
        });
        return results;
    }
    return {
        define: define,
        register: register,
        _registry: registry,
        call: call
    };
})();

Usage:
datasette.plugins.define('numbers', ['a', 'b'])
datasette.plugins.register('numbers', (a, b) => a + b)
datasette.plugins.register('numbers', (a, b) => a * b)
datasette.plugins.call('numbers', {a: 4, b: 6})

I need to decide how this code is going to be loaded. Putting it in a blocking <script> element in the head would work, but I'd rather not block loading of the rest of the page. Using a <script async> method would be nicer, but then I have to worry about plugins attempting to register themselves before the page has fully loaded.
Running it through https://javascript-minifier.com/ produces this, which is 855 characters - so maybe I could inline that into the header of the page?
window.datasette={},window.datasette.plugins=function(){var r={},n={};function e(r,n){return r.every(r=>n.includes(r))}return{define:function(r,e){n[r]=e||[]},register:function(t,i,o){if(o=o||function(r){var n=/\((.*)\)/.exec(r.toString());return n&&n[1].trim()?n[1].split(",").map(r=>r.trim()):[]}(i),!n[t])throw new Error('"'+t+'" is not a defined plugin hook');if(!n[t])throw new Error('"'+t+'" is not a defined plugin hook');var a=n[t];if(!e(o,a))throw new Error('"'+t+'" valid parameters are '+JSON.stringify(a));r[t]||(r[t]=[]),r[t].push([i,o])},_registry:r,call:function(t,i){if(i=i||{},!n[t])throw new Error('"'+t+'" hook has not been defined');if(!e(Object.keys(i),n[t]))throw new Error('"'+t+'" valid arguments are '+JSON.stringify(n[t]));var o=r[t]||[],a=[];return o.forEach(([r,n])=>{var e=n.map(r=>i[r]),t=r.apply(r,e);t&&a.push(t)}),a}}}();

If I'm going to minify it I'll need to figure out a build step in Datasette itself so that I can easily work on that minified version.

Using raw string exceptions, throw '"' + hook + '" hook has not been defined';, knocks it down to 795 characters.

This version minifies to 702 characters:
window.datasette = window.datasette || {};
window.datasette.plugins = (() => {
    var registry = {};
    var definitions = {};
    var stringify = JSON.stringify;

    function extractParameters(fn) {
        var match = /\((.*)\)/.exec(fn.toString());
        if (match && match[1].trim()) {
            return match[1].split(',').map(s => s.trim());
        } else {
            return [];
        }
    }

    function isSubSet(a, b) {
        return a.every(parameter => b.includes(parameter))
    }

    return {
        _registry: registry,
        define: (hook, parameters) => {
            definitions[hook] = parameters || [];
        },
        register: (hook, fn, parameters) => {
            parameters = parameters || extractParameters(fn);
            if (!definitions[hook]) {
                throw '"' + hook + '" is not a defined hook';
            }
            /* Check parameters is a subset of definitions[hook] */
            var validParameters = definitions[hook];
            if (!isSubSet(parameters, validParameters)) {
                throw '"' + hook + '" valid args are ' + stringify(validParameters);
            }
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },

        call: (hook, args) => {
            args = args || {};
            if (!definitions[hook]) {
                throw '"' + hook + '" hook is not defined';
            }
            if (!isSubSet(Object.keys(args), definitions[hook])) {
                throw '"' + hook + '" valid args: ' + stringify(definitions[hook]);
            }

            var implementations = registry[hook] || [];
            var results = [];
            implementations.forEach(([fn, parameters]) => {
                /* Call with the correct arguments */
                var callWith = parameters.map(parameter => args[parameter]);
                var result = fn.apply(fn, callWith);
                if (result) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

This one is 683 bytes with Uglify:
window.datasette = window.datasette || {};
window.datasette.plugins = (() => {
    var registry = {};
    var definitions = {};
    var stringify = JSON.stringify;

    function extractParameters(fn) {
        var match = /\((.*)\)/.exec(fn.toString());
        if (match && match[1].trim()) {
            return match[1].split(',').map(s => s.trim());
        } else {
            return [];
        }
    }

    function isSubSet(a, b) {
        return a.every(parameter => b.includes(parameter))
    }

    return {
        _r: registry,
        define: (hook, parameters) => {
            definitions[hook] = parameters || [];
        },
        register: (hook, fn, parameters) => {
            parameters = parameters || extractParameters(fn);
            if (!definitions[hook]) {
                throw 'Hook "' + hook + '" not defined';
            }
            /* Check parameters is a subset of definitions[hook] */
            var validParameters = definitions[hook];
            if (!isSubSet(parameters, validParameters)) {
                throw '"' + hook + '" valid args: ' + stringify(validParameters);
            }
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },

        call: (hook, args) => {
            args = args || {};
            if (!definitions[hook]) {
                throw '"' + hook + '" hook not defined';
            }
            if (!isSubSet(Object.keys(args), definitions[hook])) {
                throw '"' + hook + '" valid args: ' + stringify(definitions[hook]);
            }

            var implementations = registry[hook] || [];
            var results = [];
            implementations.forEach(([fn, parameters]) => {
                /* Call with the correct arguments */
                var callWith = parameters.map(parameter => args[parameter]);
                var result = fn.apply(fn, callWith);
                if (result) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

I'm going to need to add JavaScript unit tests for this new plugin system.

Removing the datasette.plugin.define() method and associated error handling reduces the uglified version from 683 bytes to 400 bytes. I think the error checking is worth the extra 283 bytes per page load, even if it's only really needed for a better developer experience.
window.datasette = window.datasette || {};
window.datasette.plugins = (() => {
    var registry = {};
    var stringify = JSON.stringify;

    function extractParameters(fn) {
        var match = /\((.*)\)/.exec(fn.toString());
        if (match && match[1].trim()) {
            return match[1].split(',').map(s => s.trim());
        } else {
            return [];
        }
    }
    return {
        _r: registry,
        register: (hook, fn, parameters) => {
            parameters = parameters || extractParameters(fn);
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },

        call: (hook, args) => {
            args = args || {};
            var implementations = registry[hook] || [];
            var results = [];
            implementations.forEach(([fn, parameters]) => {
                /* Call with the correct arguments */
                var callWith = parameters.map(parameter => args[parameter]);
                var result = fn.apply(fn, callWith);
                if (result) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

265 bytes if I remove the parameter introspection code, instead requiring plugin authors to specify the arguments they take:
window.datasette = window.datasette || {};
window.datasette.plugins = (() => {
    var registry = {};
    return {
        register: (hook, fn, parameters) => {
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },
        call: (hook, args) => {
            args = args || {};
            var implementations = registry[hook] || [];
            var results = [];
            implementations.forEach(([fn, parameters]) => {
                /* Call with the correct arguments */
                var callWith = parameters.map(parameter => args[parameter]);
                var result = fn.apply(fn, callWith);
                if (result) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

window.datasette=window.datasette||{},window.datasette.plugins=(()=>{var a={};return{register:(t,e,r)=>{a[t]||(a[t]=[]),a[t].push([e,r])},call:(t,e)=>{e=e||{};var r=a[t]||[],s=[];return r.forEach(([a,t])=>{var r=t.map(a=>e[a]),d=a.apply(a,r);d&&s.push(d)}),s}}})();

I gotta admit that 265 byte version is pretty tempting, if it's going to end up in the <head> of every single page.

I'm going to write a few example plugins and try them out against the longer and shorter versions of the script, to get a better feel for how useful the longer versions with the error handling and explicit definition actually are.

Started a Twitter thread about this here: https://twitter.com/simonw/status/1344392603794477056

Another option: have both "dev" and "production" versions of the plugin mechanism script. Make it easy to switch between the two. Build JavaScript unit tests that exercise the "production" APIs against the development version, and have extra tests that just work against the features in the development version.

FixMyStreet inlines some JavaScript, and it's always a good idea to copy what they're doing when it comes to web performance: https://github.com/mysociety/fixmystreet/blob/23e9564b58a86b783ce47f3c0bf837cbd4fe7282/templates/web/base/common_header_tags.html#L19-L25

This one minifies to 245:
var datasette = datasette || {};
datasette.plugins = (() => {
    var registry = {};
    return {
        register: (hook, fn, parameters) => {
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },
        call: (hook, args) => {
            args = args || {};
            var results = [];
            (registry[hook] || []).forEach(([fn, parameters]) => {
                /* Call with the correct arguments */
                var callWith = parameters.map(parameter => args[parameter]);
                var result = fn.apply(fn, callWith);
                if (result) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

var datasette=datasette||{};datasette.plugins=(()=>{var a={};return{register:(t,r,e)=>{a[t]||(a[t]=[]),a[t].push([r,e])},call:(t,r)=>{r=r||{};var e=[];return(a[t]||[]).forEach(([a,t])=>{var s=t.map(a=>r[a]),p=a.apply(a,s);p&&e.push(p)}),e}}})();

https://twitter.com/dracos/status/1344402639476424706 points out that plugins returning 0 will be ignored, so this should probably check for undefined instead.

If you're using arrow functions, you can presumably use default parameters, not much difference in support.  But OTOH you need "use strict"; to use arrow functions etc, and that's 13 bytes.
Your latest 250-byte one, with use strict, gzips to 199 bytes. The following might be 292 bytes, but compresses to 204, basically the same, and works in any browser at all:
var datasette=datasette||{};datasette.plugins=function(){var d={};return{register:function(b,c,e){d[b]||(d[b]=[]);d[b].push([c,e])},call:function(b,c){c=c||{};var e=[];(d[b]||[]).forEach(function(a){a=a[0].apply(a[0],a[1].map(function(a){return c[a]}));void 0!==a&&e.push(a)});return e}}}();
Source for that is below; I replaced the [fn,parameters] because closure-compiler includes a polyfill for that, and I ran closure-compiler --language_out ECMASCRIPT3:
var datasette = datasette || {};
datasette.plugins = (() => {
    var registry = {};
    return {
        register: (hook, fn, parameters) => {
            if (!registry[hook]) {
                registry[hook] = [];
            }
            registry[hook].push([fn, parameters]);
        },
        call: (hook, args) => {
            args = args || {};
            var results = [];
            (registry[hook] || []).forEach((data) => {
                /* Call with the correct arguments */
                var result = data[0].apply(data[0], data[1].map(parameter => args[parameter]));
                if (result !== undefined) {
                    results.push(result);
                }
            });
            return results;
        }
    };
})();

If you could say that all hook functions had to accept one options parameter (and could use object destructuring if they wished to only see a subset), you could have this, which minifies to 200 bytes, gzips to 146, and works practically the same:
var datasette = datasette || {};
datasette.plugins = (() => {
    var registry = {};
    return {
        register: (hook, fn) => {
            registry[hook] = registry[hook] || [];
            registry[hook].push(fn);
        },
        call: (hook, args) => {
            var results = (registry[hook] || []).map(fn => fn(args||{}));
            return results;
        }
    };
})();

var datasette=datasette||{};datasette.plugins=function(){var b={};return{register:function(a,c){b[a]=b[a]||[];b[a].push(c)},call:function(a,c){return(b[a]||[]).map(function(a){return a(c||{})})}}}();
Called the same, definitions tiny bit different:
datasette.plugins.register('numbers', ({a, b}) => a + b)
datasette.plugins.register('numbers', o => o.a * o.b)
datasette.plugins.call('numbers', {a: 4, b: 6})

Using object destructuring like that is a great idea. I'm going to play with your version  - it's delightfully succinct.

I think I need to keep the mechanism whereby a plugin can return undefined in order to indicate that it has nothing to say for that specific item - that's borrowed from Pluggy and I've used it a bunch in my Python plugins. That makes the code a bit longer.
I'll write some example plugins to help me decide if the filtering-out-of-undefined mechanism is needed or not.

Eventually I'd like to provide a whole bunch of other datasette.X utility functions that plugins can use - things like datasette.addTabbedContentPane() or similar.
But I don't want to inline those into the page.
So... I think the basic plugin system remains inline - maybe from an inlined file called plugins-bootstrap.js. Then a separate plugins.js contains the rest of the API functionality.
If a plugin wants to take advantage of those APIs, maybe it registers itself using datasette.plugins.register('load', () => ...) - that load hook can then be fired once the bulkier plugin code has been loaded.

If I'm going to do that, it would be good if subsequent plugins that register against the load event are executed straight away. That's a bit of a weird edge-case in plugin world - it would involve the bulkier code that gets loaded redefining how datasette.plugins.register works to special-case the 'load' hook.
Maybe the tiny bootstrap code could define a datasette.plugins.load(callbackFunction) method which gets upgraded later into something that fires straight away? Would add more bytes though.

Amazing work! And you've put in far more work than I'd expect to reduce the payload (which is admirable).
So, to add a plugin with the current design, it goes in (a) the template or (b) a bookmarklet, right?

You'll be able to add JavaScript plugins using a bunch of different mechanisms:

A custom template, dropping the code in to a <script> block
A bookmarklet that injects an extra script
A separate script.js file that's loaded into Datasette using the "extra_js_urls" metadata option, documented here: https://docs.datasette.io/en/stable/custom_templates.html#custom-css-and-javascript
A plugin you can install, like datasette-vega or datasette-cluster-map - since plugins can bundle their own script files that then get loaded on pages via this hook: https://docs.datasette.io/en/stable/plugin_hooks.html#extra-js-urls-template-database-table-columns-view-name-request-datasette

For inlining the plugins.min.js file into the Jinja templates I could use the trick described here: https://stackoverflow.com/a/41404611 - which adds a {{ include_file('file.txt') }} function to Jinja.

https://github.com/mishoo/UglifyJS/issues/1905#issuecomment-300485490 says:

sourceMappingURL aren't added by default in 3.x due to one of the feature requests not to - some users are putting them within HTTP response headers instead.
So the command line for that would be:
$ uglifyjs main.js -cmo main.min.js --source-map url=main.min.js.map

I have yet to build Datasette plugin and am unfamiliar with Pluggy. Since browsers have event handling builtin Datasette could communicate with plugins through it. Handlers register as listeners for custom Datasette events and Datasette's JS can then trigger said events.
I was also wondering if you had looked at Javascript Modules for JS plugins? With services like Skypack (https://www.skypack.dev) NPM libraries can be loaded directly into browser, no build step needed. Same goes for local JS if you adhere to ES Module spec.
If minification is required then tools such as Snowpack (https://www.snowpack.dev) could fit better. It uses https://github.com/evanw/esbuild for bundling and minification.
On plugins you'd simply:
import {register} from '/assets/js/datasette'
register.on({'click' : my_func})

In Datasette HTML pages' head you'd merely import these files as modules one by one.

I thought about using browser events, but they don't quite match the API that I'm looking to provide. In particular, the great thing about Pluggy is that if you have multiple handlers registered for a specific plugin hook each of those handlers can return a value, and Pluggy will combine those values into a list of replies.
This is great for things like plugin hooks that add extra menu items - each plugin can return a menu item (maybe as a label/URL/click-callback object) and the calling code can then add all of those items to the menu. See https://docs.datasette.io/en/stable/plugin_hooks.html#table-actions-datasette-actor-database-table for a Python example.
I'm on the fence about relying on JavaScript modules. I need to think about browser compatibility for them - but I'm already commited to requiring support for () => {} arrow functions so maybe I'm committed to module support too already?

I thought about using browser events, but they don't quite match the API that I'm looking to provide. In particular, the great thing about Pluggy is that if you have multiple handlers registered for a specific plugin hook each of those handlers can return a value, and Pluggy will combine those values into a list of replies.
This is great for things like plugin hooks that add extra menu items - each plugin can return a menu item (maybe as a label/URL/click-callback object) and the calling code can then add all of those items to the menu. See https://docs.datasette.io/en/stable/plugin_hooks.html#table-actions-datasette-actor-database-table for a Python example.
I'm on the fence about relying on JavaScript modules. I need to think about browser compatibility for them - but I'm already commited to requiring support for () => {} arrow functions so maybe I'm committed to module support too already?

but I'm already commited to requiring support for () => {} arrow functions

cough Don't think you are.

but I'm already commited to requiring support for () => {} arrow functions

cough Don't think you are.

With regards to JS/Browser events, given your example of menu items that plugins could add, I could imagine this code to work:
// as part of datasette
datasette.events.AddMenuItem = 'DatasetteAddMenuItemEvent';
document.addEventListener(datasette.events.AddMenuItem, (e) => {
  // do whatever is needed to add the menu item. Data comes from `e`
  alert(e.title + ' ' + e.link);
});

// as part of a plugin
const event = new Event(datasette.events.AddMenuItem, {link: '/foo/bar', title: 'Go somewhere'});
Document.dispatchEvent(event)

With regards to JS/Browser events, given your example of menu items that plugins could add, I could imagine this code to work:
// as part of datasette
datasette.events.AddMenuItem = 'DatasetteAddMenuItemEvent';
document.addEventListener(datasette.events.AddMenuItem, (e) => {
  // do whatever is needed to add the menu item. Data comes from `e`
  alert(e.title + ' ' + e.link);
});

// as part of a plugin
const event = new Event(datasette.events.AddMenuItem, {link: '/foo/bar', title: 'Go somewhere'});
Document.dispatchEvent(event)

Oh that's interesting, I hadn't thought about plugins firing events - just responding to events fired by the rest of the application.

Oh that's interesting, I hadn't thought about plugins firing events - just responding to events fired by the rest of the application.

I was thinking JavaScript plugins going with server side template extensions custom HTML. Attach my own widgets on there and listen for Datasette events to refresh when user interacts with main UI. Like a map view or table that updates according to selected column. There's certainly other ways to look at this. Perhaps you could list possible hooks or high level design doc on what would be possible with the plugin system?
Re: modules. I would like to see modules supported at least in development. The developer experience is so much better than what JavaScript coding has been in the past. With large parts of NPM at your disposal I’d imagine even less experienced coder can whisk a custom plugin in no time. Proper production build system (like one you get with Pika or Parcel) could package everything up into bundles that older browsers can understand. Though that does come with performance and size penalties alongside the added complexity.

I was thinking JavaScript plugins going with server side template extensions custom HTML. Attach my own widgets on there and listen for Datasette events to refresh when user interacts with main UI. Like a map view or table that updates according to selected column. There's certainly other ways to look at this. Perhaps you could list possible hooks or high level design doc on what would be possible with the plugin system?
Re: modules. I would like to see modules supported at least in development. The developer experience is so much better than what JavaScript coding has been in the past. With large parts of NPM at your disposal I’d imagine even less experienced coder can whisk a custom plugin in no time. Proper production build system (like one you get with Pika or Parcel) could package everything up into bundles that older browsers can understand. Though that does come with performance and size penalties alongside the added complexity.

For reasons I've written about elsewhere, I'm in favor of modules. It has several beneficial effects.  Two, if you include the same plain script on the page more than once, it will be executed twice, but if you include the same module script on a page twice, it will only execute once. Three, you get a module local namespace, instead of having to use the global window namespace or a function private namespace.
OTOH, if you are going to use an old style script, the code from before isn't ideal, because you wipe out your registry if the script it included more than once. Also you may as well use object methods and splat arguments.
The event based architecture probably makes more sense though. Just make up some event names prefixed with datasette: and listen for them on the root. The only concern with that approach is it can sometimes be tricky to make sure your plugins are run after datasette has run. Maybe
function mycallback(){
  // whatever
}

if (window.datasette) {
  window.datasette.init(mycallback);
} else {
  document.addEventListener('datasette:init', mycallback);
}

For reasons I've written about elsewhere, I'm in favor of modules. It has several beneficial effects.  Two, if you include the same plain script on the page more than once, it will be executed twice, but if you include the same module script on a page twice, it will only execute once. Three, you get a module local namespace, instead of having to use the global window namespace or a function private namespace.
OTOH, if you are going to use an old style script, the code from before isn't ideal, because you wipe out your registry if the script it included more than once. Also you may as well use object methods and splat arguments.
The event based architecture probably makes more sense though. Just make up some event names prefixed with datasette: and listen for them on the root. The only concern with that approach is it can sometimes be tricky to make sure your plugins are run after datasette has run. Maybe
function mycallback(){
  // whatever
}

if (window.datasette) {
  window.datasette.init(mycallback);
} else {
  document.addEventListener('datasette:init', mycallback);
}

I'm going to ship a version of this in Datasette 0.54 with a warning that the interface should be considered unstable (see #1202) so that we can start trying this out.

I'm going to ship a version of this in Datasette 0.54 with a warning that the interface should be considered unstable (see #1202) so that we can start trying this out.

... actually not going to include this in 0.54, I need to write a couple of plugins myself using it before I even make it available in preview.

... actually not going to include this in 0.54, I need to write a couple of plugins myself using it before I even make it available in preview.


Consensus Set Cacheing

I implemented a few caches in the consensus set, which should speed up the initial syncing. These caches include:

Siacoin output cache
File contract cache
Processed block cache
Block ID cache
All caches, except the FC cache, exhibit a quite high hit/miss ratio. It is quite expected, because the file contracts usually have longer expiration times, but there are also less FC entries than, for instance, SCO entries, so this cache is less expensive.

Ambitious! I would definitely like to see some hard numbers here. If this speeds up IBD by like, 10%, then it's a no-brainer. If it's more like 3-5%, I'd be on the fence. Below that, not worth it. Ideally you would test this by syncing all the way from genesis to tip (and ideally, multiple times!), but if that's too onerous perhaps you could start with just the first 50,000 blocks. You'll also want to sync from another locally-running node, to control for peer quality.
Unfortunately, I don't think the block ID cache is viable. Using the nonce as a key is interesting, but with only 64 bits of entropy, even accidental collisions are too likely, never mind intentional ones -- and consensus code absolutely cannot ever be confused about which block has which ID.

Well, having tried numerous cache configurations and run multiple tests, I can only state that the win in the syncing time is quite marginal and can well be within the experimental error.
First of all, the caches seem to only be efficient on a slow hardware. On an SSD and a decent CPU, caches can even slow syncing down.
It looks like the reads can be accelerated by using the cache, but then the writes become the bottleneck, and while that could theoretically be solved, I've already spent too much time on this and can't afford spending any more. So, I'll close this PR out for now.
Regarding the block ID cache, I also had some doubts on that but wanted to hear a professional opinion first.

Ah, that's disappointing. Thanks for taking the time to explore this, though! I would definitely like to do some aggressive benchmarking+optimization of the core syncing process, so this result is helpful.


Selecting something on the ui for copy paste doesn't work

Describe the bug
On the UI, when you select some text in the output tab, the selection disappears and the state of the cell toggles.
To Reproduce
run an evaluation and then go to the table view on web.
Expected behavior
When you select the UI, the state of the output should not toggle.
Screenshots

When you select "The first question you asked", the selection disappears and the state of the output toggles. this makes it impossible to copy paste parts of the output.
System information (please complete the following information):

Promptfoo version: 0.73.6

Thanks @rishimalhotra2.  #1295 should help with this.

@rishimalhotra2 this was recently deployed. You can test it out with npx promptfoo@latest .... Thank you!


ots install

Hi @felipesanches –
I am reinstalling everything on a clean install of OS X High Sierra. I hit a bump with the ots install instructions in the FB install instructions page.
MacBook-Pro:~ stupakm$ brew tap bramstein/webfonttools;
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from d44bc8be2 to f239b7a62.
Updated 1 tap (homebrew/core).
==> Updated Formulae
azure-cli                   fn                          libcouchbase

MacBook-Pro:~ stupakm$ brew update;
Already up-to-date.
MacBook-Pro:~ stupakm$ brew install ots --HEAD;
Error: ots: /usr/local/Homebrew/Library/Taps/bramstein/homebrew-webfonttools/ots.rb:6: syntax error, unexpected <<, expecting keyword_end
<<<<<<< Updated upstream
  ^
/usr/local/Homebrew/Library/Taps/bramstein/homebrew-webfonttools/ots.rb:8: syntax error, unexpected ===, expecting keyword_end
=======
   ^
MacBook-Pro:~ stupakm$

As it says...
If brew fails, try installing the binaries from https://github.com/khaledhosny/ots/releases and report an error on the Font Bakery issue tracker.
Let me know if I can test anything else for you.

It looks like others have run into this issue too.  There is an open PR on Bram's repository to update the Homebrew install script:
https://github.com/bramstein/homebrew-webfonttools/pull/27
As a workaround until it is fixed, you can download the current release versions of the compiled ots binaries from Khaled's releases:
https://github.com/khaledhosny/ots/releases/download/v7.1.7/ots-7.1.7-osx.zip
and move ots-sanitize to the path /usr/local/bin/ots-sanitize.  That will work with the ots-sanitize check in Font Bakery:
https://github.com/googlefonts/fontbakery/blob/57e85503fd26e21cb200633a348f671f4001afd5/Lib/fontbakery/specifications/general.py#L117-L137

Updated the ots-sanitize installation docs for macOS in #2058


Millisecond values can have 1–3 digits

This PR fixes issue #10.

2016-01-31T00:01:23.4 will be parsed as 400 milliseconds.
2016-01-31T00:01:23.40 will be parsed as 400 milliseconds.
2016-01-31T00:01:23.040 will be parsed as 40 milliseconds.

This PR also changes Msec's type from a string to a number. This avoids problems with leading zeros so we can return 40 milliseconds instead of "040" milliseconds.

Closing because this does not match browsers' implementation of milliseconds. They accept any (?) number of digits and truncate after three digits.


Separator Proxy Component not Available from Core

Expected Behaviour
All the core components proxy should be available in your project code base
Actual Behaviour
Separator proxy Component is missing
Reproduce Scenario (including but not limited to)
Create a maven project with archtype 20 and check on separator component
Steps to Reproduce
open the components created from the maven archtype 20 and search for separator component
Platform and Version
AEM 6.5
Sample Code that illustrates the problem
Logs taken while reproducing problem

Fixed in https://github.com/adobe/aem-project-archetype/commit/fa6c046c8c845b627d9e4a90302fb2ace2c478d9


[7.0] Updated to PHPUnit 6

PS: these StyleCI aren't related to this PR, so I won't apply them.

Tests fail.

@taylorotwell The tests only failed because of PHPUnit 6.0 requires PHP 7.0. Should we drop support to 5.6?


Include platform in cache path

Should be able to support cross-compilation chains for free by including target platform in the cache path
% ghc --info | grep "Target platform"
 ,("Target platform","x86_64-apple-darwin")

might need to include both host and target, not sure, I will make the change first and test with a halvm / musl crosschain.
worth doing (timed with #102 ) next time a cache-breaking change is on the cards

(worth doing because I want to use it, no other reason)


Auto-generated API examples

Codex for example requests and responses would be pretty sweet

out of scope.


Auto-completion for the Evaluator rules example

Please have a look at the individual commit messages for the details.

Merging despite the unrelated test failures.


missing fields

Some of your admin methods are missing attributes, like apps().  Id, name and description is returned but when you look at the documentation  https://learn.microsoft.com/en-us/rest/api/power-bi/admin/apps-get-apps-as-admin#code-try-0
You see workspace id, published by and last update are available. However, their documentation doesn't show it but references it later.
Groups was another example where what the library is returning is missing attributes listed in the documentation.

I'll take a look. If you're able to, can you use the documentation's "Try it" functionality to make a request using the admin apps endpoint you mentioned above? I'd be interested to know what comes back and if that contains the missing attributes.
The way the library is supposed to work, is it will look at the json returned by the api and add any keys it finds as attributes to its objects, such as App or Group. It seems from what you've mentioned the objects that came back from apps() have id, name and description, which suggests api returned them and they were parsed correctly. My guess is the library wasn't able to parse the remaining attributes, or they weren't provided by the api.

This is what apps returns.  Although the Users never returns for any of mine.
{
<EMAIL_ADDRESS>"http://wabi-south-central-us-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#apps",
"value": [
{
"id": "15229df0-c0c0-4393-932f-8ff206f5dfbc",
"name": "Operations",
"lastUpdate": "2023-07-12T00:22:39.273Z",
"description": "Operating Site Details",
"publishedBy": "Carolyn Oran",
"workspaceId": "fea56482-cda6-413b-acc0-09497b0f727d",
"users": []
},
{
"id": "88cc54ef-f59f-4785-9698-d560243ccc2c",
"name": "Business Development",
"lastUpdate": "2022-06-02T17:20:25.161Z",
"description": "Global Pipeline",
"publishedBy": "Saraa Pengte",
"workspaceId": "26b65433-1efe-4b21-8544-b46568ba5bb5",
"users": []
},
{
"id": "8d06702a-f26a-42f8-8282-663a2257d76d",
"name": "PEGTEST03A",
"lastUpdate": "2019-01-23T17:39:03.984Z",
"description": "test",
"publishedBy": "Parinaz Kallick",
"workspaceId": "e8ab5ad4-3fdf-4ca3-b138-b97afc1f2631",
"users": []
},
{
"id": "146e0d74-292d-409b-b907-3928b4815935",
"name": "Projects",
"lastUpdate": "2023-09-20T23:32:17.106Z",
"description": "Project Overview",
"publishedBy": "Carolyn Oran",
"workspaceId": "118d4150-a869-48df-a895-1f31b3563a48",
"users": []
},
{
"id": "5c9e0966-1292-4bf4-9e88-4aa5c8cca0fc",
"name": "Project Controlling",
"lastUpdate": "2023-12-08T00:02:04.342Z",
"description": "Project Controlling App",
"publishedBy": "Carolyn Oran",
"workspaceId": "b0fd4607-2eeb-40de-823b-b01feaea5a3a",
"users": []
}
]
}

I also mentioned groups, here's what that returns:
{
<EMAIL_ADDRESS>"http://wabi-south-central-us-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#groups",
<EMAIL_ADDRESS>1691,
"value": [
{
"id": "d187e338-c90d-4724-a12b-6a2514cadba7",
"isReadOnly": false,
"isOnDedicatedCapacity": false,
"capacityMigrationStatus": "",
"description": "Dynamics 365 Reporting",
"type": "Workspace",
"state": "Active",
"hasWorkspaceLevelSettings ": false,
"name": "D365 Reporting"
},
{
"id": "26b65433-1efe-4b21-8544-b46568ba5bb5",
"isReadOnly": false,
"isOnDedicatedCapacity": true,
"capacityId": "879A6594-2392-4B6E-BD3E-83B4B427BA17",
"capacityMigrationStatus": "Migrated",
"defaultDatasetStorageFormat": "Small",
"type": "Workspace",
"state": "Active",
"hasWorkspaceLevelSettings ": false,
"name": "Business Development"
},
{
"id": "fea56482-cda6-413b-acc0-09497b0f727d",
"isReadOnly": false,
"isOnDedicatedCapacity": true,
"capacityId": "879A6594-2392-4B6E-BD3E-83B4B427BA17",
"capacityMigrationStatus": "Migrated",
"defaultDatasetStorageFormat": "Small",
"type": "Workspace",
"state": "Active",
"hasWorkspaceLevelSettings ": false,
"name": "Operations"
},
{
"id": "4c4b19b6-a895-467a-b286-cb4603c4f4f4",
"isReadOnly": false,
"isOnDedicatedCapacity": false,
"capacityMigrationStatus": "",
"description": "Data based off PegDev18A environment",
"type": "Workspace",
"state": "Active",
"hasWorkspaceLevelSettings ": false,
"name": "PEGDEV18A"
},
{
"id": "b46ecffa-b2d0-4c46-ada8-753a4d96ff82",
"isReadOnly": false,
"isOnDedicatedCapacity": false,
"capacityMigrationStatus": "",
"description": "pegtest01362a573c9869321ddevaos.cloudax.dynamics.com",
"type": "Workspace",
"state": "Active",
"hasWorkspaceLevelSettings ": false,
"name": "PEGTEST01DEV"
}
]
}

Thanks for that. When I test with your data I'm able to see Group and App objects with all the fields that are returned by your api, for both apps and groups. This would indicate the library is handling the data as expected. Are you able to test for the existence of the attributes on the objects that are returned by admin.apps() and admin.groups()?
Something like this should do it, and return True for all of the print() lines. Let me know if that works.
apps = admin.apps()

print(hasattr(apps[0], "workspace_id"))
print(hasattr(apps[0], "published_by"))
print(hasattr(apps[0], "last_update"))

A couple of other things. The library converts the JSON key names to snake case to be consistent with Python. If you're looking for workspaceId, this would be turned into workspace_id.
The API only includes data for a given object if that data is available. If the data isn't set, access restricted, etc., then the api wont return it. Because of this you'll get some library objects with an attribute and some without. So in your groups data above, only some of the Group objects will have a default_dataset_storage_format attribute.
To get the extra information that's shown in the examples in the groups documentation, you'd need to include the expand argument, which takes a list of types e.g., users, reports, dashboards. This tells the api you want more information included on the object.
groups_extra = admin.groups(expand="reports, datasets")

Hope that makes sense.

Thank you for your response, it helps a lot!!


Loading project resets current user settings

Props like "host", "port" or "name" are cleared.

Not related to the rex web service.


How to create animation component with moti?

Hi, I want to create a custom animation component with Moti, how can I do it?
Ex: I'm using LinearGradient I want to custom like Animated.createAnimatedComponent(LinearGradient) and then I can using animation for this component

https://moti.fyi/api/motify


Plumb dynamic shape support through for Vulkan and VMVX

This commit plumbs dynamic shape support through for both Vulkan and
VMVX. They rely on 1-D MemRef and running FlattenMemRefSubspanPass
in advance, instead of MemRef descriptors.
In order to enable dynamic shape support, we need to carry the
SSA values for dynamic dimensions down the CodeGen pipeline so that
we can linearize the index calculation in FlattenMemRefSubspanPass.
We have such information tightly associated with various ops at
the Flow level, but when outlining executables and materializing
HAL interface, the association is broken down. Instead, tie_shape
ops are used to carry such information. It's structually difficult
to maintain and convert.
So this commit changes the hal.inteface.binding.subspan to carry
the dynamic dimension SSA values by itself, like many other ops
in Flow/HAL. It's a natural change that simplifies lots of analysis
and transformation. For example, we don't need to maintain the two
step conversion at CPU side (first generating an undefined MemRef
descriptor when handling the subspan op, and then filling its
content when handling the tie_shape op). It also makes the
interals of HAL more akin to Flow on this front.
Other changes are mostly natural based on that:

MaterializeInterfaces picks up the information from tie_shape
ops and attaches them to subspan ops.
FlattenBindingSubspan reads the dynamic dimensions to perform
index linearization.
ConvertToLLVM now generates the full MemRef descriptor from
subspan ops.

It needs https://github.com/llvm/llvm-project/commit/a5621e26dbc90be3d5af164978f6fcc398f0a1d1 to be pulled in via integration. So right now the tests will fail.

Thanks! A fairly big change. Ill take a look soon.

Haven't reviewed but just saw this go by. And big +1. Thanks, Lei, for a grungy but necessary chunk of work!

@MaheshRavishankar: Previously I didn't check integration tests. It was failing and revealed that we need some more patterns. So I put up another commit 78aac38 to address that. It's non trivial change; so PTAL.
Also @stellaraccident to confirm the patterns in 78aac38 for folding tensor.dim/memref.dim over shape carrying ops. I slotted it in the shape dialect transformations. That's the place I found most natural. But let me know if there is a better place. (Or maybe there are existing patterns!)


(ccleaner) Is: 5.92.9652 available: 6.02.9938

A message just dropped from CCleaner that 3 updates have already been missed and the installed version is significantly out of date.
Checklist

[X] I have checked the moderation queue that no new version has been submitted (only visible when logged in), or the submitted package version has failed the automated checks.

Please navigate to the following link to view the moderation queue.

[X] I have verified that the new version is a stable release.
[X] I have looked to see if there are any Bug reports that prevents a new version being submitted and that no existing Outdated Reports have been created.
[X] I have verified the new version has a Windows binary (EXE or MSI installer, Zip or other archive, etc).

New Software Version
6.02.9938
Download location
https://www.ccleaner.com/de-de/ccleaner/update?v=5.92.9652
Package Page
https://community.chocolatey.org/packages/ccleaner

This is outdated because the auto-update script for CCleaner is currently broken (see #1960). I have a pull request currently awaiting review to resolve this. Once a fix is merged in, this should be resolved after the next scheduled update run.

@forenta an updated CCleaner package, version 6.02.9938, has been pushed and is approved thanks to the PR from @brogers5.


chore: promote chartmuseum to version 2.14.2

chore: promote chartmuseum to version 2.14.2
this commit will trigger a pipeline to generate the actual kubernetes resources to perform the promotion which will create a second commit on this Pull Request before it can merge

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign
You can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Test name
Commit
Details
Rerun command

verify
2c673ded05978b72b2dafec3d34e868df5a655b0
link
/test verify

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 jenkins-x/lighthouse repository. I understand the commands that are listed here.


Integrates OpenSAML 4.3 with SAML authenticator

Description
In order to exclude permission org.opensearch.secure_sm.ThreadPermission "modifyArbitraryThread"; we must use the dedicated cleaners thread factory in OpenSearch. Since OpenSAML packages are sealed it it impossible to replace CleanerSupport class with our own solution. Instead we have to change configuration of how such objects should be parsed. There are only 2 classes in the library which use CleanerSupport:

X509CertificateImpl
X509CRLImpl

This fix uses the same solution as in OpenSAML and replaces CleanerSupport with our custom implementation CleanerFactory.
Issues Resolved
#2989
Check List

[ ] New functionality includes testing
[ ] New functionality has been documented
[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta and @DarshitChanpura comments addressed

@reta I've resolved the conversations since you've given your approval.
@willyborankin will current tests be sufficient to verify the intended behavior after this integration? If so could you please point to those tests. If not, we should probly add some

@willyborankin Is this ready to be backported to 2.x?

@willyborankin Is this ready to be backported to 2.x?

@DarshitChanpura lets see how it will behave with other tests. If it is ok lets add the label.


Activate NCTL when running on DRONE

This PR ensures that NCTL is available for Python subprocesses via modifying .bashrc, but only if DRONE_BRANCH env variable is set.
Partially fixes #3862

bors r+


Should direction of vehicle be passed as heading or azimuth.

In the docs, under the tracker section, there is a list of parameters in the request listed.
One of the params is heading, but in the source code in the https://github.com/bmwcarit/barefoot/blob/master/src/main/java/com/bmwcarit/barefoot/matcher/MatcherSample.java, in the lines  91-102 there is:
    public MatcherSample(JSONObject json) throws JSONException {
        super(json);
        id = json.getString("id");
        String wkt = json.getString("point");
        point = (Point) GeometryEngine.geometryFromWkt(wkt, WktImportFlags.wktImportDefaults,
                Type.Point);
        if (json.has("azimuth")) {
            azimuth = norm(json.getDouble("azimuth"));
        } else {
            azimuth = Double.NaN;
        }
}

Constructor checks for "azimuth" in the json.

The azimuth is a more precise description of the heading. I will correct the documentation.

Fixed.


Update ratelimit docs to include QuotaSpec and QuotaSpecBinding

I updated the rate-limiting documentation to use samples/bookinfo/kube/mixer-rule-ratings-ratelimit.yaml for the example because the current doc does not work because it is missing QuotaSpec and QuotaSpecBinding.
I also added a bit more detail about all the things that mixer-rule-ratings-ratelimit.yaml creates.
Addresses: https://github.com/istio/issues/issues/257
Code Change: https://github.com/istio/istio/pull/4576

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
Assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Hi @anandkumarpatel. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
I understand the commands that are listed here.

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.

/assign  @ZackButcher

I suggest adding this to the document.   @ayj is the "current" namespace used when nothing is specified? If so we should get rid of all namespace attributes.
apiVersion: config.istio.io/v1alpha2
 kind: QuotaSpec
 metadata:
   name: requestcount
 spec:
   rules:
   - quotas:
     - charge: 1
       quota: requestcount
 ---
 apiVersion: config.istio.io/v1alpha2
 kind: QuotaSpecBinding
 metadata:
   name: requestcount
 spec:
   quotaSpecs:
   - name: requestcount
   services:
   # Must include namespace if the services are in a
   # different namespace than this QuotaSpecBinding resource
   - name: ratings
   - name: reviews
   - name: details
   - name: productpage

namespace was required last I checked, despite the comment in istio/api saying its not. I'm not sure if this bug was carried over to the new v2 mixer plugin.

@ostromart how is v2 mixer plugin code dealing with quotaspec / binding ?
Please check the above comments by me and ayj.

I see, I can make these changes in a followup PR. At the moment just the basic plugin restructure is still in review. v1 code is basically copied to v2 so it will be easy to make such changes.

https://github.com/istio/istio/pull/4718

@anandkumarpatel: PR needs rebase.

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.

@mandarjog @ayj Can we proceed to merge this?

@ostromart, is namespace defaulting working with v2 mixer plugin?

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: anandkumarpatel
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: geeknoid
Assign the PR to them by writing /assign @geeknoid in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/assign @geeknoid

what is the status here?  also, do the routing rules need to be updated to v1alpha3?

lgtm but conflicts need to be resolved.

I've rebased and fixed a couple things for this to continue in #1390. Still though, as I run through the doc for the latest daily release (05/30), I can't get Istio to route traffic to reviews-v2 for Jason to get through the prerequisites.

hey @anandkumarpatel thanks for the PR. Since we wanted to get this in today, someone had to take over this work. Thanks again.