GestureDetector's HitTestBehavior.translucent doesn't propogate taps underneath PageView widget

Steps to Reproduce

run this code sample
the FloatingActionButton is not clickable and that's fine
wrap the FloatingActionButton in a GestureDetector as below

 GestureDetector(
    behavior: HitTestBehavior.translucent,
    onTap: null,
    child: PageView.builder(
      itemBuilder: (context, index) => ...
    ),
  ),

Expected results:
the FloatingActionButton should be clickable
Actual results:
the FloatingActionButton is still not clickable

Code sample
import 'package:flutter/material.dart';

Future<void> _showMyDialog(BuildContext context) async => showDialog<void>(
      context: context,
      builder: (context) => AlertDialog(
        title: const Text('Success'),
        content: const Text('nice job!'),
        actions: <Widget>[
          TextButton(
            child: const Text('done'),
            onPressed: Navigator.of(context).pop,
          ),
        ],
      ),
    );

void main() => runApp(
      const MaterialApp(
        home: SafeArea(
          child: MyHomePage(),
        ),
      ),
    );

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) => Material(
        child: Stack(
          fit: StackFit.expand,
          children: [
            Positioned(
              bottom: 25,
              right: 25,
              child: FloatingActionButton(
                child: const Icon(Icons.message),
                onPressed: () => _showMyDialog(context),
              ),
            ),
            PageView.builder(
              itemBuilder: (context, index) => Center(
                child: SizedBox(
                  height: MediaQuery.of(context).size.height,
                  width: MediaQuery.of(context).size.width / 2,
                  child: const ColoredBox(
                    color: Color.fromRGBO(60, 30, 10, .5),
                  ),
                ),
              ),
            ),
          ],
        ),
      );
}

note: it isn't a PageView issue, see

Alternative Code sample
import 'package:flutter/material.dart';

Future<void> _showMyDialog(BuildContext context) async => showDialog<void>(
      context: context,
      builder: (context) => AlertDialog(
        title: const Text('Success'),
        content: const Text('nice job!'),
        actions: <Widget>[
          TextButton(
            child: const Text('done'),
            onPressed: Navigator.of(context).pop,
          ),
        ],
      ),
    );

void main() => runApp(
      const MaterialApp(
        home: SafeArea(
          child: MyHomePage(),
        ),
      ),
    );

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) => Material(
        child: Stack(
          fit: StackFit.passthrough,
          children: [
            Positioned(
              bottom: 25,
              right: 25,
              child: FloatingActionButton(
                child: const Icon(Icons.message),
                onPressed: () => _showMyDialog(context),
              ),
            ),
            Positioned(
              bottom: 25,
              right: 25,
              height: 200,
              width: 200,
              child: GestureDetector(
                behavior: HitTestBehavior.translucent,
                child: SizedBox.expand(
                  child: Container(
                    color: Colors.red.withOpacity(.6),
                  ),
                ),
              ),
            ),
          ],
        ),
      );
}

Logs
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.3 21E230 darwin-x64, locale en-EE)
    • Flutter version 2.10.3 at /Users/francesco/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (3 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/francesco/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7590822)

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

[✓] Connected device (3 available)
    • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 12 (API 31)
    • macOS (desktop)   • macos      • darwin-x64     • macOS 12.3 21E230 darwin-x64
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 99.0.4844.83

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

related to
https://github.com/flutter/flutter/issues/92103
https://github.com/flutter/flutter/issues/76525
https://github.com/flutter/flutter/issues/75099
https://github.com/flutter/flutter/issues/75090
https://github.com/flutter/flutter/issues/75086
stackoverflow mirror

Hi @aoatmon, Thanks for filing the issue. I am able to reproduce the issue on stable and the master channel. With HitTestBehavior.translucent The gesture is not propagated below the PageView.

code sample
import 'package:flutter/material.dart';

void main() => runApp(
      const MaterialApp(
        home: SafeArea(
          child: MyHomePage(),
        ),
      ),
    );

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) => Material(
        child: Stack(
          fit: StackFit.expand,
          children: [
            Positioned(
              bottom: 25,
              right: 25,
              child: FloatingActionButton(
                child: const Icon(Icons.message),
                onPressed: () {
                  /// This doesn't get executed
                  print('tapped fab');
                },
              ),
            ),
            GestureDetector(
              behavior: HitTestBehavior.translucent,
              onTap: () {
                print('tapped');
              },
              child: PageView.builder(
                itemBuilder: (context, index) => Center(
                  child: SizedBox(
                    height: MediaQuery.of(context).size.height,
                    width: MediaQuery.of(context).size.width / 2,
                    child: const ColoredBox(
                      color: Color.fromRGBO(60, 30, 10, .5),
                    ),
                  ),
                ),
              ),
            ),
          ],
        ),
      );
}

flutter doctor -v (mac)
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.1 21C52 darwin-arm, locale en-GB)
    • Flutter version 2.10.3 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (20 hours ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

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

[✓] Android Studio (version 4.2)
    • 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 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • Redmi K20 Pro (mobile) • <IP_ADDRESS>:5555 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)        • macos            • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)           • chrome           • web-javascript • Google Chrome 99.0.4844.51

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel master, 2.13.0-0.0.pre.103, on macOS 12.2.1 21D62 darwin-arm, locale en-GB)
    • Flutter version 2.13.0-0.0.pre.103 at /Users/mahesh/Documents/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 509ddfda5c (7 hours ago), 2022-03-15 21:10:18 -0700
    • Engine revision dc22c4c7fe
    • Dart version 2.17.0 (build 2.17.0-202.0.dev)
    • DevTools version 2.11.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! CocoaPods 1.10.2 out of date (1.11.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that
        responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

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

[✓] Android Studio (version 4.2)
    • 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 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.2.1 21D62 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 99.0.4844.74

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

The hit is fully absorbed by the PageView. A GestureDetector wrapped around that is not changing how the PageView absorbs hits. This appears to be working as intended. If you want the floating action button to receive hits, it has to be logically in front of the pageview. You can achieve that by switching the order of the children in the stack around.


Takes care of emitting code from manually-built AST #39

solves #39
Probably more thoughtful approach is needed here, i see a FIXME above source_range method here.
@mbj any thoughts?

@dredozubov Thx for your work. I left a small comment about specs. But I do not have the time to dig into the code change right now. My OSS time is very limited these days. Hope I can do a full review / merge this weekend.

@dredozubov I'd probably suggest squashing your commits together. I don't know if @mbj practices this on this specific project, but on other projects we work together on each commit is expected to pass CI on it's own.
When each commit stands on it's own, it allows you to use git bisect to trace bugs. It allows you to rebase code on top of other branches and if something goes wrong it's easier to trace to the offending commit. We've found a whole host of benefits that ultimately make things easier on us down the line as we maintain projects built this way.

I don't know if @mbj practices this on this specific project, but on other projects we work together on each commit is expected to pass CI on it's own.

I practice this. Thx @dkubb for explaining the hygenic commits for me here. I'd have ask @dredozubov to squash before I'd have merged this. But my explanation would have been less elegant.

Squashed. I usually expect only last commit in branch to pass CI in my own projects, so i don't squash them by default - it makes dealing with features/problems easier before branch has been merged IMO.

any news on this?

@dredozubov I was to busy during the weekend. Sorry man. Will probably take till the next weekend before I can spend time on this issue. Thx for your patience (and PR).

@mbj ok, just reminding in case you forgot :)

@mbj ok, just reminding in case you forgot :)

Thx for the reminder, feel free to continue to ping here.

Thx for the reminder, feel free to continue to ping here.

ping

ping

pong. Thx ;)

@dredozubov I'm really busy with private live, sorry for all that delays.

I'm closing this PR since the problem is NOT the unparser implementation its the false assumption that unparser unparses AST::Node instances. Where it acctually expects Parser::AST::Node instances. These always provide #location that might be nil, no need to do conditional logic snooping for object interface on unparser side.
Also unparser provides an s method that returns Parser::Node::AST instances. I might consider to make it part of the public interfance some day. But I think this should be provider by the parser gem itself. Maybe do a feature request there.


basic move view implementation

To test, try to move a view around by the titlebar.

It's getting a little cumbersome to work with clones of views.

What is it about the cloning that you don't like?

I have multiple representations to the real thing, but the only one that matters is the one in the list of views that the server has. So if I want to change view state, I have to mutate the right one which only the server can do. And when the view is destroyed, I have to clean up all the copies in that destroy callback.


No audio on iOS, already tried ignoreSilentSwitch :)

Bug
Playing videos on iOS doesn't play any audio.
On Android, the audio works as expected.
Platform

iOS

