Standard Git extension needs more methods exported

Standard Git extension needs more methods exported to make easier 3rd party VS Code extensions developing based on standard VS Code Git extension.
I'm developing a simple extension for VSCode. It's based on standard Git extension I found some useful methods are not exported and not defined in git.d.ts, yet I can find them in the source of Git extension.
For example, I'd like to use exec() from Repository but also found that even simple rm() from Repository is not exported as well. I see no harm having these and other methods exported and making them available for extension developers.
I'm especially interested in exec() which would allow to run any custom Git commands from my extension, particularly interested in running a simple rm --cached for example.
For example I'd like the below code to work (this is an extraction, not a complete code), currently it does not because it can't call exec() in the last line since it was not exported and not available in the minimized git.ts:
const gitExtension = vscode.extensions.getExtension<GitExtension>('vscode.git')?.exports;
const git = gitExtension?.getAPI(1);
let repo = git.repositories[0];
if (repo) {
	let args = ['rm', '--cached', '--'];
	args.push(arg.path);
	await repo.exec(args);
}

@awhitenose, thank you very much for filing this issue. We do not plan for making the exec() method available through the git extension's API. You can, and some extensions implement their own exec() method (ex: GitLens) to run arbitrary git commands against a repository. If you would like to have the rm() method exposed, that is something that we can look at.

Thank you @lszomoru for your comments. But why do you think exposing exec() from git extension's API is a bad idea? Do you think other extension developers may use it wrong and do any harm to repositories etc? But the same is possible to do any other ways including writing their own exec(). Yes, I can go for my own exec() implementation but it's just more time while your git extension does great work and already have this implemented, then why to reinvent the wheel?
If you can expose rm(), that would help with solving one small particular issue but getting access to exec() would be more generic if possible.


ENH: distributions, complex arguments

Closes https://github.com/scipy/scipy/issues/2237. No idea if statsmodels still wants it, but here it is anyway.
Remove hardcoded float dtype in methods of distributions, so that one can do complex-step derivatives (where the underlying special functions work with complex arguments, that is):
>>> h = 1e-6
>>> x = 1.
>>> (cauchy.cdf(x + h*1j) / h).imag - cauchy.pdf(x)
-2.6478819137309983e-14

@ev-br  as far as I can see and remember
using x.dtype willl not work if x is integer. We need dtype at least float to store np.nan.
It took me a while initially to figure out some casting bugs when nan (invalid numbers or numbers not in support of the function) where cast silently to zero,  This was because discrete distribution returned integer arrays for some methods initially.

This PR only changes continuous distributions. They all seem to have an implicit cast: x = (x-loc)*1.0/scale.

This will still be useful for statsmodels
We try to use the analytical derivatives if we manage, but at least in some parts with use complex step derivative as a default with a try except protection to switch to standard forward step derivatives.
One main limitation is still scipy.special, AFAIR, norm.cdf from special doesn't work with complex numbers but erf works.
Thanks @ev-br

This PR only changes continuous distributions. They all seem to have an implicit cast: x = (x-loc)*1.0/scale.

Very good, I didn't see the implicit casting.
Are there a few unit test with integers, just to make sure?

just to understand the casting compare to before:
What happens with smaller float, float16 (?) and float32? Are they implicitly upgraded to float64 or stay in the smaller float dtype?

What happens with smaller float, float16 (?) and float32? Are they implicitly upgraded to float64 or stay in the smaller float dtype?

Rright. As often happens in stats.distributions, it worked OK with an odd glitch or two :-).
In master: int args are cast to float64 by multiplication by 1.0, and everything stays float64 from that point on. Half- and single-precision floats are not cast by multiplication by 1.0 because of --- I suppose --- this "The standard casting rules ensure that a scalar cannot up-cast an array unless the scalar is of a fundamentally different kind of data", http://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html.
So half- and single-precision floats stayed with their original precision unless upcasted by (x-loc)/scale. This propagated through the private methods (_pdf), to be finally upcast to float64 in https://github.com/scipy/scipy/blob/master/scipy/stats/_distn_infrastructure.py#L1599, because output is allocated with the typecode 'd'. I only checked this on a 64-bit machine, not sure how this changes for 32 bits. And I'm sure it's numpy version dependent as well.
All in all this mostly worked, esp since I do not think reduced precision floats saw much usage :-). By 'mostly' I mean there were odd fails for half-precision floats in some distributions depending on the implementation of the the private _cdf-type methods.
https://github.com/ev-br/scipy/commit/1e78ee2e5a9912c9e51582acb6c3ea76f801c32d implements an explicit test which loudly complains about downcasting from float64 to float16 on wrapcauchy.cdf and a couple of other places.
So in this PR now makes explicit casts and adds tests.

I only checked this on a 64-bit machine, not sure how this changes for 32 bits.

It's the same on 32-bits. I wouldn't expect differences there. 32 vs 64 bits differences are mainly showing up for integers (because int is int32 on 32-bit machines) and floating-point precision, but not for float casting behavior.

This still passes all tests without any test noise for me (on 32-bit).

So about half the distributions accept complex numbers, and the other half fail. The user won't know which work and which don't without trying. Is that really a good situation?

@rgommers  AFAICS this just cleans up the mixed up dtype handling for less than float64.
For complex it always raised an exception, now it raises an exception when it doesn't work. The unit test exclude distributions, some methods still work with excluded distributions.
_pdf for norm works, cdf fails in special
(for statsmodels this would mean we can use those distributions for logpdf, but not cases like Probit where we need the norm.cdf in the loglikelihood function.)
actually, currently I get a warning with implicit downcasting in some cases (which returns wrong result), and casting warning shows up only the first time AFAICS
>>> cc
array([ 4.+1.j])

>>> stats.t._pdf(cc, 0.5)
array([ 0.01760022-0.00657159j])
>>> stats.t.pdf(cc, 0.5)            # truncated imag part
array([ 0.01760022])
C:\programs\WinPython-64bit-<IP_ADDRESS>\python-3.4.3.amd64\lib\site-packages\scipy\stats\_continuous_distns.py:3036: ComplexWarning: Casting complex values to real discards the imaginary part
  Px /= sqrt(r*pi)*(1+(x**2)/r)**((r+1)/2)

>>> stats.t.pdf(cc, cc)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\programs\WinPython-64bit-<IP_ADDRESS>\python-3.4.3.amd64\lib\site-packages\scipy\stats\_distn_infrastructure.py", line 1573, in pdf
    place(output, cond, self._pdf(*goodargs) / scale)
  File "C:\programs\WinPython-64bit-<IP_ADDRESS>\python-3.4.3.amd64\lib\site-packages\numpy\lib\function_base.py", line 1484, in place
    return _insert(arr, mask, vals)
TypeError: Cannot cast array data from dtype('complex128') to dtype('float64') according to the rule 'safe'
>>> import scipy
>>> scipy.__version__
'0.15.1'
>>> stats.t._pdf(cc, cc)
array([ 0.00193552-0.00680458j])

@rgommers AFAICS this just cleans up the mixed up dtype handling for less than float64.

Yes, that all looks fine. What I was commenting on was the test that explicitly verifies that complex numbers now work, but with ~50 exceptions. If the "new feature" has value then we probably would like to fix the distributions that with this PR still raise an exception on complex input where possible.
Anyway, it's more a clarifying question than a strong objection from me. But a comment giving some context would be good to add to the test at leat.

So about half the distributions accept complex numbers, and the other half fail. The user won't know which work and which don't without trying. Is that really a good situation?

Uhm well. Obviously, I'd prefer that all of them work, but extending 50-odd special functions to complex plane is not something I'm up to anyway  :-). Clearly, some would be more important than others, and there is no expectation that all of them need to be made working.
All in all, I think that this PR with 50+ exceptions is already an improvement over master where they all fail because of a hardcoded limitation --- provided there is at least one use case :-).
But again, if there are strong feelings that it's too much, I'd be fine with just closing this.

_pdf for norm works, cdf fails in special

( for statsmodels this would mean we can use those distributions for logpdf, but not cases like Probit where we need the norm.cdf in the loglikelihood function.)

norm relies on ndtr (which is real-only), but we also have erf, which works in the complex plane:
In [27]: h=1e-8j

In [28]: (erf(1. + h) / h)
Out[28]: (0.41510749742059477-84270079.294971481j)

In [29]: np.exp(-1.) * 2. / np.sqrt(np.pi)
Out[29]: 0.41510749742059477

For statsmodels and statsmodels users it's already a useful improvement. Enhancing and cleaning up individual distributions can be left as future task and future PRs. IMO.
example usage: https://github.com/statsmodels/statsmodels/blob/master/statsmodels/miscmodels/tmodel.py#L154
Here I copied the logpdf of scipy. In cases where statsmodels developers or users want to use the scipy distribution logpdf directly in maximum likelihood models, the complex derivatives will be more accurate than finite difference approximation.  (But still less precise than analytical derivatives of logpdf, if those are available.)
(aside in some cases we are still better of using a different implementation when a parameterization specialized for regression works better and is more stable in that case. I looked at different ways of parameterizing the gamma distribution recently.)

@josef-pkt What exactly is going on with complex derivatives?
Ideally I think it would be useful to add the score function to the stats interface. This could also be used internally by the .fit methods which are defined as using maximum likelihood estimation.  On the other hand it wouldn't be sufficient for second derivatives which are often used to construct intervals. Perhaps an unsophisticated implementation of the score function could use 'complex derivatives' for distributions whose logpdf implementation supports it, and finite differences for the others.

@argriffing  "complex step differentiation" is a method for computing a (real) finite difference derivative approximation with a single function call by passing in a complex argument.  See http://blogs.mathworks.com/cleve/2013/10/14/complex-step-differentiation/

@argriffing  there are some references in some (?) issues. Someone (?) pointed them out on the scipy mailing list, I implemented them for statsmodels and we use it as high precision default when they work. accuracy in examples that I tried is around 1e-12 to 1e-14, but a bit slower than finite differences.
We never had to tweak the stepsize for them, but they only work for first differences (in the standard implementation)

(more advertising: AFAIR, we use them in ARMA and statespace model with the Kalman filter. The cython implementation allows complex variables specifically so we can use complex step derivatives.)

