MNE events functionality

Now that the "extra info" issue has been closed I'm thinking about ways that I could incorporate my metadata with the metadata in MNE. This brought up an idea that might be worth implementing if it'd be useful.
The tricky thing about my data is that my events are not defined by triggers because I am playing sentences of variable length in a continuous fashion. To that extent, I can't just store the starting time of each trial...I also need to know the length.
In order to keep this flexible when I change sampling rates of the signal, I've been storing time information as a pandas dataframe that has one row for each trial. For any row, there are always two columns: 'start', 'stop'. These are stored in seconds to the highest possible precision.
Then, I append columns to each row to add information about that trial. For example, one row might look like this:
time_info = {'start': 1.23453,
                    'stop': 3.5642,
                    'trial_type': 'filter',
                    'filter_type': high_pass'
                   }

The values in start and stop always correspond to 0 being the start of the data files. That way, as long as I have the sampling rate then I can use a function like this:
stim_time_series = time_series_from_time_info(time_info, sample_rate, total_length)
and it will generate a time series were each row is a timepoint, then fill row/column values with values corresponding to the other columns in time_info. Total length defines the total length of the brain data that we've got. The result is a vector of stimulus information that is kind of like the ones that MNE uses to read in events information.
Would it be useful to contribute these kinds of functions to MNE? I could work on this after finishing up the layout stuff. I could imagine it being useful for anyone that doesn't store their event information as vectors along with the data.

personally I am not sure how common this use case is

You may be right. I've just found that experiments that use natural stimuli
often have several different parameter or feature values for any given
timepoint, and aren't always ideal for a traditional "time-locked trial
onset" style of analysis. Maybe it's uncommon enough to not be worth
implementing.
On Tue, Apr 14, 2015 at 1:35 PM, Alexandre Gramfort <
<EMAIL_ADDRESS>wrote:

personally I am not sure how common this use case is
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-93051430
.

For fully exploiting rERP analysis, EEGLAB has begun implementing a more detailed event code system with hierarchical event codes.

Can't speak to how common it is, but for rERP and/or natural stimuli, it'd definitely be important.

Interesting. I think there is room for improvement. To be discussed carefully.

can you be more explicit about EEGLAB approach? maybe give possible usage
snippets?

For example, imagine we want to analyze word processing via multiple multiply nested predictors of various types. We could estimate a regression model with factors such as word length in letters, word length in syllables, word frequency according to subcorpus 1 of corpus 1, word frequency according to subgroups 2 of corpus 1, word freq according to corpus 2, word class (categorical). It'd be very convenient if each event code could carry the relevant information, e.g.
events[103827] = {
'length': {'syllables':2, 'characters':7 },
'frequency': {'google': {'2009': 42, '2013': 43}, 'celex': 13},
'category': {'content_word': True, 'type': 'adverb'},
'presentation_duration': 254,
'response': {'rt_(msec)': 340, 'correct': True}
}

Or something like that.
Maybe this only becomes useful as a Pandas data frame.
Ideally, it should be easily parseable for transformation via patsy formulas into design matrices for GLM estimation for rERP, and also for decoding/gat cross-condition generalisation/scikit-learn.
The idea is that it should be easily doable to, say, estimate a regression model for celex word frequency + length + response (correct), and then another one for google-2009 frequency + google_2013 frequency, length in syllables, length in characters ... And then the same one, but with all interactions up to level 2.
Or we wish to select all words of the category adverb with correct responses, and compare them to all words of category noun with incorrect responses (for some reason).
I've used this with some idiosyncratic self-written EEGLAB routines and consider it a very powerful analysis scheme for any forms of naturalistic or rich, multi-predictor paradigms.
All of this would be very inconvenient with classical one-integer-only triggers. Yes, you could do it, e.g. by doing a mock integer that's actually to be read as a string coding a single design matrix - or via an external dictionary you look up in. But it's not convenient.
The EEGLAB approach looks like this:
Stimulus/Feedback,
 Stimulus/Visual/Color/Red,
 Stimulus/Visual/Shape/Ellipse/Circle/Height/2-deg,
 Stimulus/Visual/Shape/Ellipse/Circle/Width/2-deg,
 Stimulus/Visual/Background/Uniform Color/Black

With this, you could select all circles and contrast them to all squares, or select all red circles and contrast them to all other circles, then contrast them to all red squares, and so on.
They have some very ambitious goals with this, such as machine readable search engine friendly data bases of EEG experiments. See Link
I'm not saying I'm volunteering :)

This functionality already exists in mne-python. As part of a feature request @haribharadwaj made, and I think @teonlamont implemented see: #1583. It may be useful to have a more intuitive wrapper to work with (for cases where people haven't properly setup their trigger codes to use the feature in their STI channel); however, I use this in all of my research designs (it has always been a part of MNE).
HTH D

see also #1562, where I described a simple example of doing this, and there was a lot of discussion about possible APIs. Personally, I think an API, where you feed it a dict with the values being tuples of event codes and then it synthesizes a new trigger channel with the binary trigger feature, and runs standard mne.find_events, with trigger masks, would be the best option (not volunteering ;) ).

@dgwakeman The bit mask approach, as @kingjr mentions, does not easily generalize to noncategorical/continuous predictors, with float values, correct?

I think the challenge with non-categorical predictors is that the concept of an "event" generally entails a starting point and an event length. With something like regression there isn't any kind of starting point necessarily...you've just got varying values of some predictor variable. This would also be very useful for me since most of my work is with encoding / decoding models, but I'm not sure how it could fit into the current events / epochs code of MNE...

Why do you need this in the epochs object? You can have all this info next to it.

I guess it depends on how much precision the float values have, but I could certainly see it becoming cumbersome. In the case of extremely complex float regressors. I would set a MISC channel to be the value in Volts of the float. And perhaps incorporate the option to input MISC channels for the regression analyses.

The way that I've gotten around this is basically to just use my own code for regressions and such, and using MNE for the basic data representation and such. I have a dataframe with "start" and "stop" columns (that I described at the beginning of this issue), and a function that will take such a dataframe and generate a big matrix of stim channels. Then I can just keep this matrix (either as an MNE object of "misc" channels or just as a separate dataframe) along side of my Raw object of ecog data, and pull out the channels I want when running regressions.

@dengemann my problem with Epochs objects isn't the fact that I can't keep metadata with them, it's that my epochs are variable length. E.g., if each "trial" is a sentence, then each one has a length somewhere between 2-4 seconds. I can always define an arbitrary cutoff if I only care about the evoked response to sentence onset, but it's a bit clunky.

@choldgraf I'm not sure why you need to epoch in the case you describe? Following @dgwakeman, can't you work directly on the continuous raw data using a misc for each continuous regressor you create?

Yup, that's usually what I do and it works pretty well for me already. If I also want to look at the event-related evoked activity then I'll do epoching and just define a single trial length for everything. I do think it'd be useful to have some functionality to generate arbitrary stim channels from a collection of time metadata, but perhaps it's outside of the scope of this.

Actually now that I think about it, one way in which epochs would be useful is in the size of data storage. If you've got a really long trial then it can be helpful to remove all the "non-event" chunks first and then save the data, but this isn't such a big deal for most data sets :)

That s a bit of an inelegant trick but if your data is full of non-events, you could perhaps gain memory by setting the corresponding raw.data to 0 and transform it into a sparse matrix.

That's basically how I do it in EEGLAB - well, the other way around, basically
data = data[predictor != 0,:]

I would actually use nan instead of 0 personally (it is possible to get a bunch of zeros in data, but probably not nan), and then save as .fif.gz. I would expect it to be less memory than even a sparse matrix.

My codebase has a long and storied history of inelegant tricks ;)
Truthfully the memory issue isn't a big deal for me right now, I was just trying to think of a use case where it'd be useful to have variable length epochs and such. While I do think it'd be useful to have more ways of adding "time metadata" to MNE objects other than using an events object, it doesn't seem crucial to implement now or anything...

My typical solution too when I need more metadata is to write inelegant custom scripts to make new events arrays by processing the existing one(s).

The following article may be relevant to this issue, especially with regard to language studies:
http://kutaslab.ucsd.edu/people/kutas/pdfs/2015.P.157.pdf

Yeah but I don't get this debate. You can put together a designmatrix as
desired and use our linear_regression function to produce rERP/F evoked
objects. It's ready.
2015-05-01 16:01 GMT+02:00 J-R King<EMAIL_ADDRESS>
The following article may be relevant to this issue, especially with
regard to language studies:
http://kutaslab.ucsd.edu/people/kutas/pdfs/2015.P.157.pdf
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-98140310
.

I haven't finished reading the blabla, but I thought they proposed a way to handle partially overlapping events (not just nested).
Is there somewhere an example using a designmatrix?

@kingjr the trick is to run the regression on the full EEG time course. So your predictors for partially overlapping events occurring with some temporal jitter with regards to each other are not fully collinear and can be separated via ordinary OLS.
This is not covered by MNE currently, but I'd like to implement it.
@dengemann Consider an argument Nathaniel Smith makes: comparing means (evoked potentials per condition) can be understood as a type of regression. But there is a special MNE interface for evoked potentials, even though you could do it via linear_regression and a design matrix ... because it's more convenient.

But there is a special MNE interface for evoked potentials, even though you could do it via linear_regression and a design matrix ... because it's more convenient.

