ORF finder?

We need to have an ORF finder for the transcriptome that is flexible to non-AUG start codons. Ideally this would also output ORFs in a gff format testable by extending check_gff_fasta.py
Similar or identical functionality is widely available, for example:

find_orfs_with_trans in Biopython tutorial
RiboCode finds orfs in the transcriptome in detectORF.py, I think after mapping from the genome?

We should have one that is easy to use and slots into the pipeline, with standard/well-defined/tested data formats.
@shahpr do you have some code handy, or a recommendation?
Related to:

#74 (gff specification to include unusual ORFs and alternative ORFs)
#25 (add functionality to check_gff_fasta.py)
#89 (because we need to calculate read frame for these ORFs too)

@ewallace opened branch orf-finder-92, containing test files for input and output of orf-finder
>data
  > orf_finder_test
    > uORFtest_yeast_4CDS_w_250utrs.fa
    > uORFtest_yeast_4CDS_w_250utrs.gff3
    > uORFtestresults_ATGGTGTTG_minLength10_yeast_4CDS_w_250utrs.gff3
    > uORFtestresults_ATGonly_minLength20_yeast_4CDS_w_250utrs.gff3

This tests functionality for a future script, find_uORFs, that would find upstream ORFs based on an existing main ORF / CDS annotation.

This relates to to @XUEXUEXUE0's project and we should come back to it once we can run riboviz on the cluster.

I think I'm almost finished this pipeline but I am not sure that which command line  parameters we need. I added a few simple parameter.
Users can use
python uORF_finder.py --fasta uORFtest_yeast_4CDS_w_250utrs.fa --gff3 uORFtest_yeast_4CDS_w_250utrs.gff3 --output test2.gff3 --min_length 10
The ouput file and code are on https://github.com/riboviz/riboviz/tree/orf-finder-92/data/orf_finder_test
Do I need to add more parameters in command line? What else needs to be improved in the output file?

One note for when this script is complete, it's maybe worth moving it into the folder with the rest of the python scripts and tools?  Currently it's in the data folder, which I wouldn't expect, and moving it to somewhere like riboviz/riboviz/tools/ would make more sense I think.

This is great progress! Following today's dev meeting, and a quick review of the code, some suggestions as to how to make further progress:

