new feature: adding LOBPCG solver in svds in addition to ARPACK

Reproducing code example:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.svds.html is a

naive implementation using ARPACK as an eigensolver on A.H * A or A * A.H, depending on which one is more efficient.

It is simple and beneficial to add an alternative to ARPACK solver https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lobpcg.html again just on A.H * A or A * A.H, depending on which one is more efficient. It is demonstrated in MATLAB that LOBPCG may outperform ARPACK for such a use, see comments at https://www.mathworks.com/matlabcentral/fileexchange/48-lobpcg-m
Error message:
N/A
Scipy/Numpy/Python version information:
N/A

@rc @pvanmulbregt
This is now done in scikit-learn and can probably be just mostly copy/pasted from https://github.com/lobpcg/scikit-learn/blob/lobpcg_svd/sklearn/utils/extmath.py to scipy...
It works well for dense truncated_svd too.

@lobpcg You can also open a PR which might be a bit more focused.

@lobpcg Let's see how the scikit-learn version review goes. I will not be of much use during the weekend anyway...

PR #9650 is now merged to the master

Thanks @lobpcg, all. Closing.

@rgommers you closed the wrong PR! Please reopen this one and close PR #9650

@rgommers as well as the  1.3.0 milestone...

Don't think so - this is an issue, not a PR. PR gh-9650 is merged (which is its final status, it doesn't need closing) and will be present in the next release. This issue is about the same thing right, and gh-9650 implements what is suggested in this issue? Hence this one can be closed (or is there anything left to do?).

Sorry for the confusion. PR gh-9650 does not address any open issues - it is just a bug-fix release of lobpcg for eigenvalue problems. There was no issue to close with it now added to the master - I was incorrect in this respect.
The present issue is to add lobpcg as a new SVD solver. It depends on   PR gh-9650 but the work is not yet even started. Could you please reopen it and remove it from the 1.3.0 milestone, to play it safe?

Ah okay, got it - thanks @lobpcg, reopening:)

Here is how this was done in https://github.com/scikit-learn/scikit-learn/pull/12319/ :
def lobpcg_svd(M, n_components, n_oversamples=10, n_iter='auto',
               transpose='auto', flip_sign=True, random_state=0,
               tol=None, explicitNormalMatrix=None):
    """Computes a truncated SVD using LOBPCG to accelerate the randomized SVD.
    Compared to 'randomised', the 'lobpcg' option gives more accurate
    approximations, with the same n_iter, n_components, and n_oversamples,
    at the slightly increased costs, allows setting the tolerance, and can
    output the accuracy. tol = None or tol = .0 in 'lobpcg' is ignored and
    substituted by a local default in LOBPCG.
    Parameters
    ----------
    M : ndarray or sparse matrix
        Matrix to decompose, real or complex.
    n_components : int
        Number of singular values and vectors to extract.
    n_oversamples : int (default is 10)
        Additional number of random vectors to sample the range of M so as
        to ensure proper conditioning. The total number of random vectors
        used to find the range of M is n_components + n_oversamples. Smaller
        number can improve speed but can negatively impact the quality of
        approximation of singular vectors and singular values.
    n_iter : int or 'auto' (default is 'auto')
        Number of lobpcg iterations. It can be used to deal with very noisy
        problems. When 'auto', it is set to 4, unless `n_components` is small
        (< .1 * min(X.shape)) `n_iter` in which case is set to 7.
        This improves precision with few components.
    transpose : True, False or 'auto' (default)
        Whether the algorithm should be applied to M.T instead of M. The
        result should approximately be the same. The 'auto' mode will
        trigger the transposition if M.shape[0] > M.shape[1] since this
        leads to the normal matrix of the smaller size and thus runs faster.
    flip_sign : boolean, (True by default)
        The output of a singular value decomposition is only unique up to a
        permutation of the signs of the singular vectors. If `flip_sign` is
        set to `True`, the sign ambiguity is resolved by making the largest
        loadings for each component in the left singular vectors positive.
    random_state : int, RandomState instance or None, optional (default=None)
        The seed of the pseudo random number generator to use when shuffling
        the data.  If int, random_state is the seed used by the random number
        generator; If RandomState instance, random_state is the random number
        generator; If None, the random number generator is the RandomState
        instance used by `np.random`.
    tol : scalar, (default=None)
        Optional solver tolerance (stopping criterion), if large enough, may
        overwrite n_iter. If None, lobpcg sets is internally.
    explicitNormalMatrix : boolean, (default=None)
        Optional parameter that determines if the normal matrix used by lobpcg
        is computed explicitly or implicitly via LinearOperator performing
        multiplication of the normal matrix and a vector. The latter may be
        faster for data matrices M of large sizes or sparse.
    Notes
    -----
    LOBPCG solver may become numerically unstable if the requested tolerance
    is unreasonably small and the maximal number of iterations is large.
    References
    ----------
    Toward the Optimal Preconditioned Eigensolver: Locally Optimal Block
    Preconditioned Conjugate Gradient Method, Andrew V. Knyazev (2001)
    https://doi.org/10.1137%2FS1064827500366124
    """
    if isinstance(M, (sparse.lil_matrix, sparse.dok_matrix)):
        warnings.warn("Calculating SVD of a {} is expensive. "
                      "csr_matrix is more efficient.".format(
                          type(M).__name__),
                      sparse.SparseEfficiencyWarning)

    random_state = check_random_state(random_state)
    n_random = n_components + n_oversamples
    n_samples, n_features = M.shape

    if n_iter == 'auto':
        # Checks if the number of iterations is explicitly specified
        # Adjust n_iter. 7 was found a good compromise for PCA. See #5299
        n_iter = 7 if n_components < .1 * min(M.shape) else 4

    if transpose == 'auto':
        # Make the normal matrix A with the smallest size
        transpose = n_samples > n_features
    if transpose:
        M = M.T.conj()

    Q = random_state.normal(size=(M.shape[0], n_random))
    if M.dtype.kind == 'f':
        # Ensure f32 is preserved as f32
        Q = Q.astype(M.dtype, copy=False)

    # The values are chosen experimentally
    if explicitNormalMatrix is None:
        if sparse.issparse(M):
            explicitNormalMatrix = False
        elif min(M.shape) > 4000 or min(M.shape)/max(M.shape) > 0.5:
            explicitNormalMatrix = False
        else:
            # Rectangular and small-size data matrix M
            explicitNormalMatrix = True

    # Determine the normal matrix
    if explicitNormalMatrix:
        A = safe_sparse_dot(M, M.T.conj())
    else:
        MLO = aslinearoperator(M)

        if hasattr(MLO, 'H'):

            def _matvec(V):
                return MLO(MLO.H(V))

        else:  # Old SciPy versions.
            MTLO = aslinearoperator(M.T.conj())

            def _matvec(V):
                return MLO(MTLO(V))

        Ms0 = M.shape[0]
        A = LinearOperator(dtype=M.dtype, shape=(Ms0, Ms0),
                           matvec=_matvec, matmat=_matvec)

    # For lobpcg debugging, use verbosityLevel = 1
    lobpcgVerbosityLevel = 0
    # lobpcg computes largest, be default, eigenvalues of the normal matrix
    # A, given implicitly via LinearOperator or explicitly as dense or sparse
    _, Q = lobpcg(A, Q, maxiter=n_iter,
                  verbosityLevel=lobpcgVerbosityLevel, tol=tol)
    del A

    # Project M to the (k + p) dimensional space using the basis vectors
    B = safe_sparse_dot(Q.T.conj(), M)

    # Compute the SVD on the thin matrix: (k + p) wide
    Uhat, s, V = linalg.svd(B, full_matrices=False)

    del B
    U = np.dot(Q, Uhat)

    if flip_sign:
        if not transpose:
            U, V = svd_flip(U, V)
        else:
            # In case of transpose u_based_decision=false
            # to actually flip based on u and not v.
            U, V = svd_flip(U, V, u_based_decision=False)

    if transpose:
        # Transpose back the results according to the input convention
        return (V[:n_components, :].T.conj(), s[:n_components],
                U[:, :n_components].T.conj())
    else:
        return U[:, :n_components], s[:n_components], V[:n_components, :]

I do not have a setup for contributing to SciPy

Hi @lobpcg, if the above is still the case, I'm interested in trying to add in the new feature! I do have a local scipy setup and am definitely interested in trying this out.

I do not have a setup for contributing to SciPy

Hi @lobpcg, if the above is still the case, I'm interested in trying to add in the new feature! I do have a local scipy setup and am definitely interested in trying this out.

@clementkng Of course, please feel free. It is actually involved, not just copy/paste.

@lobpcg Has something changed since when you commented it was mainly copy/paste code and tests? What else do we need to consider?

@lobpcg Has something changed since when you commented it was mainly copy/paste code and tests? What else do we need to consider?

Nothing has changed: copy/paste, tests, and edit to make everything (input/output, tolerance, tests) is compatible with other SVD solvers. There may be many tests for SVD solvers there - I have not checked how many. And update the documentation to reflect the changes.

@lobpcg Is the current Scipy LOBPCG solver reliable to use? I'm confused since you mention I have to copy/paste from the scikit-learn implementation, but if the solver already exists in Scipy, then we would use that, right?

Copy/paste the SVD interface https://github.com/scipy/scipy/issues/9275#issuecomment-504673772 , to the current Scipy LOBPCG eigenvalue solver.

@lobpcg I've currently pasted the implementation as well as the test in scikit-learn that are relevant to the solver. I'm getting a couple of mismatch errors that I'm currently trying to fix, but looking through the version there and the interface you provided, I noticed that all the matrix transposes in the scikit-learn PR additionally have calls to .conj() attached to them in this version. Is there a reason for this distinction?

@lobpcg I've currently pasted the implementation as well as the test in scikit-learn that are relevant to the solver. I'm getting a couple of mismatch errors that I'm currently trying to fix, but looking through the version there and the interface you provided, I noticed that all the matrix transposes in the scikit-learn PR additionally have calls to .conj() attached to them in this version. Is there a reason for this distinction?

.conj() is a must to have in this code in scipy to handle complex-valued input, which is necessary in scipy; and should come with a unit test where the input matrix is complex-valued. However, scikit-learn simply does not support complex numbers. For real-valued numbers,  .conj() has no effect and does not hurt, but scikit-learn maintainers still have removed it recently for better style and consistency with scikit-learn.