What do you mean?
file:///Users/dengemann/github/mne-python/doc/build/html/auto_examples/stats/plot_sensor_regression.html#example-stats-plot-sensor-regression-py
It's maybe not the best example as an example, but it exposes the API. I think with this you can do everything which goes in that direction, not?

I think with this you can do everything which goes in that direction, not?

No :) Unless you really abuse it.
But the hard part for Smith's approach is constructing the design matrix in the first place. The rest is a single line to fit a linear regression, and another few to plot specific coefficients.

But the hard part for Smith's approach is constructing the design matrix in the first place.

Ok.

Jumping back in this conversation with another thought - what if there were just added functionality to include a unique event ID with the "events" array? AKA, rather than implementing a bunch of extra metadata functionality, we just allow the user to supply an event ID for each row of "events". That way, people can use whatever metadata system they want, but they have at least one number that ties a specific MNE event to a particular entry in their system.

@choldgraf I actually do this in practice. Note that the epochs __repr__ then becomes horribly long then... And then you have to manually deal with epoch concatenation.

Couldn't you currently do this with the "description" field in "info"? If it's not worth implementing as a part of MNE, I was thinking of just including a dictionary for the description that contains an entry "event_unique_id" with a list of the same length as n_events.

can you give an example of the objective?

I think someone mentioned a similar use case above, but the basic idea for me is that I have a lot of metadata about any given trial. For example, I have trials in blocks of 3. I'd like to keep information about which block each stimulus presentation belongs to, but other than hard-coding this into event_id, I'm not sure how best to do it. Since I also have a lot of metadata too, I thought it would be easier to include an ID that I can lookup with my own trials metadata structure.
An example of metadata columns is as follows. Each trial is a spoken sentence, but the lengths of the sentences are not the same, and for regression purposes I'd like to know exactly how long each sentences took to play. Moreover, some sentences are filtered in particular ways depending on the block type. Here is information I have about each sentence:

Sentence ID (aka file name)
Filter type (or not filtered)
Block filter type (are other sentences in the block filtered)
Position within block
Length of sentence
Speaker ID of sentence
Words spoken in sentence
etc etc

