Can you expose a setting to enable configuring CMake with a preview version of Visual Studio 2017?

I just spent a few hours scratching my head as to why the CMake extension didn't work on a new Windows machine I set up.  I finally cloned the source and debugged the extension and it landed me here:
environment.ts:
      const vswhere_res = await async.execute(vswhere, ['-all', '-format', 'json', '-products', '*', '-legacy']);

It would be nice if you could expose a setting that lets the extension select a preview installation of Visual Studio since that's all I have on some of my PCs - though I can understand why you might not want to enable this by default.  The flag you need to pass in to vswhere is -prerelease.
Otherwise, there an obscure error pops up in VS Code when a version of Visual Studio can't be found.

And there is no information in the Output window.

I'll look into this.

no rush, I can edit the .js directly to force this in the meantime.

I added PR #238 to address this. It does look grim though that there are PRs more than 7 months old. @vector-of-book does an awesome job, but he's but one man. I suggest he looks into giving a few more interested people write permissions to the repo.

Sorry about the slow responses. I'm in the middle of a big refactor and hope to address a lot of long-waiting issues once I'm done and have a cleaner codebase.

Sorry for the slow. Is this still an issue?

I believe not. #238 solved it.

Closed.
If this issues still persists in the current 0.11.0-beta4, feel free to reopen this one or create a new one.


MNIST refactoring.

Fixes #84. @vdumoulin, let me know if you want some changes.

Travis build is failing. There's a test in test_serialization.py that you'll need to adapt, because it assumes that MNIST has the old interface.
There's also a doctest failing, because the dtype of MNIST data pre-refactoring was float, which is not the case anymore.
You should override H5PYDataset.get_data so that it looks like this:
def get_data(self, state=None, request=None):
    rval = list(super(MNIST, self).get_data(state=state, request=request))
    if 'features' in self.sources:
        i = self.sources.index('features')
        rval[i] = (rval[i] / 255.).astype(config.floatX)
    return tuple(rval)

It's pretty inelegant, but I have something better coming up and for the moment it'll do.

Hey, thanks for the comments! If I remove the logger, flake8 is not happy:
./datasets/binarized_mnist.py:2:1: F401 'logging' imported but unused
./datasets/mnist.py:2:1: F401 'logging' imported but unused
So, shall I leave them?

Just remove import logging as well

Damn that was obvious... Thanks @bartvm!

Oh! Seems that I also need to change the file mnist.py in the examples of blocks? Am I right?

Yes, see this.

I cleared the Travis cache. The HDF5 dataset will be regenerated the next time you push a commit, which should resolve some test failures you were experiencing.

There's a failing doctest that you can fix by changing line 76 of docs/index.rst to
>>> mnist = MNIST(which_set='train', flatten=('features',))

Also, you can now remove these lines from .travis.yml.

forgot the comma after features ...

@vdumoulin can you launch travis again, I added the missing commas! Thanks :-)

Just restarted it.


Use a class instead of a path for icon - DND will get Problems

Use a class instead of a path, and in that class define both background and size:
For example:
 ... "icon": "car" ...
And in your css:
#mytree .car { background: url(... }

Originally posted by @vakata in https://github.com/vakata/jstree/issues/1890#issuecomment-349615405

@vakata first, thanks alot for your awesome jstree tool. I love it. I use v 3.3.7.
I also wanted to use my own class to be able to use my own icons for the nodes. As you described it here.
It also works.
But drag and drop has problems with that. As soon as I use my own class, I can no longer pull it directly onto a node via DnD. Now I always have to open the target node first and then let go of the item being dragged. If I do not use my own class for the icon, I can drag directly onto or into the node. Can I somehow fix the error?
I load data for jstree with json (php -> json) like this:
$arr_jstree[] = array('id' => $id, 'parent' => $eltern_id, 'text' => $texteintrag, 'icon' => 'book');
json_encode($arr_jstree);
If i use the class 'book' i got the problem i told. It is apparently unimportant what is in the class. The error also occurs when the class is completely empty.
I'm new here and would be very happy about some help.

I try to explain it with a picture

Can you please provide an example. I tried to reproduce but it seems to work fine for me:
https://jsfiddle.net/3wygvz01/


MNT: rerender

Hi! This is the friendly automated conda-forge-webservice.
I've rerendered the recipe as instructed in #76.
Here's a checklist to do before merging.

[ ] Bump the build number if needed.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


(Customizable) Timestamps

Feature suggestion: Optional Timestamps in BTTV App chat, with either standard formatting options, or ability to specify format following ISO8601.

Just for your information, this feature is implemented in PurpleTV (previously named TwitchMod, repo was named "Orange TV").
And Twitch doesn't care about timestampts at all. Not in mobile apps, not about their formats: https://twitch.uservoice.com/forums/310201-chat/suggestions/19032529-include-the-option-to-use-24h-clock-in-chat-timest


cmd/compile: minimally align variables in memory when -d=checkptr is used

-d=checkptr should report a warning for:
var x [4]byte
p := (*uint32)(unsafe.Pointer(&x[0]))

In general, this is unsafe because x only requires 1-byte alignment, but *uint32 requires 4-byte alignment.
Currently, this isn't reliably reported, because efficiently allocating variables often results in over alignment. But when -d=checkptr is in use, cmd/compile and the runtime could burn a few bytes of memory to intentionally minimally align things in the heap and on the stack (e.g., 1-byte-alignment variables always on an odd address).
Relatedly, when the runtime allocates a chunk of memory for a heap variable allocation, it could align the variable as close to the end of the allocation (rather than at the beginning), so that we can more easily detect pointer arithmetic overflows (at the expense of pointer arithmetic underflows, which seem less common).
These both would have helped catch issues that I've noticed in CLs to address errors reported by -d=checkptr.
(Prior art: I think OpenBSD's malloc used to prefer aligning allocations towards the end of an mmap'ed page so that buffer overflows were more likely to trigger a segmentation fault. Not sure if it still does that. I don't see it mentioned specifically in the man page.)

Hrm:
https://github.com/golang/go/blob/68981bf309be6143dd4cd769ffa94e9347de1fbb/src/runtime/malloc.go#L889-L904

Bumping to Backlog, since I don't think this is going to happen for Go 1.14.


[TypeTransformer] Support non-Any Python types as Any input in workflows

Tracking issue
https://github.com/flyteorg/flyte/issues/5366
Why are the changes needed?
We want to allow the Any type to accept all kinds of inputs and outputs, not just the types we currently can't handle.
For example, workflow like this.
@task
def foo(a: Any) -> int:
    if type(a) == int:
        return a + 1
    return 0

@workflow
def wf(a: int) -> int:
    return foo(a=a)

Note: This PR only supports Any in python, if we want to support java, we will need to add more code.
What changes were proposed in this pull request?
Check if the literal's scalar has a primitive type.
If it does, convert it to a Python value using the corresponding type transformer.
How was this patch tested?
unit test and remote cluster
from flytekit import task, workflow
from typing import Any

@task
def foo(a: Any) -> int:
    if type(a) == int:
        return a + 1
    return 0

@workflow
def wf(a: int) -> int:
    return foo(a=a)

FROM python:3.9-slim-buster
USER root
WORKDIR /root
ENV PYTHONPATH /root
RUN apt-get update && apt-get install build-essential -y
RUN apt-get install git -y

RUN pip install -U git+https://github.com/flyteorg/flytekit.git@3804a5155a523e2028ece8e7e581f794ebabd788

Setup process
pyflyte run --remote --image localhost:30000/any:0522 any_task.py wf --a 1

Screenshots

Check all the applicable boxes

[x] I updated the documentation accordingly.
[x] All new and existing tests passed.
[x] All commits are signed-off.

Related PRs
https://github.com/flyteorg/flyte/pull/5408

Update: I'm not sure if it's ok to support primitive types only.

It can only run in local execution and pyflyte run --remote, since I haven't discovered a way to send metadata by literal.

@dataclass
class Datum:
    x: int
    y: str
    z: dict[int, str]
    w: list[int]

  @task
def foo_dataclass(a: Datum) -> int:
    if type(a) == Datum:
        return a.x
    return 0

@workflow
def foo_wf(a: Datum) -> int:
    return foo_dataclass(a=a)

Note:
python dotted path can solve type for Dataclass, while eval can solve most of python type,
we should use both of these ways


chore(main): release 0.7.3

:robot: I have created a release beep boop
0.7.3 (2023-08-25)
Miscellaneous

release-please 4 (40561fa)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/nand4011/client-sdk-elixir/releases/tag/v0.7.3 :sunflower:


PR #197 fix removed after merge

Specify your setup

Operating System: macOS Sonoma 14.1
Node version: 18.12.1
npm version: Not applicable
version of @node-oauth/oauth2-server: release-5.0.0 branch
which OAuth2 workflow: Authorization Code
at which workflow step does the error occur: Authorization Request

Describe the bug
PR #197 fix got removed after a merge commit.
More specifically this merge commit: 6758bffe4e53979ad86ad908c5f671002dcfe9e2
To Reproduce
This bug is currently present on the release-5.0.0 branch.
https://github.com/node-oauth/node-oauth2-server/blob/b97f6c773cecca3563b0b39c7179ed813d006c4f/lib/handlers/authorize-handler.js#L370
https://github.com/node-oauth/node-oauth2-server/blob/b97f6c773cecca3563b0b39c7179ed813d006c4f/lib/handlers/authorize-handler.js#L381
Expected behavior
Should also receive the code_challenge and code_challenge_method through the query params.
getCodeChallenge (request) {
  return request.body.code_challenge || request.query.code_challenge;
}

getCodeChallengeMethod (request) {
  const algorithm = request.body.code_challenge_method || request.query.code_challenge_method;
  ...
}

Additional context
None

@mthlemos added this again in https://github.com/node-oauth/node-oauth2-server/releases/tag/v5.0.0-rc.5 feel free to reopen if the issue persists in rc5

Thank you very much for the quick fix @jankapunkt!


Enhanced the cart page

@RitiChandak @himanshu-03 I have made all the changes that were requested.. Review and merge this PR after adding relevant gssoc label considering my contribution. Thank you
Changed the opacity
Corrected font size for responsiveness
Removed the unwanted space between navbar and logo
Changed the text color
Added responsiveness

What's the issue no.?

What's the issue no.?

#601

@RitiChandak Pls merge this PR and add level 2 label to it considering my contribution. Thank you

please resolve


CI scripts improvements

Promote clang-format-10 and clang-tidy-10
Enable lint for testing and example
Some fix for compiling from minimal ubuntu18.04

Signed-off-by: Ji Bin<EMAIL_ADDRESS>

/lgtm


Addition of Frontend Development Roadmap

@rishicds I have already completed 3 roadmaps , i.e., C++ , DSA and  Competitive Programming Learning Track (Please review my sent PR for Competitive track) ...
I would love to work on this section as well. Kindly assign me this issue and I will start working on it immediately once you approve the PR. Thanks :)