Would it be enough to hide these details within per-distribution 'score' functions? In other words, the user would not have to care about imaginary numbers, but for distributions which support complex step derivatives the users would get the benefit automatically when they call the score member function?

Hiding them inside the score function (deriv_logpdf for example) is only of limited use.
First in some cases we need the cdf (like in censored/truncated/discretized models) and maybe the ppf (when we include quantile based estimation.
Second, we currently use numerical derivatives almost exclusively on the entire model, and it would be the simple default for user defined likelihood functions. We use explicit chain rule in several places for analytical derivatives, but coding chainrule also into numerical derivatives requires work.
We use numerical derivatives inside an analytical chain rule in a few places, and I expect we will extend that, but getting to the required modularity will take time.
This PR extends the range where complex step derivatives can be used without additional effort by us or users.

Re complex-step derivatives:
In [24]: from scipy.optimize._numdiff import approx_derivative

In [25]: approx_derivative(np.sin, 0.5, method='cs')
Out[25]: array([ 0.87758256])

But again, if there are strong feelings that it's too much, I'd be fine with just closing this.

I don't have any objection to this PR.  It's clear to me that the long term solution for derivatives for statistical analysis is a mix of analytic and automatic differentiation, but this looks like an OK temporary solution.

But again, if there are strong feelings that it's too much, I'd be fine with just closing this.

I don't have any objection to this PR. It's clear to me that the long term solution for derivatives for statistical analysis is a mix of analytic and automatic differentiation, but this looks like an OK temporary solution.

Good discussion, and it's clear that this has value to at least statsmodels. So no objection here either.

Regarding autodiff of numpy code: https://github.com/HIPS/autograd

Merged, thanks @ev-br!

Regarding autodiff of numpy code: https://github.com/HIPS/autograd

@datnamer Great! I hope some day scipy will include/vendor/depend a package like that. I'm glad to see that automatic differentiation is starting to become almost expected in scientific computing environments, so that if you write a differentiable function then you can take its derivatives for granted.

Regarding autodiff of numpy code: https://github.com/HIPS/autograd

Would be good to include the link to the topical software list.

@ev-br good suggestion, done in https://github.com/scipy/scipy.org/pull/120


Write a "quickstart" documentation with easy examples

We already have some text in my blogpost, https://caspervdw.github.io/Introducing-Pygeos/
Let's integrate part of that in the documentation

Closing as there is already a lot present in shapely


feat(image): add chrome build

NLJ-4044

@shevchenkov-neuralegion please get rid of --site-per-process from chromium image

The --site-per-process setting was removed.


No documentation for hub gist

hub gist --help fails with:
No manual entry for hub-gist
exit status 16

No big deal, but kind of confusing for first starters. cc @jaymzh .

Huh. I checked out the merge commit and it works there. And no other commits mention gist. I guess I'll git bisect and see where the help broke. :(

@mislav it looks like your commit 8b5f6fe6ac5abc4027a559195cfcd5b8abe57fba broke it, though I don't see how.

Oh, I take that back. I was doing a make; ./bin/hub --help gist for each bisect, and at that build, you pass off to man, and since I hadn't done an install, of course man didn't know about it. I"ll bisect again. :/

@doronbehar - works for me on master... my guess is whatever packaging you're using isn't including the share/man/man1/hub-gist.1.txt file.
Are you perhaps using something like snap or flatpak? I poked at a snap of this on Ubuntu, and no help works anymore, because of @mislav 's PR, plus the fact that these things are self-contained and thus can't drop off man pages:
$ hub help pull-request
No manual entry for hub-pull-request
exit status 16
$ hub --help pull-request
No manual entry for hub-pull-request
exit status 16
$ hub pull-request --help
No manual entry for hub-pull-request
exit status 16
$ hub pr --help
No manual entry for hub-pr
exit status 16

I'm using the snap version on Ubuntu and can confirm that no help works anymore.

Thank you for these reports. I did change the hub help (and hub <command> --help) logic quite recently.
Hub searches for hub-<command>.1 manpage in your system's MANPATH plus the following location: ../share/man/man1/ relative to the hub executable; e.g. /usr/local/share/man/man1/ for /usr/local/bin/hub.
Can you verify that you have man pages in that location? If not, which method of installation did you use? If from a 3rd-party package (anything other than Homebrew), can you verify with the maintainer that they are including man pages? Thank you.

@mislav I'm running hub 2.13.0 on Ubuntu 19.04, installed as recommended in the README via snap install hub --classic.
$ which hub
/snap/bin/hub

$ ls /snap/share
ls: cannot access '/snap/share': No such file or directory

$ echo $MANPATH
~/.npm-packages/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man

$ hub help gist
No manual entry for hub-pull-request
exit status 16

No entries for hub in any of the MANPATH directories either.

My bad. I tried to get ahead of my distro's update and run go install in the git repo but I didn't imagine hub help looks for manual pages which (naturally) are not in my $MANPATH when it's just the executable from $GOPATH/bin/. Anyway, sorry for the false alarm and thanks for responding.

@doronbehar If you wanted to install hub from the git repo, you can run PREFIX=/usr/local make install and that will install both the binary and the help pages.

This was an issue caused by a change in hub code as well as how the snap was built. It has been fixed in the snap: https://github.com/felicianotech/hub-snap/issues/25


nodegit.Clone folder gets removed

Hello, i am trying to use nodegit to clone / create a repository, add new files, commit, push, and then remove the repository.
But after i call the nodegit.Clone i see the folder appear, and a few seconds later gets removed.

I'm running into the same issue - I must be doing something wrong but what is it?


Add codecov for databuilder repo

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b674d9f). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #41   +/-   ##
=========================================
  Coverage          ?   82.48%
=========================================
  Files             ?       47
  Lines             ?     2113
  Branches          ?      189
=========================================
  Hits              ?     1743
  Misses            ?      304
  Partials          ?       66

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 b674d9f...2253ed3. Read the comment docs.

PTAL @jinhyukchang @ttannis


HTTPS URLs Domain missing

Hi!
URLs without Domain, but with https doesn‘t work.
Please add domain to the Host name ( for example to the snapshot_url field)
Wrong:
https://Hostname:8082/… - no certificate avail.
Correct:
https://Hostname.example.de:8082/…..

Please specifiy related releases:
adapter:
admin:
js-controller:
node:
npm:
o/s type:

Good Evening
@crocri I guess you should report this at https://github.com/ioBroker/ioBroker.web as this is not ring adapter specific in my opinion

Hello!
For sure it is ring adapter specific!
So far as I know, it‘s related to the definitions of the adapter, but I‘m not a developer. Similar errors were corrected before for Node-red adapter and admin adapter….
Latest adapter direct loaded from github (3.4.1), but for this kind of error it doesn‘t matter.
Nevertheless here the releases:
admin 6.3.5
js-controller 7.0.3
node 18.17.0
npm 9.6.7
br
Crocri

After some tests, adapter.host returns only name without domain. But opening ioBroker overview, all the names with https are correct. Here the domain is added to the hostname.
If i change the host name itself to FQDN, url‘s from ring adapter are correct too.
In my opinion this behaviour is not really consistent…
br
Crocri


Enhancement: Add custom formatting specifiers for uppercase, lowercase, etc. in templates

Is there an existing issue for this?

[X] I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?
It might be worth using a custom formatter in OpenPype so we don't need all the keys like Task task, TASK etc. in the data and can actually explicitly state what we want to have done with the value.
It would allow explicitly forcing lowercase, uppercase or whatever we want as custom formatting.  🙂
Plus, you'd just need to just extend the anatomy formatting class and don't need to actually wrangle all data. It'd then automatically work for all data formatted with anatomy.
Simpler. (And faster potentially since the formatting would only occur when requested instead of preparing the data beforehand).
So uppercase task would e.g. be {task:upper} or {task!u} or whatever we want to use as format specifier or solution.
How would you imagine the implementation of the feature?
Custom value conversions
An example of specifying custom conversion specs for formatting can be found here which shows how to add e.g. {myvar!u} to uppercase a string or {myvar!l} to lowercase a string.
Here's an example of that:
from string import Formatter

class ExtendedFormatter(Formatter):
    """An extended format string formatter

    Formatter with extended conversion symbol
    """
    def convert_field(self, value, conversion):
        """ Extend conversion symbol

        Conversions:
        * l: convert to string and low case
        * u: convert to string and up case

        """
        if conversion == "u":
            return str(value).upper()
        elif conversion == "l":
            return str(value).lower()
        # Do the default conversion or raise error if no matching conversion found
        return super(ExtendedFormatter, self).convert_field(value, conversion)

# Example
template = "{task!u}/{asset!l}/v{version:03d}"
data = {
  "task": "anim",
  "asset": "char_SuperHero",
  "version": 1
}
formatter = ExtendedFormatter()
output = formatter.format(template, **data)
print(output)
# ANIM/char_superhero/v001

This requires the conversion character to start with ! and the conversion can only be a single character.
Custom field format specifiers
However, it's also possible to define custom field conversions - where we can use the format spec to implement the same but allowing e.g. longer readable specs like :lower and :upper
from string import Formatter

class MyFormatter(Formatter):
    def format_field(self, value, format_spec):
        if format_spec == "upper":
            return str(value).upper()
        elif format_spec == "lower":
            return str(value).lower()

        return super(MyFormatter, self).format_field(value, format_spec)

# Example
template_str = "{task:upper}/{asset:lower}/{subset:lower}/v{version:03d}"
data = {
  "task": "anim",
  "asset": "char_SuperHero",
  "subset": "helloWorld",
  "version": 1
}
myformatter = MyFormatter()
output = myformatter.format(template_str, **data)
print(output)
# ANIM/char_superhero/helloworld/v001

Maybe low and up are nicer because they are shorter maybe?
These could be implemented on the StringTemplate class when formatting.
Custom field format specifiers - uppercase only first character
We currently also support {Task} to only uppercase the first character - we can take that same logic and implement it as well:
from string import Formatter

