Add bump for tracking upstream updates + Action for checking + badge for bump

@IgorTodorovskiIBM re-pasting blurb from (now-collapsed) commit suggestion.
I see that it makes the URL clean-looking as one benefit, and also that the pulled repo will then be git-initialized.
But is the latter required, considering that the updates are upstreamed already?
I know there is one patch in the folder but I doubt if it'll get upstreamed.
I'm not clear on where to use .tar.gz vs .git and STABLE_TAG, as there's a mix of both across the repos.

@IgorTodorovskiIBM please review & merge when you find some time.


chore: prepare release 2023-06-15

Summary
This PR has been created using the yarn release script. Once merged, the clients will try to release their new version if their version has changed.
Version Changes

javascript: 5.0.0-alpha.68 -> prerelease (e.g. 5.0.0-alpha.69)
java: 4.0.0-SNAPSHOT -> patch (e.g. 4.0.0-SNAPSHOT)
php: 4.0.0-alpha.66 -> prerelease (e.g. 4.0.0-alpha.67)
go: 4.0.0-alpha.15 -> prerelease (e.g. 4.0.0-alpha.16)
kotlin: 3.0.0-SNAPSHOT -> patch (e.g. 3.0.0-SNAPSHOT)
dart: 0.3.0 -> patch (e.g. 0.3.1)

Skipped Commits
(None)

too soon, you have to wait for the generation to finish on the CI


Adding a fixed version of dataflow dynamic rebalancing.

Dynamic rebalancing is Dataflow's ability to split long running, straggler Read jobs into 2 jobs.  That allows Dataflow to reduce overall execution time by moving parts of a job that are on busy machines to idle machines.

Would be helpful if the PR had some explanation of what "dataflow dynamic rebalancing" means.

LGTM

Closing this due to merge conflicts.  I created another PR for this.


Update SSO to 7.5

@jmesnil this needs to be merged urgently, since samples for old versions of SSO have been removed from library.

We didn't see any issues when testing the update, so this can be merged.

We didn't see any issues when testing the update, so this can be merged.

@yselkowitz @mackaypeter thanks!


Messaging Module Added Under Sub Menu

You appear to have been working with an old version of Eden. When making code changes it is essential that you work with the latest version.

Currently impossible to see what was done here as this PR shows 1,887 files changed and is unmergeable...I suggest trying again?

I mixed up it with other version. But the main thing I changed was I edited the config.py file under the default template so that the messaging module is visible in the sub-menu under the main menu. Also some lines under the 000_config.py.


[BUG] OAuth Lib Transport Error in Catalog

Describe the bug
The callBack URL from GithubOAuth gives a 500 Error because the OAuth Transport services require Https. However, within the docker container the calls could be routed through http . Hence giving OAUTH Lib transport error.
To Reproduce
Steps to reproduce the behavior:

Build and deploy the docker image for catalog
Try authentication via Github OAuth
Authentication is successful. But the callback results in 500 Error as the url is routed via http and not https.
See error

Expected behavior
Authentication and callback should be successful. OAUTHLIB_INSECURE_TRANSPORT env varaible should be removed from the dev instance.
Try the below solutions:
sol1
sol2
Additional context
In dev instance OAUTHLIB_INSECURE_TRANSPORT bool is set. In the TEST and PROD instance, this env variable is removed. Dev instance should work without this env variable.

Changed local develop branch and deployed contributionsBB and catalog to dev.
ECS -> Task definition -> Contribution-building-block:14 and contributions-catalog:11 are used.

https://api-dev.rokwire.illinois.edu/catalog/auth/callback? Results in 500Error still.
@sandeep-ps was wondering if you could test this in your local with docker?

Closing this issue as its fixed by #930


Optimize intersections of unions of unit types

This PR optimizes creation of intersection types containing unions of unit types. Such types occur for example when obtaining keyof X where X is large union of object types with many properties.
Fixes #23977.

Ah! before i forget! This has the same downside my PR has (which I asked about being worth doing): It doesn't handle a union containing symbol or number (or other primitives), which is potentially problematic, since keyof (the easiest way to make a huge union) will return at least number. For example:
// @strict: true
// Modified repro from #23977

declare global {
    interface ElementTagNameMap {
        [index: number]: HTMLElement
    }

    interface HTMLElement {
        [index: number]: HTMLElement;
    }
}

export function assertIsElement(node: Node | null): node is Element {
    let nodeType = node === null ? null : node.nodeType;
    return nodeType === 1;
}

export function assertNodeTagName<
    T extends keyof ElementTagNameMap,
    U extends ElementTagNameMap[T]>(node: Node | null, tagName: T): node is U {
    if (assertIsElement(node)) {
        const nodeTagName = node.tagName.toLowerCase();
         return nodeTagName === tagName;
    }
    return false;
}

export function assertNodeProperty<
    T extends keyof ElementTagNameMap,
    P extends keyof ElementTagNameMap[T],
    V extends HTMLElementTagNameMap[T][P]>(node: Node | null, tagName: T, prop: P, value: V) {
    if (assertNodeTagName(node, tagName)) {
        node[prop];
    }
}

will still happily spin forever.
It's probably worth fixing - it doesn't take too deep an object structure before this becomes problematic, and a single numeric indexer foiling the optimization is not great.

@mhegazy @weswigham Adding generalized support for string, number, and symbol is going to add a non-trivial amount of complexity. I'm still mulling over the best algorithm, but meanwhile I think we should merge the PR as it sits now and get the real world bug resolved.

sounds good to me.


Add option to export PSBT without TX hex for each input?

When I export a large p2wsh PSBT (100 inputs in a 2-of-3) I get a massive PSBT of 678 KB!
When inspecting the PSBT, it appears that the full previous/funding tx hex is included for each input. While this is nice to have, it is not a requirement (especially for p2wsh where tx fee attacks are much harder to pull off).
This extra parsing data makes my signature time balloon 10x. Is it possible to have an option for witness UTXOs to only include the TxOut?
Example files:

from sparrow
my slim version

As you're probably well aware, we can blame Trezor for this unfortunate requirement of needing the non_witness_utxo field for each input. While not every HWW requires it, it's now sufficiently murky that Sparrow errs on the side of including it unless it knows it's not required. This latter test is currently true when the signers are Coldcard, Cobo or Passport. I'm happy to update this list - it should include Keystone too at least. What type are your signers?
Note that Sparrow serializes all non_witness_utxo fields using the old pre-Segwit transaction serialisation, so at least with P2WSH the signatures are omitted.

I'm using my own software CLI wallet buidl. It's not very popular atm, but I know anecdotally of several whales who use it in their multisig. It's cross-platform FOSS and has no dependencies. Outdated demo here:
https://twitter.com/mflaxman/status/1321503036724989952
Basically, I'd just want a slimmed down export option (preferably in base64). Def not a default thing (for normal TXs I'd still prefer the large PSBTs) but for when people have really big/slow transaction it makes sense. I'd imagine you're already slimming this down for QR Signers as they (should) all be p2wsh anyway.
Either way, this is making me think I may need a method on my side to ignore all but a given TxOut when parsing a Tx. It's not often I want to skip validating any data though...

Either way, this is making me think I may need a method on my side to ignore all but a given TxOut when parsing a Tx. It's not often I want to skip validating any data though...

Skipping the  PSBT non_witness_utxo field is entirely reasonable and normal when looking at a P2WSH transaction, so I'd suggest that as a first step.

I'd imagine you're already slimming this down for QR Signers as they (should) all be p2wsh anyway.

