Azure VM Extension Set error

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az vm extension set
Errors:
400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
python3.6/site-packages/requests/models.py, ln 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az vm extension set --resource-group {} --vm-name {} --name {} --publisher {} --version {} --settings {} --protected-settings {}

Expected Behavior
Environment Summary
Linux-4.15.0-1089-azure-x86_64-with-debian-stretch-sid
Python 3.6.10
Installer: DEB

azure-cli 2.8.0

Additional Context

hi @Newlearns did you meet the error in Cloudshell? If yes, could you pls try 'az login` to workaround? This is a known issue in Cloudshell #11749 . They're working on fixing.

Can we close this as a dupe of https://github.com/Azure/azure-cli/issues/11749 ?


Vulnerability roundup 111: open-policy-agent-0.34.0: 1 advisory [5.3]

search, files

[ ] CVE-2022-23628 CVSSv3=5.3 (nixos-21.11)

CVE details
CVE-2022-23628
OPA is an open source, general-purpose policy engine. Under certain conditions, pretty-printing an abstract syntax tree (AST) that contains synthetic nodes could change the logic of some statements by reordering array literals. Example of policies impacted are those that parse and compare web paths. All of these three conditions have to be met to create an adverse effect: 1. An AST of Rego had to be created programmatically such that it ends up containing terms without a location (such as wildcard variables). 2. The AST had to be pretty-printed using the github.com/open-policy-agent/opa/format package. 3. The result of the pretty-printing had to be parsed and evaluated again via an OPA instance using the bundles, or the Golang packages. If any of these three conditions are not met, you are not affected. Notably, all three would be true if using optimized bundles, i.e. bundles created with opa build -O=1 or higher. In that case, the optimizer would fulfil condition (1.), the result of that would be pretty-printed when writing the bundle to disk, fulfilling (2.). When the bundle was then used, we'd satisfy (3.). As a workaround users may disable optimization when creating bundles.

Scanned versions: nixos-21.11: 2128d0aa28e.
Cc @06kellyjac
Cc @kalbasit
Cc @nlewo

We no longer support nixos-21.11, but this has been fixed in the currently supported NixOS versions:

nixos-22.05: open-policy-agent-0.40.0
nixos-unstable: open-policy-agent-0.44.0


Unable to load a worklet's module.

I'm getting the following error while trying to load Spoiled in a Next.js app:
Uncaught (in promise) AbortError: Unable to load a worklet's module.

Adding blob: to the script CSP fixed 👍


Comment system for documentation...

Hi, I'm new with Godot, and I love open-source. Godot is the best thing ever that happened for me as someone who is trying to make 2D games for the first time. At first I didn't liked GDscript, but after using it for few days I'm starting to enjoy it.
My biggest problem with GDscripting is the lack of useful information/details in the web documentation.
When I search for .scale() I wish the website documentation could give me more information than this:

void scale ( Vector2 ratio )
Apply the ‘ratio’ scale to the 2D node, according to its current scale value.

Maybe for you guys this is informative enough, but for me it isn't, and I also don't see the difference between scale() and set_scale().
I'd love to read other people's opinion/experience/examples about certain function/topics/tutorials. For now I'm just following Youtube tutorials till I eventually find a video where someone shows how to properly use Scale() function.
I've read that you guys don't like "solutions" from users. But this is a idea for a feature request.
I really wish to see comment section for each API/function in Godot, something similar as PHP's documentation, A "guestbook" where people can share their experience and example codes with a simple comment. Integrate it with an upvotes and downvotes system, just like PHP's documentation to get most useful comments at top, and least useful stays bottom.
That way it's very easier and less scarier for people to contribute and talk about certain functions of Godot scripting API. Instead of going through Youtube video tutorials and spamming Reddit with questions.

Well, right now, the documentation is still a bit sparse -- some classes don't even have a "brief description"!
It would actually be nicer if documentation was understandable fully -- without the need for PHP-like comments. Those comments would probably just hide the issue of the documentation being bad, not just being a bit hard to implement.
So, we should actually choose if we should really go with comments, which would make editor docs nearly useless (at least without internet connect), and would also be a pain to implement "properly", or if we should go with more extensive (and somehow nicer to contribute to) documentation, particularly one with code examples and stuff (as already partly discussed in https://github.com/godotengine/godot-docs/issues/133)
So, to sum up, here is a "visual" difference between the two ideas presented by me:
Idea 1 (comments)
class Node2D
… (many many many methods here)
Method set_scale(scale)
Sets the scale of the node to scale.
… (many many many methods here)
Comments
… Many many many comments here

@somenamehere - Keep in mind that set_scale sets the "final" scale of the node directly (the thing you would see in the inspector), while scale multiplies the new scale by the current scale (like saying you would like to have in 2x bigger than the current size)

… Many many many comments here
Idea 2 (extensive (sometimes) documentation)
class Node2D
… (many many many methods here)
Method set_scale(scale)
Sets the scale of the node to scale.
Expand:

» Sets the scale factor of the node to some new scale. This makes the sized based on the initial size of the node, unlike scale(ratio) which would make the size based on the current size of the node
Code example:
extends Node2D
func example_scale():
  set_scale(Vector2(2, 2)) # Makes the Node2D twice bigger than initially
  set_scale(Vector2(6, 2)) # Makes the Node2D six times bigger on X and twice bigger on Y than initially
  set_scale(Vector2(1, 1)) # Resets the Node2D's size

… (many many many methods here)

I like the second, Qt does that too and it's really useful to get started on any class (even if it feels verbose for experienced people). Not all methods need full examples, and if you need just a quick look the doc is already split in two sections (brief summary of class, then details)

Maybe a comments system backed online documentation can be used as an easy to access platform for seeing how the community understands and explains Godot to each other. Comments and examples on this system may eventually be promoted to be part of extended documentation. Additional file for each class can be supplied in an extended documentation folder composed of promoted examples and detailed explanation with Godot to prevent need for always being online. This can be a separate download like export templates as well.
I am a php developer, so I know that comments below each function documentation is very useful to find how to start with using that function and possible outcomes.

Do docs become better just by adding comments to them? If docs need additional clarification comments documenting them, what is the point of having docs at all? I guess just having a forum where a few commited contributors just make topics about every new method as it comes out would be about as useful...
Still, the core issue we are looking at here is that the docs aren't useful enough -- there are many methods that don't seem to do exactly what is needed, some are too similar to others, some don't do a thing because you forgot to call something else (e.g. the Tween class), others are just documented too vaguely. Well, there have been multiple solutions to this problem -- either have some people writing docs "full-time", put the community somehow in charge of it, or just forget it.
Having people work on improving the docs is a pretty good idea, and it has led to some pretty good results so far (~30% to 52% percent of methods and constants documented).
The other idea, having the community work on the docs, is a bit harder, since most people might want to help, but they need a very simple to start with interface to motivate them, rather than a 10-step process done in more than 30 minutes.

The simplest idea for this is to make a "comments" section, to workaround the misfeatures of the docs. Sadly, this usually leads to having information be spread over too much volume, and thus harder to find. Also, this still won't fix the core issue fully, as the docs still won't be as complete as possible. Finally, if we download the comments to have them offline, we would actually be workarounding something introduced by a workaround -- totally not what we want to do.
A harder, but potentially better idea would be to make the docs easy to edit, and containing everything one might actually want to see or tell others about. This would include adding examples, long but obvious descriptions, more examples, and probably even translations. Also, this would include making a GUI (in godot?) for editing the docs more easily, as currently it is nearly a nightmare :smiley:.

Both of the last two solutions would probably include a slightly enhanced search system, so people can find the needed method faster.

Second option is a far better solution IMHO.
I was thinking about three stage documentation process when I think about comments backed documentation.

Get auto generated documentation from code
Add additional information like related functions, clarifications, examples by developers
Add best practices, known issues and troubleshooting, from community.

For 3.stage add a collaboration system (comments or co-editing) to documentation workflow. Then periodically cheery pick contributions which are good enough to enter documentation in 2.stage and delete the useless ones or move all to an archive. Repeat until documentation do not needs external contribuitons anymore (not 100% achievable may be, but worth trying :smile: ).
I think a manual forum will not match and automated system which is directly scanning code base for classes and related information.

@hubbyist Well, to be fair, we already have stage one and part of stages 2 and 3.
What is left IMHO is:

Change the docs to have examples and long descriptions and stuff

This would be a very good time to change the docs format and/or split them as per #3941

Update all documentation tools, especially the docstatus tool
Make a all-new editor for the docs

It might be done as a cli tool, or as a Godot game, or as a web tool (somehow)

Write docs, and tell the community how easy it is to write docs now

But, anyhow, I'm not sure if this should be closed as a dupe of https://github.com/godotengine/godot-docs/issues/133 and #3941 or if it should be retitled and probably linked into an all-new tracker. WDYT @godotengine/bugsquad ?

@bojidar-bg I personally think this issue should not be closed, there are couple interesting propositions here, and in some way those are about different aspects of creating documentation. https://github.com/godotengine/godot-docs/issues/133 is simply  about adding ability to separate function docs from class docs, while this one is more broad (and also have some propositions for https://github.com/godotengine/godot-docs/issues/133). I think we can just mention this issue (or concrete comment from this issue) at the beginning of the first post of https://github.com/godotengine/godot-docs/issues/133 What do you think?

@kubecz3k Sounds good.

@bojidar-bg I'm not a member of @godotengine/documentation so probably you or @StraToN will need to make those changes :)

You guys realise that I also mean comments for official Godot tutorial pages?
Imagine if I want to share an example project for this Godot tutorial: http://docs.godotengine.org/en/stable/tutorials/2d/cutout_animation.html
Is there a better place to share my own 2D skeleton example than beneath the tutorial itself? Sure I can post it somewhere in Reddit or Discord... but who need it probably won't find it.
Why is there rejection for comment system any way? In my opinion it's not that harmful at all. It makes the tutorials a tiny bit more interactive and more friendlier. People could talk about common (beginner) mistakes or tips, Something the documentation maintainer forgot, overlooked or perhaps thinks it's not worth it in official documentation.
You can have most advanced documentation, but it might still not be enough for some people. A great example is .NET documentation. Imo still less informative than PHP documentation...
The most important part of a comment system is the fact that it lowers the treshold for "noobs" (like me) to ask question about (a very) specific part of the documentation topic/tutorial.

@Qws Well, for asking questions there is the so-called QA site...

@Qws Well, for asking questions there is the so-called QA site...

Some method to merge documentation and QA into a integrated system may solve lots of problems it seems. Problem is information in community is scattered into multiple channels IMHO. So a web interface to unite all these channels may help.

Reading this thread I got the word "wiki" stuck in my mind.
If we want the community to write, comment, improve and ask questions in the documentation, the documentations should be in a wiki.
So, someone should run in the wiki marix and chose one.

@c-cesar We had wikies in the past, and they generally went underused and not very useful. Currently we are using ReadTheDocs, which means that you can edit/clone/etc. the documentation as you wish to in the godotengine/godot-docs repo.
But, the issue right now isn't so much about the tutorials/etc., but more about the class reference, which is currently a big blobby .xml file in this repo...

@c-cesar As @bojidar-bg stated, we chose ReadTheDocs instead of wiki solutions for multiple reasons. First, it's easier for developers to write docs in files than in page-editors. Of course we are also aware that this solution is not newbie-friendly (as writers have to learn git and Sphinx syntax, no wysiwyg) but it is also much easier to maintain and in the long term produces better-quality documentation.
About the main topic, I personally dislike comments on documentation pages. Very useful information usually lies there, but most of time few people ever read down there and only refer to documentation. As a result, users drop their tips and tricks in the comments and "hurrah! job's done, I shared great stuff". But also as a result, documentation doesn't improve as no one writes docs with this new stuff. No one wants to refer to comments as a documentation source, especially when there are thousands of comments on a single page - take PHP documentation as a good example for this.
I believe that if someone has a good information and wants to share it, he'd then better write a new page and/or edit an existing page and add his knowledge. If he can't/doesn't want, then he may simply put and issue here so everyone can see it before one writer adds it to the doc pages. That's how it works.

Randomly came across this. Isn't the only thing we need to do in order to close this issue the ability to add expandable regions into the makerst.py stuff for the XML documentation?

Is this issue still relevant today? The documentation has been improved significantly since this issue was opened.
Support for sending documentation feedback from the web page is being tracked in https://github.com/godotengine/godot-docs/issues/323, but I also think it's less relevant now that we have a "Request Docs" button in the editor help.


Skip function calls in ForbiddenThisArgumentRule

Fixes https://github.com/symplify/phpstan-rules/issues/15

Errors seem unrelated to the changes for me, but should be fixed now

Thank you :partying_face:


Make solidity pragma more open

Suggest to make the solidity praga something like pragma solidity ^0.8.17 rather than fixed.

closed by PR #9


Add missing mandatory selector in Deployment:apps/v1 spec

:wave: I did some ~awesome~ work for the Pelias project and would love for everyone to have a look at it and provide feedback.

Here's the reason for this change :rocket:

Connected to pelias/kubernetes#112

Here's what actually got changed :clap:

[x] Added spec.selector.matchLabels.app to deployment templates.

Here's how others can test the changes :eyes:

helm install --name pelias --namespace pelias ./ -f ./values.yaml
It results into a successful release

Thanks! I took care of a couple additional things and merged this as part of #128


Move to a dedicated GitHub org

This probably isn't necessary just yet, but soon we should move to a dedicated org.  Among other things, that allows "teams" and separates me from the project administration.  What milestone should we pin this to?

This is a good idea; and better to do now before there is much linking to the current location

Good point!

Well, that was easy.


add centroid calculator

Related Issuse

Info about Issue or bug

fix #1174
Describe the changes you've made
A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know!
Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.

Screenshots

Original
Updated

original screenshot
updated screenshot

@satyampgt4 I guess it is already present in the coordinate geometry calculator section.

@satyampgt4 I guess it is already present in the coordinate geometry calculator section.

@RaveenaBhasin thank you for reviewing my pull request
calculator given in coordinate geometry calculator section use vertex to find centroid
but in my calculator it use edges  to find centroid but by mistake i implement vertex  version
now  i have update my pr to implement  edges  version of centroid calculator


made sda and scl public for i2c interfaces

Made the sda and scl pins in the various I2c Pins struct public.
Closes #150

Please add this to the changelog.

Done. Also fixed a screwup. Apologies.
Will fix the MSRV break in a moment.

Nope. Fix did not work. Help figuring this out appreciated. MSRV workflow exits with status 101, no obvious log message I could see.

Looks like the version of fixed used by nrf51-hal requires Rust 1.78.0 even on feature embedded-hal-02. Bummer.
Shall we update the MSRV of this, or shall I try to get a fix in upstream?

Weird, what changed to break that? Personally I don't mind updating the MSRV, but I'd like to understand what caused it to break.

Looks like the version of fixed used in nrf-hal got bumped from 1.0.0 to 1.25.1 on 2024-03-06 when nrf-hal was being prepared for 0.18 release. The new fixed has an MSRV.


vendoring dependencies fix #301

Hello @rochacbruno! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file dynaconf/vendor/box/box.py:

Line 18:80: E501 line too long (109 > 79 characters)
Line 19:80: E501 line too long (89 > 79 characters)
Line 51:80: E501 line too long (87 > 79 characters)
Line 81:80: E501 line too long (117 > 79 characters)
Line 87:80: E501 line too long (97 > 79 characters)
Line 104:80: E501 line too long (95 > 79 characters)
Line 105:80: E501 line too long (114 > 79 characters)
Line 106:80: E501 line too long (105 > 79 characters)
Line 107:80: E501 line too long (90 > 79 characters)
Line 108:80: E501 line too long (80 > 79 characters)
Line 117:80: E501 line too long (102 > 79 characters)
Line 131:80: E501 line too long (97 > 79 characters)
Line 132:80: E501 line too long (115 > 79 characters)
Line 133:80: E501 line too long (106 > 79 characters)
Line 134:80: E501 line too long (91 > 79 characters)
Line 135:80: E501 line too long (81 > 79 characters)
Line 140:80: E501 line too long (103 > 79 characters)
Line 152:80: E501 line too long (101 > 79 characters)
Line 162:80: E501 line too long (120 > 79 characters)
Line 169:80: E501 line too long (81 > 79 characters)
Line 171:80: E501 line too long (83 > 79 characters)
Line 183:80: E501 line too long (90 > 79 characters)
Line 201:80: E501 line too long (84 > 79 characters)
Line 220:80: E501 line too long (102 > 79 characters)
Line 226:80: E501 line too long (82 > 79 characters)
Line 287:80: E501 line too long (85 > 79 characters)
Line 291:80: E501 line too long (114 > 79 characters)
Line 298:80: E501 line too long (97 > 79 characters)
Line 300:80: E501 line too long (93 > 79 characters)
Line 301:80: E501 line too long (108 > 79 characters)
Line 303:80: E501 line too long (82 > 79 characters)
Line 310:80: E501 line too long (96 > 79 characters)
Line 313:80: E501 line too long (91 > 79 characters)
Line 314:80: E501 line too long (80 > 79 characters)
Line 315:80: E501 line too long (105 > 79 characters)
Line 323:80: E501 line too long (115 > 79 characters)
Line 324:80: E501 line too long (103 > 79 characters)
Line 351:80: E501 line too long (86 > 79 characters)
Line 358:80: E501 line too long (101 > 79 characters)
Line 360:80: E501 line too long (80 > 79 characters)
Line 369:80: E501 line too long (97 > 79 characters)
Line 374:80: E501 line too long (101 > 79 characters)
Line 389:80: E501 line too long (107 > 79 characters)
Line 391:80: E501 line too long (80 > 79 characters)
Line 422:80: E501 line too long (82 > 79 characters)
Line 492:80: E501 line too long (120 > 79 characters)
Line 524:80: E501 line too long (91 > 79 characters)
Line 535:80: E501 line too long (87 > 79 characters)
Line 575:80: E501 line too long (105 > 79 characters)
Line 577:80: E501 line too long (91 > 79 characters)
Line 579:80: E501 line too long (80 > 79 characters)
Line 581:80: E501 line too long (105 > 79 characters)
Line 592:80: E501 line too long (107 > 79 characters)
Line 595:80: E501 line too long (107 > 79 characters)
Line 613:80: E501 line too long (101 > 79 characters)
Line 616:80: E501 line too long (105 > 79 characters)
Line 619:80: E501 line too long (115 > 79 characters)
Line 631:80: E501 line too long (97 > 79 characters)
Line 635:80: E501 line too long (107 > 79 characters)
Line 638:80: E501 line too long (89 > 79 characters)
Line 652:80: E501 line too long (113 > 79 characters)
Line 654:80: E501 line too long (104 > 79 characters)
Line 657:80: E501 line too long (106 > 79 characters)
Line 666:80: E501 line too long (92 > 79 characters)
Line 669:80: E501 line too long (82 > 79 characters)
Line 686:80: E501 line too long (103 > 79 characters)

In the file dynaconf/vendor/box/box_list.py:

Line 11:80: E501 line too long (85 > 79 characters)
Line 23:80: E501 line too long (95 > 79 characters)
Line 34:80: E501 line too long (93 > 79 characters)
Line 38:80: E501 line too long (95 > 79 characters)
Line 54:80: E501 line too long (93 > 79 characters)
Line 59:80: E501 line too long (116 > 79 characters)
Line 64:80: E501 line too long (114 > 79 characters)
Line 80:80: E501 line too long (112 > 79 characters)
Line 94:80: E501 line too long (88 > 79 characters)
Line 134:80: E501 line too long (92 > 79 characters)
Line 147:80: E501 line too long (118 > 79 characters)
Line 151:80: E501 line too long (111 > 79 characters)
Line 154:80: E501 line too long (118 > 79 characters)
Line 177:80: E501 line too long (99 > 79 characters)
Line 181:80: E501 line too long (80 > 79 characters)
Line 192:80: E501 line too long (97 > 79 characters)
Line 213:80: E501 line too long (113 > 79 characters)
Line 215:80: E501 line too long (98 > 79 characters)
Line 218:80: E501 line too long (117 > 79 characters)
Line 229:80: E501 line too long (104 > 79 characters)
Line 232:80: E501 line too long (93 > 79 characters)
Line 251:80: E501 line too long (103 > 79 characters)
Line 256:80: E501 line too long (80 > 79 characters)
Line 260:80: E501 line too long (81 > 79 characters)
Line 261:80: E501 line too long (82 > 79 characters)

In the file dynaconf/vendor/box/config_box.py:

Line 20:80: E501 line too long (101 > 79 characters)
Line 33:80: E501 line too long (103 > 79 characters)

In the file dynaconf/vendor/box/converters.py:

Line 18:80: E501 line too long (115 > 79 characters)
Line 24:80: E501 line too long (80 > 79 characters)
Line 43:80: E501 line too long (83 > 79 characters)
Line 48:80: E501 line too long (91 > 79 characters)
Line 53:80: E501 line too long (110 > 79 characters)
Line 69:80: E501 line too long (109 > 79 characters)
Line 74:80: E501 line too long (90 > 79 characters)
Line 76:80: E501 line too long (83 > 79 characters)
Line 79:80: E501 line too long (93 > 79 characters)
Line 102:80: E501 line too long (83 > 79 characters)
Line 118:80: E501 line too long (113 > 79 characters)
Line 122:80: E501 line too long (91 > 79 characters)
Line 131:80: E501 line too long (80 > 79 characters)

In the file dynaconf/vendor/box/from_file.py:

Line 46:80: E501 line too long (90 > 79 characters)
Line 48:80: E501 line too long (94 > 79 characters)
Line 69:80: E501 line too long (97 > 79 characters)
Line 76:80: E501 line too long (98 > 79 characters)

In the file dynaconf/vendor/box/shorthand_box.py:

Line 12:80: E501 line too long (107 > 79 characters)

In the file dynaconf/vendor/click/_bashcomplete.py:

Line 128:80: E501 line too long (80 > 79 characters)
Line 218:80: E501 line too long (86 > 79 characters)
Line 225:80: E501 line too long (81 > 79 characters)
Line 304:80: E501 line too long (85 > 79 characters)
Line 317:80: E501 line too long (84 > 79 characters)

In the file dynaconf/vendor/click/_compat.py:

Line 11:80: E501 line too long (84 > 79 characters)
Line 69:80: E501 line too long (84 > 79 characters)
Line 219:80: E501 line too long (80 > 79 characters)
Line 274:80: E501 line too long (84 > 79 characters)
Line 285:80: E501 line too long (84 > 79 characters)
Line 299:80: E501 line too long (84 > 79 characters)
Line 306:80: E501 line too long (85 > 79 characters)
Line 313:80: E501 line too long (85 > 79 characters)
Line 321:80: E501 line too long (87 > 79 characters)
Line 328:80: E501 line too long (88 > 79 characters)
Line 335:80: E501 line too long (88 > 79 characters)
Line 342:80: E501 line too long (83 > 79 characters)
Line 367:80: E501 line too long (82 > 79 characters)
Line 557:80: E501 line too long (80 > 79 characters)
Line 596:80: E501 line too long (81 > 79 characters)
Line 597:80: E501 line too long (84 > 79 characters)
Line 598:80: E501 line too long (84 > 79 characters)

In the file dynaconf/vendor/click/_termui_impl.py:

Line 114:80: E501 line too long (80 > 79 characters)
Line 189:80: E501 line too long (82 > 79 characters)
Line 319:80: E501 line too long (80 > 79 characters)
Line 437:80: E501 line too long (83 > 79 characters)
Line 467:80: E501 line too long (83 > 79 characters)

In the file dynaconf/vendor/click/_unicodefun.py:

Line 22:80: E501 line too long (80 > 79 characters)

In the file dynaconf/vendor/click/_winconsole.py:

Line 130:80: E501 line too long (80 > 79 characters)
Line 170:80: E501 line too long (83 > 79 characters)
Line 240:46: E203 whitespace before ':'

In the file dynaconf/vendor/click/core.py:

Line 39:80: E501 line too long (82 > 79 characters)
Line 44:80: E501 line too long (87 > 79 characters)
Line 603:80: E501 line too long (85 > 79 characters)
Line 740:80: E501 line too long (86 > 79 characters)
Line 1080:80: E501 line too long (83 > 79 characters)
Line 1205:80: E501 line too long (81 > 79 characters)
Line 1599:80: E501 line too long (80 > 79 characters)
Line 1703:80: E501 line too long (80 > 79 characters)
Line 1780:80: E501 line too long (87 > 79 characters)
Line 1809:80: E501 line too long (81 > 79 characters)
Line 1810:80: E501 line too long (88 > 79 characters)
Line 1814:80: E501 line too long (80 > 79 characters)
Line 1848:80: E501 line too long (85 > 79 characters)
Line 1885:80: E501 line too long (87 > 79 characters)
Line 1887:80: E501 line too long (83 > 79 characters)
Line 1891:80: E501 line too long (83 > 79 characters)
Line 1919:80: E501 line too long (82 > 79 characters)
Line 1928:80: E501 line too long (80 > 79 characters)
Line 2003:80: E501 line too long (83 > 79 characters)
Line 2027:80: E501 line too long (80 > 79 characters)

In the file dynaconf/vendor/click/decorators.py:

Line 81:80: E501 line too long (80 > 79 characters)
Line 184:80: E501 line too long (80 > 79 characters)
Line 287:80: E501 line too long (83 > 79 characters)

In the file dynaconf/vendor/click/exceptions.py:

Line 55:80: E501 line too long (83 > 79 characters)
Line 114:80: E501 line too long (82 > 79 characters)
Line 142:80: E501 line too long (80 > 79 characters)
Line 159:80: E501 line too long (80 > 79 characters)

In the file dynaconf/vendor/click/formatting.py:

Line 26:80: E501 line too long (86 > 79 characters)
Line 158:80: E501 line too long (85 > 79 characters)
Line 218:80: E501 line too long (82 > 79 characters)
Line 225:80: E501 line too long (82 > 79 characters)

In the file dynaconf/vendor/click/parser.py:

Line 79:20: E203 whitespace before ':'
Line 79:46: E203 whitespace before ':'
Line 116:80: E501 line too long (88 > 79 characters)
Line 234:80: E501 line too long (81 > 79 characters)
Line 246:80: E501 line too long (85 > 79 characters)
Line 328:80: E501 line too long (85 > 79 characters)

In the file dynaconf/vendor/click/termui.py:

Line 55:80: E501 line too long (80 > 79 characters)
Line 170:80: E501 line too long (86 > 79 characters)
Line 238:80: E501 line too long (81 > 79 characters)
Line 254:80: E501 line too long (86 > 79 characters)
Line 559:80: E501 line too long (88 > 79 characters)

In the file dynaconf/vendor/click/testing.py:

Line 65:80: E501 line too long (85 > 79 characters)
Line 88:80: E501 line too long (80 > 79 characters)
Line 97:80: E501 line too long (80 > 79 characters)
Line 125:80: E501 line too long (85 > 79 characters)

In the file dynaconf/vendor/click/types.py:

Line 192:80: E501 line too long (80 > 79 characters)
Line 225:80: E501 line too long (88 > 79 characters)
Line 244:80: E501 line too long (88 > 79 characters)
Line 301:80: E501 line too long (80 > 79 characters)
Line 307:80: E501 line too long (83 > 79 characters)
Line 324:80: E501 line too long (81 > 79 characters)
Line 367:80: E501 line too long (80 > 79 characters)
Line 373:80: E501 line too long (83 > 79 characters)
Line 429:80: E501 line too long (81 > 79 characters)
Line 472:80: E501 line too long (84 > 79 characters)
Line 479:80: E501 line too long (80 > 79 characters)
Line 494:80: E501 line too long (83 > 79 characters)
Line 586:80: E501 line too long (82 > 79 characters)
Line 599:80: E501 line too long (82 > 79 characters)
Line 605:80: E501 line too long (83 > 79 characters)
Line 611:80: E501 line too long (83 > 79 characters)
Line 689:80: E501 line too long (80 > 79 characters)

In the file dynaconf/vendor/click/utils.py:

Line 92:80: E501 line too long (86 > 79 characters)
Line 119:80: E501 line too long (84 > 79 characters)
Line 297:80: E501 line too long (80 > 79 characters)
Line 313:80: E501 line too long (80 > 79 characters)
Line 323:80: E501 line too long (82 > 79 characters)
Line 381:80: E501 line too long (82 > 79 characters)

In the file dynaconf/vendor/dotenv/__init__.py:

Line 2:80: E501 line too long (86 > 79 characters)
Line 15:80: E501 line too long (94 > 79 characters)

In the file dynaconf/vendor/dotenv/cli.py:

Line 8:80: E501 line too long (82 > 79 characters)
Line 23:80: E501 line too long (100 > 79 characters)
Line 26:80: E501 line too long (120 > 79 characters)
Line 100:80: E501 line too long (102 > 79 characters)

In the file dynaconf/vendor/dotenv/compat.py:

Line 30:80: E501 line too long (88 > 79 characters)
Line 43:80: E501 line too long (84 > 79 characters)

In the file dynaconf/vendor/dotenv/ipython.py:

Line 4:80: E501 line too long (84 > 79 characters)
Line 23:80: E501 line too long (81 > 79 characters)

In the file dynaconf/vendor/dotenv/main.py:

Line 59:80: E501 line too long (84 > 79 characters)
Line 60:80: E501 line too long (90 > 79 characters)
Line 61:80: E501 line too long (80 > 79 characters)
Line 77:80: E501 line too long (110 > 79 characters)
Line 87:80: E501 line too long (85 > 79 characters)
Line 207:80: E501 line too long (100 > 79 characters)
Line 233:80: E501 line too long (93 > 79 characters)
Line 238:80: E501 line too long (92 > 79 characters)
Line 283:80: E501 line too long (87 > 79 characters)
Line 306:80: E501 line too long (106 > 79 characters)
Line 307:80: E501 line too long (108 > 79 characters)
Line 308:80: E501 line too long (84 > 79 characters)
Line 312:80: E501 line too long (102 > 79 characters)
Line 313:80: E501 line too long (103 > 79 characters)
Line 317:80: E501 line too long (120 > 79 characters)
Line 320:80: E501 line too long (92 > 79 characters)

In the file dynaconf/vendor/toml/decoder.py:

Line 260:80: E501 line too long (80 > 79 characters)
Line 462:80: E501 line too long (80 > 79 characters)
Line 471:80: E501 line too long (80 > 79 characters)
Line 474:80: E501 line too long (80 > 79 characters)


Creating tenants fails

Description
On a fresh install of Debian 10, creation of new tenants fails. No nginx vhost file is created, and /etc/init.d/nginx configtest also fails. I've added www-data to /etc/sudoers.d/www-data, and restarted both nginx and php7.3-fpm.
For reference, I followed https://medium.com/@alexleeelkins/multi-tenant-laravel-on-ubuntu-18-04-with-nginx-mariadb-and-php-7-3-a09377ef440f

Actual behavior
$ php artisan tenancy:make-tenant test

   Symfony\Component\Process\Exception\ProcessFailedException  : The command "/etc/init.d/nginx configtest" failed.

Exit Code: 1(General error)

Working directory: /home/thomas/projects/laravel/src

Output:
================
Testing nginx configuration: failed!

Error Output:
================

  at /home/thomas/projects/laravel/src/vendor/symfony/process/Process.php:254
    250|      */
    251|     public function mustRun(callable $callback = null, array $env = [])
    252|     {
    253|         if (0 !== $this->run($callback, $env)) {
  > 254|             throw new ProcessFailedException($this);
    255|         }
    256|
    257|         return $this;
    258|     }

  Exception trace:

  1   Symfony\Component\Process\Process::mustRun()
      /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Generators/Webserver/Vhost/NginxGenerator.php:95

  2   Hyn\Tenancy\Generators\Webserver\Vhost\NginxGenerator::testConfiguration()
      /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Generators/Webserver/Vhost/NginxGenerator.php:74

  Please use the argument -v to see more details.

A record is created in the hostnames table, but no vhost file is generated and the above error occurs.
Expected behavior
Successful creation of a new tenant including vhost file.

Information

hyn/multi-tenant version: ^5.5
laravel version: ^6.0
database driver and version: mysql 8.0.17
webserver software and version: nginx/1.14.2
php version: php-fpm 7.3

tenancy.php config
<?php

/*
 * This file is part of the hyn/multi-tenant package.
 *
 * (c) Daniël Klabbers<EMAIL_ADDRESS> *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see https://tenancy.dev
 * @see https://github.com/hyn/multi-tenant
 */

use Hyn\Tenancy\Database\Connection;

return [
    /**
     * Random key used for tenant database user password
     */
    'key' => env('TENANCY_KEY', env('APP_KEY')),

    'models' => [
        /**
         * Specify different models to be used for the global, system database
         * connection. These are also used in their relationships. Models
         * used have to implement their respective contracts and
         * either extend the SystemModel or use the trait
         * UsesSystemConnection.
         */

        // Must implement \Hyn\Tenancy\Contracts\Hostname
        'hostname' => \Hyn\Tenancy\Models\Hostname::class,

        // Must implement \Hyn\Tenancy\Contracts\Website
        'website' => \Hyn\Tenancy\Models\Website::class
    ],
    /**
     * The package middleware. Removing a middleware here will disable it.
     * You can of course extend/replace them or add your own.
     */
    'middleware' => [
        // The eager identification middleware.
        \Hyn\Tenancy\Middleware\EagerIdentification::class,

        // The hostname actions middleware (redirects, https, maintenance).
        \Hyn\Tenancy\Middleware\HostnameActions::class,
    ],
    'website' => [
        /**
         * Each website has a short random hash that identifies this entity
         * to the application. By default this id is randomized and fully
         * auto-generated. In case you want to force your own logic for
         * when you need to have a better overview of the complete
         * tenant folder structure, disable this and implement
         * your own id generation logic.
         */
        'disable-random-id' => false,

        /**
         * The random Id generator is responsible for creating the hash as mentioned
         * above. You can override what generator to use by modifying this value
         * in the configuration.
         *
         * @warn This won't work if disable-random-id is true.
         */
        'random-id-generator' => Hyn\Tenancy\Generators\Uuid\ShaGenerator::class,

        /**
         * Enable this flag in case you're using a driver that does not support
         * database username or database name with a length of more than 32 characters.
         *
         * This should be enabled for MySQL, but not for MariaDB and PostgreSQL.
         */
        'uuid-limit-length-to-32' => env('LIMIT_UUID_LENGTH_32', false),

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant specific files, including media, packages, routes and other
         * files for this particular website.
         *
         * @info If not set, will revert to the default filesystem.
         * @info If set to false will disable all tenant specific filesystem auto magic
         *       like the config, vendor overrides.
         */
        'disk' => null,

        /**
         * Automatically generate a tenant directory based on the random id of the
         * website. Uses the above disk to store files to override system-wide
         * files.
         *
         * @info set to false to disable.
         */
        'auto-create-tenant-directory' => true,

        /**
         * Automatically rename the tenant directory when the random id of the
         * website changes. This should not be too common, but in case it happens
         * we automatically want to move files accordingly.
         *
         * @info set to false to disable.
         */
        'auto-rename-tenant-directory' => true,

        /**
         * Automatically deletes the tenant specific directory and all files
         * contained within.
         *
         * @see
         * @info set to true to enable.
         */
        'auto-delete-tenant-directory' => false,

        /**
         * Time to cache websites in minutes. Set to false to disable.
         */
        'cache' => 10,
    ],
    'hostname' => [
        /**
         * If you want the multi tenant application to fall back to a default
         * hostname/website in case the requested hostname was not found
         * in the database, complete in detail the default hostname.
         *
         * @warn this must be a FQDN, these have no protocol or path!
         */
        'default' => env('TENANCY_DEFAULT_HOSTNAME'),
        /**
         * The package is able to identify the requested hostname by itself,
         * disable to get full control (and responsibility) over hostname
         * identification. The hostname identification is needed to
         * set a specific website as currently active.
         *
         * @see src/Jobs/HostnameIdentification.php
         */
        'auto-identification' => env('TENANCY_AUTO_HOSTNAME_IDENTIFICATION', true),

        /**
         * In case you want to have the tenancy environment set up early,
         * enable this flag. This will run the tenant identification
         * inside a middleware. This will eager load tenancy.
         *
         * A good use case is when you have set "tenant" as the default
         * database connection.
         */
        'early-identification' => env('TENANCY_EARLY_IDENTIFICATION', true),

        /**
         * Abort application execution in case no hostname was identified. This will throw a
         * 404 not found in case the tenant hostname was not resolved.
         */
        'abort-without-identified-hostname' => env('TENANCY_ABORT_WITHOUT_HOSTNAME', false),

        /**
         * Time to cache hostnames in minutes. Set to false to disable.
         */
        'cache' => 10,

        /**
         * Automatically update the app.url configured inside Laravel to match
         * the tenant FQDN whenever a hostname/tenant was identified.
         *
         * This will resolve issues with password reset mails etc using the
         * correct domain.
         */
        'update-app-url' => true,
    ],
    'db' => [
        /**
         * The default connection to use; this overrules the Laravel database.default
         * configuration setting. In Laravel this is normally configured to 'mysql'.
         * You can set a environment variable to override the default database
         * connection to - for instance - the tenant connection 'tenant'.
         */
        'default' => env('TENANCY_DEFAULT_CONNECTION'),
        /**
         * Used to give names to the system and tenant database connections. By
         * default we configure 'system' and 'tenant'. The tenant connection
         * is set up automatically by this package.
         *
         * @see src/Database/Connection.php
         * @var system-connection-name The database connection name to use for the global/system database.
         * @var tenant-connection-name The database connection name to use for the tenant database.
         */
        'system-connection-name' => env('TENANCY_SYSTEM_CONNECTION_NAME', Connection::DEFAULT_SYSTEM_NAME),
        'tenant-connection-name' => env('TENANCY_TENANT_CONNECTION_NAME', Connection::DEFAULT_TENANT_NAME),

        /**
         * The tenant division mode specifies to what database websites will be
         * connecting. The default setup is to use a new database per tenant.
         * If using PostgreSQL, a new schema per tenant in the same database can
         * be setup, by optionally setting division mode to 'schema'.
         * In case you prefer to use the same database with a table prefix,
         * set the mode to 'prefix'.
         * To implement a custom division mode, set this to 'bypass'.
         *
         * @see src/Database/Connection.php
         */
        'tenant-division-mode' => env('TENANCY_DATABASE_DIVISION_MODE', 'database'),

        /**
         * The database password generator takes care of creating a valid hashed
         * string used for tenants to connect to the specific database. Do
         * note that this will only work in 'division modes' that set up
         * a connection to a separate database.
         */
        'password-generator' => Hyn\Tenancy\Generators\Database\DefaultPasswordGenerator::class,

        /**
         * The tenant migrations to be run during creation of a tenant. Specify a directory
         * to run the migrations from. If specified these migrations will be executed
         * whenever a new tenant is created.
         *
         * @info set to false to disable auto migrating.
         *
         * @warn this has to be an absolute path, feel free to use helper methods like
         * base_path() or database_path() to set this up.
         */
        'tenant-migrations-path' => database_path('migrations/customers'),

        /**
         * The default Seeder class used on newly created databases and while
         * running artisan commands that fire seeding.
         *
         * @info requires tenant-migrations-path in order to seed newly created websites.
         * @info seeds stored in `database/seeds/tenants` need to be configured in your composer.json classmap.
         *
         * @warn specify a valid fully qualified class name.
         */
        'tenant-seed-class' => false,
//      eg an admin seeder under `app/Seeders/AdminSeeder.php`:
//        'tenant-seed-class' => App\Seeders\AdminSeeder::class,

        /**
         * Automatically generate a tenant database based on the random id of the
         * website.
         *
         * @info set to false to disable.
         */
        'auto-create-tenant-database' => true,

        /**
         * Automatically generate the user needed to access the database.
         *
         * @info Useful in case you use root or another predefined user to access the
         *       tenant database.
         * @info Only creates in case tenant databases are set to be created.
         *
         * @info set to false to disable.
         */
        'auto-create-tenant-database-user' => true,

        /**
         * Set of database privileges to give to the tenant database user.
         *
         * @info Useful in case your database restricts the privileges you
         *       can set (for example AWS RDS).
         * @info These privileges are only used in case tenant database users
         *       are set to be created.
         *
         * @info null by default means "ALL PRIVILEGES". Override with a list
         *       of privileges as a string, e.g. 'SELECT, UPDATE'.
         */
        'tenant-database-user-privileges' => null,

        /**
         * Automatically rename the tenant database when the random id of the
         * website changes. This should not be too common, but in case it happens
         * we automatically want to move databases accordingly.
         *
         * @info set to false to disable.
         */
        'auto-rename-tenant-database' => true,

        /**
         * Automatically deletes the tenant specific database and all data
         * contained within.
         *
         * @info set to true to enable.
         */
        'auto-delete-tenant-database' => env('TENANCY_DATABASE_AUTO_DELETE', false),

        /**
         * Automatically delete the user needed to access the tenant database.
         *
         * @info Set to false to disable.
         * @info Only deletes in case tenant database is set to be deleted.
         */
        'auto-delete-tenant-database-user' => env('TENANCY_DATABASE_AUTO_DELETE_USER', false),

        /**
         * Define a list of classes that you wish to force onto the tenant or system connection.
         * The connection will be forced when the Model has booted.
         *
         * @info Useful for overriding the connection of third party packages.
         */
        'force-tenant-connection-of-models' => [
//            App\User::class
        ],
        'force-system-connection-of-models' => [
//            App\User::class
        ],
    ],

    /**
     * Global tenant specific routes.
     * Making it easier to distinguish between landing and tenant routing.
     *
     * @info only works with `tenancy.hostname.auto-identification` or identification happening
     *       before the application is booted (eg inside middleware or the register method of
     *       service providers).
     */
    'routes' => [
        /**
         * Routes file to load whenever a tenant was identified.
         *
         * @info Set to false or null to disable.
         */
        'path' => base_path('routes/tenants.php'),

        /**
         * Set to true to flush all global routes before setting the routes from the
         * tenants.php routes file.
         */
        'replace-global' => false,
    ],

    /**
     * Folders configuration specific per tenant.
     * The following section relates to configuration to files inside the tenancy/<uuid>
     * tenant directory.
     */
    'folders' => [
        'config' => [
            /**
             * Merge configuration files from the config directory
             * inside the tenant directory with the global configuration files.
             */
            'enabled' => true,

            /**
             * List of configuration files to ignore, preventing override of crucial
             * application configurations.
             */
            'blacklist' => ['database', 'tenancy', 'webserver'],
        ],
        'routes' => [
            /**
             * Allows adding and overriding URL routes inside the tenant directory.
             */
            'enabled' => true,

            /**
             * Prefix all tenant routes.
             */
            'prefix' => null,
        ],
        'trans' => [
            /**
             * Allows reading translation files from a trans directory inside
             * the tenant directory.
             */
            'enabled' => true,

            /**
             * Will override the global translations with the tenant translations.
             * This is done by overriding the laravel default translator with the new path.
             */
            'override-global' => true,

            /**
             * In case you disabled global override, specify a namespace here to load the
             * tenant translation files with.
             */
            'namespace' => 'tenant',
        ],
        'vendor' => [
            /**
             * Allows using a custom vendor (composer driven) folder inside
             * the tenant directory.
             */
            'enabled' => true,
        ],
        'media' => [
            /**
             * Mounts the assets directory with (static) files for public use.
             */
            'enabled' => true,
        ],
        'views' => [
            /**
             * Enables reading views from tenant directories.
             */
            'enabled' => true,

            /**
             * Specify a namespace to use with which to load the views.
             *
             * @eg setting `tenant` will allow you to use `tenant::some.blade.php`
             * @info set to null to add to the global namespace.
             */
            'namespace' => null,

            /**
             * If `namespace` is set to null (thus using the global namespace)
             * make it override the global views. Disable by setting to false.
             */
            'override-global' => true,
        ]
    ]
];

webserver.php config
<?php

/*
 * This file is part of the hyn/multi-tenant package.
 *
 * (c) Daniël Klabbers<EMAIL_ADDRESS> *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see https://tenancy.dev
 * @see https://github.com/hyn/multi-tenant
 */

return [

    /**
     * Apache2 is one of the most widely adopted webserver packages available.
     *
     * @see http://httpd.apache.org/docs/
     * @see https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu
     */
    'apache2' => [
        /**
         * Whether the integration with Apache2 is currently active.
         */
        'enabled' => false,

        /**
         * Define the ports of your Apache service.
         */
        'ports' => [
            /**
             * HTTP, non-SSL port.
             *
             * @default 80
             */
            'http' => 80,
            /**
             * HTTPS, SSL port.
             *
             * @default 443
             */
            'https' => 443
        ],

        /**
         * The generator taking care of hooking into the Apache services and files.
         */
        'generator' => \Hyn\Tenancy\Generators\Webserver\Vhost\ApacheGenerator::class,

        /**
         * The view that holds the vhost configuration template.
         */
        'view' => 'tenancy.generators::webserver.apache.vhost',

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant vhost configuration files.
         *
         * @info If not set, will revert to the default filesystem.
         */
        'disk' => null,

        'paths' => [

            /**
             * Location where vhost configuration files can be found.
             */
            'vhost-files' => [
                '/etc/apache2/sites-enabled/'
            ],

            /**
             * Actions to run to work with the Apache2 service.
             */
            'actions' => [
                /**
                 * Action that asserts Apache2 is installed.
                 */
                'exists' => '/etc/init.d/apache2',
                /**
                 * Action to run to test the apache configuration.
                 *
                 * @set to a boolean to force the response of the test command.
                 * @info true succeeds, false fails
                 */
                'test-config' => 'apache2ctl -t',
                /**
                 * Action to run to reload the apache service.
                 *
                 * @info set to null to disable reloading.
                 */
                'reload' => 'apache2ctl graceful'
            ]
        ]
    ],

    /**
     * Nginx webserver support.
     *
     * @see http://nginx.org
     */
    'nginx' => [
        /**
         * Whether the integration with nginx is currently active.
         */
        'enabled' => true,

        /**
         * The php sock to be used.
         */
        'php-sock' => 'unix:/var/run/php/php7.3-fpm.sock',

        /**
         * Define the ports of your nginx service.
         */
        'ports' => [
            /**
             * HTTP, non-SSL port.
             *
             * @default 80
             */
            'http' => 80,
            /**
             * HTTPS, SSL port.
             *
             * @default 443
             */
            'https' => 443
        ],

        /**
         * The generator taking care of hooking into the nginx services and files.
         */
        'generator' => \Hyn\Tenancy\Generators\Webserver\Vhost\NginxGenerator::class,

        /**
         * The view that holds the vhost configuration template.
         */
        'view' => 'tenancy.generators::webserver.nginx.vhost',

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant vhost configuration files.
         *
         * @info If not set, will revert to the default filesystem.
         */
        'disk' => null,

        'paths' => [

            /**
             * Location where vhost configuration files can be found.
             */
            'vhost-files' => [
                '/home/thomas/projects/laravel/src/app/tenancy/webserver/nginx'
            ],

            /**
             * Actions to run to work with the Nginx service.
             */
            'actions' => [
                /**
                 * Action that asserts nginx is installed.
                 */
                'exists' => 'sudo /etc/init.d/nginx',
                /**
                 * Action to run to test the nginx configuration.
                 *
                 * @info set to a boolean to force the response of the test command.
                 *  true succeeds, false fails
                 */
                'test-config' => 'sudo /etc/init.d/nginx configtest',
                /**
                 * Action to run to reload the nginx service.
                 *
                 * @info set to null to disable reloading.
                 */
                'reload' => 'sudo /etc/init.d/nginx reload'
            ]
        ]
    ]
];

Error log
[2019-10-05 18:54:27] local.ERROR: The command "/etc/init.d/nginx configtest" failed.

Exit Code: 1(General error)

Working directory: /home/thomas/projects/laravel/src

Output:
================
Testing nginx configuration: failed!

Error Output:
================
 {"exception":"[object] (Symfony\\Component\\Process\\Exception\\ProcessFailedException(code: 0): The command \"/etc/init.d/nginx configtest\" failed.

Exit Code: 1(General error)

Working directory: /home/thomas/projects/laravel/src

Output:
================
Testing nginx configuration: failed!

Error Output:
================
 at /home/thomas/projects/laravel/src/vendor/symfony/process/Process.php:254)
[stacktrace]
#0 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Generators/Webserver/Vhost/NginxGenerator.php(95): Symfony\\Component\\Process\\Process->mustRun()
#1 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Generators/Webserver/Vhost/NginxGenerator.php(74): Hyn\\Tenancy\\Generators\\Webserver\\Vhost\\NginxGenerator->testConfiguration()
#2 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Listeners/Servant.php(86): Hyn\\Tenancy\\Generators\\Webserver\\Vhost\\NginxGenerator->reload()
#3 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Listeners/Servant.php(181): Hyn\\Tenancy\\Listeners\\Servant->Hyn\\Tenancy\\Listeners\\{closure}(Object(Hyn\\Tenancy\\Generators\\Webserver\\Vhost\\NginxGenerator), 'nginx', Array)
#4 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php(176): Hyn\\Tenancy\\Listeners\\Servant->Hyn\\Tenancy\\Listeners\\{closure}(Array, 'nginx')
#5 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Listeners/Servant.php(182): Illuminate\\Support\\Collection->each(Object(Closure))
#6 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Listeners/Servant.php(88): Hyn\\Tenancy\\Listeners\\Servant->each(Object(Closure))
#7 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(347): Hyn\\Tenancy\\Listeners\\Servant->generate(Object(Hyn\\Tenancy\\Events\\Websites\\Created))
#8 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(196): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Hyn\\\\Tenancy\\\\Eve...', Array)
#9 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Traits/DispatchesEvents.php(29): Illuminate\\Events\\Dispatcher->dispatch('Hyn\\\\Tenancy\\\\Eve...', Array)
#10 /home/thomas/projects/laravel/src/vendor/hyn/multi-tenant/src/Repositories/WebsiteRepository.php(97): Hyn\\Tenancy\\Repositories\\WebsiteRepository->emitEvent(Object(Hyn\\Tenancy\\Events\\Websites\\Created))
#11 /home/thomas/projects/laravel/src/app/Tenant.php(42): Hyn\\Tenancy\\Repositories\\WebsiteRepository->create(Object(Hyn\\Tenancy\\Models\\Website))
#12 /home/thomas/projects/laravel/src/app/Console/Commands/CreateTenant.php(42): App\\Tenant::create('test.')
#13 [internal function]: App\\Console\\Commands\\CreateTenant->handle()
#14 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#15 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Support/helpers.php(522): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#16 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): value(Object(Closure))
#17 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#18 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(591): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#19 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Console/Command.php(202): Illuminate\\Container\\Container->call(Array)
#20 /home/thomas/projects/laravel/src/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#21 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Console/Command.php(189): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#22 /home/thomas/projects/laravel/src/vendor/symfony/console/Application.php(915): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#23 /home/thomas/projects/laravel/src/vendor/symfony/console/Application.php(272): Symfony\\Component\\Console\\Application->doRunCommand(Object(App\\Console\\Commands\\CreateTenant), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#24 /home/thomas/projects/laravel/src/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Console/Application.php(90): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#26 /home/thomas/projects/laravel/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#27 /home/thomas/projects/laravel/src/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#28 {main}
"}

@thomasjost I'm working through this same problem. Did you happen to find a solution?

@emaclean03 I found a workaround, though the fix isn't ideal for production use.
#www-data ALL=(ALL:ALL) NOPASSWD: /etc/init.d/nginx configtest, /usr/sbin/service nginx configtest, /usr/sbin/service nginx reload
www-data ALL=(ALL:ALL) NOPASSWD: ALL

I wrote a blog about this as there were a couple other things I had to do, you can read it at: https://www.thomasjost.com/php/laravel/2019/12/31/visudo.html
I'm not keen on retyping everything else that I discuss in the blog here, though.
I actually wound up going a different route as well as I uncovered some scalability issues with multi-tenancy built this way -- I'd recommend you think carefully about going this route as well.


FIX: brain colormap lookup table

This PR fixes a very specific issue that appears during automatic calculation of the colormap in STCs when the data values of fmin and fmax are too close. It forces the allocation of an abnormally huge array for the lookup table that ultimately causes a crash.
Does it work for you on this PR @hoechenberger?

@GuillaumeFavelier This indeed fixes the memory issue with my data, thank you!
The resulting brain colorization is not super useful though (just one color across the entire brain), but I assume this is to be expected and I need to look into / scale the values I'm plotting. If anything, this would be something to address in a followup PR. For now, I'm happy the memory issue is gone!

@hoechenberger please merge and backport
thx 🙏

I pushed 68d58e3 to use np.isclose(fmax, fmin, rtol=1e-6, atol=0)

@GuillaumeFavelier Just checked and with the altered isclose() params, it still works. :)
Could you please add a short changelog entry?
Then it's good to merge once CI comes back green.