assigned but follow the instructions I have given in your recent PR

@rishicds Sure 👍🏼


Release schedule?

Hey ROOCS team, I was wondering if clisops follows a release schedule of sorts? We are hoping to integrate the newest additions (#174) to our PAVICS stack and were wondering when releases are typically tagged (patch release every month?)
Thanks again and all the best!

@aulemahal

Hi @Zeitsperre, we don't really have a release schedule, we're just doing it as and when its needed for our project and for your work. We think we'd probably struggle to stick to any kind of schedule, especially in the coming months as I will be doing a placement elsewhere.
We're happy to do it whenever you want. So if you need a release, if you open an issue and assign/tag me and @agstephens (to make sure someone sees it), then we'll be happy to do it 😄

That would be great! Thanks!


Add initial changes and wifi setting script.

question: is this a repo migration? @liayoo
if so, is the commit history reserved?

@ehgmsdk20 could you let me know if this script works on your device?


Release 2.5.1

Superseded by https://github.com/brianbianco/redisio/pull/326 and will probably be released as 2.6.0 as opposed to 2.5.1


chore: add aks-node-controller doc

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Good job! Thanks for the detailed readme.


Permit "version" string in content-type header, rebased to 3.4 + test

PR #1848 by @sempervictus rebased to 3.4.

TODO from meeting:

Make a clean PR with just the necessary bits.

Closing in favour of PR #1900.


Add code examples

Hi, all! In order to help new users getting started with clover quickly, it would be good to add an examples folder containing
several basic code samples showing the main feature of the library

Hello @ostafen,
In my opinion, a good way to organise the examples would be as following:

examples

collections: Basic examples of creating and deleting collections.
insert: Working with different types of inserts using both NewDocument and NewDocumentOf.
sort: A few examples for sorting, integers, UNIX dates, etc.
update & delete: Handling different types of update for both single and all documents.
import & export: Examples for the upcoming https://github.com/ostafen/clover/issues/16.
engines: How to use the config.go functions & options and choosing different engines.

Inside each folder I would personally add a main.go, ready to copy & paste.
Here's an example of how other libraries are handling this

I agree with your suggestion!

Hello @ostafen, I would like to take this up. I'm planning on using the structure @jsgm has proposed of having each in its own folder, ready to copy & paste.

Hi, @EdwinWalela, first of all thanks for your interest. Yes, you can use the structure proposed by jsgm :=)
I assigned this to you


In somecodes, .\resources or .\results\ are used directly instead of using paths like RESOURCES + "path" or RESULTS  + "path". The issue behind this is if using the different run name, then the code would fail.

@casinocullen  I don't see this anywhere in the code? can you point out where this is happening?


Change Readme.md to follow guidelines

Readme guidelines: https://github.com/Azure/azure-sdk/blob/master/docs/README-TEMPLATE.md
Other changes:

Double string in Hello World example
Evaluate how connectionString is managed. Code should compile

PR: https://github.com/Azure/azure-sdk-for-net/pull/5763


Added Team Tactics

Probably my last addition, until I start any new projects anyway.

Thanks for sharing the info. Good luck with doing new projects.


REST API

Would be great to have REST API for exposing Marten outside of .NET community

@darky This is a great idea, we already have this in mind to allow usage of Marten via other languages.

Moving this to discussions and will pull it back to issues when to get to work on this in the near future.


Correction and calibration

This PR captures the spirit of our discussion here.
@seongsujeong let me know what you think.

Thank you for the comprehensive and compelling explanation. I completely agree with you.


Payment Requests

Cashu transactions are initiated by the sender and can be pushed to the receiver without any additional help. However for many use cases requesting a payment may be more desirable (e.g. point-of-sales). This proposal introduces a standardised format for payment requests, that supply a sending wallet with all information necessary to complete the transaction.

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

Yes, this should be included. I will add it later doday

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

Very cool. The receiver could specify the entire secret as well.

Does this nut provide any information through the info-endpoint other than the supported-flag?
It could make sense to provide the supported currencies and min/max amounts like we do in nut-4 and nut-5. Or is this nut using the same values as nut-5?

@callebtc thanks for adding the suggestions. This does indeed LGTM!

Are we ready to remove NIP-04, because the support for NIP-17 might be too limited still. Afaik nostr-tools does not have it yet.
But I agree that we probably should be looking forward and not carry stuff around that's already considered harmful

typo fix in https://github.com/cashubtc/nuts/pull/178


[Event Hubs] ConsumerClient throwing empty object literal and Closing with reason "Shutdown"

Package Name: Event Hubs

Package Version: 5.0.0.preview.6 & 5.0.0.preview.7

Operating system:
docker image node-alpine and osx locally

[x] nodejs

version:

[x] typescript

version: 3.7

Describe the bug
The consumer runs for a while and then throws an error which is caught by the onError handler and appears to be an empty object literal. The onClose handler is then called with the reason "Shutdown".
Running debug I get the following:
error: Error: {}
  azure:event-hubs:error [connection-2] Deleted the receiver 'asterix/ConsumerGroups/surveillance-service/Partitions/0-3d227f90-9392-407c-ab06-d0e30dde2003' from the client cache. +3s
  azure:event-hubs:linkEntity [connection-2] EventHubReceiver 'asterix/ConsumerGroups/surveillance-service/Partitions/0-3d227f90-9392-407c-ab06-d0e30dde2003' with address 'asterix/ConsumerGroups/surveillance-service/Partitions/0' closed. +16s
info: Closed: "Shutdown"
  azure:core-amqp:retry [connection-2] Attempt number: NaN 1 +5s

To Reproduce
Steps to reproduce the behavior:

If I set the batch size up higher it happens almost straight away, lower batch sizes allow for longer run before the connection finally shutting down.

Expected behavior
An error that describes why the connection was shut down.

@hally9k
Thanks for trying the preview version of the event hubs SDK and reporting this issue!
Do the logs indicate what caused the underlying receiver to be disconnected/deleted? Does it look like a network issue?

@chradek Which logs are you referring to? If you could guide me I'd happily go and reproduce and post them up here.

In the mean time I'll attempt to reproduce with the stable SDK and see what happens.

@hally9k
The logs you posted after setting DEBUG were what I meant. Were there any logs from before the error was returned? Also, when you say you set the batch size higher, how high are you setting it? It sounds like this issue happens consistently when you set the value high so we can try to reproduce it on our side as well.

The speed to "Shutdown" seems to have a relationship with the batch size but the service still goes into "Shutdown" with a batch size of 1, in my case after about a minute. It happens a bit faster with a batch size of 100 and a little bit faster again at a batch size of 1000.

Other things that are possibly relevant are that the payload sizes are quite big and I'm sending batches of 1-20 events at a time.

Can you share roughly how big the sizes of your events are? (Are we talking hundreds of KB?)
And thanks for the information you've given so far!

@chradek I'll just do a quick capture so we can see...

37.avro.txt
@chradek I couldn't really infer the payload size but here's a capture file.

@chradek I've just rewritten this with the stable @azure/event-processor-host package and it appears to be stable and processing as expected.

@hally9k
I've been trying to reproduce this issue but haven't had much luck yet. Can you share a code sample that reproduces the issue for you?
Here's what I'm using:

Docker on windows using node:alpine.
Script to send 15 KB events to event hubs (also tried events up to 512 KB in size)

import {EventHubProducerClient} from '@azure/event-hubs';

async function run() {
  const client = new EventHubProducerClient(
    process.env["CONNECTION_STRING"] || "",
    process.env["EVENT_HUB_NAME"] || ""
  );

  while (true) {
    const batch = await client.createBatch();

    const body = Buffer.alloc(1024 * 512);
    body.fill(`[${new Date().toISOString()}] I'm just an uneventful event.`)
    const didAdd = batch.tryAdd({body: body.toString()});
    if (!didAdd) {
      console.error(`Issue adding an event to the batch`);
      continue;
    }

    try {
      await client.sendBatch(batch);
      console.log(`Batch was sent.`);
    } catch (err) {
      console.error(`Error sending batch`, err);
    }

    await new Promise(r => setTimeout(r, 100));
  }
}

run();

Test script to receive events using<EMAIL_ADDRESS>
import {EventHubConsumerClient, EventPosition} from '@azure/event-hubs';

