[Feature Request] Make dropdown-item command any type

Existing Component
Yes
Component Name
el-dropdown-item
Description
Currently el-dropdown-item's command property must be a string.
I might be missing the point, but it would be much more useful to me if it could be an object.
If you agree I can provide a pull request.

PR welcome.


supporting code samples for multipart file upload

CLI Version (from fern.config.json)
0.46.1
Minimal API Specification
openapi: 3.0.0
info:
  title: Demo API
  version: "0.1"
paths:
  /v2/conversations:
    post:
      operationId: createConversation
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  description: Files with local file paths
                  items:
                    type: string
                    format: binary
      responses:
        '200':
          description: OK
      x-fern-examples:
        - code-samples:
            - language: curl
              code: curl https://yahoo.com/
            - language: python
              code: print("hello”)

Actual UI Behavior
There’s no dropdown to pick the language for the sample code, and the sample code provided in openapi.yaml is ignored. Fern-generated code is shown instead.

Expected UI Behavior
There should be a dropdown to pick the language for the sample code, and the sample code provided in openapi.yaml should be displayed.
Steps to Reproduce
Start up a docs site with this openapi.yaml and visit the API reference page for Conversations/post.
Environment Details
Chrome 131, Safari 18.1.1, macOS 15.1

This is a high-priority issue for us, since we rely on hand-written, heavily commented SDK sample code in the API reference pages to serve as the main reference material for our SDK.


fix sendMessage for channels

PR Details
fixes sendMessage for channel messahges
Description
isNewsletter Property is no longer present (undefined), checking channel by chat Id now
How Has This Been Tested
tested by sending messages in channels,
Types of changes

[ ] Dependency change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[x] My code follows the code style of this project.
[ ] I have updated the documentation accordingly (index.d.ts).
[ ] I have updated the usage example accordingly (example.js)

A much better solution has been applied by @alechkos  already :)


Stream tojson

I have refactored _tojson to stream strings and reuse concatenations. It is now significantly faster, and has fully recovered from the performance regression when I added colors in https://github.com/wader/jqjq/pull/14.
Since jq is buffered by default, I saw no penalties from streaming tiny strings instead of concatenating into larger chunks like lines. There may be a sweet spot for chunk sizes that would suit jq --unbuffered and gojq, but I didn't benchmark it carefully like the rest.
Benchmarks
The . benchmark exercises the streaming behavior and the tojson benchmark collects it into an array and joins it. Notice that streamed (tojson) is now on faster than before-colors (tojson), so that performance loss has been fully regained. before-colors (.) is actually deceptive, because that revision dumped using host tojson instead of _tojson. There's no good comparison for ., but it seems to be as expected, matching tojson.

streamed: d6d9e4e2524baadd3322cb2d0979f76a7af5b03e (Fold newline into indent prefix, 2024-03-08), i.e., this PR
master: d0fdc43b71d285198ab4b712a1c3eb7554563d7c (Make eval work in eval, 2024-03-08), i.e., origin/master at the time of this PR
master-passthrough: d0fdc43b71d285198ab4b712a1c3eb7554563d7c (Make eval work in eval, 2024-03-08) with _tojson stubbed with host tojson
after-colors: 0532d9c7e08518ca90812021da5164957b2f937b (Fix --help with --join-output, 2024-02-07), i.e., the final commit related to color support
before-colors: 8a02423cabb05a4467b27738d3add579822d3d14 (Add query? shorthand for try query catch empty, 2024-01-30), i.e., the commit before I added color support

Command
Mean [s]
Min [s]
Max [s]
Relative

streamed/jqjq . < large.json
2.004 ± 0.132
1.845
2.222
1.69 ± 0.13

streamed/jqjq tojson < large.json
2.124 ± 0.148
1.957
2.471
1.80 ± 0.15

master/jqjq . < large.json
3.085 ± 0.152
2.870
3.364
2.61 ± 0.17

master/jqjq tojson < large.json
2.630 ± 0.052
2.560
2.702
2.22 ± 0.10

master-passthrough/jqjq . < large.json
1.436 ± 0.153
1.319
1.748
1.21 ± 0.14

master-passthrough/jqjq tojson < large.json
1.273 ± 0.041
1.200
1.337
1.08 ± 0.06

after-colors/jqjq . < large.json
2.926 ± 0.266
2.715
3.472
2.47 ± 0.25

after-colors/jqjq tojson < large.json
2.480 ± 0.045
2.418
2.569
2.10 ± 0.10

before-colors/jqjq . < large.json
1.183 ± 0.050
1.127
1.260
1.00

before-colors/jqjq tojson < large.json
2.213 ± 0.076
2.120
2.321
1.87 ± 0.10

Generated with:
#!/usr/bin/env bash
set -eEuo pipefail

mkdir bench
cd bench
git worktree add streamed           d6d9e4e2524baadd3322cb2d0979f76a7af5b03e
git worktree add master             d0fdc43b71d285198ab4b712a1c3eb7554563d7c
git worktree add master-passthrough d0fdc43b71d285198ab4b712a1c3eb7554563d7c
git worktree add after-colors       0532d9c7e08518ca90812021da5164957b2f937b
git worktree add before-colors      8a02423cabb05a4467b27738d3add579822d3d14

# Stub _tojson to replace it with host tojson
patch -p1 -d master-passthrough <<EOF
diff --git a/jqjq.jq b/jqjq.jq
index 2500cc6..f7f2c85 100644
--- a/jqjq.jq
+++ b/jqjq.jq
@@ -1220,7 +1220,8 @@ def _tojson(\$opts):
   | _f(\$o; \$o.indent * " ")
   | if type == "array" then flatten | join("") end
   );
-def _tojson: _tojson({});
+def _tojson(\$opts): tojson;
+def _tojson: tojson;

 def undefined_func_error:
   error("undefined function \(.name)");
EOF

git clone --depth=1 https://github.com/wspace/corpus
find corpus -name project.json | sort | xargs cat > large.json

hyperfine \
  -L filter .,tojson \
  -L worktree streamed,master,master-passthrough,after-colors,before-colors \
  --export-json bench.json \
  --export-markdown bench.md \
  '{worktree}/jqjq {filter} < large.json'

# cd ..
# rm -rf bench
# git worktree prune

Yeah, it could probably use some of those. jq's tests which cover colors are written in bash, so it would entail writing more bash 😈. It might be possible in jq even without the dlopen branch, but I haven't thought about it.
Good thing you mentioned it, though. I ran my local test from when I was fixing reset consistency with jq colors, and found a bug, which has now been patched.

I wonder if we could extend the test format somehow to make it nicer new lines in the output and maybe escaped hex etc? maybe some kind of "raw" string mode for outputs?

👍 i try to add tests even for the most trivial things in my projects, i just don't trust myself :)

Or there could be a flag to fromjson the .test output to get the raw output?

Or there could be a flag to fromjson the .test output to get the raw output? Then we could write the expected output with escapes.

Could you give an example?
My aim is mostly to not end up with tests where the expected output is one-liner messes, i'm thinking something:
"aaa\n\bbb\nccc\n", "hello"
null
"""
aaa
bbb
ccc
"""
"hello"

