Authenticating routes

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Description
Suppose I am having authentication in place, how do I protect my navbar routes or markdown files routes?
I can't understand how to approach towards it in docusaurus.
Self-service

[ ] I'd be willing to address this documentation request myself.

I've answered how to protect a docusaurus site here:
https://github.com/facebook/docusaurus/issues/958#issuecomment-1057075925
There is not a single way, it depends on what you want to do exactly

I've answered how to protect a docusaurus site here: #958 (comment)
There is not a single way, it depends on what you want to do exactly

@slorber Thank you so much for pointing it out. I am surprised why it didn't come up in my issues search terms.

I think we can put this under deployment

@Josh-Cena would the need here be to document the methods of protecting docusaurus sites per slorber's comment?

Yep! It would mostly be copy&pasting his comment, maybe presenting it in a more organized way :)

Would that be in this repository? Or is there a separate repo for documentation?
I'll try my hand at presentation and adding some more words :).

Deployment docs are here: https://github.com/facebook/docusaurus/blob/main/website/docs/deployment.mdx

Hi! I a new contributor and was looking at this issue. I wanted to clarify what needs to be done for this to see if I think I can complete it (or if there's a different issue that would be better suited for a new contributor, I can look at that as well).

@ehuisinga This issue is about documenting strategies to authenticate a site or section of your site.
I have written possible solutions and their tradeoffs here, but didn't try them in practice:
https://github.com/facebook/docusaurus/issues/958#issuecomment-1057075925
This issue is about doing the R&D and POCs to prove that these things are possible and write down a step-by-step guide somewhere for the rest of the community. It's hard to help: you have to try building those things and report how it goes.

@slorber I've looked into it more and this seems maybe a little complicated for me to dive into Docusaurus with, so I think I'll pass on it for now. Thank you for the response though!

You may check my articles that show how to add an authentication layer to your Docusuaurs website.
https://iammassoud.net/blog/docusaurus-authentication-roadmap


Update http4s-client, http4s-dsl, ... to 0.23.3

Updates

org.http4s:http4s-client
org.http4s:http4s-dsl
org.http4s:http4s-server

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

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

labels: library-update, semver-patch

Superseded by #189.


Suggesting having a page that shows all tags under it and an authors page as part of the future update of the Casper theme

Hey 👋 . We ask that you please do not use GitHub for support or feature requests 😄. We use GitHub solely for bug-tracking and on-going feature development.
Our forum is a great place to get community support, plus it helps create a central location for searching problems/solutions.
Thanks!


XmlOutputFormatter not able to serialize LinkContainer as it has Dictionary<string, Link> resulting in a 406

Need to solve this through use of SerializableDictionary (instead of using Dictionary) with the help of https://stackoverflow.com/questions/67959/net-xml-serialization-gotchas or https://msdn.microsoft.com/en-us/library/gg496181.aspx in your source code in LinkContainer.cs and ILinkContainer.cs

Alright, this one is a bit tricky.
I'm assuming that we want to have resources serialized like
<?xml version="1.0"?>
<account>
    <account_number>12345</account_number>
    <balance currency="usd">100.00</balance>
    <link rel="deposit" href="/accounts/12345/deposit" />
    <link rel="withdraw" href="/accounts/12345/withdraw" />
    <link rel="transfer" href="/accounts/12345/transfer" />
    <link rel="close" href="/accounts/12345/close" />
</account>

and not
<?xml version="1.0"?>
<account>
    <account_number>12345</account_number>
    <balance currency="usd">100.00</balance>
    <links>
        <link rel="deposit" href="/accounts/12345/deposit" />
        <link rel="withdraw" href="/accounts/12345/withdraw" />
        <link rel="transfer" href="/accounts/12345/transfer" />
        <link rel="close" href="/accounts/12345/close" />
    </links>
</account>

since that appears to be the most widely spread approach.
You see, it turns out that while serializing a class, you can't skip wrapping a property into its own XML element unless that property implements IEnumerable. (or at least I couldn't find a way to do so)
If we use SerializableDictionary, we will always get the second result.
It seems that the simplest approach to getting a proper result would be to wrap the current links dictionary into a LinkCollection. E.g.
public class LinkCollection : IEnumerable<Link>
{
    private readonly Dictionary<string, Link> links = new Dictionary<string, Link>();

    public int Count { get; set; }

    public void Add(string name, Link link) =>
        links.Add(name, link);

    [Obsolete("This method is here only for the XML serialization to work. It should not be used.", true)]
    public void Add(Link link) =>
       throw new NotImplementedException();

    public bool ContainsKey(string key) =>
        links.ContainsKey(key);

    public IEnumerator<Link> GetEnumerator() =>
        links.Values.GetEnumerator();

    IEnumerator IEnumerable.GetEnumerator() =>
        GetEnumerator();

    public Link this[string name]
    {
        get => links[name];
        set => links[name] = value;
    }
}

This will get us what we want but it comes with another downside.
XmlSerializer will not work on types implementing IEnumerable if they don't publicly expose an Add(object obj) method.
This means we must expose an Add(Link link) method.
Fortunately, the ObsoleteAttribute allows us to emit a compile-time error if someone were to use it, so besides being kind of ugly, it doesn't bring any other problems.
Switch Dictionary<string, Link> with LinkCollection and you now get proper serialization in the form of
<?xml version="1.0" encoding="UTF-8"?>
<TestLinkContainer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <link rel="test" hrev="test" method="GET" />
   <link rel="test" hrev="test" method="GET" />
   <link rel="test" hrev="test" method="GET" />
   <link rel="test" hrev="test" method="GET" />
   <Id>123</Id>
</TestLinkContainer>

This is only at first sight. If you have any other ideas, please share. Otherwise, if @jam13c approves of this approach, I could dig deeper and submit a PR.


Update README with correct stop command

docker-compose down is equivalent to docker-compose stop and docker-compose rm. The README makes it sound like the given command will just stop LocalTerra, but not reset the world state.

Thank you for the contribution.

@hanjukim Thank you for LocalTerra! Incredibly helpful in development.


[BUG] - Client disconnect when entering a nether portal as a spectator in a multiplayer server.

Description
When entering a nether portal in spectator with the rule spectatorPlayersUsePortals set to true, the client is disconnected with the error "Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet"
To Reproduce
Steps to reproduce the behavior:

Open multiplayer world
Do /carpet spectatorPlayersUsePortals true
Go into spectator mode
Enter portal
See error

Expected behavior
The expected behavior was that the player would enter the nether portal and be transported to the nether.
Screenshots
latest.log
Version (please complete the following information):

Minecraft version: 1.19.4
Carpet version: 1.4.101+v230319
Mod version: 1.2.1

Can you provide what mods are you running on client along with its crash report?


New Datadir + SELinux issue

When specifying a different data directory from the default one on a system running SELinux, there's a problem that arises:
It's caused by the process for creating the new data dir (essentially by not changing the config but moving the data and then creating a symbolic link). The package installation puts the correct SEL label on the default data directory, but that gets wiped out by the move-and-link operation. The solution is simple, but since the problem happens within the cookbook, there's no way to "inject" the solution into the cookbook from outside. The command "restorecon -v /var/lib/mysql" has to be issued to restore the established default context to the data directory before starting the db service (not doing so results in an error condition and the build dies).
Possibly put a restore context command before the restart, with a guard clause only_if selinux is active (or maybe only_ if the command exists)?
A related issue is caused because the new data directory doesn't have the correct (mysqld_db_t) selinux type label, but that can be worked around by creating the directory and assigning it the correct label before including the mariadb::default recipe. Unfortunately that doesn't help the first  problem; there's no way to insert the restorecon between the creation of the link and restarting the service, so it crashes.

As a follow-up, there is a workaround for the crash. Before including the mariadb::default recipe:
bash 'restore selinux context after creating link' do   code "restorecon -v #{node['mariadb']['mysqld']['default_datadir']}"   action :nothing   subscribes :run, 'bash[move-datadir]', :immediately end
Unfortunately, the workaround depends upon internals in the mariadb:server recipe (specifically, the name of the resource that creates the link to the new data directory) so it's a bit fragile. It needs to be constantly retested to ensure it still works.

This has been resolved via #153


composer error when run composer update

following error is coming when i run composer update
PHP Fatal error:  Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks() in /root/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 272
Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks() in /root/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 272

try composer self-update and use forum

not working still coming

composer global require "fxp/composer-asset-plugin:~1.0.3"
(c) https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md

thanku it works

Hi! I have the same error when trying composer update, composer global update and composer global require "fxp/composer-asset-plugin:~1.0.3", composer is up to date. Can anyone help, please?

For those who still same the problem (I have ubuntu):
just remove directory /home/user/.composer/vendor/fxp

just remove directory /home/user/.composer/vendor/fxp
thank you, it works!

@futureglorydev - THANKS!

@umneeq  thanks. I have ubuntu and it works for me

Thank you - got me out of a tricky spot!

Have the same error on my mac too. Ran rm -rf ~/.composer/vendor/fxp and its working again. But what is fxp anyway?

on windows:
remove from Users folder  \AppData\Roaming\Composer\vendor\fxp

@umneeq Спасибо, работает! И так просто...

It works, thanks!

Странно, что не работало без этого.

@umneeq thank you man! :+1:

@futureglorydev Thank you. It works

@umneeq, thanks )

On windows just remove the folder fxp from *%appdata%\Composer\vendor*

Thanks, have been working on that issue for some time now...

Thanks,  gidedin..

@futureglorydev - THANKS!

Уже не первый раз ничего не помогает кроме совета /home/user/.composer/vendor/fxp, в моем случае путь был /root/.composer/vendor/fxp

в твоем случае не надо запускать композер от рута

@wrewolf thak you, it works.

@futureglorydev Thanks! it works.

yes, great. It also works for me.


Concurrency in ce3

I should have done my comments in-line. Sorry! Copying from Gitter:

I think we should prefer IOApp.Simple whenever possible in snippets, since it’s more concise and doesn’t involve ExitCode
I think we should encourage import cats.syntax.all._ instead of import cats.implicits._
"Throughout its lifetime, a fiber will migrate between these pools to accomplish its various tasks" this is GLORIOUS
You have exercises?! Damn

Addressed review comments
Added some coloring here and there
Added tut annotations

I think this is otherwise ready, but I'll probably continue making edits in the meantime. Is there anything else I need to get this merged?

I should have done my comments in-line. Sorry! Copying from Gitter:

I think we should prefer IOApp.Simple whenever possible in snippets, since it’s more concise and doesn’t involve ExitCode
I think we should encourage import cats.syntax.all._ instead of import cats.implicits._
"Throughout its lifetime, a fiber will migrate between these pools to accomplish its various tasks" this is GLORIOUS
You have exercises?! Damn

I don't understand the point about imports. It's been my understanding that import cats.implicits._, along with import cats._, is the easiest way to get everything you need. Why the shift?