@lobpcg To make everything work w/ existing SVD solvers, we need to make sure the interface to both functions is the same. To do that, we would need to pick defaults for arguments specific to LOBPCG i.e. n_oversamples, and figure out how to add existing arguments not supported in LOBPCG but elsewhere i.e. ncv in the arpack solver. Does this sound like a good plan? I can push what I have after trying to fiddle w/ the tests if this isn't clear.
Regarding the first point, is there a good way to determine those argument defaults?

Consistent doesn't mean identical.
I recommend defaulting n_oversamples = 10 which to my recollection  is the choice in scikit-learn. Rename n_oversamples into ncv, if you want having the same names.
-------- Original message --------
From: Clement Ng<EMAIL_ADDRESS>Date: 7/11/19 3:39 PM (GMT-08:00)
To: scipy/scipy<EMAIL_ADDRESS>Cc: Andrew Knyazev<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [scipy/scipy] new feature: adding LOBPCG solver in svds in   addition to ARPACK (#9275)
@lobpcghttps://github.com/lobpcg To make everything work w/ existing SVD solvers, we need to make sure the interface to both functions is the same. To do that, we would need to pick defaults for arguments specific to LOBPCG i.e. n_oversamples, and figure out how to add existing arguments not supported in LOBPCG but elsewhere i.e. ncv in the arpack solver. Does this sound like a good plan? I can push what I have after trying to fiddle w/ the tests if this isn't clear.
Regarding the first point, is there a good way to determine those argument defaults?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/scipy/scipy/issues/9275?email_source=notifications&email_token=AKFMTPPNYWJD6XPPMUXSIDLP66ZDTA5CNFSM4FVJ2D62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYFUTQ#issuecomment-510679630, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKFMTPNAOQHRTCOHR7KHAITP66ZDTANCNFSM4FVJ2D6Q.

How important would you consider adding support for the other arguments currently not supported by the LOBPCG solver i.e. which, v0, and return_singular_vectors? Some of these should be easy to implement, but others will require some thought.

@clementkng Sorry, I do not have time to go other the functions to understand the meaning of the arguments that you mention. May be you can try to see yourself how the corresponding scikit-learn functions are set up and mimic this setup? scikit-learn supports basically the same solvers, e.g., arpack, as scipy.
This is what I have meant by " actually involved, not just copy/paste."

This issue will be fixed by https://github.com/scipy/scipy/pull/10830

I've added the autoclosing phrase to the PR.


Documentation update

Need a update for PSPKI module in https://github.com/microsoft/MSLab/blob/master/Scenarios/Certification Authority/readme.md
https://www.sysadmins.lv/projects/pspki/default.aspx
to:
https://www.pkisolutions.com/tools/pspki/

fixed


Makes library installable.

Added parallesisation.
Moved classes to respective modules
Using opts parse to parse options

How to install and use:
cd to root and run python setup.py install
To generate report:
robotmetrics [:options]
Rest of the usage commands are same
How to test and contribute:
cd to root and run python setup.py develop
Note
All options now begin with -- (double hyphens)

@adiralashiva8 I have changed the directory structure and renamed robotframework-metrics to robotframework_metrics to avoid installing errors. Added parallelisation as well.
I have tested at my end. Seems to be working fine. However it might still require testing with large files and negative testing with/without options

@jz-jess Changes looks awesome but I have few minor concerns which need you help
Robotframework-metrics have some customization stuff like

Adding own image
Adding own links
Ignoring few library keywords
Specifying email recipients

I feel recent changes (Makes library installable) wont support this features. Is there any possibilities to support this features?

@adiralashiva8 I missed it. Supporting this shouldn't be a problem. However opening the file and editing it is not the way to go.
We already have some default values in the code. User should be able to override it by either passing it as a command line param or store in a config (yaml, etc) file and pass the path as a param. Does this make sense to you?

@adiralashiva8 I missed it. Supporting this shouldn't be a problem. However opening the file and editing it is not the way to go.
We already have some default values in the code. User should be able to override it by either passing it as a command line param or store in a config (yaml, etc) file and pass the path as a param. Does this make sense to you?

I like suggested approach (command line).

I'll make the changes, meanwhile do let me know if you're able to find any bugs

I'll make the changes, meanwhile do let me know if you're able to find any bugs

@jz-jess I was not able to install library because Installing gevent is failing in my machine. May be users also going to face this issue (gevent need to be specific version based on python version )
What I thinking is lets drop from performance improvement and as part of this pull request focus on making library installable if you agree?

@adiralashiva8 Will try with the standard multiprocess library then. Will remove if it doesn't work as expected

@adiralashiva8 Can you tell me the error you get when you install gevent in your system? Also your OS details. Gevent supports python 2.7 and above.

@adiralashiva8 Will try with the standard multiprocess library then. Will remove if it doesn't work as expected. Let me remove it for now to enable testing

@jz-jess After removing gevent I was able to install and generate report. I found two issue (1 can be ignored)
Issues:

Email Metrics: When user generate email (within report) .eml file showing html content (see here for working sample - https://robotframework-metrics.netlify.com/#)
Generate Report: By default email will be sent whenever robotmetrics command is executed (default should be true) - I'm okay with this

Run commands I used
robotmetrics --output ouput1.xml --email true

@adiralashiva8 Can you tell me the error you get when you install gevent in your system? Also your OS details. Gevent supports python 2.7 and above.

Command: pip install gevent
Error: Command "c:\users\shiva.adirala\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SHIVA~1.ADI\\AppData\\Local\\Temp\\pip-install-gxqqogaq\\gevent\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\SHIVA~1.ADI\AppData\Local\Temp\pip-record-2e0c8llb\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SHIVA~1.ADI\AppData\Local\Temp\pip-install-gxqqogaq\gevent\
OS: Windows 10
Python: 3.7.0

@adiralashiva8 Can you try installing gevent from this link?
https://github.com/gevent/gevent/downloads
This has binary for windows. Let me know if this works. If it does this link can be added in the ReadMe.

https://stackoverflow.com/questions/40018405/cython-cannot-open-include-file-io-h-no-such-file-or-directory

https://stackoverflow.com/questions/40018405/cython-cannot-open-include-file-io-h-no-such-file-or-directory

May be Download visual studio build tools and install solution works but I cant ask users to download all this stuff for generating simple metrics report :). What you feel

@adiralashiva8 I have multiple approaches as of now:

Add this as optional in readme. Will import gevent within try except block. If it breaks we execute sequentially. Otherwise we pass it to a gevent group.

Do this using multiprocessing library. If there are no hiccups. We should be good to go.

Remove concurrency all together.

@adiralashiva8 I have multiple approaches as of now:

Add this as optional in readme. Will import gevent within try except block. If it breaks we execute sequentially. Otherwise we pass it to a gevent group.
Do this using multiprocessing library. If there are no hiccups. We should be good to go.
Remove concurrency all together.

I'm good with 1st approach 👍  (if users are concern with performance then they will use gevent else go with sequence)

Alright, will fix everything at night and comment.
Report looks very cool btw. We should think of ways to generate this on the fly than user having to generate it manually

Alright, will fix everything at night and comment.
Report looks very cool btw. We should think of ways to generate this on the fly than user having to generate it manually

Robotframework-metircs uses output.xml which will be generated after test/suite execution we don't have option to have ouput.xml on fly. There is other approach (using listeners) but i'm not aware on it.
Really excited for final changes and Eagerly waiting to download robotframework-metrics using pip command

There is other approach (using listeners) but i'm not aware on it.

Once the library becomes installable we can use the xunit_file listener method to get the output xml and then create the html. In future this library can be an external listener and just run from command line with arguments like `robot --listener MyListener:arg1:arg2 tests.robot

@adiralashiva8

Email Metrics: When user generate email (within report) .eml file showing html content (see here for working sample - https://robotframework-metrics.netlify.com/#)

What is the issue here? The report I generated seems to have email-metrics. It works same as the example you provided

When I opened downloaded email - HTML content is show in email body - let me recheck this

Need Discussion: In robotmetrics.py we have hardcoded ignore_library and ignore_type value, but In future I want to include hardcoded library keywords in report. How can we achieve this?

You can iterate through the variables and add them to the html text like you have for others.

@adiralashiva8 To publish to pip follow instructions here:
https://packaging.python.org/tutorials/packaging-projects/
Once everything is good to go. Give it a try. Let me know if you need help.


Add testing workflow

Right now this should always fail, since no GCS bucket is properly set
up for it.

Sorry, got a bit ahead of myself here :)

Have you experienced any problem with this action?

Hey there! No particular issues at the moment; I mostly wanted to align the YAML usage to the dash-based naming seen in GitHub's own actions, as well as have a test flow and introduce another couple of tweaks for performance. See this comparison for all the changes. If those look interesting, I'm happy to open a PR!


Accept any sidecar termination reason

Changes
Fixes #1253
When a sidecar is forcefully exited by the taskrun controller it may
error out. This happens because the sidecar is terminated by having its
image field rewritten to be tekton's nop container. The nop container is
bare bones and probably doesnt contain the entrypoint command configured
for the sidecar. When this occurs the container will exit with an error
of some kind. On GKE this error's Reason is "ContainerCannotRun" but on
MiniShift/OpenShift the error Reason is "Error".
The sidecar e2e test previously required a termination Reason of
ContainerCannotRun or Completed but this appears to be too rigid.
Instead the test now considers a sidecar that has been terminated for
any reason to be a success.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[x] Commit messages follow commit message best practices

Reviewer Notes
If API changes
are included, additive changes
must be approved by at least two OWNERS
and backwards incompatible changes
must be approved by more than 50% of the OWNERS,
and they must first be added
in a backwards compatible way.

@sbwsg FYI, I have tested this change on openshift and it was working! thanks


Upgrade yui-relayer v0.5 and chain module version

Seems like this error is caused by https://github.com/datachainlab/ethereum-ibc-relay-chain/issues/41


mxnet.base.MXNetError: Error in operator fpn_p4_sum:

I got this error
 Incompatible attr in node fpn_p4_sum at 1-th input: expected [1,256,38,64], got [1,256,38,63]

in this 269 line of code in fpn/loader.py
 Incompatible attr in node fpn_p4_sum at 1-th input: expected [1,256,38,64], got [1,256,38,63]

Can someone help me? Plz


Fix loading instructions on visualizer homepage

Changed the "Loading from Kaggle" instructions to link to a notebook of mine displaying how to render completed episodes in the notebook-friendly version of the notebook, based on my similar notebook from last season.
Fixed the "Load from elsewhere" section to include examples of inputs from this season rather than last season, and fixed an issue where you couldn't load leaderboard URLs from this season.

Thanks again for all the help!


Passing array item by reference breaks \DS\Set behaviour

php -v: PHP 8.1.12 (cli) (built: Oct 28 2022 19:11:07) (NTS)
ds version: 1.4.0
Initial problematic codeblock looks like this.
$data = [
    [
        'id' => 1,
        'data' => 'test',
    ],
    [
         'id' => 2,
         'data' => 'test',
    ]
];
foreach ($data as &$item) {
    unset($item['id']);
}
$s = new \Ds\Set($data);

Please pay attention on foreach cycle where we are passing array item by reference to get rid of unique id field. After that I expect the following code
$res = $s->toArray();
var_dump($res);

prints me an array with single item ['data' => 'test']. However instead I have the following output:
array(2) {
  [0]=>
  &array(1) {
    ["data"]=>
    string(4) "test"
  }
  [1]=>
  &array(1) {
    ["data"]=>
    string(4) "test"
  }
}

So, we get an array of references which are indeed different. But this is not what I would expect to see.
Then I decided to slightly change initial code:
$data = [
    [
        'data' => 'test',
    ],
    [
        'data' => 'test',
    ]
];
foreach ($data as &$item) {
    // Do nothing
}
$s = new \Ds\Set($data);

And result is still the same. But removing '&' from cycle actually makes it work correctly.
It's worth noting that polyfill works correctly in all cases. So, that leads me here for behaviour explanation. I know that passing array element by reference can be potentially dangerous in case of further normal array assignment (as described here https://www.php.net/manual/en/language.references.whatdo.php). However it doesn't make sense how it can be related to these changes in a Set behaviour and why polyfill behaviour is different from extension implementation.

Almost a year later, I'm finally coming back to this project and will take a look at this bug. 👀


Add S3 bucket name and object key fields in the intake

not relevant, will be reported through OTel attributes


Added a few find functions

Added:

findIncludePlayersProps( array plys )
findExcludePlayersProps( array plys )

Used to include/exclude multiple players props at once

You have to do type checking on the array indexes, otherwise you'll get a runtime error if the value doesn't support indexing.


Make popup filter show matching fields always

Previously, if a field of a NS record happened to be an object (e.g. an
Array) and none of its elements matched the search string (typed by the
user in the popup window), then this field would not appear in the
filtered result, misleading the user to think that the field was not
present.
Now the field will always be added to the filtered popup contents, if
it matches the search string

This is how it looks now, the empty array has nothing matching the search string, but it's still included, since its key (custitem_kd_comname_sec matches)


[video_player_android] Flutter player widget does not scale correctly if video uses rotation correction

What package does this bug report belong to?
video_player (2.9.2)
What target platforms are you seeing this bug on?
Android
Have you already upgraded your packages?
Yes
Steps to reproduce

Run the example app with updated remote video link on Android device (see Code Sample).
Wait for the video to load (about 7 MB, I could not reduce it because any compression tool I tried resulted in losing rotation correction).
Play the video.
Verify the actual video size and player widget size.

Expected results
Player widget size matches video size.
Actual results
Player widget is smaller and does not match the actual video size. The rotation correction of the video in this case is 270 degrees.
The issue was not observed on iOS and MacOS.
Code sample
Use the example project code (video_player/example/lib/main.dart) with a different link for the remote video. Instead of           https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4 use https://drive.google.com/uc?export=download&id=1j8xYdGEYZ_mnfYTnDc4ULxMkc7EBw3AD
Screenshots or Videos

Video demonstration
https://github.com/user-attachments/assets/e337123e-d0ca-4f80-86e5-b41a96962fb3

Logs
Output
Restarted application in 870ms.
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
I/ExoPlayerImpl( 7263): Init 75844ee [AndroidXMedia3/1.4.1] [beyond0, SM-G970F, samsung, 31]
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 0
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 1
D/BufferPoolAccessor2.0( 7263): bufferpool2 0x70b01bbc78 : 0(0 size) total buffers - 0(0 size) used buffers - 361/376 (recycle/alloc) - 14/366 (fetch/transfer)
D/BufferPoolAccessor2.0( 7263): evictor expired: 1, evicted: 1
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
I/AudioManager( 7263): getParameters keys = offloadVariableRateSupported
I/DMCodecAdapterFactory( 7263): Creating an asynchronous MediaCodec adapter for track type video
I/ACodec  ( 7263):  [] Now uninitialized
I/ACodec  ( 7263): [] onAllocateComponent
I/OMXClient( 7263): IOmx service obtained
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now Loaded
I/MediaCodec( 7263): MediaCodec will operate in async mode
D/MediaCodec( 7263): flushMediametrics
D/SurfaceUtils( 7263): connecting to surface 0x715028d510, reason connectToSurface
I/MediaCodec( 7263): [OMX.Exynos.avc.dec] setting surface generation to 7437325
D/SurfaceUtils( 7263): disconnecting from surface 0x715028d510, reason connectToSurface(reconnect)
D/SurfaceUtils( 7263): connecting to surface 0x715028d510, reason connectToSurface(reconnect)
I/ACodec  ( 7263): app-pid(7263)
W/ACodec  ( 7263): [OMX.Exynos.avc.dec] setting HDRStaticInfo failed even though codec advertises support
W/ACodec  ( 7263): [OMX.Exynos.avc.dec] getting HDRStaticInfo failed even though codec advertises support
D/MediaCodec( 7263): keep callback message for reclaim
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now Loaded->Idle
D/SurfaceUtils( 7263): set up nativeWindow 0x715028d510 for 1280x720, color 0x105, rotation 270, usage 0x402900
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 13, minUndequeuedBuffers : 9
I/MediaCodec( 7263): setCodecState state(0), called in 6
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now Idle->Executing
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now Executing
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] calling emptyBuffer 1 w/ codec specific data, size : 21
I/DMCodecAdapterFactory( 7263): Creating an asynchronous MediaCodec adapter for track type audio
I/CCodec  ( 7263): state->set(ALLOCATING)
I/CCodec  ( 7263): allocate(c2.android.aac.decoder)
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] calling emptyBuffer 2 w/ codec specific data, size : 8
I/CCodec  ( 7263): setting up 'default' as default (vendor) store
I/CCodec  ( 7263): Created component [c2.android.aac.decoder]
I/CCodec  ( 7263): state->set(ALLOCATED)
D/CCodecConfig( 7263): read media type: audio/mp4a-latm
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater( 7263): extent() != 1 for single value type: algo.buffers.pool-ids.values
W/ACodec  ( 7263): [OMX.Exynos.avc.dec] getting HDRStaticInfo failed even though codec advertises support
I/CCodecConfig( 7263): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig( 7263): c2 config diff is Dict {
D/CCodecConfig( 7263):   c2::u32 coded.aac-packaging.value = 0
D/CCodecConfig( 7263):   c2::u32 coded.bitrate.value = 64000
D/CCodecConfig( 7263):   c2::u32 coded.pl.level = 0
D/CCodecConfig( 7263):   c2::u32 coded.pl.profile = 8192
D/CCodecConfig( 7263):   c2::i32 coding.drc.album-mode.value = 0
D/CCodecConfig( 7263):   c2::float coding.drc.attenuation-factor.value = 1
D/CCodecConfig( 7263):   c2::float coding.drc.boost-factor.value = 1
D/CCodecConfig( 7263):   c2::i32 coding.drc.compression-mode.value = 3
D/CCodecConfig( 7263):   c2::i32 coding.drc.effect-type.value = 3
D/CCodecConfig( 7263):   c2::float coding.drc.encoded-level.value = 0.25
D/CCodecConfig( 7263):   c2::float coding.drc.reference-level.value = -16
D/CCodecConfig( 7263):   c2::u32 input.buffers.max-size.value = 8192
D/CCodecConfig( 7263):   c2::u32 input.delay.value = 0
D/CCodecConfig( 7263):   string input.media-type.value = "audio/mp4a-latm"
D/CCodecConfig( 7263):   c2::u32 output.delay.value = 2
D/CCodecConfig( 7263):   c2::float output.drc.output-loudness.value = 0.25
D/CCodecConfig( 7263):   string output.media-type.value = "audio/raw"
D/CCodecConfig( 7263):   c2::u32 raw.channel-count.value = 1
D/CCodecConfig( 7263):   c2::u32 raw.max-channel-count.value = 8
D/CCodecConfig( 7263):   c2::u32 raw.sample-rate.value = 44100
D/CCodecConfig( 7263): }
I/MediaCodec( 7263): MediaCodec will operate in async mode
D/MediaCodec( 7263): flushMediametrics
D/CCodec  ( 7263): [c2.android.aac.decoder] buffers are bound to CCodec for this session
I/CCodec  ( 7263): appPid(7263) width(0) height(0)
D/CCodecConfig( 7263): no c2 equivalents for log-session-id
D/CCodecConfig( 7263): no c2 equivalents for flags
D/CCodecConfig( 7263): config failed => CORRUPTED
D/CCodecConfig( 7263): c2 config diff is   c2::u32 raw.channel-count.value = 2
D/CCodecConfig( 7263):   c2::u32 raw.sample-rate.value = 48000
W/Codec2Client( 7263): query -- param skipped: index =<PHONE_NUMBER>.
D/CCodec  ( 7263): client requested max input size 885, which is smaller than what component recommended (8192); overriding with component recommendation.
W/CCodec  ( 7263): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  ( 7263): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  ( 7263):   int32_t aac-drc-album-mode = 0
D/CCodec  ( 7263):   int32_t aac-drc-boost-level = 127
D/CCodec  ( 7263):   int32_t aac-drc-cut-level = 127
D/CCodec  ( 7263):   int32_t aac-drc-effect-type = 3
D/CCodec  ( 7263):   int32_t aac-encoded-target-level = -1
D/CCodec  ( 7263):   int32_t aac-max-output-channel_count = 8
D/CCodec  ( 7263):   int32_t aac-target-ref-level = 64
D/CCodec  ( 7263):   int32_t bitrate = 64000
D/CCodec  ( 7263):   int32_t channel-count = 2
D/CCodec  ( 7263):   int32_t level = 0
D/CCodec  ( 7263):   int32_t max-input-size = 8192
D/CCodec  ( 7263):   string mime = "audio/mp4a-latm"
D/CCodec  ( 7263):   int32_t profile = 2
D/CCodec  ( 7263):   int32_t sample-rate = 48000
D/CCodec  ( 7263):   int64_t durationUs = 0
D/CCodec  ( 7263): }
D/CCodec  ( 7263): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  ( 7263):   int32_t aac-drc-album-mode = 0
D/CCodec  ( 7263):   int32_t aac-drc-boost-level = 127
D/CCodec  ( 7263):   int32_t aac-drc-cut-level = 127
D/CCodec  ( 7263):   int32_t aac-drc-effect-type = 3
D/CCodec  ( 7263):   int32_t aac-drc-output-loudness = -1
D/CCodec  ( 7263):   int32_t aac-encoded-target-level = -1
D/CCodec  ( 7263):   int32_t aac-max-output-channel_count = 8
D/CCodec  ( 7263):   int32_t aac-target-ref-level = 64
D/CCodec  ( 7263):   int32_t channel-count = 2
D/CCodec  ( 7263):   string mime = "audio/raw"
D/CCodec  ( 7263):   int32_t sample-rate = 48000
D/CCodec  ( 7263): }
I/CCodecConfig( 7263): query failed after returning 19 values (BAD_INDEX)
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now handling output port settings change
D/MediaCodec( 7263): keep callback message for reclaim
I/CCodec  ( 7263): state->set(STARTING)
W/Codec2Client( 7263): query -- param skipped: index =<PHONE_NUMBER>.
W/Codec2Client( 7263): query -- param skipped: index =<PHONE_NUMBER>.
W/Codec2Client( 7263): query -- param skipped: index =<PHONE_NUMBER>.
D/CCodecBufferChannel( 7263): [c2.android.aac.decoder#599] Created input block pool with allocatorID 16 => poolID 29 - OK (0)
D/BufferPoolAccessor2.0( 7263): Destruction - bufferpool2 0x70b01bbc78 cached: 0/0M, 0/0% in use; allocs: 376, 96% recycled; transfers: 366, 96% unfetched
D/SurfaceUtils( 7263): set up nativeWindow 0x715028d510 for 1280x720, color 0x105, rotation 270, usage 0x402900
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 17, minUndequeuedBuffers : 9
I/CCodecBufferChannel( 7263): [c2.android.aac.decoder#599] Created output block pool with allocatorID 16 => poolID 523 - OK
D/CCodecBufferChannel( 7263): [c2.android.aac.decoder#599] Configured output block pool ids 523 => OK
I/CCodec  ( 7263): state->set(RUNNING)
I/CCodecBufferChannel( 7263): [c2.android.aac.decoder#599] 4 initial input buffers available
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] Now Executing
I/MediaCodec( 7263): setCodecState state(0), called in 6
D/AudioTrack( 7263): setVolume(1.000000, 1.000000) pid : 7263
W/ACodec  ( 7263): [OMX.Exynos.avc.dec] getting HDRStaticInfo failed even though codec advertises support
I/ACodec  ( 7263): [OMX.Exynos.avc.dec] OMX_EventPortSettingsChanged 0x7f030010
W/MediaCodec( 7263): mapFormat: no mediaType information
I/MediaCodec( 7263): setCodecState state(1), called in 6
I/MediaCodec( 7263): setCodecState state(0), called in 6
D/BufferPoolAccessor2.0( 7263): evictor expired: 1, evicted: 0
D/BufferPoolAccessor2.0( 7263): bufferpool2 0x70b025a548 : 5(40960 size) total buffers - 0(0 size) used buffers - 24/29 (recycle/alloc) - 5/29 (fetch/transfer)
D/BufferPoolAccessor2.0( 7263): evictor expired: 1, evicted: 1
D/ImageReaderSurfaceProducer( 7263): ImageTextureEntry can't wait on the fence on Android < 33
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 0
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 1
D/AudioTrack( 7263): getTimestamp_l(1575): device stall time corrected using current time<PHONE_NUMBER>01286
I/MediaCodec( 7263): setCodecState state(1), called in 6
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
D/BufferPoolAccessor2.0( 7263): bufferpool2 0x70b025a548 : 5(40960 size) total buffers - 4(32768 size) used buffers - 95/105 (recycle/alloc) - 10/102 (fetch/transfer)
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 0
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 1
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 0
I/MediaCodec( 7263): setCodecState state(0), called in 6
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 1
D/AudioTrack( 7263): getTimestamp_l(1575): device stall time corrected using current time<PHONE_NUMBER>05206
I/MediaCodec( 7263): setCodecState state(1), called in 6
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 0
I/ViewRootImpl@613a070[FlutterActivity]( 7263): ViewPostIme pointer 1
I/ViewRootImpl( 7263): updatePointerIcon pointerType = 1000, calling pid = 7263
D/InputManager( 7263): setPointerIconType iconId = 1000, callingPid = 7263
I/MediaCodec( 7263): setCodecState state(0), called in 6

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.4.1 23E224 darwin-arm64, locale en-PL)
    • Flutter version 3.24.3 on channel stable at /Users/paweljakubowski/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (3 months ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/paweljakubowski/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • ANDROID_HOME = /Users/paweljakubowski/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (4 available)
    • SM G970F (mobile)               • RF8MB0MKYEK           • android-arm64  • Android 12 (API 31)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 131.0.6778.86

[✓] Network resources
    • All expected network resources are available.

• No issues found!

@FirentisTFW
Is there a way to check if this behavior occurs with native android player as well or is just specific to flutter ?

@darshankawar From my understanding, it's specific to this package. But I think the issue might be on the native side. I see that we have this widget that just rotates the video on the Flutter side. And here, in Android native code, we return the width, height and rotation of the video. I assume that the width and height might not be calculated properly based on the rotation (so they are returned as if no rotation is about to take place).
I also see that on iOS side we don't need to rotate the video on Flutter side. For example, for this video, I see that in VideoEventType.initialized event (this code)  the returned values are:

width: 1280, height: 720, rotationCorrection:270 on Android
width: 720, height: 1280, rotationCorrection:null on iOS

Thanks for the update. Can you check if your case is similar to https://github.com/flutter/flutter/issues/154696 ?
Specially https://github.com/flutter/flutter/issues/154696#issuecomment-2460496951 maybe same as you described above related to rotation correction.

@darshankawar The issue you linked looks similar, but I think it's a little bit different. In the other issue the video ha she wrong rotation and it looks a little bit stretched. And here the rotation is correct, but it gets out of player bounds. Looks as if the rotation is applied correctly, but the video sized is not calculated based on that (so it's too big in comparison to the Flutter part).
I think these two issues might be related to the same code, though (sendInitialized method linked in my previous comment)

Thanks for the feedback. Please check if this issue with underlying comments help in your case or not.

Thanks for the update and patience @FirentisTFW
I ran the code sample on S10+ device with which I see below:
https://github.com/user-attachments/assets/73cd9194-5ec3-4faa-a08d-d3bf7d3d17cc

Instead of https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4 use https://drive.google.com/uc?export=download&id=1j8xYdGEYZ_mnfYTnDc4ULxMkc7EBw3AD

I used this as you mentioned.

@darshankawar Thanks for checking, hmm, that looks weird. What's your Android version? I checked it on three devices (two physical, one emulator) - Android 11, 12 and 13, and I observed the issue on each one of them. Is it possible that your API version is below 29 (Android 10)? I see that there's an if statement in the code to use 0 rotation correction for APIs > 21 and < 29

What's your Android version?

Android 11. I also tried on Pixel XL emulator 33 which shows same result as before.

I revisited your video, it seems that when you play the video, it shows caption of a different video ? that is from assets ?

That's strange, I just tried it on Pixel XL API 33 emulator and I observed the same issue as in my first comment. I'm running on the latest main (from 11 December) - cbdb48a0bcee5865e6e5d29826d6f44cc1f0984d.
Regarding captions - yes, they come from the assets. I would assume that they also show up in your case (as well as progress indicator) if you scroll down when the video is playing.
Could you try to print size and rotationCorrection when the video is initialized? If you could add two prints here, when we get the initialized event
       case VideoEventType.initialized:
          print('size: ${event.size}');  // here
          print('rotationCorrection: ${event.rotationCorrection}');  // and here
          value = value.copyWith(
            duration: event.duration,
            size: event.size,
            rotationCorrection: event.rotationCorrection,
            isInitialized: event.duration != null,
            errorDescription: null,
            isCompleted: false,
          );

In my case it prints:
I/flutter ( 7287): size: Size(1280.0, 720.0)
I/flutter ( 7287): rotationCorrection: 270

I tried the same and this time though I was able to replicate the reported behavior. Not sure how I was able to see this earlier.
I/flutter ( 8479): size: Size(1280.0, 720.0)
I/flutter ( 8479): rotationCorrection: 270

I think that this is a side effect of the fix for https://github.com/flutter/flutter/issues/154696 which was caused by Impeller.

It looks like I get a different result when running with Flutter 3.24.3 (looks the same as in my original message) and a different result for Flutter 3.27.0 (regardless of whether I run with --no-enable-impeller or without it).

Flutter 3.24.3
Flutter 3.27.0

i have the exact same issue with the new flutter version on my Galaxy A50
do i need to downgrad or will there be a fix ?


Concurrent Map Write on templ watch command

I am running into a panic due to concurrent map writes when running templ generate --watch. I haven't been able to consistently reproduce this because it is a race condition. Looking through the code I believe it stems from the fact we are adding entries to the hashes map (link) when it is unprotected and being used by multiple go routines that are launched from the file directory walk function (link).
Here is a stack trace showing this:
fatal error: concurrent map writes

goroutine 9 [running]:
github.com/a-h/templ/cmd/templ/generatecmd.generate({0x9d6f00, 0xc000024460}, {0xc00002a380, 0x3e}, {0xc000038930, 0x63}, 0xc00017b890, 0x0, {0xc00003f070, 0x2, ...})
        /home/grindlemire/go/pkg/mod/github.com/a-h/templ@v0.2.543/cmd/templ/generatecmd/main.go:414 +0x665
github.com/a-h/templ/cmd/templ/generatecmd.processSingleFile({0x9d6f00, 0xc000024460}, {0x9d1200, 0xc000066030}, {0xc00002a380, 0x3e}, {0xc000038930, 0x63}, 0x0?, 0x0, ...)
        /home/grindlemire/go/pkg/mod/github.com/a-h/templ@v0.2.543/cmd/templ/generatecmd/main.go:349 +0x106
github.com/a-h/templ/cmd/templ/generatecmd.processChanges.func1.1()
        /home/grindlemire/go/pkg/mod/github.com/a-h/templ@v0.2.543/cmd/templ/generatecmd/main.go:311 +0xf4
created by github.com/a-h/templ/cmd/templ/generatecmd.processChanges.func1 in goroutine 1
        /home/grindlemire/go/pkg/mod/github.com/a-h/templ@v0.2.543/cmd/templ/generatecmd/main.go:309 +0x77e

I have put up a PR converting the hashes map to a sync.Map to address this (#473).
I have not been able to consistently reproduce this behavior in a unit test since I suspect it requires many templ files. Perhaps you know of a way to do it?

Thanks for looking into this issue, and agree with the solution.
However... I have just completely rewritten that part of the code which is under review at https://github.com/a-h/templ/pull/470/files and also noticed the concurrent map issue, which I resolved in https://github.com/a-h/templ/pull/470/commits/c4f40435299efb7f84fab564a53227d26a8fd284
Since you now understand how that part of the system works, if you'd like to review PR #470, that would be great. I think it should be a little easier to understand given the rewrite.

Ok sounds good. I'll close this issue. Do you have a timeline for when #470 will be merged?

Next couple of days. All the tests are passing, but thought it was worth asking people to review it, and giving them a couple of days to spot any structural problems.
It's good to try out if you want to pull the branch and build it locally.


Add Husky & Prettier

Hi @hspotlight, I have to add husky for do checking while commit and push the code. Would be nice to have this in this project.
Cheers!

Hi @heyfirst Thank for contribution.
I have a question about when should I run "postinstall": "husky install", and how prettier work if I don't have any format configuration file.

It's will be do the default config that their recommended to use. For me this is the advantage because we DON'T think how the code look like! JUST focus on what we want to do!

Hi @heyfirst Thank for contribution.
I have a question about when should I run "postinstall": "husky install", and how prettier work if I don't have any format configuration file.


Team 1 Selecting Units Task

Description
Task: [Selection of unit(s)]
Feature: (Unit Selection Display/UI) (#2 )
One of the key points of an RTS game is to be able to interact with things on the screen. Most notably, the ability to select characters and buildings on the screen to get additional information on their current state.
Example (optional)

Select: When a building or character is selected, they are highlighted in some way to let the player know that the unit has been selected.

Dependencies
Selectable units

[ ] Friendly Units (Worker) (#5)
[ ] Friendly Units (Soldier) (#8)
[ ] Enemy Units (#12)
[ ] Buildings (#19)

Milestones
List of steps that need to be completed for this task.

[x] Identification of selectable units
[x] Indicator that unit is selectable (change cursor)
[x] Highlighting the unit when the unit is selected
[x] Displaying a pop-up box
[x] Displaying information of selected unit on pop-up box

Documentation

Main description of feature
JavaDoc
...

Member

Sourav (@Sourav-RC ) (Sourav Roy Chowdhury)

Done


Observations planner

A tool that can help to plan observations.
At least, it should be a window with list of observation goals, with ability to add/remove/sort items.
The observation goals list created for a some specific date, location is taken from settings.
Following object data should be displayed:

Time of culmination (transit)
Altitude at transit time (max alt.)
Rise/Set time with azimuths
Begin/end of best seeing (respect to Sun rise and set) - ?
Constellation (with coordinates?)
Magnitude

The list can be saved to file and loaded from file.
Items (celestial objects) can be added to the list from the sky map via context menu, or directly from observations planner window (some kind of search button).

See also:
SkySafari Observing List list format:
https://www.skysafariastronomy.com/support/faq/skysafari.html
Cartes Du Ciel Observing List format:
https://www.ap-i.net/skychart/en/documentation/observing_list


Widgets added for rotation, scaling and transformation. The rotation …

…needs rework as ImGuizmo does not rotate in the same way as HymnToBeauty.

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 AncientFungus:LGEPR: Cppcheck cannot find all the include files (use --check-config for details)

Resolved #342 Resolve #342

Resolves #342

Imguizmo needs to be moved to externals.

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 AncientFungus:LGEPR: Cppcheck cannot find all the include files (use --check-config for details)


Ubuntu Version Mismatch

Version
Microsoft Windows [Version 10.0.22000.856]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
Ubuntu 20.04.4
Other Software
Microsoft Version: 22206.1401.6.0
Repro Steps
Update Ubuntu (only Ubuntu) from Microsoft Store
Expected Behavior
Ubuntu should upgrade from 20.04.4 to 22.04.1
Actual Behavior
Ubuntu stays at 20.04.4
Diagnostic Logs
No response

This is expected behavior.
Short answer:
To upgrade your existing (unversioned) "Ubuntu" from 20.04 to 22.04, you'll need to use the normal server/CLI Ubuntu upgrade process:
sudo do-release-upgrade -d

This will take some time.
Side-note:  You might need to uninstall snapd first.  I haven't tried recently, but most do-release-upgrade's on WSL have an issue with the snapd package.  If you'd like to wait a bit before trying this, I can confirm on a test instance here, but it will probably be much later today or tomorrow before I have a definitive answer for you.
Full explanation on why this is needed and how it really works:
It's a bit confusing, but to copy/paste from my Ask Ubuntu answer on this topic:
The "automatic upgrade" part of the Store app is more than a bit confusing.  Yes, "Ubuntu" (without a version number) in the Store "automatically updates", but that probably doesn't mean what you think it means.  It took me a bit to get used to this concept myself.
This is a bit difficult to explain, but when you install "Ubuntu" (no version) from the Store, you actually have (at least) three different "installations":

WSL itself, of course, as a prerequisite.  This is actually where the Linux kernel is installed, since it is shared between all installed WSL2 distributions/instances.

An "app package" with a rootfs package (install.tar.gz) in C:\Program Files\WindowsApps\CanonicalGroup....  You can see this by starting an Administrative PowerShell and running:

Get-ChildItem -Recurse 'C:\Program Files\WindowsApps\Canonical*' | Where-Object {$_.Name -eq 'install.tar.gz' }

When run for the first time (via ubuntu.exe), the installer creates your actual WSL instance in your %UserProfile%\AppData\Local\Packages\CanonicalGroup....

What does an "automatic upgrade" of the Store app really do?
When there's a new update of the app on the Store, the only thing that gets updated on your system is the rootfs package.  It does not change your installed instance.  It does not automatically update any of the packages in your instance.  It does not even update the WSL2 kernel.
You still need to run sudo apt update && sudo apt upgrade -y (or equivalent) to update the packages on a regular basis.  Note that this does not include the kernel -- See below for how to do that.
This is a good thing.  Otherwise, you'd be competing between the "Store" upgraded packages and those from the repo.
(Side note: Credit and thanks to u/zoredache on Reddit who originally clarified this for me.)
So what's the point?
Anyway, the upgrade of the Store package is pretty useless for most users unless you:

Unregister the instance (which deletes all configuration) and re-configure it by re-running the ubuntu.exe command.  When going through that initial configuration, the rootfs is unpacked, so you would get the "latest and greatest" from the Store at that point.  However, note that Store releases are still fairly infrequent compared to package updates in the official repos.  Even immediately after installing from the Store, you'll still almost always get a number of updates through apt.

Want to use that install.tar.gz to create a second WSL/Ubuntu instance (using wsl --import).  The newly created instance would then use the Store-updated rootfs.  Again, the same caveats apply about the repo packages as in the first scenario.

Neither of these scenarios is very common.  Even though the unversioned Store Ubuntu has now been updated to 22.04, it doesn't (and again, isn't expected to) change your installed instance of 20.04, just the rootfs package.
Upgrading the kernel
Note that neither the Store update nor apt (or other package methods) update the WSL2 kernel.  Since the kernel is part of WSL2 itself, and shared between all of the installed distributions, it's handled differently.  Use:
wsl --update

... to check for and download any WSL2 kernel update.
That does assume that you are using the default kernel.  You do have the option of downloading or building your own kernel from the WSL2 kernel source.  It's been my experience that it can take a few days or weeks for the kernel update to become available via wsl --update, so if you want to grab the latest and greatest, you can.  Then configure WSL2 to use that kernel via .wslconfig.
One more thing
All that said, the "Ubuntu" (unversioned) app still has one advantage, and that is that you won't need to worry about changing its name (like in that other question) when you eventually do upgrade to a later release.  The "Ubuntu 20.04" version is going to always have the instance name Ubuntu-20.04, even if and when you manually upgraded it to something later.

Just a heads-up that we apparently don't need to worry about the snapd package when upgrading from 20.04 to 22.04.
Upgrading from 20.04 to 21.10 would error out, IIRC, unless snapd was apt remove'd first, but the 22.04 upgrade seems to have fixed this problem.

Really great explanation. Kudos to you man! It did work. Appreciate it.

@muhammadsalmanafzal Great to hear!  And you're welcome!


Unit tests for unused

Add unit tests for several core functions that were otherwise unused/untested.

LGTM


Token does not refresh if phone date is set to future then moved back

If a phone date is moved to the future, then moved back, the token never refreshes again (I'm talking about the login token which is sent to server to verify the user account)
It is simple to reproduce. Simply using
    final FirebaseAuth auth = FirebaseAuth.getInstance();
    if (auth.getCurrentUser() != null)
        auth.getCurrentUser().getIdToken(true)
                .addOnCompleteListener(new OnCompleteListener<GetTokenResult>() {
                    public void onComplete(@NonNull Task<GetTokenResult> task) {
                        if (task.isSuccessful()) {
                            final String idToken = task.getResult().getToken();
                            Util.log(auth.getCurrentUser().getUid());
                            Util.log("ID TOKEN " + idToken);

                        }
                    }
                });

The idToken value usually changes every hour. However, if the phone date is moved to future, say a week from now, then back again, the token never refreshes again. Even if I uninstall or signout or reboot or delete account from Firebase Console or any combination of the above. i assume itll refresh a week and an hour from now, but cannot be sure until then
Even if i sign in with a different account, i get the exact same token, which the server says expired a few hours ago. It is never refreshing this token.
I assume it is because it thinks there is a week left until it expires. How can we work around this problem or fix it?

@hamzahrmalik that's interesting, thanks for reporting this.  Can I ask why a user might set his/her clock to the future?

@samstern I did it while testing another feature of the app to check if it works (the other feature was time based)
But I suppose anyone could do it by accident and more importantly I seem to have lost a test device

@hamzahrmalik in the meantime, you can clear data on your test app to clear the token.  That should fix your test device.

Right except uninstalling the app did not fix it. It's quite late here but in the morning I'll try again, it might have refreshed by then
But before, even using different logins didn't work

As a last resort you can try running "adb shell pm clear
com.google.android.gms" to clear data on Google Play services.  Only do
this on a test device, as if you do it on a real device you'll likely lose
some important settings.
On Mon, Aug 7, 2017, 5:34 PM hamzahrmalik<EMAIL_ADDRESS>wrote:

Right except uninstalling the app did not fix it. It's quite late here but
in the morning I'll try again, it might have refreshed by then
But before, even using different logins didn't work
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/FirebaseUI-Android/issues/855#issuecomment-320817214,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIEw6pSHQp-mNK700W0pK5P0mNe68lbRks5sV60wgaJpZM4OvzR7
.

Thanks but how would I fix it for a production device. Is there a way to force a refresh or something?

Can you try using the FirebaseUser#getIdToken() method and passing true for the forceRefresh argument?
https://developers.google.com/android/reference/com/google/firebase/auth/FirebaseUser.html#getIdToken(boolean)

@samstern Thats what im using, see my original post, it has some code

@hamzahrmalik whoops you're right.  There is no other way I know of to force a refresh. I am still asking around for better answers.

@samtstern  thanks appreciate that, also by the way, its still not working i tried again

@samtstern
Just an update, it is still giving me the same token now, which expired about 51 hours ago now

if (task.isSuccessful()) {
progressDialog.dismiss();
                String current_userid = firebaseAuth.getCurrentUser().getUid();

                String TokenID = FirebaseInstanceId.getInstance().getToken();

                userdatabase.child(current_userid).child("device_token").setValue(TokenID).addOnSuccessListener(new OnSuccessListener<Void>() {
                    @Override
                    public void onSuccess(Void aVoid) {

                        Intent intent = new Intent(LoginActivity.this, MainActivity.class);
                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                        startActivity(intent);
                        finish();

                    }
                });

            }

Use this way to get Token_id i hope this will work.

@anasnisar it seems like youre getting the TokenID then saving it into the database. However, the TokenID retrieved by that method isnt valid
InvalidArgumentException: The JWT string must have two dots
for the string
ek8onlTZyc4:APA91bH_rVT0JHF8IvF0BKb_nb7FrK-u35dQ1s5L-B_wemiXYdgZEUueUrasKb1s_e6-uhclLlojalEn8ticWB-qPsXJUiLQYEYF2kFNJujKmKyCLz-Yu2nHy40Sb-DCwge74Nwh-gdM
Retrieved from
FirebaseInstanceId.getInstance().getToken();

oh sorry I forgot to tell you that you have to make a child in the firebase in which you can create your yours then save token id using my method this works great for me

@anasnisar im pretty sure that method is for getting the FCM token. My issue is with the login token

Update:
I still get the same issue on that one device which was moved forward a year. I still get given a token which expired on 2017-08-07T17:39:12+00:00

@hamzahrmalik have you found any solution for this issue?

@dennywahyu I filed a bug with Firebase. This is their response
-The client side can't trust the backend's clock, since the two may be mismatched

There's no version of a canonical clock on the client-side; changing the system clock changes everything about how the system views time
Once the token is received, it's stamped with the current time on the client side; changing the clock doesn't change the timestamp
The only means to detect these changes is via the ACTION_TIME_CHANGED intent (https://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_CHANGED); while the client could listen for these calls, it wouldn't be worth the effort (or SDK size cost) in most cases.

So, that means there wont be any SDK update (or server side) to fix this issue?
But have you find any hack or workaround for this?

Same issue here, I messed up with the date doing tests, now I am getting expired token, even uninstalling the app it doesn't fix the problem..

Yep it appears it can't be fixed. As I posted above, they aren't willing to fix it. Surely FORCE refresh should just force it. But apparently not

I haven't found any workaround or anything. The only solution seems to be clearing data for Google play services

I think folks in this thread are seeing a few different issues. To clarify:

The JWT's  “iat” (token issue time) and “exp” (token issue time + token expiresIn) is server clock. If your test is comparing those values, make sure to have right clock in your test.
There's indeed local token cache in Firebase Auth SDK which is using device local clock. The assumption is, user is less likely to change their local clock now and then; but there's larger chance user's clock doesn't align with servers'. So for developers above setting clock forward and then back, you should not be seeing any issue with token cache. But again, if you want to check JWT's iat / exp, make sure to use the right clock
Clearing your app's cache or uninstall / reinstall should fix your problem.

If you are still seeing issues, please uninstall and start from clean and report:

Local clock when you make the 1st getToken call and the JWT you get back
What you do to the clock
Local clock when you make the 2nd / 3rd... getToken call and the JWT you get back
...

Thanks.

By reporting with your "JWT you get back", I mean the iat / exp part (and I don't mean the raw JWT which will leak your aud / sub here :))

Closing after explanation by @isaisachen, this is intended behavior of the Firebase Auth SDK for now and cannot be fixed by FirebaseUI.


[Feature Request]: Allow passing a custom function for row key in BigTableEnrichmentHandler

What would you like to happen?
Allow users to pass a lambda function to construct a composite row key for Bigtable handler without modifying the input schema.
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components

[X] Component: Python SDK
[ ] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[ ] Component: IO connector
[ ] Component: Beam YAML
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[ ] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

Done in #30974


"Valea Șesii" is listed in the dropdown menu when searched

Description : When user is typing "Valea Șesii" in the search bar, the location should appear in the dropdown menu correctly spelled and with locality information (as in Law nr. 2 din 16 februarie 1968)
Precondition : The website is up and running.

Step 1 Write in the search bar "Valea Șesii"

Expected results
The location appears in the drop-down menu as "Valea Șesii, Alba (Lupșa)"


Update moveit2.repos

Since is no more needed, lets remove it, is making the CI fail such as https://travis-ci.org/AcutronicRobotics/moveit2/jobs/527214797
The only place that is "needed" is on perception but it's commented.

Lets wait the CI

Lets wait the CI

The CI will still fail because is trying to use the moveit.repos from master, lets merge it. I have launched it locally and it worked fine.


HAWKULAR-346: Console dir structure refactoring

Please lets wait for @mtho11 to review this and merge.

Villiam, can you rebase and make this auto-mergable again.

@mtho11 , done

The build breaks with:
[INFO] bower                                      ECONFLICT Unable to find suitable version for hawtio-utilities


Address multi-platform issues with getrandom dependency

With regards to the closed https://github.com/moka-rs/moka/pull/172
This is the best solution I have been able to come up with.  I will give this example to cargo developers.  In the meantime, the way to address this would be to migrate getrandom from dev-dependencies to regular dependencies.  It will be eliminated away by the compiler and linker as it is not used anyways.  In the meantime it allows one to use js feature.
Once again, to clarify, js features is needed for wasm but you can not specify sub-crate features for dev-dependencies as in release mode cargo errors out with no such dependency found for feature 'js'...
I've tried using js = ["getrandom?/js"] syntax, but optional dependencies (?) are available only on the nightly channel and that would require to set getrandom = { optional = true ... } and then use another feature like 'testing' to trigger its inclusion, which is complex and doesn't make much sense anyways.  Relocating this crate from dev-dependencies is the cleanest and most elegant solution for the time being.

Hi. Thanks for opening this pull request.
getrandom is used by only one unit test. I am not sure what would be the best way to do this, but probably having "testing" feature or something will be better?

I think it would be solvable by adding "testing" feature and migrating dev-dependencies under [target.'cfg(feature = "testing").dependencies], but not sure.

or migrating it under [target.'cfg(feature = "testing").dev-dependencies]?
Let me do some research on it too.
Also, which cache are you trying to use? (moka::unsync, moka::sync or moka::future)  I have not tried but I think only moka::unsync::Cache could work in wasm environment? Other caches will spawn background threads and wasm does not support multi-threads yet I think. They also heavily depend on std::sync::atomic::* types, and I am not sure if they are available in the wasm target.

I am using unsync because wasm32-unknown-unknown (browser)  doesn't have threads and sync just crashes in the builder, which is somewhat expected.
I actually ended up wrapping moka into our own interface that does #[cfg(target_arch = "...")] and based on that provides sync or unsync instances as the libraries we are working on are multi-target.
The funny thing is that because we are using futures in wasm32 (backed by wasm/js executor), rust requires thread safety, yet unsync requires &mut self in its calls, so I ended up having Arc<Mutex<unsync::Cache>>. :)
I haven't tried futures as it seems to have tokio as a dependency and I know this won't compile.  async_std works well on wasm32, except there is no block_on type functionality as one can't block due to a single-threaded model. (Which reminds me, I haven't looked, but I am wondering how futures would fair in a single-threaded executor.). If futures doesn't have tokio, resides on top of async_std and doesn't use any thread blocking, I'd use that.
Back to the issue at hand:
Keep in mind that uuid/js needs to be triggered for wasm32 as well, so you do need to have a js feature for it to cascade to both, getrandom and uuid crates.
However, the core of the issue is that after adding js features to accommodate wasm32 support, I have hit another issue for a different target bpfel-unknown-unknown (a.k.a. bpf). (bpf target is used by Solana blockchain for on-chain programs (a.k.a) smart contracts, but this will apply to any other target_arch as well when built as a release i.e. without dev-dependencies).
What happens is that the release mode excludes all dev-dependencies during the cargo pre-processing (crate analysis) stage.  Cargo then chokes with invalid feature as getrandom does not exist...
There is currently no way around that. I tried making dev-dependencies as optional in hope that getrandom?/js would work, but dev-dependencies can not be made optional (and that wouldn't address the core issue or dev-dependencies going missing in release).
To summarize: the js features is needed for getrandom/js and uuid/js but adding it causes breakage on other targets when building in release due to dev-dependencies being excluded and thus js feature becoming invalid, breaking the build.
So this currently ends up being that in all cases to add js feature, getrandom needs to be elevated from dev-dependencies into dependencies...  I.e. basically, one currently can not have features that target dev-dependencies (https://github.com/rust-lang/cargo/issues/1596).
The alternative solution to this issue would be to replace getrandom with rand (https://crates.io/crates/rand). Could be a more elegant solution as it will eliminate getrandom completely.  This way js feature would remain only for uuid/js and uuid is fine as it is a regular dependency.
I can set up a small repo that demonstrates the issue if you want. Let me know.

Thanks for providing the details.

Keep in mind that uuid/js needs to be triggered for wasm32 as well, so you do need to have a js feature for it to cascade to both, getrandom and uuid crates.

I am OK for adding the js feature to moka to specify uuid/js.
But I believe we do not need to specify getrandom/js because uuid will take care of enabling the js feature of getrandom in your package's dependency tree. If I understand correctly, your package does not use getrandom under moka's dev-dependencies.
To confirm this, I created a modified version of moka and a package that depends on moka: https://gitlab.com/moka-labs/moka-gh-173-js-feature
This moka has a js feature in Cargo.toml, which only specifies uuid/js.
https://gitlab.com/moka-labs/moka-gh-173-js-feature/moka/-/compare/master...js-feature
[features]
# ...

js = ["uuid/js"]

And the package (called my-package1) depends on that moka. It has a js feature too to specify moka/js:
https://gitlab.com/moka-labs/moka-gh-173-js-feature/my-package1/-/blob/main/Cargo.toml
[features]
js = ["moka/js"]

[dependencies]
moka = { path = "../moka" }

Then I confirmed that I can build my-package1 for the default and wasm32-unknown-unknown targets (in both debug and release modes):
$ git clone https://gitlab.com/moka-labs/moka-gh-173-js-feature/moka.git
$ git clone https://gitlab.com/moka-labs/moka-gh-173-js-feature/my-package1.git

$ cd my-package1

## Build for the default target. (For my case, aarch64-apple-darwin)
$ cargo build
$ cargo build --release

## Build for wasm32-unknown-unknown target:
$ cargo build --target wasm32-unknown-unknown --features js
$ cargo build --target wasm32-unknown-unknown --features js --release

Can you please check if this works for your package? (I mean: only adding js = ["uuid/js"] to moka's Cargo.toml).

I am using unsync because wasm32-unknown-unknown (browser) doesn't have threads and sync just crashes in the builder, which is somewhat expected.

That is what I thought.

I actually ended up wrapping moka into our own interface that does #[cfg(target_arch = "...")] and based on that provides sync or unsync instances as the libraries we are working on are multi-target.
The funny thing is that because we are using futures in wasm32 (backed by wasm/js executor), rust requires thread safety, yet unsync requires &mut self in its calls, so I ended up having Arc<Mutex<unsync::Cache>>. :)

As for the threads part, you can make sync::Cache not to spawn background threads by doing all the followings:

Call CacheBuilder's thread_pool_enabled method with false. (doc)
Do not call CacheBuilder's support_invalidation_closures method.
(doc)

This means you cannot use Cache's invalidate_entries_if method.

If you want to set the eviction listener to the cache, use the Immediate delivery mode (which is the default mode). (doc)

Maybe it is worth to try. (but I do not know if there are any other problems)

I haven't tried futures as it seems to have tokio as a dependency and I know this won't compile. async_std works well on wasm32, except there is no block_on type functionality as one can't block due to a single-threaded model. (Which reminds me, I haven't looked, but I am wondering how futures would fair in a single-threaded executor.). If futures doesn't have tokio, resides on top of async_std and doesn't use any thread blocking, I'd use that.

future::Cache should not work for wasm32-unknown-unknown target. It currently (v0.9.x) does not use tokio but uses async-io and async-lock crates for sleep timers and locks respectively. And async-io spawns a background thread to manage timers. future::Cache also spawns the same background threads to sync::Cache, but unlike sync::Cache, you cannot disable them.
In the future, we will remove the background threads and async-io and async-lock crates from future::Cache, and make it to use user-provided async runtime. Like sqlx crate, you will specify the async runtime you use, such as async-std, tokio and actix-rt, via crate feature. If you tell me what async runtime you use in web browser, I will take a look at it too.

If you could create a tiny wasm project for me to play with moka on a web browser, that will be a great help. I will use it to figure out what needs to be done to make sync or future cache to work.

As for the threads part, you can make sync::Cache not to spawn background threads by doing all the followings:

Call CacheBuilder's thread_pool_enabled method with false. (doc)
Do not call CacheBuilder's support_invalidation_closures method. (doc)

This means you cannot use Cache's invalidate_entries_if method.

If you want to set the eviction listener to the cache, use the Immediate delivery mode (which is the default mode). (doc)

I created a mini wasm32-unknown-unknown project and tried the above with moka with the js feature. I ran it on Firefox browser, and was able to create a sync::Cache (without panic) and do insert, get and invalidate.
I will do little further to check if some of the advanced functions such as time-to-live expiration and eviction listener are working in a sync::Cache instance.


chore(versioning): fix versions of main packages

This will start to align the version of the fixed packages together. Fixed packages will be published under a new version, even if they did not have any changes (https://github.com/changesets/changesets/blob/main/docs/fixed-packages.md).
There are several packages, that are not included in the list because they should still be versioned individually. The reason for this is, that they are not main deliverables of the Design System - styles and components. For example the documnetation, which can only be released with a version bump. If it would be fixed with the other packages, a correction of a typo would cause a version bump for all the deliverables, even if nothing changed for end users.

I would suggest to align the following packages as well:

@swisspost/design-system-icons (because it is a released package, dependancy of the styles package)
@swisspost/internet-header (because it is a released package, dependant on the styles package and could become dependant on the components package in the future)
@swisspost/design-system-intranet-header (because it is a released package, dependant of the styles package)
@swisspost/design-system-documentation (because it documents the packages with a specific version)
Even if this means we must add a version bump for all packages to fix a typo in the docs. I don't think we will ever do that, without any changes in at least one other package, so it's fine. And this would enable us to add a version switch to the docs with miner versions, so you can navigate to the exact design-system version you have installed in your project).

agree for icons
the internet header is a special package and I'd like to keep strict semver on this because when we're updating to a major styles version internally, it has only patch consequences for projects. If there is a second version with tighter component integration, let's discuss again
agree for the intranet header
disagree for the documentation, I'd like to keep the flexibility there, also for doing updates to past major release doc pages. We already have the versions page and the docs package version is almost always irrelevant. I don't see how syncing the versions will help us add minor entries to the version switch (or the real benefit of that feature).


Fix the splash screen dismissal logic

When in "automatic" mode we were dismissing the splash screen before onInit completes causing issues noticeable in gvr-meshanimation, gvr-accessibility and gvr-modelviewer.
Note that now the fw will wait correctly for onInit to complete and that may take time. For example, gvr-jassimp loads a tree model from the network so the splash screen stays on for some time.
GearVRf-DCO-1.0-Signed-off-by: Mihail Marinov<EMAIL_ADDRESS>

:+1: This fixes the issues with meshanimation, jassimp and model viewer.


Fixed an error with multiple pages

This fixed the error options.uri must be a path when using options.baseUrl when using onedrive ls on a folder with many files.
The @odata.nextLink field in the result of listPage() is a absolute url, so the next call to listPage() will have this as cont param and the call(cont) will fail with the error above.
This fix only sets the baseUrl option if the url parameter does not starts with the api base url https://api.onedrive.com

Hey, good catch.
I'm happy with the change, although I think it'd be a bit cleaner if we remove the temporary vars in that scope, and instead mutate the new options object. For example, set options.method directly in line 1 of call, remove var prefer, etc...

Merged. Thanks!


[BUG] Not connecting to Discord

When I try to run the presence, it just doesn't connect to Discord! Can you help me?

It says this:
Failed to connect to Discord!
Make sure that Discord has been launched and that you're logged in, then launch roPresence again.
AND I HAVE DISCORD OPEN

Error: Could not connect
at Socket.onerror (/Users/hugh/Downloads/roPresence-<IP_ADDRESS>/node_modules/discord-rpc/src/transports/ipc.js:32:16)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)

Hi.
Is this still an issue now?
@OMGerCoder


Question: Xaml Design Time Attributes and {x: Bind}

Hello,
I’ve searched quite extensively online trying to understand how can we use x:Bind and also have design time data at the same time and the only suggested solutions seem to involve using FallbackValue (e.g. https://stackoverflow.com/questions/31766366/uwp-xbind-and-design-time-data or creating some sort of “design” ViewModel as per https://fast417.blogspot.com/2016/06/uwp-design-preview-with-xbind.html)
A better approach that would require less development effort and also be less invasive (e.g. avoid polluting our ViewModels production code with design time data) would be to support more design time attributes (e.g. Text) similarly for instance to what Android allows via it’s tools attributes (https://developer.android.com/studio/write/tool-attributes)
P.S - I've created a similar ticket on Developer Community but didn't receive any feedback.
Thanks,
Cosmin

I had tried porting an older DesignTime Data sample (article here) to current UWP, but soon realized there are a lot more gaps, though some methods still work. I thought I had a thread somewhere on this, but can't remember where now...
I know @mrlacey blogged about this topic as well here.

Indeed @mrlacey's article looks a lot like what I'm looking for.
I'll give it a try. Thanks!

Well, even with the workarounds suggested in the article, design-time instances still aren't supported for the {x:Bind } markup extension. There are questions on StackOverflow regarding this topic since 2016, and articles with criticism, however, even 4 years later we aren't able to create design-time instances with x:Bind. Currently, I prefer using the following clunky approach to make the Visual Studio designer display the properties from design-time instances:
<UserControl
    x:Class="Camelotia.Presentation.Uwp.Views.CreateFolderView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:designTime="using:Camelotia.Presentation.DesignTime"
    d:DataContext="{d:DesignInstance Type=designTime:DesignTimeCreateFolderViewModel, IsDesignTimeCreatable=True}"
    d:DesignHeight="400"
    d:DesignWidth="500"
    mc:Ignorable="d">
  <TextBlock Text="{x:Bind ViewModel.ErrorMessage, Mode=OneWay}"
             d:Text="{Binding ErrorMessage}" />
</UserControl>

Here, the d:Text property will override the Text property in the visual designer. This way the fast compiled {x:Bind } markup extension is used at runtime, and the good old {Binding } markup extension is used by the visual designer. The {Binding } markup extension uses the {d:DataContext } which is set to a dummy design-time view model DesignTimeCreateFolderViewModel, and the {x:Bind } markup extension uses the true clever view model with logic and things, which is stored in the ViewModel dependency property. The code-behind for the XAML file shown above looks as follows:
public sealed partial class CreateFolderView : UserControl
{
    public static readonly DependencyProperty ViewModelProperty = DependencyProperty
            .Register(nameof(ViewModel), typeof(ICreateFolderViewModel), typeof(CreateFolderView), null);

    public CreateFolderView() => InitializeComponent();

    public ICreateFolderViewModel ViewModel
    {
        get => (ICreateFolderViewModel)GetValue(ViewModelProperty);
        set => SetValue(ViewModelProperty, value);
    }
}

Then, such control can be used as such:
<views:CreateFolderView ViewModel="{x:Bind ViewModel.Folder, Mode=OneWay}" />

Didn't find a better way of using both DesignTimeViewModel and ActualViewModel in an UWP app with {x:Bind } enabled.

None of the suggested approaches that use x:Bind worked, so writing the following code seems to be the only way of supporting both design time instances and x:Bind markup extension. Appears to be quite verbose though.


Spurious error report: Inheriting 'Enum', which is not a class.Python(inherit-non-class)

Environment data

VS Code version: 1.37.0
Extension version (available under the Extensions sidebar): 2019.8.30787
OS and version: MacOS
Python version (& distribution if applicable, e.g. Anaconda): 3.7.4
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
Relevant/affected Python packages and their versions: XXX
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info microsoft/vscode-python#3977): no jedi

Expected behaviour
Defining enum with no errors.
Actual behaviour
An error on defining enum:
Inheriting 'Enum', which is not a class.Python(inherit-non-class)
Steps to reproduce:
Define Python 3 enum, e.g.
from enum import Enum

class Location(Enum):
  LAST = 'last'
  ALL = 'all'

and see error reported in Problems
and a class name underscored with a yellowish line, hovering above class name brings an error popup

Duplicate of #1419.
Fix is in with #1422. Change is probably not in stable yet.
You can do
"python.analysis.downloadChannel": "beta"

To see the fix or:
"python.analysis.disabled": [
    "inherit-non-class"
],

To disable the diagnostic, or put #noqa on the line to ignore the error for now.
Sorry for the inconvenience.


swift-inspect: correct invalid memory usage introduced in #66973

Clean up the incorrect memory binding in swift-inspect introduced in PR#66973.  This fixes the incorrect memory usage to mutate the context parameter.

@swift-ci please test


[Trivial] Updated Dodo minor version in Setup section

Hi, @PanosSakkos, thanks for the change. To to make sure I understand what we are doing here. The '~> 2.2.1' operator will make the library auto-update to the newer version only when the 3rd "patch" version number changes. For example, from 2.2.1 to 2.2.2. But it will not auto-update to the new "minor" version, to 2.3.0, for example. Is that correct and what you intended?

Note that when we make the API breaking changes to the library we change the first "major" digit of the version. from 2.2.1 to 3.0.0 for example.

 Good stuff by the way! 👏
I followed the setup instructions and I noticed that the version that was mentioned was on 2.2, while the version on CocoaPods was 2.2.1.
Since I wanted the latest version I set it to 2.2.1 in my Podfile, and I thought that the same should be done in the documentation, because as a first time user of the library you will always want the latest stable version, right? 😄

Thank you. I see what you intended to do now.
If you are using the so called "optimistic version" operator "~>" it will load version 2.2.1 if you specify "~> 2.2" in the Podfile. It will also load future updates automatically, like 2.2.2, 2.2.3, even 2.3.0 and 2.4.8. But it will not load major version updates like 3.1.0 (the first version number is changed), because this is were the library changes that can break your app can be introduced.
If it sounds confusing, and I know it can be, there is more information here
Semantic versioning standard: http://semver.org/
Version number syntax used in CocoaPods: https://guides.cocoapods.org/using/the-podfile.html
It is up to you which version to load in your Podfile but I would keep the two digits optimistic version "~> 2.2" in the readme because it means updating the library to all latest non-breaking changes. Do you think it is a good idea?

I see! Great, thanks for the cocoapods lesson! 😄

I read again your comment because I was planning to fix all the pod files in the projects that I'm working on, since I was using everywhere the optimistic version operator in combination with the full version (i.e. 2.2.1).

It is up to you which version to load in your Podfile but I would keep the two digits optimistic version "~> 2.2" in the readme because it means updating the library to all latest non-breaking changes. Do you think it is a good idea?

Definitely! 😄
Keep up the great work for the community! 👏

Thank you, have a great day.


Create dataset loader for Hate Speech Filipino Tweet

Dataloader name: filipino_hatespeech_election/filipino_hatespeech_election.py
DataCatalogue: http://seacrowd.github.io/seacrowd-catalogue/card.html?filipino_hatespeech_election

Dataset
filipino_hatespeech_election

Description
The dataset used in this study was a subset of the corpus 1,696,613 tweets crawled by Andrade et al. and posted from November 2015 to May 2016 during the campaign period for the Philippine presidential election. They were culled based on the presence of candidate names (e.g., Binay, Duterte, Poe, Roxas, and Santiago) and election-related hashtags (e.g., #Halalan2016, #Eleksyon2016, and #PiliPinas2016).  Data preprocessing was performed to prepare the tweets for feature extraction and classification. It consisted of the following steps: data de-identification, uniform resource locator (URL) removal, special character processing, normalization, hashtag processing, and tokenization.

Subsets
-

Languages
fil

Tasks
Hate Speech Detection

License
Unknown (unknown)

Homepage
https://huggingface.co/datasets/hate_speech_filipino

HF URL
https://huggingface.co/datasets/hate_speech_filipino

Paper URL
https://www.researchgate.net/publication/375911232_Hate_Speech_in_Philippine_Election-Related_Tweets_Automatic_Detection_and_Classification_Using_Natural_Language_Processing

#self-assign

#self-assign

hey @khelli07 I have already assigned this a few days ago (see the thread above?) @holylovenia could you take a look if it was not properly linked to me?

Oh I dont know about that, since the Assignee is empty. I thought you were unassigning it. Let me unassign and you can try to assign yourself again.

#self-assign

hey @khelli07 I have already assigned this a few days ago (see the thread above?) @holylovenia could you take a look if it was not properly linked to me?

Sorry, sometimes it doesn't work although there's no error. I think it's something from the github side... It seldom happens but it is a bit concerning.


Fix DEFAULT_PRECISION handling

Summary
DEFAULT_PRECISION is a torch.dtype. Previously, DEFAULT_PRECISION was compared to a str ("float32") in several places to determine the default precision for an invocation. Due to the type mismatch, these comparisons would always resolve to False. This PR fixes all of these comparison type mismatches.
This is a bugfix that results in a change to the default behaviour. In practice, this should not change the behaviour for many users, because it only causes a change for users that have configured float32 as their default precision (or have an old GPU without float16 support).
QA Instructions

[ ] Change configuration to precision: float32 and confirm that the affected invocations default to float32.

Merge Plan

[x] ⚠ Merge https://github.com/invoke-ai/InvokeAI/pull/6491 first, then change the target branch to main before merging.

Checklist

[x] The PR has a short but descriptive title, suitable for a changelog
[x] Tests added / updated (if applicable): N/A
[x] Documentation added / updated (if applicable)

@lstein This is ready for a full review now.


survey block statuses tab updates

Issue #:
https://github.com/bcgov/met-public/issues/397
Description of changes:
Changes made to

insert status blocks data to engagement status block table in case the default values are updated during engagement creation
update status blocks data for an engagement for any changes

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

Codecov Report

Merging #1051 (9f480c7) into main (005d59f) will decrease coverage by 0.05%.
The diff coverage is 69.23%.

:exclamation: Current head 9f480c7 differs from pull request most recent head eb692e3. Consider uploading reports for the commit eb692e3 to get more accurate results

@@            Coverage Diff             @@
##             main    #1051      +/-   ##
==========================================
- Coverage   74.89%   74.83%   -0.06%
==========================================
  Files         220      220
  Lines        6122     6144      +22
  Branches      361      364       +3
==========================================
+ Hits         4585     4598      +13
- Misses       1482     1491       +9
  Partials       55       55

Flag
Coverage Δ

metweb
69.38% <69.23%> (-0.08%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

.../src/components/engagement/form/EngagementForm.tsx
75.90% <ø> (ø)

.../components/engagement/form/AddSurveyBlockTabs.tsx
73.07% <62.50%> (-18.59%)
:arrow_down:

.../src/components/engagement/form/AddSurveyBlock.tsx
63.63% <66.66%> (-0.65%)
:arrow_down:

...b/src/components/engagement/form/ActionContext.tsx
60.43% <85.71%> (+1.61%)
:arrow_up:

.../src/components/engagement/form/RichTextEditor.tsx
83.72% <0.00%> (-2.33%)
:arrow_down:


Request for FBX format support and material importing.

It's a nice tool for merging COD and RE Engine's games character models before importing animations.
Request for FBX format support and material importing so that we can merge some FBX format model exported by other tools like PredatorCZ's MT FRAMEWORK TOOLS for further research on RE5,6,REV,REV2 and other MT FRAMEWORK's games.
Thanks a lot!

If someone wants to write the code for that, I'll be happy to merge it through a Pull Request, otherwise, it's not something I would ever use, and the features of this tool reflect my use of it.


Feature Request: Secure Power Terminal

Question: Have you considered implementing a secure owner-breakable block that operates as a passthrough for Redstone Flux power for a configurable fee?
There's another mod that offers a block similar to this for their proprietary power system but one that offers similar functionality for the RF standard (and/or others).  Could be neat for some SMP worlds.

I have been considering it for some time now. I'm just not sure if it belongs in Universal Coins, or if another mod should be created. I have a tech mod that I started that I could update and add the block into.
As for the block, I was thinking of adding a wireless rf transmission block. The base and receiver blocks would be linked somehow. The base GUI would allow the owner to set rf cost or collect the coins. The receiver would have two GUI. The owner GUI would be the same as the base. The player GUI would allow payment for the rf used. Both blocks would have text rendered to display rf/t transmitted and total rf used since last payment.

Wireless is a neat idea.  I had it in my head that, in conjunction with a mod such as SecurityCraft, the cabling could be kept secure but this eliminates dependencies on other mods for it to be useful.
My logic for it being in UC was only because of the already-present redstone block which (I assume since I haven't used it) did something similar and it just kind of meshes.
Either way, regardless of where that wireless RF block ends up, that does sound like a good idea!

feature added in 1.7.x-1.6.34+