Yes, that was actually the driver behind using the old non-Segwit serialization format.
I'd like to try avoid adding even more options to the PSBT save menu - it's getting pretty complicated already.

FWIW I don't think the current PSBT export menu is scalable/straightforward. Radios for things like xpubs, base64/binary/hex, and input details would make more sense. Specter-DIY has a big b64 by default and then customizes the PSBT based on the signer who it's for.

In effect there are 2 suggestions / requests being made here:
1 - Add radio buttons to customise PSBT Export depending on user requirements
2 - Include the option to skip non_witness_utxo data (only txOut).
I will make a new issue for suggestion 1 as this appears to be a prerequisite for Craig to consider implementing suggestion 2 (due to UX issue otherwise).


Serverless Stack tutorial showing usage of step functions instead of Lambda

Additional chapters or totally new sub chapters can be started on this.
This would be widely helpful as AWS Step functions are equally used, and there is no proper stack oriented tutorial on that.

Yeah that's true. We'll look into adding a section when we get a chance.

Great.
Have been already working on this.
Let me know, if open for contributions.

Yeah for sure. If you are interested in writing in a chapter, that would be great.


feat(core): add RPCs to namespaces service to handle assignment/removal of KAS grants

Resolves #1332 (partially, not yet LIST)

@pbacon-blaber could you please review the audit additions I made in this PR to align namespace grant audit records with those of definition/value grants?


Update Switcher.tsx

It looks like the problem resulting from the developers were trying to integrate the components from "lucide-react" into their self-created components.
The props for "ThemeSwitcher" did not support "size" as argument comparing to the interface from "lucide-react"
import { Camera } from 'lucide-react';

// Usage
const App = () => {
  return <Camera color="red" size={48} />;
};

export default App;

That's why I slightly update the parent component(ThemeSwitcher), instead of children components like (EmptyChat and Navnar).
Hope this would help.(I've tested it.

Fixed in #168


[Bug] apoli:elytra_flight doesn't trigger the minecraft:elytra_glide game event during Elytra Flight

This was reported on the discord for a long time now and I don't remember seeing any patch notes covering this so decided to write a short report here.
The minecraft:elytra item creates the game event when flying but the power does not.
If backwards compatibility is a concern here for some reason a field could be added like emits_game_event that defaults to false but if such field is to be added I'd say it's best to default to true to stay consistent with the base game.

This may be a Fabric API issue, rather than an Origins one, as the Elytra Flight code is in FAPI.


Feature: show the progress when upload a local file to remote server

Hi, Could you develop a new feature that show the progress when upload a local file to remote server? I've used a plugin named SFTP of Sublimetext, when you save a file, the plugin can show a point progress at the bottom of the sublimetext window. That's very helpful to know the status of the file transfering, succeded or failed.

This feature already exists:
Look at the bottom of TreeView (strg+opt+o on Mac) – there are status messages. You will see a progress bar during uploads and success/failure messages.
The package shows you the last 20 messages. Drag the first message up to display the rest.


Change SSH executables copy to Docker COPY and standardize app root

. Changes the copy of executables from the SSH on the running
container to copy them with COPY in the Dockerfiles on the container
build.
. Standardizes between the SDK, the debug and the production the
APP_ROOT directory variable, to use a value defined on settings.json,
making it clear for the user where his project files are.
Does the same for the APP_EXECUTABLE file.
. Adds the information about how to deal with extra files (not added to
the running container automatically) on the documentation of each
template.

LGTM


Data grid MultiSelection doesn't work with SelectedItem

Bug type
Component
Component name
MudDataGrid
What happened?
So, I have a data grid, from which the user can choose one and only one item, I found out that MultiSelection = false, dosen't work in that case, and the user can choose multiple items (althought only the last checked item will be selected).
Expected behavior
I exepected that by setting the MudDataGrid Parameter MultiSelection to false, would uncheck the already selected item, when another one is checked.
Reproduction link
https://try.mudblazor.com/snippet/QamdaBPFhGzPZJZP
Version (bug)
6.7.0
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Windows
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi.
Does this solves your issue? https://try.mudblazor.com/snippet/QumnurbbWJcJIvuq

Yes, it does, appreciate your help.
But can I ask, why should it be done that way ? it doesn't seem logical to bind-SelectedItems to a HashSet & bind-SelectedItem for it to work.

Yes, it does, appreciate your help. But can I ask, why should it be done that way ? it doesn't seem logical to bind-SelectedItems to a HashSet & bind-SelectedItem for it to work.

I didn't really dig too deep, so I'm unable to answer your question. I am just aware that it functions as intended when Multiselection is set to false with @bind-SelectedItems set, since we had recently a PR that fixes it. Ideally, it should work in both scenarios, regardless of whether @bind-SelectedItems is set or not. However, no one has yet examined the second case. If this scenario is important to you, submitting a PR would be highly appreciated.

If I understand the issues correctly, you expect that when MultiSelection  = false, it is allowed to ONLY select one item.
If that's the case, that is not how MultiSelection works; MultiSelection = true only enables the checkboxes.

Now I get it, I appreciate your help.


Get rid of time 0.1.* dependency

Checklist

[x] I have read and agree to Contributor Guide and the Code of Conduct
[ ] I've included a screenshot or gif (if applicable)
[ ] I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

According to cargo audit, rerun dependency to time 0.1.* is tied to its dependency to chrono 0.4. And Rerun is dependent on chrono in three different ways:

Using chrono in re_log_types to format times
Transitively via arrow2
Transitively via polars

But in fact, time has been an optional dependency to chrono for quite some time, and can be avoided by setting default-features = false. Arrow2 is already doing this, but not polars. Well polars merged a PR last week removing chrono default features, but it hasn't reached a published version yet.
So I tried disabling chrono default features in rerun and overriding polars with their latest git commit. This is indeed removing time 0.1.* from our dependencies :) Now of course re_log_types does not compile anymore because of a call to chrono::offset::Utc::now().
error[E0599]: no function or associated item named `now` found for struct `Utc` in the current scope
  --> crates/re_log_types/src/time.rs:96:70
   |
