Support media type versioning for request/response models

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
# see "Wanted Code" section

Description
Media type versioning is a recommended practice for versioning a RESTful API across the industry: Zalando recommends it, there are various articles that endorse it. And overall it seems like a very good and flexible solution for versioning APIs:

It allows versioning individual API endpoints when you need it.
Even better, you can version input and output schemas independently.
It allows the rollout of backward-incompatible changes in a backward compatible manner without bending the rules of RESTful API semantics, i.e. without the need to invent a new "object type" to put a new version of the endpoint on a separate URL.
It can be fully described with an OpenAPI schema, e.g. attached openapi.json.zip.

These articles I linked above further explain what I think "Media type versioning" means.
Other good descriptions about what I mean by "media type versioning" can be found here:

The Ultimate Solution to Versioning REST APIs: Content Negotiation
API Design: Media Type Versioning

Some of these pages describe only versioning the request or response object, but ideally both should be supported.
Wanted Solution

Ability to specify multiple request and response models tied to their respecful content types. (See Wanted Code.)
Correct generation of the OpenAPI schema based on that. (An example OpenAPI schema is attached to this issue.)
Parsing of a correct request model based on the request Content-Type.
A more streamlined access to the "Accept" header than inspecting Request.headers
Automatic setting of the response "Content-Type" header based on the model returned by path operation function.
The same validation of the returned model as what happens right now for unversioned endpoints.

With a little bit of your direction, I would be thrilled to make a contribution or create a supporting package for this behavior.
If this can be a supporting package, I need a little bit of guidance about how to intercept current flow of schema generation, request parsing and response validation from external code. I can use the code from InferringRouter in fastapi-utils to learn some of this, but any other high-level pointers would be greatly appreciated.
If you'd prefer contribution, then I would start from an overall discussion on how you see it done, with couple of references to source code.
Wanted Code
"""
Example implementation of the API versioning using media types.
"""

from fastapi import APIRouter, Body, HTTPException, Request
from pydantic import BaseModel, Field

class InputModelV1(BaseModel):
    "First version of input data"
    name: str = Field(description="Name")
    count: int = Field(description="Count")

class InputModelV2(BaseModel):
    "Second version of input data.
    first_name: str = Field(description="First name")
    last_name: str = Field(description="First name")
    amount: float = Field(description="Total amount")

class OutputModelV1(BaseModel):
    "First version of output data"
    id: int | None = Field(description="Id")
    owner: int | None = Field(description="Owner Id")

class OutputModelV2(BaseModel):
    "Secnod version of output data. Ids moved to strings, owner name supplied as well."
    id: str | None = Field(description="Id")
    owner_id: str | None = Field(description="Owner Id")
    owner_name: str | None = Field(description="Owner Name")

router = APIRouter()

@router.post(
    "/test",
    responses={
        200: {
            "content": {
                "application/json;my_output_model_v=1": {"model": OutputModelV1},
                "application/json;my_output_model_v=2": {"model": OutputModelV2},
            },
            "description": "Return versioned JSON based on either an Accept header or"
            "the version of the input model",
        }
    },
)
def versioned_endpoint_v1(
    req: Request,
    v1: InputModelV1
    | None = Body(None, media_type="application/json;my_input_model_v=1"),
    v2: InputModelV2
    | None = Body(None, media_type="application/json;my_input_model_v=2"),
) -> OutputModelV1 | OutputModelV2 | None:
    "Example endpoint versioned with media types"

    # this if block would ideally happen under the hood
    if v1:
        result = do_op_v1(v1)
    elif v2:
        result = do_op_v2(v2)
    else:
        raise HTTPException(status_code=415, detail="Unknown input version")

    # this check would ideally be more abstracted
    if req.headers.get("accept") == "application/json;my_output_model_v=1":
        return to_v1(result)
    elif req.headers.get("accept") == "application/json;my_output_model_v=2":
        return to_v2(result)
    else:
        # this wouldn't work like this, the output type should be checked before
        # running the operation
        raise HTTPException(status_code=406, detail="Unsupported output version")

Alternatives
Use URL slugs and different path operation functions for versioning.
Other alternatives like versioning based on query parameter or a custom header are not compatible with OpenAPI and would have the same issues with multiple models for request/response body.
Operating System
Windows
Operating System Details
This feature is OS-agnostic.
FastAPI Version
0.75.0
Python Version
3.10.2
Additional Context
Issue #3910 describes the "Response" part of what I describe in this issue.
Here's a screenshot of what the Swagger UI looks like for the example openapi.json.zip file I provided:

I undrestand that .zip files may be suspicious, here's the example OpenAPI schema that I provided as a file:
{
    "openapi": "3.0.2",
    "info": { "title": "Example API", "version": "0.1.1" },
    "paths": {
        "/versioning/test": {
            "post": {
                "tags": ["prototypes"],
                "summary": "Versioned Endpoint V1",
                "description": "Example endpoint versioned with media types",
                "operationId": "versioned_endpoint_v1_versioning_test_post",
                "requestBody": {
                    "content": {
                        "application/json;my_input_model_v=1": {
                            "schema": {
                                "$ref": "#/components/schemas/InputModelV1"
                            }
                        },
                        "application/json;my_input_model_v=2": {
                            "schema": {
                                "$ref": "#/components/schemas/InputModelV2"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return versioned JSON based on either an Accept header orthe version of the input model",
                        "content": {
                            "application/json;my_output_model_v=1": {
                                "schema": {
                                    "$ref": "#/components/schemas/OutputModelV1"
                                }
                            },
                            "application/json;my_output_model_v=2": {
                                "schema": {
                                    "$ref": "#/components/schemas/OutputModelV2"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "HTTPValidationError": {
                "title": "HTTPValidationError",
                "type": "object",
                "properties": {
                    "detail": {
                        "title": "Detail",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationError"
                        }
                    }
                }
            },
            "InputModelV1": {
                "title": "InputModelV1",
                "required": ["name", "count"],
                "type": "object",
                "properties": {
                    "name": {
                        "title": "Name",
                        "type": "string",
                        "description": "Name"
                    },
                    "count": {
                        "title": "Count",
                        "type": "integer",
                        "description": "Count"
                    }
                },
                "description": "First version of input data"
            },
            "InputModelV2": {
                "title": "InputModelV2",
                "required": ["first_name", "last_name", "amount"],
                "type": "object",
                "properties": {
                    "first_name": {
                        "title": "First Name",
                        "type": "string",
                        "description": "First name"
                    },
                    "last_name": {
                        "title": "Last Name",
                        "type": "string",
                        "description": "First name"
                    },
                    "amount": {
                        "title": "Amount",
                        "type": "number",
                        "description": "Total amount"
                    }
                },
                "description": "Second version of input data.
            },
            "OutputModelV1": {
                "title": "OutputModelV1",
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "integer",
                        "description": "Id"
                    },
                    "owner": {
                        "title": "Owner",
                        "type": "integer",
                        "description": "Owner Id"
                    }
                },
                "description": "First version of output data"
            },
            "OutputModelV2": {
                "title": "OutputModelV2",
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string",
                        "description": "Id"
                    },
                    "owner_id": {
                        "title": "Owner Id",
                        "type": "string",
                        "description": "Owner Id"
                    },
                    "owner_name": {
                        "title": "Owner Name",
                        "type": "string",
                        "description": "Owner Name"
                    }
                },
                "description": "Secnod version of output data. Ids moved to strings, owner name supplied as well."
            },
            "ValidationError": {
                "title": "ValidationError",
                "required": ["loc", "msg", "type"],
                "type": "object",
                "properties": {
                    "loc": {
                        "title": "Location",
                        "type": "array",
                        "items": { "type": "string" }
                    },
                    "msg": { "title": "Message", "type": "string" },
                    "type": { "title": "Error Type", "type": "string" }
                }
            }
        }
    }
}

I contributed PR #4727 that merges open-api descriptions for routes that overlap on path and method.
In the current version only the last operation description for each path and method is kept in the open-api spec.
This is a solution for the open api spec generation, while custom routes can solve the routing on Accept header part of this issue.

Hello, I was about to open a new Issue with the same request. I'm happy that other people are also seeking a solution for how to define model-per-media-type in responses.
Currently, FastAPI assumes that responses (and also requests) for a given status_code are always from a single media-type. However, in a lot of cases this doesn't reflect the reality. Even more, OpenAPI has great support for defining multiple media type with different schema per status-code, so it'd be great for FastAPI to support that in more streamlined way.
Although content-negotiation is closely tied to responses' media type, I don't perceive this as a big issue, because it's relatively easy to create content negotiation logic with dependencies and Accept header. However, documenting that in the OpenAPI spec is almost impossible (and especially if we want to structure the resulting document with $ref and components), because there aren't any such "hooks" provided by FastAPI.
I think a great first step towards better model type support would be to support "model" key in responses/content/media-type as in the suggested variant from @dmontagu:
responses={
        200: {
            "content": {
                "application/json;my_output_model_v=1": {"model": OutputModelV1},

PS -- I've also checked the MR from @plankthom but the suggested solution involves, IMO, a lot of path operation metadata duplication (descriptions, summaries, examples, etc) and it seems a bit error-prone, especially with various parameters defined in different functions while accumulated in a single openapi description. Additionally, it seems that merging is possible only if using add_api_route directly, won't be working with the standard get, put, etc decorators.
However, the idea to dispatch to functions based on expected "main" response seems nice!

I'm looking for something like this as well, IIUC this feature request is for a router to use multiple dispatch on routes that use the same path and method, right?


Generate UMD file

Hi! Thanks for this package. We just started using it at Eventbrite!
However, it just gets added to window object which is bad for module systems, especially use on the server in Node.
I was thinking about taking a crack at generating a UMD file that will work for AMD, CommonJS, as well as the current window global.
What do you think?

Sounds like a great a idea, if you submit a pull request I will merge it.

Perfect! Thanks!


A question about code

I can't find module named 'methods. protonet_ ours'

Cross Dataset and Cross_char What is a char dataset?
How is the CIFAR-100 dataset divided into base, val, and novel?


ISD-1723 Add redeploy docs

Add documentations to describe the jenkins charm redeployment process
Checklist

[x] The charm style guide was applied
[x] The contributing guide was applied
[x] The changes are compliant with ISD054 - Managing Charm Complexity
[x] The documentation is generated using src-docs
[x] The documentation for charmhub is updated.
[x] The PR is tagged with appropriate label (urgent, trivial, complex)

Force merging this since we've decided that since this is a docs PR, it's relatively safe to do so.


Cross-platform support

Replace rm and cp with the Node.js alternatives rimraf and cpy-cli to extend platform-support beyond GNU+Linux.

Done with commit 8b22250


Maps Regex with a bug

I was generating a regex for me to filter maps, i noticed that when i select "#% increased Monster Attack Speed" the regex starts to show every map, even though it does not have this modifier

It was matching Monster Pack Size.  I've updated the bad words and pushed a fix.
12173d76d0601505d12251bdd615d008a17aad3e


"used in with in-product pipelines"?

The sentence "Continuous integration and continuous delivery (CI/CD) platform such as Azure DevOps that allows you to automate your build, test, and deployment pipeline. Can also be used in with in-product pipelines." does not end very well, because it contains the phrase "used in with in-product pipelines".

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

ID: c38b14c5-3129-b593-0901-775bbfb2427a
Version Independent ID: c3624c25-4f2b-4bef-70a4-950533343332
Content: Application lifecycle management (ALM) with Microsoft Power Platform - Power Platform
Content Source: power-platform/alm/overview-alm.md
Service: power-platform
Sub-service: alm
GitHub Login: @shmcarth
Microsoft Alias: shmcarth

Thanks for your comment, @wildehelm. This issue has been assigned to the doc author for review.


are there any preprocessing to the input video clips?

Hi, great work and gave my lots of help ! However, I still need some help.
I am really not familiar with caffe2 and could not find out whether the caffe2 version IG65M model used any pre-processing to the input video clips or not.
In my experiment，I just simply normalized the pixel to [0,1]. but the performance didn't look very good  (about 92% on ucf101, with ig65m pretrained model, I did some finetune on ucf101, or the performance even worse)。 So I wonder if we need to do some specify pre-processing to the video clips like substract the means or somethings else ?
Thanks for your attention and kindly help :)

Yeap, check the extract tool
https://github.com/moabitcoin/ig65m-pytorch/blob/fc749e2ee354c3e4ddbb144cf511bb868b008f61/ig65m/cli/extract.py#L64

@daniel-j-h  Thanks sooooo much for your rapid reply :) have a nice day

You too! :hugs:

@daniel-j-h Hi daniel, sorry for bothering you again, I tried to normalize the input video clips following the code you shown me yesterday, and I found this didn't work when I evaluated the Kinetics 400 database. I wonder if I was wrong in the channel order, Is the order RGB or BGR ? thanks

also, I had tried to use torchvision.transforms.Normalize to normalize with the same means and stds you provided instead of using the code you provided (simply appended your code into my projection seems make some problem so I used the library methods instead), Would it be the root of the problem? BTW, I would like to know have you evaluate the result on kinetics-400 and could you reseach the accuracy the paper claimed ? thanks

I had solved this problem. Thanks for your attention.

@FesianXu
Could you share your solution to solve the problem? I encountered a similar problem. Also, could you share your validation results on Kinetics400?

@yushuinanrong  check this link for the validation results on kinetics 400 https://github.com/moabitcoin/ig65m-pytorch/issues/2#issuecomment-622927504
I just normalize the RGB clips (in the right order of RGB channel) into pixel value from 0 to 1. And then substract their means and then divide them by the std. the mean and std are
Normalize(mean=[0.43216, 0.394666, 0.37645], std=[0.22803, 0.22145, 0.216989]),

@FesianXu
Thank you!

hi, do you performing the fine-tuned on UCF101 dataset?


Add qoute generator

The committed files appear in the form of submodule. All changed files under the project folder should be visible. Please try to fix this.


Update 050-prisma-client-reference.mdx

Describe this PR
I ran into this where the upsert query will be a SELECT + INSERT if the update field is an empty object. This is a bit unintuitive, maybe even a bug?
Changes
Add another condition to when an upsert is used
What issue does this fix?
Unexpected SELECT + INSERT instead of a UPDATE ON CONFLICT

Do I understand correctly that in your opinion an empty object should be treated like no object, where it then would use the native upsert?

It's more that if you have something like:
prisma.object.upsert({
      where: {
          hash
      },
      create: {
        hash,
        tenantId: tenant.id,
      },
      update: {},
    });

It will produce a select and than an insert. However, when dealing with potential race conditions (calling this twice at the same time for instance), the order might be: SELECT 1-> no result, SELECT  2-> no result,  INSERT 1 -> new row, INSERT 2 -> Error of duplicated unique field "hash"
If it would be a native UPDATE ON CONFLICT, this would be handled in the case of a race condition by the DB.
At the moment I solve this by calling the function like this:
prisma.object.upsert({
      where: {
          hash
      },
      create: {
        hash,
        tenantId: tenant.id,
      },
      update: {
            hash
      },
    });

This forces Prisma to do a native upsert (even though the hash never changes/updates).
Let me know if this explanation makes more sense?

Would you expect Prisam to make the assumption that it is valid to use the unchanged hash as the update value if case tehre is no explicit, non-empty update object provided?

Would you expect Prisam to make the assumption that it is valid to use the unchanged hash as the update value if case tehre is no explicit, non-empty update object provided?

No definitely not as that also might not be expected. Probably more something like: INSERT ... ON CONFLICT DO NOTHING (Only DO NOTHING if the update field is an empty object)

Ah ok, that makes more sense and is a valid suggestion.
Can you open a feature request in prisma/prisma repository? I think I would prefer to treat this as a missing feature or even bug instead of documenting this as intentional.

Sure, submitted here: https://github.com/prisma/prisma/issues/20229

Thanks! Shared with the team that is working on that part of Prisma Client.
Should we close this PR here then, or do you think we need to merge it in the meantime?

You're the PM, so up to you 😃

I'll make a call for @janpio here and say that we'll close this in favor of work coming out of https://github.com/prisma/prisma/issues/20229
Thank you for your report and explanation @rgmvisser !


If an entity MyEntity has a property called MyProp, I cannot create an entity called MyEntity_MyProp. How do I fix that?

I'm using Entity Framework 6, with POCO and fluent-API and I've noticed an annoying bug.
If I have an entity called MyEntity and this entity has a property called MyProp, that makes it impossible to create an entity called MyEntity_MyProp.
Exception:
The item with identity 'MyEntity_MyProp' already exists in the metadata collection.\r\nParameter name: item

The error immediately goes away if I rename any of the entities, or rename the properties.
The "bug" is obvious: the key [EntityName]_[PropertyName] must be unique in the metadata collection.
Screenshot:

I'm migrating a huge Entity Framework model with 390+ classes from EF 4, database first, to EF 6, code first, with fluent-API. It's out of question to rename the entities or the tables.
How do I solve that?

filed bug in codeplex instead - that's where EF6 issues should be reported:
https://entityframework.codeplex.com/workitem/2727


Multispeaker and new neural voice creation

I used the fastpitch model for generating TTS for know speaker. Can I extend this model to multispeakers by using speaker embedding?  If yes, then can the solution be used to extended so as to fine tune and mimic a new voice on limited audio data? Has anyone experimented on this path?

Hi, just to let you know I am currently working on a multispeaker implementation that will be live soon. Fine-tuning is possible with about 5mins of fresh data.

@cschaefer26 I can see you are actively developing multi-speaker implementation in one of the branches. Is it at a stage where I can experiment with it or should I wait some more?

Hi, yeah I am currently implementing it in the below branch:
https://github.com/as-ideas/ForwardTacotron/tree/feature/multispeaker
Its probably going to be ready in 2 weeks or so. I am currently testing it on the VCTK dataset and cannot guarantee it is working properly. It could be worth a try though if you like, training is implemented, inference will come soon. Use the multispeaker.yaml config, it supports vctk and a form of ljspeech format (can be set in preprocessing.audio_format). For the ljspeech format it expects: id|speaker_id|text

@cschaefer26 Thanks for the update. I will wait for another 2 weeks before experimenting with it. GPU time is expensive at my end. But I think you have only made the multi-speaker TTS with forward tacotron and not with FastPitch. Is it so? As per my previous experiment, FastPitch gave slightly better output quality compared to ForwardTacotron, can we get a FastPitch version of the same? Thanks again for all your work.

Hi, yeah I gonna implement both (ForwardTaco first, then FastPitch) - in my experience ForwardTaco is actually performing better, but it may depend on the dataset...

@cschaefer26 I can see you are still experimenting through multiple branches. Can you keep one provision for keeping emotion as a parameter. So that apart from providing speaker embedding during training phase, I would also be able to provide emotion type of the audio segment. In case this emotion information is not available, it can be assumed to be of "neutral" emotion.

@cschaefer26 Is the multispeaker branch ready for testing? Also, can you create a branch with Fastpitch?

Hi multispeaker is merged and ready for testing. I tested it on a custom dataset but as always with such large merges, there may be bugs - pls let me know if you find anything fishy. My colleague @alexteua  will work on implementing FastPitch from next week.
@debasish-mihup  Currently there is no plan to support emotion conditioning in the vanilla version, but it should be easy to add in a branch if you like. Hint - you can simply concatenate it to the speaker embedding.

Hi @cschaefer26, Congratulations on the final work on multispeaker.
I would like to try this new multi-forward to make a pretrained model with more than 15 Spanish speakers. Each speaker has a dataset, so merging all into one would be a good idea. Each dataset lasts from a minimum of 10 minutes to a maximum of one hour and 30 minutes. How many hours does it take at least to make a decent model?

@cschaefer26 Thanks for the multispeaker variant. Is there any progress on the Fastpitch version of it? I could not find a working branch for that. Also, if I have to train the model and work decently for unseen speaker, what should be the usual no. of speakers in the training data for both genders and how much hours per speaker? Any idea based on your experimentation?

hi @kafan1986 Fastpitch version is coming in the following days

@kafan1986 multispeaker fastpitch is ready #95


Remove chokidar from dependencies (once JupyterLab 2.2 is released)

I had to install chokidar to make the watch mode/developement work. This is an upstream bug: https://github.com/jupyterlab/jupyterlab/issues/8469 (already fixed, but fix not released yet).

Fixed in 2.1.4 which was released yesterday


⚠ Thumbnails API Endpoint has degraded performance

In 0ad14f7, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 1715 ms

Resolved: Thumbnails API Endpoint performance has improved in bb17025.


Move login to a 401 page

The current default landing page is News. If the
user clicks on Source Academy, they are brought
to the 'anonymous' (no associated navigation
button) Game component.
If this user is not logged in, they will receive
a pop-up LoginDialog. However, the Game
component will still render. This possesses a
problem with regards to performance, as well as
data (there is no data in state.session to
indicate username, story...)
Furthermore, we expect similar problems if a user
who is not logged in visits directly, via URL, any
page under Academy.

As a solution, we should move the login into its
separate component, 401. When the react router
receives a user request for /academy/*, the
router checks if the user is logged in. If the
user is logged in, the user is routed as per
usual. If not, the user is redirected to the 401
page instead, by-passing the render of Academy
components. When a user successfully logs in via
the 401 page, we call history to return to the
Academy component the user was trying to access.
If the history is empty, default to /academy/game.

My bad, was on mobile and had the wrong repo open.


Small fixes after recent PRs

Fixes formatting of build tag excluded files the linter didn't pick up on.
And fixes the new itest to actually run against the correct litd branch (I missed that during review). At the same time we slightly optimize the litd itest build.

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

0 of 2 (0.0%)  changed or added relevant lines in 1 file are covered.
20 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.006%) to 40.146%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

itest/loadtest/config.go
0
2
0.0%

Files with Coverage Reduction
New Missed Lines
%

itest/loadtest/config.go
1
0.0%

tapdb/addrs.go
2
79.04%

asset/asset.go
2
81.61%

universe/interface.go
15
47.09%

Totals

Change from base Build<PHONE_NUMBER>8:
-0.006%

Covered Lines:
23963

Relevant Lines:
59689

💛  - Coveralls


add WP writeProtect support

That is a fast test, thanks for this extended feedback!
The use case is fine, I do not know of other use case yet.
You could fill the whole EEPROM with a bit pattern to simulate a "format" and read it back.

Please make sure, that an invalid pin number does not mess up the program

That is primarily a user responsibility to provide good pin numbers. They also provide other parameters.
That said, I could add   if (_writeProtectPin < 0) return; in the functions to catch the default -1 value.
MAX_PIN_NUMBER is not supported in AVR (first test) so there is no portable upper limit.

Please make sure, that the library is somehow consistent. ...passing values to constructor AND to begin(...).

You have a point, there has been discussion on the Arduino forum in the past mentioning where to pass the parameters.
It was never conclusive. If I would redo my libraries I would go for passing all parameters in begin() as it is sure when it is called. For a global constructor this is unclear, one may assume it is called before setup(), but compiler might optimize otherwise. Problem with passing all parameters in begin() is that it can become quite a mix.
So for now I wont change the current choice.

I think I would change the methods enableWrite and disableWrite to enableWriteProtect and disableWriteProtect, because maybe otherwise it gets confusing.

Good point
enableWriteProtect does NOT allow writing , agree ? enable protection is disabling the writing...or??
Good descriptive names are important

allowWrite()  preventWrite()  ?
lock()  unlock() ?
???

Maybe add a delay time after toggling the pin. I am honestly not sure if this is really necessary,

I checked the datasheet of one of the EEPROMS and it had no mention of any delay time for write protect.
As long as no-one has a repeatable problem here, a delay will not be needed.
Furthermore, when the code enables writing, the pin goes LOW,
the code there after first fills an internal I2C buffer before it is send.
I cannot imagine that the WP pin is slower than filling the buffer AND setting the first bit correctly on I2C bus.
No matter which platform.

I added a (conditional) pinMode(WPpin) command as that was missing. oops
Will arrive soon in next commit.

Okay, fair enough! Passing pins must be done correctly. Regarding the amount of pins there is a macro called NUM_DIGITAL_PINS and also PINS_COUNT. Maybe one could use those. Other than that I am not sure. The Arduino-Framework is really messed up with those kind of things.

For a global constructor this is unclear, one may assume it is called before setup(), but compiler might optimize otherwise.
I am not sure, if I get your point. But if you have an object and you call a METHOD on that, for example eeprom.begin(), then EEPROM constructor will guaranteed be called before that.  But either way, just leave it how you prefer it =)

Good descriptive names are important
Yes! Even more for beginners of programmers that of course are a target group of Arduino. I would either use
enableWriteProtect / disableWriteProtect

or
allowWrite / preventWrite
Please note, that the 'logic' of these methods is inverted, meaning enableWriteProtect == preventWrite and vice versa. Use whatever you prefer. Probably second option is simpler.

I checked the datasheet of one of the EEPROMS and it had no mention of any delay time for write protect.
As long as no-one has a repeatable problem here, a delay will not be needed.

Awesome! Then this ain't no problem!
Now just one more input:
I would create a private util method like this:
    bool hasWriteProtectPin() const;

and this implementation:
return this->pinWP >= 0;

This just makes the code even more clear. But it is just a very minor tweak.
Hope that helps!
Thank you for providing the library and for the VERY fast issue rework. Really appreciate it. People like you make Arduino what it is!

if you have an object and you call a METHOD on that, for example eeprom.begin(), then EEPROM constructor will guaranteed be called before that.

That is always true.
However the constructor may be executed before the board initializes its hardware (drivers).
Specifically when there is no OS, all the code will be combined in one executable.
In case of I2C things like Wire.begin() needs to be executed before a constructor can do I2C stuff.
Otherwise "you can expect the unexpected".

allowWrite / preventWrite

Sounds perfect to me, will update in the next commit

hasWriteProtectPin()

For readabilities sake I agree, I'll make it an inline one to prevent function call overhead :)

Thank you for providing the library and for the VERY fast issue rework.

Thank you for the kind words, you're welcome, issues with a good rationale just get more attention.

One more question
If a user defines a WP pin, should the default be disabled? (my vote = yes).
Currently it is not set in the code.

OH! Good that you brought that one in. I forgot to mention. Honestly I would prefer the secure way, meaning preventWrite initially. Again this does not really matter, you take what you prefer. Either way it is just very important to make it clear of how to use it.
If you disable it by default, then you must rewrite the function setAutoWriteProtect, because I would expect it to directly lock the EEPROM.


Simplify Dockerfile and fix instructions in README

Remove deprecated MAINTAINER instruction
Use yarn for speedier installs
Install last to utilize layering
Document option to use custom file with docker

@spawnia Merged 🎉
Thanks a log for this PR 👍
If you have a time can you please look at #42


Batter Position Endpoint

First issue for Thanners to get his feet wet. Function is defined endpoint_batter_position() and commented. Some SQL has been written to get started.
We'll use this branch to bring him up to speed

@jonslui this is a branch from the populate_db so we had the latest. I think we should rename and document endpoints here so Thanners has that info. Lmk what you think


WARN Unable to find block

I get "Unable to find block" frequently (built from current develop branch).
Sometimes it resolves itself after a few retries, but this time it is not able to fix itself. Is there anything in the settings that could fix this? I tried repairing the blocks it complains about but then it just comes back with different blocks.
Feb 14 14:54:48.066 INFO Completed ordinal number retrieval for Satpoint 0x81f9590f3fe795df5131364532a3ebebe10c452a691c107eb770ccb2f7324160:0:0 (block: #675559:229243007, transfers: 716, progress: 117/176, priority queue: true, thread: 9)
Feb 14 14:54:48.115 INFO Completed ordinal number retrieval for Satpoint 0x8f56ae5ac8b402e313566d78775e16a3537f961a24f21e8a470dd897a407190a:0:0 (block: #421348:1100243006, transfers: 258, progress: 118/176, priority queue: true, thread: 9)
Feb 14 14:54:48.163 INFO Completed ordinal number retrieval for Satpoint 0xf93a6ea172cbebc7c9224850d89563543628bd0806626cb0c38f3e72e7da7343:0:0 (block: #419354:314893379, transfers: 53, progress: 119/176, priority queue: true, thread: 9)
Feb 14 14:54:48.202 INFO Completed ordinal number retrieval for Satpoint 0x74c9d5dddb8eb78daaf7d389307380f864938036e601a36a98da98fc7d1c74ad:0:0 (block: #419354:314906441, transfers: 53, progress: 120/176, priority queue: true, thread: 9)
Feb 14 14:54:49.341 WARN Unable to find block #359136, will retry in 2.666s
Feb 14 14:54:49.419 WARN Unable to find block #707189, will retry in 2.271s
Feb 14 14:54:49.419 WARN Unable to find block #707189, will retry in 2.473s
Feb 14 14:54:49.419 WARN Unable to find block #707189, will retry in 2.863s
Feb 14 14:54:49.419 WARN Unable to find block #707189, will retry in 2.91s
Feb 14 14:54:49.420 WARN Unable to find block #707189, will retry in 2.021s
Feb 14 14:54:49.420 WARN Unable to find block #707189, will retry in 2.452s
Feb 14 14:54:49.420 WARN Unable to find block #707189, will retry in 2.934s

You are most likely hitting a ulimit issue. Depending on the OS you're running, try something like
ulimit -Sn 5000

Yup, forgot to check ulimit of course. Thanks!


Wrong stacktrace and broken debugging with esbuild.sourcemap:'both'

Describe the bug
Adding
  esbuild: {
    sourcemap: 'both'
  }

to vite.config.js breaks failed assertions stacktraces and makes it difficult to debug.
According to https://esbuild.github.io/api/#sourcemap, it should make easier to debug code. But actually, it breaks debugging Vitest tests.
Originally reported here. It might be not a Vitest issue, in this case I'd be grateful if you could re-route the issue.
Interestingly, everything works correctly without esbuild.sourcemap:'both'.
Would be great if configuring esbuild sourcemap wouldn't worsen experience of Vitest test development.
Reproduction

Open the project
Run vitest test/basic.test.ts => the failed assertion stacktrace wrongly points to 'test/basic.test.ts:14:40' whereas the assertion is actually failed on 'test/basic.test.ts:19'

Also, it impedes debugging

System Info
System:
    OS: Linux 5.4 Linux Mint 20.3 (Una)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 14.35 GB / 31.21 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 108.0.5359.94
  npmPackages:
    vite: latest => 3.2.4
    vitest: latest => 0.25.3

Used Package Manager
npm
Validations

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

@sheremet-va Thank you for the prompt fix! It fixed the stacktrace indeed, but broke Vitest debugging in IntelliJ/WebStorm. It looks like a problem in IntelliJ/WebStorm, because the tests can still be debugged in VSCode. Unfortunarely, it's hard to release a hotfix of IntelliJ/WebStorm (moreover, it's would require Vitest users with IntelliJ/WebStorm to upgrade their IDEs which would be inconvenient for users). Sorry, may I ask you to restore the previous behavior? Ideally, it would be great to fix this issue and keep IntelliJ/WebStorm debugger working, but I guess it's might be not easy.

@segrey can you confirm, if #2443 fixes it?

@sheremet-va This is great! Happy to confirm that https://github.com/vitest-dev/vitest/pull/2443 solves the problem.


Shrink mainmatter if statement in styles.tex

There's an if statement that checks whether it's the mainmatter to determine whether to put the number of the chapter before the name of the chapter in the header (e.g. 5. Linear algebra vs Preface), and that if includes the entire styling for the header and not just the number thing.

This builds locally for me. It seems to be an issue with the repo GitHub is building from.


Fix reserveRemaining to take cancellations into account

What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[x] Bug fix
[ ] New feature
[ ] Other, please explain:
What changes did you make? (Give an overview)
Without this patch, reserveRemaining ignores cancellations. If a piece is cancelled (e.g. because a peer disconnected), and then webtorrent tries to refetch that piece from a web seed using reserveRemaining, the full piece would never get fetched.
This meant that if a web seed was the only remaining peer the torrent would permanently stall. This fixes that issue. The only downside is that it may end up fetching a few extra chunks, but that's unavoidable when trying to reserve the rest of a piece at once (what reserveRemaining does) when that piece may have chunks missing throughout.
Which issue (if any) does this pull request address?
Is there anything you'd like reviewers to focus on?

2.0.1


Time Traveller's Wrist Watch (revised pull)

Gordon, Hopefully this version is a little easier for you to merge :+)
Thanks
Richard

Thanks! Just merged :)


Warn before pulling if a branch appears to have been rebased

Pulling remote changing into a branch that has been rebased can cause lots of issues, so we should detect this case and warn the user beforehand.

@eamodio Rare that I do this but had to come back here to thank you for this. Has been very helpful!

@eamodio Rare that I do this but had to come back here to thank you for this. Has been very helpful!

@IAmHopp thanks! Glad it helps!

@IAmHopp thanks! Glad it helps!


Change SchnorrVerify opcode to SchnorrRecoverSigner

Problem
Similarly to https://github.com/noir-lang/acvm/issues/66, we're applying an eq constraint here which we can do in Noir.
Solution
Change SchnorrVerify Opcode to SchnorrRecoverSigner instead.
Alternatives considered
(Describe any alternative solutions you have considered.)
Additional context
(If applicable.)

Seems like Schnorr signatures don't allow recovering the public key given the message similarly how you can with ECDSA signatures.


[1.10.2] Server crashes on every startup | Farmingstation

Issue Description:
Server crashes on every startup
What you expected to happen:
Server runs fine like the last 20 days :)
Versions:

EnderIO: 1.10.2-3.1.193
EnderCore: 1.10.2-<IP_ADDRESS>-beta
Minecraft: 1.10.2
Forge: <IP_ADDRESS>1

Logs:
https://pastebin.com/kjKWje95

Tree too big error. Use mcedit.


better convergence of compute_jumps

TLDR: Two passes of compute_jumps() is not sufficient.
Consider the following sequence of instructions (assuming Python 3.6 / wordcode):

Label1:
JUMP_ABSOLUTE Label2
...126 instructions...
Label2:
NOP

On first pass of compute_jumps(), Label2 will be at address 254, so that value encodes into the single byte arg of JUMP_ABSOLUTE.  All is well.
Now imagine instead that one of the intervening "...126 instructions..." needed to have an EXTENDED_ARG prepended to it.  So the initial pass of compute_jumps() will return True (i.e. modified).  So we call compute_jumps() again...
Now during this second pass of compute_jumps(), Label2 is seen to be at address 256, so the offset from "JUMP_FORWARD Label2" is 256 and cannot be encoded in a single byte, so...  we prepend EXTENDED_ARG, remember that we modified that code, return True, and then...
The calling code in to_concrete_bytecode() raises if the second compute_jumps() also has modifications.
Clearly more than two passes can be necessary.
You could arrange this scenario pre-wordcode as well, but since the jumps have 16 bit offsets you need a much larger function before this becomes a problem.
Given the current algorithm of just calling compute_args() until it converges, it needs to be called more than twice.  I'm not sure what the upper limit could be.  But I'm not comfortable with it iterating forever, so I changed the upper limit to 10 passes before it raises.
I think ultimately this should probably have a better algorithm that doesn't need to iterate over every instruction until it converges on a solution, but I haven't read compile.c yet to see how it's done there.

Codecov Report

Merging #27 into master will not change coverage.
The diff coverage is 75%.

@@           Coverage Diff           @@
##           master      #27   +/-   ##
=======================================
  Coverage   93.22%   93.22%
=======================================
  Files          17       17
  Lines        2481     2481
=======================================
  Hits         2313     2313
  Misses        168      168

Impacted Files
Coverage Δ

bytecode/concrete.py
94.29% <75%> (ø)
:arrow_up:

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 d3f9470...246967b. Read the comment docs.

I think I agree with your analysis here, but I would like to see a test for this (even if it is limited to wordcode). Could you add one ?

Not sure how you feel about my addition of _ConvertBytecodeToConcrete.max_compute_jumps_steps.  I prefer to test the failure case, and without polluting the public API with hooks to set up the failures.

Wouldn't be problems with a code like
script = "if x: x\n%selse: %r" % ("elif x: x\n"*100, list(range(128)))

?

@serhiy-storchaka I am not sure it is related. The point of this code is to compute the offset for the relative jumps, that requires multiple passes simply because in some cases the addition of EXTENDED_ARG because some jumps are large can modify the offsets. As a consequence (and as noted in CPython source (https://github.com/python/cpython/blob/master/Python/compile.c#L5274)), it is expected to converge quickly.
@SnoopyLane could you test @serhiy-storchaka case, out of curiosity ?

I agree with your review comments.  But before I push yet another change, let me ask this...
Since compile.c has no limit (as you've pointed out twice now :-), what if I remove the limit from my changes?  Frankly, I'm not fond of that, I think there should be a limit in compile.c.  But git blame says that has been there for at least years.
Removing any limit has the upside of matching the logic in compile.c (arguably just as bad as good), but also simplifying my change to concrete.py, simplifies the test, and of course removes the need to expose a way for the tests to hammer the behavior.
Also, I'm not sure what the theoretical worst case could be.  I'm not convinced that it's not something on the order of (2**offset) / sizeof(jump_instruction).  I.e. 256/2 on wordcode, or 65536/3 on bytecode.  But I confess that I haven't spent time thinking about that case, nor trying to find old discussion around the code in compile.c.   I think, just for fun, I shall attempt to build a bad case later today.

I am not a big fan of the idea of having absolutely no limit. Furthermore sometimes people do surprising things when modifying the bytecode and can encounter cases rarely seen in usual Python code, which could infinitely loop. So I believe it is reasonable to have a limit (in addition we do expect that the process converges quickly in most cases).
However if we worry that we may have set it too low, we could add a keyword-only argument to to_concrete_bytecode to let people easily change the limit. In which case the detailed explanation could be a note in the docstring.

I made changes addressing your review comments, but no more.
Before raising the number, or allowing it to be changed as you suggest, I want to spend some time investigating not just worst theoretical case but also some practical examples.

Make sense. Keep me posted about your progress.

FYI:  I have a new test the demonstrates that there is no limit to the number of passes.  It's limited only by the size of the input code.  I'm going to follow your suggestion of making the number of loops controllable via keyword argument, then push those changes.
I'll also change the default number to something smaller than I currently have (129).
For an additional datapoint, I hacked my copy of cpython to record the number of iterations needed in compile.c, then rm'd all the .pyc files, then run cpython's unittests.  A few tests needed 5 passes, but that was the maximum.  Not that unittests are a torture-test for this kind of thing, but I thought it an interesting datapoint.

I just pushed a set of changes that provide:

Test that requires 385 iterations of compute_jumps.  I think this serves as demonstration that the number of passes is bounded only by the input size.
Control the limit via keyword argument as you suggested earlier.
Doc changes for the keyword argument (separate commit).

I only just saw your comment about documenting the 5 passes needed for unit tests.  Let me ponder the wording for a bit.  That number "5" certainly isn't contractual and I don't want the docs to suggest to somebody that they should base any decisions on that.

I gave a quick look at your changes and they look really good. The number five may be added in the api docs when you mention that it converges quickly most of the time and give the example of the Python test suite.

Final doc tweak pushed with 172199ab.  Unless your review spots problems I would like to put this to get this merged an move on.

Not sure how I missed that in the spell checker.

No problem I will merge later today. Thanks again for your great work on this.


Add documentation to check the proxy is working

I installed the proxy but I'm don't know how to check it is actually working.
I started this draft PR to document how to do that but I'll be happy to have some info here.

I second this.. The "issue" is that one or two users does not induce a big load on the proxy server and hence the admin cannot easily, if at all, can tell if the server is correctly setup and is fully functional.

Is it normal that on the user point of view I cannot see anything?

You can try to connect to your proxy from the signal app. It will show if the proxy is working.

@Nikos410 where does it show? I couldn't find anywhere in the app that shows that the proxy if correctly set and is functional. Can you share a screenshot?

If you open the proxy settings and press save it shows a green message if the connection was successful or an error popup if not.
It looks like this if the proxy works (sorry, the text is in german, but you should get the idea):

In iOS there is no such thing, plus this option is disabled and there is no way I can enable it!!

I've deployed a proxy on my VPS and configured using the proxy on my phone and tested it sending notes for myself. It works but I can't figure out how to view those connections on the server.
I tried using netstat but haven't spotted any relevant info. I also docker log'ed into each container: no logs.
Any suggestions? It feels like my phone client doesn't even use the proxy. Maybe, Signal switches to a specified proxy only when it fails to connect directly to the server?
By the way, I'm very new to networking, proxies, and all that, so I might be seriously missing some point.

Hey, it is still relevant, can you provide curl syntax with that I can test it? Phone simply does not connect and drop the URL.
E.g. as was done for Telegram? https://github.com/GAS85/tgdante2#access-test

i was able to set up the proxy and i can send messages using it from the android app (yay!) – however, posting a picture does not seem to work (never-ending progress circle), and sometimes it just becomes inaccessible (cannot connect).
a way to see what is happening inside the docker container would be really helpful; otherwise i would not dare at all to offer  the url to anyone – which makes the whole endeavor moot imho.

The problem is that the Docker images for NGINX are configured to disable logging.
Here's a patch that will enable logging and you will be able to see log output when adding the proxy address to your Signal app.
diff --git a/data/nginx-relay/nginx.conf b/data/nginx-relay/nginx.conf
index c7340c6..1cffc3f 100644
--- a/data/nginx-relay/nginx.conf
+++ b/data/nginx-relay/nginx.conf
@@ -77,7 +77,7 @@ stream {
         listen                4433;
         proxy_pass            $name;
         ssl_preread           on;
-        error_log             /dev/null;
-        access_log            off;
+
+        error_log             /dev/stderr debug;
      }
 }
diff --git a/data/nginx-terminate/nginx.conf b/data/nginx-terminate/nginx.conf
index 00a21c7..b41c880 100644
--- a/data/nginx-terminate/nginx.conf
+++ b/data/nginx-terminate/nginx.conf
@@ -29,8 +29,7 @@ stream {
         listen                443 ssl;
         proxy_pass            relay;

-        access_log            off;
-        error_log             /dev/null;
+        error_log             /dev/stderr debug;

         ssl_certificate /etc/letsencrypt/active/fullchain.pem;
         ssl_certificate_key /etc/letsencrypt/active/privkey.pem;

Run docker-compose down && docker-compose up -d and you can see log output using docker-compose logs --tail 10 -f


[$500] Task - Not here page appears briefly when closing task error message in public room

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Log out if logged in.
Navigate to a public room that has an unassigned task (https://staging.new.expensify.com/r/2376199970894587
).
Tap on the unassigned task.
Tap Mark as complete.
Close the error message.

Expected Result:
Error message will be dismissed without any error message.
Actual Result:
Not here page shows up briefly after closing the error message
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/9f0d5cb4-bc5a-4340-83d1-2a6a354ee849
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010013646d8714a6e0
Upwork Job ID:<PHONE_NUMBER>948697088
Last Price Increase: 2023-11-16

Proposal
Please re-state the problem that we are trying to solve in this issue.

Task - Not here page appears briefly when closing task error message in public room

What is the root cause of that problem?

When closing the error, we will delete the report
https://github.com/Expensify/App/blob/1deced458107c2f1bfd8c5e4e7c88678ecfc4249/src/libs/actions/ReportActions.ts#L29-L32
That leads to the "not found page" appear for a while.

What changes do you think we should make in order to solve the problem?

We should only call deleteReport if the reportAction is task action

What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Proposal
Please re-state the problem that we are trying to solve in this issue.
The task show not found briefly when close the error
What is the root cause of that problem?
We always delete the task report if we close the error from the task report, its purpose here is to delete the task report created with error.
https://github.com/Expensify/App/blob/1deced458107c2f1bfd8c5e4e7c88678ecfc4249/src/libs/actions/ReportActions.ts#L29-L32
What changes do you think we should make in order to solve the problem?
We should add the condition whether the pendingAction is add or not
What alternative solutions did you explore? (Optional)

Proposal
Please re-state the problem that we are trying to solve in this issue.
Not here page appears for a brief moment when closing task error in a public room
What is the root cause of that problem?
When closing a error, clearReportActionErrors is called
Let's take a look into this function
https://github.com/Expensify/App/blob/1deced458107c2f1bfd8c5e4e7c88678ecfc4249/src/libs/actions/ReportActions.ts#L28-L32
As you can see above, we delete task report if message.[0].taskReportID exists. This was added to delete a task report failed in creation in the PR https://github.com/Expensify/App/pull/26848. It looks like the author assumed that message.[0].taskReportID exists only when creating a task, but this field exists in optimistic report action for completing/reopening/cancelling a task as well. Please refer the below code segment
https://github.com/Expensify/App/blob/1deced458107c2f1bfd8c5e4e7c88678ecfc4249/src/libs/ReportUtils.js#L2862-L2868
That is why the task report is deleted from onyx store
This is the root cause
What changes do you think we should make in order to solve the problem?
In order to solve this issue, we need to modify the condition for deleting a task report
Update
https://github.com/Expensify/App/blob/e5e1965fb016af0963bbfc5210d1955b4ad910d6/src/libs/actions/ReportActions.ts#L28-L32
to
        // Delete the failed task report too
        if (ReportActionUtils.isCreatedTaskReportAction(reportAction)) {
            Report.deleteReport(reportAction.message?.[0]?.taskReportID ?? '');
        }

This works as expected

Result
https://github.com/Expensify/App/assets/126839717/6eb59ecc-53dd-4c82-a09d-59425bea5c32

What alternative solutions did you explore? (Optional)

I think the main root case here - that we allow anonymous user to ability complete / re-open task interaction - which should not be - and BE correctly rejecting that try - but we should block it before on FE side (which will avoid any bugs which we see now or may see in future).
Following all other patterns from public rooms - we ask user to sign in - to make any operation which required from signed user. Based on that - i think @dukenv0307 proposal makes sense to me https://github.com/Expensify/App/issues/31446#issuecomment-1814745412
🎀 👀 🎀 C+ reviewed

@narefyev91
I think calling completeTask may result in error due to some other reason like network status, etc. Also, unauthorized user may try to complete the task. In those cases, we need not to delete the task report itself. Obviously, deleting task report when clearing an error is a bug if that's not the task creation error. I'm sure we have to handle this case
cc @tylerkaraszewski @laurenreidexpensify

@narefyev91
I think calling completeTask may result in error due to some other reason like network status, etc. Also, unauthorized user may try to complete the task. In those cases, we need not to delete the task report itself. Obviously, deleting task report when clearing an error is a bug if that's not the task creation error. I'm sure we have to handle this case
cc @tylerkaraszewski @laurenreidexpensify

I think when user click on Complete Task - we should show right panel with Login flow - and ask user to login to make this action, rather than allow user to try to complete.
User should not come to this code below - when user do not have permissions to do it.
 const taskReportID = reportAction.message?.[0]?.taskReportID;
 if (taskReportID) {
     Report.deleteReport(taskReportID);
 }

In any case final decision for @tylerkaraszewski

@narefyev91 pls complete checklist and advise on regression test thanks


Add License

Hey,
Please add a license to the library so that devs can start using it.
Great library though :+1:

Hey, thanks a lot for bringing that to my notice. I have added Apache License, Version 2.0 as my license for this project.
Thanks! :+1:


AccountChest logic changes

The goal of this PR is to change the way transactions from and towards account chests works in order to avoid loading chunks on every transaction.
The idea behind this is to store in the database the balance of every AccountChest, when a transaction is made, the system will check if the account has enough money based on the sum of its vaults' balances stocked in DB or on the account's balance (not sure if this information is calculated on every call currently).
If the account has enough money and the transaction can be made, a PendingTransaction will be emitted containing the targeted chest and the amount to credit/withdraw.
Once a new chunk is naturally loaded, the pending transaction system will check if there is a transaction for a vault in that chunk and apply it if so.
If the chunk is already loaded when the transaction occurs, no need to go through the pending system.
Of course, the pending transactions need to be stocked in the database in case of a crash or server restart.
Additional features that I'm not sure are worth implementing at this point:

Possibility to set in the config a threshold of chunk loading per minute: the pending system would load the chunk and apply a set amount of transactions every minutes or so to avoid the queue increasing to much.
On server shutdown, apply every remaining transactions, it could significantly slow down the shutdown and some people could think of it as a bug and kill the server during the process.

I'm opening this pull request very early in the process to get reviews on the concept mainly from @nikosgram  & @painOchoco .

Nice! this feature would enhance performance greatly.
Some tests would be great because this feature touches a core part of the plugin and we want to make sure it works consistently. I don't know if the test suite is able to test that but it would be nice.

I highly recommend not changing the existing model, but instead creating a new model that stores the location, including the world id, of the vault and the a cache of the total value from all different denominations might exists.
For example: [cached_vault_values_table]

<x>,<y>,<z>,<world_id>,<total_value>

Let's say, there is a vault in location 10,65,0 and in the world with UUID ebeb6a25-fbea-4004-8699-811d8a193f18. The vault has 10 emeralds, which their total value is 10, and 1 emerald_block, which it's value is 9, the total_value of the vault would be 19 - 19 = (10 [total_emeralds] * 1 [emerald_value]) + (1 [total_emerald_blocks] * 9 [emerald_block_value]). The entry is the table would look something like that:

10,65,0,ebeb6a25-fbea-4004-8699-811d8a193f18,19

That will allow removing complexity from the original modal and allow for a bit more flexibility when it comes down to testing and backwards compatibility.
@PainOchoco what are your thoughts on this one?

Or we don't need to split the location into multiple fields/cols but instead have them combined. That will allow us to search faster by creating a hash index of it. For example:

<x>_<y>_<z>_<world_id>,<total_value>
10_65_0_ebeb6a25-fbea-4004-8699-811d8a193f18,19

Upgrading from a 2012 to a 2024 version of a library is most painful thing I have endured

It seems to be functional we will start to test it

@nikosgram I'll probably make a follow-up on these changes in a couple days, I need to add more documentation and maybe make some changes.
Also can you publish a snapshot of the maven artifact? I need to update gringotts-towny as it broke because of my changes.
Thx

Sure :) I'm also making few changes regarding supporting 1.20 and 1.21.

Oh yeah I should have committed my work on 1.21 too 😅

Also i need to document how to upgrade the database for the new version

<dependency>
  <groupId>minecraftwars</groupId>
  <artifactId>gringotts</artifactId>
  <version>3.0.1-SNAPSHOT</version>
</dependency>

Still a snapshot, for testing purposes. Not gonna make a stable release yet.


feat: add unit test for online tlog verification

Summary
Closes: #53
Adds test for online verification of artifact transparency log using mock rekor

Release Note

Documentation

@cmurphy @haydentherapper I tried to add mock test by creating mock Rekor Entry client and adding inclusion proof to GenerateTlogEntry but I could not figure out how to:

generate the correct inclusion proof checkpoint and,
generate hashes required to compute the inclusion proof

It kept on failing while verifying rekorLogEntry. I don't know enough about rekor internals to create them properly. Meanwhile I have created a test that verifies one of the examples using sigstore public rekor.

I have also added the unfinished test to the PR, What I don't understand is

What will be the root hash
How to calculate the "hashes"
Right way to calculate checkpoints

What will be the root hash

The CT RFC has an explainer on merkle tree hash calculations: https://www.rfc-editor.org/rfc/rfc6962.html#section-2.1
The simplest merkle tree will contain only a single leaf, and the root hash will be the SHA-256 hash of the leaf prepended by a null character. The inclusion proof won't need to include additional hashes because there is only one hash needed to verify the leaf's inclusion in the log: https://gist.github.com/cmurphy/1b1203f4fec5b2363c30901d4684c2c4#file-treesize1-go
I think simplifying GenerateTlogEntry to make the tree only have one node is probably fine. The unit test doesn't need to validate the transparency-dev merkle library, just the sigstore-go usage of it.
If you did need to generate a more complex tree, the RFC explains how the root hash is calculated by concatenating the root hashes of its subtrees, and it would look something like this: https://gist.github.com/cmurphy/1b1203f4fec5b2363c30901d4684c2c4#file-treesize2-go

The test that uses public rekor is passing

It would be better if the unit tests did not make real network calls to the public infrastructure. Unit tests should be self-contained and never rely on external services, because:

If the external service is down or lagging, the CI running the unit tests will also slow down
Unit tests are run often and will significantly add to the network traffic hitting the public infrastructure, which could artificially degrade the service or increase infrastructure costs
Developers may want to run unit tests on a machine not connected to the internet

Thank you so much for the amazing explanation @cmurphy, I learned a lot about how tlogs actually work.
I fixed inclusion and checkpoint but I still had this problem where SET verification were failing. I noticed that while verifying SETs in offline mode we are converting the log IDs to hex:
https://github.com/sigstore/sigstore-go/blob/5845298281875c153f40da081466ca716ff1abc6/pkg/tlog/entry.go#L267-L272
But the rekor library does not do that https://github.com/sigstore/rekor/blob/8ca864f6b2bcece1b0b9b004938375bbe8fff03c/pkg/verify/verify.go#L190-L195
When I convert logID to hex in my mock log entry anon, SET verification using rekor library starts to pass, see: 50f5a75 (#296)
Is there a reason why we do that? I don't understand why I should convert it to hex in my mock to make it work.

Is there a reason why we do that? I don't understand why I should convert it to hex in my mock to make it work

It looks like rekor stores the LogID of the log entry as hex encoded:
https://github.com/sigstore/rekor/blob/1e6728717d221a87792a8fc0c4cf588cc31dceb0/pkg/api/entries.go#L92
https://github.com/sigstore/rekor/blob/1e6728717d221a87792a8fc0c4cf588cc31dceb0/pkg/api/api.go#L177
It doesn't need to re-encoded it during verification. But the mock should ensure the log entry is encoded the way the verifier expects it to be.

okay, makes sense now.
I have hex encoded the log entry and the PR is ready for review

Thank you @cmurphy for all the help!


Request for making information about repression on civilian people in Hong Kong the main page of docs

For some time webpack is informing about things related internal political situation of USA. I think that it's also worthy to inform people about (in my opinion) even bigger injustice happening currently in HK, where Chinese police unlawfully restricts freedom of protesters in many ways.

I tried to be as inclusive with our messaging as possible to not only include the current focused Black community, but also "others around the world".
This is not an injustice contest and they should not be compared. Both are condemnable and worth of protest. If you have links or resources that we can include for global funds for supporting injustice I welcome those contributions.

Hey, @TheLarkInn, taking the risk of being publicly judged, but as a someone from around the world, but not from the US it really is hard to understand the decision. Hard to put into words, but I'm a bit conflicted given I don't even understand in details what is happening in the US.
Racism is an issue bigger than any country, indeed.
But it feels like people from other countries are being dragged into US political problems right now, in a bit of a forceful way. Which I never expected from an open source project.
I'm just trying to understand, really.

And if this trends goes I hope we also include other movements. HK, Uyghurs, but also problems in my country like the Amazon issues were surely overlooked in the past.

Appreciate your honesty. We understand that it isn't a perfect form of solidarity but just a great call to action for civil injustice anywhere right now.
Even Brazil, struggles from deep roots of racism today and is just one of many countless examples. If you have causes you want to share. I'll leave this issue open to raise further awareness.

We do have issues, yes, and each place has its own struggles. Not denying that.
Gonna leave here the NGO I support, ISA, that fights for the people of the Amazon forest and indigenous people from Brazil in general: https://filiacao.socioambiental.org/donate/

@kuskoman it's not same thing.
to be honest, have the “protesters” in Hong Kong really suffered violent by the police?

People just believe what the had heard. No one will check the truth. It's not a good idea to include all politics

香港主要是被一群香港废青搞得乌烟瘴气，甘愿做美国的走狗，也不懂做一个好好工作生活的年轻人。这种人去哪里都是祸害。

香港是种族问题？你在说你🐴   呢？

Please close this issue. @TheLarkInn
香港一是中国内政，二是外部势力教唆，和颜色革命类似。跟种族歧视、人权、自由完全是两回事。

what happened in HongKong，just like some New York citizen said they are English people and want to be independent。No oppression， okay? We Chinese never be afraid of our policy, they potect us but not like american policy, kill people. It's not the same problem, don't mess they up.

@kuskoman这不是一回事。
老实说，香港的“抗议者”真的遭受过警察的暴力吗？
No， they are the violence itself

This is for a place to leave links to initiatives and funds for civil rights issues beyond that has been provided. I will lock discussion if continued. 大家明白吗？大哥们明白吗？

除了提供的权利之外，这里还为与民权问题的倡议和资金保持联系的地方。如果继续，我将锁定讨论。大家明白吗？大哥们明白吗？
but you guys truely know what happened in HongKong？

many companies support #blackouttuesday because popularity. do not let this be a trend.

In my opinion, this is a nasty request. Just a humble suggestion that please understand the full story before taking action. Thanks. Hope everything get better soon. Thanks.

You are strongly biased against China. Are you the most vicious dogs?

@kuskoman Open your eyes, looks at the video
Whoever talk about Hong Kong, please not only look at what western media said, please have a full view of HK.

So many mainlanders never respect the vast majority of Honk Kong people's opinions, only their own... Anyways, I think an OSS project taking a political stance, no matter how obviously "correct" or "moral" it may be, is like jumping into a shark tank, much like this thread. Still, I respect the decision and hope something will be done to better social divides in the USA. I do hope you're prepared for the global communities response if you stay silent on other issues though.

@HermantNET
are you sure it was vast majority of Hong Kong people's opinions? is there statistic data support your opinion?
let's think this problem in another view
If Texas seeks independence from the United States, and "prosters" rob the store, burning buildings, throw petrol bomb, beating people who have different positions from them, and holding up "Chinese troops to save the people of Texas".
how do you think about this. are these poeple worthy of respect?
finnaly, I also think we should NOT  bring political issues into the open source community.

So many mainlanders never respect the vast majority of Honk Kong people's opinions, only their own... Anyways, I think an OSS project taking a political stance, no matter how obviously "correct" or "moral" it may be, is like jumping into a shark tank, much like this thread. Still, I respect the decision and hope something will be done to better social divides in the USA. I do hope you're prepared for the global communities response if you stay silent on other issues though.

The fact is, most mainland people do not care about anything abount HongKong. HongKong has independent finance, mainland goverment can't get one dollar tax from Hong Kong, what happened in HongKong can't influence our life. Who care about HongKong? Those people who hope HongKong prosperous and stable. Do you have a child? Will you hope your 16 years old, do not go to school everyday and become "protesters", even though they do not know what they are doing, just to be cool. If you really want to do good things, first investigate, not take conclusion.

Please, words just like swords, don't hurt us time by time. I heard people in California want to be independent every year. But will I support or be against then? I will not, because I can't know what's the true need of people in California. But why you always think you guys get the truth? Open source community should be pure, if you want politics, go to your twitter or facebook. Webpack is a great tool, don't use politics to kill it.

@TheLarkInn , with due respect to the solidarity gesture, could you at least let people clickthrough to the docs? You can add checkboxes like "I understand the seriousness of the situation" "I agree with the protesters' cause" or anything you like.
Because for now, you are hurting mostly inexperienced developers that are trying to figure out your tool for the first time.
Experienced people will fork your repo and self-host your page. They also either do not need the documentation or will just use another tool like https://devdocs.io/
Taking the page hostage does not really help the cause and may have an opposite effect of losing support for the protesters.
Maybe you will consider some positive reinforcement for the allies and not hurting random uninvolved bystanders from outside the US?

I am closing this issue. I created it to draw you attention to the fact, that human rights are not being respected in many places around the world.
I still don't think that webpack documentation, and other similiar software documentation should be a place to inform about political situation and number of these injustices in the world is just one of reasons.
Don't understand me wrong. I appreciate all kinds of fight for human rights, but making people annoyed by hiding the documentation will probably cause reverse effect.
All lives matter


Add information about DENO_DIR

With question in denoland/deno#1082 I believe it's worth noting in README proper way to use DENO_DIR
Namely DENO_DIR should be volume mounted from host machine in order to leverage caching - otherwise on each run of container everything will be recompiled.

@bartlomieju what do you think about this: https://github.com/hayd/deno_docker/blob/master/example/Dockerfile
Do you think that DENO_DIR should be set in the parent(s)?
I use different layers, and cache that way. Is there some other way/something else which I am missing?

This could also be added:
RUN addgroup -g 1000 -S deno && \
    adduser -u 1000 -S deno -G deno && \
    mkdir /cache/ && \
    chown deno:deno /cache/
USER deno
ENV DENO_DIR /cache/

WORKDIR /app

I believe that DENO_DIR should be controlled by the user, so it should be defined as late as possible. CC @zekth who has more experience with Docker

Should we use /deno-dir/ over /cache/ ?

Should we use /deno-dir/ over /cache/ ?

I think it's better to use the same naming yes.

I also create a deno USER, this could either be the default (it is now 😬 ) or have users set USER prior to deno execution (fetch/run).

I think this is sufficient now? @bartlomieju
Would probably be good to add an example of a multi container / shared volume ? I haven't done this myself / used multi container.
On re-reading is it you're saying it should be a directory shared with the host? Because I strongly disagree. I think the deps.ts is a good solution to minimize fetch/compile time... Sharing volumes with the host seems like an anti-pattern...?

@hayd depends. But the volume has to be documented, then if needed the user can share the host. For example it's fairly known to use this pattern with database containers.

Sharing with the host seems like a bad idea from a devops/production point of view 🤔, being self-contained as a container seems like a huge win! (see example)
I see why you may want to in a db container... though I'm in favor of stateless web applications and db as distinct server (and port map/forward to that).
Volumes are interesting: https://docs.docker.com/storage/volumes/
I think we can get away with just linking to them/suggesting they can be used?

Volumes are usable also in this case and can tackle the issue with sharing the volume i agree. But people tend to like mapping directly directories even if it's anti pattern. :man_shrugging:


Correct links for "Virtual Student Federal Service: my UX apprenticeship journey"

Link text "Explore Data Feature" in paragraph 2
Link text "lo-fidelity wireframes" in paragraph titled "Prototyping"

@daniel-coleman-1 I'll reach out to @persam2 on this one to see if she can get us screenshots of the prototype in place of the links.

@persam2 is looking for the source files on an external hard drive.

This is fixed.


Bad links on documentation

All links are pointing to http://facebook.github.io/ . For example fromJS() is tageting http://facebook.github.io/fromJS which doesn't exist resulting a redirection to code.facebook.com

+1, same issue

Sorry all, looks like I got ahead of the CDN and the JS file for the docs didn't load. I just fixed it, should work for you now.

Good for me thanks :)

Thanks!

Having the same problem now. 😮


x/image: CCITT reader EOF error for tiff image

What version of Go are you using (go version)?

$ go version
go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?
With last master branch.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/x/go/bin"
GOCACHE="/home/x/.cache/go-build"
GOENV="/home/x/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/x/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build670162663=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Tiff file used to get an error debug_26428.zip (compressed with zip, extract it for usage). Length of tiff file is: 26428 bytes.
I've created test cases that can be used for tiff and ccitt package. Because it is called with tiff.Decode(), but error is in ccitt.decodeEOL().
tiff
Copy extracted tiff to root testdata and copy this test case to tiff.reader_test.go
func TestTiffDecodeOfCCITTEndOfLine(t *testing.T) {
	b, err := ioutil.ReadFile("../testdata/debug_26428.tiff")
	if err != nil {
		t.Fatalf("Read File: %v", err)
	}
	if _, err = Decode(bytes.NewReader(b)); err != nil {
		t.Errorf("Shouldn't error, but got err: %v", err)
	}
}

Output:
--- FAIL: TestTiffDecodeOfCCITTEndOfLine (0.02s)
    reader_test.go:68: Shouldn't error, but got err: ccitt: missing End-of-Line

ccitt
Copy extracted tiff to ccitt testdata and copy this test to ccitt.reader_test.go
Data taken from actual debugging for this file, when called with tiff.Decode().
func TestReadEndOfLineError(t *testing.T) {
	f, err := os.Open("testdata/debug_26428.tiff")
	if err != nil {
		t.Fatalf("Open: %v", err)
	}
	defer f.Close()
	const width, height = 2481, 3508
	opts := &Options{
		Align:  false,
		Invert: true,
	}
	offset := 160
	n := 26268
	if _, err := ioutil.ReadAll(NewReader(io.NewSectionReader(f, int64(offset), int64(n)), MSB, Group4, width, height, opts)); err != nil {
		t.Fatalf("Shouldn't error but got error: %v", err)
	}
}

Output:
--- FAIL: TestReadEndOfLineError (0.03s)
    reader_test.go:411: Shouldn't error but got error: ccitt: missing End-of-Line

What works for this case
I'm not even remotely expert on specs for TIFF and ccitt, but I've changed last return from return errMissingEOL to  return nil and I'm getting correct image and everything works fine and tried in many files (mostly all scanned textual with images, and all B/W) and I've see no problems with this fix/hack.
// decodeEOL decodes the 12-bit EOL code 0000_0000_0001.
func decodeEOL(b *bitReader) error {
	nBitsRead, bitsRead := uint32(0), uint64(0)
	for {
		bit, err := b.nextBit()
		if err != nil {
			if err == io.EOF {
				err = errMissingEOL
			}
			return err
		}
		bitsRead |= bit << (63 - nBitsRead)
		nBitsRead++

		if nBitsRead < 12 {
			if bit&1 == 0 {
				continue
			}
		} else if bit&1 != 0 {
			return nil
		}

		// Unread the bits we've read, then return errMissingEOL.
		b.bits = (b.bits >> nBitsRead) | bitsRead
		b.nBits += nBitsRead

                // Changing from errMissingEOL to nil works for this case
		// return errMissingEOL
               return nil
	}
}

Request
Can anybody see in TIFF provided, run this tests, maybe do better "fix".  Because with this applied ccitt test TestRead fails with output:
--- FAIL: TestRead (0.00s)
    reader_test.go:437: AutoDetectHeight produced different output.

Thanks

/cc @nigeltao

/cc @hhrutter @bsiegert

Hi @xajler!
Your fix is not feasible since it is ignoring any missing/corrupt EOLs.
I am working on this.

Thanks for looking into it, @hhrutter.
I thought it was a more of a hack than fix, but so far it worked in cases I was using.

Well, if I understand the spec correctly, missing EOLs are actually malformed CCITT images (or malformed TIFF images), and see also (https://en.wikipedia.org/wiki/Robustness_principle#Criticism). Two questions.

Do you know what program generated that failing TIFF image?

Do you know whether other image decoders (e.g. ImageMagick, GIMP) accept such a TIFF image with missing EOLs?

The failing TIFF opens up nicely with Mac Preview and ImageMagick does not seem to have any problem with it:
Go-> magick identify debug_26428.tiff
debug_26428.tiff TIFF 2481x3508 2481x3508+0+0 1-bit Bilevel Gray 26428B 0.000u 0:00.003


build and run and test quickstart from current branch

test the current branch by building ziti and the quickstart container image and running in compose and running quickstart_test.go

@gberl002 @gberl001 That last CI run succeeded after we patched the test to work locally on macOS and Linux too.


What is the License?

Can you please add a license for this repo?

@kristinaspring we added the license to the repo, it is Apache 2.0
https://github.com/YugaByte/utilities/pull/4


Add support for setting flycheck-cppcheck-standards variable.

(Resubmission of this pull request, but changed to respect the recent upstream commits. Sorry for the confusion.)
cmake-ide does not currently provide any information to cppchecker regarding the language standard of a source file. This pull request adds functionality to deduce the standard used to compile a source file under CMake, and pass that information on to cppcheck, through the flycheck-cppcheck-standards variable.
The CMake variables CMAKE_C_STANDARD and CMAKE_CXX_STANDARD can be used to specify standards at the project level, and C_STANDARD and CXX_STANDARD at the target level. As far as I can tell, this information is not emitted directly by CMake to a compile_commands.json file; however, the compile flags in that file do provide this information indirectly. cmake-ide already uses this to set the flycheck-clang-language-standard variable, by matching against and then stripping the string -std= from entries in a list of compile flags.
One slight complicating factor is that cppcheck only accepts a subset of the standards accepted by clang and gcc, specifically c89, c99, c11, c++03, and c++11. Recent versions (at least >= 3.8.1) of CMake support c90, c99, c11, c++98, c++11, c++14, and c++17. Also, when using GCC or Clang on Linux and OS X (and possibly under other compilers and/or on other OSes), CMake actually emits compile commands specifying GNU variants of standards, e.g. gnu99 and gnu++11.
Of course, there are other ways for -std=* flags to get into the compile database. The most likely is someone simply setting the compile flags themselves, rather than using CMake properties.
My logic goes as follow:

I assume that the vast majority of gnu-dialect-compiled files can safely be checked with the equivalent standard dialect; that is, for example, most files that CMake would compile with gnu++11 can probably be safely run through cppcheck under c++11. (I've always thought it was a bit weird that CMake doesn't allow one to explicitly rule out the use of GNU extensions, but I would hazard a guess that most people aren't in the grey area between the two.)

It probably doesn't matter to the user if almost-equivalent standards are used. In particular, c89 and c90 are effectively identical, and I don't imagine there are many cases where a user compiling under c++98 would be tripped up by running cppcheck under c++03. I've considered the members of these two pairs to be interchangeable.

Nevertheless, there are probably cases where a user absolutely doesn't want a standard passed to cppcheck unless it was exactly that used during compilation. For this, I've introduced a cmake-ide-flycheck-cpp-strict-standards customisable switch; when set 't', if a standard flag in the compile database cannot be matched exactly to cppcheck-compatible flag, the flycheck-cppcheck-standards variable will not be touched at all. (In other words, the current behaviour.) Users can then set it themselves, if they so desire.

I've tested this on Linux (Ubuntu 16.04 LTS) and OS X (El Capitan), and it seems to work as intended. I have not been able to test this on a Windows machine, but I don't see any reason for it to fail.

There are no unit tests for the new functionality in this PR.

Sorry, that was an oversight on my part. The new commit adds some unit tests. They should be fairly comprehensive; please tell me if you have any suggestions, though.

Good work on the tests. What about the (member standard '("posix" "c89" "c99" "c11" "c++03" "c++11")) comment?

Which comment, sorry? I'm afraid I don't see what you mean.
But, if you're suggesting that the form you gave is a nicer way of writing the body of cmake-ide--valid-cppcheck-standard-p, then I agree. ;) Thanks for the tip -- I'm quite new to elisp, and am still learning my way around the various functions. I'll change it and then commit again.

Thanks for this!


Custom google sign in button

Hi I want to make the text all caps in the sign in button, is there a way to do that?

from what I saw in google documentation there is not such property on the signin button.
a solution might be for you to make a custom button. For the G you can either use the png shipped with the package or use https://github.com/oblador/react-native-vector-icons with a custom color
cheers

Hi, I can't seem to use the png in the package, i keep getting invalid png error. Any ideas?


A little question about the code

hi @erikwijmans ,
I'm sorry to bother you. Why in class "PointNet2ClassificationSSG", the function "configure_optimizers" uses "self.hparams.batch_size" and "self.hparams.optimizer.decay_step" etc, instead of "self.hparams.task.batch_size" and "self.hparams.task.optimizer.decay_step" etc?

That made more sense to me.

I'm sorry, my English is not so good, I can't understand the exact meaning of your reply. Hoping that you can help me out.  T.T

I decided to not put those fields under task as it made more sense to me  -- that way you can override batch size like batch_size=<blah> instead of task.batch_size=<blah>.  All task=cls does is tell hydra to compose in the task/cls.yaml file.  It doesn't force everything in that file to be under task.

Thank you so much. I wish you a smooth work and also have fun every day. 谢谢您！


Possible features: Check database security?

I wonder if you've considered checking whether the user to which the app connects has "too many" privileges in the database, and whether the DB connection itself is secure.
I just went through the process of testing whether my app on heroku was connecting to an Amazon RDS instance over SSL or not. It turns out that you can check this with the following code:
from django.db import connection
cursor = connection.cursor()
cursor.execute("show ssl")
assert  cursor.fetchone()[0] ==  "on"

Provided the sslinfo extension is running (see http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL)
It did also make me thing whether there are easy pickings, eg. to check that the app is not connecting to the DB as an admin user? It's kind of relevant when many people are doing their own sysadmin and dbadmin for small hobby projects.

The future of this app is a bit unclear; it's been merged into Django 1.8, so at this point it's only useful as a backport for older Django versions. It's possible we could add more checks and keep it alive as an extension of the built-in checks in Django 1.8+, but really I think any new checks should probably just be added to Django directly at this point.
Aside from that issue, I'd certainly be open to a PR for this.

Closing all open issues - I've decided not to continue maintaining django-secure as an external project, since all of its functionality was merged into Django 1.8, which is now (or will shortly be) the lowest supported Django version.


feat(upgrade): add labels input parameter

This adds the input parameter labels.
I think this is a needed parameter because some repos have different label schemas than "trunk".
Example: I would like to add "area: dependencies" as label instead of "trunk".

Thanks @EliSchleifer for starting the pipelines. Are the failed workflows caused by my changes or are there other errors?

Thanks @EliSchleifer for starting the pipelines. Are the failed workflows caused by my changes or are there other errors?

Those are pre-existing issues. This looks good to go.

Thanks for the contribution.


Back key shouldn't exit the terminal session

Repro case:
Version 1.0.33
Start ATE
Do something (e.g. ls)
Press back key. (On Android 3.0+ you may have to dismiss the keyboard first.)
Start ATE again (e.g. from Recent activity screen.)
Expected behavior:
Return to running session
Actual behavior:
Start a new session.
We should keep the session alive, just like we do if you press  the "Home" key instead of the Back key.

Fixed in 1.0.36


Support creation of sections without landing pages

Discussed in https://github.com/thegetty/quire/discussions/899

Originally posted by 1000camels February  5, 2024
I am looking for a way to not have Section Landing Pages, but for them to appear in the TOC and Menu
I do understand I can control whether it part of the flow of pages by setting the output to none.
Ultimately I want to make either the section title in the toc and menu not clickable or have it redirect to the first page.
Is there a way in Quire to do this?
Or if I wanted to try to implement this with .htaccess file, how would I get that file into _site?

In early v1, we implemented this by saying any page without a layout wouldn’t have a landing page, but we later found a bug that meant that every page had to have a layout.


[dexter-vs] Error when opening a project from Recent project list

Steps to reproduce:

Start Visual Studio  with Dexter extension installed
Open any project from Recent project list:

After opening the project, an error occurs:

OK, it is caused by Visual Studio, not by the extension itself. Reseting  Experimental instance seems to solve the problem, as explained here.


O(n) is nice

Let's read the affected sites file once!

Looks good to me. I figured that there must a way to cut down on runtime.
Checked and merged.


Limit total number of failed 2FA logins (GSI-638)

In addition to the rate limiting (max. 3 attempts per interval), we now also limit the number of consecutive failed attempts (max. 10 attempts in total). The exact limits are configurable. If the limit is hit, and the TOTP token is already rolled out to the user, the user account is deactivated.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

82 of 85 (96.47%)  changed or added relevant lines in 4 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.05%) to 92.945%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/auth_service/auth_adapter/ports/totp.py
4
5
80.0%

src/auth_service/auth_adapter/core/verify_totp.py
47
49
95.92%

Totals

Change from base Build<PHONE_NUMBER>:
0.05%

Covered Lines:
1436

Relevant Lines:
1545

💛  - Coveralls


Add festival of robotics logo to loading screens

@mhl787156 Have you got a link to the image you want to put in? And shall it just go in the loading screen
.

Done! in #147


Fixes for ref dbs mounts for docker in ips and unifire. Mem limit to emapper --dbmem flag

I've also added a local profile with max_cpus and memory suitable for a laptop/workstation

Thanks a lot, Martin! Could you please merge it into dev first instead of main?

Yeah, I selected the wrong branch when I created the PR.

BTW, this PR should close #38 and #40


Market Cards: Styling and spacing changes

Changes to tighten up classic view. need to maintain market cards looking "good" at least "decent" on condensed and expanded.

1 spacing see last description in tix description
2 spacing see last description in tix description
6 remove market reporting state and market type. leaving in-reporting sub state

3 tighten up so that the component that has total volume and open interest is 96 px should leave about 12px from interest to the dividing line.
4 spacing see last description in tix description
5 align outcomes so they line up with market title. they are fine on mobile. desktop needs to be fixed they were recently changed to go to the edge.
7 outcome hover outline color should be #3C3B43

spacing :

make minor adjustments to make the spacing consistent between elements on the card.

Was merged