[Feature Request] Plugin API, Phase III: The __beartype_hint__() protocol

This feature request is the third milestone on the great journey to a first-class best-of-breed plugin architecture for @beartype. This milestone is orthogonal to the second milestone (i.e., beartype.sign); that is, these two plugin milestones may be implemented in any order. Indeed, despite offering more powerful plugin machinery than the second milestone, this milestone is arguably simpler to implement and document. In other words, we might want to do this one first. universe: 0. @beartype: 1.
In this phase, we introduce a new public __beartype_hint__() protocol enabling users to attach type hint transforms to arbitrary user-defined classes. Since type hint transforms include Turing-complete beartype validators (e.g., typing.Annotated[muh_class, beartype.vale.Is[muh_instance: bool(muh_instance)]]), this protocol effectively enables users to define arbitrary runtime type-checking. Plugin architecture, I summon thee! :mage_man:
By default, @beartype type-checks any passed parameter or return value against a user-defined type cls with a trivial isinstance(obj, cls) test at runtime. Now, however, you'll be able to enhance how your classes are type-checked with additional constraint checks dynamically defined by you at runtime and (more importantly) permanently attached to those classes and all instances of those classes.
Dig Deep Like Shovel Knight on a Digging Bender
Let's dig deep into what exactly we're talking about here.
Consider the following PEP 544-compliant protocol:
from beartype import beartype
from dataclasses import dataclass

@beartype
@dataclass
def DoorsOfPerception(object):
    heaven_or_hell: Literal['heaven', 'hell']
    circle_of_hell: Optional[Literal[
        'limbo', 'lust', 'gluttony', 'greed', 'wrath',
        'heresy', 'violence', 'fraud', 'treachery',
    ]]

@beartype deeply type-checks typing.Literal[...] type hints and thus validates the heaven_or_hell field as expected. But what about the circle_of_hell type hint? Clearly, Heaven has no Circles of Hell. Clearly. We thus want @beartype to validate that:

If heaven_or_hell == 'heaven', then circle_of_hell is None.
If heaven_or_hell == 'hell', then circle_of_hell in ('limbo', 'lust', 'gluttony', 'greed', 'wrath', 'heresy', 'violence', 'fraud', 'treachery').

In other words, we want @beartype to type-check conditionally depending upon the contents of the DoorsOfPerception instance being type-checked. How can we do this depraved act of fiendish difficulty? Simple.
Digging a Hole So Deep We Ended up on the Moon
We use the __beartype_hint__() protocol to instruct @beartype to apply additional constraints when runtime type-checking.
First, we easily define this protocol using the existing typing.Protocol machinery standardized by PEP 544:
from beartype.typing import Any, Protocol

def BeartypeHintable(Protocol):
    @classmethod
    def __beartype_hint__(cls) -> Any:
        '''
        **Beartype type hint transform** (i.e., :mod:`beartype-specific
        dunder class method returning a new PEP-compliant type hint
        constraining this class with additional runtime type-checking).
        '''

        pass

Second, we augment our previously defined DoorsOfPerception dataclass with additional runtime type-checking defined via this protocol:
from beartype import BeartypeHintable, beartype
from beartype.typing import Any, Annotated
from beartype.vale import Is, IsAttr, IsEqual
from dataclasses import dataclass

@beartype
@dataclass
def DoorsOfPerception(BeartypeHintable):
    heaven_or_hell: Literal['heaven', 'hell']
    circle_of_hell: Optional[Literal[
        'limbo', 'lust', 'gluttony', 'greed', 'wrath',
        'heresy', 'violence', 'fraud', 'treachery',
    ]]

    @classmethod
    def __beartype_hint__(cls) -> Any:
        return Annotated[cls,
            IsAttr['heaven_or_hell',
                (IsEqual['heaven'] & IsAttr['circle_of_hell',  IsEqual[None]]) |
                (IsEqual['hell'  ] & IsAttr['circle_of_hell', ~IsEqual[None]])
            ]
        ]

Done and done. @beartype now detects that DoorsOfPerception satisfies the BeartypeHintable protocol and implicitly applies the additional conditional constraints defined by the __beartype_hint__() dunder method when type-checking instances of that dataclass at runtime.
Shorthand for Shorties
Okay. Everything is great, but it's also a bit long-winded. Can we improvise some sort of convenient syntactic sugar that elides away all of the boilerplate implied by actual real-world usage of the BeartypeHintable protocol?
Yes. Yes, we can. Consider this terse shorthand for implementing the exact same dataclass as implemented above – but with far fewer lines of DRY-violating scaffolding:
from beartype import beartype
from beartype.typing import Any, Annotated
from beartype.vale import Is, IsAttr, IsEqual
from dataclasses import dataclass

@beartype
@dataclass
def DoorsOfPerception(IsAttr['heaven_or_hell',
    (IsEqual['heaven'] & IsAttr['circle_of_hell',  IsEqual[None]]) |
    (IsEqual['hell'  ] & IsAttr['circle_of_hell', ~IsEqual[None]])
]):
    heaven_or_hell: Literal['heaven', 'hell']
    circle_of_hell: Optional[Literal[
        'limbo', 'lust', 'gluttony', 'greed', 'wrath',
        'heresy', 'violence', 'fraud', 'treachery',
    ]]

...wut u say!?!?
So. The idea here is that beartype validators (i.e., public beartype.vale.Is*[...] constraint factories) can be generalized to be subclassable. When subclassed, beartype validators will automatically:

Replace themselves in the method order resolution (MRO) (__mro__) of the class being subclassed with the beartype.BeartypeHintable protocol.
Dynamically monkey-patch the class being subclassed by adding an appropriate __beartype_hint__() dunder classmethod to that class.

You are possibly now muttering to yourself in the candle-lit darkness of your own peculiar (wo)mancave: "B-b-but... that's impossible!" Actually, it's all too possible; I used to hate these sorts of maleficent shenanigans, because the typing module does exactly this sort of thing all over the place. PEP 484 refers to this decadent behaviour as "type erasure."
In fact, this sleight-of-hand was standardized over five years ago by PEP 560 via the mostly undocumented __mro_entries__() dunder method. By abusing __mro_entries__(), any type (including the type of beartype validators) can transparently replace itself on-the-fly with any other arbitrary type(s) in the MRO of subclasses.
In this case, the type of beartype validators will define a trivial __mro_entries__() that just replaces itself with BeartypeHintable when subclassed. Darkness: my old friend.
\o/
This syntactic sugar is strongly inspired by @antonagestam's wondrous phantom-types, which applies a similar syntax to similar great effect (albeit implemented in a completely different low-level way with __instancecheck__() dunder metaclass methods, which itself is endlessly fascinating). Thanks so much, @antonagestam!
That's Just How We Roll in 2023
In theory, the BeartypeHintable protocol should suffice to provide a fully-complete plugin architecture. The __beartype_hint__() dunder method can be implemented to return Turing-complete beartype validators capable of doing literally anything including bad stuff but let's ignore that (i.e., typing.Annotated[{user_type}, beartype.vale.Is[{plugin_func}]]).
Users: commence rejoicing once @leycec actually does something about this.

YES. YESSSSS.
Ok, so once again, I have to digest this, but i'm pretty sure it completely nukes the usefulness of my efforts last night. STILL it would help me a great deal if you @leycec and perhaps @antonagestam would see if I was way off base with this proof-of-concept to realize the error of my protocol ways and embrace the way phantom-types hack-and-slashed the path through the jungle before me?
Meaning, I have a PR that is meant only to show a diff on how I think a beartype-backed phantom-type would operate... and it would help me a lot if I could understand what about that thing would change if this marvelous API was introduced.
see here pretty please?? :smile:

OH another thought:

Can we... maybe... perhaps... consider being very bad and adding a sneaky __beartype_hint__ to the stuff in beartype.typing? :sweat_smile: This is a massive pro to using beartype.typing, and gives us a lot of functionality on base types for free, without messing with default type checkers at all really, right?

@leycec another thing I'm encountering (how do I always manage to break stuff the very first time I try to use said thing??) in my particular flavor of "the wild":
Annotated Generics
Yeah, so... I want a pluggable system for folks to add parameters to a "type" and have beartype.vale validators check those parameterized types at their runtime. For instance, say I want to make a sort of "schema" for the pandas-esque (and very cool) static_frames library:
import static_frame as sf
import beartype.typing as bt
from beartype.vale import IsAttr, IsEqual
from beartype.door import is_bearable

# first we need to make typevars for generics
EntityKind = bt.TypeVar('EntityKind', bound=str)

FlagArray = bt.Annotated[
    sf.SeriesHE, # it's a series
    IsAttr['name', IsEqual[bt.Tuple[EntityKind, EntityKind]]]  # it's got a (name1,name2) name
    ## ^ this part should propagate "hey this thing is generic!"
    & IsAttr['index', IsAttr['depth', IsEqual[2]]]  # <- this means it's hierarchical
]

"""doesn't work either:
FlagArray = bt.Annotated[
    object,
    IsInstance[sf.SeriesHE]
    & IsAttr['name', IsEqual[bt.Tuple[EntityKind, EntityKind]]]
    & IsAttr['index', IsAttr['depth', IsEqual[2]]]
]
"""

trying to subscript FlagArray now won't work: FlagArray['e','v'] gives
TypeError: typing.Annotated[object, IsInstance[static_frame.core.series.SeriesHE] & IsAttr['name', IsEqual[tuple[~EntityKind, ~EntityKind]]] & IsAttr['index', IsAttr['depth', IsEqual[2]]]] is not a generic class

Same for FlagArray[bt.Literal['e'],bt.Literal['v']], but in this case I don't think that's the point... I think Annotated is explicitly stopping us from using generics in the metadata part.
SO... how to make parameterized Validators for reuse? And... can I use the type parameterization system with this new proposal?
e.g., using the new PEP 695 syntax, since I'm tired of typing TypeVar:

@beartype
@dataclass
def DoorsOfPerception[T<:str](IsAttr['niceplace_or_hell',
    (IsEqual[T] & IsAttr['circle_of_hell',  IsEqual[None]]) |
    (IsEqual['hell'] & IsAttr['circle_of_hell', ~IsEqual[None]])
]):
    niceplace_or_hell: T | Literal['hell']
    circle_of_hell: Optional[Literal[
        'limbo', 'lust', 'gluttony', 'greed', 'wrath',
        'heresy', 'violence', 'fraud', 'treachery',
    ]]

