Edits to transcription regulator definitions

While working on the transcription guidelines paper we have noticed some inconsistencies with the refactored transcription regulator definitions and subclasses.
@colinlog @RLovering and I have made the following changes:

GO:0140223 general transcription initiation factor activity -> changed subclass from 'GO:0140110 transcription regulator activity' to 'GO:0003674 molecular_function'. This way, 'general transcription initiation factor activity' is part of 'GO:0006351 transcription, DNA templated', while 'transcription regulator activity' is part of 'GO:0006355 regulation of transcription, DNA templated'. Transcription regulators are not MF regulators, they are regulators of BP (transcription).

GO:0003712 coTF: added parent 'molecular function regulator' since coTFs do directly regulate various MFs.

Changes to definitions:

mf
label
curent definition
Proposed new def Pascale/Colin/Ruth Nov 3
Comment

GO:0140110
transcription regulator activity
A molecular function that controls the rate, timing and/or magnitude of transcription of genetic information. The function of transcriptional regulators is to modulate gene expression at the transcription step so that they are expressed in the right cell at the right time and in the right amount throughout the life of the cell and the organism.
A molecular function that controls the rate, timing and/or magnitude of gene transcription. The function of transcriptional regulators is to modulate gene expression at the transcription step so that they are expressed in the right cell at the right time and in the right amount throughout the life of the cell and the organism. Genes are transcriptional units, and include bacterial operons.

GO:0003700
DNA-binding transcription factor activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a gene to modulate transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units, and include bacterial operons.
A transcription regulator activity that modulates transcription of gene sets via selective and non-covalent binding to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units, and include bacterial operons.

GO:0000981
DNA-binding transcription factor activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to modulate transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that modulates the transcription of specific gene sets transcribed by RNA polymerase II.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units. // Curator guidance: Note that most DNA-binding transcription factors do not have enzymatic activity. The presence of specific DNA-binding domains known to be present in DNA-binding transcription factors (HOX, GATA etc) should be used to help decide whether a protein is a DNA binding transcription factor or a coregulator. If a protein has an enzymatic activity (for example, ubiquitin ligase, histone acetyl transferase) and no known DNA binding domain, consider annotating to GO:0003712 transcription coregulator activity. Special care should be taken with proteins containing inc fingers, Myb/SANT and ARID domains, since only a subset of proteins containing these domains directly and selectively bind to regulatory DNA motifs in cis-regulatory regions.

GO:0001216
DNA-binding transcription activator activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to activate or increase the frequency, rate or extent of transcription by a RNA polymerase.
A DNA-binding transcription factor activity that activates or increases transcription of specific gene sets.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0001228
DNA-binding transcription activator activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to activate or increase transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that activates or increases transcription of specific gene sets transcribed by RNA polymerase II.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0001217
DNA-binding transcription repressor activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to stop, prevent, or reduce the frequency, rate or extent of transcription by a RNA polymerase.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific gene sets.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0001227
DNA-binding transcription repressor activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to repress or decrease transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific gene sets transcribed by RNA polymerase II.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0106250
DNA-binding transcription repressor activity, RNA polymerase III-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase III-transcribed gene to repress or decrease transcription.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific sets of non-coding RNA genes transcribed by RNA polymerase III.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0098531
ligand-activated transcription factor activity
A DNA-binding transcription factor activity that is directly regulated by binding of a ligand to the protein with this activity. Examples include the lac and trp repressors in E.coli and many steroid hormone receptors.
A DNA-binding transcription factor activity regulated by binding to a ligand and that modulates the transcription of specific gene sets. Examples include the lac and trp repressors in E.coli and steroid hormone receptors.
DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0004879
nuclear receptor activity
Combining with a signal and transmitting the signal to the transcriptional machinery by interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to modulate transcription by RNA polymerase II.
A DNA-binding transcription factor activity regulated by binding to a ligand, usually lipid-based (such as a steroid hormone), that modulates the transcription of specific gene sets transcribed by RNA polymerase II.
Note that for nuclear receptors, the motif is most often referred to as a response element. DNA-binding transcription factors bind to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.

GO:0003712
transcription coregulator activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to either activate or repress the transcription of specific genes. Coregulators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
A transcription regulator activity that modulates the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Coregulators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
Curator guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0003713
transcription coactivator activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to activate the transcription of specific genes. Coactivators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. Another type of coregulator activity is the bridging of a DNA-binding transcription factor to the basal transcription machinery. The Mediator complex, which bridges transcription factors and RNA polymerase, is also a transcription coactivator.
A transcription coregulator activity that activates or increases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Coactivators often act by altering chromatin structure and modifications. For example, one class of transcription coactivators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators. A fourth class of coactivator activity is the bridging of a DNA-binding transcription factor to the general (basal) transcription machinery. The Mediator complex, which bridges sequence-specific DNA binding transcription factors and RNA polymerase, is also a transcription coactivator.
Curator guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0030374
nuclear receptor transcription coactivator activity
The function of a transcription cofactor that activates transcription in conjuction with a ligand-dependent nuclear receptor from a RNA polymerase II promoter; does not bind DNA itself.
A transcription coregulator activity that activates or increases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound nuclear receptor. Coregulators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.  A fourth class of coactivator activity is the bridging of a DNA-binding transcription factor to the general (basal) transcription machinery. The Mediator complex, which bridges sequence-specific DNA binding transcription factors and RNA polymerase, is also a transcription coactivator.
Curator guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0003714
transcription corepressor activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to repress the transcription of specific genes. Corepressors often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. A third class occludes DNA-binding transcription factor protein-protein interaction domains. A fourth class of corepressors prevents interactions of DNA bound DNA-binding transcription factor with coactivators.
A transcription coregulator activity that represses or decreases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Corepressors often act by altering chromatin structure and modifications. For example, one class of transcription corepressors modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
Curator guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0140536
nuclear corepressor activity
NEW
A transcription corepressor activity that represses or decreases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound nuclear receptor. Nuclear receptor corepressors often act by altering chromatin structure and modifications. For example, one class of transcription nuclear receptor corepressors modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
Curator guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0140223
general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation.
A molecular function that contributes to transcription start site selection and transcription initiation.

GO:0001181
RNA polymerase I general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase I. Factors required for RNA polymerase I transcription initiation include upstream activation factor (UAF), core factor (CF), TATA binding protein (TBP) and RRN3.
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase I. Factors required for RNA polymerase I transcription initiation include upstream activation factor (UAF), core factor (CF), TATA binding protein (TBP) and RRN3.

GO:0016251
RNA polymerase II general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase II. The general transcription factors for RNA polymerase II include TFIIB, TFIID, TFIIE, TFIIF, TFIIH and TATA-binding protein (TBP).
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase II. The general transcription factors for RNA polymerase II include TFIIB, TFIID, TFIIE, TFIIF, TFIIH and TATA-binding protein (TBP).

GO:0000995
RNA polymerase III general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase III. Factors required for RNA polymerase III transcription initiation include TFIIIA, TFIIIB and TFIIIC.
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase III. Factors required for RNA polymerase III transcription initiation include TFIIIA, TFIIIB and TFIIIC.

@krchristie @cmungall @ukemi @hdrabkin @balhoff @deustp01 @vanaukenk
Following up on yesterday's ontology call - those are the definitions I propose to implement for the transcription regulators. Please let me know if you have comments/suggestions.
Thanks, Pascale

I have a few comments:
1. DNA-binding transcription repressor activity, RNA polymerase III-specific (GO:0106250)

I don't know if any exceptions to the generalization that RNAP III ONLY transcribes non-coding RNA genes, but considering that there is a known exception to the generalization that RNAP I ONLY transcribes rRNA genes, it seems like it might not be a good idea to write the type of target genes into the definition in an absolute way. So, if you wish to include that info (and you haven't added it in the new def for the other RNAP III term you list here, RNA polymerase III general transcription initiation factor activity (GO:0000995), how about adding it as an extra phrase rather than as an absolute, perhaps like this:
From: A DNA-binding transcription factor activity that represses or decreases the transcription of specific sets of non-coding RNA genes transcribed by RNA polymerase III.
To: A DNA-binding transcription factor activity that represses or decreases the transcription of specific genes or genes sets (usually non-coding RNA genes) transcribed by RNA polymerase III.

gene vs gene set

Does every transcription factor regulate multiple genes, or are there some very specific ones that might regulate only a single gene? Basically I am wondering if it might be better to be more broad, perhaps like this:
From: "the transcription of specific gene sets"
To: "the transcription of specific genes or gene sets"

missing proposed new def?

nuclear receptor activity (GO:0004879) - The text in new def column seems to be the comment, not the proposed new def.

