Send address to vehicle

iPhones can send addresses to a Tesla. I would love to be able to send addresses from Home Assistant.

Feel free to submit a PR. https://github.com/zabuldon/teslajsonpy/blob/dev/teslajsonpy/endpoints.json

@alandtse https://github.com/zabuldon/teslajsonpy/pull/399 was merged, is there anything needed in this repo to upgrade or support it?

Yes. Someone needs to do a PR to bump teslajsonpy. There's tons of examples.

Looks like it auto versions based on semver per the semantic_release action?
Do we just need to merge to main here? https://github.com/zabuldon/teslajsonpy/pull/400

Yah I forgot I hadn't merged the version bump PR last night due to the ci testing so it wasn't released yet.

How'd you go Brian?
Bumped required to 3.7.5 in manifest.json at this end and the call above now working perfectly for me :)
Thank you both for your help 👍

@kalavo, I gotta update the dependency but I don't have a proper python environment with poetry setup. I was having some issues getting it all setup. I will definitely come back to this, but it might be a few days.

Ah, I believe I found where, under /developer-tools/service

Quickest way to start testing is to go to Developer Tools, then click Services.
Should be able to copy, paste above with a few minor changes.
binary_sensor.online was the default when I installed the Tesla api. It contains the vehicle_id, vin, id and state. You can just copy and paste the id instead if you prefer. If you can’t find it, sing out.
locale you probably need en-us
and address, well up to you…
11163 Santa Monica Blvd, Los Angeles, CA 90025 ? :)

It worked!
It took me a while to find the vehicle id. For posterity, I found it by going to my vehicle's device page (settings > devices > search), clicking the "Online" sensor, then expanding the Attributes section. It's the ID attribute (confusingly, not Vehicle ID).
Using the incorrect id results in an unhelpful error message.

Failed to call service tesla_custom.api. Unknown error

The logs were not much more informative.
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/tesla_custom/services.py:110
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:30:24 PM (4 occurrences)
Last logged: 9:34:06 PM

[140003098495248] Error handling message: Unknown error (unknown_error) Brian from <IP_ADDRESS> (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 647, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/tesla_custom/services.py", line 54, in async_call_tesla_service
    await api(service_call)
  File "/config/custom_components/tesla_custom/services.py", line 110, in api
    path_vars = parameters.pop(ATTR_PATH_VARS)
  File "/usr/local/lib/python3.10/site-packages/teslajsonpy/controller.py", line 1323, in api
    return await self.__post_with_retries("", method=method, data=kwargs, url=uri)
  File "/usr/local/lib/python3.10/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/tenacity/_asyncio.py", line 47, in __call__
    do = self.iter(retry_state=retry_state)
  File "/usr/local/lib/python3.10/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/site-packages/tenacity/_asyncio.py", line 50, in __call__
    result = await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/teslajsonpy/controller.py", line 1333, in __post_with_retries
    return await self.__connection.post(command, method=method, data=data, url=url)
  File "/usr/local/lib/python3.10/site-packages/teslajsonpy/connection.py", line 161, in post
    return await self.__open(url, method=method, headers=self.head, data=data)
  File "/usr/local/lib/python3.10/site-packages/teslajsonpy/connection.py", line 210, in __open
    raise TeslaException(resp.status_code)
teslajsonpy.exceptions.TeslaException

Awesome! Glad you got it working! Happy navigating :)

Please consider updating the wiki if you have a good example. Others can then benefit from this thread which will quickly get buried.

Please consider updating the wiki if you have a good example. Others can then benefit from this thread which will quickly get buried.

Done
https://github.com/alandtse/tesla/wiki/Share

Thanks, you're awesome!


[KOGITO-3478] Upgrade to ce-2.0.0-milestone3

Signed-off-by: ruromero<EMAIL_ADDRESS>Fix https://issues.redhat.com/browse/KOGITO-3478

jenkins retest this


Server() method in helper.go Problem

hi, tidwall:
While i trying to get service status, call method Server() in  helper.go, Error occurs:
%s invalid character '\x00' looking for beginning of value
%s invalid character '$' looking for beginning of value
why?

I'll look into this. Would it be possible to provide the error message in its entirety?
Thanks for reporting.

Execute the following code will appear above the output problems.

I would like to reproduce this error. Which client library are you using?

https://github.com/go-redis/redis

Thanks for providing the example code.

While i trying to get service status, call method Server() in helper.go, Error occurs:
%s invalid character '\x00' looking for beginning of value
%s invalid character '$' looking for beginning of value

Do you know which line number this error is occurring on?

Before using this approach，

Errors caused by m.statTs().
func (m *Metrics) Json() string {
	m.statDCL()
	//m.statTS()

	bs, err := json.MarshalIndent(m, "", "    ")
	if err != nil {
		return err.Error()
	}
	return string(bs)
}

func (m *Metrics) statTS() {
	var err error
	for i, s := range m.s.tile38Conns {
		m.TS[i], err = s.Server()
		if err != nil {
			glog.Warningf("execute tile38 ServerStats failure, %s", err.Error())
		}
	}
}

Thanks. This is helpful. I'll try to fix is asap.

I'm unable to reproduce this error.
One thing to note is that the github.com/tidwall/tile38/client.Conn object is not thread safe. I noticed that you are creating a connection in the initTile38() function, and then using the connection in both a goroutine and in a the statTS() function. It's possible that the read data is being corrupted. If so, this would lead to problem that you are seeing.
I recommend switching to a client library like redigo, which handles connection pooling inside goroutines very well.
The only caveat is that; if you want to have JSON output, you must include the OUTPUT JSON command right away.

@tidwall ，
Thanks,  Looks like this causes， i changed REDIS use libraries.


Include both CPU and GPU calculation on the same session

This is needed for a more accurate estimation of the carbon footprint of GPU-based tasks like machine learning.

Done!


(PUP-10445) Deprecate base rest methods

Deprecate the find, search, etc methods on the base rest terminus. Subclasses
of the rest terminus should use the HTTP client.
This is blocked on PUP-10289

CLA signed by all contributors.


Enhance pycatcher package to handle weekly and monthly time series datasets

Pycatcher currently works with daily dataset. It needs to be enhanced to handle weekly and monthly time series datasets as well. Also, consider edge cases where weekly or monthly data is not available for certain periods.

https://github.com/aseemanand/pycatcher/pull/76


Pre-Conditional Button texts

Description of Problem or Question
I'd like to request the addition of pre conditional button labels in a future version of Valkyrie.
Here is an example of what I have in mind:
Event.ini
[EventDialogue]
buttons=5
event1=EventGainEntryBribe
event2=EventGainEntryHero
event3=EventGainEntryClass
event4=EventGainEntryRelic
event5=EventGainEntryConvince
Localization.txt
EventDialogue.text,You approach the academy of Greyhaven, but a guard denies you entry.
EventDialogue.button1,[25 Gold] Bribe the guard {condition:$%Gold,>=,25}
EventDialogue.button2,[Leoric] Demand entry {condition:%HeroLeoricoftheBook,==,1}
EventDialogue.button3,[Runemaster] Demand entry {condition:%HeroClassRunemaster,==,1}
EventDialogue.button4,[Shadow Rune] Demand entry {condition:%RelicTheShadowRune,==,1}
EventDialogue.button5,Try to convince the guard
The idea is to have all buttons greyed out and unselectable if the specified condition isn't met.
This would allow for more complex Dialogues and mimic the system which is used in Road to Legend.
Edit: To get this working Valkyrie should also automatically write a % variable for each selected hero class at the start of the game. Example %HeroClassWildlander,==,1

You can do this the long way, by having different events and some of them set the button colour.  I've only ever seen one conditional option in RtL, so that wouldn't be hard, but yours would be a lot more involved.
I'll add this as a feature request.

Thanks for considering this Bruce.
I think it would be possible to grey out entries by creating complex dialogues with multiple condition checks, but I'm not aware that there is a way to prevent the buttons from being clicked.
Btw. there are lots of these choices in Road to Legend. Here are just some examples:

but I'm not aware that there is a way to prevent the buttons from being clicked.

A work around is to have the button lead to the same event.

Maybe there is an easy way to do it without any code change.
@scrubbless don't you have dynamic choices for text in your scenario?

There is no easy way to do dynamic choices with more than 3 choices without a code change.
To code dynamic choices it is currently necessary to code separate events for each separate combination of choices.
So if there are 3 choices there needs to be
Choice 3, Choice 2, Choice 1
Choice 3, Choice 1
Choice 3, Choice 2
Choice 2, Choice 1
etc.
In the example screenshot, there are 4 choices.  Coding every combo of 4 choices is possible but not really practical.  With 5 it becomes completely impractical.
In my scenario 'In the Dark' I get around this issue by just having the choices call up an event with the text; 'You've already asked me that question.'.  This is clearly a bodge and there have been complaints about it.
Having the functionality to disable choices would be very useful for 'In the Dark'.

@scrubbless has a good description of how to implement dynamic choices in his very well put together guide in the section: Person Token with Several questions.
There are 7 events to cope with 3 choices which works out as 3!+1
With 4 events, the events would be 4321 + 1 = 25
With 5 events, the events would be 5432*1 + 1 = 121
etc
https://docs.google.com/document/d/1Gi5gTwKkw84Px0Lvk-bJ3Aml_vF3ZoljjB6a8FjWGt8/edit
So in your example we need events for every possibility of:
Talk - How are you?
Cost - What is the cost?
Time - What is the time?
These are (forgive me if I get it wrong, its late!) 7 permutations, then we need another "catch all".
1 - Talk, Cost, Time
2 - Talk, Time
3 - Cost, Time
4- Talk, Cost
5 - Talk
6 - Cost
7 - Time
8 - No questions - catch all.

I recently thought about this again, and tried to come up with a better system which will cover all possible purposes to easily create choices in event options (mostly important for decisions and dialogues).
As NicolaZee pointed out the current way to handle complex dialogue trees quickly reaches it's limit if there are more than 3 options. So for the sake of an example of the current system let's keep a it at three.
[EventDialogueExample]
buttons=3
event1=EventDialogueChoice1
event2=EventDialogueChoice2
event3=EventDialogueChoice3

This event will allow to create an entry point into a dialogue. I won't repeat NicolaZees description about the needed choices to create followup events which do not repeat previously selected events. Instead I want to propose a better (and more scalable way) to handle this by adding 2 new options:
[EventDialogueExampleNew]
buttons=3
event1=EventDialogueChoice1
event1conditions=
event1interaction=Enabled
event2=EventDialogueChoice2
event2conditions=Variable1,==,1
event2interaction=Disabled
event3=EventDialogueChoice3
event3conditions=Variable2,==,1
event3interaction=Invisible
Using this one event, the dialouge options could be dynamically altered to completely eliminate the need for permutated callback events.
The option "eventXconditions" would contain regular conditions, which have to be tested before the respective button is created. The default value of this would be empty (no test needed) in case this option is not specified.
When the "EventXconditions" option is specified, there are 2 possible outcomes:
a) If the condition is met, the button is created in the usual way, and the following option is ignored or defaults.
b) If however the condition is not met, the button is modified by looking at the following option.
The next option is "eventXinteraction" and would have 3 possible values:
Enabled: The event button is always shown and clickable. This would be the default value if the option is not specified or "EventXconditions" are met.
Disabled: The event buttion is visible but the font color is altered (I'd recommend the color grey), and it is unclickable.
Invisible: The event button is invisible and thus unclickable.
This is how the buttons would look if you take the variables I created in the above example into consideration:
Variable1 = 0, Variable2 = 0:

Variable1 = 1, Variable2 = 0:

Variable1 = 0, Variable2 = 1:

Variable1 = 1, Variable2 = 1:

Being able to use these options would reduce the complexity of branching dialogues massively, as all choices could point back to the previous root event and could be dynamically altered by the use of variables.

I have been thinking a bit about what Bruce has said.
I've started to use a lot of events where every option sets a variable then links to the same follow on event. This may be a way to do it.
While we wont be able to get out buttons it could make button presses 'null'.
For example:
Pick an optuon:
B1 》 set b1=1
B2 》set b2=1
B3 》set b3=1
All button press chains lead to the same event:
I  this event we have tests for all options
eventB1 - test b1==1 & b1available==1
eventB2 - test b2==1 & b2available==1
eventB3 - test b3==1 & b3available==1
EventRtrn - catch all, set all 'B' vars to 0 and return to pick event.
If a button is clicked but not 'available' (as set by var) the button press leads to the catch all loop back to the original question.
If the buttons are available it will t trigger the event.

or example:
EventPick - Pick an option:
Button1 》 set b1=1
Button2 》set b2=1
Button3 》set b3=1
All button press chains lead to the same event:
In this event we have tests for all avaiable button events.
No text in event.
'Continue'
eventB1 - test b1==1 & b1available==1
eventB2 - test b2==1 & b2available==1
eventB3 - test b3==1 & b3available==1
EventRtrn - catch all, set all 'B' vars to 0 and return to pick event.
Instead of variables b1, b2. b3 and so on, I'd recommend one variable.
EventPick - Pick an option:
Button1 》 set button=1
Button2 》set button=2
Button3 》set button=3
I may have overlooked something but if the text on the button is along the lines of
{action} Button1
{action} Button2
etc
want you have to give the player back their action if the button is clicked and not available?
So the instruction to spend an action would need to be added to the active events?

You're right, it was hasty. A single button variable  makes more sense and yes the catch all would need to say something like.
'You already asked this question, do not spend an action {action}, you may ask a different question.'
A lot of the time it may be better to only use it to stop players asking the same questions. I'd probably still use a separate event with it's own unlocked buttons for 'disabled' questions as otherwise it would spoil the clue to have the leading question just telling you it's not available. However you could use the same follow on event so it would cut down time building the following chains.
As a work around it would limit the number of question permutation events youd need to create.
I still like Delphi's idea, its a lot more elegant.

When all is said and done we still come back to the need to disable a dialogue button.

Yeh I agree, just giving out work around while we wait for those developments.

Hi everyone. Just wanted to ask whether someone might take a look at implementing the proposed system at some point. It would really improve the way dialogues are handled significantly.

@DelphiDie I'm looking into a few issues that are related to the variables themselves. Once I get more familiar with the related codebase I am planning to tackle this ticket.

@DelphiDie I would like to save it in the .ini, not the localization file. The localization file should ideally not be used for driving scenario logic.
Format like this:
event1=[,,,[,]]
[] are optional parts so you can either have
event1=
event1=,,,
event1=,,,,
Operators:
!=

=
<
<=

Secret:
disabled (default): The button is visible, but disabled if the condition is not met.
hidden: The button is not visible if the condition is not met.
So in your example:
Event.ini
[EventDialogue]
buttons=5
event1=EventGainEntryBribe,%Gold,>=,25
event2=EventGainEntryHero,#HeroLeoricoftheBook,=,1,hidden
event3=EventGainEntryClass,#HeroClassRunemaster,=,1,hidden
event4=EventGainEntryRelic,#RelicTheShadowRune,=,1,hidden
event5=EventGainEntryConvince
Localization.txt
EventDialogue.text,You approach the academy of Greyhaven, but a guard denies you entry.
EventDialogue.button1,[25 Gold] Bribe the guard
EventDialogue.button2,[Leoric] Demand entry
EventDialogue.button3,[Runemaster] Demand entry
EventDialogue.button4,[Shadow Rune] Demand entry
EventDialogue.button5,Try to convince the guard

@mayjak
I like this approach. As you already mentioned this lets the localization files stay true to their purpose.
Formatting looks nice and is build on the already existing grammar that Valkyrie uses.

Changed a few things in the original description:

Changed = to == to match the original test on VarManager.
Replaced Visibility with FailAction, and the values from disabled to disable and hidden to hide


Consider improving error handling and StatsError type

enum StatsError is supposed to be an

Enumeration of possible errors thrown within the statrs library.

This indicates that it should not try to be a generic error type for any kind of statistics calculations, but instead only concern itself with the errors produced in statrs.
With that basic assumption, there are currently some inconsistencies and outdated practices though (API guidelines for reference):

Add test that StatsError implements both Sync and Send (this is more of a formality, but is trivial to implement and good future-proofing)
Error::description is deprecated and should not be implemented
There are a few unused variants (ArgNotNegative, ArgIntervalExclMin, etc.), these are leftovers from older versions and should be removed because they're no longer needed by statrs.
There's at least one case of a function returning a Result<T> that cannot return an error: Empirical::new. There's no real reason for this infallible API to return a Result<T, E>. There might be others.

I realize that most of these are breaking changes, but seeing that the crate is pre-1.0, I don't think there's a big problem doing this.
Other things that could be improved:
StatsError is big: 40 bytes on a Linux x64 target. This is because there are variants which contain 2x &str (2 x 16 = 32 bytes plus discriminant and padding). Is it really necessary to have strings in the error type? The implementation could be replaced mostly 1:1 with some sort of ArgName enum, but there might be an even better solution that does not need this argument name wrapping at all.
All new functions seem to just return StatsError::BadParams whenever the params are outside of the defined/allowed range. Is there a good reason for these to be so vague when compared to the more specific errors returned by other functions? After all, the more specific errors already exist, why not return more exact error information? There might even be value in providing multiple error types, to have errors that are more specific to the exact API being used.

I do see good reason for all of these and I'd be open to making changes for all but the infallible new not returning a result.
All other public structs defined in the distribution module have a new method implemented that returns Result so it does provide consistency. Perhaps if Empirical were in a different module or it's new had a different name?

All other public structs defined in the distribution module have a new method implemented that returns Result so it does provide consistency. Perhaps if Empirical were in a different module or it's new had a different name?

I see your point about consistency. I would personally value the expressiveness ("this call cannot fail") over the consistency ("all constructors return a Result and might need error handling"), but it doesn't matter much tbh.
Hmm I'm not sure about renaming the new function, it's a widespread naming convention in the Rust ecosystem and what most users would expect. Maybe a similar name like new_<something> so people can simply find it in their IDEs.

Perhaps an impl Default over having Empirical::new?
Regardless, the overall discussion you bring up on the error type is valid. I'd merge an effort that does any of

scaling it down
making it adhere closer to API guidelines
returning StatsError::BadParams less where possible.

During these changes, we should also work on removing support for degenerate distributions as it seems once one knows what they wish to specify, evaluations are fairly straightforward.

Tried a different approach, even wrote out an example to test using it, but I didn't have a great motivating case, so I just made something up, but I wanted to see what it was like to actually handle those such errors.

Maybe we should figure out what the errors should be able to convey first. Since @FreezyLemon posted on #242 I've realized I've not done enough of this bigger picture stuff for decisions. I think it's fair to narrow the discussion to errors from distribution construction since that's at a module scope and most of where errors are handled.
The value in #258 is to make the errors flat, and delegates identifying what we call "bad parameters" to the caller. This is quite reasonable, as the conditions for errors are statically specified (up to decisions about what constitutes degeneracy), but there is no program state in which parameter conditions change. However it means that users of the library may repeat their work among projects where there's some input-validation cycle if they want useful error messages.
The option I have in #247 is pretty dense, and it means all distributions' new have a different type for the Err variant. Would need quite a few imports just to do something that creates multiple distributions from different families. But it has the value of granularity.

A few lists to help organize my thoughts:
Assumptions

Users who are writing analyses will likely unwrap or pair ? with anyhow.
Some end users will benefit from specificity of erroneous input.
Library authors using statrs wish for choice between dynamic and static dispatch.
Library authors will not prefer to duplicate effort of input checking.
Developers do not prefer being exhaustive with writing source code for error handling outside of tests.

Possible targeted behaviors adjacent to error API

[ ] distribution family generic code

e.g. the application is fitting a distribution function to data where the end user chooses a distribution family
dynamic dispatch for creating distribution type is the only option we can support without changing beyond error API

[ ] correcting while widening and narrowing of parameters

e.g. arguing again via fitting, multiparameter distributions could have jacobians that lead to invalid values for one (or multiple) parameters going out of bounds because types are not statically constraining onto intervals.

[ ] matrix updating

#180 mentions possible memory performance benefit, a further benefit could be updates that have nice approximations as updates, for $M' = M + \epsilon A$ under appropriate constraints on $A$, perhaps symmetry, $A^T = A$ or single rank $A = x x$

[ ] dimension checking/mismatch for dynamically sized nalgebra matrices

we should at least panic on things like this for now. Evaluating pdf for Dyn sizes may fail the unwrapping here

I'm very open to modifying these lists.

I realize yet another option is to have the distribution error have too many variants for any one distribution, but use shared language location, scale, shape, etc. in the variants. Suppose this is called ParameterError. Then in each distribution's module, impl From<super::ParameterError> for the distribution's specific error or use some generics to impl Error with source converting to the right error.
This allows a shallow error, small step from unwrap for those writing analyses. And allows for deeper error which can rely more on handling programmatically. The more I think about this, the more certain there's something easier I'm missing here.

the more I think about this, the more certain there's something easier I'm missing here and I don't think it's needed to replicate std::io's pattern of error handling.

Most usages of StatsError are currently for the return value of SomeDistribution::new(...). Since this function is implemented per-distribution and not to satisfy some trait, the simplest solution here would be creating a concrete error type for each and every distribution in case the construction fails. For example:
Let's turn
// beta.rs

#[derive(Copy, Clone, PartialEq, Debug)]
pub struct Beta {
    shape_a: f64,
    shape_b: f64,
}

impl Beta {
    pub fn new(shape_a: f64, shape_b: f64) -> Result<Beta> {
        if shape_a.is_nan()
            || shape_b.is_nan()
            || shape_a.is_infinite() && shape_b.is_infinite()
            || shape_a <= 0.0
            || shape_b <= 0.0
        {
            return Err(StatsError::BadParams);
        };
        Ok(Beta { shape_a, shape_b })
    }

into
#[derive(Copy, Clone, PartialEq, Debug)]
pub struct Beta {
    shape_a: f64,
    shape_b: f64,
}

#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum BetaError {
    ShapeANan,
    ShapeAInfinite,
    ShapeALessThanZero,
    ShapeBNan,
    ShapeBInfinite,
    ShapeBLessThanZero,
}

impl std::fmt::Display for BetaError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        /* ... */
    }
}

impl Beta {
    pub fn new(shape_a: f64, shape_b: f64) -> Result<Beta, BetaError> {
        if shape_a.is_nan() {
            Err(BetaError::ShapeANan)
        } else if shape_a.is_infinite() {
            Err(BetaError::ShapeAInfinite)
        } else if shape_a <= 0.0 {
            Err(BetaError::ShapeALessThanZero)
        } else if shape_b.is_nan() {
            Err(BetaError::ShapeBNan)
        } else if shape_b.is_infinite() {
            Err(BetaError::ShapeBInfinite)
        } else if shape_b <= 0.0 {
            Err(BetaError::ShapeBLessThanZero)
        } else {
            Ok(Beta { shape_a, shape_b })
        }
    }
}

Maybe this example is too verbose (i.e. maybe BetaError::ShapeAInvalid would be enough), but it gets the point across.
This will return very specific errors, and users that don't care about it can still .unwrap() or use pattern matching to handle whichever errors. This will not impact the distributions' traits (because new is not a part of any trait) and should allow for dynamic dispatch.
If new methods of creating a distribution are added later, the related error type could be extended or a separate error type, specific to the method of construction, could be added.
It will need a fair bit of boiler plate, especially now that it needs to be implemented all at once, but is otherwise very simple to implement. A crate like thiserror could cut down on boilerplate, but is honestly not needed. The creation errors are simple and thiserror is/has a proc-macro which means it has a negative impact on compilation times.

Ah, it's true that the generic part can only come up once the type is correctly initialized.
I'm good with only specifying which parameter is invalid, so we can just have one variant per parameter, the one message denoting that one of its (potentially multiple) constraints was violated.
impl std::fmt::Display for BetaError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            BetaError::ShapeAInvalid => write!(f, "Shape A must be positive finite"),
            BetaError::ShapeBInvalid => write!(f, "Shape B must be positive finite"),
        }
    }
}

It will be a little boilerplatey, but it need not be flexible, sounds like a text editor problem.


Updates for removing cookies about user info.

Coverage increased (+0.04%) to 50.745% when pulling ded137542162c16fd07e930dcd3d3e06df3a6305 on wknet123:dev-temp into 05759cf0adcf289825ba07f844744215f8594e2e on vmware:dev.


refactor![metadata]: add manager to process state method.

Codecov Report

Merging #58 (88157dc) into main (344a3b6) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main      #58      +/-   ##
============================================
- Coverage     95.12%   95.08%   -0.05%
+ Complexity      434      433       -1
============================================
  Files            94       94
  Lines          1683     1667      -16
============================================
- Hits           1601     1585      -16
  Misses           82       82

Flag
Coverage Δ

phpunit
95.08% <100.00%> (-0.05%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/bundle/src/Resources/config/graphqlite.php
100.00% <ø> (ø)

...ndle/src/Metadata/InheritedRolesStateProcessor.php
98.11% <100.00%> (-0.17%)
:arrow_down:

src/bundle/src/Resources/config/metadata.php
100.00% <100.00%> (ø)

...ridge/src/RemoteSchemaPermissionStateProcessor.php
100.00% <100.00%> (ø)

src/metadata/src/Command/PersistState.php
77.77% <100.00%> (ø)

src/metadata/src/ReloadStateProcessor.php
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


fix: release-service: wait for IsMatched() == true

Description
this test has been flakey lately and I suspect it's because at the time when the ReleasePlan is fetched, the "Matched" condition is not yet updated after creation of ReleasePlanAdmission
Issue ticket number and link
https://issues.redhat.com/browse/KFLUXBUGS-17
Type of change

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
make build && ./bin/e2e-appstudio --ginkgo.v --ginkgo.label-filter="release_plan_and_admission"

Checklist:

[X] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
[ ] I have updated labels (if needed)

I believe this is already being fixed in https://github.com/redhat-appstudio/e2e-tests/pull/1018

ah, nice, I didn't notice that one, thanks @johnbieren


Forwarding force unwrap 6.0

(includes https://github.com/apple/swift/pull/73411 as a prerequisite)
Explanation: Changes the handling of the x! force unwrap operator on Optional to be any of borrowing, consuming, or mutating based on the use of the unwrapped value.
Scope: Noncopyable stdlib adoption work.
Issue: rdar://127459955
Original PR: https://github.com/apple/swift/pull/73531
Risk: Low. The change only affects the ! operator and should be a safe extension of its behavior for noncopyable Optionals.
Testing: Swift CI, test case from bug report
Reviewer: TBD

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test Windows


Update Remove-FASTSearchMetadataManagedProperty.md

Format example

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Remove-FASTSearchMetadataManagedProperty.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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.


refactor: Remove unused imports

Following https://github.com/openrewrite/rewrite/pull/4406

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.RemoveUnusedImports?organizationId=T3BlblJld3JpdGU%3D

Now also enforced for other projects

https://github.com/openrewrite/rewrite-recommendations/commit/eb337df79d7d10b6542c6ca81a5d4d683151cb35
https://app.moderne.io/commits/a6cd57ed-4119-44c7-8ea0-a2a04819ef30

Not enforced here due to unwanted hits on ANTLR generated classes, which merely have a generated comment.


little init of sanic and flask style render template support .

I write a init for sanic , and have plugin of flask style jinja2 render template.
https://github.com/m85091081/mu_sanic

Awesome thanks @m85091081! If you'd like to have this featured in the extensions documentation please feel free to submit a PR!


.rst Support

Many python devs require .rst support. That would be a great addition.

Realized support was there out of the box.


Something that has been forgotten

Sorry, I have not found the Featured Request anywhere, I must be blind
You forgot to add the /p dispose and the /p reset to the /p list

I have also encountered the problem that players cannot use the rockets to propel themselves with the elytras, can something be done?

Not forgotten. Intentionally not added.


Unit test for RoasterFlowProducerSourceGenerator and assertj dependency

Another unit test for the source generation in livespark.

@jsoltes Just a heads up, the LS build is broken on master so this PR will not go green. I suspect an upstream change caused this.
I will look into this but I am also currently in the process of a massive renaming for this repository so that we can start deploying snapshots so this PR may have to wait for a bit before being merged.


Werkzeug compat

Check request.is_json instead of always calling get_json(). Fixes #511

Requirements will be updated in the next PR to fix the docs build.


About entropy regularization term

Thanks for your excellent work, but I have a doubt about entropy regularization. The code in your repo subtracts the entropy regularization term, but in the paper it adds the entropy regularization term. Is it a tiny clerical error in the paper?
https://github.com/CVMI-Lab/SimGCD/blob/1765452663e7c52e7f0bd0759543655d85524b94/model/simgcd.py#L111-L112

Hi @hjs2027864933, thanks for pointing this out. The code is correct, and we will update the paper in the next version.

Hi @hjs2027864933, thanks for pointing this out. The code is correct, and we will update the paper in the next version.

thank you for your reply.


Script Syntax error line 161

Hi Dave,
in the latest version I have this error:
line 161: syntax error near unexpected token )'`
Ty for your work.
Andrea.

Thanks Andrea
I've deleted v1.1.20 and replaced it with a fixed v1.1.21
https://github.com/007revad/Synology_enable_M2_volume/releases
Synology_enable_Deduplication had the same bug so I've deleted v1.3.24 and replaced it with a fixed v1.3.25
https://github.com/007revad/Synology_enable_Deduplication/releases

Now working fine.
Thx


Use version numbers on releases

Hi!
(Thanks for building this. It's super helpful.)
Could you please tag releases with some kind of incremental version number? This would help me (and others) package this software.
(The only release so far is just tagged as "latest".)

I see that you are tracking versions on setup.py. It would be helpful if you could add a tag on git with the corresponding version number everytime you make an increment there.

You can follow the releases on PyPi but I will start tagging versions herein.

Thanks!
Having them tagged allows writing much cleaner packaging scripts.


Support list inside quote

On GitHub, we could have list inside a quote, e.g.:

a

1
2

However, the same code is generated as

\n
a\n  - 1\n  - 2
\n

Hence, lost the list formatting.

Hmm, interesting edge case. In fact, most implementations do not work with that input. This doesn't even work:
> a
> - 1
> - 2

You need to have a blank line between your paragraph and your list, like this:
> a

> - 1
> - 2

... or this:
> a
>
> - 1
> - 2

Why? Because your input won't even work outside of a blockquote, like this:
a
- 1
- 2

You need to do this:
a

- 1
- 2

Clearly, this is not a bug, but intended behavior.


Add uptime information for HA and update unit tests

Add uptime information for HA
Add a unit test for the case that some of the container information is not exposed.

@fabaff Can this PR get merged?

please merge this :) uptimee would be great!

Looks good to me.

Thanks! Will this be in the 2023.6.4 release or
2023.7.x?

2023.6.x will only contain bugfixes.

This is only the API changes. We need to build a new API version, change the used version in HA core and finally add the sensors to HA core as well.
You see there is still some work left to do. I hope that it finds it way into 2023.7 or 2023.8


Grafana variable in "Custom queries parameter"

Using the global variables in the "Custom queries parametre" field to change the API parameters during the call, would be a very useful feature.
Is it planned?
Thanks

No, but it's easy to add. I'll fix this during the week. Thanks for letting me know! 🙏

Fixed in v0.6.1. Let me know if you're having any issues!

Thanks that's perfect for me !


More screens for mobile

More important screens of the app added.
There are many other screens, do we want to track every single ones?

PR updated.
@novocaine warning, it can break Web impl.


Is this extension broken?

Installed it, restarted VSCode and opened the TS-Type-Expand window,  but nothing happens when I click different types in the editor, it's just blank and empty.

I have the same experience today. When I restarted VS Code, I got this pop-up:

Unfortunately, the output tab provides no more information. The extension isn't even available in the filter drop-down. Is there some way I can provide more troubleshooting information?

Same, absolutely zero display in my projects.

:memo: Results of operation check using a machine on hand

on Mac (Apple Silicen): work as expected
on Windows: broken

The message UnExpected is displayed

on WIndows(WSL2): broken

No message is displayed and no expansion information can be seen when the type is selected.

https://github.com/d-kimuson/ts-type-expand/issues/373#issuecomment-1636357205
I have an Apple Silicon Mac that works as expected, but there are comments of similar symptoms on Macs, so maybe the same problem exists on Intel Macs? (If anyone has the same symptoms on an Apple Silicon Mac, I would appreciate comments.)

After checking the logs, I found the following causes for each

Windows

The location where the error occurs in the code is here
ts-type-expand writes logs under $HOME/.ts-type-expand, but $HOME is undefined
In my environment, I can get it with echo $HOME, but this error occurs, so I'm not sure what the final cause is, but I think I can get it to work by not logging when it is not found.

Windows (WSL)

First line of stack trace: Error: Node is not defined at JP.getTypeFromLineAndCharacter.
This is a known issue (#338) on Ubuntu and an Issue has already been raised

FWIW the correct cross platform way of getting the homedir would be with os.homedir(), then use path.resolve/join for building paths from it.
https://nodejs.org/api/os.html#oshomedir

Broken for me too, nothing shows up.

I'm on apple silicon and it doesn't work at all. the only console output i see is under extension host
2023-08-03 10:37:55.559 [info] ExtensionService#_doActivateExtension kimuson.ts-type-expand, startup: false, activationEvent: 'onView:typeExpand'

Same issue (M1 Mac). I found logs in ~/.ts-type-expand/logs.  I've unescaped the \t and \n for readability:
{
  "context": "ts-type-expand",
  "kind": "FAILED_TO_FETCH_SERVER_ACTIVATED",
  "level": "error",
  "message": "request to http://localhost:54334/trpc/isServerActivated failed, reason: connect ECONNREFUSED <IP_ADDRESS>:54334",
  "stack": "TRPCClientError: request to http://localhost:54334/trpc/isServerActivated failed, reason: connect ECONNREFUSED <IP_ADDRESS>:54334
  at TRPCClientError.from (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/out/extension.js:15979:12)
  at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/out/extension.js:16230:56
  at process.processTicksAndRejections (node:internal/process/task_queues:96:5)"
}
{
  "context": "ts-type-expand",
  "level": "error",
  "message": {
    "error": {
      "data": {
        "code": "INTERNAL_SERVER_ERROR",
        "httpStatus": 500,
        "path": "getTypeFromPos",
        "stack": "TRPCError: error: Error: Node is not defined
    at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:4962
    at HC.middlewares (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:122623)
    at d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:179)
    at next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:282)
    at n (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:121625)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)"
      },
      "meta": { "response": { "size": 0 } },
      "name": "TRPCClientError",
      "shape": {
        "code": -32603,
        "data": {
          "code": "INTERNAL_SERVER_ERROR",
          "httpStatus": 500,
          "path": "getTypeFromPos",
          "stack": "TRPCError: error: Error: Node is not defined
    at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:4962
    at HC.middlewares (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:122623)
    at d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:179)
    at next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:282)
    at n (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:121625)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)"
        },
        "message": "error: Error: Node is not defined"
      }
    },
    "kind": "TRPC_SERVER_ERROR"
  }
}

In the beginning, most of the time I got a message saying the extension was dead. Now it seems to work and is active, but I don't get any information in the ts-type-expand part. Anyone who knows why this is? I work in a next react project.

New user here on Windows, same experience as noted above. Only providing highlights. 😉
users\me.ts-type-expand\logs\extension ...
TRPC_SERVER_ERROR
FAILED_TO_FETCH_SERVER_ACTIVATED ... INTERNAL_SERVER_ERROR
{"kind":"ON_UPDATE_CONF","port":54334}}
{"kind":"START_TS_EXPAND_PLUGIN","port":54334}}
http://localhost:54334/trpc/isServerActivated failed
"path":"getTypeFromPos","stack":"TRPCError: error: Error: Node is not defined
kimuson.ts-type-expand-1.0.4
\node_modules\ts-type-expand-plugin
{"context":"ts-type-expand-plugin","level":"info","message":{"kind":"ON_UPDATE_CONF","port":60330}}
{"context":"ts-type-expand-plugin","level":"info","message":{"kind":"START_TS_EXPAND_PLUGIN","port":60330}}
{"context":"ts-type-expand","kind":"REQUEST_PLUGIN","level":"info","message":"configurePlugin","port":60330}
HTH

Same for me on MacOS. This extension used to work until some months ago, then stopped working.

Sorry for the very long delay.
I have just released version 1.0.5, which includes a fix for this issue!
Previously
＞ I have an Apple Silicon Mac that works as expected
I wrote the above, but I was getting the same Node is not defined error (perhaps the VSCode version was not up-to-date?), so I have fixed this problem.
I will check the behavior on Windows (including WSL) and Ubuntu later, but I assume it has been fixed on other operating systems as well.
I'll leave the issue open to see how it goes, so if you continue to experience problems/resolutions, I'd appreciate your comments.

PS: I have tested it on Windows(including WSL) and confirmed that it works correctly.

v1.0.5 looks good on Windows. Thank you! ... and Congratulations! 🎉

Also worked on Ubuntu22.04!

works on my M1 Pro as well! thank you for the great work :D


Use Pulp 9 for CI build

Now that Pulp 9 is released, this should work again.

👍

Thanks for the PR! 😄


Update manifests/a/AnyLogic/AnyLogic/Professional/8.8.0/AnyLogic.AnyLogic.Professional.locale.en-US.yaml

Fixes an issue where this package has multiple different monikers
Microsoft Reviewers: Open in CodeFlow

[Policy] Reset Labels


datasetss

hi,can you please  provide the DRAC2022 datasets,thanks!

Please send me your email, thank you.

this is my qq email<EMAIL_ADDRESS>, thanks for your generosity!

my qq email is<EMAIL_ADDRESS>thanks!!!


Liquidity Pools Java SDK Update

Could we move this into the stellar/java-stellar-sdk repo? It doesn't seem relevant to the stellar/go repo.


WIP. Big and messy initial hive implementation

I don't think we need the thrift files in our repo, unless I'm missing something. The pyhs2 lib should contain them.

pyhive lib has outdated generated code and doesn't contain fetch log
request/response/rpc
On Fri, Feb 10, 2017 at 9:01 AM, Maxime Beauchemin<EMAIL_ADDRESS>
wrote:

I don't think we need the thrift files in our repo, unless I'm missing
something. The pyhs2 lib should contain them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/airbnb/superset/pull/2134#issuecomment-279000159, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFdmwmNodwSlvxzFNCTdCGCWjovZQUbnks5rbJfigaJpZM4L6WyO
.

--
Best regards,
Bogdan Kyryliuk.

@bkyryliuk is that parsing fix for select * will solve this issue ? #2171

@bkyryliuk the thrift generated code should live outside of this repository, if you can't find a pypi repo that has up to date code you should create one


Directions directive issue with lazy-load in 1.7.11

When try to use 1.7.11 with lazy load get the following error:
ReferenceError: google is not defined
    at directions (ng-map.js:680)
    at Object.invoke (angular.js:3965)
    at angular.js:5716
    at forEach (angular.js:325)
    at Object.<anonymous> (angular.js:5714)
    at Object.invoke (angular.js:3965)
    at angular.js:3807
    at Object.getService [as get] (angular.js:3929)
    at addDirective (angular.js:6804)
    at collectDirectives (angular.js:6241)

Thanks for using this module
Please provide me a plnkr fir this errir

Well I see this error because on one of the pages I used 'directions' class. Here is codepen: http://codepen.io/alextrs/pen/MwVKNN

As you see in the example, you need to include google maps javascript.
https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/directions.html
Also there a lots of examples you can find in index page. https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/

That is the problem, I don't want to include google maps javascript to index.html and would like to use lazy-load feature. It shouldn't fail because somewhere in my application I used CSS class that matches ngMap directive (just to make it clear, my "directions" class on other page has nothing to do with google-maps).

Is this about map-lazy-load directive does not work with directions directive? I also do not understand CSS class for directive because ngMap does not allow CSS directive.

Is this about map-lazy-load directive does not work with directions directive?

Not really

I also do not understand CSS class for directive because ngMap does not allow CSS directive.

When you define 'directions' directive you immediately use google directions service:
var directions = function(Attr2Options, $timeout) {
    var parser = Attr2Options;
    var directionsService = new google.maps.DirectionsService();
...
angular.module('ngMap').directive('directions', directions);

AngularJS parses DOM to find directives and sees 'directions' class. At this point it doesn't know whether it's allowed to use this directive as class or not because definition of it wasn't loaded yet. Then it tries to load definition and immediately fails because google maps library is not loaded


Compile errors in multiple Substrate modules when building on Substrate

Following up on #4333
error[E0046]: not all trait items implemented, missing: `generate_with_phrase`, `from_phrase`
  --> /home/joshy/.cargo/git/checkouts/substrate-7e08433d4c370a21/fa8b36b/primitives/finality-grandpa/src/lib.rs:33:2
   |
33 |     app_crypto!(ed25519, GRANDPA);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `generate_with_phrase`, `from_phrase` in implementation
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
   = help: implement the missing item: `fn generate_with_phrase(_: core::option::Option<&str>) -> (Self, alloc::string::String, <Self as sp_core::crypto::Pair>::Seed) { unimplemented!() }`
   = help: implement the missing item: `fn from_phrase(_: &str, _: core::option::Option<&str>) -> core::result::Result<(Self, <Self as sp_core::crypto::Pair>::Seed), sp_core::crypto::SecretStringError> { unimplemented!() }`

I first encountered this error when working on this Substrate Recipes PR. This is all runtime code, no outer-node stuff. That will come next.
Steps to reproduce the error
git clone -b newer-upstream https://github.com/substrate-developer-hub/recipes.git
cargo check -p weight-fee-runtime

cc @tomusdrw since we discussed this previously

I've also encountered this error in a Substrate crate while updating to recent builds of master.
error[E0432]: unresolved imports `txpool_api::error`, `txpool_api::PoolStatus`
  --> /home/joshy/.cargo/git/checkouts/substrate-7e08433d4c370a21/fa8b36b/client/transaction-pool/graph/src/pool.rs:37:18
   |
37 | use txpool_api::{error, PoolStatus};
   |                  ^^^^^  ^^^^^^^^^^ no `PoolStatus` in the root
   |                  |
   |                  no `error` in the root

Please advise whether these should be opened in separate issues.

weight-fee-runtime compiles successfully here:
https://github.com/substrate-developer-hub/recipes/pull/110
Most of the errors was because of imports of incorrect crates - i.e. you can't import any sc-* crate to the runtime. sp-* crates usually need default-features=false and then std feature enable conditionally.
I think none of the issues mentioned here is in fact substrate issue, so closing. @JoshOrndorff feel free to open new issues in case you run into any more problems.

Thank you very much @tomusdrw !

weight-fee-runtime compiles successfully here: substrate-developer-hub/recipes#110
Most of the errors was because of imports of incorrect crates - i.e. you can't import any sc-* crate to the runtime. sp-* crates usually need default-features=false and then std feature enable conditionally. I think none of the issues mentioned here is in fact substrate issue, so closing. @JoshOrndorff feel free to open new issues in case you run into any more problems.

hi, @tomusdrw and @JoshOrndorff, I have been using sc-* and sp-* crates but don't know the difference between them can you guys help me to find the difference?

Hi, Everyone. How are you? I am converting the consensus engine from poa to pos on substrate node template project. For it, I am referencing this github, https://github.com/ltfschoen/substrate-node-template/pull/4/files. But there is one problem. Reference project's version is 3.0.0 but my current substrate-node-template project's version is 4.0.0-dev. So I have modified some code and tried to build it. And I am getting this error when I build the substrate project.
error[E0432]: unresolved imports node_template_runtime::AuthorityDiscoveryConfig, node_template_runtime::SessionKeys --> node/src/chain_spec.rs:5:2 | 5 | AuthorityDiscoveryConfig, | ^^^^^^^^^^^^^^^^^^^^^^^^ no AuthorityDiscoveryConfig in the root
How can I solve this problem? Please help me. Best Regards.


Add some API constants

For lifecycle, we'll want to rework the LXD code to consume them but that's not going to happen in this release as we tend to compose those strings instead of directly using them, so it will need some rework.

Static analysis failing.

Possibly a regression from an earlier linter change I didn't notice failing cc @markylaing

@tomponline Thus far the only changes that I have made to static_analysis.sh have been to enable the default linters one by one. Currently all the default linters are enabled. BUT golangci-lint isn't actually running in jenkins because it isn't available.
There is a line in the logs: "golangci-lint not found, some go linters will not run".
My plan was to fix any small regressions at the same time as writing the static analysis github action so as not to require any changes to jenkins configuration as we will stop running the static analysis in Jenkins anyway.

Added a fix for that shared/osarch error. Not sure why it only showed up now.

shared/api/event_lifecycle.go:4:2: exported const EventLifecycleCertificateCreated should have comment (or a comment on this block) or be unexported

Fixed!

@tomponline good to go


Update index.rst

Codecov Report

Merging #18 (8fa0e45) into main (5389f65) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   89.05%   89.05%
=======================================
  Files          14       14
  Lines         274      274
=======================================
  Hits          244      244
  Misses         30       30

Continue to review full report at Codecov.

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


Some problematic results calculated from level-shift DFT

Hi PySCF devs, I used blyp functional to calculate a Cr atom (2S+1 = 7), with level_shift = 0.5, and I found that alpha electrons sit on 3d24s14p3, which is indicated by mo_occ, BUT the occupied d orbitals and virtual d orbitals have the same energy. I set the verbose = 6, the last cycle of SCF indicates that the alpha electrons sit on 3d54s1.
I'm confused about the results.
Thanks a lot!

Please post output. I am not sure, but my guess is level shift is being
applied to some initial guess classification of occ/virtuals.
On Tue, Jan 19, 2021 at 4:07 PM hoshishin<EMAIL_ADDRESS>wrote:

Hi PySCF devs, I used blyp functional to calculate a Cr atom (2S+1 = 7),
with level_shift = 0.5, and I found that alpha electrons sit on 3d24s14p3,
which is indicated by mo_occ, BUT the occupied d orbitals and virtual d
orbitals have the same energy. I set the verbose = 6, the last cycle of SCF
indicates that the alpha electrons sit on 3d54s1.
I'm confused about the results.
Thanks a lot!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pyscf/pyscf/issues/799, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN5NRBD52NALHWX2QTUMBTS2YNF5ANCNFSM4WJYXNBQ
.

Please post output. I am not sure, but my guess is level shift is being
applied to some initial guess classification of occ/virtuals.
On Tue, Jan 19, 2021 at 4:07 PM hoshishin<EMAIL_ADDRESS>wrote:

Hi PySCF devs, I used blyp functional to calculate a Cr atom (2S+1 = 7),
with level_shift = 0.5, and I found that alpha electrons sit on 3d24s14p3,
which is indicated by mo_occ, BUT the occupied d orbitals and virtual d
orbitals have the same energy. I set the verbose = 6, the last cycle of SCF
indicates that the alpha electrons sit on 3d54s1.
I'm confused about the results.
Thanks a lot!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pyscf/pyscf/issues/799, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN5NRBD52NALHWX2QTUMBTS2YNF5ANCNFSM4WJYXNBQ
.

Thank you, gkc!
I used blyp functional to calculate a Cr atom (2S+1 = 7):
molu = gto.Mole() molu.verbose = 6 molu.atom = 'Cr 0 0 0' molu.spin=6 molu.basis = '6-31g' molu.symmetry=False molu.build() mf = dft.UKS(molu) mf.xc = 'blyp' mf.level_shift=0.5 mf.kernel()
There should be 15 alpha electrons and 9 beta electrons.
Final alpha MO energy is

That's mean the 3d orbitals have 2 electrons, without breaking the symmetry, which I was confused about.
And the cycle before final step shows 3d orbitals are full occupied:

I'm puzzled about that.
Thanks a lot !

Thank you, gkc!
I used blyp functional to calculate a Cr atom (2S+1 = 7):
molu = gto.Mole() molu.verbose = 6 molu.atom = 'Cr 0 0 0' molu.spin=6 molu.basis = '6-31g' molu.symmetry=False molu.build() mf = dft.UKS(molu) mf.xc = 'blyp' mf.level_shift=0.5 mf.kernel()
There should be 15 alpha electrons and 9 beta electrons.
Final alpha MO energy is

That's mean the 3d orbitals have 2 electrons, without breaking the symmetry, which I was confused about.
And the cycle before final step shows 3d orbitals are full occupied:

I'm puzzled about that.
Thanks a lot !

The system has degenerate HOMO and LUMO, and therefore, the occupation number can be different among iterations.
You may try mf = scf.addons.frac_occ_(mf) to allow fractional occupation of degenrate d bands.

The system has degenerate HOMO and LUMO, and therefore, the occupation number can be different among iterations.
You may try mf = scf.addons.frac_occ_(mf) to allow fractional occupation of degenrate d bands.

If you can update your pyscf code to the latest commits on master branch, you
can enable symmetry, and set explicitly the occupancies for each orbital
following the example
https://github.com/pyscf/pyscf/blob/master/examples/scf/31-v_atom_rohf.py
On Thu, Jan 21, 2021 at 05:27:39PM -0800, hoshishin wrote:

Thank you, gkc!
I used blyp functional to calculate a Cr atom (2S+1 = 7):
molu = gto.Mole() molu.verbose = 6 molu.atom = 'Cr 0 0 0' molu.spin=6 molu.basis = '6-31g' molu.symmetry=False molu.build() mf = dft.UKS(molu) mf.xc = 'blyp' mf.level_shift=0.5 mf.kernel()
There should be 15 alpha electrons and 9 beta electrons.
Final alpha MO energy is

That's mean the 3d orbitals have 2 electrons, without breaking the symmetry, which I was confused about.
And the cycle before final step shows 3d orbitals are full occupied:

I'm puzzled about that.
Thanks a lot !
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/pyscf/pyscf/issues/799#issuecomment-765051595

--

If you can update your pyscf code to the latest commits on master branch, you
can enable symmetry, and set explicitly the occupancies for each orbital
following the example
https://github.com/pyscf/pyscf/blob/master/examples/scf/31-v_atom_rohf.py
On Thu, Jan 21, 2021 at 05:27:39PM -0800, hoshishin wrote:

Thank you, gkc!
I used blyp functional to calculate a Cr atom (2S+1 = 7):
molu = gto.Mole() molu.verbose = 6 molu.atom = 'Cr 0 0 0' molu.spin=6 molu.basis = '6-31g' molu.symmetry=False molu.build() mf = dft.UKS(molu) mf.xc = 'blyp' mf.level_shift=0.5 mf.kernel()
There should be 15 alpha electrons and 9 beta electrons.
Final alpha MO energy is

That's mean the 3d orbitals have 2 electrons, without breaking the symmetry, which I was confused about.
And the cycle before final step shows 3d orbitals are full occupied:

I'm puzzled about that.
Thanks a lot !
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/pyscf/pyscf/issues/799#issuecomment-765051595

--

No matter whether level shift is added, scf will execute an extra step without any level shift to compute Fock matrix and molecular orbitals using the density matrix obtained in last step. The occupancy pattern is affected in this step. The recommended input is
from pyscf import gto, dft
molu = gto.Mole()
molu.verbose = 6
molu.atom = 'Cr 0 0 0'
molu.spin=6
molu.basis = '6-31g'
molu.symmetry=True
molu.build()
mf = dft.UKS(molu)
mf.xc = 'blyp'
mf.level_shift = 0.5
mf.irrep_nelec = {'s': (4,3), 'p':(6,6), 'd':(5,0)}
mf.kernel()


Refactor install_gems

Description
Install_gems has (or recently had) few problems and drawbacks

/usr/share/one/install_gems doesn't install all requirements #3864
Don't rely on lsb_release for /usr/share/one/install_gems #3866
create cli flags for install_gems #1162
ERROR: executing gem invalid option: --no-ri #4211
install_gems for 5.10.1 does not include all required gems #4092

Problem of the script is that it's old, too complex, not very well maintained and with features which are not well known (it even doesn't show help on --help). Mainly, it allows installing gems in 2 ways (via bundler and directly via gem), which results in 3 possible ways how to install OpenNebula dependencies in real deployments:

preffered: our packaged Ruby gems (rpm/deb)
install_gems - Bundler (by Gemfile)
install_gems - gem (by different list of gems inside the script)

That's crazy. Idea would be to update install_gems to

drop option 3
depend only on Bundler and manage Gemfile(.locks) as the only source of truth (option 2)
drop script in current state and reimplement as simple shell script which

yum / apt-get installs the dependencies
installs bundler
triggers bundler

Basically new install_gems should look like script https://github.com/OpenNebula/packages/blob/master/rubygems/prepare.sh with extra trigger of bundler install at the end. If necessary, gems in Gemfile could be split into groups to allow installation of just part of the dependencies.
Old script could still come with OpenNebula as install_gems-obsolete for some time.
Use case
Make the process clear and easier to maintain and extend for other platforms.

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

PRs to merge in 5.12 and master:

code
docs


chore: Update report docs

Add docs for new report features
Replace old screenshots with new screenshots.

Fixes: #260

@sojan-official This can be presented better. But, we can close this PR if you want to. I am auditing some docs pages every sprint. So, I will rewrite it whenever this one's turn comes up. Is that okay?

@Hricha-Shandily  Sounds good


Pixiv not downloading all images

I can login just fine and view all the images from the creator, but when actually downloading, it only grabs 60-something instead of 200+ images that's actually there.. happens every time. Tested "get all" vs getting each page on their own. Nothing seems to work

Maybe it is linked with https://github.com/Bionus/imgbrd-grabber/issues/2567 Check what images are not loading - "illusts" or "manga". If not loaded images are "manga" type you can try to update grabber and model.js for pixiv.

Do you have an example of such a creator where Grabber doesn't find every file?
And as uvhat said, make sure to use 7.7.1 or higher since there was a Pixiv fix in there.

After a clean 7.8.0 install it seems to work fine now


Exchange V2 Module

Update the document to promote use of Exchange V2 module, rather than V1 that uses legacy authentication.

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

ID: 0c551eb1-7ac5-cb02-cd1b-d67ca3886d85
Version Independent ID: fb690e2e-420e-f697-60f2-39520283d385
Content: Connect to all Office 365 services in a single Windows PowerShell window
Content Source: Enterprise/powershell/connect-to-all-office-365-services-in-a-single-windows-powershell-window.md
Service: o365-administration
GitHub Login: @JoeDavies-MSFT
Microsoft Alias: josephd

@RaghuramP The article has been updated to use the Exchange Online V2 module and commands. Thanks so much for the suggestion.


Class saving/loading...

Updated Scala versions
Added Scala reflexion library
Put the types ScalaEdge, ScalaGraph, ScalaVertex and ScalaElement in separate files for better readability
Moved package object scala in the package scala according to the convention
Method save() to save a class in the graph
Method load() to load a Vertex as an instance of class. This method is wrapped in an implicit object to import in order to be available only when dealing with Vertex (I got the idea from Apache Spark).

Sorry it took such a long time, but I finally got around merging this. As the codebase moved on in the meantime it was the easiest to discard this and apply the changes manually. I mentioned this PR in every commit I made.
I also added tests and documentation for this - see https://github.com/mpollmeier/gremlin-scala/commit/c7a815290a64e78771a000b4eacd42a39fe6599f for more details
Thank you, much appreciated!

Great and no worries for the time it's still in beta anyway...
Although, even if Scala allow it, I think keeping multiple not that much related classes in the same file of 200+ lines is not a good idea as it makes difficult to navigate an understand the code.
I would be curious to hear other points of view on this matter.
That is why I cut down in files like ScalaVertex, ScalaEdge, ScalaElement, ScalaGraph...

I've just split up those into their own respective files and cleaned up the imports. Cheers!

It looks very nice :+1:


RabbitMQ: spring.cloud.stream.rabbit.bindings.* properties not recognized in Native/AOT builds

Describe the issue
When building a Spring Boot app with Spring Cloud Stream as a native image with GraalVM, the properties scoped under spring.cloud.stream.rabbit.bindings.* do not appear to be recognized in the native image and are defaulted.
This is problematic as properties like exchangeType, routingKeyExpression,  and bindingRoutingKey produce defaults that lead to unexpected behaviors. For example, the exchangeType will always be topic and the routing keys default to #.
It is important to note that properties scoped under spring.cloud.function.definition, spring.cloud.stream.output-bindings, and spring.cloud.stream.bindings seem to function as desired.
To Reproduce
A simple reproducible example can be found in full here: https://github.com/mjbingen/spring-cloud-stream-sandbox/tree/native
Example:
application.yml
spring:
  cloud:
    function:
      definition: onFoo;onBar
    stream:
      output-bindings: the-exchange
      bindings:
        onFoo-in-0:
          destination: the-exchange
        onBar-in-0:
          destination: the-exchange
      rabbit:
        bindings:
          the-exchange:
            producer:
              exchangeType: direct
              routingKeyExpression: '''the.foo.key'''
          onFoo-in-0:
            consumer:
              exchangeType: direct
              bindingRoutingKey: the.foo.key
          onBar-in-0:
            consumer:
              exchangeType: direct
              bindingRoutingKey: the.bar.key

Code - expect to self-consume messages when REST endpoint is hit only from onFoo method that is bound to the exchange with matching routing key. However, when application is run as a native image, all bounding keys default to #, so the YAML-specified routing key is ignored and both methods consume the message.
package com.mjb.spring.cloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import java.time.OffsetDateTime;
import java.util.function.Consumer;

@SpringBootApplication
@RestController
public class Main
{
    public static void main(String... args)
    {
        SpringApplication.run(Main.class, args);
    }

    @Autowired
    private StreamBridge streamBridge;

    @RequestMapping
    @ResponseStatus(HttpStatus.ACCEPTED)
    public String sendToBridge()
    {
        // Publish a timestamp
        final var now = OffsetDateTime.now().toString();
        streamBridge.send("the-exchange", now);
        return now;
    }

    @Bean
    public Consumer<String> onFoo()
    {
        // Receive from exchange with key 'the.foo.key'
        return received -> System.out.println("Received from FOO: " + received);
    }

    @Bean
    public Consumer<String> onBar()
    {
        // Not expected to receive from exchange with key 'the.bar.key'
        return received -> System.out.println("ERROR: Received from BAR: " + received);
    }
}

Version of the framework
Spring Boot 3.2.5
Spring Cloud Stream 4.1.1
Oracle GraalVM 21
Expected behavior
Properties defined in application.yml and present at compile time should be reflected in the native image and behave just like the JVM version.
Screenshots
Additional context
Similar to prior issue with Kafka streams. However, RabbitMQ binder documentation suggests properties must be defined in the prefix above.

@mjbingen We are investigating this issue. Can you please add instructions for how exactly to reproduce the issue? Your sample is a great start, and I see a native branch there. How do you build, run, and test the app? Also, how do you verify that things don't work as expected? Once you clarify these things, we will continue looking at this issue. Thanks!

@mjbingen Any updates?

Hi @sobychacko - sorry for the delay. Here is the full set of instructions to build the sample application to highlight the issue.

Assure your current Java version is a GraalVM compatible build that works with org.graalvm.buildtools.native Gradle plugin (I tested against Oracle GraalVM 21)

Build the native branch of the example as a bootable Jar and a native image: ./gradlew  bootJar nativeCompile

Assure a RabbitMQ broker is running on your localhost (quick startup via docker docker run -it --rm -p 15672:15672 -p 5672:5672 rabbitmq:3-management)

Run the application as a Jar to see the expected behavior

java -jar build/libs/spring-cloud-stream-sandbox.jar
Confirm that the settings in application.yml match the exchange/queue details on the RabbitMQ broker (via management panel in the browser via http://localhost:15672/ -> admin:admin)
This include a direct exchange named the-exchange and two queues, both bound to the exchange but with routing keys the.bar.key and the.foo.key.

Hit the service GET REST endpoint (localhost:8080) to trigger a pub/sub action
Confirm only the FOO channel is receiving the message as the application is configured to publish with only this routing key. Example: Received from FOO: 2024-05-21T10:46:00.322937+02:00

Run the application as the native image to see the undesired behavior of the application.yml properties being ignored and the RabbitMQ settings defaulting.

Delete the the-exchange exchange from the RabbitMQ broker to assure it is re-created on re-start of the service
Run the native image: build/native/nativeCompile/spring-cloud-stream-sandbox
Verify the RabbitMQ broker settings are not the same as when run as a Jar and the properties are defaulted. Exchange type is topic and binding keys are all (#)

When the REST endpoint is hit, the application will receive on both channels because the routing keys are defaulted and not respected. Example: ERROR: Received from BAR: 2024-05-21T10:50:04.930574+02:00

Let me know if this helps or you need any other details/tests to help with the investigation.

@mjbingen Sorry for the delay. This turned out to be a bug in the binder. We just addressed it via the above-referenced commit. It should be available as part of the 4.1.2 release.


Adding support for Windows 7

Adding support for Windows 7 as discussed  #7.

Verified to work on my end -  you can go ahead and merge.
I've also added ISO file support, so that instead of keeping yet another copy of the OS in the sources directory, ISO could be used to populate install and images.
Let me know if you have any questions.

Thank you.
Can I please ask you to update read me or let me know what was not accurate or unclear in there to make everything work?
Also, add some documentation for ISO part?
Thanks!

The ISO documentation is done now.
Re the unclear documentation I think the challenge is that your readme.md starts with "Create minimal updated install.wim image from scratch:" which pretty much confused me and made me believe that winpe was required to set that up. Perhaps you could point out that using winpe is optional and really boot.wim from the install media would do perfectly fine in most cases.
`

I will refactor this slightly and resubmit


Fix hardcoded metadata fetching for tenanted authorities

This PR:

Adds a set of pathless hardcoded cloud discovery metadata entries to be used for tenanted authorities
Adds logic to check if the canonical authority used to search for hardcoded metadata uses a tenantID or a named endpoint and builds the search string depending on the case
Returns a cached account without ID token claims if the matching ID token cannot be found
Fixes #6608  and #6602

We're currently processing your upload.  This comment will be updated when the results are available.

Any tests we can add to msal-browser to validate this fixes the bug e2e?

I duplicated the browserAAD E2E test and added a specific tenantId to the auth config. This tests the previously missed scenario since the acquireToken tests already reload the page between tests. I confirmed it fails on dev and passes here.


Search based on :not-in modifier does not work with HAPI server

I have a use case where i need to query resources based on the codes which does not belong to a specific valueset.
For example, get all the Condition resources whose "code" does not belong to a specific valueset:
[baseurl]/Condition?code:not-in=[valueset url]
I have tested with valuesets imported in to the HAPI server. However the server always returns a searchset response bundle without any match. There are no errors being logged as well.
Versions tested: HAPI 5.3.0 and 5.6.0

Additional observation with tracing of database queries:

SQL Trace for a successful :in modifier search:

exec sp_executesql N'SELECT TOP(@P0) t0.RES_ID FROM HFJ_SPIDX_TOKEN t0 WHERE (t0.HASH_SYS_AND_VALUE IN (@P1,@P2,@P3,@P4,@P5,@P6) )',N'@P0 int,@P1 bigint,@P2 bigint,@P3 bigint,@P4 bigint,@P5 bigint,@P6 bigint',500,1467505050375809577,3678909496003203944,5852290465196229675,7874386732050823410,-7482439459924037255,-4316477037596311675
(There are 6 codes in the valueset used in the sample and hence i assume there are 6 items starting from P1 to P6.
SQL Trace for a not working not-in modifier search:
exec sp_executesql N'SELECT TOP(@P0) t0.RES_ID FROM HFJ_SPIDX_TOKEN t0 WHERE (t0.HASH_VALUE = @P1)',N'@P0 int,@P1 bigint',500,-3347066299873263238
The above query returns 0 matches as the hash value sent is not present in the  HFJ_SPIDX_TOKEN table.


feat(llm/customlockscreen): adapt logic to work with several device models

📝 Description
wip
❓ Context

JIRA or GitHub link:

✅ Checklist
Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

[x] npx changeset was attached.
[ ] Covered by automatic tests.
[ ] Impact of the changes:

...

🧐 Checklist for the PR Reviewers

[ ] The code aligns with the requirements described in the linked JIRA or GitHub issue.
[ ] The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
[ ] There are no undocumented trade-offs, technical debt, or maintainability issues.
[ ] The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
[ ] Any new dependencies have been justified and documented.
[ ] Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

/generate-screenshots


[bug] compiling with -march=native causes crash: double free or corruption (out)

I have been playing with compilation flags to see if I can slightly speed up teb_local_planner.
In particular I have tested -march=native, which seems to always cause a double free or corruption (out)
Step to reproduce:

add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") to CMakeLists.txt:
recompile teb
run roslaunch teb_local_planner test_optim_node.launch
grab the interactive obstacle in the middle of the screen and move it quickly up and down to make teb change the selected path. The program will crash instantly if you are fast enough. For some reason the program does not crash when there is some time between the changes. Of course, no crash either without the -march=native flag.

Logs:
$ roslaunch teb_local_planner test_optim_node.launch
... logging to /home/dev/.ros/log/623bd2d8-56f4-11ec-adbd-0242ac110002/roslaunch-0ad64aca3e9e-5993.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://0ad64aca3e9e:40529/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    rviz (rviz/rviz)
    test_optim_node (teb_local_planner/test_optim_node)

auto-starting new master
process[master]: started with pid [6006]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 623bd2d8-56f4-11ec-adbd-0242ac110002
process[rosout-1]: started with pid [6018]
started core service [/rosout]
process[test_optim_node-2]: started with pid [6022]
process[rviz-3]: started with pid [6027]
[ INFO] [1638836817.022480729]: No robot footprint model specified for trajectory optimization. Using point-shaped model.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-dev'
double free or corruption (out)
[test_optim_node-2] process has died [pid 6022, exit code -6, cmd /home/dev/workspace/install/teb_local_planner/lib/teb_local_planner/test_optim_node __name:=test_optim_node __log:=/home/dev/.ros/log/623bd2d8-56f4-11ec-adbd-0242ac110002/test_optim_node-2.log].
log file: /home/dev/.ros/log/623bd2d8-56f4-11ec-adbd-0242ac110002/test_optim_node-2*.log

On my machine, -march=native does this:
$ gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
 /usr/lib/gcc/x86_64-linux-gnu/7/cc1 -E -quiet -v -imultiarch x86_64-linux-gnu - -march=broadwell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -msgx -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=12288 -mtune=generic -fstack-protector-strong -Wformat -Wformat-security

After some trials and error I found the actual culprit to be -mf16c. This enable half<->float conversion. It seems that gcc uses it at several places:
$ objdump -d /home/dev/hitachi_teb/install/teb_local_planner/lib/libteb_local_planner.so  | grep vcvtp
   d4022:       c5 fd 5a c0             vcvtpd2ps %ymm0,%xmm0
   d402c:       c5 fd 5a c9             vcvtpd2ps %ymm1,%xmm1
   d6414:       c5 fd 5a e1             vcvtpd2ps %ymm1,%xmm4

I don't really get why this would cause a double free.

Running test_optim_node with valgrind shows the problem may come from g2o library that is included with melodic, or the way BaseTebMultiEdge is used in teb local planner:
==4330== Memcheck, a memory error detector
==4330== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4330== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==4330== Command: /home/dev/hitachi_teb/install/teb_local_planner/lib/teb_local_planner/test_optim_node __name:=test_optim_node __log:=/home/dev/.ros/log/840700a0-5743-11ec-9eb2-0242ac110002/test_optim_node-1.log
==4330==
process[rviz-2]: started with pid [4353]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-dev'
==4330== Invalid free() / delete / delete[] / realloc()
==4330==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4330==    by 0x6ECE6FC: g2o::EdgeSE2PointXYCalib::~EdgeSE2PointXYCalib() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6EC710A: ??? (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x40108D2: call_init (dl-init.c:72)
==4330==    by 0x40108D2: _dl_init (dl-init.c:119)
==4330==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==4330==    by 0x2: ???
==4330==    by 0x1FFEFFFE3E: ???
==4330==    by 0x1FFEFFFE94: ???
==4330==    by 0x1FFEFFFEAC: ???
==4330==  Address 0x304ac7c0 is 16 bytes inside a block of size 128 alloc'd
==4330==    at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4330==    by 0x4EE2FA9: handmade_aligned_malloc (Memory.h:88)
==4330==    by 0x4EE2FA9: aligned_malloc (Memory.h:164)
==4330==    by 0x4EE2FA9: Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > >::allocate(unsigned long, void const*) (Memory.h:742)
==4330==    by 0x4EE1777: allocate (alloc_traits.h:301)
==4330==    by 0x4EE1777: _M_allocate (stl_vector.h:172)
==4330==    by 0x4EE1777: std::vector<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > > >::_M_fill_insert(__gnu_cxx::__normal_iterator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >*, std::vector<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > > > >, unsigned long, Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > const&) (vector.tcc:505)
==4330==    by 0x6ECFB54: g2o::BaseMultiEdge<2, Eigen::Matrix<double, 2, 1, 0, 2, 1> >::resize(unsigned long) (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6ECE21B: g2o::EdgeSE2PointXYCalib::EdgeSE2PointXYCalib() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6ED5A9F: g2o::HyperGraphElementCreator<g2o::EdgeSE2PointXYCalib>::construct() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6A6B36E: g2o::Factory::registerType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, g2o::AbstractHyperGraphElementCreator*) (in /opt/ros/melodic/lib/libg2o_core.so)
==4330==    by 0x6EC710A: ??? (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x40108D2: call_init (dl-init.c:72)
==4330==    by 0x40108D2: _dl_init (dl-init.c:119)
==4330==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==4330==    by 0x2: ???
==4330==    by 0x1FFEFFFE3E: ???
==4330==
==4330== Invalid free() / delete / delete[] / realloc()
==4330==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4330==    by 0x6EE723C: g2o::EdgeSE2TwoPointsXY::~EdgeSE2TwoPointsXY() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6EC745E: ??? (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x40108D2: call_init (dl-init.c:72)
==4330==    by 0x40108D2: _dl_init (dl-init.c:119)
==4330==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==4330==    by 0x2: ???
==4330==    by 0x1FFEFFFE3E: ???
==4330==    by 0x1FFEFFFE94: ???
==4330==    by 0x1FFEFFFEAC: ???
==4330==  Address 0x304ae280 is 16 bytes inside a block of size 128 alloc'd
==4330==    at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4330==    by 0x4EE2FA9: handmade_aligned_malloc (Memory.h:88)
==4330==    by 0x4EE2FA9: aligned_malloc (Memory.h:164)
==4330==    by 0x4EE2FA9: Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > >::allocate(unsigned long, void const*) (Memory.h:742)
==4330==    by 0x4EE1777: allocate (alloc_traits.h:301)
==4330==    by 0x4EE1777: _M_allocate (stl_vector.h:172)
==4330==    by 0x4EE1777: std::vector<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > > >::_M_fill_insert(__gnu_cxx::__normal_iterator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >*, std::vector<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, Eigen::aligned_allocator<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > > > >, unsigned long, Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > const&) (vector.tcc:505)
==4330==    by 0x6EE7954: g2o::BaseMultiEdge<4, Eigen::Matrix<double, 4, 1, 0, 4, 1> >::resize(unsigned long) (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6EE6D8B: g2o::EdgeSE2TwoPointsXY::EdgeSE2TwoPointsXY() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6ED56AF: g2o::HyperGraphElementCreator<g2o::EdgeSE2TwoPointsXY>::construct() (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x6A6B36E: g2o::Factory::registerType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, g2o::AbstractHyperGraphElementCreator*) (in /opt/ros/melodic/lib/libg2o_core.so)
==4330==    by 0x6EC745E: ??? (in /opt/ros/melodic/lib/libg2o_types_slam2d.so)
==4330==    by 0x40108D2: call_init (dl-init.c:72)
==4330==    by 0x40108D2: _dl_init (dl-init.c:119)
==4330==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==4330==    by 0x2: ???
==4330==    by 0x1FFEFFFE3E: ???
==4330==

Did you find a way around this ever? I am running into this exact issue right now.

I can't really tell. After this I stopped trying to use -march=native for a while.
Recently, I chased after strange bug in our codebase: one of our custom edges behaved totally wrong (the kind of 1+1=-7). With valgrind I observed memory leaks from the offending edge. After reordering the edge code a bit, the problem and memory leak disappeared (the code logic is still the same).
This looks typically like an Eigen memory alignment issue, somewhere in teb or g2o. But I couldn't not say where.
After the "fix", I went on and tried to use -march=native and now it works. No idea why.
So I can suggest you a few things:

check for memory issues with valgrind (without -march=native)
compile g2o yourself, with the exact same flags than teb
try to use c++17, Eigen is more reliable with c++17


⚠ DesiTorrents has degraded performance

In 09614c5, DesiTorrents ($DST) experienced degraded performance:

HTTP code: 200
Response time: 4153 ms

Resolved: DesiTorrents performance has improved in c9b28ac.


feat: dependencies update and apply luma-style-guide

docs: fix typos
docs: add documents for npmjs
chore: dependencies update and apply luma-style-guide

Codecov Report

Merging #4 (4447d27) into main (a7e9e73) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main        #4   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines           43        41    -2
  Branches         8         8
=========================================
- Hits            43        41    -2

Impacted Files
Coverage Δ

src/utils/package-json.ts
100.00% <100.00%> (ø)

src/utils/readme.ts
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Bevy 0.10

Are there plans to migrate to bevy 0.10? Love the library!

If there is enough interest, I could. However, I would not mind a PR if you wish to contribute!

I started it but it was a bit larger than I expected so I needed to postpone. 😃

Diving through it now I can definitely tell the hardest part will be migrating the window setup. Windows are now entities and they also removed some functionality like "WindowId" in favor of winit windowId

I started the port on my main branch. I have most things ported, but I am a but confused on how you would like to handle some things
https://github.com/hakolao/bevy_vulkano/pull/15

Done :)


Tile only "main" (first open?) window of app

I use JetBrains products regularly, and they love opening small dialogs, which keep getting tiled, or (even worse) maximized if I'm in monocle mode. Is there any option to, for example, enabling tiling only for currently open windows, but float all windows opened after that? Any workaround would be greatly appreciated

Have you tried window rules?

I tried window rules, but I couldn't figure out how to distinguish between project windows and all the dialogs. Example:
% chunkc tiling::query -w 410
id: 410
level: 0
name: rba [~/dev/rust/rba] - .../src/encoder.rs [rba]
owner: IntelliJ IDEA
role: AXWindow
subrole: AXStandardWindow
movable: 1
resizable: 1
% chunkc tiling::query -w 411
id: 411
level: 0
name: Tip of the Day
owner: IntelliJ IDEA
role: AXWindow
subrole: AXStandardWindow
movable: 1
resizable: 1

So I have a .chunkwmrc that looks like this:
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Checkout Packages" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Commit Changes" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Comparison Failure" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Delete" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "IDE and Plugin Updates" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "New Directory" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Run/Debug Configurations" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Preferences" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Project Structure" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "SQL Dialects" --state float &
chunkc tiling::rule --owner "IntelliJ IDEA" --name "Select Elements to Import" --state float &
...

to which I add new rules regularly as I trip over dialogues.
Having said that I'm not sure there's a real main window concept that would work, since even here you can have multiple project windows open at once. Are there other window attributes available that aren't being picked up by chunkc tiling::query -w ?

Ok, this is really a dupe of #201 and there's a nice rule in that issue:
chunkc tiling::rule --owner "IntelliJ IDEA" --except ".+[.+" --state float &

Actually that rule doesn't seem to entirely cover things. It works if I restart chunkwm, but not if I start up IDEA after chunkwm is already running. I suspect IDEA is changing the window title after chunkwm has already decided how to manage it.

I have the same issue as well. But I come across a work around by accident.
Hope this can help solving this issue properly.
So in my .chunkwmrc, I have this line
chunkc tiling::rule --owner "IntelliJ IDEA" --state float&
After Intellij is load and I select my project, I toggled 'float' using my shortcut 'hyper-t'.
hyper - t : chunkc tiling::window --toggle float;\                   chunkc tiling::window --grid-layout 4:4:1:0:2:4
For some reason, Intellij will now dock into a tile and all the child dialog like "Create New Class" will not be spawned into a tile.
Here is some info that I hope can help debug the problem:

With the above config, here is what the chunkc tiling::query looks like when Intellj first load into the "Welcome to Intellj IDEA" dialog.

❯ chunkc tiling::query --desktop windows
5407, IntelliJ IDEA, Welcome to IntelliJ IDEA (invalid)
❯ chunkc tiling::query --window 5407
id: 5407
level: 0
name: Welcome to IntelliJ IDEA
owner: IntelliJ IDEA
role: AXWindow
subrole: AXDialog
movable: 1
resizable: 0

Here is what happen after I selected my project:
❯ chunkc tiling::query --desktop windows
5408, IntelliJ IDEA, -IDEA- Yonezo

❯ chunkc tiling::query --window 5408
id: 5408
level: 0
name: -IDEA- Yonezo
owner: IntelliJ IDEA
role: AXWindow
subrole: AXStandardWindow
movable: 1
resizable: 1

After I focus on Intellj and press hyper-t (now Intellij is docked into a tile):
❯ chunkc tiling::query --desktop windows
5408, IntelliJ IDEA, -IDEA- Yonezo

❯ chunkc tiling::query --window 5408
id: 5408
level: 0
name: -IDEA- Yonezo
owner: IntelliJ IDEA
role: AXWindow
subrole: AXStandardWindow
movable: 1
resizable: 1

Now Intellj seems to be docking file in a tile and all it's dialog windows seems to work correctly.
❯ chunkc tiling::query --desktop windows
5429, IntelliJ IDEA, New Project
5408, IntelliJ IDEA, -IDEA- Yonezo

❯ chunkc tiling::query --window 5429
id: 5429
level: 0
name: New Project
owner: IntelliJ IDEA
role: AXWindow
subrole: AXStandardWindow
movable: 1
resizable: 1
The "New Project" are now 'floating' as what it should be.
I am now sure if this workaround will help everyone but it certainly worked for me. :)
@koekeishiya let me know if there is anything else you want from me that could help you to solve this problem for good :)


#expect(throws:) expression should accept non-Void return type and describe returned values

This changes #expect(throws:) and similar macros so that their closure parameters accept any type instead of Void specifically.
Motivation:
This makes testing trivial throwing expressions of non-Void types easier, by not requiring syntax to discard the return value. For example:
func mightThrowXOrReturnY() throws -> Y { ... }
#expect(throws: X.self) {
  try mightThrowXOrReturnY() // ⚠ Result of call to 'mightThrowXOrReturnY()' is unused
}

Modifications:

Change closure parameters of relevant macro-related declarations to use generic R type instead of Void.
Change implementation of relevant __check... functions to include a description of return value.
Add new unit tests.
Update documentation to mention that return values are always discarded.

Result:
The changes in this PR mean the warning above will no longer be emitted by the compiler. These changes also allow printing a description of the return value if the expectation fails and the expression does not throw an error, providing a more detailed and actionable failure message.

@swift-ci please test

@swift-ci please test

@swift-ci please test Linux


Filenames for downloaded time sheets

Currently the filenames of all downloaded time sheets are Timesheet.pdf.
Instead the filename should be time sheet <last_name> <numeric_month> <year>.pdf.

New name: