Cannot use BottomSheets navigation without AnimatedNavigator

Example how I'd expect it work:
@Composable
fun DefaultNavHost() {
    val bottomSheetNavigator = rememberBottomSheetNavigator()
    val navController = rememberNavController(bottomSheetNavigator)
    ModalBottomSheetLayout(
        bottomSheetNavigator = bottomSheetNavigator,
        sheetShape = defaultSheetShape,
        sheetBackgroundColor = BgDefault
    ) {
        DestinationsNavHost(
            navController = navController,
            navGraph = NavGraphs.root,
            dependenciesContainerBuilder = {
                val onboardingViewModel: OnboardingViewModel = get()
                dependency(onboardingViewModel)
            }
        )
    }
}

I would like to avoid using animations-lib in my project because they change default animation that I need.
The code above gives error:
FATAL EXCEPTION: main
java.lang.IllegalStateException: You need to use 'rememberAnimatedNavHostEngine' to get an engine that can use BottomSheet and pass that into the 'DestinationsNavHost'

OK, I add this line             engine = rememberAnimatedNavHostEngine(),
Now error is:
FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not find Navigator with name "animatedComposable". You must call NavController.addNavigator() for each navigation type.

so I assume it's impossible to use BottomSheets without animation. However, that is possible with pure Compose navigation.
Can this be fixed? Or what I'm doing wrong

Hi @alexzaitsev 👋
Yes at the moment we have two cores: one with accompanist and one without. It was a trade-off between easiness of releases, modules, and all that VS making people depend on both or on none. Otherwise, I'd have to accomodate only modal accompanist, only animations accompanist, both, or none.
I did this because most times, people that use accompanist for one, won't mind using it for both.
I'm actually confused though because you said you added this engine = rememberAnimatedNavHostEngine() which is only possible if you are depending on animations core. If that is the case, and looking at your code, it seems like you're missing the rememberAnimatedNavController  instead of rememberNavController.

I would like to avoid using animations-lib in my project because they change default animation that I need.
Animations core gives you more control over this. You can easily set the same default you have for normal compose navigation.

Hi @raamcosta
I see the reason and I have to figure out a solution. Probably you could help me. So in below code I'm trying to disable any transitions:
private val nestedNavGraphs = listOf(
    NavGraphs.onboarding,
    NavGraphs.onboardingExistingUser,
    NavGraphs.onboardingNewUser,
    NavGraphs.onboardingCreateWallet,
    NavGraphs.onboardingConnectWallet,
    NavGraphs.createWallet,
    NavGraphs.importWallet
)

@OptIn(ExperimentalMaterialNavigationApi::class)
@Composable
fun DefaultNavHost() {
    val bottomSheetNavigator = rememberBottomSheetNavigator()
    val navController = rememberAnimatedNavController(bottomSheetNavigator)
    ModalBottomSheetLayout(
        bottomSheetNavigator = bottomSheetNavigator,
        sheetShape = defaultSheetShape,
        sheetBackgroundColor = BgDefault
    ) {
        DestinationsNavHost(
            navController = navController,
            navGraph = NavGraphs.root,
            engine = rememberAnimatedNavHostEngine(
                rootDefaultAnimations = rootDefaultAnimations,
                defaultAnimationsForNestedNavGraph = nestedNavGraphs.associateWith { nestedGraphDefaultAnimations }
            ),
            dependenciesContainerBuilder = {
                val onboardingViewModel: OnboardingViewModel = get()
                dependency(onboardingViewModel)
            }
        )
    }
}

private val defaultEnterTransition = DestinationEnterTransition { EnterTransition.None }

private val defaultExitTransition = DestinationExitTransition { ExitTransition.None }

private val rootDefaultAnimations = RootNavGraphDefaultAnimations(
    enterTransition = defaultEnterTransition,
    exitTransition = defaultExitTransition,
    popEnterTransition = defaultEnterTransition,
    popExitTransition = defaultExitTransition
)

private val nestedGraphDefaultAnimations = NestedNavGraphDefaultAnimations(
    enterTransition = defaultEnterTransition,
    exitTransition = defaultExitTransition,
    popEnterTransition = defaultEnterTransition,
    popExitTransition = defaultExitTransition
)

However, the result is not as I expect:
https://user-images.githubusercontent.com/2372414/195067876-f74dbe07-31b3-43fd-b456-327ad1e4bfb1.mp4
As you see, there are default transitions that are not disabled by my code. Do you have any idea to completely disable them?

Another tiny question - is there a possibility to query all the nested graphs without manually adding them to the layer as I've done above?

So, after I failed above I tried another way - creating my own DefaultNavHost:

/**
 * Returns the default [NavHostEngine] to be used with normal (non-animated)
 * core ("io.github.raamcosta.compose-destinations:core").
 *
 * The [NavHostEngine] is used by default in [com.ramcosta.composedestinations.DestinationsNavHost]
 * call.
 */
@Composable
fun rememberDefaultNavHostEngine(): NavHostEngine = remember {
    DefaultNavHostEngine()
}

internal class DefaultNavHostEngine : NavHostEngine {

    override val type = NavHostEngine.Type.DEFAULT

    @Composable
    override fun rememberNavController(
        vararg navigators: Navigator<out NavDestination>
    ) = androidx.navigation.compose.rememberNavController(*navigators)

    @Composable
    override fun NavHost(
        modifier: Modifier,
        route: String,
        startRoute: Route,
        navController: NavHostController,
        builder: NavGraphBuilder.() -> Unit
    ) {
        androidx.navigation.compose.NavHost(
            navController = navController,
            startDestination = startRoute.route,
            modifier = modifier,
            route = route,
            builder = builder
        )
    }

    override fun NavGraphBuilder.navigation(
        navGraph: NavGraphSpec,
        builder: NavGraphBuilder.() -> Unit
    ) {
        navigation(
            startDestination = navGraph.startRoute.route,
            route = navGraph.route,
            builder = builder
        )
    }

    override fun <T> NavGraphBuilder.composable(
        destination: DestinationSpec<T>,
        navController: NavHostController,
        dependenciesContainerBuilder: @Composable DependenciesContainerBuilder<*>.() -> Unit,
        manualComposableCalls: ManualComposableCalls,
    ) {
        when (val destinationStyle = destination.style) {
            is DestinationStyle.Runtime,
            is DestinationStyle.Default -> {
                addComposable(
                    destination,
                    navController,
                    dependenciesContainerBuilder,
                    manualComposableCalls
                )
            }

            is DestinationStyle.Dialog -> {
                addDialogComposable(
                    destinationStyle,
                    destination,
                    navController,
                    dependenciesContainerBuilder,
                    manualComposableCalls
                )
            }

            is DestinationStyle.BottomSheet -> {
                addBottomSheetComposable(
                    destination,
                    navController,
                    dependenciesContainerBuilder,
                    manualComposableCalls
                )
            }

            else -> throw IllegalStateException("You need to use 'rememberAnimatedNavHostEngine' to get an engine that can use ${destinationStyle.javaClass.simpleName} and pass that into the 'DestinationsNavHost' ")
        }
    }

    private fun <T> NavGraphBuilder.addComposable(
        destination: DestinationSpec<T>,
        navController: NavHostController,
        dependenciesContainerBuilder: @Composable DependenciesContainerBuilder<*>.() -> Unit,
        manualComposableCalls: ManualComposableCalls,
    ) {
        @SuppressLint("RestrictedApi")
        val contentLambda = manualComposableCalls[destination.baseRoute]

        composable(
            route = destination.route,
            arguments = destination.arguments,
            deepLinks = destination.deepLinks
        ) { navBackStackEntry ->
            CallComposable(
                destination,
                navController,
                navBackStackEntry,
                dependenciesContainerBuilder,
                contentLambda
            )
        }
    }

    private fun <T> NavGraphBuilder.addDialogComposable(
        dialogStyle: DestinationStyle.Dialog,
        destination: DestinationSpec<T>,
        navController: NavHostController,
        dependenciesContainerBuilder: @Composable DependenciesContainerBuilder<*>.() -> Unit,
        manualComposableCalls: ManualComposableCalls
    ) {
        @SuppressLint("RestrictedApi")
        val contentLambda = manualComposableCalls[destination.baseRoute]

        dialog(
            destination.route,
            destination.arguments,
            destination.deepLinks,
            dialogStyle.properties
        ) { navBackStackEntry ->
            CallComposable(
                destination,
                navController,
                navBackStackEntry,
                dependenciesContainerBuilder,
                contentLambda
            )
        }
    }

    private fun <T> NavGraphBuilder.addBottomSheetComposable(
        destination: DestinationSpec<T>,
        navController: NavHostController,
        dependenciesContainerBuilder: @Composable DependenciesContainerBuilder<*>.() -> Unit,
        manualComposableCalls: ManualComposableCalls
    ) {
        @SuppressLint("RestrictedApi")
        val contentWrapper = manualComposableCalls[destination.baseRoute]

        bottomSheet(
            destination.route,
            destination.arguments,
            destination.deepLinks
        ) { navBackStackEntry ->
            CallComposable(
                destination,
                navController,
                navBackStackEntry,
                dependenciesContainerBuilder,
                contentWrapper
            )
        }
    }

    @Suppress("UNCHECKED_CAST")
    @Composable
    private fun <T> CallComposable(
        destination: DestinationSpec<T>,
        navController: NavHostController,
        navBackStackEntry: NavBackStackEntry,
        dependenciesContainerBuilder: @Composable DependenciesContainerBuilder<*>.() -> Unit,
        contentLambda: DestinationLambda<*>?
    ) {
        val scope = remember {
            DestinationScopeImpl.Default(
                destination,
                navBackStackEntry,
                navController
            )
        }

        if (contentLambda == null) {
            with(destination) { scope.Content(dependenciesContainerBuilder) }
        } else {
            contentLambda as DestinationLambda<T>
            contentLambda(scope)
        }
    }
}

I've added is DestinationStyle.BottomSheet case to default implementation.
I almost succeed, the thing is that DestinationScopeImpl.Default from CallComposable is internal in the lib:

Is there a way to workaround it?

OK, I managed to make it work by:
        val scope = remember {
            object : DestinationScopeImpl<T>(
                destination = destination,
                navBackStackEntry = navBackStackEntry,
                navController = navController
            ) {}
        }

However, I had to use the animations-core dependency, otherwise I got exception:
    ext.composeDestinationsVersion = '1.6.20-beta'
    implementation "io.github.raamcosta.compose-destinations:animations-core:$composeDestinationsVersion"
    ksp "io.github.raamcosta.compose-destinations:ksp:$composeDestinationsVersion"

Result:
https://user-images.githubusercontent.com/2372414/195080965-8097d680-0e8d-4865-aae3-8168248566fa.mp4

NavGraphs.root.nestedGraphs() or something similar to get nested graphs 😁
Creating your own engine is something you definitely shouldn’t need to do though. Disabling animations should be easy. I’ve done it in the past similar to what you did, but I cannot remember from top of my head 🤔

Creating your own engine is something you definitely shouldn’t need to do though.

It's the only solution for now unfortunately.

The reason is to disable transactions right? If I have some time today I’ll look into it. It should be similar to what you did, I’ll let you know 🙂

transactions

Transitions. Yes, just compare 2 videos in this thread

Hey @raamcosta. Did you have a chance to give it a try?

Yes, I just did.
I was able to disable transitions just by importing animations-core and using animatedNavHostEngine. By default, it disables all animations (even the cross fade that is hard coded with normal compose navigation).
The sample I used:
@OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialNavigationApi::class)
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            ComposeDestinationsTestingTheme {

                val navHostEngine = rememberAnimatedNavHostEngine()
                val navController = navHostEngine.rememberNavController()

                Scaffold(
                    bottomBar = {
                        BottomBar(navController)
                    }
                ) {
                    DestinationsNavHost(
                        navController = navController,
                        navGraph = NavGraphs.root,
                        modifier = Modifier.padding(it),
                        engine = navHostEngine
                    )

                    LaunchedEffect(navController) {
                        navController.addOnDestinationChangedListener { _, _ ,_ ->
                            navController.backQueue.print()
                        }
                    }

                }
            }
        }
    }

}

enum class BottomDestination(
    val direction: String,
    val icon: ImageVector,
    val label: String
) {
    Home(HomeScreenDestination.route, Icons.Default.Home, "Home"),
    Profile(ProfileScreenDestination.route, Icons.Default.Person, "Profile"),
    Settings(NavGraphs.settingsGraph.route, Icons.Default.Settings, "Settings")
}

@Composable
private fun BottomBar(
    navController: NavController
) {
    val currentDestination by navController.currentBackStackEntryAsState()

    BottomNavigation {
        BottomDestination.values()
            .forEach {
                BottomNavigationItem(
                    selected = it.direction == currentDestination?.destination?.route,
                    onClick = {
                        navController.navigate(it.direction) {
                            popUpTo(NavGraphs.root) {
                                saveState = true
                            }
                            launchSingleTop = true
                            restoreState = true
                        }
                    },
                    icon = {
                        Icon(
                            imageVector = it.icon,
                            contentDescription = it.label
                        )
                    },
                    label = { Text(it.label) },
                )
            }
    }
}

fun ArrayDeque<NavBackStackEntry>.print(prefix: String = "stack") {
    val stack = toMutableList()
        .map { it.destination.route + "@" + it.toString().split("@")[1] }
        .toTypedArray().contentToString()
    println("$prefix = $stack")
}

@RootNavGraph(start = true)
@Destination
@Composable
fun HomeScreen(
    navigator: DestinationsNavigator,
    vm: HomeViewModel = hiltViewModel()
) = Column(modifier = Modifier.fillMaxSize()) {
    println("vm = ${vm.toString().replace("com.ramcosta.composedestinationstesting.", "")}")

    Text(text = "Hello!")

    Button(
        onClick = { navigator.navigate(ProfileScreenDestination) }
    ) {
        Text("Go to Profile!")
    }

    Button(
        onClick = { navigator.navigate(SettingsScreenDestination) }
    ) {
        Text("Go to Settings!")
    }
}

@Destination
@Composable
fun ProfileScreen(
    vm: ProfileViewModel = hiltViewModel()
) = Column(modifier = Modifier.fillMaxSize()) {
    println("vm = ${vm.toString().replace("com.ramcosta.composedestinationstesting.", "")}")
    Text(text = "PROFILE SCREEN")

}

@SettingsGraph(start = true)
@Destination
@Composable
fun SettingsScreen(
    vm: SettingsViewModel = hiltViewModel()
) = Column(modifier = Modifier.fillMaxSize()) {
    println("vm = ${vm.toString().replace("com.ramcosta.composedestinationstesting.", "")}")
    Text(text = "SETTINGS SCREEN")
}

@RootNavGraph
@com.ramcosta.composedestinations.annotation.NavGraph
annotation class SettingsGraph(
    val start: Boolean = true
)

@HiltViewModel
class ProfileViewModel @Inject constructor(): ViewModel() {

    override fun onCleared() {
        println("vm cleared = ${this.toString().replace("com.ramcosta.composedestinationstesting.", "")}")
    }
}

@HiltViewModel
class SettingsViewModel @Inject constructor(): ViewModel() {

    override fun onCleared() {
        println("vm cleared = ${this.toString().replace("com.ramcosta.composedestinationstesting.", "")}")
    }
}

@HiltViewModel
class HomeViewModel @Inject constructor(): ViewModel() {

    override fun onCleared() {
        println("vm cleared = ${this.toString().replace("com.ramcosta.composedestinationstesting.", "")}")
    }
}

Ignore the unneeded code, I had this laying around and just edited to test this 😄

But btw, If I used this (your code where you setup root and nested graph animations), it also works
private val defaultEnterTransition = DestinationEnterTransition { EnterTransition.None }

private val defaultExitTransition = DestinationExitTransition { ExitTransition.None }

private val rootDefaultAnimations = RootNavGraphDefaultAnimations(
    enterTransition = defaultEnterTransition,
    exitTransition = defaultExitTransition,
    popEnterTransition = defaultEnterTransition,
    popExitTransition = defaultExitTransition
)

private val nestedGraphDefaultAnimations = NestedNavGraphDefaultAnimations(
    enterTransition = defaultEnterTransition,
    exitTransition = defaultExitTransition,
    popEnterTransition = defaultEnterTransition,
    popExitTransition = defaultExitTransition
)

// ....
                val navHostEngine = rememberAnimatedNavHostEngine(
                    rootDefaultAnimations = rootDefaultAnimations,
                    defaultAnimationsForNestedNavGraph = NavGraphs.root.nestedNavGraphs.associateWith {
                        nestedGraphDefaultAnimations
                    }
                )
// ....

Have you tried it on Android 12+?

Yes actually, it was on emulator.

I got same error:
FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not find Navigator with name "animatedComposable". You must call NavController.addNavigator() for each navigation type.

It turns out we must use  rememberAnimatedNavController() and not  rememberNavController()
When using:
rememberAnimatedNavHostEngine()

👍🏻

Yap, stated here:
https://composedestinations.rafaelcosta.xyz/styles-and-animations#animations--bottom-sheet-setup

If you need the NavController, use rememberAnimatedNavController instead of rememberNavController.


How to specify an SSH GitLab repository URL in the PR support

I am trying to follow the example to support merge requests in our self-hosted GitLab. The configuration Groovy script loads successfully but when the pipeline starts an error occurs:
2022-10-02 04:42:47,665 ERROR [86@MessageListener for MaterialUpdateStatusNotifier] BuildCauseProducerService:353 - not scheduling pipeline yet-another-pr-merge-requests_2 after manual-trigger because update of material failed with reason Failed to run git clone command STDERR: Cloning into '/var/lib/go-server/pipelines/flyweight/eb3ad25e-f7ba-49b1-b473-165448c5d716'...
STDERR: fatal: could not read Username for 'https://our.gitlab.domain': No such device or address. Cause: Failed to run git clone command

As I understand GoCD uses serverBaseUrl not only for scanning merge requests but also for cloning the matched repository. Can I tell GoCD that cloning should be done using an SSH URL? This is how I would like my GoCD agent to clone from our GitLab.

You should be able to override the materialUrl in the gitlab { } block to achieve this.


feat(libraries/tipipeline/vars): implement multi pull requests merging before build

Signed-off-by: wuhuizuo<EMAIL_ADDRESS>

/hold
Need to test it.

Currently multi PR pre merge to target branch will fail in Jenkins checkout, it should be a bug.
But the refactor is OK and tested for single pull requests. I think we should switch to TektonCD quickly.

/unhold

/unhold

/test ?

/test ?

/test ?

/retest

/lgtm

/unhold

/hold


Verify how large floating-point numbers are exported

While working on cytominer-database data comparisons for #30 I noticed variations in how floating point numbers are treated. As an example, the number 3.5215257120407011 may be found within .tests/data/cytominer-database/data_b/A01-2/Cytoplasm.csv. This number is extracted as 3.521525712040701 (one decimal place less, through automatic CSV settings in DuckDB interpreted as a DOUBLE). Similarly, cyotminer-database appears to change this number to 3.5215257120407006 (three additional decimal places, I believe this is done through Pandas CSV and/or pd.Series.as_type() casts).
I found that DuckDB can correctly interpret this number automatically as a DECIMAL but that this option doesn't appear to be available through the CSV reader yet (planning to open an issue here). As it stands, this number is interpreted as a DOUBLE, which truncates the data.
I did some work to try and research how this number is interpreted in Python, NumPy, Pandas, DuckDB, and Parquet. Both Python (through Decimal) and NumPy (through longdouble) were able to interpret an extended version of the number but not the precise number itself (similar to how cytominer-database operated above, adding decimal places). Pandas is able to accurately interpret the number through PyArrow types (specifically decimal128). DuckDB seems to follow the same decimal-style formatting as PyArrow and is able to inference the width + scale when reading the number alone. From an Arrow decimal128 type, Parquet is able to write and read the number accurately through I believe the decimal logical type.
See here for a Google Colab notebook with findings (and a gist backup).