class MyFormatter(Formatter):
    def format_field(self, value, format_spec):
        if format_spec == "upper":
            return str(value).upper()
        elif format_spec == "lower":
            return str(value).lower()
        elif format_spec == "upperfirst":
            value = str(value)
            if value:
                # Uppercase first character, leave rest as is
                return "".join([value[0].upper(), value[1:]])
            else:
                return value

        return super(MyFormatter, self).format_field(value, format_spec)

# Example
template_str = "{task:upper}/{asset:lower}/{family}{task:upperfirst}{variant:upperfirst}/v{version:03d}"
data = {
  "task": "anim",
  "asset": "char_SuperHero",
  "family": "render",
  "variant": "main",
  "version": 1
}
myformatter = MyFormatter()
output = myformatter.format(template_str, **data)
print(output)
# ANIM/char_superhero/renderAnimMain/v001

Are there any labels you wish to add?

[X] I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:
The alternative is basically the hassle we've been riding with currently where all data needs to be prepared with: {task}, {Task}, {TASK}, etc.
It would mean we'd need to preformat all data, which can be slow due to the fact that we're likely formatting a lot of versions that we don't end up using in the data. Also with these keys it's unclear what e.g. would be a key for force lowercase formatting.
Additional context:
Originally proposed on Discord
[cuID:OP-7100]

I've made a quick prototype.
I believe this function can be imporved!
def my_formatter(my_dict, key):
    # Test if only the first letter is uppercase
    if key[0].isupper() and not key.isupper() :
        return my_dict[key.lower()].capitalize()

    # Test whether all letters are uppercase
    elif key.isupper() :
        return my_dict[key.lower()].upper()

    # I'm forcing lower case because someone may write stupid thing like "uSER"
    return my_dict[key.lower()]

phonebook = {"user" : "mustafa"}

print( my_formatter(phonebook, "user"))
print( my_formatter(phonebook, "User"))
print( my_formatter(phonebook, "USER"))

resolve : User -> user:upperFirst
then use your code above.

Yes, we could do that for backwards compatibility for the time being - but of course having to parse the keys all the time would be slower than just formatting what gets requested.
Technically we could override Formatter.parse to convert certain cases as legacy like you described:
from string import Formatter

class MyFormatter(Formatter):

    def format_field(self, value, format_spec):
        if format_spec == "upper":
            return str(value).upper()
        elif format_spec == "lower":
            return str(value).lower()
        elif format_spec == "upperfirst":
            value = str(value)
            if value:
                # Uppercase first character, leave rest as is
                return "".join([value[0].upper(), value[1:]])
            else:
                return value

        return super(MyFormatter, self).format_field(value, format_spec)

    def parse(self, format_string):
        for (literal_text, field_name, format_spec, conversion) in super(MyFormatter, self).parse(format_string):
            if field_name and not format_spec:
                # Allow legacy uppercase conversions
                # TODO Not sure why but as soon as you return
                if field_name[0].isupper() and not field_name[1:].isupper():
                    # If field name has only uppercase first character
                    field_name = field_name.lower()
                    format_spec = "upperfirst"
                elif field_name.isupper():
                    # All characters are uppercase
                    field_name = field_name.lower()
                    format_spec = "upper"
            yield (literal_text, field_name, format_spec, conversion)

formatter = MyFormatter()
result = formatter.format("""
upper: {HELLO}{WORLD}
upperfirst: {Hello}{World}
regular: {hello}{world}
""", **{"world": "world", "hello": "hello"})
print(result)

Prints:
upper: HELLOWORLD
upperfirst: HelloWorld
regular: helloworld

Note that the above example I provided would be problematic with formatting e.g. environment variables because the keys there are always all uppercase and thus would be considered the upper format specifier, e.g.:
formatter.format("{AVALON_TASK}", **{"AVALON_TASK": "test"})

This will result in a key error because avalon_task key is not provided.

Ad backwards compatibility. I don't think we should handle backwards compatibility in the formatting logic. We should still pass in the same data as we do now, until it's fully deprecated.
I was thinking about implementing callable attributes access in the formatter, instead of using formatting description.
That requires formatter_field_name_split from _string because it is C implementation, but I think it is more "intuitive" to use.
import re
from string import Formatter, _string

class Akwargs:
    def __init__(self, args_str):
        args, kwargs = self._parse(args_str)
        self.args = tuple(args)
        self.kwargs = kwargs

    def _convert_value(self, value):
        if value == "True":
            return True
        if value == "False":
            return False
        if value == "None":
            return None

        try:
            return float(value)
        except ValueError:
            pass

        try:
            return int(value)
        except ValueError:
            pass
        return value.strip('"')

    def _parse(self, args_str):
        parts = args_str.split(",")
        args = []
        kwargs = {}
        for part in parts:
            part = part.strip(" ")
            if not part:
                continue
            if "=" in part:
                key, value = part.split("=")
                kwargs[key] = self._convert_value(value)
            else:
                args.append(self._convert_value(part))
        return args, kwargs

class MyFormatter(Formatter):
    _char_regex = re.compile(r"[a-zA-Z0-9]")

    def _upperfirst(self, value):
        capitalized = ""
        for idx in range(len(value or "")):
            char = value[idx]
            if not self._char_regex.match(char):
                capitalized += char
            else:
                capitalized += char.upper()
                capitalized += value[idx + 1:]
                break
        return capitalized

    def _parse_func_args_kwargs(self, attr_name):
        if "(" not in attr_name:
            return False, tuple(), dict()

        attr_name, args = attr_name.split("(", 1)
        args_kwargs = Akwargs(args.strip(")"))
        return True, args_kwargs.args, args_kwargs.kwargs

    def get_field(self, field_name, args, kwargs):
        first, rest = _string.formatter_field_name_split(field_name)

        obj = self.get_value(first, args, kwargs)

        # loop through the rest of the field_name, doing
        #  getattr or getitem as needed
        for is_attr, attr_name in rest:
            if not is_attr:
                obj = obj[attr_name]
                continue
            is_callable, func_args, func_kwargs = (
                self._parse_func_args_kwargs(attr_name)
            )
            # Fake 'str' method
            if attr_name == "upperfirst":
                if not is_callable:
                    raise AttributeError(
                        "'str' object has no attribute 'upperfirst'"
                    )
                obj = self._upperfirst(obj)
                continue

            obj = getattr(obj, attr_name)
            if is_callable:
                obj = obj(*func_args, **func_kwargs)
        return obj, first

class TestClass:
    def get_value(self, test=True):
        if test:
            return "Value1"
        return "Value2"

# Example
template_str = "{task.upper()}/{folder[name].lower()}/{family}{task.upperfirst()}/{variant.get_value(test=False)}/v{version:03d}"
data = {
    "task": "anim",
    "asset": "char_SuperHero",
    "folder": {"name": "char_SuperHero"},
    "family": "render",
    "variant": TestClass(),
    "version": 1
}

myformatter = MyFormatter()
output = myformatter.format(template_str, **data)
print(output)

I think allowing custom scripts to be triggered will likely be:

More complex in code
More edges cases someone could run itno
Slower maybe?
But mostly, potentially dangerous if someone just happens to be able to create a string that runs random code via the templating system.

Additionally - I feel like if we're going that far with the formatting we're just as well off doing f-string evaluations or calls to eval - which also, is dangerous (and slow?).

More edges cases someone could run into

I don't see any more other edge cases than with custom descriptor...

Likely "nice" for developers but harder for admins?

I would say more admins would more understand python calls than using custom formatting descriptor. Learning curve is same if they don't understand neither.

But mostly, potentially dangerous if someone just happens to be able to create a string that runs random code via the templating system.

It would be dangerous only if you would pass dangerous objects in... Only methods can be called, not random functions as in eval.

Slower maybe?

We still have to use StringTemplate because of optional keys, which is slow because it's custom implementation of template formatting.
But almost nothing of that is important. We would still need to "insert" the logic to StringTemplate, and keep it's logic. If you think it's easy, and must have now, then do it please.


Support TLS

This patchset adds TLS connection capability. To make a TLS
connection, use tls:// schema for a NATS server. You can
specify additional options for NATSClient:
tls_cacert(str):      filepath for CA certificate(default:None)
tls_client_cert(str): filepath for a client certificate(default:None)
tls_client_key(str):  filepath for a client key(default:None)
tls_verify(bool):     Enable TLS verification(default:False)

I'm sorry, I moved the branch from master to tls for the pull request.

@yosshy looks like you deleted the original repo. I've copied your commit in my fork and rebased it against latest master: https://github.com/nineinchnick/nats-python/tree/tls
@Gr1N would that help in getting this accepted?

@nineinchnick hello, I will look into this during this week. Is it ok for you?

Of course! No rush. I've noticed the pipelines failed and I'm updating tests to start NATS with TLS. I guess this warrants opening up a new PR, WDYT?

I guess I will take implementation into my own branch, apply some changes to the code, and configure CI to pass checks. And then I will open a new PR for review.

That's exactly what I'm doing - I've opened #13 since I'm not sure that the pipeline runs for my branch without a PR.


update progress (conditionally) during objective cranking

Examine each cranking function and manually progress each objective's timestamp where necessary.
Follows on from #3263

Following a discussion today with @tomclose:

this approach doesn't do justice to the fact that progress can be made when my store was updated before cranking, i.e. simply by my having observed a blockchain event or receiving a state from a counterparty.

A proposal to fix that problem:

add a state string to objectives that summarises the state of the store, without replicating any of the details. It is purposefully not a rich object. It should be considered "write only" meta-data about the store, and not used as a second source of truth. It is only going to be read by the code that updates progressLastMadeAt.**

As an example, the DBOpenChannel objective, the state could be :
''
'preFundSigned'
'preFundSupported'
'partiallyFunded'
'funded'
'postFundSigned'
'success'
When the cranking function updates this state, it will have access to the previous state and be able to infer if some progress has been made. If progress has been made, update progressLastMadeAt.
This proposal should also aid in debugging; and could aid in creating a UI (e.g. for a future browser wallet). It preserves the property of not being "fool-able" by any influx of state events/states. It might be the compromise that gives us the benefits of explicit state machines without some of the downsides?
** we could rename to objectiveStatusLastChangeAt.

In favour of #3286


sharedKey isn't documented