For the nuclear receptors (GO:00004879) three points to be made. Firstly, the part "and the binding of the ligand to its receptor often occurs in the cytoplasm, and the complex is translocated to the nucleus" is only true for some of the members of the 'Nuclear Receptor subfamily 3 such as the glucocorticoid, mineralocorticoid, androgen and progesterone  receptors. Estrogen receptor (NR3A1) is know to be in the nucleus even without it's ligand. Importantly, the nuclear receptors subfamily 1 members such as RAR, TR, LXR, etc. are known to be bound to DNA together with RXR also when none of these have a bound ligand, and in that conformation they are transcription repressors. All this to propose to delete this specification from the definition. A second point is that this term is about a protein family that is defined at the protein sequence level by a C4 type zinc finger and a ligand binding domain and that could be stated in the definition. A third point is that there are members of this family that are 'orphans' in the sense that they have no known ligand, and may even not have one at all. Hence, the ligand part of the definition. must be qualified as 'usually' so as to permit the so-called orphan nuclear receptors to fit the definition.  Thanks, Colin

Thanks for the feedback @krchristie

DNA-binding transcription repressor activity, RNA polymerase III-specific (GO:0106250)

I dont think I should change the definition (A DNA-binding transcription factor activity that represses or decreases the transcription of specific sets of non-coding RNA genes transcribed by RNA polymerase III.).
On the other hand, I will add a comment to: GO:0000995 | RNA polymerase III general transcription initiation factor activity

RNA polymerase III transcribes genes encoding short RNAs, including tRNAs, 5S rRNA, U6 snRNA, the short ncRNA component of RN'ases P, the mitochondrial RNA processing (MRP) RNA, the signal recognition particle SRP RNA, and in higher eukaryotes a number of micro and other small RNAs.
Def xref:  PMID:27068803, PMID:20413673

Similarly for RNA pol I and pol II
GO:0001181	RNA polymerase I general transcription initiation factor activity
RNA polymerase II itranscribes the three largest rRNAs, 5.8S, 18S, and 28S.

Def xref:PMID: 31358304, PMID: 25346433

GO:0016251	RNA polymerase II general transcription initiation factor activity

Add comment: RNA polymerase II transcribes all messenger RNAs (mRNAs) and most regulatory, untranslated RNAs.
Def xref: PMID: 23442138

Deleted previous comment - adding again with corrections

Thanks for the feedback @krchristie

DNA-binding transcription repressor activity, RNA polymerase III-specific (GO:0106250)

I will remove non-coding RNA from the definition (A DNA-binding transcription factor activity that represses or decreases the transcription of specific sets of ~non-coding RNA~ genes transcribed by RNA polymerase III.).
On the other hand, I will add to the definition of GO:0000995 | RNA polymerase III general transcription initiation factor activity

RNA polymerase III transcribes genes encoding short RNAs, including tRNAs, 5S rRNA, U6 snRNA, the short ncRNA component of RNases P, the mitochondrial RNA processing (MRP) RNA, the signal recognition particle SRP RNA, and in higher eukaryotes a number of micro and other small RNAs.
Def xref:  PMID:27068803, PMID:20413673

Similarly for RNA pol I and pol II
GO:0001181	RNA polymerase I general transcription initiation factor activity

Add to the definition RNA polymerase II itranscribes the three largest rRNAs, 5.8S, 18S, and 28S.
Add Def xref:PMID: 31358304, PMID: 25346433

GO:0016251	RNA polymerase II general transcription initiation factor activity

Add to the definition: RNA polymerase II transcribes all messenger RNAs (mRNAs) and most regulatory, untranslated RNAs.
Def xref: PMID: 23442138

Although those additions feel like thy are on the wrong terms - should they not rather be on the RNA polymerase activity itself ??

gene vs gene set

I see what you mean, your formulation is more precise, but given that a set can contain a single item, I prefer the simpler formulation, also because it makes the definition easier to understand.

New definitions based on feedback from @krchristie and @thomaspd

mf
label
curent definition
Proposal Pascale/Colin/Ruth Nov 3
Comment

GO:0140110
transcription regulator activity
A molecular function that controls the rate, timing and/or magnitude of transcription of genetic information. The function of transcriptional regulators is to modulate gene expression at the transcription step so that they are expressed in the right cell at the right time and in the right amount throughout the life of the cell and the organism.
A molecular function that controls the rate, timing and/or magnitude of gene transcription. The function of transcriptional regulators is to modulate gene expression at the transcription step so that they are expressed in the right cell at the right time and in the right amount throughout the life of the cell and the organism. Genes are transcriptional units, and include bacterial operons.
NA

GO:0003700
DNA-binding transcription factor activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a gene to modulate transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units, and include bacterial operons.
A transcription regulator activity that modulates transcription of gene sets via selective and non-covalent binding to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units, and include bacterial operons.
Usage guidance: Most DNA-binding transcription factors do not have enzymatic activity. The presence of specific DNA-binding domains known to be present in DNA-binding transcription factors (HOX, GATA etc) should be used to help decide whether a protein is a DNA binding transcription factor or a coregulator. If a protein has an enzymatic activity (for example, ubiquitin ligase, histone acetyl transferase) and no known DNA binding domain, consider annotating to GO:0003712 transcription coregulator activity. Special care should be taken with proteins containing zinc fingers, Myb/SANT and ARID domains, since only a subset of proteins containing these domains directly and selectively bind to regulatory DNA motifs in cis-regulatory regions.

GO:0000981
DNA-binding transcription factor activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to modulate transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that modulates the transcription of specific gene sets transcribed by RNA polymerase II.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0001216
DNA-binding transcription activator activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to activate or increase the frequency, rate or extent of transcription by a RNA polymerase.
A DNA-binding transcription factor activity that activates or increases transcription of specific gene sets.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0001228
DNA-binding transcription activator activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to activate or increase transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that activates or increases transcription of specific gene sets transcribed by RNA polymerase II.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0001217
DNA-binding transcription repressor activity
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to stop, prevent, or reduce the frequency, rate or extent of transcription by a RNA polymerase.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific gene sets.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0001227
DNA-binding transcription repressor activity, RNA polymerase II-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase II-transcribed gene to repress or decrease transcription. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific gene sets transcribed by RNA polymerase II.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0106250
DNA-binding transcription repressor activity, RNA polymerase III-specific
Interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within the regulatory region of a RNA polymerase III-transcribed gene to repress or decrease transcription.
A DNA-binding transcription factor activity that represses or decreases the transcription of specific genes sets transcribed by RNA polymerase III.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0098531
ligand-activated transcription factor activity
A DNA-binding transcription factor activity that is directly regulated by binding of a ligand to the protein with this activity. Examples include the lac and trp repressors in E.coli and many steroid hormone receptors.
A DNA-binding transcription factor activity regulated by binding to a ligand and that modulates the transcription of specific gene sets. Examples include the lac and trp repressors in E.coli and steroid hormone receptors.
For usage guidance, see comment in GO:0003700 ; DNA-binding transcription factor activity.

GO:0004879
nuclear receptor activity
Combining with a signal and transmitting the signal to the transcriptional machinery by interacting selectively and non-covalently with a specific double-stranded genomic DNA sequence in order to modulate transcription by RNA polymerase II.
A DNA-binding transcription factor activity regulated by binding to a ligand that modulates the transcription of specific gene sets transcribed by RNA polymerase II. Nuclear receptor ligands are usually lipid-based (such as a steroid hormone) and the binding of the ligand to its receptor often occurs in the cytoplasm, which leads to its tranlocation to the nucleus.
Usage guidance: Nuclear receptors are a protein family defined by the presence of a C4-type zinc finger DNA-binding domain and a ligand binding domain. For nuclear receptors, the DNA binding motif is most often referred to as a response element. GO:0004879 is intended for annotation of nuclear receptors that regulate transcription by binding directly to DNA. When the nuclear receptor functions by binding to other transcription factors or transcription factor complexes, consider instead annotating to 'GO:0030374 ; nuclear receptor transcription coactivator activity' or GO:0140536 ; nuclear corepressor activity.

xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx

GO:0003712
transcription coregulator activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to either activate or repress the transcription of specific genes. Coregulators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
A transcription regulator activity that modulates the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Coregulators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
Usage guidance: Most transcription coregulators do not bind DNA. Those that do usually bind DNA either in a non-specific or non-direct manner. If a protein binds DNA specifically, consider annotating to GO:0003700 DNA binding transcription factor activity.

GO:0003713
transcription coactivator activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to activate the transcription of specific genes. Coactivators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. Another type of coregulator activity is the bridging of a DNA-binding transcription factor to the basal transcription machinery. The Mediator complex, which bridges transcription factors and RNA polymerase, is also a transcription coactivator.
A transcription coregulator activity that activates or increases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Coactivators often act by altering chromatin structure and modifications. For example, one class of transcription coactivators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators. A fourth class of coactivator activity is the bridging of a DNA-binding transcription factor to the general (basal) transcription machinery. The Mediator complex, which bridges sequence-specific DNA binding transcription factors and RNA polymerase, is also a transcription coactivator.
For usage guidance, see comment in GO:0003712 ; transcription coregulator activity.