Opened https://github.com/duckdb/duckdb/issues/11639 in reference to this issue.

Just a quick update to mention I thought to try PyArrow arrays and the built-in CSV reader. The CSV reader turned out to have similar challenges (truncating the number one decimal place). When attempting to create an array of pa.decimal128(17, 16) type with the number from a Python List I saw an error (though I may be using it incorrectly).


MaxCDN version different

I compared the files at MaxCDN and Github and seems the former is not the same as 2.2
Does the MaxCDN cache need to be invalidated?

usually it does it automatically in max 30 days. If you ctrl+shift+R/F5 is it still the same?

Yes, tried refresh that way, no browser cache etc and seems to respond with the older version.

that's odd, will check/try to purge later on

can you please let me know if anything changed whatsoever now? thanks

Yes, now it's the latest js file on the CDN.

apologies for the inconvenience, I'll remember to manually purge edge cache next time.


As a restaurant owner, I want to view the frequency statistics based on booking time

so that I can hire more staff at peak periods appropriately

Implemented with https://github.com/cs2103-ay1819S2-w11-2/main/pull/130


always run all prototype tests in CI

In #6587 we decided to split the transforms tests into three CI steps. This makes it easier to find failing tests, but has one glaring downside that we missed: if the first step fails, the other steps aren't run at all. Imagine the CI is toasted for some external reason and now it won't run the tests your PR touches.
This PR refines the step triggers to run even if the previous tests failed.

Is there a way to tell GA to report the failing tests separately, something like what CircleCI does with a dedicated "failing tests" tab ?

I wondered this myself a few months back and I found three possible options:

https://github.com/dorny/test-reporter
https://github.com/EnricoMi/publish-unit-test-result-action
https://github.com/mikepenz/action-junit-report

Unfortunately all of these options were not exactly what I was looking for. Either they had no real pytest support, i.e. the output looked quite weird for what we want, or they added quite a bit of noise that we also don't want.
I tried to implement my own solution until I realized that I can only use container actions when running on ubuntu. For cross-platform support the action needs to be written in JS, but my skills with that are not good enough to get to a usable state in my limited free time. If you want this, I would be happy to pick it up though during work :innocent:

It seems if: steps.setup.conclusion == 'success' is not sufficient if there is an failure earlier even if the condition is otherwise true. Thus, I went with success() || ( failure() && steps.setup.conclusion == 'success' ) which seems to do the job.
A little more complex than I had hoped before, but avoid the condition chain for multiple steps and thus should still be easier than the initial proposal. LMK what you think.


Feature flag support for: non blocking inventory processing queue

Description of the changes
This sets inventory processing queue back to synchronous (blocking call on 0 length channel).
Also adds support for this feature to be enabled or disabled via command-api.
Desired behaviour is:

default inventory queue len is 0 (current agents size)
inventory queue can be modified via usual config file/env-var
this config setup can be disabled via command-api
when no config setup was provided by user, this feature can be enabled via command-api setting inventory queue value to 10

PR Review Checklist
Author

[ ] the PR should focus on a single subject. Change only relevant files to the problem you’re working on
[ ] clean and format the code
[ ] add unit tests for your changes and make sure all unit tests are passing
[ ] add a risk label after carefully considering the "blast radius" of your changes
[ ] describe the intent of your changes in the description. don't just rewrite your code in prose
[ ] assign at least one reviewer
[ ] address the feedback
[ ] add a "ready for review" label. Only PRs with this label will be reviewed.

Reviewer

[ ] review code for readability
[ ] verify that high risk behavior changes are well tested
[ ] check license for any new external dependency
[ ] ask questions about anything that isn't clear and obvious
[ ] approve the PR when you consider it's good to merge

Pull Request Test Coverage Report for Build 213773749

-22 of 22 (0.0%)  changed or added relevant lines in 1 file are covered.
97 unchanged lines in 3 files lost coverage.
Overall coverage remained the same at ?%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/agent/cmdchannel/handler/featureflag_handler.go
0
22
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/metrics/sampler/sampler_routine.go
2
94.74%

pkg/integrations/v4/logs/cfg_watcher.go
4
64.18%

pkg/config/loader/config.go
91
69.25%

Totals

Change from base Build 208854335:
0%

Covered Lines:

Relevant Lines:
0

💛  - Coveralls

why did we go from 10 to 100? Is it magic number or we have some test?


Local SurfaceView not working

agora video call
I have used this project and build an APK.
While checking apk  , It shows black screen in local surface view.
noticeably , i did not change any code or anything .

make sure the SurfaceView is created after RtcEngine init and granted permissions.

@LichKing-2234  then how remote view is ok for me?
only local surface view not working

the remote view must be created after the engine created.


Alert dialog's buttons do nothing

Description of the Bug
Buttons in MDDialog's are not clickable when the dialog has type=alert (the default type).
Instead, it appears that clicking anywhere on the screen (on a button or over the dialog or outside the dialog) simply dismisses the dialog
Steps to reproduce
To reproduce, execute the following from a Debian 10 VM in BASH:
sudo apt-get -y install python3 python3-pip python3-virtualenv python3-setuptools
sudo dpkg -l | grep python

python3 -m virtualenv --python=python3.7 /tmp/virtualenv/kivymd_test
/tmp/virtualenv/kivymd_test/bin/python3 -m pip install --upgrade pip kivy kivymd
/tmp/virtualenv/kivymd_test/bin/python3 -m pip list
source /tmp/virtualenv/kivymd_test/bin/activate

tmpDir=`mktemp -d`
pushd "${tmpDir}"

cat << EOF > alertDialogButtonFail.py
#!/usr/bin/env python3
from kivy.lang import Builder

from kivymd.app import MDApp
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dialog import MDDialog

KV = '''
FloatLayout:

    MDFlatButton:
        text: "ALERT DIALOG"
        pos_hint: {'center_x': .5, 'center_y': .5}
        on_release: app.show_alert_dialog()
'''

class Example(MDApp):
    dialog = None

    def build(self):
        return Builder.load_string(KV)

    def show_alert_dialog(self):
        if not self.dialog:
            self.dialog = MDDialog(
                text="Discard draft?",
                title="Example Title",
                buttons=[
                    MDFlatButton(
                        text="CANCEL", text_color=self.theme_cls.primary_color
                    ),
                    MDFlatButton(
                        text="DISCARD", text_color=self.theme_cls.primary_color
                    ),
                ],
            )
        self.dialog.open()

Example().run()
EOF
chmod +x alertDialogButtonFail.py
./alertDialogButtonFail.py

popd