Per conversation in slack channel, the configuration sharedKey that we can an example of in our configuration, isn't documented as to what it is, how it's used, or how to create another one.
Add to our documentation.
Verify it’s a shared encryption key for encrypting/decrypting data as it goes in and out of MongoDB (data encryption at rest kinda thing). It’s a pre-set shared secret key that can be provided via config - string format. It’s a base64 key relevant for aes-256-cbc. So I think (@benbp can you verify when you’re kicking) that the a 256 byte randomly generated and base64 encoded would be a good “in production” replacement.

@pscharla can you have one of the monorail gang go through, review the relevant code, and update the docs at https://github.com/RackHD/docs/blob/master/docs/rackhd/configuration.rst to include sharedKey and what reasonable values are for it?

@heckj OK. Will do.

Pivotal tracker link here:
https://www.pivotaltracker.com/n/projects/1492888/stories/126555983

PR is ready to be merged:
https://github.com/RackHD/docs/pull/318


Scripts to paperbackup arbitrary input data with symmetric encryption

Added script to do symmetric encryption and base64 encoding on input files before passing them to paperbackup.py. And another script to decode and decrypt resulting backups.

Thank you for feedback

why do you need the extra call to base64? Can't you use the --armor option to gpg?

I opted for this extra call to avoid wasting valuable bytes for   "-----BEGIN PGP MESSAGE-----" and "-----END PGP MESSAGE-----" headers added by gpg --armor option.  At least on my machine this is the old gpg version 1.4 which you don't want to use unless for compatibility reasons. "gpg2" would be a more modern gpg.
You could also check if gpg2 is available in the path and call it, if not fall back to calling gpg.

I used gpg because it was already installed on my Ubuntu 16.04 and has less dependencies then gpg2. Default AES symmetric algorithm was good enough for my use case. Anyone who specifically targets paper backup of my passwords stored in my home will probably apply rubber-hose cryptoanalysis to extract encryption key from me. So encryption strength does not matter much. I just don't want to store it in plain text in case the backup will find it's way to waste bin unshredded for some reason.
But I agree that in general gpg2 would be better if it's available and I probably should also add option for encryption algorithm selection.  I will do it on weekend.

what happens if the call to gpg (or gpg2) fails, because the file does not exist, the user didn't enter a password and so on? Shouldn't the script detect this and abort with an error code? It shouldn't try to create pdfs of empty files.

I agree. Will fix

I'm unsure about the name "gpg-paperbackup.sh": it doesn't convey that you are using symmectric encryption, from the name alone it could also use your regular keystore or do some other fancy gpg operation. Maybe "paperbackup-symmetric.sh" and "paperrestore-symmetric.sh"?

I agree. Your variant is better.

would it be possible to also allow piping the input file to gpg-paperbackup.sh? If yes, this would be a nice extension. Or would it conflict with the password prompt?

I'll investigate that. And add this option if possible in next commit.

Please don't mix any "/usr/bin/bash" vs. "/bin/bash" changes into the checkin. This is a separate issue, requiring a separate issue/pull. Probably using env would be the most compatible way.

I noticed that in paperrestore.sh you used "/bin/bash" and "/usr/bin/bash" in "paperbackup-verify.sh"
I have only "/bin/bash" out of the box on my Ubuntu 16.04 so I chose the variant that works for me.
But I agree that it is a separate issue. I will leave your scripts "as is" and change shebang to "#!/usr/bin/env bash" in my added scripts
I'll try to prepare next commit at next weekends.

Hope this changes address your concerns. Please let me know if you think something else should be changed or if I missed something.

Thank you for adapting your patches to my suggestions. Everything looking good now except two small bits:

please add a short section to the README.md explaining how to use the symmectric scripts

I'm still not convinced that using base64 is a better solution than using the --armor option. I tried both and compared the size. Yes, --armor is a bit more verbose with it's "-----BEGIN PGP MESSAGE-----" stuff, so I see your point. But still is just a few bytes, much less than one qr code block.

But on the other hand, the "-----BEGIN PGP MESSAGE-----" is implicit documentation how to decode it. Let's say in a decade or more, someone needs to decode the message, knows the password, but a lot of context around it is lost or outdated, github turned evil or was switched off, and so on. With the text "-----BEGIN PGP MESSAGE-----" in the plaintext section, he instantly know that he needs some pgp compatible program to decode this. The pure base64 doesn't convey this.


Create 2022-07-19-improvement-for-users-with-two-trns.md

Excellent write-up of a thorny problem 🙏


"patch for fix readline detection" is broken

The following error occurs (and is being silently ignored!) in my install and can be found in many logs and issues by people, both here, on Stack Overflow and many other places where people post logs about other problems. I believe most people don't even notice the error because it is ignored, which may or may not be intentional.
I don't know the relevance of the error, nor whether it even applies (I did not attempt to install a PHP in the given range), but if it isn't an actual error, the output with the red error message should probably be changed. As it is, I have an installation that had an error during its compilation, so I don't know whether it's all working fine or whether I will run into strange, unexplained issues in the future while using it.
Output
Checking patch for fix readline detection on PHP 5.3 to PHP 7.1
---> Applying patch...
patching file ext/readline/config.m4
Hunk #1 FAILED at 60.
Hunk #2 FAILED at 121.
2 out of 2 hunks FAILED -- saving rejects to file ext/readline/config.m4.rej

Expected Result
I expected no error message

Command
Paste your phpbrew install command here (be sure to install with --debug flag, e.g. phpbrew --debug install)
phpbrew --debug install -j $(nproc) 8.1.13 +pdo +mysql +iconv +mbstring +json +filter +openssl +tidy +zip +intl +xml +ctype

Build Log
The build log appears to include lots of personal information such as my real name and my companies name. Is there any way to sanitize it short of going through all of it manually myself with search & replace ? Probably not relevant anyways

Platform
OS:
Ubuntus LTS 22 on WSL 2

Running PHP: I don't know what to put here
Installing PHP: I don't know what to put here

"Running PHP" is about which PHP version you run the PHPBrew.
"Installing PHP" is about which PHP version you want to install. According to the Command, the installing PHP is 8.1.13.

Thanks, updated

Closed via #1357.


Memory leak

I'am using the stream processor in order to filter out so messages which are coming at or rate of 200 msg per second.
I'am using partition and a #window.unique:time. After running for minutes i always run into memory leak problem. After that the memory usage goes up until it caps at around 40 % and then the stream processor craches.
i Get this error
[2019-05-01_00-41-06_201] ERROR {io.netty.util.ResourceLeakDetector} - LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dio.netty.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information. (Encoded)

@Yahya222, Does the partition key verifies significantly?

@niveathika assuming you mean varies yes they do thank you for the insight i just swapped the partition parameter and the window parameter because the window parameter has much less variation and i have no more problems.

@Yahya222, It is a known issue in Siddhi 4.x that partition cannot handle a huge amount of variation in the keys. As partitions cannot be cleaned after expiry time. It is best to not use partition if the values you expect will not be finite.
You can raise questions on siddhi-user group or an issue in https://github.com/siddhi-io/siddhi to get recommendation on handling various use cases efficiently.

Thanks a lot , there is one remaining problem if you have any insights it would be helpful. I am using the wso2 stream processor on a cloud server. Due the the fact that i'am still in testing phase i would rather deploy the editor so i can edit elsewhere. I have noticed that whenever i stop the app the memory usage do not go down ? is that also a know issue ?

@Yahya222 No, we have not noticed this. As you mentioned the siddhi app contains partitions and windows only?

Thanks everything seems to be working fine for now. I'll open another issue as soon as i get more insights .


Toggle use of custom policy for vault provider

Feature description
Separate booleans to decide if vault provider should be used and if a custom vault policy should be used for the provider
Why is it needed?
User feature request to enable use of the vault provider without custom vault policy
Suggestion(s)/solution(s) [Optional]
Definition of done
Checklist (after created issue)

[x] Added label(s)
[ ] Added to project
[ ] Added to milestone

No longer required by user


How to make it animate from right to left?

I have a demands that wanna make the expanded animation from right to left. Is possible to do this?

Hello @jinfagang
This is one of the feature, that I'm currently working on. Will update the package soon.

Hello @jinfagang
This is one of the feature, that I'm currently working on. Will update the package soon.

I have updated the package. Please update the package to version 0.0.7. and use the rtl support.
AnimSearchBar(
        rtl: true, // use true to make the search bar to expand from right to left
        width: 400,
        textController: textController,
        onSuffixTap: () {
          setState(() {
            textController.clear();
          });
        },
      ),

I have updated the package. Please update the package to version 0.0.7. and use the rtl support.
AnimSearchBar(
        rtl: true, // use true to make the search bar to expand from right to left
        width: 400,
        textController: textController,
        onSuffixTap: () {
          setState(() {
            textController.clear();
          });
        },
      ),

Hey @jinfagang ,
I'm closing this issue as this feature is added on the version 0.0.7.
Reopen this issue, if you feel the implementation has any problem.

Hey @jinfagang ,
I'm closing this issue as this feature is added on the version 0.0.7.
Reopen this issue, if you feel the implementation has any problem.


Possible to have recursive search in the config transform source path?

Would it be possible to add an option to perform a recursive search for the source path? I have not been able to get this to work. I have tried the standard formats such as "**\web.config", etc.
There is another task available in the marketplace which supports this option but I prefer your XML/Xpath searching since it requires no changes to the config files in the code repository.

Yep, at weekends I will take a look how it's implemented and will try to add this feature here as well.

Would realy like to have this feature available , it helps when using MSDeploy packages

Fixed and will be available as part of 1.2.
Now you can point *.json as source file for example. Also you you want to recursively search files in directory there is new option Recursive search.

Build 1.2 has been shipped.


Fallback to sha256 hash on hashes import error

People on pip < 8.x currently run into an import error before the error message about pip being outdated appears:
 > pip-compile