It's been my understanding that import cats.implicits._

cats.implicits._ imports two sets of things: instances of the various typeclasses, e.g Monad[Option], and extension classes that add syntax, e.g yourList.foldMap, or in other words implicits is the equivalent of having instances.all._ and syntax.all._. However, recent versions of cats have moved the instances to the companion objects of the typeclasses, so they are always in scope, and all you need is import cats.syntax.all._ to get the syntax extension

It's been my understanding that import cats.implicits._

cats.implicits._ imports two sets of things: instances of the various typeclasses, e.g Monad[Option], and extension classes that add syntax, e.g yourList.foldMap, or in other words implicits is the equivalent of having instances.all._ and syntax.all._. However, recent versions of cats have moved the instances to the companion objects of the typeclasses, so they are always in scope, and all you need is import cats.syntax.all._ to get the syntax extension

Old habits die hard.... :)
Aside: I wonder if import cats.extensions._ would be better, and hint at Scala 3 terminology. Also the .all seems redundant.

@larsrh can we merge this?

Sure, go ahead.

Pushing a few last minute edits for this, will comment again after it's ready

actually ready now :)


Split out images and static assets from case studies

Currently, the case studies have all of the images, and several megabytes of external javascript libraries built into them. This causes load and render times to be several seconds.
By splitting them up, we can reduce this time substantially since:

rendering can begin as soon as the .html file is downloaded
javascripts libraries can be cached between requests
the web browser can download multiple embedded images simultaneously

I did not update:

pool-binary-trials-rstanarm.html
radon.html
tutorial_twopl.html

Since I could not find the original source for the first two, and the last one no longer compiles due to underlying library changes.

Wow.  That was a lot of work.  I like the organization into directories.
@betanalpha: are you OK with this change?
@jgabry or @bgoodri : is there a repo for the case study on hierarchical models?
@aaronjg:  Is it faster?
The source for the radon example is in Jupyter, not knitr, and it's on @fonnesbeck's repo:
https://github.com/fonnesbeck/stan_workshop_2016/blob/master/notebooks/Multilevel Modeling.ipynb
What went wrong with the other model?  Other than no longer allowing lp__, everything should be backward compatible in Stan programs.  Or is it an issue with rstan or another library?

This is going to make it more annoying to manage the case
studies and update them whenever there are changes.  Were
this split off into another repo that we could link to from mc-stan
I’d be more inclined, but right now I’m worried about the looming
maintenance burden.

On Jun 28, 2017, at 9:22 PM, Bob Carpenter<EMAIL_ADDRESS>wrote:
Wow. That was a lot of work. I like the organization into directories.
@betanalpha https://github.com/betanalpha: are you OK with this change?
@jgabry https://github.com/jgabry or @bgoodri https://github.com/bgoodri : is there a repo for the case study on hierarchical models?
@aaronjg https://github.com/aaronjg: Is it faster?
The source for the radon example is in Jupyter, not knitr, and it's on @fonnesbeck https://github.com/fonnesbeck's repo:
https://github.com/fonnesbeck/stan_workshop_2016/blob/master/notebooks/Multilevel Modeling.ipynb https://github.com/fonnesbeck/stan_workshop_2016/blob/master/notebooks/Multilevel Modeling.ipynb
What went wrong with the other model? Other than no longer allowing lp__, everything should be backward compatible in Stan programs. Or is it an issue with rstan or another library?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/stan-dev/stan-dev.github.io/pull/44#issuecomment-311836024, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdNlnrqjPjtNnT43DdQC6cDkdeToJJ6ks5sIvxggaJpZM4OIo2N.

@bob-carpenter Once I figured out all the dependent libraries I needed, it was pretty straightforward to build everything. I've had some sporadic downtime as I've been waiting for my stan models to run :)
Backwards Compatability For the tutorial_twopl.html, they had built a library on top of stan, and then changed the function signatures so it no longer worked. I was really impressed that all the other models ran without needing any modification.
Performance For the divergence case study it new version takes 670ms until DOMContentLoad and 1.5 seconds total, old version takes 9 s to DOM load and 9.3 s total.
To get a sense for the feel of it you can compare:
https://aaronjg.github.io/stan-dev.github.io/users/documentation/case-studies/divergences_and_bias.html
to:
http://mc-stan.org/users/documentation/case-studies/divergences_and_bias.html
If you have visited the page before may need to to a ctrl-f5 refresh to see how long it would take for a new visitor.
Organization I agree with @betanalpha, there should be a good way to maintain these going forward. I think there could be a case studies repository that can then be included as a submodule into both the example repository and the site repository. If it is set up correctly, you can just run "markdown::render_site('.')" from R and it will build the whole thing from scratch.

Moving forwards, if we’re going to split everything out into
separate files then I think we need to push everything to
a separate case studies repo.  That will also require someone
to be responsible for maintaining it as well as some policy
for deciding what gets added to it.   Unfortunately we’ve
hit a wall where we’re either going to make it a pain to
maintain the current website or significantly increase
the logistics around case studies.

On Jun 29, 2017, at 2:12 AM, aaronjg<EMAIL_ADDRESS>wrote:
@bob-carpenter https://github.com/bob-carpenter Once I figured out all the dependent libraries I needed, it was pretty straightforward to build everything. I've had some sporadic downtime as I've been waiting for my stan models to run :)
Backwards Compatability For the tutorial_twopl.html, they had built a library on top of stan, and then changed the function signatures so it no longer worked. I was really impressed that all the other models ran without needing any modification.
Performance For the divergence case study it new version takes 670ms until DOMContentLoad and 1.5 seconds total, old version takes 9 s to DOM load and 9.3 s total.
To get a sense for the feel of it you can compare:
https://aaronjg.github.io/stan-dev.github.io/users/documentation/case-studies/divergences_and_bias.html https://aaronjg.github.io/stan-dev.github.io/users/documentation/case-studies/divergences_and_bias.html
to:
http://mc-stan.org/users/documentation/case-studies/divergences_and_bias.html http://mc-stan.org/users/documentation/case-studies/divergences_and_bias.html
If you have visited the page before may need to to a ctrl-f5 refresh to see how long it would take for a new visitor.
Organization I agree with @betanalpha https://github.com/betanalpha, there should be a good way to maintain these going forward. I think there could be a case studies repository that can then be included as a submodule into both the example repository and the site repository. If it is set up correctly, you can just run "markdown::render_site('.')" from R and it will build the whole thing from scratch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/stan-dev/stan-dev.github.io/pull/44#issuecomment-311871938, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdNlrdSkR_SiS8sJ6cl9sicUMyF5tgnks5sI0AzgaJpZM4OIo2N.

This pull request doesn't seem like that much more work since it is now just one file + one accompanying directory. Adding new case studies could be done by just dropping them into the directory. Then again, I'm just using the website and not dealing with maintaining it
If you go to having a separate repo and with the case study source and ability to compile them all, then it is more work to maintain, on the plus side the user can easily find all the data needed to run the examples, and you can easily identify when case studies break do to library issues like in the Two-Parameter Logistic Item Response Model.

Yes, what we’d really want to do is have people check in their raw
Rmd (with any necessary aux files) and have a global make script
that calls knitr on any files that have changed.  Then we can hook
in CI to ensure that the markdown files knit successfully and get
into a proper PR process.
But that’s also the problem — we’re at that precipice where going
forward would be a significant maintenance burden.  It would be
awesome, just not something we have time for at the moment.
Any volunteers?

On Jul 5, 2017, at 9:23 PM, aaronjg<EMAIL_ADDRESS>wrote:
This pull request doesn't seem like that much more work since it is now just one file + one accompanying directory. Adding new case studies could be done by just dropping them into the directory. Then again, I'm just using the website and not dealing with maintaining it
If you go to having a separate repo and with the case study source and ability to compile them all, then it is more work to maintain, on the plus side the user can easily find all the data needed to run the examples, and you can easily identify when case studies break do to library issues like in the Two-Parameter Logistic Item Response Model http://mc-stan.org/users/documentation/case-studies/tutorial_twopl.html.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/stan-dev/stan-dev.github.io/pull/44#issuecomment-313269574, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdNltSiPTNw-l2jWuS6i30mCEqWKk2jks5sLDcHgaJpZM4OIo2N.

spring cleaning - is this still relevant or should it be closed?

Fine with me to either merge or reject. Changes proposed by @betanalpha will be too much work so if required to merge, better to just keep as is.


Added cellFormat to provide a way to modify the cell.