Example Execution
user@disp3499:~$ sudo apt-get -y install python3 python3-pip python3-virtualenv python3-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (18.1-5).
python3-setuptools is already the newest version (40.8.0-1).
python3-virtualenv is already the newest version (15.1.0+ds-2).
python3 is already the newest version (3.7.3-1).
The following packages were automatically installed and are no longer required:
  linux-headers-4.19.0-6-amd64 linux-headers-4.19.0-6-common
  linux-image-4.19.0-6-amd64 python-daemon python-lockfile python-qubesdb
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
user@disp3499:~$ sudo dpkg -l | grep python
ii  dh-python                             3.20190308                          all          Debian helper tools for packaging Python libraries and applications
ii  libboost-python1.67.0                 1.67.0-13+deb10u1                   amd64        Boost.Python Library
ii  libpython-stdlib:amd64                2.7.16-1                            amd64        interactive high-level object-oriented language (Python2)
ii  libpython2-stdlib:amd64               2.7.16-1                            amd64        interactive high-level object-oriented language (Python2)
ii  libpython2.7:amd64                    2.7.16-2+deb10u1                    amd64        Shared Python runtime library (version 2.7)
ii  libpython2.7-minimal:amd64            2.7.16-2+deb10u1                    amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64             2.7.16-2+deb10u1                    amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-dev:amd64                  3.7.3-1                             amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64               3.7.3-1                             amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.7:amd64                    3.7.3-2+deb10u2                     amd64        Shared Python runtime library (version 3.7)
ii  libpython3.7-dev:amd64                3.7.3-2+deb10u2                     amd64        Header files and a static library for Python (v3.7)
ii  libpython3.7-minimal:amd64            3.7.3-2+deb10u2                     amd64        Minimal subset of the Python language (version 3.7)
ii  libpython3.7-stdlib:amd64             3.7.3-2+deb10u2                     amd64        Interactive high-level object-oriented language (standard library, version 3.7)
ii  libreoffice-script-provider-python    1:6.1.5-3+deb10u6                   all          Python script support provider for LibreOffice scripting framework
ii  python                                2.7.16-1                            amd64        interactive high-level object-oriented language (Python2 version)
ii  python-apt-common                     <IP_ADDRESS>                             all          Python interface to libapt-pkg (locales)
ii  python-asn1crypto                     0.24.0-1                            all          Fast ASN.1 parser and serializer (Python 2)
ii  python-attr                           18.2.0-1                            all          Attributes without boilerplate (Python 2)
ii  python-automat                        0.6.0-1                             all          Self-service finite-state machines for the programmer on the go
ii  python-backports.functools-lru-cache  1.5-3                               all          backport of functools.lru_cache from Python 3.3 to Python 2
ii  python-bcrypt                         3.1.6-1                             amd64        password hashing library for Python
ii  python-bs4                            4.7.1-1                             all          error-tolerant HTML parser for Python
ii  python-cairo:amd64                    1.16.2-1+b1                         amd64        Python bindings for the Cairo vector graphics library
ii  python-cffi-backend                   1.12.2-1                            amd64        Foreign Function Interface for Python calling C code - backend
ii  python-chardet                        3.0.4-3                             all          universal character encoding detector for Python2
ii  python-click                          7.0-1                               all          Wrapper around optparse for command line utilities - Python 2.7
ii  python-colorama                       0.3.7-1                             all          Cross-platform colored terminal text in Python - Python 2.x
ii  python-configparser                   3.5.0b2-1                           all          backport of the enhanced config parser introduced in Python 3.2
ii  python-constantly                     15.1.0-1                            all          Symbolic constants in Python
ii  python-cryptography                   2.6.1-3+deb10u2                     amd64        Python library exposing cryptographic recipes and primitives (Python 2)
ii  python-daemon                         2.2.3-1                             all          library for making a Unix daemon process  Python 2
ii  python-dbus                           1.2.8-3                             amd64        simple interprocess messaging system (Python interface)
ii  python-enchant                        2.0.0-1                             all          spellchecking library for Python
ii  python-enum34                         1.1.6-2                             all          backport of Python 3.4's enum package
ii  python-future                         0.16.0-1                            all          single-source support for Python 3 and 2 - Python 2.x
ii  python-gi                             3.30.4-1                            amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gi-cairo                       3.30.4-1                            amd64        Python Cairo bindings for the GObject library
ii  python-glade2                         2.24.0-5.1+b1                       amd64        GTK+ bindings: Glade support
ii  python-gobject-2                      2.28.6-13+b1                        amd64        deprecated static Python bindings for the GObject library
ii  python-gtk2                           2.24.0-5.1+b1                       amd64        Python bindings for the GTK+ widget set
ii  python-gtkglext1                      1.1.0-9.1                           amd64        GtkGLext python bindings
ii  python-gtkspellcheck                  4.0.5-1                             all          Python 2 spellchecking library GTK+ based on Enchant
ii  python-html5lib                       1.0.1-1                             all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python-hyperlink                      17.3.1-2                            all          Immutable, Pythonic, correct URLs.
ii  python-idna                           2.6-1                               all          Python IDNA2008 (RFC 5891) handling (Python 2)
ii  python-incremental                    16.10.1-3                           all          Library for versioning Python projects.
ii  python-iniparse                       0.4-2.2                             all          access and modify configuration data in INI files (Python 2)
ii  python-ipaddress                      1.0.17-1                            all          Backport of Python 3 ipaddress module (Python 2)
ii  python-libtorrent                     1.1.11-2                            amd64        Python bindings for libtorrent-rasterbar
ii  python-libxml2                        2.9.4+dfsg1-7+b3                    amd64        Python bindings for the GNOME XML library
ii  python-lockfile                       1:0.12.2-2                          all          file locking library for Python  Python 2 library
ii  python-lxml:amd64                     4.3.2-1                             amd64        pythonic binding for the libxml2 and libxslt libraries
ii  python-lz4                            1.1.0+dfsg-1                        amd64        Python interface to the lz4 compression library
ii  python-lzma                           0.5.3-4                             amd64        Python bindings for liblzma
ii  python-lzo                            1.12-2                              amd64        Python bindings for the LZO data compression library
ii  python-minimal                        2.7.16-1                            amd64        minimal subset of the Python2 language
ii  python-nacl                           1.3.0-2                             amd64        Python bindings to libsodium (Python 2)
ii  python-nautilus                       1.2.2-2                             amd64        Python binding for Nautilus components
ii  python-notify                         0.1.1-4                             amd64        Python bindings for libnotify
ii  python-numpy                          1:1.16.2-1                          amd64        Numerical Python adds a fast array facility to the Python language
ii  python-olefile                        0.46-1                              all          Python module to read/write MS OLE2 files
ii  python-opengl                         3.1.0+dfsg-2                        all          Python bindings to OpenGL (Python 2)
ii  python-openssl                        19.0.0-1                            all          Python 2 wrapper around the OpenSSL library
ii  python-paramiko                       2.4.2-0.1                           all          Make ssh v2 connections (Python 2)
ii  python-pil:amd64                      5.4.1-2+deb10u2                     amd64        Python Imaging Library (Pillow fork)
ii  python-pip-whl                        18.1-5                              all          Python package installer
ii  python-pkg-resources                  40.8.0-1                            all          Package Discovery and Resource Access using pkg_resources
ii  python-pyasn1                         0.4.2-3                             all          ASN.1 library for Python (Python 2 module)
ii  python-pyasn1-modules                 0.2.1-0.2                           all          Collection of protocols modules written in ASN.1 language
ii  python-pycurl                         <IP_ADDRESS>-0.1                        amd64        Python bindings to libcurl
ii  python-pygame                         1.9.4.post1+dfsg-3                  amd64        SDL bindings for games development (Python 2)
ii  python-pyqt5                          5.11.3+dfsg-1+b3                    amd64        Python 2 bindings for Qt5
ii  python-qrtools                        1.4~bzr32-1                         all          high level library for reading and generating QR codes
ii  python-qubesdb                        4.0.13-1+deb10u1                    amd64        QubesDB python bindings.
ii  python-rencode                        1.0.5-1+b2                          amd64        Python encoding library similar to bittorrent's bencode
ii  python-rpm                            <IP_ADDRESS>+dfsg1-1                    amd64        Python bindings for RPM
ii  python-scour                          0.37-2                              all          SVG scrubber and optimizer (Python 2 module)
ii  python-service-identity               16.0.0-2                            all          Service identity verification for pyOpenSSL (Python 2 module)
ii  python-sip                            4.19.14+dfsg-2                      amd64        Python/C++ bindings generator runtime library
ii  python-six                            1.12.0-1                            all          Python 2 and 3 compatibility library (Python 2 interface)
ii  python-soupsieve                      1.8+dfsg-1                          all          Modern CSS selector implementation for BeautifulSoup (Python 2.7)
ii  python-sqlite                         1.0.1-12                            amd64        Python interface to SQLite 2
ii  python-sqlitecachec                   1.1.4-1                             amd64        Fast metadata parser for yum
ii  python-talloc:amd64                   2.1.14-2                            amd64        hierarchical pool based memory allocator - Python bindings
ii  python-twisted-bin:amd64              18.9.0-3                            amd64        Event-based framework for internet applications
ii  python-twisted-core                   18.9.0-3                            all          Event-based framework for internet applications
ii  python-uritools                       2.2.0-1                             all          RFC 3986 compliant replacement for urlparse (Python 2)
ii  python-urlgrabber                     3.10.2-1                            all          high-level URL transfer library
ii  python-webencodings                   0.5.1-1                             all          Python implementation of the WHATWG Encoding standard
ii  python-xdg                            0.25-5                              all          Python 2 library to access freedesktop.org standards
ii  python-zbar:amd64                     0.22-1                              amd64        bar code scanner and decoder (Python bindings)
ii  python-zope.interface                 4.3.2-1+b2                          amd64        Interfaces for Python
ii  python2                               2.7.16-1                            amd64        interactive high-level object-oriented language (Python2 version)
ii  python2-minimal                       2.7.16-1                            amd64        minimal subset of the Python2 language
ii  python2.7                             2.7.16-2+deb10u1                    amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                     2.7.16-2+deb10u1                    amd64        Minimal subset of the Python language (version 2.7)
ii  python3                               3.7.3-1                             amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apt                           <IP_ADDRESS>                             amd64        Python 3 interface to libapt-pkg
ii  python3-asn1crypto                    0.24.0-1                            all          Fast ASN.1 parser and serializer (Python 3)
ii  python3-bcrypt                        3.1.6-1                             amd64        password hashing library for Python 3
ii  python3-cairo:amd64                   1.16.2-1+b1                         amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                       2018.8.24-1                         all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend                  1.12.2-1                            amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                       3.0.4-3                             all          universal character encoding detector for Python3
ii  python3-croniter                      0.3.24-2                            all          provides iteration for datetime object with cron like format - Python 3.x
ii  python3-crypto                        2.6.1-9+b1                          amd64        cryptographic algorithms and protocols for Python 3
ii  python3-cryptography                  2.6.1-3+deb10u2                     amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups                          1.9.73-2+b1                         amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                   1.5.11-4                            all          Python utility modules around the CUPS printing system
ii  python3-daemon                        2.2.3-1                             all          library for making a Unix daemon process  Python 3
ii  python3-dateutil                      2.7.3-3                             all          powerful extensions to the standard Python 3 datetime module
ii  python3-dbus                          1.2.8-3                             amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-debconf                       1.5.71                              all          interact with debconf from Python 3
ii  python3-debian                        0.1.35                              all          Python 3 modules to work with Debian-related data formats
ii  python3-debianbts                     2.8.2                               all          Python interface to Debian's Bug Tracking System
ii  python3-dev                           3.7.3-1                             amd64        header files and a static library for Python (default)
ii  python3-distro                        1.3.0-1                             all          Linux OS platform information API
ii  python3-distutils                     3.7.3-1                             all          distutils package for Python 3.x
ii  python3-entrypoints                   0.3-1                               all          Discover and load entry points from installed packages (Python 3)
ii  python3-gi                            3.30.4-1                            amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                      3.30.4-1                            amd64        Python 3 Cairo bindings for the GObject library
ii  python3-httplib2                      0.11.3-2                            all          comprehensive HTTP client library written for Python3
ii  python3-idna                          2.6-1                               all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-jinja2                        2.10-2                              all          small but fast and easy to use stand-alone template engine
ii  python3-jmespath                      0.9.4-1                             all          JSON Matching Expressions (Python 3)
ii  python3-kerberos                      1.1.14-2                            amd64        GSSAPI interface module - Python 3.x
ii  python3-keyring                       17.1.1-1                            all          store and access your passwords safely - Python 3 version of the package
ii  python3-keyrings.alt                  3.1.1-1                             all          alternate backend implementations for python3-keyring
ii  python3-lib2to3                       3.7.3-1                             all          Interactive high-level object-oriented language (2to3, version 3.6)
ii  python3-libcloud                      2.4.0-1                             all          unified Python interface into the cloud (Python3 version)
ii  python3-lockfile                      1:0.12.2-2                          all          file locking library for Python  Python 3 library
ii  python3-markupsafe                    1.1.0-1                             amd64        HTML/XHTML/XML string library for Python 3
ii  python3-minimal                       3.7.3-1                             amd64        minimal subset of the Python language (default python3 version)
ii  python3-msgpack                       0.5.6-1+b1                          amd64        Python 3 implementation of MessagePack format
ii  python3-nacl                          1.3.0-2                             amd64        Python bindings to libsodium (Python 3)
ii  python3-netaddr                       0.7.19-1                            all          manipulation of various common network address notations (Python 3)
ii  python3-ntlm-auth                     1.1.0-1                             all          NTLM low-level Python library
ii  python3-numpy                         1:1.16.2-1                          amd64        Fast array facility to the Python 3 language
ii  python3-olefile                       0.46-1                              all          Python module to read/write MS OLE2 files
ii  python3-paramiko                      2.4.2-0.1                           all          Make ssh v2 connections (Python 3)
ii  python3-pil:amd64                     5.4.1-2+deb10u2                     amd64        Python Imaging Library (Python3)
ii  python3-pip                           18.1-5                              all          Python package installer
ii  python3-pkg-resources                 40.8.0-1                            all          Package Discovery and Resource Access using pkg_resources
ii  python3-psutil                        5.5.1-1                             amd64        module providing convenience functions for managing processes (Python3)
ii  python3-pyasn1                        0.4.2-3                             all          ASN.1 library for Python (Python 3 module)
ii  python3-pycurl                        <IP_ADDRESS>-0.1                        amd64        Python bindings to libcurl (Python 3)
ii  python3-pysimplesoap                  1.16.2-1                            all          simple and lightweight SOAP Library (Python 3)
ii  python3-qubesdb                       4.0.13-1+deb10u1                    amd64        QubesDB python bindings.
ii  python3-reportbug                     7.5.3~deb10u1                       all          Python modules for interacting with bug tracking systems
ii  python3-requests                      2.21.0-1                            all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-requests-kerberos             0.11.0-2                            all          Kerberos/GSSAPI authentication handler for python-requests - Python 3.x
ii  python3-requests-ntlm                 1.1.0-1                             all          Adds support for NTLM authentication to the requests library
ii  python3-scour                         0.37-2                              all          SVG scrubber and optimizer (Python 3 module)
ii  python3-secretstorage                 2.3.1-2                             all          Python module for storing secrets - Python 3.x version
ii  python3-selinux                       2.8-1+b1                            amd64        Python3 bindings to SELinux shared libraries
ii  python3-setuptools                    40.8.0-1                            all          Python3 Distutils Enhancements
ii  python3-simplejson                    3.16.0-1                            amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-six                           1.12.0-1                            all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-smbc                          <IP_ADDRESS>-1+b2                       amd64        Python 3 bindings for the Samba client library
ii  python3-tornado4                      4.5.3-3                             amd64        scalable, non-blocking web server and tools - Python 3 package
ii  python3-tz                            2019.1-1                            all          Python3 version of the Olson timezone database
ii  python3-uno                           1:6.1.5-3+deb10u6                   amd64        Python-UNO bridge
ii  python3-urllib3                       1.24.1-1                            all          HTTP library with thread-safe connection pooling for Python3
ii  python3-virtualenv                    15.1.0+ds-2                         all          Python virtual environment creator
ii  python3-wheel                         0.32.3-2                            all          built-package format for Python
ii  python3-winrm                         0.3.0-2                             all          Python 3 library for Windows Remote Management
ii  python3-xcffib                        0.8.1-1+deb10u1                     amd64        This package is a Python binding for XCB (Python 3)
ii  python3-xdg                           0.25-5                              all          Python 3 library to access freedesktop.org standards
ii  python3-xmltodict                     0.11.0-2                            all          Makes working with XML feel like you are working with JSON (Python 3)
ii  python3-yaml                          3.13-2                              amd64        YAML parser and emitter for Python3
ii  python3.7                             3.7.3-2+deb10u2                     amd64        Interactive high-level object-oriented language (version 3.7)
ii  python3.7-dev                         3.7.3-2+deb10u2                     amd64        Header files and a static library for Python (v3.7)
ii  python3.7-minimal                     3.7.3-2+deb10u2                     amd64        Minimal subset of the Python language (version 3.7)
user@disp3499:~$