we need an input parameter start_codons, with default value ATG.
also stop_codons, with default value TAA,TGA,TAG (as a string? I don't know)
I suggest that min_length is the minimum ORF length (in codons/amino acids) returned. So a candidate ATGAAATAA would have length 2 and not be included.
In the current code min_length, protein_length, and treshold are all used and I'm confused, could we simplify that?
please give variables such as list1 and list2 more informative names
also test on the "simpler" version with min_length=20, and only ATG as the start codon.
Does this answer questions about command-line parameters?
@XUEXUEXUE0 to write up a text description of the task and its proposed solution to include in her MSc dissertation
include a picture of the intended results. It may help to look at Nicky Whiffin's ORF animation example
include pseudocode that describes overall how the ORF finder works.
check output "by eye", loading both sequence and annotation in a genome browser such as IGV
comparing text files (gff outputs) with diff. Currently this would say every line is different because riboviz source replaces ew_manual, and the _uORF is not in the feature name.
comparing tabular data by loading to R (read_tsv), then sorting, then asking which names/starts/stops are consistent.
use one of these approaches to write a unit test for the function, consulting with @mikej888 and the developer guide
check output automatically that the uORFs (and NTEs) have start and stop codons in expected places, probably by modifying riboviz.check_fasta_gff.py script. Related to issue #25.
then we test on other/larger data.

Would it be helpful to have a smaller function that just finds the next position of a codon from a list?
For example:
find_next_string_pos(string_vector, start_pos, target_list)
With example:
find_next_string_pos( ["ATG", "AAA", "TGA"], 1, ["AAA"]) = 2
Then this could be used to find the next in-frame start codon, with input target_list = ["ATG"], or the next in-frame stop codon, with input target_list = ["TGA", "TAG", "TAA"]. To find an ORF from a vector of codons, the stop codon would have to be searched for starting at the position one after that returned by the previous start codon.

@XUEXUEXUE0 ... you'll find it easier to write unit tests for your script if you refactor your script to ensure that all the functionality is wrapped within functions. These functions can then each have isolated tests for them. An initial refactoring would be into something like:

parse_command_line_arguments: Set up argparse.ArgumentParser() and return parser.parse_args().
find_orfs: Find the ORFs. This function includes the code to create the GFF database, create the position_dict and to iterate through the keys and FASTA records i.e. it does everything except parse the command-line arguments. This function would take the arguments you extract from the command-line i.e. myfasta, mygff2, output_file, min_length, start, stop.
invoke_find_orfs: the function for the command-line script. This function calls parse_command_line_arguments, extracts the values from the arguments, and finds the ORFs by calling find_orfs.

The script should also include a condition to check if the script is being run as a command-line script or is being imported. If it is being run as a command-line script then it calls invoke_find_orfs:
if __name__ == "__main__":
    invoke_find_orfs()

This style of design means that any test script can import uORF_finder.py and test its functions without the script itself being run as if it was a command-line function. For an example of this style of design see:

https://github.com/riboviz/riboviz/blob/master/riboviz/tools/demultiplex_fastq.py - this is the command-line tool for demultiplexing FASTQ files with the if block plus the command-line parsing functions.
https://github.com/riboviz/riboviz/blob/master/riboviz/demultiplex_fastq.py - this is the actual functions that do the demultiplexing (i.e. everything except the code to parse the command-line functions).
https://github.com/riboviz/riboviz/blob/master/riboviz/test/test_demultiplex_fastq.py - these are the unit tests for the demultiplex_fastq.py functions.

You wrote that:

My initial idea is to create simple input .fasta file and .gff3 first.  Then create a test output .gff3 file. Finally check if the output .gff3 file we create is equal to the .gff3 file produced by the script using assert statement. Is my idea correct and reasonable?

This could be the first test function written for your script. A test function would invoke find_orfs, load output_file, load your test .gff3 file then compare their contents. As .gff3 files are tab-separated values files you can load these as Pandas data frames then compare them using pandas.DataFrame.equals. For example:
import pandas as pd

assert data1.equals(data2)

An approach more in the spirit of unit testing is to use pandas.testing.assert_frame_equal. For example:
from pandas.testing import assert_frame_equal

assert_frame_equal(data1, data2)

As an example:
>>> import pandas as pd
>>> from pandas.testing import assert_frame_equal
>>> data1 = pd.read_csv("data/yeast_CDS_w_250utrs.gff3", sep="\t", comment="#")
>>> data2 = pd.read_csv("data/yeast_CDS_w_250utrs.gff3", sep="\t", comment="#")

These are the same file so the contents are expected to be equal:
>>> assert_frame_equal(data1, data2)

There is no exception so that are equal.
Now load a file we know to be different and try again:
>>> data3 = pd.read_csv("data/yeast_features.tsv", sep="\t", comment="#")
>>> assert_frame_equal(data1, data3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3\lib\site-packages\pandas\util\testing.py", line 1458, in assert_frame_equal
    '{shape!r}'.format(shape=right.shape))
  File "C:\Anaconda3\lib\site-packages\pandas\util\testing.py", line 1094, in raise_assert_detail
    raise AssertionError(msg)
AssertionError: DataFrame are different

DataFrame shape mismatch
[left]:  (17435, 9)
[right]: (5293, 8)

This is what we expect. If this happened within a pytest function then the test would fail as we would want it to.
Different test functions can call find_orfs with different input files and check that the contents of output_file in each case are as expected.
Once you have an initial set of tests for find_orfs you could refactor find_orfs into additional functions. For example:

create_gff_db: Create the GFF database.
create_position_dict: Create the positions_dict dictionary.
process_fasta_records: Iterate through the keys and FASTA records and checks if key == record.id and, if so, call a new process_fasta_record function (see below).
process_fasta_record: Process a matching FASTA record. This function includes the contents of the if key == record.id block and call a new create_fasta_record function (see below) then append the record to the output file.
create_fasta_record: Create a new FASTA record. This function includes everything from seq = record.seq to rec.features = [feature] and returns rec.

find_orfs can then be refactored to call create_gff_db, create_position_dict, process_fasta_records. As its arguments would not change, the unit tests you have already written could be used to test that your refactoring did not introduce any bugs.
You could then add tests for each additional function above.
You could also write tests for getORF. This does not need any files. Test functions for getORF can give getORF values for its arguments and then check that the dictionary of lists it returns has the expected values. An initial set of tests could be:

Give getORF a sequence seq, and end_UTR5 and end_CDS values such that an ORF of type "uORF" is found and returned.
Give getORF a sequence seq, and end_UTR5 and end_CDS values such that an ORF of type "CDS_NTE" is found.
Give getORF a sequence seq, and end_UTR5 and end_CDS values such that an ORF of type "overlap_UORF" is found.
Give getORF a sequence seq, and end_UTR5 and end_CDS valuess such that no ORF is found.

Each test function checks that the values in the list (length, start position, end position, type, name) are as expected. For the last option above no values would be expected.
The contents of the code.docx file you emailed could be added as comments to the code to document what functions do, and their argument and return types. See  https://github.com/riboviz/riboviz/blob/master/riboviz/demultiplex_fastq.py for examples of a format to use.

I agree. The crucial functionality is in create_position_dict for finding the actual ORFs. The rest is input/output handling. The functionality to find ORFs in a sequence (isn't that create_position_dict?) is independent of the functionality to filter and annotate them based on position relative to the CDS. So I'd suggest, first find ORFs, second classify as upstream/overlapping/NTE/whatever.

@mikej888  @ewallace Thank you!
Commit bc2c2a5 refactor the original code. The new script fixes the bug that could generate inframe stop codons and add the function which find the longest orf when the orf have the same stop codon but different start codon. The output of the new script is equal to the test which made by Edward now.
To do:

add comments to the script

write tests for the script

make a flowchart for the script

Here is my flowcharts for the whole script and the core function of the script. Hope these make my code easier to understand

Great start! For the overall flow for the "whole script", I would include "find out longest ORFs" in the "identify all ORFs" step.

Running the current code...
$ python riboviz/tools/uorf_finder.py --fasta data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.fa \
  --gff3 data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.gff3 \
  --output output_atg20.gff3 --new_fasta output_atg20.fasta \
  --min_length 20
ModuleNotFoundError: No module named 'BCBio'

bcbio-gff
$ pip install bcbio-gff
Successfully installed bcbio-gff-0.6.6

Use Edward's inputs:
uORFtest_yeast_4CDS_w_250utrs.fa
uORFtest_yeast_4CDS_w_250utrs.gff3

Try to replicate Edward's output uORFtestresults_ATGonly_minLength20_yeast_4CDS_w_250utrs.gff3:
$ python riboviz/tools/uorf_finder.py --fasta data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.fa \
  --gff3 data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.gff3 \
  --output output_atg20.gff3 --new_fasta output_atg20.fasta \
  --min_length 20

$ cat output_atg20.gff3
YAL038W	riboviz	uORF	109	183	.	+	.	Name=YAL038W_uORF_109;frame=1;start_codon=ATG
YOR303W	riboviz	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;frame=3;start_codon=ATG
YOR335C	riboviz	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;frame=2;start_codon=ATG

$ cat data/orf_finder_test/uORFtestresults_ATGonly_minLength20_yeast_4CDS_w_250utrs.gff3
##gff-version 3
##source-ew-manual Edward Wallace made this by hand
##to test upstream ORF finders with ATG starts and 20-codon minimum
## find_uORFs --start_codons ATG --min_length 20 --fasta uORFtest_yeast_4CDS_w_250utrs.fa --gff uORFtest_yeast_4CDS_w_250utrs.gff3
##date 2019-31-10
YAL038W	ew-manual	uORF	109	183	.	+	.	Name=YAL038W_uORF_109;start_codon=ATG;
YOR303W	ew-manual	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;start_codon=ATG;
YOR335C	ew-manual	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;start_codon=ATG;

Compare to Siyin's uORFoutput_ATGonly_minLength20_yeast_4CDS_w_250utrs.gff3:
$ cat data/orf_finder_test/uORFoutput_ATGonly_minLength20_yeast_4CDS_w_250utrs.gff3
YAL038W	riboviz	uORF	109	183	.	+	.	Name=YAL038W_uORF_109;frame=0;start_codon=ATG
YOR303W	riboviz	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;frame=2;start_codon=ATG
YOR335C	riboviz	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;frame=1;start_codon=ATG

frame values differ (1-indexed vs. 0-indexed). @ewallace Which should it be?
Check output FASTA file:
$ cat output_atg20.fasta
>YAL005C <unknown description>
TCCATCGGCGGCAAAAGGGAGAGAAAGAACCCAAAAAGAAGGGGGGCCATTTAGATTAGC
...
CGTTGAAGAAGTTGATTAA
>YAL038W <unknown description>
AAAAAAAAGGCTCGCCATCAAAACGATATTCGTTGGCTTTTTTTTCTGAATTATAAATAC
...
CTCTACCGTTTAA
>YOR303W <unknown description>
GAACTATAACACATAGATACACTCGAACATCTAATTGTTTAAATACTGCAAAGAATACAA
...
GAGTATAAATGTTACTAAGTTGGCCAAGGAAAGAGTGTTGTTCTAA
>YOR335C <unknown description>
GGCCGTTTCTTTTTTCTCTTTTTTTTCATCCGCTCGATGGATGATGAGTAAAACAAGAAA
...
CATTTAA

@ewallace Remove <unknown description> or replace with...?
Tthe output FASTA file has records corresponding to all the sequences from the input FASTA file:
$ grep \> data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.fa
>YAL005C
>YAL038W
>YOR303W
>YOR335C

@ewallace Should YAL005C be there? It is not in the output GFF file.
Running with --min_length 10 (instead of 20) gives produces an identical FASTA file as above:
$ python riboviz/tools/uorf_finder.py --fasta data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.fa \
  --gff3 data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.gff3 \
  --output output_atg10.gff3 --new_fasta output_atg10.fasta --min_length 10

$ cat output_atg10.gff3
YAL005C	riboviz	uORF	103	132	.	+	.	Name=YAL005C_uORF_103;frame=1;start_codon=ATG
YAL038W	riboviz	uORF	109	183	.	+	.	Name=YAL038W_uORF_109;frame=1;start_codon=ATG
YOR303W	riboviz	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;frame=3;start_codon=ATG
YOR335C	riboviz	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;frame=2;start_codon=ATG

$ cat output_atg10.fasta
>YAL005C <unknown description>
TCCATCGGCGGCAAAAGGGAGAGAAAGAACCCAAAAAGAAGGGGGGCCATTTAGATTAGC
...
CGTTGAAGAAGTTGATTAA
>YAL038W <unknown description>
AAAAAAAAGGCTCGCCATCAAAACGATATTCGTTGGCTTTTTTTTCTGAATTATAAATAC
...
CTCTACCGTTTAA
>YOR303W <unknown description>
GAACTATAACACATAGATACACTCGAACATCTAATTGTTTAAATACTGCAAAGAATACAA
...
GAGTATAAATGTTACTAAGTTGGCCAAGGAAAGAGTGTTGTTCTAA
>YOR335C <unknown description>
GGCCGTTTCTTTTTTCTCTTTTTTTTCATCCGCTCGATGGATGATGAGTAAAACAAGAAA
...
CATTTAA

$ cmp output_atg10.fasta  output_atg20.fasta
$ echo $?
0

Try to replicate Edward's output uORFtestresults_ATGGTGTTG_minLength10_yeast_4CDS_w_250utrs.gff3:
$ python riboviz/tools/uorf_finder.py --fasta data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.fa \
    --gff3 data/orf_finder_test/uORFtest_yeast_4CDS_w_250utrs.gff3 \
    --output output_atggtgttg_10.gff3 --new_fasta output_atggtgttg_10.fasta \
    --min_length 10 --start_codons ATG GTG TTG
$ cat output_atggtgttg_10.gff3
YAL005C	riboviz	uORF	100	132	.	+	.	Name=YAL005C_uORF_100;frame=1;start_codon=TTG
YAL005C	riboviz	uORF	122	181	.	+	.	Name=YAL005C_uORF_122;frame=2;start_codon=TTG
YAL038W	riboviz	uORF	64	183	.	+	.	Name=YAL038W_uORF_64;frame=1;start_codon=TTG
YAL038W	riboviz	overlap_uORF	202	258	.	+	.	Name=YAL038W_overlap_uORF_202;frame=1;start_codon=TTG
YAL038W	riboviz	uORF	185	238	.	+	.	Name=YAL038W_uORF_185;frame=2;start_codon=TTG
YOR303W	riboviz	uORF	35	124	.	+	.	Name=YOR303W_uORF_35;frame=2;start_codon=TTG
YOR303W	riboviz	CDS_NTE	200	1486	.	+	.	Name=YOR303W_CDS_NTE_200;frame=2;start_codon=TTG
YOR303W	riboviz	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;frame=3;start_codon=ATG
YOR335C	riboviz	uORF	145	243	.	+	.	Name=YOR335C_uORF_145;frame=1;start_codon=GTG
YOR335C	riboviz	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;frame=2;start_codon=ATG
YOR335C	riboviz	CDS_NTE	203	3127	.	+	.	Name=YOR335C_CDS_NTE_203;frame=2;start_codon=TTG

$ cat data/orf_finder_test/uORFtestresults_ATGGTGTTG_minLength10_yeast_4CDS_w_250utrs.gff3
##gff-version 3
##source-ew-manual Edward Wallace made this by hand
##to test upstream ORF finders with ATG,GTG,TTG starts and 10-codon minimum
## find_uORFs --start_codons ATG,GTG,TTG --min_length 10 --Ntermexts TRUE --fasta uORFtest_yeast_4CDS_w_250utrs.fa --gff uORFtest_yeast_4CDS_w_250utrs.gff3
##date 2019-31-10
YAL005C	ew-manual	uORF	100	132	.	+	.	Name=YAL005C_uORF_100;start_codon=TTG;
YAL005C	ew-manual	uORF	122	181	.	+	.	Name=YAL005C_uORF_122;start_codon=TTG;
YAL038W	ew-manual	uORF	64	183	.	+	.	Name=YAL038W_uORF_64;start_codon=TTG;
YAL038W	ew-manual	uORF	185	238	.	+	.	Name=YAL038W_uORF_185;start_codon=TTG;
YAL038W	ew-manual	overlap_uORF	202	258	.	+	.	Name=YAL038W_uORF_202;start_codon=TTG;
YOR303W	ew-manual	uORF	35	124	.	+	.	Name=YOR303W_uORF_35;start_codon=TTG;
YOR303W	ew-manual	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;start_codon=ATG;
YOR303W	ew-manual	CDS_NTE	200	250	.	+	.	Name=YOR303W_NTE_200;start_codon=TTG;
YOR335C	ew-manual	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;start_codon=ATG;
YOR335C	ew-manual	uORF	145	243	.	+	.	Name=YOR335C_uORF_145;start_codon=GTG;
YOR335C	ew-manual	CDS_NTE	203	250	.	+	.	Name=YOR335C_NTE_145;start_codon=TTG;

Order is different and there are two lines with differing values:
YOR303W	ew-manual	CDS_NTE	200	250	.	+	.	Name=YOR303W_NTE_200;start_codon=TTG;

vs:
YOR303W	riboviz	CDS_NTE	200	1486	.	+	.	Name=YOR303W_CDS_NTE_200;frame=2;start_codon=TTG

and:
YOR335C	ew-manual	CDS_NTE	203	250	.	+	.	Name=YOR335C_NTE_145;start_codon=TTG;

vs:
YOR335C	riboviz	CDS_NTE	203	3127	.	+	.	Name=YOR335C_CDS_NTE_203;frame=2;start_codon=TTG

@ewallace: Why might this discrepancy arise? Does it relate to the --Ntermexts TRUE in your GFF file? There is no corresponding flag within uorf_finder.py.
## find_uORFs --start_codons ATG,GTG,TTG --min_length 10 --Ntermexts TRUE --fasta uORFtest_yeast_4CDS_w_250utrs.fa --gff uORFtest_yeast_4CDS_w_250utrs.gff3

Compare to Siyin's uORFoutput_ATGGTGTTG_minLength10_yeast_4CDS_w_250utrs.gff3:
$ cat data/orf_finder_test/uORFoutput_ATGGTGTTG_minLength10_yeast_4CDS_w_250utrs.gff3
YAL005C	riboviz	uORF	100	132	.	+	.	Name=YAL005C_uORF_100;frame=0;start_codon=TTG
YAL005C	riboviz	uORF	122	181	.	+	.	Name=YAL005C_uORF_122;frame=1;start_codon=TTG
YAL038W	riboviz	uORF	64	183	.	+	.	Name=YAL038W_uORF_64;frame=0;start_codon=TTG
YAL038W	riboviz	overlap_uORF	202	258	.	+	.	Name=YAL038W_overlap_uORF_202;frame=0;start_codon=TTG
YAL038W	riboviz	uORF	185	238	.	+	.	Name=YAL038W_uORF_185;frame=1;start_codon=TTG
YOR303W	riboviz	uORF	35	124	.	+	.	Name=YOR303W_uORF_35;frame=1;start_codon=TTG
YOR303W	riboviz	CDS_NTE	200	1486	.	+	.	Name=YOR303W_CDS_NTE_200;frame=1;start_codon=TTG
YOR303W	riboviz	uORF	117	194	.	+	.	Name=YOR303W_uORF_117;frame=2;start_codon=ATG
YOR335C	riboviz	uORF	145	243	.	+	.	Name=YOR335C_uORF_145;frame=0;start_codon=GTG
YOR335C	riboviz	uORF	41	169	.	+	.	Name=YOR335C_uORF_41;frame=1;start_codon=ATG
YOR335C	riboviz	CDS_NTE	203	3127	.	+	.	Name=YOR335C_CDS_NTE_203;frame=1;start_codon=TTG

Again frame values differ (1-indexed vs. 0-indexed).

This is interesting but low-priority, because we don't need an ORF finder for ribosome profiling analysis as envisaged for a paper. Moving to "to do", reconsider when we have a paper submitted or another pressing need to find ORFs.

This is interesting but low-priority, because we don't need an ORF finder for ribosome profiling analysis as envisaged for a paper. Moving to "to do", reconsider when we have a paper submitted or another pressing need to find ORFs.


Are the united IMU messages wrong? [branch: development] [D435i]

Hi realsense team,
First of all, thanks again for pushing the update to the development branch that allows publishing IMU data for the D435i so quickly. (#518)
Upon closer inspection of the IMU messages and the code that is publishing it i noticed the following:
The logic that unites imu messages is wrong IMO. If I'm not mistaken the current implementation does the following: If there is an imu callback it distinguishes accel/gyro types, and then just updates the gyro or accel part of the imu message and publishes it with the timestamp of that frame/measurement.
This leads to IMU messages being published at accel_fps + gyro_fps, which not only contain the same measurements several times, but the timestamp in the IMU message header corresponds only to one of the samples, either gyro or accel, never both (I guess unless the samples happen to fall on the same timestamp every now and then). Only the measurement of the most recent stream update changes.
For a gyro @ 400Hz and accel @ 250Hz it publishes messages at 650hz.
subscribed to [/camera/imu]
average rate: 649.598

Here is an example of three consecutive IMU messages, I removed all the irrelevant parts:
---
header:
  seq: 2773
  stamp:
    secs:<PHONE_NUMBER>
    nsecs: 595507383
angular_velocity:
  x: -0.0
  y: 0.00174532923847
  z: 0.0069813169539
linear_acceleration:
  x: -1.01412665844
  y: 1.88056492805
  z: 9.58005046844
---
header:
  seq: 2774
  stamp:
    secs:<PHONE_NUMBER>
    nsecs: 597342491
angular_velocity:
  x: -0.0
  y: 0.00174532923847
  z: 0.0069813169539
linear_acceleration:
  x: -0.974743068218
  y: 1.90025663376
  z: 9.56035804749
---
header:
  seq: 2775
  stamp:
    secs:<PHONE_NUMBER>
    nsecs: 598009348
angular_velocity:
  x: -0.0
  y: 0.0
  z: 0.00872664619237
linear_acceleration:
  x: -0.974743068218
  y: 1.90025663376
  z: 9.56035804749

Basically what's happening is the following:
   # IMU message
   # [timestamp, accelerometer measurements, gyroscope measurements]
   [t_1, meas_acc_t_1, meas_gyr_t_0],
   [t_2, meas_acc_t_2, meas_gyr_t_0]
   [t_3, meas_acc_t_2, meas_gyr_t_3]

I tried to create a visual-inertial map with maplab, but it was very unstable. After discovering this IMU issue, I implemented a rather hacky fix that takes the slower signal and interpolates the faster signal to match it. The code is not pretty, probably drops some samples (the sliding window used to interpolate is only one measurement wide) and I'm not suggesting to merge it or anything, but with this fix I actually managed to do some visual inertial mapping using maplab. The code can be found here if anyone is interested.
What do you think? Maybe I'm missing something or it is a D435i specific issue, but as I see it the IMU messages of this node are wrong/redundant. Also, since the FPS profiles for gyro and accel are completely different, it's not possible to set the same sampling frequency, therefore even though I haven't tested all the configurations, I think this issue will be the same.

Hi,
You are completely right about the mechanism of combining together the IMU components. My thoughts were that it was better to duplicate information than to drop some of it off.
Maybe I was mistaken and that’s one of the reasons this is still in development and not set as a “release” yet.
I would like to check your code so if you could pass your testing app as well, it will give me something to work with.
Also, I’d like to take the opportunity and ask for more thoughts and insights about this topic that you or anybody else may have.

Hi @doronhi
Thanks for the quick reply.
The code can be found on our fork in the devel/d435i branch. The mapping framework I was refering to is maplab on the july release candidate branch. Here are the IMU sigmas, an example camera calibration and bash script I used for maplab.
Regarding my comment about dropping measurements: the logic I implemented of course drops data for the faster signal, but the resulting synchronized messages are stable at accel_fps. I just wanted to point out that I'm not 100% confident my code doesn't also drop an accel measurement every now and then, because it is only a very small sliding window.
From what I've seen with the estimator having a lower frequency but more accurate IMU measurements is better, which intuitively makes also more sense to me. But on the other hand, there are so many variables in an estimator like maplab, there might also be some other issues with the calibration or IMU parameters that I'm using.
Regarding how to best interpolate: interpolating based on more than two data points (polynomial or spline) could also improve the data, but also increases the delay. With the linear interpolation the messages shouldn't be delayed by more than one measurement of the slower signal. But maybe someone with more experience in signal processing and state estimation should answer this question :)
If a user is interested in the individual gyro/accel samples at the original frequency, as you know, the node can publish them separately as well.

@mfehr thanks for raising this!
I would suggest treating the accel and gyro as completely independent sensors and not duplicating or interpolating data.
When you have data from the accel, put -1 in element 0 of the gyro matrix and when you have data from the gyro, put -1 in element 0 of the accel matrix.
http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html

@eaglej
This option is already available in the driver, have a look here. But it's off by default and I haven't checked whether it follows the convention you mentioned. I agree it should probably be the default behavior, as it gives the user access to the raw, uninterpolated data.
I disagree about getting rid of the option to combine the messages altogether. There are many applications that by now treat the IMU sensor as combined sensor and therefore expect a combined set of measurements of gyro/accelerometer. Pushing the responsibility of writing an interface to combine the two separate streams to the end-user seems unnecessary, especially considering how easy it is to do this here, where the transmission over ROS hasn't yet added another level of difficulty in terms of dealing with delayed, dropped or reordered messages. Considering that the realsense is already providing a lot of processed data, such as point clouds and aligned images, having a stream of combined IMU messages seems like something you would expect to get as well :)

I add my version of interpolating the data here:
https://github.com/doronhi/realsense.git
I may merge it into the main repo sometimes next week. I didn't get around yet to check it using @mfehr setup so I didn't have a proper way of estimating its value yet. I plan to do it prior to it's release but you are more then welcome and I'd really appreciate it if you tried it out.
It has a latency of up to 1 message but as it has a frequency of almost twice the slow sensor (that is 2*250 = 500 Hz) I hope it's not too much.

Hello,
On the topic of united IMU message, I noticed that the orientation quaternion is set to all zeroes. Will there be an update soon to provide the actual orientation angles?

Ah I see. That works. Thanks @hvpandya!


Player goes very low at start of play state

Player shoots down to where it is clipping outside of the bottom bounds sometimes. Seems to happen the most when pressing play the millisecond the game opens

I haven't seen this in a while. Not sure if this is still a problem or not tbh

I still havent seen this in a while. I think this might have been resolved with all of the rest of the code changes since this issue was opened. Will reopen if this happens again


Scan breaks on certain docblocks in 0.7.0

Hi,
thanks for releasing v0.7.0. Unfortunately my setup breaks now because of some docblocks.
I include the vendor dir to be able to detect usages of external dependencies (this is much faster than in 0.6.0!). When scanning e.g. PHPUnit 9.1, this error occurs:
In Fqsen.php line 51:

  "\PHPUnit\Runner\DataProviderTestSuite " is not a valid Fqsen.

This can be traced back to the docblock of \PHPUnit\Runner\TestSuiteSorter::resolveDependencies where this line can be found:
@param array<DataProviderTestSuite|TestCase> $tests
The class DataProviderTestSuite is used in the class, but the docblock scanner doesn't seem to recognize this and assumes the class in the current namespace instead. The problem seems to be related to the union type declaration using |. When removing the second type in this and other lines it works again.
Similarly also primitive types fail, not only classes.
On the first glance this should be related to phpdocumentor/reflection-common, but when I exclude vendor from being scanned I can't reproduce in src. So I'm not sure what exactly is happening and am thankful for your help.
My depfile looks as follows:
# Summary:
# - The domain layer must not access other layers
# - The application layer may only access the domain layer
# - The infrastructure layer may access both domain and application layer, as well as external dependencies, but not dev dependencies
paths:
  - ./src
  - ./vendor
exclude_files:
layers:
  - name: Domain
    collectors:
      - type: className
        regex: .*\\Domain\\.*
  - name: Application
    collectors:
      - type: className
        regex: .*\\Application\\.*
  - name: Infrastructure
    collectors:
      - type: className
        regex: .*\\Infrastructure\\.*
  - name: External
    collectors:
      - type: directory
        regex: vendor/((?!psr/).)*$ # Treat everything in vendor except psr packages as external
  - name: ExternalDev # Dev dependencies. Make sure our production code does not use any dev classes as this would crash in production without any staging step noticing
    collectors:
      - type: directory
        regex: vendor/(doctrine/instantiator|myclabs/deep-copy|nikic/php-parser|phar-io/manifest|phar-io/version|phpdocumentor/reflection-common|phpdocumentor/reflection-docblock|phpdocumentor/type-resolver|phpspec/prophecy|phpspec/prophecy-phpunit|phpunit/php-code-coverage|phpunit/php-file-iterator|phpunit/php-invoker|phpunit/php-text-template|phpunit/php-timer|phpunit/php-token-stream|phpunit/phpunit|roave/security-advisories|sebastian/code-unit|sebastian/code-unit-reverse-lookup|sebastian/comparator|sebastian/diff|sebastian/environment|sebastian/exporter|sebastian/global-state|sebastian/object-enumerator|sebastian/object-reflector|sebastian/recursion-context|sebastian/resource-operations|sebastian/type|sebastian/version|symfony/debug-bundle|symfony/maker-bundle|symfony/phpunit-bridge|symfony/web-profiler-bundle|theseer/tokenizer|webmozart/assert|)/
ruleset:
  Domain: ~
  Application:
    - Domain
  Infrastructure:
    - Domain
    - Application
    - External
  External:
    - ExternalDev # Allow dependencies to access dev dependencies - this is not 100% safe, but I think it's not feasible otherwise.
  ExternalDev:
    - External

(the regex is created by a script in case you wonder - if the approach itself is wrong or overcomplicated please let me know)

Same here, type hint from code: array<string, array<int, array<int, int|string>>> and the output is:
In Fqsen.php line 51:

  [InvalidArgumentException]
  "\App\SharedKernel\Infrastructure\EventListener\int " is not a valid Fqsen.

Exception trace:
  at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/reflection-common/src/Fqsen.php:51
 phpDocumentor\Reflection\Fqsen->__construct() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php:67
 phpDocumentor\Reflection\FqsenResolver->resolvePartialStructuralElementName() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php:37
 phpDocumentor\Reflection\FqsenResolver->resolve() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:394
 phpDocumentor\Reflection\TypeResolver->resolveTypedObject() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:297
 phpDocumentor\Reflection\TypeResolver->resolveSingleType() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:239
 phpDocumentor\Reflection\TypeResolver->parseTypes() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:197
 phpDocumentor\Reflection\TypeResolver->parseTypes() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:480
 phpDocumentor\Reflection\TypeResolver->resolveCollection() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:229
 phpDocumentor\Reflection\TypeResolver->parseTypes() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:480
 phpDocumentor\Reflection\TypeResolver->resolveCollection() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:229
 phpDocumentor\Reflection\TypeResolver->parseTypes() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:480
 phpDocumentor\Reflection\TypeResolver->resolveCollection() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:229
 phpDocumentor\Reflection\TypeResolver->parseTypes() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/phpdocumentor/type-resolver/src/TypeResolver.php:148
 phpDocumentor\Reflection\TypeResolver->resolve() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/Resolver/TypeResolver.php:99
 SensioLabs\Deptrac\AstRunner\Resolver\TypeResolver->resolveString() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/Resolver/TypeResolver.php:90
 SensioLabs\Deptrac\AstRunner\Resolver\TypeResolver->resolvePHPStanDocParserType() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/Resolver/AnnotationDependencyResolver.php:67
 SensioLabs\Deptrac\AstRunner\Resolver\AnnotationDependencyResolver->processNode() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/AstParser/NikicPhpParser/ClassReferenceVisitor.php:136
 SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser\ClassReferenceVisitor->leaveNode() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:230
 PhpParser\NodeTraverser->traverseArray() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:91
 PhpParser\NodeTraverser->traverse() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/AstParser/NikicPhpParser/NikicPhpParser.php:77
 SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser\NikicPhpParser->parse() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/AstRunner/AstRunner.php:36
 SensioLabs\Deptrac\AstRunner\AstRunner->createAstMapByFiles() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/Analyser.php:35
 SensioLabs\Deptrac\Analyser->analyse() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/Console/Command/AnalyzeCommand.php:69
 SensioLabs\Deptrac\Console\Command\AnalyzeCommand->execute() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/symfony/console/Application.php:912
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/symfony/console/Application.php:264
 Symfony\Component\Console\Application->doRun() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/src/Console/Application.php:46
 SensioLabs\Deptrac\Console\Application->doRun() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/vendor/symfony/console/Application.php:140
 Symfony\Component\Console\Application->run() at phar:///usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac/deptrac.php:17
 require() at /usr/share/nginx/html/vendor/sensiolabs-de/deptrac-shim/deptrac:14

@umulmrum @kowalk Thanks for reporting so detailed. I could reproduce your exceptions and also could provide a fix.
Would it be possible you could prove #302 is working for you?
You will find a phar-file artifact in the build pipeline -> https://github.com/sensiolabs-de/deptrac/pull/302/checks?check_run_id=642148367
Thanks in advance!

I released a new version https://github.com/sensiolabs-de/deptrac/releases/tag/0.7.1

All seems to be working right now! Thanks :)


Please fix the bug that is causing the inability to update user profiles.  format: jpeg

Fixed in #24


Mouse click at bottom of 300 line file puts cursor there, but the viewport at the last position.

Open a large file (300 lines in my case), set the cursor at the top, scroll to the bottom and mouse click the line. The cursor point will be placed properly, but the viewport scrolls back to the last position of the cursor. Very reproducible.

I can see this happening even with smaller files.

I just downloaded the latest version and it has this issue much worse!  Moving the cursor with j/k to off the viewport will not scroll the viewport. If I scroll the viewport the edit/move the cursor with keyboard commands, the viewport goes back to the stuck position and the cursor is still on the line I wanted to edit, but I now can't see it.
When it gets stuck, I can do :wall a few times and it gets unstuck. But, it will get stuck again fairly quickly. I haven't been able to determine the action that gets the viewport stuck at one place.
The file just has to be larger than the viewing area. I was editing a 300 line file when I first noticed the issue.


YouTube Data API restriction gives error code 403

Hello guys. I built an app that makes use of YouTube Data API. When building, i discovered that if i restrict my API Key to Android applications, it gives me this error:-
{
"error": {
"code": 403,
"message": "Requests from this Android client application \u003cempty\u003e are blocked.",
"errors": [
{
"message": "Requests from this Android client application \u003cempty\u003e are blocked.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
But if i set restriction to "None", the API calls brings back a good JSON response. So i left application restriction at "None". Now i want to upload to Google Play Console and i get the alert to restrict my API.
Please, how do i handle this?

I was able to find a solution on stackoverflow by Ayman Al-Absi that shows you how to pass your SHA-1 certificate information:
https://stackoverflow.com/questions/39543105/youtube-api-key/39747334
I also added restrictions to my API key by providing my SHA-1 signing-certificate fingerprints on the Google APIs console.
Hopefully this helps.

I was able to find a solution on stackoverflow by Ayman Al-Absi that shows you how to pass your SHA-1 certificate information:
https://stackoverflow.com/questions/39543105/youtube-api-key/39747334
I also added restrictions to my API key by providing my SHA-1 signing-certificate fingerprints on the Google APIs console.
Hopefully this helps.


Service Fabric Application upgrade is triggered even with no changes to ARM template

According to the paragraph at https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-concept-resource-model#upgrade-service-fabric-application-using-azure-resource-manager, Service Fabric application upgrades should be only triggered if some specific changes are ported to the ARM template, including applicationTypeVersion.
For the sake of testing, I have successfully deployed a Service Fabric application via ARM template.
Now, can somebody explain why launching the exact same deployment when the application is already deployed to the cluster (with absolutely no changes neither to the code package, XML manifest files or ARM template) triggers an application upgrade on Service Fabric? Is there any other condition that is missing in the doc page that would trigger an upgrade? The expected behavior in case of a deployment of an application that already exists on the cluster with the same version is that it would be skipped, or better, the deployment on Azure side would still show up but on Service Fabric side no upgrade gets actually triggered (because, technically, there's nothing to upgrade).
Can you please provide any info that would help me troubleshoot this behavior? Thanks in advance.

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

ID: 332adf66-c461-392a-022c-6dc9e71fcf05
Version Independent ID: c5985abe-ddc1-11e8-a6dc-f86f76ec073b
Content: Azure Service Fabric application resource model
Content Source: articles/service-fabric/service-fabric-concept-resource-model.md
Service: service-fabric
GitHub Login: @athinanthny
Microsoft Alias: atsenthi

Thanks for the feedback! We are currently investigating and will update you shortly.

Actually I think I have figured this out: between the first and the second deployment, there was a change in the SF parameters values. According to what I observed, Service Fabric triggers an application upgrade if it detects changes in the parameters. Out of curiosity, I have tried re-deploying the same app with the exact same parameters, and this time the Azure deployment had basically no effect on the cluster, as expected.
Can you please confirm this is the case?

Yes, it is correct.
During an upgrade, Service Fabric compares the new application manifest with the previous version and determines which services in the application require updates. Service Fabric compares the version numbers in the service manifests with the version numbers in the previous version. If a service has not changed, that service is not upgraded.
Cluster upgrade: as your cluster is upgraded (SF version or configuration change), you will see the upgrade initiate, roll through each of your Upgrade Domains, and complete (or rollback).
Reference doc: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#upgrade-application-parameters-independently-of-version


Pause monitor on dashboard and status page

⚠ Please verify that this feature request has NOT been suggested before.

[X] I checked and didn't find similar feature request

🏷 Feature Request Type
Other
🔖 Feature description
When I pause a monitor, it's only on dashboard, not on status pages.
✔ Solution
Temporarily remove paused monitor from all status pages, and re-add on resume.
❓ Alternatives
Maybe add a special state on status page ("paused"), with no incidence for the general state ("All Systems Operational").
📝 Additional Context
No response

I would be fine with the paused monitors appearing on status pages but being greyed out.

And I would really like to have a "all systems operational" when I paused a check instead of causing a "partially operational"


how can I run the code of Tutorials and Examples

Hi,
I have read the Tutorials of this package, and found the example code here
https://rainymotion.readthedocs.io/en/latest/notebooks/nowcasting.html
but I can not found the data needed for the code, how can I get them?
Thanks,
Zhang

Dear Zhang,
Thank you for your interest in rainymotion.
In case you follow our installation instructions (https://rainymotion.readthedocs.io/en/latest/gettingstarted.html), you had to download all you need (including data) by cloning our main repo (https://github.com/hydrogo/rainymotion).
If you are interested only in data, you can download it directly from the rainymotion data folder (https://github.com/hydrogo/rainymotion/blob/master/data/data.h5). You can also find the RY data only on the DWD open data portal (https://opendata.dwd.de/weather/radar/radolan/ry/).
Best,
Georgy

Thanks for your answer, you are right.


Cannot install node-sass in any circumstance

I kind of feel like this is not the right place for this, but I tried everywhere else and to no avail. Perhaps somebody in charge of taking down things like these could take a look? Besides there is an similar issue here that is quite similar that is actually an issue.
I first encountered the issue when trying to use ionic and it needed  the dependency for its templates. Then when I tried to install node-sass with npm myself the issue persisted. This is on Windows 10 Version 1703,  both nodejs 6.11.3 and nodejs 8.4.0 tried out, ended up with same result. And VPN, http proxy were tried with no luck.  Basically, it's saying :

Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node"

when nothing is fiddled with ,it says :

connect ECONNREFUSED <IP_ADDRESS>:443

when using npm set config proxy,it says something like:

tunnel cannot be established

when using VPN,it waits forever at :

node scripts/install.js

or outputs the same as if nothing is fiddled with.
When reporting an bug, you must provide this information:

NPM version (npm -v): 5.3.0 with node latest(8.4.0), default version with node 6.11.3

Node version (node -v):LTS(6.11.3) and LATEST(8.4.0)

Node Process (node -p process.versions):

{ http_parser: '2.7.0',
node: '8.4.0',
v8: '6.0.286.52',
uv: '1.13.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.22.0',
openssl: '1.0.2l',
icu: '59.1',
unicode: '9.0',
cldr: '31.0.1',
tz: '2017b' }

Node Platform (node -p process.platform): win32

Node architecture (node -p process.arch): x64

node-sass version (node -p "require('node-sass').info"):  Error: Cannot find module 'node-sass'

npm node-sass versions (npm ls node-sass): `-- (empty)

and there is the output
---> npm install -g node-sass
C:\Users\rick\AppData\Roaming\npm\node-sass -> C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\bin\node-sass

><EMAIL_ADDRESS>install C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node":

connect ECONNREFUSED <IP_ADDRESS>:443

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

><EMAIL_ADDRESS>postinstall C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Program Files\Python36\python.EXE
gyp verb check python version `C:\Program Files\Python36\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.6.2\r\n"
gyp verb could not find "C:\Program Files\Python36\python.EXE". checking python launcher
gyp verb could not find "C:\Program Files\Python36\python.EXE". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python36\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rick\\AppData\\Roaming\\npm\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\rick\AppData\Roaming\npm\node_modules\node-sass
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\rick\AppData\Roaming\npm-cache\_logs\2017-09-10T18_52_13_062Z-debug.log

Well ECONNREFUSED is easy - you have configured npm to talk to the proxy at <IP_ADDRESS> (localhost) port 443 but the proxy does not seem to be active for this port. Please check proxy/VPN software configuration - port numbers must match.

But the thing is I don't have proxy configured. I tried npm config rm proxy,and npm config delete proxy, I even tried just go with it and set up a proxy then point npm to that proxy like I described above, nothing works.

And here is the powershell enviroment config just in case:
$reg = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
⚡ rick@DESKTOP-1NVA03E  ~  $settings = Get-ItemProperty -Path $reg                                                     12-09-2017  17:22
⚡ rick@DESKTOP-1NVA03E  ~  $settings.ProxyServer
<IP_ADDRESS>:1080                                                                                 12-09-2017  17:22
⚡ rick@DESKTOP-1NVA03E  ~  $settings.ProxyEnable
0

Look in your .npmrc since if it's hitting port 443, it's likely the https-proxy that's being hit.
Closing this though as it's an NPM config issue, not a node-sass one.


Store recent messages and expose as GET endpoint (/messages)

When a user connects for the first time, they do not have any context of any previous messages
The goal would be to store the latest X (as .env) amount of messages in SQLite DB
Expose a GET endpoint for the user to fetch recent messages

[x] Store messages in SQLite by:

[x] module hash
[x] module hash + chain

[x] Prune older messages by (X timestamp or X block number)
[x] Expose GET endpoint /messages to return all recent messages with params:

[x] filter by chain
[x] filter by module hash
[x] LIMIT
[x] DISTINCT by chain (only show 1 message per chain)
[x] SORT BY DESC as default (recent messages first)

Implemented


#104 feat: Added ranking by having image

Overview
Allow ranking by surau with images first for visual attraction.
Overlook
1 - With image ranking 🎉
Here's one with image ranking:

2 - Without image ranking 😢

Further info
Can be seen from the unit-test.
Added tiny bit of CSS to fix the view on md+ (tablet and above) screens. See comment:
https://github.com/farhan-helmy/ratemysurau/pull/106/files#r1312220940
Closes #104

Terbaik Zafran!


LDAP settings style is outdated

In a organization with LDAP settings, the styling (auth tab) is wrong:

Oh, while doing a refactor for #11729 I've found an elegant fix for this:

^ is this enough, @xavijam ? @azamorano have you ever seen this page? I have not. If this was the previous appearance, I'll just keep this.

Well, we have our great inputs and so on. Could we use them?

It's not meant to be editable. I mean, this is obviously super minor, I think that returning to the previous look and feel is good enough.

Non editable should be reflected as disabled inputs IMO

Agree with @saleiva. It should be easy @juanignaciosl, so don't worry about that.

I had never seen it before @juanignaciosl.


Add more indices to action table for speed improvements

without this a instance i do administrate run into timeout on try to load the landing page (when logged in) (sqlite).
and with mariadb the loading times of that page drop from 22s to 0.08s.

Sponsored by Kithara Software GmbH

TBH, this change doesn't look good to me.

It needs a migration
Most xorm: INDEX should be deleted, only keep CreatedUnix INDEX
I think actDashboardIndex.AddColumn("repo_id", "created_unix") should have the same result, while it makes smaller index data

well I do have real world data witch shows me that this fix it ...
... and xorm.Sync do autmatically generate or delete indexes

the query SELECT `action`.* FROM `action` INNER JOIN `repository` ON `repository`.id = `action`.repo_id WHERE user_id=? AND is_deleted=? ORDER BY `action`.`created_unix` DESC LIMIT 50 is the exact cause of the issue ... if it helps you

my manaull workaround is to exec: CREATE INDEX test_comb_1 ON action (repo_id,user_id,is_deleted,created_unix); after gitea has started

well I do have real world data witch shows me that this fix it ...

I totally agree that this change could fix, but it doesn't seem right.

the query SELECT `action`.* FROM `action` INNER JOIN `repository` ON `repository`.id = `action`.repo_id WHERE user_id=? AND is_deleted=? ORDER BY `action`.`created_unix` DESC LIMIT 50 is the exact cause of the issue ... if it helps you

For such query, it needs index repo_id, user_id, is_deleted, created_unix, but not what you proposed in this PR.

... and xorm.Sync do autmatically generate or delete indexes

I am not xorm expert, but IIRC every database change requires a migration. Maybe it should be clarified: to follow it or not. If not follow, whether there will be anything wrong.

We should remove all wrongly added index after the fields but only use the TableIndices method.

Looks it's not bad on MySQL8 and I don't know what's the result for mariadb.
EXPLAIN
SELECT `action`.* FROM `action` INNER JOIN `repository` ON `repository`.id = `action`.repo_id WHERE user_id=1 AND is_deleted=false ORDER BY `action`.`created_unix` DESC LIMIT 20

-> increase RAM and it works


x/build/maintner: GitHub issue events are not consistent with API values

Moved from #28226…
There are some issues that have events missing within the maintner corpus. This makes it impossible to create an accurate milestone burndown chart where you want to query for the state of an issue at a particular time window.
A few examples of issues in maintner that have incomplete event lists:
=== Issue events for golang.org/issues/28559
             labeled	milestone:         	label:Testing
             labeled	milestone:         	label:help wanted
             labeled	milestone:         	label:OS-OpenBSD
             labeled	milestone:         	label:Builders
             labeled	milestone:         	label:NeedsInvestigation
          milestoned	milestone:   Go1.12	label:

It does not record the final “closed” event: https://api.github.com/repos/golang/go/issues/28559/events
=== Issue events for golang.org/issues/28306
           mentioned	milestone:         	label:
          subscribed	milestone:         	label:
           mentioned	milestone:         	label:
          subscribed	milestone:         	label:
            assigned	milestone:         	label:
             labeled	milestone:         	label:Documentation
             labeled	milestone:         	label:NeedsInvestigation
          milestoned	milestone:   Go1.12	label:
             renamed	milestone:         	label:

The above event log is missing a few milestone-related events: https://api.github.com/repos/golang/go/issues/28306/events

@andybons Hi! I worked on the maintner previously. I'm happy to pick this up for investigation.

@andybons Hi. I opened a separate issue with the test coverage increase and the github throttle handling.
I searched for a long time, I believe it's either a race condition in sync logic, a timing issue, or github throwing some kind of error somewhere which is not being handled.
I created an issue which fixes the throttling which might fix this issue, but I ran out of ideas. Without logs that I could investigate on what's happening this is an insanely hard task with my code base knowledge.
Sorry, I couldn't help out. :/

Without logs that I could investigate on what's happening this is an insanely hard task with my code base knowledge.
Sorry, I couldn't help out.

Understandable, and no problem.
On the contrary, it is very helpful that you've investigated this far and shared your findings. Thank you very much, it is greatly appreciated!

@dmitshur Thank you! Happy that I could contribute something. 😊


CSS Networking.md

This change is intended to add additional details around permissions to view service tags.

@asudbring
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@mmadrigal98 @asudbring - i committed the tweaks. They don't change the meaning at all... just fix the NOTE formatting.

#sign-off


Minia University

Adding my university name to the reop to activate Jetbrains educational

@cs-EslamEzzat I am sorry, the domain mu.edu.eg is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


Bug: Unable to mock original mixin method in the component with Vue 3.

Describe the bug

I am trying to mock the mixins used in the Vue component by passing in a fake mixin under global.mixins. But it seems to be not working on the Component while on the child component I can see the mocked method.
No difference on switching from shallowMount to mount.
To Reproduce

common-chart.vue
<template>

    <widget-export-as-image @click="downloadAsImage" />

</template>

chart-mixin.vue

test.spec.js
import { shallowMount } from '@vue/test-utils';
import CommonChart from './common-chart';

const mockMixin = {
  created() {
    console.log('mock mixin created');
  },
  methods: {
    downloadAsImage() {
      console.log('mock mixin downloadAsImage');
    }
  }
};

let wrapper;

describe('Common chart', () => {
  it.only('testing mixins', async () => {
    wrapper = shallowMount(CommonChart, {
      props: {},
      global: {
        plugins: [],
        mocks: {},
        mixins: [mockMixin]
      }
    });
    await wrapper.vm.$nextTick();
    let widgetExportAsImageWrapper = wrapper.findComponent('widget-export-as-image-stub');
    console.log('Rendered HTML - \n', wrapper.html());

    wrapper.vm.downloadAsImage(); // Points to the original import
    widgetExportAsImageWrapper.vm.downloadAsImage(); // Points to the mocked mixin
  });
});

Test output
mock mixin created
mock mixin created
Original mixins created
mock mixin created
Rendered HTML -

  <widget-export-as-image-stub></widget-export-as-image-stub>

Original mixins downloadAsImage
mock mixin downloadAsImage

Expected behavior

wrapper.vm.downloadAsImage() should call to the mocked mixins method when invoked.
Related information:

  System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 8.48 GB / 15.38 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  npmPackages:
    @vue/test-utils: 2.4.6 => 2.4.6
    vitest: 1.6.0 => 1.6.0
    vue: 3.4.13 => 3.4.13

Hi @gsamal
If you are still encountering this issue, can you provide us a small repro online using https://stackblitz.com/github/vuejs/create-vue-templates/tree/main/typescript-vitest?file=src%2Fcomponents%2F__tests__%2FHelloWorld.spec.ts ?
It only takes a few minutes, and we'll be able to take a look

@cexbrayat here is the link to reproduce - https://stackblitz.com/edit/github-g3hyfh?file=src%2Fcomponents%2F__tests__%2FHelloWorld.spec.ts
Do note that the tests are passing but the last two consoles are not as expected.
From
    wrapper.vm.downloadAsImage(); // Points to the original import - Should be pointing to the mocked mixin???
    widgetExportAsImageWrapper.vm.downloadAsImage(); // Points to the mocked mixin


Add RFC for SDK example consolidation

This is an RFC outlining the changes to make awsdocs/aws-doc-sdk-examples the source of truth for the SDK's examples.
Rendered.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Can you elaborate on your proposed workflow to fix examples? I guess I can point to next for testing?


Remove glacier endpoint

This PR closes #296  by deleting glacier.py and glacier.html files entirely, removing the glacier import from routes/__init__.py, and by removing all references to the glaciology data from index.html and the README.md.
To test, run the flask application as described in README.md, and verify that the glaciology data is no longer referenced on the API index page and that a previously existing glacier endpoint (eg, http://localhost:5000/glacier/60/-144) now returns no data.

@Joshdpaul a lot of the permafrost files are caught up in this PR - did you branch this from main?


Fix htsjdk deprecation warnings.

@tomwhite thanks for cleaning up those warnings. I added one comment above. Otherwise looks good to me, feel free to merge.

Thanks for taking a look @AndreSchumacher!


Remove lodash.deepClone in favor of Object.assign

Removes a dependency in favor of a native equivalent!

Object.assign() creates a shallow copy as opposed to lodash.cloneDeep().
They would only be equivalent if all keys inside those objects are primitives, otherwise everything else (such as nested objects) will have the same reference.
This change may actually work, but really need to make sure that mutations arent performed on the cloned objects.

seems reasonable, thanks


Tests takes long time to complete

As the project is growing incredibly fast, tests needs a lot of time to complete, both on travis and local machine. We could try to investigate which tests takes most time, simplify and remove obsolete ones if needed.
It may not directly impact end user, but developer life would be much easier - I personally practice to run pytest before each push, just to make sure nothing is accidentally broken.
Possibly related with #2049 #2050 #2080

Have you tired running pytest on multiplecores? Any better?

Yes I did, it runs faster, but it isn't an ultimate solution - what if a developer posses a bit older hardware? Also, decreasing overall test time could speed up PR process as sometimes we wait for travis to complete.
It's better to try to find a memory leak before you buy new RAM stick!

Actually hours spent on searching for memory leak might be hundreds times more costly than RAM stick itself.
What's the total test time on your machine at this moment? With or without multiprocessing?

List of tests sorted by time taken:
https://gist.github.com/Pacu2/18f534e60e8ce8d10696927e36ed3ae1
On my Macbook Pro (i7, 4x up to 4.1Ghz / 16GB Ram) tests took 187s to execute without multiprocessing
And 71s with multiprocessing enabled
I don't necessary consider that slow, however looking at the above list, there is some place for improvements, not big, but still.

There is nothing anyone could do with it in short term, apart from minor tweaks.
I can think of one strategy to deal with problem in long term:

Write tests for new functionality / rewrites on lower level, mocking external side effects and perform only actions related to single test assertion
Limit number of tests using views as entry point and treat them as integration tests, at this level check flow, not details. Do not perform those tests to every branching in code logic!
Divide tests into separate pytest baskets, UT in one for quick execution, developer can run this basket on every source file changed and it is almost instantaneous. Integration tests moved to separate basket are run before pushing and obviously on CI
promote TDD practice among project contributors, it is self optimizing way of keeping tests quick and to the point
every major release (month or two) should be reviewed for test run time and sanity

Tests are taking a lot of time because of migrations and db population. I have a i3-2700k with sticks of DDR3 1700 MHz. Tests are taking 2 or 3 minutes if I recall correctly.
The longest parts are db operations and async tests (if I recall correctly again).
Tests are taking 20 seconds to start to run on my side (migrate + populate).
Yesterday, I noticed having a CPU with a lot of threads makes the tests run really, really smoothly. I was on a 16 threads server if I recall correctly. Test took less than one minute, maybe 40 or 50 seconds.

@akjanik  put this in your test settings.
PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.MD5PasswordHasher',
]
DEBUG=False

I've reduced execution time from 250 sec to 120 sec.
pytest -n=auto --ds "tests.settings" --reuse-db tests/

@korycins Should we add the above to our test settings as default?

@akjanik put this in your test settings.
PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.MD5PasswordHasher',
]
DEBUG=False

I've reduced execution time from 250 sec to 120 sec.
pytest -n=auto --ds "tests.settings" --reuse-db tests/

Thinking back to this reply, you could add --reuse-db to PYTEST_ADDOPTS if you are running tests directly from a software/tool instead of a command line.
You would have:
export PYTEST_ADDOPTS='--reuse-db'

It will invoke --reuse-db by default in tests. Thus would make tests faster to run as they won't have to reapply migrations.
On Linux you would add that export to .bashrc. On MacOS you would run launchctl setenv PYTEST_ADDOPTS --reuse-db.
Then you would restart you shell and/or software (especially on Mac OS).
For example on PyCharm I use launchctl setenv PYTEST_ADDOPTS "-n 0 --reuse-db" first and foremost to be able to run the tests as PyCharm does not support pytest-xdist, then to reuse the db.
The only issue, is when you rewrite some migrations of course. In that case, you have to change the environment variable's value to recreate the db (or manually delete the test database).
Thanks @korycins!


Attribute ViewModelGenerateFactory ignores IEventAggregator ConstructorArgument

When using attribute ViewModelGenerateFactory together with IEventSubscriber mvvmgen does not add the IEventAggregator constructor argument to the factory class.
Sample ViewModel code
using SampleApp.Events;
using MvvmGen;
using MvvmGen.Events;
using System;

namespace SampleApp.ViewModel
{
    [ViewModelGenerateFactory]
    [ViewModel]
    public partial class SampleViewModel : IEventSubscriber<SampleEvent>
    {
        public void OnEvent(SampleEvent eventData)
        {
            throw new NotImplementedException();
        }
    }
}

The generated code looks as follows:
//   Generator version: 1.1.5
// </auto-generated>
using MvvmGen.Commands;
using MvvmGen.Events;
using MvvmGen.ViewModels;

namespace SampleApp.ViewModel
{
    partial class SampleViewModel : global::MvvmGen.ViewModels.ViewModelBase
    {
        public SampleViewModel(MvvmGen.Events.IEventAggregator eventAggregator)
        {
            eventAggregator.RegisterSubscriber(this);
            this.OnInitialize();
        }

        partial void OnInitialize();
    }

    public interface ISampleViewModelFactory : IViewModelFactory<SampleViewModel> { }

    public class SampleViewModelFactory : ISampleViewModelFactory
    {
        public SampleViewModelFactory()
        {
        }

        public SampleViewModel Create() => new SampleViewModel();
    }
}

As you can see the factory tries to call an empty constructor, whereas the constructor needs the IEventAggregator to register the event he inherits with IEventSubscriber.

Temporary workaround for this issue will be to inject the IEventAggregator manually:
using SampleApp.Events;
using MvvmGen;
using MvvmGen.Events;
using System;

namespace SampleApp.ViewModel
{
    [Inject(typeof(IEventAggregator))]
    [ViewModelGenerateFactory]
    [ViewModel]
    public partial class SampleViewModel : IEventSubscriber<SampleEvent>
    {
        public void OnEvent(SampleEvent eventData)
        {
            throw new NotImplementedException();
        }
    }
}

Proposal Solution https://github.com/thomasclaudiushuber/mvvmgen/commit/6259314d2f70fe1ccac9b0bc9a4df9e7296e1473
Actaully the proposal is not tested, because I don't have the time right now to setup mvvmgen build pipeline to use the new buold in my project or to read into the testsetup.

Thank you @Daimonion1980.
I'm out this week, will take a look at it when it comes to the end of November. On another thread, I also owe you a validation sample. That will come as well.

Thank you @Daimonion1980 for reporting this. Will be part of the next release.


Attain Feature Parity with the Favorite Item Tab module

Allow users to override the default filtering behavior of the actions logic for their actor, selecting things to show up on the actions tab and selectively hiding things from the actions tab that would normally appear there.

Coming in 3.0.0


feat: add native-tls / rustls-tls feature flags.

Added feature flags to switch TLS implementation, this should be a non-breaking change as the default is still native-tls.

Thanks for the contribution!
Small nitpick, would you mind adding an entry to the Unreleased section of CHANGELOG.md?

Close in favour of https://github.com/TrueLayer/reqwest-middleware/pull/7


Update configurator to use the Yaml Parser class

Closes #93 Update configurator to use the Yaml Parser class instead of the static method Yaml::parse which is deprecated.

The "fixes ..." task association notation doesn't work, when used in title. Instead you should add Closes #93 in PR description.

Thanks for the tip. I guess it only works when closing PRs in the same repo: https://help.github.com/articles/closing-issues-via-commit-messages/

FYI: this requires #76 as dependencies are currently broken.

Closing this pull request, this repo is not going anywhere. The changes will be available here: https://github.com/onema/php-coveralls/tree/yaml-parser, and all important pull request will be available in the master branch if anyone want's to use that instead.

Sad to hear that you are closing the PRESIDENT because it's absolutely valid one. Please try contacting repository owner / maintainers directly via email / twitter / etc. Maybe they don't have too much free time to actively support repo at the moment or are looking for maintainers.

I did contact @satooshi... Unfortunately his response didn't give me any indication weather or not this is going to be taken care of :disappointed:.
I'll create a new PR from the branch containing this change.


Ask some questions

It seems that the installation of Packmol requires gfortran, at least in my case. So, should the compilation steps be as follows?

sudo apt-get install gfortran
tar -xvzf packmol-20.14.2.tar.gz
cd packmol
make

Please confirm whether this is correct. Never use this package before.

How can I test my implementation using your example?
I noticed there is a test case available where I can incorporate my implementation. However, how can I obtain accuracy and performance scores?

For question 1 : Yes, you should install gfortran first. I forget to write down this because I always install those essentials after installing the OS.
About Q2, you can not test it for now by using our tools. Because the profiling and scoring platform is provided by Peking University supercomputing team and they are working on the backend. You can test it on your own PC and if you have very urgent requirement(ARM CPU or GPU), you can directly ask organizer in the WeiXin group.

Thanks.


[FEAT] Scrollbar Styles

Is your feature request related to a problem? Please describe.
I think we haven't given customised styles to our scrollbar.
We should custom our scrollbar as per our theme.
Describe the solution you'd like
I will just add the css at global according the theme of our web-app.
Additional context
I want to work on this myself.
Please assign it to me and add tags for hacktoberfest-2024.

Seems like the last thing people would need. I'm going to close for now.


Update console-virtual-terminal-sequences.md

Replace & with & in code samples.

:warning: Validation status: warnings

File
Status
Preview URL
Details

docs/console-virtual-terminal-sequences.md
:warning:Warning
View
Details

docs/console-virtual-terminal-sequences.md

[Warning] unexpected type String[] for metadata api_type, the expected type is string
[Warning] unexpected type String[] for metadata topic_type, the expected type is string
[Warning] unexpected type String[] for metadata api_location, the expected type is string
[Warning] unexpected type String[] for metadata api_name, the expected type is string

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Great catch, thanks Jason 😄


feat: Implement Serialize trait for each Node

This patch implements Serialize trait for each Node. This will be super useful for making deno_lint's plugin system I'm working on more practical.
The difference may be a bit hard to follow, but how it works can be seen in test cases. See rs-lib/tests/test.rs and  rs-lib/tests/expected/*.json.
For now I don't need to have Deserialize trait implemented, so I didn't do that.

@magurotuna it looks good, but isn't this already handled by swc? Couldn't the .inner be serialized?

I think perhaps we could still implement Serialize, but it would be turned on via a cargo feature and would serialize the inner property with swc. Thoughts? (I'm not sure about needing to make this a cargo feature, but I don't need it in dprint-plugin-typescript)

@dsherret

@magurotuna it looks good, but isn't this already handled by swc? Couldn't the .inner be serialized?

Yeah it is, but for the following reason I'd be happy if the nodes of dprint-swc-ecma-ast-view implemented Serialize.
The reason is, swc's implementation for Serialize is a little bit tricky. I mean, if we try to serialize the following code:
function foo(a) { }

then we'll get the result as follows via swc's Serialize:
{
  "type": "FunctionDeclaration",
  "identifier": {
    "type": "Identifier",
    "value": "foo",
    "optional": false
  },
  "declare": false,
  "params": [
    {
      "type": "Parameter",
      "decorators": [],
      "pat": {
        "type": "Identifier",
        "value": "a",
        "optional": false,
        "typeAnnotation": null
      }
    }
  ],
  "decorators": [],
  "body": {
    "type": "BlockStatement",
    "stmts": []
  },
  "generator": false,
  "async": false,
  "typeParameters": null,
  "returnType": null
}

Note: I omitted spans for readability.
On the other hand, if we use dprint-swc-ecma-ast-view's Serialize, we'll get:
{
  "nodeKind": "FnDecl",
  "ident": {
    "nodeKind": "Ident",
    "sym": "foo",
    "optional": false
  },
  "function": {
    "nodeKind": "Function",
    "params": [
      {
        "nodeKind": "Param",
        "decorators": [],
        "pat": {
          "nodeKind": "BindingIdent",
          "id": {
            "nodeKind": "Ident",
            "sym": "a",
            "optional": false
          },
          "typeAnn": null
        }
      }
    ],
    "decorators": [],
    "body": {
      "nodeKind": "BlockStmt",
      "stmts": []
    },
    "typeParams": null,
    "returnType": null,
    "isGenerator": false,
    "isAsync": false
  },
  "declare": false
}

There are a couple of differences, but the point is, the former doesn't have function field, while the latter does have.
This is because swc's Serialize implementation uses #[serde(flatten)] here. Thus, it can be said that the serialization result of swc doesn't exactly reflect its original structure. This fact can become a problem when we traverse AST nodes using dprint-swc-ecma-ast-view, because if we attempt to call .children() on the above FnDecl, we get a list of Ident and Function, but the serialization result via swc doesn't have Function.
In deno_lint's plugin system, users will be able to create their own plugins in JavaScript or TypeScript, with serialized AST information passed from Rust side. And the capability of upward and downward traversing on AST will still be provided by dprint-swc-ecma-ast-view through Deno's Op. Therefore, I want the serialization result of AST to match with its corresponding struct's shape in Rust as much as possible.

I think perhaps we could still implement Serialize, but it would be turned on via a cargo feature and would serialize the inner property with swc. Thoughts? (I'm not sure about needing to make this a cargo feature as perhaps it's not a big deal to just always include it, but I don't need it in dprint-plugin-typescript)

Making this a cargo feature sounds good to me :) But unfortunately, as I mentioned above, using inner property's Serialize doesn't satisfy my needs.

Sorry for my delay on this! I had a busy week and then I forgot about it. I will do a release soon.
By the way, one point is I think it might be worthwhile to implement #14 in the future (let's not worry about it for now).


Update scalatest to 3.2.5

Updates org.scalatest:scalatest from 3.2.3 to 3.2.5.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalatest", artifactId = "scalatest" } ]

labels: test-library-update, semver-patch

Superseded by #116.


Fix compilation error in Promises example

Thanks to Kevin Hoffman for finding this. We really need a way to make
sure we don't break code in docstrings.
Closes #2074

@SeanTAllen - This is something I already fixed in https://github.com/ponylang/ponyc/pull/2039/files#diff-263478fdbc93a802e49e58b05597181dL39 when I went through every single example to make sure it compiled with explicit partial calls.
Can we just merge that one instead, and close this PR?

Closing in favor of Joe's PR.

The example on https://stdlib.ponylang.io/promises--index still doesn't compile the one in the doc string of Promises.pony is correct.


add filesize

tested with regular file & symlink
can we add tests here?

Tests would be a good idea. Just need to port some of these over (looks like its just assert tests - nothing fancy). However, since libvenice differs from libmill in some ways, we should have @paulofaria do it :stuck_out_tongue:.

Yeah we should have tests! but I'm considering something else. Martin (libmill author) is working on libdill:
http://libdill.org/
Libdill would be much better to wrap cause it uses idiomatic C. The main reason we need a fork from libmill is because libmill uses a lot of C macros which don't translate to swift. The other reason is that we store values in the channel buffer in Swiftland so I modified libmill to remove the value storage from the channels. This difference would still exist on libdill, but maybe we can influence libdill so we don't have to fork at all. This would be a huge win for us.

fixed.

@paulofaria

oh, i should move it to CLibvenice now (@paulo)

@antonmes yeah!


Oidcc.create_redirect_url/4 returning "invalid_request" "Authentication failed."

oidcc version
3.0
Erlang version
27.1
Elixir version
1.17.3-otp-27
Summary
After creating a realm and a client, I keep getting
{:error,
 {:http_error, 401,
  %{
    "error" => "invalid_request",
    "error_description" => "Authentication failed."
  }}}

when running Oidcc.create_redirect_url(MyApp.OpenIdConfigurationProvider, "test1", client_secret, %{redirect_uri: "http://localhost:8080/oidc/callback"}).
The openid-configuration is being retrieved successfully.
OpenId Provider: Keycloak 22.0.5
Current behavior
Calling Oidcc.create_redirect_url/4 with a valid client yields:
{:error,
 {:http_error, 401,
  %{
    "error" => "invalid_request",
    "error_description" => "Authentication failed."
  }}}

How to reproduce
On Keycloak 22.0.5

Create a realm
Create a client with:

Client Authentication: On
Authorization: On
Authentication Flow: Standard, Implicit and Direct access grants (all checked)

Call Oidcc.create_redirect_url/4 with the client created will yield:

{:error,
 {:http_error, 401,
  %{
    "error" => "invalid_request",
    "error_description" => "Authentication failed."
  }}}

Expected behavior
Calling Oidcc.create_redirect_url/4 with a valid client:
{:ok, redirect_url} = Oidcc.create_redirect_url(MyApp.OpenIdConfigurationProvider, "test1", client_secret, %{redirect_uri: "http://localhost:8080/oidc/callback"})

@GPrimola Thanks for the report.
Can you please put the full oidcc version into the description? THis makes it simpler to find the issue.
Given the specific error / location, I believe that this is happening when attempting to execute PAR
It looks like Keycloak is responding with 401 on that PAR request. That hints, that you have either provided the wrong credentials or configured something else wrong in Keycloak / oidcc.
oidcc supports the following auth methods for requests to the provider (ordered by priority):

private_key_jwt - you would have to configure this, so not relevant here
tls_client_auth - you would have to configure this, so not relevant here
client_secret_jwt - depends on the provided client credentials; most likely used
client_secret_post - depends on the provided client credentials
client_secret_basic -  depends on the provided client credentials
none - If nothing else is available

If the error was a different 4XX error like Bad Reuest (400), it would be likely that this is a bug. A 401 however hints at a configuration error like an invalid client secret.
One issue I've seen with multiple identity providers is incorrect encoding of the client secret. Can you check if your secret contains special characters like / or spaces?


moving to /new or /best has the page stuck on spinner. posts aren't showing on route changes?

Any idea why?

Hi,
I'm not quite sure why that's happening. Are you getting the spinner locally or on the demo page?

locally. I ended up just removing the spinner altogether; for now.

locally. I ended up just removing the spinner altogether; for now.

This issue is fixed in the latest version of react-spin. If anyone else is facing this issue, please try upgrading react<EMAIL_ADDRESS>and running the app again.


[BUGFIX]fix python 3.8 ctypes dll load with windows

Description
fix python 3.8 ctypes dll load with windows
Checklist
Essentials

[X] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[X] Changes are complete (i.e. I finished coding on this PR)

Changes
Comments

@szha @aaronmarkham Lint doesn't know the new parameter. What should I do?

I disable it.

run ci [windows-gpu]

https://docs.python.org/3/library/ctypes.html
The document shows that

The winmode parameter is used on Windows to specify how the library is loaded (since mode is ignored). It takes any value that is valid for the Win32 API LoadLibraryEx flags parameter. When omitted, the default is to use the flags that result in the most secure DLL load to avoiding issues such as DLL hijacking. Passing the full path to the DLL is the safest way to ensure the correct library and dependencies are loaded.

Could we pass the full path of DLL by  lib = ctypes.CDLL(os.path.abspath(lib_path[0])) ?

@wkcn The key is to find CUDA's dll. Adjusting mxnet.dll path doesn't help.


Minor Updates to UG

Minor updates to UG

Codecov Report

Merging #185 (92a1a0a) into master (ee74053) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #185   +/-   ##
=========================================
  Coverage     64.34%   64.34%
  Complexity      672      672
=========================================
  Files           108      108
  Lines          2524     2524
  Branches        288      288
=========================================
  Hits           1624     1624
  Misses          800      800
  Partials        100      100

Impacted Files
Coverage Δ

src/main/java/seedu/address/ui/HelpWindow.java
0.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Does MTProto allow to route all a device internet traffic to the proxy? Like a VPN?

Nope. MTProto proxy only connects to Telegram servers, not any other server in the internet.


Create readme for redirecting viewers from medium

The link from task11 in https://medium.com/free-code-camp/the-ultimate-guide-to-preparing-for-the-coding-interview-183251ee36c9 is broken. Fixing it by providing a reference to the right url

@yangshun just a minor edit. Your website is very helpful


Add link to user's profile on site

and some bolder field names.

Would PR with other changes, no need to merge small boldness things.

My bad i need to learn to read


Update backend name in tutorial

The trtllm backend was renamed to tensorrtllm after the 24.04 release. We need to update it in one more place.

@rmccorm4: The flag for Triton import command hasn't changed

Ah, right. Yeah I don't think this needs to change

Thanks for catching this! It threw me off that the arg was different between the two. Closing this PR.


Class WebSocketServer is missing when spinning up an OSCQuery server

After installing the Quark in SC 3.10.4 and following the provided guide
https://github.com/ossia/ossia-sclang/blob/1d2913c18d6ffc1279751ee8bab312e80441022a/HelpSource/Guides/OssiaReference.schelp#L26-L27
one will face the error
Execution warning: Class 'WebSocketServer' not found
ERROR: Message 'new' not understood.

which is caused by
https://github.com/ossia/ossia-sclang/blob/1d2913c18d6ffc1279751ee8bab312e80441022a/classes/OssiaProtocols.sc#L130
Following the original repo it seems that a server was provided as a primitive within SuperCollider.
It seems SuperCollider is really lacking network capabilities (at least myself is writing python wrapper for network functionalities all the time) and maybe it is best to implement network capabilities once properly with a Quark so one can start and poll web servers from within SuperCollider?

Hi @capital-G
Very sorry, I didn't see this issue.
I realize that it was made prior to our conversation on
https://github.com/supercollider/supercollider/issues/5310
Was the issue cleared up by our discussion ?
you need either
https://github.com/pchdev/wsclang
or
https://github.com/scrime-u-bordeaux/supercollider
for oscquery

Yes - cleared up :)

cool, we'll continue the discussion on
supercollider/supercollider#5310


chore: bdd-nh-1585105229 to 0.0.1

chore: Promote bdd-nh-1585105229 to version 0.0.1

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

Needs approval from an approver in each of these files:

OWNERS

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


Consider upgrading gulp to v4?

gulp v3 is unsupported and it doesn't work on node.js 12 lts, so I think it should be upgraded avoid having problem to build on node.js 12 lts.

No


adding licence without code formatting

This time without cluttered codeformat changes (although we should really straighten this I think - some of the files are even indented with tabs etc.). But let https://github.com/intuit/wasabi/pull/159 worry about this.

@AndreaSuckro  looks good w/o code formatting. :shipit:


Security headers

Modern browser support security headers, in particular Content Security
Policy (CSP)(https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
These can help mitigating XSS vulnerabilities, in the case of pastes by
disallowing inline styles and scripts.
Move all current inline styles into the global style.css, and refactor
all inline javascript into separate asset files.

Could you either rename the PR title or split it into multiple PRs? Some commits are not necessarily related to security headers.


added persistable interface to audited interaction and added transact…

…ion to delius service

Codecov Report

Merging #39 (2b5fb77) into main (089996d) will decrease coverage by 0.66%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main      #39      +/-   ##
============================================
- Coverage     99.32%   98.66%   -0.67%
  Complexity      105      105
============================================
  Files            28       28
  Lines           298      300       +2
  Branches         17       17
============================================
  Hits            296      296
- Misses            0        2       +2
  Partials          2        2

Impacted Files
Coverage Δ

...ustice/digital/hmpps/telemetry/TelemetryService.kt
100.00% <ø> (ø)

...ps/integrations/delius/audit/AuditedInteraction.kt
92.00% <0.00%> (-8.00%)
:arrow_down:

...hmpps/integrations/delius/service/DeliusService.kt
97.43% <ø> (ø)

.../justice/digital/hmpps/listener/MessageListener.kt
100.00% <ø> (ø)

Continue to review full report at Codecov.

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


Update optim test to remove Variable/.data and fix _state_dict optim test for PyTorch 2.1

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


TextBox text jitter inside relative panel when resizing window.

Describe the bug
I find that when I place a TextBox control inside a  and align its sides with the panel the text gets jumpy when I resize the height of the window. If I change the property TextWrapping to "NoWrap" then the problem goes away but I want the text to wrap and be able to resize the window without the text jumping up and down ...
Steps to reproduce the bug

<RelativePanel>
    <TextBox
        Visibility="Visible"
        x:Name="directions"
        TextWrapping= "Wrap"
        Background="White"
        Foreground="Black"

        RelativePanel.AlignRightWithPanel="True"
        RelativePanel.AlignLeftWithPanel="True"
        RelativePanel.AlignTopWithPanel="True"
        RelativePanel.AlignBottomWithPanel="True"

        >
    </TextBox>

</RelativePanel>

Expected behavior
Text in TextBox should remain still when window is resized.
Screenshots
No response
NuGet package version
Windows App SDK 1.4.0: 1.4.230822000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
The Windows App SDK version I am using is 1.4.230822000 (latest stable) which is not available in the dropdown versions above.

I guess this is not because the TextBox is inside a RelativePanel. This also happens inside a vertical stretched Grid. I also tried this with a GridSplitter at the bottom of the TextBox and got the same jumpy result. So, it seems that this issue happens when the TextBox's height is changed from the bottom side.


8muses files storage changed

it seems 8muses moved their files to ampproject.org
when trying to rip 8muses album, the result is 404

Can you post a link to a example album?

https://www.8muses.com/comix/community/album/sod/thecroft16-comics/lara-croft-and-student-part-1

Looks like they also changed from using jpg to webp for their images


Migrate testing/test

This PR is a part of the protocol migration. Some endpoints are written by hand. We are switching to the protocol generated from Cody. In this PR:

Migrate testing/test

Based on PR #2638
Full chain of PRs as of 2024-11-13

PR #2639:
mkondratek/chore/migrate-api-part-5 ➔ mkondratek/chore/migrate-api-part-4
PR #2638:
mkondratek/chore/migrate-api-part-4 ➔ mkondratek/chore/migrate-api-part-3x
PR #2637:
mkondratek/chore/migrate-api-part-3x ➔ main

Test plan

All migrated endpoints have been verified with debugger (and reviewed in the trace log).

closing in favour of https://github.com/sourcegraph/cody/pull/6293