This is a simple interface to provide a way to modify the cell. Since I need a function like a cellEvent but found rowEvents only (I am using the selectRow with checkbox mode, but don't like to take action on click the cells of checkbox column.).

@qholi are you looking for https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnformatter-function ?
I feel your PR is same as column.formatter


readme update

Codecov Report

Merging #147 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #147   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           6      6
  Lines         258    258
  Branches       46     46
=====================================
  Hits          258    258

Continue to review full report at Codecov.

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

:tada: This PR is included in version 1.6.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Got empty results when use example

I ran the code, but sometimes I just got None.
from duckduckgo_search import ddg

keywords = 'Bella Ciao'
results = ddg(keywords, region='wt-wt', safesearch='Off', time='y')
print(results)

It happens sometimes.
duckduckgo.com can block your ip for a few seconds if you send requests too often.
In this case, you will get None.
Just repeat the request.

Got it. Thanks!

It goes something like this:

If the result is empty, it will return []
If there is an error, it will return None

If the result is empty, it will return []

If there is an error, it will return None

Doesnt look like it:
https://github.com/deedy5/duckduckgo_search/blob/a68b64a00b45e4ac0f955495f370ff9560a98693/duckduckgo_search/ddg.py#L47-L49
Here you state that the exception is just ignored and an empty list is returned
i.e. in both cases we get []

This package configured to run in single-threaded sequential mode.
Do not run in multi-threaded mode to avoid errors !!!

If you send queries with the parameter page=1, 2, 3, 4, etc., the api will return results infinitely.
The results will just repeat in random order.
Therefore, to get all results (in this case ddg will return maximum 200 results) parameter max_results is added.
In this case queries are sent to the api in multithreading mode (to speed up) and checked through the cache, to remove duplicates and not to make unnecessary queries.
But since api can sometimes return empty answer or error, for compatibility the request will return [] on error.
This is a peculiarity of implementation.
I.e. this package is tuned to pull all results as fast as possible.
If you will not use max_results parameter, the api will return results from the first page (page=1).
And if you will do it in different threads then you will get errors, because api will block you.
The package will return None if there was an error when receiving the vqd, which clearly indicates that your ip is temporarily blocked.

@deedy5
example:
import duckduckgo_search
a=True
i=0
while a:
    a=duckduckgo_search.ddg('"test test"')
    print(f"{i} {len(a)}")
    i+=1

out
0 29
1 29
2 29
3 29
4 29
5 29
6 29
7 28
8 29
9 29
10 29
11 29
12 29
13 29
14 29
15 29
16 29
17 28
18 28
19 28
20 28
21 28
22 29
23 28
24 0

obviously in 24 the request was blocked, but there is no way of knowing that because the result is just an empty list


Accessing context.extensionn throws proposed API exception.

Testing #119548
Not sure if it is expected. Was not mentioned in the test plan item.

Was this with the latest build? I thought I removed that check.

Build is:
Version: 1.55.0-insider (user setup)
Commit: 469e4f6e2755b220dae3eccb04d1ddc587b84a5a
Date: 2021-03-22T05:14:19.452Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19043

Works on latest.


Pack integer arithmetic comparisons in IntCmpRule

Closes #1342
Pack arithmetic expressions in IntCmpRule. Translate TLA+ arithmetic comparisons into a single SMT constraint, without introducing intermediate cells.
Uses the same logic for packing arithmetic expressions as #1541, which is refactored into a trait in 835e717.

Codecov Report

Merging #1545 (32eb65a) into unstable (3d20d07) will increase coverage by 0.01%.
The diff coverage is 96.42%.

:exclamation: Current head 32eb65a differs from pull request most recent head 8eae731. Consider uploading reports for the commit 8eae731 to get more accurate results

@@             Coverage Diff              @@
##           unstable    #1545      +/-   ##
============================================
+ Coverage     74.97%   74.99%   +0.01%
============================================
  Files           359      360       +1
  Lines         11514    11522       +8
  Branches        540      559      +19
============================================
+ Hits           8633     8641       +8
  Misses         2881     2881

Impacted Files
Coverage Δ

.../forsyte/apalache/tla/bmcmt/rules/IntCmpRule.scala
82.35% <90.00%> (+5.88%)
:arrow_up:

...a/at/forsyte/apalache/tla/bmcmt/rules/EqRule.scala
92.00% <100.00%> (+3.76%)
:arrow_up:

...syte/apalache/tla/bmcmt/rules/IntArithPacker.scala
100.00% <100.00%> (ø)

...orsyte/apalache/tla/bmcmt/rules/IntArithRule.scala
85.71% <100.00%> (-5.60%)
:arrow_down:

...he/io/annotations/parser/CommentPreprocessor.scala
95.60% <0.00%> (-1.10%)
:arrow_down:

Continue to review full report at Codecov.

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


binary: Improve error-handling behavior (#283)

I did end up splitting https://github.com/exercism/xgo/pull/361/commits/bd156a4b2958e13212480d9755b5bb50b3abd5be into a separate commit but kept the testVersion check.
Thanks!

Don't forget to close issue.

Ah right.
You could put "Closes #283" into commit message next time to help me with that


Error while installing cloudflare/cloudflare v4.49.0: checksum list has unexpected SHA-256 hash

Confirmation

[X] This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
[X] I have searched the issue tracker and my issue isn't already found.
[X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version
terraform1.5.7
Affected resource(s)
All resources.
Terraform configuration files
terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 4.0"
    }
  }
}

resource "cloudflare_dns_record" "example" {
  zone_id = var.cloudflare_zone_id
  name    = "terraform"
  value   = "<IP_ADDRESS>"
  type    = "A"
  ttl     = 3600
}

Link to debug output
N/A
Panic output
No response
Expected output
No errors and for it to work.
Actual output
│ Error: Failed to install provider
│
│ Error while installing cloudflare/cloudflare v4.49.0: checksum list has
│ unexpected SHA-256 hash
│ 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
│ 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)
Steps to reproduce

Update cloudflare version to 4.49.0
terraform init

Additional factoids
No response
References
I have to pin to the 4.48.0 version to temporary unblock on our end.
terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.48.0" #temporary pinning version for a workaround
    }
  }
}

I have the same issue. It happens with terraform and tofu when trying to install the 4.49.0 cloudflare provider.
I could replicate the issue with this simple main.tf:
terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.49.0"
    }
  }
}

Here is the DEBUG output:
terraform init                                             ─╯
2024-12-26T08:49:37.385+0100 [INFO]  Terraform version: 1.10.3
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.70.0
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.23.0
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/zclconf/go-cty v1.15.1-0.20241111215639-63279be090d7
2024-12-26T08:49:37.386+0100 [INFO]  Go runtime version: go1.23.3
2024-12-26T08:49:37.386+0100 [INFO]  CLI args: []string{"terraform", "init"}
2024-12-26T08:49:37.386+0100 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2024-12-26T08:49:37.386+0100 [DEBUG] File doesn't exist, but doesn't need to.
2024-12-26T08:49:37.460+0100 [DEBUG] checking for provisioner in "/usr/bin"
Initializing provider plugins...
- Finding cloudflare/cloudflare versions matching "4.49.0"...
2024-12-26T08:49:37.462+0100 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2024-12-26T08:49:37.947+0100 [DEBUG] GET https://registry.terraform.io/v1/providers/cloudflare/cloudflare/versions
2024-12-26T08:49:38.193+0100 [DEBUG] GET https://registry.terraform.io/v1/providers/cloudflare/cloudflare/4.49.0/download/linux/arm64
2024-12-26T08:49:38.413+0100 [DEBUG] GET https://github.com/cloudflare/terraform-provider-cloudflare/releases/download/v4.49.0/terraform-provider-cloudflare_4.49.0_SHA256SUMS
2024-12-26T08:49:39.344+0100 [DEBUG] GET https://github.com/cloudflare/terraform-provider-cloudflare/releases/download/v4.49.0/terraform-provider-cloudflare_4.49.0_SHA256SUMS.sig
- Installing cloudflare/cloudflare v4.49.0...
╷
│ Error: Failed to install provider
│
│ Error while installing cloudflare/cloudflare v4.49.0: checksum
│ list has unexpected SHA-256 hash
│ 689dc65b0eaf003eb8d55e7119c81abe466469ee7ad05a18ad4f72a87d81d000
│ (expected
│ 2f08c8243a0447814bda0678937f458c191bb9dad75818bacc485bed2896a1f9)
╵

Same Error, Checksum mismatch. All pipelines are failing, this is not any isolated event.
╷
│ Error: Failed to install provider
│
│ Error while installing cloudflare/cloudflare v4.49.0: checksum list has
│ unexpected SHA-256 hash
│ 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
│ 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)
╵
Error: Process completed with exit code 1.

Same error here. I also try older version starting 4.45 but same issue.
Blocking all CI provisioning plan

Same error here

same error here, temporary fixed it by fixing the version to 4.48.

same error, had to fix it to 4.48

Anyone have any solutions yet? This is a breaking issue for our team.

I find you how to by-pass this issue.
you need to find the last applied version to you infra.
In my case error were next
 Error: Failed to install provider

 Error while installing cloudflare/cloudflare v4.49.0: checksum list has
 unexpected SHA-256 hash
 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)

Last applied version were 4.48.0
cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.48.0"
    }

I set it into versions.tf and it start working for me.

I find you how to by-pass this issue. you need to find the last applied version to you infra. In my case error were next
 Error: Failed to install provider

 Error while installing cloudflare/cloudflare v4.49.0: checksum list has
 unexpected SHA-256 hash
 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)

Last applied version were 4.48.0
cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.48.0"
    }

I set it into versions.tf and it start working for me.

Yes -  Working workaround -  Thank you

Same here

same problem here!

Same here!

still no solution??

Same problem. Provider 4.49.0 released 13 hrs have incorrect checksum.

Friends... The solution is to pin your dependencies, it's in a comment above.  It was a bad release from under a day ago.  It'll be rolled back or fixed at some point coming up, but a reasonable solution is accessible and noted above.  You can update your required versions and that solves it.
If you commit your lock file as is standard best practice for all terraform this isn't an issue.
Let's be a little kinder to our colleagues at Cloudflare who were still working on shipping improvements on Christmas Day.

The solution is cloudflare fixing it with the correct SHA;tldr.

No need for the shoddy workarounds unless you absolutely need the new provider version. The solution is cloudflare fixing the release with the correct SHA;tldr.

The above mentioned should be the fix.

please don't spam issues with "me too" comments. the issue description describes how to add your vote to the issue if you're impacted or interested in it.
the checksum mismatch is due to the terraform registry receiving and caching an complete and failed build. the v4.49.0 release assets on GitHub are correct. already working with hashicorp to have it re-fetch the assets. failing that, i'll put out a no-op release to trigger the entire workflow again which may be easier given the holidays.
in the meantime, you can pin to a previous version to unblock yourself.


Generate the global word list from the source YAML file rather than having it hardcoded in Mixer

In Mixer, pkg/api/globalWordList.go contains the current global word list. This is a copy of a file in istio/api/mixer/v1/global_word_dictionary.yml. It'd be great to generate Mixer's go file directly from what's in istio/api/...

Rather than generate a go file from the yaml I'd rather see Mixer ingest the global dictionary as a yaml file directly. Eventually we'll want to handle serving with multiple versions to make it possible to roll out updates incrementally, so we're going to have to dump the hard coded version anyway.

Give the rules on how the dictionary must be updated (at the end only), I don't want to make this an easily edited YAML file. Not supplying or shortening the list could substantially reduce Mixer throughput too.
I'd rather have this baked in to code. I expect this to have a tremendously slow update frequency. We could in fact chose to never update the dictionary if we wanted to.

Some additional perspectives.
Updating the dictionary is a relatively rare thing. Having the dictionary in the binaries, rather than read from a config file or some sort, means that updating the dictionary involves updating binaries.
We will already have procedures in place for the operator to update our binaries. There will invariable be ordering dependencies that we will describe and perhaps validate. The operator will necessarily be involved in binary upgrades at some level or another. We will have to document and support the binary upgrade process.
If the dictionary were exposed as a distinct file, then it would be yet another thing that operators need to deal with it. It would have its own upgrade process, it's own docs, it's own validation mechanisms, etc. It would increase the load on operators.
So given the rare upgrades to the dictionary, I much rather hide the existence of the dictionary in the binaries and depend on binary rollout to deal with dictionary upgrades.
BTW, the model we've set up means that you upgrade Mixer first. Then you can upgrade all the clients lazily, as the Mixer automatically handles older dictionaries. Mixer will fail fast however if a client sends it requests using a newer (larger) dictionary than it has.
We could consider implementing a retry protocol in mixerclient such that a request fails due to the Mixer complaining it doesn't understand some words in the dictionary, mixerclient could automatically downgrade itself such that subsequent calls use a smaller dictionary.
@qiwzhang Do you think we should proceed to enhance mixerclient such that it can detect when its dictionary is too new and then backoff to a smaller dictionary for all future requests?

We could. But mixer has to reply with number of words it has.   client can only use min (all mixer replies).

I was thinking that in case of failure, mixerclient would fall back to the
V1 global dictionary which is the baseline. It would continue to use V1
until it is rebooted. So any failure to use a more modern dictionary would
immediately cause the client to degenerate to the original dictionary.
On Fri, Jun 9, 2017 at 12:55 PM, Wayne Zhang<EMAIL_ADDRESS>wrote:

