Option to get next link from loaded page

Instead of trying to guess the next page, you should be able to set an option that forces infinite scroll to get the next link from the next page.  This works if next buttons work differently then just /page/2
Especially useful when using cursors on Google App Engine.

This is something you can set using the pathParse option. You can alternatively change any of the options in your callback function.
I agree, though, this would be especially useful for those using Google App Engine. Maybe it could be built into a behavior?


Feat(eos_designs): Generate CVP Tags

Change Summary
This change adds a new feature: to configure Tags on CloudVision Portal and associate them with Devices and Interfaces.
This will allow for:

Correct and amendable generation of the Topology in CVP
Make Filtering in Dashboards easier
Allow for the specification of custom CVP Tags within the data model.

Related Issue(s)
No issues were raised for this new feature.
Component(s) name
arista.avd.eos_designs
arista.avd.cloudvision
Proposed changes

Add cloudvision_tags data structure to the generated eos_designs structured configs
Add new arista.avd.cloudvision role to deploy these tags to cloudvision.

How to test

Run make webdoc-up to host a local copy of the documentation that can be read on a browser.

Run the molecule test -s cloudvision_tags scenario. This will generate the structured config with cv_tags.

To run tests on a cloudvision instance

Create a lab with 1 cloudvision and the same devices as defined in cloudvision_tags scenario
Ensure devices are onboarded to cloudvision.
Set the follow environment variables:

CVP_ADDRESS
CVP_USERNAME
CVP_PASSWORD

Run the molecule test -s cloudvision_tags scenario. This will generate the structured config with cv_tags and apply the tags to cloudvision.

Checklist
User Checklist

Provide feedback on documentation of new feature.
Provide feedback on naming of new role and data model.
Test on existing projects and topologies.

Repository Checklist

[x] My code has been rebased from devel before I start
[x] I have read the CONTRIBUTING document.
[x] My change requires a change to the documentation and documentation have been updated accordingly.
[x] I have updated molecule CI testing accordingly. (check the box if not applicable)

After discussing internally, the data model will be changed to use the name key instead of label .

Requires the following CVP PR to be merged: https://github.com/aristanetworks/ansible-cvp/pull/679

Requires the following CVP PR to be merged and new ansible-cvp released: aristanetworks/ansible-cvp#679

That CVP PR has now been merged. Is it time to revisit this PR?

Closing this, but keeping the branch, so we can revive as needed later. I will branch from this to implement the subset generating the tags. The tags will then be pushed as part of the new CV integration in #3466


@ core/tulind.js: 816 inputs missing

I think you need this for the tulip ultosc inputs
[data.high, data.low, data.close]

Thanks, I'll fix this soon.


fix baostock test case

fix baostock logic error
update its testcase

Thanks for your efforts.
@klisly have you tested it?

Yes

Yes, have passed test case


Tabs should have a property to be full width

