python36Packages.distributed: 1.23.3 -> 1.24.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.6-distributed/versions.
meta.description for python36Packages.distributed is: '"Distributed computation in Python."'.

Checks done (click to expand)

built on NixOS
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-ssh-wrapped passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-ssh passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-submit-wrapped passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-submit passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-remote-wrapped passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-remote passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-scheduler-wrapped passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-scheduler passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-worker-wrapped passed the binary check.
/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-worker passed the binary check.
Warning: no invocation of /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/.dask-mpi-wrapped had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-mpi had a zero exit code or showed the expected version
10 of 12 passed binary check by having a zero exit code.
0 of 12 passed binary check by having the new version present in output.
found 1.24.0 with grep in /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0
directory tree listing: https://gist.github.com/b01d2f98ac02d4fa3d0bbdb81d30b6f3
du listing: https://gist.github.com/8a9b8c37ab81bd7d513db572a27f4241

Outpath report (click to expand)

Outpath difference report
24 total rebuild paths
6 package rebuilds
6 x86_64-linux rebuilds
6 i686-linux rebuilds
6 x86_64-darwin rebuilds
6 aarch64-linux rebuilds
First ten rebuilds by attrpath
python27Packages.dask-jobqueue
python27Packages.dask-xgboost
python27Packages.distributed
python36Packages.dask-jobqueue
python36Packages.dask-xgboost
python36Packages.distributed

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A python36Packages.distributed https://github.com/r-ryantm/nixpkgs/archive/f3eb56c07fc494c847569228828dd7976530f515.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0
ls -la /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin

cc @teh @costrouc for testing.

Success on x86_64-linux (full log)
Attempted: python36Packages.distributed
Partial log (click to expand)
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/lib  /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin
patching script interpreter paths in /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0
checking for references to /build in /nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-worker'...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-ssh'...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-scheduler'...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-remote'...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-mpi'...
wrapping `/nix/store/1wkjqfnh3y43p8fkbl2scfdn8qwlr24a-python3.6-distributed-1.24.0/bin/dask-submit'...

Success on x86_64-darwin (full log)
Attempted: python36Packages.distributed
Partial log (click to expand)
post-installation fixup
strip is /nix/store/g5r4apl0za012ffs6ladinwa5w0m1l3k-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/lib  /nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin
patching script interpreter paths in /nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-mpi'...
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-remote'...
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-scheduler'...
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-ssh'...
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-submit'...
wrapping `/nix/store/drc6f5q3fqash505a562aw8mg6pnw11q-python3.6-distributed-1.24.0/bin/dask-worker'...


Could this work on more that one paragraph please?

It would be great if this would work on the entire selection, not just one paragraph at a time.

this would be very helpful as similar tools like sublime-wrap-plus work this way.

this would be very helpful as similar tools like sublime-wrap-plus work this way.

It’s on the todo list....I just don’t have the time (or enough incentive)...so if anyone wants to help with a PR that would be swell!

From: mike bayer<EMAIL_ADDRESS>Sent: Thursday, January 21, 2021 1:50:03 PM
To: marvhen/ReflowMarkdown<EMAIL_ADDRESS>Cc: Marvin Henry<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [marvhen/ReflowMarkdown] Could this work on more that one paragraph please? (#4)
this would be very helpful as similar tools like sublime-wrap-plus work this way.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/marvhen/ReflowMarkdown/issues/4#issuecomment-764860588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC525ZGABH6NXLLWX5ANUA3S3BZNXANCNFSM4FQTNJKQ.

It’s on the todo list....I just don’t have the time (or enough incentive)...so if anyone wants to help with a PR that would be swell!

From: mike bayer<EMAIL_ADDRESS>Sent: Thursday, January 21, 2021 1:50:03 PM
To: marvhen/ReflowMarkdown<EMAIL_ADDRESS>Cc: Marvin Henry<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [marvhen/ReflowMarkdown] Could this work on more that one paragraph please? (#4)
this would be very helpful as similar tools like sublime-wrap-plus work this way.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/marvhen/ReflowMarkdown/issues/4#issuecomment-764860588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC525ZGABH6NXLLWX5ANUA3S3BZNXANCNFSM4FQTNJKQ.

You can reflow the whole file just by doing select-all before alt-q. Does that solve this use case? I don't see reflowing by section as especially useful.

i will also note that the files I'm editing are restructured text, not markdown.


Add UI customization support

Docs:

[ ] iOS
[ ] Android

Hi gurisko! i have integrated fb account plugin in ionic3 app and it is works like charm. Hey but i am unable to customise the ui, i tried customising ui in my fb developer account kit app but it does not reflect any changes in app. can you help me out/ suggest how can i customise app ui?

Hello @Whhymee. Custom UI hasn't yet been released. I will have a look over the weekend to see if I can finish it.

Hey @gurisko. When are you going to release this feature? Btw, I love this plugin!

Hey @sharizard. No estimates for this one. I'll appreciate any help

I am taking over this.

Desperately needing this! Any updates?

Hi, @gurisko Any update on this. Thank you for the plugin.


spyOn does not preserve static properties on functions

Describe the bug
When trying to spy on a function that has static properties, the spy function won't inherit the properties.
I couldn't find any way to add them to create a spy from the original function.
Reproduction
Abstract example
https://stackblitz.com/edit/vitest-dev-vitest-uvuhzq?file=test%2Fmain.test.ts
System Info
System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitest/ui: latest => 2.1.3
    vite: latest => 5.4.9
    vitest: latest => 2.1.3

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

It looks like your repro is basically https://vitest.dev/guide/mocking.html#mocking-pitfalls so it's working expected.
Can you elaborate what you mean by "static properties on functions"?

@hi-ogawa sorry for the incorrect repro. I've simplified my example.
The main idea is if I define a function assign property to it and then spy on it the property won't be present because the spy wrapper doesn't have it and doesn't inherit it from the original function.
Posting it right here as well:
import { vi, expect, test } from 'vitest';

interface Fn {
  (): void;
  flag: boolean;
}

export const fn: Fn = () => {
  console.log('Boom');
};

fn.flag = true;

const methods = {
  fn,
};

test('run', () => {
  vi.spyOn(methods, 'fn');
  expect(methods.fn.flag).toBe(true);
});

A common case for this is something like createAction from @redux/toolkit, which adds type as a property on the action creator.
import { createAction } from '@redux/toolkit'

const action = createAction('a')

console.log(action.type) // -> a

Just a note that this also doesn't work in Jest:
const fn = () => {
  console.log('Boom');
};

fn.flag = true;

const methods = {
  fn,
};

test('run', () => {
  jest.spyOn(methods, 'fn');
  expect(methods.fn.flag).toBe(true);
});

That doesn't mean it shouldn't work in Vitest, just it's an observation.


Complete Harbor section in vic-product SUPPORT.md

This guide is targeted to GSS and VIC product developers who may handle escalations related to Harbor in the VIC appliance
https://github.com/vmware/vic-product/blob/master/installer/docs/SUPPORT.md
Please fill out this section https://github.com/vmware/vic-product/blob/master/installer/docs/SUPPORT.md#harbor

Fixed by https://github.com/vmware/vic-product/pull/1457


Error: Failed to query available provider packages

The following error occurs when running the provider with the current instructions:
Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider rubrikinc/rubrik/rubrik: could not connect to rubrikinc: Failed to request discovery document: Get
│ https://rubrikinc/.well-known/terraform.json: dial tcp: lookup rubrikinc on :53: no such host

See this issue for details: https://github.com/rubrikinc/terraform-provider-rubrik/issues/79

Fixed by https://github.com/rubrikinc/terraform-provider-rubrik/commit/ec45ac7115c6608429ef963393410c02c3bee041 in https://github.com/rubrikinc/terraform-provider-rubrik/pull/75


fix type errors in tests for R.lensPath

Thanks for drawing attention to these type errors, @mLuby!

absolutely :cow2:

:herb:


Importing Datapipes in MetNet results in segfault

Describe the bug
In MetNet, with the newer version of datapipes, importing any of the training.* datapipes results in a segfault on import.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
Be able to import and use datapipes from training
Additional context
Older versions (from around Nov/Dec of 2022) worked for importing, as I trained MetNet with datapipes then, with the GSP national ones. Those ones also now result in a segfault on import.

Interestingly, if imported at the top of the file, it works, before importing PyTorch

That seems to have fixed it.


Replace System.out.println's with System.err.println's for streaming

Also made \t and spaces consistent.
I haven't built it, as I haven't gotten Maven set up properly, but I imagine it should work, as it was a simple set of changes to make.

Thanks for submitting this.  There are a few issues.  There are sub-programs within the jar that are required to write to stdout.  We cannot replace all cases.  Also, there is some C code that needs to be modified to log to stderr.  I'm also not prepared to take the whitespace changes at the moment.  Will put together changes for this shortly.


Header: Resource1 ... Resource13?

Header-AP-Voc-RDFS2020.ttl has 13 props that seem to be bugs:

names don't comply to naming convention (lowerCamelCase),
names don't correspond to the comment.

Two of the 13:
dcat:Resource7  rdf:type      rdf:Property ;
        rdfs:comment          "The resoource of a previous version that has this next version." ;
        rdfs:domain           md:Model ;
        rdfs:label            "Resource7"@en ;
        rdfs:range            md:Model ;
        cims:AssociationUsed  "No" ;
        cims:inverseRoleName  dcat:previousVersion ;
        cims:multiplicity     cims:M:0..1 ;
        cims:stereotype       "dcat" .

dcat:Resource8  rdf:type      rdf:Property ;
        rdfs:comment          "The resource that has this next version." ;
        rdfs:domain           md:Model ;
        rdfs:label            "Resource8"@en ;
        rdfs:range            md:Model ;
        cims:AssociationUsed  "No" ;
        cims:inverseRoleName  dcat:nextVersion ;
        cims:multiplicity     cims:M:0..1 ;
        cims:stereotype       "dcat" .

All headers are updated in NC 2.3.1. Hopefully is this fixed.

These are still present: https://github.com/Sveino/Inst4CIM-KG/blob/develop/rdfs-improved%2FCGMES-NC%2Fttl%2FHeader-AP-Voc-RDFS2020.ttl#L106

We need discussion here.

The problems come from the desire to express DCAT terms.


Add Support for UpdateStreamMode

Changes Introduced
AWS Kinesis recently released "On Demand" streams, which auto-scale the stream shard counts depending on the traffic. As such, some of the API request/response bodies were updated, and a new UpdateStreamMode API was introduced:
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateStreamMode.html
This PR adds support for that data in request/response bodies as well as the UpdateStreamMode endpoint. It does NOT implement the actual logic to scale a stream depending on incoming traffic. The intent, as always, is to be a mock and not a fully functional offering.
Applicable linked issues
Checklist (check all that apply)

[X] This change maintains backwards compatibility
[X] I have introduced tests for all new features and changes
[X] I have added documentation covering all new features and changes
[X] This pull-request is ready for review

Codecov Report
Base: 88.49% // Head: 88.63% // Increases project coverage by +0.14% :tada:

Coverage data is based on head (2001406) compared to base (463e8dd).
Patch coverage: 91.30% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   88.49%   88.63%   +0.14%
==========================================
  Files          91       93       +2
  Lines        2902     3001      +99
  Branches      158      170      +12
==========================================
+ Hits         2568     2660      +92
- Misses        334      341       +7

Impacted Files
Coverage Δ

src/main/scala/kinesis/mock/KinesisAction.scala
100.00% <ø> (ø)

...rc/main/scala/kinesis/mock/KinesisMockRoutes.scala
89.01% <ø> (ø)

...rc/main/scala/kinesis/mock/cache/CacheConfig.scala
65.38% <74.07%> (+2.59%)
:arrow_up:

src/main/scala/kinesis/mock/cache/Cache.scala
83.85% <90.90%> (+0.26%)
:arrow_up:

...cala/kinesis/mock/api/DescribeLimitsResponse.scala
88.88% <94.11%> (+4.27%)
:arrow_up:

...n/scala/kinesis/mock/api/CreateStreamRequest.scala
100.00% <100.00%> (ø)

...ala/kinesis/mock/api/UpdateStreamModeRequest.scala
100.00% <100.00%> (ø)

...rc/main/scala/kinesis/mock/models/StreamData.scala
100.00% <100.00%> (ø)

.../scala/kinesis/mock/models/StreamDescription.scala
100.00% <100.00%> (ø)

...kinesis/mock/models/StreamDescriptionSummary.scala
100.00% <100.00%> (ø)

... and 3 more

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


MNT Fix unit test

Issue https://github.com/silverstripe/.github/issues/320
Note that while this doesn't show up in CI until CMS 6, it can be replicated on a CMS 5.3 sink install with --testsuite framework-core --filter="SecurityDefaultAdminTest|VersionedMemberAuthenticatorTest"
Fixes https://github.com/silverstripe/recipe-kitchen-sink/actions/runs/11393429390/job/31701681778
1) SilverStripe\Security\Tests\VersionedMemberAuthenticatorTest::testAuthenticateAgainstLiveStage BadMethodCallException: Object->__call(): the method 'publishSingle' does not exist on 'SilverStripe\Security\Member'
This is a hard to reproduce issue where if you run VersionedMemberAuthenticatorTest AND another test that includes $usesDatabase = true or a fixture file, and you're using kitchen-sink, you'll get the above error. However if you only run VersionedMemberAuthenticatorTest it'll be fine.
CI failure is unrelated and will be fixed in https://github.com/silverstripe/gha-ci/pull/158

For the sake of tracing this back:
This replaces https://github.com/silverstripe/silverstripe-framework/pull/11437 which was originally part of https://github.com/silverstripe/silverstripe-framework/pull/11432 (there's some comments there related to this broken build)

This still feels like we're just masking a regression, so I'm going to spend 30mins or so seeing if I can find the root cause of this.

Turns out this failure isn't new - it happens locally on 5.2 as well! Though I can't explain why it hasn't been showing in CI runs for CMS 5. I tried PHP 8.1 and 8.2 and it failed on both of those locally.
This does seem unique to some combination of unit testing and modifying the extension set at runtime - the former of which we'd just resolve somewhere in SapphireTest or one of the TestState classes and wouldn't affect production code, and the latter of which is heavily discouraged.
Because of that, I'm not spending more time on this. It still doesn't feel great, but until/unless it crops up again somewhere else I think this workaround is okay for now.


Dandelion in Bitcoin!

Hi!  I noticed your work when you accidentally opened a pull request upstream. I hope my intrusion here is not unwelcome.  -- if it is, feel free to tell me to go away, I will not be offended.
I'm very interested in Dandelion and dandelion like improvements, and would like to see your work go upstream.  I can give you implementation advice that will make it easier to do so, if you would welcome it.
To check my understanding of the general protocol design you appear to be implementing:
New transactions are introduced to the network in stem mode, during stem mode they do not fan-out but are instead sent to a single peer capable of stem relay (in your current code this decision is made per transaction, but it should be less frequently changing in production) . At each hop along the path, there is a small probably of transition into fluff mode, where a transaction propagates like normal.
Given that understanding, the approach you are taking of hooking RelayTransaction will have significant information leaks: There are many way to  tell what transactions a node as seen which are implicated by earlier stages in handling.  If you are only going for a demonstration, then I suppose you can ignore this.
But for real usage I believe the correct behavior will require a hard partitioning of dandelion processing: A received dinv should be checked against the same filters that a normal inv is (mempool, setknown, rejects) and then requested even if the txn has already been fetched before.  When the is received it should be tested against the mempool but not inserted into the mempool-- because the presences of a transaction can be interrogated out of a nodes mempool (e.g. via mempool rpc or by observing the effects of conflicts).  I believe a separate peer specific relay pool will be required to prevent third parties from querying for propagation by attempting to fetch a txn which only passed through a node in stem mode.
I believe a mempool rejected dandelion forward could, however, be added to the rejects filter.
As far as negotiating the capability gos, tying a feature set to a protocol version is a generally deprecated practice.  We recommend new extensions use a mechanism like that used by BIP 130 and BIP 152.  Basically a simple message is sent out that indicates support, and can optionally contain relevant flags or version information.
Minor nit: Do not use rand() it isn't cryptographic-- use GetRand(range) or FastRandomContext's randrange (esp for using many rand calls); vectors can be array[indexed] directly, you don't need to advance an iterator.
The reason for the foreachnode construction for looping over nodes is because nodes can be deleted in other threads and this construct guarentees that it holds the required locks during the whole iteration.
Elsewhere when we need to do processing outside use the node ids, e.g. when you collect the candidate nodes, collect their ids. Then pick an id. and when you loop over the nodes for the send, use the id.   cfields may have better advice since the recent changes to the peer handling API are his.
Your accesses to stemset look concurrency unsafe, FWIW. Or at least it's not clear to me what lock is protecting it from concurrent access.
The candidates set really should exclude the peer the transaction was just received from. It should probably also consider the peer's fee-filter-- no reason to send a transaction that will just be rejected.
I suspect that the dandelion messages should be another inv type, rather than a new kind of inv; but I should get a second opinion.
I had some general questions about dandelion while reading the paper-- in particular,  zero fanout seems pretty vulnerable to an adversary spinning up a large number of dandelion blackholes.   E.g. if  transactions have a stem phase averaging fifteen hops on an network with 10,000 listening nodes, and the attacker corrupts 1000 of them so they claim to perform stem relay but don't really, then I believe the attacker will successfully black hole most transactions.   An obvious mitigation would be having nodes take transactions they previously sent in stem relay but have not yet received in fluff mode and randomly covert them to fluff mode after a delay with expected time significantly larger than the expected time in fluff mode.  But the impact on the analysis was unclear to me.
In any case, I hope some of my comments have been helpful. I would be glad to answer questions. I'm excited to see someone working on this.
Cheers,

@gmaxwell I'll read your whole message in a little while, but for now I want to add that the implementation in the branch I mistakenly tried to pull request is not near what we would like for a final version. This is just a rough one for our experimentation purposes. I see you have a lot of thoughts on it so I'll address them in time. Thanks!


Add default formatters for yaml

Yaml formatting has been a pain for some time now. I finally figured out that the yaml LSP formatter doesn't respect my prettier config. Since the sub-list searches for installed formatters, I think these are sane (non-invasive) defaults.

Actually, I ended up setting the default formatter to Prettier
["*"] = { { "prettier" } }


Deployment

User Story
As a boot camp student,
I want the prework notes to be structured on a webpage,
So that I can easily find and read the information.
Acceptance Criteria
GIVEN a Prework Study Guide website,
WHEN I visit the website using the URL,
THEN I can access my website from any browser

WHEN I visit the website using the URL
THEN I can access my website from any browser

That terrible thing is deployed. Gonna make an issue to hide it as soon as Bootcamp is over.


#215 (Simplify tests using minos.common.MinosModel instances as much as possible)

Resolves #215

Hey @garciparedes, it's nice you tried to simplify this tests. There is a couple of things I'm reluctant to, though. Let's see what you think of them:

Foo and Bar are too abstract to help you understand what they are exactly. In this case, you don't really know if Foo is an Aggregate or a MinosModel. IMO, they should at least be named FooMinosModel and BarAggregate.
If we'd like to move to that foobarish test style, I think we should as well rename the Command classes as FooCommand instead of AddOrder.

In my opinion it would be better off to keep the Car test class since it gives you a better a idea of the context. I agree that we may simplify it by deleting some of its attributes, though.

As an intermediate solution I decided to name that class as FakeModel to be easily identified as only for testing purposes, and the Bar will be removed when https://github.com/Clariteia/minos_microservice_networks/pull/217 pull request is merged


As a visitor, I want to be shown an error message after I unsuccessfully authenticate, so I can understand why I'm not redirected to the dashboard.

[x] Display error message to non-ISL email login attempts
[x] also disconnect the visitor from the paw application with https://developers.google.com/identity/sign-in/web/disconnect

To test that the unauthenticated user is disconnected, try logging in with a non-ISL user. After accepting permissions to be signed in, you will see an error message indicating you are unauthenticated. If you attempt to sign in again with a non-ISL user, you will be asked to accept permissions again, indicating you have been disconnected from the paw app since Google does not remember your permissions,

Looks good. Is it intentionally showing these little emoticons?
"You must be an ISL employee to login... (..) ( l: ) ( .-. ) ( :l ) (..)"

Yep :stuck_out_tongue_winking_eye:


Understanding parallelism with Dask within Iris

Hi @zklaus ,
Following up the discussion in https://github.com/SciTools/iris/issues/3218#issuecomment-726042470
As I mentioned, in the past I've always found that even if an iris operator supports lazy evaluation, executing the code with multiple cores doesn't invoke the calculations in parallel. As a result I've got into the habit of setting up my parallel calculations manually. It could well be though that newer versions of iris are capable of doing this. If so, I'd appreciate some guidance on how to enable it.
As an example, the analysis I'm working on at the moment involves calculating climate indices on a cube with 656 x 310 grid boxes. (And 30 years of daily data). The netCDF file itself is almost 9GB.
For calculating the yearly indices I use the following dask bag based approach
yrs_bg = db.from_sequence(years)
yrs_con_bg = yrs_bg.map(lambda y: iris.Constraint(year=y))
# idx_calc is a function that calculates the 'idx' on the cube usually involving iris.collapsed
idx_bg = yrs_con_bg.map(idx_calc, cube, idx)
idx_cubes = iris.cube.CubeList(idx_bg.compute())

idx_cube = idx_cube.merge_cube().collapsed('time', iris.analysis.MEAN)

I'm running on the SPICE system at the Met Office, so I submit that as a slurm job with 30 CPUs and get the result back.
What I'm struggling with at the moment though is slightly more complex.. I need to calculate the baseline percentiles for some indices.. This involves calculating a percentile value for each day of year, using a 5 day window centred on that day, see for example, number 10.. http://etccdi.pacificclimate.org/list_27_indices.shtml
So to do that I have added a day of year co-ordinate, then I loop over the days, creating a constraint of +/- 2 from that day of year. This then gives 150 time points (5 days per year across the 30 years) from which the percentiles are calculated at each grid point. (Using iris.collapsed and the PERCENTILE aggregator).
If I submit that as is as a slurm job with multiple CPUs I don't see any speed up vs submitting with only 1, i.e. the extra cores are not being used to do the calculations in paralell.
In order to get speedups, I need to again follow the dask bag approach and create a dask bag of each day of year, which I then map functions to and call compute to calculate in paralell.

Hi @thomascrocker,
I am not as familiar with dask.bags (henceforth db), as I am with dask.array (da). Indeed, I think that most likely da is more appropriate here, since the data itself is very much in that form.
Having said that, I must ask for a bit of clarification:

How do you do the slurm job? You must somehow create a dask.distributed cluster, otherwise, the computation would just be run on every node independently with one note winning the prize of writing the final version of the file. Perhaps you are using dask-jobqueue or dask-mpi?

With dask, as a rule of thumb, whenever you call compute(), the result get's pulled into the memory of just one process. Maybe that's what you want in the above snippet. But since you perform another aggregation after that, I rather suspect you would fare better with an approach that leaves the data on the cluster. Perhaps client.persist() would work better here for you.

Comment 2 crucially depends on what idx_calc does. Would you mind sharing the simplest version that you have, perhaps only for one index.

Lastly, maybe you could consider to save yourself the trouble of developing this software by using any one from the following list

https://climpact-sci.org/get-started/
https://xclim.readthedocs.io/en/stable/
https://docs.esmvaltool.org/en/latest/recipes/recipe_extreme_events.html

Thanks for getting back to me,
1.) I'm not using the distributed scheduler at all. The Dask bag by default uses the multiprocessing scheduler Which requires no setup. Our slurm system has multiple nodes, each node has 42 CPUs and ~242GB of memory. It's not possible to submit multi node jobs in our setup (although I understand one can get around this by creating a dask.distributed scheduler to do so). The multiprocessing scheduler allows me to launch parallel jobs on a single node and can create new processes on each CPU requested. So if I launch my job requesting 24 CPUs, I'll get 24 different processes running on a single node. The multiprocessing scheduler handles launching these jobs and collecting the results automatically.
2 and 3.)
Because I've taken the parallelisation approach of breaking up my data by time period, the idx_calc function is a wrapper to extract the time period and then compute the index:
def idx_calc(con, cube, name):
    cube_p = cube.extract(con)
    cube_p = change_units(cube_p)
    idx_p = IDX_FUN_DICT[name](cube_p)
    idx_p.rename(name)

    return idx_p

change_units is a function that checks cube units and converts if necessary
IDX_FUNC_DICT is a dictionary mapping index names to lambda functions that calculate the index in question
For example: 'Rx1day': lambda c: calc_Rx1day(c)
and
def calc_Rx1day(cube):
    # get the max precip value for each grid point.
    max_cube = cube.collapsed('time', iris.analysis.MAX)
    return max_cube

I have been using ESMValTool and did look into the extreme events recipe, however, the data I'm using is from an RCM and I think the extra rotated latitude and longitude dimensions caused the diagnostic to fail, my R isn't good enough to fix it unfortunately.  (Incidentally the data is from the same source as this issue. https://github.com/ESMValGroup/ESMValCore/issues/772)
I've not tried the other 2 packages, but wouldn't be surprised if they also assume the data is on a standard grid.. and have issues with data on rotated grids.
For now, my approach is working to calculate what I need in a reasonable time (even the percentiles calculations I've been able to get 4 hours of CPU time down to around 15 minutes real time which is fine for what I need to do)
For future though, I'd be very interested in making proper use of dask array. If you could share an example of how you invoke a parallel calculation on iris cubes using the dask array approach I'd be interested to see it. Thanks

On 1), I see, so it is a single node job, it's just that the node has many cores. I am afraid the terminology in this area (nodes, sockets, cpus, cores, hyperthreads,...) is always a bit confusing. But seems like what you are doing is working. I would still suggest giving distributed a try, it works very well (and is preferred by some) on a single machine (see here), and gives you some nice things like the dashboard and certain profiling support. Plus it offers a straightforward way to multi-node jobs later on.
On 2), 3), a couple of points, though I am afraid more details and a discussion of percentile-based indices is a bit too much for me right now. As a side note, if possible, try to change the units of your thresholds to the units of your cube. That is much less work for the computer.
As for using dask.array and iris, I think a simpler approach would be a (custom) aggregator based on iris.analysis.Aggregator combined with cube.aggregated_by.
In the simple case of Rx1day, you don't even need a custom aggregator and can take it almost straight from the user guide with something like
rx1day = cube.aggregated_by('year', iris.analysis.MAX)

Thanks for the tips! I've begun experimenting with distributed to see if I can avoid manually breaking up my data for dask bag.
And it... kind of works
So.. if I do this...
import iris
import iris.coord_categorisation as iccat

from dask.distributed import Client

print("Creating cluster")
client = Client(processes=False)

print("loading data")
c = iris.load_cube(
    "/scratch/tcrocker/esmvaltool_output/recipe_indices_20201118_151601/preproc/extreme_events/tas/tas_mi-ba868_historical_day_1981-2010.nc"
)
iccat.add_year(c, "time")

print("Calculating")
rx1d = c.aggregated_by("year", iris.analysis.MAX)

print("saving")
iris.save(rx1d, "rx1d.nc")

I get this error when it tries to save...
Traceback (most recent call last):
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/protocol/pickle.py", line 49, in dumps
    result = pickle.dumps(x, **dump_kwargs)
  File "netCDF4/_netCDF4.pyx", line 5477, in netCDF4._netCDF4.Variable.__reduce__
NotImplementedError: Variable is not picklable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "dask_distributed_test.py", line 20, in <module>
    iris.save(rx1d, "rx1d.nc")
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/io/__init__.py", line 408, in save
    saver(source, target, **kwargs)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/fileformats/netcdf.py", line 2388, in save
    sman.write(cube, local_keys, unlimited_dimensions, zlib, complevel,
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/fileformats/netcdf.py", line 983, in write
    cf_var_cube = self._create_cf_data_variable(
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/fileformats/netcdf.py", line 2060, in _create_cf_data_variable
    is_masked, contains_fill_value = store(data, cf_var,
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/fileformats/netcdf.py", line 2038, in store
    da.store([data], [target])
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/dask/array/core.py", line 945, in store
    result.compute(**kwargs)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/dask/base.py", line 167, in compute
    (result,) = compute(self, traverse=False, **kwargs)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/dask/base.py", line 447, in compute
    results = schedule(dsk, keys, **kwargs)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/client.py", line 2673, in get
    futures = self._graph_to_futures(
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/client.py", line 2609, in _graph_to_futures
    "tasks": valmap(dumps_task, dsk3),
  File "cytoolz/dicttoolz.pyx", line 179, in cytoolz.dicttoolz.valmap
  File "cytoolz/dicttoolz.pyx", line 204, in cytoolz.dicttoolz.valmap
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/worker.py", line 3361, in dumps_task
    return {"function": dumps_function(task[0]), "args": warn_dumps(task[1:])}
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/worker.py", line 3370, in warn_dumps
    b = dumps(obj, protocol=4)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/distributed/protocol/pickle.py", line 60, in dumps
    result = cloudpickle.dumps(x, **dump_kwargs)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/cloudpickle/cloudpickle_fast.py", line 72, in dumps
    cp.dump(obj)
  File "/home/h02/tcrocker/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/cloudpickle/cloudpickle_fast.py", line 540, in dump
    return Pickler.dump(self, obj)
  File "netCDF4/_netCDF4.pyx", line 5477, in netCDF4._netCDF4.Variable.__reduce__
NotImplementedError: Variable is not picklable

My understanding is the actual compute isn't called until it's needed, so on the .save call.. but it seems the object being returned is not something that the saver knows how to handle
I managed to work around it by doing...
rx_copy = rx1d.copy()
rx_copy.data = rx1d.data
iris.save(rx_copy, "rx1d.nc")

Accessing the .data attribute obviously caused the compute to be kicked off, and then rx_copy was a proper iris cube so the save worked..

Glad it worked! The save thing is a longstanding known issue, unfortunately.
It is, however, enough to just "touch" the data, no need to copy. Try to replace those three lines with just
rx1d.data
iris.save(rx1d, "rx1d.nc")

Thanks, the "touch" approach worked.
Weirdly I tried to run a test dask bag version shortly afterward, and ended up with a bunch of runtime errors from the multiprocessing library. I wonder if the cluster started by my previous script was not shutdown properly..
I suspect you are right though and the dask bag approach would likely take longer to run and use more memory..
Unfortunately I am constrained to using it for the time being to handle calculation of for example, cumulative wet days etc. since I have defined those using custom aggregators built with numpy functionality. Looking at the dask documentation though, I think I may be able to rewrite these to use dask arrays rather than numpy, in which case I hope the distributed approach would work.
A lot of these habits I have I think stem from having to work around iris features that didn't support lazy evaluation in the past. The newer versions definitely seem to have made big improvements in this area though.

@thomascrocker, sounds good! In fact, moving from numpy to ask often involves only minimal overhead, frequently even none at all, thanks to numpy's dispatching mechanisms. A notable exception is when dask consciously refuses to implement a numpy method, in which case some more thought is necessary. Perhaps the biggest example for that is sorting, where a true sort is not well suited for data-local parallelization as done in dask, and the better suited topk approach often works well too.
Anyway, do you think some of the lessons you learned are missing from the user guide right now? Would it be worth adding a Section or two?

Anyway, do you think some of the lessons you learned are missing from the user guide right now? Would it be worth adding a Section or two?

Possibly. Maybe the sections on lazy data and lazy evaluation could be expanded a little to make clear that these will take advantage of parallel processing, provided this has been initialised earlier in the script in some way.
I'd be happy to help out further, but it will have to be in the new year as I'm currently very busy writing a report that is due at the end of this year.


"Default Location" of a category not propagated to parts inside the category

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
The optional "Default Location" parameter filled in when creating new categories, is not propagated to parts in this category. No matter whether the part is newly created, or we assign it to the category afterward.
Contratry, the "Default Location" for a part, is properly transferred to newly created stock items.
The same behavior can be reproduced using web interface or admin panel (both import and manual entry)
It might be, that I'm somehow misunderstanding the "default location" concept here, however I did not find any reference in Inventree docs.
Steps to Reproduce

Create a "New Location"
Create "New Category" and fill-in the location.
Create "New Part" under the category. The default location for a part is not set.
Creat a stock item of the part. It is not assigned to any location

Expected behaviour
The newly created parts should have "Default Location" prefilled based on the "Default location" for the category.
Same logic might be applied for new subcategories.
Deployment Method

[X] Docker
[ ] Bare metal

Version Information
InvenTree-Version: 0.12.8
Django Version: 3.2.19
Commit Hash: a7487ff
Commit Date: 2023-10-03
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.1.0-13-amd64-x86_64-with-glibc2.36
Installer: DOC
Active plugins: False
Please verify if you can reproduce this bug on the demo site.

[X] I can reproduce this bug on the demo site.

Relevant log output
No response

As far as I am aware we never had this functionality, this seems to be a feature request. Thoughts @inventree/triage @inventree/maintainer ?

What I would suggest (as a new feature) is to extend the current implementation of how a "default location" is determined for a part.

If the part instance specifies a default location, use that
If the category of the part specifies a default location, use that
Walk up the category tree for the part, and look for the first specified default location

The default location value should not be copied from the category to the part - this would cause a lot of issues if the part is moved to a different category or if the category values change. Rather it should be calculated when required.

As far as I am aware we never had this functionality, this seems to be a feature request

Then it seems to be only partially implemented or presented in a bit misleading manner, as the field inside a category creation form is commented as:

Default location for parts in this category

The category will then have "Default Location" property, which is not further propagated. So now should I assume this is just a hint for a user?

The default location value should not be copied from the category to the part
I second that. Especially as the part might also inherit from another part on duplication, or from a part template as a variant.
Currently, in order to achieve similiar effect, for each category I create dummy part templates, with a default location already set.

I've been thinking of interweaving the "default location" fields closer with the user experience for a while now, and I'm about to start working on a few improvements to the system in #5928
I could just as well address this too if there are and concrete ideas for it.

@LavissaWoW that's great, hit me up if you need any assistance.
One thing to keep in mind - if we traverse up the category tree to determine the "default location" (for a part which does not have one explicitly set) we will need a pretty complex queryset annotation do make that perform efficiently.

@SchrodingersGat My thoughts here would be to do it like any given Stock Item created from a Part page.
Basically, in the creation modal, the default location will be preset. This preset comes from the category or parents, depending.
The only frontend work required in such an implementation is to update the creation modal if the category is changed. (Issuing a new API call, and repopulating form fields accordingly)
The user will then be able to see that the default location has been filled, and can then choose to override this.
Would this work for you, @mjktfw ?

@LavissaWoW handling this in the front-end forms would work. We would need a method of "traversing" up a part category tree to find the correct default location, and this method must be available to the API.

Would this work for you, @mjktfw ?
Surely will do, thanks a lot.

Regarding the frontend, I guess this would require to update the form and hoc, as we're assigning a part to a category in the same form we choose its location

Not stale

@mjktfw Here's what I'm planning:
For any given part, if the default_location is null, the part's category tree will be traversed until a default_location is found.
This is what will be sent to the frontend. The part itself however still has null as its default_location.
This enables the ability to choose a new location for the category, and have all parts under that category use that location if they don't have one defined themselves.
To put it into pseudocode:
if not part.default_location:
  render part.traverse_category_tree use first default_location != null

Visually, it will look like any part with this setup "has" a default_location, but it's actually just inserted during runtime when fetching the object from the server.


Small visual issue

Everything works fine but the boobs of the Wildfire's Female Gender Mod (link is: https://www.curseforge.com/minecraft/mc-mods/female-gender-fabric)

Hello,
I'm afraid I won't be able to do much about this since this is not in my controll.
You might be better off by contacting the developer for said mod.
I'll keep this open if you have other questions/info related to this.


Editorial cleanups to DreamHack blog post.

@bluecmd

Note that the second commit simply renames the file, and GitHub then doesn't show a proper diff anymore. Take a look at the first commit to see the actual changes.

Thanks!


LPFG-975: Add accessibility details to booking

Updated lpg-ui to use notification service insted of gov notify.

notification-service was under /src similar to lpg-management. I guess I'm clinging on to the hope that maybe it will be a separate library. I've moved it to /src/lib/service.

Replaced by https://github.com/Civil-Service-Human-Resources/lpg-services/pull/536


Set up app to render templates

Title: Set up app to render templates
User Stories

As a user, I want to be able to view the home and dashboard pages in the browser

Title: Set up database and models
User Stories

As a user, I need a database that can store my account, posts, comments, or upvotes

Completed.


ugrep: 3.12.3 -> 3.12.5

Description of changes
https://github.com/Genivia/ugrep/releases/tag/v3.12.4
https://github.com/Genivia/ugrep/releases/tag/v3.12.5
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

While here, also enable ZSTD archive format support.

Still looks good even with version 4 but you might need to rebase off of master as one of the tests is failing.


"Fatal error in launcher"

Getting this every time I try installing deep-daze:
Fatal error in launcher: Unable to create process using '"c:\program files (x86)\python38-32\python.exe"  "C:\Users\SilasM\AppData\Roaming\Python\Python38\Scripts\pip3.exe" install deep-gaze': The system cannot find the file specified.
I've tried reinstalling Python as well as pip multiple different times with different versions. Anything that could possibly be the problem? Also, every time I try opening any python file, it seems to open and immediately close right after no matter what it's supposed to do.

Google it


node: replace high intensity foreground color for bold

Hi,
Debug is using high intensity foreground color for highlighting namespaces (\u001b[90m–\u001b[97m) which is not standard and results in no colors showing in some terminals (for example Titanium Studio's). I suggest we replace high intensity with bold, meaning, replacing node.js l.90:
    args[0] = '  \u001b[9' + c + 'm' + name + ' '

for:
    args[0] = '  \u001b[3' + c + ';1m' + name + ' '

Regards

Thanks @TooTallNate!


ECS Probe - Rate Limit

I think scope is polling ECS too often and this could trigger rate limiting issues. Unfortunately, I could not find the exact rate for ECS, but I had problems with that API already in the past when implementing some event based actions.
If you have many failed task which keeps polling from ECS instead of cache at the current rate, times the number of nodes in the cluster in a cluster with 4+ nodes I have experienced hitting the rate limit with rotating tasks or similar
As a suggestion scope could cache the failed hit count and if it reaches X stop polling for some time.

Some more general discussion on ECS API throttling, and how to avoid it, are in #2050.

Good ideas, I actually use CW Event Streams for some ECS magic but still believe we might need to throttle back our querying for failed events as they happen every couple of seconds and they are not covered by cache.


Redirect sessions without trailing slash to session with trailing slash

Migrating from https://github.com/elisescu/tty-share/issues/34 , as I realized this redirection is handled by the proxy

Somewhat similar to:
elisescu/tty-server#15
essentially, if i have the link tty-share.com/s/<session_id>/, if I click to tty-share.com/s/<session_id>  , I get a 404
These urls should probably be treated as equivalent, as the default behaviour of many terminals does not include the trailing slash

I had a comment in the PR. I think the change makes sense without the logging part :)


Add Reference to RDF serializer to README.md

Previously, we did not advertise the existence of the RDF serializer in our README.md.
This adds a reference to this experimental feature and where to find it.

Wrong repo for this PR


Output video duration

I am very happy to use it. I want to ask how to change the video duration to 10 seconds or more?

Thank you very much for your interest. Our model is trained on video clips of approximately 16 frames, so directly increasing the video length during testing leads to distorted content. I think we can use the last frame of the previous clip as the first frame for the next inference clip, generating long videos autoregressively.

can you show me which part to modify about that ?

Please see here:
https://github.com/maxin-cn/Cinemo/blob/f2bf6c447edda81b9b218bbdd2bfdb4a9a0f86e1/pipelines/animation.py#L85
Just use the last frame of the previous clip as the first frame for the next inference clip. You can also change the prompt.


Unable to drag the image as similar to the div component inside draggable element

If an image is added inside the draggable element, then on drag the component doesn't drag, instead, it is selected and when we move the mouse, then the image gets movable, whereas, in the div component, the text is wrapped with draggable element, the drag and drop works as expected. I have tried adding fixed width and height as well, even though it is not working. Require some immediate help on this. Attaching code sandbox example: https://codesandbox.io/s/react-draggable-example-image-forked-vv50zr?file=/src/components/App.js

Solution suggested here works for me: https://github.com/react-grid-layout/react-draggable/issues/362#issuecomment-600186093
Essentially, add draggable={false} to your image element.


Flyout component support

According to docs (https://docs.avaloniaui.net/docs/controls/flyouts) Avalonia has Flyout components, but in Avalonia.FuncUI no implementation for that component, so I tried to add it by myself and I've got a problem that I'm stuck with.
I've implemented basic frame for new component:
namespace Avalonia.FuncUI.DSL

[<AutoOpen>]
module Flyout =
    open Avalonia.Controls
    open Avalonia.FuncUI.Types
    open Avalonia.FuncUI.Builder
    open Avalonia.Controls.Primitives

    let create (attrs: IAttr<Flyout> list): IView<Flyout> =
        ViewBuilder.Create<Flyout>(attrs)

    type FlyoutBase with

        /// <summary>
        /// A value indicating whether the flyout is visible.
        /// </summary>
        static member isOpen<'t when 't :> FlyoutBase>(value: bool) : IAttr<'t> =
            AttrBuilder<'t>.CreateProperty<bool>(FlyoutBase.IsOpenProperty, value, ValueNone)

        /// <summary>
        /// A value indicating how the flyout is positioned.
        /// </summary>
        static member placement<'t when 't :> FlyoutBase>(value: FlyoutPlacementMode) : IAttr<'t> =
            AttrBuilder<'t>.CreateProperty<FlyoutPlacementMode>(Flyout.PlacementProperty, value, ValueNone)

        /// <summary>
        /// A value indicating flyout show mode.
        /// </summary>
        static member showMode<'t when 't :> FlyoutBase>(value: FlyoutShowMode) : IAttr<'t> =
            AttrBuilder<'t>.CreateProperty<FlyoutShowMode>(Flyout.ShowModeProperty, value, ValueNone)

    type Flyout with

        static member content<'t when 't :> Flyout>(value: IView option) : IAttr<'t> =
            AttrBuilder<'t>.CreateContentSingle(Flyout.ContentProperty, value)

        static member content<'t when 't :> Flyout>(value: IView) : IAttr<'t> =
            value
            |> Some
            |> Flyout.content

    type Button with

        /// <summary>
        /// A value for flyout view placement for button.
        /// </summary>
        static member flyout<'t when 't :> Button>(value: IView option) : IAttr<'t> =
            AttrBuilder<'t>.CreateContentSingle(Button.FlyoutProperty, value)

        /// <summary>
        /// A value for flyout view placement for button.
        /// </summary>
        static member flyout<'t when 't :> Button>(value: IView) : IAttr<'t> =
            value
            |> Some
            |> Button.flyout

And when I'm trying to use it:
Button.create [
    Button.content "Hello there"
    Button.flyout (
        Flyout.create [
            Flyout.isOpen true
            Flyout.content (
                TextBox.create [
                    TextBox.text "Hello there"
                ]
            )
        ]
    )
]

I've got an error:
System.InvalidCastException: Unable to cast object of type 'Avalonia.Controls.Flyout' to type 'Avalonia.Controls.IControl'.
   at Avalonia.FuncUI.VirtualDom.Patcher.create(ViewDelta viewElement)
   at Avalonia.FuncUI.VirtualDom.Patcher.patch_avalonia@165(IControl view, FSharpOption`1 viewElement, AvaloniaProperty property)
   at Avalonia.FuncUI.VirtualDom.Patcher.patchContentSingle(IControl view, Accessor accessor, FSharpOption`1 viewElement)
   ...

Library can't render Button.flyout because Flyout class doesn't implement IControl interface (reference).
For now I don't see any possible workarounds to use this control with FuncUI library, also IControl interface has many references in core of FuncUI library, so I don't see any quick fixes for that. Any thoughts?

Since #220 we should now support creating any IAvaloniaObject (which I see the Flyout implements). Maybe try to change the declaration of the flyout method to:
static member flyout<'t when 't :> Button>(value: IView option) : IAttr<'t> =
    let getter : ('t -> obj) = (fun control -> control.Flyout :> obj)
    AttrBuilder<'t>.CreateContentSingle("Flyout", ValueSome getter, ValueNone, values)

Not sure if it'd work exactly like this since I haven't tested it, but that's the workaround we have for inlines, which are also not Controls but can be put inside of an IView (see here).
I'll be able to take a look at this later, but bindings for this would be awesome, thanks for the report! 😃

@sleepyfran Tried your suggestion, but still got same error, but from a little bit different place (see stack trace)
System.InvalidCastException: Unable to cast object of type 'Avalonia.Controls.Flyout' to type 'Avalonia.Controls.IControl'.
   at Avalonia.FuncUI.VirtualDom.Patcher.create(ViewDelta viewElement)
   at Avalonia.FuncUI.VirtualDom.Patcher.patch_instance@179(IControl view, FSharpOption`1 viewElement, PropertyAccessor property)
   at Avalonia.FuncUI.VirtualDom.Patcher.patch(IControl view, ViewDelta viewElement)
   at Avalonia.FuncUI.VirtualDom.Patcher.create(ViewDelta viewElement)
   at Avalonia.FuncUI.VirtualDom.Patcher.patch_IList@90-1.Invoke(Int32 index, ViewDelta viewElement)

@picolino just had time to try this out: are you in the latest master? I just copy-pasted your code and it's working. The only thing I removed is the isOpen property, since it's not settable and it errors; other than that the flyout appears when clicking the button. I modified the inline example and it works:

Feel free to create a PR with your changes if you manage to make it work, otherwise I'll try to open a PR whenever I get some time 😃

Oh, yeah, I used 0.5.3 version, when I've installed 0.6.0-preview3 version it start work like a charm. Thank you for help!
I'll prepare PR for Flyout component support and will link with this issue then.

Closed in #229.


Fix typo for number of functions hits

Appears to be a typo with the FNH , lcov.info files with this token get a parse error
@eliasreis54

Hi @landonmr!!
Thank you so much for your contribution!
I think we should fix the tests...

oops will do!

Thanks @landonmr!

@eliasreis54 any idea when a new version will be pushed to pub.dev
Thanks!

@eliasreis54 Great thank you very much for the update and this awesome package!


Add gRPC Python Example: Deadline

The added example demonstrates:

How to set deadline/timeout to an RPC.
What will happen if deadline exceeds.

Thanks to @gnossen, potentially gRPC C-Core support deadline propagation, which means in microservices architecture, the upstream service's deadline can be passed to downstream services automatically. However, we fails to get the parent call object from C-Core in Cython layer, hence our implementation currently doesn't support it.

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 2,026,842      Total (=)      2,026,842

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
11,324,725      Total (>)     11,324,723

 No significant differences in binary sizes


windows_package - (notifies/subscribes) Updating from 15.15.1 (works) -> 16.13.16 (fails) - Resource is not download source url .msi prior to trying installation

This works 100% in 15.15.1 (plus historic 14, 13)
Now working through code, validating 16.13.16 in TK. Getting error.
         * windows_package[VCI-StatsdCollector] action install
           * remote_file[C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\VCI-StatsdCollector-1.2.5.msi] action create
             - Would create new file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\VCI-StatsdCollector-1.2.5.msi
             - Would change dacl
             - Would change owner
             - Would change group

           ================================================================================
           Error executing action `install` on resource 'windows_package[VCI-StatsdCollector]'
           ================================================================================

           Errno::ENOENT
           -------------
           No such file or directory @ rb_sysopen - C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\VCI-StatsdCollector-1.2.5.msi

           Resource Declaration:
           ---------------------
           # In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vci_statsd_collector/recipes/packages.rb

            19: windows_package 'VCI-StatsdCollector' do
            20:   action :install
            21:   extend VciHelperCookbook::VciChefMedia
            22:   source "http://#{vci_chef_media_www}/VCI-StatsdCollector/VCI-StatsdCollector-#{node['vci_statsd_collector']['version']}.msi"
            23:   version node['vci_statsd_collector']['version']
            24:   checksum node['vci_statsd_collector']['checksum']
            25:   notifies :stop, 'service[VCI-StatsdCollector]', :before
            26: end

           Compiled Resource:
           ------------------
           # Declared in C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vci_statsd_collector/recipes/packages.rb:19:in `from_file'

           windows_package("VCI-StatsdCollector") do
             package_name "VCI-StatsdCollector"
             action [:install]
             default_guard_interpreter :default
             declared_type :windows_package
             cookbook_name "vci_statsd_collector"
             recipe_name "packages"
             source "http://www.media.service.yvr1.consul/VCI-StatsdCollector/VCI-StatsdCollector-1.2.5.msi"
             version "1.2.5"
             checksum "0d1eb13f22429c223ded08c3076f4c868313bb26317c52354e3e715475ab0fd4"
           end

           System Info:
           ------------
           chef_version=16.13.16
           platform=windows
           platform_version=6.3.9600
           ruby=ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x64-mingw32]
           program_name=C:/opscode/chef/bin/chef-client
           executable=C:/opscode/chef/bin/chef-client

       Running handlers:
       [2021-05-06T21:24:32+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2021-05-06T21:24:32+00:00] ERROR: Exception handlers complete
       Chef Infra Client failed. 1 resources updated in 09 seconds
       [2021-05-06T21:24:33+00:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
       [2021-05-06T21:24:33+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2021-05-06T21:24:33+00:00] FATAL: Errno::ENOENT: windows_package[VCI-StatsdCollector] (vci_statsd_collector::packages line 19) had an error: Errno::ENOENT: No such file or directory @ rb_sysopen - C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\VCI-StatsdCollector-1.2.5.msi

I'm doing the process of elimination. It appears I may have a legacy community cookbook that is breaking this. I'll update this issue and close if needed.

Looks like it is the adding of
notifies :stop, 'service[VCI-StatsdCollector]', :before
that is messing up this resource in chef 16.13.16+
removing it , the resource works fine
adding
subscribes :stop, 'windows_package[VCI-StatsdCollector]', :before
to service[VCI-StatsdCollector] has the same result.

@lamont-granquist I believe I've narrowed this down to our use of notifies
Removing the notifies makes the issue stop.
As I mentioned above, another resource subscribing to windows_package with (:before) also causes chef 16 windows_package to fail to download remote urls prior to installation

@knightorc could you please confirm if this is seen on chef-client or chef-workstation? based on the logs, it appears to be chef-client but we would like to double check. also, a little more detail in the repro steps will help us diagnose and fix the issue.

@vkarve-chef This is via chef-client in Test Kitchen.


Why do I need the paper-step tag?

Disclaimer: polymer newbe.
Why do I need a paper-step>  tag  for every page?
Can this not be deduced from counting the immediate children from  iron-pages?
Can I do extra things on individual steps?

It follows the pattern of paper-tabs.
Right now, there is no further configuration for <paper-step>.


CLOUD-52680 ambari <IP_ADDRESS> build 29

@akanto @biharitomi

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/2116/


Underbounce (easy route): 2400
Once Upon (Route 1): 2700
Past Power: 100
Ramp: 350

if i got any wrong or forgot any than idk skill issue


Time change with mouse scroll not working when field is in a bootstrap modal

Repro: https://jsfiddle.net/s18ormbj/
Your Environment

flatpickr version used: 4.6.3
Browser name and version: FF 78
OS and version: Linux Mint 19

On all the demos and the JS fiddle the time selector parts can be selected and I can use the mouse scroll to change the value. I imported the lib in a project, and it seems something is interfeering with this behavior: 1. I can't select hours or minutes, and if I try to select and scroll, it doesn't change the value, though clicking on the arrows work.
My config is pretty basic and in the JS fiddle works OK. In my case the field is displayed in a bootstrap modal, that breaks the click and scroll in the time fields. When displaying outside the modal, it works OK.
$("#starts_on").flatpickr({
                enableTime: true,
                dateFormat: "Y-m-d H:i",
                minDate: new Date()
              });

I have the same problem
In addition, the month menu closes instantly on click
the only solution found is to use the "inline: true" option which solves all the problems

flatpickr(inputDate, {
       enableTime: true,
       locale: "fr",
       time_24hr: true,
       altInput: true,
       altFormat: "l j F Y (H:i)",
       defaultDate: new Date(),
       defaultHour: new Date(),
       defaultMinute: new Date(),
       inline: true,
});


install.sh: install-ruby if current version > 2.6 or < 2.6

Fixes: https://github.com/Homebrew/brew/issues/6952

@sjackman Is this mergeable?

install.sh in Homebrew/install now supports Linux.


[WebToolsE2E][Aspire] When naming an aspire project with only lowercase characters, the build project will get a warning: "The type name 'xxx' only contains lower-cased ascii characters."

REGRESSION INFO: Also repro on Aspire 8.0.0-preview.2.23619.3
INSTALL STEPS

Clean machine: Win11 x64 23h2 ENU
Install VS 17.10 Preview 1 [34516.225.main]
Install Aspire Preview 3 latest build 8.0.0-preview.3.24066.3
Apply NuGet Feeds

REPRO STEPS

In the VS, create a new project > ASP.NET Core Web API > give any lower-case name such as "apicproj" > .NET 8.0 > check 'Enlist in Aspire Orchestration' > Create
Build solution

NOTE

This issue reproduces on any aspire project, not witout aspire project.

ACTUAL
The type name 'apiproj' only contains lower-cased ascii characters. Such names may become reserved for the language.

EXPECTED
Building solution without any warning.

Can you try adding the following attribute to the  in the App Host:
<ProjectReference Include="path\to\apiproj.csproj" ServiceNameOverride="ApiProj" />

This is not really a bug, but I want to make sure the override mechanim allows people to suppress the warning. I don't think it is a bug because its probably a pretty fair warning by the compiler, and it showing up is a side effect of the way we generate types for referenced projects in the app host.

@v-sherryfan can you try the workaround that Mitch mentioned above?

@balachir @mitchdenny Try the above workaround and it will show other error as below.

Can you share the contents of the api service csproj whilst you are experiencing the problem?

@mitchdenny This is the content of the api service csproj.

Closing as this does not repro anymore.

@mitchdenny I still reproduce this issue, I try again above workaround but it didn't make the warning go away. The expected result should be that the warning goes away, right? Please help to check it again.

Change ServiceNameOverride to AspireProjectMetadataTypeName. It has changed. Additionally the root of the problem is that the lowercase type name (apiproject) is what is causing the issue - this is not an Aspire specific issue. So make the name you choose something that is valid for a .NET type name.

@mitchdenny If I create a normal web api project with lowercase type name, it works fine without any warning. The warning only appears if I enable "Enlist in Aspire Orchestration" when creating the project, I guess this might be caused by aspire, what do you think?
Also, do you mean to change it like this? If not, can you provide me with a sample? Thanks in advance.

@mitchdenny This doesn't seem to be working, could you help me see if what I'm doing in the screenshot above is correct?

Change the type name from apiproject to ApiProject

So. Now you need to change your code in the apphost Program.cs to match the new type name (the AddProject call).

Yes, it works after changing code in the apphost Program.cs. I closed it as by design. Thank you very much for your patient explanation.


Error:(2) Attribute "key" has already been defined

Error:(2) Attribute "key" has already been defined
i can't import the project.

Hi, this is because the preference-v7 library defines all preference related android prefixed attributes also in the app namespace.
In addition to android:key you have app:key as well. Which is pretty much useless because native preference attributes are available on all platforms supported by preference-v7 library.
This unfortunately has a nasty side effect that no one else can define attributes with the same name.

If this attribute is defined within your project you can just change it. See attr.xml in the library sources.

My options:

Push support library developers to drop these nonsensical attrs in next release of their library.
Straightup copy preference-v7 library to my project. I'd have to think about that.

Thank you very much, though not yet been solved

Hey, brothers .are you going to  to drop these nonsensical attrs in next release of their library,

I always pay attention to your project

I'm not dropping preference-v7 dependency. Other libs are going to have to learn to prefix their attributes or use platform attributes when applicable.


"lotus.py" module at two levels?

@ellesmith88 can we delete the top-level "lotus.py" in this repo. There is one there and one under catalog_maker.

@agstephens Yes I'll delete it, don't know how it got there..!


Attachment support on calendar

Since Jolla gitlab is now read-only, let's move the discussion on the attachment support here.
For reference we've had:

Earlier initial PR there: https://git.sailfishos.org/mer-core/nemo-qml-plugin-calendar/merge_requests/86
Attachment class in kcalendarcore
Mkcal that gained better attachment serialization to database thanks to Damien
Mkcal servicehandlerif.h with downloadAttachment() and deleteAttachment()

Now going forward I'd suggest doing this in phases instead of trying to get everything at the same time. Though good to also have some forward plans, of course. The way I'd see this is:

Support showing remote url based attachments on received invitations. For the application these should be read-only first.
Testing sending Gmail invitation from Android device it automatically puts the attachment into google drive and the invited person receives the event with ATTACH including google drive url. We should ensure the synchronization plugins set this type of attachments to events they store, have the qml plugin here expose the attachments and finally show the list in the calendar app event view page. For starters it might be good enough if we allow the items to be clicked for generic url handling.
Support remotely set attachments when they are not passed via remote urls. Think ServiceInterface::downloadAttachment() is intended to be used to save the file locally. But don't know yet how the code should be able to know when the downloading is a valid operation, unless we make it always valid by implementing also http fetching in the service plugin(s) etc. Potentially the sync plugins could use their custom url schemes too for their internal details.
Some day finally support editing and creating attachments on events. Most unknowns here. Just for throwing ideas, the app / this module could add attachments with local file urls and Attachment::isLocal() set (to note the method description looks funny), and the sync plugin detects those, moves them forward and updates the attachment status. Or could be considered if the ServiceInterface should have a method for creating attachments, e.g. a method that takes a file and returns a uri that can be added to attachment instance. On editing the current deleteAttachment() might have some use.

And to consider further:

Should the service interface plugins be able to expose more properties for the sync services, what operations they support etc.
Security should be taken into account, if app doesn't have access to read a file for attachment, the sync plugin shouldn't read it either.
Should attachments be allowed on local calendar, and what would that mean.

Quite a quick braindump here, but let's keep planning. Don't have github usernames for all the related people, but cc: @chriadam @llewelld @dcaliste

Support showing remote url based attachments on received invitations.

This first step makes sense and is more or less straight forward. The initial MR from old gitlab can be reworked a bit to expose URI attachments only in nemo-qml-plugin-calendar (this actual MR need to be resubmitted here soon since the old gitlab will be shut down in the next month). At the moment, there is no attachment support at all in the QML plugin.
On this particular topic, I'm wondering if it would be a smart move not to copy the KCalendarCore Attachment class with slight variations in names and members as done historically for Events and friends, but if we could directly expose and use the KCalendarCore::Attachment class itself in the calendareventdata.h header. Modern KCalendarCore classes are all Q_GADGET with properties, signaling for these properties... So why reinvent the wheel ?
As far as CalDAV synchronisation plugin is concerned, the passing of URI attachments are already in place, both directions.

Think ServiceInterface::downloadAttachment() is intended to be used to save the file locally. But don't know yet how the code should be able to know when the downloading is a valid operation, unless we make it always valid by implementing also http fetching in the service plugin(s) etc.

For iCal serialisation (thus Exchange and CalDAV I guess), the inline attachments are already part of the payload of the iCal data. With the recent addition in mKCal, these binary data are stored in the mkcal database and loaded automatically with incidences. So the process to obtain files from these is just to get the corresponding incidence with inline attachment from the database and save the binary data (from KCalendarCore existing API) as a file somewhere.
While saying that, I'm starting to be concerned about performences of such a scheme. Indeed, fetching incidences from the database will always create a QByteArray of data for every inline attachments, even if it's just to list the incidences in the month view. That's quite suboptimal... Maybe one should think about a delayed loading from the database, adding such a new function as ExtendedStorage::loadIncidenceAttachment(Incidence::Ptr) while all other ExtendedStorage::load*() are always lazy and don't load any binary data. What do you think ?

Or could be considered if the ServiceInterface should have a method for creating attachments, e.g. a method that takes a file and returns a uri that can be added to attachment instance.

Yeh for the third point, creating inline attachments can be trivial : read the file and create an Attachment to the Incidence using the existing KCalendarCore API. Then, the iCal serialisation in the sync plugins will take care of the rest. But as you mention, if one wants to use UIR attachments, this may become much more tricky, with the need of a cloud drive somewhere. Thinking in term of Nextcloud for instance, this would involve to upload the chosen file to the Nextcloud storage, get back the uri and attaching it. Indeed, one need a plugin in mkcal implementing this for every supported cloud storage.

Should the service interface plugins be able to expose more properties for the sync services, what operations they support etc.

In my opinion, there should be a clear separation here :

sync plugins are responsible to copy back and forth the calendar data, without touching them. If the incidence as a inline binary attachment, it should not take the initiative to upload the binary data to a cloud and transform it into a URI attachment. In a word, sync plugin should not be impacted by attachment support.
mKCal should even not be touched, or at least not in its core : if an incidence contains binary data, these data are saved in the database as inline.
maybe it's the role of nemo-qml-plugin-calendar to create helpers to ease the process to get an URL from a local file through an upload in a cloud, and vice versa to obtain a local file from a URL in the cloud. Or are such helpers already part of some sync plugins handling cloud storage ? Should then, such functions moved to a common service handling file transfer with cloud, that could be used by Buteo sync plugins (for periodic sync) and by such helpers for calendar handling or even by the filemanager ?

Making all this work requires a lot of thinking and brainstorming. Thank you @pvuorela having started such discussions in the open here.

This first step makes sense and is more or less straight forward

Indeed, that's an easy win compared to everything later :)

but if we could directly expose and use the KCalendarCore::Attachment class itself

Seems doable, yes.

While saying that, I'm starting to be concerned about performences of such a scheme. Indeed, fetching incidences from the database will always create a QByteArray of data for every inline attachments, even if it's just to list the incidences in the month view. That's quite suboptimal... Maybe one should think about a delayed loading from the database, adding such a new function as ExtendedStorage::loadIncidenceAttachment(Incidence::Ptr) while all other ExtendedStorage::load*() are always lazy and don't load any binary data. What do you think ?

Very good point.  Overall I'm not sure if saving binary data to mkcal database for the attachments is a good idea. Doesn't matter if the data is small but on bigger items it's bad in both database usage and also on the API side. The separate attachment loading feels a bit special casing and might get the setup more complicated.
One alternatively could be that we avoid putting the binary data to the database, maybe even remove the whole support, and instead save the data elsewhere but support that to be saved elsewhere on the sync specific plugins with the downloadAttachment() function. Might be also an option to support that by mkcal, e.g. method to save binary somewhere and return a URI that can be used to fetch it.

I propose for discussion my vision of the concept of attachments in a calendar. Some of this has already been implemented. Please add if i missed something.
Attachment storage
1. The body of the attachment must be stored as a binary file on disk
2. Attributes of the attachment must be stored in the database
3. The current set of attachment attributes is missing for some calendar protocols such as Exchange, so we need the ability to add custom attributes for service plugins.
Sync attachments
Some calendar services allow to download the attachment body after synchronization, but others do not. It is a good idea to use the service plugin from mkcal for this, but the attachment must have an downloaded/not downloaded attribute (or use the file name of the attachment body - isEmpty()).
The calendar service plugin itself needs to know where it stores attachments - in the cloud, like Google, or in itself, like Exchange or CalDAV.
If we want to attach a URL from some other cloud to the event, then it will be attach as URL, not a file, and the service plugin should transmit it as a URL, and not try to upload or download.
QML plugin
A QML plugin should provide the following functionality:
1. List of event attachments with name, index and status loaded/not loaded/URL
2. Download attachment if it is not downloaded
3. Download progress (optional)
4. Attach a file to the event
5. Attach a URL to the event
6. Remove attachment

Attachment storage is the connecting point between the fontend (QML plugin) and the backend (service plugin), so we need to start with it.
At first glance, the way of storing the body of attachments in a file does not raise any questions, a similar scheme is used in QMF.
A more difficult question is the storage of non-standard attributes that the backend may need to access attachments on the server. A solution is to add custom properties, as in Event.

Thank you for sharing your thoughts and views.
I agree that storing inline data outside the DB itself and storing a file location in the DB, like in QMF, is maybe the best option at hand. This is a mKCal job, to change the current storing of binary into a file location + handling the file read and write. This raises a question about Attachment handling though, let think about the following process :

a sync service is sending an event with an inline attachment of 25 MB (the slides for the meeting for instance),
the Buteo plugin for this service is getting an Attachment object att for this load in memory. att.isBanary() is returning true and att.data() is containing the slides.
the att object is then stored by mKCal. In the new formalism, mKCal is saving the att.data() on disk in a private location, and save this location in the DB.

Up to now, no problem. Later on, the user is opening is calendar and see the new meeting event with the attachment and can tap on the attachment to get it opened in the document viewer. To get this, that's what happening :

CalendarManager is retrieving events from storage,
mKCal is viewing an event with an attachment, so it's creating an Attachment object att. It is a binary attachment and it calls att.setData() with the data read from the file location stored in the DB.
the calendar application is displaying the event and provide a button to open the atachment. Then nemo-qml-plugin-calendar is seeing that att is binary, so it is creating a temp file from att.data() and pass the temp location to the document viewer.

This is highly inefficient and memory consuming (as long as the event is in the CalendarManager memory, we're using 25MB of RAM for one event). It would be better if on reading, mKCal is creating an attachment which is not a binary one, but an URI one, with the actual file location as URI. But, if we do this, we need to change the sync service, because on upsync, they will send an attachment that is not a binary anymore, but one with a URI that is a nonsense for the rest of the world.
So to summarize, my preference is for :

mKCal is storing binary attachments as a local file using a file:///plop/plop/plop style URI (actually making all attachment as URI like).
sync services has to be changed to inline any URI attachments that has a file:/// scheme. This is quite boring because we cannot rely on a one liner ICalFormat::toString(event) anymore…

The latest point can be sorted out by two ways :

move to KCalendarCore the burden to transform any URI attachment with a file:/// scheme into a binary attachment before serialisation. It makes sense because the file:/// scheme may not be understood outside the device. But I'm not sure of the acceptence upstream.
use a flag in mKCal when reading incidences from the database, to actually do the transformation on database reading. So the flag should be false for the CalendarManager in nmo-qml-plugin-calendar (so the UI is using file:/// URIs), but true in the sync service so binary attachments are still binaries on export.

A more difficult question is the storage of non-standard attributes that the backend may need to access attachments on the server. A solution is to add custom properties, as in Event.

Indeed, https://datatracker.ietf.org/doc/html/rfc5545#section-<IP_ADDRESS> attachments in RFC5545 can have arbitrary properties. This is not supported at the moment in KCalendarCore API. So the first step would be to allow it at KCalendarCore level.
Then, the DB is not setup for them neither. I'm a bit reluctant to create a new table for x-properties of attachments… Attachments have already ther own table, because there may be several attachment for one incidence. So it would mean that to get one event, we would have to loop inside the attachment table for this event, but in addition loop in the attachment property table for each attachment. It looks a bit overkilling for the purpose… But I've no better idea. One can store a string representation of the properties in the attachment table and serialise and deserialise that string. That's ugly also, but maybe less over engineered.

mKCal is viewing an event with an attachment, so it's creating an Attachment object att. It is a binary attachment and it calls att.setData() with the data read from the file location stored in the DB.

The CalendarManager (using mKCal) should not load the attachment into its memory, it should copy the attachment file from mKCal's folder to the user's folder (eg Downloads) and provide the user with the final path to view or open. Like in mail: the first click is to download the attachment (not in the case of CalDAV), the second click is to save the attachment, the third click is to open the attachment.

sync services has to be changed to inline any URI attachments that has a file:/// scheme. This is quite boring because we cannot rely on a one liner ICalFormat::toString(event) anymore…

For synchronization services, we can load file contents from mKCal's folder into KCalendarCore::Incidence for each Attachment and then call ICalFormat::toString (event).

Indeed, https://datatracker.ietf.org/doc/html/rfc5545#section-<IP_ADDRESS> attachments in RFC5545 can have arbitrary properties. This is not supported at the moment in KCalendarCore API. So the first step would be to allow it at KCalendarCore level.

Yes - this is already possible to do.

One can store a string representation of the properties in the attachment table and serialise and deserialise that string. That's ugly also, but maybe less over engineered.

I think that serialization of additional parameters is the most economical and universal solution.

The body of the attachment must be stored as a binary file on disk

Generally agree. Maybe one exception: if an .ics file is imported into local calendar it could be ok storing the binary part to the sql database. But also fine if we start by not supporting binary attachments on imported files.

The current set of attachment attributes is missing for some calendar protocols such as Exchange, so we need the ability to add custom attributes for service plugins.

This depends on how the attributes would be used. I'm not yet sure if they would be really needed. More on that below.

Some calendar services allow to download the attachment body after synchronization, but others do not. It is a good idea to use the service plugin from mkcal for this, but the attachment must have an downloaded/not downloaded attribute (or use the file name of the attachment body - isEmpty()).

For one there's the isLocal() property on the attachments. It's not documented too well, but maybe something that could indicate if the content is available on the device or if it needs to be downloaded before opening.

mKCal is viewing an event with an attachment, so it's creating an Attachment object att. It is a binary attachment and it calls att.setData() with the data read from the file location stored in the DB. [etc]

I'm thinking if we could keep the mkcal separate from this. What I had in mind was something like

Base case: if the attachment is http/https url, it's set directly as the uri of the attachment. The qml and UI side detect the scheme and just present the item as url that can be tapped.
Actual file: the sync code set some sort of identifier as uri. Perhaps isLocal property as above depending whether the content is available on the disk. For comparison https://datatracker.ietf.org/doc/html/rfc5545#page-81 -><EMAIL_ADDRESS>This plugin offers API to save (and maybe just download?) the attachment locally to given path, using ServiceHandler::downloadAttachment(). The service plugin then handles the special identifier uri as it sees proper. E.g. the sync side might have saved the attachment locally to its own directories and the id can be used to map there. Or it could be in a database. Or it could result in some extra communication with the server. Up to sync implementation.

This depends on how the attributes would be used. I'm not yet sure if they would be really needed.

If you use a URI to store additional properties of calendar services, you get the following situation (for example, Exchange):
In case of an incoming event:

Sync plugin receives new event with attachment (attachment is not downloaded)
uri = eas://attachment?ClientId=12345&Method=1&FileReference=agenda.pptx&EstimatedDataSize=100500
isLocal = false
Service plugin downloads attachment from server
uri = file:///home/user/.local/share/system/privileged/Calendar/mkcal/<attachment_id>?ClientId=12345&Method=1&FileReference=agenda.pptx&EstimatedDataSize=100500
isLocal = true

In case of an outgoing event:

User adds attachment to event
uri = file:///home/user/.local/share/system/privileged/Calendar/mkcal/<attachment_id>
isLocal = true
The service plugin sends an event with an attachment to the server
uri = file:///home/user/.local/share/system/privileged/Calendar/mkcal/<attachment_id>?ClientId=12345&Method=1&FileReference=agenda.pptx&EstimatedDataSize=100500
isLocal = true

If you use a URI to store additional properties of calendar services, you get the following situation (for example, Exchange):

Some comments below, but did you mean there would be some problems with the cases? :)

In case of an incoming event:
2. Service plugin downloads attachment from server
uri = file:///home/user/.local/share/system/privileged/Calendar/mkcal/<attachment_id>?ClientId=12345&Method=1&FileReference=agenda.pptx&EstimatedDataSize=100500
isLocal = true

Not sure should we do such replacement for the local copy of the file. Could be still the eas:// url too. Only the implementation behind downloadAttachment() and deleteAttachment() need to know the storage details. Or well, as long as the code in this repository doesn't make any assumptions on such paths.

In case of an outgoing event:
1. User adds attachment to event
   uri = file:///home/user/.local/share/system/privileged/Calendar/mkcal/<attachment_id>
   isLocal = true

That exact path would mean a copy is made and the mkcal internal data path is used outside mkcal. Think this could as well be the attached file the user has chosen.

We have KСalendarCore::Attachment and methods for storing it in mKCal, we are now limited to this set of properties, and we have nowhere to store the attachment properties that we need for Exchange. Therefore, we have only two ways: to extend the ways of using the existing set of properties of KCalendarCore::Attachment beyond its design, or to try to add additional properties to KCalendarCore::Attachment.
We need to decide - which way will we go?

We have KСalendarCore::Attachment and methods for storing it in mKCal, we are now limited to this set of properties, and we have nowhere to store the attachment properties that we need for Exchange.

Could you clarify what are those attachment properties you'd need and how those would be used?

To load an attachment in Exchange, we need to know the FileReference and EstimatedDataSize values for each attachment from the event. These values must be stored somewhere after synchronization and then used by the service plugin to download the attachments.

Why not save them in the URI ? Your example is eas://attachment?ClientId=12345&Method=1&FileReference=agenda.pptx&EstimatedDataSize=100500. You can save it in the attachment URI, using KCalendarCore::Attachment::setUri(). It will be proerly saved and restored by mKCal.
Then in the service plugin, do a QUrlQuery(attachment.uri()) and then use .queryItems() to get a list of (key, values) pairs.


Bootstrap/conversation and messages

With:

entity&repo creation
configuration of jwsserializer/DoctrineExtensions/DoctrineMigration...
first methods to create a conversation and add messages inside

Readme inc.

:+1:


change default value from 6

I would like to change the default (unrolled) value of the dice from 6 to something else via props (and leave it to 6 if no default value is present in props). demo of my game
an even nicer feature would be to change the default face of the dice to something custom (question mark, text 'push', clicking finger, ...) so that users are pushed to click it.
do you plan such enhancement? thanks

@MichalPP For now, I've created a wrapper on ReactDice that on its useEffect set the values with rollAll and with rollTime: 0:
import React, { useRef, useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import ReactDice from 'react-dice-complete'

const DiceWrapper = ({ onNumberSort, diceValues }) => {
  const reactDice = useRef(null)
  const [sorted, setSorted] = useState(false)
  const [sortNum, setSortNum] = useState(0)
  const canRollAll = !sortNum
  const rollTime = canRollAll ? 2 : 0

  useEffect(() => {
    if (
      !reactDice ||
      !reactDice.current ||
      canRollAll ||
      sorted ||
      !diceValues
    ) {
      return
    }

    reactDice.current.rollAll(diceValues)
  }, [canRollAll, diceValues, sorted])

  const onRollAll = () => {
    if (!reactDice || !reactDice.current || !canRollAll) {
      return
    }

    reactDice.current.rollAll()
  }

  const onRollDone = (num, rollValues) => {
    setSorted(true)
    setSortNum(num)
    onNumberSort && onNumberSort(num, rollValues)
  }

  return (
    <div>
      <ReactDice
        rollDone={onRollDone}
        ref={(dice) => {
          reactDice.current = dice
          const currentDiceNum = diceValues ? diceValues[0] + diceValues[1] : 0
          if (currentDiceNum) {
            setSortNum(currentDiceNum)
          }
        }}
        rollTime={rollTime}
      />
      <button onClick={onRollAll} disabled={!canRollAll}>
        SORT
      </button>
    </div>
  )
}

DiceWrapper.propTypes = {
  onNumberSort: PropTypes.func.isRequired,
  diceValues: PropTypes.arrayOf(PropTypes.number),
}

export default DiceWrapper

The real component is a little more complex, but I've tried to copy and paste the important parts and as a reference

The prop defaultRoll has been added in release 1.2.1 and will allow you to set the default value.


fix(filter): Take redactions into account for Array elides

Verified this against cargo in rewriting some tests
Fixes #352

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

7 of 7 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 51.251%

Totals

Change from base Build<PHONE_NUMBER>7:
0.0%

Covered Lines:
1393

Relevant Lines:
2718

💛  - Coveralls


Fix and improve MovingWindow examples in docs

Fix example formatting
Add proper python markers to examples
Improve examples formatting

The fix is for this:

And this is how it looks after the improvements in formatting:

Ah, one catch, the final output doesn't say "Example: ..." but just "..." because then it renders with a custom title it doesn't add the "Example: " too, just the :test_tube: icon. I tried putting Example: Example: ... in the docstring but it looked really weird and like an error, so I guess it is likely that someone will "fix it" at some point, so I was more comfortable with this balance between nice rendered docs and docs in the source that don't look completely weird.

So this is how the output with this PR looks like:


distinctBy but with last element

I am currently evaluating vavr as a replacement for Java 8 Streams. While processing batches of events we always want to keep the last value unique by some key. The semantics would be the same as
.reverse()
.dicstinctBy(e -> e.getSomeKey())
.reverse()

i think.
But i do think that this comes with performance hits. To achieve this we are using a LinkedHashMap where we put elements one after the other with their generated keys and afterwards get the .values() again from that map which will now contain only the last elements of each key.
Would you consider adding "distinctByLast" or as we call it "keepLast" ?

That sounds like a good idea :) I'd lean towards a new method for the sake of backward compatibility. We could target 0.11 and 1.0