async function run() {
  const client = new EventHubConsumerClient(
    EventHubConsumerClient.defaultConsumerGroupName,
    process.env["CONNECTION_STRING"] || "",
    process.env["EVENT_HUB_NAME"] || ""
  );

  const subscription = client.subscribe({
    async processInitialize(context) {
      context.setStartingPosition(EventPosition.latest());
    },
    async processError(err, context) {
      console.log(`Error while processing events:`, err);
    },
    async processEvents(events, context) {
      console.log(`Received ${events.length} events`);
    }
  }, {
    maxBatchSize: 1000
  });
}

run();

I'm setting the maxBatchSize to 1000, and keeping the default wait time of 60 seconds.
I've been running the following command in docker to get logs (removed connection_string and event_hubs_name from example):
DEBUG="*error" node src/index.js 2>&1 | tee log.txt

So far I haven't seen the error handler invoked but I'll keep it running in case it happens.

@chradek After thinking about this I would adjust your reproduction case in two ways to try and simulate my case more accurately:

I think the throughput is much higher and multi event batches so I'd reduce the timeout from 100 ms and create random numbers of events per batch between 0 - 20.

After thinking about high throughput I realised that the other key difference is the processing I was doing in the onMessage/processMessage event handler. Some geospatial queries that have the potential to be quite costly. I would add a processing load to the event handler and that might create some back pressure. Could this short circuit the connection in this way?

Thanks @hally9k.
I made some adjustments to the send script so that it no longer waits 100 ms to send a batch, I have multiple producers, and each batch contains between 0-20 events. I should mention I'm also sending/receiving to an event hub that has 3 partitions.
I also updated the test script for 2 different scenarios:

Add a non-blocking task that takes over a minute to complete. It's await'ed so that back-pressure is in place.
Add a blocking task that takes over a minute to complete.

In both cases I keep the maxBatchSize at 1000. In the 1st scenario I am receiving 1000 events within the maxWaitTime, and haven't seen the error triggered. I can try further increasing the throughput.
In the 2nd scenario I see fewer events which can be attributed to the blocking task preventing any other processing from happening on the node.js thread.
Unfortunately in neither case have I been able to get the error handler to be invoked yet.
Is there any chance you're able to enable logs like in my sample above using the DEBUG environment variable (logs write to stderr)? That might help us catch something that isn't obvious.

I'll pull an old commit and reproduce for yo later today, I'll post the entire debug log so we can have a look through.

Hey @hally9k,
Any updates here?

@ramya-rao-a I have been super busy over the holiday period and have not had time to reproduce this. I have not forgotten though and will get to a reproduction case soon, hopefully.

I'm closing this due to inactivity, but please feel free to either comment here or open a new issue if you continue to see this issue.

@chradek I am experiencing the same during high network latency
Please reopen

@baybal Do you have any additional info you can add to this? Are you also seeing an empty object passed to processError before seeing processClose?
Some additional questions that would help us troubleshoot:

What version of the library you are using? Are you running the latest? (5.5.1)
Does your consumer client recover after encountering this issue?
Are you able to reproduce this issue? If so can you capture logs from the library via setting the DEBUG environment variable to azure:*,rhea:frames?

I will check tomorrow

@baybal When you get more information, please open a new issue


Change manifest on runtime

Hi, I am developing a Nuxt3 application with the ‘vite-pwa/nuxt’ module and I was wondering if it was possible to dynamically change the manifest of the application.
I mean, to explain the use case well, our Nuxt application is going to be called from different urls (for example: example1.com, example2.com, etc) where all of these applications are going to be configurable in database, where we will look at the ‘servername’ that is being visited to show different information.
The question is whether it is possible for this Nuxt application to be able to serve different manifests so that they are different PWAs depending on the servername the user is visiting.
So if I enter the domain example1.com it will ask me if I want to install the ‘app’. On the other hand, regardless if I have the example1.com app, and I visit example2.com it should ask me the same thing.
Therefore, as we are linked to a database for the configuration of the application I need everything to be done in runtime.
Is it possible to make this functionality, so that the icons, name, description, etc... change according to the domain we visit with only a Nuxt3 application?
Apologies in advance for my level of English and for being inexperienced in PWA technology. 🥴

Maybe you can use the strategy at elk.zone where we add 2 web manifest per locale, you only need to disable the manifest with false and add a custom module checking for the domain at build time:

https://github.com/elk-zone/elk/blob/main/config/pwa.ts#L14
https://github.com/elk-zone/elk/blob/main/modules/pwa/index.ts

From custom module you only need the logic to deal with the web manifest for dev and build, the rest if the logic isn't required (the rest of the logic is included in the pwa nuxt module)


[Bug]: The Dark mode not Working

Bug Description
The Dark mode is not working
Provide a detailed description of the bug
When we click on the dark mode button it should change the background color of darken the theme of website but it is not happening
Expected Behavior
it Should darken the website Theme
What browsers are you seeing the problem on?
No response
Put here any screenshots or videos (optional)
In Dark mode

In Light mode

By submitting this issue, you agree to

[X] I agree to follow this project's Code of Conduct
[X] I’ve read all the issues in the issue section, and this has not been reported yet.

Other Information

[X] I'm a GSSoC '24 Extended contributor
[X] I'm a Hacktoberfest '24 contributor
[ ] I am willing to work on this issue (optional)

assign me this issue


Oversized Splatters when using Expansion (DECAL)

Splatters get really big when stacked, maybe add a "Maximum expansion size" setting?

How to install this module?

There is no "installation", it's just a module for use by developers.

Check my reply on the Devforum post.

How to install this module?

There isn’t a specific installation? You just insert the module inside a Roblox Studio place and use it as seen in the Github’s page.


Missing FixturesMixin

Hi,
I cannot seem to find the FixturesMixin mentioned in the doc. Maybe it's something evident and I'm just missing it ...
Can you please let me know how is that supposed to work?
Bests,
Yoanis.

Sorry Yoanis, I'm in between versions of the library now and some of the documentation for the new version made it's way into the README file for the old version. Rather than trying to rewrite the documentation for the old version, I just decided to merge in the latest code. Do a pull on the master branch and try walking through the updated README and let me know if you run into any problems.

Is this newer version already available on pip?

Sorry Yoanis, but not yet. If you just want to use the current version that is on PyPI, you simply need to ignore the FixturesMixin completely. Just decorate your class with the fixtures decorator function and don't worry about inheriting from the mixin class. Now, if you're curious as to why the change...
So, the current version that is on PyPI is perfectly usable, but it has some limitations as to what I can do with it, hence the need to change it. Specifically, I want to be able to use the the decorator to mark individual methods with fixtures data to be setup and torn down before and after the test method runs. With the current version of the library, I can't do that, and so I'm changing it to use a metaclass instead of a decorator for all of the internal class manipulation that it's doing. I originally set out on this path to begin with, but I had this brilliant idea that I could do what I wanted without metaclasses, but unfortunately, I was wrong. In the new version, you'll inherit from the mixin class and identify the fixtures files you want to load through a pair of class variable's: fixtures and class_fixtures. For method specific fixtures, you'll then be able to use the decorator to mark the method as using a specific set of fixtures files. So, it will be slightly backwards incompatible, but it will be much more flexible and powerful going forward, and the changes that you'll need to make to your code when switching between versions is fairly trivial.
If you'd like to use the new version, you can do so, though it's not as thoroughly tested yet as the one in PyPI, but it should be fairly reliable. To use it, you'll have to pull it directly from github. You can do so with the following command:
pip install git+https://github.com/croach/Flask-Fixtures.git

I hope that helps. I should have the new version published to PyPI within the next few weeks, I just have a few more TODO's to check off before it goes live.
Thanks for your patience.

Hi Christopher,
Thanks for the long and insightful explanation. I kinda have the seem needs you do so I am going to move ahead and give it a try to the latest version. I will let you know how that goes.
Bests,
Yoanis.

Hi Christopher,
Why do I get this?
####################### INFORMATION #######################

If you are using JSON for your fixtures, consider
installing the dateutil library for more flexible
parsing of dates and times.

###########################################################
when I run my tests with nose:
TEST=1 nosetests  --with-coverage --cover-package pysage --cover-html project/tests/api/session_test.py

Hi Yoanis,
It's just informational, nothing to be worried about. Basically, I use the following command to parse dates that you might have in your fixtures files:
datetime.strptime(dtstring, '%Y-%m-%d')

This is very limited, but as long as you only need to specify simple dates in your fixtures, you're fine. If, however, you'd like to specify dates/times in a different format, you'll need to install the dateutils library to do so. That's all that message is telling you. By the way, this isn't an issue at all if you use YAML, since it has very rich date/time parsing built in. I personally use YAML for all of my fixtures. I feel it's cleaner and easier to read and I like the fact that it allows me to add comments to my fixtures files.

Thanks. Just wanted to let you know that I have migrated fixtures to the latest commit on master and everything seems to be working this far ;).

Hi Christopher,
I was just wondering if with the latest release was possible to have a particular test method to use a specific fixture?
Bests,
Yoanis.

Hi Yoanis,
So, the answer to your questions is, not yet. Though, the functionality you're asking for is the reason that I made the backwards incompatible switch from the last version of the library to the current one. I'm nearly finished with the functionality you mentioned, and I hope to have it in the library in the next weak or two. If you're curious as to what the problem was and why I switched from decorators to a combination of decorators and metaclasses, I've described the whole thing in the paragraphs below.
With the earlier approach you could decorate a test method with the fixtures decorator and that decorator would wrap the test method in a function that would setup the DB, and tear it down again, all around calling your test method. The problem is that if you add a custom setUp or tearDown method, both of those would be run before the test method is called. Since the test method runs after the custom setUp method, the DB fixtures setup method runs after it as well. What this means to you is that, if you wanted to do some additional work with the DB in your setup method, you couldn't since it hadn't been created yet.
In the new version, you will decorate a method with a function yet to be named, and it will mark the method as "special". Then when the class is being created, the metaclass will grab all of the special methods that you decorated and do a bit of magic to make sure that the fixtures setup will get called first, then the custom setUp function, and then the test method.
Hope that makes sense.