Thank you, @GuillaumeFavelier!


Share your device's random ids message is displayed in En when in Fr (iOS)

iPhone XR version 13.5.1
Province = Ontario
Bluetooth and Notifications are on
language = French
From the menu, selected the Diagnosed with COVID19?
Entered valid 8 digit code (valid)
clicked Submit
Share your device's random ids with COVID Alert? pop up appears.
Expected result - pop up should be in French.

@JuliannaR it is fine to close


615 fuji runner external file

change-log

Added support for assessment using FAIR EVA app
Added support for file logging system
Added support for timeout - retry for all API Calls
Added support for file input of one or more sitemaps to assess
Added support for file input of one or more studies (same or different SP) to assess
Added support for assessing studies of CDC Staging Env (currently only F-UJI API)
Added support for saving failed studies to a file and re-assess them before script ends
Added support for inputting Service Provider sitemaps beside CESSDA (previous version only run on CDC sitemap by default)
Added (studyNumber, Publisher) to CSV for scores comparison, obtained by CDC Internal AP

@john-shepherdson Could you take a look?


Improved Comparator and Modifier Handling

Hello! First off, this project looks great. Thanks for the work so far.
I'm curious if there is any appetite for:

External Contributions
Improvement on the comparator/modifier implementation.

I was  evaluating this library for potential use but noticed that the comparison logic doesn't really comply with the Sigma specification. Specifically, it does not support the globbing patterns in standard field comparisons. I was also looking to see if we could customize this comparison logic because we have some internal requirements that may change the way rules are evaluated.
I'm currently working on some changes that would add a Comparator interface type which allows users of the library to implement their own comparison logic for a RuleEvaluator (and incidentally allow users to extend the library to support other modifiers or disallow certain modifiers). Right now, this looks something like this:
// Compare an expected value to a value found within an event
type CompareFunc func(value interface{}, expected interface{}) bool