The problem is that right now when I have an epochs object, there is a mapping onto integer numbers. I could make a complicated system that encodes all this information into a really long integer, but it seems easier/clearer to just have a single number associated with each stimulus presentation, and I can use this in my own lookup table of stimulus metadata. I suppose that I could only use the stimulus event code functionality for this (aka make it an integer that only serves as a lookup key, and doesn't tell me anything about the stimulus). What do you think?

Playing the devil's advocate:
Why make a more complex function at the MNE level?
Build your metadata records of desired complexity and linke them to you
epochs based on the epochs.selection vector which indicates the original
position of the epoch (after dropping).
I really don't think we need a more complex events API inside MNE-Python.
2015-06-06 19:52 GMT+02:00 Chris Holdgraf<EMAIL_ADDRESS>
I think someone mentioned a similar use case above, but the basic idea for
me is that I have a lot of metadata about any given trial. For example, I
have trials in blocks of 3. I'd like to keep information about which block
each stimulus presentation belongs to, but other than hard-coding this into
event_id, I'm not sure how best to do it. Since I also have a lot of
metadata too, I thought it would be easier to include an ID that I can
lookup with my own trials metadata structure.
An example of metadata columns is as follows. Each trial is a spoken
sentence, but the lengths of the sentences are not the same, and for
regression purposes I'd like to know exactly how long each sentences took
to play. Moreover, some sentences are filtered in particular ways depending
on the block type. Here is information I have about each sentence:

Sentence ID (aka file name)
Filter type (or not filtered)
Block filter type (are other sentences in the block filtered)
Position within block
Length of sentence
Speaker ID of sentence
Words spoken in sentence
etc etc

The problem is that right now when I have an epochs object, there is a
mapping onto integer numbers. I could make a complicated system that
encodes all this information into a really long integer, but it seems
easier/clearer to just have a single number associated with each stimulus
presentation, and I can use this in my own lookup table of stimulus
metadata. I suppose that I could only use the stimulus event code
functionality for this (aka make it an integer that only serves as a lookup
key, and doesn't tell me anything about the stimulus). What do you think?
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-109625466
.

TIL about the epochs selection attribute haha. That does look useful, and I
think it could basically serve the functionality that I'd want. Can you
overwrite an epoch's selection attribute? E.g., so if I wanted to create an
EpochsArray object with a subset of epochs, then I could modify the
"selection" attribute in place?
On Sat, Jun 6, 2015 at 5:46 PM, Denis A. Engemann<EMAIL_ADDRESS>wrote:

Playing the devil's advocate:
Why make a more complex function at the MNE level?
Build your metadata records of desired complexity and linke them to you
epochs based on the epochs.selection vector which indicates the original
position of the epoch (after dropping).
I really don't think we need a more complex events API inside MNE-Python.
2015-06-06 19:52 GMT+02:00 Chris Holdgraf<EMAIL_ADDRESS>
I think someone mentioned a similar use case above, but the basic idea
for
me is that I have a lot of metadata about any given trial. For example, I
have trials in blocks of 3. I'd like to keep information about which
block
each stimulus presentation belongs to, but other than hard-coding this
into
event_id, I'm not sure how best to do it. Since I also have a lot of
metadata too, I thought it would be easier to include an ID that I can
lookup with my own trials metadata structure.
An example of metadata columns is as follows. Each trial is a spoken
sentence, but the lengths of the sentences are not the same, and for
regression purposes I'd like to know exactly how long each sentences took
to play. Moreover, some sentences are filtered in particular ways
depending
on the block type. Here is information I have about each sentence:

Sentence ID (aka file name)
Filter type (or not filtered)
Block filter type (are other sentences in the block filtered)
Position within block
Length of sentence
Speaker ID of sentence
Words spoken in sentence
etc etc

The problem is that right now when I have an epochs object, there is a
mapping onto integer numbers. I could make a complicated system that
encodes all this information into a really long integer, but it seems
easier/clearer to just have a single number associated with each stimulus
presentation, and I can use this in my own lookup table of stimulus
metadata. I suppose that I could only use the stimulus event code
functionality for this (aka make it an integer that only serves as a
lookup
key, and doesn't tell me anything about the stimulus). What do you think?
—
Reply to this email directly or view it on GitHub
<
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-109625466

.

—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-109661621
.

I really don't think we need a more complex events API inside MNE-Python.

I agree. Still, as many users (will) encounter this complex design issue, I reckon there should be an introductory example that cover this topic and guide the user.

I agree. Still, as many users (will) encounter this complex design issue, I reckon there should be an introductory example that cover this topic and guide the user.

Amen.
;-)

Can you overwrite an epoch's selection attribute? E.g., so if I wanted to create an
EpochsArray object with a subset of epochs, then I could modify the
"selection" attribute in place?

Not sure I get it but you can overwrite it. It's semantic is as follows:

vector of lenght(actual_epochs) with indices of orginal input events array.
for EpochsArray we set it to np.arange(len(events)) at construction times because we don't necessarily know anything about subsetting
if you select epochs, the vector will shrink accordingly to the selected trials, but the contents will stay

+100 for using the selection attribute to track epochs metadata. We wrote
this exactly for this use case. Example and doc are always very welcome.

I could write a short blog-style example of the way I end up doing this. I
heard rumblings about a website redesign that will make documentation
easier to expand and upload. That still happening?
On Sun, Jun 7, 2015 at 1:17 PM, Alexandre Gramfort<EMAIL_ADDRESS>
wrote:

+100 for using the selection attribute to track epochs metadata. We wrote
this exactly for this use case. Example and doc are always very welcome.
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-109796650
.

Yeah, it is easier for us to update now. Changes made to the mne/doc directory are easier to propagate to the dev build website.

+1 for blogpost too
The doc is a topic of the sprint this summer

On 8 juin 2015, at 06:53, Eric Larson<EMAIL_ADDRESS>wrote:
Yeah, it is easier for us to update now. Changes made to the mne/doc directory are easier to propagate to the dev build website.
—
Reply to this email directly or view it on GitHub.

Cool - I can def help w/ docs too.
On Sun, Jun 7, 2015 at 11:18 PM, Alexandre Gramfort <
<EMAIL_ADDRESS>wrote:

+1 for blogpost too
The doc is a topic of the sprint this summer

On 8 juin 2015, at 06:53, Eric Larson<EMAIL_ADDRESS>wrote:
Yeah, it is easier for us to update now. Changes made to the mne/doc
directory are easier to propagate to the dev build website.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-109877202
.

So I've been playing around a little bit trying to use the selection parameter to maintain trial identity through derivations of epochs, and I'm running into a few snags. In my situation, I often re-create epochs objects after doing different kinds of processing. e.g., I'll create an epochs objects of raw data, then filter it for HG, then use EpochsArray to re-create the same object. Alternatively, with the full EpochsTFR class that I use, I subset frequency bands and create epochs.
What I've found is that while the selection parameter does a decent job of keeping track of trials, this becomes more difficult once you create a new epochs object.
E.g.: if I take an epochs object, then take a subset of trials and then create a new epochs object from this:
epochtmp = epoch[['mid', 'bef']]
epocha = mne.EpochsArray(epochtmp._data, epochtmp.info, epochtmp.events, tmin=epochtmp.tmin, event_id=epochtmp.event_id)

Now the selection parameter is reset to arange(n_epochs). I can hard-reset this by using epocha.selection = epochtmp.selection...however, now subsetting the data throws an error because the LOG array is too short for the indices in selection:
epocha.selection = epochtmp.selection
epocha['mid']

/home/knight/holdgraf/src/mne/mne/epochs.pyc in __getitem__(self, key)
   1319         key_selection = epochs.selection[select]
   1320         for k in np.setdiff1d(epochs.selection, key_selection):
-> 1321             epochs.drop_log[k] = ['IGNORED']
   1322         epochs.selection = key_selection
   1323         epochs.events = np.atleast_2d(epochs.events[select])

IndexError: list assignment index out of range

So to summarize two primary confusions:

Creating a new epochs object from an old one that has a subset of trials removes information about the trial IDs in the original events object. (could be fixed by making it clear which attributes need to be overwritten to retain this information)
It's still a bit confusing when you have subsets of trials how these correspond to the original events object (could be fixed by including an "events_orig" attribute or something?)

I don't think either of these things are dealbreakers so long as the user remembers to copy over attributes from original epochs objects, just giving my experience.
One other thought that I am hesitant to give since you guys said you don't want more API complexity (understandably :)):
it might be useful to have an "EpochsInfo" class in the same way that MNE has an "Info" class for signals. This would basically just be a single object that stores all the same epochs information that are kept as attributes to Epochs right now, but it would be a single place for this information and would thus be easier to keep track of perhaps. The user-side attributes could still be the same, with calls to the attributes behaving similar to ch_names, aka it just pulls that value from the EpochsInfo class. Just a thought!

Sounds like it would be sufficient to make the .selection work after
subsetting. Your report indicates that there are some broken parts.
2015-06-18 19:57 GMT+02:00 Chris Holdgraf<EMAIL_ADDRESS>
So I've been playing around a little bit trying to use the selection
parameter to maintain trial identity through derivations of epochs, and I'm
running into a few snags. In my situation, I often re-create epochs objects
after doing different kinds of processing. e.g., I'll create an epochs
objects of raw data, then filter it for HG, then use EpochsArray to
re-create the same object. Alternatively, with the full EpochsTFR class
that I use, I subset frequency bands and create epochs.
What I've found is that while the selection parameter does a decent job of
keeping track of trials, this becomes more difficult once you create a new
epochs object.
E.g.: if I take an epochs object, then take a subset of trials and then
create a new epochs object from this:
epochtmp = epoch[['mid', 'bef']]
epocha = mne.EpochsArray(epochtmp._data, epochtmp.info, epochtmp.events, tmin=epochtmp.tmin, event_id=epochtmp.event_id)
Now the selection parameter is reset to arange(n_epochs). I can
hard-reset this by using epocha.selection = epochtmp.selection...however,
now subsetting the data throws an error because the LOG array is too short
for the indices in selection:
epocha.selection = epochtmp.selection
epocha['mid']
/home/knight/holdgraf/src/mne/mne/epochs.pyc in getitem(self, key)
1319         key_selection = epochs.selection[select]
1320         for k in np.setdiff1d(epochs.selection, key_selection):-> 1321             epochs.drop_log[k] = ['IGNORED']
1322         epochs.selection = key_selection
1323         epochs.events = np.atleast_2d(epochs.events[select])
IndexError: list assignment index out of range
So to summarize two primary confusions:

Creating a new epochs object from an old one that has a subset of
trials removes information about the trial IDs in the original events
object. (could be fixed by making it clear which attributes need to be
overwritten to retain this information)
It's still a bit confusing when you have subsets of trials how these
correspond to the original events object (could be fixed by including an
"events_orig" attribute or something?)

I don't think either of these things are dealbreakers so long as the user
remembers to copy over attributes from original epochs objects, just giving
my experience.
One other thought that I am hesitant to give since you guys said you don't
want more API complexity (understandably :)):
it might be useful to have an "EpochsInfo" class in the same way that MNE
has an "Info" class for signals. This would basically just be a single
object that stores all the same epochs information that are kept as
attributes to Epochs right now, but it would be a single place for this
information and would thus be easier to keep track of perhaps. The
user-side attributes could still be the same, with calls to the attributes
behaving similar to ch_names, aka it just pulls that value from the
EpochsInfo class. Just a thought!
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-113238389
.

Just to clarify - .selection works fine as long as it's the same epochs object, it just messes up when you use EpochsArray. I'm thinking that it might be easier for me if I just avoided using epochs array as much as possible, and instead just used Epochs.copy() and overwrite the _data parameter.

Sounds like this is also a relevant dimension of the Epochs refactoring --
see #2211
2015-06-18 20:08 GMT+02:00 Chris Holdgraf<EMAIL_ADDRESS>
Just to clarify - .selection works fine as long as it's the same epochs
object, it just messes up when you use EpochsArray. I'm thinking that it
might be easier for me if I just avoided using epochs array as much as
possible, and instead just used Epochs.copy() and overwrite the _data
parameter.
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/1963#issuecomment-113242638
.

Yes @choldgraf can you try to produce the error using some minimal script based on the testing dataset? That way I can work it into #2211 and make sure it's resolved.

maybe stupid question but why do you have to use an EpochsArray if you have
a proper Epochs object in the first place? If you need a copy of an Epochs
instance just use the .copy method.

No no, I agree. I think this might be what I need to do in some way. It is not possible if I'm using an EpochTFR class (this is basically an epoch x channel x freq x time array and I am creating Epochs instances using subsets of channels, so in this case I don't actually have a "base" epochs object that I'm using. However I recognize this is an edge case and not built into the MNE system anyway, so maybe it is more my problem :P

Well, you have created an EpochsArray and hit an unexpected error. Whether your epochs were weird in some way shouldn't matter to the EpochsArray class. Figuring out what led to your error -- be it bad inputs at your end that we didn't vet appropriately, or correct inputs with bad methods at our end -- is important because I think there is a real error hiding in there.

agreed.
EpochTFR could keep track of selection on creation.

I think the code problem comes in the fact that EpochsArray assumes that the events it is passed are the only events that exist for that particular dataset. E.g.: if the full events list is 10 items long, and I select a subset of items 2 and 4, then use that subset to create my EpochsArray object, it assumes that there are only 2 events, and creates the corresponding structures accordingly. I think the trick is to figure out what these structures are, and either make it clear that they should be overwritten, or allow the user to supply them when constructing EpochsArray. Does that seem like it'd work?

It sounds like EpochsArray needs to verify that the events, event_id, and size of data are consistent. When creating an EpochsArray they should all match, in other words that:
data.shape[0] == len(events) == sum(in1d(events[:, 3], list(event_id.keys()))

I think if you want a record of the selections that occurred before creating the EpochsArray, you should do it on your own. Otherwise the API for EpochsArray goes from very simple to complex.

I will add it to my PR...

@choldgraf I'm going to close this in favor of #2665 because it sounds like that might work for your use case, feel free to have a look

Cool - I'll keep an eye on that development.


Minor edits.

:warning: Validation status: warnings

File
Status
Preview URL
Details

LauragraDocset0317235153/excel/excel-add-ins-ranges.md
:warning:Warning

Details

LauragraDocset0317235153/excel/excel-add-ins-tables.md
:warning:Warning

Details

LauragraDocset0317235153/excel/excel-add-ins-ranges.md

Line 3: [Warning] Invalid file link:(~/../reference/excel/range.md).
Line 530: [Warning] Invalid file link:(~/../reference/excel/range.md).

LauragraDocset0317235153/excel/excel-add-ins-tables.md

Line 3: [Warning] Invalid file link:(~/../reference/excel/tablecollection.md).
Line 3: [Warning] Invalid file link:(~/../reference/excel/table.md).
Line 7: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 46: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 48: [Warning] Invalid file link:(~/../reference/excel/tablerow.md).
Line 82: [Warning] Invalid file link:(~/../reference/excel/tablecolumn.md).
Line 86: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 119: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 152: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 324: [Warning] Invalid file link:(~/../reference/excel/rangeformat.md).
Line 390: [Warning] Invalid file link:(~/../reference/requirement-sets/excel-api-requirement-sets.md).
Line 438: [Warning] Invalid file link:(~/../reference/excel/table.md).
Line 439: [Warning] Invalid file link:(~/../reference/excel/tablecollection.md).

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.


MigPlan update needs retry logic in case the response 409s

In the GET, mutate, PUT workflow, it's possible the resourceVersion has changed out from under that operation (usually by the controller). If the resourceVersion in our put payload doesn't match what's on the server, it will reject it with a 409. We need retry logic around this in putPlan.

https://github.com/fusor/mig-ui/pull/218#discussion_r290806343


Support Examples

Any possibility of supporting examples for the request/response in the resulting swagger?
My preference would be that the examples be included as a ref in xml documentation, or as a strongly typed instance of the request/response object defined as an attribute (it would have to be a compile time constant, so the request and response example object would need to be a class that inherits from the actual request/response type with a default constructor that supplies values).

And what should we use as property values for the samples?

@rsuter: that's why I said the request/response example objects would need to be a class that inherits from the actual request/response objects -- so one could set default values for the properties (and thus the serializer can just serialize as is without having to generate defaults based on the property type). That's a messy way to go, as it clutters the code base with code used for nothing but examples -- maybe provide a means of referencing a separate assembly for examples and locate example types by convention? There is no good solution, which has always been my issue with attempting to automate API documentation.
The only other alternative is to use the xml docs to href an example that the resulting swagger should inline when generated -- then the examples would be maintained as raw JSON/XML/whatever on disk. The downside to this is that the examples aren't strongly typed and will likely fall out of sync with the API.
As I said, no perfect solution -- but swagger generated without examples makes it tough to use for documentation purposes -- great for code-gen, though.

Maybe this solves your problem?
https://github.com/RSuter/NSwag/blob/master/src/NSwag.SwaggerGeneration.WebApi.Tests/OperationProcessors/SwaggerOperationProcessorAttributeTests.cs

See how it implemented in Swashbuckle:
https://github.com/mattfrear/Swashbuckle.Examples

Ah, I see. This can be implemented with an operation processor: https://github.com/RSuter/NSwag/wiki/Document-Processors-and-Operation-Processors#operation-processors

Is there any example of defining example request / response objects for a specific operation ? I am migrating from Swashbuckle to NSwag and this is something I can't find out.

https://blog.rsuter.com/nswag-tutorial-implement-a-custom-operation-processor-to-define-redoc-code-samples/

I've been able to use IOperationProcessor to add response samples, but where in the object model can I add request samples? The Redoc code sample shows the use of extension data, but not how to add sample request data.

Is there any example of defining example request / response objects for a specific operation ? I am migrating from Swashbuckle to NSwag and this is something I can't figure out.

I'm still looking for an example of how to create an example request object; I've had no problem using an IOperationProcessor to create example response objects, but the Redoc example given above only shows how to use extension data, and I'm sure that example requests are part of the basic spec, not requiring extensions.

See https://blog.rsuter.com/nswag-tutorial-implement-a-custom-operation-processor-to-define-redoc-code-samples/

Duplicate of: https://github.com/RicoSuter/NJsonSchema/issues/1010


Rails Installation Documentation

This library looks great. I've managed to somewhat get it running on one of my projects, however, i've found the documentation not the best for a rails setup.
If resources permit, i would love to see a rails specific gem complete with a generator. Or at the very least more detailed rails setup information.

Install the gem
Copy message-bus.js to the /app/assets/javascripts
Add //= require message-bus to application.js
Setup a initializer that specifies the configuration

Am i missing anything?
What benefit does the Middleware setup provide?

You should no need to copy any files ... step 2 is confusing to me.

My bad, your right no need to copy anything. It was just something that was in the example app posted.
https://github.com/ffabreti/message_bus-chat-example/tree/master/app/assets/javascripts
I setup a new rails project and am trying to get things working.
https://github.com/jmatsuba/test-messagebus-app
If you have time and can advise what is missing, that would be appreciated. I can PR some improved documentation once i understand the process.

Figured it out. Thanks for your help.


Refactor update-dependencies tool

Updated to work off of new orchestrated build info.  This eliminates the clunky pattern of needing to retrieve the runtime version directly from the CLI repo.
Dropped support for everything pre 2.1 which wasn't being used.
Dockerized the PS runner script.
Added command line args  over using EnvVars so that it is easier to invoke manually.

There are three TODO comments which are self-explanatory.  I will wait on merging until ProductVersion is available.
Fixes #476

Right now there's a split between master, still creating the old build-infos, and prodcon builds (release/2.1), creating the new build manifest used here. Will this updater only be used on prodcon builds? If not, dotnet/buildtools#1853 could become a blocker for daily docker builds pointing at master.

The POR is to use prodcon build manifest for the 2.1 release.  Once we move off of release/2.1 and start pulling builds from master again, I am hoping the state of master (e.g. the richness of the version info) will more closely align with 2.1.  Any specialization logic to read a different manifest schema can be added at that time and encapsulated into the single place the constructs the IDependencyInfo.

I don't think waiting is necessary since the core-setup ProductVersion is now in place.  The CLI BuildId will work for now.  I will log a followup issue to convert is to ProductVersion once that work is done.

Issue to use CLI ProductVersion once available - https://github.com/dotnet/dotnet-docker-nightly/issues/550


Failed to activate the MavensMate-Atom package

[Enter steps to reproduce below:]

...
...

Atom Version: 0.189.0
System: Mac OS X 10.9.5
Thrown From: Atom Core
Stack Trace
Failed to activate the MavensMate-Atom package
At literal is not a function

[stdin]:4:13: error: literal is not a function
  'themes': [
            ^

Commands
     -1:24.2 core:backspace (atom-text-editor.editor.mini)
     -1:22.1 core:confirm (atom-text-editor.editor.mini)

Config
{}

Installed Packages
# User
MavensMate-Atom, v0.0.20

# Dev
No dev packages

Probably related to #6226

This was probably resolved along with #6226 in https://github.com/atom/atom/commit/06b8195fb8de1fe21755f1469004d11498280aec


Preops 1332

Content from Confluence page has been added to the Tech Note.  I'm not sure about some of the formatting and can use a second opinion about the choices I made.  THANKS

Renamed current branch to tickets/PREOPS-1332, included all merges and comments up to this point into tickets/PREOPS-1332. A new pull request will be created with the reviewers


createProgram() options lib values should match --lib values

TypeScript Version:
3.1.3
Search Terms:
lib target
Code
{
  "compilerOptions":
  {
    "lib":"ES2017,DOM",
    "target":"ES2017"
  }
}

const ts = require('typescript');
const compilerOptions = require('tsconfig.json').compilerOptions;

const host = ts.createCompilerHost(options);
const prog = ts.createProgram('my_file.ts', options, host);

Expected behaviour:
The compiler options docs use upper-case names when providing the possible lib values:

List of library files to be included in the compilation.

However, you must use the actual lower-case lib filenames, such as lib.es5.d.ts, lib.es2017.d.ts, lib.dom.d.ts, in order for the lib compiler option to work as expected.
Actual behaviour:
Using the documented --lib values doesn't work for the lib compiler option.
The createProgram() function could be updated to perform the documented value to filename value mapping, or the internal libMap array could be exposed.

If you're using the API, you want to use getParsedCommandLineOfConfigFile to get the config values from the tsconfig - those do all the proprocessing and looking-up you need to do (including supporting extends). lib is far from the only compiler option that has a different, "friendly" representation in a tsconfig than it has in our internal CompilerOptions type (it's just one of only a few where the friendly version and the internal version share a type).


Citizen card - Licenses modal - Remove button close modal

What version of Node.js are you using?
does not matter
What version of npm are you using?
does not matter
What operating system are you using?
does not matter
What version of SnailyCAD are you currently using?
v1.0.0-beta.87
Describe the Bug
The modal window closes when you click the delete license type button

Expected Behavior
The license type can be removed. When saving the data, the user should see a message stating that the type must be specified.
To Reproduce
No response

I have noticed this too on all modals, I haven’t gotten time to fix this yet.

I honestly have no idea where this came from, nor can I find out where it comes from :/. Will do some more digging in the coming week.


Required package: debug

Hello, I'm trying to handle flatconfig and I tested this fork but got the following error :
error when starting dev server: Error: @nabla/vite-plugin-eslint tried to access debug, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Using Yarn PnP 4.1.1

Fixed on 2.0.4!


Dark Gray Basemap draws on top of raster layers in a web map

I was creating a web map that contained many image service layers and when I changed from the default basemap to the dark gray basemap all my layers became hidden.  This does not happen when I change to any of the other basemaps.

Added to backlog: https://app.asana.com/0/22897918293134/54312512723512

This has been fixed.  Assigning to @ACueva for verification and explanation of the issue.

FYI @kAilshie. Long story short, I goofed when I created this basemap.  I had swapped the base layer with overlay layer.  I manually edited the json config for this web map.

@ACueva @NatalieCampos and FYI to others that stumble across this... Working with Avi we found out that the web app-builder basemap gallery widget caches all the basemap layer configurations. Since the application was built before the basemap fix I also had to go into my web application and update the basemap gallery widget's configuration to fix this in my app.

@elinz I also had to fix this manually on my Ops Server.  I don't think it was included in the Patch...but it should be noted as something that needs to be fixed (if there is another patch or another announcement to the group who have Ops Servers).


Fixes: The boxes enlarge in the "What we do section" of About Page.

Fixes #541
Now the boxes enlarge when the user hovers on it.
you can see in the Video:-
https://github.com/digitomize/digitomize/assets/82056580/84f91098-739c-47ea-b338-7837b7404b8a

Summary by CodeRabbit

New Features

Introduced hover effects with animation on the About page for an enhanced user experience.

Style

Integrated Tailwind CSS for more efficient and consistent styling across the app.

Documentation

Updated the HTML document to reference new stylesheets.

Please someone guide me , what actually fails  in this pull request.

Hey, it kinda looks odd there. Maybe it's too big for others and doesn't fit well. Also we don't want css file for this, please add tailwind classes for such things

Also ignore the greeting fail in PR

okay, @pranshugupta54 I tried , thank you


Too many open files error

Hi.
When I try to run a query I'm getting below error on query screen

Unknown exception / java.lang.RuntimeException: java.io.FileNotFoundException: var/druid/processing/druid-groupBy-965baa0b-301e-485a-b569-fa6853af9a4f_bb9d8881-5677-406b-9b9c-22d2e996e929/00005516.tmp (Too many open files) / java.lang.RuntimeException / on host slave07:8083

And this is full stacktrace

2020-07-08T06:44:10,234 ERROR [processing-9] com.google.common.util.concurrent.Futures$CombinedFuture - input future failed.
java.lang.RuntimeException: java.io.FileNotFoundException: var/druid/processing/druid-groupBy-fc7a996e-0346-4ed2-9057-882b101efc63_c577d967-e492-44e8-8f69-a0a433509f21/00006647.tmp (Too many open files)
at org.apache.druid.query.groupby.epinephelinae.SpillingGrouper.read(SpillingGrouper.java:327) ~[druid-processing-0.18.1.jar:0.18.1]
at org.apache.druid.query.groupby.epinephelinae.SpillingGrouper.iterator(SpillingGrouper.java:252) ~[druid-processing-0.18.1.jar:0.18.1]
at org.apache.druid.query.groupby.epinephelinae.ConcurrentGrouper$1.call(ConcurrentGrouper.java:351) ~[druid-processing-0.18.1.jar:0.18.1]
at org.apache.druid.query.groupby.epinephelinae.ConcurrentGrouper$1.call(ConcurrentGrouper.java:347) ~[druid-processing-0.18.1.jar:0.18.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_252]
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:247) [druid-processing-0.18.1.jar:0.18.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.io.FileNotFoundException: var/druid/processing/druid-groupBy-fc7a996e-0346-4ed2-9057-882b101efc63_c577d967-e492-44e8-8f69-a0a433509f21/00006647.tmp (Too many open files)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_252]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_252]
at java.io.FileInputStream.(FileInputStream.java:138) ~[?:1.8.0_252]
at org.apache.druid.query.groupby.epinephelinae.SpillingGrouper.read(SpillingGrouper.java:322) ~[druid-processing-0.18.1.jar:0.18.1]
... 8 more