In Material Design Guidelines about tabs (https://www.google.com/design/spec/components/tabs.html#tabs-usage), the default components are full width: they occupy all the horizontal space available.
It could be good to have a prop to have this kind of tabs.
I tried to apply the CSS and it visually works, but the line that tells you which one is the current Tab is not responsive (it doesn't shrink/enlarge, so as soon as you resize the window, the layout is broken).

I just submitted a pull request #706 for this.

Done!


Add Testing

Add Testing
Motivation
There's basically no unit testing happening! Huge issue!! Unacceptable!!!
Solution

Do a thorough search into how testing is performed in Julia.
Write unit tests, starting from the bottom up, using a Julia standardized testing format. This entails writing tests for the sub-modules in the following batches:
   1. Events, DataReaders
   2. Engine
   3. Backtest
   4. Utils

/cib

Still incomplete! None of the Backtest interface functions are directly tested yet. ☹


Orbit library

I will add here some information on what orbit libraries we recommend as a guideline for the user.
It is important that the orbit libraries run are not too small. We can add more comments under installation guide, in the config file but also potentially on more pages in the github.

I think here is a good place to give examples for the orbit libraries: (https://dynamics.univie.ac.at/dynamite_docs/getting_started/configuration.html)
5 x 4 x 3 x 1 Comment: Test-orbit library. A good orbit library for fast checking whether DYNAMITE runs, but it is too small to be used for scientific analyses
21 x 10 x 7 x 5: Good orbit library for CALIFA and ATLAS3D-like data quality. Examples: CALIFA (Zhu et al. 2018; https://ui.adsabs.harvard.edu/abs/2018MNRAS.473.3000Z/abstract), SAMI (Santucci et al. 2022; https://ui.adsabs.harvard.edu/abs/2022ApJ...930..153S/abstract), ATLAS3D (Thater et al. 2023b; https://arxiv.org/abs/2305.09344), MANGA ())
Bigger orbit libraries for MUSE-like data: e.g. Poci et al. 2021 (https://arxiv.org/pdf/2102.02449.pdf), Ding et al. 2023 (https://arxiv.org/abs/2301.05532), Thater et al. 2023 (https://arxiv.org/abs/2304.13310)


types: arena collect and control

[x] Add the type declaration about arena collect and control.
[x] Add RESOURCE_SCORE to ResourceConstant.
[x] Add ScoreCollector to param target in Creep.transfer method.

I think you need to add to arena/prototypes/index.d.ts:
/// <reference path="score-collector.d.ts" />

We are slowly moving over to https://github.com/screepers/typed-screeps-arena for the types. With this repo being purely a starter pack.
I will test this PR hopefully tonight, but would very much appreciate if you could also make a PR to the develop branch on the typed-screeps-arena repo

I think you need to add to arena/prototypes/index.d.ts:
/// <reference path="score-collector.d.ts" />

I saw similar code at https://github.com/screepers/typed-screeps-arena, but I have question about it. It seems that I can also access the module before adding this reference. How can this help?

We are slowly moving over to https://github.com/screepers/typed-screeps-arena for the types. With this repo being purely a starter pack.
I will test this PR hopefully tonight, but would very much appreciate if you could also make a PR to the develop branch on the typed-screeps-arena repo

I saw the similar code has already been submitted in typed-screeps-arena develop, it seems that I don’t need to submit another PR. ;)


Infinite buffering on Android (Exoplayer) caused by seeking

Current behavior
If I have a very long video (45+ mins), and scrub a lot, the video player on Android will get stuck in an infinite buffering state. I initially thought it might be an HLS bug, but it happens on mp4 videos too.
Reproduction steps

Have a very long video on android Exoplayer
have a scrubber
scrub a lot

Expected behavior
I expect the video to not get stuck.
Platform
Which player are you experiencing the problem on:

Android ExoPlayer

Video sample
Any long video.
I found a way to fix the issue, but I'm not sure if the fix has any bad repercussions. I do not understand the mechanics of this code, so any feedback would be appreciated! My fix is to replace the contents of buildHttpDataSourceFactory with:
DefaultHttpDataSourceFactory factory = new DefaultHttpDataSourceFactory(getUserAgent(context));

if (requestHeaders != null)
    factory.getDefaultRequestProperties().set(requestHeaders);

return factory;

Hello and good day. May be useful. I've found, that if you're using react-native-progress bar component it works slower. Especially when you use a seek function. I removed react-native-progress and replaced it with native ProgressViewIOS and ProgressBarAndroid. It works fine, no more infinite buffering

@aalzanki @alejandrorangel Using the DefaultHttpDataSourceFactory does tend to fix these issues, however I have been hesitant to switch over from OkHTTP because we'd lose support for cookies set by React Native, which a number of people are relying on.
Would you mind testing with 4.1.0, we updated the OkHTTP library in 4.0.0 which fixed a number of issues like this. It would be super helpful to get confirmation on whether OkHTTP will work properly or we need to switch over toDefaultHttpDataSourceFactory.

I'll try to upgrade to 4.1.0 (or 4.0.0) and test with it in the next couple of days.

Sorry for the long wait. I tested it again. I can still reproduce the bug on the latest version.

This is happening on version 4.4.1 as well.

Faced this issue recently and those changes mentioned by @aalzanki seems to fix this issue. Any chance that this changes will be merged since patching up the DataSourceUtil.java manually to fix this issue does not seems to be a good idea in long run

I was the same problem, I only create a cooldown function by seek
function reactivatedVideo(time: number){
    clearTimeout ( reactivateVideoTimer );
    onSeekActive = true;
      reactivateVideoTimer = setTimeout(() => {
        onSeekActive = false;
        videoRef.current.seek( time );
        setState({
          ...state,
          play: true,
          currentTime: time
        });
      }, 500);
  }

Same issue here, the fix provided by @aalzanki works like a charm.

I am using react-native-video 5.1.1, how do I apply the fix mentioned by @aalzanki?

How can one update exo player ? I am using the latest version as well 5.1.1 of react native video but I am facing this issue. Can someone please update the exo player for this repo ?

@jwebcat : Thank a lot for replying. This helped me fix my issue as well. Your a saviour :)


Text of  Recovery Phrase entered into “Restore Wallet” page is not translated after selecting Espanol, Deutsch , Portuguese languages.

Frequency: 100%
Repro on build version: Test flight Alfajores Nightly build V1.23.0, Android Internal Alfajores Nightly build v.1.23.0
Repro on devices: iPhone 13 mini (15.1.1), iPhone 12(14.7.1), Samsung Galaxy A8+(8), OnePlus 7T (11)
Pre-condition:

User must have selected the Espanol language while opening the application.
User must be on the “Restore wallet” page on restore account flow.

Repro Steps:
1.Enter the valid recovery phrase text in the textbox and observe.
Current Behavior: Text of  Recovery Phrase entered into the “Restore Wallet” page is not translated  to Espanol language as the user selected language is Espanol.
Expected Behavior:  Text of  Recovery Phrase entered into the “Restore Wallet” page should be translated to Espanol language as the user selected language is Espanol.
Observations:

Text of  Recovery Phrase entered into the Restore Wallet page for Deutsche language. Recovery phrase in Restore wallet screen.jpg
Text of  Recovery Phrase entered into the Restore Wallet page for Espanol language.Recovery phrase in Restore wallet screen.jpg
Text of  Recovery Phrase entered into the Restore Wallet page for Portuguese language.Recovery phrase in Restore wallet screen.jpg

@ValoraQA @MuckT I don't have access to the screenshots -already requested it. Can you confirm that you're referring to the actual seed phrase? If so, the current behavior is expected, and the Recovery Phrase will always be in the language in which it's first set up, regardless of the language users choose afterward.

Hey @mpgaarciaa, we have given access to the requested screenshots.
Thanks..!!

@MuckT this is a false error - feel free to close.

Hey @MuckT, As a user perspective, cannot we have the words of recovery phrase translated in respective languages?


Enable creation of two-mode networks

Currently the PrepText function accepts either words or groups as the node type. It would be useful to be able to create and visualize two-mode networks by using both of these as nodes.

I've also been wondering about this - reading the vignette really made me want to do two-mode networks - did I overlook something or is it just not possible?
I was also thinking of quick-and-dirty implementations, e.g. adding the words provided by the InterpretText function to the visualization - could that be a work-around if creating two-mode networks is not possible (yet)?

Hi theresa- sorry for the slow reply. When you say you want to do two-mode networks, do you mean you want to visualize two-mode networks?

Hi, thanks for the answer.
Yes, I mean visualizing (and of course also preprocessing, e.g. thinning out based on the number of connections etc.) . One of the things that drew me to trying out was the Two-mode networks visualization you have in the beginning of your vignette. Of course you propose to move beyond this two-mode form by projecting it to a one-mode form but are there plans to also implement projections in the two-mode form in the package?

No immediate plans, unfortunately.
On Oct 29, 2018, at 11:37 AM, theresagessler <notifications<EMAIL_ADDRESS>wrote:
Hi, thanks for the answer.
Yes, I mean visualizing (and of course also preprocessing, e.g. thinning out based on the number of connections etc.) . One of the things that drew me to trying out was the Two-mode networks visualization you have in the beginning of your vignette. Of course you propose to move beyond this two-mode form by projecting it to a one-mode form but are there plans to also implement projections in the two-mode form in the package?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cbail_textnets_issues_7-23issuecomment-2D433957097&d=DwMFaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=MT-Z8xM6IWJcuwrMhSS_orYu7NXahq6npuGw-mSN924&m=aEbNux9fuSfUg-rvFT1sp7ffmgWDa5VRiQY5oz7Piws&s=Kw4nY1WPWMCdaEMtdNAqVzgOv_m78Ond4e3z73nWkGo&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AICdD6NTfDrg45uYab-5FmAts3pV9Oue13ks5upyCugaJpZM4U8oZh&d=DwMFaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=MT-Z8xM6IWJcuwrMhSS_orYu7NXahq6npuGw-mSN924&m=aEbNux9fuSfUg-rvFT1sp7ffmgWDa5VRiQY5oz7Piws&s=JyW5f4FyHlhFbP8ZNw96ZGxjjtcpFkfoSHM3dCcj-Lk&e=.

I hope Chris won't mind the shameless plug. My Python implementation of textnets can visualize two-mode (bipartite) networks. I'm about to do a new release; here's a demo.


CQL Unit Testing

EDIT: Updated based on discussions below
The language server should support CQL unit tests. The first step is to define what a unit test looks like in CQL. We propose adding support for some @tags to support specifying unit tests and their input requirements in CQL

Tag
Value
Description

@test
N/A
If specified on a Library, marks it as a test suite. If specified on a definition, marks it as a test

@parameter
Name CQLValue
set input parameters for Libraries

@asof
CQLDatetime
evaluate as of a specific date

@context
Context=Value
the value of the context

@data
Path
source directory for test data

@terminology
Path
source directory for test terminology

@mock
Definition=Value
(future work) specifies a mock value for a CQL definition

@parameterized
<tag>
(future work) specifies that a test should be repeated with a different set of inputs

@dataprovider
ExpressionReference
(future work) supplies a set of data used to run tests

@ignore
N/A
(future work) Report the results of this test, but don't fail the overall suite if this fails

An example of a test Library using these tags:
// @test
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-01
// @context Patient=654
// @terminology tests/vocab
library DQMTest

include DQM as targetLibrary
include org.opencds.cqf.cql.Asserts version '1.0.0'

// @test
// @data tests/data
// @context Patient=123
define "AtLeast2Obs":
  assert(Count(targetLibrary.PatientObs)).isGreaterThan(2)

Evaluating a definition marked with @test and getting a Message with the severity level of Error is a test failure.
http://cql.hl7.org/09-b-cqlreference.html#message
@test is required to use the other tags. If any are present without @test, it's an error condition. IOW, these tags are only allowed on unit test libraries.
Any @tag defined at the Library level sets the default @tag value for the set of tests within the Library. @tag values on a definition override the default Library @tag.
Each @test definition is evaluated independently and with the appropriate input parameters as defined by the merged definition and library @tag values. It's up to the test runtime environment to optimize data or context caching to speed up test execution.
If during the evaluation of a test, the CQL definition references any other CQL definitions that are also marked as @test (or with any other of the proposed tags), those @tags are ignored. Only the @tags of the entry point apply. That is to say, during the evaluation of a test the context, input parameters, terminology, or data may not change mid-evaluation.
CQL Test libraries SHOULD NOT be shipped as part of an executable package, such as a FHIR npm package.
The example org.opencds.cqf.cql.Asserts library does not exist at the time of this writing. The contents would be a set of helper functions to assist in specifying expected results for tests.

Relevant API for VS Code:
https://code.visualstudio.com/api/extension-guides/testing

Had some discussions with Bryn. We think that these test tags should be disallowed outside the context of a test Library to avoid confusion with runtime behavior of CQL code.

Proposed tags:
@test = marks a Library as a group of tests, marks a specific definition as a test within the Library
@parameter Name CQLValue = set input parameters for Libraries
@asof CQLDatetime = evaluate as of a specific date
@context Context Value = the value of the context
@source Path = source directory for test data
@test is required to use the other tags. If any are present without @test, it's an error condition.

Open questions:
Multiple contexts supported?
Use of tags outside tests?
Use of remote server for data?
Terminology tag needed for terminology source?
Shared data across tests? (workaround, load everything and set context)

I would advocate for being able to use a remote server for data and/or terminology. I think that would promote shareability and a terminology source allows for more robust testing.

The main issue/consideration there is that "unit tests"  for other languages are generally expected to run quickly and not require any external data or input. IOW, you wouldn't expect a unit test to fail if a remote server were down.
Bryn and I also discussed some alternate test conventions. We did a quick survey of various tools and languages out there such as C#, Java, Python, Haskell, F#, and SQL and found that all of them had a widely available XUnit inspired framework. So that seems to be the most common and familiar paradigm for a wide variety of developers. In principle, as a functional language, CQL could adopt some other convention such as "all test definitions return true." We think that the "Assert expected result" paradigm is the least surprising, and allows authors to inspect test output for the sake of a quick "edit, run, debug" development loop.

It would be nice if the tool took a screenshot of useful data within a database/FHIR Server and saved that as input to the test. In my experience, CQL changes are always a reaction to new data in a server as opposed to being specification driven. Most CQL constructs that I have seen never treat edge cases. They are only created to match the specific way an institution is utilizing FHIR.

Writing unit tests for CQL in CQL... neat!  We developed a test framework for CQL here, but it's quite different in its approach.  I like the idea of adding an XUnit flavored approach in CQL.  Very cool.
If it is built into the language server, what does that mean for being able to run automated tests from the command line and/or in a headless CI environment?  Ideally, I'd like a command I can put on my path so I could just run cql-test from a CQL project folder and have it just work (perhaps with a little required configuration).  Does integrating it into the language server still allow for that use case?
Have you considered building it on top of an existing framework so you can take advantage of runners, reporters, etc?  That might get you some extra bang for your buck -- but perhaps it also limits some of the features you can provide.  Just throwing out some ideas...

I'm on a team that has developed CQL-based CDS in the past, and used a git repository for collaboration.  In that case, having tests automatically run for PRs is quite helpful in ensuring that code meets a certain standard of quality before being merged to main. That's what I was advocating for (not full-on interoperability testing).

@cmoesel

We developed a test framework for CQL here,

The approach you've created there is aligned with what I had in mind for higher-level PD/Measure testing. My thinking was that for CQL it'd be nice to try to keep the developer in the CQL as much as possible.

If it is built into the language server, what does that mean for being able to run automated tests from the command line

This is a good point. The cql-evaluator can already run CQL from the command line and accepts the equivalent of these tags as arguments. The new piece is test case discovery from the tags. My thinking had been to build the discovery bits into the language-server as a "trial use" thing and go from there, but putting the discovery bits in the evaluator would allow command line execution too.

Have you considered building it on top of an existing framework

The defacto build tool for most CQL projects is the IG Publisher. It's not particularly extensible so it's a challenge to integrate with it cleanly. It does already have a cql-translator integration so maybe it's not too difficult extend that a bit. Reporting in that scenario would look like the typical QA errors.
I take a look at some other options too and see what I come up with. Thanks for the suggestion.

Maybe using CQL to select subsets of data and exporting it in a test-ready file is another tool?

It feels like a tool to compare an older snapshot with a current snapshot of the required subset could be a very important troubleshooting tool.

Where is the input XML/JSON specified for the unit test? Assuming that you can specify what data is being unit tested somewhere...???

The more I think about this idea of setting up the test execution environment inside CQL, the more I dislike it.
It feels like we are finding ways to go around the fact that CQL is just a query language. To account for practical settings these @tags can get very complicated and not also not be complicated enough for practical use. After all, you only need one tricky test case to make devs go back to other languages.

@seanmcilvenna - The data source is specified with the @source tag. Should we call that @data instead? Maybe we need one for terminology as well.

@vitorpamplona

After all, you only need one tricky test case to make devs go back to other languages.

The @tags are already part of the CQL spec and are used for things like fluent functions. So the tags themselves are not new.
I think the fact that CQL is only a query language actually makes it a much more natural fit for assertion-based testing. There's no mutable state, there's no asynchronicity, there's no threading, it's defined to be idempotent (given @asof), etc. Given that test data is locally available, and that all you can do is query the data and verify the results of the query are as expected, what's the complicated use case you have in mind?

I hear the benefits of the language and I agree. My issue is with the complexity of the tags and how easy it is to read what's happening.
For instance, let's say you have a suite with 3000 tests. For each, you build slightly different versions of your data to account for everything that can happen in production.
// @test
// @data tests/data1
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-01
define "AtLeast2Obs":
  assert.GreaterThan(Count(DQM.PatientObs), 2)
  assert...
  assert...
  assert...
  assert...

// @test
// @data tests/data2
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-02
define "AtLeast2Obs":
  assert.GreaterThan(Count(DQM.PatientObs), 2)
  assert...
  assert...
  assert...
  assert...

// @test
// @data tests/data3
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-01
define "AtLeast2Obs":
  assert.GreaterThan(Count(DQM.PatientObs), 2)
  assert...

Here's how I would write a realistic test with multiple data inputs in ruby. Keep in mind that devs have a fully-feature language in every step along the way to specify how to build, how to destroy, how many times to run, how to modify from one run to another, etc.
# app/models/article.rb
class Article < ApplicationRecord
  enum status: [:unpublished, :published]

  def self.published_in_the_past
    # we expect this method to fail first
    where(nil)
  end
end

# spec/factories/articles.rb
FactoryBot.define do
  factory :article do
    status :unpublished

    trait :published do
      status :published
    end

    trait :in_the_past do
      published_at { 2.days.ago }
    end

    trait :in_the_future do
      published_at { 2.days.from_now }
    end
  end
end

# spec/models/articles_spec.rb
require 'rails_helper'

RSpec.describe Article do
  describe ".published_in_the_past" do
    let!(:unpublished_article)     { create :article }
    let!(:published_in_the_past)   { create :article, :published, :in_the_past }
    let!(:published_in_the_future) { create :article, :published, :in_the_future }

    it { expect(Article.published_in_the_past).to include published_in_the_past }
    it { expect(Article.published_in_the_past).not_to include unpublished_article }
    it { expect(Article.published_in_the_past).not_to include published_in_the_future }
  end
end

With a suite of 3000 tests in mind,

So, integration tests are a separate concern in my mind and this proposal is not intended to cover that. I don't think it's the case that we're trying to test CQL and data and the environment. The environment is fixed in this proposal and the data is hand-crafted by the author of the CQL. You wouldn't include 1000s of patients in a source-code repository for any language.

// @test
// @data tests/data1
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-01
define "AtLeast2Obs":
assert.GreaterThan(Count(DQM.PatientObs), 2)
assert...
assert...
assert...
assert...

// @test
// @data tests/data2
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-02
define "AtLeast2Obs":
assert.GreaterThan(Count(DQM.PatientObs), 2)
assert...
assert...
assert...
assert...
The intent is to allow a given @tag to be defaulted at the Library level. Secondarily, you couldn't have multiple asserts the way you've written it there. CQL isn't imperative in that fashion.  But the readability of your example would actually be:
// @test
// @terminology tests/terminology1
// @context Patient=123
// @parameter "Measurement Interval" [@2019,@2020]
library Test

// @test
// @data tests/data1
// @asof @2020-10-01
define "TestAtLeast2ObsOctober1":
  assert.GreaterThan(Count(DQM.PatientObs), 2)

// @test
// @data tests/data2
// @asof @2020-10-02
define "AtLeast2ObsOctober2":
  assert.GreaterThan(Count(DQM.PatientObs), 2)

Still not the prettiest, but not all that bad compared to Java annotations.

Can we load multiple files in the @data tag to avoid duplicating test information?

Yes, and that's how IGs are frequently structured.

Do we have caching instructions on the tags?

This doesn't strike me as necessary for the small amount of data a unit test entails. That said, it would be possible to implement pretty easily I think.

How do we specify these https://github.com/tags to support most of what we see in other testing frameworks out there?

Also not necessary IMO given the limitations of CQL. For example, test order doesn't matter

Secondarily, you couldn't have multiple asserts the way you've written it there.

oh, wow. Yes, I wouldn't want to copy-paste all the tags and make the framework reload all the data just for 1 assertion.

make the framework reload all the data just for 1 assertion.

Allowing the tags to be defaulted a Library level gives the author some level of tunability. They could create a data set that's reused for a single library. And the test framework could be smart enough to notice duplicate data tags across expressions, libraries, or the entire test set and keep that cached. Given that there's no chance of data changing, caching it for the entire test run is a safe thing to do.

Keep in mind that devs have a fully-feature language in every step along the way to specify how to build,

It's also important to recognize the target audience of CQL, which are clinicians or knowledge authors who may have zero experience with any programming language. The target users of CQL wouldn't know how to spin up a Ruby script.
FHIR operations and cds-hooks is a whole other level of complexity and authoring concerns. You can specify entire clinical workflows (not just expressions) with a PlanDefinition, so authoring and testing that is much more complicated. That's also, generally, where integration tests would occur. Given this population of 10,000 patients, how many passed a Measure? Do you use a visual workflow builder GUI to write a PlanDefinition? Those also may be specified without CQL at all, or using some other expression language, so I'm trying to separate those concerns (which are valid and solutions are needed in that space) from this one, which in my mind is quite a bit more narrow.
The "Arrange, Act, Assert" is a pattern that's commonly used with xUnit test frameworks. "Act" in CQL is evaluating an expression, "Assert" (according to this proposal) is sending an "Error" message if some condition is not met, and as a read-only lanauge CQL provides no functionality to "Arrange." So the "Arrange" has to be handled somewhat out of band. You can either jump out to some other language or construct, or you can add some meta-data to the CQL definition that allows a test framework to do that for you.
If you jump out to something else, what do you use? Javascript because the FHIR IGs are packaged as npm packages? Ruby because the IG Publisher requires it to be installed to run? Java because the CQL engine is written in Java? There's no obvious, IMO, answer. Anything I can think of is actually much more complex than the tags I've proposed here. So relative to other possible solutions, the tags seem simple.
The closest thing to a standard build tool in this space is the IG Publisher. Would it be preferable to specify a test suite as an Ant task the Publisher can use? For integration tests, I think that's actually a reasonable solution. For a small set of unit test data, it seems preferable to keep it all in CQL as much as possible.

I agree. The problem is the ideas' dependency on the "Arrange" tooling. If authors need other languages to arrange things together for the test, then:
1- They are not just a clinician anymore. It's more likely a developer job.
2- Once you go there, why not just stay there and use that language's testing frameworks? Why would you use a more restrictive language if you know and use something else?
That's why I suggested solving the "Arrange" step with a CQL tool over FHIR servers. In that way, you don't need to know JSON or any other language. You can just generate 100s of similar unmaintainable files with small variants based on a single CQL code. Then just generate 100s of test CQL functions, one for each file, with the same or similar assertion condition.

Hmm... If I'm understanding you correctly you're suggesting code-genning test cases based on the CQL that's written?

CQL authors and test authors never see or change the data files.

In practice, because CQL is model-agnostic (meaning you can using QDM, using FHIR, etc) CQL authors do have to have an understanding of the model that they are using. In fact, you can author CQL that's unique to a specific profile for FHIR, for example, using QICore. You can even specify a profile within an IG and the expectation is that the tooling will eventually auto-generate the necessary ModelInfo to allow you to author CQL against it.
To correct edge cases authors have to inspect the data. It's not enough to just know you have an incorrect result. You have to know why that happened. "Oh, I see, this Encounter is missing an endDate and my logic doesn't account for that." That's generally true of any programming language. You can't fix the logic if you don't understand why it failed and the source data is an important part of that.
There are tools for generating "realistic" data, such as Synthea. I've used that to generate millions of sample patients for testing a Spark cluster. Executing a Measure (or even CQL) against a cluster like that is beyond the scope of what I'm hoping to achieve here.

Then just generate 100s of test CQL functions, one for each file, with the same or similar assertion condition

Even if you're able to generate 100s of test functions you still need a way to specify "What is a test, and how do I know if the test passed." You could do that all in an outside tool, which is what is currently done. The Bonnie tool, for example, provides a way to select test data and set expected results. However, to do it in CQL you need to, at a minimum,  accept the convention that a "Error" Message indicates a test failure and report that as appropriate for a given toolchain or authoring environment. The @test tag provides a way to indicate which definitions are tests and which are not.

Yes, people know the model they are working with. They don't know JSON/XML. At least not enough to understand the way the data is assembled by these formats into the model they know well.
I agree that they need to see what's in the data they are testing. They just shouldn't touch the low-level files. Maybe we just need another tool to help them visually create these files.
And yes, they still need to code the tests. But tooling can help them apply the same test in 100s of data objects.

However, to do it in CQL you need to, at a minimum, accept the convention that a "Error" Message indicates a test failure and report that as appropriate for a given toolchain or authoring environment.

Yet another limitation. I just changed the CQL Tests on the engine and I had to make the tooling look for "TEST PASSED" strings :)

They just shouldn't touch the low-level files.

Can we agree that this isn't relevant to the proposal here? Whether the authors craft the data manually or there's a visual tool for doing so, is the @data tag sufficient to indicate the test set? It works in the context of an IG which is, currently, the most common use case for CQL.

But tooling can help them apply the same test in 100s of data objects.

This is something like the @Parameterized in JUnit. That's a nice to have feature. Does anything here exclude that as future work?

Yet another limitation.

This part I don't understand. Every test framework I'm familiar with has some convention for indicating test failure, usually an Exception. Even if we were to write the tests in Java capturing the "TEST PASSED" string results in an Exception at the JUnit level. Do you have another idea in mind?

They just shouldn't touch the low-level files.

Can we agree that this isn't relevant to the proposal here?

I think it is relevant. Your point is that the "Arrange" part is someone else's problem. This is fine as an argument, but somebody will need to solve it. :)

This is something like the @Parameterized annotation in JUnit. That's a nice to have feature. Does anything here exclude that as future work?

No, the 100s data objects that I am citing referees to a pre-defined version of the FactoryBot model in Ruby: from here: https://github.com/DBCG/cql-language-server/issues/40#issuecomment-1164624862
@ParameterizedTest is interesting as well, but not a replacement.
@ParameterizedTest
@EnumSource(
  value = Month.class,
  names = {"APRIL", "JUNE", "SEPTEMBER", "NOVEMBER", "FEBRUARY"},
  mode = EnumSource.Mode.EXCLUDE)
void exceptFourMonths_OthersAre31DaysLong(Month month) {
    final boolean isALeapYear = false;
    assertEquals(31, month.length(isALeapYear));
}

Yet another limitation.

This part I don't understand. Every test framework I'm familiar with has some convention for indicating test failure, usually an Exception. Even if we were to write the tests in Java capturing the "TEST PASSED" string results in an Exception at the JUnit level. Do you have another idea in mind?

Throwing exceptions would be nice. That's what I refer to as "limitation": You have to make things work with less. This could be ok if you don't have other options, but people do have options.
I am not against CQL for tests. That's fine. We can deal with it. I am less inclined to the @Tag structure and static data inputs alone to structure all the potential variability we usually see in test cases.

I think it is relevant. Your point is that the "Arrange" part is someone else's problem.

There are already many tools for generating FHIR resources such as GUIs (such as the ClinFHIR tool), exporting from a FHIR server via the $everything operation or bulk data export, or via synthetic test data generation tooling such as Synthea. It's real problem, but it's not the problem of specifying tests, IMO.

object creation directly inside it in a way

CQL already supports this. You can create objects. You just can't write them. Here's a link and an example:
http://cql.hl7.org/02-authorsguide.html#structured-values-tuples
define "PatientExpression": Patient { Name: 'Patrick', DOB: @2014-01-01 }

Throwing exceptions would be nice.

The Error Message is the equivalent of an exception in CQL.
http://cql.hl7.org/09-b-cqlreference.html#message

Error – The operation produces a run-time error and return the message to the calling environment. This is the only severity that stops evaluation. All other severities continue evaluation of the expression.

define "PatientExpression": Patient { Name: 'Patrick', DOB: @2014-01-01 }

Nice! Why don't we base the CQL Test Suite on this, then? The @Data tag should only be used when the data requirements for a give test are massive.

@ParameterizedTest is interesting as well, but not a replacement.

I'm suggesting we use it to parameterize the other tags, such as the @data or `@context annotations. Consider this:
// @data src/giant/test/set
// @parameterized @context Patient=1, Patient=2, Patient=3, Patient=4

That does replicate the behavior you're suggesting.

Nice! Why don't we base the CQL Test Suite on this, then?

This doesn't cover the most common usage of CQL, which is authoring inside of an IG. IGs require each example resource be written as JSON or XML. See this for examples:
https://github.com/cqframework/ecqm-content-r4-2021/tree/master/input/tests/BreastCancerScreeningsFHIR

But for that they can just use the JSON in the @Data tag. Clinician authors should focus on the objects they can create inside CQL.

Are you arguing against the @data tag completely or are you saying that best-practices for unit tests would be that the data is created inline? I agree with that latter. If possible, tests should be self-contained and we should support that scenario.

Maybe I'm testing different things than others, but sometimes I need a good chunk of data for a test (Patient plus multiple Conditions/Observations/Procedures/etc).  It's much easier for me to produce that data using existing tools for such, rather than having to build it all in CQL.
Thinking on this, however, I'm realizing that in some cases, testing small units of CQL can be quite difficult -- because CQL definitions so often call out to other CQL definitions.  For example, imagine a statement like define Foo: if Def1 then 1 else if Def2 then 2 else 3. It's impossible to test that logic alone without also testing all the underlying logic in Def1 and Def2.  This is how you sometimes end up needs tons of data just to test one statement.
At the risk of complicating things further, I wonder if we eventually might want a mock framework that would allow us to say @mock Def1 = false to avoid needing to build up all the data needed for referenced expressions.

Are you arguing against the @data tag completely or are you saying that best-practices for unit tests would be that the data is created inline? I agree with that latter. If possible, tests should be self-contained and we should support that scenario.

The later. But from a user's point of view. If the idea is to target clinician authors, don't make them learn JSON/XML or other IG-based roles.

Maybe I'm testing different things than others, but sometimes I need a good chunk of data for a test (Patient plus multiple Conditions/Observations/Procedures/etc). It's much easier for me to produce that data using existing tools for such, rather than having to build it all in CQL.

I am in the opposite camp. I usually see very large data input test files that are just assessing if people have two observations or if an operation doesn't crash. Data authors could have manually removed 95% of those data fields and still run the same test. It's terrible for maintenance (not knowing why there is so much data in a given test).
But if those test cases exist because the authors were not devs, I give them a pass :)

It's impossible to test that logic alone without also testing all the underlying logic in Def1 and Def2. This is how you sometimes end up needs tons of data just to test one statement.

I wonder if we eventually might want a mock framework that would allow us to say @mock Def1 = false to avoid needing to build up all the data needed for referenced expressions. This is how you sometimes end up needs tons of data just to test one statement.

I really like this idea. Maybe not as first pass, but the utility of this is obvious to me. This could go a long way to minimizing the data requirements as well, to Vitor's point.

Can we do this? @Data evaluates the expression and makes the returning list of objects the data source for the test.
library VitorTest

include DQM
include org.opencds.cqf.cql.Asserts version '1.0.0' as assert

define "Patient1": Patient(Identifier: 1, Name: 'Patrick', DOB: @2014-01-01)
define "Observation1": Observation(Subject: Patient1, ...)
define "Observation2": Observation(Subject: Patient1, ...)

define "setup":
  { Patient1, Observation1, Observation2 }

// @test
// @data setup
define "AtLeast2Obs":
  assert.GreaterThan(Count(DQM.PatientObs), 2)

A few more questions/considerations:

CQL supports multiple context definitions within a single Library. Should this be represented as repeated @context annotations? Should it be a list of values instead? How does that play with the proposed @parameterized tag?

// @test
// @context Patient=1
// @context Encounter=2
define "Whatever": true

CQL supports using multiple data models, though that is not common. Should the @data tag support that?

using FHIR version '4.0.1'
using QDM version '4.6`

// @test
// @data FHIR=path/to/fhir/data
// @data QDM=path/to/qdm/data
define "Foo": "Bar"

Should unit test libraries be bundled and shipped with CQL packages? Typically test libraries are excluded when shipping software. What should the standard directory structure be for separating tests from code?

Can we do this? @Data evaluates the expression and makes the returning list of objects the data source for the test.

In theory, yes, but it significantly complicates the implementation of the test framework. The reason is that you end up making multiple passes across the CQL to fully resolve all the inputs. It's conceptually the same reason why Java/C# only allow static values for annotations/attributes.

I think it could be feasible. TestNG has a similar scheme:
public class DataProviderTest
{
	private int param;

	@Factory(dataProvider = "dataMethod")
	public DataProviderTest(int param) {
		this.param = param;
	}

	@DataProvider
	public static Object[][] dataMethod() {
		return new Object[][] { { 0 }, { 1 } };
	}

	@Test
	public void testMethodOne() {
		int opValue = param + 1;
		System.out.println("Test method one output: " + opValue);
	}

	@Test
	public void testMethodTwo() {
		int opValue = param + 2;
		System.out.println("Test method two output: " + opValue);
	}
}

Outputs:
Test method one output: 2
Test method one output: 1
Test method two output: 3
Test method two output: 2

PASSED: testMethodOne
PASSED: testMethodOne
PASSED: testMethodTwo
PASSED: testMethodTwo

Maybe we borrow the @DataProvider tag?
library VitorTest

include DQM
include org.opencds.cqf.cql.Asserts version '1.0.0' as assert

define "Patient1": Patient(Identifier: 1, Name: 'Patrick', DOB: @2014-01-01)
define "Observation1": Observation(Subject: Patient1, ...)
define "Observation2": Observation(Subject: Patient1, ...)
define "Observation3": Observation(Subject: Patient1, ...)

@DataProvider
define "setup1":
  { Patient1, Observation1, Observation2 }

@DataProvider
define "setup2":
  { Patient1, Observation1, Observation3 }

// @test
define "AtLeast2Obs":
  assert.GreaterThan(Count(DQM.PatientObs), 2)

Also, given fluent functions, the following is possible:
library Test

include DQM
include org.opencds.cqf.cql.Asserts version '1.0.0' as assert

// @test
define "AtLeast2Obs":
  Count(DQM.PatientObs).GreaterThan(2)

More of an observation on style than anything else. I kinda don't like it.

Also, given fluent functions, the following is possible:

I like fluent, but it should be this:
assert(Count(DQM.PatientObs)).isGreaterThan(2)

Or more of a Jest style:
define "AtLeast2Obs":
  expect(Count(DQM.PatientObs)).toBeGreaterThan(2)

Ha.  @vitorpamplona and I were thinking along the same lines!

FWIW, I prefer "assert" over "expect".

Looks like @JPercival hit a nerve... :)

Hmm... Not sure how expect or assert would work as you've described there, given you can't define a function on objects in CQL. Maybe this?
definition function assert(value : System.Any):
     Tuple { value : value }

 // @fluent
 definition function isGreaterThan(actual: Tuple, expected: System.Integer):
      if not actual.value > expected then
         Message(Error, "expected {}, found {}")
      else
         true
       end

My only concern with @dataprovider is that it makes the test runtime more complex. Would you be ok with putting that on the backlog for future enhancements? I can see the utility, but knowing what I know about the cql-engine and so on I think this almost doubles the complexity.

@ignore

Would you be ok with putting that on the backlog for future enhancements?

Of course. I am just trying to make it as simple as possible for users.
PS: I am not sure if you saw on PR #581, but I was so annyoned by not knowing which tests were failing that I converted all tests in the Engine (Cql Statements), Engine.FHIR (XML files), Engine.JAXB (all files in test directories) to use the @DataProvider. Runtimes are faster :). These individual tests will show up on the TestNG reports/IDE test results. We will not need to rely on the number of pass/fail/skip anymore.

Agreed that True, Null, Equals cover most cases. We also need Equivalent since that's a concept unique to CQL. Pretty easy to add the negations as well, just for the sake of readability for author's.

assert.True(Count(DQM.PatientObs) > 2)

This would actually be (if we used the fluent API for assertions described by Vitor and Chris):
assert(Count(DQM.PatientObs) > 2).isTrue()

Yeah, I started to add the fluent version but thought that'd muddy it up.

Not sure how I feel about this, but, at the time, we just unleashed some QA folks to retro add unit tests for CQL... they came up with the following convention:
// @test
// @parameter "Measurement Interval" [@2019,@2020]
// @asof @2020-10-01
// @context Patient=654
library DQMTest
include DQM as targetLibrary
include org.opencds.cqf.cql.Asserts version '1.0.0' as assert
// @test
// @source tests/data
// @context Patient=123
define "AtLeast2Obs":
assert(Count(targetLibrary.PatientObs) > 2).isTrue()

Can't color so I'm not sure it's clear.
As a tenet, each test library should only test a single library so they liked "aliasing" the "system under test" as "targetLibrary" for consistency, I guess.

I'm probably going to regret this, but can we kill the @context at the library level?

I understand why it's there, but it's stinky, right?

Let's just say no?

Could you elaborate why it's stinky? I'm not sure I follow.

Ideally each test has it's own distinct state.
But I get we don't want to be tyrants about that.  If you can find reuse and avoid the pitfalls, great.  But maybe we make you be explicit about doing that and don't allow you to say "they're all using the same state".
It would also simplify the "local (test) context takes precedence over global (library) context".