type Comparator interface {
	// The base comparator with no modifiers
	Base(value interface{}, expected interface{}) bool
	// Retrieve the comparator for a given set of (possibly empty) modifiers.
	Get(modifiers []string) (CompareFunc, error)
}

With a default implementation which supports the same modifiers as the current implementation, but also adds support for globbing as defined by the spec. It is also a little more concrete, as it uses type-switching to verify the value and expected value types rather than farming out to fmt.Sprintf("%v") (which, imho, could produce unexpected/unwanted results for users who don't understand why/how their types are converting/matching/not matching).
In summary: Is there any appetite for potentially merging an interface like this? Or do you have any notes on the idea which may make the potential future PR more mergable from your perspective? I'm not super far into implementation or anything (basic structure is done, but I haven't done any serious testing yet). I just didn't see any contribution guidelines, and wanted to get a gut check before going to deep into the effort. Thanks! :)

Hey @calebstewart! In short, yes, external collaborators would definitely be welcomed :)

but noticed that the comparison logic doesn't really comply with the Sigma specification

Yeah the spec is so large (and sometimes vaguely defined) that I just tried to implement the smallest subset and expand it as we ran into missing features we needed.
The comparator implementation specifically is quite sketchy: I've currently written it as this chaining of functions system but it's not exactly clear to me if that's always valid (e.g. currently you can try to stack contains and re which won't make any sense)
There's also the new gt and lt operators which would be very useful to implement but will require some sort of type coercion
Are you able to share your use cases for custom comparators?