Traceback (most recent call last):
  File "/Users/dschaller/.virtualenvs/pip-tools/bin/pip-compile", line 9, in <module>
    load_entry_point('pip-tools==1.8.1rc1', 'console_scripts', 'pip-compile')()
  File "/Users/dschaller/.virtualenvs/pip-tools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/dschaller/.virtualenvs/pip-tools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/dschaller/.virtualenvs/pip-tools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/dschaller/.virtualenvs/pip-tools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/dschaller/Documents/git_work/pip-tools-upstream/piptools/scripts/compile.py", line 16, in <module>
    from ..repositories import LocalRequirementsRepository, PyPIRepository
  File "/Users/dschaller/Documents/git_work/pip-tools-upstream/piptools/repositories/__init__.py", line 3, in <module>
    from .pypi import PyPIRepository
  File "/Users/dschaller/Documents/git_work/pip-tools-upstream/piptools/repositories/pypi.py", line 12, in <module>
    from pip.utils.hashes import FAVORITE_HASH
ImportError: No module named hashes

After this fix:
 > pip-compile
pip-compile requires at least version 8.0 of pip (7.1.2 found), perhaps run `pip install --upgrade pip`?

cc @nvie

Thanks!


How to set another theme to default

I want to set black theme to default theme, how can I do?

theme.component.ts

you mean I can add below code to StartupService?
this.themeServ.setTheme(theme); this.settings.setLayout('theme', theme);

Binggo

thank you very much!

新版 v8.3.0 移除了 ThemesService? 意味着
this.themeServ.setTheme(theme);
this.settings.setLayout('theme', theme);
用不了了。请问在系统启动时该如何更改默认蓝色主题？


Issue #722: Document restrictions on types IH and EH in PSA

Intended to address this issue https://github.com/p4lang/p4-spec/issues/722

Why does section 7.2.7 of p4-16 working doc does not allow header_union as a member of struct?

@hesingh If I go to the working draft of the P4_16 specification here: https://p4.org/p4-spec/docs/P4-16-working-spec.html#sec-type-nesting the first table I see has a row labeled "header_union", and in the column labeled "struct or tuple" the table entry says "allow".  Do you see something different, or interpret that somehow as not being allowed?

I see
struct | allowed2 | error | allowed

7.2.7. Type nesting rulesThe table below lists all types that may appear as members of headers, header unions, structs, and tuples. Note that int means an infinite-precision integer, without a width specified.
|
-- | --
|   |   |
bit | allowed | error | allowed
int | allowed | error | allowed
varbit | allowed | error | allowed
int | error | error | error
void | error | error | error
error | error | error | allowed
match_kind | error | error | error
bool | allowed | error | allowed
enum | allowed1 | error | allowed
header | error | allowed | allowed
header stack | error | error | allowed
header_union | error | error | allowed
struct | allowed2 | error | allowed
tuple | error | error | allowed
  |   |   |
Rationale: int does not have precise storage requirements, un

7.2.7. Type nesting rules
The table below lists all types that may appear as members of headers, header unions, structs, and tuples. Note that int means an infinite-precision integer, without a width specified

This row in that table:
struct | allowed2 | error | allowed
means:
struct is allowed as a member in a header (the column heading of the second column), but see footnote 2.
it is an error if you attempt to use a struct as a member of a header_union
struct is allowed as a member in a struct or tuple

Note something is going on with the draft HTML generation though, see https://github.com/p4lang/p4-spec/issues/1175 . The released spec 1.2.3 is correct.

@jafingerhut Duh, got it, sorry. Your proposal looks fine.


Add linear variations

This adds linear variations and dictionary method for adding more variations.
Currently supported linear variations include :

nn.Linear
BitLinear
BitLinearOptimized

The latter two are added from the following Apache 2.0 licensed repository:
https://github.com/Beomi/BitNet-Transformers/tree/main

Looks good


Active iframe window doesn't consider itself as active if it was reloaded

When an iframe is reloaded by changing location or submitting a from, it's contentWindow will be reinitialized, but it will  be the same window object from top page view (iframe.contentWindow before reload === iframe.contentWindow after reload). So after iframe reloading it will be still considered as active by top window, but doesn't be considered as active from inside. It leads to infinite activation loop when trying to perform a click in this iframe.
Discovered in ASPxDockAndPopupsDemos\PopupControl\Content URL

the same as #418


Feature mute stream log for info level

Features
see issue : #1109
llm stream_response alway been print regardless of debug flag
I modified logs.py rather than config2.py.
This is because log is been set via define_log_level rather than config.yaml
To keep things simple, a global variable _print_level is introduced in logs.py
Influence
define_log_level(print_level="INFO") will mute log_llm_stream

@azurewtl Thanks for your improvements. It works when I call define_log_level(print_level="DEBUG") in my Python script entry if I want to print the LLM stream log. However, I'm considering whether to provide a simpler way to set it up, perhaps by passing environment variables METAGPT_LOG_PRINT_LEVEL and METAGPT_LOG_FILE_LEVEL?

@azurewtl Thanks for your improvements. It works when I call define_log_level(print_level="DEBUG") in my Python script entry if I want to print the LLM stream log. However, I'm considering whether to provide a simpler way to set it up, perhaps by passing environment variables METAGPT_LOG_PRINT_LEVEL and METAGPT_LOG_FILE_LEVEL?

I thought about using config. however, my proposal is that debug flag should be pass via command line tools.
Oftentimes, If we want to see debug info during development, I run program and pass debug flag such as:
python run.py --debug

Maybe YAML better off storage config that is NOT changed on ad-hoc basis. Otherwise if I want to show less or more info, I need to change config frequently.

@shenchucheng I think this is a new requirement and can be discussed additionally. This PR can be merged first

Anyway, I’ll merge first


Fix running extensions view in High Contrast theme

Testing #39568

The report issue button is especially problematic. It is also a brand new UX button... why not re-purposing the extension actions button?

In the latest Insiders (https://github.com/Microsoft/vscode/commit/12f10aba98bab2f1e5547ba4a5f8fce6d535c0ee):
Below is high contrast:

Below is dark theme:

Light themes are good

Dup of #39815


refactor: replace yarn with npm

💔 Breaking Changes

replace yarn with npm and remove dependency on yarn
bump eslint from 7.17.0 to 7.32.0
bump prettier from 2.2.1 to 2.4.1
remove @storybook/addon-info in superset-ui-demo as it isn't available on Storybook 6 and wasn't being used
remove dependency on @superset-ui/legacy-plugin-chart-word-cloud in superset-ui-demo (has been superseded by @superset-ui/plugin-chart-word-cloud)
freeze@encodable/color to 1.1.1 in superset-ui-demo

If you want to test this PR in local, please run commands in terminal
rm -rf ./{packages,plugins}/*/node_modules ./node_modules
rm -rf ./{packages,plugins}/*/yarn.lock ./yarn.lock
rm -rf ./{packages,plugins}/*/esm ./{packages,plugins}/*/lib
rm -rf ./{packages,plugins}/*/yarn-error.log ./yarn.lock
rm -rf ./{packages,plugins}/*/tsconfig.tsbuildinfo ./tsconfig.tsbuildinfo

refer to: [SIP-14] remove dependency on "Yarn" package in favor of npm

@zhaoyongjie Can you add a reference to SIP-14 in the PR's description?

Sure. Thanks.

Why are we replacing? How is it align with monorepo project?

@amitmiran137 We're using npm on the main repo (see SIP-14: https://github.com/apache/superset/issues/6217), and to simplify the toolchain, it makes sense to fully migrate to npm now. Yarn has also proven to be very bad at handling dependency resolution, due to which we're, among others, on incompatible versions of React for the current version of AntD (4.9.4 requires 17.x, we're on >=16.13).

FYI the vercel storybook preview shows a broken chart for the legacy calendar. Not sure if it's related.

The issues of Storybook will open separated PR to fix.

I left a few comments where npm ci would be better than npm install (mostly suggestions). But the release workflow is prob the most important one as npm doesn't have a --frozen-lockfile flag on install, it's essentially npm ci.

Nice catch. I am going to update this PR.

🎉 !


Protractor error 105 when trying to run conf.js using Eclipse IDE.

Hi,
I'm new to protractor, i'm trying to run the protractor scripts through Eclipse IDE. I'm seeing the same issue.
[11:20:09] E/configParser - [SyntaxError: Unexpected token class]
[11:20:09] E/configParser - Error code: 105
[11:20:09] E/configParser - Error message: failed loading configuration file E:\Protractor\Sample-Protractor\conf.js
[11:20:09] E/configParser - SyntaxError: Unexpected token class
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at ConfigParser.addFileConfig (E:\Protractor\Sample-Protractor\node_modules\protractor\built\configParser.js:128:26)
at Object.initFn [as init] (E:\Protractor\Sample-Protractor\node_modules\protractor\built\launcher.js:97:22)
at Object. (E:\Protractor\Sample-Protractor\node_modules\protractor\built\cli.js:112:10)
Below is my conf.js and to-do.js file :
conf.js class
exports.config = {
//seleniumAddress: 'http://localhost:4444/wd/hub',
directConnect: true,
specs: ['to-do.js']
};
describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('https://angularjs.org');
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});

@saicharanmallampalli It's hard to tell, but it looks like in conf.js the text class is somewhere it shouldn't be, causing the syntax error. I don't think it has anything to do with Eclipse, except for the fact that Eclipse's js code intelligence and syntax highlighting is not that good in my experience. I recommend Jetbrains Webstorm
I don't think it has anything to do with this package (protractor-cucumber-framework) either, since from what I can tell you're not using it... Please close this issue and either move it to the protractor repo, or try out Gitter.

i have same problem ......


whats wrong with this code?

Challenge Prioritize One Style Over Another has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

Hello World!

This is the right answer, there is no issue

Hello World!

@steelman80 thanks for reporting, but Github issues are not for coding help, please consult chat rooms for any assistance
Help Chat Room.
JavaScript Chat Room.


Graph utility methods

Currently some common graph operations like normalizing the edges in an undirected graph to go in both directions or checking if an edge or path is in a graph are pretty annoying due to the way we encode graphs. This PR just adds some utility methods to help with that.

Thank you, these basic and very common operations should prove to be useful. I would however not plan to extend these much further, as at some point it makes more sense to utilize a proper graph library in a problem file.


README: Explain how to use local temporary tables

We spent a good day debugging what was to us (without knowledge of driver internals) totally unexpected behaviour.
Adding this documentation will prevent others from doing the same mistake. This may be considered a fix for #436.

Re-submitting as I did a mistake


[FEA] support spark.sql.legacy.timeParserPolicy when parsing CSV files

Is your feature request related to a problem? Please describe.
We should  support spark.sql.legacy.timeParserPolicy when parsing CSV files

Needs additional support for CSV parsing in cudf.


Upgrade script tweak

have the upgrade script chown -R /var/www/freeswitchpbx

@junction1153 This has been added

done


New RedundantAssignment rule

Upgrading discussion #105 to an issue for visibility. See the linked discussion for more details, but any conversation about this rule should occur here.

@a-frantz I'm happy to take this one on!

@michaelgattas all yours!
I wasn't explicit about this small complication, but this rule is going to need to check the version of the document, and only fire if the version is >=v1.1 (i.e. this should be silent in 1.0 documents). There are examples of other rules checking the version, so you can just follow those examples (missing_runtime.rs is one of those examples).

@a-frantz do you think this should this create a Warning or Note diagnostic?

@a-frantz do you think this should this create a Warning or Note diagnostic?

I think this is note territory. The more verbose syntax isn't a source of confusion.


Added new contributor as reviewer

As a pull request owner and reviewers, I checked that:

[X] no need for checkboxes

/lgtm

/lgtm


File uploads: add a paperclip like library

see more here:
https://github.com/m1guelpf/flysystem/issues/2
it should be added as a first-class facility, Option<..> on AppContext, and have its own configuration section in config/

Hi! I think supporting file uploads would be a great value-add for Loco. I was wondering if you had considered object_store? (no affiliation at all)

@kaplanelad Hello here, I would like to work on this issue. Would you mind assign this issue to me please?

sure, thanks @yinho999

@jondot, could you clarify what 'T' represents in the App Context - Option? Are you referring to the middleware-preprocessed files or the file builder itself?
According to the Axum documentation, multipart form data extraction must consume the request body, which necessitates the Multipart extractor being the final extractor in a handler chain. This implies that file preprocessing cannot occur within the middleware but must instead be handled directly within the handler.
To enhance usability, I recommend providing additional helper functions for the file builder.
For your reference, here is a simple test code example: https://github.com/yinho999/loco-playground/blob/master/src/bin/multipart.rs

see more here: m1guelpf/flysystem#2
it should be added as a first-class facility, Option<..> on AppContext, and have its own configuration section in config/

Try adding flysystem to the project and find that there will be dependency conflicts.
vscode ➜ /workspaces/loco_admin (main) $ cargo add flysystem
    Updating crates.io index
      Adding flysystem v0.1.3 to dependencies.
             Features:
             + local
             + s3
    Updating crates.io index
error: failed to select a version for `flysystem`.
    ... required by package `loco_admin v0.1.0 (/workspaces/loco_admin)`
versions that meet the requirements `^0.1.3` are: 0.1.3

the package `loco_admin` depends on `flysystem`, with features: `tokio` but `flysystem` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

failed to select a version for `flysystem` which could resolve this conflict
vscode ➜ /workspaces/loco_admin (main)

@fan-tastic-z i'm already working on this feature.
I'm creating a crate that more fit more to our needs and integrate with the project.
I'll upload a draft PR later on this week

@kaplanelad Is there anything that I can help about ur crate? I was working on this issue for a couple days now.

@yinho999 sure!
i'll publish code to draft PR, you can do the same and we can compare the implementation and bring only the good stuff :)

@fan-tastic-z i'm already working on this feature. I'm creating a crate that more fit more to our needs and integrate with the project.
I'll upload a draft PR later on this week

@kaplanelad Thank you very much, looking forward to this feature

https://github.com/loco-rs/loco/pull/405

new PR: https://github.com/loco-rs/loco/pull/423


update tungstenite so it's possible to build without openssl

start with #321
update tungstenite to 0.14 and tokio-tungstenite = "0.15"
add rustls as development dependency for tests/controller.rs
rename Goose rustls feature to rustls-tls as feature and library can't share the same name

With this update, if you enable the rustls-tls feature you no longer get openssl in your cargo tree:
% cargo tree | grep -i openssl
% cargo tree | grep -i tls
│   ├── hyper-tls v0.5.0
│   │   ├── native-tls v0.2.7
│   │   └── tokio-native-tls v0.3.0
│   │       ├── native-tls v0.2.7 (*)
│   ├── native-tls v0.2.7 (*)
│   ├── tokio-native-tls v0.3.0 (*)
├── native-tls v0.2.7 (*)
├── rustls v0.19.1


Metis fill reduce reordering

This PR adds support for the METIS Fill reduce reordering in Ginkgo. METIS uses the Multi-level nested dissection algorithm to compute the fill reducing orderings. Some documentation with regard to the function and its parameters is available on the METIS website.
Additionally, this PR also adds some support for using METIS functions in Ginkgo.

Automatically find the METIS library using the cmake find_package.
An alias for the integer types within Ginkgo for the supported METIS types within the installed library. (A nuance here is that the user needs to modify the METIS header file,  metis.h to setup the integer type that METIS can work with when installing METIS. Ginkgo automatically instantiates this MetisFillReduce class only for that type. )

Currently, only Reference and OpenMP(same as ref) kernels are implemented. It could be interesting to implement CUDA kernels, but this is probably quite time-consuming.
TODO

[ ] Merge #352 first.

A general comment/question: Do we need a separate METIS wrapper for each executor?

I currently just call the serial Metis functions directly. But I guess the better way would be to implement the nested dissection algorithm they use and implement as stated here for multi-core. Possibly this improved multi-core algorithm would work for GPU's as well, but I dont think that will be trivial.

@upsj , what you say makes sense. As this was just for personal use anyway. I dont think it makes much sense to merge this PR into develop. I will close this PR.
It actually probably makes more sense to write the algorithms themselves (Nested Dissection) which probably will be useful in many other cases as well. As this is currently out of my scope, I will close this PR.


Release checklist v22.0.0

Python and Numpy Version

[x] If major or minor release check python and numpy variants that should be supported nep-0029
[x] If adding new variants build new binaries of pinned versions of Tomophantom, CCPi-Regularisers, TIGRE

[x] Update conda_build_config for new variants
[x] Cherry-pick commit on to tag
[x] Retag with updated list
[x] Force jenkins to rebuild tag
[x] TIGRE-conda is built on vishhighmem with CUDA TK 9.2
[x]  Windows builds of Tomophantom, CCPi-Regularisers, TIGRE
[x] Label binaries as main and dev on anaconda

[x] Update CIL conda_build_config for new variants
[x] Run conda build locally with all tests on linux
[ ] Run conda build locally with all tests on windows

CIL Changes

[ ] Final PR named "Pre-release update for vX.X.X"
[ ] Check CHANGES.md
[ ] Check NOTICE.txt
[ ] Check CITATION.cff
[ ] Check README.md

After Jenkins is happy

[ ] git tag -a v$VER -m "version $VER"
[ ] git push origin v$VER
[ ] create release on GitHub

Build binaries

[ ] Check Anaconda for Jenkins upload, tag as main and dev
[ ] Build Windows binaries and upload to anaconda, tag as main and dev

After Uploads are done

[ ] Send email to<EMAIL_ADDRESS><EMAIL_ADDRESS>[ ] Make an announcement on discord

Having trouble building all on windows see #1324


PCB/IN spellcard score table header is not translated.

And character names for main scoretable.

Seems fixed

This issue still persists. Screenshots for reference.
PCB - Untranslated character name and mojibake in the up/down arrows in spellcard results menu:

PCB - Untranslated character names in statistics table:

IN - Untranslated character names in statistics table, and also the difficulties are completely missing:

