Strong typing for parameters and outputs

Is your feature request related to a problem? Please describe.
For parameters and outputs the set of possible types that code can declare is very limited (primitives, array, and object). When the type of a module parameter is object you don't get the same type safety guarantees that are normally possible in bicep. Having the ability to specify a more specific type than object would add type-safety for complex parameters and outputs in modules.
Here's a motivating example:
// A rule looks like ....
// {
//   name: 'rule'
//   properties: {
//     frontendPort: 5000
//     protocol: 'Tcp'
//.    ...
//   }
// }

param rule object

resource balancer 'Microsoft.Network/loadBalancers@2020-06-01' = {
  name: 'cool-load-balancer'
  properties: {
    loadBalancingRules: [
      rule
    ]
  }
}

Load balancers can be large and complex. If you want to parameterize a load balancer with modules, you have the choice to either forego type checking, or write a flat list of parameters that get combined into an object.
note: There is already a proposal for strongly-typed resources as parameters/outputs. This is about objects that are not resources.
Describe the solution you'd like
I'd like the ability to specify or infer a more specific type so that the parameters and outputs can be type-checked. I've discussed a few different options with the team, and want to gather more feedback. It's possible that more than one of these solutions are desirable given that they optimize for different scenarios.
Proposal: Refer to types by name
The simplest idea to understand is being able to specify the type using the named definitions that the compiler already knows. These are based on the OpenAPI descriptions used to generate Bicep's type definitions. In this example the type of rule is determined by looking up the provided type string against the resource type definitions.
param rule type 'Microsoft.Network/loadBalancers@2020-06-01#LoadBalancerRule'

resource balancer 'Microsoft.Network/loadBalancers@2020-06-01' = {
  name: 'cool-load-balancer'
  properties: {
    loadBalancingRules: [
      rule
    ]
  }
}

The part after the # is the type name, which is looked up in the context of the provided resource type. Failure to find the specified type would be a warning the failure to find a declared resource type.
To make this work we'd want to provide completion for the part after #. So the user can get completion for the whole string in 3 parts.
note: the syntax shown here is chosen to be similar/consistent with this proposal for type-specifiers for resources.

Pro: This is really simple to understand and consistent with how many languages specify types.
Con: Discoverability might be poor if the names chosen in the OpenAPI are poor. Fortunately these names are also used in SDK generation.
Con: Only applies to named types. For example a string property with an enum of allowed values is not a named type.

Proposal: Add a typeof specifier
This is similar to typeof type operator in TypeScript. In this example that type of the rule parameter is specify by type checking the provided expression.
param rule typeof balancer.properties.loadBalancingRules[0]

resource balancer 'Microsoft.Network/loadBalancers@2020-06-01' = {
  name: 'cool-load-balancer'
  properties: {
    loadBalancingRules: [
      rule
    ]
  }
}

The expression passed to typeof could be any expression (in theory) and could be combined with other type-specifier constructs as necessary. The expression is not evaluated, it is only type-checked.
note: the TypeScript typeof type operator is limited to property access and indexing. We probably need a way to specify that we want the element type of an array. Typescript uses typeof MyArray[number], which would seem foreign in bicep. In this case I filled that in as [*] but it needs more thought.

Pro: This is relatively simple to understand what it does, and could be combined with other constructs.
Pro: Users generally know the properties they need to set so this is slightly more discoverable than the type names, which don't appear in bicep code today.
Pro: Since this refers to a property and not a type, we also have the ability to populate things like documentation or validation constraints.
Con: Might require a special syntax or be confusing when used with the element-type of an array. Likewise doing typeof a resource created in a loop might be confusing compared to other options.
Con: Can refer to types that are not part of the ARM-JSON spec. eg: union of string | int. There's no way to encode this in ARM-JSON today.

Proposal: Type inference via target-typing
This is similar to type inference in where it applies in TypeScript or some functional languages. Similar to (but more complex) target-typed new() in C#. In this example the type rule has its type inferred based on where it appears.
param rule auto

resource balancer 'Microsoft.Network/loadBalancers@2020-06-01' = {
  name: 'cool-load-balancer'
  properties: {
    loadBalancingRules: [
      rule
    ]
  }
}

note: This really optimizes for the use-case where a parameter is used once, or used in the same context. Lots of complex scenarios are possible when type inference gets involved.

Pro: Very terse and easy to adopt in the cases where it applies.
Pro: Since this refers to a property and not a type, we also have the ability to populate things like documentation or validation constraints.
Con: Complex cases arise here when you need to use a parameter in multiple contexts. This could degrade gracefully to any in the worse case.
Con: Can refer to types that are not part of the ARM-JSON spec. eg: union of string | int. There's no way to encode this in ARM-JSON today.

second concern is what about arrays? I feel that lots of use cases would be to use for loop on parameter to create resources with different values of same property.
I’d also leave object/array type and define what object type is being expected after or use decorator for it.
I came also here to address this.

In our company we're use a web application gateway module that has parameter arrays for each specific property (httpListeners, gatewayIPConfigurations, ...)
So I'm not quite sure how you could discover what type is inside the array. But definitely consider this one in your discussions

In the Bicep community call there was an ask for example of how customers currently use object. Our main reason to use object is to provide a simple interface to the module user for which properties they should supply, where we provide sane defaults for everything not supplied. If we use any of the proposed solutions we would push the burden of understanding the properties to supply to the module onto the consumer. We can no longer clearly define the interface for our module which negates a large benefit of modules.
For our use cases custom defined types or type inference based on property usage instead of parameter usage would suit but the proposed solutions would not.
With inference based on property usage I mean that one object auto param or variable can infer the distinct property types (recursively) based on the location where the property is used.
Example:
// vnetInput
// {
//   name string
//   range string
//   subnets array auto
      // subnets
     // {
     //   name string
     //   range string
     // }
// }
param vnetInput auto

resource vnet 'Microsoft.Network/virtualNetworks@2020-11-01' {
  name: name
  location: resourceGroup().location
  properties: {
    addressSpace: {
      addressPrefixes: [
        range
      ]
    }
    subnets: [for subnet in subnets: {
      name: subnet.name
      properties: {
        addressPrefix: subnet.range
      }
    }]
  }
}

I'm not sure if it's way out of scope, but could it be an answer to implement some kind of json-schema-like language as a part of the input validation for objects?
I'm thinking both that you can write it in a bicep way into your file, but also that you can defer to a external source for the actual validation (like $schema and $ref in json-schema) to 'save lines' in you definition.
Seeing as the actual output of bicep is json, and json already have pretty extensive tooling for definitions, then why not build upon that?
examples:
@schema({
  properties:{
    one:{
      type:string
      enum:[
        'value1'
        'value2'
      ]
    }
    two:{
      type:integer
      minimum:1
      maximum:2
    }
  }
  required:[
    'one'
  ]

})
param first object = {
  one:'value1'
  two:9
}

you could have it be able to reference exisiting external schemas:
//defer to schema.json 'inputname' property
@schema('./schema.json#/inputname')
param otherfileJsonSchema object

//defer to json schema file, on the internet
@schema('http://../schema.json')
param remotefileSchema object

//defer to schema.bicep 'inputname' parameter validation.
@schema('./schema.bicep#/inputname')
param otherfileBicepSchema object

or possibly for simplicity provide it with a example of input you want, and a schema+example would be generated:
@example({
    name:'someitem'
    range:'somerange'
    subnets:[
      {
        name:'somename'
        range:'somerange'
      }
    ]
})
param example object

as for resource input?
@resource('Microsoft.DocumentDB/databaseAccounts@2021-10-15')
param resource object

i don't know if this is something you have already thought about and dismissed in another discussion, but if its not, please concider it.

@WithHolm - this ask seems similar/the same as what is described in #3723 and is related to this issue as well. Generally speaking, we need to continue to expand ways of getting value out of the type system. As you mention, the foundation is already there to do all sorts of type validation, but we need to provide a way of describing your own.

Adding some notes from #6624
I like the simplicity of referring to the types using the symbolic name.  I like typeof rather than 'type' or 'of type' and I like referencing the symbolic names of defined resources.  This should allow types to propagate up from modules.
In addition to the coding experience, where ever possible the bicep build command should implement what it can in the ARM template - description, validations, enums and ranges are what I would expect.
param storageAcctName string
param azRegion string

param skuName string typeof objStorAcct.skuName.name = 'Standard_LRS'
param accessTier string typeof objStorAcct.properties.accessTier = 'Hot'
param kind string typeof objStorAcct.kind = 'StorageV2'

resource objStorAcct 'Microsoft.Storage/storageAccounts@2021-01-01' = {
   name: storageAcctName
   location: azRegion
   properties: {
      accessTier:  accessTier
   }
   sku: {
      name: skuName
   }
   kind: kind
}

I'd like to throw in the possibility of using a type decorator, which might be easier to parse, although it makes the code larger
@type(objStorAcct.skuName.name)
param skuName string = 'Standard_LRS'
@type(objStorAcct.properties.accessTier )
param accessTier string = 'Hot'
@type(objStorAcct.kind )
param kind string = 'StorageV2'

Vars and objects are key to this - build-up of objects is getting pretty common in Bicep files, although its going to get complicated:
param storageAcctName string
param azRegion string

param skuName string typeof objStorAcct.skuName.name = 'Standard_LRS'
param accessTier string typeof objStorAcct.properties.accessTier = 'Hot'
param kind string typeof objStorAcct.kind = 'StorageV2'

//var with nested types.  The accessTier property would have to validate the accessTier param
var props typeof objStorAcct.properties = {
     accessTier:  accessTier
}

resource objStorAcct 'Microsoft.Storage/storageAccounts@2021-01-01' = {
   name: storageAcctName
   location: azRegion
   properties: props
   sku: {
      name: skuName
   }
   kind: kind
}

I think global types would be helpful:
param azRegion string typeof azure.region

Finally, I think auto types might be hard to understand and @schema decorator kind of defeats the purpose.