We could. But mixer has to reply with number of words it has. client can
only use min (all mixer replies).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/istio/mixer/issues/811#issuecomment-307484789, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVucHdFkt5jeyaaDNncVDMgpluHhFbA2ks5sCaM3gaJpZM4N1oGp
.

V1 is the first version with 111 words?   Yes, we could do that.  just lost some compression.


compilation error in micronaut framework if default methods are being used on a mapper interface

I wanted to use custom mappings and failed to make my custom TypeConverter initialize from within the project, so I've decided to create an interface with default methods to do the custom mappings.
The following code results in a compilation error, if instantToZonedDateTime() is commented out, compilation finishes successfully.
@Konverter(options = [
  Konfig(key = ENFORCE_NOT_NULL, value = "true"),
  Konfig(key = KONVERTER_GENERATE_CLASS, value = "true"),
  Konfig(key = ADD_GENERATED_KONVERTER_ANNOTATION, value = "false"),
])
interface IAPMapper {
  fun instantToZonedDateTime(instant: Instant): ZonedDateTime {
    return instant
        .truncatedTo(ChronoUnit.MILLIS)
        .atZone(ZoneOffset.UTC)
  }
}

I'm not sure whether this is a micronaut or konvert ksp processor issue, full details are here: https://github.com/micronaut-projects/micronaut-core/issues/11058

I've managed to work around this with the following annotation on the entity class:
@KonvertTo(
    IAPDefinitionDto::class,
    mappings = [
      Mapping(target = "createdAt", expression = "it.createdAt!!.truncatedTo(java.time.temporal.ChronoUnit.MILLIS).atZone(java.time.ZoneOffset.UTC)"),
    ],
    options = [
      Konfig(key = ENFORCE_NOT_NULL, value = "true"),
      Konfig(key = ENABLE_CONVERTERS, value = "true")
    ],
    mapFunctionName = "toDto"
)

it works, but I generally don't like this approach on actual classes, I prefer to have entity mapping code in the same place.

Interesting finding, never had a problem like this. I did some research about the error (you probably did so, too) and stumbled upon this comment https://github.com/google/ksp/issues/427#issuecomment-906006403.
Not sure if this is a konvert issue, a KSP issue, a micronaut issue or a gradle issue. Feels like it could be anything :confused:
Regarding a custom TypeConverter: I know this is not yet documented well, but it should be pretty straightforward:

Create a gradle module using the build.gradle as an exemplary https://github.com/mcarleio/konvert/blob/main/converter/build.gradle.kts
Create your custom TypeConverter like this:

@AutoService(TypeConverter::class)
class InstantToZonedDateTimeConverter : AbstractTypeConverter() {

    override val enabledByDefault: Boolean = true

    private val sourceType: KSType by lazy {
        resolver.getClassDeclarationByName(Instant::class.qualifiedName!!)!!.asStarProjectedType()
    }

    private val targetType: KSType by lazy {
        resolver.getClassDeclarationByName(ZonedDateTime::class.qualifiedName!!)!!.asStarProjectedType()
    }

    override fun matches(source: KSType, target: KSType): Boolean {
        return handleNullable(source, target) { sourceNotNullable, targetNotNullable ->
            sourceType.isAssignableFrom(sourceNotNullable) && targetType == targetNotNullable
        }
    }

    override fun convert(fieldName: String, source: KSType, target: KSType): CodeBlock {
        val sourceNullable = source.isNullable()
        val nc = if (sourceNullable) "?" else ""

        return CodeBlock.of("$fieldName$nc.truncatedTo(%T.MILLIS)$nc.atZone(%T.UTC)", ChronoUnit::class, ZoneOffset::class)
    }

}

In your project where you want to use the TypeConverter, add the newly generated module as a KSP dependency ksp(project(":custom-type-converter")) (next to the konvert one).