GO:0030374
nuclear receptor transcription coactivator activity
The function of a transcription cofactor that activates transcription in conjuction with a ligand-dependent nuclear receptor from a RNA polymerase II promoter; does not bind DNA itself.
A transcription coactivator activity that activates or increases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound nuclear receptor. Coactivators often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators. A fourth class of coactivator activity is the bridging of a DNA-binding transcription factor to the general (basal) transcription machinery. The Mediator complex, which bridges sequence-specific DNA binding transcription factors and RNA polymerase, is also a transcription coactivator.
For usage guidance, see comment in GO:0003712 ; transcription coregulator activity.

GO:0003714
transcription corepressor activity
A protein or a member of a complex that interacts specifically and non-covalently with a DNA-bound DNA-binding transcription factor to repress the transcription of specific genes. Corepressors often act by altering chromatin structure and modifications. For example, one class of transcription coregulators modifies chromatin structure through covalent modification of histones. A second ATP-dependent class modifies the conformation of chromatin. A third class occludes DNA-binding transcription factor protein-protein interaction domains. A fourth class of corepressors prevents interactions of DNA bound DNA-binding transcription factor with coactivators.
A transcription coregulator activity that represses or decreases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound DNA-binding transcription factor. Corepressors often act by altering chromatin structure and modifications. For example, one class of transcription corepressors modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
For usage guidance, see comment in GO:0003712 ; transcription coregulator activity.

GO:0140536
nuclear corepressor activity
NEW
A transcription corepressor activity that represses or decreases the transcription of specific gene sets via selective and non-covalent binding to a DNA-bound nuclear receptor. Nuclear receptor corepressors often act by altering chromatin structure and modifications. For example, one class of transcription nuclear receptor corepressors modifies chromatin structure through covalent modification of histones. A second class remodels the conformation of chromatin in an ATP-dependent fashion. A third class modulates interactions of DNA-binding transcription factor with other transcription coregulators.
For usage guidance, see comment in GO:0003712 ; transcription coregulator activity.

xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx

GO:0140223
general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation.
A molecular function that contributes to transcription start site selection and transcription initiation. General transcription factors assemble with the RNA polymerase at promoter DNA to form the pre-initiation complex (PIC), bind to and open promoter DNA, initiate RNA synthesis and stimulate the escape of the polymerase from the promoter. Not all subunits of the general transcription factor are necessarily present at all promoters to initiate transcription. The distinction between general transcription factors and DNA-binding transcription factors is that the latter modulate the selection of which genes are expressed under specific conditions, while general transcription factors are the constitutive machinery required for transcription initiation.
Usage guidance: The distinction between general transcription factors and DNA-binding transcription factors is that the latter modulate the selection of which genes are expressed under specific conditions, while general transcription factors are the constitutive machinery required for transcription initiation. In prokaryotes, the alpha and sigma subunits of the RNA polymerase holoenzyme bind cis-regulatory DNA sequences and thus fulfil the function of dbTF, GTF and RNA polymerase all-in-one.

GO:0001181
RNA polymerase I general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase I. Factors required for RNA polymerase I transcription initiation include upstream activation factor (UAF), core factor (CF), TATA binding protein (TBP) and RRN3.
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase I. Factors required for RNA polymerase I transcription initiation include upstream activation factor (UAF), core factor (CF), TATA binding protein (TBP) and RRN3. RNA polymerase I transcribes the three largest rRNAs, 5.8S, 18S, and 28S.

GO:0016251
RNA polymerase II general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase II. The general transcription factors for RNA polymerase II include TFIIB, TFIID, TFIIE, TFIIF, TFIIH and TATA-binding protein (TBP).
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase II. The general transcription factors for RNA polymerase II include TFIIB, TFIID, TFIIE, TFIIF, TFIIH and TATA-binding protein (TBP). RNA polymerase II transcribes all messenger RNAs (mRNAs) and most regulatory, untranslated RNAs.

GO:0000995
RNA polymerase III general transcription initiation factor activity
An activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase III. Factors required for RNA polymerase III transcription initiation include TFIIIA, TFIIIB and TFIIIC.
A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase III. Factors required for RNA polymerase III transcription initiation include TFIIIA, TFIIIB and TFIIIC. A general transcription initiation factor activity that contributes to transcription start site selection and transcription initiation of genes transcribed by RNA polymerase III. Factors required for RNA polymerase III transcription initiation include TFIIIA, TFIIIB and TFIIIC. RNA polymerase III transcribes genes encoding short RNAs, including tRNAs, 5S rRNA, U6 snRNA, the short ncRNA component of RNases P, the mitochondrial RNA processing (MRP) RNA, the signal recognition particle SRP RNA, and in higher eukaryotes a number of micro and other small RNAs.

xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx

GO:0140416
transcription regulator inhibitor activity
An activity that stops, prevents, or reduces the activity of a DNA binding transcription factor activity.
A molecular function regulator that inhibits the activity of a transcription regulator via direct binding and/or post-translational modification.
Usage guidance: transcription regulator inhibitors bind to a transcription regulator to prevent it from reaching the chromatin. This activity does not occur at the promoter. For activities that do occur at the promoter, consider GO:0001217 ; DNA-binding transcription repressor activity or GO:0003714 ; transcription corepressor activity. An example of a transcription regulator is TCF23 Q7RTU1 is an example of a protein that regulates transcription factors by heterodimerising or binding to DbTFs and prevent DNA binding and their specific genomic binding site where the dbTF would have activated or repressed transcription. Also an example is NFKBIA P25963 which has a different way of regulating transcription factor activity by sequestering the dbTF (complex) in the cytoplasm. Another example is the HSP90 and HSP23 proteins that sequester steroid receptors away from the DNA.

Ruth/Colin suggesting
transcription regulator activator activity
NEW
A molecular function regulator that increases the activity of a transcription regulator via direct binding and/or post-translational modification.
Usage guidance: transcription regulator activators bind to a transcription regulator to allow it to reach the chromatin or to contact other transcriptional regulators. This activity does not occur at the promoter. For activities that do occur at the promoter, consider GO:0001216 ; DNA-binding transcription activator activity or GO:0003713; transcription coactivator activity; those activities respectively bind DNA themselves or positively regulate a transcription regulator when it is located at the chromatin.

xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx

GO:0001070
RNA-binding transcription regulator activity
Interacting selectively and non-covalently with an RNA sequence in order to modulate transcription. This function is known to occur in phages and viruses, for example the lambda N and the HIV tat proteins are necessary to allow RNA polymerase to read through terminator sequences.
A transcription regulator activity that modulates the transcription of specific gene sets via selective and non-covalent binding to a specific RNA sequence. This function is known to occur in phages and viruses, for example the lambda N and the HIV tat proteins are necessary to allow RNA polymerase to read through terminator sequences.

GO:0003711
transcription elongation regulator activity
A molecular function that regulates transcriptional elongation by enabling the transition from transcription initiation to elongation or by altering the elongation properties of the enzyme during the elongation phase of transcription.
OK

I made the changes shown above but of course more changes can be made.

Note on GTFs:
GTF definition
GTF proposed definition (yesterday): A molecular function that contributes to transcription start site selection and transcription initiation.
comment: General transcription factors assemble with the RNA polymerase at promoter DNA to form the pre-initiation complex (PIC), bind to and open promoter DNA, initiate RNA synthesis and stimulate the escape of the polymerase from the promoter. Not all subunits of the general transcription factor are necessarily present at all promoters to initiate transcription. The distinction between general transcription factors and DNA-binding transcription factors is that the latter modulate the selection of which genes are expressed under specific conditions, while general transcription factors are the constitutive machinery required for transcription initiation. In prokaryotes, the alpha and sigma subunits of the RNA polymerase holoenzyme bind cis-regulatory DNA sequences and thus fulfil the function of dbTF, GTF and RNA polymerase all-in-one.
GTF new proposal (based on Paul’s feedback): A molecular function required for core promoter activity that mediates the assembly of the RNA polymerase holoenzyme at promoter DNA to form the pre-initiation complex (PIC). General transcription factors (GTFs) bind to and open promoter DNA, initiate RNA synthesis and stimulate the escape of the polymerase from the promoter. Not all subunits of the general transcription factor are necessarily present at all promoters to initiate transcription. GTFs act at each promoter, although the exact subunit composition at individual promoters may vary.
2. Clarification on bacterial GTFs
We have this in the comment: In prokaryotes, the alpha and sigma subunits of the RNA polymerase holoenzyme bind cis-regulatory DNA sequences and thus fulfil the function of dbTF, GTF and RNA polymerase all-in-one.
This is confusing because we say that GTFs do not provide specificity. Does that mean that that bacteria do not have GTFs ?
Speficially, how should the gene products be annotated ?

RNA polymerase = RNA polymerase activity (not a transcription regulator)
alpha subunit
sigma sigma subunit = dbTF ? GTF ? do we need a different function ?