(Tables also have the wrong formatting, see https://github.com/thpatch/thcrap/issues/60)


Nested evaluation of LG Templates

Is your feature request related to a problem? Please describe.
Right now, I have to create a new Activity template for each response text in an lg file to explicitly set the inputHint.  As the number of responses increases, so does the number of templates required. It would be great if a single activity template could take a response text title as an input and generate the output activity based on the title given
Describe the solution you'd like
A method to pass the response text title to the TemplateEngine.GenerateActivityForLocale() method and be able to use a single activity template in the .lg file to generate a response activity dynamically
[enhancement]

Hi @manish-95
I'm not 100% sure if i understand the ask, but does the following accomplish what you need?
# singleActivityTemplate(title, inputHint)
[Activity
    Text = @{if(isTemplate(title), template(title), title)
    InputHint = @{inputHint}
]

Hi @dmvtech , I tried implementing this but I get a response activity with the text field populated with @{if(isTemplate(title), template(title), title) as its value.

Hi @dmvtech , I tried implementing this but I get a response activity with the text field populated with @{if(isTemplate(title), template(title), title) as its value. Are isTemplate(title) and template(title) built-in functions, or do I have to define them?

Try add a close curly bracket }

@Danieladu Have added that as well. Now I get the following error:
error message: isTemplate does not have an evaluator, it's not a built-in function or a customized function in expression 'if(isTemplate(title), template(title), title)'

@manish-95 are you using the latest from the botbuilder myget feed or Nuget? can you try the latest nightly from the myget feed and report back? https://botbuilder.myget.org/gallery/botbuilder-v4-dotnet-daily

@vishwacsena After updating all the packages , I now get a new error as follows:
System.TypeLoadException: 'Could not load type 'Microsoft.Bot.Builder.LanguageGeneration.TemplateEngine' from assembly 'Microsoft.Bot.Builder.LanguageGeneration, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.'

@vishwacsena After updating all the packages , I now get a new error as follows:
System.TypeLoadException: 'Could not load type 'Microsoft.Bot.Builder.LanguageGeneration.TemplateEngine' from assembly 'Microsoft.Bot.Builder.LanguageGeneration, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.'

We have updated the API in the new version. So replace TemplateEngine with LGFile,
the classic sample is as follows:
var lgFile = LGParser.ParseFile('your lg file path');
var result = lgFile.EvaluateTemplate("templateName", scope);

I am using this with the latest version of the Virtual Assistant solution, so the solution template is built to reference the TemplateManager, which internally uses the TemplateEngine. The entire structure will have to be changed to incorporate the solution provided by you ,right  @Danieladu ?

@manish-95 yes, all references to TemplateEngine needs to be updated.

Reassigned to Vishwac. @vishwacsena, could you please triage this. I'm not sure if it's in scope for R8.

Closing with the solution provided. @manish-95 please update your bot to use the latest nightly packages and reactivate this ticket if you need further assistance.


Improved handling of receipts

We noticed obtaining the App receipt isn’t as straightforward as we thought.
NSBundle.mainBundle().appStoreReceiptURL returns an NSURL describing the path behind which the receipt can be found, if there is one!
To quote the documentation: (https://developer.apple.com/documentation/foundation/nsbundle/1407276-appstorereceipturl)
For an application purchased from the App Store, call this method on its application bundle locate the receipt. This method makes no guarantee about whether there is a file at the returned URL — only that if a receipt is present, that is its location.
In such a case, you have to start a SKReceiptRefreshRequest. This tries to download a receipt and saves it in the known destination if everything succeeds.
Obviously the process must be asynchronous now.
On top fo this, we fixed a couple of minor issues with v3.0.0 and added a new method to request the receipt in iOS whenever it's needed.

@emilioicai Really thanks for this! Could you kindly rebase this withmaster once again? There seems to remain conflict rebasing it with the master branch.

Hey @hyochan I tried rebasing again but it looks the fork is totally up to date. Could you point out which commit is missing?

I am still seeing above. Did you fetched upstream?


How is the noSpawn hook supposed to work?

An example in your documentation would be awesome.

It's basically a hook that gets triggered when there is nothing to spawn when a spawn can spawn something.

Right, but what is it meant to return?

No, its just a hook with some parameters to execute the needed information. First being the spawn, the second being a function to spawn a creep even though you can use the spawn itself to make a creep spawn.
The custom spawn function is just to convert role information into a creep, which may need some documentation later on. But for the moment being, there are lots of other stuff I like to tweak as well and things can be very unstable (it's very fresh code).
It's being triggered here: https://github.com/avdg/screeps/blob/761999a0dc3d5d7bce9ffc6aaad8919def3805f0/extensions/tools/scripts/spawners.js#L123


Implement email verification flow for authentication

Once we have email verification code endpoints (or another solution) implemented on api.lbry.io, the rewards flow needs to be updated in order to allow a user enter a verification code after they provide their email address.
Once an email address is verified, an authentication token can be retrieved which will be used to send the device_id to the API.
#168 and #180 depend on this.

@akinwale what about the changes that need to happen that are outside of this repo?

@kauffj I filed https://github.com/lbryio/internal-apis/issues/454


bump volumes-operator version 1.7 -> 1.8 for release 1.8

This issue tracks the process of bumping kubeflow-volumes-operator version from 1.7 to 1.8. For the process, we 're following our internal release handbook document that has a section about manifest files upgrades and images upgrades.
The changes that this process will introduce should match the upstream ones https://github.com/kubeflow/manifests/pull/2522 and they are expected to be templates updates and image versions' bumps.

These changes introduced a configMap and a corresponding volume for which I followed what we had done recently in katib-operators described here https://github.com/canonical/katib-operators/issues/122#issuecomment-1691749013 but updated it with my current understanding. How we should implement those, in podSpec charms at least, is:
        volumeMounts:
        - name: viewer-spec
          mountPath: /etc/config/viewer-spec.yaml
          subPath: viewer-spec.yaml

                            {
                                "name": $name,
                                "mountPath": $mountPath - $subPath,
                                "files": [
                                    {
                                        "path": $subPath,
                                        "content": ...
                                        ),
                                    }
                                ],
                            },


Update code of conduct to properly align to the behavior observed from DHH.

I haven't been personally active in the Rails community for quite some time now, and this library change personally does not affect me, but it's sad to see this is happening right now.
I see clear disrespect, obsoleting valuable PRs by making rash decisions without conferring with the community in #971, completely ignoring a valid argument by @t3dotgg saying "maybe this isn't the project for you" in #977. What happened in #977 doesn't really break the code of conduct, but it certainly isn't welcoming which is outlined as the interest of the Code of Conduct:

I see you calling members of your project's community "Hooligans". Everybody is free to share their disagreement in a harm free manner, and I see no harm being done by those you have called out in your blog post. @scorbettUM and @t3dotgg are both valuable members of the wider OSS community whose words carry far more weight than mine even in our "dogmatic circle" as you so call it.
I'm certain this PR will get closed and locked as the rest have (and I see it's already been done by someone I don't recognize!). Before that happens @dhh, I ask you this: Do you have what it takes to accept this PR and admit that "community doesn't matter" is your mindset? If that is the case, I can see forks being made and favored by most as a likely outcome from this point forward. If you don't admit to it, the same thing will likely happen, but slower.
These are your options, and the future of your project relies on your decisions. Like you and many others have said, it is "your" project. The community can fork it and maintain it how they see fit.

It is worth noting this behavior has also been exhibited by the maintainer of Serde in the rust community and the "maintainer" of Twitter. It is truly sad to watch.

It is worth noting this behavior has also been exhibited by the maintainer of Serde in the rust community and the "maintainer" of Twitter. It is truly sad to watch.

While every opinion is valid. I think his behavior and seeing "hooligans" rather than contributors side of view is terrible. Anyway TS has me building type safe APIs and I have nothing to do with turbo. This hostility should end😹

Anyway TS has me building type safe APIs and I have nothing to do with turbo. This hostility should end😹

true that xD

At this point I'm pretty sure DHH does things just so he can then write about the inevitable backlash. :smile:
Next up: DHH removes Ruby from Ruby on Rails.

I haven't been personally active in the Rails community for quite some time now, and this library change personally does not affect me, but it's sad to see this is happening right now.

This is the typical comment from someone who found out about the change on Twitter and is too bored to argue.
This project uses the MIT license. If someone doesn't like the decisions of the main person in charge, they are free to fork and maintain a project to their liking.

This project uses the MIT license. If someone doesn't like the decisions of the main person in charge, they are free to fork and maintain a project to their liking.

Yeah, but since the community helped bring this project to this point wouldn't it be fair to ask for said community's opinion before important changes such as these are implemented?

Yeah, but since the community helped bring this project to this point wouldn't it be fair to ask for said community's opinion before important changes such as these are implemented?

 But contributing to a project shouldn't give you the power to decide the direction of the project. You freely contribute without expecting anything in return. In open communities, someone always has to take the helm so that false democracy does not make the project ungovernable. IMHO.

@javierav First of all thanks for your answer. I can see the logic behind your arguments but that doesn't necessarily mean I fully agree with them. However, I haven't maintained large OS projects so I don't really know what it implies.

 But contributing to a project shouldn't give you the power to decide the direction of the project. You freely contribute without expecting anything in return. In open communities, someone always has to take the helm so that false democracy does not make the project ungovernable. IMHO.

 This is a terrible way to run an open source project, and as an OSS maintainer I can definitively say this is not how I run any of my projects.
I do expect something in return when I contribute to projects, and furthermore I fully expect that other people will expect something when they contribute to projects I maintain: the common courtesy of addressing their feedback and concerns respectfully.
I have re-opened issues and PRs that I'd previously closed after some more context has been provided and I realize, oh right, you have a point there. I also don't recall ever opening a PR that dramatically changed the structure of a codebase and how people are able to contribute to it and then merging that PR on the same day as part of a publicity stunt with no community feedback process in place.
There is no place for that nonsense in open source.

lmao

I feel these changes are valid, considering the response to #977
If the company wishes to proceed in a particular direction against the opinion of contributors, then the CoC should be updated to reflect this

In the wise words of one widely recognised OSS author:

The only people entitled to say how open source 'ought' to work are people who run projects, and the scope of their entitlement extends only to their own projects.

Just because someone open sources something does not imply they owe the world a change in their status, focus and effort, e.g. from inventor to community manager.

As a user of something open source you are not thereby entitled to anything at all. You are not entitled to contribute. You are not entitled to features. You are not entitled to the attention of others. You are not entitled to having value attached to your complaints.

https://gist.github.com/richhickey/1563cddea1002958f96e7ba9519972d9
Those words were of big influence within the (already respectful) Clojure community and helped us understand better our role as producers and consumers of OSS (I happen to be both, currently for a living).
I hope they're useful to anyone else reading here!


Any Plans to Support Java Modules?

Wondering if there is any plans/possibilities to support java modules.

No immediate plans. I imagine it won't do much good until Jetty is modularized? Also, how does this work when it's a Kotlin project?

If all the dependencies have their module-info.class, then it should be is as easy as adding module-info.java to Javalin's source.
There are dependencies that currently make it impossible to compile using IntelliJ's built in compiler; I mention this for completeness sake (https://youtrack.jetbrains.com/issue/IDEA-171320).  I'm blocked at the moment by auto-modules, and not by this bug.

I stand corrected.  I tried a simple Kotlin project and only got the module-info.class added to the jar with a tool plugin. With other attempts Kotlin and/Maven only stopped complaining about modules and/or module-info.java when changing the Java source version, which meant that the artifact could no longer be used as a dependency in a project running JRE8.
I also noticed that the Kotlin standard library will also need a "JPMS" module-info.
I created a repository that compiles the artifact with a JDK8/JDK11 javac, and runs on JRE8/JRE11:
https://github.com/ZoftWhere/mutable-value-kt

We recently tried to modularize a project depending on javalin and I wanted to add our findings about the current state here:
Javalin provides an automatic module name, so we can use requires io.javalin in module-info.java, but we additionally use javalin-openapi where we encountered 2 problems:

does not provide an automatic module name, so we have to use the autogenerated requires javalin.openapi.
the package name io.javalin.plugin.openapi.annotations is used in the base module as well as the openapi mdule, which is not allowed in jpms.
Fixing the first would be easy, but I think it should only be done once/if the second issue is resolved.

On the topic of going fully modularized:

kotlin 1.4 (released 08/2020) seems to have modularized the kotlin standard library: 1.4release notes
jetty seems to be modularized since version 10.0: eclipse/jetty.project@5f972b45

I'm not sure about maven support for modularized kotlin, and ensuring backward compatibility. And of course the package collisions would also have to be resolved first.

We recently tried to modularize a project depending on javalin and I wanted to add our findings about the current state here:
Javalin provides an automatic module name, so we can use requires io.javalin in module-info.java, but we additionally use javalin-openapi where we encountered 2 problems:

does not provide an automatic module name, so we have to use the autogenerated requires javalin.openapi.
the package name io.javalin.plugin.openapi.annotations is used in the base module as well as the openapi mdule, which is not allowed in jpms.
Fixing the first would be easy, but I think it should only be done once/if the second issue is resolved.

On the topic of going fully modularized:

kotlin 1.4 (released 08/2020) seems to have modularized the kotlin standard library: 1.4release notes
jetty seems to be modularized since version 10.0: eclipse/jetty.project@5f972b45

I'm not sure about maven support for modularized kotlin, and ensuring backward compatibility. And of course the package collisions would also have to be resolved first.

Thanks @wirew0rm! If you want to implement an improvement and create a PR, I would be happy to merge it :)

@wirew0rm it looks like  io.javalin.plugin.openapi.annotations is gone from the main module now.

Modularization of Javalin would be probably considered as a breaking change, because such action often requires project restructurization to properly encapsulate packages and model relations between them, so it could be at some point addressed by:

#1517

What's the real benefit of using JPMS in Javalin? As long as I can see benefits of this in JDK implementation, so we can e.g. minimize bundle size with tools like JLink, it's not that obvious for a standard library. The fact is that it will more likely affect internals due to the required policy defined in module-info files and it will complicate build process with all that open/export flags passed as params to various plugins.

Closing this due to lack of interest, but happy to open again if people become interested.

requires project restructurization to properly encapsulate packages and model relations between them, so it could be at some point addressed by:

Sure you could restructure, but alternatively, you could export everything and worry about restructuring later.

The fact is that it will more likely affect internals due to the required policy defined in module-info files and it will complicate build process with all that open/export flags passed as params to various plugins.

are you guys really doing that much reflection?

@SentryMan I'm happy to merge a PR for this, but having no experience with Java modules I'm not the best potential author for that PR. Do you want to give it a try? 😊

Brotli is important, however, jvmbrotli hasn't been updated in 4 years and is vulnerable to https://github.com/advisories/GHSA-5v8v-66v8-mwm7. We can consider migrating to some other library such as Brotli4j.

Yeah this blocked until we can get this resolved.

@SentryMan this is an optional dependency. Does optional dependencies not work anymore with with this setup? Should we decouple it more?


Plugin keeps the location service on forever

Describe the bug
If you are using this plugin the location service will be always on even if the app is running in the background. When you are using Google Maps, the location example, ... you will notice all of them turn the location service off when it's not used. But due to https://github.com/igaurab/user_location_plugin/blob/af89e2dd6c7f8cf91b5398c50ddd6acdd7b56ce3/android/src/main/kotlin/com/example/user_location/UserLocationPlugin.kt#L48 here the location service is kept on ... always.
To Reproduce
Steps to reproduce the behavior:

Run the example app
You will see the little location icon in the status bar, i.e. the app is accessing the location service.
Move the app to the background. The location service will be kept on. You still see the location icon in the status bar.

Expected behavior
The location service is not kept on forever. Like the Google Maps app, the location example, etc. it's off once the app goes into the background.

Thanks for pointing it out. Are you currently working on the issue?

No. I don't know how to fix that directly in Android / iOS but a solution would be nice.


Fix gh-4091

update wro.xml and navbar's css.

@zhanming Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@zhanming Thank you for signing the Contributor License Agreement!


Separating tools dependencies from main dependencies

Adding gowrap in #4879 pulled in an additional 30MB of dependencies, which is
pretty ridiculous.  It's happening because, while gowrap uses a tools-tagged tools.go,
it's in the same module as everything else, so its dependencies are pulled in too, because
Go has no way to tell that it's not needed by callers (it needs to consider ALL tags).
We're doing the same thing.  Granted, we're an application and not a library, but it still
seems kinda unnecessary.  And it forces quite a large number of upgrades we may not want to
force (yet).
So this moves tools.go to a new package, sets up a new go.{mod,sum} just for it, and adds
a bit of automation to prevent it from drifting too far from the main module.
With this, go mod tidy in the top level does not consider tools-dependencies any more,
so we actually remove some, and do not add tons more or force upgrades to pull in gowrap/etc
in the future.

internal/tools is just because it needs to be in a separate package, and "tools" was taken.
plus nobody should ever import it, so it should be a clear "dependency dead-end".

Pull Request Test Coverage Report for Build 0181d1c0-fc01-4c1a-b6e4-0a7fab8d22cd

0 of 0   changed or added relevant lines in 0 files are covered.
120 unchanged lines in 17 files lost coverage.
Overall coverage decreased (-0.001%) to 57.735%

Files with Coverage Reduction
New Missed Lines
%

service/history/queue/timer_queue_processor_base.go
1
77.26%

client/history/client.go
2
38.05%

client/history/metricClient.go
2
45.3%

common/peerprovider/ringpopprovider/config.go
2
81.58%

service/history/execution/mutable_state_util.go
2
36.14%

service/history/handler.go
2
47.6%

service/matching/matcher.go
2
91.46%

service/matching/taskListManager.go
2
73.77%

service/history/task/fetcher.go
3
91.79%

common/task/fifoTaskScheduler.go
4
80.41%

Totals

Change from base Build 0181d076-7036-4d0c-ae6f-eb8827788d81:
-0.001%

Covered Lines:
83684

Relevant Lines:
144945

💛  - Coveralls


Corrected install instructions for OS X

gtksourceviewmm3 is now properly part of homebrew and can be installed directly instead of using homebrew/x11/gtksourceviewmm3.

Thank you! Merging now.


Storing Secrets in Apollo GraphQL Serverless Stack Example

Hi there,
I am trying to figure out how to deal with fetching SSM secrets according to this documentation:
https://serverless-stack.com/chapters/storing-secrets-in-serverless-apps.html

IT seems that this document is a bit outdated so I referred to these Docs instead: https://docs.serverless-stack.com/environment-variables
I am trying to do the following to try and fetch my Secret from SSM. However, I am not sure how do I pass this so that it is able to be used in my lambda function. Is it possible for me to do that so that it is only fetched once before the function is deployed and then it is able to be used in the function? Here is what I'm doing:
import {ApolloServer, Config, CreateHandlerOptions} from "apollo-server-lambda";
import {LambdaContextFunctionParams} from "apollo-server-lambda/dist/ApolloServer";

import schema from "./graphql/schema";
import AWS from "aws-sdk";
import {GetParameterRequest} from "aws-sdk/clients/ssm";

const IS_LOCAL = !!process.env.IS_LOCAL;

const server = new ApolloServer(<Config<LambdaContextFunctionParams>>{
  schema,
  playground: {
    endpoint: "/dev/graphql"
  },
  introspection: IS_LOCAL,
});

const ssm = new AWS.SSM();
console.log(`Here is my secret anonkeyPath=${process.env.MY_SECRET_KEY}`);
const mySecretKeyPromise = ssm.getParameter(<GetParameterRequest>{
  Name: process.env.MY_SECRET_KEY,
  WithDecryption: true,
}).promise();

async function getSecretKey(): Promise<string | undefined> {
  try {
    const mySecretKey: string | undefined = (await mySecretKeyPromise).Parameter?.Value;
    if (mySecretKey == undefined) {
      console.error("Anonymous secret Key was null");
    }
    return mySecretKey;
  } catch (error) {
    console.error("There was an error trying to fetch the super Anonymous Key", error);
    return undefined;
  }
}

// console.log(`Here is my event=`, event, `context=`, context);

const superSecretKey = getSecretKey();

console.log(`Here is my secret anonymous key=${superSecretKey}`);
export const handler = server.createHandler(<CreateHandlerOptions>{
  cors: {
    origin: true,
    credentials: true
  },
});

I'd love for some pointers and guidance on this!

Hi @ngoctranfire, essentially you make an AWS SDK call to SSM to fetch the value inside index file, and you can pass the value to your stacks.
I added an example in the doc - https://docs.serverless-stack.com/environment-variables#working-with-secrets
And here's a sample repo - https://github.com/fwang/sst-load-ssm

@fwang Thanks so much for such a detailed and awesome response. This has fixed my issue. I actually just passed it from the index.js (where I got my parameter store values) and passed it into the Environment Props. Your example was super helpful to help me get this setup. It was a lot simpler than I expected!


OAuth2 implementation.

Is your feature request related to a problem? Please describe.
I can receive mail from my school e-mail, but sending it is currently not possible through K-9 Mail.
When I configure the SMTP, K-9 Mail returns an error about SmtpClientAuthentication being disabled for the Tenant.
Describe the solution you'd like
I would love to see the addition of OAuth2 in the Security methods, so I can configure the email that way.
This works in Thunderbird, so I hope it will be possible here.
Describe alternatives you've considered
Another solution would be to use a separate app, but I do not really want to do so.
Additional context
An example of the error:

There's already issues for OAuth2 support. We'll work on that when improving account setup. This is fairly high up on the list of priorities.

Hello,
It seems that Google will be terminating the traditional authentication method currently in-use by K-9 Mail by May 30.
Here is a mail sent to some accounts with less secure access enabled:

This deadline and the popularity of Google accounts in contrast to Yahoo! Mail and US universities' mail systems may bring this issue to a wider attention. At least it did for me.


Consider extracting the Markdown component

If I'm right about this, this is the only reason for the earmark dependency. Since probably most people won't need it, consider extracting the component into its own hex package (there may be other ways to accomplish the same)...

@msaraiva I am in favour of this extraction. I do believe we should do the same with the Code Macro Component from the surface_site repository after some refactoring. WDYT?

Is the idea to create a separate surface_markdown project or something more generic? The Code component, for instance, does not depend on markdown.

Is the idea to create a separate surface_markdown project or something more generic? The Code component, for instance, does not depend on markdown.

The idea is to create a surface_markdown repository to remove the earmark dependency from Surface as it is not needed in Surface except for that component that I suspect it is not, or it will not be, used so often. In my projects for example, I do not use it.

I agree. Let's extract it then 👍