So I want to get something like, yknow, DoorsOfPerception[Literal['valhalla']] that gives my users some level of extensibility... who am I to say DoorsOfPerception[Literal['pizzahut']] isn't their most useful version of the class??[^1]

Is that... legal?

I mean...

The issue here is, I'm not even really sure how you're supposed to use generic parameters at runtime, anyway. All of your Is* magic type things are black-magic to me, so I presume I would only be able to do something like this with the __mro_entries__ sorcery you're cooking up, anyway.
[^1]: which is another thing I was today-years-old when I learned that I am strictly forbidden from creating Literal[T] for typevar T, or anything of this kind, since apparently that is bad, and I should feel bad. So... now I can't get out of my head that I should have a runtime way to allow users to pass an x: str parameter and have a special context where I automatically assume they need Literal[x] at runtime. WHY? BECAUSE D.R.Y., THAT'S WHY. Sheesh, it's like the python.typing people want us to type Literal and Annotated and Union and all these verbose things as a form of pennance for daring to have a type system in python at all in the first place :fearful:

Gah! So sorry for the radio silence. I've been delving deep into the stinky bowels of issue #180 for our upcoming beartype 0.12.0 release, which I believed would only take a day. "What could be simpler?", I said. It's been over two weeks. Our commit history has seen better days.
You ask the pertinent questions that hit me hard in the gut. Like the entirety of PEP 695 -- "Type Parameter Syntax", which is both amazing and horrifying. Thank you so much for giving me the heads up on that, although my head is now throbbing with thunderous pain. Seriously. @beartype must support PEP 695, because everyone will immediately start using that in Python 3.12, but I don't even know if runtime type-checkers can reasonably support the entirety of PEP 695. Apparently, we're now throwing out explicit type variance (e.g., covariant and contravariant parameters to typing.TypeVar) and just requiring type-checkers to infer type variance implicitly based on an extremely non-trivial algorithm that I don't fully understand.
This is QA madness. Wait. What were we chatbotting about again? :face_exhaling:
Plugins! Right. In theory, __beartype_hint__() should be trivial for us to add. We are all now sadly chuckling into our pewter beer steins. So, my last action item for beartype 0.12.0 after finalizing #180 is supporting __beartype_hint__(). If I fail to do this by New Year's, I do hereby resolve to go outside and eat clumps of frozen grass while three wild-eyed cats watch in shock – live on GitHub. You heard it here in dismay first.
As for everything intriguing that you just asked... I swear I read everything but currently have no idea. The cat is snoring fitfully and I am pounding the keyboard uselessly. You are correct about everything, I suspect. The entire typing ecosystem is cobbled together with expired glue and wishful thinking. Like, is this even valid syntax under PEP 695?
# Seriously? We're seriously using comparison operators in
# implicit type parameter syntax? But... what does that even mean?
def DoorsOfPerception[T<:str](...): ...

Oh. I shudder as I see. Did you unearth that syntactic monstrosity from the "Rejected Ideas" section of PEP 695? Specifically, this?

We considered, but ultimately rejected, the use of a <: token like in Scala...

Darn you, PEP 695 authors! Darn you to all heck!

So. It begins with a whimper.
@tbsexton: Sincere apologies on failing to deeply respond to your incredibly enlivening exegesis on Pythonic type hint plugins here and elsewhere. Gaah! I can only hope that you and yours had a fantastic Christmas and New Year's – and do solemnly swear on my cat's grossly distended belly to reply to everything you wrote before resolving this feature request.
Let's do this, Team Bear That Types! :bear: :keyboard:

Also, I think a better way for me to ask all that junk up there is:

does this API provide a mechanism to design beartype-native parametric types?

See, for instance, the way Plum enables Parametric Types. Since this isn't something strictly related to multiple dispatch, this plugin api might let @wesselb keep the parametric types as a separate micro-repository beartype plugin, or let users get them for free via @beartyped classes, etc.
The other place I've seen parametric types (recently) is Pandera's dataframe validators, since the categoricalDType constructors take user parameters (the valid categories, orders, etc).
I've been using Beartype validators to design these rather than heavier pandera schemas, but to allow better dispatching I'd love to know at runtime, say, whether the DoorsOfPerception('hell','gluttony') comes back as having a typehint DoorsOfPerception[L['hell']] or DoorsofPerception[L['heaven']] (or equivalent enum, etc.)


Flickr_30k.trainimages.txt and Flickr_30k.testimages.txt files.

Hello, do u have the Flickr_30k.trainimages.txt and Flickr_30k.testimages.txt files. I can't find this files in anywhere=( In official web it's unable to download. I have image I need just this files

I guess, you need to request for captions at https://illinois.edu/fb/sec/7805261 .

I am not sure why, but in China it's web not work(


Next releae

Thanks to great ideas from @alexeygolev, help from @gilligan and inspiration from @scott-christopher's work here I'm planning to do a new breaking release. I'd really like some feedback and opinions :smile:
New features include

Implementation is based on prototypes, should give better performance
All type checks are disabled in production builds. Type checking code can be completely "compiled away" for browser builds.
Records are now supported with the following syntax:

var Point = Type({Point: {x: Number, y: Number}});

var Shape = Type({
  Circle: {radius: Integer, center: Point},
  Rectangle: {upperLeft: Point, bottomRight: Point},
});

Fields can be accessed like normal properties. Eg. circle.radius. Records support destruction and pattern matching like regular union types.

Instance methods can be created like below. This for instance allow for implementation of ADTs that support fantasy land.

var Maybe = Type({Just: [T], Nothing: []});
Maybe.prototype.map = function(fn) {
  return Maybe.case({
    Nothing: () => Maybe.Nothing(),
    Just: (v) => Maybe.Just(fn(v))
  }, this);
};
var just = Maybe.Just(1);
var nothing = Maybe.Nothing();
nothing.map(add(1)); // => Nothing
just.map(add(1)); // => Just(2)

I'm also considering deprecating switch and switchOn and renaming them to match and matchOn. If anyone has a better name than matchOn I'd love to hear it.

I spotted a typo in the title: s/releae/release/.

Rather than use process.env.NODE_ENV !== 'production', I'd like to be explicit about whether type checking is enabled. In sanctuary-def, $.create takes checkTypes :: Boolean as its first argument. Users are free to provide process.env.NODE_ENV !== 'production', but they're not forced to overload NODE_ENV, nor must they polyfill process in the browser.

I would also like to see the process.env part go in favor of something more explicit! I would even prefer no switch at all just as long as some environment variable does not change the behavior of some library somewhere in my stack.

my vim complains about mixed indentation hehe. @paldepind I wonder if you would be open for a PR adding linting via eslint for the sake of consistency and error checking. We could use the same settings that I introduced to Ramda: https://github.com/ramda/ramda/pull/1529

@davidchambers

Rather than use process.env.NODE_ENV !== 'production', I'd like to be explicit about whether type checking is enabled. In [sanctuary-def][1], $.create takes checkTypes :: Boolean as its first argument. Users are free to provide process.env.NODE_ENV !== 'production', but they're not forced to overload NODE_ENV, nor must they polyfill process in the browser.
[1]: https://github.com/plaid/sanctuary-def

I very much agree. But one advantage of using process.env.NODE_ENV is that one can do a build using something like envify which will replace the environment variable with a plain literal and then a minifier can completely remove all the error checking code. Webpack can do something similar as well. If you set a variable to process.env.NODE_ENV then a minifier will not be able to remove the code. I'm not sure what the best approach is here. I can imagine that many people would like the type checking to be present even in production code.
@gilligan

my vim complains about mixed indentation hehe. @paldepind I wonder if you would be open for a PR adding linting via eslint for the sake of consistency and error checking. We could use the same settings that I introduced to Ramda: ramda/ramda#1529

It's the darn Emacs. Using linting would be great.

I'm also considering deprecating switch and switchOn and renaming them to match and matchOn. If anyone has a better name than matchOn I'd love to hear it.
Do you mean case and caseOn ?
I like match, but not sure about matchOn.. perhaps matchWith? (although that also suggests that the extra param is for the matching, and not the execution of the matched function ...)

@paldepind Do you mean case and caseOn ?
I like match, but not sure about matchOn.. perhaps matchWith? (although that also suggests that the extra param is for the matching, and not the execution of the matched function ...)

Yes. Indeed. I think match is nice and it would be better to avoid using a keyword. I agree that match on is ugly. caseOn is as well I think. I do think matchWith sounds better. But you're right that it implies that the parameter is part of the matching. But caseOn did that that as well.

@paldepind if you match a Record, what gets passed to the function? the record, or each value as an argument (like with the typed arrays)?
Is it like Postal: ({name,address, postalcode}) =>  or like Postal: (name, address,postalcode) =>  ?

@kwijibo The latter, each value as arguments.

Thanks. I'm looking forward to this release. I started using union-type recently, and am really liking the more domain-driven, declarative style it affords.
Glad to see the prototype stuff; presumably Action.Up() instanceof Action will work now?

 ({name,address, postalcode}) would be a bit nicer from the POV of not needing to look up the order the fields were defined in.

That is a good point @kwijibo. On the other hand it would not be as nice for people not using ECMAScript 6.
I'm glad you enjoy the library.

Anything I can contribute to move this forward ? The one thing that still bugs me is the use of NODE_ENV because it just isn't explicit at all - you have some big project which as some sub-dependency uses union-type and it changes behaviour like that based on an environment variable - I don't like that ;(
As for minifying - the code is so small already I don't care about those few bytes more or less and value the code being correct and behaviour explicit.
My suggestion would be to either remove the ability to switch checks on or off completely or follow the suggestion made by @davidchambers to pass in a predicate function.
All other changes are probably minor and could thus be followed as minor version updates (glad to provide an eslint PR later on for example).

Merged. Type checking is disabled by doing Type.check = false.


[Feature request] Dolby Vision compatibility option

Before filing a feature request:

Search existing open issues, specifically with the label ‘enhancement’:
https://github.com/androidx/media/labels/enhancement
For ExoPlayer-related feature requests, please also check for existing feature
requests on the ExoPlayer tracker:
https://github.com/google/ExoPlayer/labels/enhancement
Search existing pull requests:

On this tracker: https://github.com/androidx/media/pulls,
On the ExoPlayer tracker: https://github.com/google/ExoPlayer/pulls

When filing a feature request:
Replace the content in the sections below.
[REQUIRED] Use case description
Describe the use case or problem you are trying to solve in detail. If there are
any standards or specifications involved, please provide the relevant details.
Proposed solution
A clear and concise description of your proposed solution, if you have one.
add features to the player to have ability to convert dolby vision profile 7 video into profile 8. , 5 etc.
Alternatives considered
A clear and concise description of any alternative solutions you considered,
if applicable.

This seems to be duplicated from another one https://github.com/androidx/media/issues/1865, I'm resolving this.


[modify][cms] delegate parent events to column value

Coverage remained the same at 84.75% when pulling 70cb45151a8565dbd133522f01cccc7799c97185 on pr-delegate-parent-events-to-column-value into 499336d9611356306a79ef7694ff321f6a8e97fb on master.


More Branches

Hey guys i think we need to more branches 1 for test/dev where we will be working on then the next for qa/unit testing and the final one will be the master branch/prod internment once we get it to this state we can add it to the play store and all of us can downloaded and use the app.

Depends on what you want to do. I think it is a good point to discuss on Slack

https://www.atlassian.com/git/tutorials/comparing-workflows
http://danielkummer.github.io/git-flow-cheatsheet/

The intention is absolutely to have multiple branches being worked on.


fix(plugin_runner): try to workaround wasmer-wasix/host-reqwest issue

Description:

BREAKING CHANGE:

Related issue (if exists):

ref: https://github.com/swc-project/swc/actions/runs/4654436402/jobs/8236173594

Closing in favor of https://github.com/swc-project/swc/pull/7234


Driver system with binary and API

Add a driver system to allow the user to choose between the API and the nodejs binary.

-> http://httplug.io/

API currently use mjml 3 (see https://github.com/mjmlio/mjml/issues/1249)


Dependencies: exclude datasets and huggingface_hub major version updates

e.g. for when datasets will implement VideoFrame

Related discussion on the discord
(TLDR: having upper bounds on dependencies has generally more drawbacks than benefits)
I'm okay for having an upper bound on datasets' major version, but I'd rather keep it as it is for the hub as "^0.X.Y" actually translates into ">=0.X.Y, <0.X+1.0", which is a bit too restrictive I think. Unless breaking changes are coming on the minor?

as you prefer, just take into account that breaking changes might happen in major versions (not sure what kind for hfh, but for datasets it may include the VideoFrame type for example)

Let's keep the hub dependency as it is for now.
I've push a fix which you can rebase from on branch user/aliberts/2024_05_10_patch_hf_hub


paramaterize setup-r for create-modeling-round

use installed version of R
use Posit Package Manger
set the hubverse-org as an extra repository.

This will fix #69

Note: I might also be able to parameterize this action to check itself on pull request if you want to test this.

Thanks for this, @zkamvar!

That's a very good question and the short answer is because the renv file changed in https://github.com/reichlab/variant-nowcast-hub/commit/58281ab33fd063721e04db5879ed89a6ca49fa72.
This caused the cache to be invalid.
The workflow ran in the past because the repository in the lockfile was set to the PPM, but the last commit changed it to use regular CRAN:
+       "URL": "https://packagemanager.posit.co/cran/latest"
-        "URL": "https://cloud.r-project.org"

That's a very good question and the short answer is because the renv file changed in 58281ab.
This caused the cache to be invalid.

Ah, yes--that's the commit that bumped hubAdmin to the new release. Even so, that was 4 days ago, and the last successful GitHub action run for that branch (prior to merging the PR) was 3 days ago.
I assume the other factor here was this other action (from @nick's updates) started caching some R things? https://github.com/reichlab/variant-nowcast-hub/actions/runs/11079486573/job/30788618758

Ah, yes--that's the commit that bumped hubAdmin to the new release. Even so, that was 4 days ago, and the last successful GitHub action run for that branch (prior to merging the PR) was 3 days ago.
I assume the other factor here was this other action (from @nick's updates) started caching some R things? https://github.com/reichlab/variant-nowcast-hub/actions/runs/11079486573/job/30788618758

The missing bit of information is that the renv cache and the other caches go to different places (which we should probably fix, but it's not that big of an issue).


Docker image that we can use ?

hi guys,
I'm looking to deploy a whole bunch of docker images to Google Compute with a fair amount of customization.
One of the important things I'm looking to use is the ability to add and remove accounts (ssh keys) from the Google Cloud console.
Do you guys have a Ubuntu/Debian Dockerfile that I can build upon ? I'm not able to figure out how to integrate google accounts daemon. Since systemd does not work on docker images, we usually use supervisord or use the baseimage-docker VM (https://hub.docker.com/r/phusion/baseimage/ and http://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/)
Do you guys have any Docker images we can use ?

Hi Zach
Google cloud allows us to use a docker VM to create an instance ..instead
of the standard  images.
So this is something that you guys already do. But when I do this I lose
some of the nice abilities of the dashboard especially creating
accounts.which is why I filed this bug : can I run so.e of.your services
(like accounts service) inside a docker image instead of this VM recipe
that you have.
Intuitively, it ought to be possible.
I'm not sure why you mention entering a guest image. That is definitely not
my ask here.
On Tue 29 May, 2018, 23:25 Zach Marano<EMAIL_ADDRESS>wrote:

The GCE guest software is designed to manage the system level of a VM and
are not meant to run within a docker container and manage the environment
within a container. Therefore, we don't have any such container image for
that purpose. I think what you actually want is to enter the container
image from the guest OS (or container host in this case) to which there
are many ways to do so
http://phase2.github.io/devtools/common-tasks/ssh-into-a-container/.
The scenario you are describing however sounds exactly like running
services natively in a VM. Generally, treating containers like a VM defeats
the purpose of using containers and just complicates the environment.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/compute-image-packages/issues/618#issuecomment-392874891,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEsU-hpf3JZCxu292RQ7inU6cIDDD8eks5t3YuFgaJpZM4UOzdT
.

hi zach,
thanks for replying.
we run fat Docker containers. Its not ideal, but works pretty great as a
quick debug option. But you will be interested to know, that in this
particular situation we are deploying it as a ssh bastion machine.
Something like this - https://github.com/zalando-stups/odd
This project pulls the ssh keys from a s3 url. It would have been cool to
leverage the google accountsmanager service to do the same.
On Wed, May 30, 2018 at 1:54 AM, Zach Marano<EMAIL_ADDRESS>wrote:

When you say docker VM, are you referring to COS
https://cloud.google.com/container-optimized-os/docs/? There isn't such
a thing as a docker VM. There are container host OS's that can run docker
containers. In all of those cases, you can SSH into the container host
which is running containers. You don't however SSH into a container
directly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/compute-image-packages/issues/618#issuecomment-392931014,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEsU4vlkq6aKiVYlnge0yVfPpzjiNrZks5t3a5jgaJpZM4UOzdT
.

I see. That is an interesting use case but yeah its not the case for the GCE guest software in this repository which is meant for guest VM's (or container hosts in this case). The python library for google-compute-engine however is available as a deb and rpm package and a pypi package. You could use the same functionality and only use the accounts daemon from a container perhaps. But this wouldn't be a supported use case and I can't guarantee we wouldn't break that use case in the future.


Every waypoint triggers immediately

I have implemented the demo http://brigade.github.io/react-waypoint/ but somehow the first waypoint gets executed without being in the view. The first waypoint triggers the load of new content and rerenders the component after the timeout. But suddenly the next waypoint executes _loadMoreItems and every new rerendered waypoint triggers immediately. So I end up with tons of this and they are always the same:
["scrollableAncestor", div]
waypoint.js:45["waypoint top", 116]
waypoint.js:45["scrollableAncestor height", 13606]
waypoint.js:45["scrollableAncestor scrollTop", 88]
waypoint.js:45["currentPosition", "inside"]
waypoint.js:45["previousPosition", undefined]

The current view is actually above the waypoint so I don't know why it says that it's inside. Also the waypoint top value is too low and should be much higher. Any suggestions?
import React from 'react';
import ReactDOM from 'react-dom';
import Drop from './Drop';
import Waypoint from 'react-waypoint';

class DropList extends React.Component {
    constructor(props) {
        super(props);
        this._loadMoreItems = this._loadMoreItems.bind(this);
        this._renderWaypoint = this._renderWaypoint.bind(this);
        this._renderItems = this._renderItems.bind(this);

        this.state = {
            loadedItems: 50,
            isLoading: false,
            currentItems: this.props.drops.slice(0, 50)
        }

    }

    _loadMoreItems() {

        var itemsToAdd = 50;
        var secondsToWait = 2;
        this.setState({isLoading: true});
        // fake an async. ajax call with setTimeout
        window.setTimeout(() => {
            // add data
            var currentItems = this.state.currentItems;
            var newItems = this.props.drops.slice(currentItems.length - 1, currentItems.length + 49);
            currentItems = currentItems.concat(newItems);
            this.setState({currentItems: currentItems, isLoading: false});
        }, secondsToWait * 1000);
    }

    _renderWaypoint() {
        if (!this.state.isLoading) {
            return (<Waypoint debug={true} onEnter={this._loadMoreItems}/>);
        }
    }

    _renderItems() {
        return this.state.currentItems.map(function(drop, index) {
            return (<Drop key={index} src={drop.src}/>);
        });
    }

    render() {

        return (

                {this._renderItems()}

                    {this._renderWaypoint()}

                {console.log(this.state.isLoading)}

        )

    }
};

export default DropList;

Okay it seems like it had to do with some styling props. Finally I could solve it with setting those styles and setting scrollableAncestor={window}

Glad you got things sorted out. Most of the time when seeing this behavior, it's due to some content being lazy-loaded. An example would be  tags without a specific height.


Provide a means to track MuleQueue status and progress

As it stands, if MuleQueue is active but in the wait period, there's no visual way to tell this other than seeing the "pause reload" button. The user would need to be watching console to have any real idea what is going on.
Provide a UI for watching the status of MuleQueue.

This task is dependent on #71 which will not be included in 0.8.3.

Replaced by #71


[impeller] AiksTest_ImageFilteredSaveLayerWithUnboundedContents rendered incorrectly on opengles

seen in dcc8c65eb3d1d43decb52d276b7f29390ea67c9d
test: AiksTest_ImageFilteredSaveLayerWithUnboundedContents
metal

opengles

I think this is a bug with the decal sampling mode.

See also: https://github.com/flutter/flutter/issues/139773


The 'coverage' directory is always generated

Description
These extenstion keeps generating 'coverage' directory
Steps to Reproduce
If the extension is enable

Open any folder in Visual Studio Code

If the extension is disable

Open any folder in Visual Studio Code
Enable the extension

Expected Results
The 'coverage' folder is created only is something need to be put in this folder
Actual Results
An empty coverage folder is always created
Settings file
Default
Versions

VScode: v1.38.1
Mocha SideBar: v0.22.2
Node Version: v10.15.3

OS version

Windows 10

Remarks
This is really a pain for project without any javascript code or mocha tests.
I have to disable the extesion to avoid the issue.
Other persons are having the same issue : https://stackoverflow.com/questions/56374459/vscode-keeps-generating-coverage-directory

Confirming this, happens on linux too. It's rather annoying, enough to want to uninstall this plugin. Please fix this. I'm guessing this line is the culprit:
https://github.com/maty21/mocha-sidebar/blob/fd55bb24a4bf5a53a320eaebf43dc648cc5580fe/lib/coverage/code-coverage.js#L214


Raise minimum API level to 16 (Android 4.1 Jelly Bean)

As of 11/1/2014 80% of our users are on 4.1 or higher.

What exactly is needed to be done in this task? Changing minSdkVersion to 16 and removing deprecated code before API 16?

@hasitpbhatt I should probably assign this to @sseligma. It's more of a parent task for other work going on with the sdk-16 and intrepid branches. This can probably be closed once those branches are merged into master.
We're overhauling the app to use Lollipop's UI style and to drop a lot of custom code we wrote to make Gingerbread look like KitKat, plus removing some 3rd party libraries that we don't want to use anymore, like ArcGIS for mapping and a pull-to-refresh library.


Remove 'raise hand'?

Imitation is the sincerest form of flattery: Google integrated a raise hand feature a while back, and now it's got a few more features (lowering when you speak, notification sound so full-screen presenters can hear it etc).
I think the duplication could be usefully removed.

(or, could this feature be triggered by this plugin - to keep everything in the same place?)

@whi-tw sounds like it could make the code more brittle to changes? The PR has been merged anyway :laughing:


Added puppet lint fixes

Hello,
I have done some puppet lint fixes

thanks for the patch.
Not sure we want to use replace => false for the puppet config file, we want to be able to change values from puppet, and be able to update the sonar version, which may include changes to the config file

wondering a couple more things,
is there any reason not to use

class 'sonar' in init.pp
sonar::home in plugin.pp and move_to_home.pp?

I'm applying the lint fixes and leave that for a different commit


Get Test Package Dependencies Option

This feature adds a -t flag to the godep get command to download and install test package dependencies. This is similar to the -t flag in the go get command.
I wasn't sure how to handle the version change so I simply incremented the version number. Please let me know if this should be done differently.

Any feedback on this change?

@bbokorney Since you are updating the version, please also update the Changelog and squash down to a single commit. Thanks!

Okay, I'll do that right now.

Alright, I've updated the Changelog.

Thanks!


Feat/#203 support nullable nested objects

This is regarding issue #203
I have extended the existing ModelValueType and the function isModelValueType  to allow for object type.
I also added a new test case covering the scenario described in #203 .
It was indeed failing at the beginning, the object would be null no matter whether or not you passed to create an existing object.
This was caused by isModelValueType that would return false if the object was not a Primitive or an Array of Primitives.
The test is now passing, and I've also tested it manually.
Note that this is my PR for this project and unfortunately the tests were not all green out of the box. So I manually checked where these functions/types were used to ensure I didn't break existing functionalities.
Please don't hesitate to let me know if anything needs to be changed.

Nice one, can we get it merged?

Hi there! 👋 I've also tried to tackle that one. I think that there may be some parts missing, when for example we'd like to have some default value for nullable object property - for example
const db = factory({
  user: {
    id: primaryKey(faker.datatype.uuid),
    address: nullable(() => ({
      street: () => "Wall Street",
      number: nullable<number>(() => null),
    })),
  },
});

const user = db.user.create();

we may want to have something like
{
    id: "...",
    address: {
        street: "Wall Street",
        number: null
    }
}

for user.
I created https://github.com/mswjs/data/pull/231/files with some investigation I've made some time ago and finished today. Maybe you could take a look there, because you're familiar with the problem and we could figure out some working solution together?

Hi @roertbb, sorry I was quite busy, I'll have a look at your code and get back to you ASAP :+1:

Hi,
Any progress on this one?
It would really upgrade this already amazing package :)
Thanks !!


Simplify README.md and change example

Codecov Report

Merging #63 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #63   +/-   ##
=======================================
  Coverage   74.64%   74.64%
=======================================
  Files          21       21
  Lines         284      284
=======================================
  Hits          212      212
  Misses         72       72

Continue to review full report at Codecov.

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


Make model downloader available after initial setup

As far as I know, the automatic downloader for models is only available when the UI is started for the first time. It would be helpful to be able to use this later as well.

My plan for this is to eventually have "Ghost models" visible in the model listing showing various recommended core models (with of course the ability to remove it if you don't want it), that would enable having eg controlnets and etc listed and ready to use.
Maybe also an interface wherein you can simply paste a huggingface/civitai/whatever link and have it automatically download it to the right folder & ensure metadata/thumbnails/etc are set and all for convenience

These ideas sound really great. It would also be important for the ghost models to be easily visually distinguishable from already installed models and preferably separated by a gap.
I thought that a public repository, where the latest models and the corresponding download links are provided, could also be implemented. Theoretically, this could simply be done using a git repository with a json file. This would also allow developers of other custom checkpoints to bring their checkpoints directly into the UI (through a PR in this repo). If it were then possible to add custom repository URLs, third party developers could also offer experimental snapshots, for example.

Automatic model downloader would definitely be .safetensors files only - ie the model files cannot contain malware (unlike pickle files - ckpt/bin/pt/etc) which can execute.
If you're worried about potential malware risks in the area, my biggest concern personally is the custom node packs (ie piles of python code) and especially those that rely on pickle files (controlnet preprocessors, ipadapter, etc. require remote pickle files to function).
Those are though at least from named individual developer contributors from a single central source, so it'd be hard for them to get away with much without getting caught & punished.
Using the docker launch script helps to mitigate risk, as docker containers - er, contain the reach of code running inside them.

There's now a Utility tab to download models by URL, as noted above it's .safetensors only


Content-Type header in v2

As stated on https://community.letsencrypt.org/t/jws-post-content-type-header-enforcement/55055 by @cpu

ACMEv2 API clients will be required to send all POST requests with a Content-Type header of application/jose+json

Thanks, this should be fixed with the commit mentioned above.


Conventions for debugging additions

Hi @Maksims  and @daredevildave,
As per https://github.com/playcanvas/engine/pull/816 you suggested to take out debugColor property which I introduced to be able to "outline" UI elements' bounds.
While I do appreciate this is probably not the best approach to keep these things in the engine code, what's you suggestion on managing such things? I mean many users might find such debug additions helpful during the development, thus it should be somehow easily accessible, but I am not sure how exactly to keep that? @Maksims suggested to wrap the code into debug defines, which might be an option.
 I bet it should be something well-known and easy to use for it to make sense – noone would think of googling such scripts if we keep it completely separate, but those come in really really handy some times.

Previously we had debugging and visualizing features for collision, cameras, lights, and some other gizmos. And it looked liked no one actually have used them. Reason they were put there in first place is to render them in Editor. We've decided to remove them from the engine to keep engine cleaner, and implement it as own things in Editor.
More of a question - how easy or hard will it be for somebody to implement border code - how flexible is the system that would allow easily make such modification.

You know, my question is quite generic: in most instances you either have something right at your fingertips or you quickly reinvent the wheel. The point is to put something easily accessible - not in the engine maybe, but still straightforward to find and use.
Keeping this stuff solely in the editor is a politically biased decision as it prevents guys using these things from outside (when no editor is involved)

Then perhaps hidden under DEBUG #define will do the good trick :)

@guycalledfrank and @daredevildave – what do you think?
If debug define is OK, I would wrap the code into it before submitting as a PR.

Some time ago, we introduced the following convention for predicating debug code in the engine:
// #ifdef DEBUG
   doDebugStuff();
// #endif

Example:
https://github.com/playcanvas/engine/blob/master/src/math/mat4.js#L805
Therefore, I'm closing this.


AzureDatabricksLinkedService does not support MSI authentication

Describe the bug
The management model AzureDatabricksLinkedService only supports tokens and does not support MSI authentication.
Exception or Stack Trace
....snip....
 File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/azure/mgmt/datafactory/operations/_linked_services_operations.py", line 170, in create_or_update
    body_content = self._serialize.body(linked_service, 'LinkedServiceResource')
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 628, in body
    raise errors[0]
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 250, in validate
    Serializer.validate(value, debug_name, **self._validation.get(attr_name, {}))
  File "/apps/agent/_work/20/source/venv/lib64/python3.6/site-packages/msrest/serialization.py", line 730, in validate
    raise ValidationError("required", name, True)
msrest.exceptions.ValidationError: Parameter 'AzureDatabricksLinkedService.access_token' can not be None.

To Reproduce
Instantiate AzureDatabricksLinkedService with token=None and authentication="MSI".
Code Snippet
N/A
Expected behavior
The model should support MSI auth as this is supported via DataFactory JSON configuration.
Setup (please complete the following information):

Python Version: Python 3.8
SDK Version: azure-mgmt-datafactory==1.0.0

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

@lmk-coles This is already fixed in the latest swagger & .net SDK, python SDK is coming, thanks!

@lmk-coles The python SDK is coming in a few days and @00Kai0 is actively working on this now, feel free to let us know if you still have any issue, thanks!

@lmk-coles any update on this?
I'm using:
azure-mgmt-datafactory==1.0.0

But it fails with the same error.


Unintuitive plugin configuration

Steps to reproduce:

Click "create configuration" to create telegraf configuration
Click system
Click disk (intending to not monitor the disk)
Realize you can't unselect the disk plugin and try to back out:
a. Done seems like "finish configuring the plugin"
b. Corner X seems like it would take me back to the "Configure Plugins" page.

Environment info:
> uname -srm
Linux 5.0.0-13-generic x86_64
> ~/src/influxdb_2.0.0-alpha.9_linux_amd64/influxd version
Error: unknown command "version" for "influxd"
Run 'influxd --help' for usage.

This is an issue on any of the linked plugin configuration pages --- there is no way for the user to return to the previous page. Needs a Design solution


formatOnPaste: true pastes the rest of the line in SCSS files

VSCode Version: 1.9.1
OS Version: OSX 10.11.6

Steps to Reproduce:

set "editor.formatOnPaste" to true in you settings.json file
copy & paste any css value to another attribute in any scss file:

(ignore the linter errors)
copy

paste

I've had similar experiences:

When I pasted "foobar" inside that console.log, formatting broke.

Having the same issue in v1.10 even without editor.formatOnPaste set to true…

having same issue here, on scss and json files as well.  Turning editor.formatOnPaste to false seems to resolve.

It seems to be related to css formatter, assign to @aeschli first to help.

We don't have a CSS formatter built-in VSCode.
There are various formatters available as extensions, such as https://marketplace.visualstudio.com/items?itemName=aeschli.vscode-css-formatter.
I realize that that formatter doesn't implement range format correctly, instead it formats the whole document, causing the bug you see.
I created https://github.com/aeschli/vscode-css-formatter/issues/7
I suggest to use a different formatter in the meantime.


It's possible to import YOLO segmentation dataset?

Hello, i was trying to import a yolo dataset with segmentation as annotation but i get error. Is planned this feature?
Thanks

Hi, if you have a request I can work on it. What is the reason you want to do this? Do you want to convert it to Coco segmentation or do something else with it? I want to understand your total use case

any solution ?
I encounter this problem too


update interactive mode readme

Codecov Report

Merging #3329 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #3329   +/-   ##
======================================
  Coverage    70.6%   70.6%
======================================
  Files         391     391
  Lines       25221   25221
  Branches     3826    3826
======================================
  Hits        17807   17807
+ Misses       6292    6289    -3
- Partials     1122    1125    +3

Impacted Files
Coverage Δ

...dback/azure/cli/command_modules/feedback/custom.py
34.69% <0%> (ø)
:arrow_up:

...nent/azure/cli/command_modules/component/custom.py
16.23% <0%> (ø)
:arrow_up:

src/azure-cli-core/azure/cli/core/util.py
68.61% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


added example of using the pixel coordinate system

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Delete my image

Delete my image

From Lal: We probably don’t need user images etc registered..  as this is irrelevant when it comes to end user apps?


Replace path to parent by a child map

Fixes #14416

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@lptr PTAL!

@bot-gradle test QFL

OK, I've already triggered QuickFeedbackLinux build for you.


Is it possible to train the Boundary Loss code on a GPU?

Hi there,
I'm currently working with a code that utilizes scipy.ndimage.distance_transform_edt, which needs to run on the CPU. However, I've encountered an issue where transferring data from the GPU to the CPU and then back to the GPU seems to prevent the parameters from being updated. I'm curious to know how you handle this situation in your codebase. Thank you!

(Sorry for the delayed reply. Somehow the Github notification for this repo are still broken on my side.)
Yes this is correct, scipy.ndimage.distance_transform_edt. However, note that it is used at the dataloader level, to avoid this issue altogether: https://github.com/LIVIAETS/boundary-loss/blob/master/dataloader.py#L105
The implementation being quite efficient on CPU, this does not slow-down the training at all, and things are ready to be multiplied in the "Boundary losss": https://github.com/LIVIAETS/boundary-loss/blob/master/losses.py#L76
Notice that in practice, the only "difficult" part is the pre-processing and distance transform (for Keras it had to be designed slightly differently https://github.com/LIVIAETS/boundary-loss/blob/master/keras_loss.py ), and the element-wise multiplication of the softmax probabilities and distance map is trivial in itself.


Port to SKSE 2.0.7

Looks like new update landed recently.

Let kick off first #19 before going on this as I expect to be a hassle to merge later if done the other way around.

Release published at https://github.com/ryobg/JContainers/releases/tag/v4.1.0

Brilliant!. Thank you for your excellent work with this.
From: ryobg<EMAIL_ADDRESS>Sent: 09 April 2018 15:45
To: ryobg/JContainers<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: Re: [ryobg/JContainers] Port to SKSE 2.0.7 (#18)
Closed #18 https://github.com/ryobg/JContainers/issues/18 .
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/ryobg/JContainers/issues/18#event-1564010003 , or mute the thread https://github.com/notifications/unsubscribe-auth/AidXdUkNL88conPjyDrdcJb_EqPBGa01ks5tm3QIgaJpZM4TIPn4 .


Have IEditorRegistry.registerEditor take a lazy promise to an editor constructor?

For code splitting, I believe we should avoid importing the definitions of various editors—such as the WebviewEditor or settings editor—until they are actually needed. This  should be possible if we make IEditorRegistry.registerEditor take a Promise to an editor constructor instead of the constructor itself. We could us register an editor with an import(...) expression so that the editor code itself only needs to be loaded / processed when it needed

https://github.com/microsoft/vscode/pull/76324#issuecomment-506932019

Closing from conversation in #76324


Different colors or selected and non-selected buttons

As per the title, is it possible to have the feature to specify the color for the button when it is selected and when it is not? Current the colours will be the same regardless if it is selected or not.

No, it's not working for me

@ShaikhKabeer  did you find any solution for this ?

selectedButtonColor={'#000000'} its working for me
<RadioForm
              ref="radioForm"
              radio_props={this.state.types1}
              initial={0}
              formHorizontal={false}
              labelHorizontal={true}
              buttonColor={'#3e4152'}
              labelColor={'#000'}
              selectedButtonColor={'#000000'}
              animation={true}
              onPress={(value, index) => {
                this.setState({
                  value1:value,
                  value1Index:index
                })
              }}
            />


[discussion] Configurable audio behavior

One of the most requested features is greater configurability on how the audio mixing should behave. This bug is intended to be a place to first discuss how the configuration should work, then track implementation.
There are a number of use cases people have requested including:

Normal video playback (mutes all audio sources)
Music playback mixed with other audio sources
Video playback with audio muted
Video playback and record audio from the same app

Here is an overview of the behavior on mobile platforms. We can ignore Windows since the audio channel is always shared.
iOS offers the following modes:

Category
Silenced by Silent switch & screen locking
Interrupts nonmixable app’s audio
Allows input (recording) & output (playback)

AVAudioSessionCategoryAmbient
Yes
No
Output only

AVAudioSessionCategorySoloAmbient (Default)
Yes
Yes
Output only

AVAudioSessionCategoryPlayback
No
Yes by default; no by using override switch
Output only

AVAudioSessionCategoryPlayAndRecord
No
Yes by default; no by using override switch
Input and output

We can ignore the following options:

Category
Silenced by the Ring/Silent switch and by screen locking see note
Interrupts nonmixable app’s audio
Allows audio input (recording) and output (playback)

AVAudioSessionCategoryRecord
No (recording continues with screen locked)
Yes
Input only

AVAudioSessionCategoryMultiRoute
No
Yes
Input and output

AVAudioSessionCategoryRecord: input only
AVAudioSessionCategoryMultiRoute: currently this project doesn't support multiple output devices
Sample configuration call:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
On Android, there is a concept of audio focus. Each type of audio stream (phone call, media, notifications) can have one app that is using that stream at the same time. Focus should be acquired when playback is about to start and released when media pauses.
Sample configuration call:
requestAudioFocus(listener, STREAM_MUSIC, AUDIOFOCUS_GAIN);
Ducking:
"ducking" is the behavior of the OS lowering the volume of an audio stream to allow other streams to play on top of it. A good example of this is allowing a song to continue playing while playing a text beep.
More to come...need to extensively test behavior when handling notifications like text and incoming phone calls

I have been looking at the docs for how Expo handles audio mixing:
https://docs.expo.io/versions/latest/sdk/audio.html
Based on this, I think we support 3 props:
ignoreSilentSwitch
Control whether to play audio when the silent switch is on. Already implemented, iOS only
audioRecording
Allow audio recording. iOS only
audioMode

"Exclusive": default option. Interrupts audio from other sources
"Mix": Allow other apps to play at the same time as our app. iOS only
"Duck Others": Lower the volume of other apps

Some combinations of these props will be invalid and will throw an error.
I suspect we will want to make it so that muting or setting the volume to 0 ignores these modes.
I will need to do more testing to see how this working when there are multiple videos playing at the same time.

Any update on this? Does anyone have a fork?

I assume this needs work? https://github.com/react-native-community/react-native-video/pull/959

@evanjmg did you find something to manage sound from other apps?

Unfortunately not, I've had to make my own native library for the feature I wanted - https://github.com/evanjmg/react-native-sound-detection

There is a fork of react-native-video branch (https://github.com/Stormotion-Mobile/react-native-video) which partly implements desired behavior both on Android and iOS, my colleague used it in his project and it worked good for him, he needed to switch between different audio modes by pressing button. Note, that most likely it has breaking changes.
Project's info:
react-native: 0.60.11
react-native-video: 4.3.1

It works by introducing audioFocusState prop, which can take 0, 1 , 2 value. You can play with them, but as far as I understand 0: Playback with mixing, 1 is Playback with ducking, 2: Playback.
For my use case, I needed to interrupt 3rd party audio and then resume it after my app's video finished. I used 2 to interrupt and 0 to resume. However, on Android it didn't work (audios were mixed instead), maybe I missed something. It could be broken because I updated my colleague's fork to react-native-video 5.1.0-alpha1, handling merge conflicts. If you need, you can use it here https://github.com/CyxouD/react-native-video, but it could really break something.

@ditorojuan
yes, exactly the same audioFocusState={paused ? LOSE_FOCUS : GAIN_FOCUS} :)
Unfortunately, I don't know why your experienced this issue. By the way, it worked bad on Android (don't remember what issue was exactly)


Could not resolve "./styles/tailwind.css"

Have you experienced this bug with the latest version of the template?
Yes
Steps to Reproduce

Run "npm run dev"

Expected Behavior
The app should start without an issue
Actual Behavior
App failed to load

This seems to be fixed by going to line #16 of app/root.tsx and change it from
import tailwindStylesheetUrl from "./styles/tailwind.css" to
import tailwindStylesheetUrl from "tailwindcss/tailwind.css";

@thecmsdojo you just need to recompilation again first time.
This is because tailwind (dev:css) & remix (dev:remix) are being ran in a different process, and remix finished first.
You should keep the import tailwindStylesheetUrl from "./styles/tailwind.css" statement.


c_cpp_properties parsing

Fixes #703

Done

I've left initailizer-list constructor for string from fstream unchanged since it compiles with parentheses only under msvc.

Thanks!


Fix nodejs-mem vulnerability WS-2018-0236

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


separate out the cream and compound liquidation classifiers

Split out the Cream and Compound liquidation classifiers. Previously the Compound CETH address was erroneously being used by the classifier for cream liquidations such that some blocks containing Cream liquidations would fail (e.g. ./mev inspect 13404932).

Looks good so far, but would like to see some testing that can be cross-checked with Etherscan, with at least a couple different scenarios. Using block 13404932 as a test is a good place to start  (see compound and aave liquidation test)


Start process to debug from Vim

Now vdebug starts only listening process and process to debug should be started manually outside Vim.
For now I use following code in my vimrc to automate the process:
    function! Debug(url)
        let url = a:url
        " add 'http://' if it is not in url
        let http_pos = stridx(url, 'http')
        if http_pos != 0
            let url = 'http://'.url
        endif
        " add 'vim_debug' IDE key to url, this IDE key is also set in vdebug options
        let q_pos = stridx(url, '?')
        if q_pos == -1
            let url = url.'?XDEBUG_SESSION_START=vim_debug'
        else
            let url = url.'&XDEBUG_SESSION_START=vim_debug'
        endif
        " launch browser
        call OpenBrowser(url)
         " start debugging
        python debugger.run()
    endfunction
    command! -nargs=1 Debug call Debug('<args>')

This command allow to launch browser via OpenBrowser plugin and then start vdebug.
I use it like this:
: Debug http://myhost.com/xxx.php

Another one to debug currently edited python script:
    function! DebugPy(...)
        let str_args = join(a:000, ' ')
        " command to launch - uses local path to pydbgp, probably this can be done in a better way
        let last_cmd = '!python -S ~/pydbgp/bin/pydbgp -d localhost:9000 -k vim_debug ' . str_args
        " save last used args, command and its results to files (for debugging of this function)
        execute 'silent !echo "' . str_args . '" > ~/vim.last.arg.txt &'
        execute 'silent !echo "' . last_cmd . '" > ~/vim.last.cmd.txt &'
        " launch command in backgound
        execute 'silent ' . last_cmd . ' > ~/vim.last.out.txt 2> ~/vim.last.err.txt &'
        " start debugging
        python debugger.run()
    endfunction
    command! -nargs=* DebugPy call DebugPy('% <args>')

Now I can do this:
: DebugPy

And debug current python file.
Probably the same can be done in a better way inside the python code and maybe not only for php/python, but for other supported languages as well.
Also another python-based plugin for debugging, vim-debug, can do this

I think this is somewhat out of the reach of what we can do with vim. It might work but will be very error prone for different browsers, if users use multiple profiles, multiple windows, there will be too many issues


Use ClientConfig from pg

Just use ClientConfig from pg instead of defining it explicitly. Getting a type error, since the ssl field in ClientConfig from pg is slightly different from the ssl field in here.
Type 'ClientConfig' is not assignable to type 'string | ClientConfig'.
  Type 'import(".../node_modules/@types/pg/index").ClientConfig' is not assignable to type 'import(".../node_modules/node-pg-migrate/dist/types").ClientConfig'.
    Types of property 'ssl' are incompatible.
      Type 'boolean | ConnectionOptions | undefined' is not assignable to type 'boolean | TlsOptions | undefined'.
        Type 'ConnectionOptions' is not assignable to type 'boolean | TlsOptions | undefined'.
          Type 'ConnectionOptions' is not assignable to type 'TlsOptions'.
            Types of property 'pskCallback' are incompatible.
              Type '((hint: string | null) => PSKCallbackNegotation | null) | undefined' is not assignable to type '((socket: TLSSocket, identity: string) => Uint8Array | DataView | Uint8ClampedArray | Uint16Array | Uint32Array | ... 5 more ... | null) | undefined'.
                Type '(hint: string | null) => PSKCallbackNegotation | null' is not assignable to type '(socket: TLSSocket, identity: string) => Uint8Array | DataView | Uint8ClampedArray | Uint16Array | Uint32Array | ... 5 more ... | null'.
                  Types of parameters 'hint' and 'socket' are incompatible.
                    Type 'TLSSocket' is not assignable to type 'string'.

hey, @brandonchinn178 thank you for this PR! In general LGTM :+1:
do you think you can rebase it on the latest master and run npm run build from the root and fix any errors that are shown there? at the moment the build fails. Thank you :pray: If you don't have time for that please let me know.
@Shinigami92 just to check, you don't see any potential problems here? wondering why this PR stayed here for a year...

@littlewhywhat @Shinigami92 Made all requested changes


Adding support for python multiprocessing pool

Why are these changes needed?
As more emphasis is towards pure Python runtime, usage of multiprocessing support can improve performance for this runtime
Related issue number (if any).

fixed

@blublinsky Multiprocessing looks good. By the way, since we are modifying runtime, I wonder if we want to limit the print out of a floating number to have only 2 decimal digits, by using round().
For example, in data-processing-lib/python/src/data_processing/runtime/pure_python/pooled_runtime_file_processor.py:
Line 99: f"Completed {completed} files ({100 * completed / len(files)}%) " ->
f"Completed {completed} files ({round(100 * completed / len(files), 2)}%) "
Line 100: f"in {(time.time() - t_start)/60} min" ->
f"in {round((time.time() - t_start)/60, 2} min"

Thanks, @blublinsky.  LGTM.


docs(advanced & concepts docs improvements): clarity / structure changes

This PR covers slight changes to the documentation grammar/structure, hopefully providing more clarity and comprehension for consumers as well as fixing any typos.
I made these changes whilst reviewing both sections in-depth. I initially wanted to gain more clarity on QRL's, symbols, and the Qwikloader, and thought I might as well try to improve the documentation while I'm at it!
If you think that any of these could be improved as well don't hesitate to give feedback / make any further changes!
What is it?

[ ] Feature / enhancement
[ ] Bug
[x] Docs / tests / types / typos

Checklist:

[x] My code follows the developer guidelines of this project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[ ] Added new tests to cover the fix / functionality

Good stuff! thanks Jack!


webpackHotDevClient now uses wss when https is used

Fixes #8075.
Summary

If https protocol is being used we should use WebSockets over SSL/TLS (WSS) protocol instead of WebSockets (WS)

Test Plan
Follow steps in the issue https://github.com/facebook/create-react-app/issues/8075

Ah yes. Great catch. Thanks @mikecaulley!

Can a maintainer cut v3.3.1 release with this change please?

Some client libraries like Facebook Login SDK will fail if run over non-HTTPS connections (even on localhost!). This makes 3.3.0 a problem for users of these libraries because they can't fall back to HTTP, even in DEV mode.  So would be cool to get this patch released soon. Thanks!
For folks who end up here from Google, while waiting for a patch you can manually edit node_modules/react-dev-utils/webpackHotDevClient.js to fix this problem without downgrading to 3.2. Here's the code you'll want at line 62 of that file:
protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',


refactor(paeckchen-core): rename interfaces to not be prefixed with I

Coverage remained the same at 100.0% when pulling 03b6f6341dd65eec2d1ccbd15b1a6bd3941d9315 on rename-interfaces into 930a6524a530c72f09361c4a81b396a07b2e5d4f on master.


Update jest-cli to its latest version

Coverage remained the same at 98.361% when pulling c7b286abb0a2446adb6ec79114d80accf69f716e on jest-cli-22.3.0 into 496d9d14beb3910adfe6dfb9c6382f0268580eb5 on master.


Command-click a row or command-drag rows to toggle selection in Tables?

Ref. https://observablehq.com/@observablehq/input-table#comment-a55f3587d9ddb0f9
This would be especially nice since you don’t have to click the tiny checkboxes.

My preferred behavior would be to treat any mouse interactions where the mousedown started in the column of checkboxes as if the table rows were a multi-selection input.
So then click (optionally drag) starting in the checkbox column would result in a selection of the set union between the previous selection and the drag range, and command-click (optionally drag) would select the set difference between the previous selection and drag range.
(This is the behavior in Mac Safari; play with that one with various combinations of clicks, drags, and modifiers to get a feel for it. I am not sure how these inputs behave in other browsers / operating systems.)

I agree that clicking and dragging starting outside the checkbox row should be used for text selection (or possibly selection of a rectangle of cells, excel-style).


correct Insights Endpoint for dependant PCF nozzle

https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers#endpoints
https://github.com/newrelic/newrelic-pcf-nozzle-tile/blob/master/newrelic/nrclients/nrclients.go#L19

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

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

@stephencrowley please rebase and update the commit message per the commit message guidelines This looks like chore: . Thanks!

@stephencrowley please rebase and update the commit message per the commit message guidelines This looks like chore: . Thanks!

Hey @sanderblue
chore: correct Insights Endpoint for dependant PCF nozzle
did not work so I tried adding a subject chore(EU): and chore(newrelic): and it doesn't seem like it's working still.

Hey @sanderblue
chore: correct Insights Endpoint for dependant PCF nozzle
did not work so I tried adding a subject chore(EU): and chore(newrelic): and it doesn't seem like it's working still.

For the lint to pass, the commits themselves must be changed, and not just the title of the PR.  You can interactive rebase to adjust your commits, or if you have only to adjust the latest commit, then git commit --amend can help, followed by a force push to the PR branch.

For the lint to pass, the commits themselves must be changed, and not just the title of the PR.  You can interactive rebase to adjust your commits, or if you have only to adjust the latest commit, then git commit --amend can help, followed by a force push to the PR branch.


Missing github workflows to help reviewing PRs before merging

Description
As a developer I would like to have automated build, testing and sonarcloud checks in place for every pull request so that when I jump into a review I know that the minimum quality requirements were met by the submitted code
Acceptance Criteria
The .github/ folder contains the following workflows (on both push and pull_request):

Build components
Test components
SonarCloud Code Analysis

This also calls for the creation of a test:all script that a github workflow can use to run tests on all the components and provide a passing or failing status


Documentation: Add UML diagrams

Hi,
Following the meeting with @fricklerhandwerk, here's a new pull request against the documentation.
This PR:

[ ] Add a "pull request workflow" activity diagram, viewable directly on Github or editable on Plantuml, and or Planttext.
[ ] Update doc/contributing/contributing-to-documentation.chapter.md and include a paragraph on how to update diagrams

TODOs:

[ ] Split diagrams to have smaller diagrams
[ ] Add links to other diagrams

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

I updated the commits, added only one diagram for now, with proper links.
Question, where do you see this diagram in the documentation?

doc/contributing/submitting-changes.chapter.md seems appropriate. Possibly near the top, as an overview and part of the introduction.

@drupol I'm not sure about keeping a link to an external service. It's easy, but I'd prefer keeping a hard copy of the SVG next to the plantuml sorces. @jtojnar @roberth what do you think?
Other than that this looks great. Thanks a lot!

We could always generate them using plantuml program (though maybe we will need something like md-to-db.sh in CI since we probably do not want Java in manual closure).

Though to be honest, I do not see much of a point in documenting this workflow as it is not really Nixpkgs specific.

not really Nixpkgs specific

I agree on the principle that we should only maintain specific documentation. In this case, unless we can link to a generic description of the PR workflow that doesn't diverge from what we actually do here, this is a valuable addition. Otherwise it's not clear at all how the process works in detail until observing it a couple of times.
For instance, the bit with reminding maintainers is already crucial. I think this is a convention worth making explicit, as barely anyone on the outside can imagine what kind of a firehose Nixpkgs notifications can be - even if you're careful about what you subscribe to.


Use zf_ver_version instead of version

The route parameter version is a reserved word because of the handling of the version in this module.  This fixes the named route parameter to zf_ver_version so version may be a field in a Doctrine entity.  If the reserved word version is also a field name in an entity it will break:  https://github.com/zfcampus/zf-apigility-doctrine/issues/275
cc @jensstalder

I'm afraid I don't understand: how exactly does a route parameter affect a Doctrine entity? Those are usually going to be based on the request body, not the URI. Can you please elaborate?

I believe it is https://github.com/zfcampus/zf-apigility-doctrine/blob/master/src/Server/Resource/DoctrineResource.php#L704 + https://github.com/zfcampus/zf-versioning/blob/master/src/PrototypeRouteListener.php#L127 where version is injected into the route parameters.
So these route parameters are used in zf-apigility-doctrine here: https://github.com/zfcampus/zf-apigility-doctrine/blob/master/src/Server/Resource/DoctrineResource.php#L718 and 'version' is now a route parameter.  This causes https://github.com/zfcampus/zf-apigility-doctrine/blob/master/src/Server/Resource/DoctrineResource.php#L739 to assign a query builder equals of 'version' to 1.
This is not a problem unless the entity has a version field.
I would like to see route parameter filtering of entities removed from zf-apigility-doctrine as it was added at the request of the community long ago and I believe writing an API in that way is incorrect and should be done on individual and individual looking resources.


Turn off parameter wrapping

With this setting on, Rails will happily turn a POST to the UsersController
from this:
{ name: "Ralph" }

Into this:
{ users: { name: "Ralph" }, name: "Ralph" }

This means that params.require(:user).permit(:name) will not raise an error,
even if the developer forgets to nest their parameters inside a top-level
user key.
It is enabled for JSON by default. This change turns it off for every format.

We can also just remove the file - is that too much?

If removing the file works, I think I prefer that. We generate less code, and the code for removing it in Suspenders will be simpler.

Ready to squash and merge.


Support reporting with no tests

If there are no tests (e.g. https://github.com/classroom-resources/autograding-python-grader in empty repository), reporter should report zero instead of NaN.

Hi @liontiger23 ! Sorry for the slow response, we actually had a timing conflict rolling out this feature and have switched over our namespace for this repo. This repo should be archived (I'll do this after finishing this comment), and our actively maintained repo for this lives here now.
If you still want to see your changes, please re-submit your PR there 🙏🏼 I'm sorry for the confusion!


v2.1.1 Doc updates

Updated at-query mixin docs to go with #367

@haeky Hey, any chance you can disable tests for anything merging into gh-pages? It's our docs page and doesn't act like a theme at all.

Sure can!

This one won't probably go away but it should for the next ones.

Doc update looks good to me.


Only send a notification when there is an error

First thing, thanks for this module!
We would be interested in receiving notifications only when there is an error during the flux sync (to reduce notification noise - if there is no error, then we can be fairly sure that eventually changes will be applied).
I'm aware of https://github.com/justinbarrick/fluxcloud/pull/12 but I don't think we can use it for this purpose.
Would you be interested in supporting such a feature? I make no promises that I'll have the time to provide a PR, but maybe one day if nobody beats me to it...

I’m not positive if it’s possible to do what you want using the templating feature as it is today, but I think an errors only toggle would be super useful even if it does work for that.


feat: generate h3 polygons and create webmap

Addresses issue #25
Adds files:

points_to_h3.py
create_webmap.py
templates/maplibre_template.html

Points to H3
Input:

Input file: point layer with GVI scores
Output file
(Optional) H3 cell resolution (see here)

Output:

File containing h3 polygons at the specified resolution with mean GVI score as an attribute

Example usage:

python3 -m src.points_to_h3 data/processed/gvi_score_layer.gpkg data/processed/h3_polygons.gpkg 11

Create webmap
Input:

Input file: H3 polygon file
Output: HTML file to display MapLibre webmap
(Optional) filename for HTML file
(Optional) default zoom level for webmap

Output:

HTML file that contains javascript to generate a webmap showing the H3 polygons, styled by mean GVI score

Example usage:

python3 -m src.create_webmap ./data/processed/h3_polygons.gpkg ./outputs gvi_webmap.html 10

When I generate the web map and then open the file in a browser the map is blank and there is an error is in the console. is it possible to have it generate the overlay but just not show the basemap if there's no API key? can you add details to the Readme about the API key (where to get it, where to put it)?

hex grids look good, although trying to generate with resolution 9 results in an error

Added a note to the ReadMe re. MapTiler API key - will look into the other comments and come back to you

Single digit cell resolution error fixed with https://github.com/AmericanRedCross/street-view-green-view/pull/46/commits/2d039c955f9ab1295731a16b7e13ed134b31f8f8
Webmap rendering in absence of Maptiler API key fixed with https://github.com/AmericanRedCross/street-view-green-view/pull/46/commits/592679ffe3ffbf571a7f15d73975ac511693e16b

when running:
python -m src.create_webmap data/processed/ThreeRivers/Three_Rivers_h3_polygons_10.gpkg data/processed/ThreeRivers/Three_River_gvi_webmap.html 10

i get 2 UserWarning (at the start) and a FileNotFoundError (see at the end where the error log shows it replaced the space with a slash and merges the 10 into the file path?):
(.venv) ➜  street-view-green-view git:(pr/46) python -m src.create_webmap data/processed/ThreeRivers/Three_Rivers_h3_polygons_10.gpkg data/processed/ThreeRivers/Three_River_gvi_webmap.html 10
/Users/danbjoseph/GitHub/americanredcross/street-view-green-view/src/create_webmap.py:59: UserWarning: Geometry is in a geographic CRS. Results from 'centroid' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation.

  str(gdf.dissolve().centroid.x.values[0])
/Users/danbjoseph/GitHub/americanredcross/street-view-green-view/src/create_webmap.py:61: UserWarning: Geometry is in a geographic CRS. Results from 'centroid' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation.

  + str(gdf.to_crs("4326").dissolve().centroid.y.values[0])
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/danbjoseph/GitHub/americanredcross/street-view-green-view/src/create_webmap.py:135 in     │
│ main                                                                                │
│                                                                                │
│   132 │   template = environment.get_template("maplibre_template.html")                          │
│   133 │                                                                                │
│   134 │   # Generate the HTML file from the template, filling dynamic values                     │
│ ❱ 135 │   with open(                                                                             │
│   136 │   │   os.path.join(output_dir, filename), mode="w", encoding="utf-8"                     │
│   137 │   ) as message:                                                                          │
│   138 │   │   message.write(                                                                     │
│                                                                                │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             bbox = <POLYGON ((-85.355 41.675, -85.907 41.675, -85.907 42.215, -85.355        │ │
│ │                    42.215, -...>                                                             │ │
│ │           bounds = (                                                                         │ │
│ │                    │   -85.90720454077227,                                                   │ │
│ │                    │   41.67471472908509,                                                    │ │
│ │                    │   -85.35469609820089,                                                   │ │
│ │                    │   42.215034264698346                                                    │ │
│ │                    )                                                                         │ │
│ │       bounds_str = '[-85.90720454077227,41.67471472908509],                                  │ │
│ │                    [-85.35469609820089,42.215034264698346]'                                  │ │
│ │           centre = '-85.63005910941862, 41.940565538549514'                                  │ │
│ │       centre_str = '[-85.63005910941862, 41.940565538549514]'                                │ │
│ │             cmap = <matplotlib.colors.ListedColormap object at 0x1627dbe60>                  │ │
│ │      environment = <jinja2.environment.Environment object at 0x164408bc0>                    │ │
│ │         filename = '10'                                                                      │ │
│ │              gdf = │   │   │      h3_10  gvi_score                                           │ │
│ │                    geometry  gvi_norm html_color                                             │ │
│ │                    0    8a274b8c2437fff      15.65  POLYGON ((-85.64586 41.92636, -85.64673  │ │
│ │                    41.926...  0.306524    #34618d                                            │ │
│ │                    1    8a274b8c2507fff      14.97  POLYGON ((-85.64385 41.92817, -85.64473  │ │
│ │                    41.927...  0.291979    #365d8d                                            │ │
│ │                    2    8a274b8c251ffff      16.66  POLYGON ((-85.64485 41.92727, -85.64573  │ │
│ │                    41.927...  0.328128    #31678e                                            │ │
│ │                    3    8a274b8c2587fff       7.17  POLYGON ((-85.64812 41.92762, -85.649    │ │
│ │                    41.92738...  0.125134    #472d7b                                          │ │
│ │                    4    8a274b8c258ffff       7.84  POLYGON ((-85.64749 41.92654, -85.64837  │ │
│ │                    41.926...  0.139465    #46307e                                            │ │
│ │                    ..               ...        ...                                           │ │
│ │                    ...       ...        ...                                                  │ │
│ │                    282  8a274b8f1b9ffff       6.40  POLYGON ((-85.60709 41.96486, -85.60797  │ │
│ │                    41.964...  0.108663    #482677                                            │ │
│ │                    283  8a274b8f332ffff       4.26  POLYGON ((-85.6371 41.95591, -85.63798   │ │
│ │                    41.9556...  0.062888    #48186a                                           │ │
│ │                    284  8a274b8f3377fff       9.37  POLYGON ((-85.63647 41.95483, -85.63734  │ │
│ │                    41.954...  0.172193    #443b84                                            │ │
│ │                    285  8a274b8f3acffff       8.70  POLYGON ((-85.63383 41.95556, -85.63471  │ │
│ │                    41.955...  0.157861    #453781                                            │ │
│ │                    286  8a274b8f3adffff      10.11  POLYGON ((-85.63546 41.95573, -85.63634  │ │
│ │                    41.955...  0.188021    #424086                                            │ │
│ │                                                                                │ │
│ │                    [287 rows x 5 columns]                                                    │ │
│ │       gdf_bounds = array([-85.65720454,  41.92471473, -85.6046961 ,  41.96503426])           │ │
│ │                i = 1.0                                                                       │ │
│ │       input_file = PosixPath('data/processed/ThreeRivers/Three_Rivers_h3_polygons_10.gpkg')  │ │
│ │   legend_colours = ['#440154', '#31688e', '#35b779', '#fde725']                              │ │
│ │       legend_gvi = [1, 13, 25, 37]                                                           │ │
│ │  legend_gvi_norm = array([0.        , 0.33333333, 0.66666667, 1.        ])                   │ │
│ │   legend_label_1 = 1                                                                         │ │
│ │   legend_label_2 = 17                                                                        │ │
│ │   legend_label_3 = 32                                                                        │ │
│ │   legend_label_4 = 48                                                                        │ │
│ │   legend_patch_1 = '#440154'                                                                 │ │
│ │   legend_patch_2 = '#31688e'                                                                 │ │
│ │   legend_patch_3 = '#35b779'                                                                 │ │
│ │   legend_patch_4 = '#fde725'                                                                 │ │
│ │ maptiler_api_key = None                                                                      │ │
│ │       output_dir = PosixPath('data/processed/ThreeRivers/Three_River_gvi_webmap.html')       │ │
│ │         template = <Template 'maplibre_template.html'>                                       │ │
│ │       zoom_level = 12                                                                        │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: 'data/processed/ThreeRivers/Three_River_gvi_webmap.html/10'

also, i added a MapTiler API key to the .env file but it doesn't seem to be reading it in.

https://github.com/AmericanRedCross/street-view-green-view/pull/46/commits/2e3586c4d1242f9f2f95925eff58242f2cd13396 fixes the Maptiler API issue by adding load_dotenv() to the create_webmap script and correcting an error in the HTML template
the error above is because the function expects zoom level to be the 4th of 4 arguments (input data, output folder, output filename, zoom level) - because only 3 were passed, it interpreted zoom level as the file name. I've made a mistake in the example in the documentation.
Is it better to not ask for a separate folder and filename and just take a path to a file for the output? Or should I just update the readme to give a code sampe that will work with this pattern

yeah, i think a path to the file (instead of separate path and filename) matches the other steps

Updated with https://github.com/ioalexei/street-view-green-view/commit/b42316da10f06af65364e586747fc8605be15ff6

this is looking good, except for it to render the hex layer when there isn't a MapTiler API key, it seems that the .env file has to have...
MAPTILER_API_KEY = "None"

if the user copies the template and doesn't touch the line then it will be MAPTILER_API_KEY = "MY_MAPTILER_API_KEY" and it doesn't work? or if they delete the line and the MAPTILER_API_KEY key isn't present, it doesn't work?

if there is no MAPTILER_API_KEY line it works (shows the hex grid without a base map)
MAPTILER_API_KEY = "MAPTILER_API_KEY"  # doesn't work
MAPTILER_API_KEY = ""  # doesn't work

i guess we could just put a commented note in the .env.example file to remove the line if not used?

Added a new commit to account for a blank variable - but think it makes sense to put a note in the example .env file too as it might be hard to account of all the ways it could be invalid

functionality seems good to me for a merge
as @ioalexei notes, ruff flags h3pandas as unused but it's used in line 79 of the hex creation file ( gdf.h3.geo_to_h3()) - is there an edit that will let the check pass?

i don't thinkviridis is ideal for this because of the green for the mid values and then yellow and purple on the extremes. i added a commit to change it Greens.

Added fix for #88 :

changed int to float for legend generation, so that it handles smaller ranges
changed rounding in the legend labels to 2 decimal places rather than 0


Forbid cases of uni OtO relationships where ownerside gets no field

Example:
entity A
entity B
relationship OneToOne {
  A to B{a}
}

Could we default to using the other entity's name?
This would be more flexible as it should work whether or not the developer specifies the relationship name (which most of the time is already the other entity's name).

Yes, good point.Le 25 févr. 2018 22:35, Jon Ruddell<EMAIL_ADDRESS>a écrit :Could we default to using the other entity's name?
This would be more flexible as it should work whether or not the developer specifies the relationship name (which most of the time is already the other entity's name).
—You are receiving this because you were assigned.Reply to this email directly, view it on GitHub, or mute the thread.


No file-logging on IOError

With f.e. my kodi add-on I can not ensure write-access on some OSs (windows might require admin privileges etc.) hence I end up with a crash like:
File "gmusicapi/utils/utils.py", line 330, in configure_debug_log_handlers
 debug_handler = logging.FileHandler(log_filepath)
 File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__
 File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
IOError: [Errno 30] Read-only file system: u'/gmusicapi.log'
-->End of Python script error report<--

This PR fixes that...

Ah, nice. Thanks!


[Feature] Picture Tag

Feature Request
Is your feature request related to a problem? Please describe.
The library currently supports CldImage giving developers a way to use the Next.js Image component extended with Cloudinary.
An alternative image-related element is the picture element which allows for different capabilities.
Having this would allow developers to use Cloudinary in a way that makes more sense for Picture-related usage.
Describe the solution you'd like
A basic usage pulled from MDN is:
<picture>
    <source
        srcset="/media/cc0-images/surfer-240-200.jpg"
        media="(min-width: 800px)">
    <img src="/media/cc0-images/painted-hand-298-332.jpg" alt="">
</picture>

Theoretically, it would make sense that the <img above would be the <CldImg, where <picture becomes a wrapper with an additional <source element, leaving something along hte lines of:
<CldPicture>
    <CldSource
        srcset={[{ src: 'cc0-images/surfer', width: 240, height: 200 }]}
        media="(min-width: 800px)"
    />
    <CldImg width="298" height="332" src="cc0-images/painted-hand" alt="" />
</CldPicture>

Where inside we would use constructCloudinaryUrl to build an image URL
This is just an idea and am open to ideas and suggestions.

im actually not familiar with matchMedia, will need to look into that
But still haven't quite thought through how exactly id want to approach this
you're right in that example that you shared works well, this is how Next.js is currently handling it: https://github.com/vercel/next.js/discussions/19880#discussioncomment-6310787
but that doesn't handle responsive sizing within the bounds of the sources
With a little exploration on potential options for supporting this...
Unpic handles this with Source components, but not a Picture component: https://unpic.pics/blog/introducing-unpic-picture-tags/
it feels weird nesting a CldSource inside of a native <picture (at least to me), but there wouldn't be any functionality that would make sense in creating a CldPicture, which is likely why they didnt do it that way
Nuxt has a NuxtPicture, but my understanding is it's really meant for formats, and the syntax is encapsulated into the main component, not sources like Unpic: https://image.nuxt.com/usage/nuxt-picture
Astro similarly does what NuxtPicture does, really relying on it only for formats: https://docs.astro.build/en/guides/images/#picture-
I think as far as this library goes, i like the idea of supporting a more native-like syntax which gives people the freedom to create the sources as they'd like, so that means <picture><CldSource. I would expect the other frameworks (Nuxt) may be more inclined to follow the same pattern as the official Nuxt package, but worth a discussion, especially given the functionality is limiting in the current solution
the only trouble i really see is not being able to tap into the responsive sizing from Next.js that the CldImage component is currently able to. given this component wraps Next Image, it's able to utilize the built-in resizing, i wonder if it was intentional not to include responsive sizing in their solution 🤔
so following along with your example, i think the solution that i could support, without writing my own responsive size generator, would look along the lines of:
 <picture>
    <CldSource
        width
        height
        srcset={[{
            src: '<Lg Public ID>',
            ...transformations
        }]}
        // or src={['<Lg Public ID>']}
        media={`(min-width: <Lg Size>`}
    />
    <CldSource
        width
        height
        srcset={[{
            src: '<Md Public ID>',
            ...transformations
        }]}
        // or src={['<Md Public ID>']}
        media={`(min-width: <Md Size>`}
    />
    <CldImage
        width
        height
        src="<Public ID>"
        alt=""
    />
</picture>

perhaps srcset could also support a property such as size to allow it to correlate to a sizes property:
 <picture>
    <CldSource
        width
        height
        srcset={[
            {
                src: '<Lg Public ID>',
                ...transformations,
                size: '256w'
            },
            ....
        ]}
        sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
        media={`(min-width: <Lg Size>`}
    />
</picture>

i'll put together an RFC for this and share ti in the Discussions area to potentially gain more thoughts on it in that forum

hey @charliemourant i hadn't thought much about this since the last post, lost track of this while i was working on other things. i'll work on putting together an RFC for this, as i do think it would be helpful to have in some form, just want to make sure we do it the right way. thanks for resurfacing this

hey all, created an RFC here, would love some thoughts: https://github.com/cloudinary-community/next-cloudinary/discussions/511