I like the idea of auto but I think the string typeof xxx is far from being useful. What is wrong with extending the types instead. The annotation for allowed values can be replaced with the concept of typing and support of enumerations.
The only case would be the use of typeof which can be a build-in function to resolve the type from string or literal specification of the type:
typeof(objStorAcct.properties)
or
typeof('Microsoft.Storage/storageAccounts@2021-01-01#xxx')

Hi, is there any progress or decisions/design regarding this topic. It would be a gamechanger to have this implemented.

We are definitely going to implement something to enable strong typing -- both completely custom and with the ability to reference subschemas from resource types (or possibly elsewhere) through a typeof kind of functionality.
Don't have an ETA as we are still not closed on design, but we recognize that this is a serious limitation in the consumption of modules -- particularly from an external registry!

Just adding some suggestions from #7499
Describe the solution you'd like
I can see multiple ways to do this.

Use the same way as the resource, probably a JSON or Bicep schema file, although even for resources the description or types are often different between ARM/Bicep intellisense and the MS Docs.
Provide some way to nest parameters with decorators for objects. Here with a new key parameter type:

@allowed([
  @allowed([
    2
    4
    8
    16
    32
    64
  ])
  @description('Optional. The scale up/out capacity, representing server\'s compute units.')
  key capacity int = 4

  @allowed([
    'Gen5'
  ])
  @description('Optional. The family of hardware.')
  key skuFamily string = 'Gen5'
])
@description('Optional. The SKU (pricing tier) of the server.')
param sku object = {}

Provide the ability to construct complex parameter objects instead of directly nesting them:

@allowed([
  2
  4
  8
  16
  32
  64
])
@description('Optional. The scale up/out capacity, representing server\'s compute units.')
key/subparam capacity int = 4

@allowed([
  'Gen5'
])
@description('Optional. The family of hardware.')
key/subparam skuFamily string = 'Gen5'

@allowed([
  capacity
  skuFamily
])
@description('Optional. The SKU (pricing tier) of the server.')
param sku object = {}

Suggestion: for object params, the schema for it could be a json schema kept in a separate file. Then with the machinery loadJsonContent it could be embedded and used at runtime to validate the input.

On top of the constraining inputs, let's not forget intellisense on properties of outputs.
In one example we have a "names" module that helps us follow best practices for resource naming and in particular, a standard set of abbreviations for resources. It basically takes parameters like the base name or "workload", the environment, and region (some of which can be calculated from resource group or subscription names) ...

The simple version of this was a module with an output for each resource type, so you could use: names.outputs.servicebus and you'd get completion for all the outputs -- but there's a limit on the number of outputs! Now we need to return an object with dozens of properties, and we need intellisense (and linting) to work on the properties of that object so that people can pick the right one, rather than needing to type it correctly from memory (even "serviceBus" vs "servicebus" trips people up).

Adding DataCollectionRules  as a resource that typically uses a JSON value.  The MS recommended template looks like this:
param dcrName string  //this should start with MSVMI-
param azRegion string = resourceGroup().location

@allowed([ 'Linux', 'Windows' ])
param kind string

param dataSources object = {}
param destinations object = {}
param dataFlows array = []

resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2021-09-01-preview' = {
  name: dcrName
  location: azRegion
  kind: kind
  properties: {
    dataSources: dataSources
    destinations: destinations
    dataFlows: dataFlows
  }
}

with the dataSources, destinations and dataFlows passed in using JSON objects:
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "<IP_ADDRESS>",
    "parameters": {
        "ruleName": {
            "value": "dcr-windowsvmbasic"
        },
        "location": {
            "value": "northcentralus"
        },
        "dataSources": {
            "value": {
                "windowsEventLogs": [
                    {
                        "streams": [
                            "Microsoft-Event"
                        ],
                        "scheduledTransferPeriod": "PT5M",
                        "xPathQueries": [
                            "Application!*[System[(Level=1 or Level=2)]]",
                            "Security!*[System[(band(Keywords,4503599627370496))]]",
                            "System!*[System[(Level=1 or Level=2)]]"
                        ],
                        "name": "eventLogsDataSource"
                    }
                ],
                "performanceCounters": [
                    {
                        "counterSpecifiers": [
                            "\\Processor Information(_Total)\\% Processor Time",
                            "\\Processor Information(_Total)\\% Privileged Time",
                            "\\Processor Information(_Total)\\% User Time",
                            "\\Processor Information(_Total)\\Processor Frequency",
                            "\\System\\Processes",
                            "\\Process(_Total)\\Thread Count",
                            "\\Process(_Total)\\Handle Count",
                            "\\System\\System Up Time",
                            "\\System\\Context Switches/sec",
                            "\\System\\Processor Queue Length",
                            "\\Memory\\% Committed Bytes In Use",
                            "\\Memory\\Available Bytes",
                            "\\Memory\\Committed Bytes",
                            "\\Memory\\Cache Bytes",
                            "\\Memory\\Pool Paged Bytes",
                            "\\Memory\\Pool Nonpaged Bytes",
                            "\\Memory\\Pages/sec",
                            "\\Memory\\Page Faults/sec",
                            "\\Process(_Total)\\Working Set",
                            "\\Process(_Total)\\Working Set - Private",
                            "\\LogicalDisk(_Total)\\% Disk Time",
                            "\\LogicalDisk(_Total)\\% Disk Read Time",
                            "\\LogicalDisk(_Total)\\% Disk Write Time",
                            "\\LogicalDisk(_Total)\\% Idle Time",
                            "\\LogicalDisk(_Total)\\Disk Bytes/sec",
                            "\\LogicalDisk(_Total)\\Disk Read Bytes/sec",
                            "\\LogicalDisk(_Total)\\Disk Write Bytes/sec",
                            "\\LogicalDisk(_Total)\\Disk Transfers/sec",
                            "\\LogicalDisk(_Total)\\Disk Reads/sec",
                            "\\LogicalDisk(_Total)\\Disk Writes/sec",
                            "\\LogicalDisk(_Total)\\Avg. Disk sec/Transfer",
                            "\\LogicalDisk(_Total)\\Avg. Disk sec/Read",
                            "\\LogicalDisk(_Total)\\Avg. Disk sec/Write",
                            "\\LogicalDisk(_Total)\\Avg. Disk Queue Length",
                            "\\LogicalDisk(_Total)\\Avg. Disk Read Queue Length",
                            "\\LogicalDisk(_Total)\\Avg. Disk Write Queue Length",
                            "\\LogicalDisk(_Total)\\% Free Space",
                            "\\LogicalDisk(_Total)\\Free Megabytes",
                            "\\Network Interface(*)\\Bytes Total/sec",
                            "\\Network Interface(*)\\Bytes Sent/sec",
                            "\\Network Interface(*)\\Bytes Received/sec",
                            "\\Network Interface(*)\\Packets/sec",
                            "\\Network Interface(*)\\Packets Sent/sec",
                            "\\Network Interface(*)\\Packets Received/sec",
                            "\\Network Interface(*)\\Packets Outbound Errors",
                            "\\Network Interface(*)\\Packets Received Errors"
                        ],
                        "samplingFrequencyInSeconds": 10,
                        "streams": [
                            "Microsoft-InsightsMetrics"
                        ],
                        "scheduledTransferPeriod": "PT1M",
                        "name": "perfCounterDataSource10"
                    }
                ]
            }
        },
        "dataFlows": {
            "value": [
                {
                    "streams": [
                        "Microsoft-InsightsMetrics"
                    ],
                    "destinations": [
                        "azureMonitorMetrics-default"
                    ]
                },
                {
                    "streams": [
                        "Microsoft-Event"
                    ],
                    "destinations": [
                        "la--1715273091"
                    ]
                }
            ]
        },
        "destinations": {
            "value": {
                "azureMonitorMetrics": {
                    "name": "azureMonitorMetrics-default"
                },
                "logAnalytics": [
                    {
                        "name": "la--1715273091",
                        "workspaceId": "b6fbfb28-25f0-437d-bbc6-e0868ce3c2e3",
                        "workspaceResourceId": "/subscriptions/98c0ce08-01d3-4027-a248-6d62fff92884/resourceGroups/rg-p-zusnc1-azuremonitor/providers/Microsoft.OperationalInsights/workspaces/log-p-zusnc1-azuremonitor"
                    }
                ]
            }
        },
        "tagsArray": {
            "value": {}
        },
        "platformType": {
            "value": "Windows"
        }
    }
}

My issue on this was linked here and closed, but I'd like to resurface my own take on how this should be approached. I would like to see strong-typing introduced more like how interfaces are used in TypeScript - namely, they describe the shape of an object and members can have attributes attached, but they otherwise have no impact on runtime; they are relevant only during development via Intellisense and build-time via the compiler, but then the compiler only maintains the status quo at runtime: validations on weakly-typed objects and arrays.
I would ideally like to see the typing of objects not strictly tied to any given resource because 1) the resources are versioned and may change, potentially necessitating significant changes for a version bump and 2) not all objects passed throughout are strictly bound to a single resource. Especially when coupled with lambda functions to map out specific properties, I'd like to have greater flexibility into what's being passed into a module so I might bind the one object to more than just a parent module.
I just wrote up a fuller example in my other issue, but I'd like to be able to do something like the following. First, describe an interface for an authorization rule in an Event Hub using the validation attributes to limit downstream usage:
interface authorizationRule = {
  name: string
  @minlength(1)
  @minlength(3)
  @allowed([
    'Listen'
    'Send'
    'Manage'
  ])
  rights: array
}

Note that nothing about this references an Event Hub - I know it's used with the Event Hub only because it's embodied in that module and accepted as an input parameter (below), but it's thus not dependent on any resource versions nor do I lose out on any of the inline validation already available in Bicep.
In my module, I'd simply specify this as the type of the array I expect and could just as easily decorate the array parameter with a @minlength(1) as desired.
@param EventHubName string
@param AuthorizationRules authorizationRule[] = [] //Indicates that members of the array should be typed with the interface - alternatively specified as array<authorizationRule>

//...

module EventHubAuthorizationRule './authorization-rule.bicep' = [for (authorizationRules, i) in AuthorizationRules: {
  name: 'eh-${EventHubName}-AuthRule-${authorizationRule.name}'
  params: {
    Name: authorizationRule.name
    Rights: AuthorizationRule.rights
  }
}]

And because, like TypeScript, the interface wouldn't persist to runtime, I'd expect the Bicep compiler to output exactly the weakly typed output it does today:
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "<IP_ADDRESS>",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "<IP_ADDRESS>676",
      "templateHash": "1281152232305116607"
    }
  },
  "parameters": {
    "AuthorizationRules": {
      "type": "array"
    },
    "EventHubName": {
      "type": "string",
      "metadata": {
        "description": "The name of the Event Hub resource"
      }
    },
//...

To reference the interface between files, I'd propose it simply be visible like any param out of a Bicep module. From
//interfaces.bicep

interface authorizationRule = {
  name: string
  @minlength(1)
  @minlength(3)
  @allowed([
    'Listen'
    'Send'
    'Manage'
  ])
  rights: array
}

//main.bicep
var authRule as authorizationRule from './interfaces.bicep' = {
  name: 'Management'
  rights: [
    'Manage'
  ]
}

module EventHubAuthRules './eventhub-authrules.bicep' = {
  name: 'eh-authrules'
  params: {
    EventHubName: eventHubName
    AuthorizationRules: [
      authRule
    ]
  }
}

But my biggest issue with #4158 is that it limits complex values only to a single resource type. My proposal is broader - if you want to limit to a single resource, go for it, but if you want to describe a complex type that's broad enough to describe every resource of a whole resource group, go for it (especially if made up of many smaller, more easily maintained interfaces).

I'm @WhitWaldo, I want to be able to specify my own structure for the objects I pass as params, independent of an actual resource type, while enforcing the types at least compile time.
I also want to pass whole resources by ref, but that's not related to its typings but rather for this like rbac Authorization and such.

When declaring parameters I want to declare strongly typed objects or arrays so that in the consuming bicep file, intellisense can actually be useful and suggest the shape of the object that needs to be passed - even auto create it.

I'd expect Required to be supported on object properties so that intellisense could suggest creating the object, or object array to pass as the parameter based on initialising the required properties - similar to how it does for a resources properties.

On today's community call, we will be demoing a preview of custom types support that technically has already shipped (though we haven't published anything about it yet). We will also be sharing a gist with some basic documentation to get you started with the feature.
@adrianhall already wrote up a nice post about it:
https://adrianhall.github.io/azure/2022/11/28/bicep-type-checking/
cc @jeskew as FYI

On today's community call, we will be demoing a preview of custom types support that technically has already shipped (though we haven't published anything about it yet). We will also be sharing a gist with some basic documentation to get you started with the feature.
@adrianhall already wrote up a nice post about it:
https://adrianhall.github.io/azure/2022/11/28/bicep-type-checking/
cc @jeskew as FYI

This looks excellent, I am super excited!

@jeskew - one more thing to consider while improving strong typing - would be nice to have ability to define a dictionary type, where key is string and the value is a custom type. then we can use items to iterate over the object and use key for a name symbol in constructed output and value to be used by resources.

@miqm Dictionary types are planned for an upcoming release (likely 0.14). There’s a syntax proposal in https://github.com/Azure/bicep/issues/9228

I'm going through phases of both liking and not liking the catch-all syntax on the heels of my other issue regarding mappings. After thinking about it a bit, I like the syntax as a whole, but I'd propose that the catch-all key should be able to be provided as either a string or a type alias that derives from a string just so I can apply restrictions on the key name itself. This would be of particular use when the keys are utilized in a dictionary-style via items() in downstream operations.
Attributes in Bicep are applied to the value of the parameter and not the key of it. Given this example:
type dictionary = {
  @maxLength(4)
  [string]: string
}

I would expect that I can define a custom type called 'dictionary', that I can assign arbitrary keyed values to this type and that the string value of these items cannot exceed 4 characters.
However, I'd like to see the "index signature" restriction being loosened to say that it must either be a string or a type that derives from a string. For example, I'd like to be able to apply validation restrictions on the key in the dictionary object as follows:
@maxLength(10)
type locationName = string

type dictionary = {
  @minLength(1)
  [locationName]: string
}

In this example, I'd expect then that the keys applied to my 'dictionary' type must not themselves exceed 10 characters and that anything implementing my 'dictionary' must provide at least one keyed value to the object.

I am trying to define a type in one module bicep file, that references a type declared in another module bicep file. VS isn't recognising it:
/modules/foo.bicep
type Foo = {
  name: string
}

/recipes/bar.bicep
type Bar = {
  first: Foo
  another: string
}

In the above example the Bar type does not compile as the type Foo cannot be found. Do i need to import this type somehow?

@dazinator Types have to be defined in the template where they're used, but work on type sharing is tracked in https://github.com/Azure/bicep/issues/9311

@jeskew
After enabling custom types and getting everything to compile, when actually deploying to azure, I get these new errors:
{'code': 'MultipleErrorsOccurred', 'message': 'Multiple error occurred: BadRequest,BadRequest,BadRequest. Please see details.'}

Inner Errors:
{'code': 'InvalidTemplate', 'target': '/subscriptions/******/resourceGroups/my-test/providers/Microsoft.Resources/deployments/vnet', 'message': "Deployment template validation failed: 'The resource 'Microsoft.Network/networkSecurityGroups/nsg-uniun-dev-we-01' at line '1' and column '5055' is defined multiple times in a template. Please see https://aka.ms/arm-template/#resources for usage details.'.", 'additionalInfo': [{'type': 'TemplateViolation', 'info': {'lineNumber': 1, 'linePosition': 5055, 'path': 'properties.template.resources.newNsg'}}]}

Inner Errors:
{'code': 'InvalidTemplate', 'target': '/subscriptions/******/resourceGroups/my-test/providers/Microsoft.Resources/deployments/appGatewayPublicIp', 'message': "Deployment template validation failed: 'The resource 'Microsoft.Network/publicIPAddresses/pip-uniun-agw-dev-we-01' at line '1' and column '1542' is defined multiple times in a template. Please see https://aka.ms/arm-template/#resources for usage details.'.", 'additionalInfo': [{'type': 'TemplateViolation', 'info': {'lineNumber': 1, 'linePosition': 1542, 'path': 'properties.template.resources.existingPublicIp'}}]}

Inner Errors:
{'code': 'InvalidTemplate', 'target': '/subscriptions/******/resourceGroups/my-test/providers/Microsoft.Resources/deployments/loadBalancerPublicIp', 'message': "Deployment template validation failed: 'The resource 'Microsoft.Network/publicIPAddresses/pip-uniun-lbe-dev-we-01' at line '1' and column '1546' is defined multiple times in a template. Please see https://aka.ms/arm-template/#resources for usage details.'.", 'additionalInfo': [{'type': 'TemplateViolation', 'info': {'lineNumber': 1, 'linePosition': 1546, 'path': 'properties.template.resources.existingPublicIp'}}]}

Undoing my refactoring of custom types resolves this issue again.
I can't see any duplicate definition of the resources mentioned..

Is there an update on this? The user-defined types are very nice for params, but sometimes I'd be happy to leverage the existing resource type definitions.
In my current scenario, I want to define an application gateway and I want to define all its complex sub-properties (frontend, backend pools, http probes etc.) in different modules - everything in the same module extremely difficult to read.
It seems sub-optimal to redefine custom types for those properties (even if/when we're able to import/export them): for example, the bicep compiler knows that frontendIPConfigurations is of type ApplicationGatewayFrontendIPConfiguration[], so the information is already there. If the type is tied to the API version of the resource, that would also help to see/raise alerts on API version model changes.
param gatewayName string

@minLength(1)
param frontendHttpListeners array

@minLength(1)
param frontendIPConfigurations array
// ideally
// param frontendIPConfigurations ApplicationGatewayFrontendIPConfiguration[]

resource appGateway 'Microsoft.Network/applicationGateways@2022-09-01' = {
    name: gatewayName
    location: resourceGroup().location
    properties: {

      frontendIPConfigurations: frontendIPConfigurations
      httpListeners: frontendHttpListeners
      // ... etc
  }
}

@Marchelune That might be more of a separate issue than one strictly having to do with custom types. Correct me if I'm wrong, but I seem to recall that Application Gateway is much like a Virtual Network in that all the child resources must be present when the parent is created (necessitating that single large module) since an update to the parent from multiple files (modules) isn't feasible. While importing/exporting custom types to shuffle data around the requisite modules would be helpful, I'm pretty sure that effort would be blocked more by the "cannot update some types, must do full deployments at once" issue.

@WhitWaldo you are pretty bang on, AGW is not put together in a modular way, so if you need to update one part of it, you need to do a full "replace" (ie PUT complete object) to do any updates.
However it doesn't take away from his request to be able to use the types inside agw in order to determine parameters.
this could even be achieved via a type definition where you reference the correct resource even:
//nothing here is actual, just a example of how you could reference a 'built in' type
type AgwFrontend ref('Microsoft.Network/applicationGateways@2022-11-01',ApplicationGatewayFrontendIPConfiguration)
param frontend_clean AgwFrontend[]

param frontend_dirty {
        id: 'string'
        name: 'string'
        properties: {
          privateIPAddress: 'string'
          privateIPAllocationMethod: 'string'
          privateLinkConfiguration: {
            id: 'string'
          }
          publicIPAddress: {
            id: 'string'
          }
          subnet: {
            id: 'string'
          }
        }
      }[]

@WhitWaldo I agree that it is not really custom types, given that those type already exist.
But it fits the "strong typing parameters and output" IMO because I "only" need strongly typed objects rather than "any" objects. In fact I am already using that solution:
//======
// application-gateway.bicep

param gatewayName string

@minLength(1)
param frontendHttpListeners array

@minLength(1)
param frontendIPConfigurations array

resource appGateway 'Microsoft.Network/applicationGateways@2022-09-01' = {
    name: gatewayName
    location: resourceGroup().location
    properties: {

      frontendIPConfigurations: frontendIPConfigurations
      httpListeners: frontendHttpListeners
      // ... etc
  }
}

//======
// application-gateway.main.bicep

module routingRules './helpers/gateway-frontend-routing-rules-config.bicep' = {
  name: '${gatewayName}-routing-rules'
  params: {
    foo: 'whatever params'
    // etc...
  }
}

module gatewayModule './application-gateway.bicep' = {
  name: 'app-gateway-${deploymentSuffix}'
  params: {
    gatewayName: gatewayName
    requestRoutingRules: routingRules.outputs.appGatewayRoutingRules
    rewriteRuleSets: routingRules.outputs.appGatewayRewriteRuleSets
    // etc....
  }
}

//======
// helpers/gateway-frontend-routing-rules-config.bicep

param foo string

output appGatewayRewriteRuleSets array = []
output appGatewayRoutingRules array = [for i in range(1,10): {
  id: 'rule-${foo}-${i}'
  // etc, you can have whatever complexity here
}]

The "helper" module has no actual resources, it's really just a function that returns arrays/objects. You are right that it is deployed all at once - but that would still be the case here, whilst allowing cleaner code.
At least on my side, with 6/7 listener/rule/backend combinations that must be parametrised per environment, the app gateway configuration via bicep becomes a barely maintainable 600 lines file. Extracting everything to a helpers makes it much clearer, but without strong types in those helpers, I am at risk of typos/missing properties (a risk that already exists when using intermediary var in single file, but made prominent when the config is over several files).

When I spin up an App Gateway today, I'm mostly using custom types as a stand-in so I can get validation that I'm at least typing the names of the parameter values correctly, verify on the caller side that I'm passing the right stuff in where I intend and get strong typing for use in lambda and other functions.
For example, we lack an import/export at the moment, so I've got these types at the start of my AppGw module:
type ipAddressProperties = {
  @description('The zones in which the IP address should be deployed')
  ipZones: string[]
  @description('Whether or not the IP address can be static (true) or not (false)')
  isStaticIp: bool
  @description('Whether the IP address is a standard (true) or basic (false) SKU')
  isStandardIpSku: bool
  @description('Whether or not the IP address is public (true) or not (false)')
  isPublicIp: bool
}

@description('Used to identify the details of a specific certificate')
type certificateMapping = {
  @description('The subject value of the certificate')
  subject: string
  @description('The name of the secret in the Key Vault')
  secretName: string
  @description('The thumbprint of the certificate')
  thumbprint: string
  @description('The identifier of the Key Vault instance')
  keyVault: keyVaultIdentifier
}

@description('Used to identify a Key Vault and where it\'s deployed to')
type keyVaultIdentifier = {
  @description('The name of the Key Vault')
  name: string
  @description('The ID of the subscription the Key Vault is associated with')
  subscriptionId: string
  @description('The name of the resource group the Key Vault is associated with')
  resourceGroupName: string
}

type uaiDetail = {
  @description('The name of the user-assigned identity that will execute the deployment script')
  name: string
  @description('The ID of the subscription that the user-assigned identity is associated with that will execute the deployment script')
  subscriptionId: string
  @description('The name of the resource group that the user-assigned identity is associated with that will execute the deployment script')
  resourceGroupName: string
}

And those are then followed by a wall of parameters that input those and still other parameters (including, note the use of the keyVaultIdentifier type in the certificateMapping so I can identify the key vault I'm pulling each from in case they differ:
@description('The IP address aspects to assign to the Application Gateway')
param IpAddressProperties ipAddressProperties

@description('The various subjects for which certificates should be secured for both Front Door, Application Gateway and for deployment to the SF cluster')
param CertificateSubjects certificateMapping[]

@description('The details of the user-assigned identity that will execute the deployment script')
param UaiDetails uaiDetail

And later on, continued use of the values out of these custom types:
//Maintains a reference to the certificate in the Key Vault for this subject
resource Secret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' existing = [for (c, i) in CertificateSubjects: {
  name: '${c.keyVault.name}/${c.secretName}'
  scope: resourceGroup(c.keyVault.subscriptionId, c.keyVault.resourceGroupName)
}]

var endpointSecretName = [for (endpoint, i) in AllEndpoints: {
  secretName: first(map(filter(CertificateSubjects, cert => startsWith(cert.secretName, '*.') ? endsWith(endpoint.targetDomain, replace(cert.secretName, '*.', '')) : endpoint == cert.subject), c => c.secretName))
}]

Then, later on in the block of AppGw resource logic, I can trivially reference:
//...
    sslCertificates: [for (c, i) in CertificateSubjects: {
      name: c.secretName
      properties: {
         keyVaultSecretId: Secret[i].id
      }
    }]

...among all the other types.
I agree - it'd be great if I could use a parent/child syntax of some sort to at least artificially move up and down the resource dependency tree (asked about this in a similar vein for load balancer a while ago in #724 ) with some way of having Bicep work out how to chain it all together for a single PUT request at deployment, but simplify the creation of these elaborate resources, but again.. I think that's a separate issue to this one.

@Marchelune It occurs to me based on re-reading your last comment that you might not be aware of the preview custom types feature that I use above: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/user-defined-data-types
There's no import/export support yet (back and forth about it in #9311 ) but based on the last community call, that'll likely be showing up soon.

@WhitWaldo thanks for your extensive feedback! I think we are very much aligned on that, in fact I did try user-defined types, but faced 2 issues:

I'd need to define those types in both the app gateway module and each of the helpers, which could still lead to out-of-date models with the app gateway API version
user-defined types are still experimental and trigger the use of symbolic names in the generated ARM code, which breaks parts of my deployment (I reported it here https://github.com/Azure/bicep/issues/10679)

That said, I do agree that user-defined types are a good intermediary solution, although I'd still personally prefer, as suggested in this proposal from @rynowak, something like
param frontendIPConfigurations type 'Microsoft.Network/applicationGateways@2022-09-01#ApplicationGatewayFrontendIPConfiguration'[]

@marchelune -- I believe we will get to what you are looking for with the planned typeof operator discussed in #9229


Merging data from several nodes in Wunderground case

I have been running with the new feature of having Wunderground gateway collect data and feed it into my influxdb. It works, but I am realizing that its slightly sub-optimal.
As you can see on the funny image, this gateway has exploded into many different nodes with seperate sensor-nodes, making it impossible to make rules and draw graphs without cleaning the data.
I suspect its a feature from wunderground trying to find the most stable sensor in the closest location from the coordinates used in the api. Actually if I insist on a specific weather-station it claims it to be down. So, in this way there is always weatherdata to look at, despite coming from different stations.

@njbuch you want to merge all the stations into one node?

Yes, that would make sense to have the catch-all nodename as an option on the config window...

@njbuch added fix for this request. Kindly have a look at SNAPSHOT version.

Took the SNAPSHOT from 3 days ago, and tested with the new improvements, I see this:
2017-11-13 21:35:47,624 ERROR [Thread-428] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Wind,host=mycontroller,location=skur value=From the WSW at 1.2 MPH Gusting to 3.1 MPH<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-13 21:35:47,669 ERROR [Thread-430] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Barometer,host=mycontroller,location=skur value=partlycloudy<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-13 21:35:47,671 ERROR [Thread-431] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Barometer,host=mycontroller,location=skur value=Partly Cloudy<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-13 21:50:49,778 ERROR [Thread-883] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Wind,host=mycontroller,location=skur value=From the SW at 1.9 MPH Gusting to 3.1 MPH<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-13 21:50:49,834 ERROR [Thread-885] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Barometer,host=mycontroller,location=skur value=partlycloudy<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-13 21:50:49,836 ERROR [Thread-886] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:114] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"unable to parse 'wu_node_Barometer,host=mycontroller,location=skur value=Partly Cloudy<PHONE_NUMBER>000000000': invalid boolean"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086

@njbuch looks like in influxdb, value has been defined as boolean. Did you touch influxdb manually?

No, not at all.
On Tue, Nov 14, 2017 at 4:17 AM, Jeeva Kandasamy<EMAIL_ADDRESS>wrote:

@njbuch https://github.com/njbuch looks like in influxdb, value has
been defined as boolean. Did you touch influxdb manually?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mycontroller-org/mycontroller/issues/421#issuecomment-344133882,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGUwAdhZ9t7a-5TY4nbnAACn31PzNHrgks5s2QZbgaJpZM4QYq-U
.

I am still having problems with the wind, in sending to the external server there was no luck. Its only the direction when I refer to the Wind in Influxdb. I have made there seperate sensors vars transfer to external server:

@njbuch issue found on influxdb write query section for string data. fixed it. Now I can see all the data.
> show series
key
---
wu_node_barometer_forecast,mc=local
wu_node_barometer_pressure,mc=local
wu_node_barometer_variable_1,mc=local
wu_node_humidity_humidity,mc=local
wu_node_temperature_temperature,mc=local
wu_node_wind_direction,mc=local
wu_node_wind_text,mc=local
wu_node_wind_wind,mc=local
> select * from wu_node_barometer_forecast
name: wu_node_barometer_forecast
time                mc    value
----                --    -----
1510723505000000000 local mostlycloudy
> select * from wu_node_barometer_pressure
name: wu_node_barometer_pressure
time                mc    value
----                --    -----
1510723505000000000 local 1014
> select * from wu_node_barometer_variable_1
name: wu_node_barometer_variable_1
time                mc    value
----                --    -----
1510723505000000000 local Mostly Cloudy
> select * from wu_node_humidity_humidity
name: wu_node_humidity_humidity
time                mc    value
----                --    -----
1510723505000000000 local 66
> select * from wu_node_temperature_temperature
name: wu_node_temperature_temperature
time                mc    value
----                --    -----
1510723505000000000 local 26.2
1510723806000000000 local 26.4
> select * from wu_node_wind_direction
name: wu_node_wind_direction
time                mc    value
----                --    -----
1510723505000000000 local 293
1510723806000000000 local 0
> select * from wu_node_wind_text
name: wu_node_wind_text
time                mc    value
----                --    -----
1510723505000000000 local From the WNW at 7.0 MPH Gusting to 9.0 MPH
1510723806000000000 local From the North at 4.0 MPH Gusting to 7.0 MPH
> select * from wu_node_wind_wind
name: wu_node_wind_wind
time                mc    value
----                --    -----
1510723505000000000 local 11.3
1510723806000000000 local 6.4
>

To send all the data, you can use a gateway. No need to use separate entry.
fix is available on SNAPSHOT version.
Where have you hosted influxdb? In RasbperryPI? how is the performance?

Hi again, its not working for me.
The serverlog:
2017-11-16 20:43:05,420 ERROR [Thread-5345] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Barometer\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://<myip>:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://<myip>:8086 2017-11-16 20:43:05,587 ERROR [Thread-5342] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Wind\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://<IP_ADDRESS>:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://<myip>:8086
Looking at influxdb:
`> show series
key
wu_node_Barometer,host=mycontroller,location=skur
wu_node_Humidity,host=mycontroller,location=skur
wu_node_Temperature,host=mycontroller,location=skur
wu_node_Wind,host=mycontroller,location=skur
`
It does seem to be a type problem... not sure if it is a configuration thing in influx??

Regarding performance. I am running mycontroller and influxdb on a decent linux-server, so performance is not an issue for me.
Sidenote: It could be nice to have an update script to get the SNAPSHOT version installed easily in a docker container.

@njbuch Can you try with a fresh database in influxdb? or drop existing tables?

I tried to drop the series and the measurements.... did not work.
Found this: https://github.com/influxdata/influxdb/issues/8649
Which indicates a problem with influxdb that seems to keep some typing and data despite series being dropped. I have now dropped the whole database, lets see what happens.

Nope, it did not work after dropping the whole database. Errors are still:
2017-11-19 07:21:01,114 ERROR [Thread-110740] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Wind\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-19 07:21:01,225 ERROR [Thread-110742] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Barometer\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-19 07:21:01,281 ERROR [Thread-110743] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Barometer\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086 2017-11-19 07:21:01,459 ERROR [Thread-110740] [org.mycontroller.standalone.exernalserver.model.ExternalServerInfluxdb:115] Failed to send data to remote server! Status Code:400, Is Success:false, Error Message:-, Raw Entity:{"error":"partial write: field type conflict: input field \"value\" on measurement \"wu_node_Wind\" is type string, already exists as type float dropped=1"}\n, Entity:[null], Remote server:ExternalServerInfluxdb(url=http://MYIP:8086, trustHostType=ANY, database=mydb, username=admin, tags=host=mycontroller,location=skur), http://MYIP:8086
I am guessing it happens in the first registration of data, when the measurement is placed in an autogenerated schema.

@njbuch what is the version of InfluxDB are you using?

The most recent. Will check exactly when I am back.

I was using 1.3.5 and now I tried with 1.3.7 which has the same problem....
I have found this page in the documentation: https://docs.influxdata.com/influxdb/v1.3/write_protocols/line_protocol_reference/#example-2-write-the-field-value-1-as-a-float-to-influxdb which might give you some hints as to how the java formats the line.

@njbuch let me have a look thank you!

Any news on this?

@njbuch I am unable to reproduce this issue locally.
I am using docker influxdb version 1.4.1
[root@jkandasa tmp]# cd /tmp/
[root@jkandasa tmp]# docker run -p 8086:8086 -v $PWD:/var/lib/influxdb influxdb

Ok, I have upgraded to 1.4.1 and started on a fresh install. Still exactly the same issue. Can you point me to more detailed debugging options?

@njbuch can you post your external server page screenshot?

@njbuch can you send this page?

Also about page, to know the version details. I would like to replicate locally. to reproduce this issue.
Give me Wunderground gateway page detail too. api ley not required. I can create one.

@njbuch Thank you for the screenshots. I identified the problem.
On the influxDB configuration, Measurement  field should be unique to the field which has a different type of value field.
When we use Measurement field as sensorName, leads problem for other string fields. Also, I request to force Alphabetical key case to Lowercase. Which will make easier when we do a query on influxdb.
Kindly update Influxdb settings as shown here and let me know how it goes.

> show measurements
name: measurements
name
----
wu_node_barometer_forecast
wu_node_barometer_pressure
wu_node_barometer_variable_1
wu_node_humidity_humidity
wu_node_temperature_temperature
wu_node_wind_direction
wu_node_wind_text
wu_node_wind_wind

It works! Thanks for the effort buddy! Not sure what to do without the sensorname though...

@njbuch You can use sensor name, still variableType is required.  In this case, I do not see any difference between sensorName and sensorId


clean-up of aggregation features

Please confirm that this PR has done the following:

[x] Tests Added
[x] Documentation Added
[x] Description in RELEASE_NOTES.md Added

Description of PR
This PR implements a number of clean-ups following PRs #305 and #312:

the return type of aggregate() and aggregate_region() is changed to an IamDataFrame instance (per suggestion by @jkikstra), previously a timeseries-dataframe
the return type of check_aggregate() and check_aggregate_region() is changed to a pd.DataFrame with both expected and actual value (previously only the expected value)
adds an equals() function (originally used to make tests easier)
adds an pyam.testing.assert_frames_equal() function (to make tests easier)
the tutorial for aggregation, downscaling and consistency checking is reworked (now includes description of regional components, weighted average, setting variables as list, downscaling)
the aggregation tests are completely refactored (because of the changed return types, it was easier to completely rewrite rather than figure out how to salvage)

@francescolovat, @fabiosferra, @vruijven, @volker-krey, maybe you have a minute to read through the completely reworked tutorial aggregating_downscaling_consistency - in particular whether the behaviour of the new downscale_region() function is a good starting point for upcoming work?

ping @gidden @znicholls @jkikstra @francescolovat @fabiosferra
I'd like to make a new release (including the new tutorial) in time for the openmod meeting [1], so I'd appreciate your comments by the end of this week. If there are no objections, I'll merge on Jan 13.
[1] https://wiki.openmod-initiative.org/wiki/Open_Energy_Modelling_Workshop_-_Berlin_2020

thanks @gidden for the useful comments!

added a new testing-module with a function pyam.testing.assert_frame_equal()
refactored the function names in the aggregate module
added a longer docstring (copying pandas.DataFrame.equals)

Minor version will be bumped in the new release

Thanks @jkikstra for your review and comments!

re the keyword components (which is used in both aggregate() or aggregate_region()): I agree it's not great except that every alternative I can think of is worse... Also, these functions have been implemented in this way for at least a year, so any change should be a real improvement.

re check_internal_consistency(): the main reason why I didn't change that is laziness to think through what a good return type would be and write enough tests to make sure that there are no weird results in any corner cases. Maybe tackle that in a subsequent PR (cc @znicholls)?

Follow-up to @jkikstra's comment on return type:
One option could be something like
> pd.concat(tutorial_df.check_internal_consistency().values(), sort=False)

Hi @danielhuppmann Thanks for implementing our suggestions.
in my eyes your suggestion for the output of check_internal_consistency() is a definite improvement, so I would suggest implementing that and then I have no further suggested improvements

@danielhuppmann I share @znicholls opinion on the test refactor here (also not blocking but with a strong preference).
I may not grok the gritty details, but is it possible to write a wrapper function in the tests that would translate the newly returned IamDataFrame back to a pd.DataFrame in the test's expected format and then apply that in each test a la pdt.assert_frame_equals(pd_to_pyam_test(obs), exp)?

re the comments by @znicholls and @gidden:

sorry that this is such a big refactoring - I divided it into a suite of PRs to make it manageable, but it's still huge...

API of check_internal_consistency(): I added a kwarg components so that the behaviour can be controlled and passed through to check_aggregate_region(). However, as to whether we should use True or False as default, detecting components that exist only at the region-level is one use case out of many (it's relevant mainly in the emissions domain). And it would interfere with using (weighted) average or other methods which are equally valid and relevant, so I changed that to False with a  purpose.

about the tests: I agree that just dropping tests is a really bad idea, but the suite of tests were written so efficiently (a dozen different tests with hardly any documentation about their intent, all feeding into one master testing function with a bunch of if-else-logic to do the comparison), it just wasn't possible for me to disentangle this.
@gidden, your approach sounds smart but if you look at what was actually tested (length of indices, etc.) this won't work. The new test suite with assert_frame_equal() is far more explicit.
@znicholls, if you can spell out for each of the removed tests what their intent was, I'll be happy to re-introduce them in a next step.

Hi @danielhuppmann,
I've been through the pyam_first_steps.ipynb tutorial again.
It really looks nice. You've implemented all our suggestions in a very detailed way. I was really enjoyable to follow the steps in the notebook.
I have no further comments to add to it (I'll keep in mind some formatting features you included, e.g. the blue boxes, to potentially include them also in the MESSAGEix tutorials).
I regards of the previous conversation about the refactoring of tests, I have little experience with them. I'm still getting familiar with pandas.util.testing methods. Matt's suggestions of a wrapper function looks promising, however it is also a matter of the time left before the openmod meeting.

sorry that this is such a big refactoring - I divided it into a suite of PRs to make it manageable, but it's still huge...

All good there's always a nasty conflict between time pressure and moving slowly enough that everyone can keep up (you're striking a good balance)

2. API of check_internal_consistency()

All makes sense thanks for spelling it out.

3. about the tests

fair, they were definitely not as clear as they should have been (I have since learnt that whilst this 'efficiency' approach looks good, it's actually a terrible idea as it's not explicit enough about what is going on). Let's park this in  for now

Ok all, will merge this now that everything is approved/reviewed/marked for future issues. Thanks @danielhuppmann for the huge effort here and all reviewers!


Dismiss button

I need a 'dismiss' button in a notification. Use case goes as follows: The app is closed or in the background. A scheduled notification is shown. It says: 'Do you want to open the app?  YES   NO'. The YES button is of buttonType: ActionButtonType.Default and pressing it will activate the app. The NO button shall close the notification and remove it from the screen's notification bar without activating the app. Is this already possible with the current implementation?

My app behaves different from what seems to be expected from the documentation. Doc says:

DisabledAction [with] App Terminated (Killed) [=>] keeps the app terminated

Instead, for me, it activates the app, both with autoCancel being true or false.
It also says:

KeepOnTop: after user taps, the notification bar is not closed

It works for autoCancel: false,  but closes the notification bar with autoCancel: true.
So KeepOnTop with autoCancel: true gives the desired 'dismiss' button, but I wonder if this is the intended behavior. Maybe I'm just misunderstanding the documentation?

My app behaves different from what seems to be expected from the documentation. Doc says:

DisabledAction [with] App Terminated (Killed) [=>] keeps the app terminated

Instead, for me, it activates the app, both with autoCancel being true or false.
It also says:

KeepOnTop: after user taps, the notification bar is not closed

It works for autoCancel: false,  but closes the notification bar with autoCancel: true.
So KeepOnTop with autoCancel: true gives the desired 'dismiss' button, but I wonder if this is the intended behavior. Maybe I'm just misunderstanding the documentation?

But you are not trying to do something that the notification already does since the begining? Because if the user want to not open the app, he just swipe out the notification. There is no need to implement this functionality.
And if he want to go to your app, he just tap the notification. Or, you can just add a button "go to X", like a shortcut to go to a specific place inside your app.

But you are not trying to do something that the notification already does since the begining? Because if the user want to not open the app, he just swipe out the notification. There is no need to implement this functionality.
And if he want to go to your app, he just tap the notification. Or, you can just add a button "go to X", like a shortcut to go to a specific place inside your app.

swipe out the notification or do nothing swiping the tray

Well, that's a good point. Many apps have a dismiss button but one could indeed omit it.
Anyways: What I described in my second post: Is that how you want it to behave, is the text from the documentation outdated, is this a bug, or am I missing something?

swipe out the notification or do nothing swiping the tray

Well, that's a good point. Many apps have a dismiss button but one could indeed omit it.
Anyways: What I described in my second post: Is that how you want it to behave, is the text from the documentation outdated, is this a bug, or am I missing something?

Yes, its a bug. I could not find yet how to click on button, close the tray and do not call the app while is terminated. Or the app does not call the app and do not close the tray or it call the app and close the tray.

Yes, its a bug. I could not find yet how to click on button, close the tray and do not call the app while is terminated. Or the app does not call the app and do not close the tray or it call the app and close the tray.

Okay, thank you for confirming that it's a bug. And also a big 'thank you' for all your great work here in general!

Okay, thank you for confirming that it's a bug. And also a big 'thank you' for all your great work here in general!

@myrkgard  I need this feature to reject a calling notification.
for now, I use this snippet code:
AwesomeNotifications().actionStream.listen((receivedNotification) {
      if (receivedNotification.buttonKeyPressed == 'Reject') {
        SystemNavigator.pop();
        return null;
      }
    });

Try to use the disableAction button type

Just like android reminder notification. we need action button type that trigger event and close notification and do not open app.

use autoCancel, this will clear notification on tap of a button
NotificationActionButton(
     // ...
     autoCancel: true
)

Hi! Sorry for taking so long to respond to your issue on GitHub. I was focused on releasing the new 0.7.0 version of awesome_notifications and awesome_notifications_fcm and i didn't had time enough to do both. But now I can answer all your questions.
So now i'm asking you to recreate this topic using the new issue template. There's a lot of missing informations that i need to understand your problem, and all the instructions are already in the new issue template. Also, remember to check beforehand if your issue was posted by another user.
So I will automatically close all previous issues so far.
Sorry for the inconvenience and i will be waiting for your new issue request.
Thank you so much for your support!


GH1665: Implemented NUnit3 params and multiple results

This is the PR to fix #1665
This is a breaking change.
The Results, ResultFormat and ResultTransform are now combined in the NUnit3Result class and creation looks like:
settings.Results = new[]
{
    new NUnit3Result { FileName = "NewTestResult.xml", Format = "nunit2", Transform = "nunit2.xslt" },
    new NUnit3Result { FileName = "NewTestResult2.xml", Format = "nunit3" }
};

The parameters can be added like:
settings.Params = new Dictionary<string, string>
{
    ["one"] = "1",
    ["two"] = "2",
    ["three"] = "3"
};

@Roemer,
Thanks for having already signed the Contribution License Agreement. Your agreement has not been validated yet. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

CodeFactor shows duplication error on a part I haven't modified (in NUnitRunner and NUnit3Runner).

@Roemer thanks for your PR. I've assigned the related issue to the v0.22.0 milestone which will include other breaking changes.
@devlead do you know why CodeFactor complains on duplicates now? Code in question have not been touched.

Thanks @ChrisMaddock for reviewing this! 👍

@Roemer your changes have been merged, thanks for your contribution 👍

Awesome, thanks :+1:


Cryo/Bluespace syringe buff

About the PR
buff to cryo and bluespace syringes.
Why / Balance
have you ever seen a cryo syringe used ever? they are literally pointless right now, this buff makes it so they are slightly better than regular syringes for capacity and gives them a faster injection speed. they are now a complete upgrade to normal syringes, considering they are behind a T2 civ tech i think this is acceptable.
improved syringes will help a lot when med is overwhelmed and it still requires science to do their job, research civ and make the syringes for med.
i may have overdone the injection speed, if you feel i have then let me know and i will change it.
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl:

buffed cryo syringe to 20u capacity
buffed cryo syringe to inject faster
buffed bluespace syringe to inject faster

and all changes inside of pre existing scripts/yaml should include a comment, in this format # GoobStation - reason for this code addition/change
else it looks good

does everyone agree with the specific stat change? im not sure about upping the volume so much, maybe 20u.

no I mean literally change the code please

remember, i am literally stupid and have no idea what im doing.

nvm, i figured it out.

fifth times the charm!


Amplify build fails due to a layer that was removed already

Before opening, please confirm:

[X] I have checked to see if my question is addressed in the FAQ.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

App Id
dr30qdghmfhdu
Region
us-east-1
Amplify Console feature
Backend builds
Describe the bug
I was having issues with pushing the stack after the removal of a lambda layer, the issue is described here: https://github.com/aws-amplify/amplify-cli/issues/7824
After walk through the issue with the help of the Amplify team, I managed to push the stack and update it successfully from the CLI
The staging and dev environments can be updated via the CLI, but fails to update via the Amplify build pipeline
The build log:

2021-09-02T16:55:23.425Z [WARNING]: - Initializing your environment: staging
2021-09-02T16:55:30.112Z [WARNING]: ✔ Initialized provider successfully.
2021-09-02T16:55:35.281Z [WARNING]: ✖ An error occurred when pushing the resources to the cloud
2021-09-02T16:55:35.289Z [WARNING]: ✖ There was an error initializing your environment.
2021-09-02T16:55:35.332Z [INFO]: Error: Lambda layer ThumbnailsGenerator is missing a state file. Try running "amplify pull --restore". If the issue persists, recreating the layer is the best option. Ensure your layer content is backed up!
    at getLegacyLayerState (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/provider-utils/awscloudformation/utils/layerMigrationUtils.ts:159:9)
    at migrateLegacyLayer (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/provider-utils/awscloudformation/utils/layerMigrationUtils.ts:50:23)
    at AmplifyToolkit.invokePluginMethod [as _invokePluginMethod] (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/src/extensions/amplify-helpers/invoke-plugin-method.ts:29:10)
    at runMicrotasks ()
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Object.legacyLayerMigration (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/lambdaLayerInvocations.ts:21:3)
    at Object.run (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/push-resources.ts:148:7)
2021-09-02T16:55:35.362Z [ERROR]: !!! Build failed
2021-09-02T16:55:35.362Z [ERROR]: !!! Non-Zero Exit Code detected
2021-09-02T16:55:35.363Z [INFO]: # Starting environment caching...
2021-09-02T16:55:35.363Z [INFO]: # Uploading environment cache artifact...
2021-09-02T16:55:35.445Z [INFO]: # Environment caching completed

I have tried doing amplify pull --restore, nothing happens
I also have tried removing the layer with amplify function remove and then I get the error:

Cannot read property 'filter' of undefined
TypeError: Cannot read property 'filter' of undefined
at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts:248:33
at Array.filter ()
at Object.getLambdaFunctionsDependentOnLayerFromMeta (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts:245:45)
at Object.removeWalkthrough (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/removeLayerWalkthrough.ts:25:43)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/commands/function/remove.ts:30:29)
at Object.executeAmplifyCommand (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-function/src/index.ts:251:3)
at executePluginModuleCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:177:3)
at Object.executeCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/

execution-manager.ts:29:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/index.ts:200:5)

Expected behavior
The backend build step should work, and finish the deployment
Reproduction steps
Update the master branch
Push the changes
The build is triggered
The build fails on the backend build stage
Build Settings
version: 0.1
backend:
  phases:
    build:
      commands:
        - amazon-linux-extras install python3.8
        - ln -fs /usr/bin/python3.8 /usr/bin/python3
        - pip3.8 install pipenv
        - amplifyPush --simple

Additional information
No response

Is there a way to locally publish my changes without having to go through the console pipeline? So I can still have my changes deployed even with the console pipeline broken?
I have tried using amplify publish --invalidateCloudFront
but it doesn't seem to work, is there something I am missing?

Anyone?

It looks like recent builds have been succeeding and there were some updates in the other thread.  If you need to temporarily skip the backend build in the future, one option is to set the environment variable PROCESS_SKIP_BACKEND to true for that branch.  Reopen if there are still outstanding issues.


provisional-inline-widget Branch

I can't find the #provisional-inline-widget branch on github, has this been merged into ProseMirror master?

Oh, right, I deleted that, since 0.10.0 has the relevant feature. Attached patch updates package.json


How to add number format in specific column data

Hello, i have price data in my datatables.
When i try to use FORMAT (xxx, 2) in my Query i get an issue in ordering that column.
Any other way to format the number?
I use Datatables as Service.
Thank you.

Okay it solved now. I miss something.
I add this in ajax() function :
->editColumn('pagu', function ($data) {
                return number_format($data->pagu, 0);
            })


Makefile changes

For those of us that have customized makefiles, it's really painful every time the makefile is updated to have to go back through and apply the customizations after a git pull. Recently this has been happening several times a week. It's not fun.

Do you use git stash?

I am not sure what you want us to do here. Certainly not, that makefiles are not changed anymore. However, what I have been doing is using git pull --rebase. That will keep your local commits on top of the upstream changes.
Closing, as this is clearly not a Vim issue.

What concerns Vim makefiles, I don't custdomize them, and in shadow directories I even replace the copies of src/Makefile by links to it. My configure arguments are set by means of environment variables.
Best regards,
Tony.


Search: Use endpoint for hostTemplate

Rather than searchServiceName and searchDnsSuffix, the x-ms-parameterized-host can be updated to a single endpoint param:
 "x-ms-parameterized-host": {
    "hostTemplate": "{Endpoint}",
    "useSchemePrefix": false,
    "parameters": [
      {
        "$ref": "#/parameters/Endpoint"
      }
    ]
  },

This is based on https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/stable/2019-05-06/searchservice.json

We will also need to make a similar change in searchindex.json, and ensure this gets propagated to the new 2019-05-06-preview spec when we create it.

Since all Track 2 SDKs should target version 2019-05-06-Preview, I'm going to fix this issue there and freeze the Track 2 2019-05-06 spec as-is.


MAJOR case inconsistency between text and figures

There is a case inconsistency between images and text in section 4.1. Folder structure of the CSIP and section 4.2. Implementing the structure, as well as text and examples of sections 5.3.3 Use of the METS descriptive metadata section (element dmdSec), 5.3.4. Use of the METS administrative metadata section (element amdSec), 5.3.5. Use of the METS file section (element fileSec) and 5.3.6. Use of the METS structural map (<structMap>).
In some places lowercase is used to mention metadata, data, schemas, documentation and/or representations folder's, in others upper case (i.e. Schemas, Documentation, etc.), in others both:
<mets:fileGrp ID="uuid-5811D494-6045-4741-924C-A1CFA340C279" USE="Representations/ingest/data" ... >
    <mets:file ID="uuid-EE23344D-4F64-40C1-8E18-75839EF661FG"... >
      <mets:FLocat LOCTYPE="URL" type="simple" href="representations/ingest/METS.xml">
      </mets:FLocat>
    </mets:file>
  </mets:fileGrp>

Vocabulary file https://earkcsip.dilcis.eu/schema/CSIPVocabularyFileGrpAndStructMapDivisionLabel.xml uses first letter upper case logic.
And this matter is of MAJOR importance because 1) makes it harder to be version 2.0.0 compliant when compliance with version 1.0.0 already exists; 2) it's confusing for someone reading the specification for implementing it and sees all these case inconsistencies.
And also we wonder why this has changed from previous major version as keeping everything in lower case makes things consistent between folders and METS attributes (both LABEL & USE).

Actually every single example (full or excerpt) and image must be checked as more inconsistencies do exists besides the ones I've mentioned in the issue description.

We'll look into it and make updates, it wont be released right away though.

@karinbredenberg thank you...for us the release is not important as we only need to have a clear understanding about the changes needed on the software side.

Ok, @hsilva-keep you also need to keep in mind that the @USE and @LABEL is part of a vocabulary so it is not a easy change. Making sure in a first round that the vocabulary is used in all the places. (LABEL for representations uses the full path to the representation.)

@karinbredenberg As I commented before in this issue, I just wonder why this has changed from previous major version as keeping everything in lower case makes things consistent between folders and METS attributes (both LABEL & USE).

There were a decision of having capital starting in the vocabularies.

@karinbredenberg was that decision made on an A2 meeting or Github issue? Because lots of things have changed in the last weeks before the release (end of May), which do impact in the amount of changes required in the tools for them to be CSIP 2.0 compliant.
Nevertheless, we will wait for the text update.

We have now made sure that the examples of the attributes USE and LABEL are consistent and start with upper case and that all folder and file paths given in hrefs are in lowercase and that the folders in the images use lower case.
There are things to have in mind, the USE and LABEL don’t give a catalogue/folder name or file path unless it’s a specific representation being described to give the description of which representation it is. I can agree that these names that have been chosen aren’t the best and we should find better names describing the content that are housed in these filegroups and structMap div’s than ones using the file path. And perhaps the USE and LABEL for the different representations should just have the value “Representations” and not specify which one of the representations it is.
All in all, we need to revisit this and come up with better terms to put into the USE and LABEL attributes and at the same time we also need to give better explanations in the guide line that will be developed to what the USE and LABEL attributes are for (describing what’s housed in the file group and structMap div) All this is for the next version though.

Case inconsistencies in tables and diagrams should be fixed in v2.0.1 @hsilva-keep

Ready to close

Agree, ready to close.


Rectified spell errors

Rectified spell errors

@v-samarth : Thanks for your contribution! The author(s) have been notified to review your proposed change. @nikotha


Appstudio update test-component-pac-tozv

Pipelines as Code configuration proposal
To start the PipelineRun, add a new comment with content /ok-to-test
For more detailed information about running a PipelineRun, please refer to Pipelines as Code documentation Running the PipelineRun
To customize the proposed PipelineRuns after merge, please refer to Build Pipeline customization

Pipelines as Code CI/test-component-pac-tozv-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
18 seconds
clone-repository

✅ Succeeded
35 seconds
build-container

✅ Succeeded
22 seconds
deprecated-base-image-check

✅ Succeeded
24 seconds
inspect-image

✅ Succeeded
16 seconds
clair-scan

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
13 seconds
sbom-json-check

✅ Succeeded
11 seconds
label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
8 seconds
show-summary

Pipelines as Code CI/test-component-pac-tozv-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
19 seconds
clone-repository

✅ Succeeded
35 seconds
build-container

✅ Succeeded
1 minute
clamav-scan

✅ Succeeded
16 seconds
deprecated-base-image-check

✅ Succeeded
20 seconds
inspect-image

✅ Succeeded
12 seconds
clair-scan

✅ Succeeded
11 seconds
sbom-json-check

✅ Succeeded
13 seconds
label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
7 seconds
show-summary


ML course C1-W2 1st Programming Assignment

Hey there…@greyhatguy007  In ML C1 W2 1St Programming assignment I keep getting below errors. Can you help me out!
Please note that I am not too familiar with Jupyter notebook.
Here’s Images of

Did you complete and run the cell containing the compute_gradient function ?
# UNQ_C2
# GRADED FUNCTION: compute_gradient
def compute_gradient(x, y, w, b):
    """
    Computes the gradient for linear regression
    Args:
      x (ndarray): Shape (m,) Input to the model (Population of cities)
      y (ndarray): Shape (m,) Label (Actual profits for the cities)
      w, b (scalar): Parameters of the model
    Returns
      dj_dw (scalar): The gradient of the cost w.r.t. the parameters w
      dj_db (scalar): The gradient of the cost w.r.t. the parameter b
     """

    # Number of training examples
    m = x.shape[0]

    # You need to return the following variables correctly
    dj_dw = 0
    dj_db = 0

    ### START CODE HERE ###
    for i in range(m):
        f_wb = w*x[i]+b
        dj_db += f_wb - y[i]
        dj_dw += (f_wb - y[i])*x[i]
    dj_dw /= m
    dj_db /= m

    ### END CODE HERE ###

    return dj_dw, dj_db

Try running this in the cell above the implementation of compute_gradient and make sure you've run all the cells above it correctly.

I tried ur suggestion and still getting error.
It says “syntax eroor:invalid syntax”
In the  exercise 1 where it says public tests,what does that mean?are we
supposed to enter test case there?
On Fri, 19 Aug 2022 at 8:14 PM, Ritvik @.***> wrote:

Did you complete and run the cell containing the compute_gradient
function ?
UNQ_C2
GRADED FUNCTION: compute_gradient
def compute_gradient(x, y, w, b):
"""
Computes the gradient for linear regression
Args:
x (ndarray): Shape (m,) Input to the model (Population of cities)
y (ndarray): Shape (m,) Label (Actual profits for the cities)
w, b (scalar): Parameters of the model
Returns
dj_dw (scalar): The gradient of the cost w.r.t. the parameters w
dj_db (scalar): The gradient of the cost w.r.t. the parameter b
"""
# Number of training examples
m = x.shape[0]

# You need to return the following variables correctly
dj_dw = 0
dj_db = 0

### START CODE HERE ###
for i in range(m):
    f_wb = w*x[i]+b
    dj_db += f_wb - y[i]
    dj_dw += (f_wb - y[i])*x[i]
dj_dw /= m
dj_db /= m

### END CODE HERE ###

return dj_dw, dj_db

Try running this in the cell above the implementation of
compute_gradient and make sure you've run all the cells above it
correctly.
—
Reply to this email directly, view it on GitHub
https://github.com/greyhatguy007/Machine-Learning-Specialization-Coursera/issues/3#issuecomment-1220763357,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2PZ27MQ7YTJLOM43DZ7CGDVZ6MULANCNFSM57AYQFGA
.
You are receiving this because you authored the thread.Message ID:
<greyhatguy007/Machine-Learning-Specialization-Coursera/issues/3/1220763357
@github.com>

Test cases are determined by the notebook itself. As you told that you're getting syntax errors, I'm assuming that you know how to solve them. If not, try doing a refresher in python and continue this course.

Thank you for the clarification.
On Fri, 19 Aug 2022 at 11:47 PM, Ritvik @.***> wrote:

Test cases are determined by the notebook itself. As you told that you're
getting syntax errors, I'm assuming that you know how to solve them. If
not, try doing a refresher in python and continue this course.
—
Reply to this email directly, view it on GitHub
https://github.com/greyhatguy007/Machine-Learning-Specialization-Coursera/issues/3#issuecomment-1220970717,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2PZ27PWZ5XHZ2DNYPDBE3LVZ7FS7ANCNFSM57AYQFGA
.
You are receiving this because you authored the thread.Message ID:
<greyhatguy007/Machine-Learning-Specialization-Coursera/issues/3/1220970717
@github.com>

Anytime ! 😄💪


migrate to container-based infrastructure

Makes sense. You should also consider using the travis-ci cache to cache the composer dependencies.
See: http://docs.travis-ci.com/user/caching/
Example: https://github.com/shopware/shopware/blob/5.1/.travis.yml#L14

@bcremer we already tried cache. Interesting fact is if you cache vendor dir the tests will take longer than without cache :).


Preprint Journal Club Starter Kit

Thanks for submitting your project to be featured in the Open Leadership Zone at MozFest 2017 :sparkles:
This is open to any project in Mozilla Open Leaders round 4 -- even if you're not coming to MozFest. This process ensures that you're following open practices and will help set you up for a sustained contributor community afterwards. If you have any questions, feel free to reach out to @acabunoc or ask questions in our chat room.
Open Project Checklist :clipboard:
Your project must complete the following to be a featured on Mozilla Pulse and the Open Leadership Zone at MozFest 2017. As you complete each exercise, check off the box and comment with a link to your completed resource. This template repository is here to help you if you get stuck!

[x] Complete Open Leadership 101
[x] Provide a GitHub repository for work and discussion on your project in a comment

new to GitHub?  Here's a step-by-step guide on using the #mozfest template

[x] Create file: README.md in your project repository. This file should help newcomers understand what your project is, why it's important, and kinds of help you're looking for.
[x] Create file: LICENSE to give your project an open license, allowing for sharing and remixing.
[x] Create file: CONTRIBUTING.md so others know how they can contribute. If you'd like, you can remix this template
[x] Create file: CODE_OF_CONDUCT.md. This can be the Mozilla Community Participation Guidelines or a code of conduct of your choice
[x] Turn on your Issue Tracker and create issues to describe each task that you need help with and how a contributor can get started on that task. If you're participating in Hacktoberfest, Create a label called hacktoberfest and apply it to your issues.

Ready to be featured :tada:

[x] Fill out this form to submit your project to Mozilla Pulse. Add the tag open leadership zone.
[x] Leave a comment on this issue with the text This is ready for the Open Leadership Zone. @acabunoc will review this issue. If accepted, your project will be approved on Mozilla Pulse and featured in the Open Leadership Zone.

If you get stuck at any point, feel free to look at the project templates or reach out to your mentor or @acabunoc. We're here to help you through this process.

Our Github repo is here

This is ready for the Open Leadership Zone

This is great @SamanthaHindle thanks 😄
I see you broke down some tasks in your contributing.md -- it might be helpful to make issues for each of those tasks (so people can discuss & let you know they're working on it).
Your project is now listed in the open leadership zone! Pulse: https://www.mozillapulse.org/entry/476 🎉


feature : Integrate RocketMQ into Seata

[ ] I have registered the PR changes.

Ⅰ. Describe what this PR did
集成rocketmq到seata。
关于总体解决思路：
本次集成的能力重点在全局事务的一阶段，我们会提供一个SeataMQProducer，在里面将以下两个方法自动加入到全局事务中。其他方法会调用到原生父类进行，不会加入到全局事务。
关于具体实现方案及时序：
程序流程：

rocketmq按发送半消息（和rocketmq原有逻辑一样）
执行本地事务executeLocalTransaction/executeLocalTransactionBranch（和rocketmq原有逻辑一样）
如果state=成功，强行改回unknown，等待seata-TC调用rm决定二阶段。否则都将直接rollback这个消息（因为seata目前无法支持rm一阶段回查能力）

细节讨论（包括summer-code-pr原有的讨论）
https://zhuanlan.zhihu.com/p/679591405?
Overall Solution Approach:
This integration focuses on the initial phase of global transactions. We will provide a SeataMQProducer, which will automatically incorporate the following two methods into the global transaction. Other methods will invoke the native superclass and will not be included in the global transaction.
Specific Implementation Plan and Sequence:
Use the existing InterfaceParser proxy mechanism to proxy the TransactionMQProducer type bean and override sendMessageInTransaction.
Program flow:

RocketMQ sends a half message (as per RocketMQ's original logic).
Execute the local transaction executeLocalTransaction/executeLocalTransactionBranch (as per RocketMQ's original logic).
If state=success, forcibly change it back to unknown, and wait for Seata-TC to call RM to decide on the second phase. Otherwise, directly roll back this message (as Seata currently lacks the capability to support RM phase one re-check).

Detailed Discussion (Including Discussions in the Original Summer-Code-PR):
https://zhuanlan.zhihu.com/p/679591405?
Ⅱ. Does this pull request fix one issue?

fixes https://github.com/apache/incubator-seata/issues/3752
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

老pr https://github.com/apache/incubator-seata/pull/3974

Codecov Report
Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (74785d2) 51.95% compared to head (f1f37c0) 51.19%.
Report is 6 commits behind head on 2.x.

Additional details and impacted files

@@             Coverage Diff              @@
##                2.x    #6230      +/-   ##
============================================
- Coverage     51.95%   51.19%   -0.77%
+ Complexity     5171     5114      -57
============================================
  Files           918      922       +4
  Lines         32039    32169     +130
  Branches       3866     3874       +8
============================================
- Hits          16647    16470     -177
- Misses        13768    14109     +341
+ Partials       1624     1590      -34

Files
Coverage Δ

...ava/org/apache/seata/common/ConfigurationKeys.java
0.00% <ø> (ø)

...in/java/org/apache/seata/common/DefaultValues.java
0.00% <ø> (ø)

...che/seata/common/exception/JsonParseException.java
100.00% <ø> (ø)

.../org/apache/seata/common/metadata/ClusterRole.java
100.00% <ø> (ø)

...ava/org/apache/seata/common/metadata/Metadata.java
100.00% <ø> (ø)

...apache/seata/common/metadata/MetadataResponse.java
80.00% <ø> (ø)

...in/java/org/apache/seata/common/metadata/Node.java
100.00% <ø> (ø)

...java/org/apache/seata/common/util/ConfigTools.java
100.00% <ø> (ø)

...ava/org/apache/seata/common/util/DurationUtil.java
83.33% <ø> (ø)

...a/org/apache/seata/common/util/HttpClientUtil.java
47.54% <ø> (ø)

... and 91 more

... and 166 files with indirect coverage changes


[Enhancement] Make sure each merge is a version bump

We want to make sure each merge include a version bump, so that the docker image and potential future releases can be correctly versioned.
We also want to make sure a new version bump will not affect an older version during runtime.
Thanks.

#14
https://github.com/opensearch-project/automation-app/pull/16


Bump tantivy to avoid the depending zstd-rs problem

Fixes GH-66
Looks like relaed to

https://github.com/quickwit-oss/tantivy/issues/2339
https://github.com/gyscos/zstd-rs/issues/268

I'm a beginner of rust, however this change makes it possible to run in my machine.
Could you review?

Thank you for merging!


document flytekit remote module

Signed-off-by: cosmicBboy<EMAIL_ADDRESS>TL;DR

Add documentation for remote module
change FlyteRemote.from_environment to from_config
add @property vars for FlyteRemote properties
improve doc strings
add a little more content to flytekit home page

Type

[ ] Bug Fix
[ ] Feature
[ ] Plugin
[X] Docs

Are all requirements met?

[X] Code completed
[ ] Smoke tested
[X] Unit tests added
[X] Code documentation added
[ ] Any pending items have an associated Issue

Tracking Issue
NA
Follow-up issue
NA
OR
https://github.com/lyft/flyte/issues/

oh shoot, sorry for being annoying, i didn't realize how many places flyte_id_kwargs were being used as a dict

no worries!


Found markup element with unexpected name - Mac

URL
https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/run
Operating system
macos
More information about your system
Ventura
Description
In the out of the box code example on the Mac, I keep getting "Found markup element with unexpected name". Example, for the component PageTitle there is a squiggle line under the component name on Home.razor in the Pages directory.
dotnet --info
SDK 8
No response

I managed to downgrade the C# Base language support extension to V2.22.5. You can do this by clicking the uninstall option and selecting the appropriate version on the C# extension. This corrects the issue. Although, I feel downgrading is not a solution.

Are you getting this in VS Code?
@webreidi @danroth27

@phil-allen-msft @leslierichardson95 Have we seen any other similar reports for Razor in VSCode on macOS?
@tkoolhoven2 Can you confirm which VS Code C# extension versions you tested with? I believe the latest version of the C# extension for VS Code is currently v2.34.12. Are you saying that when you try to use this latest version you ran into this issue?

Are you getting this in VS Code?
@webreidi @danroth27

Yes, I'm getting this in VS Code.


Cannot use the current package with a GO2 Air

Hello,
I would like to use the current package with the GO2 Air, but as far as I can see, when I am trying to retrieve the topics I get nothing.
I tried Wi-fi and also Ethernet.
I get this topics:
/clicked_point
/cmd_vel_joy
/go2_camera/color/image
/goal_pose
/initialpose
/joy
/parameter_events
/robot0/point_cloud2
/robot0/robot_description
/rosout
/scan
/tf
/tf_static

But ros2 topic echo does not retrieve any data of them.
Is there anything else I could try just to make this package work using go2 air?
Thank you big.
Júlia

This is working perfectly on my Go2 Air. The roboverse discord should be able to help you.

Hello Júlia, can you give me more details on your error? Is it via webrtc? what steps have you done?

I had similar behavior to this with my Go2 pro.  The issue I was having was that my Go2 app was still connected to the robot.  With the way the WebRTC authentication is implemented only one client can be connected as once, thus you need to disconnect the app before connecting with ROS.
My revised workflow is as follows:

Use the Unitree Go2 app diagnostics section to get the IP of the robot.
Disconnect the app from the Go2. On IOS this was as simple as swiping up to close the app from running in the background.  Just turning off the screen was not sufficient.
Run the launch file.
Check if you are properly connected by a) looking at the launch file log or b) ros2 topic list and seeing if /robot0/odom is in the list, if so you are good to go.

Hello all, thank you big for your help! I think that the issue here is that first I have to fulfill the steps of roboverse.  I did not have done any change in my robot yet, feel sorry about it I am quite new on this. I will try to fulfill the roboverse steps and if I have any doubt I will let you know for sure. Thank you!