Follow tailwindcss conventions

Just wondering if it's possible to follow tailwinds conventions?
https://tailwindcss.com/blog/automatic-class-sorting-with-prettier#how-classes-are-sorted

Yes, it is in my plans 😉

Here is a kitchensink of all classnames ordered by prettier-plugin-tailwindcss:
[
  "custom",
  "group",
  "peer",
  "border-y-1",
  "border-t-3",
  "border-b-px",
  "prose",
  "prose-slate",
  "aspect-w-16",
  "aspect-h-9",
  "line-clamp-2",
  "custom2",
  "container",
  "sr-only",
  "pointer-events-auto",
  "visible",
  "sticky",
  "inset-0",
  "inset-y-1",
  "inset-x-2",
  "top-3",
  "right-4",
  "bottom-5",
  "left-6",
  "isolate",
  "z-auto",
  "order-1",
  "col-span-1",
  "col-start-2",
  "col-end-3",
  "row-span-1",
  "row-start-2",
  "row-end-3",
  "float-left",
  "clear-both",
  "m-0",
  "my-px",
  "mx-1.5",
  "mt-1",
  "mr-2",
  "mb-3",
  "ml-4",
  "box-border",
  "block",
  "aspect-auto",
  "h-0",
  "max-h-fit",
  "min-h-full",
  "w-0",
  "min-w-full",
  "max-w-fit",
  "flex-none",
  "flex-shrink",
  "shrink",
  "flex-grow",
  "grow",
  "basis-0",
  "table-fixed",
  "border-collapse",
  "origin-bottom-right",
  "translate-x-px",
  "translate-y-2",
  "rotate-90",
  "skew-y-0",
  "skew-x-2",
  "scale-0",
  "scale-y-50",
  "scale-x-75",
  "transform",
  "transform-gpu",
  "transform-none",
  "animate-spin",
  "cursor-text",
  "touch-auto",
  "select-none",
  "resize-none",
  "snap-x",
  "snap-mandatory",
  "snap-center",
  "snap-always",
  "scroll-m-0",
  "scroll-my-px",
  "scroll-mx-1.5",
  "scroll-mt-1",
  "scroll-mr-2",
  "scroll-mb-3",
  "scroll-ml-4",
  "scroll-p-0",
  "scroll-py-px",
  "scroll-px-1.5",
  "scroll-pt-1",
  "scroll-pr-2",
  "scroll-pb-3",
  "scroll-pl-4",
  "list-outside",
  "list-decimal",
  "appearance-none",
  "columns-1",
  "break-before-avoid-page",
  "break-inside-avoid-column",
  "break-after-auto",
  "auto-cols-min",
  "grid-flow-col",
  "auto-rows-min",
  "grid-cols-1",
  "grid-rows-1",
  "flex-col",
  "flex-wrap",
  "place-content-between",
  "place-items-stretch",
  "content-between",
  "items-baseline",
  "justify-start",
  "justify-items-center",
  "gap-0",
  "gap-x-1",
  "gap-y-2",
  "space-y-0",
  "space-x-1",
  "space-y-reverse",
  "space-y-reverse",
  "divide-x-2",
  "divide-y-4",
  "divide-y-reverse",
  "divide-x-reverse",
  "divide-dashed",
  "divide-black",
  "place-self-end",
  "self-baseline",
  "justify-self-stretch",
  "overflow-hidden",
  "overflow-x-auto",
  "overflow-y-scroll",
  "overscroll-auto",
  "overscroll-y-none",
  "overscroll-x-contain",
  "scroll-smooth",
  "overflow-ellipsis",
  "text-ellipsis",
  "whitespace-nowrap",
  "break-words",
  "rounded",
  "rounded-t-xl",
  "rounded-r-2xl",
  "rounded-b-sm",
  "rounded-l-none",
  "rounded-tl-xl",
  "rounded-tr-2xl",
  "rounded-br-sm",
  "rounded-bl-none",
  "border-0",
  "border-x-2",
  "border-r-4",
  "border-l",
  "border-solid",
  "border-black",
  "border-y-transparent",
  "border-x-slate-50",
  "border-t-white",
  "border-r-transparent",
  "border-b-inherit",
  "border-l-current",
  "bg-current",
  "bg-opacity-50",
  "bg-none",
  "from-current",
  "via-black",
  "to-orange-500",
  "decoration-clone",
  "box-decoration-clone",
  "bg-auto",
  "bg-fixed",
  "bg-clip-padding",
  "bg-bottom",
  "bg-no-repeat",
  "bg-origin-border",
  "fill-white",
  "stroke-white",
  "stroke-2",
  "object-contain",
  "object-bottom",
  "p-0",
  "py-px",
  "px-1.5",
  "pt-1",
  "pr-2",
  "pb-3",
  "pl-4",
  "text-left",
  "indent-px",
  "align-top",
  "font-sans",
  "text-lg",
  "font-semibold",
  "uppercase",
  "italic",
  "ordinal",
  "leading-4",
  "tracking-normal",
  "text-current",
  "underline",
  "decoration-black",
  "decoration-double",
  "decoration-from-font",
  "underline-offset-auto",
  "subpixel-antialiased",
  "caret-black",
  "accent-black",
  "opacity-50",
  "bg-blend-lighten",
  "mix-blend-darken",
  "shadow-lg",
  "shadow-white",
  "outline-dotted",
  "outline-0",
  "outline-offset-1",
  "outline-current",
  "ring-1",
  "ring-inset",
  "ring-white",
  "ring-opacity-50",
  "ring-offset-2",
  "ring-offset-current",
  "blur",
  "brightness-50",
  "contrast-100",
  "drop-shadow-xl",
  "grayscale",
  "hue-rotate-90",
  "invert",
  "saturate-100",
  "sepia",
  "filter",
  "backdrop-blur-lg",
  "backdrop-brightness-110",
  "backdrop-contrast-125",
  "backdrop-grayscale",
  "backdrop-hue-rotate-90",
  "backdrop-invert",
  "backdrop-opacity-30",
  "backdrop-saturate-100",
  "backdrop-sepia",
  "transition-all",
  "delay-150",
  "duration-1000",
  "ease-linear",
  "will-change-scroll",
  "content-none",
  "[--scroll-offset:56px]"
]

That would be awesome, thanks for the package @francoismassart

I'm working on this when I can be guess who has been tested positive today ... 😞

Rest up!

👋  @emargareten , @xiCO2k , @jonnywilliamson , @SebasG22 , @SergeyRyzhkov , @dcmastenbroek , @shunkakinoki , @boompikachu, @charkour , @johnny353535
If you want to test it out and provide feedback, I just published<EMAIL_ADDRESS>which adds a new option officialSorting for the classnames-order rule.
By default, it is disabled but set it to true and the ordering process will use the same logic as prettier-plugin-tailwindcss.
It is disabled on purpose to avoid getting a complete reordering of all classnames after upgrading the plugin.
Interested ?

Start your test/existing project with a clean slate (stash your current changes if necessary)
npm i -D<EMAIL_ADDRESS>In your eslintrc file, set officialSorting of classnames-order rule to true
Save and restart VSCode (just to be sure)
Test it out, most of the classnames should be reordered following the same order as prettier-plugin-tailwindcss

Hmmm. Not sure what I'm doing wrong here. Using the beta above.
My eslintrc.js
module.exports = {
    "plugins": ["tailwindcss"],
    extends: [
        // add more generic rulesets here, such as:
        // 'eslint:recommended',
        'plugin:vue/vue3-recommended',
        'plugin:tailwindcss/recommended'
    ],
    rules: {
        // override/add rules settings here, such as:
        // 'vue/no-unused-vars': 'error'
        "vue/multiline-html-element-content-newline": ["error", {
            "allowEmptyLines": true
        }],
        "vue/max-attributes-per-line": ["error", {
            "singleline": 3,
        }],
        "tailwindcss/classnames-order": [2, {
            "officialSorting": true
        }],
    }
}

And the Error I keep getting
CssSyntaxError: Error while loading rule 'tailwindcss/no-custom-classname': <css input>:1:1: Unexpected }
Occurred while linting /Users/jonathan/Code/ca.co/.eslintrc.js

> 1 | }
    | ^

CssSyntaxError: Error while loading rule 'tailwindcss/no-custom-classname': <css input>:1:1: Unexpected }
Occurred while linting /Users/jonathan/Code/ca.co/.eslintrc.js
    at Input.error (/Users/jonathan/Code/ca.co/node_modules/postcss/lib/input.js:148:16)
    at Parser.unexpectedClose (/Users/jonathan/Code/ca.co/node_modules/postcss/lib/parser.js:528:22)
    at Parser.end (/Users/jonathan/Code/ca.co/node_modules/postcss/lib/parser.js:363:12)
    at Parser.parse (/Users/jonathan/Code/ca.co/node_modules/postcss/lib/parser.js:43:16)
    at Function.parse (/Users/jonathan/Code/ca.co/node_modules/postcss/lib/parse.js:11:12)
    at generateClassnamesListSync (/Users/jonathan/Code/ca.co/node_modules/eslint-plugin-tailwindcss/lib/util/cssFiles.js:29:28)
    at Object.create (/Users/jonathan/Code/ca.co/node_modules/eslint-plugin-tailwindcss/lib/rules/no-custom-classname.js:90:33)
    at createRuleListeners (/Users/jonathan/Code/ca.co/node_modules/eslint/lib/linter/linter.js:915:21)
    at /Users/jonathan/Code/ca.co/node_modules/eslint/lib/linter/linter.js:1097:31
    at Array.forEach (<anonymous>)
Process finished with exit code -1

And my package.json
    "devDependencies": {
        "@inertiajs/inertia": "^0.10.0",
        "@inertiajs/inertia-vue3": "^0.5.1",
        "@inertiajs/progress": "^0.2.6",
        "@tailwindcss/forms": "^0.4.0",
        "@tailwindcss/typography": "^0.5.0",
        "@vue/compiler-sfc": "^3.0.5",
        "axios": "^0.25",
        "eslint": "^8.8.0",
        "eslint-plugin-tailwindcss": "^3.5.0-beta.0",
        "eslint-plugin-vue": "^8.4.1",

@jonnywilliamson , it looks like the error you are getting is not related to this rule. For now, disable it by setting tailwindcss/no-custom-classname to « off ».
You can open another ticket for your issue but it requires providing a demo repository demonstrating the issue.

If I get a chance to make a new project and then set up the repo I'll do that. In the mean time I had to disable this plugin at the moment.
Here's showing what happens when I add the rule to turn off tailwindcss/no-custom-classname. It gets rid of the warning instantly.

BUT....now it takes nearly 15-20 secs to format the page on save.
When I remove the tailwind plugin everything goes back to almost instant.

This is with a brand new Laravel 9 project installed last night and really only the eslint and vue plugin installed to.

Hi,
I think I'm done with COVID for now 🎉  and I'll spend more time on this issue after fixing other minor issues.
I'll warn you when I need more testing, thank you for the feedback.

I made some changes that are available in the beta channel 3.5.0-beta-1 and tested it on a real project with 242 tsx files.
For my perf tests, there is indeed a huge bump when you enable the officialSorting (true).
3.5.0-beta-1: lint + "officialSorting": false => 2s
3.5.0-beta-1: lint + "officialSorting": true => 9.5s
3.5.0-beta-1: lint + fix + "officialSorting": true => 15s
3.4.4: lint => 2s

For now,  if you need to use the "officialSorting", I would recommend to disable tailwindcss/classnames-order and use the official plugin.
If you cannot use prettier and you are patient, you can enable "officialSorting".
I'll publish the code and any contribution is as always appreciated.
More details:
3.5.0-beta-1: lint + "officialSorting": false => 2s
Rule                                   | Time (ms) | Relative
:--------------------------------------|----------:|--------:
tailwindcss/classnames-order           |  1964.303 |    35.3%
tailwindcss/enforces-shorthand         |  1875.691 |    33.7%
tailwindcss/no-custom-classname        |   241.807 |     4.3%
react/no-deprecated                    |   195.853 |     3.5%
tailwindcss/no-contradicting-classname |   192.120 |     3.4%
@typescript-eslint/no-unused-vars      |   168.323 |     3.0%
react/no-direct-mutation-state         |   119.898 |     2.2%
react/no-string-refs                   |    94.352 |     1.7%
simple-import-sort/imports             |    89.936 |     1.6%
react/require-render-return            |    81.218 |     1.5%

3.5.0-beta-1: lint + "officialSorting": true => 9.5s
Rule                                   | Time (ms) | Relative
:--------------------------------------|----------:|--------:
tailwindcss/classnames-order           |  9682.650 |    71.7%
tailwindcss/enforces-shorthand         |  1954.327 |    14.5%
tailwindcss/no-custom-classname        |   309.564 |     2.3%
tailwindcss/no-contradicting-classname |   226.955 |     1.7%
react/no-deprecated                    |   205.950 |     1.5%
@typescript-eslint/no-unused-vars      |   162.062 |     1.2%
react/no-direct-mutation-state         |   126.041 |     0.9%
react/no-string-refs                   |   103.083 |     0.8%
simple-import-sort/imports             |    91.255 |     0.7%
react/require-render-return            |    88.584 |     0.7%

3.5.0-beta-1: lint + fix + "officialSorting": true => 15s
Rule                                   | Time (ms) | Relative
:--------------------------------------|----------:|--------:
tailwindcss/classnames-order           | 15027.564 |    73.9%
tailwindcss/enforces-shorthand         |  3002.938 |    14.8%
tailwindcss/no-custom-classname        |   455.000 |     2.2%
tailwindcss/no-contradicting-classname |   306.564 |     1.5%
react/no-deprecated                    |   243.501 |     1.2%
@typescript-eslint/no-unused-vars      |   171.053 |     0.8%
react/no-direct-mutation-state         |   148.076 |     0.7%
react/no-string-refs                   |   119.265 |     0.6%
react/require-render-return            |   104.248 |     0.5%
simple-import-sort/imports             |   100.538 |     0.5%

3.4.4: lint => 2s
Rule                                   | Time (ms) | Relative
:--------------------------------------|----------:|--------:
tailwindcss/classnames-order           |  2220.710 |    36.2%
tailwindcss/enforces-shorthand         |  1997.192 |    32.6%
tailwindcss/no-custom-classname        |   358.226 |     5.8%
tailwindcss/no-contradicting-classname |   219.180 |     3.6%
react/no-deprecated                    |   199.633 |     3.3%
@typescript-eslint/no-unused-vars      |   165.674 |     2.7%
react/no-direct-mutation-state         |   131.348 |     2.1%
react/no-string-refs                   |   100.552 |     1.6%
react/require-render-return            |    90.354 |     1.5%
simple-import-sort/imports             |    90.012 |     1.5%

I did attempt to "cache" the order value generated by calls to generateRules but perfs are even worse...

👋  @emargareten , @xiCO2k , @jonnywilliamson , @SebasG22 , @SergeyRyzhkov , @dcmastenbroek , @shunkakinoki , @boompikachu, @charkour , @johnny353535
Please take some time to test 3.5.0-beta.2 and provide feedback:
npm i -D<EMAIL_ADDRESS>🙏 Thanks

@francoismassart - I wanted to report feedback of an example inconsistency with the eslint plugin and the prettier "officialSorting" setting. I am using the latest<EMAIL_ADDRESS>and the following conflicting sorts are taking place:
Prettier Sort: "text-large flex h-9 w-9 items-center justify-center rounded-full border-4 border-solid border-blue-100 bg-deque-blue text-white"
eslint sort: "text-large bg-deque-blue flex h-9 w-9 items-center justify-center rounded-full border-4 border-solid border-blue-100 text-white"
The class "bg-deque-blue" is an extended theme color. Hopefully this helps.

@akornmeier please share the tailwind config used in your previous comment...
If I paste your classnames as is (with the default config) in the playground: https://play.tailwindcss.com/R6HyPRucty
I have 2 custom (unrecognized) classnames (no tooltip with generated css on hover):

text-large
bg-deque-blue

If the eslint-plugin-tailwindcss did not get the tailwind config file, it will have an impact on the order as well...

Here is a playground link with an edited config which generates the 2 missing classnames
https://play.tailwindcss.com/8C5UoD7oA3

I just tested your example using prettier-plugin-tailwindcss +  the config as in https://play.tailwindcss.com/8C5UoD7oA3
Here is the sorted classList I get with prettier:
flex h-9 w-9 items-center justify-center rounded-full border-4 border-solid border-blue-100 bg-deque-blue text-large text-white
Which is matching eslint.

👋 @emargareten , @xiCO2k , @jonnywilliamson , @SebasG22 , @SergeyRyzhkov , @dcmastenbroek , @shunkakinoki , @boompikachu, @charkour , @johnny353535
latest version (3.5.0) support the new option officialSorting

Works great thanks @francoismassart


CartographySchema with Node shared by multiple intel

Example:

GoogleSuite use Human to link GoogleAccount to a "Person" with analysis job (h)-[r:IDENTITY_GSUITE]->(user)
GitHub use Human to link GitHubAccount to a "Person" with analysis job (h)-[r:IDENTITY_GITHUB]->(user)
I wanted to do the same think with Lastpass (https://github.com/lyft/cartography/pull/1083)

I'm stuck with the CartographySchema implementation :
Problem 1 - multiple definition
Even with the schema reorganization (https://github.com/lyft/cartography/pull/1096) the Human node must be redefined several times that could lead to inconsistant fields
Add a cross_intel/common/wellknown list of Node in this schema will lead to a PropertyRef issue (field can change between intel sources)
Suggestion: add a notion of "constraint/schema" verified by the CI which checks the consistency of the schema (the nodes are defined several times but consistency is guaranteed)
Problem 2 - auto clean
In my usage, there is not one execution of the script but several (which can be triggered by Terraform CIs, crons etc ...)
With a CartographySchemaNode, autoclean will erasing the Humans created by another Intel
ex: GitHub will update a small subset of Human, but maybe sooner GoogleSuite updated more Humans nodes that will be purged by autoclean on the "GitHub execution"
Suggestion: add a cli parameter: autoclean_max_age (0 by default) and purge for lastupdate < NOW - autoclean_max_age instead of lastupdate != NOW

Hey, thank you for the thoroughly written issue.
Regarding problem 1
I don't think the Human node will need to be defined in multiple places. The GSuiteUser-to-Human link makes that connection if GSuiteUser.email == Human.email. Let me see if I can roughly sketch out what the model will look like.
@dataclass(frozen=True)
class GSuiteUser(CartographyNodeSchema):
    label: str = 'GSuiteUser'
    properties: ... omitted ...
    sub_resource_relationship: ... omitted ...
    other_relationships: Optional[OtherRelationships] = OtherRelationships(
        GSuiteUserToHumanRel(),
    )

@dataclass(frozen=True)
class GSuiteUserToHumanRel(CartographyRelSchema):
    target_node_label: str = 'Human'
    target_node_matcher: TargetNodeMatcher = make_target_node_matcher({'email': PropertyRef('HumanEmail')})
    direction: LinkDirection = LinkDirection.INWARD
    rel_label: str = "IDENTITY_GSUITE"
    properties: ... omitted ...

and then loading it would be straightforward with
from cartography.client.core.tx import load

load(
    neo4j_session,
    GSuiteUser(),
    data,
    lastupdated=update_tag,
    ... other params ...
)

as long as the data looks like
data = [
    {
        # ... all the fields that a GSuiteUser has.
        'HumanEmail'<EMAIL_ADDRESS>    },
    {
        # ... all the fields that a GSuiteUser has.
        'HumanEmail'<EMAIL_ADDRESS>    },
    {
        # ... all the fields taht a GSuiteUser has.
        # This still works even if some items in the data don't
        # have a `HumanEmail` defined because Neo4j subqueries let us do an
        # optional match, and this lets us use a single generated query
        # to ingest data in the same list with varying relationships.
    }
]

For a concrete example, see this integration test: https://github.com/lyft/cartography/blob/81902b23fa80e4ba5332ba00b4477e3a556d5eb7/tests/integration/cartography/graph/test_querybuilder_rel_subsets.py#L11-L18
And the code here: https://github.com/lyft/cartography/blob/81902b23fa80e4ba5332ba00b4477e3a556d5eb7/cartography/graph/querybuilder.py#L348-L356,
here: https://github.com/lyft/cartography/blob/81902b23fa80e4ba5332ba00b4477e3a556d5eb7/cartography/graph/querybuilder.py#L231
and here: https://github.com/lyft/cartography/blob/81902b23fa80e4ba5332ba00b4477e3a556d5eb7/cartography/graph/querybuilder.py#L195
The Human to GitHubUser link isn't present in OSS cartography but modeling it would look similar as above.
Regarding this point,

Add a cross_intel/common/wellknown list of Node in this schema will lead to a PropertyRef issue (field can change between intel sources)

If field values can change between intel sources, it might make sense to prefix the field name on a given node with ${source_name}_${field_name} so that we don't run into conflict. The cartography data model also correctly handles the case where we try to ingest data that has only a subset of the fields defined on its schema. For example if I use this SimpleNode and run
SIMPLE_NODE_MISSING_PROPS = [
    {
        'Id': 'SimpleNode1',
        'property1': 'The',
    },
        'Id': 'SimpleNode2',
        'property2': 'Fox',
    },
]

load(neo4j_session, SimpleNodeSchema(), SIMPLE_NODE_MISSING_PROPS, lastupdated=1)

then the result I get with
match(n:SimpleNode) return n.id, n.property1, n.property2;

is
and all the nulls get treated as properties that don't exist on the node, which is exactly what we want. I'll add this as a formal test to the code though.
Regarding problem 2

With a CartographySchemaNode, autoclean will erasing the Humans created by another Intel
ex: GitHub will update a small subset of Human, but maybe sooner GoogleSuite updated more Humans nodes that will be purged by autoclean on the "GitHub execution"

Automatically deleting objects created by another intel module is absolutely something we intend to avoid. We should try to make it so that the autocleanup can smartly delete only the objects we want.
It's getting a bit late where I am so I'll give more of a hand-wavy explanation of my last few thoughts:

This is still very early stages and we will learn more as we go. The idea is we first match on paths that are as long (i.e. restrictive) as possible, delete stale nodes of our target type in the path, and then delete stale rels (only up to the current node schema).

At this early stage of rolling out the schema, we do not support automatic cleanup of schema objects that do not define a sub resource.

In the situation you described, an automatic cleanup of the GSuiteUser would generate queries that look something like these tests. I think I do see a potential problem with our current implementation of the cleanup job - specifically I think these last 2 queries are actually the least restrictive of the others in the list and this will end up deleting more than we want int his case.

Thanks again for writing this up and informing the design of the data model. To summarize, I think the new data model addresses the concerns of problem 1, but I think I agree with problem 2 and I see a potential problem. Again, this is early stages and we are figuring this out as quickly as possible and I think things will make more sense as we continue to put them together. Will fix and make things smooth for your Lastpass change.

I decided to do a longer write up to explain more of the background and the "why" behind the data model: https://docs.google.com/document/d/1HI_EUgXd55affTNznEj80aY3vNVWlnWSLjwyxJ8nDpQ/edit#. It's long but I figured it's complicated enough that it needs to be documented in some way.

Thank you for this amazing reply and documentation.
I will try to go deeper in this new schema, will open new issues if needed.

Going to transfer this to a discussion since there may be additional schema discussions to talk about.


Mandatory block in coralogix_alert resource is not documented properly

Affected Resource(s)

coralogix_alert

Terraform Configuration Files

resource "coralogix_alert" "count_get_response_times_warning" {
  name     = "${local.alert_display_name} [Number of GET with response times P90 >= 500ms]"
  enabled  = var.enable_alerts
  severity = "Warning"

  meta_labels = {
    application = var.aws_account_name
    subsystem   = var.ecs_service_name
  }

  standard {
    search_query = ".......omitted..... AND http_request.duration_ms: [500 TO *} ${local.get_http_method_condition_q1}"
    applications = [var.aws_account_name]
    subsystems   = [var.ecs_service_name]
    severities   = [
      "Info", "Error"
    ]
    condition {
      more_than   = true
      threshold   = var.cx_get_slow_request_threshold
      time_window = var.cx_get_slow_request_time_window
    }
  }
}

Debug Output
Error: internal error in Coralogix backend.
│ error - rpc error: code = Internal desc = statusCode: 400, response: {"success":false,"status":400,"message":"alert definition, notificationGroups is invalid , SequelizeValidationError: Must have at least 1 notificationGroups item"}
│ url - com.coralogix.alerts.v2.AlertService/CreateAlert

Expected Behavior
notification_group should be either documented as required or allowed to be optional in CX backend
Actual Behavior
notification_group must be specified otherwise TF plan fails
Important Factoids
Coralogix TF provider v1.14.1
TF v1.8.2
Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Hi! Thanks for reporting this, we are currently working on updating the alerts API which should also take care of this issue. Until then please be patient and use some kind of notification group for all requests 😓
I'll leave this issue open in case someone from the future encounters this error.


Installation fails on dependencies (2)

Hi,
I cloned the repository and tried to run it, but failed on the dependencies. I'm on Windows 10, installed a Python 3.6.6. I get the following error:
...
Collecting toolz==0.9.0
Downloading toolz-0.9.0.tar.gz (45 kB)
|████████████████████████████████| 45 kB 1.1 MB/s
ERROR: Could not find a version that satisfies the requirement torch==1.0.0 (from -r requirements.txt (line 25)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.0.0 (from -r requirements.txt (line 25))

If you don't need to re-train you can install any torch 1.0 and higher.

Downgrading from python 3.8 to 3.7 helps

I went on this website, they explain how to do it: https://pytorch.org/
In the end I just used this command:

pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html

To be able to install version 1.4.0 of the torch I had to install and use the anaconda3 promt as they suggest on the site

I ran this to install the specified version on my Win10:
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.0-cp37-cp37m-win_amd64.whl

I ran this to install the specified version on my Win10:
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.0-cp37-cp37m-win_amd64.whl

And did it work? Because I tried anyway to download the torch, but it only came in version 1.0.0, and the code requires version 1.4.0

guys, what should I do after installing torch 1.4.0 cz when I reran the installation command it still gave the same error. plz help
ERROR: Could not find a version that satisfies the requirement torch==1.0.0 (from -r requirements.txt (line 25)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.0.0 (from -r requirements.txt (line 25))

If you already install torch, you should remove line torch==1.0.0 from the requirements.

Of course!


Db 319 error data

@bsweger, @nmonga91:  This includes the added error data for DB-319, and should be reviewed after expanded_status_check is merged.

@jworcestBAH Done reviewing this.


MethodInfo.Invoke

Original issue https://github.com/dotnet/docs/issues/6822 from @NetMage
MethodInfo.Invoke link under Methods in Tree goes to .Net 1.1 page instead of MethodBase.Invoke page.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: dc2c5677-4ada-334c-6fe1-13329ed66839
Version Independent ID: 33eda1ff-e736-e2f4-a44b-14f3da3d7a7b
Content: MethodInfo Class (System.Reflection)
Content Source: xml/System.Reflection/MethodInfo.xml
Product: dotnet-api
GitHub Login: @rpetrusha
Microsoft Alias: ronpet

I could repro this., It happens when you click on the TOC link that takes you to https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo.invoke?view=netframework-1.1

@dend Is this your area?

@mairaw is the method available in the newer versions of .NET Framework?

It's inherited from the parent class in newer versions @dend

@mairaw actually, I see this - the bug is likely to do with the TOC versioning. Tracked here.

This is duplicate of #347 and is tracked with the bug above, so closing this item 😄

Do you also have a duplicate label @dend? Easier to see when scanning issues.

I'm wondering if this issue should be reopened, @dend. It doesn't seem like it's a strict duplicate of #374.
The problem here is twofold:

The member list in the documentation for the MethodInfo type does not correctly list all members. It completely excludes the following members:

ContainsGenericParameters (inherited from MethodBase)
IsGenericMethod (inherited from MethodBase)
IsGenericMethodDefinition (inherited from MethodBase)
GetType (inherited from MethodBase)
Invoke(Object, Object[]) (inherited from MethodBase)

The MethodBase TOC includes these members. However, selecting them links to the 3.5 version of the documentation.

The reason is that, in .NET Framework 1.1 through 3.5, MethodInfo provided an implementation of these methods. However, the implementations were identical to the base class MethodBase implementations, so in .NET Framework 4, the MethodInfo implementation was removed.

Can we reopen tgus @Powerhelmsman @dend based on @rpetrusha's feedback?

Assigning to @mimisasouvanh as the PM driving the .NET experience.

I don't see Invoke listed under later versions anymore, so closing this.


Misleading Results for Knot Theory Invariants Data

Thanks for the great work on KAN and for sparking such interest!  I haven't seen anyone report this issue but may have missed it:
The MLP training method from the Knot Theory Invariant Colab notebook has a silly early stopping rule that prematurely stops training at ~80% test accuracy (using a 12.5% single holdout test set) for signature and this is reported and supposedly improved upon in the KAN paper in Table 3.   By letting the training go for 20 full epochs, MLP achieves ~96% test set accuracy.
For comparison, the best I have been able to achieve so far with KAN in 20 epochs is ~95% test set accuracy, using a [17, 8, 8, 14] model.
I am seeking practical, compelling, real-world datasets where KAN outperforms MLP in terms of some form of honest validation (single holdout or k-fold).   If anyone is aware of such examples, I would be much obliged if you could point me to them.
BTW, I found this while testing a KAN implementation in C++ using LibTorch, and am planning to include it as a part of the Torch Deep Learning add-in for JMP Pro.

Thank you for reporting this! I think for the knot example, there is a clear trade-off between accuracy (larger model, train longer) and interpretability (smaller model, train less). Your great effort seems to be pushing the accuracy front, while there are also people caring about the interpretability font, including us and the original deepmind paper.


Support fine-grained configuration

Currently, homebridge-hue support a few, coarse-grained parameters in config.json, basically enabling or disabling a resource type (i.e. lights, groups, sensors, schedules).
Would there be any interest in being able to specify this more fine-grained, e.g. per sensor type (only Hue Motion Sensors), per group type (e.g. only Luminaires), per light model (only Color Temperature Lights)?  Would that indeed be per type or would you rather specify a list of IDs?
We might also need a way to store different usernames per bridge.  I was thinking something like:
"platforms": [
  {
    "platform": "Hue",
    "name": "Hue",
    "bridges": [
      {
        "host": "<IP_ADDRESS>",
        "username": "S1QXtWWVemUMAy30Yz6iCDaucPvr84z8ztV0ru70"
      },
      {
        "bridgeid": "001788FFFE2C23BF",
        "username": "84z8ztV0S1QXtWWVemUMAy30Yz6iCDaucPvrru70"
      }
    ],
    ...
  }
}

The second entry would be the password for a discovered bridge.  Would we want heartrate and timeout per bridge or globally?

Did a simpler setup for usernames, see README.  Also made a distinction between lights and alllights.

Following on from the issue I had due to geofences I think I'd definitely like more control over which sensors get added. Unfortunately I now have way too many sensors that are of little value to me in HomeKit e.g, 12 Hue Labs ClipGenericStatus sensors and 6 "iPhone" geofence occupancy sensors.

Hi Jim, @jaytay79
I did have a quick look at the Hue app routines.  Indeed, it seems to be creating way too many sensors without any cleanup.  I haven't looked at Hue Labs.  Not sure if homebridge-hue should provide a workaround for some-one else's mess, but OK.
Would you want to mark individual sensors (e.g. only the CLIPGenericStatus sensors created by HueLabs) rather than sensor types (e.g. all CLIPGenericStatus and Geofence sensors)?  Would you prefer to whitelist the sensors to be included, or to blacklist the sensors to be ignored?  Of course, when blacklisting, newly created sensors by the app for routines or by Hue Labs would be exposed by default, whereas when whitelisting, newly connected Hue Motion sensors and Hue Dimmer and Hue Tap switches would be excluded by default.  Neither feels quite right to me.
For individual sensors you would need something in config.json like:
"platforms": [
  {
    "platform": "Hue",
    "name": "Hue",
    "bridges": [
      {
        "id": "xxxxxxxxxx",
        "username": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "sensors": {
          "enabled": true,
          "blacklist": [ 1, 13, 14, 15, 20 ]
        }
      }
    ]
  }
]

to ignore /sensors/1, /sensors/13, /sensors/14, /sensors/15, /sensors/20 and expose the other sensors.   I think this would become too ugly, too complex.  As you need to interact manually with the bridge to find the IDs of the sensors, I would probably prefer to use a resourcelink on the bridge to white/blacklist resources.
Alternatively, when only marking sensor types, config.json could be something like:
"platforms": [
  {
    "platform": "Hue",
    "name": "Hue",
    "sensors": {
      "zigbee": true,
      "CLIPGenericFlag": true,
      "CLIPGenericStatus": false,
      "GeoFence": false
    }
  }
]

to ignore CLIPGenericStatus and Geofence sensors.  Seems more accessible, but you would still need to understand the types of your sensors.
As a workaround, you could create a dummy HomeKit room and move all the unusable sensors there, marking them as non-favourite.  That way, they would hardly get in your way.

I think at the moment I would just like the ability to turn off/hide sensor types as per the second example. As you say it has the potential to get very messy, very fast if you want to hide or show only specific sensors. It's very annoying that the Bridge seems to keep creating extra sensors when turning on/off geofencing, perhaps I need to feed that back to Philips......

Added config.json parameters clipsensors and rooms and changes alllights to philipslights in v0.1.0.

Fantastic work @ebaauw! Thanks again.

Hello,
I would like to expose the Hue Motion Sensors I have, ignoring all the other sensors on the bridge (Tap, Dimmer, daylight and ambient light sensors).
What's the easiest to go about this? Can I use the blacklist method described above?
my preference would be to whitelist the sensors I want to include, rather than having to blacklist the sensors I don't want.
Also, how can I easily determine the which sensor is which from the numbering the Hue Bridge gives each sensor?
Thanks

Hi @leoneleone
It would seem you actually want to specify what types of sensors to expose, not which individual sensors.  Apart from clipsensors, philipslights, and rooms, nothing mentioned in this issue has been implemented yet.  I'm trying to understand what would be useful.  From your remark about figuring out the IDs of the individual sensors, I gather that would become too complicated?
Interesting that you mention to leave out the lightlevel sensors.  Each Hue Motion sensor is actually three sensors on the Hue bridge: a presence sensor, a lightlevel sensors, and a temperature sensor.  So you would want to be able to specify the bridge sensor types, not the physical devices?

@ebaauw
Yes you are correct, Sensor Types is a more accurate term. I'd like to decide what Sensor Types to include in HomeKit (in my case, only the motion/presence sensor) otherwise my HomeKit setup becomes too cluttered. I have no real need to expose the Tap or Dimmer Switches to HomeKit, or the added Daylight and Ambient light parameters I see as part of my HomeKit setup now.
I've since figured out how to get the IDs for the Sensors, but Philips Hue doesn't make that easy for the average user.
The other thought I have is to perhaps combine the Sensor Types according to the Sensor Device itself. One Sensor Device (main service) with 3 HomeKit Services nested within it, you've mentioned this before in the ReadMe. While Home app would only show the main service, the others can be accessed and used as triggers via another HomeKit app (Evefor example). I think this would really clean up and simplify the Hue (Sensor) devices appearing in Home app. I think it's best to combine all the separate sensor services the Hue Bridge throws out HomeKit based on Sensor Type (Motion Sensor, Tap, Dimmer).
Another thought regarding the Hue Motion Sensors in particular:
I think it would be more accurate for the Hue Presence (Motion) component to be exposed as a HomeKit "Motion Sensor" rather than an "Occupancy Sensor". It is after all detecting motion and not monitoring the occupancy. I know this is a small and seemingly inconsequential adjustment, just wanted to point it out.
Also, it would be great to have control of the delay/sustain time for the motion off message using a HomeKit Custom Characteristic which could at least be Read and Written to using the Eve app. It could be called "Sustain" or "Delay". The same goes for the Sensitivity parameter. I would consider control of Delay and Sensitivity an added bonus for the plugin though. I believe Apple with ultimately add them as official HomeKit Characteritics at some point, now that Fibaro and Elgato have HomeKit Motion Sensors out on the market. We could just wait and see what comes in a new ios update.
Your plugin is great though man. Very good work.
I appreciate that you're thinking in terms of simplicity for the end user when making changes to the plugin.

Just to clarify more:
I want to specify which Hue Devices Types (Motion Sensor, Hue Tap, Hue Dimmer) to expose to HomeKit, but I also think the individual Hue Sensors (presence, light level, Temperature) should be combined HomeKit Services nested in the one HomeKit Accessory/device that appears in Home app. This may be more applicable to the Hue Motion Sensor in practice.
So what I would see in Home app is a representation of the Hue "physical" device (Motion Sensor), but if I click on details for that device then I would see the light level and temperature readings as extra Characteristics or parameters within that one Motion Sensor Device.
I hope that isn't confusing you at all 😬

Another thought regarding the Hue Motion Sensors in particular:
I think it would be more accurate for the Hue Presence (Motion) component to be exposed as a HomeKit "Motion Sensor" rather than an "Occupancy Sensor". It is after all detecting motion and not monitoring the occupancy. I know this is a small and seemingly inconsequential adjustment, just wanted to point it out.

Erm, mine show up as motion sensors.... The icon in Apple's Home app is the same for Presence and Motion sensors but they are definitely different sensor types as can be seen in the Elgato Eve app.

I'd like to decide what Sensor Types to include in HomeKit (in my case, only the motion/presence sensor) otherwise my HomeKit setup becomes too cluttered.

I'll see what I can do.  Personally, I'm more worried about the 99 bridged accessories limit, than I am about my HomeKit becoming too cluttered.  I assign all the accessories I'm not interested in to a dummy room, and mark them non-favourite.  They're hardly noticed...

Erm, mine show up as motion sensors.... The icon in Apple's Home app is the same for Presence and Motion sensors but they are definitely different sensor types as can be seen in the Elgato Eve app.

Indeed, Hue Motion sensors (or rather ZLLPresence sensors on the Hue bridge) are exposed to HomeKit as Motion Sensor, because, basically, that's what they are.  CLIPPresence and Geofence sensors are exposed to HomeKit as Occupancy Sensor, because that's how the Hue app routines use these.

The other thought I have is to perhaps combine the Sensor Types according to the Sensor Device itself.

Yes I would like to expose the Hue Motion sensor as one HomeKit accessory with three services.  Also in light of the 99 bridged accessory limit (I've got ten Hue motion sensors at my home, so this would free me up 20 accessories).  I need to change the homebridge-hue design to be able to do that, however.  The Hue bridge doesn't report (nor knows for that matter) that the three bridge sensors belong to the same physical device.  I could connect them through their uniqueid, which starts with the Zigbee mac address, but there's no guarantee in which order they appear on the bridge.  So I would have to create the accessory and the first service for the first bridge sensor, and add a service to the existing  accessory for the second and third bridge sensor.  This splitting of services from accessories comes close to the redesign needed for the the dynamic platform accessories (issue #4), which I've been delaying because it's challenging and a lot of work.

While Home app would only show the main service

I'm not at home right now so I cannot verify this, but I'm pretty sure it would show all three services, as separate tiles.  It does for my homebridge-zp plugin for Sonos, which now exposes two services for one accessory.

Also, it would be great to have control of the delay/sustain time for the motion off message using a HomeKit Custom Characteristic which could at least be Read and Written to using the Eve app. It could be called "Sustain" or "Delay". The same goes for the Sensitivity parameter.

Controlling sensitivity From HomeKit is also on my wish list, see issue #9.  Controlling the delay from HomeKit will not be possible, as this isn't a bridge attribute.  Instead, it's hardcoded in the Hue bridge rules; it cannot even be parameterised through a CLIP sensor.  Maintaining Hue bridge rules from HomeKit seems like a step too far, but granted, this is a slippery slope, see issue #41.

I've since figured out how to get the IDs for the Sensors, but Philips Hue doesn't make that easy for the average user.

For CLIP sensors, I expose the sensor ID (or rather the full resource) as Serial Number in the Accessory Information service.  For Zigbee devices, I use the Zigbee mac address instead (except for Hue Motion Sensors and for Dresden Elektronik lights, which the Hue bridge treats as multiple resources - for these, I use the full uniqueid instead).  I'll see if I can find another characteristic so I can expose the resource for Zigbee devices as well.

I appreciate that you're thinking in terms of simplicity for the end user when making changes to the plugin.

Thanks! That's the fun thing about this project: I'm also an end-user myself.

@ebaauw, @jaytay79
Yes you a right. They do show up as Motion Sensors in HomeKit. That remark was an oversight on my part. apologies.
I've been running into a problem which is tied to the naming of extra sensors (temp, ambience, etc) homebridge generates, because I am using 3 Hue bridged, this throws up multiple hue temp sensors with the same name. This eventually throws up an "Cannot add a bridged Accessory with the same UUID as another bridged Accessory".
Is there a way for me to mark only the sensor types I want in the plugin config?
ex:
Motion Sensor: true
Ambient Light Sensor: false
Temperature Sensor: false
Daylight: false
I'm unsure how to do this in plugin config.
Sorry for the stupid questions, but I'm so confused by the Hue Api names for these sensors and how I should correctly target those particular sensors for blacklisting in homebridge.
Should I be exposing the CLIPsensors instead and just blacklist everything but the motion sensor for my purposes?
It would be great to have config options to blacklist each Hue sensor type individually similar to the example you mention above:
"platforms": [   {     "platform": "Hue",     "name": "Hue",     "sensors": {       "zigbee": true,       "CLIPGenericFlag": true,       "CLIPGenericStatus": false,       "GeoFence": false     }   } ]
Thanks for the help again guys. I really appreciate it

This eventually throws up an "Cannot add a bridged Accessory with the same UUID as another bridged Accessory".

The accessory UUID is based on the device uniqueid (for Zigbee devices) or on the bridge ID and resource path, not on the name.  I suspect you moved the Hue Tap switch to another bridge and didn't delete it from the old bridge.  If you attach a dump of each of your bridges (see Troubleshooting in the README), I could check.

I don't know how to rename these accessories on the Hue Bridge so Homebridge doesn't see duplicate names when it runs

Easiest way: in the official Hue app under Accessory Setup under Settings (the gear symbol in the upper left corner).  Again, homebridge-hue won't mind.  Siri won't like duplicate names for services, but these can be changed from any HomeKit app.
Here you could also check for old Tap switches, but I don't think the Hue bridge marks Tap switches as unreachable.

Is there a way for me to mark only the sensor types I want in the plugin config?

Still, no (except for clipsensors).

I'm so confused by the Hue Api names for these sensors

You're not alone.  If you start homebridge with homebridge -D, homebridge-hue will issue a message for each bridge resource it finds (oops typo), e.g.:

[1/14/2017, 1:58:30 AM] [Hue] philipshue: Daylight: Daylight sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Outside Temperature: ingoring CLIPTemperature sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Outside Humidity: ingoring CLIPHumidity sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room: ingoring CLIPGenericFlag sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room Motion: ZLLPresence sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room Light Level: ZLLLightLevel sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room Temperature: ZLLTemperature sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room Dimmer: ZLLSwitch sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Downstairs Tap: ZGPSwitch sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Upstairs Tap: ZGPSwitch sensor
[1/14/2017, 1:58:30 AM] [Hue] philipshue: Living Room Status: ingoring CLIPGenericStatus sensor

This should allow you to link the name to the type.  Alternatively, when you check the accessory information (hold the service tile on the iOS built-in Home app, press Details and scroll down) you'll see the type under Model.  The base for the UUID is listed under Serial Number.

@ebaauw
Thanks for the clarification. I'll have a look at the output today.
One thought I had about the Delay/Sustain I mentioned before:
Can the plugin itself create an added Delay Characteristic within homebridge/HomeKit which sustains the Motion Triggered HomeKit status, completely separately from the Hue Bridge rules? So it would just generate that delay within the HomeKit functionality of the Motion information visible only to HomeKit. The delay time for each (HomeKit) Motion Sensor can be set individually within the Home app and wouldn't rely on the Hue Bridge for this parameter?

If homebridge-hue would create a custom Delay characteristic, the iOS built-in Home wouldn't support it, but other HomeKit apps mights.
Not sure I understand what you're asking: do you want homebridge-hue to lie about the bridge sensor state and continue to report Motion Detected until the delay time has passed?  I don't think homebridge-hue should be in the space of home automation rules: these should be in the Hue bridge and/or in HomeKit.  In my view, homebridge-hue should "just" be a bridge between the Hue bridge and HomeKit.
I agree there's a huge mismatch between the functionality the Hue Motion sensor (or any motion sensor) offers (viz. Motion Detected) vs the functionality you'd want to turn off the lights automatically (viz. Occupancy Detected), but solving this requires way more than a simple delay.
For my home I've created a CLIPGenericStatus sensor per room to keep track of (amonst others) room occupancy and a CLIPGenericFlag sensor acting as virtual master switch for each room.  I've created a whole bunch of Hue bridge rules, that update the room status based on the Hue motion sensors in that room and in the adjacent rooms (so I can actually detect leaving a room as opposed to no more motion detected), changing the room master switch appropriately.  I can manually override the room master switch from any HomeKit app; My Hue Dimmer switches also sets the room master switch.  Then I've created a second set of Hue bridge rules to interact with the room lights, based on the room master switch and the room light level.
For a number of reasons, I like to keep my HomeKit configuration lean and mean, and have most intelligence in the Hue bridge:

The Hue bridge provides way richer functionality for rules than HomeKit does for triggers;
Lights control through Hue Motion sensors and Hue Dimmer switches continues to work autonomously, even when the server running homebridge or the network is down;
I don't have a backup of my HomeKit configuration - I would need to create an iOS HomeKit app for that.

The Hue bridge allows conditions like "1 minute after the status became 2".  Unfortunately, both the "1 minute" and the "2" are hard-coded in the rule.  I cannot programme the detection for leaving a room in HomeKit.  I only use the room master switch in HomeKit triggers, to turn on/off the room Sonos speakers while turning on/off the lights from the Hue bridge.
Maintaining these Hue bridge rules is a real pain in the lower back.  I use a series of shell scripts, wrapping around curl to interact directly with the Hue bridge over the Hue API.  These scripts re-create my entire Hue bridge configuration, doubling as backup for my Hue bridge.
I've yet to publish these shell scripts on GitHub.  The thing holding me back is these scripts rely on a little command line utility I've written in Swift to format and manipulate json.  I don't want to spend the time to port this utility to the Raspberry Pi (or other platforms).

Version 0.1.11 allows blacklisting of sensor types, see README.
E.g. to expose only the Motion Sensor and Light Sensor sensors of the Hue Motion sensor, specify in config.sys
"excludeSensorTypes": [ "CLIP", "Geofence", "ZLLTemperature", "ZLLSwitch", "ZGPSwitch"]

As of v0.5.51 individual resources to be exposed to HomeKit can be whitelisted or blacklisted using bridge/gateway resourcelinks.

Just started using homebridge-hue a few days ago and it‘s a great project - thank you!
my setup is a raspbee running on a PI as bridge. I’ve hooked up a generic (Sercomm) Zigbee plug to it, which Phoscon doesn’t fully support by means of allowing to configure the plug’s properties. Phoscon recognises it as a switch in setup, but then only allows adding it as light in room config (because it only supports lights and sensors, not switches, there). So, I can make it appear as a „light“ by adding lights=true in homebridge-hue, but that means it shows up as a light symbol in HomeKit. Optimally, I would have it as a power point symbol, but not sure if that is an ultimate limitation of Phoscon to assign the correct types and pass them on to homebridge-hue or if homebridge-hue could have an ability to reclassify the type coming from Phoscon to show up the correct device type in HomeKit. Ie incoming „light“ -> outgoing „plug“?
Also where I can I see the current type-granularity (light, sensor, switch, socket/plug etc) that homebridge-hue supports? From the wiki, I only gather lights and sensors.

The deCONZ REST API (as well as the Hue API) exposes Zigbee devices as /lights or /sensors resources.  In config.json, you can specify what type of resources Homebridge Hue should expose, see https://github.com/ebaauw/homebridge-hue/wiki/Configuration.
For finer-grained control, of individual resources, you can create resourcelink through the API.  An outlet resourcelink specifies which /lights (and /groups) resources are to be exposed as Outlet instead of _ Lightbulb_.  Too many Zigbee devices expose the wrong device type, so I no longer try to predict whether a /lights resource is actually for an outlet.  ph outlet will create an initial resourcelink for you, based on the device types, but you might want to review that.

Thank you. I think I had misunderstood the resourcelink topic before, so will give that a go.

@ebaauw, thank you again for the advice above. That worked perfectly by adding the given device to an outlet resource link. Found a few interesting things by exploring the deCONZ REST API in the process, for example a ghost Philips Hue light that doesn't exist.
If I think ahead, since HomeKit supports many more devices types, including
Lights
Switches
Outlets
Thermostats
Window Blinds
Fans
Air Conditioners
Humidifiers
Air Purifiers
Sensors
Locks
Cameras
Doorbells
Garage Doors
Sprinklers
Speakers
Routers
TVs
Am I correct in assuming I can manually create a resourcelink for all these, so I can add the devices according to their actual device type and homebridge-hue would recognise that? Even though ph may not support an automated command for ph sprinkler, for example.

@ebaauw, thank you again for the advice above. That worked perfectly by adding the given device to an outlet resource link. Found a few interesting things by exploring the deCONZ REST API in the process, for example a ghost Philips Hue light that doesn't exist.
If I think ahead, since HomeKit supports many more devices types, including
Lights
Switches
Outlets
Thermostats
Window Blinds
Fans
Air Conditioners
Humidifiers
Air Purifiers
Sensors
Locks
Cameras
Doorbells
Garage Doors
Sprinklers
Speakers
Routers
TVs
Am I correct in assuming I can manually create a resourcelink for all these, so I can add the devices according to their actual device type and homebridge-hue would recognise that? Even though ph may not support an automated command for ph sprinkler, for example.

No, of course not.  It doesn’t make sense e.g. to expose a light as a camera.  See https://github.com/ebaauw/homebridge-hue/wiki/Resource-Links for the types of resource links that Homebridge Hue supports.

No, of course not.  It doesn’t make sense e.g. to expose a light as a camera.  See https://github.com/ebaauw/homebridge-hue/wiki/Resource-Links for the types of resource links that Homebridge Hue supports.


Pyinstaller using orca

When attempting to use Pyinstaller and creating a custom .spec file which ensures it encludes orca as shown here (since it seems incompatible with pyinstaller)
             datas=[('C:/My/Path/to/orca/', './orca/')],
             hiddenimports=['orca']

Note that

It includes the orca folder in the dist folder when using pyinstaller
This orca folder is the folder that includes orca.exe

The executable tells the user when running it on a pc without orca (or python) installed that orca has to be installed (so the pyinstaller failed..).
Is it that orca is impossible to be used with pyinstaller or am I doing something wrong?

Closing to move discussion to https://community.plot.ly/t/pyinstaller-with-plotly-orca-and-psutils-not-working/16324.


Quantitative, Relative

I supposed the unit we put the information in the windows (Q or E, or Q with zero sum or any other referentiel future developpers would like to add), should be chosen by a button or within the menu, so by clicking on it, all information about the money units change from Q to R or from R to Q.
It is possible also to have 2 referentials on the window (or perhaps 3 or w, but will be difficult with great "x" !) , I suppose the best way then would be to have 2 colomns Q a R, for instance in transaction window :
Q          |   R                  |      to
10 mb   |  0,1 UD mb    |      inso
then referential "Q" and "R" could be choosen by user as "Referentiel R1 = Q" and "Referential R2 = R", and possibly the user can choose in a list of referentials Q,R,QZ,RZ,WTF... which one he puts in column 1 and which one he puts in column 2. By default I suppose Q & R is a good choice.

What about a selector to chose which referential to display in the client ?
Like in the statusbar, a combobox ( http://manual.qooxdoo.org/1.3/_images/combobox.png ), where you can chose which referential to use, dynamically ?

Yes, this could be a very good feature.

Added in https://github.com/ucoin-io/cutecoin/commit/a96715caeaa18a3f0db484b2e24d3abbd7c1aab3


After project updating some of Classes and Folders has been removed!!!

Hi, after some days i have updated project using Composer and now i found that for example, InlineKeyboard is gone! why?
Additionally, i removed Vendor folder and installed packages again but problem is exist.

What version were you updating from, and to which one?
Are your custom commands what is gone now, or the default ones?
Some extra info would be very helpful 😊

One day ago you have update some core files such telegram.php, so i decided to update from version 1.0.8 to sync with new changes. after this update, some of my core files deleted!!!

I have a feeling he developed the bot inside vendor/php-telegram-bot directory and commands got wiped.

@skmohammadi We've never had a version 1.0.8, so I'm a bit confused... You do mean this library right? Just to make sure you're not in the wrong repository 👌
@jacklul Was thinking the same, hence my question.

Commands will be redesigned in the new version https://github.com/php-telegram-bot/core/issues/826


Make newDocumentTitle variable local

https://github.com/snowplow/snowplow-javascript-tracker/blob/c67ec2368a3049dfc053291b2d26fd490e20bd48/src/js/tracker.js#L1305
Trying to figure out why it was made global.

v2.7.2 and 2.8.2. Throws an exception newDocumentTitle is not defined now when you use enableActivityTracking.

@chuwy Fixed. I had issues with Safari and Chrome (latest version). I guess it might be last changes in JS engine. enableActivityTracking feature didn't work there.

Hello @brightwrite-admin, I just checked it in both latest Chrome and Safari and enableActivityTracking seems to work in both stable versions.
I think it might be problem with one of plugins installed on your browser. Otherwise this indeed can be a quite serious bug.

Thanks for checking it @chuwy!
I don't think it's an extension, as I don't have any extensions installed in Safari.
What I think causes this problem is the way how I install SnowPlow, it's a WebPack module.
I believe the problem might be in hoisting. It's hard to debug, but changing this var to local fixes the issue. I checked this global var is not used anywhere.


Vertical whitespace added to datasets and collections on select of filter

What I Expected

What Happened Instead

Hey @seve, @sethfeingold, as per Slack, we have taken a look at this additional whitespace defect and feel the best place to fix this issue is with the new MobileNavWrapper-related functionality.
The background here is that before MobileNavWrapper was added, each page layout looked like:
<Wrapper>
  <Header>
  <Content>
  <Footer>
</Wrapper>

where:

Wrapper was display:flex with flex-direction:column resulting in its children being stacked
Header’s position was fixed, taking it out of the flow
Content had a margin top of 48px to accommodate for the fixed header and also a flex grow to consume all available space
Footer had a height of 56px and flex shrink of 0 so it was always visible at its set height.

It looks like this whitespace defect is due to MobileNavWrapper on desktop-sized devices having a combination of:

position:relative
height:48px
Nesting of the original position:fixed Header inside it (that is, MobileNavWrapper technically has no content as Header is not in the flow).

This results in:

On pages where Content is short and does not consume the full viewport height (e.g. if datasets or collections is filtered to a short result set or viewing a collection detail page where there’s only a few datasets), the MobileNavHeader is in the flow (position:relative) and consumes a height of 48px (height:48px), and therefore pushes down Content (which is expecting a fixed and out-of-flow header). This is the extra whitespace we are seeing.

On pages where Content is long, MobileNavHeader shrinks to a height of 0 as it has no content (due to the original, now nested Header being position:fixed) as Content consumes all available space (flex-grow). This is why we are not seeing the whitespace on every page.

It’s possible to fix this in the Content area but the MobileNavWrapper goes to position:fixed on mobile-sized devices anyway (so we would be patching for desktop only) and we feel a cleaner fix is with the MobileNavWrapper.
cc: @frano-m.


[sidebar] Build fails after installing sidebar plugin

My site builds fine:
(nikola)$ nikola build
Scanning posts.....done!

I install sidebar plugin (do not change any files):
(nikola)$ nikola plugin -i sidebar
[2017-06-02T16:58:54Z] INFO: plugin: Downloading 'https://plugins.getnikola.com/v7/sidebar.zip'
[2017-06-02T16:58:54Z] INFO: plugin: Extracting: sidebar into plugins/

After which the build fails:
(nikola)$ nikola build
Scanning posts.....done!
Traceback (most recent call last):
  File "/home/user/nikola/lib/python3.5/site-packages/doit/doit_cmd.py", line 168, in run
    return command.parse_execute(args)
  File "/home/user/nikola/lib/python3.5/site-packages/doit/cmd_base.py", line 122, in parse_execute
    return self.execute(params, args)
  File "/home/user/nikola/lib/python3.5/site-packages/doit/cmd_base.py", line 380, in execute
    self, params, args)
  File "/home/user/nikola/lib/python3.5/site-packages/nikola/__main__.py", line 279, in load_tasks
    self.nikola.gen_tasks('render_site', "Task", 'Group of tasks to render the site.'))
  File "/home/user/nikola/lib/python3.5/site-packages/doit/loader.py", line 314, in generate_tasks
    for task_dict, x_doc in flat_generator(gen_result, gen_doc):
  File "/home/user/nikola/lib/python3.5/site-packages/doit/loader.py", line 28, in flat_generator
    for item in gen:
  File "/home/user/nikola/lib/python3.5/site-packages/nikola/nikola.py", line 1821, in gen_tasks
    for task in flatten(pluginInfo.plugin_object.gen_tasks()):
  File "/home/user/nikola/lib/python3.5/site-packages/nikola/nikola.py", line 1816, in flatten
    for ft in flatten(t):
  File "/home/user/nikola/lib/python3.5/site-packages/nikola/nikola.py", line 1815, in flatten
    for t in task:
  File "/home/user/nikola/my_new_site/plugins/sidebar/sidebar.py", line 134, in _prepare_sidebar
    for taxonomy in self.site.taxonomy_plugins.keys():
AttributeError: 'Nikola' object has no attribute 'taxonomy_plugins'

Version info:
(nikola)$ nikola --version
Nikola v7.8.1

The sidebar plugin requires Nikola v7.8.2 or newer — run pip install --upgrade Nikola.

Thanks for the immediate response!
Version requirement at https://plugins.getnikola.com/v7/sidebar/ also can be updated.

Where? It says Supports Nikola v7.8.2 or newer.

Whoops, sorry, page has not been reloaded. Case closed!


Fix wrong Slack URL in README.rst

@maerteijn the URL isn't wrong - it's pointing to a relay server that auto-generates an invitation to the user to enable them to join the workspace. If you go straight to slack there is no way to register unless you've already been invited by another user.
This service was being maintained by @mvantellingen - pinging him to ask if he can check what's up with it.

@solarissmoke Ok didn't know that. Now you are directed to https://slack.oscarcommerce.com/ which has an expired certificate, is that something you can fix?

No - I've pinged @mvantellingen who controls it.


PAIE: An Earlier and Better Work of the Same Kind 一个更早的更好的同类作品

Have you ever read "Prompt for Extraction? PAIE: Prompting Argument Interaction for Event Argument Extraction"? This paper was published earlier and has shown better performance, with more comprehensive ablation experiments. The authors employed a prompting engineering approach that includes soft templates, discrete templates, and concatenated templates, which outperforms the discrete templates.
不知道作者有没有读过Prompt for Extraction? PAIE: Prompting Argument Interaction for Event Argument Extraction。感觉这两篇论文任务相同，方法相似（但是并没有得到引用）。PAIE相比来说，发表的更早，性能更好，效率更高，消融实验也更加全面。PAIE的提示工程使用了软模板、离散模板、拼接模板等（也是动态的模板，还是同步优化的），想必比EEQGA只用离散模板效果要好的。
Under the Bart-Large model, EEQGA scores 72.4 and 70.3 for Arg-I and Arg-C, respectively. In contrast, PAIE scores 75.7 and 72.7 for Arg-I and Arg-C, respectively, under the same Bart-Large model. The performance could be even better if they had used the T5 model.
EEQGA在Bart-Large下Arg-I，Arg-C的分数是72.4 70.3。PAIE在Bart-Large下Arg-I，Arg-C的分数是75.7 72.7。如果他们使用T5的话，也会有更好的分数。

请问数据集在哪下载的，方便分享吗


Implement obsFilter for all relevant view types

User story
I'd like to be able to explore the composition of cell types within a subregion of my dataset, say by manually selecting a region in a scatterplot and then viewing an obsSetSizes plot for a selected set of cell type labels, calculating numbers from the filtered region only.
Preferred solution
I'd imagine this could work via a command "filter from selection" that would transfer the current obsSetSelection to a more persistent filter stored as a subset of the observation index. This would then be available to and used by essentially all views of that observation type.
Possible alternatives
It seems like there's currently not much at all implemented for the obsFilter coordination type, so I'm likely missing some context here. I suppose one could create such a plot manually by creating a bunch of intersection cell sets manually and then selected them, but it would be quite a bit of work.
Use case

[ ] Relevant to HuBMAP Consortium
[ ] Relevant to Kidney Precision Medicine Project
[ ] Relevant to Human Tumor Atlas Network
[x] Other (probably relevant to the above, but I'm exploring this for viewing mouse brain spatial transcriptomics data)

I should say, this is also something I might be interested in working on with a pointer or two, if it's a desired feature.

That sounds great, you are correct that obsFilter exists as a coordination type but is currently not used (there are several others like this that exist but are not currently used- simply because it was not initially trivial to create coordination types so I added a bunch to the configuration schema with the intention of eventual usage) The value is already passed down to the  but unused within that component for the type of behavior that would be expected https://github.com/vitessce/vitessce/blob/cac5c6623657d566b6cc4018ecdbe6beafe9163f/packages/view-types/scatterplot-embedding/src/EmbeddingScatterplotSubscriber.js#L317 https://github.com/vitessce/vitessce/blob/cac5c6623657d566b6cc4018ecdbe6beafe9163f/packages/view-types/scatterplot/src/Scatterplot.js#L110  I think one option would be to add another coordination type to modify this behavior, for example something called obsSelectionMode that can take strings like “select”, “filter”, etc. I am not at my computer now but will send more info on how to add a coordination type to the schema. (It should also become a bit easier in the near future due to #1441)


handle trailing period in partial float mode

Fixes #146

This seems functionally ok, the slowdown looks like it's a loss of inlining due to the additional re-parse. Can probably rework to fix that.

Closing as per https://github.com/pydantic/jiter/issues/146#issuecomment-2448415807 - think we'll go in a different direction.


Unable to catch sound play errors when using AudioTag

This Issue is about a bug in the API:

Phaser version(s): 2.11.0
Live example: https://codepen.io/josalmi/pen/MqaLZe?editors=0010
What should happen: If play throws an error, there should be a way to catch it
What happens instead: Error is thrown and it's impossible to catch

Sound can only be played as a response to user interaction like click event and if you fail to do so browsers will throw errors at you. Quoting from https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play

The HTMLMediaElement.play() method attempts to begin playback of the media and returns a Promise which is fulfilled when the playback has been successfully started, and which is rejected if playback fails to begin for any reason (such as permission issues or other problems).

It seems that Phaser expects .play() to always succeed as can be seen here: https://github.com/photonstorm/phaser-ce/blob/master/src/sound/Sound.js#L721 and it would be nice to have a way to catch this. If we were able to catch this error we would be able to ask the user to interact with the game rather than failing silently as it does now. Also the game keeps reporting that the sound is playing.

This could also affect WebAudio playback after Chrome 70: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

We're a bit stuck since Phaser also supports browsers that don't return a Promise.
I think the idea is that you could check game.sound.touchLocked before trying playback.
We could either

Store the result of play() in a new property, audioTagPlayPromise; or
Use the Promise for two new Signals, audioTagPlayStarted and audioTagPlayFailed

Does someone have an example on how to catch an error in js ?


🚀 Feature: Provide more attributes for drill down to application

Which component is this feature for?
All Packages
🔖 Feature description
The attributes of metrics and traces are able to provide the process name, hostname and etc., making it easy to identify the application and host where performance issues are occurring, that's helpful for monitoring multiple applications.
🎤 Why is this feature needed ?
If monitoring detects an issue, I need a clear view of the application, such as application name and hostname.
✌ How do you aim to achieve this?
I can have the enough information from metrics or traces to easily drill down the detected issues to applications.
🔄 Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?

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

Are you willing to submit PR?
None

@jinsongo can you elaborate anything specific that would be helpful outside of resource data already collected by otel?


benchmark fails to build with ghc-9.6

       Building benchmark 'bench' for stateWriter-0.4.0..
       [1 of 1] Compiling Main

       /var/stackage/work/unpack-dir/unpacked/stateWriter-0.4.0-ad21de6c98d3e426f15b0faee209e73a8eb1825efbc4e70818e9786e288aa06d/ben
ch/bench.hs:23:5: error: [GHC-88464]
           Variable not in scope: unless :: Bool -> m () -> m ()
          |
       23 |     unless (v == 0) $ do
          |     ^^^^^^

       /var/stackage/work/unpack-dir/unpacked/stateWriter-0.4.0-ad21de6c98d3e426f15b0faee209e73a8eb1825efbc4e70818e9786e288aa06d/ben
ch/bench.hs:25:9: error: [GHC-88464]
           Variable not in scope: when :: Bool -> m () -> m a0
          |
       25 |         when (v `mod` 11 == 0) $ tellaction v
          |         ^^^^

Please open if PR to re-enable it in stackage

ps It would be nice to have the actual github project https url in the .cabal file.

I am away til mid July 😢 will fix it when I get back!


Possibility of updating notifications and nc-notifications data models ?

Hello,
I was wondering from where notifications and nc-notifications came from, after looking for them on the YangCatalog I see that they seem to be vendor (Cisco) specific implementations of the RFC 5277.
Looking a bit more on other implementation of the RFC 5277 I found the ones from IETF, which are more recent:

ietf-5277-netmod@2016-06-15  to replace  nc-notifications@2008-07-14
ietf-event-notifications@2016-10-27 to replace notifications@2008-07-14

They seem to be almost compatible (it seems there is a new leaf /netconf/streams/stream/replayLogAgedTime) and I guess it would involve to update the path in netopeer2.
Do you think this update would be that easily feasible so you could plan to do it ?
I would be glad to propose a pull request, however I am afraid I lack too much knowledge regarding Yang, Netconf and the CESNET projects to be able to offer quality content.

The first module seems fine but it is almost the same to the one we use, like you said, so I see a lot of changes and perhaps compatibility problems for little benefit.
The other module ietf-event-notifications seems rather close to the even more recent ietf-subscribed-notifications. We fully implement and support the latter so I again do not see the benefits outweigh the cost and problems.


[TW#17991] Which SPI PIN to use when  it's by default

in order to go really fast on SPI
I want to use what it's written here
"You can use this structure to specify the GPIO pins of the bus. Normally, the driver will use the GPIO matrix to route the signals. An exception is made when all signals either can be routed through the IO_MUX or are -1. In that case, the IO_MUX is used, allowing for >40MHz speeds."
When I do that I can put speed up to 80MHZ but I cannot find the pins to use for clock and data !!:)
any idea ?

link to #1008

Hi @hpwit ,
Please see #1008 first, here are some more clues about this issue.

ESP32 spi master can only work under divisors of 80MHz, i.e. 80, 40, 26.6, 20, 16, 13.3, ... Mhz

Native pins can be find in our datasheet, as well as the IO_MUX chapter of the Technical Reference Manual. When the one of the pins are set to non-native pins, the driver automatically route signals through the GPIO matrix. We are going to add pin information into the programming guide.

There're different restrictions for writing and reading, and the writing limit is always higher than reading. The freq limit for writing is 80MHz with native pins and 40MHz for GPIO matrix pins.

For reading, the limits come from timing issue: data comes too late compare to the clock, violating the setup requirements when the clock is fast. When the native pins is not used (so the GPIO matrix is used), the data comes even later.
For this we have a workaround, inserting dummy cycles right before the reading phase. However this is only for half-duplex mode, the full-duplex mode cannot use it. This is why the frequency checking exist there.
In summary, the reading frequency limit is related to whether native pins are used, whether dummy bits can be used (whether in half-duplex mode), and the time required for the slave to validate the MISO after the launch edge.
Recently we released a patch(9d69d1106754926e4ee6590dcb71b09e4abf558d) for users to operate devices under 40MHz in full-duplex mode while write-only.

Important notice: the intervals between transactions are long (25us typ.). When data are sent by small transactions, the intervals cost a lot. Try to squash data into one transaction if possible to avoid intervals.

Hello @ginkgm
thank you for your answer.
I guess the 25us between transactions is what throw off my calculation
a went to send 32bits by 32 bits I have a loop for 40000 reps of the write command
but i needs to consider that I have 40 000 000 * 25us of offset
Yves


Please add some good first issues

Please do add some new issues in

good first issues label for @hacktoberfest2021

You really gotta read the README. There's a table that hyperlinks to some good beginner-friendly issues

@dipenr06 Buddy this repo is not for contributions, its only a complete resource where you can find beginner issues and projects to contribute to . If you need any help you can reach out to any of the mentors on this repo's discord or on any socials of mentors


OrderedIntervalList

resolve #41

Pull Request Test Coverage Report for Build 155

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+14.0%) to 62.651%

Totals

Change from base Build 152:
14.0%

Covered Lines:
75

Relevant Lines:
128

💛  - Coveralls

Pull Request Test Coverage Report for Build 155

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+14.0%) to 62.651%

Totals

Change from base Build 152:
14.0%

Covered Lines:
75

Relevant Lines:
128

💛  - Coveralls

Arguments should not have underscore prefix anymore, see OpenZeppelin 2.0 notation.


Codeception amOnRoute broken the session in Phpstorm

What steps will reproduce the problem?

Write simple functional test that logs user in and moves by pages

    $I->amOnRoute('/');
    $I->assertTrue(Yii::$app->user->isGuest);
    $I->amLoggedInAs(User::findUserByUsername('admin'));
    $I->assertFalse(Yii::$app->user->isGuest);
    $I->amOnRoute('/');
    $I->assertFalse(Yii::$app->user->isGuest);

Run test

What is the expected result?
All should be fine
What do you get instead?
Test runs in console and fails in Phpstorm (first test in screenshot )
If you comment first line that opens the page before all tests complete without error (second test in screenshot)

Additional info
At first i thought it ide issue, but after i discovered it appeared only if "amOnRoute" is on first string, i become concerned about yii.

Q
A

Yii version
2.0.12

PHP version
7.1

PhpStorm
Last EAP and stable versions

Operating system
Mac 10.12.5

Looks like Codeception issue. Please report to https://github.com/Codeception/Codeception


Change Log APIs

[ ] get /api/$version/logs (support ?days=x)
[ ] get /api/$version/logs/newcount

Ideally, the results of these endpoints are filtered. Just spit balling here:
Imagine the following tenant tree:

root
-- company A
--- company A.A
--- company A.B
-- company B

Change logs probably need to be filtered in 2 ways:

By capability. Examples:

If i have the asn-read capability then i see any changes related to asns.
If i have the ds-read capability then i see any changes related to delivery services.
If i have the user-read capability then i see any changes related to users.

^^ This would probably require a new FK column in the log table called capability. And any action that writes to the log table, needs to determine which capability is necessary to see this log entry and write to the table accordingly.

By tenant. Examples:

If I have the ds-read capability and i belong to company A, then i see changes associated with delivery services for company A, A.A & A.B
If I have the user-read capability and i belong to company A, then i see changes associated with users for company A, A.A & A.B
If I have the tenant-read capability and i belong to company A, then i see changes associated with tenants for company A, A.A & A.B

these 2 endpoints are already addressed with #2232


Allow v-table :model to render re-frame subscriptions as well as reagent atoms?

Hi - I am unable to get v-table / simple-v-table to accept anything other than a "hard" reagent atom. Passing my re-frame subscription gets interpreted as a regular vector of maps, and putting my subscription result into an atom (while passing validation) renders as an empty vector would. Is there a workaround - maybe I am missing something?
Anyways - love the library! Cheers.

Thanks for the report @ryrobes 😄
By a

"hard" reagent atom

are you referring to reagent.ratom/atom and by

putting my subscription result into an atom

are you referring to a cljs.core/atom ?
If that is the case then I can confirm only the reagent.ratom/atom (usually abbreviated as r/atom) will work for :model for v-table or any other re-com component.
This is because reagent views need to keep track of derefs. There is some information available in the reagent documentation.
We successfully use re-frame subscriptions and r/atoms daily with v-table in our commercial applications so I don't think there is a bug with the code.
However I think there are at least two issues we do need to fix:

Documentation bug. The current v-table documentation at https://re-com.day8.com.au/#/v-table only mentions atom containing vec of maps and nothing about r/atom which is certainly confusing and I imagine what misled you ? Other components such as checkbox mention r/atom although that is still quite subtle. Is r/atom enough to point library users in the right direction ?

Validation bug. As you've rightly pointed out if r/atom is what is required and cljs.core/atom cannot work as expected then cljs.core/atom should fail validation, and it currently passes validation.

Those two issues together are a pretty brutal combination. We'd never have noticed this ourselves since it is more of a documentation issue so thank you for raising this issue otherwise I imagine quite a few users would continue struggling with this!

Appreciate the thoughtful response - yes, I meant an actual reagent atom (I think that your examples make that pretty clear actually), i.e. Forgive my lack of experience here - but generally in re-frame I will either deref the subscription in a let (probably a terrible practice), or do it inline, but am unable to get either of these methods to render.
i.e. (let [my-data @(rf/subscribe [::subs/my-data-fetching-sub]) and then :model my-data (which fails validation since it looks like a regular vector of maps), or even :model @(rf/subscribe [::subs/my-data-fetching-sub]) to be pedantic - or passing validation with something like :model (r/atom my-data) which passes, but doesn't properly render (and would possibly be hacky even if it did). In the rest of my code this generally works fine. I'm possibly missing something basic here, so apologies. :)
What is the pattern you use in this case? Again, appreciate it.

Update: I realize that I didn't make my request very succinctly before - can you please provide a small snippet or example of using a re-frame subscription to drive the :model (like you said happens in your other commercial projects)?

We do stuff like:
(defn foo-table
   (let [a @(rf/subscribe [::a])
          b (map-indexed ... a)]
     [rc/simple-v-table
        :model (-> b vec r/atom)]))

Thanks. I now realize now that my problem was my columns definition and not the sub data itself.  [Forehead Smack]
:model (reagent/atom my-sub-data) ; already a vector of uniform maps

Works fine.
Maybe make that key optional and if it doesn't exist generate a simple one, a la
:columns (into []
           (for [k (keys (get my-sub-data 0))]
              {:id k :header-label (str k) :row-label-fn k :width 150 :height 70}))

Regardless, closing this. Cheers.


chore(package): update kronos-test-interceptor to version 3.1.1

Coverage remained the same at 48.936% when pulling cf851c24726b2aa72501dc645dedb7c45fc8d06b on greenkeeper/kronos-test-interceptor-3.1.1 into 2ac7b434d1c5ceabc87283e4857bad28316ff0f1 on master.

Codecov Report

Merging #137 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #137   +/-   ##
=======================================
  Coverage   48.83%   48.83%
=======================================
  Files           2        2
  Lines          43       43
=======================================
  Hits           21       21
  Misses         22       22

Continue to review full report at Codecov.

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


Fix creating user with HR permissions

coverage: 88.12% (+0.007%) from 88.113% when pulling 522aee687627260ad174d0976c17e581e6baca6b on fix-user-create-as-hr into 83282a15cce458211c137b578c0be4c65a80ccb8 on main.


Javascript CustomHIDDeviceAccess

Hi,
Would that be possible to provide equivalent sample in Javascript?
I don't know if the equivalent API exist.
Thanks in advance

I don't think there's anything preventing this sample from being ported to JavaScript. Should be a straightforward conversion from C# and C++. Did you encounter any problems?

I put this on the feature team's backlog.

Thanks you raymond
Le 31 oct. 2017 17:56, "Raymond Chen"<EMAIL_ADDRESS>a écrit :

I put this on the feature team's backlog.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/Windows-universal-samples/issues/673#issuecomment-340828658,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIREkMorA66PrAP8uRiwqM2H_LvJtuNYks5sx1EigaJpZM4N1qjr
.

VS2019 no longer supports JavaScript UWP apps, sorry.


Card-builder documentation

Hi group,
Thanks for developing this tool!
To make this potential wide-audience tool more accessible to all, it would be great to see the card-builder documentation improved, specifically the local development section.  From my perspective (I very rarely work with Javascript), I see the main challenges as follows:

Running npm run build does not seem to work out of the box (I had to install esbuild and sass)
There is no clear instructions for how to run the two lines of JavaScript given
A developer wants to build a card from an md-file, but the instructions only show how to build a card from a single lined JavaScript string

Hello,
Thank you for checking out our resources and your mindful feedback!
I see two issues raised that need addressing:

To your first point, we could include a full list of dependencies in the README as a heads-up. I'll go through the installation process once more to confirm what's required before updating the README.
To your second and third point, I think the best thing we could do to improve clarity is to create a sample JS file that opens a given file and reads it. That'll take us some time, but we'll prioritize it and have it ready in the coming week or so. In the interim, one quick option is to use the Card Builder on the website to create a Data Card. You would just have to copy your Markdown file into the builder. But that way you don't have to use JS.

Unless you have any specific follow-ups, I'll create a separate issue for that sample JS file and will close this issue once I update the README to include the full list of dependencies.

Just a comment, I don't think updating the README.md with a full list of dependencies is a good idea because then you (and your maintainers) will have a duplication of truth (two lists of dependencies that you'll have to keep in sync, one in package.json and one in README.md).
Rather than that extra complexity, the dependencies should simply be maintained via the package.json, and the build script (ie. npm run build) should work out of the box as documented in the README.md.  This keeps your documentation and installation simple.
Do you mind if I create a corresponding pull request?
As for the last part, creating a template md file and html that runs the script would be great.  Please link the new issue here and I'll share a possible solution.
Thanks.

That's an excellent point! Yes, feel free to create a corresponding pull request. I'll review it.
I also created #17. Feel free to share your possible solution there.
Again, you have my gratitude.


20 concurrent kaniko buildruns creation time is much slower than 20 buildpack ones

When I tried to create 20 buildruns with kaniko v0.19 executor image, the average buildrun creation time is several hundreds seconds, sometime is 500+s, comparing to single kaniko buildrun creation time of 90+s.
As a comparison, when creating 20 buildruns with paketo buildpack, the average buildrun creation time is acceptable of within 100s, comparing to single paketo buildrun creation time of 40+s.
Kaniko build definition:
---
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
  name: ${build_name}
spec:
  source:
    url: https://github.com/SaschaSchwarze0/npm-simple
    contextDir: renamed
  strategy:
    name: kaniko
    kind: ClusterBuildStrategy
  dockerfile: RenamedDockerfile
  resources:
    limits:
      cpu: "1"
      memory: "1Gi"
  output:
    image: ${registry}/${build_name}
    credentials:
      name: icr-knbuild

buildpack buld definition:
---
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
  name: ${build_name}
  annotations:
    build.build.dev/build-run-deletion: "false"
spec:
  source:
    url: https://github.com/sclorg/nodejs-ex
  builder:
    image: gcr.io/paketo-buildpacks/builder:latest
  strategy:
    name: buildpacks-v3
    kind: ClusterBuildStrategy
  resources:
    limits:
      cpu: "1"
      memory: "1Gi"
  output:
    image: ${registry}/${build_name}
    credentials:
      name: icr-knbuild

@sbose78 you mentioned in our call yesterday that you have some experiences to share about Kaniko. May you do this? Thank you. Specifically, I'd be interested whether the layer caching has been considered. Using the warmer to cache base images looks like a more sophisticated task.

My assessment on the Kaniko caching capabilities and whether they can be applied in build. Kaniko has two types that it caches:

Layers: this cache is used to cache intermediate layers within a Dockerfile build as the Docker daemon would also do. The cache is enabled through the command line flag cache. There is a TTL configurable through the cache-ttl command line argument which has a default of two weeks.
Base layer caching: this cache is used to cache base images (FROM in Dockerfile). The cache is also enabled through the same cache command line flag. The kaniko warmer image needs to be run to add images to the cache.

Kaniko supports two storages for caching:

Registry cache (https://github.com/GoogleContainerTools/kaniko/blob/aeaea502e95a6b209a1d44922b260bb3e54f140d/pkg/cache/cache.go#L42-L93). Things are stored in a container registry. The location can be set through the cache-repo command line argument. It will fall back to the first destination.
Local cache (https://github.com/GoogleContainerTools/kaniko/blob/aeaea502e95a6b209a1d44922b260bb3e54f140d/pkg/cache/cache.go#L110-L136). Things are stored in the file system. The location can be set through the cache-dir command line argument, the default is /cache. For Kubernetes, it means that a persistent volume is required that is mounted to this path.

The current Kaniko code limits which storage is used for which cached artifact. The base layer caching only supports a local cache. This makes sense as caching base images just in another repository does not sound so reasonable. Intermediate layers are currently only supported to be cached in a registry cache. That's imo questionable. Caching those in a local cache is imo technically possible and reasonable. The code changes in Kaniko necessary to enable this are imo not complex. An issue exists, https://github.com/GoogleContainerTools/kaniko/issues/1272, but is not answered.
To support the one or other way in the build project, I brainstormed these things:
Important to note upfront is the scope of the caches that would be used. To allow isolation, a caching capability that we introduce should be supported cluster-wide, but also namespace-specific.
For the base layer caching, a persistent volume would be needed. Persistent volumes are cluster-scope resources. To enable namespace-isolation, one would need one persistent volume with reclaim policy delete for each namespace and a matching persistent volume claim in the namespace. Our current capabilities on (cluster) build strategies then would need to be extended. In the build strategy, the volumes section would need to be added. Those volumes then can be referenced in the volumeMounts of the buildSteps. Through that, the cache can be made available to the Kaniko executor. Interesting is the second part = the warming. When would that run? One could run it as part of the build run. We would need one step first that parses the Dockerfile to detect all base images and then pass this into another step, the kaniko warmer, to fill the cache. But then we would not win much.  This means that it would need to be filled and updated depending on the build itself. A concept that we have not in our controller so far.
For the intermediate layer caching we have three options:

Add a cache container registry to the Kaniko configuration (with secret). If this is provided in the build definition, then we set the Kaniko command line arguments --cache --cache-repo={user-provided}. This is probably not too complicated (beside the conditional command line arguments that we have not yet a mechanism in generate_taskrun). The user would then need to take care of cleaning up old cached layers. This option is not so nice as the user has to provide a repository for this caching purpose and administer it. Anyway, it is what Google Cloud Build is doing, see https://cloud.google.com/cloud-build/docs/kaniko-cache.
The build project manages a container registry (globally or namespace-specific) using either ephemeral storage (it is only for layer caching) or a persistent volume to store the layers through a Kubernetes Deployment. This registry would then need to be exposed to the kaniko executor pod. Secrets would need to be managed automatically. We would also need to take care of cleanup, especially if we use a persistent volume. This is a good user experience for the build user as he does not not need to do anything, but not trivial to implement.
We get the local cache support for the intermediate layer caching into Kaniko and then use this with a persistent volume as outlined for the base layer caching. Imo also a good user experience as the build user does not need to do anything.

Hi @SaschaSchwarze0 ,
Thanks for the investigation! It is really helpful.
I have some questions:

For the cluster scope build strategy, if we apply a volume, where it should be? I remember a PVC should be adhere in one namespace. But I think we can cache the base image because some common base images are used frequently
Don't prefer the cache container registry, who should own or paid for it (as it is a private registry), and the layers are more sensitive because it is related the user source code or info.

As I know, buildpacks may create a PVC in default namespace for some cache, I think we can also take a look that to see if we can leverage something:
✔ $ k get pv
kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                          STORAGECLASS                 REASON   AGE
pvc-3344b800-fd3b-47a7-9d12-991258ba7258   10Gi       RWO            Delete           Bound    default/buildpacks-cache-pvc   ibmc-vpc-block-10iops-tier            13d

jordan at jordandembp.cn.ibm.com in ~/Work/workspace/demo
✔ $ k get pvc -A
kubectl get pvc -A
NAMESPACE   NAME                   STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                 AGE
default     buildpacks-cache-pvc   Bound    pvc-3344b800-fd3b-47a7-9d12-991258ba7258   10Gi       RWO            ibmc-vpc-block-10iops-tier   13d

But anyway, about Cache enhancement, it should be a new big feature after release v0.1, and I think we have enhance it step by step. Such as start from base image, etc...

@SaschaSchwarze0
Options 1 and 2 are somewhat feasible on OpenShift via the internal registry and imagestreams. Based on the referenced docs, it is not clear to me how Kaniko pushes the intermediate layers. If the push happens using tags, then in theory pushing to an ImageStreamTag should work fine. However, if Kaniko is pushing raw blobs then ImageStreams won't work, as this is currently not supported.
Outside of openshift, providing our own registry is IMO beyond the scope of this project.
cc @dmage

@zhangtbj
Persistent volumes can only live on cluster scope. Only the persistent volume claim has namespace support. The idea of using a pre-filled base layer cache with well known base layers is a good idea. For this, we do not need to implement anything here in the build project, I think. Instead, we can handle this through documentation (where it is explained how to create a persistent volume, how this is filled with one or many images and how the cluster build strategy of Kaniko would need to be changed to use this cache. There is one problem with that, and that is with Kaniko. To start using this cache, one will need to start setting the --cache flag for the executor. This has the unfortunate side effect that the destination repository will be used to cache the intermediate layers. Hm, I am really not happy with Kaniko's caching params.
No matter which option we chose for the intermediate layer caching, we will need some persistent resource to store the layers. For a service that is providing the build capability, the payment needs to be clarified, that's clear.
Regarding what to start with. I should have mentioned the impact of the one or other cache:

the build layer cache is a small improvement in systems where network bandwidth is not a limit because the download of the base images during a Kaniko build really only is a small thing
the layer cache improves your build time way more

You can compare this with the local Dockerbuilds that you do. If you are missing the base layer locally, then it downloads it and often that goes quick assuming you have a good network connection. Having a Dockerfile with many steps on the other hand where the first steps are the installation of some prereqs that do not rely on your code but take a lot of time, can be greatly speeded up with intermediate layer caching.
--
@adambkaplan
Kaniko is pushing tags, yes. The image name is what is defined in the cache-repo command line argument with a fallback to the first destination command line argument suffixed with /cache. The tag name is calculated and is the cache key. See https://github.com/GoogleContainerTools/kaniko/blob/aeaea502e95a6b209a1d44922b260bb3e54f140d/pkg/executor/push.go#L269


added my name in website

added a file tirupati.json in src/data/contributors
{
   "name": "Tirupati Raman Mishra",
   "skills" : ["JS", "React"],
   "cause" : "empowering open source",
   "image" : "Avatar3",
   "github" : "https://github.com/trmofsln"
}

screenshot :

I have made the changes. Thank you for your review.


Set $fail within local scope for Ceph mons

This patch fixes the top-scope variable being used without an explicit namespace warning by setting $fail to true for
manifests/ceph/mon/mon_config.pp
Also set $fail explicitly in manifests/ceph/mon_config.pp
This closes issue #444

please test this


Add in cb specific styling

Created a CB specific style as the other ones were inconsistent depending on where you had cb.

Sweet. Does this fix the issue with uncenteredness of the icon? Can you screenshot?

Wooooo so much better

mmmmmm centery