Note that we do have ‘sigma factor activity’ function, defined as "Sigma factors act as the promoter specificity subunit of eubacterial and plant plastid multisubunit RNA polymerases, whose core subunit composition is often described as alpha(2)-beta-beta-prime. Although sigma does not bind DNA on its own, when combined with the core to form the holoenzyme, the sigma factor binds specifically to promoter elements. The sigma subunit is released once elongation begins.”

'sigma factor activity' is directly under ‘transcription regulator activity’
is it possible that there is no bacterial GTF ? I dont find any annotations. I think archae have them, not eubacteria ?

@colinlog replied

Yes, no GTF in bacteria but Sigma instead with its nice current definition. That sounds very nice to me! I guess archea are like eukaryotes, but no need to comment on that...

There is some variability across species about exactly which polymerases transcribe what, which is the list of what is transcribed by each RNAP was removed some time ago. If we are going to include this type of information, it should be done in a less concrete way to accomodate that variability.

RNA polymerase III transcribes genes encoding short RNAs, including tRNAs, 5S rRNA, U6 snRNA, the short ncRNA component of RNases P, the mitochondrial RNA processing (MRP) RNA, the signal recognition particle SRP RNA, and in higher eukaryotes a number of micro and other small RNAs.

Def xref:  PMID:27068803, PMID:20413673

RNA polymerase III transcribes genes encoding short RNAs, generally including all tRNAs, the 5S rRNA, the U6 snRNA, and often including the short ncRNA component of RNases P, the mitochondrial RNA processing (MRP) RNA, the signal recognition particle SRP RNA, as well as a number of other micro and small RNAs, though there is some variability across species as to whether a given small noncoding RNA is transcribed by RNA polymerase II or RNA polymerase III.
add: PMID: 17977614

Similarly for RNA pol I and pol II
GO:0001181 RNA polymerase I general transcription initiation factor activity
* Add to the definition: RNA polymerase I transcribes the three largest rRNAs, 5.8S, 18S, and 28S.

* Add Def xref:PMID: 31358304, PMID: 25346433

I would definitely NOT list the sizes of the rRNAs so concretely as they are not conserved across all taxa, nor are they transcribed separately as this implies.
In all species characterized, RNA polymerase I transcribes a large polycistronic transcript that is processed into several mature rRNAs (3 or 4 depending on the species), including the large subunit rRNA (28S in humans), the small subunit rRNA (18S in humans), as well as one or two additional smaller rRNAs (the 5.8S rRNA in humans). In most species, this  large rRNA transcript is the sole product of RNA polymerase I. However there are rare exceptions, such as Trypanosoma brucei, where RNA polymerase I also transcribes certain mRNAs.
add: PMID: 17972917,

GO:0016251 RNA polymerase II general transcription initiation factor activity

Add to the definition: RNA polymerase II transcribes all messenger RNAs (mRNAs) and most regulatory, untranslated RNAs.
* Def xref: PMID: 23442138

In most species, RNA polymerase II transcribes all messenger RNAs (mRNAs), most untranslated regulatory RNAs, the majority of the snoRNAs, four of the five snRNAs (U1, U2, U4, and U5), and other small noncoding RNAs. For some small RNAs there is variability between species as to whether it is transcribed by RNA polymerase II or RNA polymerase III. However there are also rare exceptions, such as Trypanosoma brucei, where RNA polymerase I transcribes certain mRNAs in addition to its normal role in rRNA transcription.
add: PMID: 10747032

Thanks @krchristie , I made the changes you suggested.


[Tool] BE TOTAL COV DEBUG

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[x] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:heart_eyes: pass : 1 / 1 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/parquet_reader.cpp
1
1
100.00%
[]

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:heart_eyes: pass : 1 / 1 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/parquet_reader.cpp
1
1
100.00%
[]

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:heart_eyes: pass : 1 / 1 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/parquet_reader.cpp
1
1
100.00%
[]

[BE Incremental Coverage Report]
:heart_eyes: pass : 1 / 1 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
be/src/exec/parquet_reader.cpp
1
1
100.00%
[]


Elevation on Toolbar

Is it possible to add elevation to Toolbar, but only when it is collapsed? Of course, when it is expanded, I'd like to hide this elevation.

I think it's possible.

Thank you very much. I'm waiting for demo.

Hi @Nominalista
Please checkout this branch and try it. https://github.com/henrytao-me/smooth-app-bar-layout/tree/issue-110. I think it's a default implementation of Toolbar.

Why I can't see elevation in QuickReturn example ?

What device are you using? Elevation is only supported on API 21 and above
On Sat, May 28, 2016, 03:33 Nominalista<EMAIL_ADDRESS>wrote:

Why I can't see elevation in QuickReturn example ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/henrytao-me/smooth-app-bar-layout/issues/110#issuecomment-222301751,
or mute the thread
https://github.com/notifications/unsubscribe/AFB8Yu-13KafrIK96pzS17dYy7rWrRNeks5qGBnqgaJpZM4InCJM
.

Htc One M8 with API 23, I also can't see this on emulator with API 23.

Hi @Nominalista
What APK is it?

Did you check out the branch I sent you and run the build?

I merged it to master. You can run again on master now.

Can you show me screenshot with elevation in QuickReturn example ? Cause still when I fetched master can't see elevation.

For QuickReturn example, the elevation is displayed under statusbar. Check out these screenshots below
https://drive.google.com/file/d/0B5HntpVe6CemZjRQYVg3U0hTWTQ/view?usp=sharing
https://drive.google.com/file/d/0B5HntpVe6CemSHctSEpZeks5cWc/view?usp=sharing
It seems like you want to have elevation showed when it returns. If so, I am not sure it's possible. Please confirm and I will look into it.

Yes, that's why I created issue, because I wasn't sure if it's possible too. Please look into it and thank you for your time spend on it.


Update asset_transfer_ledger_chaincode.go

/*
SPDX-License-Identifier: Apache-2.0
*/
/*
====CHAINCODE EXECUTION SAMPLES (CLI) ==================
====
code-text-binary.json
user_config (3).json
peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["CreateAsset","asset1","blue","5","tom","35"]}' peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["CreateAsset","asset2","red","4","tom","50"]}' peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["CreateAsset","asset3","blue","6","tom","70"]}' peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["TransferAsset","asset2","jerry"]}' peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["TransferAssetByColor","blue","jerry"]}' peer chaincode invoke -C myc1 -n asset_transfer -c '{"Args":["DeleteAsset","asset1"]}'
==== Query assets ====
peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["ReadAsset","asset1"]}' peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["GetAssetsByRange","asset1","asset3"]}' peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["GetAssetHistory","asset1"]}'
Rich Query (Only supported if CouchDB is used as state database): peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["QueryAssetsByOwner","tom"]}' peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["QueryAssets","{"selector":{"owner":"tom"}}"]}'
Rich Query with Pagination (Only supported if CouchDB is used as state database): peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["QueryAssetsWithPagination","{"selector":{"owner":"tom"}}","3",""]}'
INDEXES TO SUPPORT COUCHDB RICH QUERIES
Indexes in CouchDB are required in order to make JSON queries efficient and are required for any JSON query with a sort. Indexes may be packaged alongside chaincode in a META-INF/statedb/couchdb/indexes directory. Each index must be defined in its own text file with extension *.json with the index definition formatted in JSON following the CouchDB index JSON syntax as documented at:
http://docs.couchdb.org/en/2.3.1/api/database/find.html#db-index
This asset transfer ledger example chaincode demonstrates a packaged index which you can find in META-INF/statedb/couchdb/indexes/indexOwner.json.
If you have access to the your peer's CouchDB state database in a development environment, you may want to iteratively test various indexes in support of your chaincode queries.  You can use the CouchDB Fauxton interface ork a command line curl utility to create and update indexes. Then once you finalize an index, include the index definition alongside your chaincode in the META-INF/statedb/couchdb/indexes directory, for packaging and deployment to managed environments.
In the examples below you can find index definitions that support asset transfer ledger chaincode queries, along with the syntax that you can use in development environments to create the indexes in the CouchDB Fauxton interface or a curl command line utility.
Index for docType, owner.
Example curl command line to define index in the CouchDB channel_chaincode database curl -i -X POST -H "Content-Type: application/json" -d "{"index":{"fields":["docType","owner"]},"name":"indexOwner","ddoc":"indexOwnerDoc","type":"json"}" http://hostname:port/myc1_assets/_index
Index for docType, owner, size (descending order).
Example curl command line to define index in the CouchDB channel_chaincode database: curl -i -X POST -H "Content-Type: application/json" -d "{"index":{"fields":[{"size":"desc"},{"docType":"desc"},{"owner":"desc"}]},"ddoc":"indexSizeSortDoc", "name":"indexSizeSortDesc","type":"json"}" http://hostname:port/myc1_assets/_index
Rich Query with index design doc and index name specified (Only supported if CouchDB is used as state database): peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["QueryAssets","{"selector":{"docType":"asset","owner":"tom"}, "use_index":["_design/indexOwnerDoc", "indexOwner"]}"]}'
Rich Query with index design doc specified only (Only supported if CouchDB is used as state database): peer chaincode query -C myc1 -n asset_transfer -c '{"Args":["QueryAssets","{"selector":{"docType":{"$eq":"asset"},"owner":{"$eq":"tom"},"size":{"$gt":0}},"fields":["docType","owner","size"],"sort":[{"size":"desc"}],"use_index":"_design/indexSizeSortDoc"}"]}' */
package main
import (
"encoding/json"
"fmt"
"log"
"time"
"github.com/hyperledger/fabric-chaincode-go/v2/shim"
"github.com/hyperledger/fabric-contract-api-go/v2/contractapi"

)
const index = "color~name"
// SimpleChaincode implements the fabric-contract-api-go programming model type SimpleChaincode struct {
contractapi.Contract
}
type Asset struct {
DocType        string json:"docType" //docType is used to distinguish the various types of objects in state database
ID             string json:"ID"      //the field tags are needed to keep case from bouncing around
Color          string json:"color"
Size           int    json:"size"
Owner          string json:"owner"
AppraisedValue int    json:"appraisedValue"
}
// HistoryQueryResult structure used for returning result of history query type HistoryQueryResult struct {
Record    *Asset    json:"record"
TxId      string    json:"txId"
Timestamp time.Time json:"timestamp"
IsDelete  bool      json:"isDelete"
}
// PaginatedQueryResult structure used for returning paginated query results and metadata type PaginatedQueryResult struct {
Records             []*Asset json:"records"
FetchedRecordsCount int32    json:"fetchedRecordsCount"
Bookmark            string   json:"bookmark"
}
// CreateAsset initializes a new asset in the ledger func (t *SimpleChaincode) CreateAsset(ctx contractapi.TransactionContextInterface, assetID, color string, size int, owner string, appraisedValue int) error {
exists, err := t.AssetExists(ctx, assetID)
if err != nil {
return fmt.Errorf("failed to get asset: %v", err)
}
if exists {
return fmt.Errorf("asset already exists: %s", assetID)
}
asset := &Asset{
	DocType:        "asset",
	ID:             assetID,
	Color:          color,
	Size:           size,
	Owner:          owner,
	AppraisedValue: appraisedValue,
}
assetBytes, err := json.Marshal(asset)
if err != nil {
	return err
}