I did a search and every solution I found suggest increasing  ulimit but even I set all ulimit parameters to unlimited I keep getting this error.
What else can cause this error?
Druid version: 0.18.1

may be you have use group by V2 engine ,when there is many result group ,there are many small files split in to the disk;
so you can limit the use case or use group by engine v1;

Actually this query sent by superset as druid sql. Even if I convert it native query, it will not solve my problem.

may be you have use group by V2 engine ,when there is many result group ,there are many small files split in to the disk;
so you can limit the use case or use group by engine v1;

@ibotheperfect sometimes there are a couple of different settings to set the ulimit properly depending on your OS distribution. Could you please double check if the setting has been applied properly?

My os is debian 9.8 and here my ulimit and sysctl settings I set

#ulimit -n
999999
#ulimit -u
257220

and sysctl

fs.file-max = 3233101
vm.max_map_count = 655300


Cannot deploy serverless signalR and upstream function app from pipeline

Describe the bug
Using a devops pipeline to deploy a serverless signalR resource with an associated upstream function app.  SignalR extension key not created in the Function App so cannot extract from function app and feed it into upstream rule in SignalR.
To Reproduce
Use the SignalR bidirectional serverless sample in the samples repo.  Create a Azure Devops AzureCLI pipeline task that executes a BICEP script to create the Function App and SignalR resource.  Create a subsequent pipeline 'AzureFunctionApp' task that deploys the code to the function app:
The code is deployed, but the 'signalr_extension' System Key is not created.  This prevents the creation of the upstream setting in SignalR.
Exceptions (if any)
Further technical details
Pipeline deployment YML file attached.
BICEP file attached
main.bicep.txt
release.yml.txt