user@disp3499:~$ python3 -m virtualenv --python=python3.7 /tmp/virtualenv/kivymd_test
Running virtualenv with interpreter /usr/bin/python3.7
Using base prefix '/usr'
/usr/lib/python3/dist-packages/virtualenv.py:1090: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
New python executable in /tmp/virtualenv/kivymd_test/bin/python3.7
Not overwriting existing python script /tmp/virtualenv/kivymd_test/bin/python (you must use /tmp/virtualenv/kivymd_test/bin/python3.7)
Installing setuptools, pkg_resources, pip, wheel...done.
user@disp3499:~$ /tmp/virtualenv/kivymd_test/bin/python3 -m pip install --upgrade pip kivy kivymd
Requirement already up-to-date: pip in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (20.2.2)
Requirement already up-to-date: kivy in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (1.11.1)
Requirement already up-to-date: kivymd in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (0.104.1)
Requirement already satisfied, skipping upgrade: docutils in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from kivy) (0.16)
Requirement already satisfied, skipping upgrade: pygments in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from kivy) (2.6.1)
Requirement already satisfied, skipping upgrade: Kivy-Garden>=0.1.4 in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from kivy) (0.1.4)
Requirement already satisfied, skipping upgrade: pillow in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from kivymd) (7.2.0)
Requirement already satisfied, skipping upgrade: requests in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from kivymd) (2.24.0)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from requests->kivymd) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from requests->kivymd) (2.10)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from requests->kivymd) (1.25.10)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /tmp/virtualenv/kivymd_test/lib/python3.7/site-packages (from requests->kivymd) (2020.6.20)
user@disp3499:~$ /tmp/virtualenv/kivymd_test/bin/python3 -m pip list
Package       Version
------------- ---------
certifi       2020.6.20
chardet       3.0.4
docutils      0.16
idna          2.10
Kivy          1.11.1
Kivy-Garden   0.1.4
kivymd        0.104.1
Pillow        7.2.0
pip           20.2.2
pkg-resources 0.0.0
Pygments      2.6.1
requests      2.24.0
setuptools    50.0.0
urllib3       1.25.10
wheel         0.35.1
user@disp3499:~$ source /tmp/virtualenv/kivymd_test/bin/activate
(kivymd_test) user@disp3499:~$

(kivymd_test) user@disp3499:~$ tmpDir=`mktemp -d`
(kivymd_test) user@disp3499:~$ pushd "${tmpDir}"
/tmp/tmp.YkuCdPN45C ~
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$

(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$ cat << EOF > alertDialogButtonFail.py
> #!/usr/bin/env python3
> from kivy.lang import Builder
>
> from kivymd.app import MDApp
> from kivymd.uix.button import MDFlatButton
> from kivymd.uix.dialog import MDDialog
>
> KV = '''
> FloatLayout:
>
>     MDFlatButton:
>         text: "ALERT DIALOG"
>         pos_hint: {'center_x': .5, 'center_y': .5}
>         on_release: app.show_alert_dialog()
> '''
>
>
> class Example(MDApp):
>     dialog = None
>
>     def build(self):
>         return Builder.load_string(KV)
>
>     def show_alert_dialog(self):
>         if not self.dialog:
>             self.dialog = MDDialog(
>                 text="Discard draft?",
>                 title="Example Title",
>                 buttons=[
>                     MDFlatButton(
>                         text="CANCEL", text_color=self.theme_cls.primary_color
>                     ),
>                     MDFlatButton(
>                         text="DISCARD", text_color=self.theme_cls.primary_color
>                     ),
>                 ],
>             )
>         self.dialog.open()
>
>
> Example().run()
> EOF
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$ chmod +x alertDialogButtonFail.py
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$ ./alertDialogButtonFail.py
[INFO   ] [Logger      ] Record log in /home/user/.kivy/logs/kivy_20-09-01_4.txt
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "/tmp/virtualenv/kivymd_test/lib/python3.7/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
[INFO   ] [Python      ] Interpreter at "/tmp/virtualenv/kivymd_test/bin/python3"
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [KivyMD      ] v0.104.1
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'3.1 Mesa 18.3.6'>
[INFO   ] [GL          ] OpenGL vendor <b'VMware, Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'llvmpipe (LLVM 7.0, 256 bits)'>
[INFO   ] [GL          ] OpenGL parsed version: 3, 1
[INFO   ] [GL          ] Shading version <b'1.40'>
[INFO   ] [GL          ] Texture max size <8192>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop
[INFO   ] [WindowSDL   ] exiting mainloop and closing.
[INFO   ] [Base        ] Leaving application in progress...
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$ popd
~
(kivymd_test) user@disp3499:~$

Repeated attempts
I've found that if I repeat the test over-and-over, then sometimes (<50% of the time), I will be able to click the button. And it appears to help if I click, hold down the touchpad, and move the mouse pointer a few pixels over with the button still depressed -- rather than just click/tap on the touchpad.
Context/Versions
Note that the script in the above example execution is a very slightly modified version of what was found in the documentation. but with the title set. Here's the diff:

https://kivymd.readthedocs.io/en/latest/components/dialog/index.html?highlight=dialog

(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$ diff orig.py alertDialogButtonFail.py
0a1
> #!/usr/bin/env python3
26a28
>                 title="Example Title",
(kivymd_test) user@disp3499:/tmp/tmp.YkuCdPN45C$

When the title is removed, then the buttons work as expected every time.

OS: Debian 10
Python: 3.7.3
Kivy: 1.11.1
KivyMD: 0.104.1

@maltfield
from kivy.lang import Builder

from kivymd.app import MDApp
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dialog import MDDialog

KV = '''
FloatLayout:

    MDFlatButton:
        text: "ALERT DIALOG"
        pos_hint: {'center_x': .5, 'center_y': .5}
        on_release: app.show_alert_dialog()
'''

class Example(MDApp):
    dialog = None

    def build(self):
        return Builder.load_string(KV)

    def show_alert_dialog(self):
        if not self.dialog:
            self.dialog = MDDialog(
                text="Discard draft?",
                buttons=[
                    MDFlatButton(
                        text="CANCEL",
                        text_color=self.theme_cls.primary_color,
                        on_release=self.alert_method,
                    ),
                ],
            )
        self.dialog.open()

    def alert_method(self, instance_button):
        print(instance_button)

Example().run()

@HeaTTheatR You haven't even set the title.

@maltfield ???

From the original bug report:

When the title is removed, then the buttons work as expected every time.

Woah, was this closed by mistake? You didn't even follow my steps to reproduce let alone use the code I provided..

@maltfield The question is closed because I have not found any error!

Can you please re-open and follow the "Steps to reproduce" section or at least wait a few days/weeks for others to confirm the issue?
Unfortunately it's difficult for me to record my screen because I'm running QubesOS, but this is definitely a bug. Please follow the "Steps to reproduce" section and let me know if you can reproduce it.

@maltfield You haven't even bound an event to buttons! Therefore, if you write about something, then show the code that leads to the error. There is no error in the code you showed here. Therefore, your question is closed.

Wow, pleas stop shouting @HeaTTheatR
Yes, I haven't bound the button to make the example code shorter & simpler. Tell me: what should happen when you click the button and it's not bound to anything? Should it be clicked and do nothing? Or should it close the dialog?
As I've described above, clicking anywhere causes the dialog to be closed. This is the error.
The expected result from the code posted in this bug report is that the button is clicked (but there is no action).

@maltfield I showed you on the GIF animation that everything works great. If you think that I am wrong, argue. And there is no need to argue.

You're using MacOS
You're not even using my code.

Please re-open this issue until you're able to at least prove that you cannot reproduce the bug when following my very clear "Steps to reproduce".

@podraco @ArtemSBulgakov
You know, I would be open to working with your team to contribute to a PR to fix this bug if you weren't so hostile.
Trigger-happy ticket closings within minutes after reporting (and before even following the steps to reproduce), yelling at bug reporters, and other hostile/childish communication doesn't make me want to help/contribute to your open source project at all..

@maltfield I showed you that your error is only related to your code. What other actions did you expect from me?  I think you have the wrong address!

@maltfield
i'm sorry to tell you this but you didnt bind a fucntion to the buttons.
HeatTheatR's code below
your code need to add a line similar to this to close the dialog after the button in pressed, as explained in the test code that @HeaTTheatR show to you  @maltfield.
self.dialog = MDDialog(
                text="Discard draft?",
                buttons=[
                    MDFlatButton(
                        text="CANCEL",
                        text_color=self.theme_cls.primary_color,
                        on_release=self.alert_method, # this function will be called when the cancel button is pressed.
                    ),
                ],

Your code below
This is your code. As you can see, there's no callback to any button on the event on_release or on_press, therefore the button will not do anything.
buttons=[
        MDFlatButton(
            text="CANCEL",
            text_color=self.theme_cls.primary_color
        ),
        MDFlatButton(
            text="DISCARD",
            text_color=self.theme_cls.primary_color
    ),
],

There's no need to fight, so please, mind your manners when you're asking for help, maybe you didn't notice. But some of your comments were very ... impolite.
I'm not sure where are you from and maybe the literal translation from your mother language of what you tried to express may sound disrespectful or authoritarian  in English, but I'll recommend you to look in google about international manners to know the do's and dont's between cultures.
This is not a callback or anything like that, but just an advice to help you improve your communications skills.

@podraco Therefore, I try to express my reasons more in code, and not in words.

@maltfield
i'm sorry to tell you this but you didnt bind a fucntion to the buttons.

@podraco If someone would please follow the "Steps to reproduce" then you would see that binding is unnecessary to reproduce this bug.
I don't want to waste your time, so I wanted to strip out the fat in the code example. The binding is not necessary to show that the buttons can't be clicked and clicking anywhere on the screen causes the dialog to be closed.
Of course, when I first discovered this bug, I had the buttons bound to a function, but then I went back and spent about an hour distilling it down to the very simple form that it is (with only 2 lines modified from your example script in the documentation) and writing this bug report with very simple "steps to reproduce"
If you require it, I can add the button bindings back again, but it's unnecessary to reproduce this bug.
Please re-read my initial bug report. Note the diff at the end that shows only two lines were changed from the code example supplied in KivyMD's documentation. I wanted to keep that diff as small as possible so you could see very clearly that this is not a problem with my implementation
@podraco  can you or someone please re-open this ticket until someone has actually followed the "steps to reproduce" to confirm the issue (or find it not-reproducable)

Hi, @maltfield.
This issue was fixed after releasing KivyMD 0.104.1. I can confirm that it works as expected with KivyMD master on Windows 10 and not working properly with KivyMD 0.104.1.
Please install KivyMD from master branch and test again. Report if the bug repeats and I will reopen issue.

@maltfield

clicking anywhere on the screen causes the dialog to be closed

https://kivy.org/doc/stable/api-kivy.uix.modalview.html#kivy.uix.modalview.ModalView.auto_dismiss

@HeaTTheatR He means that even clicking on the buttons or text closes the dialog.

@maltfield

clicking anywhere on the screen causes the dialog to be closed

https://kivy.org/doc/stable/api-kivy.uix.modalview.html#kivy.uix.modalview.ModalView.auto_dismiss

I said anywhere on the screen. The dialog shouldn't be closed when the user clicks the dialog or the buttons.

@ArtemSBulgakov Yes, this is a version bug in PyPi

same, bug in pypi, not in master.

this is how it works in master.

Thank you @ArtemSBulgakov, I'm currently installing from git, but it's a very large download. Will update this ticket with the results when finished.
@HeaTTheatR & @podraco For the future, please please follow the users' Steps To Reproduce if they took the time to build-out a set of idempotent, reproducible set of commands.
If you have a different system than the reporter, then please leave the ticket open at least for a few days until someone who has the same system (with the same software versions) can follow the "steps to reproduce" can add a comment to the ticket with their results.

this is how it works in master.

Thank you. Notice how--even without binding--the buttons are clickable and the dialog doesn't close. This is how it should work.

I finished installing kivymd from git and confirmed that this bug cannot be reproduced with the latest state of kivymd from master
Here is the workaround steps to reproduce:
sudo apt-get -y install python3 python3-pip python3-virtualenv python3-setuptools
sudo dpkg -l | grep python

python3 -m virtualenv --python=python3.7 /tmp/virtualenv/kivymd_test
/tmp/virtualenv/kivymd_test/bin/python3 -m pip install --upgrade pip kivy
/tmp/virtualenv/kivymd_test/bin/python3 -m pip install --upgrade git+https://github.com/kivymd/KivyMD.git
/tmp/virtualenv/kivymd_test/bin/python3 -m pip list
source /tmp/virtualenv/kivymd_test/bin/activate

tmpDir=`mktemp -d`
pushd "${tmpDir}"

cat << EOF > alertDialogButtonFail.py
#!/usr/bin/env python3
from kivy.lang import Builder

from kivymd.app import MDApp
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dialog import MDDialog

KV = '''
FloatLayout:

    MDFlatButton:
        text: "ALERT DIALOG"
        pos_hint: {'center_x': .5, 'center_y': .5}
        on_release: app.show_alert_dialog()
'''

class Example(MDApp):
    dialog = None

    def build(self):
        return Builder.load_string(KV)

    def show_alert_dialog(self):
        if not self.dialog:
            self.dialog = MDDialog(
                text="Discard draft?",
                title="Example Title",
                buttons=[
                    MDFlatButton(
                        text="CANCEL", text_color=self.theme_cls.primary_color
                    ),
                    MDFlatButton(
                        text="DISCARD", text_color=self.theme_cls.primary_color
                    ),
                ],
            )
        self.dialog.open()

Example().run()
EOF
chmod +x alertDialogButtonFail.py
./alertDialogButtonFail.py

popd

Note that the one line changed is /tmp/virtualenv/kivymd_test/bin/python3 -m pip install --upgrade git+https://github.com/kivymd/KivyMD.git

@maltfield You, in turn, try to give questions from which the essence of the problem is clear. Your question - Alert dialog's buttons do nothing - misled not only me.

@maltfield
it's true that we do not share the same specs as you, but i have to inform you the following

KivyMD is a multiplatform library that works directly over Kivy, therefore all platforms must work the same, if there's a behavior dependent on the platform it's running on, then the bug might be from the Kivy Framework side and not kivyMD
This bug report platform is only to report bugs related to the master branch.


.Net: AzureOpenAIFileService issues

The following issues were identified during migration of the AzureOpenAIFileService to the Azure.AI.OpenAI SDK v2:

Error message: System.ArgumentNullException : Value cannot be null. (Parameter 'purpose')
Azure.AI.OpenAI SDK Method: GetFilesAsync(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default)
Steps to reproduce: Call the method with no arguments or a null argument for the purpose parameter.
Stack Trace:
Argument.AssertNotNullOrEmpty(String value, String name)
AzureFileClient.GetFilesAsync(String purpose, RequestOptions options)
FileClient.GetFilesAsync(Nullable1 purpose, CancellationToken cancellationToken)
ClientCore.RunRequestAsync[T](Func`1 request) line 170
Bug in Azure repo: https://github.com/Azure/azure-sdk-for-net/issues/44912

Error message: HTTP 400 (invalidPayload) Invalid value for purpose.
Azure.AI.OpenAI SDK Method: GetFilesAsync(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default)
Steps to reproduce: Upload a jpg file with the Assistants purpose and call the GetFilesAsync with the Vision argument for the purpose parameter.
Stack Trace:
ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
AzureFileClient.GetFilesAsync(String purpose, RequestOptions options)
FileClient.GetFilesAsync(Nullable1 purpose, CancellationToken cancellationToken)  ClientCore.RunRequestAsync[T](Func1 request) line 170
Bug in Azure repo: https://github.com/Azure/azure-sdk-for-net/issues/44913

ToDo

Enable skipped AzureOpenAIFileServiceTests unit tests.
Enable skipped AzureOpenAIFileServiceTests integration tests.

This issue is no longer relevant because it was decided to obsolete the file service. The OpenAIClient or AzureOpenAIClient classes from relevant SDKs can be used instead.


Terminate Apalache server on Linux properly

When running massive experiments on a Linux machine, I have noticed that the instances of Apalache server are spawned via quint verify but not properly terminated. This is especially visible when running multiple model checking instances in parallel. In the end, the machine runs out of swap space.
The main reason for that is spawning apalache-mc via shell from NodeJS, which does not terminate the grandchild process (java). This PR simply changes the spawning option shell to false. I have checked it on a Linux machine. Now the server is terminating.

[x] Entries added to the respective CHANGELOG.md for any new functionality

@bugarela Amazing! It looks like you have to merge it though.


Improvement for k8s.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

It'd be really great if the page about liveness, readiness & startup would clarify the behavior for failureThreshoulds.
Consider the following livenessProbe:
livenessProbe:
  httpGet:
    path: /healthz
    port: http
  initialDelaySeconds: 5
  periodSeconds: 5
  timeoutSeconds: 30
  failureThreshold: 3

What is the minimal/maximal amount of time until the pod will restart?
Maximal case:
Will the kubelet spawn probes while it's waiting for a probe to respond? (restart after 3failures * 5s + 30s => 45s)?
Will it wait for the the first probe to fail and then spawn the next probe immediately after (restart after 3failuress * 30s => 90s)?
Minimal case should be clear (restart after 3failures * 5s => 15s).

This feels like a duplicate of https://github.com/kubernetes/website/issues/37414
@tback would you agree?
/language en

No, I don't think it's a duplicate. I think the relation is so strong that I'll move my description over to the other ticket as a comment.


ARROW-7051: [C++] Improve MakeArrayOfNull to support creation of multiple arrays

12116

 Quality gate: Failed
42 Issues

 1 Vulnerabilities
 41 Code issues

Details

 Quality gate: Failed
6 Issues

 1 Vulnerabilities
 5 Code issues

Details


Add --extra-index-url from all extra indexes

Handle indexes, extra indexes, uncached sources

Handle extra-index-urls when resolving
Handle extra-index-url when using --skip-lock
Parse index arguments when installing individual packages
Translate index aliases to urls
Always include extra indexes when installing a packages
get_source() falls back to parsed_pipfile['source'] for sources when
not present in the lockfile (#1994)
Include index and extra-index-url arguments in pipenv lock -r output
Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan<EMAIL_ADDRESS>

@uranusjr I want to favor this over #1950 but the get_source method in pipenv.Project only checks the cached lockfile, which doesn't work if you add a new source to the pipfile that hasn't been locked yet (i.e. you use --skip-lock) -- thoughts?

@uranusjr @jtratner @ncoghlan @frostming would appreciate if at least one of you can look this over before it gets merged so I can go ahead and cut a bugfix release

Forgot to mention in the review—split_index and split_extra_index seem a bit too similar to me. Is it possible to refactor the logic out?

Ok mostly changed stuff, didn't rewrite all of the testing w/ the fixtures and refactor points per @jtratner but did refactor them a bit to be more concise & got them passing again


How to run storyshots without create react app

I created a storyshots.test.js file, but I have no idea how to execute it. I feel like I'm missing something obvious. It fails when running node storyshots.test.js. When I run jest, storyshots says "testStorySnapshots is intended only to be used inside jest".
Storybook runs fine, I had the impression that storyshots was a simple addon, I'm guessing without create-react-app it becomes a whole separate project to setup. All examples say run npm test based on the screenshots they're running a create-react-app script.
Steps to reproduce
storyshots.test.js
var path = require('path');
var React = require('react');
var initStoryshots= require('@storybook/addon-storyshots');
var renderer = require('enzyme').mount;
var serializer = require('enzyme-to-json');
var multiSnapshotWithOptions = initStoryshots.multiSnapshotWithOptions;

// HTML Snapshots
initStoryshots({
    framework: 'react',
    configPath: path.join(__dirname, '../'),
    // integrityOptions: { cwd: path.join(__dirname, '..', 'stories') },
    // test: multiSnapshotWithOptions({
        renderer: renderer,
        serializer: serializer,
    // }),
});

Please specify which version of Storybook and optionally any affected addons that you're running

@storybook/react 3.4.8
@storybook/addon-storyshots 3.4.8

This error means that you somehow run the test outside of the testing framework, it should not be executed with node storyshots.test.js.
Did you configure jest in your project?

Apologies if my post is unclear, but I only get that error when I run it with jest. Yes jest is setup on my system.
I’m unclear on how this works and the documentation is not clear. My stories require we pack to run, how can snapshots be created from stories without running we pack. I’m not seeing how this all comes together.

When running this test from jest, webpack is not used. Jest has its own module resolution mechanism. If you are using some kind of "special" features from webpack, you will probably need to polyfill them with babel.
Can you please share jest.config / package.json / config.js

Unfortunately with the project I'm working I am unable to post any code samples. I was just hoping to understand what I was missing from a high-level. I essentially need to do manual configuration to get jest working with storybook stories. Storyshots help bridge the gap, but I still need to do the jest setup. I was hoping it'd be as simple as the documentation due to time constraints.
Thanks.


ZUI: smaller fonts for image and image:tag titles in the product pages

Need to experiment.

Closed, new issues regarding new ux mocks include these changes (#331, #332, #333, #334)


Cherry-pick #383 to sdf9: Fix supported shader types (normal_map_X_space)

Cherry-pick #383 forward to sdf9 and amended to include change in sdf/1.7. Use rebase and merge.
original description:
Going over models on the Gazebo model database, I don't see a single model that uses:

normal_map_objectspace
normal_map_tangentspace

Instead, there are models using:

normal_map_object_space
normal_map_tangent_space

I suspect that the documentation has been wrong all along, and when the sdf::Material class was created, the error was propagated.
The fix here changes the documentation to the "correct" values, but keeps the "old" values supported to avoid breaking existing code.

Codecov Report

Merging #385 into sdf9 will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             sdf9     #385      +/-   ##
==========================================
- Coverage   86.27%   86.25%   -0.02%
==========================================
  Files          59       59
  Lines        9177     9181       +4
==========================================
+ Hits         7917     7919       +2
- Misses       1260     1262       +2

Impacted Files
Coverage Δ

src/Material.cc
97.94% <100.00%> (-1.36%)
:arrow_down:

Continue to review full report at Codecov.

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


Apparently incorrect tractability precedence for HDAC4

Reported by user,

I was using the tractability data to help guide selection of targets ... and noticed a discrepancy for HDAC4 in that the marketed drugs/clinical candidates are flagged (correctly) on the OT and ChEMBL websites but in the tractability section this isn't the case (plus, I am not sure that the number of chembl compounds is correct either).

HDAC4 target page: https://platform.opentargets.org/target/ENSG00000068024

The changes I made are outlined below:

Change the full URL in the run_pipeline.py and include the "reviewed" category.

        full_url = 'https://rest.uniprot.org/uniprotkb/stream?fields=accession%2Cid%2Cprotein_name%2Cgene_primary%2Cgene_synonym%2Cxref_geneid%2Cxref_chembl%2Cxref_bindingdb%2Cxref_drugbank%2Cxref_pharmgkb%2Cxref_pharos%2Cxref_pdb%2Ccc_subcellular_location%2Cft_transmem%2Cft_signal%2Cgo_c%2Creviewed&format=tsv&query=%28proteome:UP000005640%29'

Included only reviewed results and where uniprot accession is less than 7 characters.

        human_proteome.query(" `Entry Name` == `Entry Name` & `Reviewed` == 'reviewed' & Entry.str.len() < 7 ", inplace = True)         human_proteome = human_proteome.drop(columns = ['Reviewed'])
Feel free to close this issue as the submission for 24.06 is complete and reopen it if there are more issues.

The issue is solved with the latest submission. Thank you for the fix @hioannidis!
I'll keep this open to double check in the FE

This has been resolved in the latest dev version and will be fixed with the Platform 24.06 release.


chore(package): update uglify-es v3.2.0...v3.2.1

related to this issue: https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/187
uglify-es version 3.2.0 doesn't support const and arrow-function. In my case, this causes build failure when I try to make a production bundle for deployment

@SuperManEver Why? Seems you have outdated npm cache. Just run npm cache clean --force and try again npm i

@evilebottnawi tried this several times. Locally it works perfect, no errors appear, but when I try to upload my code to heroku error arrises. I tried with version 3.2.0 and I get exactly the same error I get when heroku tries to build my bundle. If I use uglify-es version 3.2.1, everything works fine

@SuperManEver what is error you get? This https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/187#issue-279785840?

@evilebottnawi this one

@evilebottnawi the fastest way how you can convince yourself that problem in 'uglify-es' version is by taking this file https://github.com/izolate/millify/blob/master/index.js and try to minify it withuglify-es version 3.2.0 and version 3.2.1 and you will see the difference

@SuperManEver confirm, please update snapshots npm run test -- -u

uglify-es version 3.2.0 doesn't support const and arrow-function.

That's not the case.
Updating the uglify-es version is fine, but the issue was unrelated to this.
$ bin/uglifyjs -V
uglify-es 3.2.0

$ curl -s https://raw.githubusercontent.com/izolate/millify/master/index.js | bin/uglifyjs -bmc
const suffixes = new Map();

suffixes.set(3, "K"), suffixes.set(6, "M"), suffixes.set(9, "B"), suffixes.set(12, "T"),
module.exports = ((e, s) => {
    e = (e => {
        if ("number" != typeof e) throw new Error("Input value is not a number");
        return parseFloat(e);
    })(e);
    const t = ((e, s) => {
        for (let t of suffixes.keys()) e > t && (s = t);
        return {
            suffix: suffixes.get(s),
            zeroes: s
        };
    })(Math.floor(Math.log10(Math.abs(e))) + 1, null), f = e / Math.pow(10, t.zeroes);
    return s = f % 1 == 0 ? 2 : Math.max(1, s + 1) || 3, -1e3 < e && e < 1e3 ? e : `${parseFloat(f.toPrecision(s))}${t.suffix}`;
});

$ bin/uglifyjs -V
uglify-es 3.2.1

$ curl -s https://raw.githubusercontent.com/izolate/millify/master/index.js | bin/uglifyjs -bmc
const suffixes = new Map();

suffixes.set(3, "K"), suffixes.set(6, "M"), suffixes.set(9, "B"), suffixes.set(12, "T"),
module.exports = ((e, s) => {
    e = (e => {
        if ("number" != typeof e) throw new Error("Input value is not a number");
        return parseFloat(e);
    })(e);
    const t = ((e, s) => {
        for (let t of suffixes.keys()) e > t && (s = t);
        return {
            suffix: suffixes.get(s),
            zeroes: s
        };
    })(Math.floor(Math.log10(Math.abs(e))) + 1, null), f = e / Math.pow(10, t.zeroes);
    return s = f % 1 == 0 ? 2 : Math.max(1, s + 1) || 3, -1e3 < e && e < 1e3 ? e : `${parseFloat(f.toPrecision(s))}${t.suffix}`;
});

@evilebottnawi not exactly understand what should I do about this "please update snapshots npm run test -- -u". Can you explain it a little bit more, please?

I wonder where this change to the test snapshot is coming from tbh

@SuperManEver run npm run test -- -u inside project to update snapshot and we can merge this in master

@evilebottnawi updated snapshot by running npm run test -- -u


Write Feedback

Hello,
I get the error code 400 Bad Request during my write process and I don't know why. With some samples it works and with some it doesn't. I found at the InfluxDB documentation, that it is possible to set pretty=true to enable pretty-print JSON. How does this work with your Matlab add on?

Hi @AnEb0711, sorry for the late reply.

I get the error code 400 Bad Request during my write process and I don't know why.

Do you get a specific error message? You can also try executing the write command directly to help debug the issue further.

I found at the InfluxDB documentation, that it is possible to set pretty=true to enable pretty-print JSON. How does this work with your Matlab add on?

That should not be relevant to the issue because write requests don't use JSON, they are formatted in line protocol.
If you would like to see what the request looks like when writing to the DB, you can use the .toLine() method, for example:
series1 = Series('weather') ...
    .tags('city', 'paris', 'country', 'france') ...
    .fields('temperature', 24.3, 'humidity', 70.4) ...
    .time(datetime('today', 'TimeZone', 'local'));

request = series1.toLine()

Hey @EnricSala ,
thanks for your response. I think I found the error. I use a number as tag, now I have changed it with num2str() and it looks like, as it works.
It was not a specific error message, only the general one, that it was the error during the write command.

I don't think number tag values are supported, see the docs:
https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#tag-value
Converting it to a string does make sense :+1:
I'm closing this issue, feel free to reopen if necessary :)


Can this error message be improved on?

I had a 0.4 piknik -server running and ran piknik to make sure the version (0.5) I downloaded matched my architecture before copying over the binary:
piknik
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x8201960, 0x1850a010)
	/home/travis/.gimme/versions/go1.6.3.linux.amd64/src/runtime/panic.go:481 +0x326
main.(*Client).pasteOperation(0x18531cc0, 0x1854e251, 0x20, 0x20, 0x0)
	/home/travis/gopath/src/github.com/jedisct1/piknik/client.go:100 +0x143f
main.RunClient(0x8237100, 0xe, 0x1850e410, 0xc, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/src/github.com/jedisct1/piknik/client.go:170 +0xd68
main.main()
	/home/travis/gopath/src/github.com/jedisct1/piknik/piknik.go:167 +0xf15

It then dawned on me that this is probably due to a running server ...

I think this has been fixed since.

And a87883760d34aef7d2631422107d19908885fd0a should improve this at other places.
Thanks!


Pull requests here won’t count toward Hacktoberfest.

Hi there,
Thanks for your interest in Hacktoberfest and helping others learn how to make their first contributions to open source!
That said, high-quality contributions are part of the the core values of Hacktoberfest, so we kindly ask that you do not create repositories which allow users to quickly gain a PR toward completing the challenge.
We encourage you to take a look at our list of Hacktoberfest issues for inspiration and ideas about making meaningful contributions to open source projects.
Due to this, we've added this repository to our list of excluded repositories and pull requests here will not count toward Hacktoberfest 2019.
Please note, you are welcome to keep running this repository as a learning tool for new contributors to open-source, but pull requests won’t count toward Hacktoberfest.
Happy Hacking,
The Hacktoberfest Team
Hacktoberfest is presented by DigitalOcean and DEV.

That's definetely bad news :( I think that due to the previous announcement the best and most honest thing to do right now is to remove / delete the repo so that it is not misleading with all the future contributors looking for their valid Hacktoberfest 2019 RPs.
I really appreciate the effort of @Ishaan28malik and his invest in documenting and creating this repo but in order to avoid useless issues with the Hacktoberfest Team decission and all the contributors that have been affected by marking their prs as spam, the best is to remove it and contribute in the rest of great @Ishaan28malik projects.

Ok thanks for the update I really appreciate that Hacktoberfest has taken this step and surely will be conveying this to the community aswell.
@hacktoberfest-team


[STREAM-191] Performance of pruneConversationUpdateForLogging extremely slow

After a little thinking and experimenting, I realized that we can get a shallow copy on the IStoredConversationStates and delete the session from the shallow copy.


intel,adsp-mem-window driver is using EARLY init level

Describe the bug
intel,adsp-mem-window driver is using the EARLY init level, however, this level can't be used by device drivers because when it is initialized, the Kernel hasn't called z_device_state_init.
To Reproduce
https://github.com/zephyrproject-rtos/zephyr/blob/3fb434a6530897772e40922e780446b2f6ed4a24/soc/xtensa/intel_adsp/common/mem_window.c#L48-L71
Expected behavior
EARLY level is not used by device drivers
Impact
Blocks https://github.com/zephyrproject-rtos/zephyr/pull/62594, progress in init improvements.
Logs and console output
N/A
Environment (please complete the following information):

OS: Linux
Toolchain Zephyr SDK 0.16.1
Commit SHA or Version used 3fb434a6530897772e40922e780446b2f6ed4a24

Additional context
It looks like the code is not really a device driver, but a kind of initializer that seems to use the device infrastructure. There is nothing wrong with this, but, if this code is meant to be run early and devicetree does not capture the dependencies of such mem windows with other devices, it could be moved to a regular SYS_INIT.
Also note that device drivers under soc/ is not a common pattern.

sorry, but this is not a bug,  the statement "EARLY level is not used by device drivers" is where you probably want to be, but it is not something established that this code violates.
Actually, EARLY was introduced because of this and the dependencies at this very early stage of the boot process.

It is a bug because EARLY can't be safely used by devices: Kernel has not yet initialized some relevant structures. The fact that this has been allowed in devices is really an oversight.

what relevant structures are not initialized? How is this different from PRE_KERNEL, beside the fact it is done a bit earlier?

z_device_state_init. Also, expecting to have a working device infrastructure just after entering the C domain seems like a limitation for potential future changes. Moreover, arch_kernel_init has not been called at this point. I always understood EARLY as a SYS_INIT level to run something very early, not to be used by devices, precisely because you can't offer many guarantees at that point. Note that this is also a weird driver (under soc/...), I believe this can be solved in a better manner.

The "memory windows" are not exactly a devices. Since they are defined in device tree, they simply piggy-back onto the device model to do init, with all the DT_* helpers and struct device provided. These can done via SoC hooks if we are going that route. Just need to know which one.

The "memory windows" are not exactly a devices. Since they are defined in device tree, they simply piggy-back onto the device model to do init, with all the DT_* helpers and struct device provided. These can done via SoC hooks if we are going that route. Just need to know which one.

we have a few things in drivers/ that are the same.


Metrics missing / documentation outdated

Hi,
looks like https://coreos.com/etcd/docs/latest/metrics.html is outdated.
It looks like some mentioned metrics were removed in 598fa7a10ead85398aa9317d3071d2b64ae0c75e.
What is the reason for the removal? I'm especially interested in proposal_duration_seconds which I consider important to monitor.

See #6342. CoreOS doc is synced with etcd repo. The doc in etcd repo is the "official" doc. We should update CoreOS one.

If you really want to see the duration for requests, probably you want to use unary_requests_duration_seconds instead. it provides more detailed data.


Support for Java 22

Hello team,
This is my first ticket.
I have been using this project for long, really, just thank you.
Java 22 is around the corner.
Could you please support java 22 as well?
Thank you

There is now, just released

(to be precise, you commented arounf 9 hours ago time of this writing, and stable 22 got released 7 hours ago, time of this writing)

please @sebthom

You'll have to wait a few days. I am away from computer atm.

Thank you


Incorrect code coverage reports are generated for native code

Description:
This is related to the code coverage reports generated for the WebSocket module.
Please refer to the following report.
https://app.codecov.io/gh/ballerina-platform/module-ballerina-websocket
In those reports, I could see couple of issues like,

Shows method signatures are not covered while the body of the method is covered.

Shows part of a code line is covered when the code line is separated into more than one line because the line exceeds the limit of 120.

Shows commented lines are not covered.

Shows empty lines are not covered

Shows imports are not covered

Can this be resolved as this has an impact on the final code coverage percentage?

The issue happens due to the presence of duplicate class and source file elements for 'WebSocketException' and 'WebSocketUtil' in the coverage XML. The reason is having classes with the same name in both the packages.
org.ballerinalang.net.http.websocket.WebSocketUtil
org.ballerinalang.net.websocket.WebSocketUtil
org.ballerinalang.net.http.websocket.WebSocketException
org.ballerinalang.net.websocket.WebSocketException

When investigating this, I found a bug in the filtering i.e. even though specific includes for code coverage are provided that information is not used when constructing the XML. This will avoid adding the http related classes to the coverage XML, so this issue will be solved.
But we need to investigate on the following.
Even though the classes and source files are grouped correctly with different packages in the coverage bundle at [1], the generated XML contains the source file under the wrong package name leading to this issue. This seems to be a bug in jacoco XML Formatter.
[1] https://github.com/ballerina-platform/ballerina-lang/blob/master/misc/testerina/modules/testerina-runtime/src/main/java/org/ballerinalang/test/runtime/util/CodeCoverageUtils.java#L461