err = ctx.GetStub().PutState(assetID, assetBytes)
if err != nil {
	return err
}

//  Create an index to enable color-based range queries, e.g. return all blue assets.
//  An 'index' is a normal key-value entry in the ledger.
//  The key is a composite key, with the elements that you want to range query on listed first.
//  In our case, the composite key is based on indexName~color~name.
//  This will enable very efficient state range queries based on composite keys matching indexName~color~*
colorNameIndexKey, err := ctx.GetStub().CreateCompositeKey(index, []string{asset.Color, asset.ID})
if err != nil {
	return err
}
//  Save index entry to world state. Only the key name is needed, no need to store a duplicate copy of the asset.
//  Note - passing a 'nil' value will effectively delete the key from state, therefore we pass null character as value
value := []byte{0x00}
return ctx.GetStub().PutState(colorNameIndexKey, value)

}
// ReadAsset retrieves an asset from the ledger
func (t *SimpleChaincode) ReadAsset(ctx contractapi.TransactionContextInterface, assetID string) (*Asset, error) {
assetBytes, err := ctx.GetStub().GetState(assetID)
if err != nil {
return nil, fmt.Errorf("failed to get asset %s: %v", assetID, err)
}
if assetBytes == nil {
return nil, fmt.Errorf("asset %s does not exist", assetID)
}
var asset Asset
err = json.Unmarshal(assetBytes, &asset)
if err != nil {
	return nil, err
}

return &asset, nil

}
// DeleteAsset removes an asset key-value pair from the ledger func (t *SimpleChaincode) DeleteAsset(ctx contractapi.TransactionContextInterface, assetID string) error {
asset, err := t.ReadAsset(ctx, assetID)
if err != nil {
return err
}
err = ctx.GetStub().DelState(assetID)
if err != nil {
	return fmt.Errorf("failed to delete asset %s: %v", assetID, err)
}

colorNameIndexKey, err := ctx.GetStub().CreateCompositeKey(index, []string{asset.Color, asset.ID})
if err != nil {
	return err
}

// Delete index entry
return ctx.GetStub().DelState(colorNameIndexKey)

}
// TransferAsset transfers an asset by setting a new owner name on the asset func (t *SimpleChaincode) TransferAsset(ctx contractapi.TransactionContextInterface, assetID, newOwner string) error {
asset, err := t.ReadAsset(ctx, assetID)
if err != nil {
return err
}
asset.Owner = newOwner
assetBytes, err := json.Marshal(asset)
if err != nil {
	return err
}

return ctx.GetStub().PutState(assetID, assetBytes)

}
// constructQueryResponseFromIterator constructs a slice of assets from the resultsIterator func constructQueryResponseFromIterator(resultsIterator shim.StateQueryIteratorInterface) ([]*Asset, error) {
var assets []*Asset
for resultsIterator.HasNext() {
queryResult, err := resultsIterator.Next()
if err != nil {
return nil, err
}
var asset Asset
err = json.Unmarshal(queryResult.Value, &asset)
if err != nil {
return nil, err
}
assets = append(assets, &asset)
}
return assets, nil

}
// GetAssetsByRange performs a range query based on the start and end keys provided. // Read-only function results are not typically submitted to ordering. If the read-only // results are submitted to ordering, or if the query is used in an update transaction // and submitted to ordering, then the committing peers will re-execute to guarantee that // result sets are stable between endorsement time and commit time. The transaction is // invalidated by the committing peers if the result set has changed between endorsement // time and commit time.
// Therefore, range queries are a safe option for performing update transactions based on query results. func (t *SimpleChaincode) GetAssetsByRange(ctx contractapi.TransactionContextInterface, startKey, endKey string) ([]*Asset, error) {
resultsIterator, err := ctx.GetStub().GetStateByRange(startKey, endKey)
if err != nil {
return nil, err
}
defer resultsIterator.Close()
return constructQueryResponseFromIterator(resultsIterator)

}
// TransferAssetByColor will transfer assets of a given color to a certain new owner. // Uses GetStateByPartialCompositeKey (range query) against color~name 'index'. // Committing peers will re-execute range queries to guarantee that result sets are stable // between endorsement time and commit time. The transaction is invalidated by the // committing peers if the result set has changed between endorsement time and commit time. // Therefore, range queries are a safe option for performing update transactions based on query results. // Example: GetStateByPartialCompositeKey/RangeQuery func (t *SimpleChaincode) TransferAssetByColor(ctx contractapi.TransactionContextInterface, color, newOwner string) error {
// Execute a key range query on all keys starting with 'color'
coloredAssetResultsIterator, err := ctx.GetStub().GetStateByPartialCompositeKey(index, []string{color})
if err != nil {
return err
}
defer coloredAssetResultsIterator.Close()
for coloredAssetResultsIterator.HasNext() {
	responseRange, err := coloredAssetResultsIterator.Next()
	if err != nil {
		return err
	}

	_, compositeKeyParts, err := ctx.GetStub().SplitCompositeKey(responseRange.Key)
	if err != nil {
		return err
	}

	if len(compositeKeyParts) > 1 {
		returnedAssetID := compositeKeyParts[1]
		asset, err := t.ReadAsset(ctx, returnedAssetID)
		if err != nil {
			return err
		}
		asset.Owner = newOwner
		assetBytes, err := json.Marshal(asset)
		if err != nil {
			return err
		}
		err = ctx.GetStub().PutState(returnedAssetID, assetBytes)
		if err != nil {
			return fmt.Errorf("transfer failed for asset %s: %v", returnedAssetID, err)
		}
	}
}