I think multiline strings would solve part of it (though since the closing delimiter starts a line, we'd need to ignore the LF before it, so we could differentiate text with a trailing LF and without).
The bigger problem I see is that we have no way to configure the CLI options passed. Perhaps a directive like !options --color-output --raw-output0, which is invalid jq syntax, could be the first thing in the test case and supply the CLI invocation.

I think multiline strings would solve part of it (though since the closing delimiter starts a line, we'd need to ignore the LF before it, so we could differentiate text with a trailing LF and without).

Yeap!

The bigger problem I see is that we have no way to configure the CLI options passed. Perhaps a directive like !options --color-output --raw-output0, which is invalid jq syntax, could be the first thing in the test case and supply the CLI invocation.

That would be great. for fq i made the test format be more or less a "transcript" so that tests looks exactly like normal shell invocations, ex https://github.com/wader/fq/blob/master/pkg/interp/testdata/debug.fqtest, that has worked very well. Also makes it quite easy to automatically rewrite expected with new actual output. (Just don't look at the implementation, is a less)

I really like the format in your fq tests. Using $ as the prefix doubles as invalid jq syntax, so it couldn’t be confused. I’d only change it to add an LF between tests.
Is the hacky part of it the quote handling? I was annoyed recently with fromjson not interacting nicely with single quotes. Maybe it could be done by replacing " with something from the Unicode private use area, then ' with ", passing it to fromjson, then restoring ".

I really like the format in your fq tests. Using $ as the prefix doubles as invalid jq syntax, so it couldn’t be confused. I’d only change it to add an LF between tests.

Yes might be good idea, it can feel a bit cramped now

Is the hacky part of it the quote handling? I was annoyed recently with fromjson not interacting nicely with single quotes. Maybe it could be done by replacing " with something from the Unicode private use area, then ' with ", passing it to fromjson, then restoring ".

The thing that caused a bit of problem in the beginning was how to split the different tests when you only the the prompt to split on, is especially with the REPL support. At the moment the transcript parser is mess of balanced regex :) https://github.com/wader/fq/blob/master/internal/script/script.go#L467 :shame:


TO-DO: 'anywhere()' Method Implementation

Implement method for searching arrays | DOM objects for a subject/index. (To-do)

This enhancement is no longer required or necessary. Issue will be closed.


Maintainer lost interest?

Hello all!
It looks like this maintainer lost interest in the project?
We are willing to take it forward.
@lvoogdt hi?

Hello everyone.
We made a fork and this is avaliable here: https://github.com/sigma-geosistemas/Leaflet.awesome-markers
Please direct the pull requests there.

hi @george-silva , in your fork you somehow forgot to keep the connection to the original repository.
I guess better fork is kidk/Leaflet.awesome-markers, which is connected and looks rather active.

@mfrasca I asked the github folks to disconnect the fork from the main repository, because without that we would not have issues enabled.


the number of signals is bigger than the number of axons

This is not feasible so we should check what are we doing wrongly.
Add this assert to spot the problem:
		// if(n.astrocyte.availableEnergy<=astrocyte_settings.minEnergy)
		// n.astrocyte.replenish();
	}
	assert(this.allSignals.length < this.allAxons.length);
	if(this.logger != null){
		if(this.logger.getLastEntry() >= 19){
			this.logger.sendToServer();

I think the number of signals can be more than the number of axons because a new signal can be generated before the signal reaches the neuron.

Yes, that is true.
Actually, given the speed of the signal, we may have up to 30 times more signals than axons. The question is: do we want that?

Personally I would say no because of computation cost, but I think the issue is around biological plausibility. When we decouple the display from actual simulation we could just display one signal per axon. It would make the computation a lot faster on the display side.

I think this means that our post-firing inhibition (the refractory period) is too short or too weak. We don't want to artificially restrict the number of signals, but we want to tune the parameters so that the number of signals would never be more than the number of axons (2 signals on an axon at 1 time).

I don't think we have a refractory period built in. So I guess this can be done when we switch the replenish clock over to a tick based method instead of actual time.


Is PullApprove still necessary?

Hi @opencontainers/image-tools-maintainers!
Are you still using PullApprove for this project?  It looks like this one is the only project that still has a .pullapprove.yml file and GitHub's branch protection now supports effectively the same approval rules.  As PullApprove is a paid service, if we're not using it we can save a bit in the OCI budget.
Thanks!
Sam

I don't think so, it's not intentional at least.
We do have an alternative tool we are using in CNCF that could be a more effective replacement down the line if we needed something fancy: https://github.com/cncf/gitvote


cannot install ctypes.0.17.1 on ocaml-4.10.0

The following actions will be performed:
  ∗ install ctypes 0.17.1

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ctypes.0.17.1] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ctypes failed at "/home/berenger/.opam/opam-init/hooks/sandbox.sh build make XEN=disable libffi.config".

#=== ERROR while compiling ctypes.0.17.1 ======================================#
# context              2.0.3 | linux/x86_64 | ocaml-base-compiler.4.10.0 | git+https://github.com/ocaml/opam-repository.git
# path                 ~/.opam/default/.opam-switch/build/ctypes.0.17.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build make XEN=disable libffi.config
# exit-code            2
# env-file             ~/.opam/log/ctypes-10370-d2c37b.env
# output-file          ~/.opam/log/ctypes-10370-d2c37b.out
### output ###
# [...]
# ./src/discover/determine_as_needed_flags.sh >> asneeded.config
# ocamlfind  ocamlc -o discover -package str -strict-sequence -linkpkg src/discover/commands.mli src/discover/commands.ml src/discover/discover.ml -I src/discover
# ./discover -ocamlc "ocamlfind  ocamlc" > libffi.config || (rm libffi.config && false)
# testing for brew: .............................. available
# testing for MacPorts: .......................... unavailable
# Fatal error: exception Stdlib.Exit
# ocamlfind  ocamlc -o discover -package str -strict-sequence -linkpkg src/discover/commands.mli src/discover/commands.ml src/discover/discover.ml -I src/discover
# ./discover -ocamlc "ocamlfind  ocamlc" > libffi.config || (rm libffi.config && false)
# testing for brew: .............................. available
# testing for MacPorts: .......................... unavailable
# Fatal error: exception Stdlib.Exit
# make: *** No rule to make target 'libffi.config'.  Stop.

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ctypes 0.17.1
└─
╶─ No changes have been performed

opam pinning to the git repos. does not help

maybe related to https://github.com/ocamllabs/ocaml-ctypes/issues/647

I cannot reproduce, but this is the second time I end up in an opam and system state where ctypes cannot be installed...

If I opam uninstall ctypes-foreign, then ctypes installs successfully... ?!

The ctypes opam build instructions build the foreign subpackage only if ctypes-foreign is installed.

Just for the record:
opam depext -i ctypes-foreign ctypes # fails with the above error
opam remove ctypes-foreign; opam install ctypes # just works


Porting to a non-arduino framework

Just a few queries about porting to a non arduino framework.
I browsed through the source code and found that all the classes for the specific chips inherits the Module Class which contains the methods for interfacing with the SPI driver from the arduino framework.

If I need to port the library, I just need to replace the methods from the Module Class right? Specifically on Module::SPItransfer and the Module::init functions right?
the SPI mode here is half-duplex right?

Pretty much, all platform-dependent code should be in the Module class (let me know if that's not the case). Apart from what you already listed, you will also have to modify the constructor since it's using SPIClass.

Yes, SX127x chips do not send any information back during SPI transfer from master, so it's all just half duplex.

Got it to work on my device now. I just copy-pasted each function to make it easier to check if there's some things i needed to change and I had to drop the Physical Layer Class.
Closing this issue now.


purpose of elastic search

Hi, can u tell me the purpose of elastic search in this project, does it use for Full-text search

This project died

This project died

but do u remember why u use elastic search ?

thank, u mean all my log will collect from flutent, file beat.... and save it on Elastic search ?

Read the document.

I think it's strange to ask for support from a dead project. Please use it if you can solve it yourself.


I am running command line, python runpy --task "my task" --model "gpt-4"

the task was running successfully and i am also able to see that the running_records folder getting updated, but local_workspace is always empty not sure may i know what would be the reason or rather i want to know what happened to all the generated content

local_workspace empty

Task completion screenshot from terminal

local_workspace currently is used to store the temporal files, you can get your entire workspace in the running_records//workspace.zip at this time. We will work on to fix that

hey @luyaxi thanks for the comment but unfortunately i don't see the workspace.zip inside running_records  also i have checked the enitre local repo there is no such zip file

sorry ignore this comment i can see it now thank you @luyaxi for the update


Slow/Speedup

Hi!
Is there a way to speedup the lookup?
Any ideas?
Many thanks for the great work!!!!!!!!!!!

Yes, I do massive lookup...
Any idea on how to avoid to read each time the file?
It's not a big problem...but if there's a way to avoid the multiple read it would be great!
Again...great work! I'll put credits to you in my website (it's a NO-PROFIT WEBSITE!!! it just manage an award of my clubstation)

Then I understand the problem a little better. I'll take a look.
I have a few things that needs to be fixed at the same time. I'll let you know.

Soooooooooooo many thanks!

I pushed an update now. Should speedup things. Need to init class first (since consctructor reads cty-file) then run the lookup. Take a look in index.php how I did it.
This made a big difference when testing locally. Please let me know how it goes.

I'll try asap (tomorrow...I'm out of my qth till tomorrow) and let you
know!!!
Many thanks!
Mike iu5hes
Il giorno mer 22 mar 2023 alle ore 12:30 Andreas Kristiansen <
@.***> ha scritto:

I pushed an update now. Should speedup things. Need to init class first
(since consctructor reads cty-file) then run the lookup. Take a look in
index.php how I did it.
This made a big difference when testing locally. Please let me know how it
goes.
—
Reply to this email directly, view it on GitHub
https://github.com/AndreasK79/dxcc-lookup/issues/2#issuecomment-1479394105,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANMKIJ7YORAW4Q34VGR5KLW5LPGVANCNFSM6AAAAAAWA6HEYQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


PyDIP: WienerDeconvolution not found on MacOS

Component
PyDIP, installed via 'pip install diplib'.
Describe the bug
Cannot import WienerDeconvolution from diplib on MacOS.  Other functions, such as BilateralFilter, UnsharpMask, and Gauss import successfully and are well-behaved.
To Reproduce
At an interactive Python prompt or in a Jupyter notebook, enter 'from diplib import WienerDeconvolution'.  The result:

DIPlib -- a quantitative image analysis library
Version 3.1.0 (Sep 24 2021)
For more information see https://diplib.org/
ImportError                               Traceback (most recent call last)
Input In [1], in
----> 1 from diplib import WienerDeconvolution
ImportError: cannot import name 'WienerDeconvolution' from 'diplib' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/diplib/init.py)

On Windows 11 Pro (Version:	10.0.22621 Build 22621, Processor: AMD Ryzen 7 3750H) WienerDeconvolution imports successfully and is well-behaved.
System information:
Reproduced on two systems.

MacOS Monterey Version 12.3.1, Python 3.8.0
MacOS Catalina 10.15.7, Python 3.8.13

The Python bindings for this function was added in 3.4.0. You can update your DIPlib installation with pip install -U diplib.
I had to look though the git history to find out, apparently we forgot to add this function name to the change log for PyDIP: https://diplib.org/changelogs/diplib_3.4.0.html I'll update the change log.

Thanks!  Unfortunately, on MacOS, 'pip install -U diplib' does not update to 3.4.  If I do pip install diplib==3.4, I get

ERROR: Could not find a version that satisfies the requirement diplib==3.4 (from versions: 3.0b5, 3.0b6, 3.0b7, 3.0b8, 3.0.0, 3.1rc1, 3.1.0)
ERROR: No matching distribution found for diplib==3.4

On Windows 11, I have what appears to be the latest, 3.4.1.

Are you using a very old version of Python maybe? The latest release, 3.4.1, is supported for Python versions 3.9 to 3.12.

Python 3.8 in both cases.

This is the installation file for Intel Macs: https://files.pythonhosted.org/packages/25/dc/fa20e4298c8750ec3c60ea283cd55cf75902604acb7bed08449160708648/diplib-3.4.1-cp38-cp38-macosx_12_0_x86_64.whl
and for Apple Silicon Macs: https://files.pythonhosted.org/packages/2c/4e/8c1c5c07a3473a23bb574be4f72172fee7a8ea978d32970ed9404ee74916/diplib-3.4.1-cp38-cp38-macosx_12_0_arm64.whl
The files are there, you should be able to install them with pip. Maybe your pip is configured to search a different repository?
What do you see when you do
pip download -v -v "diplib"  | grep 'location(s) to search' -A5

I see this:
1 location(s) to search for versions of diplib:
* https://pypi.org/simple/diplib/
Fetching project page and analyzing links: https://pypi.org/simple/diplib/
Getting page https://pypi.org/simple/diplib/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/diplib/" in the cache

In particular, you need to see "https://pypi.org". If you see a different URL there, then it's a repository that made copies a long time ago and hasn't updated. We push installation files only to pypi.org.

'pip download -v -v "diplib"  | grep 'location(s) to search' -A5' gives this:

1 location(s) to search for versions of diplib:

https://pypi.org/simple/diplib/
Fetching project page and analyzing links: https://pypi.org/simple/diplib/
Getting page https://pypi.org/simple/diplib/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/diplib/" in the cache

which appears to be identical.

This is weird!
Can you download the wheel https://files.pythonhosted.org/packages/25/dc/fa20e4298c8750ec3c60ea283cd55cf75902604acb7bed08449160708648/diplib-3.4.1-cp38-cp38-macosx_12_0_x86_64.whl and then install it with pip install <filename.whl>?

Oh, are you on an old version of macOS? 3.1.0 was built for macOS 10.15, starting with 3.2.0 we built for macOS 11.0, and 3.4.1 was built for macOS 12.0.
I hadn’t really been paying attention to the target OS version…

Yes, I'm on Monterey 12.3.1.  Nonetheless, when I try 'pip install diplib-3.4.1[...].whl', I get
ERROR: diplib-3.4.1-cp38-cp38-macosx_12_0_x86_64.whl is not a supported wheel on this platform.
The other user is on Catalina, so that explains his issue.

If you have Monterey and an Intel chip, that wheel should work for you. I cannot explain that error message.
For the older macOS machine, if you're unwilling to upgrade, you'd have to build DIPlib yourself. This is not hard, the most time-consuming part is having to install the build tools if you don't have them already. We have step-by-step instructions: https://diplib.org/diplib-docs/building_macos.html

Thanks!  And thanks for diplib and PyDIP, a big performance improvement over scikit-image!


Flare link 404s

Clicking Flare goes to https://flareapp.io/docs/ignition-for-laravel/sharing-errors which 404s.

Thanks for reporting, this has been fixed!


Error: pg_restore draws error due to non-existant 'dkakkar' role

[jbrown613@holy7c12307 partisan]$ time pg_restore -j 8 -h localhost -p 9509 -d partisandb /n/holyscratch01/enos_lab/jbrown613/partisan/usvotersdbcompressed.pgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 197; 1259 16385 TABLE partisan dkakkar
pg_restore: [archiver (db)] could not execute query: ERROR:  role "dkakkar" does not exist
Command was: ALTER TABLE public.partisan OWNER TO dkakkar;

[jbrown613@holy7c12307 partisan]$ time pg_restore -j 8 -h localhost -p 9509 -d partisandb /n/holyscratch01/enos_lab/jbrown613/partisan/usvotersdbcompressed.pgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 197; 1259 16385 TABLE partisan dkakkar
pg_restore: [archiver (db)] could not execute query: ERROR: role "dkakkar" does not exist
Command was: ALTER TABLE public.partisan OWNER TO dkakkar;

The default dump also dumped the grants/privileges for the table. I will create a new dump without grants.

[jbrown613@holy7c12307 partisan]$ time pg_restore -j 8 -h localhost -p 9509 -d partisandb /n/holyscratch01/enos_lab/jbrown613/partisan/usvotersdbcompressed.pgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 197; 1259 16385 TABLE partisan dkakkar
pg_restore: [archiver (db)] could not execute query: ERROR: role "dkakkar" does not exist
Command was: ALTER TABLE public.partisan OWNER TO dkakkar;

Could you try to restore /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbnew.pgsql instead?

The code that drew that message just finished running. You want me to run:
time pg_restore -j 8 -h localhost -p 9509 -d partisandb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbnew.pgsql
Correct?

The code that drew that message just finished running. You want me to run:
time pg_restore -j 8 -h localhost -p 9509 -d partisandb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbnew.pgsql
Correct?

Did the code run without error? Are you able to connect to DB?

When I ran the above code, rather than what is in the instructions, I got the following error message:
`[jbrown613@holy7c04204 ~]$ time pg_restore -j 8 -h localhost -p 9972 -d usvotersdb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbcompressed.pgsql
pg_restore: [archiver] could not open input file "/n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbcompressed.pgsql": No such file or directory
real    0m0.294s
user    0m0.001s
sys     0m0.005s`

When I ran the above code, rather than what is in the instructions, I got the following error message:
[jbrown613@holy7c04204 ~]$ time pg_restore -j 8 -h localhost -p 9972 -d usvotersdb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbcompressed.pgsql
pg_restore: [archiver] could not open input file "/n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbcompressed.pgsql": No such file or directory
real 0m0.294s
user 0m0.001s
sys 0m0.005s

There is no such file in the directory. It was a file I created for my reference. Please create your own database dump by following the instructions here for every year you would like to run:
https://github.com/cga-harvard/GIS_Apps_on_HPC/wiki/Loading-and-Exporting-US-voters-database
Then follow the instructions here to run KNN on that year:
https://github.com/cga-harvard/GIS_Apps_on_HPC/wiki/KNN-calculation
As there is a memory constraint (256GB maximum) on GPU memory on FASRC so you would have to run each year separately and state-wise. For bigger states you would have to divide in several chunks. Please start with the smallest state and go to largest to learn the size limit of what FASRC memory could hold. Then for bigger states you would have to divide in that smaller size chunks and run the script for each chunk.

Thank you, does this mean that there will be edge cases, where voters who live close to state boundaries, or to the boundaries of the chunks I create in bigger states, have a distorted partisan footprint, because any neighbors not in the chunk cannot be detected?

Thank you, does this mean that there will be edge cases, where voters who live close to state boundaries, or to the boundaries of the chunks I create in bigger states, have a distorted partisan footprint, because any neighbors not in the chunk cannot be detected?

No, that's not how the script works. When you select a state you only select what voters you would like to find the neighbors for but it will still look for neighbors of those voters in the whole US database to avoid edge case problem.

I have created a new data dump with the 2012 file. When I now go back and get to the step where I run:
time pg_restore -j 8 -h localhost -p 10979 -d usvotersdb /n/holyscratch01/enos_lab/jbrown613/partisan/usvotersdbcompressed.pgsql
I get a message that the role 'dkakkar' does not exist. I get the same message if I instead run:
time pg_restore -j 8 -h localhost -p 10979 -d usvotersdb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbfull.pgsql

I have created a new data dump with the 2012 file. When I now go back and get to the step where I run:
time pg_restore -j 8 -h localhost -p 10979 -d usvotersdb /n/holyscratch01/enos_lab/jbrown613/partisan/usvotersdbcompressed.pgsql
I get a message that the role 'dkakkar' does not exist. I get the same message if I instead run:
time pg_restore -j 8 -h localhost -p 10979 -d usvotersdb /n/holyscratch01/enos_lab/dkakkar/partisan/usvotersdbfull.pgsql

What command did you use to  export the dump file?

My mistake. Looking back my FASRC job timed out before I was able to export. I will re-run all that and update.


Change bar plots to % pixels instead of pixel count

Noting from @kevinyamauchi

Completed in https://github.com/kephale/cryocanvas/commit/48df88c520c258e3809116622330aa7fcc8fb1de


Add suport for emojis in streams/topics titles

I want to suggest adding support for emojis (including custom server emojis) in stream and topic titles using their codes, like :calendar:

claim

@zulipbot claim

#10611 suggested doing this for user names as well.


Wrap PendingProtocolParameters::params into a RawParameter type

This would bring it in line with the other raw byte types.
https://github.com/iotaledger/inx/blob/468e350c7410c16242c3f9aade4a9a5c78237848/proto/inx.proto#L72

Imho it makes no sense, because the bytes cannot be decoded without the other fields in the PendingProtocolParameters


Container.up()

Problem
When I call a function returning a Container, to run that container as a service, I have to run:
dagger call <MYFUNC> as-service up

That is 2 extra functions in the chain, which is cumbersome. It's common to write a wrapper function that returns a Service, for the sole purpose of typing:
dagger call <MY_OTHER_FUNCTION> up

But now I have to maintain one more function, with another name. It's also cumbersome and feels unnecessary.
Solution
Implement Container.up() as an alias for Container.asService.up().
This is similar to Container.directory() for example, which is a thin wrapper for Container.rootfs().directory().

Maybe a separate issue, but Service.Up also has some issues compared to the previous dag.Host tunneling API we used to use.
Specifically - it doesn't return a Service type, it returns Void. This is a bit annoying, since there's no way to Stop it anymore.

@jedevc My understanding is up is specifically designed for the CLI use case, and from code you should just other service APIs like Start and Stop. It's a little weird that the CLI DX creeped into the API, but pragmatism overrode idealism there

@vito I don't think you can start a tunnel to the host without up though? So if I wanted to start a service, and then make a request to it without needing to start another container.

@rajatjindal @marcosnils 🙏 🙏 🙏

I have started the work on this ticket. could someone please assign this to me. thank you.


Sort the Observation periods per person report by % of people

Describe the solution you'd like
The report that lists the number of observation periods per person is sorted by number of observation periods rather than by % of people, making it difficult to read.
Describe alternatives you've considered
Either changing the default sort or allowing the user to sort on the columns would be helpful
Additional context

This was resolved in a prior bug fix, hasn't been pushed to our environment yet.

Thanks so much!


Source code version wasn't updated.

Describe the problem
The version written in source files is 1.1.0.
The current release version is 1.2.1.

I think I will remove version information because, even if I automate this, it creates many differences with forked repositories. so it is not nice.


LEFT() and RIGHT() functions do not work in DruidSQL

Affected Version
0.15.0, 0.16.0-snapshot
Description
LEFT and RIGHT are documented:
https://druid.apache.org/docs/latest/querying/sql

but they do not seem to be supported in Calcite:

Related: https://issues.apache.org/jira/browse/CALCITE-3005
Upgrading to Calcite 1.20.0+ seems to work, investigating/testing more

Also related: https://github.com/apache/incubator-druid/pull/8406


spread operator as arguments and optionals + REST in function parameters throws error

TypeScript Version:  2.0.3
Code
function foo(a?: number, ...args: number[]) {}
foo(...[1,2,3]); // error

var args = [1, 2, 3];
console.log(...args); //error

Your program has an error, it is calling foo with arguments that literally do not match the signature. The same is true about the call to console.log.  An optional argument does not merge with a rest argument of a compatible element type because it is a syntactic feature and the parameters are passed by position. How can we distinguish the arguments and refer to them in the body of foo without this behavior?
The correct way to call foo by spreading ...args into the second parameter is
foo(undefined, ...args);
console.log(undefined, ...args);

I've got a bit similar issue, basically, spread arguments do not translate to multiple arguments.
function test(reg: RegExp, str: string) {
  console.log("abc".replace(reg, str));
}
test(...[ /b/, "d" ]); // TS2346:Supplied parameters do not match any signature of call target.

function test(...args);
function test(reg: RegExp, str: string) {
  console.log("abc".replace(reg, str));
}
test(...[ /b/, "d" ]); // works fine

