update schema version

What is the purpose of the pull request
change schema version from 1.2.2 to 1.3.0
Brief change log
change schema version from 1.2.2 to 1.3.0

Codecov Report

Merging #2657 into dev-1.3.0 will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             dev-1.3.0    #2657   +/-   ##
============================================
  Coverage        36.14%   36.14%
  Complexity        2469     2469
============================================
  Files              431      431
  Lines            19856    19856
  Branches          2419     2419
============================================
  Hits              7176     7176
  Misses           12035    12035
  Partials           645      645

Continue to review full report at Codecov.

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


Default the credential secret in the awscluster CR

Towards: https://github.com/giantswarm/giantswarm/issues/14025

I tested this on gauss and it works :)


fix(path) return original casing instead of normalized

Use normalized comparisons for matching, but return the original casings.
fixes #297

Coverage increased (+0.1%) to 84.876% when pulling f966c887e35200ac597a345099141396c5a943a9 on pathnorm into 66e85997fa536fdff65fc101253be5dc5f709207 on master.

Coverage increased (+0.1%) to 84.876% when pulling f966c887e35200ac597a345099141396c5a943a9 on pathnorm into 66e85997fa536fdff65fc101253be5dc5f709207 on master.


Testing the function in Azure fails by default

Functions deploy with "authLevel": "function", so the sample in the tutorial fails.
Have the user change their authlevel to anonymous instead:
[HttpTrigger(AuthorizationLevel.Anonymous,  .....
Now it will work.

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

ID: 6e88ea08-81ef-2b5a-b9d6-539e85592672
Version Independent ID: f2d8b7b4-906a-d1f5-5201-fc22a7890955
Content: Create your first function in Azure using Visual Studio
Content Source: articles/azure-functions/functions-create-your-first-function-visual-studio.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

Hi @LarrySmith-1437 Thank you for reporting this issue! We have validated this issue, and assigned the author to review further and take the right course of action.

@LarrySmith-1437 there seems to be a bug in the tooling that isn't setting the attribute properly from the UI. @AngelosP is this a known issue?

@ggailey777 it's a known issue now! I just confirmed as well that the drop-down inside of Visual Studio when creating a new function doesn't make a difference to the code that gets generated.
@soninaren can you please take a look at this?

@AngelosP That bug has been fixed and deployed to production.

I just verified it by creating a function app and selecting a "Anonymous" from the drop down.

Thanks @soninaren and @AngelosP!
#please-close

Thanks guys!


Add citadel replicaCount flag back and workloadCertTtl

To support multi-citadel and short cert TTL for perf test

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: wattli
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: morvencao
If they are not already assigned, you can assign the PR to them by writing /assign @morvencao in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wattli: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Did we fully verify that multiple Citadels will write the workload secrets only once?

Chatted offline with Tao.
/lgtm
/approve

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: myidpt, wattli
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: morvencao
If they are not already assigned, you can assign the PR to them by writing /assign @morvencao in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/istio-pilot-multicluster-e2e.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test istio-pilot-multicluster-e2e-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

New changes are detected. LGTM label has been removed.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/istio-pilot-multicluster-e2e.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test istio-pilot-multicluster-e2e-master

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/istio-pilot-multicluster-e2e.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test istio-pilot-multicluster-e2e-master

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

prow/istio-unit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-unit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/istio-pilot-multicluster-e2e.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test istio-pilot-multicluster-e2e-master

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

prow/istio-unit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-unit-tests-master

prow/release-test.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test release-test-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/istio-pilot-multicluster-e2e.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test istio-pilot-multicluster-e2e-master

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

prow/istio-unit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-unit-tests-master

prow/release-test.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test release-test-master

prow/e2e-simpleTests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test e2e-simpleTests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-trustdomain.sh
3a3152ec6760d79fad7692a2c75a1fc562c9b7d0
link
/test e2e-bookInfoTests-trustdomain-master

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

prow/istio-unit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-unit-tests-master

prow/release-test.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test release-test-master

prow/e2e-simpleTests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test e2e-simpleTests-master

prow/istio-pilot-multicluster-e2e.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-pilot-multicluster-e2e-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wattli: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/integ-telemetry-local-presubmit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test integ-telemetry-local-presubmit-tests-master

prow/istio-unit-tests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-unit-tests-master

prow/release-test.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test release-test-master

prow/e2e-simpleTests.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test e2e-simpleTests-master

prow/istio-pilot-multicluster-e2e.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test istio-pilot-multicluster-e2e-master

prow/e2e-bookInfoTests-trustdomain.sh
3cf97a83603b8cf9936efb169c87b6f53c13a4dc
link
/test e2e-bookInfoTests-trustdomain-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-unit-tests-master
/test e2e-simpleTests-master

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: JimmyCYJ, myidpt, wattli
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: morvencao
If they are not already assigned, you can assign the PR to them by writing /assign @morvencao in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/test release-test-master

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JimmyCYJ, morvencao, myidpt, wattli
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS [morvencao]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Major issue when using hidesBottomBarWhenPushed. Please investigate

Hey guys,
First of all let me thank you for this amazing library! It really gives the applications a new dimension :)
I have come across a major issue when trying to hide the TabBar while pushing another ViewController to the UINavigation stack. If the property hidesBottomBarWhenPushed is set on the ViewController that is about to be pushed, the TabBar behaves very strange...
I have also tried using the animationTabBarHidden(true) method, but this requires that the hidesBottomBarWhenPushed property is not set. But if this property is not set, then the TabBar hides, but leaves an empty view at the bottom of the screen and when you pop from the pushed ViewController, the TabBar does not appear. Of course, you can call the animationTabBarHidden(false) method again on viewWillAppear: but there is a delay and does not look good.
Please investigate this issue or if it is not an issue, please provide some guidelines on how to reach the expected behaviour.
Cheers,
Sasho

I have similar issue while trying to hide using Tap Gesture.. I tried
I tried calling tabBarController!.tabBar.hidden = true in viewDidLoad() and it hides the TabBar. However, I tried to set tap gesture and hide the bar on Tap. The parent viewController that has ScrollView inside it with subview (that is connected with IBOutlet as myView)
override func viewDidLoad() {
        super.viewDidLoad()

        let tap = UITapGestureRecognizer(target: self, action: Selector("handleTap:"))
        myView.addGestureRecognizer(tap)
}

func handleTap(sender: UITapGestureRecognizer? = nil) {
   print("A") // logs successfully
           if TabBarHidden == false {
               print("B") // logs successfully

               //I tried:
               tabBarController?.tabBar.hidden = true

               // I also tried
               tabBarController?.tabBar.alpha = 0
               tabBarController?.tabBar.frame.origin.x += 50
               hidesBottomBarWhenPushed = true

           } else {
               ...
               TabBarHidden = false
           }
    }

Hey @ober01,
Could you please take a look at this one?
Thanks in advance!

To resolve it : you can make your UINavigationController -> UITabBarController -> Your VCs.
But it is not a good way.
I think the good way is put the container views into the TabBarItem , not into the UITabBarController.view.

I have similar issue and solved by this：
https://github.com/Ramotion/animated-tab-bar/issues/84

@Geeerry
It not work like system hidden effect when I create like this: UITabBarController -> 4 UINavigationController s.
Whay not take the containers into tabbar.

@eggswift
看你也是北京的就用中文吧👻
我有点儿没明白你的“UITabBarController -> 4 UINavigationController s.”的意思

@Geeerry
哈哈
就是UIWindow设置一个UITabBarController 其中的ViewControllers是4个NavigationController，这种情况下如果通过设置hidesBottomBarWhenPushed隐藏这个tabbar，会出现异常。
那个隐藏函数是你添加的嘛？ 很棒，但是如果使用这个函数，达不到系统效果。

对这样是会异常
这个隐藏方法需要用在你说的NavigationController的nextViewController(就是你要push的那个ViewController)的情况下。
直接调用系统的hidesBottomBarWhenPushed用在这个project的TabBar里有很多问题...

@Geeerry
As far as I understand, you used this to resolve the issue?
animatedTabBar.animationTabBarHidden(true)```

I tried it too, and it's hiding the TabBar (and I need to hide the TabBarItems separately). However, I couldn't figure out how to bring it back...

-----

For instance, I have a hierarchy like..

TabBarController
-- NavBarController
--- ViewController
---- SubViewController (navigated from NavBarItem)

At this point, when I hit SubViewController, I want to hide the TabBar. I tried your approach (the code above).. It hides the TabBar only, however not the TabBarItems. I thought I should hide the TabBarItems individually.. Then another problem rises.. When I hit 'Back'  on SubViewController, I couldn't make it work to inverse the 'hiding process'.. I couldn't figure out where to put `animatedTabBar.animationTabBarHidden(false)` for example, and bring it back...

Did anyone figured out how to workaround this issue?

@sentiasa
Hi！
It's very easy to solve this issue by using this：
`override func viewDidLoad() {
// Hide TabBar
let animatedTabBar = self.tabBarController as! RAMAnimatedTabBarController
animatedTabBar.animationTabBarHidden(true)
}
override func viewWillDisappear(animated: Bool) {
    // Show TabBar
    let animatedTabBar = self.tabBarController as! RAMAnimatedTabBarController
    animatedTabBar.animationTabBarHidden(false)
}`

@sentiasa
Put that to the SubViewController
😊

@Geeerry Thanks a lot.. Even though the animated hide doesn't work for now, I can use that for workaround. Cheers

I have the same issue but I'm using HidingNavigationBar Library to hide my tab bar whit this code:
    if let tabBar = navigationController?.tabBarController?.tabBar{
        hidingNavBarManager?.manageBottomBar(tabBar)
        tabBar.barTintColor = UIColor.blackColor()
    }

I was trying something like this, but it doesn't work:
    if let tabBar = navigationController?.tabBarController as? RAMAnimatedTabBarController {
        hidingNavBarManager?.manageBottomBar(tabBar.tabBar)
        tabBar.tabBar.barTintColor = UIColor.blackColor()
    }

Someone knows how can I integrate the two libraries?
Thanks and maybe it can help for someone.

@dasoga I wanted to accomplish same effect. I ended up hiding NavBar manually and I couldn't find any way for hiding AnimatedTabBar with animation so I left it there. I see you got closer with HidingNavigationBar library.
If you find any workaround, please let me know here too.

Hi @sentiasa I just needed to implement bounce animation for my app, so I did it manually with the tab bar delegate method:
override func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) {

    var secondItemImageView: UIImageView!
    let secondItemView = self.tabBar.subviews[item.tag]
    secondItemImageView = secondItemView.subviews.first as! UIImageView
    secondItemImageView.contentMode = .Center

    secondItemImageView.transform = CGAffineTransformIdentity

    UIView.animateWithDuration(0.7, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 1, options: .CurveEaseInOut, animations: { () -> Void in

        let bounceAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
        bounceAnimation.values = [1.0 ,1.4, 0.9, 1.15, 0.95, 1.02, 1.0]
        bounceAnimation.duration = NSTimeInterval(0.5)
        bounceAnimation.calculationMode = kCAAnimationCubic

        secondItemImageView.layer.addAnimation(bounceAnimation, forKey: nil)

        }, completion: nil)

}

Hope can help you!

Try this https://github.com/eggswift/ESTabBarController, supported hidesBottomBarWhenPushed.

@sasojadrovski check my question/answer:
I got it working by setting hidesBottomBarWhenPushed to true in both VC's and also adding animationTabBarHidden(false) in VC1 and animationTabBarHidden(true) in VC2

@dasoga I ended up doing the same thing:
  var secondItemImageView: UIImageView!

    override func viewDidLoad() {
        super.viewDidLoad()

        let secondItemView = self.tabBar.subviews[1]
        self.secondItemImageView = secondItemView.subviews.first as! UIImageView
        self.secondItemImageView.contentMode = .Center

    }

    override func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) {

        if item.tag == 1{

            self.secondItemImageView.transform = CGAffineTransformMakeScale(0.1, 0.1)

            UIView.animateWithDuration(2.0,
                                       delay: 0,
                                       usingSpringWithDamping: 0.2,
                                       initialSpringVelocity: 6.0,
                                       options: UIViewAnimationOptions.AllowUserInteraction,
                                       animations: {
                                        self.secondItemImageView.transform = CGAffineTransformIdentity
                }, completion: nil)

        }

    }

viewContainer should  add in tabbar not tabbar view controller's view

@hologerry It works~~Thanks

@dasoga I have the same issue.
Not solved in latest version.

wow, they still didnt fix it

@omarshamali try ESTabBarController

@eggswift  its a nice library, gonna try it now! thanks mate.

Duplicate of #144


feat: add directory_path rule and DirectoryPathInfo for specifying files within tree artifacts

Used by copy_to_directory and copy_file

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Still need to add a test that for copy_file, but the implementation and test for copy_to_directory are ready for reveiw

Very cool :+1:

copy_file fixed up and test added


Last Will syntax

Contract "last will" missing " );"  on the second-to-last line.

Thanks for the catch!


Add superagent-cheerio to the readme

Checklist

[x] I have ensured my pull request is not behind the main or master branch of the original repository.
[x] I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
[x] I have written a commit message that passes commitlint linting.
[x] I have ensured that my code changes pass linting tests.
[x] I have ensured that my code changes pass unit tests.
[x] I have described my pull request and the reasons for code changes along with context if necessary.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.39%. Comparing base (1c8338b) to head (a5c39b2).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1796   +/-   ##
=======================================
  Coverage   94.39%   94.39%
=======================================
  Files          14       14
  Lines        1141     1141
=======================================
  Hits         1077     1077
  Misses         64       64

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


chore(deps): upgrade configuration

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-configuration-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2212

Questions ?
Please refer to the Backport tool documentation


bug: Generated command comportnent code has error in import statement when using TypeScript

Is there an existing issue for this?

[X] I have searched the existing issues

Description of the bug
When I generate a command component using the CLI, the type prefix is missing from the import statement, causing an error.
The other components (listener, arguments, precondition), this error did not occur.
Steps To Reproduce
sapphire generate command [commandName]

Expected behavior
It should generate code like this.
import { ApplyOptions } from '@sapphire/decorators';
import { SubCommandPluginCommand, SubCommandPluginCommandOptions } from '@sapphire/plugin-subcommands';
import type { Message } from 'discord.js';

@ApplyOptions<SubCommandPluginCommandOptions>({
	description: 'A basic command'
})
export class UserCommand extends SubCommandPluginCommand {
	public async messageRun(message: Message) {
		return message.channel.send('Hello world!');
	}
}

Screenshots
No response
Additional context
This is the first time for me to make an issue, and I used machine translation,
so I really apologize if there are any confusing parts.

whats your templates/command.ts.sapphire file?
and can you show your file structure with command usage

I'm not sure, because I've just started using Sapphire, but I probably don't use template.
In .sapphirerc.yml, customTemplate is set to false.
projectLanguage: "ts"
locations:
  base: src
  arguments: arguments
  commands: commands
  listeners: listeners
  preconditions: preconditions
customFileTemplates:
  enabled: false
  location: ""

Here is the file structure of the project.
foo.ts is a component that I generated myself.

it should word fine i see a test.ts was it generated from cli?

The test.ts is the same as foo.ts. There is probably a problem with the code here, so fix it and send a pull request.
https://github.com/sapphiredev/cli/blob/main/templates/components/command.ts.sapphire

Normally this should not cause an issue because the TypeScript compiler removes the import when compiling if it's only used as a type. Are you sure this is not an ESLint issue?
But to be consistent with the sapphiredev/examples repo I'm going to merge the PR.

I didn't know about the behavior of the TypeScript compiler for type-only imports.
Thank you very much and sorry for the inconvenience.


Documentation: Use strict C90 style comments.

C++ style comments starting with // were not included in the C specification until C99.
Strictly C89/90 (ANSI/ISO) C compilers, or build systems operating with strict errors, or a -std=c90 flag will produce a warning or error on the block comment used in this file.
Replace the comment with a strictly C90 compliant comment block (/* ... */)

Codecov Report

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

@@            Coverage Diff            @@
##            master       #86   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         1
  Lines          359       359
=========================================
  Hits           359       359

Continue to review full report at Codecov.

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


Pairing fails, ConnectionResetError: [Errno 104] Connection reset by peer

I have installed the plugin, then installed paho-mqtt. Now I am trying to pair the tv to my Raspberry Pi Zero 2 running Homebridge with the command:
python3.9 hisensetv.py 192.168.1.XXX --authorize --ifname wlan0
But this throws the error:
ConnectionResetError: [Errno 104] Connection reset by peer
Here's the log:
pi@homebridge:/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.9 hisensetv.py 192.168.1.XXX --authorize --ifname wlan0[2022-01-16 21:28:00,056] [INFO    ] Unverified SSL context created.
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv.py", line 6, in <module>
    __main__.main()
  File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/__main__.py", line 128, in main
    with tv:
  File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/__init__.py", line 137, in __enter__
    self._mqtt_client.connect(self.hostname, self.port)
  File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/home/pi/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1073, in reconnect
    sock.do_handshake()
  File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

I have read all of the other issues, including the solved ones, maybe there's an issue with the ssl certificates? Not sure what to do though.
Environment:

Plugin Version: v1.1.0
Homebridge Version: v1.3.9
Node.js Version: v16.13.1
NPM Version: v8.3.0
Operating System: Raspbian GNU/Linux Bullseye (11)

Hello @DrAhoss , thanks for reporting this! Usually Connection reset by peer means one of two things:

Your TV isn't listening on the default port. Could you please verify with a MQTT app that your TV is indeed offering a MQTT service? You can try this app on any PC/Mac on the same network as your TV.
The SSL certificates are wrong. Please note that, as I only have one TV model, I don't have SSL certificates for all the possible HiSense TVs, as they really like to change them for any new model...

Thank you for your response @MrAsterisco!
Regarding the first option, I downloaded the app on my MacBook but I have absolutely no idea what to do with it. I have to admit that I have almost no knowledge about the inner workings of networks and their protocols and stuff. Maybe you could give me some pointers in the direction I need to go, because I can't seem to find documentation for this app either.
As for the second tip, I have been thinking that too, maybe my Hisense h55a6100 is a bit 'special' in that matter. Is there a way to find the correct certificate somewhere online?
As a sidenote, I am able to use the RemoteNOW app on my iPhone to control the TV, but it has a 50/50 chance of not working. Sometimes it works after the TV is turned on and the app has been open for a while. At other times it works instantly, or not at all. But this lets me assume, that the TV accepts some kind of remote control protocol.

@DrAhoss sure, let's see if I can explain a little bit. The MQTT protocol is the method that the TV uses to communicate: you basically subscribe to a topic and receive messages on that. In very simple words: you ask the TV to tell you something and it will respond with that something.
With MQTT Explorer, after you connect to the TV, you should be able to observe all topics and basically sniff everything that's going on between the RemoteNOW app and the TV. So, after you created a new connection on MQTT Explorer and managed to connect successfully, just open the RemoteNOW app on your phone and start interacting with your TV.
Before connecting, make sure that the TV is turned on.
In order to create a connection, just open the app, press the big yellow plus button and input the IP address of the TV. As port, use 36669. You'll have to mess around with certificates and SSL configuration until you find the right one. Once you found the right one, make a note of it and we'll try to reproduce it in the plugin configuration.

Is there a way to find the correct certificate somewhere online?

Certificates were added later to this repo and they come from another repo that I don't own. My TV doesn't require certificates to connect, so I cannot test them out. I guess those certificates were extracted somehow, but I wouldn't know where to start, unfortunately.

As a sidenote, I am able to use the RemoteNOW app on my iPhone to control the TV, but it has a 50/50 chance of not working. Sometimes it works after the TV is turned on and the app has been open for a while. At other times it works instantly, or not at all.

This could mean a lot of things: the RemoteNOW app is very buggy, so it could be just that. But it could also mean that your network configuration isn't working properly or that your router is blocking something that the TV needs to work. I had a similar problem once, where I had to reset all my network appliances because something was blocking MQTT. Not sure if this applies to you, but if possible, I'd try isolating the TV on a very simple network and see if you still have issues with the app.

@DrAhoss, your TV either requires the certs, or not. TBH HiSense don't make that information publicly available.
The certs are here: https://github.com/MrAsterisco/hisensetv/tree/master/cert
If you can use MQTT Explorer, and in that app, you don't need to supply certificates, then the app would look like this

and then as you use the RemoteNow app on your phone, you'll see the actions

If this is the case, then in the Homebridge configuration file, set the SSL configuration as per below
{   "platform": "HiSenseTV",   "ifname": "ens33",   "devices": [     {       "id": "A unique identifier (such as your TV S/N)",       "name": "A name to display in the Home app",       "ipaddress": "Your TV IP address",       "macaddress": "Your TV MAC Address",       **"sslmode": "disabled",       "sslcertificate": "",       "sslprivatekey": ""**     }   ] }
and from your device, if trying to manually authorise, you would send the --no-ssl flag
python3.8 hisensetv.py <TV_IP_ADDRESS> --authorize  --ifname <NETWORK_INTERFACE_NAME> --no-ssl
as an example, here my tv Ip is <IP_ADDRESS> so the command would be
python3.8 hisensetv.py <IP_ADDRESS> --authorize  --ifname eth0 --no-ssl
Again, in my case, because my TV needs SSL, I am returned a connection timeout

However my TV requires SSL, and so in MQTT Explorer, I load the certs by following this and then I am able to view/access.

Similarly, from my rPi, it is the same so I can access it passing in the certificates from a location I've dumped them on my device - the path doesn't matter as long as you specify it

you can read more about our hijinks from last year here:
https://github.com/MrAsterisco/homebridge-hisense-tv/issues/3
For what it's worth, I ended up forking my own version of cmd4-hisenseTv that works as well as this, since I'm using cmd4 for my airconditioning system and home alarm system anyway it made a bit more sense to pile them into the same into the same plugin from a maintenance perspective.
https://github.com/ryanshand/cmd4-HisenseTV
Good luck

@ryanshand thanks for your input, your screenshots are way better than my lengthy text!

Thank you both @MrAsterisco and @ryanshand. I have had success with the mqtt explorer connection. I can listen for the actions between the RemoteNOW app and the TV. I have set it up without encryption so I assume that I shouldn't need the certificates, right? If I use --no-ssl it gives me this timeout error:
`pi@homebridge:/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.9 hisensetv.py <IP_ADDRESS> --authorize --ifname wlan0 --no-ssl
[2022-01-18 18:56:15,668] [INFO    ] No SSL context specified.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 208, in _wait_for_response
return self._queue[topic].get(block=True, timeout=self.timeout)
File "/usr/lib/python3.9/queue.py", line 179, in get
raise Empty
_queue.Empty
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv.py", line 6, in
main.main()
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 130, in main
tv.start_authorization()
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 56, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 633, in start_authorization
self._wait_for_response(topic=self._our_topic)
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 210, in _wait_for_response
raise HisenseTvTimeoutError(
hisensetv.HisenseTvTimeoutError: failed to recieve a response in 10.000s`

While typing this I was still trying stuff and realised that I can use the --get sources call when I add --no-ssl. So that must mean that my tv doesn't need or want the certificates. But why does it timeout when I do --authorize --no-ssl?
Anyways, with that still unsolved I had just realised that all of the red error-messages in the homebridge log stopped appearing. It stated that the tv is running and I needed to add the tv in the home app. I did that and it seems to work, however I can only turn it on/off and select the sources. (Maybe that's all it is supposed to do)
This is very confusing to me, because the authorization never went trough and I never entered any kind of code that should've appeared on the tv screen.
Maybe there is something wrong still or it just magically started working. Maybe you guys got an idea still?
Thank you!

You can only authorize once, I also get a timeout because I’m already authorized.
The fact you can get sources means it’s working.
This plugin only allows you to switch inputs and power on/off
Thanks
Ryan
Sent from my iPhone

On 19 Jan 2022, at 2:14 am, DrAhoss @.***> wrote:

Thank you both @MrAsterisco and @ryanshand. I have had success with the mqtt explorer connection. I can listen for the actions between the RemoteNOW app and the TV. I have set it up without encryption so I assume that I shouldn't need the certificates, right? If I use --no-ssl it gives me this timeout error:
@.***:/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.9 hisensetv.py <IP_ADDRESS> --authorize --ifname wlan0 --no-ssl
[2022-01-18 18:56:15,668] [INFO ] No SSL context specified.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 208, in _wait_for_response
return self._queue[topic].get(block=True, timeout=self.timeout)
File "/usr/lib/python3.9/queue.py", line 179, in get
raise Empty
_queue.Empty
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv.py", line 6, in
main.main()
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 130, in main
tv.start_authorization()
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 56, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 633, in start_authorization
self._wait_for_response(topic=self._our_topic)
File "/usr/local/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 210, in _wait_for_response
raise HisenseTvTimeoutError(
hisensetv.HisenseTvTimeoutError: failed to recieve a response in 10.000s`
While typing this I was still trying stuff and realised that I can use the --get sources call when I add --no-ssl. So that must mean that my tv doesn't need or want the certificates. But why does it timeout when I do --authorize --no-ssl?
Anyways, with that still unsolved I had just realised that all of the red error-messages in the homebridge log stopped appearing. It stated that the tv is running and I needed to add the tv in the home app. I did that and it seems to work, however I can only turn it on/off and select the sources. (Maybe that's all it is supposed to do)
This is very confusing to me, because the authorization never went trough and I never entered any kind of code that should've appeared on the tv screen.
Maybe there is something wrong still or it just magically started working. Maybe you guys got an idea still?
Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.

Alright, seems like everything has been cleared up, thank you all for the great help! Closing this now.

@DrAhoss it's great to hear that you finally managed to make it work!

This plugin only allows you to switch inputs and power on/off

This is not true 😊 The plugin also adds a remote for your TV, which allows you to change channel, control the volume and more, as if you were doing that with your actual TV remote. You can access the Remote via Control Centre: if you don't see it there, you might need to enable it from Settings > Control Centre, by dragging "Apple TV Remote" into the list of "Included Controls".

I posted in the issues in the other repo newAM/Hisensetv around these settings.

Hey @gjlamb , let's try to keep issues separated from each other. 😊 Yours is a different issue that we're tracking on the other conversation. Could you add there the link to the issue you opened on newAM/Hisensetv?


Feat run cmd on cluster

Can one of the admins verify this patch?

@aouyang1 have you enabled Tracis CI for Pegasus?

ah yes this was a test. I'm disabling it now. I think for now we'll keep on using jenkins.
test this please

This looks good to me. Have you considered with the peg command will be for this? I figure you'd want to just add this in as well.

Hmm...haven't considered the peg command as it is one of the utilities. I am using it just by sourcing util.sh but I guess having a generic command for some util.sh functions would be good - like run_cmd_on_node and run_cmd_on_cluster.
How about peg util <function-name> <args>? For now, we can allow only two commands run_cmd_on_node and run_cmd_on_cluster

There's already a peg sshcmd <clustername> <number> <cmd>. maybe if the number is left out then we do it to the entire cluster?

Yeah! that'd work. I think there should still be one command for just a node in addition to the command for a cluster.
May be for the cluster it could be peg sshcmd-cluster <clustername> <cmd>?

So option based in peg sshcmd and also a separate peg command peg sshcmd-cluster?

Yeah! So that a cmd can be executed on any particular node as well as on the entire cluster if needed.

I feel like the option in peg sshcmd would be redundant right?
single node: peg sshcmd my-cluster 1 'sudo apt-get install python3' multi-node: peg sshcmd my-cluster 'sudo apt-get install python3'
vs
multi-node: peg sshcmd-cluster my-cluster 'sudo apt-get install python3'

Yeah it'd be redundant in the case you mentioned but I was thinking about what if some commands are to be executed only on a particular node, like, maybe master node. What do you think?

peg sshcmd my-cluster 1 'sudo apt-get install python3' does it only on master right?
peg sshcmd my-cluster 1 'sudo apt-get install python3' would only operate on the 1st worker node

peg sshcmd my-cluster 1 'sudo apt-get install python3' would work on master for techs which have a master and 1st node for techs which don't have a master.

Yeah. I don't think I'm quite following what your first comment about "executed only on a particular node, like, maybe master node" since I feel peg sshcmd 1 does that?

I just meant that we can have two different peg commands

one to run a cmd on any one node of the cluster
peg sshcmd <cluster-name> <number> <cmd>
one to run a cmd on all nodes of the cluster
peg sshcmd-cluster <cluster-name> <cmd>

does that make sense?

Yeah that does. I was debating that we merge the sshcmd-cluster into sshcmd since it's quite related. Not sure what's more intuitive for users. We should probably go with sshcmd-cluster for now since it requires the least amount of logic.

In that case, how about making it something like as follows?

peg sshcmd-cluster <cluster-name> <cmd>
peg sshcmd-node <cluster-name> <number> <cmd>

Yeah that looks like a good plan. Can you also check to see if sshcmd is used in any other scripts? Don't want to break anything if we change the pegasus api.

Sure! I'll check that.

Added sshcmd-cluster and updated sshcmd -> sshcmd-node

test this please

Looks go to me. Let me know if you've tested out the memsql install which uses the peg sshcmd-node. If so, I'll go ahead and merge.

Haven't tested the memsql installation, I just checked the sshcmd-node by itself and it worked fine.

alright. I'll give it a shot just as a sanity check. Want to make sure the memsql install hasn't been broken.

Sounds good!

Memsql checked out. merging

Can one of the admins verify this patch?


Responsive project setup screen

Changes proposed in this pull request:

The creating a new project screen is responsive on screens of different ratios.

Look great. In the review mode it would be nice if I can swipe articles. Like on Tinder.  “Swipe right” means to accept the article, while “swipe left” means to reject it.


downloading sounds broken

How to repro

authenticate
go to sounds page
press d key

Stacktrace:
Error: Sound not found
    at Sound.js:56
    at s (runtime.js:63)
    at Generator._invoke (runtime.js:293)
    at Generator.next (runtime.js:118)
    at r (asyncToGenerator.js:3)
    at u (asyncToGenerator.js:25)

Notes
The root cause of this is probably a bug in the authentication, not the recent shortcuts PR

Fixed this in #90


Update github passport strategy

Apparently the passport library we use for Github is not up to date with how Github prefer auth. We should update the library or find an alternative if updating is not an option.
Hello there!

On February 4th, 2020 at 08:20 (UTC) your application (GBIF.org) used an access token (with the User-Agent passport-github) as part of a query parameter to access an endpoint through the GitHub API.

https://api.github.com/user/emails

Please use the Authorization HTTP header instead as using the `access_token` query parameter is deprecated.

Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.

Thanks,
The GitHub Team

https://github.com/jaredhanson/passport-github/issues/75

Should be fixed by https://github.com/gbif/portal16/commit/c11d413728afb457bbb6f7489ec6e87b9f3e727e , if not -> re-open


chore: 🤖 remove ff workflow

Description
Removes /fast-forward support
Breaking Changes

JIRA Link

Checklist

[ ] Updated the Readme.md (if required) ?

:tada: This PR is included in version 24.4.0-alpha.6 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 24.4.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[telegram] -> [matrix] Answers disappear

When someone answers on a message on Telegram, the text/contend gets send over to all the bridges but on Matrix, it just gets ignored.
I am using v1.13.1 atm.

I need a -debug log for this.

It got fixed by https://github.com/42wim/matterbridge/commit/3e60cfafd342b0a6d27947d27cc125421b8f028a


Gradle for Quantum

Quantum would be more effective and easier to implement using gradle (there are only positives for gradle as far as I can tell).
I could try a rudimentary gradle implementation if you'd like, but I haven't used it much before.

Feel free to make a gradle implementation. I've always wanted to use gradle but never got to doing it or understanding how to.

Easy; just steal the gradle files from Forge and modify them to work with the Quantum Project.

As if I would be that low key lol. I would make it from scratch. And I will.

Suit yourself, just saying!

I totally get what your saying Eric, but just using forge gradle would require a lot of unnecessary refactoring because it is largely unrelated

that depends on how we plan to handle patching, we might be able to just yank the Forge patching system. Or we could study the Forge patching system, I would much prefer study and reproduce if we do patching

Screw studying is what I prefer. I plan on building from scratch and doing
it right the first time! Besides, I want to learn gradle. We could just
study and reproduce, but I honestly think it would be faster and easier to
go from scratch on this one.
On Thursday, December 24, 2015, Geroge<EMAIL_ADDRESS>wrote:

that depends on how we plan to handle patching, we might be able to just
yank the Forge patching system. Or we could study the Forge patching
system, I would much prefer study and reproduce if we do patching
—
Reply to this email directly or view it on GitHub
https://github.com/QuantumTheoryMC/QuantumAPI/issues/3#issuecomment-167142987
.

Also I took a glance at forge gradle. It is quite different than how I plan to use it to build Quantum API and how I would implement tasks for gradle.

I'd be fine with lots of unneccesary refactoring.

Just using Gradle's build files could be feasible, but not as flexible as writing our own wrapper.

Right, scrap the wrapper, we're writing a gradle plugin instead.

Closing this. Quantum API will not be built using Gradle, as far as I'm concerned. (I'll remove gradle related things soon enough from the repo)


Python script to check metabolic tasks

Let me introduce myself. I am Raquel Garcia, from the University the Murcia (Spain). My Master Thesis is about to check the metabolic tasks you proposed. This work has been done under the supervision of Profs. F. Guil and José M. García.
In my Master Thesis, we propose a methodology to search for genetic interventions or vulnerabilities, based on the analysis of essential genes and synthetic lethality gene pairs, which are indispensable for the execution of a set of 57 metabolic tasks crucial for cell viability. The fundamental purpose of this research is to broaden the range of possible therapeutic targets, both in the context of cancer cells and in the context of possible toxicities in healthy cells.
Following your proposal, we have developed several python scripts to verify the performance of the 57 metabolic tasks you described in https://www.science.org/doi/10.1126/scisignal.aaz1482, using Human 1.14 and other ftINIT models.
We've taken your data set and applied the convenient bound constraints. We've created the necessary reactions and optimized them using COBRApy methods.
Therefore, our work generates 57 new models, one for each metabolic task. Then, these new models can be used to carry out analysis of essential genes or synthetic lethality for each task, broadening the variety of genetic interventions in human cells by the implementation of the Metabolic Tasks.
We consider that it will be useful to include our work in your GitHub.
Finally, as an example, I will show you how we have checked the task “Aerobic rephosphorylation of ATP from glucose”
import cobra

from cobra import Model, Reaction, Metabolite

model = cobra.io.read_sbml_model("human.xml")

with model:

    interes = Reaction('AerobicRephosphorylationOfATP')

    interes.lower_bound = 1.

    interes.upper_bound = 1000.

    interes.add_metabolites({

        model.metabolites.MAM01371c: -1.0,

        model.metabolites.MAM02040c: -1.0,

        model.metabolites.MAM01285c: 1,

        model.metabolites.MAM02039c: 1,

        model.metabolites.MAM02751c: 1

    })

    model.add_reactions([interes])

    for r in model.exchanges:

        r.lower_bound=0

        r.upper_bound=0

    O2.lower_bound=-1000

    glucosa.lower_bound=-1000

    H2O.upper_bound=1000

    CO2.upper_bound=1000

    sol=model.slim_optimize()

    cobra.io.write_sbml_model(model,"Aerobic-rephosphorylation-of-ATP-from-glucose.xml")

Hi @raquelgg11! This sounds very nice - for a long time there have been discussions around the future directions of the metabolic tasks.
As you are probably aware, this repository only holds the generic model. All contextualized models are held elsewhere, e.g. Zenodo or other GitHub repositories.
To continue the discussion, I hope it's okay that I convert this issue into a GitHub Discussion such that an actionable solution can be found.
For the moment, my first questions are:

to what extent is the work scripted? e.g., could it be run automatically?
is there a vision to keep these scripts/model,s up-to-date?
is there any documentation already available?


Transition hooks not firing when toState was registered in runtime

This is a (check one box):

[x] Bug Report
[ ] Feature Request
[ ] General Query

My version of UI-Router is:  1.0.15
Bug Report
Current Behavior:
When transitioning from any state to a state that was registered in runtime using $stateRegistry.register, no transition hooks are fired. The transition itself is successful.
Expected Behavior:
Transition hooks always should be fired (unless {'notify': false} is specified in transition parameters perhaps).

[x] I have already reviewed the sample application for examples of common approaches

[x] I believe my question can only be answered by the UI-Router maintainers

I haven't included a plunker as it would be too complicated to reproduce, as I'm getting the menu items from the api, consisting of "standard" pages, that are defined in the config phase, and plugins, custom pages users can create and put in plugins folder and register through the api, which are then registered in the run time. This worked in old versions of ui-router.
I also haven't found any similar question on Stackoverflow, nor do I believe asking one would help me (at least not as quickly as I need).

Actually the transition hooks were firing, except for when the runtime state was an initial state, and there already is an issue for initial transition hooks not firing. My apologies.

Reopening the issue, I just reproduced it again. It seems to not work in two cases:

when directly typing url in browser
when navigating with back/previous buttons in  browser.
Not only the hooks are not fired, the transition doesn't happen at all.
I am using Google Chrome v.70.0.3538.110 on MacOS.

I also tried this with Firefox 63.0.3 for MacOS and it's the same.


[FR] Switch Windows builds to use LLVM (opensource Apache 2.0) instead of Visual Studio modules - clang-cl.exe and lld-link.exe

What's the problem this feature will solve?
The current builds of Python for Windows use the MSVC 14.X libraries which are covered under the Microsoft Visual Studio licenses.  This means that any extension modules that are generated also fall under the same Microsoft licenses.  Which is contrary to the the whole point of Python in general - the whole library should be OPEN SOURCE.  So the very easy thing to do on Windows is to switch to the LLVM compilers that are 100% compatible with the MSVC builds.  Since they already exist under LLVM (clang-cl.exe and lld-link.exe) the project SHOULD move toward their adoption, rather than continuing to use closed source build tools.
Describe the solution you'd like
Simply switch the default build tools for Python modules to use the LLVM clang-cl.exe and lld-link.exe so that Python on Windows is actually open-source, i.e. Apache 2.0 license.
Alternative Solutions
Well if you use MSVC to build Python it's always going to fall under the commercial license when people try to extend the functionality via compiled modules.
Additional context
No response
Code of Conduct

[X] I agree to follow the PSF Code of Conduct

"""distutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS 2005 and VS 2008 by Christian Heimes
# ported to VS 2015 by Steve Dower

import os
import subprocess
import contextlib
import warnings
import unittest.mock
with contextlib.suppress(ImportError):
    import winreg

from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
                             CompileError, LibError, LinkError
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log
from distutils.util import get_platform

from itertools import count

def _find_vc2015():
    try:
        key = winreg.OpenKeyEx(
            winreg.HKEY_LOCAL_MACHINE,
            r"Software\Microsoft\VisualStudio\SxS\VC7",
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
        )
    except OSError:
        log.debug("Visual C++ is not registered")
        return None, None

    best_version = 0
    best_dir = None
    with key:
        for i in count():
            try:
                v, vc_dir, vt = winreg.EnumValue(key, i)
            except OSError:
                break
            if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
                try:
                    version = int(float(v))
                except (ValueError, TypeError):
                    continue
                if version >= 14 and version > best_version:
                    best_version, best_dir = version, vc_dir
    return best_version, best_dir

def _find_vc2017():
    """Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    """
    root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
    if not root:
        return None, None

    try:
        path = subprocess.check_output([
            os.path.join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"),
            "-latest",
            "-prerelease",
            "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
            "-property", "installationPath",
            "-products", "*",
        ], encoding="mbcs", errors="strict").strip()
    except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
        return None, None

    path = os.path.join(path, "VC", "Auxiliary", "Build")
    if os.path.isdir(path):
        return 15, path

    return None, None

PLAT_SPEC_TO_RUNTIME = {
    'x86' : 'x86',
    'x86_amd64' : 'x64',
    'x86_arm' : 'arm',
    'x86_arm64' : 'arm64'
}

def _find_vcvarsall(plat_spec):
    # bpo-38597: Removed vcruntime return value
    _, best_dir = _find_vc2017()

    if not best_dir:
        best_version, best_dir = _find_vc2015()

    if not best_dir:
        log.debug("No suitable Visual C++ version found")
        return None, None

    vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
    if not os.path.isfile(vcvarsall):
        log.debug("%s cannot be found", vcvarsall)
        return None, None

    return vcvarsall, None

def _get_vc_env(plat_spec):
    if os.getenv("DISTUTILS_USE_SDK"):
        return {
            key.lower(): value
            for key, value in os.environ.items()
        }

    vcvarsall, _ = _find_vcvarsall(plat_spec)
    if not vcvarsall:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")

    try:
        out = subprocess.check_output(
            'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec),
            stderr=subprocess.STDOUT,
        ).decode('utf-16le', errors='replace')
    except subprocess.CalledProcessError as exc:
        log.error(exc.output)
        raise DistutilsPlatformError("Error executing {}"
                .format(exc.cmd))

    env = {
        key.lower(): value
        for key, _, value in
        (line.partition('=') for line in out.splitlines())
        if key and value
    }

    return env

def _find_exe(exe, paths=None):
    """Return path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    """
    if not paths:
        paths = os.getenv('path').split(os.pathsep)
    for p in paths:
        fn = os.path.join(os.path.abspath(p), exe)
        if os.path.isfile(fn):
            return fn
    return exe

# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Always cross-compile from x86 to work with the
# lighter-weight MSVC installs that do not include native 64-bit tools.
PLAT_TO_VCVARS = {
    'win32' : 'x86',
    'win-amd64' : 'x86_amd64',
    'win-arm32' : 'x86_arm',
    'win-arm64' : 'x86_arm64'
}

class MSVCCompiler(CCompiler) :
    """Concrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = (_c_extensions + _cpp_extensions +
                      _rc_extensions + _mc_extensions)
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        super().__init__(verbose, dry_run, force)
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.initialized = False

    def initialize(self, plat_name=None):
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        if plat_name not in PLAT_TO_VCVARS:
            raise DistutilsPlatformError("--plat-name must be one of {}"
                                         .format(tuple(PLAT_TO_VCVARS)))

        # Get the vcvarsall.bat spec for the requested platform.
        plat_spec = PLAT_TO_VCVARS[plat_name]

        vc_env = _get_vc_env(plat_spec)
        if not vc_env:
            raise DistutilsPlatformError("Unable to find a compatible "
                "Visual Studio installation.")

        self._paths = vc_env.get('path', '')
        paths = self._paths.split(os.pathsep)
        self.cc = _find_exe("clang-cl.exe", paths)
        self.linker = _find_exe("lld-link.exe", paths)
        self.lib = _find_exe("lib.exe", paths)
        self.rc = _find_exe("rc.exe", paths)   # resource compiler
        self.mc = _find_exe("mc.exe", paths)   # message compiler
        self.mt = _find_exe("mt.exe", paths)   # message compiler

        for dir in vc_env.get('include', '').split(os.pathsep):
            if dir:
                self.add_include_dir(dir.rstrip(os.sep))

        for dir in vc_env.get('lib', '').split(os.pathsep):
            if dir:
                self.add_library_dir(dir.rstrip(os.sep))

        self.preprocess_options = None
        # bpo-38597: Always compile with dynamic linking
        # Future releases of Python 3.x will include all past
        # versions of vcruntime*.dll for compatibility.
        self.compile_options = [
            '/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD'
        ]

        self.compile_options_debug = [
            '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG'
        ]

        ldflags = [
            '/nologo', '/INCREMENTAL:NO'#, '/LTCG'
        ]

        ldflags_debug = [
            '/nologo', '/INCREMENTAL:NO', '/DEBUG:FULL' #, '/LTCG'
        ]

        self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
        self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
        self.ldflags_shared = [*ldflags, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
        self.ldflags_shared_debug = [*ldflags_debug, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
        self.ldflags_static = [*ldflags]
        self.ldflags_static_debug = [*ldflags_debug]

        self._ldflags = {
            (CCompiler.EXECUTABLE, None): self.ldflags_exe,
            (CCompiler.EXECUTABLE, False): self.ldflags_exe,
            (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
            (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
            (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
        }

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self,
                         source_filenames,
                         strip_dir=0,
                         output_dir=''):
        ext_map = {
            **{ext: self.obj_extension for ext in self.src_extensions},
            **{ext: self.res_extension for ext in self._rc_extensions + self._mc_extensions},
        }

        output_dir = output_dir or ''

        def make_out_path(p):
            base, ext = os.path.splitext(p)
            if strip_dir:
                base = os.path.basename(base)
            else:
                _, base = os.path.splitdrive(base)
                if base.startswith((os.path.sep, os.path.altsep)):
                    base = base[1:]
            try:
                # XXX: This may produce absurdly long paths. We should check
                # the length of the result and trim base until we fit within
                # 260 characters.
                return os.path.join(output_dir, base + ext_map[ext])
            except LookupError:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile {}".format(p))

        return list(map(make_out_path, source_filenames))

    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(output_dir, macros, include_dirs,
                                           sources, depends, extra_postargs)
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        add_cpp_opts = False

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            # Anaconda/conda-forge customisation, we want our pdbs to be
            # relocatable:
            # https://developercommunity.visualstudio.com/comments/623156/view.html
            d1trimfile_opts = []
            if 'SRC_DIR' in os.environ and os.path.basename(self.cc) == "clang-cl.exe":
                d1trimfile_opts.append("/d1trimfile:" + os.environ['SRC_DIR'])

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
                add_cpp_opts = True
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
                    base, _ = os.path.splitext(os.path.basename (src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc, "/fo" + obj, rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError("Don't know how to compile {} to {}"
                                   .format(src, obj))

            args = [self.cc] + compile_opts + pp_opts + d1trimfile_opts
            if add_cpp_opts:
                args.append('/EHsc')
            args.append(input_opt)
            args.append("/Fo" + obj)
            args.extend(extra_postargs)

            try:
                self.spawn(args)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    def create_static_lib(self,
                          objects,
                          output_libname,
                          output_dir=None,
                          debug=0,
                          target_lang=None):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname,
                                                output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass # XXX what goes here?
            try:
                log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
             libraries=None,
             library_dirs=None,
             runtime_library_dirs=None,
             export_symbols=None,
             debug=0,
             extra_preargs=None,
             extra_postargs=None,
             build_temp=None,
             target_lang=None):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs,
                                        runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        if runtime_library_dirs:
            self.warn("I don't know what to do with 'runtime_library_dirs': "
                       + str(runtime_library_dirs))

        lib_opts = gen_lib_options(self,
                                   library_dirs, runtime_library_dirs,
                                   libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ldflags = self._ldflags[target_desc, debug]

            export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]

            ld_args = (ldflags + lib_opts + export_opts +
                       objects + ['/OUT:' + output_filename])

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename))
                implib_file = os.path.join(
                    build_temp,
                    self.library_filename(dll_name))
                ld_args.append ('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            output_dir = os.path.dirname(os.path.abspath(output_filename))
            self.mkpath(output_dir)
            try:
                log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def spawn(self, cmd):
        env = dict(os.environ, PATH=self._paths)
        with self._fallback_spawn(cmd, env) as fallback:
            return super().spawn(cmd, env=env)
        return fallback.value

    @contextlib.contextmanager
    def _fallback_spawn(self, cmd, env):
        """
        Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
        so the 'env' kwarg causes a TypeError. Detect this condition and
        restore the legacy, unsafe behavior.
        """
        bag = type('Bag', (), {})()
        try:
            yield bag
        except TypeError as exc:
            if "unexpected keyword argument 'env'" not in str(exc):
                raise
        else:
            return
        warnings.warn(
            "Fallback spawn triggered. Please update distutils monkeypatch.")
        with unittest.mock.patch.dict('os.environ', env):
            bag.value = super().spawn(cmd)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
              "don't know how to set runtime library search path for MSVC")

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.isfile(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

Hi.

How do you know clang-cl is 100% compatiple?
Is there a reference to say using msvc will fall under the commercial license?
How about CPython? It uses msvc. Doesn't it have the same problem?

Clang-cl has test suites with NumPy and SciPy and those at least pass all tests.  I can't say for sure that EVERY library will work 100%, just that having the option to select a different linker and compiler would be helpful for some users.  Every extension module I've built using clang-cl and lld-link works without issue alongside OpenMP and MSVC compiled Python (PYD files).  I believe Python itself has no issue as the library is opensource, so the Build Tools are allowed.  When using the Build Tools for commercial applications which are distributed, they fall under the Visual Studio license, which means if you distribute them, then you need to buy Visual Studio.  So for the small subset of Python users that create compiled libraries and deploy them for commercial use, or use the compiled modules within a company >5 users, having an option to use LLVM tools instead at least gets past these restrictions. I already know how to "hack" the _msvccompiler.py to use LLVM tools, but some people don't.  If it's easy to add that option then why not.  Probably just switching every build over to these tools wouldn't make much sense, but adding an option to select them instead would.


KeyError if user open preview URL from bookmarks

Issue Summary
KeyError if user open preview URL from bookmarks or access it directly in some other way.
Steps to Reproduce

Go to the admin UI -> Explorer
Pick any page and press an edit button
Extract page's ID from an URL (for example, in URL /admin/pages/3/edit/ id is 3)
Open preview URL for this page directly (for example, /admin/pages/3/edit/preview/)

Result
  File "django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "wagtail/wagtailadmin/decorators.py", line 27, in decorated_view
    return view_func(request, *args, **kwargs)
  File "django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "wagtail/wagtailadmin/views/pages.py", line 613, in get
    form = self.get_form()
  File "wagtail/wagtailadmin/views/pages.py", line 584, in get_form
    post_data_dict, timestamp = self.request.session[self.session_key]
  File "django/contrib/sessions/backends/base.py", line 57, in __getitem__
    return self._session[key]
KeyError: 'wagtail-preview-3'

Expected result
Instead of throwing an exception we can do one of the following:

Try to re-generate preview on the fly
Gently ask user not to access this URL directly or say something like "Preview for this page has expired"

Technical details

Wagtail version: Wagtail>=1.10

We hit this locally with users pasting links to each other.  Not sure which result you want to go with, but we worked around it by returning an empty form:
https://github.com/pkamp3/wagtail/blob/08f80882353cc67b803d4e1535a215ed662a3470/wagtail/wagtailadmin/views/pages.py#L584-L588
get() then eventually hits return self.error_response(page)

@pkamp3 Isn't that just going to fail on line 592, because post_data_dict isn't defined...?

@pkamp3 and I were debugging this together a little bit today. I think you're right @gasman.
What's your preferred solution here? We've both got our heads wrapped around the problem right now, so we're happy to put a PR in.

For us the issue was with the key missing, so my sneaky return on 588 avoids those lines:
get() -> get_form() (returns early) -> get()

@gasman: Why would post_data_dict be undefined?
@pkamp3: It’s clearer to reverse the condition, like this:
if self.session_key not in self.request.session:
    # Session key not in session, returning null form
    return form_class()
post_data_dict, timestamp = self.request.session[self.session_key]

Ah, sorry, missed that it was returning from the method at that point!

@BertrandBordage agreed, that looks good - the negative logic first makes much more sense.
@gasman No worries!  Want us to put together a PR with that?

@pkamp3 Yes please (assuming @BertrandBordage is happy with that approach)!

Fine with me.
Just one thing though: wouldn’t it be better to bind the instance and parent page? If I’m correct, this will display the preview of the current version of the page instead of showing the preview of an empty page that may break rendering.

Yes, thank you @BertrandBordage ; better to make it explicit - I added instance and parent_page in the PR and tested the logic in our environment.
I guess the other solution here is populate what's needed to generate a new preview, but this does avoid the 500.


extend SpectralConv to n-dim

Codecov Report

Merging #10 (23cb507) into master (db8a1b6) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #10   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         4
  Lines           36        38    +2
=========================================
+ Hits            36        38    +2

Impacted Files
Coverage Δ

src/fourier.jl
100.00% <100.00%> (ø)

src/model.jl
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Great work!


[WIP] update documentation for 2.0 specification

Not ready, do not merge!
This updates the JSDoc documentation in mapnik_vector_tile.cpp and other related files that have been significantly changed for the 2.0 specification.
Tasks:

[ ] update JSDoc language in mapnik_vector_tile.cpp and related files

[x] update all .vector.pbf to .mvt in @examples
[ ] complete DOCS TODO questions (used as placeholders for gaps in my knowledge)
[ ] clean up examples throughout so they match in style & language

[ ] assert -> console.log

[ ] mapnik_map.cpp

[ ] update styles to match mapnik.org (not critical, but could use some love)
[ ] update README

[ ] #depends https://github.com/mapnik/node-mapnik#depends

[ ] build documentation/ directory with new documentation build and set a PR in gh-pages for an updated docs rollout

Is there a reason a number of methods are not documented in mapnik_map.cpp? I'm seeing these methods in tests but not JSDoc-ready:

[ ] loadFonts
[ ] memoryFonts
[ ] registerFonts
[ ] queryMapPoint
[ ] [queryPoint](https://github.com/mapnik/node-mapnik/blob/238035eae44f2d95c63efd05822a86edc8096ef8/src/mapnik_map.cpp#L572
[ ] save
[ ] to_string
[ ] zoomAll
[ ] zoomToBox
[ ] render
[ ] renderFile
[ ] renderSync
[ ] renderFileSync

cc/ @flippmoke @springmeyer

Is there a reason a number of methods are not documented in mapnik_map.cpp

No good reason. In terms of usage of node-mapnik, the mapnik.VectorTile and mapnik.Image APIs are the most critical for good docs but mapnik.Map is a close follow.

@mapsam - also you may have seen https://github.com/mapnik/node-mapnik/tree/master/docs? These are an abandoned and incomplete effort at docs. They can be deleted once API docs are complete / any doc fragments in those markdown files are confirmed to be in the code. For example https://github.com/mapnik/node-mapnik/blob/master/docs/Using-Fonts.md should be ported to be in the new doc format (this proceeded the use of documentation.js). It is more narrative style so can we lean on you to figure out where this should best live?

Thanks for pointing that out @springmeyer. I noticed them, but didn't realize how in depth they go. There is a wealth of knowledge in those files and we wouldn't want to lose any. I'll work on putting the necessary bits into /documentation and find a new home.

Phew, mapnik_image.cpp is complete! Going to focus on getting this all rendered in a nicer format for pushing to mapnik.org before working on mapnik_map.cpp

In favor of timeliness, I'm moving a couple of tasks out of this PR since they are mostly of out scope.
Future doc updates, including updated styles and upgraded documentationjs 4.0.0-beta version are now ticketed in #599
All verbiage from the outdated /docs directory has been incorporated into /documentation via JSDocs except for using_fonts.md which has a bit of information regarding XML styles that fall outside of the API documentation scope. Maybe it would be best to move this to a wiki page for now?
Next steps?

:eyes: and :+1: from @springmeyer @artemp @flippmoke @BergWerkGIS to make sure things look good here
make a PR into gh-pages with update /documentation directory

Worth noting this is what documentation looks like now:

Awesome @mapsam - Let's get eyes on this first thing Monday and then we'll merge.


Indirect calls for imported functions

Another attempt to address indirect calls for imported functions.
Fixes #35420

@typescript-bot perf test

package-lock existing is surprising. I thought we had an .npmrc that disabled package-lock.

I guess we started generating a package-lock.json at some point, but its still in our .gitignore. I've restored the version from main.

package-lock.json has been reverted. @RyanCavanaugh: any other conserns or should I merge?


CORE-19571: Use VNode uniqueness DB

This PR changes the Uniqueness processor to use the VNode uniqueness DB connection details instead of the cluster DB connection, allowing it to support VNodes configured with bring your own database.
Changes:

JPABackingStoreImpl has been modified in the following way:

VirtualNodeRepository has been added to the primary constructor for use by unit tests
The OSGi @Activate constructor is now the secondary constructor and sets the new parameter to VirtualNodeRepositoryImpl()
init now registers VirtualNodeEntities.classes with the jpaEntitiesRegistry
session will now lookup the VNode in VirtualNodeRepository and use the returned uniquenessDmlConnectionId to connect to the correct DB

A dependency on virtual-node-datamodel has been added to projects involved in the change.

So the uniqueness processor can read the VNode DB connection ID from the database.
An early version of this PR used the VNode info reader but the Kafka based nature meant we saw failures where the VNode information had not reached the uniqueness processor in time.

Tests have been changed in the following ways:

A new mock EntityManagerFactory has been added to represent the cluster EntityManagerFactory
DbConnectionManager mock:

getClusterEntityManagerFactory has been configured to return the cluster EntityManagerFactorymock
getOrCreateEntityManagerFactory has been configured to match calls passing in the DB ID instead of the name

A new mock VirtualNodeRepository has been added to return VNode info in response to find calls.

The uniquenessDmlConnectionId property of the returned object needs to match the ID that getOrCreateEntityManagerFactory is configured to match

build e2e


Ternary operator in binding expressions

This would be a nice thing to have:
[[prop?'yes':'no']]
without having to write a function.

Something like this would get really complicated.  For example, you could have property named that same string:
{
	properties: {
		"prop?'yes':'no'": {
			type: Boolean,
			value: true
		}
	}
}

If you're needing this functionality a lot, I would just make it part of a behavior:
var YourProject = YourProject || {};

YourProject.TernaryBehavior = {
	ternary: function (a, b, c) {
		return a ? b : c;
	}
};

Then just include that behavior anywhere it's needed.

This was deprecated since 0.5, as well as filters etc.

I don't know how hard it would be to implement it. But JSP has it. Angular has it. React has it. In fact, it React you can use any arbitrary JS expression.

It might be that having expressions and filters introduce a performance hit where used - but from a development standpoint, it's VERY useful to have.
Some examples:

[[value | currency]] will know the locale and format the number (as with angular - https://docs.angularjs.org/api/ng/filter/currency)
[[value & 0xff]] (needed this some time ago for a slider - found out that 1) expressions are not allowed in 1.x and 2) HEX values - apparently - are not considered numerals (why not? - a bug?) - I had to change it to [[_bitMask(value, 255)]]
any date/time rendering filters, custom output for dev/debugging - e.g. as "json" in angular

With the current "solution" in 1.x, you will need something like a super-master-behavior, inherited by ALL elements (including built-in) that has a ton of functions to compensate for missing filters and expressions - OR make custom functions and inheritance of built in elements all over.  In any case, the templates will become filled with function calls and it will not be easy to understand the exact behavior at first glance.  In the larger web projects, I've been working on (angular & some ember), I'd say filters were used in maybe 25% of the rendered bindings to make things easily localizable, custom formatted, etc. + the occational simple calculation or bit mask.
Last:  One could (sarcastically) argue that attributes slow down processing as well - and we should only be left with the custom tags (sans attributes) - because: "performance"... and if needed: "just make more custom elements for each specific need".

@larsgk don't fotget that Polymer is a library, not a framework. It shouldn't enforce you to use some formatters. There are other libraries for this, e. g. Intl.js etc, and those can be wrapped in behaviors like you mentioned.
Using ternary operators etc. in 0.5 means parsing data-bindings in runtime, just open dev tools and you'll see those {{ a ? b : c }} right there inside of attribute values.

@web-padawan Making filters like e.g. angular wouldn't enforce specific formatters - they can be custom injects and I think the ones included are mainly there as examples/because they are very common.
In general, even if it's not a framework, I am sure many will see it and use it as such - AND could benefit from (at least) solid guides on how to get around the gaps (e.g. missing expressions, filters, singletons and more) on the project web page.

fyi - my temporary fix until fixed in polymer2:
{{_eval('1 - 2')}} = {{_eval('Math.floor(1.2) - this._gimme2()')}}
Result: "-1 = -1"
with
...
_gimme2: function() {
    return 2;
},

_eval: function(str) {
    return eval(str);
},
...

Do I like it: no
Is it necessary to not go insane without expressions/filters/etc.:  yes

I believe in separate concerns: logic should be in JS and HTML is for markup.
Actually I'm, working on moving Polymer 0.5 project to 1.x and previously there were a lot of ternary operators (e. g. in the body passed to core-ajax elements). All this stuff makes me sad when it comes to refactor.
Another ting, there is a big work now with polymer-analyzer, which is used to parse elements and detecting data bindings as well as other features (properties, computed functions). Re-implementing filters and operators might require a lot of changes there.

We're much more inclined to make Polymer's template syntax pluggable than we are to pick and choose new syntax to add, so that the community is empowered to drive that. That said, it's non-trivial to make a good pluggable abstraction that doesn't slip in performance, etc. So far we're keeping most of the template parsing & binging effects code private, until we can ensure the extension points we have are robust, and then we hope to open that up for e.g. mixin authors to provide new features.  Unclear whether we'll get there by the final 2.0 release or if that would come after, but that's our general direction.
We have a tracking bug for this request here: https://github.com/Polymer/polymer/issues/3369. Closing this issue as a duplicate.


Increase number of participants

Hi there! I've seen multibuzz.app used for small groups and I like it a lot! I proposed to my company using this for a virtual employee event. Currently the buzzer app says it can hold up to 200 participants, and I want to know if it's possible to increase this number? Our company has 950+ employees, and while we don't anticipate everyone to join a buzzer room, we don't think 200 will be enough.

Hi Will,
Thanks for the quick response! Hosting multiple rooms is our backup plan
but also wanted to reach out and see if this is feasible! We're hosting an
hour of trivia on Friday, 5/17, so I completely understand exploring this
might take a while.
Thank you for looking into this! Appreciate it.
Best,
Siri
On Tue, May 7, 2024 at 12:22 PM Will Sun @.***> wrote:

Hi! Appreciate the note, and I'm glad the app has worked well so far. I'll
try to look into whether increasing the room size is feasible, but I'm not
sure I'll be able to get to this soon. In the meantime, one workaround
could be to host a few different rooms simultaneously.
—
Reply to this email directly, view it on GitHub
https://github.com/wsun/multibuzzer/issues/56#issuecomment-2098945413,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BIKY74TOYT4GCZXQUVFDBYLZBEEUFAVCNFSM6AAAAABHLME7MSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYHE2DKNBRGM
.
You are receiving this because you authored the thread.Message ID:
@.***>


Set partially requested Series to 'Available' when download completes

Description
When you request a partial series, ie -- only Season 1 of a 4 Season show -- when the download completes, it does not change from 'Requested'. This makes it hard to know when your request is actually complete. The Series will never set to 'Available' unless the entire Series is downloaded.
Desired Behavior
Jellyseerr should mark partial series requests as 'available' when the request has downloaded.
Requested should only be shown when a series is not yet downloaded as according to the request, and not the entirety of the series.
Additional Context
No response
Code of Conduct

[X] I agree to follow Jellyseerr's Code of Conduct

It should add a badge as partially available. If it's not changing from requested, then it's an improperly configured jellyseerr, and I have explained this on discord as well.


HelloHacktoberfest - JavaScript

Kindly assign this issue to me @ajjayymahato

Done

Can i work on this issue??

Sure @Pratham86

Hey @ajjayymahato  can you please assign me this to work on

@MohdSaquib114  I think someone is working on it. Please create a new issue.

Can you assign me please! @ajjayymahato


View the record of a patient

As an ED Doctor i can view the record of a patient so that i can keep track of every patient’s condition and treatment plan.

Currently record can be viewed at side panel of UI


Refactor architecture (again)

Finished with commit https://github.com/sharkov63/nvim-cfg/commit/9779b7cba7855ffb95e99151d270452b238f1f40


[DCOS-45512] Prepare for 0.5x release

This PR updates the Kafka repo to the state of mesosphere/dcos-commons@25f1b8a and explicitly selects SDK 0.54.3 as a release version.
Note this explicitly switches to vendoring for the dcos-commons/cli Go dependency.

We have already the latest SDK on master


Fix datasetKeyProvider typing

The lack of type for the argument breaks when TypeScript's noImplicitAny is enabled
datasetKeyProvider is optional, as it defaults to ChartComponent.getLabelAsKey

Thanks for the PR!

How to provide datasetKeyProvider and set the data into chart line graph