It would also simplify the "local (test) context takes precedence over global (library) context".

So, all the tags represent inputs, right? They all affect the state of the evaluation. Local terminology, local data, local parameters, etc. In my view, the context is just "one more thing" that affects the state. I don't see how it's materially different than @parameter, but I'm happy to have that discussion.

I don't have a solid litmus for it.  That's why I used "stinky".
In CQL parameters are set at the Library level.  So allowing them to be global in the test seems fine.  And narrowing... no problem.
But there is a tenet that each test should have it's own state.  At least the "context" part of that state.  @context restricted to local supports that.
That's all I got.

Totally fine if that's not enough.  :)

It would also simplify the "local (test) context takes precedence over global (library) context" explanation.

Not true.  I see all the tags are already consistent in this regard so... nm.

Should every test measure the time spent on the test to report back by the tool?

Can you assert a duration?

CQL supports multiple context definitions within a single Library. Should this be represented as repeated @context annotations? Should it be a list of values instead? How does that play with the proposed @parameterized tag?

// @test
// @context Patient=1
// @context Encounter=2
define "Whatever": true

I would prefer something like @context { { Patient=1, Encounter=2 }, { Patient=2, Encounter=3 } }. The outside list is for multiple runs, the inside is for multiple arguments in the same run.

CQL supports using multiple data models, though that is not common. Should the @data tag support that?

using FHIR version '4.0.1'
using QDM version '4.6'

// @test
// @data FHIR=path/to/fhir/data
// @data QDM=path/to/qdm/data
define "Foo": "Bar"

This one is hard. Following 1, would this be @data { { FHIR=path/to/fhir/data },{ QDM=path/to/qdm/data } }, meaning it runs first with FHIR and then with QDM?
What happens if we have
using FHIR version '4.0.1'
using QDM version '4.6'

// @test
// @data { { FHIR=path/to/fhir/data },{ QDM=path/to/qdm/data } }
// @context { { Patient=1, Encounter=2 }, { Patient=2, Encounter=3 } }
define "Foo": "Bar"

Does this mean 4 runs:

FHIR-Pat1-Enc2
FHIR-Pat2-Enc3
QDM-Pat1-Enc2
QDM-Pat2-Enc3

or 2 runs?

FHIR-Pat1-Enc2
QDM-Pat2-Enc3

using FHIR version '4.0.1'
using QDM version '4.6'

// @test
// @data FHIR=path/to/fhir/data
// @data QDM=path/to/qdm/data
define "Foo": "Bar"

Personally, I think doing this now would be over-engineering and we should wait until we have an actual use-case to drive it.  The docs could mention that, technically, CQL can do this, but we don't have an actual use-case at this time, and please contact us if you have one.
I'm thinking that because the data is shaped differently an actual implementation may not even include something like the example.  And until we have an real-world example we're just making stuff up.

Are CQL developers bound by IGs? I was imagining the "publication" being discussed here as a standalone CQL lib, similar to FHIRHelpers or the org.opencds.cqf.cql.Asserts itself. CQL libraries could be made available independently of any FHIR context. I am not sure what are the guidelines for those.
But we should find a place for them inside the IGs as well.

Great point.  My experience is by far the vast majority of CQL is in an IG, but I definitely didn't mean to preclude CQL outside an IG.
Please apply non IG counterparts to what I posted, as applicable (I think most everything still stands).

This one is hard. Following 1, would this be @data { { FHIR=path/to/fhir/data },{ QDM=path/to/qdm/data } }, meaning it runs first with FHIR and then with QDM?

Not quite. CQL allows the usage of multiple Models at the same time. The following is valid:
library Test

using FHIR version  '4.0.1'
using QDM version '4.6'

define "QDM Patients":
      [ QDM.Patient ]

define "FHIR Patients":
    [FHIR.Patient]

As Rob points out, this is very uncommon.

Also, there's a user called @daTa that we've been pinging, apparently. Sorry DaTa! You can use the backticks to avoid that. :)

Copied the link to this Github discussion over to Zulip stream:  https://chat.fhir.org/#narrow/stream/338083-Da-Vinci-CQL-Testing


Keep scroll position stable when closing a tab in the tab well

VSCode Version: Code 1.5.3 (5be4091987a98e3870d89d630eb87be6d9bafd27, 2016-09-22T08:50:42.185Z)
OS Version: Windows_NT ia32 10.0.14393

Steps to Reproduce:

open many files so that tabs are scrollable, have the first (left-most) tab active
scroll to the farthest (right-most) tabs
close a tab in that area
the whole tab bar scrolls back to the left-most position (active tab)

This leads to loss of focus and confusion. If I want to close multiple tabs there, I have to scroll to them each time I close one.

@PunchyRascal share a video? I think this behaviour is intentional if the first tab was active before opening the last one (we go back in MRU order and open it).

I see no reason to generate focus to active tab since the tab never lost the focus, it is still open, I am just trying to close a few tabs at the end of the tab bar, I am not activating other tabs or closing active tab.
I edited the initial report for better clarity.

I am undecided how to best fix this because it might also cause in users reporting issues why the current tab is not revealed.
Maybe a delay could be added that after a close we only reveal the active tab after some timeout so that you can continue closing tabs without loosing context.

But the active tab is still there, you are looking at it (its editor), while deciding to scroll only the tab bar to the right, on your own. Why should the editor force you to jump back each time you want to do something in that area? E.g. Netbeans don't do this.
The timeout idea seems even more confusing than the current situation.
The active tab could be re-revealed (if you think this behaviour is necessary, I don't) when you focus the editor again (since the active tab is still open there).
The question is, what are the benefits of the current implementation?

I hear you. Thus this is a fair and valid feature request 👍

I would actually argue that this is a bug, it totally confuses you when you want to close a few tabs, and you're taken away for no reason.

@PunchyRascal  One of our explicit tab design decisions was to never show an editor without its context (aka without the tab it belongs to) as demonstrated here:

I see the issue with rapidly closing multiple tabs that are not active, but I think once you leave the tabs area, the active one should get revealed.
I think https://github.com/Microsoft/vscode/issues/18965 is going a bit too much into the wrong direction. Can we not just track where the mouse is by listening to mouse enter / mouse exit on the tab and if we have to make the decision to reveal the active tab or not we just don't do it when the mouse is over a tab? On top of that I think we should then go ahead and reveal the tab when the mouse exists the tab area.
Does that make sense? Seems like a much simpler and better fix to me.

Tracking mouse movement and restricting this fix to when user does not leave the tab area seems very confusing to me.
I can only reiterate my previous comment https://github.com/Microsoft/vscode/issues/13001#issuecomment-251056419 - which I think addresses all the issues (no auto scrolling in tab bar on tab close, re-reveal of current file on editor focus).

@PunchyRascal but the editor is never loosing focus when you close an inactive tab. Do you mean to reveal again when the user clicks back into the editor?

Well I just tried and I think it does lose the focus - but that of course depends on the definition of "losing focus" :) When I close any tab at all via mouse middle click and start typing, the open editor does not receive the keystrokes, so in a sense I would consider it not in focus.

@PunchyRascal that would be a severe bug, can you share a video? Here is how it works for me:

(I am pressing the mouse middle click here to close)

It seems that the focus is lost when you close inactive tabs (using middle click or right-click menu), while closing your active tab activates the previous editor, hence the focus gained.

It is difficult to demonstrate that the editor does not receive the keystrokes, but after closing the tab, I kept typing, but nothing happened.

Oh yeah I can reproduce, that should be something to fix...

Ok, let's see how it goes, I pushed a fix that ended up to be a larger refactoring (also for https://github.com/Microsoft/vscode/issues/22292) that is why I did not merge your PR.
Let me know how it goes. The idea is that invoking close from within the tab container will not cause the active tab to be revealed (using the same flag to block revealing once).

Just tried it, it's amazing, thanks :)

Cool. The only thing I am not doing, which maybe user might complain is that when focus moves back into the editor (if it was outside), we do not reveal the active tab. But that is actually also the behaviour today.

Adding verified by user


Spanish-Translation

I'm not sure if there's an issue about this update/request. Hope that I'm not causing any troubles, thank you in advance guys.
As you must know, the es.yml file contains most of the content for the getmonero dot org site. There are other files that needs translation and I'll be working on them too. I experienced just one problem when testing the file: the Stack Exchange section didn't translated, which corresponds to line 104. Maybe that line depends on other file in the es folder but I'm not aware of that now.
A minor problem is the space used when translating some of the titles in the Team page (Research Lab, which translates into Laboratorio de Investigación, actually I just put "Lab. de Investigación" but it's still too long, and Special Thanks - Agradecimientos Especiales. Those titles look like they need more space to fit it.

Thanks for this great job @BlackLotus64 !
I'm building locally and will update with my test result.
Unfortunately, for the texts you already spotted out, you should be inventive and find something shorter.
I'm sure @erciccione will find some spanish speakers to help you with this.

You see just one commit becose of that large merge commit. You should remove it using git reset --hard HEAD~1 and then rebase using 'git rebase -i HEAD~3. You know where to find me if you need help :)'

@rehrar Any idea of why the stack exchange part in 'Hangouts' doesn't show up as translated even if it is in the code?

@erciccione because it seem to have been forgotten:

Stack Exchange

The Monero Stack Exchange is a quick and easy way to ask questions and get answers. Below you'll find some high quality question/answer pairs to some frequently asked questions.

                                Why does monero have higher transaction fees than bitcoin?
                                What does Monero's scaling roadmap look like?
                                What cryptography primitives/concepts, other than the basic ones, does Monero use?
                                How to extract data from local blockchain?
                                Hiding TCP traffic for Monero miners?

Visit Stack Exchange

I'll come up with a fix soon

Jeez, did I forget that? I'm sorry guys! Plz forgif.

@BlackLotus64 You can open another PR for the next changes

Hey @BlackLotus64, how is it going?
Are you working on any new page of the website? If you need any help just ping me. I would also like to help, so if you already started just let me know which page you're working on.

Yes @lh1008 but I'm going to make those changes in other PR as @ErCiccione suggested. I'm actually working on the moneropedia files which is the second folder, the first one is ready (there were only two files), and then the third one (user guides). Shall I open one PR per folder or just one more pull request?

I see, I have seen the #700 now, but the translations can be copy and pasted to the new fix so I say it won't be time or effort wasted. Still, this PR has some conflicts now with the Hangouts changes about the Stack Exchange section so it will be first I suppose.

@BlackLotus64, ok it's fine. I'll let you handle the webpage, I have been working on a different translation document from the Monero Outreach. I was not sure if you had already started working on something. The updated version is great, I still have my opinion in the untraceable translation "imposible de rastrear". Let's see how this translation works, and if there are any comments from other contributors. I have been adding some other words to the Spanish Terminology, so you can check them. If you have any comments or any new words, it would be great to have you add some. :) :+1:
If you need anything just ping me, I'll be around.

@lh1008 I changed every other sentence of untraceable to "no rastreable" except for the title, because, you know, it sounds good haha, and we can expect Monero to be always untraceable in the future because optimizations and improvements, but to be honest you and other guys have the last word, you're also more active in Telegram. And for the site, yes I can translate it but I want to open the PR until I'm done with all the files, even if the Moneropedia is not ready and have bugs, or maybe I can just separate the translations in two (one about moneropedia and other about the rest).

It's okay. It's good to hear(read) your comments on any new proposals. It makes things cool, we should all agree, that is what makes things awesome in Monero if you don't like something, or you think it might sound better, just write it and we can discuss about it. Actually, I don't have the last word, I just give my thoughts :P. Maybe I sound a little pushy, sorry for that. I don't know how the PR of every section works out. Let's ask @erciccione, what might or is the "best" way to add the PRs, by making a PR for all the files, or break them into sections. Let's wait for @erciccione take a look at these comments :).

Oh yes of course, I just didn't want to sound so cocky or anything, I'm always open to suggestions and what I meant by the other thing I was saying that you have more experience here and so you can know more. But yes I know ErCiccione is the one in charge so let's wait for him :)

Hey folks, great to see you are commaborating on this. About PRs @BlackLotus64 , i would suggest to open one everytime you made a big chunk of translations, doesn't matter if it's not an entire section. This to avoid that somebody works on the same files in the meantime. I keep Taiga updated, but i cannot assure everybody look at it before strarting a translation. (Actually, most of the people do check, but in past some double work happened).
I also suggest to keep a look at the Guide on how to translate the website, there is a section called 'File priorities', where i wrote which parts should be translated first. You could do a PR after each point is done, but that's up to you.
Also, this PR was rebased through a merge commit, we usually avoid those, so would be better to remove that one and then rebase

So is this one ready to go or what?

No, it has conflicts.

It keeps showing me that there are conflicts but those are just lines that are untranslated and are shown as conflict, maybe because another PR was merged and it caused those conflicts?

@BlackLotus64 Ping me on IRC, i will help you with this

Not sure, I was solving conflicts so the pr could be merged, and because it was giving me many errors maybe I erased the line, today I'll review everything I've done so far so it can be finally reviewed.

Final revision made, some typing errors were corrected, and checked twice. It's finally ready to be merged. No conflicts at all.

Rebase please and we can get this merged.

Rebased

Really looking forward to merge this so the site can finally be complete in Spanish, apart from user and dev guides and the moneropedia
@luigi1111


Switching away from py-bcrypt backend

As passlib duly notes, all pip versions (and HEAD too) of py-bcrypt are vulnerable to the BSD wraparound bug:
UserWarning: passlib.hash.bcrypt: Your installation of the 'pybcrypt' backend is vulnerable to the bsd wraparound bug, and should be upgraded or replaced with another backend (this warning will be fatal under passlib 1.7)
Aside from being a serious security vulnerability, being fatal in passlib 1.7+ means it will also make Flask-User unusable under that version until fixed.
Alternative backends supported by passlib like bcrypt should be considered switching to.

Passlib changelog for 1.6.4 mentions that it will detect vulnerable versions and "automatically enable a workaround".
Also, this changelog doesn't mention this warning becoming fatal in 1.7.
And it's not that py-bcrypt is going to be unpatched forever?
Anyway, the same changelog mentions that bcrypt will now become preferable implementation.
Switching the backend for passlib should be just matter of installing bcrypt and removing py-bcrypt, right?
Will simple find-and-replace of module name in this repo cut it then?

The documentation may not say it, the source code does however: https://bitbucket.org/ecollins/passlib/src/fa26802fc88fbc6b2d4b9676970bed7e6d53fc9d/passlib/handlers/bcrypt.py?at=default#bcrypt.py-314 (which also explains the UserWarning, since that is what warnings.warn emits by default.

And it's not that py-bcrypt is going to stay unpatched forever?

py-bcrypt seems unmaintained, with no release in over two years and not having moved off Google Code yet.

Anyway, the same changelog mentions that bcrypt will now become preferable implementation.
Switching the backend for passlib should be just matter of installing bcrypt and removing py-bcrypt, right?
Will simple find-and-replace of module name in this repo cut it then?

Yep. py-bcrypt is not anywhere used directly by Flask-User, just added to the requirements.txt files and setup.py. As passlib automatically picks up on backends, changing these files to use bcrypt should do the trick indeed.

Thank you all for contributing. It turns out that you need one of the latest versions of passlib in addition to bcrypt to make it work in Python 3.3 and 3.4. This combo seems to work for me:
passlib==1.6.5
bcrypt==2.0.0

I will update the requirements.txt for Flask-User v0.6.7.

Thank you!

Still seeing this:
python manage.py init_db
/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/passlib/handlers/bcrypt.py:320: UserWarning: passlib.hash.bcrypt: Your installation of the 'pybcrypt' backend is vulnerable to the bsd wraparound bug, and should be upgraded or replaced with another backend (this warning will be fatal under passlib 1.7)
  "(this warning will be fatal under passlib 1.7)" % backend)

so do I need to install pybcrypt?

@scheung38 - You need to uninstall pybrypt and install bcrypt pip packages.

If I uninstall pybrypt as you pointed out then:
File "/home/osboxes/anaconda/envs/py27/lib/python2.7/site-packages/passlib/utils/handlers.py", line 1442, in set_backend
    raise exc.MissingBackendError(cls._no_backends_msg())
MissingBackendError: no bcrypt backends available -- recommend you install one (e.g. 'pip install bcrypt')

Maybe try reinstalling and/or upgrading passlib and/or bcrypt?
I don't really have a clue beside "it shouldn't really happen", so I have only such a generic advice (something similar (empty bcrypt module with no content at all) happened to me and reinstall helped, though).

Thanks @Xender did you face similar issue of not able to register a new user? and did you successfully manage to do so after the above advice?

I did have issue with bcrypt being installed as empty module and yes, reinstall worked.
Also, if generic "upgrade/reinstall" doesn't help, it doesn't look like a bug in Flask-User, more like in Passlib, bcrypt or pip (or whatever Python package manager you're using).

Is Flask-User stable enough at the moment for usage?

@scheung38 - I have no idea and I'd also like to know that, but that bcrypt issue doesn't really have to do with Flask-User in any way beside having passlib as a dependency.


it keeps red cross to the first point

Challenge target-elements-by-class-using-jquery has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
I made all that was need to make test, but it keeps red cross to the first point

jQuery Playground

#left-well

      <button class="btn btn-default target" id="target1">#target1</button>
      <button class="btn btn-default target" id="target2">#target2</button>
      <button class="btn btn-default target" id="target3">#target3</button>

#right-well

      <button class="btn btn-default target" id="target4">#target4</button>
      <button class="btn btn-default target" id="target5">#target5</button>
      <button class="btn btn-default target" id="target6">#target6</button>

    ```

the problem is solved

The problem thus remains unsolved. Please learn to code.
On 3 Feb 2017 1:18 pm, "SUMIT LAHIRI"<EMAIL_ADDRESS>wrote:

On Jan 18, 2017 5:25 PM, "Nikita"<EMAIL_ADDRESS>wrote:

the problem is solved
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/freeCodeCamp/freeCodeCamp/issues/12596#issuecomment-273456790,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQXwkeWcdqRq_f3n3beY6qmGA01infGIks5rTf3KgaJpZM4Lmyhy
.


Unable to edit circle

[x] I'm reporting a bug, not asking for help
[x] I've looked at the documentation to make sure the behaviour is documented and expected
[x] I'm sure this is a Leaflet Draw code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
[x] I've searched through the issues to make sure it's not yet reported

How to reproduce

Leaflet version I'm using: 1.5.1
Leaflet Draw version I'm using: 1.04
Browser (with version) I'm using: Chrome v.75
OS/Platform (with version) I'm using: MacOS 10.14.4

Create a circle
Edit the circle by adjusting the edit circle handle.

What behaviour I'm expecting and which behaviour I'm seeing
Expecting

The circle should increase or decrease in size.

What I see:

What I propose as the fix:
Radius is not defined in this line: https://github.com/Leaflet/Leaflet.draw/blob/develop/src/edit/handler/Edit.Circle.js#L31
I propose declaring the variable in order to avoid this error
var radius;
in this line: https://github.com/Leaflet/Leaflet.draw/blob/develop/src/edit/handler/Edit.Circle.js#L25

I think it was a missing variable declaration, should be fixed with this PR: https://github.com/Leaflet/Leaflet.draw/pull/1053

Unfortunately this seems a dead project. Stopped since 2018 with over 80 active PR but there is no user with write access to approve and merge the PR :(


Enabling use of nationalize chars fails for MariaDB

See https://github.com/hibernate/hibernate-reactive/pull/1156
The test UnicodeCharsTest fails for MariaDB when hibernate.use_nationalized_character_data is set to true.
Test configuration: https://github.com/hibernate/hibernate-reactive/blob/6ad3d50fe195b8c75b0f7c372f7721283ad24731/hibernate-reactive-core/src/test/java/org/hibernate/reactive/UnicodeCharsTest.java#L36

THe problem is that one of the chars used in the test requires a different collation than the one enabled setting the property. Fixing it


Hardware button event listeners become unresponsive after pushing and popping a layer

Hardware button event listeners work fine when first registered, but if a new layer is pushed on top of the view in which the listener was registered and then popped, they no longer capture events.
document.addEventListener("deviceready", function() {
  document.addEventListener("menubutton", function() {
    alert("menubutton");
  });
});

It seems that this is still not working. It only works from active webView, but if the webView is hidden (like drawer webView for example) it doesn't work. The only workaround i see is to have the listener on all webViews... there is another way?

@fidoboy would you mind creating a new Github issue about it? I know we our public velocity has slowed down during the spring, but we'll have more muscle soon. Thanks :)

Ok, i've created a new issue here: https://github.com/AppGyver/steroids/issues/851 :+1:

Also, does it means that new Android releases will be available soon? I'm more than impatient about that cause I'm almost paused with my project right now due to many pending bugs with Android that i can't solve with any workaround. I'm very worried about the future of the Steroids framework because it seems to be almost stopped since a few months ago... I really hope that most critical bugs could be solved soon...


Expose coalesce.

Ref: http://tinkerpop.apache.org/docs/3.1.1-incubating/reference/#coalesce-step

to speed things up, maybe you could provide a PR? Implementing this shouldn't be hard, just add a test to TraversalSpec.scala and add the implementation to GremlinScala.scala

@mpollmeier @analytically asked me about this on my fork. Best I can tell this feature is merged. Do you concur, and think this can be closed?

coalesce is merged and is part of 3.1.2-incubating.0


No need to find statement in cached statement map?

To execute each query, sqlx needs to find the cached statement even for statement object already provided.
For example:
Statement provided:
let stmt = conn.prepare_with("select 1", &[]);
let stmt = stmt.await.unwrap();
let row: (i32,) = stmt.query_as().fetch_one(&mut conn).await.unwrap();

Statement not provided:
let row: (i32,) = sqlx::query_as("SELECT 1")
    .fetch_one(&mut conn)
    .await
    .unwrap();

And see get_or_prepare:
https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/postgres/connection/executor.rs#L173
If the map is big, then the find would be an unnecessary overhead.

Unless you're actually running into a situation where the hashmap lookup for the prepared statement is a significant source of overhead, I don't think it's worth the effort. Being a hashmap, lookups are going to be quite fast (relatively speaking) up to probably several hundred thousand elements.
Where a significant overhead is likely to occur on maps of that size is on insert, when the map needs to resize itself and thus rehash all its elements.
However, you'd need to execute that many unique queries on a single connection for this to become an issue, which is only likely to come up if you're dynamically generating queries. In that case I think we just need a way to say "prepare this statement, but don't cache it" which I already have in mind for implementing #875 and we can expose that for users to set as well.


Add jacoco validation

It will be good to havethe coverage ratio of 0.8

This might be helpful: https://habr.com/post/413587/

Implemented in Celesta7


Vector2Angle and Vector2LineAngle swap

The function names and parameter names were swapped for these functions. This PR fixes that.
Improved explanation for LineAngle.
Removed old alternative implementation ( it's wrong and incomplete).

@veins1 I reviewed the functions and they like ok for me.


Need ability to check for null field

I am looking to construct a query which alerts when a field is null. Currently it seems the only way to do this is to use a default() node to set the value to something unlikely to be present, and then check for that specific value. But this is a poor hack as if the field can have any value, then it's possible to have a real value end up the same as your null-default value.

+1 I have the same problem here....


Test Connection & BackUp Changed Files

Added Test Connection button on Settings Dialog and created an Backup
All Button for downloading the current changed files.
About the backup changed files:

Added new setting 'Backup Folder' (can be either full path C:/backups/ or relative to the project folder (/sftp-backups)
Added new button 'Backup All'
Added new dialog 'Backup Changed Files', that will ask for a folder name.

The final backup folder will be the server settings + the backup dialog folder. The idea is to make an backup before each version updade.
New Strings added for root and pt-br.
For SFTP test connection I added on method on scp2 (created pull request also)
Also updated package dependencies versions because has better error handling.

I closed because I'm already making some changes and adding more stuff, i'm gonna create a new one latter.


Operations on rectangles not supported in Java

http://docs.opencv.org/java/2.4.2/org/opencv/core/Rect.html
and
http://docs.opencv.org/java/org/opencv/core/Rect.html
State:
In addition to the class members, the following operations on rectangles are implemented:

rect = rect +- point (shifting a rectangle by a certain offset)
rect = rect +- size (expanding or shrinking a rectangle by a certain amount)
rect += point, rect -= point, rect += size, rect -= size (augmenting operations)
rect = rect1 & rect2 (rectangle intersection)
rect = rect1 | rect2 (minimum area rectangle containing rect2 and rect3)
rect &= rect1, rect |= rect1 (and the corresponding augmenting operations)
rect == rect1, rect != rect1 (rectangle comparison)

But I am unable to access them in Android Studio.
"Operator '|' cannot be applied to 'org.opencv.core.Rect', 'org.opencv.core.Rect'"

Java documentation for this class has been automatically generated from corresponding C++ documentation. Java does not support operator overloading, thus described operations are not possible.
To make overloaded operators from C++ available, additional functions should be implemented in the wrapper module. Or you can implement them in your code using public fields in the Rect class.

Oh, thanks. In my humble monoglot studio I appreciate any documentation at all.


don't create readme.rst for pypi; it supports markdown for while now

Now that Python 2 reached EOL, one might also add something like python_requires=">=3.6" to setup.py, but I didn't want to jump the gun here.

Thanks! Regarding your EOL comment: I'm happy to kick out any Python 2 related things asap.


flutter build apk --flavor development --target lib/main_development.dart

FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring project ':maps_launcher'.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

 If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 26s

I have the same issue

Same here

Should be fixed in version 3.0.0. Could you check if it works? Sorry for the wait. Please reopen another issue if necessary.


Octopus - Modify Attach / Detach APIs to use cached information + Use SPBM Policy Name instead of policy ID.

For Attach and Detach APIs nodename is passed as parameter,
Using cache, get the appropriate VM object and call operation on the VM object.

Abrar will you be able to work on this?

Will work on this

PR merged: https://github.com/vmware/kubernetes/pull/335


Fix bug when swiping last card not releases the target

Small fix for a bug I found. When the loop over cards finishes isAfterCurrentTarget was always true, so the target was not released.

I've tried the same approach as you did - it fixes the main issue but introduces another one. You are releasing the target before "slide up" animation has finished, allowing user to swipe cards that haven't fallen into the right position yet. That's why Paul waits for transitionend before calling resetTarget.

I signed it
On Sat, Apr 16, 2016 at 2:55 AM Konrad Dzwinel<EMAIL_ADDRESS>wrote:

I've tried the same approach as you did - it fixes the main issue but
introduces another one. You are releasing the target before "slide up"
animation has finished, allowing user to swipe cards that haven't fallen
into the right position yet. That's why Paul waits for transitionend
before calling resetTarget.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/GoogleChrome/ui-element-samples/pull/3#issuecomment-210700046

@kdzwinel Good catch. Let's see what else can be done here.

My solution is here: #4, maybe you'll come up with something simpler.

I think this should be fixed as of #4. If not, let me know. I'll close this for now, but thanks for contributing!


Coordinator stopped with threads still running

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):  Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 1.8
Python version: 3.5
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: 8.0
GPU model and memory: NV-P40
Exact command to reproduce: N/A

Describe the problem
Running distributed tensorflow using estimator in sync mode, there is always a exception after the last training step, as followed:
INFO:tensorflow:Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
Exception in thread QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 268, in _run
    coord.request_stop(e)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/coordinator.py", line 213, in request_stop
    six.reraise(*sys.exc_info())
  File "/usr/local/lib/python3.5/dist-packages/six.py", line 693, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 252, in _run
    enqueue_callable()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1244, in _single_operation_run
    self._call_tf_sessionrun(None, {}, [], target_list, None)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.CancelledError: Step was cancelled by an explicit call to `Session::Close()`.

It seems there is a closing problem when using tf.train.SyncReplicasOptimizer.
Any one know how to fix this?
Source code / logs
Main Code Fragment(model_fn) as followed:
with tf.device('/job:worker/task:%d' % task_index):
    with slim.arg_scope([slim.variables.variable, slim.variables.global_step],
                 device=slim.variables.VariableDeviceChooser(num_parameter_servers)):
             global_step = slim.variables.global_step()
             # Calculate the learning rate schedule.
             num_batches_per_epoch = (num_examples_per_epoch / FLAGS.batch_size)
             decay_steps = int(num_batches_per_epoch * FLAGS.num_epochs_per_decay)

             # Decay the learning rate exponentially based on the number of steps.
             lr = tf.train.exponential_decay(FLAGS.initial_learning_rate,
                                             global_step,
                                             decay_steps,
                                             FLAGS.learning_rate_decay_factor,
                                             staircase=True)
             opt = tf.train.RMSPropOptimizer(learning_rate=lr,
                                                 decay=RMSPROP_DECAY,
                                                 momentum=RMSPROP_MOMENTUM,
                                                 epsilon=RMSPROP_EPSILON)
            # forward
             logits = inception.inference(features, num_classes, for_training=True)

             # loss
             inception.loss(logits, labels)
             losses = tf.get_collection(slim.losses.LOSSES_COLLECTION)
             losses += tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)

             total_loss = tf.add_n(losses, name='total_loss')

              # Create synchronous replica optimizer.
             opt = tf.train.SyncReplicasOptimizer(
                     opt,
                     replicas_to_aggregate=num_replicas_to_aggregate,
                     total_num_replicas=num_workers)

             # Compute gradients with respect to the loss.
             grads = opt.compute_gradients(total_loss)
             apply_gradient_op = opt.apply_gradients(grads, global_step=global_step)
             sync_replicas_hook = opt.make_session_run_hook(is_chief, num_tokens=num_workers)

              return tf.estimator.EstimatorSpec(
                 mode=mode,
                 loss=total_loss,
                 train_op=train_op,
                 training_chief_hooks=[],
                 training_hooks=[sync_replicas_hook])

And some  logs:
INFO:tensorflow:SyncReplicasV2: replicas_to_aggregate=2; total_num_replicas=2
INFO:tensorflow:Create CheckpointSaverHook.
INFO:tensorflow:Done calling model_fn.
INFO:tensorflow:tokens_needed = 0
INFO:tensorflow:Graph was finalized.
2018-07-16 09:13:43.014523: I tensorflow/core/distributed_runtime/master_session.cc:1142] Start master session a13a7f78ee358c84 with config: allow_soft_placement: true
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:tensorflow:loss = 13.082163, step = 0
INFO:tensorflow:Saving checkpoints for 1 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.082163
INFO:tensorflow:loss = 13.115122 (15.557 sec)
INFO:tensorflow:Saving checkpoints for 2 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.103788 (7.314 sec)
INFO:tensorflow:global_step/sec: 0.043722
INFO:tensorflow:Saving checkpoints for 3 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.137239 (6.563 sec)
INFO:tensorflow:global_step/sec: 0.152378
INFO:tensorflow:Saving checkpoints for 4 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.200961 (6.763 sec)
INFO:tensorflow:global_step/sec: 0.147865
INFO:tensorflow:Saving checkpoints for 5 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.265466 (6.318 sec)
INFO:tensorflow:global_step/sec: 0.158291
INFO:tensorflow:Saving checkpoints for 6 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.165977 (6.270 sec)
INFO:tensorflow:global_step/sec: 0.159476
INFO:tensorflow:Saving checkpoints for 7 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.478054 (7.017 sec)
INFO:tensorflow:global_step/sec: 0.14252
INFO:tensorflow:Saving checkpoints for 8 into /tmp/aves/train_dir/model.ckpt.
WARNING:tensorflow:Ignoring: /tmp/aves/train_dir/model.ckpt-3.meta; No such file or directory
INFO:tensorflow:loss = 13.231509 (6.544 sec)
INFO:tensorflow:global_step/sec: 0.152785
INFO:tensorflow:Saving checkpoints for 9 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.367797 (6.686 sec)
INFO:tensorflow:global_step/sec: 0.149593
INFO:tensorflow:Saving checkpoints for 10 into /tmp/aves/train_dir/model.ckpt.
INFO:tensorflow:loss = 13.461123 (6.659 sec)
INFO:tensorflow:global_step/sec: 0.150159
INFO:tensorflow:Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
Exception in thread QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 268, in _run
    coord.request_stop(e)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/coordinator.py", line 213, in request_stop
    six.reraise(*sys.exc_info())
  File "/usr/local/lib/python3.5/dist-packages/six.py", line 693, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 252, in _run
    enqueue_callable()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1244, in _single_operation_run
    self._call_tf_sessionrun(None, {}, [], target_list, None)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.CancelledError: Step was cancelled by an explicit call to `Session::Close()`.

INFO:tensorflow:Loss for final step: 13.461123.

@mrry is that related to this?   After a thread has called coord.request_stop() the other threads have a
fixed time to stop, this is called the 'stop grace period' and defaults to 2
minutes.  If any of the threads is still alive after the grace period expires
coord.join() raises a RuntimeError reporting the laggards.

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@dcmrlee there's a hint in #13779 about adding an ignore_live_threads=True; would you please try that?

It has been 17 days with no activity and the awaiting response label was assigned. Is this still an issue?

Hi, I'm also experiencing this behavior.
I'm using TensorFlow version 1.9.0 and I'm running a distributed mnist job using tfoperator and mlt on a GKE cluster.
After my main.py finishes near line 221, I get:
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-1-bmbvb] INFO:root:worker 1, step 254 of 256: loss = 1.478
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-0-zlea4] INFO:root:worker 0, step 254 of 256: loss = 1.481
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-0-zlea4] INFO:root:worker 0, step 255 of 256: loss = 1.499
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-1-bmbvb] INFO:root:worker 1, step 255 of 256: loss = 1.47
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-1-bmbvb] INFO:root:Finished on task 1 in 98.08173823356628 seconds
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-1-bmbvb] INFO:root:Session from worker 1 closed cleanly
[my-tf-dist-a5dfa2c6-a28b-4f86-8b4c-251ee-worker-6mdt-0-zlea4] INFO:tensorflow:Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany

and for that reason my Pods remain running indefinitely and the TfJob is never marked as Succeeded.
Have I written custom code: No
OS Platform and Distribution: Ubuntu 16.04
TensorFlow installed from: https://hub.docker.com/r/intelaipg/intel-optimized-tensorflow/
TensorFlow version: 1.9.0
Bazel version: N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A
Exact command to reproduce:
mlt init my-tf-dist --template=tf-dist-mnist --template-repo=.
mlt deploy -l

first command instantiates a distributed TensorFlow mnist template to be used for deploying as a TfJob on a GKE cluster and then the second command deploys the job and uses kubetail to tail the aggregated logs for all the Pods.
This is currently blocking one of our PRs on mlt here: https://github.com/IntelAI/mlt/pull/387

I even tried modifying coordinator.py as follows:
  def join(self, threads=None, stop_grace_period_secs=120,
           ignore_live_threads=True):
    """Wait for threads to terminate.

and deployed the TfJob again but still same behavior and I get:
[my-tf-dist-7bd9faec-bd67-41cc-a9c2-86e68-worker-g1qj-1-urvjt] INFO:root:Finished on task 1 in 99.67636966705322 seconds
[my-tf-dist-7bd9faec-bd67-41cc-a9c2-86e68-worker-g1qj-1-urvjt] INFO:root:Session from worker 1 closed cleanly
[my-tf-dist-7bd9faec-bd67-41cc-a9c2-86e68-worker-g1qj-0-3oxfi] INFO:tensorflow:Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany

I just verified that with version 1.8.0 I don't have this issue.

We have the similar problem in TensorFlow 1.8.0 when using MonitoredSession  and  SyncReplicasOptimizer in distributed training. The parameter ignore_live_threads is in Coordinator and I'm not sure if we can set in MonitoredSession.
Here is the error log of trying to close the session.
INFO:tensorflow:Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
2018-08-15 15:50:02 INFO     Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
Exception in thread QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/training/queue_runner_impl.py", line 268, in _run
    coord.request_stop(e)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 213, in request_stop
    six.reraise(*sys.exc_info())
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/training/queue_runner_impl.py", line 252, in _run
    enqueue_callable()
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1244, in _single_operation_run
    self._call_tf_sessionrun(None, {}, [], target_list, None)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
CancelledError: Step was cancelled by an explicit call to `Session::Close()`.

@tobegit3hub Thanks for the update.
I'm seeing that error in my kubetail logs too, but it seems like for some reason TfOperator won't see that as a show stopper and marks the jobs as Succeeded:
So on 1.9.0 I have (State:                Running):
$ kubectl describe tfjob my-tf-dist-7bd9faec-bd67-41cc-a9c2-86e685f157da
Name:         my-tf-dist-7bd9faec-bd67-41cc-a9c2-86e685f157da
Namespace:    ashahba
Labels:       mlt-app-name=my-tf-dist
Annotations:  kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"kubeflow.org/v1alpha1","kind":"TFJob","metadata":{"annotations":{},"labels":{"mlt-app-name":"my-tf-dist"},"name":"my-tf-dist-7bd9faec-bd...

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

Please create a new issue, if you have a similar issue.

@ashahba  I have the similar problem in TensorFlow 1.10.0 when using MonitoredSession and SyncReplicasOptimizer at chief worker in distributed training, and i still don't know how to solve it. can you give me some advice. thanks.

@dcmrlee I have same problem with you.But i don't understand that how to solve the problem finally.Have you solve it?

I have same problem too. But SyncReplicasOptimizer  was deprecated, and will not be fixed.

this problem happens because you are training more steps the what you have put in configuration file.

I have same problem too. But SyncReplicasOptimizer  was deprecated, and will not be fixed.

+1


[MAS4.2.10] [Focus Order - Add other service] With voiceover consolidated focus goes on "Key and Value".

Actual Result:
With voiceover the consolidated focus lands on "Key and Value" whereas they are associated with different edit boxes.
Expected Result:
The individual focus should lands on them as well as the focus order should be logical, after "Key" the focus should land on the edit field associated with key. After which the focus should lands on "Value" and its associated edit field.
Repro Steps:

Open the Bot Framework V4 Emulator.
Welcome tab screen gets opened.
Navigate to the "Service" and click on "+".
Select "Add other service" from the "Menu".
Navigate through the dialog.
Observe the issue.

User Impact:
Users who rely on screen readers will be affected if the screen reader announced "Key and Value" in a same flow, it may misguide the user.
Note:
Suggestion: The key and value are defined as a list but it is beneficial if they are defined as a table with "Key and Value" as a table header.
Test Environment:
OS: MacOs Version 10.15
Application: Bot Framework V4 Emulator (Version 4.5.2-80829)
Impacted MAS Link:
https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={b24201d1-2276-4471-8183-e1e5353031ad}
Attachment:
consolidated focus goes on Key and Value.zip

Fixed, Verified on MAC build 10.15 Beta(19A573a