Library version: 5.2.0
Video sample
https://drive.google.com/file/d/1uqvRKYlkq6Y7K8SOht_rwaKoWcvazr2Q/view?usp=sharing
I have tried:

ignoreSilentSwitch={'ignore'}
setting muted={false}
adding [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

For context, I also have React Native Track Player installed, which could be causing a conflict?

Hello same here, iOS does not play audio, tried some configurations but no luck

The audio starts playing for a second or two if I change the playback speed.


docs: add TR-017 on polarization sensitivity

Preview can be viewed here.
To-do list

[ ] Express amplitude with SymPy

[x] Equation (1)
[x] Equation (2-4)
[x] Equation (5-7)
[ ] J values
[ ] Lineshapes
[ ] Zeta and theta to Mandestam

[ ] Express polarization sensitivity
[ ] Computations

[x] Convert to computational functions in TensorWaves
[ ] Visualize

@mmikhasenko, some generic install instructions are available here:
https://compwa-org.readthedocs.io/develop.html#local-set-up
Additional dependencies will be installed once you run the notebook itself.

Concerning the angles, zeta, theta. Latex expression is in the DPD paper (see Appendix A)
A general code is in here

Hi @mmikhasenko, dynamics and expressions of angles in terms of Mandelstam variables have been implemented. I have my doubts about the resulting intensity distribution[^1], but it should be relatively easy to fix the expressions now and add more resonances.
[^1]: Intensity distribution as of 7e36c2f:

Wow! Absolutely amazing that it works 8-)
I could not even imagine that the sympy code can be made so close to the equations I write in the paper.
What you do with @implement_doit_method class  is a pure magic.

Concerning the Dalitz.
Indeed, there should be three lines, while one sees only one.
A non-trivial distribution along the Lambda band looks good.

Cause seems to be that the Wigner-d functions are again not set correctly... would be better if those raise an exception on invalid non-symbolic values.

Formulate functions K and Delta were swapped, but not their values😐  --> af627be
Each decay chain is currently still handled separately, so there's quite some repetitive (=error-prone) code.

would be better if those raise an exception on invalid non-symbolic values. https://github.com/ComPWA/compwa-org/pull/129#issuecomment-1095080238

I take that back: a Wigner-d does accept those values, but it was the Kronecker delta that was zero.
>>> from sympy import Symbol, S
>>> from sympy.physics.quantum.spin import Rotation as Wigner
>>> half = S.Half
>>> Wigner.d(j=1, m=-1, mp=half, beta=Symbol("beta")).doit()
'sqrt(3)*sqrt(I)*I*(-3 + 2*exp(-I*beta))/(6*sqrt(pi))'

Ups! thanks!

Polarization sensitivity ⍺ should be real, right? Judging from this formula:

I don't see though how this conjugate times non-conjugate is guaranteed to be real:

With bcb25f3, the equation indeed seems to result in complex values.

be535c3 https://github.com/ComPWA/compwa-org/pull/129#issuecomment-1096442594

Yes, alphas are real,
you see that they are real if evaluate in components, e.g.
alpha_z ~ |A_{1,lambda}|^2 - |A_{-1,lambda}|^2

I think there is a typo in
formulate_aligned_amplitude(λ, ν).conjugate()

which should be (ν, λ). Let me fix it.

Ok thanks.
And should the sensitivity be computed per chain and/or resonance?
Btw, I assumed that those indices for the Pauli matrices should be interpreted as -1/2 -> 0, +1/2 -> 1.

Yes, that is correct up to a sign
\sigma_z[1/2,1/2] = 1
\sigma_z[-1/2,-1/2] = -1

Minor improvements:

[ ] add symbolic expression for alpha_i via components of A
[ ] check that alpha is real now numerically

check that alpha is real now numerically

Just did some quick check, but seems not to be the case yet.

Yes, that is correct up to a sign
\sigma_z[1/2,1/2] = 1
\sigma_z[-1/2,-1/2] = -1

--> 033310e

A curious fact is that alpha_y comes from the interferences of the resonances. It must be strictly zero for a single chain.

does not seem to be the case for the K* chain. I am afraid it was a wrong expectation in general.
However should be the case for the Lambda and Delta chains.

does not seem to be the case for the K* chain. I am afraid it was a wrong expectation in general.
However should be the case for the Lambda and Delta chains.

Indeed seems to be the case (349c5e6):

The expression for lambda_z for the Delta and Lambda chains is
alpha_z = ( H_{+,0}^2 - H_{-,0}^2 ) / ( H_{+,0}^2 + H_{-,0}^2 )

which is
Delta     : -136 / 252 = -0.53968
Lambda    :   3 / 5    = -0.6

It matches your result exactly. Is not it beautiful!

Wow, that's beautiful indeed!

Potential bug? Had to switch these indices to get the same couplings as in the generated expression:
Not sure what you mean, looks fine to me. The couplings H{Lc->R k} and H{R->i j} are different in the way we treat it.
Since only the product of these is measured, the second one, the H{R->i j} is set to 1 by absolute value, with the phase determined by the parity conservation.

The coupling H{Lc->R k} does not have any constraints: neither parity, nor magnitude.

Added a section of the fit fraction to the overleaf and the corresponding item in the summary here.
I thought that the efficient way of computing the expression for different coupling would be lambdifting once with H being the input parameters. Curious how you do it practically.
Looking forward to talk tomorrow.

Added a section of the fit fraction to the overleaf and the corresponding item in the summary here.

Ok thanks, let's implement that tomorrow.

I thought that the efficient way of computing the expression for different coupling would be lambdifting once with H being the input parameters. Curious how you do it practically.

Where to lambdify and where so substitute symbols depends a bit on the application. Currently, most of the execution is actually spent on 'unfolding' the expressions and substituting symbols with fixed values, not lambdification and computation. But it's relatively easy to adapt the script depending on the needs.

to the comment in the summary
...
https://github.com/ComPWA/compwa-org/pull/129#issuecomment-1097813150

It's just that the couplings on overleaf had slightly different indices:

I added visualization widget 88e6c59. Sliders are currently mass and width, but it's easy turn helicity couplings into sliders as well (it's just about identifying which symbols are to be identified as a parameter).
Mechanism in the widget is similar to a fit: parameters are updated and then the distribution (or in this case, the polarization) is (re)computed over the data sample.

Wooooooooooo!!!!!!!!!!

t's just that the couplings on overleaf had slightly different indices:

yours are right. I just fixed the overleaf.
One can see the mistake by checking \lambda_1 - \lambda_2. It was 3/2 before, which cannot be for Lambda_c with the spin 1/2

btw, how do you do .gif?

btw, how do you do .gif?

Haha. I use peek, but that's not available in Windows.
Flameshot is nice for screenshots though and is available on all platforms.

I found licecap for Windows.
I wanted to show you how dalitz coordinates determine particle orientation

(from notebook 4.1)

The update of the resonance content:

[ ] get rid of both K*(1430) with the mass outside of the dalitz
[ ] add L**(1670) with the mass 1670 MeV and the width 30 MeV, JP = 1/2-

from https://github.com/ComPWA/compwa-org/issues/136#issuecomment-1105114599
88374c2 removes the need for TF (through phasespace). Only problem: have to think how to render phase space times intensity in the 1D intensity plots. Previously, those were just 1D histograms, but the Dalitz plot is now a meshgrid, note a generated hit-and-miss phase space sample.

88374c2 removes the need for TF (through phasespace). Only problem: have to think how to render phase space times intensity in the 1D intensity plots. Previously, those were just 1D histograms, but the Dalitz plot is now a meshgrid, note a generated hit-and-miss phase space sample.

For the 2d distribution it should work the same way as you do alpha plotting.
The phase space is a constant (the same irrelevant constant for every point of the Dalitz). The projections to Kpi and pK can be computed by the sum(..., axis=0) and sum(..., axis=0), respectively.

The projections to Kpi and pK can be computed by the sum(..., axis=0) and sum(..., axis=0), respectively.

These ones can be done, but projection onto ppi is not possible. Note that we should now use nansum btw.

but projection onto ppi is not possible.

Indeed, it is not straightforward. But, let's stick to the two projections pK and Kpi.
Generally, it is not impossible to calculate ppi. Here are two options (just for your curiosity):

one can consider the intensity calculated on the grid as a MC data set with the weights. For projection to ppi, you need to calculate ppi for every point and histogram it. This method might suffer from the binning interference with the grid in case the grid space is not fine enough.

The second option is to evaluate the function on ppi x pK grid and nansum(..., axis=0).

I did not manage to make tox testing work. Also, numerical stuff is not working for me.
So, I likely screwed something up with removing the K*(1430)

I did not manage to make tox testing work. Also, numerical stuff is not working for me.