return nil

}
// QueryAssetsByOwner queries for assets based on the owners name. // This is an example of a parameterized query where the query logic is baked into the chaincode, // and accepting a single query parameter (owner). // Only available on state databases that support rich query (e.g. CouchDB) // Example: Parameterized rich query
func (t *SimpleChaincode) QueryAssetsByOwner(ctx contractapi.TransactionContextInterface, owner string) ([]*Asset, error) {
queryString := fmt.Sprintf({"selector":{"docType":"asset","owner":"%s"}}, owner)
return getQueryResultForQueryString(ctx, queryString)
}
// QueryAssets uses a query string to perform a query for assets. // Query string matching state database syntax is passed in and executed as is. // Supports ad hoc queries that can be defined at runtime by the client. // If this is not desired, follow the QueryAssetsForOwner example for parameterized queries. // Only available on state databases that support rich query (e.g. CouchDB) // Example: Ad hoc rich query
func (t *SimpleChaincode) QueryAssets(ctx contractapi.TransactionContextInterface, queryString string) ([]*Asset, error) {
return getQueryResultForQueryString(ctx, queryString)
}
// getQueryResultForQueryString executes the passed in query string. // The result set is built and returned as a byte array containing the JSON results. func getQueryResultForQueryString(ctx contractapi.TransactionContextInterface, queryString string) ([]*Asset, error) {
resultsIterator, err := ctx.GetStub().GetQueryResult(queryString)
if err != nil {
return nil, err
}
defer resultsIterator.Close()
return constructQueryResponseFromIterator(resultsIterator)

}
// GetAssetsByRangeWithPagination performs a range query based on the start and end key, // page size and a bookmark.
// The number of fetched records will be equal to or lesser than the page size. // Paginated range queries are only valid for read only transactions. // Example: Pagination with Range Query
func (t *SimpleChaincode) GetAssetsByRangeWithPagination(ctx contractapi.TransactionContextInterface, startKey string, endKey string, pageSize int, bookmark string) (*PaginatedQueryResult, error) {
resultsIterator, responseMetadata, err := ctx.GetStub().GetStateByRangeWithPagination(startKey, endKey, int32(pageSize), bookmark)
if err != nil {
	return nil, err
}
defer resultsIterator.Close()

assets, err := constructQueryResponseFromIterator(resultsIterator)
if err != nil {
	return nil, err
}

return &PaginatedQueryResult{
	Records:             assets,
	FetchedRecordsCount: responseMetadata.FetchedRecordsCount,
	Bookmark:            responseMetadata.Bookmark,
}, nil

}
// QueryAssetsWithPagination uses a query string, page size and a bookmark to perform a query // for assets. Query string matching state database syntax is passed in and executed as is. // The number of fetched records would be equal to or lesser than the specified page size. // Supports ad hoc queries that can be defined at runtime by the client. // If this is not desired, follow the QueryAssetsForOwner example for parameterized queries. // Only available on state databases that support rich query (e.g. CouchDB) // Paginated queries are only valid for read only transactions. // Example: Pagination with Ad hoc Rich Query
func (t *SimpleChaincode) QueryAssetsWithPagination(ctx contractapi.TransactionContextInterface, queryString string, pageSize int, bookmark string) (*PaginatedQueryResult, error) {
return getQueryResultForQueryStringWithPagination(ctx, queryString, int32(pageSize), bookmark)

}
// getQueryResultForQueryStringWithPagination executes the passed in query string with // pagination info. The result set is built and returned as a byte array containing the JSON results. func getQueryResultForQueryStringWithPagination(ctx contractapi.TransactionContextInterface, queryString string, pageSize int32, bookmark string) (*PaginatedQueryResult, error) {
resultsIterator, responseMetadata, err := ctx.GetStub().GetQueryResultWithPagination(queryString, pageSize, bookmark)
if err != nil {
	return nil, err
}
defer resultsIterator.Close()

assets, err := constructQueryResponseFromIterator(resultsIterator)
if err != nil {
	return nil, err
}

return &PaginatedQueryResult{
	Records:             assets,
	FetchedRecordsCount: responseMetadata.FetchedRecordsCount,
	Bookmark:            responseMetadata.Bookmark,
}, nil

}
// GetAssetHistory returns the chain of custody for an asset since issuance. func (t *SimpleChaincode) GetAssetHistory(ctx contractapi.TransactionContextInterface, assetID string) ([]HistoryQueryResult, error) {
log.Printf("GetAssetHistory: ID %v", assetID)
resultsIterator, err := ctx.GetStub().GetHistoryForKey(assetID)
if err != nil {
	return nil, err
}
defer resultsIterator.Close()

var records []HistoryQueryResult
for resultsIterator.HasNext() {
	response, err := resultsIterator.Next()
	if err != nil {
		return nil, err
	}

	var asset Asset
	if len(response.Value) > 0 {
		err = json.Unmarshal(response.Value, &asset)
		if err != nil {
			return nil, err
		}
	} else {
		asset = Asset{
			ID: assetID,
		}
	}

	record := HistoryQueryResult{
		TxId:      response.TxId,
		Timestamp: response.Timestamp.AsTime(),
		Record:    &asset,
		IsDelete:  response.IsDelete,
	}
	records = append(records, record)
}

return records, nil

}
// AssetExists returns true when asset with given ID exists in the ledger. func (t *SimpleChaincode) AssetExists(ctx contractapi.TransactionContextInterface, assetID string) (bool, error) {
assetBytes, err := ctx.GetStub().GetState(assetID)
if err != nil {
return false, fmt.Errorf("failed to read asset %s from world state. %v", assetID, err)
}
return assetBytes != nil, nil

}
// InitLedger creates the initial set of assets in the ledger. func (t *SimpleChaincode) InitLedger(ctx contractapi.TransactionContextInterface) error {
assets := []Asset{
{DocType: "asset", ID: "asset1", Color: "blue", Size: 5, Owner: "Tomoko", AppraisedValue: 300},
{DocType: "asset", ID: "asset2", Color: "red", Size: 5, Owner: "Brad", AppraisedValue: 400},
{DocType: "asset", ID: "asset3", Color: "green", Size: 10, Owner: "Jin Soo", AppraisedValue: 500},
{DocType: "asset", ID: "asset4", Color: "yellow", Size: 10, Owner: "Max", AppraisedValue: 600},
{DocType: "asset", ID: "asset5", Color: "black", Size: 15, Owner: "Adriana", AppraisedValue: 700},
{DocType: "asset", ID: "asset6", Color: "white", Size: 15, Owner: "Michel", AppraisedValue: 800},
}
for _, asset := range assets {
	err := t.CreateAsset(ctx, asset.ID, asset.Color, asset.Size, asset.Owner, asset.AppraisedValue)
	if err != nil {
		return err
	}
}

return nil

}
func main() {
chaincode, err := contractapi.NewChaincode(&SimpleChaincode{})
if err != nil {
log.Panicf("Error creating asset chaincode: %v", err)
}
if err := chaincode.Start(); err != nil {
	log.Panicf("Error starting asset chaincode: %v", err)
}

}

The change you have submitted just adds a blank line and misspells a word that is currently spelled correctly. Could you explain what you are trying to achieve?


How can i get the same outcome which shown in the paper?

This eval is from the paper A Transformer-based Framework for Multivariate Time Series Representation Learning.
And the classes in datasets/dataset.py are process .csv files, but the classification data are .ts and .arff.

ok, i found it. The program to process it is in datasets/data::TSRegressionArchive. And the data can be found at https://github.com/gzerveas/mvts_transformer/issues/71#issue-2336884850.


How to setup if() statements in SearchRules

Hi,
I am trying to setup if statements in search rules but I am getting the error
"{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:29] [bool] failed to parse field [should]"}],"type":"x_content_parse_exception","reason":"[1:29] [bool] failed to parse field [should]","caused_by":{"type":"illegal_state_exception","reason":"expected value but got [START_ARRAY]"}},"status":400}

and my search rule is
$array = ['must' => [], 'should' => []];

        if (!Request::get('dates')) {
            $array['must'][] = [
                Arr::add([], 'range.closingDate.gte', 'now/d'),
            ];
        }
if (Request::get('tag')) {
            $array['must'][] = [
                'match' => ['genres.name' => Request::get('tag')],
            ];
        }
 if (Request::get('dates')) {
            $array['should'][] = [
                Arr::add([], 'bool.must.match.showtype', 'a'),
                Arr::add([], 'bool.should.range', [
                    'shows.date' => [
                        'gte' => Request::get('dates')[0],
                        'lte' => Request::get('dates')[1],
                    ],
                ]),
            ];
        }
 if (Request::get('dates')) {
            $array['minimum_should_match'] = 1;
        }

        return $array;

I read online the error is because ES doesn't work with arrays inside arrays but I am not sure what else to do? My code does work if I delete any of the ['should'] arrays. Thank you so much.

I solve it, though Im still not sure if this is the correct way to do it.
Ok after testing I discovered the problem. If I have
if (Request::get('dates')) {
            $array['should'][] = [

The next part has to be a term, it can't be the start of a new array. So I was doing
if (Request::get('dates')) {
            $array['should'][] = [
	[
		'bool'

and this was breaking it. But if you just do
if (Request::get('dates')) {
            $array['should'][] = [
		'bool'

then it worked. So I split it into multiple if() instead of trying to do multiple arrays inside one


Semantic parser improvements

Adding several features to the semantic parser:

handling unknown words
reading in a separate table of known entity names (and using these in the parser)
new bidirectional LSTM seq2seq model w/ attention for scoring logical forms

These features improve accuracy on geoquery to ~78%, from ~35% before.

Very cool, that's a decent improvement! :)  Some things for future consideration:

If we have frequent changes to jklol.jar, maybe we should keep that out of the repo and just update it locally
Maybe use some sort of logging mechanism rather than explicit printlns in the code


Fix experiment runner

Some notable changes:

Use concurrent.futures.ProcessPoolExecutor instead of multiprocessing.Pool
All Tool instances now have a default log file that they print to
Add logging functionality to Tool class
Redirection Rapidwright stdout to log file
Lots of pylint fixing on other files

Waiting on #107


dapriosamples/hello-k8s-node:edge as used in sample "2.hello-kubernetes" fails with Dapr 0.8.0 as DAPR_HTTP_PORT and DAPR_GRPC_PORT isn't set

Expected Behavior
After deployment of the sample application it's expected that the nodeapp pod is able to receive and persist orders.
Actual Behavior
Fetching orders seems to work, while persisting them seems to fail. Extract from nodeapp logg:

Got a new order! Order ID: 196
{ FetchError: request to http://localhost:undefined/v1.0/state/statestore failed, reason: connect ECONNREFUSED <IP_ADDRESS>:80

Steps to Reproduce the Problem
install K8s v 1.18.5
install dapr

helm repo add dapr https://daprio.azurecr.io/helm/v1/repo
helm repo update
kubectl create namespace dapr-system

helm install dapr dapr/dapr --namespace dapr-system

Install redis

kubectl create namespace dapr-redis

helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo update

helm install redis stable/redis --namespace dapr-redis

Install the dapr demo

redispwd="$(kubectl get secret --namespace dapr-redis redis -o jsonpath="{.data.redis-password}" | base64 --decode)"
cp -vf "${HOME}/git/dapr/samples/2.hello-kubernetes/deploy/"*.yaml DaprTestApplicaton/
kustomize build DaprTestApplicaton |\
  sed "s:YOUR_REDIS_HOST_HERE:redis-master.dapr-redis.svc.cluster.local:" |\
  sed "s:YOUR_REDIS_KEY_HERE:$redispwd:" |\
  kubectl apply -f -

The kustomize file

resources:
- 00_namespace.yaml
- node.yaml
- python.yaml
- redis.yaml

namespace: dapr-hello

The problem
Seems the the node app (dapriosamples/hello-k8s-node:edge) only works if the following environment variables are set in the deployment:

      env:
      - name: DAPR_HTTP_PORT
        value: "3500"
      - name: DAPR_GRPC_PORT
        value: "50001"

I'm pretty sure this demo worked with an earlier Dapr + K8s version, but I haven't verified this.
Ref also https://github.com/dapr/dapr/issues/1637.

@HansK-p the samples in master branch will work with edge version of dapr. If you are using 0.8.0 dapr runtime version then please checkout v0.8.0 tag for samples.

@pruthvidhodda That sounds like a good explanation. Does this mean that the documentation should be updated?
I assume one ends up with a broken demo both when following https://github.com/dapr/samples/tree/v0.8.0/2.hello-kubernetes and when following https://github.com/dapr/samples/tree/master/2.hello-kubernetes.
Is it an option to change the Prerequisites part of the "hello kubernetes" document from:

git clone https://github.com/dapr/samples.git
cd samples

to

git clone -b v0.8.0 https://github.com/dapr/samples.git
cd samples

When in the v0.8.0 branche of the samples documentation, or just simply use something like:

git clone -b &ltdapr_version_tag> https://github.com/dapr/samples.git
cd samples

I tried googling "dapr hello kubernetes" and ended up in the master branch documentation.

I assume one ends up with a broken demo both when following https://github.com/dapr/samples/tree/v0.8.0/2.hello-kubernetes and when following https://github.com/dapr/samples/tree/master/2.hello-kubernetes.

Why do you think following https://github.com/dapr/samples/tree/v0.8.0/2.hello-kubernetes would lead to broken demo?

@pruthvidhodda Because it broke when I followed the documentation :).
I ended up with a nodeapp deployment which uses the dapriosamples/hello-k8s-node:edge docker image. And that image doesn't work with dapr v.0.8.0, ref your first comment. At least it didn't work for me.

$ git clone https://github.com/dapr/samples.git
Cloning into 'samples'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 1587 (delta 11), reused 10 (delta 4), pack-reused 1545
Receiving objects: 100% (1587/1587), 9.04 MiB | 854.00 KiB/s, done.
Resolving deltas: 100% (876/876), done.
$ cd samples
$ grep image 2.hello-kubernetes/deploy/node.yaml
        image: dapriosamples/hello-k8s-node:edge
        imagePullPolicy: Always

I now know that I should have done:

$ git clone -b v0.8.0 https://github.com/dapr/samples.git
Cloning into 'samples'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 1587 (delta 11), reused 10 (delta 4), pack-reused 1545
Receiving objects: 100% (1587/1587), 9.04 MiB | 823.00 KiB/s, done.
Resolving deltas: 100% (876/876), done.
Note: switching to 'bf05a9c44a7a195392618e6e4a5d1dbe7102b16c'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

$ cd samples
$ grep image 2.hello-kubernetes/deploy/node.yaml
        image: dapriosamples/hello-k8s-node:0.8.0
        imagePullPolicy: Always

I assume one ends up with a broken demo both when following https://github.com/dapr/samples/tree/v0.8.0/2.hello-kubernetes and when following https://github.com/dapr/samples/tree/master/2.hello-kubernetes.

Why do you think following https://github.com/dapr/samples/tree/v0.8.0/2.hello-kubernetes would lead to broken demo?

Sorry if I wasn't clear but my intention is to say that v0.8.0 version of samples should work and won't break if you are using the same version of dapr runtime.
I agree that it's easy to miss checking out the correct version of samples but I don't think it needs any changes. Right now we mention about compatible versions here in the samples repo.

Hello
I must admit that I disagree. I personally prefer demos where one can follow the documentation blindly in order to get a working result.. This time I didn't even think about checking out a specific branch as I just used copied and pasted the commands exactly as they are written in the documentation. That's how I usually do it when running these kind of demos. If something fails, I usually double-check that I've actually followed the documentation, troubleshoot further if the demo still doesn't work (or just give up) and sometimes I inform the maintainers that there are issues.
Personally I would prefer that the documentation was updated so that it is obvious that the master branch should not be used, even though that is what currently happens if one follows the documentation (copy/paste with only obvious modifications if any). But I must admit that I'm not a developer and might not be a part of the intended audience.
Br
Hans K.

Fair point!
I like your idea here:

just simply use something like:
git clone -b <dapr_version_tag> https://github.com/dapr/samples.git
cd samples

Something like:
If using edge version of dapr:
git clone https://github.com/dapr/samples.git
cd samples/1.hello-world

If using specific version of dapr:
git clone -b <dapr_version_tag> https://github.com/dapr/samples.git
cd samples/1.hello-world

Is this okay @amanbha ?

At least it would make me happy if such a change is made to the documentation :).
Even the command:

$ wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
Your system is linux_amd64
Installing Dapr CLI...

Downloading https://github.com/dapr/cli/releases/download/v0.8.0/dapr_linux_amd64.tar.gz ...

does download the latest released version of Dapr and not the edge version. Ref https://github.com/dapr/docs/blob/master/getting-started/environment-setup.md#installing-dapr-on-a-kubernetes-cluster
So I'd guess that people trying the demo will almost never use the edge version of Dapr. Which means that checking out a specific branch should be the norm and not the exception when running these demos?
I also assume that one has to build the binaries by hand in order to use the dapr edge version?
Br
Hans K.

That's right, we have to build the binaries for edge version.
Adding a line in the documentation of each sample pointing to this table and an instruction to checkout the tag(<dapr_version_tag>) should work in my opinion. Thoughts on this?
Are you interested in making this contribution to dapr?

Hello
I'm really bad with git, but I can have a try within a few days.
I "finally" found out that there is an image "docker.io/daprioedge" which is used by at least the Docker Compose sample (https://github.com/dapr/samples/tree/master/10.hello-docker-compose).

I tried using the edge image in K8s using Helm and only modifying the image tag, and that failed (dapr-operator failed). Probably has the Helm chart itself would have needed an update for the Dapr edge image to work
I will not make changes to the docker-edge sample documentation as I assume that will only create confusions

So this finding doesn't really change anything.
Br
Hans K.

I tried to squash my commits - and things started failing in interesting ways (= my git skills are really not good).
Can you still have a look at the result? It's not exactly what you asked for, but might still be ok (https://github.com/HansK-p/samples/tree/git-clone-supply-version-tag). I'll fix the squash thing in one way or another when things are looking ok.

Closed with this PR


Cannot find 'package.json' when getting package list

Please answer the following questions before submitting your issue. Thanks!
What version of the DCOS CLI are you using (dcos --version)?
dcos version 0.4.2
What version of DCOS are you using?
I don't know. How can I look this up? 1.6.1
What operating system and version are you using?
Ubuntu 14.04
What did you do?
I tried executing the command: dcos package list
What did you expect to see?
I expected to see:
$ dcos package list
NAME       VERSION  APP              COMMAND  DESCRIPTION
cassandra  0.2.0-2  /cassandra/dcos  ---      Apache Cassandra running on Apache Mesos
chronos    2.4.0    /chronos         ---      A fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules.
kafka      <IP_ADDRESS>  /kafka           kafka    Apache Kafka running on top of Apache Mesos
marathon   0.15.3   /marathon-user   ---      A cluster-wide init and control system for services in cgroups or Docker containers.

What did you see instead?
$ dcos package list
Package file [package.json] not found

Hi @natemurthy, we just merged support for getting the DC/OS version with dcos --version- #577. Unfortunately, we haven't made a release with those changes. The next release should have them. For now you can get the dcos version by going to the UI. It should be in the bottom left corner.

Did you happen to modify your list of packages and repositories?
What does dcos package repo list return?
What does dcos marathon app list --json return? Let me know if you would like to share this output privately.

cc @BenWhitehead

Ok, I found the DCOS version number it is 1.6.1 (updating ticket above).

No, haven't made any modifications in several weeks

$ dcos package repo list
Universe: https://universe.mesosphere.com/repo
multiverse: https://github.com/mesosphere/multiverse/archive/version-2.x.zip

$ dcos package repo list --json
{
  "repositories": [
    {
      "name": "Universe",
      "uri": "https://universe.mesosphere.com/repo"
    },
    {
      "name": "multiverse",
      "uri": "https://github.com/mesosphere/multiverse/archive/version-2.x.zip"
    }
  ]
}

@natemurthy I believe the problem is the Multiverse entry. I don't think multiverse is supported in DC/OS 1.6.1. All of those packages were migrated to Universe. Can you try removing that repository dcos package repo remove multiverse and try again?

Alright that did the trick. Thanks! I'll close this out now:
$ dcos package repo remove multiverse
$ dcos package list
NAME         VERSION              APP              COMMAND    DESCRIPTION
cassandra    0.2.0-1              /cassandra/dcos  cassandra  Apache Cassandra running on Apache Mesos
etcd         0.0.2                /etcd            ---        A distributed consistent key-value store for shared configuration and service discovery.
hdfs         0.1.8                /hdfs            ---        Hadoop Distributed File System (HDFS), Highly Available
jenkins      0.2.3                /jenkins         ---        Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity. Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies.
kafka        <IP_ADDRESS>              /kafka           ---        Apache Kafka running on top of Apache Mesos
kubernetes   v0.7.2-v1.1.5-alpha  /kubernetes      ---        Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
marathon-lb  0.0.3-0.1            /marathon-lb     ---        HAProxy configured from marathon state


Making an HTTP request with AF causes a crash when an exception breakpoint is set for a Cocoa app

I have a single exception breakpoint set on an example project. When I do a simple GET request with AF, the app crashes.
See https://github.com/dlo/Alamofire-Crash-Example for example code.

The app doesn't crash, you're merely hitting the breakpoint you have set. It's rather common for those of Apple's frameworks that use C++ underneath to use exceptions in ways that Objective-C and Swift don't and so you may hit those exceptions with that breakpoint. That's why I usually run with the exception breakpoint set only for the language I care about. For Swift you can set the Swift error breakpoint, in Xcode 7.1 and higher.
I'm going to close this issue. Feel free to open another issue if you find a crasher that can be traced to Alamofire's code.
Also, thanks for the sample project. It made seeing this issue very easy. :+1:

Ah, got it. Thanks! That's pretty weird. So I guess Swift-only exception breakpoints in Swift-only projects?

Since Swift doesn't use exceptions (though the C++ that underlies much of its implementation might), you'd have to use the Swift error breakpoint like I said. That will break on any thrown error, including those wrapped from Objective-C NSErrors. Whether that's actually useful to you is up to you to determine.


Error when creating new file, but disappear on window reload

I am getting this error every time I created a new TypeScript file:
Parsing error: If "parserOptions.project" has been set for @typescript-eslint/parser, /home/tkesgar/git/charaverse/admiral-hipper/src/mods/abc.ts must be included in at least one of the projects provided.

The error disappears if I run "Developer: Reload Window".
The error does not appear if I deleted a TypeScript file and created a new file with the same name.
Visual Studio Code version:
Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:17:25.463Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 4.15.0-58-generic snap

Extension:
Name: ESLint
Id: dbaeumer.vscode-eslint
Description: Integrates ESLint JavaScript into VS Code.
Version: 1.9.1
Publisher: Dirk Baeumer
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

.eslintrc.json:
{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "tsconfig.json"
  },
  "plugins": [
    "@typescript-eslint"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "plugin:prettier/recommended",
    "prettier/@typescript-eslint"
  ]
}

package.json:
{
  "name": "admiral-hipper",
  "version": "0.0.0",
  "repository": "https://github.com/charaverse/admiral-hipper",
  "author": "Ted Kesgar<EMAIL_ADDRESS>  "license": "Apache-2.0",
  "scripts": {
    "start": "node dist/server.js",
    "watch:server": "nodemon",
    "watch:ts": "tsc --watch",
    "watch": "run-p watch:*",
    "lint": "eslint --ext '.js,.ts' 'src/**/*.ts'",
    "format": "prettier --write 'src/**/*.ts'",
    "test": "jest",
    "coverage": "jest --coverage",
    "clean": "del-cli dist/",
    "build": "tsc"
  },
  "dependencies": {
    "dotenv": "^6.2.0",
    "express": "^4.17.1",
    "pino": "^5.13.2"
  },
  "devDependencies": {
    "@types/dotenv": "^6.1.1",
    "@types/express": "^4.17.1",
    "@types/jest": "^24.0.18",
    "@types/node": "^12.7.2",
    "@types/pino": "^5.8.9",
    "@typescript-eslint/eslint-plugin": "^2.0.0",
    "@typescript-eslint/parser": "^2.0.0",
    "del-cli": "^2.0.0",
    "eslint": "^6.2.1",
    "eslint-config-prettier": "^6.1.0",
    "eslint-plugin-prettier": "^3.1.0",
    "husky": "^3.0.4",
    "jest": "^24.9.0",
    "lint-staged": "^9.2.3",
    "nodemon": "^1.19.1",
    "npm-run-all": "^4.1.5",
    "pino-pretty": "^3.2.1",
    "prettier": "1.18.2",
    "ts-jest": "^24.0.2",
    "typescript": "^3.5.3"
  },
  "jest": {
    "moduleFileExtensions": [
      "ts",
      "js"
    ],
    "testEnvironment": "node",
    "testMatch": [
      "<rootDir>/src/tests/**/*.ts"
    ],
    "transform": {
      "^.+\\.ts$": "ts-jest"
    }
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{js,ts}": [
      "eslint --fix",
      "prettier --write",
      "git add"
    ]
  }
}

Repository:
https://github.com/charaverse/admiral-hipper/tree/7315ff1144

The problem is that the new file is not on disk but we ask to validate it. I don't know if the TS parsing can be tweaked that way.
Another option would be to only validate files on disk in this setup. What exactly does parserOptions.project do?

I'm following the README from @typescript-eslint/parser when creating the config:

project - default undefined. This option allows you to provide a path to your project's tsconfig.json. This setting is required if you want to use rules which require type information. You may want to use this setting in tandem with the tsconfigRootDir option below.

I even get this type of error on my webpack.config.js file.

.eslintrc.json:
{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module",
    "project": "./tsconfig.json"
  },
  "env": {
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "prettier/@typescript-eslint",
    "plugin:prettier/recommended"
  ]
}

tsconfig.json:
{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules", "dist"]
}

@yegorgunko does this also happen when you validate from the terminal in the workspace folder ?

@dbaeumer well, on webpack.config.js - yes. But on the other files (in src for example) - no. Fixed by using .TS version of webpack config.

Setting the parser option "createDefaultProgram": true will circumvent the included check in typescript/eslint (with a performance penalty)
I suspect they might have a caching issue eg. if they store a map of all asts/files to lint. It could be that the map is not updated using watch when used in long running instances webpack/vs code eslint extension etc.

Setting the parser option "createDefaultProgram": true will circumvent the included check in typescript/eslint (with a performance penalty)

I tried this on the

We have the same problem on https://github.com/HospitalRun/hospitalrun-server/tree/next. If we rename a file or add a new one, eslint flags it as "not watched" by tsconfig.json project. We mitigated it adding "createDefaultProgram": true to our parserOptions.
The issue occurs only in VSCode: restarting VSCode fixes the problem and it works as expected in terminal.

This is being tracked here https://github.com/typescript-eslint/typescript-eslint/issues/864

@HosseinAgha thanks for pointing to the typescript eslint issue.

As state over there this is best fixed on the typescript eslint side since it affects all integrations of the parser (WebStorm, watch mode, ...)
I will mark the issue as upstream.

I've solved trouble used VSCode workspace setting eslint.options to add parserOptions.
"eslint.options": {
    "parserOptions": {
      "project": [
        "${workspaceFolder}/tsconfig.json"
      ],
    }
  }

Closing since the fix needs to come from the typescript plugin.

It looks like it already has been fixed on the typescript plugin side?
https://github.com/typescript-eslint/typescript-eslint/issues/864
https://github.com/typescript-eslint/typescript-eslint/pull/973
Is there anything that needs to be changed on the vscode-eslint side?

I've got the new parser 2.5.0 installed, and the error still occurs in VSC.