signalr_extension is generated when functions that contain SignalRTrigger are successfully deployed to the Function app. So can you confirm whether it's successfully deployed? Sometimes the deployment fails so that the key is not generated.

Please feel free to reopen the issue if there are updates.


Namespace resolving

Currently namespace isn't resolved. When modules are imported, they are dumped into env. Adding namespace resolving would allow namespace.function to be resolved as env[namespace][function] instead of env[namespace.function]. This change would have to be implemented in Env.find. Another potential concern is if flags should be protected as they could theoretically mess up the environment.

Currently this is fixed in 0.0.11 but flags aren't protected

Some of the changes are implemented but it is very buggy

Changes are hopefully fixed in 0.0.13


Discussion: do we need the question on the fallback branch

The last question that xata init asks is:
Choose a default development branch (fallback branch).
    <Create a new branch>
❯   <None>
    main

I wonder if we really need question. If the user is just starting with Xata, it's unlikely they will understand the question and take the right decision. I'm thinking to just use <None> and the users can add a fallback branch later on when they adopt branching workflows.

My concern if we remove the question is that people will not know about the fallback branch feature and people will use production which is risky. Maybe we can change the question to be more informative such as:
Do you want to use the main branch for development, or do you want to use a different one?

Use the main branch
Create and use a different one
...

I think it's crucial to consider new users, but it's also important to consider that xata init will be used at any point, not just for new users. Maybe I've been using a db in a repo and now I want to use it in another repo. Maybe I'm staring a new database but I've been using xata for a while, etc.

In the original form I found the question confusing, especially because  I think <None> and main would have done the same, so even myself I was getting a bit of choice anxiety :)
In general, I think we should prioritise the new user experience over the advanced one, and putting myself in the shoes of a new user, I would be confused by the question. I think your reworded question is much better, however, we're not quite there with our branching workflows so it might be too early to recommend people to work in a branch.
In addition, I'm worried about the friction of asking at least 5 questions during init, and we've just got started :).

We plan to delete fallback branches as part of p-workflows


Fix Property and ScriptBlock expressions in EntrySelectedBy tags within custom controls

PR Summary
This change sends the current object to expressions defined in EntrySelectedBy tags within custom controls.  Currently attempting to use property expression binding will result in a NullReferenceException, and within a script block expression binding $_/$PSItem will not be set.
Resolves #7847
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] User-facing Documentation needed

[ ] Issue filed - Issue link:

Testing - New and feature

[ ] Not Applicable or can only be tested interactively
OR
[x] Make sure you've added a new test if existing tests do not effectively test the code changed

[ ] Add [feature] if the change is significant or affects feature tests

I think we need tests.

@SeeminglyScience please add tests to Format-Custom.Tests.ps1.  You can look at this as an example.

@SteveL-MSFT Sorry I saw your reply just a few minutes late.  I've added tests, though they are in a different area.  I'll go ahead and move them there.

@SteveL-MSFT Please update your review.

@SeeminglyScience Thanks for your contribution!


Upgrade to TF 0.13 and ibm plugin v1.13.0

Upgrade to TF 0.13
Use the latest ibm provider plugin v1.13.0

Signed-off-by: Yussuf Shaikh<EMAIL_ADDRESS>

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: yussufsh
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 [yussufsh]

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

@yussufsh: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

pull-ocp4-upi-powervs-terraform-validate-release-4.5
71d1477864ced164810a3af89f0206769ae90f01
link
/test pull-ocp4-upi-powervs-terraform-validate-release-4.5

Full PR test history. Your PR dashboard.

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

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Prajyot-Parab, yussufsh
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 [Prajyot-Parab,yussufsh]

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

@yussufsh I'll keep this on hold for few days..

/hold

/unhold

@yussufsh can you please rebase this ?

@yussufsh can you please rebase this ?

With pleasure... :-)

New changes are detected. LGTM label has been removed.

@yussufsh: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

pull-ocp4-upi-powervs-terraform-validate-release-4.5
503215865b0cb78a4d6a3de32ef36daecc325fef
link
/test pull-ocp4-upi-powervs-terraform-validate-release-4.5

Full PR test history. Your PR dashboard.

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

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Prajyot-Parab, yussufsh
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 [Prajyot-Parab,yussufsh]

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

/retest

@bpradipt rebasing done.. even prow job is simpler now.


update: deadpool-sqlite

Closes https://github.com/0xPolygonMiden/miden-node/issues/524

Thanks @varun-doshi, could you also commit the Cargo.lock file? Our CI checks use --forced so its required that the lockfile is up-to-date.
Sorry for the delay; I've been out-of-office.

Thanks @varun-doshi, could you also commit the Cargo.lock file? Our CI checks use --forced so its required that the lockfile is up-to-date.
Sorry for the delay; I've been out-of-office.

Done

Thanks @varun-doshi, could you also commit the Cargo.lock file? Our CI checks use --forced so its required that the lockfile is up-to-date.
Sorry for the delay; I've been out-of-office.

Done

Ah apologies; I didn't notice that you were working from main. We use next as our development branch. Could you redo your two commits, but on the next branch instead of from main?

Thanks @varun-doshi, could you also commit the Cargo.lock file? Our CI checks use --forced so its required that the lockfile is up-to-date.
Sorry for the delay; I've been out-of-office.

Done

Ah apologies; I didn't notice that you were working from main. We use next as our development branch. Could you redo your two commits, but on the next branch instead of from main?

Done here https://github.com/0xPolygonMiden/miden-node/pull/555


update to match new key names

When executing code on Ubuntu 16.04 with Keras 2.0.8 code fails because key names in history dictionary did change.  Given PR fixes this problem
It also fix the CPU to GPU

This is not a version issue, rather it is a compilation issue. The current code expects the model to be compile with metrics=['acc']. I have updated the book sources to add this step right before fit (it's redundant, but that's fine).