96 |                     if datetime.date_naive() == chrono::offset::Utc::now().date_naive() {
   |                                                                      ^^^ function or associated item not found in `Utc`

So in theory, if we fix that, when the next version of polars is published we will be rid of the time CVE.

Just to be clear, this PR is not ready to be merged, it's the first step of fixing the time issue, now waiting on guidance from rerun team to see how to proceed.

Thank you so much for working on this! ❤
Excellent work on figuring out that time is an opt-out feature of chrono - that makes things a bit simpler!
Getting rid of the use of chrono::offset::Utc::now() in re_log_types can only be done by using the time crate directly (version 0.3). If we replace that call we might as well replace all the uses of chrono in crates/re_log_types/src/time.rs with the time crate. It's only a few format strings that need changing. time can format dates and times too, it just has a slightly different syntax for doing it:
let time_format = time::format_description::parse("[year]-[month]-[day] [hour]:[minute]:[second]Z")?;
let date_time = time::OffsetDateTime::now_utc().format(&time_format)?;

As for the patched crate: we avoid patching our crates because it can easily prevent us from publishing new rerun crates. polars is also an opt-in dependency that we currently don't use at all (it is never pulled in for users).
I'll convert this PR to a draft until it compiles :]

Noted, I'll try to do the chrono/time swap later tonight.

I have made some changes in re_log_types to use time instead of chrono. It resulted in a few logic changes as the edge cases do not seem to be exactly the same, as there is no Single | None | Ambiguous variant for datetimes.
Apparently chrono is also used in re_viewer so we might need to change it there too.
A few remarks after working on this:
The purpose of is_abolute_date(&self) seems to be to differentiate cases where Time is lower than 20 years, and in such cases, consider that it is a relative time, and format time with only the seconds.
This seems like a bad idea to me, as you leave some arbitrary implicit condition inside a formatting function. This may lead to weird to track bug in the future. I would see two ways to fix this situation. Either differentiate relative and absolute times in rerun types, with each their own set of rules and functions. A bit like the Duration (relative) and OffsetDateTime (absolute) types in the time crate. Or differentiate the formatting functions for absolute and relative time, let the caller decide.
I also do not like very much the internal logic asking for the current date, to see if we can omit the day part of the displaying logic. It does not seem robust to me because the implicit logic may prove to be annoying to deal with for other use cases. Imagine you want to format times for logging, which will later be analyzed by some other code. While logging the formatted date, they all will follow the "current day" logic, but when reviewing these logs few days later will be impossible because we won't know which date it referred to.
Basically, I think it would be better to extract all implicit logic and side effects to caller sites, where someone clearly takes responsibility of these decisions, instead of using a heuristic.
Finally, representing dates with unix timestamp in nanoseconds with i64 can only go as far as a couple hundred years. Depending on usage, for things like simulations and such, I can easily imagine weird situations where the i64 representation is not enough. For reference, the time library uses i128 for unix timestamps in nanoseconds.
PS: I haven't looked at why but arrow2 doesn't like the new polars it seems.

The remarks above about implicit internal logic and side effects does not matter for this PR, but if you think it is relevant for later, I'll open an issue about it later.

We have chosen to use i64 for all our time types for simplicity and speed. We could distinguish between relative and absolute by associating them with different TimeType:s, but at that point we probably also want to support different epochs. For supporting century-scale data: that again could be solved with a different TimeType (intepreting the i64 as years for astronomical simulation or whatever), but I'd rather punt on all this until we have an actual user for which the current system is lacking. We have enough things to do 😅. So: if you need century-scale time data, please open an issue explaining your use case! But let's keep this PR discussion on-topic.

Also, the time code type check, but I haven't executed it to check that the formatting is actually correct. Will do during the week.

Awesome! Adding a little unit-test would be great. I should have done so myself when I last touched the code 😬

Please also revert Cargo.lock - you seem to have run a full cargo update, which is outside the scope of this PR!

Apparently chrono is also used in re_viewer so we might need to change it there too.

I don't think it is, actually. It seems like an unused dependency!

Awesome! Adding a little unit-test would be great. I should have done so myself when I last touched the code 😬

Alright, will try to do that

Please also revert Cargo.lock - you seem to have run a full cargo update, which is outside the scope of this PR!

Clearing the cargo.lock was the only way I had found to make sure I had gotten rid of the time 0.1 dependency while checking with cargo audit so I thought it was worth putting in the PR, simply so can others can reproduce. I’ll get rid of the lock changes and the current patch crate.

I've removed the chrono patching override with the git repo. So for the time being we still have time 0.1.* in the dependencies, but as soon as polars updates, it should be fixed.

polars is also an opt-in dependency that we currently don't use at all (it is never pulled in for users).

Should I do anything about this or just leave it as is?
I've minimized the changes to the cargo lock file by resetting it to its state in the main branch and doing a cargo check afterward.
I've updated the formatting function in re_viewer and removed the unused one in re_log_types.
The only thing left should be adding a unit test for formatting.

I've added tests for the formatting.
Beware that the test for checking formatting of datetimes for today may flake as It's not guaranteed that now for generating the test date, and now called inside the formatting function could differ if this is launched closed to 00:00 UTC


[UPGRADE] Upgrade Istio to the latest released version

Is your feature request related to a problem? Please describe.
Our current Istio version (1.8) is out of support since 12th May.
It has 3 vulnerabilities:

CVE-2021-34824
CVE-2021-31921
CVE-2021-31920

Describe the solution you'd like
Upgrade to the latest available version. Right now the latest is 1.10.3
Additional context
This comment should be discussed when grooming: https://github.com/epiphany-platform/epiphany/issues/1931#issuecomment-846989413

DoD checklist

[ ] Changelog updated
[ ] COMPONENTS.md updated / doesn't need to be updated
[ ] Feature has automated tests
[ ] Automated tests passed (QA pipelines)

[ ] apply
[ ] upgrade

[ ] Idempotency tested
[ ] Documentation added / updated / doesn't need to be updated
[ ] All conversations in PR resolved
[ ] Solution meets requirements and is done according to design doc
[ ] Usage compliant with license
[ ] Backport tasks created / doesn't need to be backported

Closing because of deprecation of Istio component.


kinvolk/inspektor-gadget network policy fails to monitor flows due to "Gadget Daemon not found"

Description
When attempted to use the kinvolk/inspektor-gadget network policy function, very few logs are obtained, the "Gadget Daemon not found" error is provided, and after several seconds the monitoring stops.
Impact
This prevents us from using kinvolk/inspektor-gadget to monitor flows and develop / validate network policies.
Environment and steps to reproduce

Set-up: On prem-cluster, Kubernetes v1.19. Using nodeSelector to apply inspektor-gadget to nodes running  pods of interest.

Note that one worker node c5 is configured not to schedule pods, but the gadget yaml has been configured to use a nodeSelector to avoid this node.

Task: Starting network policy monitoring per https://kinvolk.io/docs/inspektor-gadget/0.2/guides/network-policy/
kubectl gadget network-policy monitor --namespace ns1 --output ./networktrace.log

Action(s): [ sequence of actions that triggered the bug, see example below ]
a. [ requested the start of a new pod or container ]
b. [ container image downloaded ]

Error: [describe the error that was triggered]

Node g4 ready.
Node g2 ready.
Error running command: Gadget Daemon not found
Node g1 ready.
Node g3 ready.
Node l1 ready.
Node c7 ready.
Error running command: Gadget Daemon not found
Node l2 ready.
Error running command: Gadget Daemon not found
Node c9 ready.
Node c8 ready.
Node c6 ready.
Error running command: Gadget Daemon not found

Node c4 did not report as ready, but the gadget pod is running on that node, and there are no abnormalities in the pod logs.
This process is running on the gadget pod on node c4. Per "ps -aux":
root      4800  0.1  0.8 1340956 17056 ?       Ssl  17:17   0:01 /bin/gadgettracermanager -serve -podinformer -controller
Expected behavior
Expected the gadget network monitor tool to run and log pod network transactions.
Some of these are logged, but very few and not enough to validate network policies.
Additional information
May be related to this issue: https://github.com/kinvolk/inspektor-gadget/issues/168

Hi! Could you please confirm the version if you are using? I suppose it's v0.4.2 by the error message you posted. Would you mind trying with latest version? I'm curious what happen there even if I think it'll fail because Inspektor Gadget doesn't support running only on some nodes (see https://github.com/kinvolk/inspektor-gadget/issues/125).
It seems to be a difficult one to solve, I'll try to think more and will be back with some ideas.

Hi @mauriciovasquezbernal. Thanks for looking into this. Your latest release seems to be v0.4.2. I'll look for a different version...

@mauriciovasquezbernal I don't see a newer release than v0.4.2. Is there another branch I should be looking at? Thanks!

You're right, v0.4.2 is out latest release. I meant to use the main branch. You can follow the Compile from the sources documentation to install it.

Hi! We released version 0.5.0 last week. You could check if it works better for you with that version (please note that with this version we've changed the syntax of the CLI commands. To invoke the network-policy advisor you now need to do: kubectl gadget advice network-policy monitor).
However, after re-reading the initial message I noticed that the command line says namespace, and for the network-policy advisor it still currently requires the parameter to be called namespaces (even when you pass only one). I'll file a separate bug for that, but you could also check if that fixes the issue for you.

Actually, scratch that, that issue was fixed a long time ago, so version 0.4.2 should have worked correctly anyway. @QWERTY92009 , could you please provide any more information regarding your failure? Thanks!

Would you mind testing this with the latest version @QWERTY92009? thanks!

Closing this as inactive. Please reopen / open a new one if you have further info to share @QWERTY92009.


heapList

using mappings instead of dynamic arrays

elements of mappings can not be deleted in vyper
https://github.com/omisego/plasma-mvp/blob/master/plasma/root_chain/contracts/PriorityQueue.sol#L76

heapList[0] is needed?
https://github.com/omisego/plasma-mvp/blob/master/plasma/root_chain/contracts/PriorityQueue.sol#L32

#49


Include examples of streaming API usage

The README doesn't seem to contain any examples for streaming API. The functionality is definitely there, as can be seen in the source and comments.

Any updates on this functionality ?

@ihrimech it looks like the streaming API is implemented but was not documented. As you can see in #116 there is an open pull request for this.

@nii236 Thanks for the PR. Hope it gets merged and/or updated also with the new one

No problem! It wasn't my PR though. Anyway at least some usage information is there, the exported funcs still aren't commented...

Fixed by #241. Thanks!


feat: added strategy with ape template

@jmonteer I've re-written the strategy in a simpler way, just using minimum api vault needs. Please give it a look

@jmonteer
Following your comments I've created the BaseStrategy. If it fits you I can update ape strategy mix with this new BaseStrategy


Fixed typo in 'next-typescript' plugin's readme

Sorry, I made markdown syntax error in 'next-typescript' plugin's readme. This PR fixes it

Please fix the merge conflict 👍

Done 👌


Test setup with Renogy Rover

Hello,
Currently I am trying to make this work with a test setup of the Renogy Rover MPTT 40A controller. I have only a Mighty Max 12V 100Ahr connected to Bat (+) and Bat (-). PV(+), PV(-), Load(+), and Load(-) are all disconnected.
I can successfully use solarshed on '/dev/ttyUSB4', and I am confident this is the port that the Rover uses (see below). However there is no response from the Rover, why would that be? Do I need to make an adjustment to my test setup?
`

from solarshed.controllers.renogy_rover import RenogyRover
controller = RenogyRover('/dev/ttyUSB4', 1)
controller.charging_status()
Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/radioconda/lib/python3.10/site-packages/solarshed/controllers/renogy_rover.py", line 163, in charging_status
return self.read_register(288) & 0x00ff
File "/home/ubuntu/radioconda/lib/python3.10/site-packages/minimalmodbus.py", line 258, in read_register
return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals, signed=signed)
File "/home/ubuntu/radioconda/lib/python3.10/site-packages/minimalmodbus.py", line 697, in _genericCommand
payloadFromSlave = self._performCommand(functioncode, payloadToSlave)
File "/home/ubuntu/radioconda/lib/python3.10/site-packages/minimalmodbus.py", line 795, in _performCommand
response = self._communicate(request, number_of_bytes_to_read)
File "/home/ubuntu/radioconda/lib/python3.10/site-packages/minimalmodbus.py", line 930, in _communicate
raise IOError('No communication with the instrument (no answer)')
OSError: No communication with the instrument (no answer)
`

Have you tried adjusting the slave address?  I had to change it to get mine to work for some unknown reason.  I temporarily changed the code to find the correct slave address:
if __name__ == "__main__":     slaveaddress = 1     while slaveaddress < 256 :         try:             print( 'Trying slaveaddress: ', slaveaddress )             rover = RenogyRover('/dev/ttyUSB0', slaveaddress)             print('Model: ', rover.model())             print('Battery %: ', rover.battery_percentage())             print('Battery Type: ', rover.battery_type())             print('Battery Capacity: ', rover.battery_capacity())             print('Battery Voltage: ', rover.battery_voltage())             battery_temp = rover.battery_temperature()             print('Battery Temperature: ', battery_temp, battery_temp * 1.8 + 32)             controller_temp = rover.controller_temperature()             print('Controller Temperature: ', controller_temp, controller_temp * 1.8 + 32)             print('Load Voltage: ', rover.load_voltage())             print('Load Current: ', rover.load_current())             print('Load Power: ', rover.load_power())             print('Charging Status: ', rover.charging_status_label())             print('Solar Voltage: ', rover.solar_voltage())             print('Solar Current: ', rover.solar_current())             print('Solar Power: ', rover.solar_power())             print('Power Generated Today (kilowatt hours): ', rover.power_generation_today())             print('Charging Amp/Hours Today: ', rover.charging_amp_hours_today())             print('Discharging Amp/Hours Today: ', rover.discharging_amp_hours_today())             break         except minimalmodbus.NoResponseError:             slaveaddress = slaveaddress + 1

Is your test setup the same computer you run the working solarshed on? Make sure the serial port, /dev/ttyUSB4,  is correct for your test setup.

Thank you, it worked! I used 16 as slaveaddress, which I identified as device_id using this software


option to hide frequency bar on saved images

The web file should always show the frequency bar, but the "all grabs" folder should have an option to hide it, making it easier to merge historical grabs to create 8-hour and 24-hour views.
After this is done, a standalone stitching and stacking application should be created (#17)

done


Need acceptable values for field "State"

You say the state field is required but you don't indicate what values are allowed.

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

ID: 15e72062-8f29-4762-390e-61c746a0ae70
Version Independent ID: a03281f8-9804-ea11-fe1d-bf1938600a9c
Content: Bulk create locations
Content Source: MicrosoftSearch/bulk-create-locations.md
Service: mssearch
GitHub Login: @dawholl
Microsoft Alias: dawholl

@wisc75 - Hi, thank you for your feedback. Please see the updated content available at:
https://docs.microsoft.com/en-us/microsoftsearch/manage-locations


Indicator setup Targets tab: Updates related to new reporting date ranges

Related issues:
#258 Program Indicator List view: Setting reporting period start and end months
#227 Pull program start and end dates from GAIT and use them to set reporting start and end months
Annual/Semi-annual/Tri-annual/Quarterly/Monthly targets
Precondition: Complete all required fields on the targets tab and select Annual, Semi-annual, Tri-annual, Quarterly, or Monthly from the Target frequency menu.

[x] 1. There is no longer a "First target period begins" field. (The system already knows the reporting start month for all indicators in the program.)
[x] 2. There is no longer a "Number of target periods" field.
[x] 3. The only thing left under the Target frequency menu is the Create targets button.
[x] 4. When I click the Create targets button, the system generates all target periods between the program reporting start month and end month.
[x] 4.1. The correct number of periods is generated.
[x] 4.2. The date ranges for all target periods are correct.

LoP only, Midline/Endline, and Event targets

[x] 1. There are no changes to how these targets are generated.
[x] 2. Sub-options are preserved for Event targets. The "First event name" and "Number of events" fields are still available.

Adding and deleting target periods: Updated rules
Going forward, we are not permitting indicators to have varying numbers of target periods. Any target period can have a value of zero if there is no measurement occurring. But target periods must exist for the duration of the reporting period, for all indicators. Following are the effects on all target frequency types.
LoP only
No changes. It is not possible to add or delete target periods.
Midline and Endline
No changes. The following should be checked for regressions:

[x] 1. It is not possible to add or delete target periods.
[x] 2. The "Remove all targets" option remains available.
[x] 3. UI detail: Please add some padding between the bottom of the table and the top of the box below for both # and % variations. (Right now there is not enough space.) Make sure this doesn't mess up the spacing for other target frequencies.

Event targets
No changes. The following should be checked for regressions:

[x] 1. Red X icons still appear for all Event targets and you can manually delete them one at a time.
[x] 2. The "Add an event" button still appears, and you can manually add events one at a time.
[x] 3. The "Remove all targets" option remains available.

Annual/Semi-annual/Tri-annual/Quarterly/Monthly targets

[x] 1. Remove the "Add a period" button. It is no longer possible to manually add targets one at a time. (This is now done at the program level.)
[x] 1.1. UI detail: Please make sure there is enough spacing between the bottom of the target table and the top of the #/% options box below for both # and % indicators. (Once we remove the "Add" button, I'm guessing we'll have a similar spacing issue as Midline/Endline.)
[x] 2. Remove the red X button inside the targets table. It is no longer possible to manually delete individual targets. (Note: This feature will return in the future if we introduce the ability to move the program end month earlier after target periods are already added.)
[x] 3. The "Remove all targets" option remains available.

Validated for all the target periods (where relevant) and indicator scenarios.


Change gc.time system meter to a gauge; temporarily exclude related TCK test

Description
Resolves #7578
MP Metrics will be fixing a TCK bug which will cause us to change the gc.time system meter from a counter to a gauge. This PR makes that change sooner rather than later and temporarily excludes the buggy TCK test which expect it to be a counter.
Documentation
Bug fix, and there are no existing documentation references to the gc.time system meter that identify it as a counter or a gauge or refer to the Prometheus format.

Closing - We will fix this later, once the MP Metrics TCK is fixed which will remove the need for excluding any tests.


add ability to compare with gold index

Description
We don't need to manually enter the gold index uuids for comparison.
We can export
COMPARE_WITH_GOLD=false
LARGE_SCALE_BASELINE_UUID=<uuid>
SMALL_SCALE_BASELINE_UUID=<uuid>

to override the gold uuids

Rebase please ;)

/rerun all

Results for e2e-benchmarking CI Tests

Workload
Test
Result
Runtime

router-perf-v2
ingress-performance.sh
PASS
00:04:59

etcd-perf
run_etcd_tests_fromgit.sh
PASS
00:03:35

scale-perf
run_scale_fromgit.sh
PASS
00:05:35

network-perf
smoke_test.sh
PASS
00:12:02

kube-burner
run_clusterdensity_test_fromgit.sh
PASS
00:05:29

kube-burner
run_maxnamespaces_test_fromgit.sh
PASS
00:03:48

kube-burner
run_maxservices_test_fromgit.sh
PASS
00:03:08

kube-burner
run_nodedensity_test_fromgit.sh
PASS
00:03:09

kube-burner
run_nodedensity-heavy_test_fromgit.sh
PASS
00:03:56

storage-perf
run_storage_tests_fromgit.sh
PASS
00:03:35

upgrade-perf
run_upgrade_fromgit.sh
PASS
00:00:53


(feat): Monorepo build options idea

Hello,
Would be great to have something for handling monorepo use cases ( especially in CI ):
Folder structure:
azure(dir)
   westeurope
      project1
          main.tf
          terragrunt.hcl
      project2
          main.tf
          terragrunt.hcl
      project3
          main.tf
          terragrunt.hcl
      terragrunt.hcl
aws(dir)
gpc(dir)
terragrunt-definition.file(*)
terragrunt.hcl

Use cases:

User wants to trigger terragrunt apply project1 from definition file
User wants to trigger terragrunt apply all-azure-westeurope from definition file
User wants to trigger terragrunt apply multicloud-specific-all-projects from definition file
CI pipeline wants to determine which projects were impacted from definition file

terragrunt-definition.file(*) ( this will handle points: 1-3 )
terragrunt {}
projects {
  - name: project1
     path: azure/westeurope/project1
  - name: project2
     path: azure/westeurope/project2
  - name: all-azure-westeurope
     path: azure/westeurope
  - name: all-multicloud
     path: .
}

there should be also command like: ( this will handle point: 4 )
terragrunt get-diff which should output impacted projects,  then I can automatically determine imapcted projects ( in PRs ) and run validate/plan only on these projects.
Of course this should be possible to handle with some sophisticated monorepo build tool like: https://github.com/korfuri/awesome-monorepo#build-systems--dependency-management-tools , but point is to have similar feature in terragrunt. ( not sure if is possible to handle it in non git based environments, maybe calculating sha, inotify, etc.. )
AFAIK https://www.runatlantis.io/docs/custom-workflows.html#use-cases can handle this monorepo problem.
Any ideas?
Thanks

Use cases:

User wants to trigger terragrunt apply project1 from definition file
User wants to trigger terragrunt apply all-azure-westeurope from definition file
User wants to trigger terragrunt apply multicloud-specific-all-projects from definition file
CI pipeline wants to determine which projects were impacted from definition file

I think I'm missing some context. Why do you need a definition file here, especially for the first 3 use cases? Why can the user not run apply or apply-all in the corresponding folders directly? And how does a definition file help determine what projects were impacted (by commits, I assume you mean?).

@lukasmrtvy the way we do it is with git diff to find the directories contents that were changed in the commit, and then run terragrunt apply-all --terragrunt-strict-include --terragrunt-include-dir "path/to/dir1" --terragrunt-include-dir "path/to/dir2".

Use cases:

User wants to trigger terragrunt apply project1 from definition file
User wants to trigger terragrunt apply all-azure-westeurope from definition file
User wants to trigger terragrunt apply multicloud-specific-all-projects from definition file
CI pipeline wants to determine which projects were impacted from definition file

I think I'm missing some context. Why do you need a definition file here, especially for the first 3 use cases? Why can the user not run apply or apply-all in the corresponding folders directly? And how does a definition file help determine what projects were impacted (by commits, I assume you mean?).

@brikis98  Because I don't want the user to do that, I want Jenkins to do that for me. Consider a scenario where everything is on the same repo (both modules and the terragrunt configuration for deploying several different envs into several different regions):

ops engineer makes a pull request to say master
jenkins triggers: plan -> comment pr with plan output
pr gets approved and merged
on merge jenkins runs apply

On point 2,4 how can Jenkins know what modules to plan/apply? Why should Jenkins know that? Because https://github.com/gruntwork-io/terragrunt/issues/720 yorinasub17 explains the drawbacks of *-all commands.
The only way for Jenkins to know that would be to dig through the pr and find out which modules have been modified and consequently run terragrunt plan/apply only inside the right folders.

The only way for Jenkins to know that would be to dig through the pr and find out which modules have been modified and consequently run terragrunt plan/apply only inside the right folders.

Yup, that's more or less what we do. Alternatively, you can allow devs to specify what to deploy in the commit message, and have Jenkins parse that.

@lukasmrtvy the way we do it is with git diff to find the directories contents that were changed in the commit, and then run terragrunt apply-all --terragrunt-strict-include --terragrunt-include-dir "path/to/dir1" --terragrunt-include-dir "path/to/dir2".

Are you doing this manually or automated? I'm not sure how to handle when a module has been removed with the intent of it being destroyed. It won't exist in the PR or after merged so how do you go about handling this sort of logic through automation?
The only way I can think is to check the git diff main --name-status (or similar) on the pull-request branch, and if the file is deleted I'd then need to switch back to the main branch and run plan --destroy (for PRs)

@arivictor this is fully automated for creation/modification, however, we are currently destroying manually as it's a very sensitive operation.
However, if you would like to automate it I suggest the following solution:

Add the prevent_destroy = true flag in each terragrunt.hcl file
In the CI, detect when the flag is changed to prevent_destroy = false and run terragrunt run-all destroy on that dir

Then, in order to remove a dir two PRs are required - first PR to set prevent_destroy = false and destroy the module, and second PR to actually remove the directory.


Add .idea/ to .gitignore file

Signed-off-by: Nguyen Quang Huy<EMAIL_ADDRESS>Co-Authored-By: Do Anh Tuan<EMAIL_ADDRESS>

Can one of the admins verify this patch?

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "add_idea_to_gitignore" git@github.com:huynq0911/notary.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


docs: [IAC-1999]: Add connectors steps

Description

Tabbed section regarding adding Cloud Provider and Code Repo connectors included in the IaCM onboarding doc
Tabs include two interactive walkthroughs and a written step by step guide.
JIRA

Screenshot / Preview

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://664f4a5c4da29f0513664ed4--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://664f4da670a8180df5655eaa--harness-developer.netlify.app


Fixes issue #809 where date search params get deleted upon resource update

The equals function in ResourceIndexedSearchParamDate doesn't work as expected when the Dates in a persistent entity are java.sql.Timestamp objects but the dates in a transient entity are java.util.Date objects. Given a pair of equivalent Date and Timestamp objects, Date.equals(Timestamp) will be true but Timestamp.equals(Date) will not be true.
Updating the equals and hashcode method to compare the underlying time value instead. Added tests.

Great catch, thanks! Merging now


Update RST style guide for title convention

Summary of the changes / Why this is an improvement

Adds the docs section title convention (i.e., imperatives for action titles)
Fixes typos in examples

Checklist

[ ] CLA is signed

closes https://github.com/crate/tech-writing-domain/issues/48


Can't post a book

Category

What is the current behavior?
Clicking on post button does not publish a book.
What is the desired behavior?
i need help
Additional information

Could you please provide more information on this issue like:
Do you use the Gitbook Editor which Version ?
Which Operating System do you use?
How is your Gitbook hosted on Gitbook , Github or elsewhere?
Maybe with more information the community can help you.
If you use Slack you can also check Gitbook Slack Channel to get support


ingest: Add QC_overall_status column

Allows downstream users of the public metadata TSV to filter sequences based on the overall QC status output from Nextclade.

@corneliusroemer is there a reason why this column isn't already included in the output?
This was requested internally by a Bedford lab grad student who only wants to work with good quality sequences. I just wanted to double check with you that this wasn't excluded for some particular reason.

I faintly remember that we may have done this because the QC_overall_status is a heuristic that is brittle and may depend on which sequences you're looking at in particular. There is probably no one-size-fits-all for good vs bad.
When you look at sequences from less sampled clades what is bad may require a very different weighting of the QC constituents.
It may be best for the grad student to make a conscious decision of what is good/bad by looking at the sequences and individual QC metrics.  Does that make sense?

I faintly remember that we may have done this because the QC_overall_status is a heuristic that is brittle and may depend on which sequences you're looking at in particular. There is probably no one-size-fits-all for good vs bad.
When you look at sequences from less sampled clades what is bad may require a very different weighting of the QC constituents.

Ah, I see. We use this column in SARS-CoV-2 so I didn't realize this was potentially brittle. I assume this is because there are much less monkeypox sequences than SARS-CoV-2 sequences so it's less reliable for monkeypox?

Ah, I see. We use this column in SARS-CoV-2 so I didn't realize this was potentially brittle. I assume this is because there are much less monkeypox sequences than SARS-CoV-2 sequences so it's less reliable for monkeypox?

It's not necessarily brittle, it'll output something. But given the different time scales of evolution and resulting divergences between a few nuc mutations and 1000 it's hard to be meaningful across the scale.
The overall QC makes more sense in SC2 where it's fairly well-tuned. Even then, it shouldn't be overinterpreted there.


Make debugging easier when multiple capabilities are in play

I am currently using two capabilities with different deployments, one capability is not working the way that I think it should but it is very hard to distinguish which deployment's logs I should tail. As people begin to deploy more capabilities we need a way to distinguish one controller from another in order to simplify the process of debugging.
 I think we need to know which capabilities belong to which deployment while keeping in mind that there may be multiple on a single deployment. I agree that it would be verbose in the name, do you think labels make sense?
┌─[cmwylie19@Cases-MacBook-Pro] - [~/pepr-controller] - [2023-09-01 12:03:43]
└─[1] <git:(main ee6b020✱✈) > k get deploy -n pepr-system -l cpu-chopper -l netpol
NAME                                        READY   UP-TO-DATE   AVAILABLE   AGE
pepr-e2fa0123-4ef2-5bf1-93f2-f59a67c77633   2/2     2            2           3m20s

I really want to ultimately be able to tail logs by the deployment's podSpec by labels:
k logs -f -n pepr-system -l cpu-chopper

Thoughts on this @bdw617 ?

closing this due to the fact that it is a best practice to have one controller and multiple capabilities. not multiple controllers


Fix broken links in Docs

in #130 we renamed getCalendarYear to listCalendarYear , shortly after we brought in an update that modifies the sidenav, and now we have a broken link. We need to double back and rename the /Helpers/getCalendarYear to Helpers/listCalendarYear  in the sidebar.js file so our Docusaurus build can complete successfully. 🙂
The build error:

Hello there, @9mbs I would like to help fix this issue. Could you please assign me to it?

sure thing @mmnldm! Thank you for picking this up, feel free to reach out if you have any questions 🙂


Create a new release?

Since 0.13.0 came out in May 2018, several xsv improvements have been made (sample --seed, partition, reverse, etc. ) and even the README refers to some of these new capabilities.
Can you bump the version and release new binaries?

I'd like to, but I don't know when I'll find the time. Sorry. Until then, compile from master.

Also transpose (#137 / #146) would be in the next release.


[zh] Fix incorrect description for Service in endpoint-slices.md

Signed-off-by: Guangwen Feng<EMAIL_ADDRESS>Inspired by this comment and by the way modified the entire file.
/assign @tengqm
PTAL, thanks.

/approve

/lgtm


bug(codeeditor): Fix too many scrollbars

Done
Fixes #131

Hi, that's a very good start. But I noticed there are still some inconsistencies related to the sidebars. Do you think you can improve that as well?

You mean those unnecessary vertical space? Yes, I can try to fix those.

Yeah, as you can see, the horizontal scroll bar is not at the bottom but ~20px above the edge. And for the vertical scrollbar on the right, you may wanna try and disable that behavior in this config.

Hi @manekinekko . Is there anything else I should update in this MR?


Fix windows build

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3733772) 83.82% compared to head (8d99393) 83.82%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   83.82%   83.82%
=======================================
  Files          47       47
  Lines        6366     6366
=======================================
  Hits         5336     5336
  Misses       1030     1030

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Introduce LogError trait for easy logging and use it in chainstate

While the Try operator in rust makes it easy to return control to the caller, it introduces the problem that it's not easy to log errors without beefy text or calls. In this PR, I attempt to provide a solution as a compromise that'll simply log errors before returning control to the caller with a simple function call.

I really like this idea in general, though.

+1. Looks useful.
Do you have guidelines on when to use this to avoid duplicate log entries? I can imagine it can happen with a pattern like this:
fn foo() -> Result<_, _> { let _ = some_func.log_err()?; do_sttuff() }
// Elsewhere, possibly in a different file:
fn bar() -> Result<_, _> { let _ = foo().log_err()?; do_more_sttuff() }

We may end up with two log entries for the same error. (This is an issue even when logging errors manually but having an ergonomic way of doing it makes it more likely)

The rule is, if the error is just being passed or wrapped in the top level, use the top level to log. I guess we're gonna learn more.


Calculating table row height dynamically

Hi @scanny
We need to generate a report using a template. Some slides contain tables, where the data will be pulled from data sources and write it to the table cells, finally save the report with a new name. While writing to table cells, we need to write it dynamically, means if there is a table overflow, duplicate the slide, continue adding data in the next slide.
Consider the following scenario.

Read a ppt template
Read a table in a slide, say the row height of the cell we are on is x Pt.
I replace some text on the cell, now the height of the row becomes x+y Pt.
Now, when I find that row's height, I still get x Pt.

is there any way I can dynamically get the row size as I insert data in table cells ??? so that I can calculate table height and render the remaining table in the next slide.
Note: I am able to duplicate the slide, able to write to the same table in the next slide through a code hack from this library.
UPDATE: I have tried myself with following approach.

Whenever I add some text to cell, calling this function with the presentation object
Save it to temp file
Read the slide and table with given id
Read the row height and return it

def save_file_get_cell_height(presentation_obj, slide_id, table_shape_id, row_idx):
    """
    This function saves given presentation object and re-reads it, returns given table row height
    """
    new_ppt_name = "temp.pptx"
    presentation_obj.save(new_ppt_name)
    new_pr_obj = AbstractPresentation(new_ppt_name)
    slide_obj = new_pr_obj.presentation.slides[slide_id]
    table_obj = None
    for shape in slide_obj.shapes:
        if shape.shape_id == table_shape_id:
            table_obj = shape.table
            break
    assert table_obj, "Invalid table shape id passed"
    new_cell_height = AbstractPresentation.get_cell_height(table_obj, row_idx)
    os.remove(new_ppt_name)
    return new_cell_height

Then, I am surprised that it's still be the same🤔. Then, I opened PPT manually and resized the row height manually with touchpad, then executed above code, then found that it's giving new height.🧐
I dig more deeper,

created a blank PPT in powerpoint.
Added a simple table with few rows and entered some big data.
unzip <ppt_file> then, opened slide.xml file, saw the height, but height of all rows are same.
Then, manually resized row height.
Again unzipped file, then found that height value has changed. 🧐

It's neither an issue from python-pptx side nor from microsoft, but I want to get cell height dynamically ??? How could I do that ???
Currently, I am thinking of approximating height based on parameters like font size, cell width, height and number of characters in the text etc... I feel that's not so accurate, so looking for better solution...
Thanks,
Lokesh.

@scanny ????

There's no great solution to this problem. PowerPoint doesn't automatically resize table cells to fit content when the presentation loads (although LibreOffice may, might be worth trying).
The best you can do is estimate the text size and go from there (adding margins etc.). There weren't great options for that last time I looked, but that was a while back, maybe that situation has improved and you can find a library that can make good estimates based on font-metrics etc. That will be a certain amount platform dependent (OS X vs. Linux vs. Windows).

Hi @scanny
thank you for your very useful phyton-pptx package ;-)
I have the same problem as @lokesh1729 and I'm wondering whether I just discovered something?

PowerPoint doesn't automatically resize table cells to fit content when the presentation loads

Well, it doesn't resize the cells, but maybe it does resize the shape itself. Let's look at the following example:
We create a simple table and fill it with text that is too long/large to fit in the generated cells:
from pptx import Presentation
from pptx.util import Cm

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])   # add a blank slide
shape = slide.shapes.add_table(1, 2, left= Cm(5), top= Cm(5), width= Cm(6), height= Cm(1))   # add a simple table with 1 row and 2 columns
tf = shape.table.cell(0,0).text_frame
tf.text = 'I LIKE CHICKPEAS'
prs.save('test.pptx')

After saving the result we open it with Powerpoint and inspect the table:

We notice that Powerpoint somehow managed to calculate the correct shape height. If we now reload the presentation in python and print the shape's dimensions with
prs = Presentation(r"test.pptx")
for shape in prs.slides[0].shapes:
    if shape.has_table:
        print('row height:', shape.table.rows[0].height/360000)   # convert to Cm before printing
        print('shape height:', shape.height/360000)   # convert to Cm before printing

we obtain
row height: 1.0
shape height: 1.0

which is still the original height and not what Powerpoint displays us. However, if we manually save the open presentation without any changes (by clicking the "save" button in Powerpoint) and then execute the above code chunk again, we suddenly obtain
row height: 1.0
shape height: 2.54

So at least the shape height shows now the actual value we're interested in.
If Powerpoint is capable of recalculating the shape size, do you think there is a way we can do so as well?

No. This behavior is as described above, the key phrase being "when it loads". PowerPoint definitely has the ability to "fit" text to the shape and vice-versa, it just doesn't "reshape" those on a presentation when you load it. It will any time you enter edit mode if I remember correctly, and I suppose clicking Format Shape is about the same.
As far as calculating is concerned PowerPoint has access to the font-metrics and other layout data it uses and we don't. So that's kind of a short story.

Thanks for your prompt answer!
Ok, then the only workaround is to mimic the fitting procedure by approximating some of the unknown font-metrics...
However, I just noticed that it isn't necessary to open the "Format Shape" menu in order to reproduce the result. Opening and saving the presentation in PowerPoint without clicking anything else suffices.

Hmm, interesting. So does opening the file with PowerPoint do the trick or do you need to open, save, and then open again?
Btw, there was some rudimentary text-fitting work done a bit earlier for regular shapes (not tables) you might want to try out: https://github.com/scanny/python-pptx/blob/master/pptx/text/layout.py
The results aren't terrifically consistent, but better than nothing for the folks that sponsored that work. The main limitation, as we mentioned above was getting reliable font-metrics. The ones we got from Pillow don't seem to match those from PowerPoint very well.

The least thing I need to do to obtain the result is opening and saving the file with PowerPoint. Apparently, opening alone does not manipulate the file, even though PowerPoint already displays the table in the adapted form.
Thanks for the link! I'll have a closer look at it.

When reading ppt template, if you want to copy a slide, it will be added to the last page. How can you solve this problem?

I know this is an old item but I have found a solution that works very well. For my company we had a need to have a table match the formtting of a reference document but with different text in each cell. I therefore read the original document and calculate the table row heights as this is not a reliable value in the xml. It’s not reliable because PowerPoint will automatically increase row height to render the text with the formatting specified but doesn’t store that value in the XML. Usually the row height in the xml is just a default value but the real height is larger once the text is rendered. So after I have the calculated row heights I use them in my new table to resize the text until the row height matches the original. To do the calculation or row height you need to render the text as @scanny said. I found the most reliable way to do this is using QT with either PyQT or Pyside2. It can also be done with tkinter but is not as easy and is quite a bit slower. With PyQT/Pyside2 You can create a Qfontmetrics and get the bounding box for a given text. The key though is only the width should be used. For PowerPoint the height is a constant and it is 1.2x the font size. PowerPoint calls it the bound height. So all you need to know is the number of rows of text by wrapping the text to fit in the width and then calculate the total height. Obviously there is more to it as you have to account for formatting of runs, line spacing and merged cells. The code I have written works very well so it is possible. If there is interest I can share some of what I have with @scanny and try to incorporate it into the API. I’m not a programmer but the code does function.

Hi all, I was experimenting on this some time ago and set up a draft for a function doing this operation using PIL.
This is mostly untested, so it will probably need fixes to work correctly.
def estimate_text_box_size(
        txt,
        font,  # ImageFont
        max_width: Union[int, None] = None,
        line_spacing: int = 4
):
    """
    Example of use:
    right_margin = left_margin = Length(Cm(0.25)).pt * pt_per_pixel
    top_margin = bottom_margin = Length(Cm(0.13)).pt * pt_per_pixel
    width, height = estimate_text_box_size(
        txt,
        font,
        max_width=shape_width - (right_margin + left_margin),
    )

    print("Computed in pixels (w, h)")
    print((width + right_margin + left_margin, height + top_margin + bottom_margin))

    :param txt:
    :param font:
    :param max_width:
    :param line_spacing:
    :return:
    """

    from PIL import ImageDraw, Image

    image = Image.new(size=(400, 300), mode='RGB')
    draw = ImageDraw.Draw(image)
    emu_per_inch = 914400
    px_per_inch = 72.0
    pt_per_pixel = 0.75

    fontsize_pt = 12
    # font = ImageFont.truetype("arial.ttf", int(fontsize_pt / pt_per_pixel))
    import textwrap, math
    if max_width is not None:
        actual_txt = []
        for line in txt.split("\n"):
            _, _, width, h = font.getbbox(line)
            split_at = len(line) // math.ceil(width / max_width)
            actual_txt = actual_txt + textwrap.wrap(line, width=split_at)

        new_lines = len(actual_txt)
        actual_txt = "\n".join(
            actual_txt
        )
    else:
        actual_txt = txt
        new_lines = 0

    left, top, right, bottom = draw.multiline_textbbox(
        (0, 0), actual_txt, font=font, spacing=line_spacing
    )
    ascent, descent = font.getmetrics()

    return right - left, bottom  # + descent * new_lines


Example project does not work with latest version

Hello,
I downloaded the example project, but I got a compile time error on import NMPopUpViewSwift

@Ujjwal-N did you solve the isse?

Yes, I simply cleaned the build. My bad


export to image format, e.g. PNG, JPEG, SVG

Feature
I'd like to export the view to be embedded in documents as image
Alternative solutions or implementations
No response
Other context
No response

There's already a button for that at the toolbar (top right of editor).

Merging under #29


subprocess.CalledProcessError: Command '['/data/xingdp/install/anaconda3/envs/py36th17/bin/python',

Hi! I'm trying to train a big model with deepspeed but met the following error after the program running for a while. Thank you for your reply
[2021-11-21 08:32:07,148] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250621
[2021-11-21 08:32:07,149] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250622
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250623
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250624
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250625
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250626
[2021-11-21 08:32:07,151] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250629
[2021-11-21 08:32:07,153] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250632
Traceback (most recent call last):
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 167, in <module>
    main()
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 156, in main
    sigkill_handler(signal.SIGTERM, None)  # not coming back
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 137, in sigkill_handler
    raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/data/xingdp/install/anaconda3/envs/py36th17/bin/python', '-u', 'run_deepspeedpy', '--local_rank=7', '--deepspeed', '--deepspeed_config', 'deepspeed_bsz4096_adam_condig.json', '--cf', 'lamb.json', '--max_seq_length', '128', '--job_name', 'deepspeed_test', '--max_steps', '32', '--print_steps', '1', '--deepspeed_transformer_kernel', '--output_dir', './deepspeed_logs/']' died with <Signals.SIGKILL: 9>.```

I was having the same issue, any update?

Hello，how did you solve this problem

Hi! I'm trying to train a big model with deepspeed but met the following error after the program running for a while. Thank you for your reply
[2021-11-21 08:32:07,148] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250621
[2021-11-21 08:32:07,149] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250622
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250623
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250624
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250625
[2021-11-21 08:32:07,150] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250626
[2021-11-21 08:32:07,151] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250629
[2021-11-21 08:32:07,153] [INFO] [launch.py:131:sigkill_handler] Killing subprocess 250632
Traceback (most recent call last):
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 167, in <module>
    main()
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 156, in main
    sigkill_handler(signal.SIGTERM, None)  # not coming back
  File "/data/xingdp/install/anaconda3/envs/py36th17/lib/python3.6/site-packages/deepspeed/launcher/launch.py", line 137, in sigkill_handler
    raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/data/xingdp/install/anaconda3/envs/py36th17/bin/python', '-u', 'run_deepspeedpy', '--local_rank=7', '--deepspeed', '--deepspeed_config', 'deepspeed_bsz4096_adam_condig.json', '--cf', 'lamb.json', '--max_seq_length', '128', '--job_name', 'deepspeed_test', '--max_steps', '32', '--print_steps', '1', '--deepspeed_transformer_kernel', '--output_dir', './deepspeed_logs/']' died with <Signals.SIGKILL: 9>.```

MARK


Broken dependency resolution on non-Linux unixes

In Cargo.toml, chrono is declared as a dependency only under Linux:
https://github.com/Byron/trash-rs/blob/3c566ef417350b75e02ea80be51165815014ec74/Cargo.toml#L36-L37
But it is used in the Freedesktop backend without a Linux-only precondition:
https://github.com/Byron/trash-rs/blob/3c566ef417350b75e02ea80be51165815014ec74/src/freedesktop.rs#L18
And the Freedesktop backend is used for any non-macOS unix target:
https://github.com/Byron/trash-rs/blob/3c566ef417350b75e02ea80be51165815014ec74/src/lib.rs#L33-L35
This causes the build to fail when compiled on a non-Linux unix-ish platform like FreeBSD.
The conditional dependency logic in Cargo.toml needs to match your actual use.

Feel free to ping me in January if I don't get back until then.

Thanks very much for reporting, and thanks @ArturKovacs for offering help, it's all very much appreciated.
To get a little more acquainted with the code-base I took a stab at it myself and released a fix.
Now the directives match so I'd hope this also fixes the related issue in dua-cli.

Thank you for taking good care of this repo @Byron ❤

Thanks for the quick fix and I'm glad I could help. I was originally inclined to reported this as a dua bug because I use trash-rs in my own crates (thanks @ArturKovacs!) and haven't had issues compiling on FreeBSD but I just checked and it's because I opted into using trash 1.3 because of the guidance that was in the README at the time (details of which I cannot precisely recall at the moment).
Sorry to report that build still fails on non-Linux because of a different issue (unsafe use of Linux-only getmntent).

Step by step. If you could post the details here maybe a fix can be created from that.
It might also be useful to try and run CI on FreeBSD, which doesn't seem to be straightforward yet.
So I guess we have to go step by step here, maybe it's easiest if @mqudsi would submit a PR that is proven to work.

Sorry to report that build still fails on non-Linux because of a different issue (unsafe use of Linux-only getmntent).

Just ran into this issue on FreeBSD too.

It might also be useful to try and run CI on FreeBSD, which doesn't seem to be straightforward yet.

The easiest way to do CI for FreeBSD is with Cirrus CI. It's free for open source


Ensure HttpClientOptions is passed fully to HttpClientBuilders

Description
Fixes #31051
Ensures that HttpClientOptions, that are applicable to the HttpClient implementation, are being passed correctly to the HttpClientBuilder from the HttpClientProvider. Additionally renames JdkAsyncHttpClientBuilder to JdkHttpClientBuilder to match the naming of JdkHttpClient.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-core-http-jdk-httpclient

/check-enforcer override

Linting pipeline is failing due to a change outside of the PR