Afterwards you can delete the function instantToZonedDateTime.
Tip: If you want to set your konvert configurations globally, you can further amend your build.gradle and define them like this (see e.g. https://github.com/mcarleio/konvert/blob/main/example/build.gradle.kts#L52):
ksp {
    arg("konvert.enforce-not-null", "true")
    arg("konvert.konverter.generate-class", "true")
    arg("konvert.add-generated-konverter-annotation", "false")
}

I'll create a reproducer and share it on gh.
Thanks for a great feedback, I was suspecting whether type converter should be in it's own jar, and well, you've confirmed it.

FYI, the issue is gone on micronaut 4.7.x, see my comment here: https://github.com/micronaut-projects/micronaut-core/issues/11058#issuecomment-2503858266
thanks!


Resolve local titles

Looks neater now. I also clarified usage of the conf options.
The only problem I'm encountering is mpv stuttering ever so briefly when 10+ local files are loaded at the same. Very minor issue but is there a way to slow down or segment the resolve_local_titles function?

The only problem I'm encountering is mpv stuttering ever so briefly when 10+ local files are loaded at the same. Very minor issue but is there a way to slow down or segment the resolve_local_titles function?

Yes it's worth setting a limit on the number of asynchronous operations running at once. Not just for performance reasons, mpv has a limit on how many asynchronous operations can be running at once (I believe 1000 is the ceiling), so the current code will potentially crash on very long playlists. This is the case for the current url titles code as well.

is there a way to slow down or segment the resolve_local_titles function?

My first thought is something like having a stack of files to be resolved, then in a periodic timer popping items to be resolved.
We could consider it out of scope for this PR and open another issue about it.

We could consider it out of scope for this PR and open another issue about it.

Sounds good. I wouldn't know how to implement it properly.

Works nicely for me! Thanks for the PR.
I'll work on the throttling today.

I added throttling to master.
Let me know if it works & helps with your stutters.

Awesome! It helps a little bit... definitely worth having an option for it.
I'm testing loading a playlist of ~25 items, all with titles in the metadata:
=1 gives no stutters but slow
=2-7 gives small audio clicks every time the stack goes through
=8+ gives audio and video stutters every time the stack goes through but set it =20+ and it gets done quick with just one big stutter
not sure which one I'd prefer... :rofl:
If I wanted to eliminate stutters completely I'd probably just need better hardware right?

Currently it's slow to resolve with 1 stack size because it only looks at the stack every 0.5 seconds. If it either looked more often or looked immediately after finishing previous resolve then it would be faster to resolve and I assume with no stutters.
Can you try with something like 0.1 or 0.05 second intervals in the title_fetch_timer

Can you try with something like 0.1 or 0.05 second intervals in the title_fetch_timer with an ongoing_request_count of 1.

When concurrent_title_resolve_limit=1, If I lower title_fetch_timer, resolving is very fast and without stutters. If  I change ongoing_request_count=1 titles don't resolve at all(?)
The problem with using concurrent_title_resolve_limit=1 is that url resolving becomes incredibly slow even if title_fetch_timer and ongoing_request_count are changed.
Using  ongoing_request_count=1 and title_fetch_timer=0.05 with concurrent_title_resolve_limit=10 suprisingly reduces stuttering and obviously resolves titles faster.

Is the stutter also a problem with url title resolving for you?

Stutters start around concurrent_title_resolve_limit=15 when resolving urls. Doesn't seem necessary to set the number that high anyway. No issues with =10 or below.
Using ongoing_request_count=1 and a lower title_fetch_timer=0.05 improves url resolving speed with large playlists as well.
Also I think  '--no-config' should be added to the ytdl args. Saves it downloading extra data like sponsorblock segments if they are set as default in the config.

Thanks for testing. Sorry I made a mistake, ongoing_request_count is not supposed to be modified, that's why you see weird behavior when changing it. I meant concurrent_title_resolve_limit.

title_fetch_timer=0.05 with concurrent_title_resolve_limit=10 suprisingly reduces stuttering

Quite surprising indeed 🤔
On my machine the ffprobe finishes in less than a millisecond. The stutters are perhaps caused by opening and reading the stdout of the subprocesses all at once rather than the process itself. It would be interesting to try if the same process could be used to probe multiple files.
With urls batching with 10 ongoing requests by default seems reasonable since they will take variable length and longer in general.
I made a change to separate ffprobe and url batching logic. I left url ones configurable with timeout and batch size. I hardcoded the title_fetch_timer to some small value like 0.1, since the callback should be cheap. If the stack is empty I stop the timer until new items are pushed.
I changed Ffprobe to fetch 1 by 1 where next one is fetched immediately of the previous one finishing. This will probably be super fast and unnoticeable if there is no stutters.
If it still has stutters that might be helped by delaying the next resolve by some milliseconds. You could test it by changing line 1271 to:
mp.add_timeout(0.05, local_fetching_throttler)

I made a change to separate ffprobe and url batching logic.

This was definitely the right way to go. There's no stutters or frame drops now and both local and url resolving is super quick.
eg. 300 local audio files in 13 seconds and url playlist of 200 files in 20 secs with concurrent_title_resolve_limit=10.
Great work! :+1:


RPToken: Hash calculation handles negatives incorrectly

MD5 hash returns bytes in big endian whilst BigInteger requires little endian
Cassandra & other drivers use ABS for negative values rather than the padding that was implemented in 1984ebcc984169b98a2ea8c26e046d6a56dad843
As requested; change to 2.1 and PR against it!
Related to: https://datastax-oss.atlassian.net/browse/CSHARP-253

@jorgebay adding tests for this is a little more problematic than I'd like, unfortunately the visibility makes it a little awkward, however the test cases attached to CSHARP-253 will all pass.

No problem, we will add them.


Async daemon can lose events in a highly concurrent scenario

This is detailed description of the Async daemon algorithm issue that I described to @oskardudycz  some time ago.  Sorry for the delay.
In short, when multiple threads are writing to the same event store, it's highly unlikely but possible for the daemon to loose some of these events.
Problem
Async deamon, of specifically, fetcher, uses polling based on sequences of the events.
Fetcher sends 4 quieries on each iteration:

selects sequences of the next page starting from _lastEncountered,
then events itself within this page,
and then the next sequence number and last known sequences in the event store.

Postgres sequence are unaware of ongoing transactions. So it's possible when multiple threads or processes are writing to the same database, that some of the events will be persisted out of order with respect to theirs sequence numbers.
For example thread A starts writing one huge event EventA with sequence == 100, and while it's writing thread 2 writes tiny EventB with sequence == 101, and only after that EventA finishes writing.
As a result, EventB with larger sequence value gets written before EventA with small Sequence value.
Fetcher is mostly aware of this behavior, so when reading the next page it checks page for gaps in it. If any - page gets re-read
So far so good.
After the whole page has been read from the event store fetcher reads sequence number of next event that has matching type.
At the end, fetcher queue's page for processing and saves NextKnownSequence - 1 as _lastEncountered. Code:
fetcher, page
The problem occurs when fetcher has read NextKnownSequence and another thread after that finishes writing event with sequence number that is greater than last page End but smaller than NextKnownSequence. As a result this event gets skipped.
So there no gaps in event pages but gaps a possible between pages.
Repro
It can be reproduced by running multiple threads start daemon that saves processes sequences https://gist.github.com/jacobpovar/7c479de175a32afaa3d3b99d6f02f9cf.
In my setup it doesn't occur every time, but when run multiple times misses will most likely happen.

**From: 12000, to: 12084, next 12102
From: 12101, to: 12201, next 12202**
From: 12201, to: 12301, next 12302
From: 12301, to: 12401, next 12402
From: 12401, to: 12501, next 12502
From: 12501, to: 12601, next 12602
....

and if we look into the database we can see that event 12102 has smaller timestamp and probably was written before preceding events.

Possible solution
A possible and simplest solution would by to start fetching next page just after the current, without querying for the NextKnownSequence. Daemon's performance would drop slightly however. And there is no much sense in doing that if daemon is reading historical events. Such thorough check is only worth it if daemon is up to date with the event store end. This is what we implemented at my work.

@jacobpovar I think this code is basically getting re-written almost from scratch in v4, but in your case, did you try to increase the "leading edge buffer"? That makes the async daemon purposely ignore events that are too new to allow the missing sequences to get filled in before it proceeds.

@jeremydmiller haven't tried it but increasing leading edge buffer should help, thanks.

@jeremydmiller haven't tried it but increasing leading edge buffer should help, thanks.

Shutting this down since it's rewritten in v4

Sorry for resurrecting the topic. But I've an idea for possible solution. Described it here: Events loss in Marten.Events.Projections.Async.Fetcher under load #1879.

@jacobpovar could you check version 3.13.5? It should have the fix from #1879.
See more in: https://github.com/JasperFx/marten/releases/tag/3.13.5.
I'm closing the issue, if you're still facing the issue, I'll reopen it.


Maximize, fullscreen, and position flags

I would like to have Nvy maximized on start, but the --maximize flag makes it fullscreen, so I changed --maximize to maximize, and added --fullscreen for fullscreen. I also added --position flag for #65.
This will change how the maximize flag previously worked, and perhaps the position flag could merge with the geometry flag like nvim-qt e.g. --geometry=<width>x<height>+<x>+<y> (though I prefer the position flag), so I'd like to hear some inputs.

Thanks for the contribution and sorry for the slow merge.


Consider expanding the checksum examples to work with #[derive(PartialEq, Debug)]

I come here from the land of Serde, not realizing Serde doesn't seem to work well at all (from my very newbie Rust understanding) for structs being being SERDES'd into actual raw binary data. This library looks fantastic, especially being able to integrate custom logic in the serialization and deserialization (checksums, versions, magic bytes, etc), but I am getting lost with an error as I am expanding the checksum logic.
I have this minimal example;=, which as-is compiles fine;
#[binwrite]
#[binread]
#[brw(little, magic = b"Foo")]
#[br(stream = r, map_stream = csum_wrapper_r)]
#[bw(stream = w, map_stream = csum_wrapper_w)]
pub struct Foo {
    member0: u8,
    member1: u8,

    #[derivative(PartialEq="ignore")]
    #[bw(calc = 1)]
    #[br(temp, assert(csum == 1, "bad checksum, got:{}", csum))]
    csum : u8
}

#[cfg(test)]
mod tests {
    use binrw::{binread, BinRead, BinWrite, binwrite};
    use std::io::Cursor;
    use super::Foo;

#[test]
    fn header_serdes() {
        let f = Foo {
            member0: 1,
            member1: 2
        };
        let mut cursor = Cursor::new(Vec::new());
        f.write(&mut cursor).unwrap();

        cursor.set_position(0);

        let f_readback = Foo::read(&mut cursor).expect("aa");
        // assert_eq!(f, f_readback);
    }
}

Now lets try to un-comment the assert_eq line in the test, but turns out we need the comparison and display traits, cool, so lets add them, giving us this;
#[derive(PartialEq, Debug)]
#[binwrite]
#[binread]
#[brw(little, magic = b"Foo")]
#[br(stream = r, map_stream = csum_wrapper_r)]
#[bw(stream = w, map_stream = csum_wrapper_w)]
pub struct Foo {
    member0: u8,
    member1:u8,

    #[derivative(PartialEq="ignore")]
    #[bw(calc = 1)]
    #[br(temp, assert(csum == 1, "bad checksum, got:{}", csum))]
    csum : u8
}

#[cfg(test)]
mod tests {
    use binrw::{binread, BinRead, BinWrite, binwrite};
    use std::io::Cursor;
    use super::Foo;

#[test]
    fn header_serdes() {
        let f = Foo {
            member0: 1,
            member1: 2
        };
        let mut cursor = Cursor::new(Vec::new());
        f.write(&mut cursor).unwrap();

        cursor.set_position(0);

        let f_readback = Foo::read(&mut cursor).expect("aa");
        assert_eq!(f, f_readback);
    }
}

which now sadly gives me the following error;
error[E0609]: no field `csum` on type `&Foo`
  --> Store/src/simple_demo.rs:37:5
   |
37 |     csum : u8
   |     ^^^^ unknown field
   |
   = note: available fields are: `member0`, `member1`

So I assume this is because the partialeq and debug derivations interact with #br(temp, ...) in an unexpected order. I tried "hiding" the csum member of the struct using the https://crates.io/crates/derivative crate, but sadly no dice.
Am I just being obtuse and missing something obvious from the docs, or this related to issue #88? Is there a workaround which can be used beyond having to manually create the impl's needed for PartialEq and Debug? I am worried needing to manually impl them as that means all other potential derives would also need to be hand rolled (for example if I want to use it with some json or similar crates.

This sounds like a macro evaluation order issue. Ret moving the #[derive(...)] underneath the binrw directives (which, when using both, can be replaced with #[binrw])
If I'm correct, what's happening is that the derive macros are running first with the original struct definition, including the temporary fields. Then the binrw attribute macros run, which remove the temporary fields. This leaves the derive output referencing fields that no longer exist.
By moving the binrw attribute macro(s) before the derive, you make that the outermost macro which runs first, which lets the derive macros run after the temporary field has been removed.

Thank you so much for your help, I am still getting used to macro evaluation in rust so that explanation is exactly what I needed in the end.
To help others in the future and if they come here via google or similar, here is a full minimal example based on the map stream example from the fantastic docs of this project, the above explanation, and some further tinkering I did. This is what I am basing my other structs of in my project, which has a magic sequence of bytes at the start, then two simple variables, and a checksum at the end.
First up is the use's and something which can be used for the map_stream attribute. It handles hashing the contents while also ensuring we don't attempt to use the checksum itself to read the checksum.
use std::hash::Hasher;
use std::io::{Read, Seek, SeekFrom, Write};
use binrw::binrw;
use xxhash_rust::xxh3::Xxh3;
use crate::meta_types::ChunkHash;

struct Checksumer<T> {
    inner: T,
    hash: Xxh3,
    current_position: usize
}
impl<T> Checksumer<T> {
    const HARDCODE_MAGIC: [u8; 3] = *b"Foo";
    const HARDCODE_HASH_OFFSET: usize = Self::HARDCODE_MAGIC.len() + 2;
}

impl<T: Seek> Checksumer<T> {
    fn new(inner: T) -> Self {
        let mut h_tmp = Xxh3::new();
        h_tmp.write(&Self::HARDCODE_MAGIC);
        Self {
            inner,
            hash: h_tmp,
            current_position: 0
        }
    }

    fn finalize_hash(&self) -> ChunkHash {
        ChunkHash::from_u128(self.hash.digest128())
    }
}

impl<T: Read> Read for Checksumer<T> {
    fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
        let rc = self.inner.read(buf);
        if self.current_position < Self::HARDCODE_HASH_OFFSET {
            self.hash.write(buf);
        }
        self.current_position += buf.len();
        rc
    }
}

impl<T: Seek> Seek for Checksumer<T> {
    fn seek(&mut self, pos: SeekFrom) -> std::io::Result<u64> {
        let rc = self.inner.seek(pos)?;
        self.current_position = self.inner.stream_position()? as usize;
        Ok(rc)
    }
}

impl<T: Write> Write for Checksumer<T> {
    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
        self.hash.write(buf);
        self.current_position += buf.len();
        self.inner.write(buf)
    }

    fn flush(&mut self) -> std::io::Result<()> { self.inner.flush()}
}

Next up is the struct itself we care about.
#[binrw]
#[derive(PartialEq, Debug)]
#[brw(
    little,
    magic = b"Foo",
    stream = r, map_stream = Checksumer::new
)]
pub struct Foo {
    member0: u8,
    member1: u8,

    #[br(
        temp,
        assert(
            checksum == r.finalize_hash(),
            "bad checksum: read:{:x?} != calculated:{:x?}", checksum, r.finalize_hash()
        )
    )]
    #[bw(calc(r.finalize_hash()))]
    checksum : ChunkHash
}

And lastly, a few tests to confirm the above works.
#[cfg(test)]
mod tests {
    use binrw::{BinRead, BinWrite};
    use xxhash_rust::const_xxh3::xxh3_128;
    use std::io::{Cursor, Seek};
    use super::Foo;

    #[test]
    fn raw_compare(){
        let v_raw_refrence = [
            b"F"[0], b"o"[0], b"o"[0],
            0xDE,
            0xAD,
            0x0B, 0x2B, 0xC3, 0x40, 0xFE, 0x30, 0x3E, 0x74,
            0x98, 0xE2, 0x61, 0x40, 0x93, 0xA1, 0xA7, 0xFB
        ];
        assert_eq!(v_raw_refrence.len(), 3 + 1 + 1 + 16);
        assert_eq!(v_raw_refrence[..3], [0x46, 0x6F, 0x6F]);
        assert_eq!(v_raw_refrence[..5], [0x46, 0x6F, 0x6F, 0xDE, 0xAD]);

        // Check the hashes match
        assert_eq!(v_raw_refrence[5..], [
            0x0B, 0x2B, 0xC3, 0x40, 0xFE, 0x30, 0x3E, 0x74,
            0x98, 0xE2, 0x61, 0x40, 0x93, 0xA1, 0xA7, 0xFB
        ]);
        assert_eq!(xxh3_128(&v_raw_refrence[..5]).to_be_bytes(), v_raw_refrence[5..]);

        // Check the serialization produces the expected binary blob, including
        // the checksum!
        let f_raw = Foo {
            member0: 0xDE,
            member1: 0xAD
        };
        let mut cursor = Cursor::new(Vec::new());
        f_raw.write(&mut cursor).unwrap();
        assert_eq!(cursor.clone().into_inner(), v_raw_refrence);

        // Deserialize the data and verify it matches.
        cursor.seek(std::io::SeekFrom::Start(0)).unwrap();
        let f_raw_readback = Foo::read(&mut cursor);
        assert_eq!(f_raw_readback.unwrap(), f_raw);
    }
}

All of the snippets above are released in public domain.

I remember seeing in other github issues you saying that you intentionally had some of the documents written to be more of a guide than something which can be copy pasted, so I posted what I found was needed to "fill in the gaps" in the map_stream example of the docs. If you like, I can issue a pull request to the docs, based on the snippet above. If you would prefer to avoid doing that, please feel free to close this issue as resolved.
Thank you again for your help, writing this library, and maintaining this library to this day.


[CLI]: InvalidArtifact raises an ArtifactNotLoggedError infinite loop

Describe the bug

When I enabled WANDB_WATCH=all in my Pytorch/Transformers training loop (Seems to be unrelated to watch) I got a Recursion Limit Exception maximum recursion depth exceeded while calling a Python object. The call stack indicates that this is caused by InvalidArtifact, which raises an exception (ArtifactNotLoggedError) on attribute access, and when creating that exception, accesses its own attribute.
class InvalidArtifact:
    """An "artifact" that raises an error when any properties are accessed."""

    def __init__(self, base_artifact: "ArtifactInterface"):
        super().__setattr__("base_artifact", base_artifact)

    def __getattr__(self, __name: str) -> Any:
        raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)
    #                                              ^-- Infinite recursion occurs here.
    def __setattr__(self, __name: str, __value: Any) -> None:
        raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)

    def __bool__(self) -> bool:
        return False

│ anaconda3/envs/my-env/lib/python3.10/site-packages/wandb/sdk/artifacts/invalid_a │
│ rtifact.py:17 in __getattr__                                                                     │
│                                                                                │
│   14 │   │   super().__setattr__("base_artifact", base_artifact)                                 │
│   15 │                                                                                │
│   16 │   def __getattr__(self, __name: str) -> Any:                                              │
│ ❱ 17 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│   18 │                                                                                │
│   19 │   def __setattr__(self, __name: str, __value: Any) -> None:                               │
│   20 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│                                                                                │
│ anaconda3/envs/my-env/lib/python3.10/site-packages/wandb/sdk/artifacts/invalid_a │
│ rtifact.py:17 in __getattr__                                                                     │
│                                                                                │
│   14 │   │   super().__setattr__("base_artifact", base_artifact)                                 │
│   15 │                                                                                │
│   16 │   def __getattr__(self, __name: str) -> Any:                                              │
│ ❱ 17 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│   18 │                                                                                │
│   19 │   def __setattr__(self, __name: str, __value: Any) -> None:                               │
│   20 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│                                                                                │
│ anaconda3/envs/my-env/lib/python3.10/site-packages/wandb/sdk/artifacts/invalid_a │
│ rtifact.py:17 in __getattr__                                                                     │
│                                                                                │
│   14 │   │   super().__setattr__("base_artifact", base_artifact)                                 │
│   15 │                                                                                │
│   16 │   def __getattr__(self, __name: str) -> Any:                                              │
│ ❱ 17 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│   18 │                                                                                │
│   19 │   def __setattr__(self, __name: str, __value: Any) -> None:                               │
│   20 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│                                                                                │
│ anaconda3/envs/my-env/lib/python3.10/site-packages/wandb/sdk/artifacts/invalid_a │
│ rtifact.py:17 in __getattr__                                                                     │
│                                                                                │
│   14 │   │   super().__setattr__("base_artifact", base_artifact)                                 │
│   15 │                                                                                │
│   16 │   def __getattr__(self, __name: str) -> Any:                                              │
│ ❱ 17 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)              │
│   18 │                                                                                │
│   19 │   def __setattr__(self, __name: str, __value: Any) -> None:                               │
│   20 │   │   raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name)

I have not provided a minimum example, because I don't yet know what is broken about my model to produce an InvalidArtifact in the first place. However, I feel reasonably confident that this is a bug and the InvalidArtifact type will always produce an infinite call loop.
Additional Files
No response
Environment
WandB version: 0.15.4
OS: Ubuntu 22.04
Python version: Python 3.10
Versions of relevant libraries:

accelerate==0.20.3
aiobotocore==2.5.0
aiohttp==3.8.4
aiohttp-retry==2.8.3
aioitertools==0.11.0
aiosignal==1.3.1
amqp==5.1.1
antlr4-python3-runtime==4.9.3
appdirs==1.4.4
async-timeout==4.0.2
asyncssh==2.13.1
atpublic==4.0
attrs==23.1.0
billiard==4.1.0
bitsandbytes==0.39.0
black==23.3.0
boto3==1.26.76
botocore==1.29.76
celery==5.3.0
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
colorama==0.4.6
configobj==5.0.8
datasets==2.12.0
dictdiffer==0.9.0
dill==0.3.6
diskcache==5.6.1
distro==1.8.0
docker-pycreds==0.4.0
dpath==2.1.6
dulwich==0.21.5
dvc==3.0.0
dvc-data==1.11.0
dvc-http==2.30.2
dvc-objects==0.23.0
dvc-render==0.5.3
dvc-s3==2.23.0
dvc-studio-client==0.10.0
dvc-task==0.3.0
fire==0.5.0
flatten-dict==0.4.2
flufl-lock==7.1.1
frozenlist==1.3.3
fsspec==2023.6.0
funcy==2.0
gitdb==4.0.10
gitpython==3.1.31
grandalf==0.8
huggingface-hub==0.15.1
hydra-core==1.3.2
iterative-telemetry==0.0.8
jmespath==1.0.1
joblib==1.2.0
kombu==5.3.0
loralib==0.1.1
markdown-it-py==3.0.0
mdurl==0.1.2
mpmath==1.2.1
multidict==6.0.4
multiprocess==0.70.14
mypy-extensions==1.0.0
nanotime==0.5.2
omegaconf==2.3.0
openai==0.27.8
orjson==3.9.1
packaging==23.1
pandas==2.0.2
pathspec==0.11.1
pathtools==0.1.2
git+https://github.com/huggingface/peft.git
platformdirs==3.5.3
progress==1.6
protobuf==4.23.2
psutil==5.9.5
pyarrow==12.0.1
pydot==1.4.2
pygit2==1.12.1
pygtrie==2.5.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2023.3
pyyaml==6.0
regex==2023.6.3
responses==0.18.0
rich==13.4.2
ruamel-yaml==0.17.31
ruamel-yaml-clib==0.2.7
s3fs==2023.6.0
s3transfer==0.6.1
safetensors==0.3.1
scikit-learn==1.2.2
scipy==1.10.1
scmrepo==1.0.3
sentencepiece==0.1.99
sentry-sdk==1.25.1
setproctitle==1.3.2
shortuuid==1.0.11
shtab==1.6.1
smmap==5.0.0
sqltrie==0.6.0
tabulate==0.9.0
termcolor==2.3.0
threadpoolctl==3.1.0
tiktoken==0.4.0
tokenize-rt==5.1.0
tokenizers==0.13.3
tomli==2.0.1
tomlkit==0.11.8
tqdm==4.65.0
transformers==4.30.2
tzdata==2023.3
vine==5.0.0
voluptuous==0.13.1
wandb==0.15.4
wrapt==1.15.0
xxhash==3.2.0
yarl==1.9.2
zc-lockfile==3.0.post1

Additional Context
No response

Hello @nevercast !
Could you send the debug logs for the run that is running into this error? They should be located in the wandb folder in the same directory as where the script was run. The wandb folder has folders formatted as run-DATETIME-ID associated with a single run. Could you retrieve the debug.log and debug-internal.log files from one of these folders specifically from the run that is having issues?

Raphael San Andres commented:
Hi, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

Sorry that I did not provide logs. It seems to me that a self.base_artifact access inside a __getattr__ call will always cause a recursion and could be fixed. I believe the correct approach would be to use __getattribute__ to get the base_artifact attribute.
If in future I encounter this again, I will provide logs. However, this seems almost certain to be a fault in wandb and would fail for any InvalidArtifact.

We are closing this issue due to inactivity. If you feel that it merits additional review, please provide a reproduction and add a comment explaining why. Thank you.


Start/end positions and count include entirely black images when the frame orientation is not coronal, sagittal or axial

If the image normal is not one of (1,0,0), (0,1,0), (0,0,1) or the negative thereof, then the calculation of the min/max frames is such that there are a number of extra frames at the beginning and end that cause the entire frame to be black.  Specifically, if the initial orientation is "acquisition", then first frame should be the start or end of the series normally.

Fixed in main


Cannot receive ACK

Hi, I've just compiled and installed the software on a NodeMCU board with a SX1276 radio. This same setup has been successfully used with the Lua 1CH gateway. With this implementation I cannot receive the ACK from the gateway. I setup a fixed SF12 on 868.1 MHz and enabled strict mode, but on console after receiving the uplink there is a loop of "TX:00" (from _stateMachine.ino) and no ACK is received.
Are downlinks working or is a work in progress?
rxPkt:: t=16:31:11, f=0, sf=12, a=0B0F0001, flags=50, addr=0, len=17
PKT_PULL_RESP:: received
sendPacket:: LoraDown filled
sendPacket:: fini OK
readUdp:: TX buff filled
PKT_TX_ACK:: tmst=580311948
TX:00
TX:00
TX:00
TX:00
TX:00
TX:00
TX:00
TX:00
TX:00
.......

Timely post.
I'm been using this code on a LoRaGo DOCK from Sandbox Electronics and I'm having the same issue with Downlink packets from The Things Network.
PKT_PULL_DATA request, len=<12> 1:78:D8:2:2C:3A:E8:FF:FF:45:F:FE:

S_RX:: no RXDONE or RXTOUT intr=0
PKT_PULL_RESP:: received
{"txpk":{"imme":false,"tmst":69802338,"freq":923.3,"rfch":0,"powe":20,"modu":"LORA","datr":"SF12BW500","codr":"4/5","ipol":true,"size":17,"ncrc":true,"data":"IPNvDaaFDZH1+EKDPZ4Pp5s="}}
<data: IPNvDaaFDZH1+EKDPZ4Pp5s=
sendPacket:: LoraDown filled
Request::  tmst=69802338 wait=885441
strict=0 datr=SF12BW500
freq=916800000 ->923300000
sf  =7 ->12 modu=LORA powe=20 codr=4/5
ipol=1
20:F3:6F:D:A6:85:D:91:F5:F8:42:83:3D:9E:F:A7:9B:
sendPacket:: fini OK
readUdp:: TX buff filled
PKT_TX_ACK:: tmst=68936722
PKT_PULL_RESP:: size 189 From <IP_ADDRESS>, port 1700, data: txpk...
PKT_PULL_ACK:: size 4 From <IP_ADDRESS>, port 1700, data: 1:78:D8:4:
TX:00
TX:00
TX:00
...
...
TX:00
TX:00
REINIT
S_RX:: no RXDONE or RXTOUT intr=0
Yesterday, I tried on a NodeMCU with SX1276 just to verify it hasn't the hardware. I'm checking 923.3MHz with a spectrum analyser and I don't see a peep from the device.
The code is interesting:

case S_TX:

  if (intr == 0x00) {

#if DUSB>=1
Serial.println(F("TX:00"));
writeRegister(REG_IRQ_FLAGS, (uint8_t) 0xFF);				// reset interrupt flags
_event=0;
return;
#endif
}
  // Sset state to transmit
  _state = S_TXDONE;
  writeRegister(REG_IRQ_FLAGS_MASK, (uint8_t) 0x00);
  writeRegister(REG_IRQ_FLAGS, (uint8_t) 0xFF);					// reset interrupt flags

	// Initiate the transmission of the buffer (in Interrupt space)
  // We react on ALL interrupts if we are in TX state.
  txLoraModem(
  	LoraDown.payLoad,
  	LoraDown.payLength,
  	LoraDown.tmst,
  	LoraDown.sfTx,
  	LoraDown.powe,
  	LoraDown.fff,
  	LoraDown.crc,
  	LoraDown.iiq
  );

I'm not sure about the placement of the return (seems to only be good for DSUB>=1). If I comment it out, I do see a peep on the spectrum analyser but the device locks up.
Let to work out how the interrupts/interrupt flags work.

Same for me with Brocaar's loraserver.io
If set DUSB 0 then gw locks immediately after 1st lora packet received.
If DUSB 1 - fills console log with "TX:00"
If debug level increased, log fills with:
S_RX:: no RXDONE, RXTOUT, HEADER:: I=  --  , F=0, SF=9, E=0, S=RX  , t=500261896
S_RX:: no RXDONE, RXTOUT, HEADER:: I=  --  , F=0, SF=9, E=0, S=RX  , t=500269009
S_RX:: no RXDONE, RXTOUT, HEADER:: I=  --  , F=0, SF=9, E=0, S=RX  , t=500276123
S_RX:: no RXDONE, RXTOUT, HEADER:: I=  --  , F=0, SF=9, E=0, S=RX  , t=500283236
S_RX:: no RXDONE, RXTOUT, HEADER:: I=  --  , F=0, SF=9, E=0, S=RX  , t=500290350
Packet receive seem to be working. After some time (once a day or so for me) gw locks up (ping works, but web page does not refresh).
Seems to me it started to happen after lora server update some time ago (did not catch the moment though).

Still occuring with the latest software version 5.2.0?
I try to make the state machine output as little as possible.
Maarten

Thanks Maarten.
I've just installed 5.2.0 on my LoRaGo Dock and can confirm downlink is still not working properly.

Maarten,
I moved back to v4 for now, it is more stable. I'm using sensors for receive only for a moment and do not see breaks in data receive flow (gw does not seem to lock and stop receive, like it was in v5)
On v5 _stateMachine.ino lines 778 to 783 - is this piece right? Cause setting DUSB to 0 would change if we write to register or not.
Reggie

Think you for your help. I tested myself, difficult enough since I have a dozen single channels, 2 normal gateways and there are some gateways in Apeldoorn. But found out I must have made a mistake along the line somewhere.
I made version 5.2.1 and it seems to work right now (_STRICT_1CH 0). I plan to download shortly, hope you have time to try.
Thanks,
Maarten
(Tested normal downlink messages oly, no OTAA yet but this might work too).

where is 5.2.1 ? @platenspeler

Like I said .. I plan to
I have uploaded an intitial version in 5.2.1. It seems to work for my sensor and gateway combination. Please let me know if it work for you.
Maarten

Marteen,
5.2.1 does not compile when DUSB=0
Error:
/arduinoSketch/lora/ESP/1ch_gw/ESP-1ch-Gateway-v5.0/ESP-sc-gway/_stateMachine.ino: In function 'void stateMachine()':
_stateMachine:139: error: expected primary-expression before '}' token
}
^
_stateMachine:139: error: expected ';' before '}' token
Compiles fine with DUSB=1.
Reggie

Thanks,
What version of 5.2.x are U using? Minde compiles fine with DUSB==0, so I like to understand whether we use same version and flag settings.
Maarten

I think I found it:: Empty #if statement and therefiore empty default: part of switch statement  is not OK for compiler

Yep, latest pull compiles ok.
Will try on gateway in evening.
Thank you!
Reggie

Please use latest version on github.


Adding a template to allow banner for an index page

Allow for banner when using a static index page with
:save_as: index.html
:template: index_page

Hi!
First of all, thanks for your pull request! I appreciate the contribution, but I cannot accept this PR at the moment. It's with heavy heart that I have decided that I can no longer maintain this theme due to lack of time and changing interests. To makes sure the theme lives on however and not goes to waste, I've donated it to the Pelican community. It can now be found in the official pelican-themes repository. I'd suggest you re-submit your pull request there.
Sorry for the inconvenience!


Alternative approach to Windows color initialization

Another approach to suppressing the unused variable warning is simply removing the unusued variable!
Of course the possibility exists that this introduced a different warning with Intel's compiler, so could @isaevil be so kind to test this branch and report back? ^^
GitHub Issues
Alternative to #559

This seems like a good improvement! Will merge it.
However, his PR also adds volatile in the DOCTEST_GLOBAL_NO_WARNINGS macro which is used in every test case so #559 is not completely solved.


I want to change the content of showsUserLocation marker callout.

I want to change the content of showsUserLocation marker callout, does anyone knows how to do it? Does this library expose any of API can let me do that?

I don't think there is any right now. The marker is managed by the Google package itself. Maybe try fetching user location and display your custom marker by hand. If you wanna track the movement just add a listener with watchPosition and update the marker position Docs here


Extend FieldPaths utility

In this PR we extend the FieldPaths utility by adding typeOfFieldAt(Class, FieldPath) -> Class method.

@armiol, PTAL.

@armiol, PTAL.

@dmdashenkov please do fix the build though.


[Feat. Req.] Add Keyboard Shortcuts for Running Tests and Refreshing

Feature Request 💡
Add some keyboard shortcuts to east running tests quickly.
Ctrl + T - All Tests
Crtl + Enter - Single Test
Crtl + W - Watch Mode
Just an idea

This is a good idea. We should do it.

Any update on this?

@Raathigesh, would you be ok with pulling in https://www.npmjs.com/package/react-hot-keys for this?

@jsmey I would go with https://github.com/greena13/react-hotkeys since it seems comparatively well documented? Am I missing something?

I don't have a preference. I can give this a try.

@jsmey Also, Thank you for all the contributions you are making recently. Appreciate the help very much.

@Raathigesh Your welcome. Majestic is a great app!
Here's a PR for the shortcut keys https://github.com/Raathigesh/majestic/pull/147

Issue resolved in newest build! Great work @jsmey

Released with 1.5.0 - https://github.com/Raathigesh/majestic/releases/tag/1.5.0


key sequence i j starts with non-prefix key i

Describe the bug
When trying to open emacs calendar dependent functions in org-mode, with shortcut C-c . for instance , calendar doesnt comes up front, and user receives the warning on the mini-buffer: "key sequence i j starts with non-prefix key i"
To Reproduce
Try to use calendar based functions in org-mode.
Expected behavior
Calendar should get properly displayed.
Desktop (please complete the following information):

OS: pop! os 20.04
Emacs Version 26.3
Org 20200622 (org repository)

I really don't have much special in my org config, pretty much stock packages installed and the fact that I run the "bleeding edge" org from their repository other than stock.
I also searched for i j  in my init.el file, nothing was found.
I fixed this for the time being by changing the i j key sequence inside org-journal.el to f j, recompiling it and locking the version with package-load-list variable.
Being an emacs noob, i believe there must be another way to fix that by managing prefix keybinding, but I chose the lazy path for now.

I can't reproduce it. Can you share your org-journal setup please. Also try it with just org-journal loaded  emacs -Q -l init.el. Also try it with org-plus-contrib from MELPA. Or the version which comes with emacs.

(define-key org-mode-map (kbd "C-c j") 'org-journal-new-entry)

(use-package org-journal
  :bind
  ("C-c f j" . org-journal-new-entry)
  :custom
  (org-journal-date-prefix "#+title: ")
  (org-journal-file-format "%Y-%m-%d.org")
  (org-journal-dir "~/Dropbox/OrgRoam/Journal/")
  (org-journal-date-format "%A, %d %B %Y"))

(defun org-journal-find-location ()
  ;; Open today's journal, but specify a non-nil prefix argument in order to
  ;; inhibit inserting the heading; org-capture will insert the heading.
  (org-journal-new-entry t)
  ;; Position point on the journal's top-level heading so that org-capture
  ;; will add the new entry as a child entry.
  (goto-char (point-min)))

I can confirm this only happened with version 20200622 (now 20200629) from the org repository. Using 9.3.6 from GNU ELPA did not trigger the issue, at least for me.

Thanks for verifying it. I'll try to pin down the issue with org-HEAD.

@OrcsBR I was not able to reproduce it with version release_9.3.7-660-g73e367. Must be some misconfiguration of Emacs on your side. I would stick with org-plus-contrib!
If you find out the cause and it comes out that org-journal has indeed a bug, feel free to reopen this issue.

@OrcsBR Should be fixed now!

thanks, it works for me!


Handle null collective in user.isAdminOfCollective

Fix https://sentry.io/organizations/open-collective/issues/3275588026
Consistent with what we do in isAdminOfCollectiveOrHost and other permissions helpers.

Ok for me. In which case would collective be null?

Ok for me. In which case would collective be null?

For this Sentry issue, it's an expense.collective (expense #71653) that has been deleted, not sure why & how but I've seen similar cases where we have a non-deleted expense on a deleted collective in the past.

@BenJam for expense 71653, this might have been a case of deletion script?

@znarf #462373 doesn't have its data.isBanned set to true, so it has not been banned using sql/ban-collectives.sql. What could be the other places, the bayesian script?

@znarf That sounds likely. Would be great to have a look at https://github.com/opencollective/opencollective/issues/2751 and see how we could unify with ban-collectives and merge-accounts to make sure we delete all related data.


Improve ESLint settings

After last night's meeting, I thought some tweaks to ESLint settings might be helpful. This unsolicited PR does the following:

Consolidate all settings in .eslintrc.json, moving the one setting in package.json there instead
Remove npx from package.json
Add a setting to detect the React version, to avoid a warning every time you lint
Fix some whitespace issues in .eslintrc.json

Please note that running npm run lint will now look at all JS files under src, which currently spits out lots of errors and warnings. The abundance of errors and warnings may seem like a problem now, but won't that be the best way soon, when we've tackled the basics of linting and formatting?
While I removed npx from package.json, it is still probably the best way to lint a single file from the command line:
npx eslint path/to/file.js
or, to see if ESLint can fix it for you:
npx eslint --fix path/to/file.js

It may not be a good idea to update ESLint, at least not without further discussion. That update might require an update to react-scripts v4. And updating react-scripts causes a crash due to a breaking change with their URL handling and the public folder. (It only impacts one image.)
This ripple effect of change could be overcome, but until we decide to change all of the required changes at once, I am removing the update to ESLint v7 and sticking with v6.

It may not be a good idea to update ESLint, at least not without further discussion. That update might require an update to react-scripts v4. And updating react-scripts causes a crash due to a breaking change with their URL handling and the public folder. (It only impacts one image.)
This ripple effect of change could be overcome, but until we decide to change all of the required changes at once, I am removing the update to ESLint v7 and sticking with v6.

This PR wasn't passing checks due to package-lock.json conflicts.
I added a commit to merge in the latest main on my local host. After updating the PR I then merged main on GitHub as GitHub prompted me to do. And now it passes.

This PR wasn't passing checks due to package-lock.json conflicts.
I added a commit to merge in the latest main on my local host. After updating the PR I then merged main on GitHub as GitHub prompted me to do. And now it passes.

This requires a fresh npm install including the eslint changes in the package.json file.

This requires a fresh npm install including the eslint changes in the package.json file.


[CraftAssist] Added support for customized mc agent spawn location

Description
As title says, now you can pass agent spawn location as an argument when start the agent.
Try something like:
python agents/craftassist/craftassist_agent.py --no_default_behavior --agent_debug_mode --spawn_location 5 70 9
Type of change
Please check the options that are relevant.

[ ] Bug fix (non-breaking change that fixes an issue)
[ ] Proposes a change (non-breaking change that isn't necessarily a bug)
[ ] Refactor
[x] New feature (non-breaking change that adds a new functionality)
[ ] Breaking change (fix or feature that would break some existing functionality downstream)
[ ] This is a unit test
[ ] Documentation only change
[ ] Datasets Release
[ ] Models Release

Type of requested review

[ ] I want a thorough review of the implementation.
[x] I want a high level review.
[ ] I want a deep design review.

Before and After
Before
Agent will always be spawned at a given location
After
You can specify where to spawn the agent
Testing
Tested locally and passed.
Checklist:

[x] I have performed manual end-to-end testing of the feature in my environment.
[ ] I have added Docstrings and comments to the code.
[ ] I have made changes to existing documentation where needed.
[ ] I have added tests that show that the PR is functional.
[ ] New and existing unit tests pass locally with my changes.
[ ] I have added relevant collaborators to review the PR before merge.
[ ] [Polymetis only] I ran on hardware (1) all scripts in tests/scripts, (2) asv benchmarks.

Codecov Report

Merging #1084 (5bc9051) into main (9e50a3a) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1084      +/-   ##
==========================================
- Coverage   33.98%   33.98%   -0.01%
==========================================
  Files         344      344
  Lines       33685    33686       +1
==========================================
  Hits        11448    11448
- Misses      22237    22238       +1

Impacted Files
Coverage Δ

agents/argument_parser.py
16.36% <0.00%> (-0.31%)
:arrow_down:

agents/craftassist/craftassist_agent.py
41.46% <0.00%> (ø)

That and I believe we need to remake the CAgent too right ?
What does agent_debug_mode enable ?

That and I believe we need to remake the CAgent too right ?

That's right, I updated the instructions to include this step, thanks!

What does agent_debug_mode enable ?

It's a mode where the agent fails gracefully instead of throwing errors and hangs. It's not related to this PR so I removed it to avoid confusion.


A hebrew translation for the README

A hebrew dijo i
Originally posted by @BarakBarz in https://github.com/microsoft/Web-Dev-For-Beginners/pull/1125

This issue report appears to be incomplete. I don't think anybody would object to translations of the project's readme file. If you'd like to supply a PR that includes one, we can review it.


Strange result from data_get for unicode extended characters.

I am reading a table which contains umlauts, and also Chinese characters and getting strange results back from the driver.
Original text: 汉字
Expected utf-8: <<230,177,137,229,173,151>>
Actual bytes read: <<195,166,194,177,194,137,195,165,194,173,194,151>>
Original text: äëïöü ñç
Expected utf-8: <<195,164,195,171,195,175,195,182,195,188,32,195,177,195,167>>
Actual bytes read:  <<195,131,194,164,195,131,194,171,195,131,194,175,195,131,194,182,195,131,194,188,32,195,131,194,177,195,131,194,167>>
Question is if my understanding of the encoding is correct or maybe I am missing a step, the returned bytes seems to be encoded twice? but I have my doubts this would be done by the driver so maybe some step is missing.

False alarm, data was inserted was invalid as there is a bug when getting default charset for the connection in dderl.
https://github.com/K2InformaticsGmbH/dderl/issues/603
Thanks @c-bik and @KarlKeiser for the support.


test: scenarios-feature_branch_happy_path (2024-03-06 22:20:45.296359+00:00)

automatic test cleanup


Included SharePoint info and updated examples

The word SharePoint was completely missing, leaving this topic impossible find if searching for SharePoint.
Added info about WSS and SharePoint, introducing the wording Windows SharePoint Service.
Modernized the Access example.
Added verified examples for SharePoint which are very hard to find.

Docs Build status updates of commit 27a3d99:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

api/Access.DoCmd.TransferDatabase.md
:bulb:Suggestion
View
Details

api/Access.DoCmd.TransferDatabase.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Another great fix. Thanks so much.


Learnnextjs.com is not working

Fails to open the page.

It's working fine on my end.

now had an outage this morning. That's the reason you couldn't reach the site. Thanks for notifying us @michalpetrov 🙌


Use collection id instead of name

Description of changes

Use Collection UUID everywhere we can instead of collection name
Private methods only, does not affect user-facing APIs
Prevents extra DB calls to look up the ID from the name (should improve perf)
Forward-compatible with enterprise architecture refactor
Fixes #138

Tagged as a draft because this does change the REST API, so I will need to update the Node client in tandem. However, the Python code is ready for review and merge.
Test plan
Unit and integration tests continue to pass without changes.
Documentation Changes
No user facing changes, no docs required.

@jeffchuber this PR now includes updated code for the JS client if you wouldn't mind taking a look 🙏
It's ready to merge as soon as it's reviewed and we feel like we have good enough test coverage to resume adding code.

Converting back to draft until I fix some inconsistencies caused by the rebase on the new main.

@HammadB Changes we discussed live yesterday are in place, should be ready to go.


Need more docs: What do I need to do to enable connectivity to monitoring metrics?

I'm building community s2i images for common runtimes I see in the field.   What do I need to do to Dockerfile/s2i files to enable connectivity to monitoring?   Also I'm under the assumption that the monitoring metrics I currently see in OSE is hawkular.

This really belongs as an openshift/origin issue, it's not an s2i question.
@jcantrill any doc you can point to for how to enable images to record metric data?

Are we referring here to monitoring application metrics?  These cards are identified for figuring out app metrics: https://trello.com/c/4rtRqsQS/192-5-r-d-application-level-metrics-hawkular, and https://trello.com/c/ZQTYWrCD/154-8-support-application-level-metrics-hawkular-evg
They have been in a holding pattern for a while now as we sort through various existing bugs.

I see....  it doesn't quite say how to do it.
how about heapster?    Can I assume that there will be some base container monitoring and I don't have to do that on the s2i/image layer?

@alberttwong The cards are there identify how to do applications metrics; ... the 'how' is still a work in progress.  I'm not certain what you are asking with regards to heapster.  As far as base monitoring, I imagine it will depend on the type of application but since this is still a work in progress, it is yet to be determined. @mwringe do you have any additional info you can add to this thread?

@alberttwong the origin-metrics setup will automatically monitor any containers deployed in the cluster, mainly this has to do with cpu and memory metrics (but there will be support for network metrics soon). This is what Heapster provides in terms of monitoring. Heapster should also be able to handle very low numbers of custom application metrics (eg 3-4) if you want to expose metrics that way.

housekeeping: can we close this and move it to an origin issue if there are still things to discuss?

Unless we get some more information about the issue, I think we should close this.

closing, @alberttwong please open an issue against https://github.com/openshift/origin if you need to discuss further.


Unable to identify debian wheezy

When using a small (reduced) debian wheezy installation, openvpn::server is unable to identify it
via openvpn::params.
This is due the lack of the lsb-release package (in a minimal/reduced installation the dependency chain for lsb-release can be huge):
Without the lsb package installed $::lsbdistid and $::lsbdistrelease facts are empty and eval will fail with the message: Not supported OS / Distribution: Debian

Which facts do you suggest to use instead of $::lsbdistid and $::lsbdistrelease? Which ones are available?

A combination of $::operatingsystem and $::operatingsystemrelease would be possible in that situation,
for example:
[..]
'Debian': { # Debian/Ubuntu
case $::operatingsystem {
'Debian': {
# Version > 8.0.0, jessie
if(versioncmp($operatingsystemrelease, '8.0') >= 0) {
[..]

I added this now in a branch called amazon-wheezy-small-support and opened a pull request #134. Could you test it?

by the way: shouldn't it be "8.0" instead of "8.0.0" in the Debian Jessie section ?
if(versioncmp($::lsbdistrelease, '8.0') >= 0) {

I had to change to 8.0 as there is no 8.0.x available yet and then puppet used the Wheezy section...

Thanks @peterbeck, I updated the branch. Do you mind checking it again?

Hi @luxflux - just tried the branch and it seems to work as expected. Thanks !

Thanks for testing @peterbeck, I need to resolve #44 first before merging.


[TorchBench] Performance Signal Detected

TorchBench CI has detected a performance signal.
Affected Tests:

eval-cuda-fp32:

attention_is_all_you_need_pytorch[dynamo-blade (latency)] 6.525 -> 5.898, +9.6092%
attention_is_all_you_need_pytorch[dynamo-disc (latency)] 5.521 -> 4.71, +14.6894%
hf_Bert[dynamo-blade (latency)] 7.911 -> 6.888, +12.9314%
hf_Bert[dynamo-disc (latency)] 8.191 -> 7.23, +11.7324%

eval-cuda-fp16:

attention_is_all_you_need_pytorch[dynamo-blade (latency)] 5.34 -> 4.504, +15.6554%
attention_is_all_you_need_pytorch[dynamo-disc (latency)] 3.537 -> 2.673, +24.4275%
hf_Bert[dynamo-blade (latency)] 4.444 -> 3.308, +25.5626%
hf_Bert[dynamo-disc (latency)] 4.507 -> 3.256, +27.7568%
resnet18[dynamo-blade (latency)] 1.013 -> 0.927, +8.4896%

detail data can be seen in oss://bladedisc-ci/TorchBench/gpu/partial/20230523-16
created by TorchBench CI automatically

Related to torch version changes, refer to https://github.com/alibaba/BladeDISC/pull/1150