Sorry for the delay on getting back to you here!
I think the biggest custom comparator use-case I had was the case where an event field contains an array of data. I don't believe this is covered in the Sigma spec at all, but the logical solution that we use is that a field comparison with an array matches if any of the field elements match the given value (e.g. it's treated as an OR against all field elements). As an example, if we had an event that looked like:
{
  "field": [
    "first",
    "second"
    "third"
  ]
}

And a selector that looked like:
selector1:
  field: "second"

Then it would still match. I'm not sure if that's the same behavior everyone would expect, but that is how we have treated the situation. I imagine there are other corner-cases to the comparison that may be different depending on who is using the library, so that's why I suggested a custom comparison implementation.
What we have ended up doing is implementing a pseudo "compilation" layer on top of this package, which pre-compiles the expression(s) and search(es) to golang coroutines, and then simply executes the coroutines when evaluation is requested for an event. This has a couple benefits:

The compiler is flexible. It allows the user to override the core comparison logic prior to compilation as well as add or remove specific modifiers.
Patterns in field comparisons can be pre-compiled (e.g. regular expressions) to simplify evaluation.
It's faster since each search or expression results in a relatively small and simple coroutine with the static arguments/values/patterns already bound to the coroutine.
Allowed us to implement the other comparison features we needed (e.g. keyword matching, faster glob matching, and caseless default comparison).

In the end, we ended up not using the evaluator that is built-in to this library. I would love to eventually discuss merging the compiler upstream, but as it's part of an internal project currently, I'm not sure about the possibility or process there internally. I'll get back to you on that if it's still relevant once our project matures a bit and we can revisit that possibility.
In summary, I don't think it makes sense for me to attempt to implement what I discussed above due to the direction we ended up heading with our project, but I think giving a library user the flexibility to customize the evaluation of events against rules is still valuable. The Sigma specification is geared to the format and intent of the rule itself, and largely ignores direct evaluation since it focuses on converting the rules to a backend which has it's own concrete process for evaluation that differ between backends. With that in mind, the sigma-go evaluator has essentially become a custom "backend" from Sigma's point of view and can define it's own evaluation process separate from the specification (although in this case ideally close to it, obviously).

Ah that array use case is absolutely something we're using this library for at @monzo
To support it, sigma-go takes some liberties with Sigma's fieldmapping support and let's you use jsonpath expressions. So for your example you could have a config like so:
fieldmappings:
    field: $.field[*]

Which would then make your example rule work as expected. Internally this is essentially as if you flattened the array and had a config:
fieldmappings:
    field:
        - field_0
        - field_1
        - field_2
        - ....

In the end, we ended up not using the evaluator that is built-in to this library

Ah so you've got something built on top of the AST that this library outputs? Neat! I did wonder about an approach like that: evaluators optimised for speed in specific cases vs the current generic evaluator
Appreciate the challenges of open sourcing what you've implemented but, if you're able, I'd love to chat privately about what you've built! Sounds very cool. I'm<EMAIL_ADDRESS>if you're up for it 🙂


PDF loads perfectly, works in both orientations on iOS, but not on Android

Hey! First of all, thank you for developing this plugin.
I use it to load a remote PDF from a URL. Everything works perfectly fine on iOS.
Even on Android PDF loads in one orientation. However, on orientation change (from landscape to portrait or from portrait to landscape), it throws a white blank screen. Rotating in any orientation on Android gives a blank screen. Initially on page load, everything works fine.

I've found a workaround. Basically you have to listen to window size changes and rebuild PdfViewer for every change.
Do the following:

Use mixin WidgetsBindingObserver and implement method didChangeMetrics()
In that method feed a StreamController or rxdart Subject with WidgetsBinding.instance.window.physicalSize
Wrap your PdfViewer with a StreamBuilder, something like this:

StreamBuilder<Size>(
  stream: referenceToStreamControllerOrSubject,
  initialData: Size.zero,
  builder: (_, snapshot) => PdfViewer(
    key: ObjectKey(snapshot.data.toString()),
    filePath: someFilePath
  )
)

Works in Android, iOS still not checked.

There's a much simpler way to achieve the same effect:
OrientationBuilder(
  builder: (_, orientation) => PdfViewer(
    key: ObjectKey(orientation),
    filePath: someFilePath
  )
)

This issue was fixed on version 2.0.0


Added message for the case when no devices are available

Related issue
Fixes #27
Description
I have added a Text widget for this task, along with a state variable _isListEmpty and conditional rendering. If after loading, there are no devices, then the Text is shown else the list of devices is shown

@sanket143 please review this. Also, the changes in pubspec.lock weren't made by me, they were automatically made I think :sweat_smile: should I revert them?

give @ritvij14 25 points


How to create a custom event listener for Respond.js

I want run script after respond loaded. but not solution. I try setTimeout but it not good solution. thank all

I know you asked this ages ago, but I wanted to do the same thing recently, so thought I'd reply with my solution. I had to edit the original source file though.
The bulk of the work is triggered by the makeRequests function. So I edited it to this:
makeRequests = function(){
    if( requestQueue.length ){
        var thisRequest = requestQueue.shift();
        ajax( thisRequest.href, function( styles ){
            translate( styles, thisRequest.href, thisRequest.media );
            parsedSheets[ thisRequest.href ] = true;
            w.setTimeout(function(){ makeRequests(); },0);
        });
    } else {
        if (typeof respond.onComplete === 'function') {
            respond.onComplete();
        }
    }
}

Then, after your script reference to respond.js, in your own script file you can include everything you need in the onComplete function. I use it to trigger a custom jQuery event which I can re-use:
if (typeof window.respond !== 'undefined') {
    window.respond.onComplete = function () {
        $(window).trigger('respondReady');
    };
}

Then, whenever I need to, I just use:
$(window).on('respondReady', function () {
    // do something
});


can not work for object detection model

I tried to use distiller for my cascade rcnn model but it did not work for me and i need some help.
I used AGP pruning method and followed the schedule introduced in the guide doc to change my training code, and the backbone resnet50(used in senet model) parameters were selected to prune. However in the process the total sparsity just was 0. It failed. What is the problem and how should i adjust??
in epoch loop:

in train function：

when i want to see the mask info, i get this error:

i don't know why the mask is not working and i think the masks are set when epoch begin.
ps: i just can't see any model compression project support object detection, including distiller and pocketflow? Why? What is the difference between object detection problems  and classification model when we try to compress them ??
looking forward to you answer~3q

Hi @Jakel21,
From the error you get on line 400, it is evident that self.compression_scheduler" is None.  This is the AttributeError``` that you receive.
Did you instantiate the scheduler and give it the pruning schedule? -- I don't see it in the code that you pasted.
Cheers,
Neta

Hi @Jakel21,
From the error you get on line 400, it is evident that self.compression_scheduler" is None. This is the AttributeError``` that you receive.
Did you instantiate the scheduler and give it the pruning schedule? -- I don't see it in the code that you pasted.
Regarding your question about support for pruning object-detectors: traditionally most of the research (but not all) about model compression has (and is) performed on image classifiers. It's mostly a matter of convenience I think. There's no particular reason Distiller doesn't support compression of object detectors except for priorities. As far as I know, some people using Distiller have used it to compress object-detection models, but I can't be sure. We'd love it if someone from the community contributed an example.
Cheers,
Neta

Thanks for the reply~
my compress scheduler looks like this:
version: 1
pruners:
fc_pruner:
class: AutomatedGradualPruner
initial_sparsity: 0.0
final_sparsity: 0.75
weights: [
module.backbone.model.layer1.0.se_module.fc1.weight,
module.backbone.model.layer1.0.se_module.fc2.weight,
module.backbone.model.layer1.1.se_module.fc1.weight,
module.backbone.model.layer1.1.se_module.fc2.weight,
module.backbone.model.layer1.2.se_module.fc1.weight,
module.backbone.model.layer1.2.se_module.fc2.weight,
module.backbone.model.layer2.0.se_module.fc1.weight,
module.backbone.model.layer2.0.se_module.fc2.weight,
module.backbone.model.layer2.1.se_module.fc1.weight,
module.backbone.model.layer2.1.se_module.fc2.weight,
module.backbone.model.layer2.2.se_module.fc1.weight,
module.backbone.model.layer2.2.se_module.fc2.weight,
module.backbone.model.layer2.3.se_module.fc1.weight,
module.backbone.model.layer2.3.se_module.fc2.weight,
module.backbone.model.layer3.0.se_module.fc1.weight,
module.backbone.model.layer3.0.se_module.fc2.weight,
module.backbone.model.layer3.1.se_module.fc1.weight,
module.backbone.model.layer3.1.se_module.fc2.weight,
module.backbone.model.layer3.2.se_module.fc1.weight,
module.backbone.model.layer3.2.se_module.fc2.weight,
module.backbone.model.layer3.3.se_module.fc1.weight,
module.backbone.model.layer3.3.se_moduel.fc2.weight,
module.backbone.model.layer3.4.se_module.fc1.weight,
module.backbone.model.layer3.4.se_module.fc2.weight,
module.backbone.model.layer3.5.se_module.fc1.weight,
module.backbone.model.layer3.5.se_module.fc2.weight,
module.backbone.model.layer4.0.se_module.fc1.weight,
module.backbone.model.layer4.0.se_module.fc2.weight,
module.backbone.model.layer4.1.se_module.fc1.weight,
module.backbone.model.layer4.1.se_module.fc2,weight,
module.backbone.model.layer4.2.se_module.fc1.weight,
module.backbone.model.layer4.2.se_module.fc2.weight]
conv_pruner:
class: AutomatedGradualPruner
initial_sparsity: 0.0
final_sparsity: 0.75
weights: [
module.backbone.model.layer0.conv1.weight,
module.backbone.model.layer1.0.conv1.weight,
module.backbone.model.layer1.0.conv2.weight,
module.backbone.model.layer1.0.conv3.weight,
module.backbone.model.layer1.0.downsample.0.weight,
module.backbone.model.layer1.1.conv1.weight,
module.backbone.model.layer1.1.conv2.weight,
module.backbone.model.layer1.1.conv3.weight,
module.backbone.model.layer1.2.conv1.weight,
module.backbone.model.layer1.2.conv2.weight,
module.backbone.model.layer1.2.conv3.weight,
module.backbone.model.layer2.0.conv1.weight,
module.backbone.model.layer2.0.conv2.weight,
module.backbone.model.layer2.0.conv3.weight,
module.backbone.model.layer2.0.downsample.0.weight,
module.backbone.model.layer2.1.conv1.weight,
module.backbone.model.layer2.1.conv2.weight,
module.backbone.model.layer2.1.conv3.weight,
module.backbone.model.layer2.2.conv1.weight,
module.backbone.model.layer2.2.conv2.weight,
module.backbone.model.layer2.2.conv3.weight,
module.backbone.model.layer2.3.conv1.weight,
module.backbone.model.layer2.3.conv2.weight,
module.backbone.model.layer2.3.conv3.weight,
module.backbone.model.layer3.0.conv1.weight,
module.backbone.model.layer3.0.conv2.weight,
module.backbone.model.layer3.0.downsample.0.weight,
module.backbone.model.layer3.1.conv1.weight,
module.backbone.model.layer3.1.conv2.weight,
module.backbone.model.layer3.1.conv3.weight,
module.backbone.model.layer3.2.conv1.weight,
module.backbone.model.layer3.2.conv2.weight,
module.backbone.model.layer3.2.conv3.weight,
module.backbone.model.layer3.3.conv1.weight,
module.backbone.model.layer3.3.conv2.weight,
module.backbone.model.layer3.3.conv3.weight,
module.backbone.model.layer3.4.conv1.weight,
module.backbone.model.layer3.4.conv2.weight,
module.backbone.model.layer3.4.conv3.weight,
module.backbone.model.layer3.5.conv1.weight,
module.backbone.model.layer3.5.conv2.weight,
module.backbone.model.layer3.5.conv3.weight,
module.backbone.model.layer4.0.conv1.weight,
module.backbone.model.layer4.0.conv2.weight,
module.backbone.model.layer4.0.conv3.weight,
module.backbone.model.layer4.0.downsample.0.weight,
module.backbone.model.layer4.1.conv1.weight,
module.backbone.model.layer4.1.conv2.weight,
module.backbone.model.layer4.1.conv3.weight,
module.backbone.model.layer4.2.conv1.weight,
module.backbone.model.layer4.2.conv2.weight,
module.backbone.model.layer4.2.conv3.weight]
policies:

pruner:
instance_name: conv_pruner
starting_epoch: 0
ending_epoch: 50
frequency: 1

pruner:
instance_name: fc_pruner
starting_epoch: 0
ending_epoch: 50
frequency: 1

and i  config the scheduler at the first part of my code:

is there any problem in my config scheduler file or my process of the config? i just follow the introduction guide of the word language model in examples.

Hi @Jakel21,
The schedule and the instantiation of self.compression_scheduler look good.  However, from the error you sent:
https://user-images.githubusercontent.com/20606275/57422731-c67d8180-7243-11e9-8938-7ed3a27291c5.png
It is evident that self.compression_scheduler is None.  If this is not clear to you, here is the simplest way to reproduce the error message:
>>> a = None
>>> a.zeros_mask_dict
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'zeros_mask_dict'

I haven't used mmdetection and I don't know how you integrated Distiller, so without seeing the entire code, I don't think I can help further.
Cheers,
Neta

Hi @Jakel21,
The schedule and the instantiation of self.compression_scheduler look good. However, from the error you sent:
https://user-images.githubusercontent.com/20606275/57422731-c67d8180-7243-11e9-8938-7ed3a27291c5.png
It is evident that self.compression_scheduler is None. If this is not clear to you, here is the simplest way to reproduce the error message:
>>> a = None
>>> a.zeros_mask_dict
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'zeros_mask_dict'

I haven't used mmdetection and I don't know how you integrated Distiller, so without seeing the entire code, I don't think I can help further.
Cheers,
Neta

i will work on it and try to make it work. Thanks for the help anyway.

try this:
if compression_scheduler is None:                                                                                compression_scheduler = distiller.CompressionScheduler(model)

BTW, @levzlotnik is adding an example for pruning object detectors.  This will be shared on github in a couple of weeks I hope.
Cheers,
Neta

I'm working on them as well, lemme know if need any assistance! @levzlotnik

Hi @Jakel21,
The schedule and the instantiation of self.compression_scheduler look good. However, from the error you sent:
https://user-images.githubusercontent.com/20606275/57422731-c67d8180-7243-11e9-8938-7ed3a27291c5.png
It is evident that self.compression_scheduler is None. If this is not clear to you, here is the simplest way to reproduce the error message:
>>> a = None
>>> a.zeros_mask_dict
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'zeros_mask_dict'

I haven't used mmdetection and I don't know how you integrated Distiller, so without seeing the entire code, I don't think I can help further.
Cheers,
Neta

i will work on it and try to make it work. Thanks for the help anyway.

Hey dude. Have you solved this problem?

Hey guys, I am working on the torchvision object detection sample at the moment, hopefully will push it soon.

Hey guys, I am working on the torchvision object detection sample at the moment, hopefully will push it soon.

Hello, how is it now?

Hi,
Closing this issue since the object detection example has been added several months ago, so please refer to it.


Attribute named model renders the actual AR model

Is this a bug? If not, how do I get around this without renaming this attribute?

Yes, this is a bug. It'll be a day or so before I can look into a solution.

I'm changing my stance that this is a bug. I forgot we had reserved the attribute name of model but only emit a warning, not explicitly prohibiting the method. We should probably look at renaming the internal attribute named model to allow it to be used as an attribute. Until that happens I'm not sure there's a great workaround.

I can look into this, I need it for my app.

Thanks again @ggordon

You're welcome.


Remove leading space from keywords.txt identifier

The Arduino IDE requires the use of a single true tab separator between the keyword name and identifier. When spaces are used rather than a true tab the keyword is not highlighted.
Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords

Have you tried raising this with the Arduino team?  Strikes me as an obvious robustness bug on their side - "be generous with your inputs and strict with your outputs".
AFAICS there is no ambiguity here - KEYWORD is subject to C language's naming convention and so can contain no whitespace; KEYWORD_TOKENTYPE is a fixed string which cannot contain whitespace.  To refuse all but a very specific whitespace is pointless pedantic on their part.
(I'm not blaming you, obviously, just suggesting we fix this in one place rather than in every Arduino library that has been written!)

Yes, the issue has been raised (https://github.com/arduino/Arduino/pull/7245), but no good solution was settled on and there has not been any recent progress. It's a bit more complicated than you make it out to be because there are multiple fields and it's necessary to support empty fields. How are you going to do that while allowing arbitrary numbers of spaces?
Personally, I don't find simply following the specification so onerous but there are many hundreds of libraries with bad keywords.txt formatting so this is certainly a significant issue. Even after I submit a PR to fix bad formatting, I often find when I come back a few months later that it's been broken again. People seem incapable of resisting their OCD urges to line everything up all pretty.

keywords.txt syntax is a real hot mess, I wish I could undo reading about that :)
I don't think KEYWORD or either of the two competing TOKENTYPE can contain whitespace.  Can REFERENCE_LINK contain whitespace?
if not then a more robust parser would be to trim and then split by all whitespace, then based on the number of items:

2: you've got keyword + token, well defined
4: you've got everything, well defined
3: you've got either a new style token or a REFERENCE_LINK, but we can validate by seeing if the value is in KNOWN_TOKEN_TYPES (if it is we have a token, if it isn't we have a REFERENCE_LINK).

I'd probably also change it so that we only ask for a single TOKENTYPE and it can contain either new or old format (they are mutually exclusive, so no ambiguity).
Anyway, if you'd rather I just approve this and forget about it then I'm happy to do that :D

Can REFERENCE_LINK contain whitespace?

I just did a test, and yes it can. Currently the reference links all point to official Arduino reference pages and Arduino does not use spaces in those filenames. There is an official plan to allow documentation to be bundled with Arduino libraries and it's my hope that this will allow 3rd party library authors to use the REFERENCE_LINK field to links to their own bundled documentation. I don't think it would be a problem to just not support spaces in reference page filenames, as long as that's made clear in the documentation.

if not then a more robust parser would be to trim and then split by all whitespace, then based on the number of items

I think it's a reasonable proposal. It does certainly make the keywords.txt parsing code more complex but considering that around 2000 libraries had incorrect keywords.txt, I think smarter code is worth the extra maintenance burden.
It is currently possible to leave the KEYWORD_TOKENTYPE field empty, and I have seen a couple libraries that do this, but not many. As Arduino IDE 1.6.4 is pretty ancient now I think people will find it kind of ridiculous to need to fill that field when they update to the new four field format since RSYNTAXTEXTAREA_TOKENTYPE overrides it in any newer IDE version but it's worth doing it if only to avoid having another confusing empty field to maintain.

I'd probably also change it so that we only ask for a single TOKENTYPE and it can contain either new or old format (they are mutually exclusive, so no ambiguity).

I really don't like this bolted on RSYNTAXTEXTAREA_TOKENTYPE field. That's just super hacky and they didn't even bother to document it. Even the lead Arduino developer was hazy on what it was for. I ended up having to just figure it out through trial and error in order to document it in the Arduino library specification. I believe the idea was to provide backwards compatibility with Arduino IDE 1.6.4 and older, before the switch to using RSyntaxTextArea. But I think the solution was to simply continue using the old tokens. Maybe there are some good reasons why that wouldn't be possible but I can't image what they would be. Now we have this situation where less than 1% of libraries use the new tokens and the old tokens don't provide the same highlighting as they did in old IDE versions. People already have enough trouble getting two fields right so four fields, one of which is empty, would definitely be a disaster.

Anyway, if you'd rather I just approve this and forget about it then I'm happy to do that

I'm glad people are thinking about it. I personally don't have the ability to fix this problem in the IDE's Java code so my solution to the problem has been to submit a bunch of PRs to libraries with incorrect keywords.txt formatting with links to the specification in the hopes that this will bring some collective awareness to the Arduino community but I also understand that a more intelligent alternative would be to simply change a few lines of code in the Arduino IDE.
The elephant in the room is that we shouldn't need to have a keywords.txt file at all. The IDE should automatically detect keywords. It's terrible how every keyword for every installed library is highlighted, regardless of whether your code is using that library and how that word is used.


Proposal: G.isFinite

Since isNumber currently only checks if the value is a number or infinity.
function px (value: number | string) {
  if (G.isNumber(value)) return `${value}px`
  return px
}

px(1/0) // "Infinitypx"

// Proposal:
G.isFinite(1/0) // false

To be clear this does not actually add a new type guard since infinity is a number in javascript and typescript does not make the distinction.

Hi. I made a PR to resolve this issue. please have a look and let me know if it's right.


Add External Links

https://developer.shortcut.com/api/rest/v3#External-Link
Add support on stories

I don't really understand why anyone would want this, but added as a feature it shall be


dispose of trimmer controller in the example.

After disposing of the "trimmer_view" in the example folder. Dispose of the trimmer controller too.

I had tested this earlier, disposing the trimmer here would cause the final trimming process to fail in certain cases. That's why I have moved the dispose() call to lib/src/video_viewer.dart file.

I had tested this earlier, disposing the trimmer here would cause the final trimming process to fail in certain cases. That's why I have moved the dispose() call to lib/src/video_viewer.dart file.

So the trimmer is disposed of after all.. That's all I was worried about.. if it is not disposed of. I was concerned about a memory leak. IF it is disposed of, then no issue here.
Good job @sbis04.


Documentation clarification request: Explain why we need both self and super

I'm learning nixos. I found the description of overlays a bit unsatisfying, it seems natural for the reader to be curious as to why both self and super are necessary, my guess is that super will tend to contain everything that self does? but it isn't explained, and it's quite difficult to guess.
The OOP language "self" and "super" are confusing, given that we haven't been told what type the object is, what it inherits, nor even the name of whatever method this is supposed to be. I don't think a function can be understood as a method if we never handle the object they're supposedly part of, when they're just being passed around as a first class function.

Okay, I think this page https://nixos.wiki/wiki/Overlays addresses what's missing from the description pretty directly! Should the description link to this specific page instead of just gesturing towards the entire nixpkgs documentation?
I'd be inclined to rename self and super to originalpkgs and overlayedpkgs but I'll report back after I've thought more about the functional inheritance analogy, methods are packages, packages are called with nixpkgs so I concede it might really make sense to call the input pkgs self (everywhere). It's still confusing to call first class functions methods, but maybe this is always what methods are in the functional world.


Feature Request - Open ID

Sign in using Google, Facebook, or another OpenID system.
http://blog.codinghorror.com/openid-does-the-world-really-need-yet-another-username-and-password/

Definitely needed. This was part of my original goals for GoKibitz, but I deliberately dropped it when the project was stalling and I had to figure out an absolutely minimum viable product to go alpha with. Thanks for adding this issue: I can't promise a timeline on this, but I would definitely like to get it done.


Jbaker/arrow keys open bib

Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes: #142
Summary:
Up and down arrow keys now open the bib.
Type of change:
Please delete options that are not relevant.

[x] New capability
[ ] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 3 committers have signed the CLA.:white_check_mark: jordanjones243:white_check_mark: jason-capsule42:x: semantic-release-botYou have signed the CLA already but the status is still pending? Let us recheck it.

:tada: This PR is included in version 2.8.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Compiler reports error without respecting --report=json flag

I was testing Sublime build integration against Hassan's checkerboard demo. I moved Counter.elm to widgets/Counter.elm. Instead of returning JSON elm-make fed back plain text. I'm working around it in my error parser. On an aside I'm also confused why the compiler can't find the module there. Here's the generated command:
elm-make Main.elm --output=build/Main.html --report=json --yes

In the elm-package.json file, is widgets/ listed under source-directories? If not, it can't know to look there. If you just search arbitrary subtrees, you may be following symlinks and such. Does not seem like a better design.

Then why does it work on the site? There's only one directory linked but with nested subfolders.
In any case the primary issue is that the compiler ignores the JSON flag causing my parser in Sublime to error out.

PS '.' is listed under source-directories.

The website has a build process in the Haskell files to make sure everything you need is around.
This should be an elm-make issue, so let's migrate this over there. When you open the new issue, please show a minimal reproduction of the issue (not a github repo) with the command that you ran, the result of that command, and the expected result of that command. That'll make it easier to see exactly what is going on without doing a lot of digging.

The issue was caused by moving files. How do I show that without a repo?

Also you're Haskell build process is the key user indicator why we want to search subtress. Because any moderately sized program needs it.

Is the fact that the file moved actually matter? As I understand, the file is just in a place that is not recognized. That can happen whether it was moved or put there initially. It is possible that I am not understanding the root issue though, and for me to do that, it's hard to start with a repo.

Oh true it could just be a missing module. I'll try that!

Ah I bet @ajhager found this the same way as me. CC elm-lang/elm-make#26