Seems that anything using JAX does not work on Windows. See suggested solution in https://github.com/ComPWA/compwa-org/issues/136#issuecomment-1105155376.
Alternative: use numpy as backend only. Slower, but should be fine on this phase space.

Thanks for the fixed. Looks great.
Let's see if everything else is regenerated correctly. I am wondering what is going to happen with the sliders.

[ ] Add the unpolarizard intensity and |alpha| plots to the visualization

|alpha| should be there 0c05593. Did you mean the intensity distribution should be rendered in the widget as well?

Nice!
Yes, the total intensity.
Today you showed that when changing the parameters like mass and width does not necessarily changes the alpha.
That is why I thought that is is good to see them together.

Text has been ported from the overleaf document and can now be reorganized/rewritten.
Things to consider:

How/whether to merge the rendered sympy latex renderings with the hard-coded latex equations
Move proofs etc to appendices, as in the original document. Unfortunately, there is no Sphinx directive for appendices, so this would have to be done with normal headings.

I plotted how the polatization sensitivity should look like for isolated misaligned chains

the directions are given by \zeta_{2(1)}^0 and \zeta_{3(1)}^0 for Lambda and Delta, respectively.

it is with Julia
Next time we look at the alphax, and alphay, we should have a better feeling.

Btw, what's missing to get it merged?


🐛 BUG: Format code is wrong and breaks structure

Describe the Bug
I don't know if a bug or i'm doing something wrong. It's my first time with Astro.
When I format the code, it is changing the position of some divs and it is deleting some divs too and is wrong.
I'm using VSCode and the Astro extension.
Here you have a video, when I format my code, breaks all the structure.
Note: In the screenshot you will see
 instead of
. I modified and also remove too but the problem continue.

---
import<EMAIL_ADDRESS>import BaseLayout from<EMAIL_ADDRESS>import HtmlIcon from<EMAIL_ADDRESS>import CssIcon from<EMAIL_ADDRESS>import SassIcon from<EMAIL_ADDRESS>import AngularIcon from<EMAIL_ADDRESS>import JavascriptIcon from<EMAIL_ADDRESS>import TypescriptIcon from<EMAIL_ADDRESS>import ReactIcon from<EMAIL_ADDRESS>import ReduxIcon from<EMAIL_ADDRESS>import FigmaIcon from<EMAIL_ADDRESS>import LinuxIcon from<EMAIL_ADDRESS>import GitIcon from<EMAIL_ADDRESS>import PictureMe from<EMAIL_ADDRESS>import { Image } from "astro:assets";
import { Button } from "@/components/ui/button";
import { ModeToggle } from "@/components/ModeToggle";
---

<BaseLayout>

        <Image
          class="rounded-full mx-auto"
          src={PictureMe}
          alt="Picture of Diego"
          width="300"
          height="300"
        />

            Diego Franchina

Front-end Developer

            <Button className="w-full font-bold text-md" >Download CV</Button>

          SoyDiego / README.md

        <ModeToggle client:load />

        Hello World!

        About Me

        I'm Diego, Front-end Developer.

        From Buenos Aires, Argentina 🇦🇷 and currently based in Barcelona, Spain
        🇪🇸

        Discover all my projects, including my contributions to open-source
        initiatives.

        Skills

        <HtmlIcon />

        <CssIcon />
        <SassIcon />

        <JavascriptIcon />
        <TypescriptIcon />
                 <AngularIcon />
        <ReactIcon />
        <ReduxIcon />
        <FigmaIcon />
             <LinuxIcon />
        <GitIcon />

        Keep in touch

</BaseLayout>

Steps to Reproduce

Project in Astro.
Formatting code

The formatter is getting confused because your HTML is invalid. You have many unclosed tags, tags that are closed using the wrong syntax (the slash is in the wrong position, it's supposed to be

, not

, the latter creates two div, which the formatter try to close.)
The formatter seems to generally be doing this correctly, even though it changes the rendering, it does seems to be generating valid HTML as best as it can.

The formatter is getting confused because your HTML is invalid. You have many unclosed tags, tags that are closed using the wrong syntax (the slash is in the wrong position, it's supposed to be

, not

, the latter creates two div, which the formatter try to close.). With all of those issues fixed, the code formats correctly.
The formatter seems to generally be doing this correctly, even though it changes the rendering, it does seems to be generating valid HTML as best as it can. We'll track the correcting not matching the browser perfectly in a separate issue, but I would generally suggest writing valid HTML and not relying on the correction 😄

Thanks for your reply. You are right, I don't know when the h2 and h3 was closed with the wrong slash position.
Now the format is correct. THANKS!.
But why the eslint or vscode or something doesn't show this problem?
Is there something to see this types of problems?
Thanks again!


Iphone

how to run this kind of script on iPhone?

If your phone is jailbroken and you can install python, then you maybe able to use this.


[question] Can we use ngx_socket_connect() to an upstream?

So we will have a pool, and extra options to the connection for free.

We can do it if we set a route in the config, that point to the upstream, and we point to that route.
But can we do it directly, without the route ?

@joanhey
Sure, php_keepalive directive can be set upstream connection pool size.
https://github.com/rryqszq4/ngx-php#php_keepalive


Replace InfluxQL queries with Flux queries in Grafana dashboard

InfluxQL queries are incompatible with InfluxDB 2.0 and later.. Thus, the queries for metrics in the Firehose Grafana dashboard must switch to Flux queries supported by InfluxDB 2.0+

Hey @sumitaich1998, I would like to pick this up. I would be needing your guidance for this(kinda new to this project as well as flux)

Hey @sumitaich1998, I would like to pick this up. I would be needing your guidance for this(kinda new to this project as well as flux)

cool, i will help u with any doubts

@iharshit009 you'll need to set up Grafana locally . Go through this guide on how to set up Grafana and InfluxDB with Firehose.


How can I custom select item. Thank you!

I'm wanting when I select an item an icon will appear on the right side. I did but when I go to the screen and I select an item whenever it warns me that I cannot update a component while updating another component. Thank you for your help
And this is my code RenderItem
const renderItem = item => {
return (

{item.label}
{selected.includes(item.value) ? (
<Image
source={require('../Image/ReturnResultWarranty/tickxanh.png')}
style={{width: (height * 4) / 100, height: (height * 4) / 100}}
/>
) : null}
{selected.length == data.length ? setChecked(true) : setChecked(false)}

);
};

hi @V-d-H ,
Please refer example.
https://github.com/hoaphantn7604/react-native-element-dropdown#multiselect-example-2


With Preact, s in a  are rendered even when not matched

Version
4.0.0-beta-6
Test Case
http://jsbin.com/ximalatava/1/edit?console,output
Loads Preact and Preact-compat
Steps to reproduce

Click on the "/view" link
Click on the "/" link
Click on the "/view" link

Expected Behavior
The console contains:
"/view"
"/"
"/view"

Actual Behavior
The console contains:
"/view"
"/view"
"/"
"/"
"/view"

We're not targeting support for Preact with this library. This is something for preact-compat to solve. If there's a behavior difference, it should patch over it somehow. I would open up an issue on their repo.
Thank you for the usable test case, btw!

Thank you for the fast reply.
I understand that you're not targeting support for Preact.
But in this particular case, while the symptoms of the problem are only visible with Preact, problem is present in both React and Preact.
The problem, AFAICS, is that in the history listener of the Route uses computedMatch (here) while it's no longer valid (it was passed as a prop from the Switch for the previous location).
Possible solutions:

The easy solution: Replace the call to computeMatch() in the Route's listener with a direct call to matchPath() (ignoring the computedMatch)
The clean solution: Remove the internal computedMatch prop completely, so that matchPath() is always used. And if needed memoize matchPath().

BTW, thank you for the fantastic library especially v4, I found the older versions too complex and thus chose not to use them. But it's not the case for v4, v4 is very simple and very "Reacty". :+1:

I can submit a PR if needed :smile:


Drag and drop fixes and special character errors

When files were drag and drop, a wrong path was produced. I have changed the folder selector path with an absolute path os.path.dirname(iFile). Also some errors were produced when the program was launched produced by incorrect characters

Hi there... been super busy for quite some time with other projects but I am currently looking into squaring away some time to get back into this. Can you please do a pull request for this to the develop branch instead?


[feature] Run go generate ./... before build

Is your feature request related to a problem? Please describe.
Some files need to be generated, which will be used in go build
Describe the solution you'd like
Add another field in Configuration File, such as generate, to allow user customize the generation.
# Version for this file.
version: 1

generate: "./..." # go generate ./...
generate: ""      # leave empty to skip go generate

Describe alternatives you've considered
Additional context

Can you add more details?


Having issues setting it up

Can you help, maybe come on discord and help?

Hey @Ayresia , could you possibly explain your issue here? That way if others have the same problem, they'll be able to use the answer from here. Thanks!

I don't know how to setup this up at all. I don't know how to get the keys and where to put them, can you do an video tutorial or come on share screen discord?

If you enter any url (eg. github.com) afterward, enter the control panel for your new search and change the "sites to search" option and delete the URL you added.

How can i get the bearer key, can i use an emulator inorder to get it?

You'll need to sniff your network traffic on your mobile device, so that you can intercept data being sent to it. The bearer token is sent from their API once you have opened the app.

How can i sniff the network traffic with Android 7.0, i know you have to use charlie but is that possible?

As far as I'm aware, you won't be able to use Charlie for Android 7+. But please give it a go and report back!

What do i have to name the .env and where should i put it

The file should literally be called .env, and needs to be in the root of your project.

There is nothing.

The touch.env i created it.

Rename touch.env to .env

I cant, i can only rename it to env.env

In your console, type touch .env, which will generate the environment variables file.

Done.


Changes to frontend code to handle spectators.

Hmm, this doesn't seem like we can merge standalone, but good for reviewing.

I don't see an obvious reason we can't merge the first N commits of this after addressing the minor issues mentioned above.  (Some of which you should feel free to declare the current code feels cleaner).

Yeah, we can merge this.

After this, only web public stream commits will be remaining, which makes sense to merge after this. They are present in #18532 ready to review, if you want to take a look.

I merged a couple commits as the series ending with 1295b47e3b9042c4ea7cb10d9928499ba141d193.

I pushed back here with the following changes:

Added/adjusted comments.
Added stopPropgation/preventDefault to the click handler.
Moved is_web_public_compatible comment to the file with the actual JS implementation, though I notice now there's a specatators typo you can fix in your pass.
Changed message_fetch.js commit to use the early return comment.

$ git diff 60eebdae7a3b9a575ded9d913634d9c8765f4a5f | cat
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js
index d584eb5e92..4198d33773 100644
--- a/static/js/click_handlers.js
+++ b/static/js/click_handlers.js
@@ -44,11 +44,13 @@ import * as user_profile from "./user_profile";
 import * as util from "./util";

 export function initialize() {
-    // LOGIN TO ACCESS MODAL
+    // SPECATORS LOGIN TO ACCESS MODAL

-    $("body").on("click hide", ".go_back_button", () => {
+    $("body").on("click hide", ".go_back_button", (e) => {
         browser_history.return_to_web_public_hash();
         $("#login_to_access_modal").modal("hide");
+        e.preventDefault();
+        e.stopPropagation();
     });

     // MESSAGE CLICKING
diff --git a/static/js/filter.js b/static/js/filter.js
index<PHONE_NUMBER>..97405ccdf1 100644
--- a/static/js/filter.js
+++ b/static/js/filter.js
@@ -1008,7 +1008,6 @@ export class Filter {
     }

     static is_web_public_compatible(ops) {
-        // When modifying this function, update similar function in narrow.py too.
         for (const op of ops) {
             if (op.operand === undefined) {
                 return false;
diff --git a/static/js/hash_util.js b/static/js/hash_util.js
index 91e5822d86..5b439ab505 100644
--- a/static/js/hash_util.js
+++ b/static/js/hash_util.js
@@ -283,6 +283,8 @@ export const allowed_web_public_narrows = [
 ];

 export function is_web_public_compatible(hash) {
+    // Defines which views are supported for specatators.
+    // This implementation should agree with the similar function in zerver/lib/narrow.py.
     const web_public_allowed_hashes = [
         "",
         "narrow", // full #narrow hash handled in narrow.is_web_public_compatible
@@ -291,6 +293,7 @@ export function is_web_public_compatible(hash) {
         "message-formatting",
         "search-operators",
         "all_messages",
+        "about-zulip",
     ];

     const main_hash = get_hash_category(hash);
diff --git a/static/js/login_to_access.js b/static/js/login_to_access.js
index 5bc7384b62..d78089e56d 100644
--- a/static/js/login_to_access.js
+++ b/static/js/login_to_access.js
@@ -1,3 +1,10 @@
+// Module for displaying the modal asking spectators to login when
+// attempting to do things that are not possible as a specatator (like
+// add an emoji reaction, star a message, etc.).  While in many cases,
+// we will prefer to hide menu options that don't make sense for
+// spectators, this modal is useful for everything that doesn't make
+// sense to remove from a design perspective.
+
 import $ from "jquery";

 import render_login_to_access_modal from "../templates/login_to_access.hbs";
diff --git a/static/js/message_fetch.js b/static/js/message_fetch.js
index 5c9ed62ae9..c2abdcf091 100644
--- a/static/js/message_fetch.js
+++ b/static/js/message_fetch.js
@@ -447,37 +447,41 @@ export function initialize(home_view_loaded) {
         cont: load_more,
     });

-    if (!page_params.is_spectator) {
-        // In addition to the algorithm above, which is designed to ensure
-        // that we fetch all message history eventually starting with the
-        // first unread message, we also need to ensure that the Recent
-        // Topics page contains the very most recent threads on page load.
-        //
-        // Long term, we'll want to replace this with something that's
-        // more performant (i.e. avoids this unnecessary extra fetch the
-        // results of which are basically discarded) and better represents
-        // more than a few hundred messages' history, but this strategy
-        // allows "Recent topics" to always show current data (with gaps)
-        // on page load; the data will be complete once the algorithm
-        // above catches up to present.
-        //
-        // (Users will see a weird artifact where Recent topics has a gap
-        // between E.g. 6 days ago and 37 days ago while the catchup
-        // process runs, so this strategy still results in problematic
-        // visual artifacts shortly after page load; just more forgiveable
-        // ones).
-        //
-        // This MessageList is defined similarly to home_message_list,
-        // without a `table_name` attached.
-        const recent_topics_message_list = new message_list.MessageList({
-            filter: new Filter([{operator: "in", operand: "home"}]),
-            excludes_muted_topics: true,
-        });
-        load_messages({
-            anchor: "newest",
-            num_before: consts.recent_topics_initial_fetch_size,
-            num_after: 0,
-            msg_list: recent_topics_message_list,
-        });
+    if (page_params.is_spectator) {
+        // Since spectators never have old unreads, we can skip the
+        // hacky fetch below for them (which would just waste resources).
+        return;
     }
+
+    // In addition to the algorithm above, which is designed to ensure
+    // that we fetch all message history eventually starting with the
+    // first unread message, we also need to ensure that the Recent
+    // Topics page contains the very most recent threads on page load.
+    //
+    // Long term, we'll want to replace this with something that's
+    // more performant (i.e. avoids this unnecessary extra fetch the
+    // results of which are basically discarded) and better represents
+    // more than a few hundred messages' history, but this strategy
+    // allows "Recent topics" to always show current data (with gaps)
+    // on page load; the data will be complete once the algorithm
+    // above catches up to present.
+    //
+    // (Users will see a weird artifact where Recent topics has a gap
+    // between E.g. 6 days ago and 37 days ago while the catchup
+    // process runs, so this strategy still results in problematic
+    // visual artifacts shortly after page load; just more forgiveable
+    // ones).
+    //
+    // This MessageList is defined similarly to home_message_list,
+    // without a `table_name` attached.
+    const recent_topics_message_list = new message_list.MessageList({
+        filter: new Filter([{operator: "in", operand: "home"}]),
+        excludes_muted_topics: true,
+    });
+    load_messages({
+        anchor: "newest",
+        num_before: consts.recent_topics_initial_fetch_size,
+        num_after: 0,
+        msg_list: recent_topics_message_list,
+    });
 }
diff --git a/static/js/reactions.js b/static/js/reactions.js
index dac61d24bb..0932a7fe8e 100644
--- a/static/js/reactions.js
+++ b/static/js/reactions.js
@@ -112,9 +112,12 @@ export function toggle_emoji_reaction(message_id, emoji_name) {

 export function process_reaction_click(message_id, local_id) {
     if (page_params.is_spectator) {
+        // Spectators can't react, since they don't have accounts.  We
+        // stop here to avoid a confusing reaction local echo.
         login_to_access.show();
         return;
     }
+
     const message = get_message(message_id);

     if (!message) {
diff --git a/zerver/lib/narrow.py b/zerver/lib/narrow.py
index 9dbe1840d2..6cbe5b5e40 100644
--- a/zerver/lib/narrow.py
+++ b/zerver/lib/narrow.py
@@ -30,7 +30,7 @@ def check_supported_events_narrow_filter(narrow: Iterable[Sequence[str]]) -> Non

 def is_web_public_compatible(narrow: Iterable[Dict[str, Any]]) -> bool:
-    # When modifying this function, update similar function in filter.js too.
+    # This implementation should agree with the similar function in static/js/hash_utl.js.
     for element in narrow:
         operator = element["operator"]
         if "operand" not in element:

Merged, thanks @amanagr!  I think we should still think about renaming login_to_access to have spectator in the name, but that seems fine as a follow-up commit.


Cannot revoke certificate. No external id found.

I'm trying to delete authority and imported certificate from Lemur WebUI.
I didn't find such option for Authorities, but in Certificates, I've found revoke
This error for revoking authority cert (created by cryptography plugin):

And the same error for the manually imported certificate:

Revocation is not currently supported by the Cryptography issuer.


chore: adds NMT Wrapper specifications

Overview
This PR addresses issue #1296 by adding the specification for the NMT wrapper. The specification is based on the state of implementation after the inclusion of the changes made in pull request #1438.
Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

Codecov Report

Merging #1442 (eca33b4) into main (917b7f4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##             main    #1442      +/-   ##
==========================================
+ Coverage   49.21%   49.22%   +0.01%
==========================================
  Files          79       79
  Lines        4482     4477       -5
==========================================
- Hits         2206     2204       -2
+ Misses       2091     2089       -2
+ Partials      185      184       -1

Impacted Files
Coverage Δ

pkg/wrapper/nmt_wrapper.go
82.50% <100.00%> (ø)

testutil/testnode/rpc_client.go
65.38% <0.00%> (-5.35%)
:arrow_down:

testutil/testnode/full_node.go
83.10% <0.00%> (+3.83%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

I would appreciate it if you could kindly provide any further feedback you may have on the specification. If there are no further comments or changes needed, I plan to merge it tomorrow.


Why you limit the timing for display at 12h

At least let people choose

@johnnyzzhu - This is required to reduce usage of people not actively watching.The application already exceeds the quotas set by Google Photos daily.


[Bug] head_on_collisions_comparison - 100% head on collisions

Describe the bug
When the percentage of head on collisions is 100% - other accidents still appear
Screenshots

@yuvalbl FYI

@yuvalbl FYI

@atalyaalon Please check-in staging
slice for "zero percent" is not displayed. we still need to remove the label for 0-percent + relocate the other lable

@atalyaalon Please check-in staging
slice for "zero percent" is not displayed. we still need to remove the label for 0-percent + relocate the other lable

@atalyaalon I think that for 100% we should use a circle and a label in its center, nothing more

@atalyaalon I think that for 100% we should use a circle and a label in its center, nothing more

@yuvalbl Sounds good, thanks

@yuvalbl Sounds good, thanks

Will be treated in #592


🚀 copilot: Support custom authentication resolution

Plugin Name
copilot-backend
🔖 Feature description
The plugin currently relies on the built in integrations config for resolving the credentials used to speak to the GitHub copilot metrics API. This metrics API is on the enterprise level.
We currently use an org level GH app to authenticate against GitHub from our instance which does not have the ability to authenticate against the enterprise level APIS.
We need a way of being able to inject or configure a different way of authenticating against the enterprise level api.
🎤 Context
We use a GitHub app from the integration config for our authentication against github.
It is not possible to use these app creds to speak to the enterprise level copilot API.
✌ Possible Implementation
I can think of two things.

Update the current implementation to somehow use the enterprise id when selecting the correct integration config
Exposing an extension point for the plugin that allows consumers to provide their own implementation of a credential resolver so that we can use another way of getting the enterprise level PAT

👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
Yes I am willing to submit a PR!

CC @esw-afabiano

Hey @ScottGuymer,
Thank you for bringing this issue to our attention.
From what I understand, you have a token at the organization-level, but Copilot requires a token for the enterprise-level, correct? As it stands, this isn't possible because we are reusing the current GitHub token.
We can revisit the possibility of making the token a setting inside the copilot config again. What do you think about this, @awanlin? Do you have any suggestions on what could be done?
I would also like to point out that currently the plugin does not support integration at the organization-level. Even if your token has the necessary privileges, Copilot users need to be within an enterprise for authentication with the enterprise-level metrics API to function properly.

I wanted to let you know that I'm working on a Pull Request to add support for organization-level integration as well. I've completed most of the implementation, but testing has been a bit more complex since we don't have all the necessary resources set up within our organization at the moment.

If I haven't fully understood your requirements, could you please provide more details? This will help ensure that the solution accurately addresses your needs.
Thank you for your patience and for your interest in improving the plugin. Please feel free to reach out if you have any further questions or need assistance. You're also welcome to follow the progress of the Pull Request or contribute with suggestions.

We use a GitHub app (not a PAT token) in the integrations config of backstage for authentication into our GitHub org.
Config looks something like this
integrations:
  github:
    - host: github.com
      apps:
        - appId: ${AUTH_GITHUB_APP_ID}
          allowedInstallationOwners:
            - 'my-org'
          clientId: ${AUTH_GITHUB_CLIENT_ID}
          clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
          webhookSecret: not_required
          privateKey: ${AUTH_GITHUB_PRIVATE_KEY}

This GH app is an org level app that has access to a single org (not a public app). It does not have access to any enterprise level APIs.
My understanding is that currently GitHub apps do not work at all for enterprise level APIS and the only way to access these is with PAT tokens.
We want to use the enterprise level API to get the copilot data so do not need any org level copilot data.
Therefore we need some other way of resolving the PAT token required to access the enterprise copilot API.
My suggestion was for this plugin to provide an extension point.
This would be done by defining (and exporting) an interface for a credentials resolution function that would return a GithubInfo type. We could then refactor your implementation in getGithubInfo to match this interface and act as the default implementation.
This would leave users of this plugin free to implement their implementation of the credentials resolver to get enterprise credentials (either from config or even some other location) and patch them into your plugin at the point it is instantiated in their instance.

Heyy
I got it now. The issue with DefaultGithubCredentialsProvider may need to be raised with the Backstage maintainers. Perhaps the most viable solution is to implement this refactoring within the copilot-backend plugin itself.

I made a start at the PR for this here
https://github.com/backstage/community-plugins/pull/1260

Find me on the backstage discord. Id love to chat about this plugin and how i can help improve it.
I also created #1259

Hi @ScottGuymer, this might also be on me. When I reviewed the plugin I suggested using the DefaultGithubCredentialsProvider assuming that the APIs would be available like any other within GitHub. During my reviews I tend to focus on making sure we take advantage of built in framework features of Backstage so that plugin owners have less to maintain and their plugins work more like others which means Adopters have a smooth experience using them.
Now in this case the extension point makes sense for more advanced Adopters but for most doing this is going to be a high barrier to entry and I feel that some built in support for this would be good as well. The plugin should be able to be smart enough to say - this is an Enterprise API so going to use the PAT vs this is an Org API so going to get the token from DefaultGithubCredentialsProvider.  As I can easily see this plugin becoming popular I think a low code approach makes sense. The perfect approach would be support upstream but I think for now having it in the plugin is fine and you can itterate on it more quickly this way.

Hey @awanlin,
I think initially, to accommodate all scenarios and ensure that everyone can use it without significant complications, we could revert to using the token directly in the copilot context. We can open an issue to revisit this implementation for other scenarios at a later time. What do you all think?
cc: @ScottGuymer

I have made these changes in the PR.
There is now a default config for using the token from the copilot section in the config.
There is an optional config for using the integrations config available via an extension point configuration.
And then any other option you are willing to write via an extension point.

Closed by #1928


Add copy http/*.lua in Makefile

Hi, there
Please review it, thx.

@vkill please rebase to master branch. I just fixed some bad code style.

I run rebase then force-pushed , maybe it's the wrong operation.

merged, thx


Container not restarting on docker-gen notify-sighup

Hi guys,
I'm trying to configure docker-gen to template the Caddyfile to reverse proxy a few services.
I've noted that the caddy container does not seem to restart when sent a sighup. I have no idea if this is an issue with docker, caddy, or alpine-caddy.
Running Docker 1.11.2 on Ubuntu as well as 1.11.1-beta13.1 on a Mac, using docker kill -s hup <container> seems to restart any other given container in my docker-compose.yml, as expected, except for caddy which never comes back up again. docker restart caddy does restart the container properly, but I'm not sure I can achieve this from within the docker-gen container.
Edit: This appears to be caddy specific behaviour

Thanks for the  update and for closing! If you get the chance update us on the issue as it evolves -- we will try to do the same!

I don't know if any of my findings thus far are specific to this container at all, but so far I note that the developer actually implemented restarts on SIGUSR1 rather than SIGHUP.
I've made a few observations, but my understanding is limited as I consider myself still just a linux/docker learner. I may be reaching beyond my expertise at the moment.

kill -l shows a value of 10 for SIGUSR1 on Ubuntu 14.04 and the same value for USR1 in Alpine.
When caddy is executed on the Ubuntu host, it does restart when sent SIGUSR1, with a new PID.
Using docker exec -it caddy-test /bin/sh and sending kill -s 10 1 to the caddy process kills the alpine-caddy container.
Sending SIGUSR1 from within the container DOES restart the abiosoft/caddy container (but it still doesn't restart on docker kill -s 10 caddy from host).

Don't know if this is the best place to discuss what I'm trying to achieve but I'd love some direction if you have any ideas.
I've briefly entertained the idea of building an image from docker-gen and including the Docker client as we're already mounting docker.sock, could then send docker restart caddy from within docker-gen... Not sure.

Looks like Caddy starts a new process on receiving SIGUSR1 instead of reloading its config in-process. This makes tini die. I did some research and tried making an image with supervisord which stops and restarts nominated processes when it receives SIGHUP.
FROM zzrot/alpine-caddy:latest
MAINTAINER Whitestrake<EMAIL_ADDRESS>
RUN apk --no-cache add supervisor

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

ENTRYPOINT ["/usr/bin/supervisord"]
CMD ["--configuration", "/etc/supervisor/conf.d/supervisord.conf"]

With supervisord.conf:
[supervisord]
nodaemon=true

[program:caddy]
command=caddy --conf /etc/Caddyfile

Which has a result I like more:
2016-06-09 05:30:52,025 CRIT Supervisor running as root (no user in config file)
2016-06-09 05:30:52,027 INFO supervisord started with pid 1
2016-06-09 05:30:53,030 INFO spawned: 'caddy' with pid 7
2016-06-09 05:30:54,041 INFO success: caddy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-06-09 05:31:04,468 WARN received SIGHUP indicating restart request
2016-06-09 05:31:04,469 INFO waiting for caddy to die
2016-06-09 05:31:04,469 INFO stopped: caddy (exit status 0)
2016-06-09 05:31:04,473 CRIT Supervisor running as root (no user in config file)
2016-06-09 05:31:04,476 INFO supervisord started with pid 1
2016-06-09 05:31:05,479 INFO spawned: 'caddy' with pid 14
2016-06-09 05:31:06,490 INFO success: caddy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

But nearly doubles the image size. :(

Found a neater solution.
Dockerfile:
FROM zzrot/alpine-caddy:latest
MAINTAINER Whitestrake<EMAIL_ADDRESS>
COPY entry.sh /usr/bin/entry.sh

ENTRYPOINT ["/usr/bin/entry.sh"]
CMD ["--conf", "/etc/Caddyfile"]

With entry.sh:
#!/bin/sh

# SIGHUP
hup_handler() {
  pid=`cat /etc/caddy.pid`
  echo "[entry.sh] Received SIGHUP, sending SIGUSR1 to $pid"
  kill -10 "$pid"
  hover
}

# Wait on caddy
hover() {
  sleep 1
  pid=`cat /etc/caddy.pid`
  echo "[entry.sh] Now waiting on $pid"
  wait "$pid"
}

trap 'hup_handler' SIGHUP

echo "[entry.sh] Starting caddy with args $@"
caddy -log stdout -pidfile /etc/caddy.pid "$@" &
hover

Starting a test container and sending SIGHUP to it:
[entry.sh] Starting caddy with args --conf /etc/Caddyfile
2016/06/10 02:14:49 [WARNING] Root path does not exist: /var/www/html
Activating privacy features... done.
<IP_ADDRESS>:80
[entry.sh] Now waiting on 5
[entry.sh] Received SIGHUP, sending SIGUSR1 to 5
2016/06/10 02:19:53 [INFO] SIGUSR1: Reloading
2016/06/10 02:19:53 [INFO] Restarting
2016/06/10 02:19:53 [WARNING] Root path does not exist: /var/www/html
2016/06/10 02:19:53 [WARNING] Root path does not exist: /var/www/html
[entry.sh] Now waiting on 16

Can sort of do whatever we want with the signal handlers. Will probably implement the other caddy signal handlers as well..

Caddy beta 0.9 updates SIGUSR1 to graceful reload without spawning a new process:
https://forum.caddyserver.com/t/caddy-0-9-beta-version-available/146
Everything above will be completely unnecessary. :/


Concurrency

Is there a way to configure how many tests can run at a time with this plugin? How would you go about doing that?

I don't think this is even supported by Sauce Labs' uniting feature:
https://wiki.saucelabs.com/display/DOCS/JavaScript+Unit+Testing+Methods
From what I can tell, Sauce Labs automatically manages queuing these for you in cases where you specify more platforms than your testing plan allows.

@philipwalton thanks for the info. I am hitting ngroks rate limits (not saucelabs) so understandable that they do not have an api for it.

Yeah, I was hitting those as well, which is why we added support for localtunnel and sauce connect.


[API-Store] UI malfunction when the permission list is too long in application key generate tab

Description:
In API-Store if we select a long list of permissions when generating the token, at one point when the list gets too large, UI alignments get out of order. Thereafter the "Regenerate" button goes unresponsive.
Suggested Labels:
ui, medium, api-store, IoT
Suggested Assignees:
thusithak
Affected Product Version:
org.wso2.carbon.apimgt.api - 6.1.95 installed in IoT server.
Steps to reproduce:

Create an Application
Subscribe to multiple APIs
Goto the application production key generate
Select long list (10 to 20) of permissions

At this point, UI will malfunction.

Try to click on "Regenerate" token button.
The button goes unresponsive.

We have revamped the UI and addressed this. Hence closing the issue.


Z-Indexing

Hello,
I was wondering what Pixi-people thought about having the possibility to specify z-index for elements within containers.
There is a small project I work on to test various components among which is a custom version of Pixi with a data-structure that efficiently handle z-indexed children in the containers. It allows for much faster sprite removal than a simple array (Array.splice is slow) and it allows me to very easily place my elements in the scene with a smaller number of containers to hold my sprites, leading to smaller rendering overhead.
The problem is that it is incompatible with the current API. I would like to know what is the position of the Pixi-leaders on the matter?

Sound neat @bchevalier !
Anymore info you have on the data structure would be ace. Im sure there is a way it could be done.
Thanks!

Funny enough I haven't found much use for this. At first I was also quite irritated coming from a late Flex background where I could easily set depth.
With HTML5 I find that I try to keep my scenes as little complex as possible for mobile sake.
And in doing so I have the following patch/addon in my code for the odd scenario where I require to set the depth.
  /**
   * This addon adds depth property to PIXI.DisplayObject and sortChildrenByDepth to PIXI.Container
   *
   */
  (function () {
    PIXI.DisplayObject.prototype.depth = 0;

    PIXI.Container.prototype.sortChildrenByDepth = function () {
      this.children.mergeSort(sortByDepth);
    };

    function sortByDepth(a, b) {
      var left = a.depth;
      var right = b.depth;
      if (left < right)
        return -1;
      if (left == right)
        return 0;
      else
        return 1;
    }
  })();

And the following Array prototype.
  "use strict";

  var p = Array.prototype;

  p.mergeSort = mergeSort;
  p.bubbleSort = bubbleSort;
  p.shuffle = shuffle;
  p.swap = swap;

  function shuffle() {
    var o = this;
    for (var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
  }

  function swap(a, b) {
    var o = this;
    var temp = o[a];
    o[a] = o[b];
    o[b] = temp;
    return o;
  }

  function bubbleSort(compare) {
    var a = this;
    var swapped;
    do
    {
      swapped = false;
      for (var i = 0; i < a.length - 1; i++) {
        if (compare(a[i], a[i + 1]) > 0) {
          var temp = a[i];
          a[i] = a[i + 1];
          a[i + 1] = temp;
          swapped = true;
        }
      }
    } while (swapped);
  }

  function mergeSort(compare) {
    var items = this;

    if (items.length < 2) {
      return items;
    }

    var middle = Math.floor(items.length / 2),
      left = items.slice(0, middle),
      right = items.slice(middle),
      params = merge(left.mergeSort(compare), right.mergeSort(compare), compare);

    // Add the arguments to replace everything between 0 and last item in the array
    params.unshift(0, items.length);
    items.splice.apply(items, params);
    return items;
  }

  function merge(left, right, compare) {
    var result = [],
      il = 0,
      ir = 0;

    while (il < left.length && ir < right.length) {
      if (compare(left[il], right[ir]) < 0) {
        result.push(left[il++]);
      } else {
        result.push(right[ir++]);
      }
    }

    return result.concat(left.slice(il)).concat(right.slice(ir));
  }

This way I can call container.sortByDepth() whenever I set the depth parameter.
Obviously this becomes unfeasible very quickly the moment you have depth/z-index changes often.
BUT. As a whole I'm quite in favor of having it managed internally by PIXI :) As long as it's fast e.g. log(n) addition and removal.

The data-structure I use is a doubly linked list (I have used it in several projects already).
It's in O(n) for addition (amortized O(1) if addition at the beginning or the end of the list) and in O(1) for removal. Since an array would be O(1) for addition and O(n) for removal, it seems pretty similar in terms of performance, but actually the O(n) operation for removing an element in an array is much slower than the O(n) for adding an element in the doubly linked list.
This data-structure is also very efficient at repositioning elements whose z-index change only slightly, for instance in 3D-Iso games the characters can move forward and backward.
For large amount of elements I have also implemented an avl tree(which I also used in several projects) that is in O(log(n)) for both addition and removal. However I mainly develop mobile games and I usually had to handle small amounts of elements and therefore found that the doubly list was more efficient. Also, it would take longer (in terms of execution time) to reposition elements whose z-index changes only slightly in a tree than in a list. I would also need to change the implementation of the tree to allow iterating quickly through elements in order (which is possible and not too much work).

We used to use a linked list instead of an array, but the reality is that you iterate over children way more often than you change their contents. Because of that we switched back to an array for maximum iteration performance.

Yes, that was my problem too. When I did some benchmarks one year ago, it looked like iterating through arrays was twice as fast as iterating through linked list on most major browsers (except chrome). But when I ran the benchmarks again lately all the browsers had identical performance for iterating through arrays and linked list. I guess that's due to JavaScript compilers getting better. May be that deserves some JSperf.

Nice! I love a double linked list :D As @englercj  mentioned, Pixi's v1 ran of double linked lists :)
We changed as arrays are just a lot easier to manage and manipulate. For a general use case sorting the children array with a sort function is the way i usually go.
What ares to you feel are incompatible with the current api? Creating a container custom container that uses a linked list rather than an array would do the trick i imagine?
Cheers!
Mat

The problem is that you would then have to maintain 2 different type of containers and particle containers that would be identical except for the data-structure storing the children.

I had a similar need for an isometric engine where Z-indexing is mandatory, and I tested many custom data structures with more or less success ....
My final conclusion was that using the original datastructure (Array) is the more balanced choice. not the best for performance but the it prevent some troubles and complications.
what I do to get correct z-indexing is adding a z value to sprites (or a meta data holding Z value), detect Z values changes in the code, and in that case set a Zdirty to true.
when Zdirty flag is true I call a sort function based on z values before rendering.
I'm using this technique in a game with more than 8192 sprites and it runs just fine on brower and many mobile devices.
the trick is to identify and sort only sprites inside the viewport.

I imagine that sorting almost sorted array is quite fast on any major browser (depending on the cases doing it on a linked list could be either faster or slower).
The performance issues is mainly if sprites were to be (added and) removed very frequently because calling splice is quite inefficient.
I've used the doubly linked list extensively and do not remember having more complications than I would have with an array.

closing this for now. z-indexing can be achieved using children.sort(). I do it all the time :D

What a horrible solution...

@eranimo
PIXI still doesn't have built-in solution for that, nobody made not-horrible solution ;)
Except this thing that may be we'll be added later: https://github.com/pixijs/pixi-display/

@otoinsa actually, sort() works just fine, the only requirement is to maintain a correct Z value .
I calculate it this way : Z = x * map_width + y  (it could also be Z = y * map_height + x depending on your orientation)  ....
this is a video showing it in action : https://www.youtube.com/watch?v=HYLR7XjRvBU


Invalid (or not?) URI tags reported from multiple services

Describe the bug
I observe quite a lot of warnings from service server about Invalid tag data reported from multiple services on URI tag. While I understand it's rather normal to occur occasionally, I believe some of them may be incorrectly treated as invalid, and some others may suggest improvements to the way services detect or clean tags.
Here are a couple of examples from logs:
1. Looking correct
Invalid tag data from FrankenStrings: {'network': {'static': {'uri': ['http://localhost:7777', 'http://localhost:5173', 'https://localhost:8000', 'http://localhost:3000']}}}
 from FrankenStrings: {'network': {'static': {'uri': ['http://localhost:5000/registry/api']}}}
from FrankenStrings: {'network': {'static': {'uri': ['http://<IP_ADDRESS>:8085', 'http://<IP_ADDRESS>:8082']}}}
from FrankenStrings: {'network': {'static': {'uri'<EMAIL_ADDRESS>from FrankenStrings: {'network': {'static': {'uri': ['http://localhost:4566/foo%2Fbar/ed']}}}
from FrankenStrings: {'network': {'static': {'uri': ['http://metadata.google.internal/computeMetadata/v1/instance/attributes/', 'http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/network', 'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email', 'http://metadata.google.internal/computeMetadata/v1/instance/zone', 'http://metadata.google.internal/computeMetadata/v1/project/project-id']}}} FrankenStrings: {'network': {'static': {'uri': ['https://artifactory.global.square/artifactory/api/pypi/block-pypi/simple']}}}"

2. Probably a suggestion for improvements
Invalid tag data from Characterize: {'network': {'static': {'uri': ['https://nls-', 'https://maps-']}}}
Invalid tag data from FrankenStrings: {'network': {'static': {'uri': ['https://obs.']}}}
from DeobfuScripter: {'network': {'static': {'uri': ['https://github.r']}}}
from FrankenStrings: {'network': {'static': {'uri': ['http://i00210gd/role/DocumentInformation', 'http://i00210gd/role/EntityInformation', 'http://i00210gd/role/OtherInformation', 'http://i00210gd/20081231']}}}
from EmlParser: {'network': {'static': {'domain': ['0.00', '0.000010', '0.04', '0.06', '0.062509', '0.08', '0.090', '0.13', '0.14', '0.17', '0.170', '0.18', '0.19', '0.25', '0.27', '0.275', '0.30', '0.32', '0.335', '0.34', [..] '98.940002', 'credentials.json', 'creds.expired', 'dd.shape', 'email.mime.base', 'email.mime.image', 'email.mime.multipart', 'email.mime.text', 'google.auth.transport.requests', [...]
FrankenStrings: {'network': {'static': {'uri': ['http://www.freemeteo.com.']}}}"
FrankenStrings: {'network': {'static': {'uri': ['http://localhost:']}}}
EmlParser: {'network': {'static': {'domain': ['2.41', 'cadical.hpp', 'ccadical.cpp', 'solver.cpp']}}}
FrankenStrings: {'network': {'static': {'uri': ['http://ocsp.digicert.com0A', 'http://ocsp.digicert.com0C', 'http://ocsp.digicert.com0X', 'http://ocsp.digicert.com0']}}}
ELFPARSER: {'network': {'static': {'ip': ['12.0.267.16']}}}
FrankenStrings: {'network': {'static': {'uri': ['http://192.168.0.xx:80', 'http://192.168.0.xx:80/v1']}}}
from ELFPARSER: {'network': {'static': {'ip': ['<IP_ADDRESS>56']}}}
from FrankenStrings: {'network': {'static': {'uri': ['http://test.ac.uk:']}}}
from FrankenStrings: {'network': {'static': {'uri': ['https://....']}}}
from FrankenStrings: {'network': {'static': {'uri': ['http://cps.root-x1.letsencrypt.org0', 'http://e1.o.lencr.org0']}}}
Invalid tag data from FrankenStrings: {'network': {'static': {'domain': ['eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5qc2l6YmJlaG1tbHdzdnRreHlrIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTk2NDAzODYsImV4cCI6MjAxNTIxNjM4Nn0.MT']}}}

To Reproduce
I don't have an example file for every case, but I can try to look for some.
Expected behavior
Lower noise in logs. I don't know if it influences anything in the system.
It looks to me like:

Validation is rejecting:

either URIs with port or one-word domains (like localhost) - most of them may not be interesting, but localhost could be important;
URIs with special chars (@)
domains like .internal

FrankenStrings tends to:

include . at the end of domain, leading to empty TLD;
include next chars to domains when parsing certificates (e.g. http://ocsp.digicert.com0A) (
leaving empty port number (e.g. http://test.ac.uk:)

EmlParser/ELFPARSER are very liberal, and loves to treat real numbers as domains (I believe we still cannot browse floats)

Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information if pertinent):

Assemblyline Version: <IP_ADDRESS>
All services in the newest versions

Additional context
I think it may not be very important, but improving some domains' extraction can be helpful.

Hello!
With respect to the localhost, <IP_ADDRESS>, and .internal domains, assemblyline doesn't tag network indicators that are not public facing by design. We haven't come across a specific usecase yet and are rejecting them to avoid false positives. Could you describe a usecase and expected behaviour for those tags? E.g. tagged alongside public network tags, tagged but safelisted, tagged but separately from public network tags.
The rejected @ in a path is a mismatch between our validation and the spec. It will be fixed.
The suggestions for improvements tags look like a mix of issues, thank you for reporting them.

Hey,
From not-publicly facing domains I left just those (although <IP_ADDRESS> should also be ignored, my fault) as they can be eventually used in malicious actions targeting servers and cloud environments. The explanation you provided sounds good to me. I'd suggest as low priority to optionally allowing such domains, but I'm also okay with leaving it as is eventually.

@cccs-jh  is this done?


Add a about us link on hamburger menu for android

Content for about us screen.

Add an intro - Croma is a simple color palette manager and color picker made for designers, aiming to make it quick and fun to create and share color palettes on the go.
And a Github link - https://github.com/croma-app/croma-react
And a Feedback and suggestion link - https://github.com/croma-app/croma-react/issues/new

Add a new menu item just below of import/export palettes.

I would like to work on this. Knowing objective-c is a must ? because I have never work with.

Can I work on this issue?

Hi @bhujoshi I would like to work on this

Thanks, guys assigning this issue to @Yashs911. Let me know If I can help you with other issues @Hirak-Pandya and @EduardoFLima

@Yashs911 Please acknowledge you are working on it.

@bhujoshi Yes I am working on this issue.

@bhujoshi  can you please elaborate a little on what all changes do I need to make as there is already a github link

@Yashs911 We need to add the About us screen only for the android app.

@Yashs911 Add a new menu item just below of import/export palettes.

@bhujoshi Sorry I don't think I would be able to solve this issue.

@bhujoshi I am currently learning web dev so....

@Yashs911 No problem thanks for your time. @EduardoFLima You can take this up. objective-c knowledge not needed for this one. You will be able to do it using react-native.

Hey @bhujoshi ,
Mostly I have experience with react and not react native and the times I developed react native I just use expo to run the app. I'm trying to run croma-app and I noticed that is setup to run in a emulator or real device so I'm trying to run it in the emulator. Im having some problems with this set up, would you check if you faced this issue before?
I've setup firebase and followed react native instructions for setting up the emulator.
I run the emulator - worked just fine;
I run npm start, the packager seems to run fine on port 8081 - I can even open in the browser;
Then, in other terminal, I run npm run android, the build is successful and it connects to the emulator and the app lunches there. However, an error is thrown: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
Then, I go back to the previous terminal and try to reload the app hitting its shortcut "r" but then I face the error Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
Any ideas what it could be ? I already tried to reinstalled all SDKs again but nothing changed. Also, I tried to run the app with "bundle-and-run-android.sh" but it didn't work - it is saying error ENOENT: no such file or directory, open 'android/app/src/main/assets/index.android.bundle'. Run CLI with --verbose flag for more details.
It seems to me that the packager is not being able to connect to the emulator somehow but im not sure how to make sure of it..

I just tried to run with expo start --android instead of npm start and the app is opening now in the emulator however is throwing errors because Platform.OS === "web" is returning true when it shouldn't ..

@EduardoFLima try to run ./bundle-and-run-android.sh I think then it will work.

Hi @EduardoFLima , Did the above suggestion worked?. This is the first time anyone contributing to the repository so we are also trying to figure out gaps in the setup. Please let me know if you are still facing the issue or need any help? Thanks again for picking up the issue.

Hey @kamalkishor1991 ,
In the end I just had to create the assets directory (android/app/src/main/assets) and then it worked fine!
Apart from that I also had to setup firebase if I remember right. Later we can create another PR with some improvements in the readme.md adding further instructions of how to build the project.
I fixed that problem this afternoon and this weekend I believe I can go on with the task.

I still face the issue of Platform.OS always returning "web" instead of "android" though, causing exceptions...

I always bundle and then run it in android. Since the project was an expo project earlier and then moved to react-native the normal development mode does not work. I will look into it.
Is ./bundle-and-run-android.sh working? Please email me on<EMAIL_ADDRESS>and I can invite you to slack and we can find some time to debug it together.

I just realized that I forgot to mention that I also had to add the following config to android manifest in order to get connection between metro packager and the app in the emulator:
<application
android:usesCleartextTraffic="true">
...
</application>

Yes, when I run bundle-and-run-android.sh works. But it takes too long, isn't annoying when developing ?
I will send the email. Thanks for the support.

Hey... Just FYI,
I misinterpreted the error. The problem was not in Platform.OS, that's working fine... The problem were in some StyleSheet.create() methods, which doesn't allow the property position: "fixed" when running the app in the android emulator. I refactored them so I could run the project and commit those changes.
I created this pull request #105 with the new feature but im not sure if I have credentials to link this issue to the PR.


Add skeleton of IDP interface for resolving friendly names

See discussion in #2326.  The goal here is to enable the following:

Preserve existing relations in OpenFGA and avoid needing a migration.
Support minder project role grant -r viewer -u JAORMX (which should look up the "JAORMX" preferred_username in Keycloak (populated from GitHub), and then store the (stable) Keycloak ID in the OpenFGA grant.  We don't want to store JAORMX, because he might change his account name later.
Support listing JAORMX as the username coming back from ListRoleAssignments, so that we can read the output.  We can also include the Keycloak userids in the RPC response, but no one will read them.  :grin:
Add an IdentityProvider for KeyCloak + GitHub that will call getUsers with a filter and/or create a user and set their GitHub federated identity information

This will allow us to resolve users to KeyCloak identities when the role grant is made, rather than at a possible later date when GitHub identities have shifted.

In the future, add an actions IdentityProvider for GitHub actions which would be distinct from KeyCloak + GitHub users in 2

The syntax for this would be something like minder project role grant -r editor -u actions/repo:stacklok/minder-rules-and-profiles:ref:refs/heads/main.  (Yeah, action names are pretty awesome...)

To fit the interface into existing code, we'll need to replace:

ParseAndValidate (4 calls, handlers_token.go and 3x handlers_user.go)
Calls around authzClient (default_project.go, handlers_authz.go, handlers_user.go) which will need to use the canonical Identity.String() for Write, Check, and ProjectsForUser, and Identity.Human() for AssignmentsToProject.

We did this in #3155


Supressed AttributeError would prevent the plugin from working properly under python3

Two issues prevented the plugin from working under python3:

im_class no longer exists, replaced with simply method.name
hashlib now requires bytes to be provided rather than a string

Both issues went undetected because of the caught AttributeError, causing no balancing between nodes at all.
I also added some basic tests and validated the implementation under python3.5 and python2.7.

Thanks! Sorry about the delay 😢


Weekly Pull Request Lily Su

Module 02 - Decision Trees
Overall: Well done! Congratulations on breaking 76% Accuracy! 📈
Feedback: Great job commenting your code 👍  LOVE that you added population data! Looks like you had a hiccup with the DecisionTreeClassifier() in terms of misaligned labels v. samples. Were you able to resolve that? If not, DM Brenner and ask him to help you with that, or use the #DS_help channel.
More Exploring/Cleaning data

Dig deeper. Lookout for missing or incorrect values in other Features.

Implement a Decision Tree Classifier

Yep. Gotta fix that ValueError though
Also, plot the feature importances when you can to help guide your approach

# Get feature importances
encoder = pipeline.named_steps['onehotencoder']
tree = pipeline.named_steps['decisiontreeclassifier']
feature_names = encoder.transform(X_val).columns
importances = pd.Series(tree.feature_importances_, feature_names)

# Plot feature importances
n = 20
plt.figure(figsize=(10,n/2))
plt.title(f'Top {n} features')
importances.sort_values()[-n:].plot.barh(color='grey');

Submit New Predictions to Kaggle

I see you climbing the leaderboard 🙌

Oh, another thing. Could you please organize your forked repository more clearly? I think it's awesome that your live-coding during the lecture but it's hard to find your actual assignemnts. Change the file names or leverage the commit messages!

Module 03 - Random Forests, Ordinal Encoding
Overall: I appreciate your ambition, but focus on the baslines, then go stretch!
Feedback: Really well done commenting your code. I applaud your attempt to integrate more data into your model but there's low-hanging fruit you're leaving on the table. Follow the lecture notebooks to get your validation scores high up. Once you secure those, then go and engineer additional features. Remember: iteration speed > number of iterations
Last but not least, come into office hours to see if we can help you with those pesky ValueErrors 👍

Module 04 - Confusion Matrix, Precision & Recall
Final Kaggle Submission:
Overall: Your model had some decent predictive power, but it could be improved. I'd encourage you to re-create some of the lecture notebooks (they'll break 80%). More importantly I would talk with your PM during your 1:1 to make sure you absorbed the material as well as you wanted to this time around. Any gaps are better to fill now than allow them to expand!