Hi Christopher,
Yes this makes sense. In the mean time team I will figure something out ;). Let me know if there is anything I can do to help.
Bests,
Yoanis.

Hi Christopher,
maybe it would be nice to also add a yaml fixtures file in the project ?
Thanks

Hi @sylwit,
I added a sample YAML file (authors.yaml) to the documentation and I included the file in the test project as well. Hopefully, that'll help you out.
Thanks for the suggestion.
Christopher

Hi @croach
thank you, you did it before me, I had a PR for you about this :)
Thanks for your work
Sylvain


Ranges do not appear on generated .zap file for Thermostat Cluster

Problem
Thermostat.xml file contains the min and max values for
Temperature setpoints and limits but they do not appear in the generated .zap file
These were identified in https://github.com/project-chip/connectedhomeip/pull/8878
Also the zap tool displays warnings about signed ints but does generate the correct code.
Matter spec seems to have removed the ranges
Proposed Solution
Follow up on these

@chrisbeach59 I think this issue should be filed in https://github.com/project-chip/zap ?

https://github.com/project-chip/zap/issues/209

Looks resolved?


'P' and 'B' are too close in shape and make looking at modules/benchmark list too confusing

'P' and 'B' are too close in shape and make looking at modules/benchmark list too confusing; the shapes blend together.
Having the module groups separated, or adding in emojis again, would help visually differentiating the practice modules from the benchmarks more easily.
I'm unsure of the best solution, or why the emojis were removed in the first place.

I agree they are subtly different. Jared says putting checkboxes there so we can check off modules as complete is on the agenda. Meanwhile, symbols like “-” for practice modules and “*” for benchmark modules would be much easier to distinguish without creating any emoji rendering issues.

fixed.


Add multisig holder script

Add script to test issuing credential to a multisig AID, based on the multisig-holder.py script in Signifypy

Created this as Draft PR as it is blocked  Issue #190

I think this PR demonstrates the same set of issues as PR #184. Once all the issues have been resolved, I suggest these two PRs should be combined somehow.


[Bug Report]:  undefined reasons in chunks modules stats

System Info
Devcontainer in macOS
  System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (5) arm64 unknown
    Memory: 16.98 GB / 23.45 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 18.12.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  npmPackages:
    @rspack/cli: ^0.1.4 => 0.1.4

Details
When checking the reasons property for a chunk's module, it is always undefined...
stats => {
  const statsJSON = stats.toJson();
  for (const chunk of statsJSON.chunks) {
      for (const module of chunk.modules) {
          // module.reasons is always undefined
      }
  }
}

Reproduce link
https://github.com/lalexdotcom/rspack-bug-report rspack-module-reasons
Reproduce Steps
!! Be sure to be on the rspack-module-reasons branch !!
With rspack
npm run rspack-stats-output
With webpack
npm run webpack-stats-output

one workaround:
module.exports = {
    // ↓↓↓
    stats: { reasons: true },
    entry: './index.js',
    mode: 'development',
    target: 'node',
    output: {
        filename: 'main.js',
        path: path.resolve(__dirname, 'dist'),
    },
    plugins: [DisplayStatsPlugin]
};

Good to know. So it's just the default value which isn't the same as webpack?


Connect swaps/swap claims

Despite the SwapView and SwapClaimView types supporting fields that allow swaps and swap claims to reference each other, we haven't actually been populating those fields yet.
This PR adds a couple keys to the TransactionPerspective Protobuf type to make it possible to populate the claim_tx and swap_tx fields in SwapView and SwapClaimView, respectively. Hopefully, in the future, we can do the same with undelegates <-> undelegate claims.

Rebased on main to resolve conflicts in the generated proto descriptors.

Nice job! This was trickier than I expected.


Frameless + Drag Handlers Implementation

@mattkol The drag handler was not added in CefGlue as the System.Drawing library has missing classes. The implementation isn't considered complete for CefGlue. If an alternative can be used to add the necessary classes then it can be done.
I also looked into instead of hard coding the margins (at least for WinApi) to use GetSystemMetrics on the SM_CYFRAME and SM_CXFRAME see here for the C++. This API isn't DPI aware so instead it might be best to use GetSystemMetricsForDpi see here
Originally posted by @NovusTheory in https://github.com/chromelyapps/Chromely/issues/93#issuecomment-491896264

@NovusTheory @FrankPfattheicher I added the drag handlers - https://github.com/chromelyapps/Chromely/commit/d4486da394a6297f711fe2a230c63e334b6cceb4.
CefGlue drag handler is just a place holder for now - CefGlueDragHandler.cs until we find solution with System.Drawing Netstandard implementation.

I worked on this a bit and noticed that you actually broke frameless in your adjustments with this https://github.com/chromelyapps/Chromely/commit/44f8abee7053e3b255e3dda8b040bb23fd07ee47#diff-099ca516144c41580f77cc3e65775029L186
This is necessary to use the custom drag regions and added them back in my commit (view below).
I won't pull request anything yet but in my commit (https://github.com/NovusTheory/Chromely/commit/6dd0661f937c264b6aed9386fe7f9aa0e96e7888) I fixed the frameless window mode systems and added it to CefGlue now. I noticed that System.Drawing.Common works and added that NuGet package which adds the Region class. Everything in this commit works and have tested with your demo applications respectfully. In an old issue #93 it said it had an issue with mouse clicks but I have not experienced this at all with and without frameless mode enabled.
If you'd like to review it on the spot before I send a PR then you may.

@NovusTheory that is not totally unexpected that something broke - reason I asked for a review - https://github.com/chromelyapps/Chromely/issues/93#issuecomment-491525455
I may be able to review by weekend. @FrankPfattheicher  is also familiar with this so he may have some bandwidth for a review.
Thanks.

I'm sorry I never actually got around to fully reviewing that commit and completely let it pass.

@NovusTheory np. Thanks for keeping a track on this ..
We should get it right this time.

@NovusTheory
Code looks good - but there is no content any more !?
Running Tests/Chromely.Integration.TestApp should look like this:
(adding .WithFramelessHost() and commenting out Environment.Exit(0);)

But i now see an empty window :-(
DevTools show that document is sized to 1016x17 pixel !
Please look at this...

@NovusTheory @FrankPfattheicher is it advisable to include the PR - https://github.com/chromelyapps/Chromely/pull/104/commits/c86ca10511015916958685fafaf254b236a2effb in this test?
If you think it is, please include.
Thanks.

@NovusTheory @mattkol
I think it's better to first fix the "content missing" issue (see above).

@FrankPfattheicher I'll run some tests to see why it does this. On a side note (maybe this needs another issue opened). I was doing some tests with GTK on Windows and notice the browser window isn't resized with the parent

@NovusTheory I tested your PR #107 extensively and I noticed 2 main things:

CefGlue -  draggable does not work but all functionalities work as expected.
CefSharp - draggable works, but most functionalities are not working or too slow. Sometimes I had to click a button twice.

When I localized it seems to be an issue with a combination of subclassing and event loop.
My suggestion is to hit a reset on this. May be start incremental changes and we all @NovusTheory @FrankPfattheicher @mattkol  test before we move to the next stage.
Meanwhile for that reset - I had the base frameless + draggable working by combining @NovusTheory DwmExtendFrame   implementation and NC HIT implementation  I found.
It is frameless and draggable but not re-sizable. Changeset - https://github.com/chromelyapps/Chromely/commit/ebdeb3edc569ed34aa5f8a199581a8de0d5d2817
If this is what is intended from the beginning then we may be good. If not we may take it one step at a time, to find out where the disconnect is. May be we do separately - event looping, subclassing, message handling. But ensuring one step works before the next stage.
@NovusTheory @FrankPfattheicher please also help review this change before we move to the next.
Note that this base implementation does not use subclassing, draggable handler, NC related message handling. We can start re adding these functionalities as needed going forward.
Thanks.

@NovusTheory @mattkol
I think it's better to first fix the "content missing" issue (see above).

This is what I get with Integration Test:

I'm not sure what specifically is going on with the two because I've done my own testing and they worked just fine.

It is frameless and draggable but not re-sizable. Changeset - https://github.com/chromelyapps/Chromely/commit/ebdeb3edc569ed34aa5f8a199581a8de0d5d2817

As for this, the intention is to support this for replicating Electron's frameless window which removes the titlebar but keeps resize functionality as well as the ability to implement custom drag areas with -webkit-app-region: drag. Look at some apps in Electron, for example Discord, which does exactly what is being replicated. It uses a custom titlebar with a defined -webkit-app-region: drag on it to permit dragging the window around as well as still having the resize borders on the window. It acts as if it was a native window.
If you'd like to hit a restart on this we can figure something out that makes this more clean and take it step by step.

@NovusTheory I will be honest with you, I am confused too. Especially why both CefSharp and CefGlue would not behave the same way. I think you and @FrankPfattheicher have done everything right.
But please trying test the base implementation that I have, then we can start from there. I think we have all functionalities we just need to combine them correctly.

@mattkol I've looked at your base implementation and while it does add the dragging system it's using the native titlebar which isn't the idea as that's not a true frameless window. What is required to keep moving forward is implementing NCHITTEST correctly which allows you to override the "tests" that Windows is performing to determine the action allowed, such as dragging, resizing, and more, for the specific point on screen the mouse cursor is at.
The problem with this override when I was making it was chromium because it's taking the NCHITTEST and providing its own response (by default is no action). This could be where it got finnicky in the code. I had to override the WndProc of chromium's windows and check the hit test (for our non client area which were the resize borders) and bubble back up to the main process (Which is our Chromely app) to allow it to provide a proper NCHITTEST response. Note that we can't provide a response from the overriden WndProc as it would apply to the window which returns that response (not our Chromely app).
The next problem is supporting -webkit-app-region. We have to override chromium's LBUTTONDOWN and check the mouse cursor point to see if it's within our defined app-region. If it is then we release the capture and send a message to the main window (our Chromely app) to start dragging.
The reason we have to bubble the events up and not overriding and returning our own response is because Windows would then perform that action to the window that returned that response. In this case it would be the chromium browser and we'll instead be interacting with that which would move it around inside our chromely app.

@mattkol @NovusTheory
What is the current state of th problem?
Can i do something?
It still looks like this:

@FrankPfattheicher yes that is correct but should be draggable. But the drag is using DwmExtend Frame implementation.
Yes please do something. Thanks.

Disclaimer: I am not looking at CefSharp specifically for this comment.
I was doing some research and it seems the best way for us to create a frameless window with all the fancy features is doing what views do in CEF. A related issue from on CEF's bitbucket here.
Quoted from the issue linked

Ownership of the complete window hierarchy including desktop/system interaction, parent/child relationships of windows and widgets, focus/keyboard handling, drag/drop handling, modality, rendering, etc.
Layout managers (box, fill, grid, etc).
Widgets (web view, button, text field, bubble, tooltip, table, tree, combo box, etc).

I'm not sure how useful this is but the most important seems to be this part here

Ownership of the complete window hierarchy including desktop/system interaction, parent/child relationships of windows and widgets, focus/keyboard handling, drag/drop handling, modality, rendering, etc.

Another relevant file is CEF's own implementation here which seems to show that it is in control of the window and rather instead passes events down to the browser window like shown with ShouldDescendIntoChildForEventHandling.
To sum up it seems like we need to either create our own system that works like this or rather implement the views system and rely on CEF to generate windows as it seems to be doing with the views system and is cross platform compatible supposedly.

@NovusTheory personally, my concern with the approach is a boundary issue. Chromely is based on CefSharp and CefGlue implementation of CEF. If these functionalities are not exposed by either implementations, are we not crossing into CEF boundary? There is no problem with that,  but we may require more knowledge to do that successfully and we need to think of maintenance too.
But if that is not the case, then we can explore more.

Both these implementations of CEF are just wrappers over the the native CEF DLL. Views are not exposed by CefGlue as far as I can tell and I tried to look for any updates and it didn't seem to include them. I did not look at CefSharp as per my disclaimer in the top of my comment, I was looking at the cross-platform solution more.
Since as far as I can tell CefGlue does not expose the views implementation of CEF so we would end up crossing the boundary of having to maintain that part ourselves. I've forked and looked at CefGlue to see how implementing it would go and it doesn't look all that difficult but I noticed that CefGlue has an incomplete auto code gen for the CEF C++ headers where it doesn't correctly grab the base class. For example it only supports auto gen for classes implementing CefBaseRefCounted and CefBaseScoped while the views feature may implement CefView which implements CefBaseRefCounted. The python script doesn't know how to handle generating this correctly.
If you don't want to go down this route the only other option to explore would be figuring out how views work and seeing what can be done with the code we have. The main thing we're looking for is that the parent (our base window hosting the browser process) keeps all window events to itself and passes them down as necessary to the browser window.

@NovusTheory..oh no.I did not really mean that I don't want to cross the boundary. As long as we have the knowledge to do it and it is easily maintainable, I am all for it. I am only being precautional so that we do not get into endless loop.
If we have the knowledge and we can continue to support it. We should be fine.
Thanks.

So @mattkol I may have come up with a good solution that won't cause problems and overall prevent lot of hacks. Firstly, I did try to get views implemented in CefGlue but the interop generator it has is a mess and I didn't want to spend the time figuring out CefGlue and and the interop generator.
My solution was to set the CEF browser as windowless. Instead of CEF creating a window and Chromely creating its own window to then have the browser as a child of it. I figured I'd strip CEF's window out and we just use our window.
How does this all work though? I use CefRenderHandler which exposes the renderer for CEF when using windowless mode. The main thing we want is OnPaint which provides a buffer of the pixels (BGRA array) that CEF would have otherwise natively rendered onto its own browser window by itself. What my implementation does, which currently only applies to CefGlue.WinApi, is I use GDI to create a bitmap from that pixel array, provide it to the NativeWindow, and call a window redraw which sends a WM_PAINT event to our Chromely window. In that WM_PAINT event I take the bitmap and do some conversion and interaction with HDC to draw it on the window client area.
As for interaction with that browser I use more WndProc events to pick up focus events, mouse scrolls, and key presses and send that off to the CefBrowserHost.
This implementation is most certainly not perfect right now but I want to get some feedback if this is a good direction to go into. The main reason behind doing this is that we don't have to do trickery with the CEF browser window and we instead now keep all WndProc events for ourselves and this makes implementing frameless and handling input much easier whereas before I had to override CEF's browser windows WndProcs to get what was needed to do this and input seemed to have been buggy.
The branch with this implementation is located here https://github.com/NovusTheory/Chromely/tree/impl/os.

For what it's worth,  and obviously you can completely disregard this if you so choose.  I would advise against implementing OffScreen rendering,  you will gain some benefit,  the downsides outweigh those benefits.

Performance is worse
There are constantly rendering issues which change from version to version
You have to implement your own DPI scaling, tooltips/popups, accessibility handling,  IME support,  the list goes on.
From memory there is still an issue with adding custom context menu items

With more time I'm sure I could list more.

@amaitland thanks for your input on this and support for Chromely.
@NovusTheory one major reason for Chromely from day one was to avoid Offscreen rendering. This I stated in an  earlier article on CodeProject:
https://www.codeproject.com/Articles/1243956/Chromely-Lightweight-Alternative-to-Electron
"While working on a WPF project, SugarDesk, I was looking for ways to include SugarCrm Reports in my project and the most appealing option was to use Electron. Then, I discovered CefSharp but was not happy with the limitation - you can only use bitmap rendering instead of pure HTML rendering. In short, I ended up creating one without WPF and decided to share it with the community."
From my research so far I think our best bet is still the Winapi Subclassing we started with. I have a skeletal implementation that we can fine tune (for Windows), but just not having the bandwidth yet to zoom in on it. Hopefully next couple of weekends.
Great efforts on this!

@NovusTheory @FrankPfattheicher  using Subclassing, this is now implemented for Windows. The implementation is based on CefSharp ChromeWidgetMessageInterceptor.
Main implementation features are:

Chromely implementation of ChromeWidgetMessageInterceptor.
Registration of the interceptor
Handling of drag messages .. Dragging
Handling related NC related windows messages - NC Messages

I checked this into the master so that it is easier to test and discuss. And also easy to revert if need be.
There is a wiki page explaining what is required to for usage -
https://github.com/chromelyapps/Chromely/wiki/Frameless-Window

Maybe the communication was just getting mixed up in my head. I properly tested what was necessary for checking the subclassing and I noticed that every other LBUTTONDOWN does not get captured. It instead seems to be captured by Chromium as I noticed every other LBUTTONDOWN and dragging my cursor would highlight text in the window. Other than that it seems to work as it should and the code looks clean.
I also noticed you're handling NCCALCSIZE as defined. here https://github.com/chromelyapps/Chromely/blob/dec7dd5a1a5bf014ea34a173daa97ad5bb898054/src/Common/NativeWindowBase.cs#L440-L447 Is this intended behavior? Usually frameless windows have no non client area and just return IntPtr.Zero.

@NovusTheory
While I was implementing this, Subclassing with dragging seems to work great. All the time ..
The resizing was the annoying part (or I lost patience at the end, or just dumb!).
So I think this is where your expertise will help - using your code on resizing.
The problem is when I tried the usual process of NC* hit tests and returning appropriate flags - HTTOPLEFT, HTBOTTOMRIGHT, etc .. I lost the subclassing working appropriately.
So I tried using - WS_SIZEBOX -
https://github.com/chromelyapps/Chromely/blob/b424c8a370542e5e508d13a3d2db2245c44a8095/src/Common/NativeWindowBase.cs#L514
This got resizing to work well.
But also got the WhiteStrip
So what you see is trying to get around the whitestrip. Ugly yes, but I still rather have the subclassing and dragging working well.
Please throw that out, if you find alternatives.

@mattkol After some testing I figure out why LBUTTONDOWN was not consistently working. When you define the WndProc here https://github.com/chromelyapps/Chromely/blob/b424c8a370542e5e508d13a3d2db2245c44a8095/src/Common/ChromeWidgetMessageInterceptor.cs#L99-L104 you are not returning IntPtr.Zero (what windows requires when an application handles the message) and so it falls out of the switch case and sends back the result of this https://github.com/chromelyapps/Chromely/blob/b424c8a370542e5e508d13a3d2db2245c44a8095/src/Common/ChromeWidgetMessageInterceptor.cs#L110 Simply placing a return IntPtr.Zero after _forwardAction(message); resulted in it working consistently every time.
Was there a chance that when you tested it you were clicking the non client area as per your NCCALCSIZE you made. I removed the non client area when I was testing this.
If this seems to work consistently and doesn't cause problems with the subclassing then we could continue to the rest of the implementation.

@NovusTheory makes sense on return IntPtr.Zero. I was returning the default handling result which was ruining everything. Returning IntPtr.Zero did not cross my mind.
I made the change.
On NCCALCSIZE, it not that obvious if you use the usual white background. You have to use a different color to see it.

Great progress!!!

@mattkol You mentioned earlier that you had issues with NCHITTEST? I was doing some testing with it because I can't see resize borders being implemented correctly without it and I'd like you to try something out.
case WM.NCHITTEST:
    var hitTest = GetCursorHitTest(hWnd, wParam, lParam);
    if (hitTest != HitTestResult.HTCLIENT)
    {
        return (IntPtr)HitTestResult.HTTRANSPARENT;
    }
    break;

Using some old code in the commits I did for hit test checking I'd like you to try to place the above code above or around this line inside the switch case. GetCursorHitTest is the old hit test code.
https://github.com/chromelyapps/Chromely/blob/b424c8a370542e5e508d13a3d2db2245c44a8095/src/Common/ChromeWidgetMessageInterceptor.cs#L91-L93
I set it up to replace the int[,] to HitTestResult[,] and replaced each one accordingly. The middle (a 0) being HTCLIENT. I set it up so that anything which isn't the client will be transparent and sent to the NativeWindowBase class while anything that is HTCLIENT will pass-through to chromium's wndproc. I setup NativeWindowBase NCHITTEST real quick to just HTCAPTION and it seems to work fine. I didn't notice any subclassing being broken and it shouldn't be if it's in the client area. If all goes well if you try this out it may be an option to continue with this and figure out the best code implementation.

@NovusTheory please can you attach relevant files for the changes you proposed. I tried at my end, not working.
Thanks.


[Portal] Remove redundant circular PortalProps import

Looks like this import was left there by mistake and typescript 3.7+ throws on it because of name conflict.
node_modules/@material-ui/core/Portal/Portal.d.ts:2:10 - error TS2440: Import declaration conflicts with local declaration of 'PortalProps'.

2 import { PortalProps } from '../Portal';

see more: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-beta/
in section: "Local and Imported Type Declarations Now Conflict"

[x] I have followed (at least) the PR section of the contributing guide.

🥚😂

?

I meant: "nice finding"!

Oh thanks! Wasn't aware of what egg emoji means.

Thank you

@oliviertassinari is there any chance of this getting backported to 3.x.x?
I've got a TypeScript application that can't be updated to 4.x.x right now due to client reasons, and this is the only blocker for us using TypeScript 3.7 😢


Allow component initializers that take no arguments

Motivation
@topherfangio Brought up something that I also found unexpected in this comment:

It seems like we are forced to pass arguments to a component? Example: I can't get render(MyComponent) to work. I keep getting the error wrong number of arguments (given 1, expected 0) when it calls my initializer. This just seems a bit strange.

While I'm not sure there's a lot of value to components that don't take any props, I do think this error message might be confusing, and could lead a developer that's newer to actionview-component to spend time trying to figure out if they're incorrectly calling render. And it's likely to come up for devs when starting a new component with TDD.
Proposed change
What do people think of changing Actionview::Base#render to allow for 0-arity initializers? For example:
class ExampleComponent < ActionView::Component::Base
  def initialize
    # Takes no arguments.
  end
end

Other changes considered
Initially, I wanted to avoid changing how render works, and instead change the error message to be more specific than ArgumentError. One way to do this would be to check the airity of the initializer when loading the component. And raise an error message like, "Component #initialize must accept arguments".
However, when I tried to implement this it got a little tricky. I think the place to do the check is in ActionView::Component::Base (in a hook like ::inherited). But since the component's initializer has not yet been loaded when code from ActionView::Component::Base::inherited is run, I'm not if that's possible. It seemed like we'd have to prepend a module and do some alias method chain style trickery with the component's #initialize, but that messed with the tactic of using the location of initialize's source location.
Possible further work
I'm not sure, but I think we may also have to modify ActionView::Helpers::RenderingHelper to mirror whatever changes we make here.

Specs are failing I suspect you need the arity approach to cover all Ruby versions. Also need to handle the to_component_class case.

@bostanio Yeah, I think I opened this prematurely 😞 I only ran it locally on 2.7 and haven't had a chance to finish the changes you suggested. I'll update here when I've finished; I'm working on them now.

@bostanio I addressed one of the other paths, but I'm not sure a test makes sense for the  render(Post)/#to_component_class style, as in that case the object is always passed right back to new like: Post.to_component_class.new(Post). Let me know what you think! And thanks for all of your help!! 😄

Looks good. I'm in agreement that the render(Post)/#to_component_class doesn't need this fix as we're always passing the object back in to the component. Maybe back that one out and this looks good to me.

Squashing my changes.

Removing the initializer requirement will alleviate this https://github.com/dylnclrk/actionview-component/pull/1, at least for Ruby 2.7+.

If we choose to use this change, I sort of feel like there should be a changelog entry.

@joelhawksley @bostanio I think I've addressed all of the feedback 😁let me know if there's anything else.

Now that we'll only be passing component instances to render, I think we can close this PR.
Thanks for digging into this @dylnclrk ❤


Updated dependencies and tests

oh right, Flame doesn't have the exit code patch yet…

this is the output that is causing test failures I think:

checked by adding console.log(stderr) before line 55 in test/cli-doctor-full.test.js. maybe it'll work when doing process.kill(process.pid, "SIGKILL") instead? (trying that on a veery slow vm rn…)

This is fixed!


BVAL-635 Adding current git revision to generated audit file

https://hibernate.atlassian.net/browse/BVAL-635

I end up having the following output in the tck-audit.xml file:
<!-- Generated by tck-audit.xsl at 2017-06-06 17:32  (revision )2.0.0.Beta1-33-g497a5df -->

Do you also see this issue?
It looks more like a bug in the XSLT processor but we should try to have it right.
BTW, is there a specific reason while you concat with a space?

@gsmet Re-worked that commit. I've worked around that issue by adding a separate xsl:text element now. On the concatenation, I'm not sure, it was C&P from the date line, there I reckon we did it to have an extra-space before the closing "-->", probably to work around that same issue. Looks good to me now.

Btw. you posted as an output "2.0.0.Beta1-33-g497a5df" - could it be you haven't fetched upstream since the last release? Because it should show the latest tag there, so that's what I'm getting: "2.0.0.Beta2-5-g8d348a2".
The format is "-<#no.-of-commits-since-then>-g". And as I learned, the "g" stands for "git" which supposedly should help when dealing with revision markers from multiple SCMs. Go figure.

Merged, thanks!


[docs] Update docs for importing external testers

Checklist

[x] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[x] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary.

Motivation and Context
Sample CSV provided by Apple does not show how to add testers to testing-groups. I had to dig in the implementation of pilot to find out it was actually possible.
Description
I removed the link and provided an example CSV in-line.

Done, thank you 👍

Done 👍


Build failure with the newest bazel

With bazel 5.0.0 on macOS the build fails with the following traceback:

On Ubuntu:

That's why we need to figure out the reason.
For now we can use .bazeliskrc to specify older version of bazel  if we wanna our build work. (e.g 4.2.2).
USE_BAZEL_VERSION=4.2.2

It looks like this is happening on other repos as well: https://github.com/google/jax/issues/8440


refactor(connector): replace all RwError usage with anyhow temporarily

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Replace all RwError usages in the connector crate to anyhow utilities as a temporary solution to eliminate the usage of RwError.
The refactor is always making things better as:

The only variants of RwError we were actually using were ProtocolError and InternalError. In fact, they was chosen not because they were the best fit, but because they accepted a String as a parameter so developers can easily construct them and make it compile. 😄 As a result, we can replace them with anyhow::Error without losing any semantics.

RwError always captures the backtrace, which may lead to unexpected performance issues sometimes. So does the anyhow::Error in the nightly channel, so it doesn't make things worse. For most of the critical paths, we've already used other error types (like AccessError in parsing) to avoid the backtrace. (#14874)

anyhow::Error are already massively used in the connector crate.

We plan to do further refactor in the future based on this PR:

Wrap anyhow::Error into a new type to include the type information, so that the boundary between the connector crate and dependent crates can be much clearer.

Find a way to avoid backtrace capturing in the anyhow::Error.

Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Current dependencies on/for this PR:

main

PR #14950   👈

This stack of pull requests is managed by Graphite.


http_archive fails after update

At one point, we fetch the a binary as part of the build. This was working great, but now that request fails after an update of buck2. The binary is still available, the step just fails with a somewhat opaque:
Internal error: Error performing a http_head request: HTTP Client Error (404 Not Found) when querying URL: https://api.anaconda.org/download/conda-forge/micromamba/1.4.2/linux-64/micromamba-1.4.2-0.tar.bz2. Response text:

cce725666b works fine, current HEAD does not.

curl -I https://api.anaconda.org/download/conda-forge/micromamba/1.4.2/linux-64/micromamba-1.4.2-0.tar.bz2 -o 1

says it is 404.
URL in your post is http, but it is https in error message.

This is probably the changes I made to enable http deferral for blobs identified by a SHA256. We can probably handle the error on HEAD and just fall back to the GET (which isn't deferrable), but that means you'll need to re-download this on all daemon restarts

Namely this:
https://github.com/facebook/buck2/commit/dfd4362cfed3f42cc7655fbdce1f1c36967c08e1

Does this fix it for you?
diff --git a/app/buck2_action_impl/src/actions/impls/download_file.rs b/app/buck2_action_impl/src/actions/impls/download_file.rs
--- a/app/buck2_action_impl/src/actions/impls/download_file.rs
+++ b/app/buck2_action_impl/src/actions/impls/download_file.rs
@@ -157,7 +157,11 @@
             None => return Ok(None),
         };

-        let head = http_head(client, &self.inner.url).await?;
+        let head = match http_head(client, &self.inner.url).await {
+            Ok(head) => head,
+            Err(e) if e.is_not_found() => return Ok(None), // Fall back to a more expensive GET :(
+            Err(e) => return Err(e.into()),
+        };

         let content_length = head
             .headers()
diff --git a/app/buck2_execute/src/materialize/http.rs b/app/buck2_execute/src/materialize/http.rs
--- a/app/buck2_execute/src/materialize/http.rs
+++ b/app/buck2_execute/src/materialize/http.rs
@@ -89,12 +89,15 @@
             Self::Transfer { source, .. } => !source.is_connect(),
         }
     }
-}

-#[derive(Debug, Error)]
-enum HttpHeadError {
-    #[error("Error performing http_head request")]
-    Client(#[from] HttpError),
+    pub fn is_not_found(&self) -> bool {
+        match self {
+            Self::Client(buck2_common::http::HttpError::Status { status, .. }) => {
+                *status == StatusCode::NOT_FOUND
+            }
+            _ => false,
+        }
+    }
 }

 #[derive(Debug, Error)]
@@ -113,11 +116,9 @@
     fn as_http_error(&self) -> Option<&HttpError>;
 }

-impl AsHttpError for HttpHeadError {
+impl AsHttpError for HttpError {
     fn as_http_error(&self) -> Option<&HttpError> {
-        match self {
-            Self::Client(e) => Some(e),
-        }
+        Some(self)
     }
 }

@@ -130,15 +131,8 @@
     }
 }

-pub async fn http_head(client: &dyn HttpClient, url: &str) -> anyhow::Result<Response<()>> {
-    let response = http_retry(|| async {
-        client
-            .head(url)
-            .await
-            .map_err(|e| HttpHeadError::Client(HttpError::Client(e)))
-    })
-    .await?;
-    Ok(response)
+pub async fn http_head(client: &dyn HttpClient, url: &str) -> Result<Response<()>, HttpError> {
+    http_retry(|| async { client.head(url).await.map_err(|e| HttpError::Client(e)) }).await
 }

 pub async fn http_download(

(I'll need to write a test for it so this won't land today but this might unblock you for now)

I actually just reverted the commit you mentioned and that does fix it. I'll try the patch now.

This looks like server does not implement HTTP correctly, if it returns 404 on HEAD, but 302 on GET.
We can try to work around it, but it does not look right to work around these bugs. Even if we fix it now, it will break it again after another code change.
Instead, a client can use external program (like curl) to download such files.

This looks like server does not implement HTTP correctly, if it returns 404 on HEAD, but 302 on GET.

Yeah, totally. It also sucks for performance as noted earlier. On the flip side I don't love this just being broken all of a sudden.
A better solution for now is probably not to use curl, but to instead just allow turning off deferral, which will bring us back to where we were before that diff. This here hardcodes it to true:
https://our.internmc.facebook.com/intern/diffusion/FBS/browse/master/fbcode/buck2/prelude/http_archive/http_archive.bzl?lines=125
We can just add support for controlling this via an attribute?
@benbrittain , want to send a PR for this or should we do that?

yup, that patch does indeed fix it.  This is non deferable. Please mark as non_defered=True."

It's probably best to just error out (but we can make the error more informative) and let you indeed set is_deferrable = True.

in this case, it seems to be something of Cloudflares

Cloudflare is a proxy. I don't think it is Cloudflare generates 404, but rather a user application behind Cloudflare. That application does not implement HTTP correctly.


Update certain python dependencies for CVEs

oauthlib to 3.2.0 for PRISMA-2021-0041
pyjwt to 2.4.0 for CVE-2022-29217
requests-kerberos for PRISMA-2021-0161

@agrare Please review.  I've tested with the hello world and the vsphere.yml, and they work.


FLAC not a suppported Media type

As per
http://www.iana.org/assignments/media-types/media-types.xhtml#audio
there is no entry for flac
I'm supposing that's why audio/.* doesn't capture .flac downloads?

I'm not 100% sure, but I will try to answer.
As far as I understand Chrome's behaviour, it assumes MIME-types of downloadable files from different sources: extension (extension->mime mappings are usually system-wide and may even vary on different OS-es) and/or content-type header of the server. Moreover, it's not guaranteed that the web-server will send proper content-type along with the file. Generally it may just send "application/octet-stream" and don't care about the clients at all.
If Chrome cannot assume proper mime-type, I can propose to match for .flac filename as a fallback solution.
As an alternative, you can try to fix your system-wide mime-mappings (e.g. via http://www.rubicode.com/Software/RCDefaultApp/ app for mac)

Can we just specify the extension as the parameter, e.g. *.flac?

Sure, you can add an empty rule with \.flac$ filename matcher to handle this case.


rule cannot be accessed

In this code -- https://gist.github.com/rns/b5249d4c12b61421a229 -- after a trivial 1-rule grammar S_lhs ::= S_rhs is created, the rule cannot be accessed by its id. What am I doing wrong?

This is my top priority right now.  I've been taking a while, because I've realized that I'd better set up an independent way to test Libmarpa -- one that does not depend on Kollos or Marpa::R2.

The problem was in the test script -- misplaced parens caused the result a comparison (the integer 1) to be assigned to the rule number, instead of the integer 0, which was the rule id actually returned by Libmarpa.  When 1 was used later as a rule ID, it was correctly reported as invalid.

Mea culpa. Sorry and thanks for explaining.

No problem.  I am grateful for bug reports and regard the occasional false alarm as the inevitable consequence of what is usually a good thing.


Make default value for "max_spill_level" equal to 1.

Summary:
Apparently, it is the best setting atm and it makes sense
to make it default.
Differential Revision: D55932208

Apparently, it is the best setting atm and it makes sense to make it default.

Sometimes user doesn't want to see OOM anyway. Should it be "-1" rather than "1"?
I assume Velox's aggregation and sort do spilling exhaustively by default, not sure why we allow join to OOM early.
The change led to regression in Gluten code: https://github.com/apache/incubator-gluten/actions/runs/8654857589/job/23734064924?pr=5375


Remove version: Jackett.Jackett version 0.21.177

404 - release deleted
Microsoft Reviewers: Open in CodeFlow

URL: https://github.com/Jackett/Jackett/releases/download/v0.21.177/Jackett.Installer.Windows.exe
Response Error: The remote server returned an error: (404) Not Found.
(Automated message - build 918)


collection meta info has been dropped.

Package containing the bug
next-drupal (NPM package)
Describe the bug
getResourceCollection, and getSearchIndex returns only array of data when doing deserialize. Not able to handle pagination.
Expected behavior
include extra info like getView
  const results = options.deserialize ? this.deserialize(data) : data

  return {
      id: name,
      results,
      meta: data.meta,
      links: data.links,
    }

hi,
please activate in the Drupal backend under /admin/config/services/jsonapi/extras the point Include count in collection queries.
After this you can use getResourceCollectionwith the deserialize: false option. Note that you must deserialize your result by yourself.


Use a common gating script for gating host prep

Rather than repeat the preparation of apt sources
and the installation of python/python-yaml in
several locations, we consolidate the necessary
preparation into a common script.
Part of this includes ensuring that we use the
Rackspace apt mirrors. This is a necessary change
specifically for MNAIO tests where they are setup
to use archive.ubuntu.com which is slow and fails
often due to there being more hops to it.
Issue: RE-1730

Testing this here: https://rpc.jenkins.cit.rackspace.net/job/PM_rpc-openstack-master-xenial_mnaio_no_artifacts-swift-deploy-odyssey4me/6/

This looks like it clears up the gating issues in issue: RI-437 as an added bonus.


python36Packages.python-sql: 0.9 -> 1.0.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.6-python-sql/versions.
meta.description for python36Packages.python-sql is: '"A library to write SQL queries in a pythonic way"'.

Checks done (click to expand)

built on NixOS

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 1.0.0 with grep in /nix/store/kw0yafpxw5svh4qd73lrxsfsk5lnqiia-python3.6-python-sql-1.0.0

directory tree listing: https://gist.github.com/8c3c1535cddc99a1fae23e2fe0d52ace

du listing: https://gist.github.com/373c8e11779aad57baba66727cf37eda

Outpath report (click to expand)

Outpath difference report
12 total rebuild paths
3 package rebuilds
3 x86_64-linux rebuilds
3 i686-linux rebuilds
3 x86_64-darwin rebuilds
3 aarch64-linux rebuilds
First ten rebuilds by attrpath
python27Packages.python-sql
python36Packages.python-sql
trytond

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/kw0yafpxw5svh4qd73lrxsfsk5lnqiia-python3.6-python-sql-1.0.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A python36Packages.python-sql https://github.com/r-ryantm/nixpkgs/archive/9373a695f557bbfcd48a4723548c32e499e7b7ff.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/kw0yafpxw5svh4qd73lrxsfsk5lnqiia-python3.6-python-sql-1.0.0
ls -la /nix/store/kw0yafpxw5svh4qd73lrxsfsk5lnqiia-python3.6-python-sql-1.0.0/bin

cc @johbo for testing.

Success on x86_64-darwin (full log)
Attempted: python36Packages.python-sql
Partial log (click to expand)
test_window_rows (sql.tests.test_window.TestWindow) ... ok
test_recursive (sql.tests.test_with.TestWith) ... ok
test_with (sql.tests.test_with.TestWith) ... ok
test_with_columns (sql.tests.test_with.TestWith) ... ok
test_with_query (sql.tests.test_with.TestWith) ... ok

----------------------------------------------------------------------
Ran 152 tests in 0.028s

OK

Success on aarch64-linux (full log)
Attempted: python36Packages.python-sql
Partial log (click to expand)
test_update2 (sql.tests.test_update.TestUpdate) ... ok
test_update_returning (sql.tests.test_update.TestUpdate) ... ok
test_update_returning_select (sql.tests.test_update.TestUpdate) ... ok
test_update_subselect (sql.tests.test_update.TestUpdate) ... ok
test_with (sql.tests.test_update.TestUpdate) ... ok

----------------------------------------------------------------------
Ran 152 tests in 0.056s

OK

Success on x86_64-linux (full log)
Attempted: python36Packages.python-sql
Partial log (click to expand)
test_select_union (sql.tests.test_select.TestSelect) ... ok
test_select_union_order (sql.tests.test_select.TestSelect) ... ok
test_select_without_from (sql.tests.test_select.TestSelect) ... ok
test_window (sql.tests.test_select.TestSelect) ... ok
test_with (sql.tests.test_select.TestSelect) ... ok

----------------------------------------------------------------------
Ran 152 tests in 0.109s

OK


Red screen, system unresponsive after entering password

https://github.com/JaKooLit/Fedora-Hyprland
The author of the Fedora-Hyprland setup script at the link above said I should report this issue here:
This has happened three times now during testing of a Hyprland install from the JaKooLit script. The screen locked, and upon entering the password the whole screen turned pure red and the mouse cursor became a thick text cursor. This is in a Boxes VM, and sending the VM key combinations like Ctrl+Alt+Backspace and Ctrl+Alt+Delete has no effect. I have to do a "Force Shutdown" from the Boxes toolbar and restart the VM.
I've unlocked the screen several other times between these incidents without the red screen appearing.
May or may not have something to do with typing the password in and hitting Enter too quickly, on a VM that has very bad performance for some reason.
The base distro is Fedora 39 Workstation.

Same Red Screen After Suspend
Arch Linux Hyprland

i had this crash with a red screen on <IP_ADDRESS> as well, running hyprland on nixos, no vm.

Swaylock Log
log_with_problem.txt
no_problem.txt
File

This is the interesting part:
Args
2024-01-20 20:39:41 - [main.c:658] output name is HDMI-A-1
2024-01-20 20:39:41 - [main.c:1970] Using ext-session-lock-v1
2024-01-20 20:40:53 - [main.c:245] Destroy surface for output HDMI-A-1
2024-01-20 20:40:53 - [main.c:658] output name is HEADLESS-1
2024-01-20 20:40:53 - [main.c:245] Destroy surface for output HEADLESS-1
2024-01-20 20:40:53 - [main.c:658] output name is HDMI-A-1
2024-01-20 20:40:53 - [main.c:641] Screencopy failed

What is HEADLESS-1?
Please report it to Hyprland, this looks more like a bug on their side.

weren't sway users experiencing crashes as well? at least they did for swaylock, see 282

There is already a Hyprland issue for this: https://github.com/hyprwm/Hyprland/issues/4134


Spevacus: Watch amaritinstitute.tk

Spevacus requests the watch of the watch_keyword amaritinstitute\.tk. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

amaritinstitute\.tk has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Mast in Charcoal HQ


Enhancement: calculate large blast radius changes

Summary
If a TF plan includes a large number of changes, include a warning in the PR comment.  This "large number of changes" should have a default value and also be configurable.
The use-case this is attempting to fix is to alert PR reviewers that something unexpected may be occurring.

A possible way to do this would be compare the percentage of resources that are going to be changed vs. existing resource count.


How to display the placeholder when there is not item in value (Select with search)?

Hi
I would like to show the placeholder when there is no item in value in data. Can you please help me achieve that?
Reproduction Link
https://codesandbox.io/s/nwwzz6p76j
Expected behaviour
Displaying placeholder
Actual behaviour
undefined- undefined due to the custom labeling

I gave value: null which did the magic. Thanks though


Histogram expressions value don't work for dates

Context
When getting the histogram value, it throws an error cause it only detects if the data type is a number or a string.
It should work with dates as well

Merged


withinRoute() doesn't animate in liquid-fire 0.20.4

In a fresh new project with ember-cli 0.2.7, ember 1.13.3, and liquid-fire 0.20.4, I see transition made with withinRoute doesn't animate.
Here is a gist with the code:
https://gist.github.com/dmoreno/f398853ae750c882bb9a
when we go from admin route to content route, transition effect is ok. But when we go from content to content (inside liquid-with block), there is no transition effect. Same behaviour with:
this.fromRoute('content'),
this.toRoute('content'),

I noticed this behaviour migrating from liquid-fire 0.17 and ember-1.10. Same code was working fine until migration.

I have updated issue description with a working example code using liquid-bind and withinRoute.

You're hitting one of the breaking changes in 0.19.0. From CHANGELOG:

BREAKING: route constraints only apply to liquid-outlets. Other helpers like liquid-if used to try to figure out what route they were in so they could respect withinRoute constraints, but this is both complicated and not a good idea. Only outlets are supposed to know about routes -- each helper should only animate based on its own well-encapsulated state.

I suggest using a constraint like hasClass or matchSelector instead to control your liquid-with.

Thanks @ef4! You're right.
I fix it migrating liquid-with to liquid-bind and matching by value. It works like a charm!


Meri testing commit and push to dev v2

Not needed. Just Making sure branch protection rules were working


Duplicate Access-Control-Allow-Origin header from CDN

When loading the JS from the CDN (//twemoji.maxcdn.com/2/twemoji.min.js), the headers in the reponse have a duplicate Access-Control-Allow-Origin parameter.
As we are loading the script on demand through an AJAX call, this results in the following error within Chrome:
XMLHttpRequest cannot load http://twemoji.maxcdn.com/2/twemoji.min.js. The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin 'http://example.com' is therefore not allowed access.
I believe this has only changed recently (within the last week) as this script was working previously.

This is a MaxCDN thing (or you updated the browser that wasn't so picky before).
I've tried to contact them, let's hope will be solved soon.
The entire Twemoji page, tests, etcetera, has this duplicated header.
Thanks for letting us know.

Looking into it!

Ok I see what is happening.  GitHub/Fastly starting adding CORS headers.
$ icurl http://twitter.github.io/twemoji/2/twemoji.min.js
HTTP/1.1 200 OK
Server: GitHub.com
Access-Control-Allow-Origin: *

When Twemoji first launched, that wasn't the case.  I have since removed the Access-Control-Allow-Origin header (on the CDN) so it will not be duplicating anymore:
$ icurl twemoji.maxcdn.com/2/twemoji.min.js
HTTP/1.1 200 OK
Date: Fri, 15 Apr 2016 17:08:13 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 8782
Connection: keep-alive
Last-Modified: Wed, 13 Apr 2016 13:53:22 GMT
Access-Control-Allow-Origin: *
Expires: Sun, 15 May 2016 17:08:13 GMT
Cache-Control: max-age=2592000
X-GitHub-Request-Id: C71B4F17:2087:E212983:57111FF1
Vary: Accept-Encoding
X-Fastly-Request-ID: f164d13c1f6a00a8ef86a2674f4fc6f607db1486
Server: NetDNA-cache/2.2
Powered-By: MaxCDN
X-Cache: HIT
Accept-Ranges: bytes

I can confirm it's all good now (I had duplicated header too and now not anymore).
Now that was quick: thank you!

@WebReflection you are welcome.  That's just how we roll.

Super fast resolution, thanks!

Thanks for imaging


run black over codebase

related to #46

Still WIP, do not merge yet. black should not change the functionality, however I would like to test the examples before anyway (as there are no unit tests yet).


Write inference script as a single run of a particular shift across all segments to parallelize along shift dimension

I'm looking at the current infer project and I don't think much will have to change.
We can simply point the SequenceManager directly at a TimeSlide directory instead of the datadir that contains all of the TimeSlide dirs

Forgot that we also wan't to be doing injections on the fly, and likely won't be saving any data to disk.
Here's my first go at pseudo code of what this might look like
def infer(
    waveform_path: Path, # path to omnibus waveforms file
    shift: float,
    segments: List[Tuple[float, float]],
    triton_server_ip: str, # already spun up on SDSC or something
    ...
):

    waveforms = load_waveforms(waveform_path)

    client = InferenceClient(triton_server_ip, model_name, model_version)

    # something analogous to the SequenceManager we have now
    sequence_manager = SequenceManager(write_dir, client, ...)

    for segment in segments:
        # load data and timeshift
        background = load_data(segment, channel, ifos)
        background = np.roll(background, shift * sample_rate)

        # add to inference queue
        sequence_manager.add_to_queue(background, field="background")

        # slice out waveforms, inject, and add to inference queue
        waveforms = find_waveforms_in_segment(segment, waveforms)
        injected = inject_waveforms(waveforms, background, times)
        sequence_manager.add_to_queue(injected, field="injected")

    events = defaultdict(ClusterDistribution)
    while not sequence_manager.is_done():
        # instead of writing nn outputs to disk, the callback will be clustering events
        future = client.get()
        if future is None:
            time.sleep(1e-2)
            continue

        while not future.done():
            sequence_events, field = future.result()
            events[field].append(sequence_events)

I think something like this will make sense, but the point of the SequenceManager was really just to make parallelization easier. Since we're parallelizing via Condor now, I think we can drop this and just manage each sequence explicitly in serial. I'll see if I can mock something based off of this up this afternoon.

I see. If it doesn't add too much complexity, is it not worth trying to parallelize within each condor job as well?

It depends on your scale I guess, but probably not. Our throughput at this point is such that a single GPU can almost be saturated with each stream, so you need roughly as many streams as you have GPUs. Adding streams within a client will just make figuring out the load balances more complicated

Sounds good. So then in our implementation the optimal setup is one GPU per time slide?

It's looking that way, though that could also change with a better GPU than the V100. Whatever setup we end up putting together we can do some true benchmarking on it at some point to really optimize our deployment


update README.md with path to bin

less typing?

The changes themselves look good, the only think I'm not sure of is compatibility with Windows with this change. I haven't looked into how npm sets up the .bin directory within node_modules but I thought it was through symlinks.