pytorch quantization export_xmodel report errror?

I am trying to quantize a custom model using torch_quantizer, but it report error.
during export xmodel  the error occurs.

I have no idea how to solve it?
thanks

I have no idea about this error,  completely no！！
why there is no one answer this question
any clue is helpful, thanks.

Can you show me your vitis-ai version ?

Can you show me your vitis-ai version ?

I don't know how to check my vitis-ai version, but probably the version is V1.3

You can update to v1.3.1. May it can solve your problem.

Hi, @evilidol:
Suppose the issue has been solved in vitis-ai 1.3.1 and later versions. Did you have a try on your model?

Hi @evilidol
Closing since no activity for more than one year, please reopen if you still have question, thanks


Create event doesnt work

This seems to be a known issue, as it's in the docs. However, this really should be fixed. There needs to be some kind of initialized event that can be bound to, particularly if this issue remains is not addressed: https://github.com/edenspiekermann/a11y-dialog/issues/70
As it stands, setting the tabindex on newly created dialogs is impossible, only when they are hidden and shown.

Hey there,
I’m not against fixing that problem, I’m just not sure what the best way would be. What API do you have in mind? From there I can see how to implement it.


Fix change in height of navbar

Related Issue
BUG: When hover on toggle button, it changes the height of navbar
Fixes:  #1218
Description
when user hover mouse cursor on toggle button at left of navbar, it disrupts the size of navbar.  I have fixed this issue, so that change in size of button do not affect the size of container (navbar).
Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
Before:
https://github.com/user-attachments/assets/1d24ed84-f583-4a26-9a92-9c2d13015929
After:
https://github.com/user-attachments/assets/3b9afcf9-f7b0-4a18-a158-a5dccf0e63fc
Checklist:

[x] I have made this change from my own.
[ ] I have taken help from some online resources.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@pynaman Your pull request has been successfully merged! Don't stop here—continue contributing by addressing more issues and aiming to become a top contributor. Exclusive swag awaits for those who go the extra mile!
Great contribution ! 🎉


mounts: accept every mount options

Before we could only ask OSBuild to mount a device as readonly. But devices can have more mount options than this. Supporting more options is necessary for the new version of image-info that is using OSBuild's internals in order to mount the image it wants to work on. Otherwise, for instance, some umasks aren't applied properly and we can get differences in rpm-verify results, thus corrupting the DB.
With this commit OSBuild accepts a string array containing all the options necessary to mount a given device. To mount a device as readonly, a use just needs to send "ro" alongside the options list.

Just from a first glance, I'll do a proper review later: won't this break all current manifests using this stage as the readonly option is removed?

Just from a first glance, I'll do a proper review later: won't this break all current manifests using this stage as the readonly option is removed?

It won't, because I introduced the readonly for manifest-db in the previous commit in november, it's never used for building manifests.  https://github.com/osbuild/osbuild/commit/5112f72cbf0caea7699b5ac77a60c903c9c57561

However, I've been quite drastic with the changes and I broke ostree, so I have to fix this ^^

Just from a first glance, I'll do a proper review later: won't this break all current manifests using this stage as the readonly option is removed?

It won't, because I introduced the readonly for manifest-db in the previous commit in november, it's never used for building manifests. 5112f72

I think that we want to keep backward compatibility if possible. One thing are manifests generated by composer, another is that there is the "mpp" tooling and in reality someone could be using that option. So if there is a way to extend the stage in a backward compatible way, we should do it.

I think that we want to keep backward compatibility if possible. One thing are manifests generated by composer, another is that there is the "mpp" tooling and in reality someone could be using that option. So if there is a way to extend the stage in a backward compatible way, we should do it.

That makes sense. I can keep the readonly option in any case and add and "mount_opts" ? I'll do this right away!

I think that we want to keep backward compatibility if possible. One thing are manifests generated by composer, another is that there is the "mpp" tooling and in reality someone could be using that option. So if there is a way to extend the stage in a backward compatible way, we should do it.

That makes sense. I can keep the readonly option in any case and add and "mount_opts" ? I'll do this right away!

So keeping the readonly and adding something new for additional opts is one approach. Also the schema can specify oneOf and have the "orignial" and "new" options. This will make it then more complex on the implementation side.

Also the schema can specify oneOf and have the "orignial" and "new" options. This will make it then more complex on the implementation side, but probably not too much.

I don't like this.  I'm generally not fond of having the options so wide open and arbitrary.  What mount options do we need exactly?  Are we adding this because a couple of options were necessary?  If so, let's just add those.
One thing that's great about osbuild stage options is they're very often "type safe", in the sense that when there's a set of known options and values, the stage itself enforces valid input.  Opening it up to a list of arbitrary strings makes it much more possible to have manifests that validate but don't build.  I understand the appeal of having options that allow "anything" so that the manifest generator doesn't need to keep adding options when needed, but it's not a good general design and makes it much more likely to break things.

Also the schema can specify oneOf and have the "orignial" and "new" options. This will make it then more complex on the implementation side, but probably not too much.

I don't like this. I'm generally not fond of having the options so wide open and arbitrary. What mount options do we need exactly? Are we adding this because a couple of options were necessary? If so, let's just add those.

Do we have a way to anticipate every mount options we would need in order to run image-info ?

Because, if we don't mount correctly the partitions, we're at risk of generating wrong image-info content.

Also the schema can specify oneOf and have the "orignial" and "new" options. This will make it then more complex on the implementation side, but probably not too much.

I don't like this. I'm generally not fond of having the options so wide open and arbitrary. What mount options do we need exactly? Are we adding this because a couple of options were necessary? If so, let's just add those.
One thing that's great about osbuild stage options is they're very often "type safe", in the sense that when there's a set of known options and values, the stage itself enforces valid input. Opening it up to a list of arbitrary strings makes it much more possible to have manifests that validate but don't build. I understand the appeal of having options that allow "anything" so that the manifest generator doesn't need to keep adding options when needed, but it's not a good general design and makes it much more likely to break things.

I discussed this with Achilleas and 100% agree. It will be probably a bit more work, but it will prevent us making errors in the future and it would allow us to do validation before we start building an image, not during the build.

Also the schema can specify oneOf and have the "orignial" and "new" options. This will make it then more complex on the implementation side, but probably not too much.

I don't like this. I'm generally not fond of having the options so wide open and arbitrary. What mount options do we need exactly? Are we adding this because a couple of options were necessary? If so, let's just add those.

Do we have a way to anticipate every mount options we would need in order to run image-info ?

We don't need to anticipate what will be needed in the future, it is OK to support only what we need now. Since all partitions and fstab are created as part of the image build from manifest that is generated by composer, we should have a pretty good idea of the minimal set that we will need.

Because, if we don't mount correctly the partitions, we're at risk of generating wrong image-info content.

We can probably make image-info fail in case it runs into mount option that is not supported by osbuild. This would be a signal that osbuild needs to be extended and would prevent us wondering if a change in image-info report is a result of mounting the partition in a wrong way.

I'm good with that. I grepped all the fstab entries in the current DB and I'll support this for a starter. Hope it's enough!

I think, we're good with supporting:
ro
defaults
uid
gid
umask
shortname