Pretty annoying, as in pure ES6 it works perfectly :(.

I had the same issue when trying to wrap console.log().
log = function(...args) { console.log(...args) } // typing error here :(

for reference console.log is defined as
Console.log(message?: any, ...optionalParams: any[])

So my code is correct from the type point of view.

How is that a question? Perfectly valid ES6 code throws an error in TypeScript. That's a bug, no a feature.

your correct, relabeling. the issue is tracked by https://github.com/Microsoft/TypeScript/issues/5296

:+1:


0.3.3 version stability degraded

Which OS: OSX
Which LLDB version (lldb -version): 0.3.3
Which VSCode version (Help/About): 1.9.0
What is the problem and how did you get there:
VSCode error during debug: "Unexpected token C in JSON at position 2. Stopping the debug adapter." if some break-point is set. lldb process hangs in task manager.

I have a tentative fix.
Can you please try out this release and let me know if you still see this problem?

Looks like that 0.3.4 works fine

Fixed in 0.3.4


Update DependencyInstaller.sh to support MacOS

Draft PR to support MacOS. Closes #2173.
This isn't a perfect solution to the problem, but I think it's a good start. There are several issues I worked around while making this.

Problem: Homebrew's spdlog does not work out of the box as of right now.
Cause: This has been mentioned a few times in issues such as #2173, #2220, and #2097, but the main issue seems to be that spdlog is dependent on fmt. While fmt 8 works with OpenROAD's code, fmt 9 has more strict standards for conversions of objects into strings for logging, thus resulting in several compiler errors.
Solution: I think that longer term, we simply have to fix all the object to string conversions so that we can upgrade to spdlog 1.10 which depends on fmt 9. This is what Homebrew wants to do, and it makes installing old package versions as difficult as possible. This PR works around this by forcibly installing fmt 8.1.1_1 and spdlog 1.9.2, which I have found to work.

Problem: Some dependencies don't take precedence in the PATH over system-installed libraries, which can cause compilation errors (such as bison)
Cause: /usr/bin tends to be in front of /usr/local
Solution: For right now, I just have the script print commands for the user to copy+paste to update the PATH. This is a dependency script, so it's not expected to build openroad for the user.

Problem: Xcode Command Line Tools and the Xcode app seem to conflict on my system when both are installed.
Cause: Not sure. I have consistently found that openroad has std lib reference issues if the Command Line Tools are installed (e.g. xcode-select --install), regardless of whether the Xcode app is installed. I can only compile if only the Xcode app is installed. I have checked CMakeCache.txt and cmake appears to be pointing to all the right directories (no mixing between the CLT and the app), so I don't know why this fails. Annoyingly, homebrew refuses to install Python if it doesn't detect CLT (even if the app is installed).
My current workaround is to install CLT to install the dependencies, then remove CLT and install the Xcode app to actually build openroad. I sincerely hope this is just a problem on my side and not typical.

The script was tested on an x86_64 macbook running Monterey 12.5.1 with Apple clang version 13.1.6 (clang-13<IP_ADDRESS>.5)
TODO items

[ ] Separate packages into runtime and development
[ ] See if someone can replicate my issues
[ ] Add package(s) to enable GUI

is this ready for review?

Not quite, I'm hoping to get someone else with MacOS to test it out to make sure it works as expected. Also I need to address the TODO items.
If you have feedback, you are welcome to comment though.

I checked out spdlog 1.10.0 on my usual linux machine and OR builds without error.  Are you using an external fmt library?

Yes, Homebrew packages fmt separately from spdlog. There isn't a good way to get spdlog to build with the bundled fmt unless it's built from source.

I was able to reproduce it.  I find the changes to fmt to be horrible...

I was able to confirm that at least 1 other person with a macbook was able to build using the script.
Maybe I can look into FMT_DEPRECATED_OSTREAM from https://github.com/fmtlib/fmt/issues/3081#issuecomment-1238789389 and resolve the spdlog version issue in a separate PR.

lgtm, I'll leave it to @vvbandeira to approve.

Having the right fmt/spdlog combination installed with HomeBrew on a MacBook Air M1 Darwing gets OpenRoad to compile again, thanks.

@vvbandeira can you check on the CI? There seems to be some instability. I was failing CTS tests, then I reran, and now I'm failing read_db even though this PR doesn't touch any source code.
I will work on the change requests.

I addressed the comments and I also updated FindTCL.cmake so that it is no longer required to use -DTCL_LIB_PATHS or -DTCL_NO_DEFAULT_PATH. The issue was that FindTCL.cmake was only looking for the default path on Apple M1 silicon but not for Intel silicon.


CLDC-1731 Allow data coordinators to view parent's schemes

Display parent schemes for data coordinators:
Do not allow editing, deactivating schemes and locations or adding new locations to parent organisation scheme.

I feel like this will somewhat clash with my PR https://github.com/communitiesuk/submit-social-housing-lettings-and-sales-data/pull/1642


resource.meta null check

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context
encountered this bug while working on shopping cart
Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

pay 50 usd

😍 Perfect, I’ve sent the payout
💵 $50 @ 5.24 USD/DOT ~ 9.542 $DOT
🧗 1cAsKZYNRb8dkSCpn4eVkEn6ycNZTGoDo5dGDgB8J1UUWK8
🔗 0x54441e8e9c139c37d782a4b43a2beaaebf102cd04a115e5c742bccfe57ded673
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Log response body

This will log the HTTP response of each request towards Buildkite. This is to aid in figuring out the cause of errors like these:
2022/02/03 15:27:25 decoding response: invalid character '<' looking for beginning of value

Wrong upstream, sorry.


Console - Properties migration - Step 2

Issue
https://gravitee.atlassian.net/browse/APIM-2363
Description
This par finish the properties table + import + CRUD.
Next PR for Dynamic properties configuration
Additional context

📚  View the storybook of this branch here

But by looking at the screenshots, I think you miss the edit and new routes in the base route for Properties (Properties menu entry is not highlighted in the screenshot)

@loriepisicchio Yes because the migration is not finished. The dynamic properties was missing.


Me 3 apicart update quantity of simple product

added unit tests

@sofib
It was pointed out to me that it may be better to create a constant to hold the value that is being passed as the value of the msg property of the object passed to the context.log.error method in the updateProducts method of the ShopgateCartExtensionPipeline class. What do you think about that?


I need help to set multiple items in session storage of the flutter webview. I have searched for similar questions but have had no luck

I want to open a URL that will enable users to take further action in a functionality that is already present on a website. The website's code is written in a way that it accesses data from the session storage -> like auth token and user id and so on. If I am unable to provide this data in session storage then website will redirect to login.
I have tried doing this ->
      onWebViewCreated: (WebViewController webViewController) {
        _controller.complete(webViewController);
        webViewController.runJavascript(
            'sessionStorage.setItem("userCode", "000"); sessionStorage.setItem("role", "40");');
      },

@rahulrmishra
Your question is better suited for support channels like StackOverflow, so please ask the same there.
Closing from here.
If you think this need to be in the plugin as part of an enhancement, please file a proposal / feature request issue so that we can address it properly.

Hi @darshankawar, when will we be able to set session storage in web view?


Add 104 Addresses to existing DOI/DAI (CDC: WYE/DEL)

Is your feature request related to a problem? Please describe.
As a 104 Engineer I want to add Address Elements to a existing DOI/DAI which don't have Address Element yet.
Support CDC Types, like WYE that will have SDI Elements with their own CDC to handle how to create one Address Element below a one DAI Element.
Describe the solution you'd like
Extend the existing logic to support the new CDC types from issue #698. After this issue DOI's with CDC like WYE can also be selected to add Address Elements. This means configuring which SDI need to be searched for and be handle like this is it own DOI.

Closing as duplicate of #1390


Added a check for total effort in effortsheet

Targets #1169

Description

Added check for the case when efforts are not present. Ex. In case of first day of the month.

Checklist:

[ ] I have performed a self-review of my own code.

@kuldeep3 I've reveiwed this code and it looks fine to me. As the PR is created by me so I cannot review it, I've assigned you as reviewer, please mark this PR as approved and merge it.


Todoist.com integration broken

OS version: Windows 10 Version 2004
Browser version: Firefox 75.0
Extension version: 1.60.7

Relevant integration (if any):
Todoist.com
🐛 Describe the bug
The Toggl button doesn't appear next to Todoist tasks since Todoist updated their UI yesterday (04/28/2020).
Expected behaviour
There should be Toggl buttons next to each task.
Steps to reproduce
Steps to reproduce the behaviour:

Turn on todoist.com integration for Toggl Button.
Go to https://todoist.com/app/ (while signed in).
Hover over any task.
Observe that the is no Toggl button.

Other details or context
See description.

@CyanoKobalamyne can you try again? I just tried reproducing the issue and the Toggl Button does show up when I hover over tasks. The latest version of the Toggl Button is version Version 1.60.9, please make sure that's the one you are using.

I am on version 1.60.9, and I still can't see the button.
Screenshot:

@CyanoKobalamyne can you let us know if the button is working for you again on the latest version (1.62.1)? Thanks :)

Yes, now I can see it in both the "Today" and "Upcoming" views. Although now the timer buttons are always shown for all tasks, instead of becoming visible with the rest of the task controls upon hovering over a task. But that's more of an aesthetic problem than a functional one.

@CyanoKobalamyne thanks for the update! We will have another version out soon which will fix the visibility issue :)
If you run into anything else please let us know here here or through our support team<EMAIL_ADDRESS>


Better explain the default FORMAT for DurationSeconds/TimestampSeconds

Highlight what is the default, with an extra sentence and emphasis in
the tables.
Unhide the std::time::Duration in the examples.
Closes #575

bors r+


Possible to relicense as Apache-2/MIT?

Hi!
Most Rust crates are dual-licensed under MIT and Apache-2. We're interested in using this in ICU4X and were wondering if this crate could be relicensed to match so that it's license compatible with more of the Rust ecosystem.
Totally understandable if your answer is no, I get that lots of people pick GPL on purpose and that's fine too.

Hi,
I think I can't remove the GPL license, but I could add the MIT license, so it would be dual-licensed with GPL (to match with the actual and previous versions of the library) and the more permissive MIT license.
Would GPL and MIT be OK for you ?

License changed to MIT in 2.0.3

Thank you!


Input field dissapears on resize

The input field disappears on resize, Is this a bug?
Apologies if this is not the place for it

Thanks for raising this! It turns out this isn't a bug. The tl; dr is that the calls to render children are incorrect. They result in double painting and interfere with the special treatment the native TextField behavior has to directly manage its DOM. This special handling is only necessary for some native behaviors though, so you'd see this kind of issue only when using them with a child.

The framework will automatically render children
I must've skipped the docs where this is explained, apologies!
You're right, thank you! removing child.render() fixes the issue.


Inline rendering only shows the first line of properties in reading view

What happened?
Inline rendering is only showing the first line of properties over and over again in reading view. On the other hand, live preview renders fine. I tried this in an empty vault with the only plugin being the latest version of Dataview.
I did a search and noticed that this is likely a repeat of an existing (old and unclosed) issue. I would like to bring this back up as it hasn't been fixed in 6+ months.
DQL
source view

[prop1:: A] [prop2:: watermelon]
[prop1:: B] [prop2:: kiwi]
[prop1:: C] [prop2:: oranges]

reading view (implied)

[prop1:: A] [prop2:: watermelon]
[prop1:: A] [prop2:: watermelon]
[prop1:: A] [prop2:: watermelon]

JS
No response
Dataview Version
v0.5.66
Obsidian Version
1.6.3
Device
iPhone 15
OS
17

This bug is actually not exclusive to mobile, as I also see the same behavior on desktop.

This sounds a lot like ##2216, which sadly I'm not sure if we're able to correct, or whether we need to code some workaround to avoid this happening.

That's sad to hear as I do prefer reviewing my notes in reading mode... If you are familiar with this issue, can you give a technical rundown of where the issue is stemming or what files are involved in inline rendering. That way more eyes can get up to speed with the issue and thus may bring us closer to a possible fix.

It's documented in that linked issue. The bug(s) was introduced after 0.5.59, and is related to a double rendering of text as markdown, where in the new (and buggy) version it assumes it gets the current line of a list item, but it receives the entire block of the list, which results in a faulty re-rendering.

I've been completing to "hide" all the related changes of this bug under some experimental setting within Dataview, but it's a lot of code which needs to be reviewed and handled, and I've not received any response from he who implemented this stuff as to why it was implemented or if he could fix it.  So I'm kind of unsure why this code is there in the first place.

@holroy I found the offending line and was able to fix the issue with some minor changes. I made a fork with the fix. I also made a pull request.
I also made a pull request here: https://github.com/blacksmithgu/obsidian-dataview/pull/2377

That's interesting indeed, and I hope you're right, but are you sure you're preserved the same logic (whatever that was) which was introduced in 0.5.60++?
I'll look into this out of personal interest, but can't do so before in a day or two, but I hope your solution is solid and can be included and solve this long lasting issue.

Yes, so the last time the file was touched 8 months ago by @RyotaUshio. The change essentially reverts his changes in this one file alone and not the other changes he's made to other files. This is straightforward in resolving the rendering issue without impacting anything else.

There is no question that you've found the tricky code spot. I do remember the affected code from my last review of this issue. I just fail at understanding @RyotaUshio purpose with the code change, and how (and where) to implement the solution.
Therefore I find it very interesting to see this change which seems to take a very different approach and implementation of the issue at hand.
So I'm not opposing this PR in any way,  I just want to figure out what is happening, how this code resolves it,  and also see that my test cases related to this issue are resolved.

I did some more digging and realized that @RyotaUshio made the change to fix issue #2084. The issue was that latex code does not render in reading view. In fixing this, everything else in reading view broke (i.e. stopped rendering). I reviewed his code thoroughly to understand where it went wrong to keep the fix for #2084. Ultimately, I was able to get it working so both non-latex and latex code both renders in reading view the way it should. Live preview continues to work as per-usual since this code doesn't affect live preview. Furthermore, this change works on mobile too.
This took longer than I expected and I added a comment to the updated PR for any future maintainers of the code. I hope this gets resolved so inline properties can become usable once again.


Improve API for rendering static images

For use cases when we don't need a full fledged map, but only to convert pdf tiles into raster images, an api would be great.
For example, given this pbf tile : https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/6/23/31.pbf
And this style, get the corresponding raster image.

What kind of API do you mean?

Ideally, a just a blocking call such as:
encodePNG(Renderer.render(pathToPbfFile, style))

I has a look at the renderer tool you mention. It involves the creation of a Map, then a PNG is made from out of the map rendering IIUC.
What I would like is only to do that from vector tiles, without the need to create a Map instance.

Correct, you need a Map instance. But in that example, only a single frame is rendered.
MapLibre Native is not really optimized for static rendering (although it is used for this a lot as well). And it doesn't have a first-class API for it.
Changes in this area are welcome, although significant changes are best done by making a design proposal first. In the case of the API you suggest, we already have a Renderer class with a different job, so we would need another name. Also since you can specify a local .pbf file as a source in the style, I don't think it would be good to have a separate parameter for that specifically.

Thanks for the clarification. If the library could offer a first class api for static rendering (of map area or just tiles), that would be awesome.

https://github.com/ConservationMetrics/mapgl-tile-renderer might be an option for you @p-lr

And for on-the-fly rendering of pngs, you can use maptiler/tileserver-gl.

@wipfli The goal is to do this client side, on mobile devices, not server-side.


include openai o1 models

openai released its o1 'reasoning' models this week. It would be great to incorporate these.
I think that this is relatively straightforward (suggested PR: #89 modelled on this commit https://github.com/kharvd/gpt-cli/commit/d90b1b96c1630dccf6c971ceed4e78bf59d902e9), but it does open some interesting questions for more fine-grained pricing reports. The new models now provide information for how many tokens were used for reasoning in the completion_tokens_details.

fixed in #89


added missing export to fix importing csv

Hyia!,
just found your wonderful tool and was very pleasently surprised how pretty it looks and that one can actually graph freely!, so thank you for your work, I will probably be using this tool quite a bit ^^
did notice that on QtWebEngine 5.15.8, Firefox 118.0.2 and Chromium 109.0.5414.74 the import functionality was broken because of a missing export from "methodList" in models.js to core.js
feel silly making a pull request for such a minor issue but having imports fixed would be lovely
Lots of love,
Xea

Nah, pull requests are perfectly fine even for the smallest things. Thanks for fixing this bug!


BUG: sparse: fix incorrect indexing after ellipsis

Reference issue
Closes #21615.
What does this implement/fix?
When checking indices, scipy.sparse._index.IndexMixin._validate_indices skip ellipsis. This PR fixes it.
I apologize for not writing a test - I have problems building scipy on my machine.

I’ve added new additional tests for using ellipsis with integers, and slices. And we had none with ellipsis with arrays, so I added those too. That helped me realize that we didn’t have tests for array indexing where the array is a single value. Adding those caught two more bugs in the DOK and LIL formats. We also needed more tests of 2D arrays with indexing, which revealed spmatrix improper treatment.  These are each rarely used features, but together they plug some bugs and holes in testing.  The OP is a commonly used case, and ellipsis is a newly added feature. So thanks again for reporting and fixing it. I pushed the tests to your branch, so you’ll need to pull it to local before doing anything more (which you may not need to).

@dschult, thanks. I apologize again for not contributing any tests - only today I finally managed to build scipy from sources.
I now added one test that is closer to the initial problem. Test that a[..., 10] fails didn't cover the case when the second index is within the range of the first dimension (against which it would be matched before this fix), but not within the second dimension. So I added a test that a.T[..., 5] fails, too. Just a detail - feel free to squash with other commits.

Good point -- the example in the issue is about "index after ... fits in the second but not in the first" (a 2x3 array with index 2 in 2nd position). But you are right that we could also check "index after ... fits in the first but not in the second".
That requires changing the array sizes and transpose is a quick easy way to do that. Perhaps we could do that with all these cases, but different cases raise for different out-of-bounds. It'd be nice to have a function that compared what happens with sparse and with numpy (both raise or results are equal) that we could apply to the many cases tested here.

A function would be nice, but there is no convenient syntax to pass a slice as an argument; I find np.s_ ... noisy. I also don't like asserts within loops (like in test_slicing_3, for instance) because they are annoying to debug.
Maybe we should have a test object that can be indexed? Like
class _TestSlicing:
    def create_tester(self, m):
        class EqTester:
            def __init__(self, self_, m):
                self.dense = m
                self.sparse = self_.spcreator(m)

            def __getitem__(self, idx):
                try:
                    dense_val = self.dense[idx]
                except Exception as exc:
                    with assert_raises(type(exc)):
                        self.sparse[idx]
                else:
                    assert_equal(dense_val, self.sparse[idx].toarray())

        return EqTester(self, m)

This allows for writing tests like this:
    def test_get_slices(self):
        assert_equal_result = self.create_tester(arange(50.).reshape(5,10))

        assert_equal_result[2:5, 0:3]
        assert_equal_result[1:, :-1]
        assert_equal_result[:-1, 1:]
        assert_equal_result[1000]  # raises the same exception

It may be confusing that tests are done through (a side effect of) indexing not with calls, but I think the name explains it - and the syntax is short and clean.
A drawback is that this does not check exception messages because they are different for dense and sparse matrices. This could be solved by passing the message as an extra "index" (not nice) or, perhaps better, by changing the messages for sparse matrices to match those for the dense.
I hope I'm not writing nonsense. My knowledge of scipy codebase is very limited, and I'm used to unittests, not pytest.

I like it!  I don't think it even needs the outside class _TestSlicing because it stands alone.
I would also rename the function from create_tester to something like compare_indexing_for so the testing function could be:
    def test_get_slices(self):
        a = arange(50.).reshape(5,10)
        for A in (a, a.T):
            assert_index_like_np = compare_indexing_for(A)

            assert_index_like_np[2:5, 0:3]
            assert_index_like_np[1:, :-1]
            assert_index_like_np[:-1, 1:]
            assert_index_like_np[1000]  # raises the same exception

Your names are much better.
The outside class is the existing class _TestSlicing (or another one; we can also put this into its own mixin if we need to reuse it in different places). It needs some outer class to access spcreator.
If you think we'd often run the same tests for transposed matrices, we can avoid loops by building them into the test.
class _TestSlicing:
    def compare_indexing_for(self, dense, transp=False):
        sparse_ = self.spcreator(dense)
        sparse_t = self.spcreator(dense.T) if transp else None

        def test_indices(d, s, idx):
            try:
                exp = d[idx]
            except Exception as exc:
                with assert_raises(type(exc)):
                    s[idx]
            else:
                assert_equal(exp, s[idx].toarray())

        class Compare:
            def __getitem__(self, idx):
                test_indices(dense, sparse_, idx)
                if transp:
                    test_indices(dense.T, sparse_t, idx)

        return Compare()

So the test becomes
    def test_get_slices(self):
        assert_index_like_np = self.compare_indexing_for(
            arange(50.).reshape(5,10),
            transp=True)

        assert_index_like_np[2:5, 0:3]
        assert_index_like_np[1:, :-1]
        assert_index_like_np[:-1, 1:]
        assert_index_like_np[1000]

What about error messages? Is there a reason that messages for dense and sparse matrices are different (IndexError: index 1000 is out of bounds for axis 0 with size 5 vs IndexError: row index (11) out of range)? Would unifying them be a significant backward incompatible change?
If we want to keep them as they are but still test them, we can incorporate them into the test, like this,
        assert_index_like_np[1000, 'row index (11) out of range']

I'm not sure I like it much, plus it doesn't work for transposed matrices.

I don't envision that testing specifically the transpose array will be used often (based on the tests currently in test_base.py). But there are several places where we test various indexing patterns on the same array. So this could be helpful.
I think changing the style of lots of tests is not the focus of this PR. So, maybe for this one we can construct the function and apply it in one test method.  Then after review and conversation we can decide how best to apply that elsewhere.
And it should work fine for it to be a function so long as we pass in self. Something like:
compare_indexing_for(self, A)
The function can get spcreator from that first argument.
The question about error messages is a longstanding "wart" of the library. In some important cases, we want the messages to differ for sparse than for numpy. But in many others they probably ought to be the same. And while it might be tempting to go and rewrite all the error messages some day, that will cause headaches for people who are relying on the error message text to run their own tests. So, I think we shouldn't try to fix that here in this PR. It's a bigger issue.

So, maybe for this one we can construct the function and apply it in one test method.

What about just keeping this PR as it is now? Its tests are written in the same style as the existing tests. If we have ideas how to rewrite (simplify, generalize) tests, let us not introduce functions that we might remove in a future PR anyway.

And while it might be tempting to go and rewrite all the error messages some day, that will cause headaches for people who are relying on the error message text to run their own tests.

Sure, and I may well be one of those people with a headache. :) The whole reason I started this was that tests of our software on nightly built scipy wheels were failing.

I agree -- let's merge this PR as is, and we can adjust the tests to include new tooling in another PR.
We've fixed 3 bugs, and added many new tests.
Thanks!


Create a Mixin for generic class-based views

Implemented a Mixin to replace the default django core paginator by the pure-pagination paginator.

Thanks Juan, I will test it and merge it!

Sure, I will do it this weekend!


drivers/watchdog/stm3u5: Specify max of iwdg prescaler for stm32u5

In file drivers/watchdog/wdt_iwdg_stm32.c set prescaler up to 1024.

LGTM, with Erwan's comment

LGTM, with Erwan's comment

The comment is updated

I guess @erwango was mainly referring to the Kconfig comments and limits which need an update:

Well I missed it actually. But that's required indeed. Thanks @martinjaeger

@nfaurant Are you planning to update this PR ?

@nfaurant Do you plan to update this PR?

See https://github.com/zephyrproject-rtos/zephyr/pull/52050


Basics of Export to PDF

Button absolutely positioned at the top right of panel body

Click to convert current fountain file displayed in preview
Saves to current directory root
Success message when file saved
Confirm dialogue on overwrite
Package configuration file to set default conversion aspects
Unit tests for logical branches

Possible future features:

Adding a configuration UI to set the config properties used by conversion tool
Find better docking location for export button (one that's always visible)

Notes:
I really wanted the button to be fixed to the top right... but that didn't play well with multiple panels.  Not ideal, but I wasn't sure how to dock it anywhere else.
I'm worried that my package.json additions might be insufficient for deploy (if the package does in fact deploy with only a subset of files from the original node modules).  Hopefully someone can check that.
I did my best to identify/solve possible cross OS issues with the command execution, but I can't test windows or mac myself.

Is there any chance that Afterwriting can also be responsible for generating the HTML in the preview window?  I'm concerned about maintaining a third Fountain parser.  Afterwriting seems more thorough than what we currently have, so it would be great to use that and avoid having inconsistencies between the preview and PDF views.

I started looking into that.  I think there's a PDF view package that could maybe provide it.  Would just have to figure out a system of storing temporary PDFs... Trigger creation... Update display.  And that would fit better with the idea of allowing the user to configure output.

Of course... It wouldn't be HTML.  And it does force us to address a question about whether the preview isn't the same as just downloading the PDF... Because it will generate a file, but we won't want to implicitly overwrite an existent copy that the user wants to keep.  And we'll want to make sure we clean up any additional generated files.  And figure out how to get a download button back in there.

https://github.com/izuzak/atom-pdf-view/blob/master/lib/pdf-editor-view.js
That's the view that this other package uses.  Obviously, I don't know a whole lot about pulling from other packages.  My assumption is that you can construct this with a file path for viewing, but adding a "download" button to the view might require some other hackery.  I'm mulling this over but haven't seen a real clear vision of an intuitive solution.

What about instead cleaning up the existing HTML preview to be more standards compliant and using something to go from HTML to PDF?  That might be easier down the road if we want to be able to keep the "code" and the preview vertically aligned down the road.  I'm not sure how you'd go about it with a PDF in a pane.

That idea definitely has some perks.  I guess if you can pass your css through that would be more consistent.  One benefit of the afterwriting module to consider is its ability to be configured.  I would see that as a big ticket item for the fountain package in the future...   I'll take a look at it tonight and see what it might take to get all those styles applied via html-pdf.

Ah, yea, I'm starting to understand better the nuances of this problem.
One option is to tentatively configure the afterwriting to appear like the HTML view (which I actually tried to do),.  That's exampled by the PR.  But this approach wouldn't be long-term viable if you ever choose to go configurable because the PDF and view would be out sync with HTML.  Future work would include either going all PDF or modeling HTML view on afterwriting config.  So, it's probably a step in the all PDF direction.
The HTML option... building from HTML is desirable from the perspective of reusing your existent codebase.  However the CSS styles probably aren't going to port to PDF... And I couldn't find anything offering to do that readily.  So, it would be work to figure out how to use those headers and whatnot to approximate the HTML view.  That's sounding the most painful to me.
And the third is displaying PDF right from the get go and figuring out the download workflow and display.  This would solve the long term issue of syncing the two, but takes additional upfront work.
I guess in order of desirability in my mind, I would say:

All PDF
Half/half (imperfect but a step towards all PDF)
HTML to PDF

Does that sound right?  Any other options?

Just want to throw this out there.  Maybe you don't need the preview if you offer a PDF generation function.  Alternatively, you could move the PDF generation button to the outline, scrap the HTML preview panel... then just generate and open the PDF with the pdf-view package.  Then these dilemmas disappear... And fountain package is just one panel...

As background, the preview came from when I developed a Google Docs add-on.  The development environment for add-ons is pretty rudimentary; however, there is a one-liner to convert HTML to PDF that did a good job of respecting CSS.  The preview was added as a feature since I already had presentable HTML and it was convenient to identify user errors with Fountain syntax without having to generate a PDF, open it, and scroll to the right place every time.
So, In my personal use case, the preview doesn't need to be HTML.  I don't think people use the preview window as they write, especially since it doesn't remain synced vertically on a long script.  I do think there is value in being able to diagnose Fountain typos without leaving Atom.
My compromise would be to have an ability to generate and display snippets of script inside an Atom preview.  If this is done by only running Afterwriting on the selected text in the code editor, rendering a PDF, and opening it in Atom, I'm cool with that.  Is this something Afterwriting can do quickly (< 1 sec)?  I like that this offloads the script generation to Afterwriting, which specializes in the task, and we can focus on other editor related functionality.
I'm hoping some other developers/users might way into this pull-request before we make the change (@morekitsch, @OgierM), though in my experience we'll only find out once people start sending nastygrams.

So, just wanted to check in where we're at on #20 and #23
I see that I've got some unsurprising conflicts with the changes to package.json (nice to have that cleaned up though!)... and both of my branches will ultimately conflict with each other in that file... but is there something more that you guys are looking for from either of these?  Is there one or the other that is closer to being accepted?

Thanks for the ping.  I will look at #20 tonight.  I had a weird issue where I dragged an element, and then everything disappeared, but I haven't been able to recreate it or track down what might have caused it.
On this PR, my thoughts are to do the following:
[ ] If the user has not selected any text inside the editor, the formatted-preview (ctrl+alt+shift+m) shall render a preview of the full script in Atom using Afterwriting.
[ ] If the user has selected text inside the editor, the formatted-preview (ctrl+alt+shift+m) shall render a preview of the selected script (logic TBD) in Atom using Afterwriting.
[ ] With the same selection logic as in the previous two requirements, add a new command to save the Afterwriting PDF.
[ ] Add a new command (legacy-preview, no default shortcut) so that someone who really wants the old preview can get it.  We will mark this deprecated in the docs, so anyone grieving can complain about it.
[ ] Release a minor (pre-1.0.0) version with these features.
[ ] Remove the legacy commands and code at the next minor rev., or at 1.0.0.
This will let us switch to Afterwriting and deprecate the old stuff.  Since it uses the current commands to trigger the new preview, if anyone is really getting useful behavior from it, they have a chance to complain when they see it.  Does this seem like a reasonable checklist to evaluate this PR?  I'm not too concerned with PDF generation buttons since Atom is big on the ctrl+shift+P commands list, but if they're working it's a nice thing to have.  If not, we can always add the buttons later.

That sounds like a good plan to me.  The only thing I'm unsure of is the best way to manage exporting.  I suppose it could just be triggered by the keyboard command for preview, but you still have the issue of overwriting a saved PDF if you do that... And I don't want a user to be prompted on every save about overwriting.  But I do think they ought to be prompted.  Maybe separate commands for preview and export, where preview creates an unseen temp file in the fountain package?

I like the idea of the preview being a "hidden" temporary PDF.  You may need to do some cleverness to handle the case where someone has multiple previews open or is reopening the editor and has to deserialize the previous state.
Then, when the user wants to "generate" a PDF, it would present them with a prompt suggesting a PDF name based on the script filename, so you simply have to press enter.  You could have a warning underneath the prompt if the new file matches an existing one that they are about to overwrite a previous PDF.  Unfortunately, that makes the normal workflow have an extra "enter" press, but that's better than having to click something.

So, my current branch already does rendering based on the associated window id and creates time-stamped temp files... And accesses both files in the package and local directory in a cross-platform manner... So, I don't anticipate much additional research.
There is already a file overwrite prompt... With tests... As well.  So that should be easy.
The only unknowns are displaying the PDF, deserializing on startup, and rendering selected text (all of which are probably not of high complexity with atom hooks and a callable PDF viewing package).

Just tried it out.  When it works, the Afterwriting output is excellent.  If we can display the PDF inside Atom and it's performant, I'm sold on replacing the hacky HTML based preview.
Were you able to generate a PDF of The Last Birthday Card?  I'm getting the following:
Uncaught Error: Command failed: node /home/lsimons/github/fountain/node_modules/afterwriting/awc.js --source tmp1506555195898.fountain --pdf The Last Birthday Card.pdf --config /home/lsimons/github/fountain/configs/afterwritingConfig.json --overwrite
fs.js:540
  binding.open(pathModule._makeLong(path),
          ^

TypeError: path must be a string

Also, do temporary files ever get cleaned up?

So, I've never seen that error.  Curious.  I do have code that cleans up temp files via fs.unlink... but if there's a failure along the way it may not be reaching that block.  Could probably work in some unconditional cleanup though.  I can pull it down and try to troubleshoot after resolving conflicts in #20.

And, yes, I was able to generate on the last birthday card.

Okay, so, I've resolved conflicts and am actively working on the checklist above.  I've already identified an edge case pathing issue for the output file, so that's good to have noticed.  And I've just comprehended the error you ran into... I did run the birthday card conversion... but I renamed the file... lol!  So, yea, it's just the whitespace in the name.  I'll look at some cross-platform solutions for command line paths with whitespace, but that's probably a slam dunk otherwise.  Then the checklist.

Update:
I was able to pull in the pdf-vew package via package-deps package.  That's cool because it optionally prompts the user about installing the dependency... and then installs and loads it as a normal package on the fly.  The pdf-view then makes itself the default for pdf files.  But I'm having a really hard time getting atom to open a tab instead of a new window.  Also, PDF rendering is notably slower than your html view.
To deal with the file opening, I've tried activating the pdf view manually (passing the path)... and that will execute the code, but does not open the new pane.  And I've tried "atom.open"... which refuses to open a new tab... it insists on opening a whole new window (even with the ".newWindow" set to false).  I've looked through various issues and scoured the internet for the obvious stuff... but no solutions seem readily available.  I'm feeling a little disheartened by this.
Any wisdom, ideas, or thoughts on the issue?

Woohoo!  Finally found it: "atom.workspace.open"... I knew it had to be somewhere.  Now it's just a matter of figuring out a refresh approach on save... and assessing performance.

Good news... great news... the pdf view automatically rerenders on file persistence (and it's way faster than the initial workspace opening), so it's looking pretty good.  I've still got a lot of work to get the commands setup and properly organize the code, but I think I've got the core pieces validated.  As far as I can tell, now it's just a matter of tedious refactoring work and updating tests.

Okay, so... I tried to follow your checklist as best I could.  I started to realize that I didn't fully follow some of the command rearranging ideas, so I just added some new ones for demonstration.  The big things remaining are cross-platform pathing updates and tests.  I'd appreciate some feedback if anyone finds time... just so I don't get to testing and find out that everyone hates some particular choice.

fixed whitespace file name error that was identified
added atom commands to export and preview pdf
added temp folder to project for storing preview files
ensured exports actually save to the folder/subfolder of .fountain file
added button on outline view to call through pdf export logic
while I was there, docked the outline panel header to the top and pushed hide scene checkbox in there
commented out legacy preview export button (tentative)
bound the preview generation/refresh to save events on the original fountain file

I'm probably missing something, but when I try to preview/export a PDF, I receive an initiateConversion is undefined error in fountain-pdf-converter.coffee at lines 8 or 11.  It looks like these are calls to instance methods, so should those be preceded with @?  That makes it work for me, though I don't know how it would work for you otherwise.
With respect to the commands and shortcuts, I suggest we do something like this:
# fountain.coffee
@subscriptions.add atom.commands.add 'atom-workspace',
  'fountain:toggleOutlineView': => @toggleOutlineView(),
  'fountain:preview_legacy' :=> @preview(),  # deprecated, remove in a later release
  'fountain:preview' :=> @pdfPreview(),
  'fountain:export_pdf' :=> @pdfExport()

# fountain.cson
'atom-text-editor':
  'ctrl-alt-o': 'fountain:toggleOutlineView'
  'ctrl-alt-M': 'fountain:pdfPreview'
  'ctrl-alt-X': 'fountain:pdfExport'

This way anyone using this package will start getting PDF previews when they do the "default" preview.  I want to make sure we start getting some community feedback ASAP if it breaks anyone's workflows while they can still access the legacy version.
When doing a partial preview (by selecting a chunk of a script), it seems like there's always a blank title page.  Is it possible to tell Afterwriting to not include a title page when "preview by selection" doesn't include one?
The only other thing I think is worth investigating before we merge this is if it's possible to generate the PDF in an asynchronous task.  On my computer, when I run preview on something like Big Fish, Atom is locked up for around 6 seconds.

Oh, silly me.  I did some work on tests as my final thing last night and moved those back to instance methods to hit them more directly...  It was late... Must not have manually tested.
I'll switch those commands out tonight.  But how do they access the legacy preview without a command?  Do they set it up via config or something?
I did notice the partial preview thing.  Afterwriting has a config property for that... And could probably be removed, but will have to create an additional config file and select conditionally (I think)... To keep support for title page on normal preview/export.
Async file creation is possible.  I originally had the converter written that way but was having problems writing tests because I couldn't check for file existence immediately after execution.  I can take a second look.

But how do they access the legacy preview without a command? Do they set it up via config or something?

They should still be able to do ctrl+shift+p and then type the first few letters to get the legacy command.  I think we'd put an explanation in the readme until we take away the deprecated feature.
The only reason I think async preview is worth holding off a little is because ctrl+s triggers an update, and it's odd behavior to freeze up Atom while the user remembers to close their large preview.

And actually, the more I think about it, rendering the selected text becomes a larger problem to solve.  To do what you described above would take 2 separate config files and some additional text parsing to determine if a title page is included.  Or... Potentially... Writing a single config on the fly to pass in.  I'd sort of like to see this pulled into a separate task.  It seems like more of a bonus feature to me.  Also, since I was hoping to look at user-defined configuration in the foreseeable future, maybe it would be better appended to that work (to take into account all requirements for afterwriting configuration)?  What say you on that?
On that topic, I know you haven't said much about the user configuration of afterwriting.  Are you on board with that idea?  Providing package configuration that targets afterwriting configs?
Either way... Design-wise, I think it would make sense to create a separate service/class to manage afterwriting configs, so there's a proper division of purpose.
And sorry if I sound like a broken record about trying to split up tasks... I just do a little better with more modular units of work... Helps me conceptualize... makes me feel like I'm getting stuff done... And it also opens up tasks for others who might be interested.

No problem.  I completely understand the idea of separating it out.  The name of this task is "basic export to PDF," and you've done a great job with that.  I think I would prefer to hold off on an APM release of until async generation is examined, but I'd be happy to merge this PR after the little things we discussed are covered.
I'm fine with making Afterwriting config files a separate task and I like the idea.  I think we could make a lot of the Afterwriting configuration items into the Atom package's settings.

I agree about async files.  I'd like to address that on this branch, since it was my original intention.  Probably just a promise chaining issue.  I'll let you know when I figure it out.

Async pdf conversion implemented.  Tests updated.  And geez.... Jasmine async tests are hard!  You can write passing tests that aren't actually hitting the "expect" statements (scary)... which I know from experience... but getting them to accurately pass... wow... I'm just floored by the complexity of it.  But please check out the branch and have another look.  Performance and general UX are much better.  I also added a notification when PDF generation begins to sort of indicate that the user's command registered.

@superlou As far as I know this is ready to go whenever you are.  I addressed the command rearrangement and updated readme.

@jrbostic I got stuck at the studio late tonight.  Will try to review and merge as soon as I get back from the office tomorrow.  Sorry for the delay.

@superlou Not at all.  Thanks!

@superlou did you try running the commands from keyboard after that change?  I was having an issue where keyboard commands were being ignored when the names didn't match with the keymap file.  Maybe I was confused?

You're right.  Long day.  Fixing now.

It's easy to miss.  I originally just copied in your commands and didn't notice for a while.  But we can always swing in for a name refactor... Or see if commands have alias support of some kind.

Are they not working for you still?  They are working for me (ctrl-alt-O, ctrl-alt-M, and ctrl-alt-X).

Oh, I'm making dinner ATM.  I didn't actually pull it down yet.  Just a hunch.  I'm sure you got it.

Roger. :)

I have nothing valuable to add to this conversation - I just wanted to thank you guys for working so hard on this.
I will confirm how superlou suggested people use the preview function is exactly how I use the preview fuction - just to check errors of whatever I just wrote - and I don't leave it open otherwise.

@captaindooley You should still be able to use that workflow with the new PDF preview.  The main difference will be added user notifications, since PDF generation and display takes just a tad longer than the old preview.  There's also the traditional support that updates preview on a save to the original fountain file.

Copy - I picked up on that reading through the past few days - I just thought I'd add my agreement to superlou's assessment.


Generating simple email reports fills up RAM

Hello everyone! I'm having trouble generating email reports. Running on docker, I've set everything up with geckodriver. When I create a email schedule and request a test email (on a simple dashboard with just a markup card), I can see in the logs the worker requesting the dashboards, but then nothing seems to happen, the RAM fills up slowly, eventually I get a SoftTimeLimit exception, but the process keeps running until it runs out of RAM.
I know Selenium can consume a lot of resources, but it seems quite a lot for such a simple task (important to note that at the beginning of the task I have more than 10Gb of free RAM).
Additionally, I was able to run this whole setup on my PC without problems, but get this problem on the server.
Expected results
Generate simple email report.
Actual results
No email is sent, process fills up RAM until it runs out of it.
How to reproduce the bug

Generate email schedule with a generic dashboard, request test email

Environment
(please complete the following information):

superset version: 0.37.2
python version: 3.6.9
node.js version: 10.15.3

Checklist

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

Hello @JMGGarcia
Thanks for reporting this issue!
We are working on major changes in the Reports feature, targeting completion sometimes this calendar quarter (before mid-December). The changes include significant improvements to the backend of Reports, and I expect that it will make the backend more robust. Feel free to track this item on the roadmap for more updates and/or I will be glad to share implementation details as needed. I am over here --><EMAIL_ADDRESS>

Hey! That's great to hear, I will be looking forward to these developments, thanks!


GH198: Updating wyam version to 1.2

As title, just a version bump to resolve an error running wyam

@wwwlicious thanks for taking the time to do this!

Relates to #198


New version: th-ch.YouTubeMusic version 3.3.1

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

Hi @youtube-music-winget,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 788.)

Automatic Validation ended with:

Installation failed with exit code -1978335187 2024-02-18 04:56:12.980 [FAIL] Installer failed security check. Url: https://github.com/th-ch/youtube-music/releases/download/v3.3.1/YouTube-Music-Web-Setup-3.3.1.exe Result: 0x80004005 2024-02-18 04:56:12.980 [CLI ] Terminating context: 0x8a15002d at D:\a_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\DownloadFlow.cpp:1e6

(Automated response - build 788.)

@wingetbot run


Fix linkage problem with some tests unnecessarily linking liboslcomp

liboslexec contains all the functionality of oslcomp. You never need
both. It used to be harmless to link against both, though, until we
included clang C preprocessing functionality. Clang has some components
that cause trouble if linked twice, and so we run into that both
liboslexec and liboslcomp contain statically linked clang components.

LGTM
That's the same set of changes I did on my end.

OK, will merge as soon as the CI tests come back.


add teambition rrule to go overrides

https://github.com/chef/compliance-service/pull/332

❓ Why would we need this? I can see that your PR there adds a dependency, but it's a dependency that includes a LICENSE file that license_scout should be able to detect itself. 🤔

ℹ Found an issue with license_scout not including vendor/ in its search for LICENSE files. For auth, this has reduced the number of issues greatly. PR incoming.

oh nice! thanks @srenatus good find!


bumb supervisord image version

What is the purpose of this change? What does it change?
fix https://github.com/redhat-developer/odo/issues/1231
Was the change discussed in an issue?
yes, https://github.com/redhat-developer/odo/issues/1231
How to test changes?

$ git clone https://github.com/openshift/nodejs-ex.git
$ odo create nodejs:8 customsupvisrodui --app web --local /tmp/nodejs-ex/
$ odo push
# till here it works fine
# by making changes to source locally and pushing, check if this executes successfully
$ odo push

:white_check_mark: odo build 2182 completed and artifacts can be found here (for commit https://github.com/redhat-developer/odo/commit/e10341c23c by @syamgk)

/lgtm

/retest


How to dynamic the language

I changed the language in the app using easy_localization instead of following the phone's language. In this case, how do I set up to change the language in flutter_picker_plus

Hi @wangzhipeng-vicky, Sorry for the late response, GitHub wasn't giving me a notification 😒 I don't know about easy_localization but if it is utilizing flutters l10n mechanism, using the right ISO code, and the language you are using is supported by flutter_picker_plus it will work. Otherwise, it will show you English as a fallback. At the end, flutter_picker_plus is just calling PickerLocalizations.of(context).text. Do you have any examples I could try out?

@wangzhipeng-vicky any Feedback? I will close this issue soon.

Hi @wangzhipeng-vicky, Sorry for the late response, GitHub wasn't giving me a notification 😒 I don't know about easy_localization but if it is utilizing flutters l10n mechanism, using the right ISO code, and the language you are using is supported by flutter_picker_plus it will work. Otherwise, it will show you English as a fallback. At the end, flutter_picker_plus is just calling PickerLocalizations.of(context).text. Do you have any examples I could try out?

I'm sorry. I've been so busy lately that I forgot about it. Here's the thing.
I changed the language from Chinese to English in the app. When I open the relevant page of this component again, I need this component to be changed into English, please see the following picture. So what do I need to do with this component. I now understand that the components are automatically set according to the system language.

As I mentioned it is using the context and therefore automatically switching. I would need an example code to know exactly what you trying here and reproduce it.
By the way? What's the problem with sticking to the system language and doing it manually?


Introduce a desc function

Q
A

Issue Type
Feature Request

Deployer Version
N/A

Local Machine OS
N/A

Remote Machine OS
N/A

Description
Add a desc function, similar to capistrano, that allows to add a description to the subsequent task definition.
desc('Flush rewrite rules');
task('wp:rewrite:flush', function () {
    within('release_path', function() {
        run('{{bin/wp}} rewrite flush {{wp_cli_args}}')
    });
});

References
https://github.com/ikappas/deployer/tree/feature/desc-function

You can use:
task('wp:rewrite:flush', function () {
    within('release_path', function() {
        run('{{bin/wp}} rewrite flush {{wp_cli_args}}')
    });
})->desc('Flush rewrite rules');

I thinking of it. And i like how it looks.

Done: https://github.com/deployphp/deployer/blob/0d37f55460f3c351c3e4e4341765c47ae4d63933/src/functions.php#L122


gRPC: Optimize DescribeKeyspace when metadata hasn't changed

What this PR does:
Allow client to send a hash of their known version when describing a keyspace. If the metadata hasn't changed, the bridge will return an empty response.
Checklist

[x] Changes manually tested

Run the perf test with this brach quickly, having a hash makes this exactly where we want it to be:
Max 1,000 RPS (actual at 999.9)
Summary:
  Count:	100000
  Total:	100.00 s
  Slowest:	8.43 ms
  Fastest:	0.06 ms
  Average:	0.13 ms
  Requests/sec:	999.98

Response time histogram:
  0.063 [1]     |
  0.900 [99668] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  1.736 [161]   |
  2.573 [51]    |
  3.410 [35]    |
  4.246 [35]    |
  5.083 [22]    |
  5.919 [15]    |
  6.756 [7]     |
  7.593 [4]     |
  8.429 [1]     |

Latency distribution:
  10 % in 0.10 ms
  25 % in 0.10 ms
  50 % in 0.11 ms
  75 % in 0.12 ms
  90 % in 0.14 ms
  95 % in 0.16 ms
  99 % in 0.36 ms

Status code distribution:
  [OK]   100000 responses

Unlimited RPS (actual at 25.5K)
Summary:
  Count:	100000
  Total:	3.91 s
  Slowest:	12.60 ms
  Fastest:	0.07 ms
  Average:	1.13 ms
  Requests/sec:	25599.54

Response time histogram:
  0.068  [1]     |
  1.321  [71372] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  2.574  [24791] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  3.827  [2949]  |∎∎
  5.080  [486]   |
  6.333  [171]   |
  7.586  [68]    |
  8.839  [19]    |
  10.092 [45]    |
  11.345 [58]    |
  12.598 [40]    |

Latency distribution:
  10 % in 0.46 ms
  25 % in 0.66 ms
  50 % in 0.97 ms
  75 % in 1.40 ms
  90 % in 1.92 ms
  95 % in 2.38 ms
  99 % in 3.71 ms

Status code distribution:
  [OK]   100000 responses

@ivansenic Awesome test results!

Quick question: does code need to treat 0 hash code same as missing? I think proto3 uses Java value defaults for "missing" (undefined) values for optional values.

No, by virtue of using Int32Value in the request, "unset" is different from 0.

Javascript does not have 64-bit int type

The current hash is a 32-bit int.

keep a cache of keyspaceName=>CqlKeyspaceDescribe

I forgot that StargateBridgeClient is short-lived 😡
Maybe we can have a global cache shared by all clients, but then we'll need to handle tenants, and probably keep authorization separate.

@ivansenic I've added a cache on the bridge side. If the client queries with no hash, the bridge will return the full response every time, but only build the CqlKeyspaceDescribe once. That can give us an idea of how the "no cache on service side" approach compares in term of performance.

keep a cache of keyspaceName=>CqlKeyspaceDescribe

I forgot that StargateBridgeClient is short-lived 😡 Maybe we can have a global cache shared by all clients, but then we'll need to handle tenants, and probably keep authorization separate.

Ugh.
Yes, for content-hash based access to be beneficial, client-side does need caching. That in turn would require tenant-awareness in some form.
So I guess there is a little bit of design needed.
I think it might be time to figure out how to make Tenant-awareness more of a first-class concern with Stargate V2. It may make sense to define "default Tenant" concept, so that some id is always carried along and there is no non-tenant functionality.

@ivansenic I've added a cache on the bridge side. If the client queries with no hash, the bridge will return the full response every time, but only build the CqlKeyspaceDescribe once. That can give us an idea of how the "no cache on service side" approach compares in term of performance.

Just tested the branch and this gives very bad results.. It's even worse than building the representation every time (concurrency added on that cache now).. So I guess, client side cache is needed, and there is no need to cache anything on the server side, as most likely the serialization and transfer takes most of the CPU cycles and not the persistance-api to grpc-protos Java transformation..
Max 1,000 RPS (actual 256.78):
Summary:
  Count:	10000
  Total:	38.94 s
  Slowest:	1.42 s
  Fastest:	17.07 ms
  Average:	189.49 ms
  Requests/sec:	256.78

Response time histogram:
  17.067   [1]    |
  157.162  [4348] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  297.258  [4270] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  437.354  [1091] |∎∎∎∎∎∎∎∎∎∎
  577.450  [196]  |∎∎
  717.546  [59]   |∎
  857.642  [19]   |
  997.738  [11]   |
  1137.834 [1]    |
  1277.929 [3]    |
  1418.025 [1]    |

Latency distribution:
  10 % in 63.31 ms
  25 % in 113.44 ms
  50 % in 172.14 ms
  75 % in 242.31 ms
  90 % in 325.16 ms
  95 % in 386.65 ms
  99 % in 554.17 ms

Status code distribution:
  [OK]   10000 responses

But it's all fine, having data to actually come to the right design and approach seems fine.. Thumbs up for @olim7t for being right from the beginning..

Ok: one last (?) comment on calculating hash value: I think we really need to do it in a way that is well documented and can be reimplemented by non-Java clients. This need not be done immediately but should (I think) be done before official external release.
To me the most straight-forward way would be to

serialize and cache gRPC/proto representation as byte[]/ByteBuffer
calculate hash using Murmur3 algorithm (or similar).
cache byte[]/ByteBuffer representation to avoid serialization penalty

We can and need to figure out why performance @ivansenic found was so bad -- I am pretty sure there's a logical reason and we can resolve it -- for this to work of course.
On very short term we can just piggy-back on hashCode() gRPC returns, I think.
Oh and we do need test(s) to ensure that caching works, i.e. repeated calls will use cached copy (can just verify that cache size does increase when requesting same thing).

I though we agreed we won't have any caching, and Java hashCode() on the keyspace object seems fine?

The client doesn't need to recompute the hash, only store what the bridge returned and reuse it for the next request.

@ivansenic @olim7t Actually you are right: client does not need to compute the hash. And given that really is a server-side implementation detail.
Given this, I guess it's ok to go with Java object hashCode() values, even String.hashCode() (which is not great). And if there is need to change the calculation that can be done easily.

@ivansenic On server-side caching: that is needed in some form to retain hash code value, isn't it? So it is just a question of what representation of cached entry is needed (Java object, grpc/proto serialized response).
I am fine with caching Java objects for now; improvements if we care can be done later, no need to add in this PR.

Closing this, I'm going to consolidate all schema-related changes in #1711.


add project configuration

proposed packet: https://pypi.org/project/python-configuration/
@samaloney or are you aware of some astropy standard?

I've only ever use the standard lib configparser but that library you linked to looks interesting.

I've only ever use the standard lib configparser but that library you linked to looks interesting.

yes this would be more about project configuration like pathes URL endpoints ...
the other is more about "data configuration"
but why not combine that

yes this would be more about project configuration like pathes URL endpoints ...
the other is more about "data configuration"
but why not combine that

a first version was added with: https://github.com/i4Ds/STIXCore/pull/130