Public API documentation

This is second level API with features:

adapter schema & data validation,
adapter chaining,
nested adapters,
schema mutations,

Thanks in advance for your feedback

Added schema mutations like in schematics/facond.

Another bit of functionality that might be useful is merging two adapters. For example:
quick_registration_adapter = Adapter()
quick_registration_adapter.field_add(adapters.fields.Email('email'))

user_profile_adapter = Adapter()
user_profile_adapter.field_add(adapters.fields.String('name'))

full_registration_adapter = quick_registration_adapter.merge(user_profile_adapter)

I think it would be helpful too to be able to select a subset of an existing adapter:
profile_adapter = Adapter()
profile_adapter.field_add(adapters.fields.String('name'))
profile_adapter.field_add(adapters.fields.Email('email', required=False))

registration_adapter = profile_adapter.select_fields(['email'])

Batavia? ? https://github.com/pybee/batavia

@luzfcb the idea of the batavia example is: if you have batavia script loaded it will be able to interpret the bytecode of a callback, otherwise it will be executed server side only. But most of the time we'll be using validator classes which will be picked up by a js class which is registered for the cls argument (python ValueEqual is continued on the client with js ValueEqual), in which case you still have a certain isomorphism to enhance your UI without loading a Python VM ;)
Thanks @Ian-Foote, with the distinction between validation and sanitization, we can have mutations without having an extra api. It seems features may be both used as a validator or a sanitizer or both such as LowerCase adapter, and that everything is an adapter, and all we have to do is finding what we want adapt() to do, as i will try to demonstrate.
An Adapter can validate, adapt (clean), process data and will always return a clone of itself when it does.
Otherwise they can dump themselves to be recreated, or render themselves.
An Adapter can wrap around other adapters, as validators, adapters or processors.
Data mapping Adapters can also map adapters to data, like the List and Dict adapters.
The ListAdapter will not work if instanciated with selfvalidators=[StringAdapter()], for a list of strings it should be mapvalidators=[StringAdapter()] or mapadapters=[StringAdapter()].
The DictAdapter take a dict mapadapters=dict(name=StringAdapter(adapters=LowerCaseAdapter())) but probably mapadapters=dict(name=LowerCase()) would work too but we can nest them for the sake of it.
I'm rewriting this but it will be twice longer, takes a lot of time, my have to do some testing too.
I can leave the new api idea in the comment here but you'll find it's not consistent so i need to adapt this (lol) in the PR.
assert StringAdapter().adapt(123).errors == ['Expected string, got int 123']
assert StringAdapter(cast=True).adapt(123).data == '123'
assert StringAdapter(validators=[LowerCaseStringAdapter()]).adapt('AOEU').selferrors = ['Not lower case']
assert StringAdapter(adapters=[LowerCaseStringAdapter()]).adapt('AOEU').data == 'aoeu'

# works because ModelAdapter descends from DictAdapter
a = ModelAdapter(Person()).adapt({'name': 'hi'})

if not a.errors: # .errors returns selferrors and maperrors
     person = a.process()

The List adapter can also use adapters to validate or adapt on each item of the data list:
assert ListAdapter(validators=[LengthAdapter(2)]).adapt(['A']).selferrors == ['Your list needs 2 items']
assert ListAdapter(mapvalidators=[LowerCase()]).adapt(['A']).maperrors == [['Should be lowercase']]
assert ListAdapter(mapadapters=[LowerCase()]).adapt(['A']).data == ['a']

Querysets:
adapters.add(QuerySetAdapter)
assert adapters.factory(Person.objects.all()) instanceof QuerySetAdapter
assert adapters.factory(Person.objects.all()).data = Person.objects.all()

The Dict adapter uses a mapping of key value
assert DictAdapter(mapvalidators=dict(name=LowerCase()).adapt({name='A'}).errormap  == {'name': ['Should be lower case']}
assert DictAdapter(adaptermap=dict(name=LowerCase()).adapt({name='A'}).data == {name='a'}

Adapter is already exportable recursively but we can still have a JSON adapter which does really not much except validating JSON actually
assert JSONAdapter(
    DictAdapter(subadapters=dict(name=LowerCase()))
 ).adapt('{"A"}').data == "{'a'}" # otherwise a json error

Can this somehow make a form adapter that will adapt request data into rendered form html ? i sure hope so
form = adapters.merge(FormAdapter(), adapters.factory(Person()))
form = form.adapt(request.data)
if not form.errors and not form.maperrors:
    form.process(

# or
class PersonForm(FormAdapter, ModelAdapter):
    # FormAdapter inherits from DictAdapter which will set attributes to mapadapters
    # It will be able to override what ModelAdapter if we reverse MRO maybe
    class Meta:
         adapters = [WelcomeEmailAdapter(), ModelAdapter()] # making it up

class WelcomeEmailAdapter(ModelAdapter):
    def process(self):
        if not self.data.welcome_sent:
             send_email()...
             self.data.welcome_sent = True

That's a lot of adapters ! So we have a registry
class ModelAdapter(DictAdapter):
    name = 'django.Model'  # js class map oh yeah
    def factory(self, model):
        if not isinstance(model, django.db.Model):
            raise NotMyThing()
adapters.add(ModelAdapter)
assert adapters['django.Model'] is ModelAdapter
assert isinstance(adapters.factory(YourModel), ModelAdapter)

# you can register your own adapter
class ContractAdapter(ModelAdapter):
     signed_with_blood = BooleanAdapter(validators=TrueAdapter())

     class Meta:
         validators = [...]
         adapters = {...} # we a dict adapter
 adapters.add(ModelAdapter, django.db.models)

 assert isinstance(adapters.factory(YourModel.objects.all()), YourModelAdapter)

The List adapter constructs with an Adapter instance, ie. List(String(validators=[LowerCase]))
The Dict adapter
A List(StringAdapter()) will decorate to support list of data.
A Dict(adapters=dict(name=StringAdapter(validators=LowerStringAdapter())) will not validate({'name': 'UPPER STRING') and fills its own errors.
# the pattern
class Adapter:
    def sanitize(self, data):
        clone = self.clone()

        # in case of a form adapter, this is non-field stuff, in case of a field, this is field stuff
        for sanitizer in self.sanitizers:
            try:
                clone.data = sanitizer.sanitize(data, self) # sanitize can mutate calling adapter too
            except ValidationError as e:
                clone.errors.add(e)

        return clone

    def validate(self, data):
        for validator in self.validators:
            try:
                validator.validate(data)
            except ValidationError as e:
                clone.errors.add(e)

    def adapt(self, data):
        clone = self.sanitize(data).validate(data)

        if isinstance(self.initial, list):
            # still not sure about tech detail for that block
            clone.data = copy.deepcopy(self.initial)
            for item in data: # ok theres a mistake here because im a newb
                clone.data.append(self.adapt(item).data)

        if issubclass(self.initial, dict):
            clone.data = self.initial()
            for key, value in self.adapters.items():
                clone.data['key'] = self.adapters[key].adapt(data.get(key)).data

        return clone

    def clone(self, **options):
         make_love_with_options(**options) # ie. select_fields, exclude_fields, etc
         return clone

Now with this i think we can have all the features, just by making an adapter. So now i think i understand why this is called django-adapters, if any of you has implemented such a pattern in a private project please i'm dying to see the code.
Examples:
# instanciate a QuerySetAdapter because initial is a QuerySet
a = adapters.factory(Person.objects.all())

# or to create of course
a = adapters.factory(Person())

# instanciate a DjangoModelAdapter because Person type is model
a = adapters.factory(initial=Person.objects.get(pk=1))

# now that we have adapters for any sort of data, where we can have
# validators, sanitizers, a sub-adapters, let's have a party

# this was made automatically by DjangoModelAdapter because it initialized an adapter per field
name = a['name']
assert isinstance(name, django.ModelStringAdapter)

# Lets add the lower case adapter for validation
lowercaseadapter = a['name'].validators.add(LowerCaseStringAdapter(except_last_word='yes'))

# Ok let's create a new adapter adapted to this data based on our adapter :)
a = a.adapt({'name': 'UPPER CASE'})
assert a.errors = dict(
     # self=[],
     name=['Must be lower case, except last word'],
)
assert a.errors['name'] == a['name'].errors

# let's add lower case string adapter as sanitizer to have this fixed
a.sanitizers.add(LowerCaseStringAdapter(except_last_word='yes'))
a = a.adapt({'name': 'UPPER CASE'})
assert not a.errors
# new data, validate created a new object
assert a.data['name'] == 'upper CASE' # we have except_last_word='yes'

# Lets have sanitizing adapte
# validate() black magic
def validate(self, data):
    result = type(self)(children=self.children, validators=self.validators, sanitizers=self.sanitizers)
    for key, value in self.data:
         result.data[key] =
# first LowerCaseString.sanitize() returned a new LowerCaseString adapter with data='upper CASE'
# so the parent Adapter r

# you can make your own adapter, for a field or a list of field or a model or a form or any data ...
# because sanitizer didn't raise an exception while trying to convert the data:
assert a.data['name'] == 'upper CASE'

# what about mutations
a = DjangoAdapter(Order) # this should probably be able to case both a form and a model
order.validators.add(service_platform=lambda a: a.data['service']
order.mutators.add(order.validators.ModelChoiceFilter(
adapter.validate(data)

assert isinstance(a.children['name'].validators['lowercase'], LowerCaseStringAdapter)
assert isinstance(a.chi

a.validators = [service_platform_constraint]
a.sanitizers = [make_all_uppercase]
assert a.children['name'] = StringAdapter(
    name='name',
    validators=[...],
    sanitizers=[...],
)

a.errors = [
    'some non field error',
    children=dict(
       name=['string should be lowercase']
    )
]

Conclusion, a field is an adapter by itself and i should rewrite all of this lol.

I understand your last comment is a big brain dump so I'll wait for you to clean it up in a new draft before digging into most of it. One thing I did want to pick up on immediately though is that I don't like a distinction between validators and adapters as separate lists as you showed in this example:
assert StringAdapter(validators=[LowerCaseStringAdapter()]).adapt('AOEU').selferrors = ['Not lower case']
assert StringAdapter(adapters=[LowerCaseStringAdapter()]).adapt('AOEU').data == 'aoeu'

I would like to be able to, say, chain a validator. followed by an adapter, followed by a validator. For example:
StringAdapter(validators=(is_numeric, cast_int, greater_than(0))

Now this is just a toy example that is likely better served by an IntegerAdapter, but I think retaining this flexibility would be valuable compared to what I see as a rather artificial distinction between validation and cleanup.

My bad, actually your request is possible with the new tut

I would like to be able to, say, chain a validator. followed by an adapter, followed by a validator.

Yes we can add this:

StringAdapter().adapters = (is_numeric, cast_int, greater_than(0))

In that spec adapters is a list of Adapter objects, and when you add them there would be some magic type() action.
Instead of .adapters, perhaps we could rename it .chain ?

Yes i completely dig you example:
StringAdapter(chain=(IntAdapter.steps('validate'), IntAdapter(cast=True).steps('clean'), IntAdapter(min_value=0))

Would be the same as:
StringAdapter(chain=(IntAdapter(cast=True, min_value=0)))

But I'm a bit lost with how the IOC would work, I thought calling ModelFormAdapter.steps.validate() would chain validate() calls on each adapter. But I think should be able to work out nicely with the rest of the pattern, of course it's hard to be sure without doing some tests ... I think we're going to throw away a lot of code before we get to something :joy:
Perhaps you already see a way to adapt the new tutorial for this ?

I've separated the concept of adapter and payload, is it better or worse ?

I'm going to have to have a social life this weekend to keep me away from coding this :joy: :joy: :joy:

Related comment: https://github.com/yourlabs/django-autocomplete-light/pull/983#issuecomment-371982751


improve logging, prevent unnecessary errors

@scarface-4711 Could you merge this and push to a new version?
Is it also alright if I start converting the DenonAVR integration in HomeAssistant to a Config Flow?
(A Config Flow is now required for all integrations that communicate with devices / do I/O).

@starkillerOG I'd love to learn how to add the config flow so I will follow your changes over there.  Going to read this today and hopefully it will inspire me on some of the "hang issues" people are reporting.
https://realpython.com/async-io-python/

@JPHutchins I just finished a PR that implements Config Flow for the Xiaomi Miio platform (https://github.com/home-assistant/core/pull/32091) if you are intrested you can see how I did it there. The DenonAVR platform will be pretty simular.

@JPHutchins I might need your help:
I started working on the config flow in this branch: https://github.com/starkillerOG/home-assistant/tree/patch-23
For the config flow I need to make a unique id, something like the mac adress/serial number something that is unique to the device so two of the same devices have a diffrent value while the value always stays the same for a device.
For me I can get the serial number and model by using:
http://192.168.1.IP:8080/description.xml
I know that on your newer receiver this url gets you device information wich also includes serial number and model:
http://<IP_ADDRESS>:60006/upnp/desc/aios_device/aios_device.xml
What I want to know, does http://192.168.1.IP:8080/description.xml also work for you?
Otherwise I will need to implement multiple ways of getting the serial number....

@starkillerOG I am getting nothing (Error 403) at http://192.168.1.IP:8080/description.xml.  The port 60006 works as you suggested.
Maybe try to find a lazier way to get a unique response... IP wouldn't work cause it could change.  Is it easier to get the model number and cross fingers that someone doesn't have two of the same model?
Don't want to get you into the weeds, but: https://superuser.com/questions/188799/how-to-find-the-mac-address-of-a-remote-computer

thanks 😄


Stoneholms not generating correctly.

I don't know if its my fault or not but i found a stoneholm generated with water everywhere, in particular water spawning inside blocks like stairs, walls, and chests.
I could think its my fault cause i have a world generator mod and it may be breaking stoneholms generations but i did some tests early and this didn't happened.
(Info: MC 1.16.5 / Forge 36.1.13 / Latest mod release)

Update: I tried to find the problem and i think its the fact that it generated inside a river (the portion on it with water is corresponding at the one being inside the river).

Aye this has to do with Minecraft generation.
I can't seem to find a way to fix it currently which is why by default they don't spawn in any wet biomes.

Update: I tried to find the problem and i think its the fact that it generated inside a river (the portion on it with water is corresponding at the one being inside the river).

The fact that it is so high up is another issue though. May I have the seed for this world?

Hi again, so if u want i can try to recreate this with and without the generator mod to be sure its not my fault, by the way i did some screenshots too if you'd like them.
Seed:1772609852839529583
Coords:-370 / 72 / -1998(should be these)

Fixes for water were in 1.3.
Fix for generating in the air is coming in next release.


[Release-1.28] - Refactor search for runtimes using exec.LookPath

Backport fix for Refactor search for runtimes using exec.LookPath

#9411

https://github.com/k3s-io/k3s/issues/9411#issuecomment-1942673199


Make static-context and lazy-static-context addictive

https://github.com/paritytech/libsecp256k1/pull/73#discussion_r708272518

(this is a duplicate of https://github.com/paritytech/libsecp256k1/issues/77)


AI synthesis prompt codeset

Relatively secret Webaverse feature: you can talk to your weba client and have things happen in the world magically. We integrate OpenAI Codex with a custom prompt that explains how to use the metaversefile API, and on invocation it gives us the runnable app code which we can load in the world.
One of the main goals of the meteversefile api is to be AI-driven in this manner, and this actually works quite well for examples provided in the prompt.
However, the prompt is limited in size so there is a limited set of things we can teach Codex to do at a time. While there is plenty of room to teach Codex about teleportation for example, we have many other concepts that we want to support. A single prompt isn't enough to teach the entire API surface very well.
To make this truly mindblowing, we need a testable, curated, and labeled codeset full of the useful kind of code we want to be able to support, and then we should run a preliminary, fast fulltext search over this (using the user's query as a key) to build the best prompt we can for the examples that are relevant to the query. Then this optimal prompt is shipped off to the AI and we should get amazing results no matter the query.
This codeset should also be 100% tested with our testing framework, on a mocked metaversefile api, to make sure all apps are actually valid. That would free us to make basically unlimited examples, and each one would add to our confidence in the API while making the AI smarter.
Whoever takes this on would probably need to be comfortable with understanding, redefining, changing, and debugging the metaversefile api, but it would be quite a fun job.
Posterity note: metaversefile and the api are probably going to be renamed

https://github.com/webaverse/app/blob/master/ai/ai-prefix.js

Taking up the task as it's quite fun and interesting.
For the first step, I will go through the Prompt flow end to end. The task's code set's expansion will also a lot of debugging in the metaverse file.

Running into error during model load. Debugging and working on and then move to the other codesets one by one. Started with the task today will be working on the weekend too on it.

It would be helpful to paste the line. Looks like the app has no contentId?
Also the header should probably not be being loaded for this, we don't need UI running in this test.


Provide datasource/feature overrides for scoring

As a follow-on to #100, it would be great to be able to send simply a set of feature scores (for example, the current features of a real revision, but with 10 extra references) and get the model prediction for a revision with those features.
This would let us get a better feel for the behavior of the model, and also let us experiment with using the model to suggest specific interventions that will most improve a page.

I just talked to @arlolra about getting this work done.  We discussed the steps that I thought needed to be taken to implement this in ORES.  Here's a quick summary:
Update ores/wsgi/routes/scores.py to handle parameters whose strings match datasource names (e.g. "datasource.revision.text")
https://github.com/wiki-ai/ores/blob/master/ores/wsgi/routes/scores.py#L109
Update the basic score_processor so that it does not cache scores generated when datasources/features are provided as params.
https://github.com/wiki-ai/ores/blob/master/ores/score_processors/score_processor.py#L164
We also talked about how we'd encode types in the datasources/features.  I think that JSON will work nicely but will look a bit ugly for strings.  Parameter names will need to be prefixes by "datasource." or "feature." in order to match the datasources and features of interest and that will provide us a ~namespace to make sure we don't overlap with other params (e.g. "precached")

OK.  Proposal time!  I'm way overdue here.
So, recent changes to revscoring (in the jump to 1.0.x) have made all revscoring.Feature and revscoring.Datasource identifiable by a unique string.  This would allow us to provide key-value pairs where key is the unique string that identifies the Datasource/Feature and value is the value to place in the cache when extracting features and scoring.  Most of the potential values in value will be JSON-able (soon, all of them https://github.com/wiki-ai/revscoring/issues/212), so I think we should use JSON encoding for them.
I see two good options for how we could pass these key-value caches to ORES: url-ended params & a flat JSON blob.  To demonstrate the differences between these options, I will demonstrate with a request to get the article quality wp10 prediction for rev_id=707605082, the last edit to the article on Biology.  In this case, we'll hard-code the number of level-2 headers to 10 and set the text to be "bar".
Url-encoded params

GET Request: /scores/enwiki/wp10/707605082?feature.wikitext.revision.lvl_2_headers=10&datasource.revision.text="bar"
POST Request: /scores/enwiki/wp10/707605082

body: feature.wikitext.revision.lvl_2_headers=10&datasource.revision.text="bar"

Advantages:

Common syntax will not surprise anyone.  Uses URL key-value pairs to form key-value pairs for cache.

Disadvantages:

Double-encoding.  The all values must be JSON encoded and then string encoded.  This will result in some weird looking URLs.  E.g. " is encoded as %22 and {} is encoded as %7B%7D  However, most browsers do this encoding natively and any code hitting the API won't care.
Flat.  It will be difficult to impose hierarchy on this scheme.  But, because we know that values for the cache can only be prefixes with either feature. or datasource., this should not result in name clashes.

JSON blob

GET Request: /scores/enwiki/wp10/707605082?caches={"feature.wikitext.revision.lvl_2_headers": 10, "datasource.revision.text": "bar"}
POST Request: /scores/enwiki/wp10/707605082

body: caches={"feature.wikitext.revision.lvl_2_headers": 10, "datasource.revision.text": "bar"}

Advantages:

Uniformly double-encoded.  The entire cache itself is encoded in JSON.  This will likely minimize the potential for errors due to double-encoding only subsets of the cache.
Hierarchical.  A multi-level JSON blob can be passed as a parameter.  We don't need that yet, but we might some day.  Also, by using the caches parameter, name clashes are avoided.

Disadvantages:

Uncommon encoding pattern.  Doesn't take advantage of URL encoding's key-value pairs.    E.g. the caches value in the first URL encodes as %7B%22feature.wikitext.revision.lvl_2_headers%22%3A%2010%2C%20%22datasource.revision.text%22%3A%20%22bar%22%7D  This will make it difficult to experiment by passing simple params via the URL.

Think I prefer the JSON blob.

However, most browsers do this encoding natively and any code hitting the API won't care.

This applies equally in that case. So, the complaint that,

This will make it difficult to experiment by passing simple params via the URL.

comes down to manually doing JSON formatting, which doesn't seem so bad in the example above.

I'm not sure that it does apply equally since there will be substantially less weirdness to encode when using Url-encoded params.  In the case of URL-encoded params, the most complicated encoding will likely be simple quotes whereas in the JSON example, there's spaces, colons, and brackets to deal with.  Still, I'd like to hear from others (@he7d3r & @ragesoss?) about what they think.
In the end, I think that we could actually support both, but I don't want to leap to that conclusion because it will result in more maintenance and testing work.

in the JSON example, there's spaces, colons, and brackets to deal with

but you said most browsers do that natively ...
Anyways, excited to see this moving forward, in any form.

Both of those options seem like they'll be pretty simple to use from my perspective. I find JSON APIs a little easier to think about, most of the time, but I also expect to do a lot of url pasting to explore how this kind of data can be used.

I had that URL pasting in mind when think of the URL-parsing access method.
E.g. here's a paste of the URL I get for the mail page of zhwiki: https://zh.wikipedia.org/wiki/Wikipedia:首页
Even when browser handle it natively, you can't assume other formats will.  Like markdown, for example.

True, but you can use the url bar as an encoder.

Not once the string is encoded.  I'm struggling to figure out how to get the decoded string from the URL bar.

Just add a space at the end so it switches to "editing mode" and then copy.

Interestingly, if I lookup the following URL in Firefox, I can keep editing as-is:
https://test.wikipedia.org/wiki/Main_Page?foo={"bar": 5, "baz": 10, "bin": [1, 2, 3, 4, 5]}

But if I try the same in Chrome, the URL will change to the following as soon as I look it up:
https://test.wikipedia.org/wiki/Main_Page?foo={%22bar%22:%205,%20%22baz%22:%2010,%20%22bin%22:%20[1,%202,%203,%204,%205]}

So, in Firefox, the JSON remains somewhat legible.  But in Chrome, the URL becomes gnarly and hard to edit.
I'm starting to think that it'll be a good idea to support both.
URL editing use-case:
In the case of URL params, all of the JSON encoded feature values look identical as their string representation.  E.g. 1.1:number, and true:bool.  No escaped chars necessary.  Only datasources will have complex types and I'm guessing no one is going to do URL editing of those.
Machine interaction use-case:
Within ores (and revscoring), a cache of datasources/features is a single level dict with keys that are necessarily strings and values that are almost always trivially JSON-able (excluding rare circumstances that are totally avoidable, see https://github.com/wiki-ai/revscoring/issues/212).  This translates trivially to JSON and back from it.

So I propose a hybrid of the two strategies.  ?cache=<some json> and (datasource|feature).<name>=<some json> will work as expected.  On the back-end, cache will take precedence in the case of a naming collision.

Ok, updated the pull.

I don't have any strong preferences right now.

Close?

Close!


Update statistics.json

Changed timezone as posix is not available for all. Added regex to restrict to abbrev that are 3 char (normal timezones) and removed posix as not everyone has it. Fix for  https://github.com/adriankumpf/teslamate/issues/1467

Perhaps you should allow also allow 4 letters:
teslamate=# select abbrev,name from pg_timezone_names where abbrev ~ '^[a-zA-Z]{4}$' and name not like 'posix%' order by 2;
 abbrev |         name
--------+-----------------------
 SAST   | Africa/Johannesburg
 SAST   | Africa/Maseru
 SAST   | Africa/Mbabane
 AKDT   | America/Anchorage
 AKDT   | America/Juneau
 AKDT   | America/Metlakatla
 AKDT   | America/Nome
 AKDT   | America/Sitka
 AKDT   | America/Yakutat
 AEDT   | Antarctica/Macquarie
 NZDT   | Antarctica/McMurdo
 NZDT   | Antarctica/South_Pole
 WITA   | Asia/Makassar
 WITA   | Asia/Ujung_Pandang
 AEDT   | Australia/ACT
 ACDT   | Australia/Adelaide
 AEST   | Australia/Brisbane
 ACDT   | Australia/Broken_Hill
 AEDT   | Australia/Canberra
 AEDT   | Australia/Currie
 ACST   | Australia/Darwin
 AEDT   | Australia/Hobart
 AEST   | Australia/Lindeman
 AEDT   | Australia/Melbourne
 ACST   | Australia/North
 AEDT   | Australia/NSW
 AWST   | Australia/Perth
 AEST   | Australia/Queensland
 ACDT   | Australia/South
 AEDT   | Australia/Sydney
 AEDT   | Australia/Tasmania
 AEDT   | Australia/Victoria
 AWST   | Australia/West
 ACDT   | Australia/Yancowinna
 NZDT   | NZ
 NZDT   | Pacific/Auckland
 ChST   | Pacific/Guam
 ChST   | Pacific/Saipan
 AKDT   | SystemV/YST9YDT
 AKDT   | US/Alaska
(40 rows)

Have i mentioned I hate timezone differences? Every DB does it different and none are consistent lol.

Yeah, we should get rid of timezones... :-)


Update cri-tools version

Added new exec tests to cri-tools. Pull in updated cri-tools master
to run tests with cri-o.
Signed-off-by: umohnani8<EMAIL_ADDRESS>

LGTM

/test all

LGTM

Passes test.  Merging.


Incorrect graph labeling

When RPS number is too small (<1), it displays m units (which could be mistaken for million — which is obviously too large)

I believe this might be happening because same chart class is reused between CPU usage (thus m is millicores) and RPS

Coroot uses "m" for milli and "M" for mega, which is a common convention in various systems and tools

If you agree, I could submit a PR :)


[firebase-core] configure fails with: Bad state: expecting only one entry for dependency

Bug report
Describe the bug
Flutterfire configure fails
Steps to reproduce
Steps to reproduce the behavior:
Follow https://firebase.flutter.dev/docs/overview/
run 'flutterfire configure' inside the root of the flutter project
Expected behavior
configuration happens
###Log
Unhandled exception:
Bad state: expecting only one entry for dependency
#0 new DependencyReference.fromJson (package:pubspec/src/dependency.dart:19:9)
#1 new PubSpec.fromJson. (package:pubspec/src/pubspec.dart:103:68)
#2 JsonParser.mapValues. (package:pubspec/src/json_utils.dart:113:45)
#3 MapMixin.forEach (dart:collection/maps.dart:123:13)
#4 JsonParser.mapValues (package:pubspec/src/json_utils.dart:112:7)
#5 new PubSpec.fromJson (package:pubspec/src/pubspec.dart:103:15)
#6 PubSpec.loadFile (package:pubspec/src/pubspec.dart:121:15)
#7 Package.load (package:flutterfire_cli/src/common/package.dart:54:21)
#8 FlutterApp.load (package:flutterfire_cli/src/flutter_app.dart:39:21)
#9 main (file:///C:/Users/arisg/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutterfire_cli-0.1.1+2/bin/flutterfire.dart:33:24)
Unhandled exception:
Bad state: expecting only one entry for dependency
#0 new DependencyReference.fromJson (package:pubspec/src/dependency.dart:19:9)
#1 new PubSpec.fromJson. (package:pubspec/src/pubspec.dart:103:68)
#2 JsonParser.mapValues. (package:pubspec/src/json_utils.dart:113:45)
#3 MapMixin.forEach (dart:collection/maps.dart:123:13)
#4 JsonParser.mapValues (package:pubspec/src/json_utils.dart:112:7)
#5 new PubSpec.fromJson (package:pubspec/src/pubspec.dart:103:15)
#6 PubSpec.loadFile (package:pubspec/src/pubspec.dart:121:15)
#7 Package.load (package:flutterfire_cli/src/common/package.dart:54:21)
#8 FlutterApp.load (package:flutterfire_cli/src/flutter_app.dart:39:21)
#9 main (file:///C:/Users/arisg/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutterfire_cli-0.1.1+2/bin/flutterfire.dart:33:24)
Additional context
Add any other context about the problem here.

Same issue happening here. @arisAlexis were you able to resolve it?

no unfortunately, I am waiting for some help from the team here

This was an underlying issue with the pubspec library which I believe has been fixed - so I've bumped the dependency version and I'll ship a new CLI later today.


fix mysql test feature

Related to an issue in the singer-io tap-mysql repo https://github.com/singer-io/tap-mysql/issues/154. I confirmed that the config test command fails even with valid configs set.
If I set a default selection criteria and metadata then all is good. I feel like this is a bad idea since it auto selects everything and discovery might be slow. I tried defaulting to !*.* selection so defaulted to nothing but that fails config test still.
What exactly is the config test command running? Should we have a way to disable that config test command block for certain plugin pages?
@edgarrmondragon @tayloramurphy @sbalnojan what do you all think?

@pnadolny13 this seems reasonable. I would just recommend putting some warnings / alerts in the documentation for this change too.

@tayloramurphy yeah that sounds good. I actually figured out that we dont need selection criteria, just the replication-method metadata. I'll still add a note that its defaulting to FULL_TABLE replication now.

What exactly is the config test command running? Should we have a way to disable that config test command block for certain plugin pages?

@pnadolny13 It invokes the tap, full with discovery, etc. It then exits as soon as it sees the first RECORD message.
Otherwise +1 to Taylor's comment above.

@rwfeather @edgarrmondragon @cjohnhanson do any of you know whats up with the failing build here? I get the same thing locally and couldnt figure out where its coming from. I confirmed that not using the star allowed it to build. I wonder if something with gridsome/the graphql package hates that syntax 🤔 .

@rwfeather @edgarrmondragon @cjohnhanson do any of you know whats up with the failing build here? I get the same thing locally and couldnt figure out where its coming from. I confirmed that not using the star allowed it to build. I wonder if something with gridsome/the graphql package hates that syntax 🤔 .

@pnadolny13 Yeah, the star is causing the generated graphql to break. I don't think the metadata is used to render the plugin pages, so wdyt about just overriding the value of metadata that is passed to make it null or a JSON string. We can then create an issue to correctly process the metadata if we want to render it in the future.

@edgarrmondragon thanks for that! I dont fully understand how that works but it fixed the problem and I trust you 😄 . I'm going to merge this.


To get current UV use UPAKLoader instead of FullSelfer

While analyzing TeamAddMember's slowness it seems that it sometimes spends time LoadUsering the logged-in user. Hopefully UPAKLoader is faster, just a guess. This patch switches uses of GetFullSelfer to UPAKLoader (via G.GetMeUV()) in the teams and ephemeral packages.
Later on we could make G.GetMeUV() faster by storing UV on ActiveDevice.

Yeah the other uses seem reasonable
go/service/main.go
466:            if err := d.G().GetFullSelfer().Update(context.Background(), self); err != nil {

go/libkb/globals.go
563:func (g *GlobalContext) GetFullSelfer() FullSelfer {
896:    g.GetFullSelfer().OnLogin()
1048:   g.GetFullSelfer().HandleUserChanged(u)

go/libkb/full_self_cacher.go
274:    err = g.GetFullSelfer().WithSelf(ctx, func(u *User) error {

go/libkb/upak_loader.go
296:                    if fs := g.GetFullSelfer(); fs != nil && arg.self {

go/engine/device_history.go
66:     err := m.G().GetFullSelfer().WithUser(arg, func(u *libkb.User) error {

go/engine/list_tracking.go
71:     err = m.G().GetFullSelfer().WithUser(arg, func(user *libkb.User) error {

go/engine/list_trackers.go
101:    err = m.G().GetFullSelfer().WithUser(arg, func(user *libkb.User) error {

go/libkb/status.go
61:     err = g.GetFullSelfer().WithSelf(m.Ctx(), func(me *User) error {

Ignoring circle since this isn't a protocol change.


integration/spanner: expand the add/drop integration test

This brings this test closer in line with the upstream test.

@a8m sorry I had just rebased this onto #1220, just  added your suggestion.


added antispam and reformatted

Hey @Naman23-coder, thanks for the valuable contribution. The lint workflow is failing so please make sure you ran pipenv run lint before committing. Have you tested this locally?

@aaryanrr will do tomorrow


Connection to MQTT without TLS not working

It seems that paho.mqtt.client uses TLS if any tls parameter has been set via tls_set. Changing the connection to:
            try:
                self.username_pw_set(
                    self.cfg.MQTTBroker.username,
                    self.cfg.MQTTBroker.password)

                # Use TLS at all?
                # As soon as tls_set is called, paho.mqtt.client assumes
                # we have an encrypred connection., it seems.
                if not self.cfg.MQTTBroker.insecure:
                    # no client certificate needed
                    if len(self.cfg.MQTTBroker.clientcertfile) and \
                       len(self.cfg.MQTTBroker.clientkeyfile):
                        self.tls_set(certfile=self.cfg.MQTTBroker.clientcertfile,
                                     keyfile=self.cfg.MQTTBroker.clientkeyfile,
                                     cert_reqs=ssl.CERT_REQUIRED)
                    else:
                        # some users reported connection problems due to this call
                        # but in my environmet this is a MUST
                        self.tls_set(cert_reqs=ssl.CERT_NONE)

                self.connect(
                    self.cfg.MQTTBroker.host,
                    self.cfg.MQTTBroker.port)

works for me with HA's internal MQTT broker on the non-secured port. (Yes, this is insecure, of course, and you should really trust your network to do this).
However, this change would break connections for existing TLS configurations that have insecure set to true, which seems to be the default configuration (and has no consequences at all currently). To avoid this, one could add a new flag for this option.

The problem was I didn't see that port 1883 has to be used for non-ssl and port 8883 has to be used for ssl connections.
I double checked bugfix with mosquitto docker installation and with most recent HASS OS + mosquitto add-on.


New package: Microsoft.ODBCDriver17forSQL version <IP_ADDRESS>

Pull request has been created with komac v2.0.0 :rocket:

Resolve: #133793

Microsoft Reviewers: Open in CodeFlow

Manifest Error: Invalid field value. [InstallerType]


offset_of! consumes too much stack space in dev build

offset_of! (and probably the other macros in this crate) consumes too much stack space in dev build, especially when the type is big.  It's probably because it's declaring a (uninitialized) variable of the type.  It's optimized out in the release build.
It affects my workflow in developing an OS in Rust.

Hm, that is unfortunate. But also I do not think there currently is a way to do offset_of! in Rust without allocating the relevant memory somewhere (and relying on the optimizer to remove it again). We have to avoid this UB:

Dereferencing (using the * operator on) a dangling or unaligned raw pointer.

If you are okay with using nightly Rust, an option might be to run offset_of! in a const -- then the stack space is used during CTFE and should not impact runtime code.

Maybe we could create a single MaybeUninit::<[u128;N]> as a static variable somewhere, with some suitably large 'N', and use it for all offset_of-calculations, regardless of type? The argument is that a *const MaybeUninit::<[u128;128]> surely can be casted safely to a *const MaybeUninit::<(u32,u32)>, or whatever type the user tried to get the offset for? This would save stack space, but waste static object space.
Example code (which is accepted by Miri):
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4045ba8325b43f0ffd271f1f3119b13e
Only problem is that it'd be hard to determine how large this buffer needs to be. Might be an insurmountable problem.


API exception pattern docs do not mention PROPAGATE_EXCEPTIONS

http://flask.pocoo.org/docs/0.11/patterns/apierrors/
...discusses a pattern for defining and catching custom exceptions. However, this pattern does not work unless PROPAGATE_EXCEPTIONS is set, because the exception gets eaten and turned into a 500.
Confusingly it will work in DEBUG=True mode then break in production.
Can the docs be updated? Or am I missing something?

It sounds like you forgot to register an error handler: http://flask.pocoo.org/docs/0.11/patterns/apierrors/#registering-an-error-handler

At that point views can raise that error, but it would immediately result in an internal server error. The reason for this is that there is no handler registered for this error class.

I just tried with this:
from flask import jsonify
from flask import Flask
app = Flask(__name__)

class InvalidUsage(Exception):
    status_code = 400

    def __init__(self, message, status_code=None, payload=None):
        Exception.__init__(self)
        self.message = message
        if status_code is not None:
            self.status_code = status_code
        self.payload = payload

    def to_dict(self):
        rv = dict(self.payload or ())
        rv['message'] = self.message
        return rv

@app.errorhandler(InvalidUsage)
def handle_invalid_usage(error):
    response = jsonify(error.to_dict())
    response.status_code = error.status_code
    return response

@app.route('/foo')
def get_foo():
    raise InvalidUsage('This view is gone')

It works as expected:
$ curl localhost:5000/foo
{
  "message": "This view is gone"
}
$ curl -I localhost:5000/foo
HTTP/1.0 400 BAD REQUEST
Content-Type: application/json
Content-Length: 37
Server: Werkzeug/0.11.11 Python/2.7.12
Date: Mon, 26 Dec 2016 21:13:35 GMT

No, that's not correct. I have done exactly that, registered an error handler, and it specifically doesn't work unless PROPAGATE_EXCEPTIONS is set, which is not clearly documented at the link you cite - which is exactly the same link I gave.

This appears to be something inside flask-restful, not flask itself. I thought I'd located code in flask/werkzeug that was causing it but have retested and proven myself wrong. Sorry for the noise, this can be closed.


Added note about rclcpp/qos_event.hpp removal in Jazzy

Related with this PR https://github.com/ros2/rclcpp/pull/2413
Added note about rclcpp/qos_event.hpp removal in Jazzy

@clalancette rebase done.


update the pm2 commands to run without logging

In the directory "global settigs" update the restarting commands with the following additional option:
pm2 restart mosquitto -o "/dev/null" -e "/dev/null"
pm2 restart node-red -o "/dev/null" -e "/dev/null"
pm2 restart meta -o "/dev/null" -e "/dev/null"
This will run the above processes in pm2 without logging
Refer to the update by JAC:
https://github.com/jac459/meta/commit/a9e0a98330b269800635003b0ad160ebb160a41c

Solved with version 5, Mar 23, 2022

Solved with version 5, Mar 23, 2022


'Allele' vs 'Variant'

What is the difference (if there is one), and what is our model actually about?

Straw man defs:
allele: one of a set of genomic features that exist at a particular locus.
sequence variant (aka variant): an allele that varies in its sequence from what is considered the reference allele at that locus. (https://biolink.github.io/biolink-model/docs/SequenceVariant.html)

However, a "variant" may affect more than 1 allele (e.g. fusion event). This either requires the specification of "allele' as physically continuous sequence (of genomic features), where the "variant allele" may compare to a number of reference alleles, OR you decompose variants to all altered alleles and introduce edges between them. So following a graph model, and then what we think of as "variant" will then be 1-N(2?) alteration(s) of the reference allele(s).

Coming back to this and thinking that this is an important and foundational issue that should be addressed across the VA and VR groups, so we are using terms like this consistently, and can document them clearly for users of our models. Just making a note here and tagging folks so it doesn't fall off our radar.
@larrybabb @javild @mbaudis

Stating the obvious here, but this seems like a critical issue for cross-talk with variant representation sub-group of GKS.


#1: Adds docker and lua language servers

Looks awesome! Ship it! 🚀

Actually, do we want to worry about running these as non-root users?

Actually, do we want to worry about running these as non-root users?

Since these are local development containers and not actually being run in a production environment I think this is fine for now - but you're welcome to open a PR and make the changes.


Mac support

Hello,
Some of our users are running Mac instead of ubuntu. Can they use it ?
Thanks

Hello, this is not really a dev tool. Also this process has to be running in the same virtual machine Docker engine is running on. I don't think Docker for Mac lets you do that for now. If it lets you install plugins and if Mac supports CIFS mounts then it could work, but that is not a use case we support yet.


UI problem when trying to edit a collapsed collection

Describe the bug
When clicking the "Edit" icon for a collection that is in a collapsed state, the Edit input is not visible, and there is no way to bring it back.
Probably need to do a check for collapsed state and open it up before switching to edit mode

Fixed by 95a1a95
Released in v1.9.1


search for song using isrc

Title
search for song using isrc
Description
search for song using International Standard Recording Code (ISRC)
How Has This Been Tested?
pytest, flake8, mypy
Types of Changes

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

Checklist

[x] My code follows the code style of this project
[x] I have updated the documentation accordingly
[x] I have read the CONTRIBUTING document
[x] I have read the  CORE VALUES document
[x] All new and existing tests passed

Maybe include this feature in the docs/readme ?

Maybe include this feature in the docs/readme ?

Docs folder is more of a placeholder than real documentation 😅.  Also project structure changed quite a lot since your last PR

Docs folder is more of a placeholder than real documentation 😅. Also project structure changed quite a lot since your last PR

My apologies for the confusion, I was thinking that this was adding the option to do spotdl [isrc].
On the topic, would this be possible?

My apologies for the confusion, I was thinking that this was adding the option to do spotdl [isrc].
On the topic, would this be possible?

I don't think so, spotify does not allows us to search for songs using isrc


Bug: results on getX() not equal

At the doc: https://codeigniter4.github.io/userguide/libraries/time.html#viewing-differences

Describe the bug
The result is not equal,
one is positive value
and the other is negative value
echo $diff->getSeconds();
// return: -220924800

echo $diff->seconds;
// return: 220924800

CodeIgniter 4 version
v4.1.1

I think the property value is a bug. The user guide is correct.
See #4453


IntelliJ plugin for syncing JCR content

imagine RMC on file/folder, then "GAP / Sync"
which will run sync with :aem:site.demo:sync -Pfilter.roots=[path]
reflects other plugin functionalities, however GAP offers much more than content downloading but also also content normalization and file transferring via CRX package (much faster);
also plugin will not need updates as of it will reuse GAP / Gradle build; will not implement any features by itself; will work as a wrapper for Gradle

This plugin might open new ways for other features

closing as stale


Missing Step for Exposing Services on Minikube

The following step does not work:
Now we can test that the app is exposed outside of the cluster using curl, the IP address of the Node and the externally exposed port:
curl http://"$(minikube ip):$NODE_PORT"
Steps are in the following places:

https://kubernetes.io/docs/tutorials/kubernetes-basics/scale/scale-intro/ (Load Balancing section)
https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/ (Create a new Service section)

Per the docs Minikube requires that Services of type NodePort be exposed with minikube service <service-name> --url. Recommend adding a step to run this Minikube command in a separate terminal instance, copy the URL from this command, and curl that URL.

It depends on the minikube driver, but you are right that the step is required if using Docker Desktop (without an IP)
https://docs.docker.com/desktop/networking/#per-container-ip-addressing-is-not-possible

/retitle Explain extra step for exposing Services locally on minikube
If some minikube drivers need it, we should mention that.
/kind bug
/language en
/priority backlog
/triage accepted

@sftim, should we repeat the instructions shown in the existing minikube documentation or just add a link to said document? I think I read somewhere that we should avoid repeating documentation. Or should we rewrite the minikube commands to align them to the tutorial? Thanks!
@EdCarney @afbjorklund

Nothing for me here, seems to be documented. This tutorial is outdated, as far as I know.
https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-service-with-tunnel

@sftim, should we repeat the instructions shown in the existing minikube documentation or just add a link to said document? I think I read somewhere that we should avoid repeating documentation. Or should we rewrite the minikube commands to align them to the tutorial?

Any of those is fine. I do not have an opinion on which is best.

Help with a fix is very welcome. If you'd like to help but aren't sure how: please ask in #sig-docs on the Kubernetes Slack workspace. If you're not already a member of that workspace, you can visit https://slack.k8s.io/ for an invitation.

/assign

A very nice note has already been added in the live documentation as can be seen here. Using a Service to Expose Your App
I will create a PR to add a similar note to Running Multiple Instances of Your App
This should be sufficient in my opinion.


Client in the objectCreated handler, getting a null AttachedBehavior

Version Number and Operating System(s):
03/10/2018-19.53.38,04 Windows, Unity Editor 2019.2.21f1
Expected behavior:
objectCreated should be called after the AttachedBehaviour's GameObject is Setup / Passed Start() / NetworkStart(), if not, add a callback that is at this point and rename ObjectCreated - it may just be me but I assumed this should be done by the time this is called, maybe it is a naming issue. Even more ideal would be to have something in the objectCreated callback where you could access the GO without having to typecast as this would be useful!
Actual behavior:
For the Client, I found NetworkStart is called after the objectCreated callback, leading to the AttachedBehaviour to be null.
Steps to reproduce:

Attach a Host, Make a NetworkObject (e.g. NO with Behaviour NOBehaviour)
Add Debug to the NOBehaviour NetworkStart method if(NetworkBehaviour is NOBehaviour) that outputs the AttachedBehaviour to Debug
Setup callback for objectCreated on Client
Attach a Client
In the callback, using MainThread the if(NetworkBehaviour is NOBehaviour) passes but the AttachedBahaviour is null.
Note, the Debug in the NOBehaviour NetworkStart is called after
(sorry for all the bugs)

[Optional] Discord Username:
Gwom

Info from @phalasz is that the objectCreated listener is also used for the NetworkBind function, so AttachedBahaviour may not be there already. Would it be possible to ensure when the NetworkBind is added to the listeners it is put at the front, something like make a new listener, add NetworkBind, and the old listeners, hopefully ensuring that the users callbacks happen after NetworkBind does.
Either that, or add a different named listener for the NetworkBind to use, that happens before the objectCreated listener
Failing any of these, maybe re-name the listener to "objectCreating" and update the documents to state that the AttachedBehaviour maybe null if the NetworkBind has not happened, and to use the NetworkStart if you need to ensure it is a GameObject.


Update lazy-load-react.md

I think these imports should be requires

It's import on purpose as dynamic imports (returns a Promise) are supported now.

OK thanks for response, I did not know about that.


SA Lunamedia Bidder Adapter: fix markdown

@MartianTribe you've added a needs work label. What is meant?


Flatten Docs Readme Writes

It is not possible to maintain a separate overview page for reach moniker while maintaining identical URLS on docs.ms.com.
Example for JS:
Identity Readme GA: https://docs.microsoft.com/en-us/javascript/api/overview/azure/identity-readme?view=azure-node-latest
Identity Readme Preview: https://docs.microsoft.com/en-us/javascript/api/overview/azure/identity-readme?view=azure-node-preview
As you can see, they exist at the same destination URL, with the only differentiator being the view suffix.
The way we currently write the readmes would support that if it was possible on the docs publishing side, but for .NET it's currently an impossibility. Currently running down alternate proposals from the docs devs.
This PR takes advantage of suffix functionality so that we can write both preview and GA readmes to the same folder.

@chidozieononiwu  thank you for approving sir.
I'm going to hold off on merging this PR until release week is done. I'm pretty confident that it's g2g, but I'd feel sheepish as hell if suddenly releases go red.
I'll manually correct the files written to the doc repo this week, then merge this.

@chidozieononiwu  thank you for approving sir.
I'm going to hold off on merging this PR until release week is done. I'm pretty confident that it's g2g, but I'd feel sheepish as hell if suddenly releases go red.
I'll manually correct the files written to the doc repo this week, then merge this.


Convert alert, confirm and prompt dialogs to new design

All dialogs (alert, confirm and prompt) should support the 3 states: "Info", "Warning", "Error" as shown in the designs:
https://mesosphere.invisionapp.com/share/6P56VR1XZ#/screens/119296369
cc @leemunroe @cleverroffey could you please send us the latest Sketch version for this?

Do we really need all those states for every type of dialog? Isn't the alert dialog meant to inform about errors, the confirm dialog to confirm risky actions (warning) and prompt dialog to ask for informations?
/cc @philipnrmn @aldipower @Poltergeist

Nevermind. There are cases, in which dialogs do need different states (e.g. marathon ui version dialog).

The new design provides a dialog title as well as a state. As we don't have that content yet, we need to define a title and state for every dialog. You find a list of all dialogs including a title, state and message proposal in the following. Any feedback is highly appreciated.
Application Scale Error (handler: AppPageComponent.jsx -> onScaleAppError)
confirm (current message: "There is a deployment in progress that changes ${appId}. If you want to stop this deployment and force a new one to scale it, press the 'Scale forcefully' button.")
Title: Danger: ${appId} Is Currently Deploying
Message: In order to scale to a new number of instances, the current deployment will have to be forcefully stopped, and a new one started. Please be cautious, as this could result in unwanted states.
Button: Stop Current Deployment and Scale
State: Danger
alert (current message: "Not scaling: ${Messages.UNAUTHORIZED}")
Title: Error: Unauthorized Access
Message: Could not scale application.
State: Danger
alert (current message: "Not scaling: ${Messages.FORBIDDEN}")
Title: Error: Access Forbidden
Message: Could not scale application.
State: Danger
alert (current message: "Not scaling: ${errorMessage.message || errorMessage}")
Title: Error
Message: ${errorMessage.message || errorMessage}
State: Danger
Application Restart Error (handler: AppPageComponent.jsx -> onRestartAppError)
alert (current message: "Error restarting app: ${Messages.UNAUTHORIZED}")
Title: Error: Unauthorized Access
Message: Could not restart application.
State: Danger
alert (current message: "Error restarting app: ${Messages.FORBIDDEN}")
Title: Error: Access Forbidden
Message: Could not restart application.
State: Danger
alert (current message: "Error restarting app: ${errorMessage.message || errorMessage}")
Title: Error
Message: ${errorMessage.message || errorMessage}
State: Danger
Application Delete Error (handler: AppPageComponent.jsx -> onDeleteAppError)
alert (current message:  "Error destroying app: ${Messages.UNAUTHORIZED}")
Title: Error: Unauthorized Access
Message: Could not delete application.
State: Danger
alert (current message: "Error destroying app: ${Messages.FORBIDDEN}")
Title: Error: Access Forbidden
Message: Could not delete application.

 If you want to stop any current deployment of the app and force a new one to kill the task and scale it, press the 'Kill and scale forcefully' button.")
Title: Danger: ${appId} Is Currently Deploying
Message: In order to kill the tasks and scale to a new number of instances, the current deployment will have to be forcefully stopped, and a new one started. Please be cautious, as this could result in unwanted states.
Button: Stop Current Deployment and Scale
State: Danger
alert (current message: "Not scaling: ${Messages.UNAUTHORIZED}")
Title: Error: Unauthorized Access
Message: Could not scale application.
State: Danger
alert (current message: "Not scaling: ${Messages.FORBIDDEN}")
Title: Error: Access Forbidden
Message: Could not restart application.
State: Danger
alert (current message: "Not scaling: ${errorMessage.message || errorMessage")
Title: Error
Message: ${errorMessage.message || errorMessage}
State: Danger
Reset Delay Success (handler: AppPageComponent.jsx -> onResetDelaySuccess)
alert (current message: "Delay reset successfully")
Title: Application Delay
Message: Reset successful.
State: Info
Reset Delay Error (handler: AppPageComponent.jsx -> onResetDelayError)
alert (current message: "Error resetting delay on app: ${Messages.UNAUTHORIZED}")
Title: Error: Unauthorized Access
Message: Could not scale application.
State: Danger
alert (current message: "Error resetting delay on app: ${Messages.FORBIDDEN}")
Title: Error: Access Forbidden
Message: Could not restart application.
State: Danger
alert (current message: "Error resetting delay on app: ${errorMessage.message || errorMessage}")
Title: Error
Message: ${errorMessage.message || errorMessage}
State: Danger
Scale Application (handler: AppPageControlsComponent.jsx -> handleScaleApp)
promt (current message: "Scale to how many instances?")
Title: Scale Application
Message: How many instances would you like to scale to?
Button: Scale Application
State: Info
Suspend Application (handler: AppPageControlsComponent.jsx -> handleSuspendApp)
confirm (current message: "Suspend app by scaling to 0 instances?")
Title: Suspend Application
Message: Do you want to suspend ${appId} by scaling to 0 instances?
Button: Suspend Application
State: Info
Restart Application (handler: AppPageControlsComponent.jsx -> handleRestartApp)
confirm (current message: "Restart app '${appId}'?")
Title: Restart Application
Message: Do you want to restart ${appId}?
Button: Restart Application
State: Info
Destroy Application (handler: AppPageControlsComponent.jsx -> handleDestroyApp)
confirm (current message: "Destroy app '${appId}'? This is irreversible."
 This is irreversible.
Button: Destroy Application
State: Danger
Apply Application Settings (handler: AppVersionListComponent.jsx -> onAppApplySettingsError)
alert (current message: "Could not update to chosen version: ${errorMessage.message || errorMessage}")
Title: Error: Could Not Update Application Configuration
Message: Could not update to chosen version: ${errorMessage.message || errorMessage}
State: Danger
Revert Deployment (handler: DeploymentComponent.jsx -> handleRevertDeployment)
confirm (current message: "Rollback deployment of applications: '${model.affectedAppsString}'? Destroying this deployment will create and start a new deployment to revert the affected app to its previous version.")
Title: Warning: You're About To Rollback The ${model.affectedAppsString} Deployment
Message: This will stop the current deployment and start a new deployment to revert the affected applications to its previous version.
Button: Rollback Deployment
State: Warning
Stop Deployment (handler: DeploymentComponent.jsx -> handleStopDeployment)
confirm (current message: "Stop deployment of applications: '${model.affectedAppsString}'? This will stop the deployment immediately and leave it in the current state.")
Title: Warning: You're About To Stop The ${model.affectedAppsString} Deployment
Message: This will stop the deployment immediately and leave the applications in their current state.
Button: Stop Deployment
State: Warning
Marathon UI Version Info (handler: Marathon.jsx ->  bindKeyboardShortcuts)
alert (current message: "The UI version is ${config.version}")
Title: Marathon UI
Message: You're running version ${config.version}.
State: Info
Edit Application Error  (handler: EditAppModalComponent.jsx -> onRequestAppVersionError)
alert (current message: "Could not fetch app '${props.appId}' version for editing: ${props.appVersion}")
Title: Error: Could Not Fetch Requested ${props.appId} Configuration
Message: Could not fetch version ${props.appVersion}.
State: Danger
/cc @leemunroe @cleverroffey @philipnrmn @aldipower @Poltergeist @pierlo-upitup


Add fire incident report tool

This PR add support for accessing fire incident report from state regulators.
Current issues

The vegetation geodata set gives an error. (See Issue #1140)
SCE and SDGE have invalid report formats for years 2020 and 2016, respectively.  These will have to be handled specially (if at all).

Code changes

[x] Add tools/fire_report.py

Documentation changes

[x] Add /Tools/Fire_report

Test and Validation Notes

[x] Add tools/autotest/test_fire_report.{csv,glm}

@xiefuhong, the following command results in an unexpected warning:
$ gridlabd fire_report -y=2021 -u=SCE -s=CA | gridlabd geodata merge -D vegetation > /tmp/test.csv
WARNING [geodata/vegetation]: field of 'latitude' or 'longitude' is missing, use 'nan' for vegetation data.

@xiefuhong, running as separate commands yields an error:
$ gridlabd fire_report -y=2021 -u=SCE -s=CA >/tmp/test.csv
$ gridlabd geodata merge -D vegetation /tmp/test.csv
WARNING [geodata/vegetation]: field of 'latitude' or 'longitude' is missing, use 'nan' for vegetation data.
ERROR [geodata/vegetation]: buffer is not large enough

Lat/lon is missing in some records when running gridlabd fire_report -y=2021 -u=SCE -s=CA | gridlabd geodata merge -D vegetation > /tmp/test.csv, see line 27, 74 and 86 of the 2021 SCE fire report. This indicated warning message can be removed.

gridlabd geodata merge -D vegetation /tmp/test.csv

This error occurs occasionally and it comes from line 354 of geodata_vegetation.py.
vegetation_data[tifname] = numpy.array(Image.open(dstname))
This error could be avoid by asking geodata_vegetation.py to delete all exiting vegetation image in the cache directory and redownload them if needed.


feature: add an option to skip execute the pipe

the flushPipeline() function executes the pipe then clears it, I think an optional boolean parameter $execute is useful (default to true). While this parameter is set to false, flushPipeline simply clears the pipe without actually sending it to redis. This is useful while reusing a pipeline after execute().  (Call this method with $execute set to false to clear the pipe in case the previous pipeline execution is not clear).

Implemented with commit 559c509. It's in the unstable branch right now, but it will be merged into master soon and will be part of Predis v0.7.0. Thanks.


Headless Basejump migration

Check out the RFC for more info: https://github.com/usebasejump/basejump/issues/37

Would it be okay to contribute to this PR? I added a password reset flow to my app and would love to contribute back if that's cool. This looks really great!

@jamesthesken of course, I'd love that! This PR is in a bit of a state right now while I get things organized, but I think it's far enough along now it shouldn't be too bad.  I'm hoping to wrap up the API changes this week, then get back to components after that's merged 😬

@jamesthesken of course, I'd love that! This PR is in a bit of a state right now while I get things organized, but I think it's far enough along now it shouldn't be too bad. I'm hoping to wrap up the API changes this week, then get back to components after that's merged 😬

Awesome! The headless version will be great. My basejump app has a React Native version as well, which primarily uses the hooks you created for a lot of functionality.

Just heads up to anyone following along - I've moved the UI components to https://github.com/usebasejump/basejump-js
Needed to do this to separate out the versioning releases for the deno components vs the react ones.  The deno components are going to be versioned in lockstep with the supabase schemas so that people can be confident they're intended to be deployed together (in case the schemas change in breaking ways in the future).
This repo is now going to be the migrations and functions only - effectively the headless parts of Basejump.

I was implementing this whole thing myself in my saas app and found this goldmine !
The headless approach makes the whole thing a lot more approachable.
But I have a few questions :

Do you plan to continue working on this ? (This is obviously a lot of work, and if you're willing to continue I may help !)
How are schemas supposed to work regarding multi tenancy ? basejump schema for accounts and billing, and public schema for the rest ? How would access to content from a particular tenant be restricted ?
I wonder what the value of NEXT_PUBLIC_BASEJUMP_INVITATION_URL_TEMPLATE should look like exactly, a URL with {TOKEN} but not sure how

@jide Thanks for reaching out.

I definitely plan on continuing to work on this - I'm actually using it in a few projects right now that are going pretty well so it's taken me away from it a little. I'm hoping to get it wrapped up here shortly for the first headless version.
That's right, basejump schema is separate from public, that way basejump can be upgraded over time and it hopefully makes it clear that changes to basejump's actual models aren't recommended.  I handle multitenancy in my apps by adding an account_id to each table, and then using RLS rules to restrict access to only those users using Basejump's auth methods.  Here's an example in the new docs: https://basejump-site.vercel.app/docs/example-schema
That env var is used for the react component library, it's the URL of your invitation landing page.  /invitation?token={TOKEN} for example would generate invitation links that look like that for you.  It's basically the page where you've dropped the accept invitation component (or built your own)

These new docs are amazing 😍
Glad to hear you plan to continue ! Do you feel the current version is useable in a project ? Or are there some shortcomings I should know about ? In particular in the SQL part.
Ok thanks for the explanation for the multi tenancy approach, the docs make it pretty clear. Love the simplicity.
About the invite link I ended up figuring it out myself, but I could not finish the invite process in the next app example, but I think it's not finished yet. I'll dig a little more though.
Thank you for the amazing work !

Thanks!  The SQL parts are stable - I have a few tweaks I might do, but they shouldn't be breaking.  I mostly want to make it easier to handle accounts that opt not to have slugs automatically generated.  I'll probably just copy the uuid into the slug field so that it can still be searched a bit simpler in those cases.  Otherwise, I've been using it in production for a while now.
The React component library is what's holding things up.  I based it on the Supabase Auth library, but they seem to be leaning away from that lately so I need to take another look at it.
I just recommend you write tests using the Test Helpers I made to make sure your auth is as expected.  RLS is great, but can be a bit of a foot gun if you're not careful: https://database.dev/basejump/supabase_test_helpers


Custom fonts

Please add custom fonts

@codestergit To be clear, are you still accepting contributions to this project?? If so would a PR that fixes this be in scope to be merged?

@fulldecent Yes I accept the PR. But custom font is out of scope. You can customize this alert at your own end. If you want to send PR please send. We can discuss if it adds something to this project.
Thanks for your time


All works except querying for specific message.

This works:
$aMessage = $oFolder->query()->limit(10, 2)->get();

This refuses to work:
$aMessage = $oFolder->query()->text("whatever")->get();
$aMessage = $oFolder->query()->Subject("whatever")->get();
$aMessage = $oFolder->query()->Subject("whatever")->get();
$aMessage = $oFolder->query()->from('example@domain.com')->get();
$aMessage = $oFolder->query()->unseen()->limit(10, 2)->get();

all the time getting empty arrays...
Any help please?
I'm using the "facade approach"
...
use Webklex\IMAP\Facades\Client;
...
$oClient = Client::account('default');
        $oClient->connect();
...

Hi @klukiyan ,
just a basic question before I dive in deepter. Is there an email with the text "whatever" or the subject "whatever" or any unseen emails available? Might sound stupid, but I encountered a simular issue before ;)
Besides that your code looks fine (ecept WhereQuery::Subject() - this should be WhereQuery::subject()) to me.
Best regards

@Webklex
I have it with "Electra" in subject, and yes the folder contains it.
$aMessage = $oFolder->query()->subject('Electra')->limit(10, 2)->get();

empty array...
the querying simply doesn't seem to work. Maybe I should use some different approach instead of Facade?

@Webklex , thank you, with query(null) it wors.
My last concern is about the speed.

With above mentioned php code I'm getting the bodies of the 3 searched messages in 2 seconds (the inbox is really huge, it is on slow distant exchange server).
When using your package, code is simpler and shorter, but I get the response in 6-8 seconds.
I've tried many times, the result is the same. I've tried to make the query as short as possible, it's still considerably slower.
Can you give me a hint what I could optimize to get flawless experience for my users.
This is the shortes option I could get:

//this gets me into 6-8 seconds.
$oClient->connect();
$aMessage = $oClient->getFolder('INBOX')->query(null)->text('Electra')->get();
foreach ($aMessage as $oMessage) {
    echo $oMessage->getHtmlBody(true);
}

I want to use your package, especially when it comes to working with attachments. But the speed is really a concern. Can you give me a hint how can I make it faster?

If you want to decrease the loading time you could as well fetch bodys and attachments later.
$oFolder->query(null)->setFetchFlags(false) ->setFetchBody(false)->setFetchAttachment(false);

Your mentioned plain php code does'nt fetch all attachments, thats probably why its faster. This library also does some encoding etc which might take a few additional ms. However feel free to create a fork and remove everything you don't need - that's probably the best in order to get the most out of it :)

@Webklex That's a good hint.
Now if I don't fetch the body/flags/attachments and I want to display the body + attachments when I click on the message, how to I query directly that single message please?
Sorry if this question is too silly.

Great
Thank you very much, @Webklex

$oMessage = $oFolder->getMessage($uid = 1);
can't working please answer

@dharmendravirasat that could be caused by a ton of things. Please provide more information and if it isn't related to this issue, please consider to open a new issue.
Best regards


Publish to apt servers

Pre-requisite: #11
Then we can also retire the Jenkinsfile.

Closing as this is moving to another repo.


Fix ja-JP contexts.md layout

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

What article on docs.github.com is affected?
This page: https://docs.github.com/ja/actions/learn-github-actions/contexts#context-availability
What part(s) of the article would you like to see updated?
layout bug

Additional information
No response

PR: https://github.com/github/docs/pull/20027

@bells17 Thanks for opening an issue and linking it to your PR!

Closing this now as I've submitted an internal issue to fix this. See my comment on the PR for more information 💛


Mock Wikidata service

Close #2411
Glad to announce that OpenRefine doesn't depend on any external web service during test now!

Nice! But it looks like PowerMock does not quite work as it should on Windows, according to Appveyor.
In general I think we should avoid PowerMock as much as we can - when possible, refactoring the code to make it more testable might be a better option (but I know it can be quite tricky in many cases).

Weird. I'm using Windows to test and build it, works fine. I'll try to figure out what happened.

@wetneb I couldn't find what happened from the log AppVeyor provided. Is it possible to run AppVeyor build again without a new commit?

Looks like it was a passing failure, the new build passes. Perhaps there is some sort of race condition there. Here is the Appveyor log for the passing build.

Ok, I re-run the build a couple of times and got a green light each time, so I guess we can merge this. If we experience unstable Appveyor builds in the future we might want to revert though (I have observed issues with PowerMock on Appveyor before).

Thanks, seems we do need to avoid using PowerMock if possible.

@afkbrb You'll love JMockit, we did at Ericsson for enforcing consistent structure in blocks after switching from Mockito.


add services for each container

Create service per container in deployment if it's specified on a container level
Finalized same feature for secrets

LGTM, but every time we add to templates, we need to make sure we add to a sample values.yaml that uses the template correctly and an update to README.

There is an example in sample.values.yaml for all of these changes already in the app-1. For the readme - I agree, we need to start writing it properly.


multiple-scattering: should be C_ms X (single+multiphonon)

https://github.com/sns-chops/multiphonon/blob/3b4ea977ffa659d6f1f705e233a640db63f26e6c/multiphonon/ms.py#L11

MS_contrib = \sum {C_ms ^ n  n-scattering terms}
2-scattering: elastic+single-phonon, single-phonon+single-phonon
3-scattering: elastic+elastic+single-phonon, elastic+single-phonon+single-phonon, single-phonon+single-phonon+siingle-phonon,


Drop feature state for kubeadm / kubelet

Remove a feature-state shortcode from https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/ [preview]
It won't be clear to readers what feature is being covered here. The advice in this page is version-specific (especially given the removal of the dockershim); removing this shortcode takes away a detail that might mislead people into thinking the page has not changed recently.
/sig cluster-lifecycle
/sig node

/lgtm

/approve


Provide a way to disable hostname canonicalization

The ability to have multiple canonical hostnames was planned previously, but for sites that don't need to use the websharing-by-username-in-hostname feature, there's no real need to care about canonicalization; resources can just be served from whatever hostname the page was requested from. All that is required is a way to turn off the canonicalization.

Very rough sketch of how to implement this, copied from an ad-hoc patch we have deployed already:
===================================================================
--- Mantissa/xmantissa/publicweb.py	(revision 18024)
+++ Mantissa/xmantissa/publicweb.py	(working copy)
@@ -805,7 +805,7 @@
         action' and 'error' slots in the template accordingly.
         """
         generator = ixmantissa.ISiteURLGenerator(self.store)
-        url = generator.rootURL(IRequest(ctx))
+        url = URL.fromString('/')
         url = url.child('__login__')
         for seg in self.segments:
             url = url.child(seg)
Index: Mantissa/xmantissa/web.py
===================================================================
--- Mantissa/xmantissa/web.py	(revision 18024)
+++ Mantissa/xmantissa/web.py	(working copy)
@@ -148,10 +148,11 @@
             this website is available.
         """
         host = request.getHeader('host') or self.hostname
-        if ':' in host:
-            host = host.split(':', 1)[0]
-        if (host == self.hostname or
-            host.startswith('www.') and host[len('www.'):] == self.hostname):
+        #if ':' in host:
+        #    host = host.split(':', 1)[0]
+        #if (host == self.hostname or
+        #    host.startswith('www.') and host[len('www.'):] == self.hostname):
+        if True:
             return URL(scheme='', netloc='', pathsegs=[''])
         else:
             if request.isSecure():
@@ -365,7 +366,7 @@
         """
         if getattr(self.wrappedResource, 'needsSecure', False):
             request = IRequest(context)
-            url = self.urlGenerator.encryptedRoot()
+            url = self.urlGenerator.encryptedRoot(request.getHeader('Host'))
             if url is not None:
                 for seg in request.prepath:
                     url = url.child(seg)

I think the change to publicweb is not actually needed given the change to SiteConfiguration but this needs to be tested.


latin combining characters config question

I can't get the stbtt_rasterize demo to properly display u with a combining character umlaut ("u\u0308" in c). I have little experience with unicode text shaping, so i assume this is a configuration issue or something else I don't know about. I've tried a few different feature combinations unsuccessfully.
what features do i need to enable for this to work? I have ABVM and CCMP since those seem obvious.

So I assume you are still talking about the same font "win_arial.ttf". I have looked in the font and this is character COMBINING DIAERESIS U+0308. Combining sequences are done usually with the MARK feature  as far as I know but maybe for latin there is a simpler alternative. The issue is that the font doesn't have any rules of positioning or replacement for codepoints U+0075 and U+0308 however their anchors are present in the file. This makes me think that this is meant to be handled by automatic Unicode Normalization and not through any tables. This means that the engine would take \u0075\u0308 and turn it into \u00fc.

After some research I found out that this is simply an issue of Unicode Normalization. It's supposed to work without even specifying any typographical features.  I'm gonna be working on a fix right now.

very cool. can you explain a bit more? what about normalization is needed for this to work? after reading about it, i'm not quite sure.

Yeah so Unicode Normalization takes care of combining characters and also takes care of just cleaning up a Unicode string you can read more on it here: https://www.unicode.org/reports/tr15/
So say I have a string of Arabic with some characters in MEDIAL form and others in FINAL and others as ISOLATED or just Normalized form, the function would turn everything into normalized form.

In normalization if you have a latin alphabet character followed by a combining mark, it will combine them into a new unicode character. It also has to validate that the combining marks are valid. OpenType tables on the other hand work on glyphs and doesn't know anything about unicode characters, it's used to implement more complex font features like ligatures, kerning, cursive scripts, stylistic alternates, etc.

It seems so, but not all valid graphemes that use combining characters can be composed into a single codepoint. Is there something about normalization enforcing ordering that is the missing piece?

if you have discord and you're ok with adding me, i can also message you there since github is inconvenient.

im also confused about the api. why in the stbtt_example do you iterate through the glyph metrics and keep track of pen_x manually? how is this supposed to work with decomposed glyphs? i would expect to get extents and a list of positions / glyph identifiers / dimensions, since not all glyphs are just put at the end of the ltr layout.

This is how every library does it and what do you mean with "this doesn't work with decomposed glyphs" ? If you mean mark placement then this works because marks don't advance, and x_offset and y_offset take care of positioning .


finish webdav actor

/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/webdav/WebdavFactory.py

[ ] add tests
[ ] tests are like examples
[ ] add some docs

as part of test

[ ] start server (install)
[ ] use webdav client to set/get info (python)
[ ] do also a mount/sync example with rclone

check that the data is in the filemanager

so far the packaging for webdav is done, rclone examples already merged  there and this following pr is for the tests using python client, docs for using python client already merged
https://github.com/threefoldtech/jumpscaleX_threebot/pull/30


Add args to configure the training runtime + save training information and results.

Args

[x] Expose argparse configuration.
[x] Add algorithm selection.
[x] ~number of training episodes.
[x] max episode length.
[x] n cpus

Save format

[ ] Metadata should be human readable (a pretty compact .txt information).
[ ] Model is saved in a binary format as per stable baselines implementation.
[ ] This should enable a loadable scenario.

This would probably be my final task apart from potential reward function tweaking.
I would like some easy API to load the whole env i.e.

Trajectory
Obstacle locations
Model
Eyes


Fix Wallet History performance for transaction searches

Closing as will be looking at this again in another task.

@zeptin @quantumagi I've made alterations to this PR which I previously closed. Its working pretty well now. I've seen a 4x increase in returning a result with a transaction Id. Can you please review this one carefully?


How to use MongoKitten 5 in sync way

Hi,
In previous versions of MongoKitten (<= 4) I use it like:
let document = try myCollection.findOne("_id" == objectId)
It works in sync way.
Can I continue using sync way in MongoKitten 5?

Good morning! We've moved to an asynchronous model for stability and performance, as well as it being the preferred way in Server-Side Swift now.
You can use Database.synchronousConnect(..) to connect in synchronous environments and will have' to use .wait() at the end of a query for synchronous execution.
If you want a fully synchronous client, without .wait(), there are two good solutions that I can think of.
The first one is to wrap MongoKitten's Cluster, Database and Collection types with the same functions, but synchronous. The alternative is to wait for MongoKitten 6 and related libraries that will be released at the same time. They will support synchronous calls


Alphabetize database names in chef-server-ctl psql.

Before:
root@api:~# chef-server-ctl psql
[ERROR] You must supply a service name. Valid names include: ["opscode_chef", "bifrost", "oc_id", "bookshelf", "push-jobs", "reporting", "oc_erchef", "oc-id", "opscode-erchef"]

After:
root@api:~# chef-server-ctl psql
[ERROR] You must supply a service name. Valid names include: bifrost, bookshelf, oc-id, oc_erchef, oc_id, opscode-erchef, opscode_chef, push-jobs, reporting

❤


Updated test suite and added test docs

Short Description:
Updated test suite to use mock classes as __getattr__ could not be overridden
Changes:

Refactored test suite
Added testing docs

@OpenPoGo/maintainers

👍
Thanks!

Waiting on Travis for merge
:+1:

leaving for you to merge, @andythorne