For reference, this is what I see in manifest-db:
❯ jq '.manifest.pipelines[].stages[] | select(.type == "org.osbuild.fstab") | .options.filesystems[] | (.vfs_type + ": " + .options)' manifest-db/* | sort -u
"ext4: defaults"
"vfat: defaults,uid=0,gid=0,umask=077,shortname=winnt"
"vfat: umask=0077,shortname=winnt"
"xfs: defaults"

For reference, this is what I see in manifest-db:
❯ jq '.manifest.pipelines[].stages[] | select(.type == "org.osbuild.fstab") | .options.filesystems[] | (.vfs_type + ": " + .options)' manifest-db/* | sort -u
"ext4: defaults"
"vfat: defaults,uid=0,gid=0,umask=077,shortname=winnt"
"vfat: umask=0077,shortname=winnt"
"xfs: defaults"

I think we're all covered. Also I've setup OSBuild to raise an exception if we send an unsupported mount option. That should be quite noticeable in the logs in manifest-db.

Explicit option names is something I like as well. I am a very tiny bit on the fence about the umask being a string. Especially since we have special delimiting characters in here (,). Could it perhaps be regexed to not allow , and = (or others)?

Would a pattern validation in the schema be good enough ?
    "umask": {
      "description": "mount the source with given umask",
      "type": "string",
      "pattern": "^[0-7][0-7][0-7]$"
    }

Explicit option names is something I like as well. I am a very tiny bit on the fence about the umask being a string. Especially since we have special delimiting characters in here (,). Could it perhaps be regexed to not allow , and = (or others)?

Would a pattern validation in the schema be good enough ?
    "umask": {
      "description": "mount the source with given umask",
      "type": "string",
      "pattern": "^[0-7][0-7][0-7]$"
    }

Yes!


Is it possible to run micropython on the A9G?

is it possible to flash the A9G with micropython?  If so, are there any instructions or flash tool?

I took over the micropython port at https://github.com/pulkin/micropython/tree/master/ports/gprs_a9 . I ported GPS and the next thing on the list is the GSM module itself. Testers are welcome.

Awesome! Hats off to you, when I have some time to flash the board I will give it a shot

Great job. GPS+GPRS are what people brings to this hardware. I'm too busy right now, but am looking forward to try this as well in a month or so.

I started porting sockets and, in principle, the port should be already usable for something as simple as GPS tracking application. I am aware of several ways to make the module unresponsive so watchdog is absolutely necessary. Have fun (I will no longer advertise in this thread).
import cellular as c
import usocket as sock
import time

print("Waiting network registration ...")
while not c.is_network_registered():
    time.sleep(1)

print("Delay 2 sec ...")
time.sleep(2)
print("Activating ...")
c.gprs_activate("internet", "", "")

print("Local IP:", sock.get_local_ip())
print("Resolving ...")
ip = sock.dns_resolve("portquiz.net")
print("IP:", ip)

s = sock.socket()
print("Connecting ...")
s.connect((ip, 80))
print("Sending ...")
print("Sent:", s.send("hi\n"))
print("Receiving ...")
print("Received:", s.recv(128))

@pulkin @Neutree Im trying for a few days to get Micropython working on my module, and just can't.
I followed everything, generated the hex from ports/gprs_a9 (build was sucessful), uploaded the .lod file (also with success) but than I can't connect to module, upload file or do anything. Tried to get any response using pyserial, rshell or ampy, and nothing. Already tried using Windows and Ubuntu and also with the Docker image.
Programming/uploading generated hex files in the normal way using C++ works normally. I just can't get micropython to work with this module. Can anyone please give me some light here?

There could be several options. First, wiring. Are you sure you connect another USB2TTL to TX1/RX1?

Ok my fault, now it's working.
Actually I just had the idea to change pins to TX1/RX1 as you proposed, some hours ago (would be great if you could put it on the readme for the new users).
I tried it before and it didn't worked but now it works, no idea why. Anyways thanks for the help, and great work!

Hi,
After I insert SIM and restart, it hangs and can't run any python code. But the its GSM modem seems to work because I can make a call to the number on the chip.
If I donot insert SIM, I can run python code.
Please note that I connect the power thru the 5v USB.

doc..
https://github.com/pulkin/micropython/tree/master/ports/gprs_a9#cellular


mvn clean package failed

mvn buld failed after as below
mvn clean package -Dmaven.test.skip=true -Drat.skip=true

Reported Error
[INFO] Group ID             : io.cdap.plugin
[INFO] Artifact ID          : cdc-plugins
[INFO] Version              : 2.0.0-SNAPSHOT
[INFO] Base Directory       : /root/change-data-capture
[INFO] Build Directory      : /root/change-data-capture/target
[INFO] Widgets Directory    : widgets
[INFO] Icons Directory      : icons
[INFO] Docs Directory       : docs
[INFO] CDAP Artifacts
[INFO]  system:cdap-data-streams[6.0.0,7.0.0)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  53.537 s
[INFO] Finished at: 2019-07-31T23:32:59Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.cdap:cdap-maven-plugin:1.1.0:create-plugin-json (create-artifact-config) on project cdc-plugins: Widget file 'CTSQLServer-streamingsource.json' has incorrect JSON. Expected a ',' or '}' at 2701 [character 11 line 77] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
root@cdap-1-vm:~/change-data-capture#
as , was missing at line 77 in widgets/CTSQLServer-streamingsource.json
73           "widget-type": "textbox",
74           "label": "Max Batch Size",
75           "name": "maxBatchSize",
76           "description": "Size of a record batch per pipeline batch interval"
77           "widget-attributes" : {
78             "default" : 100000
added , at   76           "description": "Size of a record batch per pipeline batch interval",
and ran mvn clean package -Dmaven.test.skip=true -Drat.skip=true

I cannot reproduce this. Are you sure you haven't modified that json file?


Does this work on UWP? If not why does the documentation say it does? How can I contribute to making UWP work?

Does this work on UWP? If not why does the readme say it does?
How can I contribute to making UWP work?
Is there a specific branch on which this is being worked on so that I can help out?
Steps to reproduce
Try using it on UWP
Expected behavior
Should work
Actual behavior
Doesn't work
Configuration
Version of the Plugin: 2.1.2
Platform: UWP

Hi @nchrisr,
I'm the friendly issue checker.
It seems like (25.00 %) you haven't used our issue template :cry: I think it is very frustrating for the repository owners, if you ignore them.
If you think it's fine to make an exception, just ignore this message.
But if you think it was a mistake to delete the template, please close the issue and create a new one.
Thanks!

Does this work on UWP? If not why does the readme say it does?

Well, the stable version 2.1.2 does not support UWP, but there is a 2.2.0 pre-release with some amount of UWP support (which is not fully 'final' yet). I haven't tried it myself, and therefore I'm not sure what state it is in.

Is there a specific branch on which this is being worked on so that I can help out?

https://github.com/xabre/xamarin-bluetooth-le/commits/uwp-support

How can I contribute to making UWP work?

Check the current state of things, identify things that do no work. Document them and/or open issues (if not existing yet). Possibly try to fix them (open a PR if you succeed).

@nchrisr  : Let me know if you want to collaborate on this.

@baskren I would be interested in collaborating on this. I will need some time to have a look at the architecture and see what I can decypher, but based on your description, I have found some links that may be useful

https://github.com/jasongin/noble-uwp/issues/20#issuecomment-371409715
https://stackoverflow.com/questions/39599252/windows-ble-uwp-disconnect/43609852#43609852

Let me know how you want us to proceed.

@nchrisr :  Yes, I think we're on the same page (with respect to what's needed to disconnect).  The code isn't quite architected to make this quick, one line change.  I'll take a look and post for you a proposed change.  I don't think it's going to be pretty so it would be nice to get some feedback from @janusw as to how he would like this to be done (so I don't have to face the crippling assault on my self esteem when he - for good reason - rejects a half baked pull request).

FWIW, I was able to get the uwp_creators_support branch working by making the following changes:
Source/Plugin.BLE.UWP/Device.cs
Add the following:
        public void NativeDisconnect()
        {
            ClearServices();

            var bluetoothAddress = Convert.ToUInt64(Id.ToString("N").Substring(20), 16);
            NativeDevice.BluetoothLEDevice.Dispose();
            Task.Run(async () =>
            {
                var nativeDevice = await BluetoothLEDevice.FromBluetoothAddressAsync(bluetoothAddress);
                NativeDevice = new ObservableBluetoothLEDevice(nativeDevice.DeviceInformation);
            });

        }

Source/Plugin.BLE.UPW/Adapter.cs
change the contents of DisconnectDeviceNative method to:
        protected override void DisconnectDeviceNative(IDevice device)
        {
            // Windows doesn't support disconnecting, so currently just dispose of the device
            Trace.Message($"Disconnected from device with ID:  {device.Id}");
            /*
            if (device.NativeDevice is ObservableBluetoothLEDevice)
            {
                ((Device)device).ClearServices();
                device.Dispose();
            }
            */

            if (device is UWP.Device uwpDevice)
                uwpDevice.NativeDisconnect();
        }

Source/Plugin.BLE.Abstractions/AdapterBase.cs
change the content of DisconnectDeviceAsync to:
        public Task DisconnectDeviceAsync(IDevice device)
        {
            if (!ConnectedDevices.Contains(device))
            {
                Trace.Message("Disconnect async: device {0} not in the list of connected devices.", device.Name);
                return Task.FromResult(false);
            }

            /*
            return TaskBuilder.FromEvent<bool, EventHandler<DeviceEventArgs>, EventHandler<DeviceErrorEventArgs>>(
               execute: () => DisconnectDeviceNative(device),

               getCompleteHandler: (complete, reject) => ((sender, args) =>
               {
                   if (args.Device.Id == device.Id)
                   {
                       Trace.Message("DisconnectAsync Disconnected: {0} {1}", args.Device.Id, args.Device.Name);
                       complete(true);
                   }
               }),
               subscribeComplete: handler => DeviceDisconnected += handler,
               unsubscribeComplete: handler => DeviceDisconnected -= handler,

               getRejectHandler: reject => ((sender, args) =>
               {
                   if (args.Device.Id == device.Id)
                   {
                       Trace.Message("DisconnectAsync", "Disconnect Error: {0} {1}", args.Device?.Id, args.Device?.Name);
                       reject(new Exception("Disconnect operation exception"));
                   }
               }),
               subscribeReject: handler => DeviceConnectionError += handler,
               unsubscribeReject: handler => DeviceConnectionError -= handler);
            */

            return Task.Run(() => DisconnectDeviceNative(device));
        }

Note that I'm not yet sure why I had to make that last change - for some reason, the getCompleteHandler is not fired when the execute: action is completed.  Haven't looked into that yet.
Also, I did all of the above before I merged the latest master commit with the uwp-support branch.  Looks like there are some interface changes that the UWP implementation needs before a more thorough investigation (of the above issue) can occur.

Wow. @janusw , if you could do #1, that would be most awesome!  Yes, count me in for #2 and #4.

Wow.

What was that for? The twelve open UWP issues?

@janusw , if you could do #1, that would be most awesome!

I'll try to look into it within a week ...

Yes, count me in for #2 and #4.

Awesome!

I did not do any actual runtime testing yet. @baskren I hope you can take over for step #2 here ...

I have tested it with my code and the only problem I found so far was a null-reference crash in StartScanningForDevicesAsync (pull request #594 submitted).

Thanks for the testing! I have just merged that one into the uwp branch.

Just submitted a new PR - Was getting some more null-reference crashes during GATT Service queries. I can confirm that the proposed changes prevent the crashes, however, I am not sure that this is the best way to handle null-references that occur in async methods. Please review before merging.
As for the reason that Microsoft.Toolkit.Uwp.Connectivity versions >= 7.0.0 cause a crash, apparently it is because ObservableBluetoothLEDevice now uses the property HasThreadAccess, which was only introduced in Windows SDK version 10.0.18362.0 - However the NuGet package declares that it only requires Windows SDK 10.0.17763.0

Closed PR #595 (see comments for why) and submitted revised PR #596 to match the way that the Android code handles nulls in GetServicesNativeAsync()

Thanks for your testing and improvements so far, @fozzzgate.
I have also pushed a few more changes to the uwp branch. The GitHub Actions build job runs through now (and produces a nuget that can be used for testing).
However, there is still one problem with the sample client (BLE.Client.UWP). It throws this exception on startup:
System.ArgumentException: '[Acr.UserDialogs] This is the bait library, not the platform library.  You must install the nuget package in your main executable/application project'

I am a bit puzzled about how to fix this. AFAICS the Acr.UserDialogs package is included both in BLE.Client and BLE.Client.UWP. Does anyone have an idea what to do about this?

Ended up taking a quick look at the BLE.Client.UWP 'Scan' crash and pushed a fix as part of PR #599

Cool. This is merged by now, making the UWP sample client work finally. Also the GHA build works flawlessly on the UWP branch.
This represents sort of a small milestone to me, which justifies tagging a first pre-release of 2.2.0.
@nchrisr, @baskren Any feedback from your side at this point? Do you see any urgent showstoppers? Would you agree that it's a good time to tag a pre-release and upload it to nuget.org? Or is there anything that should be fixed first?

@janusw Apologies I have been a unavailable for a bit. I will test this out tomorrow and share any information on any issues I find.

I just released 2.2.0-pre5, and I'm closing this issue. For any remaining problems with UWP, please open a new issue.


Crash with Entity Texture Features

MC 1.19.1
Fabric API 0.58.5
ETF 4.0.1
Puzzle 1.3.4
To reproduce simply have the mods installed and click on the puzzle icon in video settings. Reporting here and not to ETF because ETF alone works. ETF also doesn't crash in Mod Menu.
Logs: https://gist.github.com/Footage2-Amply-Pounce/3c478bdfac434d0d87148e03f16d7bc2

Hi, I have the same issue :(

ETF has had to change some file locations due to using architechtury now and puzzle needs to use the ETFApi.class (https://github.com/Traben-0/Entity_Texture_Features/blob/master/common/src/main/java/traben/entity_texture_features/ETFApi.java) to fix it, i've tried to make a PR for this but my fork of puzzle doesn't build for some reason

got it sorted there is a fix in PR #43


Create a BIDSapp using the package

Finally, we will create the BIDSapp using Docker. The handling of BIDS structure will be through pyBIDS.

The BIDS App has been made and is moved to https://github.com/BIDS-Apps/rsHRF


Consider adding an RuntimeApiExt trait to kube-runtime

I.e. add a trait that allows (after importing) the following changes (as an MVP):
-let stream = watcher(api, lp).applied_objects();
+let stream = api.watcher(lp).applied_objects();
-let cond = await_condition(api, "mycm", my_condition_fn);
+let cond = api.condition("mycm", my_condition_fn);

It should be fairly innocuous to do; it's unlikely we are ever going to kill off Api (unless we want to re-open any bigger discussions on neokubism) so we should make them as nice to work with as possible.
Having chaining here is simpler, allows simpler fn names, easier LTR scannability, and reduces the chance of passing in the wrong api (although unlikely if given further constraints but still possible).
Other potentials for inclusion in such an ext trait would be; delete_and_finalize, finalizer.

Well, turns out this is incredibly complicated to do as a trait. Was trying something along the lines of:
pub trait RuntimeApiExt
{
    type R: Resource + Clone + Debug + DeserializeOwned + Send + 'static;
    fn watcher(&self, lp: &ListParams) -> impl Stream<Item = Result<Event<Self::R>>> + Send
    {
        watcher(self.clone(), lp)
    }

    async fn condition(&self, name: &str, cond: impl Condition<Self::R>) -> Result<Option<Self::R>, WaitErr> {
        await_condition(self, name, cond).await
    }
}

impl<K: ?Sized> RuntimeApiExt for Api<K>
where K: Resource + Clone + DeserializeOwned + Debug + Send + 'static
{
    type R = K;
}

but that has so many complications:

pulls in async_trait crate
can't use impl Stream in return of trait signatures (so have to convert watcher into a concrete Stream type)
cannot make this generic over K because there's no trait for Api<K> so the signatures doesn't actually match anyway

we also cannot make this an impl Api<K> where K:... because it would have to be a cross-crate impl.
...maybe this isn't a good idea with the current async rust setup.


PopupMenuButton doesn't have Semantics.onTap, so iOS an Android

Steps to reproduce

Turn on Voice Control on iOS
Say "show numbers"
See that PopupMenuButton doesn't have a number, and doesn't read like a button

Expected results
PopupMenuButton should read like a button, show a number, and when tapped with Voice Over, it should show the menu.
Actual results
No number, doesn't show menu when tapped with Voice Over.
Code sample
// This is the sample code from the documentation.
import 'package:flutter/material.dart';

enum SampleItem { itemOne, itemTwo, itemThree }

void main() => runApp(const PopupMenuApp());

class PopupMenuApp extends StatelessWidget {
  const PopupMenuApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: PopupMenuExample(),
    );
  }
}

class PopupMenuExample extends StatefulWidget {
  const PopupMenuExample({super.key});

  @override
  State<PopupMenuExample> createState() => _PopupMenuExampleState();
}

class _PopupMenuExampleState extends State<PopupMenuExample> {
  SampleItem? selectedItem;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('PopupMenuButton')),
      body: Center(
        child: PopupMenuButton<SampleItem>(
          initialValue: selectedItem,
          onSelected: (SampleItem item) {
            setState(() {
              selectedItem = item;
            });
          },
          itemBuilder: (BuildContext context) => <PopupMenuEntry<SampleItem>>[
            const PopupMenuItem<SampleItem>(
              value: SampleItem.itemOne,
              child: Text('Item 1'),
            ),
            const PopupMenuItem<SampleItem>(
              value: SampleItem.itemTwo,
              child: Text('Item 2'),
            ),
            const PopupMenuItem<SampleItem>(
              value: SampleItem.itemThree,
              child: Text('Item 3'),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video
b/368310506
Flutter Doctor output
[✓] Flutter
    • Framework revision edb4c84317 (1 days ago), 2024-10-16T00:00:00.000
    • Engine revision c69ed59b01
    • Dart version d916a5f69a

[✓] Android toolchain - develop for Android devices (Android SDK version Stable)
    • Platform Stable, build-tools Stable
    • Java binary at: /Applications/Android Studio with Blaze Beta.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.94.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a

Hi @franciscojma86, it appears that the title may be incomplete, can you please update it?
Also, I just tested on my iPad M1 Air running iOS 18 and it seems to be working as expected. Tested with stable 3.24.3.
Kindly See the recording below
https://github.com/user-attachments/assets/40847908-873c-4def-854f-b8f42ec65f1b

Actually, I just found that this problem is in my code. Please disregard. Thanks!


License generation

Current Behavior
package.json has no license on new project init

Desired Behavior
Some way to have tsdx assist in adding a license.
Suggested Solution
Add ability to select a license to init, or, to keep init as frictionless as possible, add a second tsdx command tsdx license which adds a license field to package.json and inserts the license that was chosen from the CLI.
Who does this impact? Who is this for?
Anyone making a library to publish with tsdx will likely want to license their project.
Describe alternatives you've considered
You could create the license on github when you create a new repository and then add the remote locally and do a git pull origin master --allow-unrelated-histories, but that is a somewhat complex workflow that messed up the projects HEAD, and creates an ugly initial history for your project.
-or-
Docs could recommend something like lice to assist with this

thanks for filing this idea! i am a fan of encouraging people to specify licenses in everything, however, jared has strong opinions here on how he wants the tsdx create experience to work. leaving for him to decide.

We should make a default and document it.  People will change it accordingly

We should make a default and document it.
sounds good. WTFPL?

MIT


Session#reject sends 486, not 480

As mentioned at https://groups.google.com/d/msg/sip_js/Vp0xBn8MtUI/-sPuG969meIJ

Some links:

480
486
A "common scenario" for 486

486 as described explicitly states that the user is busy and is not willing or able to take additional calls.  The description for 480 also allows for things such as not wanting to be disturbed, application-level filtering, etc.  Unless we can say for certain that the user being busy (and not otherwise unavailable) is the default case when calling session.reject(), we definitely should not change this.
And...even if we do establish that, I don't believe it is worth it to change the default response code at this point, when the RFC and the API allow for both options.


Institution configuration options in aggregate

@DRvanR 👀

two lil' things.

@DRvanR, I removed the optional arguments.
You described my thought process on the set vs change exactly. In parlance, I would prefer setting an option. However, that could be confused with setters in code (which they explicitly are not). I also considered toggle but that feels more like the general process of inverting a binary option. For lack of a better alternative, I would keep it this way.

:+1: