Returning promise from dispatch

Here is my action:
export function fetchNearbyUsers(user, position) {
  return (dispatch) => {
    const query = new Parse.Query(Parse.User);
    query.withinKilometers('location', createGeoPoint(position), 10);
    query.equalTo('gender', user.attributes.interest);
    query.notEqualTo('objectId', user.id);
    query.limit(15);
    return query.find().then((users) => {
      dispatch({ type: GET_NEARBYUSER_LIST, payload: users });
      return Promise.resolve();
    }).catch((error) => {

    });
  };
}

now the question is why does this return undefined:
this.props.fetchNearbyUsers(this.props.user, this.props.location).then(() => {
  this.setState({ refreshing: false });
}).catch((error) => {

});

const mapDispatchToProps = dispatch => ({
  fetchNearbyUsers: (user, position) => {
    dispatch(fetchNearbyUsers(user, position));
  },
});

as to this returns the Promise when i am accessing the store through context:
const { dispatch } = this.context.store;
this.setState({ refreshing: true });
dispatch(fetchNearbyUsers(this.props.user, this.props.location)).then(() => {
    this.setState({ refreshing: false });
 });

Because you would need to still return something from the fetchNearbyUsers function you've defined inside your mapDispatch.
Since you're just directly passing the user and position props and immediately dispatching, you don't actually need to define a function inside of dispatch.  Instead, you can bind up the fetchNearbyUsers action creator.  This can be done by passing it inside an object, as the second parameter to connect, like this:
import {fetchNearbyUsers} from "./actions";

class MyComponent extends Component{}

const actions = {fetchNearbyUsers};

export default connect(null, actions)(MyComponent);
// the component will now have this.props.fetchNearbyUsers, which will auto-dispatch when called.


Fixed username being listed in README.md contributor instead of country

Fixes issue #17.

Thanks!


[Event Request] codeunit 17 "Gen. Jnl.-Post Reverse" - OnReverseOnBeforeGetTransactionKey

Hello, can you please add a new Event OnReverseOnBeforeGetTransactionKey in codeunit 17 "Gen. Jnl.-Post Reverse" ?
    procedure Reverse(var ReversalEntry: Record "Reversal Entry"; var ReversalEntry2: Record "Reversal Entry")
    var
        SourceCodeSetup: Record "Source Code Setup";
        GLEntry2: Record "G/L Entry";
        GLReg: Record "G/L Register";
        GLReg2: Record "G/L Register";
        GenJnlLine: Record "Gen. Journal Line";
        CustLedgEntry: Record "Cust. Ledger Entry";
        TempCustLedgEntry: Record "Cust. Ledger Entry" temporary;
        VendLedgEntry: Record "Vendor Ledger Entry";
        TempVendLedgEntry: Record "Vendor Ledger Entry" temporary;
        EmployeeLedgerEntry: Record "Employee Ledger Entry";
        TempEmployeeLedgerEntry: Record "Employee Ledger Entry" temporary;
        BankAccLedgEntry: Record "Bank Account Ledger Entry";
        TempBankAccLedgEntry: Record "Bank Account Ledger Entry" temporary;
        VATEntry: Record "VAT Entry";
        FALedgEntry: Record "FA Ledger Entry";
        MaintenanceLedgEntry: Record "Maintenance Ledger Entry";
        TempRevertTransactionNo: Record "Integer" temporary;
        FAInsertLedgEntry: Codeunit "FA Insert Ledger Entry";
        UpdateAnalysisView: Codeunit "Update Analysis View";
        NextDtldCustLedgEntryEntryNo: Integer;
        NextDtldVendLedgEntryEntryNo: Integer;
        NextDtldEmplLedgEntryNo: Integer;
        TransactionKey: Integer;
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeReverse(ReversalEntry, ReversalEntry2, IsHandled);
        if IsHandled then
            exit;

        SourceCodeSetup.Get();
        if ReversalEntry2."Reversal Type" = ReversalEntry2."Reversal Type"::Register then
            GLReg2."No." := ReversalEntry2."G/L Register No.";

        ReversalEntry.CopyReverseFilters(
          GLEntry2, CustLedgEntry, VendLedgEntry, BankAccLedgEntry, VATEntry, FALedgEntry, MaintenanceLedgEntry, EmployeeLedgerEntry);

        if ReversalEntry2."Reversal Type" = ReversalEntry2."Reversal Type"::Transaction then begin
            GLReg2."No." := GetRegisterNoForTransactionReversal(ReversalEntry2);
            if ReversalEntry2.FindSet(false, false) then
                repeat
                    TempRevertTransactionNo.Number := ReversalEntry2."Transaction No.";
                    if TempRevertTransactionNo.Insert() then;
                until ReversalEntry2.Next() = 0;
        end;
        OnReverseOnBeforeGetTransactionKey(ReversalEntry2, TempRevertTransactionNo);

        TransactionKey := GetTransactionKey();
        SaveReversalEntries(ReversalEntry2, TransactionKey);

    [IntegrationEvent(false, false)]
    local procedure OnReverseOnBeforeGetTransactionKey(var ReversalEntry2: Record "Reversal Entry"; var TempRevertTransactionNo: Record "Integer" temporary)
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 10907.


fix broken CI script

See https://github.com/JamesIves/github-pages-deploy-action/discussions/1589 for more info. The 'deploy' pipeline has been broken for the past 2 weeks

Looks good. Only way to test it is to merge, right? So lets try this…

Well, not really :-D

This job was skipped

Maybe something checks if the right files where changed and only then allows the Action to run. But  re-running the last action https://github.com/openstreetmap/id-tagging-schema/actions/workflows/deploy.yml does not work either, it shows the same error (I thought it would use the current code to run but maybe it uses the specific commit…).
=> We will just have to wait until we merge something else, I guess.

@k-yle the prettier merge just now ran the script in https://github.com/openstreetmap/id-tagging-schema/actions/runs/9411968617 and it still fails.

@tordans it's a different error now, because pushing directly to the main branch is no longer allowed:

One solution is to make the bot automatically opens a PR instead of committing to main, but @tyrasd should probably make a decision about what to do.
For completeness: another solution would be to move store the dist files in a dedicated branch, instead of a folder on the main branch. This is the more standard, but it would be a major breaking change

pushing directly to the main branch is no longer allowed

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

I'm interested to know if this is possible, because last time I checked, it was only possible to make exceptions for Users/Bots/GitHub Apps, but not GitHub Actions^1, since actions use the repository's GITHUB_TOKEN.

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

I did a bit of research and as far as I see, there is no good way to make this work (see also this short discussion on the repo of the github action we use in the workflow), at least not easily. :shrug:
We could either disable the branch protection rules again (and manually check that our "branch/PR rules" are followed), or otherwise make sure that the necessary "deploy" routine is performed when each PR is merged.
My quick opinion would be that the second option might be more error-prone in the long term than the first. What do you think?

A third option would be to do the "deploy" of the interim folder into a separate branch, which would not have to be protected. Then we only need to adjust the respective scripts in iD and transifex to point to the new branch. That's probably the better solution here.


Full width in production

Hi!
I can't understand what is going on. Under development environment it's all working good but under production the ul with classes nav nav-pills nav-tabs-horizontal don't respect its container size and show with full width. My code is exactly the same from demo. I am suspicious of being something related to load page and assets speed, load order. My assets are under CloudFront CDN.
Do you have some idea what could be and how to fix it?
Thanks!

Found, there was something related to be inside a <table class="table table-bordered">.  Move the role block outside the table and it works. No time to find the reason.


Minor tutorial updates

Use go install, rather than go build
Use the go executable in the final command

Related to @rnjudge's issues with the current tutorial in issue #14

@rnjudge I'm guessing that the go/bin directory isn't on your path? Try:
export PATH=$PATH:$HOME/go/bin/

and see if it can find the sbom-scorecard binary then.

@justinabrahms go/bin is in my path. does this look right?
rose@rose-vm:~/ternenv/sbom-scorecard$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/home/rose/go/bin

but still no luck with scorecard command

@rnjudge Can you try this one?
go install github.com/ebay/sbom-scorecard/cmd/sbom-scorecard@latest

That should put an sbom-scorecard binary in the right spot.

@justinabrahms that did it -- Thank you! Suggest adding that to the tutorial :)


[FLINK-25697][Runtime / Metrics] introduce port url config for prometheus push gateway a…

…nd deprecate host/port configs
What is the purpose of the change
Support scheme specification in Prometheus Push Gateway Reporter
Brief change log

Introduce new host url config that unifies scheme, host, and port specification
Deprecate host and port configs

Verifying this change
This change added tests and can be verified as follows:

Added unit tests to verify the final Prometheus Push Gateway URL

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): yes
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector:  no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? docs

@flinkbot run azure


add todo tasks functionalities

todo tt/Write tests c/write test for newly added features

@jitwei98 any idea why travis is not tracking this??

@jitwei98 I am very sad

@jitwei98 yay can merge and close the pr?

Good job on the new feature!


about NC meshing: "MFEM NC mesh v1.0", 3 questions

For the .mesh file,  in the "elements part", does the attribute value of the root element need to be the same as that of the leaf element? Because I want to refine some areas to simulate the interface more accurately.

For the .mesh file,  in the "elements part", can I just write leaf elements?

For the .mesh file, in the "vertex_parents", can I write most of the node relationships, whether they're newly generated hanging nodes or newly generated non-hanging nodes, as long as those nodes can be computed from the "coordinates" part?

There is some documentation on the MFEM website, relevant to your questions:
https://mfem.org/mesh-format-v1.0/#mfem-nc-mesh-v10

Elements inherit attributes from their parents.
The documentation says that all elements should be listed, both active (leaf) and inactive (refined parents).
To quote the documentation, "In fact, any vertex that was created as a result of refinement always has two "parent" vertices and needs to be listed in the vertex_parents section."

Hopefully this helps, but please let us know if you have more questions or suggestions to improve the documentation.


Focus bar on side bar view isn't shown without activity bar

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.84.0
OS Version: Windows 11

Steps to Reproduce:

Put the activity bar top or hidden
Restore the window if necessary - this doesn't occur when maximized
Click on the explorer bar

Related to #197178 - fixing that would probably fix this

do not related, but sash is thinner on find widget of terminal too:

versus editor find widget:


rpc: add ability to drop entire channel graph to re-sync

When I run describegraph some JSON fields are empty, because of the setting neutrino.validatechannels=false that was temporarily activated by Umbrel while syncing the blockchain.
Is there any way to correct this without having to close all my channels and start from scratch with a clean database?
It should technically be possible to overwrite the missing fields after Neutrino is disabled, so why does this not happen?

The only way is to delete your channel graph and have it all re-synced. The channel graph is stored along with the other information, so it would need to be separated first.
The only way to get all that information would be to 100% re-sync the entire graph (which also means fetching all the relevant blocks to find out the true channel amount). As you add new channels, it'll have the full capacity information.

No, that stores other important information. You'll start to populate the information for new channels. Switching between syncing backends isn't officially support, which can lead to behavior like what you're seeing.

You can use chantools dropchannelgraph which does exactly what you need, just implemented in an external tool. It's not super well tested and not officially supported. So please use with caution until this is implemented in lnd itself.

The fee information for the own channels is also stored in the graph. That's why "resetting the graph" isn't a trivial task.
But I think you should be able to fix it by setting the fees for all your own channels. You should be able to do that for all channels at once with lncli updatechanpolicy if you don't specify --chan_point.

I think you just need to let things run for a while and wait for all graph updates to come in. This shouldn't result in any force closures.

Thanks, I'm looking into it.

Okay, I know what the problem is. The own channels aren't added to the graph when they are announced on the network. So they need to be inserted after dropping the graph. I have added that functionality to chantools, so it should be relatively straight forward to fix. Can you contact me on Slack please so I can instruct you on how to use the new functionality?

@guggero Was this ever resolved? Had a power outage and could not resolve power outage before UPS ran out of power a couple weeks ago. Now it appears my graph is totally out of sync, creating rebalance issues, breaking charge-lnd's ability to set fees (getchannelinfo returns not found for channels that should be found, for example) and also causing certain routing errors. The routing errors are huge as it is resulting in my channels not being checked for routing due to exorbitantly high failure rates (failure rate is 10x what is was before powoer outage). Fortunately, it appears my channel.db is fine which is a reliieve. Took ~2 weeks to figure out the problem. I agree with @kreoese that a graph resync should be native to lnd, as a healthy graph is absolutely essential to the functionality and extension of lnd and it's rpc api, the latter of which is the primary selling point of lnd over cln.

There is chantools dropchannelgraph but that should NOT be used as it doesn't correctly restore all local channels yet. I think some way of forcing a re-sync (instead of just dropping the whole graph) should be implemented in lnd itself...
Re-opening the issue with the hope that anyone has the time to look into it.


Bug: fails linking exactly same positions

Using a sparse matrix with lap, the value 0 is assumed to be infinite, and thus not connected. One needs to add an offset to the matrix elements corresponding to finite values.

This seems to be caused by scipy bug:
https://github.com/scipy/scipy/issues/9417
https://stackoverflow.com/questions/53072911/how-do-you-store-explicit-0-values-in-a-scipy-sparse-lil-matrix

looks like this issue reappeared at some point, just ran into this problem while using the current pip release

Thanks @grfrederic for the report!
Could you provide a minimum reproducible example?
It seems this automatic test is working.
https://github.com/yfukai/laptrack/blob/a36cc10b227cede837aef82526a3e7955c60a14f/tests/test_tracking.py#L190-L199
The input here is
[np.array([[10, 10], [12, 11]]), np.array([[10, 10], [13, 11]])]

Yes, I've had a bit more time to play with it. I have tried running the automatic test on my own too, and it worked.
I have attached an example dataframe (CSV file) where the issue occurs, and a plot of my result.
Here is the code I used to create the tracks:
data = pd.read_csv('~/tmp/example.csv')

max_distance = 15

lt = LapTrack(
    track_cost_cutoff=15**2,
    splitting_cost_cutoff=15**2,
    merging_cost_cutoff=15**2,
)

track_df, split_df, merge_df = lt.predict_dataframe(
    data,
    coordinate_cols=["h"],
    frame_col="seconds",
    only_coordinate_cols=False,
)

Finally, I noticed that setting some of the costs fixes the issue: for example, if I add track_start_cost=1 i get two tracks just as I would expect.

example.csv

Thanks @grfrederic ! I'll definitely check it but I'm in a vacation and it might take a while.

No problem, you enjoy your vacation :) I'll use the small noise workaround for now, it works well. Should we reopen this issue?

Yeah let's reopen this!

@grfrederic I found the cause. It was a bug only happens when there's only a single non-moving particle in the coordinate. Will be fixed in #372. Thanks for your report again!

awesome, thank you for your help!


feat: add Kinoite variant

Added Plasma images alongside GNOME

this would be really cool. Cosmic is very similar to GNOME but this would be an interesting experiment

IMO I can't really see a benefit.  Once Cosmic is stable enough, I can see us removing the Silverblue variant as it's only really there as a fallback when the user faces issues with Cosmic DE.
Happy to hear your thoughts on this though.

also btw GNOME Wayland currently does not launch for me.


WIP: this issue is used to record all the PRs of minor corrections

Some minor corrections are made by following PRs.

These lines should be removed:
https://github.com/iquizoo/pages/blob/8f5191402d15d4e1ca1ae948f7c282b6452393d1/content/post/00102_Flanker2.html#L174-L180
And None should be added to user's response record:
https://github.com/iquizoo/pages/blob/8f5191402d15d4e1ca1ae948f7c282b6452393d1/content/post/00102_Flanker2.html#L252-L256

There is no need for this record now.


Add minescapes.net

General:

[ ] The pull request title is descriptive. (ex. Added Lunar Network, not Updated servers.json)
[ ] The pull request does not contain any unrelated commits.  (ex. commits from previous pull requests)

Mapping Additions or Updates:

[ ] My formatting matches the pre-existing formatting.
[ ] There are no syntax errors.
[ ] There is no pre-existing mapping with my id.
[ ] My field values match your requirements.
You can view our patterns here: servers.schema.json, or take a look below and complete the field checklist:

[ ] id: a lowercase string (ex. myserver)
[ ] name: a string (ex. MyServerPvP)
[ ] addresses: an array with lowercase strings (ex. of address my.server)

You do not need to specify sub-domains, Lunar Client services automatically detect them.

Logo Additions or Updates:

[ ] My image is a .png file.
[ ] I uploaded the image in the logos directory.
[ ] My image is transparent & square (1:1 aspect ratio).
[ ] My image is a minimum of 512 pixels in width and height.
[ ] My images image name matches its mapping id.

@jacobk999 Why was this closed?


feat: Fixed bugs, super non-specific

No description needed

Pull Request Summary from Gemini
Pull Request Summary
This pull request introduces changes to the Hello World.ipynb notebook, demonstrating the usage of Google Cloud's generative AI capabilities.
Changes:

Added a section with system instructions for the model: This section provides the generative model with a specific persona (a cheerful professor) to shape the generated content.
Included a prompt and generated response:  The notebook now prompts the model with a question ("Why is the sky blue?") and showcases the generated response.

Overall, this pull request enhances the Hello World notebook by providing a more detailed and functional demonstration of Google Cloud's generative AI capabilities.

Pull Request Summary from Gemini
Pull Request Summary
This pull request adds a new section to the Hello World notebook. This section contains a code block demonstrating how to use the Gemini model to generate text. The code utilizes the vertexai library to interact with the model and generate responses based on user input.
The provided prompt asks the model to explain why the sky is blue. The code then outputs the generated text as a response.
New Title: feat(notebook): Add Gemini model example to Hello World notebook
This title adheres to the conventionalcommits.org standard by specifying the type of change (feat), the scope (notebook), and a brief description of the change.

Pull Request Summary from Gemini ✨
Pull Request Summary from Gemini ✨
This pull request adds a new section to the "Hello World" notebook, providing information about how to use Vertex AI Generative AI to answer questions. The new section includes code that imports necessary libraries, sets up a model instance, and generates a response to a simple question.
New Title: feat(notebooks): Add example of answering questions using Vertex AI Generative AI

Pull Request Analysis from Gemini ✨
[
{
"filename": "notebooks/Hello World.ipynb",
"line_number": 1,
"content": "

## Pull Request Summary from Gemini ✨
This Pull Request introduces a new feature to the repository. It updates the `Hello World.ipynb` notebook to demonstrate using the Gemini model for text generation tasks.  The notebook also includes a new section with important information.

The changes include:

Adding a new markdown cell to the notebook, explaining the importance of the changes.
Updating the code in a code cell to load the Gemini model with system instructions and generate content using it.

This Pull Request enhances the functionality of the repository by providing a working example of how to use Gemini model for text generation tasks.
## Analysis from Gemini ✨
## Code Analysis for `summarize_pr.py`

File: summarize_pr.py
Line 1-5:

Improvement:  Add type hints to the imports. This improves readability and helps IDEs understand the code better.

import os
import requests
from ghapi.all import GhApi  # type: ignore
import gzip
import base64

Line 7-8:

Improvement:  Add type hints to the imports.

from typing import Tuple
import vertexai

Line 10-27:

Improvement: Add type hints for function parameters and return types.
Improvement: Rename pr_content to pull_request_content for consistency.
Improvement: Consider using a structured format for the pull request content. For example, instead of concatenating strings, use a dictionary to store the information for each file, including filename, code diff, and raw file content. This would improve the structure and maintainability of the code.

def _get_pr_content(api: GhApi, pr_number: str) -> str:
    # Fetch PR details
    pr = api.pulls.get(pr_number)
    files = api.pulls.list_files(pr_number)

    pull_request_content = ""

    # Extract and print title and description
    pull_request_content += f" Title: {pr.title}\n"
    pull_request_content += f"Pull Request Description: {pr.body}\n"

    # Fetch and print code diff
    pull_request_content += "\n--- Files Changed ---\n"
    for file in files:
        pull_request_content += f"File name: {file.filename}\n\n"

        patch = getattr(file, "patch", None)
        if patch:
            if patch.startswith("Binary files"):
                pull_request_content += "Binary file - Skipping Code Diff\n\n"
                continue
            pull_request_content += f"Code Diff:\n{patch}\n\n"

        raw_url = getattr(file, "raw_url", None)
        if raw_url:
            response = requests.get(raw_url)
            if response.status_code == 200:
                pull_request_content += (
                    f"Raw File Content:\n```\n{response.text}\n```\n\n"
                )

    return pull_request_content

Line 29-57:

Improvement: Add type hints for function parameters and return types.
Improvement: Consider creating a separate function to generate the prompt for the model. This will improve the readability and organization of the code.
Improvement: Consider using a templating engine to format the prompt. This will make it easier to create complex prompts and keep the code clean.
Improvement: Use f-strings for string formatting instead of using + operator for better readability.

def _process_code_base(
    pull_request_content: str, model_id: str, task_prompt: str, post_prompt: str = ""
):
    model = GenerativeModel(
        model_id,
        system_instruction=[
            "You are an expert software engineer.",
        ],
        generation_config=GenerationConfig(
            max_output_tokens=8192,
        ),
    )
    prompt = [
        "The following is the content of a GitHub Pull Request for a repository focused on Generative AI with Google Cloud. This content includes the Pull Request title, Pull Request description, a list of all of the files changed with the file name, the code diff and the raw file content.",
        task_prompt,
        "Pull Request Content:",
        pull_request_content,
        post_prompt,
    ]

    print("---Prompt---\n", prompt)
    response = model.generate_content(prompt)
    print("---Gemini Response---\n", response)
    return response.text

Line 59-85:

Improvement: Add type hints for function parameters and return types.
Improvement: Consider creating a separate function to handle the posting of the summary as a comment. This will improve the readability and organization of the code.
Improvement: Consider adding error handling to catch potential errors during the posting of the comment. This will make the code more robust.

def analyze_pr(api: GhApi, pr_number: str, model_id: str) -> Tuple[str, str]:
    pull_request_content = _get_pr_content(api, pr_number)

    summarize_output = _process_code_base(
        pull_request_content,
        model_id,
        "Your task is to summarize the Pull Request in Markdown format.",
        post_prompt="Summary:",
    )

    analysis_output = _process_code_base(
        pull_request_content,
        model_id,
        task_prompt="Your task is to analyze each code file line by line, then output any bugs you find and improvements that can be made to the code quality for readability and maintainability.",
        post_prompt="Analysis:",
    )

    comment_content = f"""
    ## Pull Request Summary from Gemini ✨
    {summarize_output}

    ## Analysis from Gemini ✨
    {analysis_output}
    """

    # Post the summary as a comment
    api.issues.create_comment(pr_number, comment_content)

    return summarize_output, analysis_output

Line 87-128:

Improvement: Add type hints for function parameters and return types.
Improvement: Consider creating a separate function to handle the generation of the SARIF file. This will improve the readability and organization of the code.
Improvement: Consider adding error handling to catch potential errors during the generation of the SARIF file. This will make the code more robust.
Improvement: Consider using a library to generate the SARIF file instead of manually constructing the JSON. This will simplify the code and improve its maintainability.

def convert_to_sarif(model_id: str, analysis_content: str) -> str:
    model = GenerativeModel(
        model_id,
        system_instruction=[
            "You are an expert software engineer.",
        ],
    )

    generation_config = GenerationConfig(
        response_mime_type="application/json",
        max_output_tokens=8192,
    )

    sarif_schema = requests.get(
        "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/123e95847b13fbdd4cbe2120fa5e33355d4a042b/Schemata/sarif-schema-2.1.0.json"
    ).text

    prompt = [
        "The following is analysis of a GitHub Pull Request.",
        "Your task is to convert this into SARIF (Static Analysis Results Interchange Format) format.",
        "This is the SARIF schema:",
        sarif_schema,
        "Analysis Content:",
        analysis_content,
        "SARIF:"
        """{"$schema": "https://json-schema.org/draft/2020-12/schema#", "version": "2.1.0", "runs": [{"tool": {"driver": {"name": "Gemini", "shortDescription": {"text": "A large language model capable of generating text, translating languages, writing different kinds of creative content, and answering your questions in an informative way."}, "fullDescription": {"text": "Gemini Pro is a large language model (LLM) developed by Google AI. It is trained on a massive dataset of text and code, and can be used for a wide variety of tasks, including text generation, translation, writing different kinds of creative content, and answering your questions in an informative way."}}}, "results":""",
    ]

    print("---Prompt---\n", prompt)
    response = model.generate_content(prompt, generation_config=generation_config)
    print("---Gemini Response---\n", response)

    return response.text

Line 130-146:

Improvement: Add type hints for function parameters.
Improvement: Consider creating a separate function to handle the uploading of the SARIF file. This will improve the readability and organization of the code.
Improvement: Consider adding error handling to catch potential errors during the uploading of the SARIF file. This will make the code more robust.

def upload_sarif(api: GhApi, pr_number: str, sarif_text: str):
    encoded_data = base64.b64encode(gzip.compress(sarif_text.encode("utf-8"))).decode(
        "utf-8"
    )

    commits = api.pulls.list_commits(pr_number)

    sarif_response = api.code_scanning.upload_sarif(
        commit_sha=commits[-1]["sha"],
        sarif=encoded_data,
        ref=f"refs/pull/{pr_number}/head",
    )

    return sarif_response

Line 148-166:

Improvement: Add type hints for variables.
Improvement: Consider using a configuration file to store the environment variables instead of hardcoding them. This will make the code more flexible and easier to maintain.
Improvement: Consider adding error handling to catch potential errors during the initialization of the GitHub API client. This will make the code more robust.

if __name__ == "__main__":
    vertexai.init()

    # Get GitHub token (store securely in Cloud Build secrets)
    GITHUB_TOKEN: str = os.environ["GITHUB_TOKEN"]

    # Get PR information from environment variables (set by Cloud Build)
    OWNER: str = os.environ["REPO_FULL_NAME"].split("/")[0]
    REPO: str = os.environ["REPO_NAME"]
    PR_NUMBER: str = os.environ["PR_NUMBER"]

    MODEL_ID: str = os.environ.get("MODEL_ID", "gemini-1.5-flash-preview-0514")

    USE_SARIF: bool = False
    # Initialize GitHub API client
    API = GhApi(owner=OWNER, repo=REPO, token=GITHUB_TOKEN)

    summarize_output, analysis_output = analyze_pr(API, PR_NUMBER, MODEL_ID)

    if USE_SARIF:
        # Create line by line analysis in SARIF format
        # https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning
        sarif_text = convert_to_sarif(MODEL_ID, analysis_output)
        sarif_response = upload_sarif(API, PR_NUMBER, sarif_text)

Bug: The code assumes that REPO_FULL_NAME environment variable is in the format OWNER/REPO. If this format is not followed, the code will fail.
Potential Improvements:

Add more detailed logging: Include information about the current step, the prompt used, and the response from the model. This will help you debug any issues that arise.
Add unit tests: This will help ensure that the code is working as expected and that any changes you make don't break existing functionality.
Use a dedicated library for generating SARIF files:  Leverage the power of libraries dedicated to generating SARIF files for better accuracy and maintainability.

Overall:
The code is generally well-written, but there are several areas where it could be improved. The suggested improvements will help make the code more readable, maintainable, and robust.

Pull Request Summary from Gemini ✨
This Pull Request adds a new section to the Hello World Jupyter Notebook with a code example that uses the gemini-1.5-flash-preview-0514 model to generate content.
The new section provides a clear and concise explanation of how to use the Vertex AI Generative Models API to interact with the model.
It also showcases a simple example of how to prompt the model with a question and receive a generated response.
Overall, this change enhances the notebook by introducing a practical demonstration of Generative AI capabilities within the context of Vertex AI.
Code Analysis from Gemini ✨
Code Analysis:
File: notebooks/Hello World.ipynb

Bug:  The code in the Jupyter Notebook is not using the GenerationConfig object which is imported but not used. It should be used to control the generation process, for example, by setting the maximum number of tokens, temperature, or top_p values.
Improvement: The MODEL_ID is hardcoded within the notebook. It's better to define it as a variable at the top of the script and possibly take it as input from the user or environment variable. This will make it easier to change the model if needed.
Improvement: The comment # Load a example model with system instructions is not very descriptive. It should clearly mention what specific system instructions are being set and why.
Improvement: The prompt variable should be better formatted. Consider using multi-line strings or a more visually appealing format for easier reading and understanding.
Improvement: The # Set contents to send to the model and # Prompt the model to generate content comments are not necessary. The code is self-explanatory.
Improvement: The use of print to display the model response is not recommended for Jupyter Notebooks. Use the print statement within the code cell instead, or use display function for better visualization.

File: summarize_pr.py

Bug: The review_pr function is not properly formatted. The JSON structure should use indentation to improve readability.
Improvement: The review_json_format should include line numbers and side, making it more complete. The structure is incomplete because the side key is missing and the line number is represented by a string, while it should be an integer.
Improvement: The prompt in the review_pr function could be improved. It should specify that the output needs to be a JSON object.
Improvement: The convert_to_sarif function could be improved by using a more descriptive prompt and specifying that the SARIF format should be compliant with the schema provided.
Improvement: The upload_sarif function should be refactored to handle errors, such as the case where the SARIF file is too large or the upload fails. It should also include proper logging for debugging purposes.
Improvement: Add type annotations to functions for better code clarity and maintainability.
Improvement: Consider using a dedicated logging library (like logging) instead of print statements for more structured logging.
Improvement: The USE_SARIF variable is defined but not used in the if __name__ == "__main__": block. It's better to remove it or use it to control the SARIF upload logic.

Recommendations for Improvements:

Refactor the code to be more modular. Create separate functions for each major step of the process (e.g., fetching PR content, generating summaries, reviewing code, converting to SARIF, uploading SARIF).
Use a consistent coding style throughout the project. Follow a style guide (e.g., PEP 8) to make the code more readable and maintainable.
Add unit tests to ensure that the code is working as expected. Write tests for each function to catch regressions and improve code quality.
Add documentation to the code to explain the purpose of each function and how to use it. This will help other developers understand and maintain the code.
Add error handling to the code to make it more robust. Handle unexpected errors and exceptions gracefully.

These improvements will make the code more readable, maintainable, and reliable.
Generated at Commit: 7dd33de526bf645afc757fff08a7ac7d71153d05

Pull Request Summary from Gemini ✨
This Pull Request introduces several changes to the codebase, primarily focused on integrating a new model for code analysis.

The main changes are in the notebooks/Hello World.ipynb file, which demonstrates how to interact with a generative model using Vertex AI.
The updated code leverages a more recent model, "gemini-1.5-flash-preview-0514", for generating text based on user prompts.
The model is also configured with a system instruction to act as a "cheerful professor", adding a distinct tone to the generated text.
The prompt used in the code asks the model to explain why the sky is blue, showcasing a straightforward example of using the model for information retrieval.

While the Pull Request description is vague, the code updates clearly demonstrate a shift towards using more advanced generative models for interacting with code and providing informative insights.
Code Analysis from Gemini ✨
Code Analysis:
File: notebooks/Hello World.ipynb

Potential Improvement: The code cell imports GenerationConfig, HarmBlockThreshold, HarmCategory, and Part from the vertexai.generative_models module, but these imports are not used in the code. It's best practice to remove unused imports.

# Remove unused imports
# import vertexai
from vertexai.generative_models import (
    GenerativeModel,
)

Potential Improvement: The code cell uses a hardcoded model ID gemini-1.5-flash-preview-0514. It's recommended to define the model ID as an environment variable or a configuration file for easier management and updating.

# Define model ID as an environment variable
MODEL_ID = os.environ.get("MODEL_ID", "gemini-1.5-flash-preview-0514")

# ... rest of the code ...

Potential Improvement: The prompt used for the model is currently a multi-line string. It would be more readable and easier to maintain to use a f-string.

prompt = f"""
  User input: Why is the sky blue?
  Answer:
"""

File: summarize_pr.py

Bug: The _get_pr_content function currently does not handle the case where there are no files changed in the PR. This will cause an error if the PR is empty.

Solution: Add a check for empty files list and return an appropriate message.

def _get_pr_content(api: GhApi, pr_number: str) -> str:
    # Fetch PR details
    pr = api.pulls.get(pr_number)
    files = api.pulls.list_files(pr_number)

    pull_request_content = ""

    # Extract and print title and description
    pull_request_content += f" Title: {pr.title}\n"
    pull_request_content += f"Pull Request Description: {pr.body}\n"

    # Fetch and print code diff
    pull_request_content += "\n--- Files Changed ---\n"
    if files: # Check if files list is empty
        for file in files:
            # ... rest of the code ...
    else:
        pull_request_content += "No files changed in this pull request.\n\n"
    return pull_request_content

Bug: The _process_code_base function is missing the vertexai.init() call before creating the GenerativeModel instance. This will cause an error.

Solution: Add vertexai.init() call within the function.

def _process_code_base(
    pull_request_content: str,
    model_id: str,
    task_prompt: str,
    post_prompt: str = "",
    response_mime_type: Optional[str] = None,
):
    vertexai.init() # Initialize Vertex AI
    model = GenerativeModel(
        model_id,
        system_instruction=[
            "You are an expert software engineer.",
        ],
        generation_config=GenerationConfig(
            max_output_tokens=8192,
            response_mime_type=response_mime_type,
        ),
    )
    # ... rest of the code ...

Potential Improvement: The analyze_pr function currently creates a comment on the PR even if the summary or analysis output is empty. This can be avoided by checking for empty strings before adding them to the comment content.

def analyze_pr(api: GhApi, pr_number: str, model_id: str) -> Tuple:
    # ... rest of the code ...
    comment_content = ""
    if summarize_output:
        comment_content += (
            f"# Pull Request Summary from Gemini ✨\n{summarize_output}\n\n"
        )
    if analysis_output:
        comment_content += f"# Code Analysis from Gemini ✨\n{analysis_output}\n"
    if comment_content: # Check if comment_content is not empty
        comment_content += f"""Generated at Commit: `{latest_commit}`"""

    # ... rest of the code ...

Potential Improvement: The review_pr function could benefit from adding a default value for the comments list in the JSON format. This will prevent potential errors if the model doesn't provide any comments.

review_json_format = "{'body': 'Summary of the review', 'comments': []}" # Add default value for comments

# ... rest of the code ...

Potential Improvement: The convert_to_sarif function has a hardcoded SARIF schema URL. It's recommended to define it as a variable for easier management and updating.

sarif_schema_url = "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/123e95847b13fbdd4cbe2120fa5e33355d4a042b/Schemata/sarif-schema-2.1.0.json"

# ... rest of the code ...

sarif_schema = requests.get(sarif_schema_url).text

Potential Improvement: The convert_to_sarif function includes a large hardcoded JSON string for the SARIF object. It's more readable and maintainable to define it as a separate dictionary and then use f-strings to insert dynamic values.

sarif_base = {
    "$schema": "https://json-schema.org/draft/2020-12/schema#",
    "version": "2.1.0",
    "runs": [
        {
            "tool": {
                "driver": {
                    "name": "Gemini",
                    "shortDescription": {"text": "A large language model capable of generating text, translating languages, writing different kinds of creative content, and answering your questions in an informative way."},
                    "fullDescription": {"text": "Gemini Pro is a large language model (LLM) developed by Google AI. It is trained on a massive dataset of text and code, and can be used for a wide variety of tasks, including text generation, translation, writing different kinds of creative content, and answering your questions in an informative way."}
                }
            },
            "results":
        }
    ]
}

# ... rest of the code ...

sarif_text = f"""{json.dumps(sarif_base, indent=4)}"""

Potential Improvement: The upload_sarif function currently uses a hardcoded ref value. It's recommended to define it as a variable for better flexibility.

ref = f"refs/pull/{pr_number}/head"

# ... rest of the code ...

sarif_response = api.code_scanning.upload_sarif(
        commit_sha=commits[-1]["sha"],
        sarif=encoded_data,
        ref=ref,
    )

Potential Improvement: The __main__ block could benefit from a more descriptive variable name for USE_SARIF. For example, UPLOAD_SARIF.

UPLOAD_SARIF = False # More descriptive variable name

Summary of Improvements:

Add missing vertexai.init() calls where required.
Remove unused imports.
Use environment variables or configuration files for better management of constants.
Use f-strings for better readability and maintainability of prompts and JSON structures.
Handle potential errors, such as empty PRs or missing output from the model.
Add checks for empty strings before adding them to the comment content.
Define default values for optional fields in JSON formats to prevent potential errors.

These improvements will increase the robustness, maintainability, and readability of the code.
Generated at Commit: 36f2c784b028241615d4cdc5d3dbcf83c51ac6d0


Add legacy DispatchError mapping

Followed https://github.com/polkadot-js/api/issues/5172

@jacogr does this correct?

It looks correct, for old blocks.
Another example for Kusama for historic blocks before Substrate made the change to the format - https://github.com/polkadot-js/api/blob/master/packages/types-known/src/spec/kusama.ts#L13


Installing current<EMAIL_ADDRESS>version in Angular 8 produces error.

I'm submitting a...

[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request

In package

[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior
I'm trying to add universal toolkit to existing Angular 8 project.
I've managed to install the package by installing separate packages, like so:
ng add @nguniversal/express-engine --clientProject {projectName}
npm install @nguniversal/common --save
npm install<EMAIL_ADDRESS>--save

But this shouldn't be the case.
Expected behavior
Run ng add<EMAIL_ADDRESS>--save in the terminal to install server-side rendering for Angular.
Minimal reproduction of the problem with instructions
As above, trying to run
ng add<EMAIL_ADDRESS>--save
causes an error
+<EMAIL_ADDRESS>added 22 packages from 8 contributors and audited 22347 packages in 17.87s
found 7 vulnerabilities (1 moderate, 6 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Installed packages for tooling via npm.
[bugsnag] Loaded!
ERROR: Cannot read property 'architect' of undefined
ERROR: If you think that this error shouldn't occur, please fill up bug report here: https://github.com/maciejtreder/ng-toolkit/issues/new
INFO: stacktrace has been sent to tracking system.
Nothing to be done.

Example repository
Sadly, I can't share the repository but I will post my package.json and angular.json files.
{
  "name": "XXXYYY-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "my-scripts": ""
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.0.0",
    "@angular/common": "~8.0.0",
    "@angular/compiler": "~8.0.0",
    "@angular/core": "~8.0.0",
    "@angular/forms": "~8.0.0",
    "@angular/platform-browser": "~8.0.0",
    "@angular/platform-browser-dynamic": "~8.0.0",
    "@angular/pwa": "^0.803.4",
    "@angular/router": "~8.0.0",
    "@angular/service-worker": "~8.0.0",
    "@ng-select/ng-select": "^3.0.6",
    "@ng-toolkit/universal": "^8.0.3",
    "apollo-angular": "^1.6.0",
    "apollo-angular-link-http": "^1.8.0",
    "apollo-cache-inmemory": "^1.6.2",
    "apollo-client": "^2.6.3",
    "apollo-link": "^1.2.12",
    "apollo-link-error": "^1.1.11",
    "date-fns": "^1.30.1",
    "decko": "^1.2.0",
    "graphql": "^14.4.2",
    "graphql-tag": "^2.10.1",
    "headroom.js": "^0.10.3",
    "jquery": "^3.4.1",
    "ng2-datepicker": "^3.1.1",
    "ngx-cookie-service": "^2.2.0",
    "ngx-facebook": "^2.4.0",
    "ngx-hm-carousel": "^1.6.5-bata.1",
    "ngx-slick-carousel": "^0.4.4",
    "ngx-take-until-destroy": "^5.4.0",
    "ngx-textarea-autosize": "^2.0.3",
    "rxjs": "~6.4.0",
    "slick-carousel": "^1.8.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.800.0",
    "@angular-devkit/build-ng-packagr": "~0.800.0",
    "@angular/cli": "~8.0.1",
    "@angular/compiler-cli": "~8.0.0",
    "@angular/language-service": "~8.0.0",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "ng-packagr": "^5.1.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tsickle": "^0.35.0",
    "tslint": "~5.15.0",
    "typescript": "~3.4.3",
    "webpack-bundle-analyzer": "^3.5.2"
  }
}

{
  "$schema"<EMAIL_ADDRESS>  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "XXX": {
      "projectType": "application",
      "schematics": {
        "@schematics/angular:component": {
          "style": "sass"
        }
      },
      "root": "projects/XXX",
      "sourceRoot": "projects/XXX/src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/xxx",
            "index": "projects/XXX/src/index.html",
            "main": "projects/XXX/src/main.ts",
            "polyfills": "projects/XXX/src/polyfills.ts",
            "tsConfig": "projects/XXX/tsconfig.app.json",
            "assets": [
              "projects/XXX/src/favicon.ico",
              "projects/XXX/src/assets",
              "projects/XXX/src/manifest.json"
            ],
            "styles": [
                "node_modules/slick-carousel/slick/slick.scss",
<EMAIL_ADDRESS>                "projects/ui-styles/icon-fonts/style.css",
                "projects/ui-styles/normalize.css",
                "projects/XXX/src/styles.sass"
            ],
            "scripts": [
                "node_modules/jquery/dist/jquery.min.js",
                "node_modules/slick-carousel/slick/slick.min.js"
            ]
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "projects/XXX/src/environments/environment.ts",
                  "with": "projects/XXX/src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                }
              ],
              "serviceWorker": true,
              "ngswConfigPath": "projects/XXX/ngsw-config.json"
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "XXX:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "XXX:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "XXX:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "projects/XXX/src/test.ts",
            "polyfills": "projects/XXX/src/polyfills.ts",
            "tsConfig": "projects/XXX/tsconfig.spec.json",
            "karmaConfig": "projects/XXX/karma.conf.js",
            "assets": [
              "projects/XXX/src/favicon.ico",
              "projects/XXX/src/assets",
              "projects/XXX/src/manifest.webmanifest"
            ],
            "styles": [
                "projects/ui-styles/normalize.css",
                "projects/ui-styles/main.sass",
                "projects/XXX/src/styles.sass"
            ],
            "scripts": [
                "node_modules/jquery/dist/jquery.min.js",
                "node_modules/slick-carousel/slick/slick.min.js"
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "projects/XXX/tsconfig.app.json",
              "projects/XXX/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        },
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "projects/XXX/e2e/protractor.conf.js",
            "devServerTarget": "XXX:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "XXX:serve:production"
            }
          }
        }
      }
    },
    "YYY": {
      "projectType": "application",
      "schematics": {
        "@schematics/angular:component": {
          "style": "sass"
        }
      },
      "root": "projects/YYY",
      "sourceRoot": "projects/YYY/src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/en",
            "index": "projects/YYY/src/index.html",
            "main": "projects/YYY/src/main.ts",
            "polyfills": "projects/YYY/src/polyfills.ts",
            "tsConfig": "projects/YYY/tsconfig.app.json",
            "assets": [
              "projects/YYY/src/favicon.ico",
              "projects/YYY/src/assets",
              "projects/YYY/src/manifest.json"
            ],
            "styles": [
                "node_modules/slick-carousel/slick/slick.scss",
<EMAIL_ADDRESS>                "projects/ui-styles/icon-fonts/style.css",
                "projects/ui-styles/normalize.css",
                "projects/YYY/src/styles.sass"
            ],
            "scripts": [
                "node_modules/jquery/dist/jquery.min.js",
                "node_modules/slick-carousel/slick/slick.min.js"
            ]
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "projects/YYY/src/environments/environment.ts",
                  "with": "projects/YYY/src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                }
              ],
              "serviceWorker": true,
              "ngswConfigPath": "projects/YYY/ngsw-config.json"
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "YYY:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "YYY:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "YYY:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "projects/YYY/src/test.ts",
            "polyfills": "projects/YYY/src/polyfills.ts",
            "tsConfig": "projects/YYY/tsconfig.spec.json",
            "karmaConfig": "projects/YYY/karma.conf.js",
            "assets": [
              "projects/YYY/src/favicon.ico",
              "projects/YYY/src/assets",
              "projects/YYY/src/manifest.webmanifest"
            ],
            "styles": [
                "projects/ui-styles/normalize.css",
                "projects/ui-styles/main.sass",
                "projects/YYY/src/styles.sass"
            ],
            "scripts": [
                "node_modules/jquery/dist/jquery.min.js",
                "node_modules/slick-carousel/slick/slick.min.js"
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "projects/YYY/tsconfig.app.json",
              "projects/YYY/tsconfig.spec.json",
              "projects/YYY/e2e/tsconfig.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        },
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "projects/YYY/e2e/protractor.conf.js",
            "devServerTarget": "YYY:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "YYY:serve:production"
            }
          }
        }
      }
    },
    "XY-lib": {
      "projectType": "library",
      "root": "projects/XY-lib",
      "sourceRoot": "projects/XY-lib/src",
      "prefix": "lib",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-ng-packagr:build",
          "options": {
            "tsConfig": "projects/XY-lib/tsconfig.lib.json",
            "project": "projects/XY-lib/ng-package.json"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "projects/XY-lib/src/test.ts",
            "tsConfig": "projects/XY-lib/tsconfig.spec.json",
            "karmaConfig": "projects/XY-lib/karma.conf.js"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "projects/XY-lib/tsconfig.lib.json",
              "projects/XY-lib/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }},
  "defaultProject": "projects"
}

What is the motivation / use case for changing the behavior?

Environment

Angular version: 8.0.0

- Node version: 10.15.0
- Platform:  Windows & Mac

@KingDarBoja Hi! Can you please share what is the current progress? When could new version be delivered?
Sorry for pushing you but I really need some help with this.
Cheers!

Hello @mmiedzianyy
I do think it is not possible at the moment since you are using multi-projects on you angular.json file and this package can't handle (yet) such configuration.
However, I remember @maciejtreder doing some work on that topic.

Thanks for your reply @KingDarBoja.
Maybe I would have to consider splitting up applications on different projects...

It is better as each project would have its own configuration. I do think it is possible to implement such thing with Angular Universal packages but haven't seen any example on the web.

I do agree.. It's very hard to implement angular universal for multiple apps in one project.
I've tried to omit ng-toolkit and do my own SSR with packages I've found on the web, but with no luck.. The configuration would have taken too much time and I guess - as you suggested - it will be better to split it up.
I'll try to install current version of ng-toolkit on a fresh project and if I'll be successfull, will copy the projects.


Add FAQ?

I can help with FAQ -- what do yo need?

@KairaVillanueva I've had individual chats with people but not sure if an FAQ is needed. I started the Questions list in the wiki
I guess people can add questions to the wiki as they come up with them?


Testing with chromedriver: data:, in address bar

Describe the bug
When I start my test with wdio run wdio.conf.js the chromium browser starts but the address bar of the browser shows data: , instead of my baseurl.
As a result my tests are not executed at all.
When I set the config.capabilities to
      browserName: "chromium",
      binary: "/snap/bin/chromium",

the correct url is called in the browser.
When running with Firefox (geckodriver) the correct url is also run but in that case I get other errors in my test setup which don't appear when I'm using the chromium setting.
To Reproduce
Steps to reproduce the behavior:
This is my wdio.conf.js file
const { join } = require("path");

exports.config = {
  wdi5: {
    screenshotPath: join("webapp", "wdi5-test", "__screenshots__"),
    logLevel: "verbose", // error | verbose | silent
    waitForUI5Timeout: 30000,
  },
  //// wdio runner config
  specs: [join("webapp", "wdi5-test", "**/*.test.js")],
  // Patterns to exclude.
  exclude: [],
  //// capabilities ("browser") config
  maxInstances: 10,
  capabilities: [
    {
      // overwrite global "maxInstances"
      maxInstances: 5,
      browserName: "chrome",
      acceptInsecureCerts: true,
      "goog:chromeOptions": {
        args: process.argv.indexOf("--headless") > -1
          ? ["window-size=1440,800", "--headless"]
          : process.argv.indexOf("--debug") > -1
          ? ["window-size=1920,1280", "--auto-open-devtools-for-tabs"]
          : ["window-size=1920,1280"],
      },
      "wdi5:authentication": {
        provider: "BasicAuth", //> mandatory
      },
    },
  ],
  //// test config
  // Level of logging verbosity: trace | debug | info | warn | error | silent
  logLevel: "error",
  bail: 0,
  baseUrl: "http://localhost:4004/#fields-manage",

  waitforTimeout: 30000,
  connectionRetryTimeout: 60000,
  connectionRetryCount: 1,

  services: ["chromedriver", "ui5"],

  framework: "mocha",
  mochaOpts: {
    ui: "bdd",
    timeout: 60000,
  },
  reporters: ["spec"],
};

Expected behavior
I would expect that the my baseUrl http://localhost:4004/#fields-manage is called.
Logs/Console Output
./node_modules/.bin/wdio run wdio.conf.js

Execution of 1 workers started at 2023-01-14T09:05:01.894Z

[0-0] RUNNING in chrome - /webapp/wdi5-test/Journey.test.js
[0-0] FAILED in chrome - /webapp/wdi5-test/Journey.test.js

Spec Files:      0 passed, 1 failed, 1 total (100% completed) in 00:02:00

Screenshots

Runtime Env (please complete the following information):
My npm list output:
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>

wdi5/wdio-ui5-service-version: 1.0.5
UI5 version: 1.108.2
wdio-version (output of wdio --version): 7.29.1
node-version (output of node --version): v18.12.0
OS: Ubuntu Linux 20.04
Browser + Version: chromedriver 109

Additional context
I added some wdio hooks and set breakpoints.
As you can see in the screenshot the baseUrl is still correct in the beforeSession hook. The other functions I set breakpoints are not called.

usually the nav bar changes from data: (which indicates "remote control by software") to the actual URL of the app under test.
Dumb question: do you have the app running at localhost:4004 before you start off the actual test runs?
Asking this b/c wdi5 doesn't run any app starts, but "only" the tests.

In a live session @vobu and I figured out that it is necessary to have Google Chrome installed locally. I only had Chromium installed.


Update kernel version to 5.2.0-m4

This is to apply carbon kernel changes in 5.2.0-m4
Resolves: #261, #263

@daneshk : We would need to add test case to verify the deployment folders are working in both Server and Runtime deployment folders. As this is a change which is along with Carbon 5.2.0-m4

I have created issue #267 to track this, can we go ahead and merge this PR?


Update predeploys.md

Description
Small fix to the getL1FeeUpperBound return statement
Tests
N/A
Additional context
N/A
Metadata
N/A

Thank you @colman-mbuya !


Handle out-of-bound errors in CSE (#471)

Related issue(s)
Resolves #471
Description
Summary of changes
report an error when trying to access an array with index out-of-bounds during CSE
Checklist

[X] I have tested the changes locally.
[X] I have formatted the changes with Prettier and/or cargo fmt with default settings.
[X] I have linked this PR to the issue(s) that it resolves.
[X] I have reviewed the changes on GitHub, line by line.
[X] I have ensured all changes are covered in the description.

Could we thread location data into instructions (or rather NodeObj) so that we can display where the error has occurred as per the issue description?

Yes, we have already an issue open for this: #472

For some reason it looks like the secondary message of the diagnostic is not outputting for me. Is what I pasted above what you see or is your error more descriptive? I also did not get a secondary message for the diagnostic you added here: #672.

Yes I have the same, it is due to what I said in #672:

Note that the error is less user-friendly than the previous panic message, this is because errors with no location do not print the secondary message.

Yes I have the same, it is due to what I said in #672:

Ah I missed the additional context. Ok in this case I am fine with these PRs then and a PR fixing #472 will alleviate my concerns.

What do you think about moving the secondary messages to the main message until we have a location to associate with the errors?

I was thinking the same, but it should be done when we report the error; if there is no location, we print the secondary message as part of the main message.


huge whitespace in sidebar menus

This is a Bug Report

Problem:
I saw by accident very big page files on Kubernetes documentation.
For example https://kubernetes.io/docs/tasks/ is 21850 lines long and the lines 286-20056 are taken for the sidebar menu containing a lot of whitespace (do right-mouse and "view page source").
Proposed Solution:
I reported the issue already with Docsy: https://github.com/google/docsy/issues/637 and proposed a pull request.
But this will not be enough. Somebody has to update https://github.com/kubernetes/website/blob/main/layouts/partials/sidebar-tree.html too.
Page to Update:
https://github.com/kubernetes/website/blob/main/layouts/partials/sidebar-tree.html

/assign

The hugo Docsy theme side issue is resolved and closed: https://github.com/google/docsy/issues/637
When will somebody review and implement pull request #29006 ? You can do this separate from a Docsy theme update at https://github.com/kubernetes/website/tree/main/themes. It is only about (huge) whitespace reduction, not a functional change. But k8s website users will benefit in user experience.


Question for testing kitti

Dear Chris,
I downloaded pre-trained model with normalized feature and dimension = 32. And when I ran test_kitti.py. It gives me  this. I set the "dataset" in config.json to be "KITTINMPairDataset".

Could you please tell me how to fix this problem? Thank you very much.

The script requires config.json, which should contain correct paths to weights, conv1_kernel_size, whether normalize features, and model_n_out.
Could you make sure that you are loading correct weights and if so, correct configuration?

Dear Chris,
In my config.json: conv_kernel_size=5 and normalize features  = true,  model_n_out = 32,  which should match the last one on your released trained model. And after I downloaded it, and load into model ResUNetBN2C, the loading is successful under my local configuration.  I think it should be right? I also attach my config.json file(it's in .txt for upload, but locally it's .json file). I think the data is loaded correctly. Otherwise, script will throw assertion error.
config.txt

Your config.txt has null for weights. The script will test KITTI dataset with randomly initialized weights. Please populate the weights field with an appropriate path to the downloaded weights.

Glad that you solved it.
I am not familiar with the KAIST dataset. Could you let me know the full name of the dataset?

KAIST Urban Dataset is the full name. It is developed by KAIST and NAVER labs.  Here's the link:  https://irap.kaist.ac.kr/dataset/index.html

The dataset looks very impressive. I don't think I'll get back to the 3D feature learning problem soon, but will keep you posted if I do evaluate on the dataset.

I see. Well, Thank you very much for your work. It's very impressive.


Android digit_classifier not working at all

The android digit_classifier is not detecting the correct digit.

Hi @bogdantmm92 !
Work around is to use CNN instead of defaults one in the model part. Once you get the lite model using CNN upload it to assets  file.
Attached gist for reference.

Hey @mohantym that doesn't seem to help. The app crashes when initializing the interpreter.
Commenting out this line options.setUseNNAPI(true) fixed the crash but not the predictions.
I get the same random predictions. Could it be something in the format of the pixels fed to the tflite model?

@bogdantmm92 !
What is your Android and TF version. I am not getting crash here in Android Chipmunk and Pixel 5 in emulator or Also in Samsung Galaxy A20s.
I agree current TFlite model in asset not efficient , But it was better after uncommenting the CNN code snippet mentioned in above gist.
Thank you!

Galaxy S22, Android 12.
/org.tensorflow.lite.examples.digitclassifier E/AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1     Process: org.tensorflow.lite.examples.digitclassifier, PID: 5290     java.lang.IllegalArgumentException: Internal error: Error applying delegate:          at org.tensorflow.lite.NativeInterpreterWrapper.createInterpreter(Native Method)         at org.tensorflow.lite.NativeInterpreterWrapper.init(NativeInterpreterWrapper.java:105)         at org.tensorflow.lite.NativeInterpreterWrapper.<init>(NativeInterpreterWrapper.java:72)         at org.tensorflow.lite.NativeInterpreterWrapperExperimental.<init>(NativeInterpreterWrapperExperimental.java:44)         at org.tensorflow.lite.Interpreter.<init>(Interpreter.java:227)         at org.tensorflow.lite.examples.digitclassifier.DigitClassifier.initializeInterpreter(DigitClassifier.kt:52)         at org.tensorflow.lite.examples.digitclassifier.DigitClassifier.access$initializeInterpreter(DigitClassifier.kt:18)         at org.tensorflow.lite.examples.digitclassifier.DigitClassifier$initialize$1.run(DigitClassifier.kt:34)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)         at java.lang.Thread.run(Thread.java:920)

Ok @bogdantmm92 !
Thanks for the update.
@sachinprasadhs !
Could you look at this issue.
Thank you!

Attaching a link to the tflite model that crashes on Android.

It looks that Conv2D filter doesn't work with the tflite option options.setUseNNAPI(true). If I remove this line options.setUseNNAPI(true), the app runs fine

Hi @bogdantmm92
The codelabs for digit classifier provides a way of imporving the digit classification accuracy by using image augmentation.
Please try this colab which helps to imporve accuracy and let us know if it helps.
Thank you.

Closing as stale. Please reopen if you'd like to work on this further. Thanks!


Add support for deep range projections.

I added a straight forward implementation for deep projections using underscore.deep. It should match the MongoDB API.
As far as I could tell, everything works as expected and all the tests are still passed.
I haven't tested performance on large datasets though.

Thanks for this Clemens - was just about to research doing this myself, glad I looked through the pull requests - Louis - what is your comment on this? I would prefer to stick with an official release of nedb if possible, will this be incorporated at any stage?

Looks like an equivalent to this was implemented by @louischatriot in<EMAIL_ADDRESS>https://github.com/louischatriot/nedb/commit/0eeca73bb0e313e0d80dafa510a25e6655b0041c


Feature request: support alternative file managers

When mpbridge is run, the Linux default file manager opens. It would be good if there were a means of specifying an alternative.
If that is impractical, printing the location of the temporary filesystem would provide a hint for those wishing to use an alternative.

Which file manager do you prefer? Would you please name it?

I use Krusader but there are many others. Some users don't use Linux! I was hoping that the file manager could be specified in an optional config file, or as an optional command arg.
This isn't a major issue - mpbridge works fine with Krusader. Printing the path makes it easy for a user to start an alternative file manager.

@peterhinch Do you know how it is possible to open Krusader in a specific directory from terminal?

$ krusader /etc

(or other path) works but blocks until Krusader exits. I think you could start other file managers similarly.

So we can also implement an option to specify file manager too but it needs to be requested by users one by one to be implemented.

I now think this is unnecessary. I have fixed this by changing the Linux default file manager. Now mpbridge starts with Krusader.


memory using?

Hello, Dr. Zhou, I have not seen the application of memory bank in the code base?

Thanks for your interest. Now I have updated the codes. I will close this, but feel free to reopen if you have more questions.


Create .html files automatically

https://github.com/fonsp/Pluto.jl/discussions/1149#discussioncomment-709398

This seems to work, but it helps to have all packages on your local system up to date,or matching what is required within the local package collection in the Pluto file.


SelectInput options should support objects as values

PR: https://github.com/xh/hoist-react/pull/1538


App crashing due to runtime OutOfMemory error

Actual Behaviour
Currently, we are using bitmap in SpeakerDetailsActivity due to which while loading a bitmap the app is raising an OutOfMemory exception at runtime.

Expected Behaviour
It should be resolved otherwise it will lead to the crash app.
Would you like to work on the issue?
Yes

@harshitagupta30 Which activity is exactly causing the issue? Can you provide full stacktrace ?

@betterclever SpeakerDetailActivity is using bitmap to load the images. This is the complete stacktrace which was generated and this happened when I was transitioning to Speaker's Detail.

@harshitagupta30
I didn't face the issue.
which device are you using?

@harshitagupta30
this is device specific i think. I didnt face the issue.

@arp95  @free4murad It is due to the fact that genymotion emulator has less default heap size for apps which is being used for testing. The app might crash in a similar low ram device.
@harshitagupta30 I think a better approach would be reduce image size first before applying then asking for more heap, image size can be reduced after Bitmap is ready in Picasso using custom transformer.
Refer this: http://stackoverflow.com/questions/23740307/load-large-images-with-picasso-and-custom-transform-object

@betterclever The ram size of the emulator is currently 2 GB which I think is sufficient enough. Also,  we are using bitmap images only in some case where we need to draw the Speaker's image not when downloading an image. Still, I'll try to solve it in the way described in link. Thanks for the  suggestion. :+1:

@harshitagupta30 It doesn't depend on RAM size, depends on heap size for emulator. Check build.prop of emulator for that. If your emulator has less heap, then it will crash irrespective of RAM size. I faced a similar issue on my app once. Stock emulator provides option to change heap size, AFAIK genymotion doesn't.
Secondly, we are using Bitmap there to dynamically get accentColor from the image using the Palette Class from Support Design Library, which needs to use the Bitmap resource to extract color. Scaling down should optimize it. 👍

@betterclever Thanks! I was not aware of this.  :clap:  :+1:

@harshitagupta30 following suggestions on #1264, scaling down on phone won't be required. This may be left therefore.


Barrel exports should be alphabetized

Minor nit
can we alphabetize them?
export * from './entity.service';
export * from './exception.service';
export * from './init-caps.pipe';
export * from './message.service';
export * from './config';
export * from './toast';
export * from './toast/toast.service';
export * from './spinner';
export * from './spinner/spinner.service';
export * from './speaker.service';
export * from './speaker.model';
export * from './nav';
export * from './modal';
export * from './modal/modal.service';
export * from './filter-text';
export * from './filter-text/filter-text.service';

cc @Brocco

Won't specific barrel ordering be required when any of the exports depend on each other? Making them alphabetised may break this. https://github.com/angular/angular/issues/9334


[RFC] Move MemoryImageSource::map_at to mmap module

This is part of the work to centralize memory management into the mmap
module. This commit introduces a few structures which aid in that process, and
starts converting one of the functions (MemoryImageSource::map_at) into this
module.
The structures introduced are:

MemoryBase: RuntimeLinearMemory::base_ptr is now
RuntimeLinearMemory::base, which returns a MemoryBase. This is either a
raw pointer or an mmap + an offset into it.

MmapOffset: A combination of a reference to an mmap and an offset into it.
Logically represents a pointer into a mapped section of memory.

MmapOffsetRaw: Some components like MemoryImageSlot logically work on
borrowed memory, but adding lifetime parameters to them would introduce
self-reference issues. Instead, store a raw form of the MmapOffset such
that it can be reconstructed at runtime. This should work for most future
work here, but not all of it -- I've written out some comments along with
ideas.

On Zulip there was a suggestion to use Arc<Mmap> rather than a lifetime
parameter. To be honest it's quite appealing! One of the challenges though
is that Mmap has several &mut methods. The methods fall into two categories:

Methods like make_accessible, which can be changed to be &self since the OS performs synchronization of mapped memory.
Methods like slice_mut, which are quite difficult to turn into &self methods. It would be too easy to call self.slice_mut(0..host_page_size()); self.slice_mut(0..host_page_size()); and cause an insta-UB. I spent some time looking at how to do this but found it too difficult :(

Methods like slice_mut, which are quite difficult to turn into &self methods. It would be too easy to call self.slice_mut(0..host_page_size()); self.slice_mut(0..host_page_size()); and cause an insta-UB. I spent some time looking at how to do this but found it too difficult :(

Ah interesting, it looks like the only seriously affected use is in some tests.

Moving to draft for now -- I think Arc is possible to make work.

Yeah Arc is definitely possible -- going to re-do this after moving over to Arc.


Make research and try to implement area location

We are already using Google Maps API to show location. But it's requested to be able to select area on the map.
Now I will make a research and will try to implement area selection in the project for both backend and frontend.

First possible selection is Google Maps API Shapes
Secondly we may try leaflet directly Leaflet

After some researches we decided to use Google Maps because it is way easier on web. And have implementation posibilities on mobile too.

We can create something like above.
For now we can create and see stories.
Search & other implementations will be added soon 🥂

@ckertam You quickly solve whatever is needed. Congrats, you did a great job, well done! Thank you so much ✨ 👏🏼

@SWE574-Fall2023-Group1/all
Everything done! Need to test it more now.
Basically users can do belowings now.

Add every shape of location while creating a story.
Can remove them before creating the story.
Autocomplete still working so users can make search for locations.
If users click on a shape in a story the user will see the stories that has a location inside the clicked area
Line and point clicks return 5km radius area
In search page users can make search with radius & points.

Need to fix/improve

For now in search pages markers does not shown we need to handle it.
In timeline search we show the location's place. But now if the point is not point we do not show it. Need to handle it too.
Auto zoom & Auto centerilization not exist for now. Need to discuss where we need them. Then we can implement them

We handled it in the first place. But we need to solve some bugs as I mentioned.

Close commits
7f55043f0dad7041ce5cd3723c459842ffcc1f7f
1bf18ad282c8e8f661beebeb0a03760de00a4c16
d4e449ff8535128d80e43b7257c83b3464efe178
e173e31cb1c404dea9a355169de927bcb77159b6
0511d63271ef7589ab38db8a6649f581f22d0a61
6f1bfdf42c73d4fe09cb7e82790290df1e552d40
966a16b206af3360e22113281437e5b5bc04ef1a
f75dd9f707fab87ee961632a6601a755eeb16471
8b067989152a8e4cf9d92221705a762f3040b0b6
6afe008832adb05fd1ee141478b04075e6d60dc9
1cfd9603f1d7a4a737ce0586c0d2946dd07ecccb


create shopping list view

allow user to create shopping list and view it and download it as pdf.

Resolved.


Fixes for switch statements on enums

Adds a missing return, to fix the GCC error flagged here: https://github.com/iree-org/iree/pull/19099/files/ab2aa4c5e9487c5f51effdc0d123c2f369dc9c41#r1840709707
Adds some assertions on these error-case returns which are reachable but would only be reached if there is a bug in our program (as opposed to being triggerable by user input).
Drops some comments erroneously suggesting that it's GCC being difficult. Here, GCC is right and Clang is having a false-negative bug: https://github.com/llvm/llvm-project/issues/115345
Drops a redundant return after a default: return.

Thanks!


Unable to find the targets named

I want to review demo app.  I'm clone the repo and getting an exception when running pod install:
[!] Unable to find the targets named AGGeoTrackingDemoto link with target definition `AGGeoTrackingDemo
How do I fix the error?
Thanks.

Our fix refer to Pod target names

Thank you. Examples working.


WIP Rancher GLB

I don't know exactly what this is but it looks exciting. Can't wait for more info!


Zero-Copy documentation [10333]

Merge after #222

Build status:

Build status:

Wait till Data Sharing #218 to apply some changes and refactor.

Wait till Data Sharing #218 to apply some changes and refactor.

Build status:

Build status:

This was added to the 'Transport' section. However, I believe it fits better on the 'use cases' section, with the references to the documentation of the features it uses (DataSharing and Loans). It could be moved almost as is (with minor modifications on the intro), so I preferred to discuss it before moving it.

This was added to the 'Transport' section. However, I believe it fits better on the 'use cases' section, with the references to the documentation of the features it uses (DataSharing and Loans). It could be moved almost as is (with minor modifications on the intro), so I preferred to discuss it before moving it.

Build status:

Build status:

Moved to use-case section as per offline conversation.

Moved to use-case section as per offline conversation.

Build status:

Build status:

Build status:

Build status:

Build status:

Build status:


Parallel stages

I have updated the Stages parallelization branch with requested changes, can you please double check the changes and check if there is some new issues?
Cheers,
Anis.

This issue proposes to execute topographically unrelated tasks (neither precedes the other) in a Rheem plan in parallel. This involves adapting the execution engine as well as taking to account parallel execution in the optimizer.

This issue was moved to rheem-ecosystem/rheem#30


Integration tests - common logic to setup the local node - Part 1 (PR)

Description:
This PR introduces a new base class BaseIntegrationTest and some refactoring around it. All of the common logic for connecting to a Hedera Local Node has been moved into BaseIntegrationTest.
BaseIntegrationTest has been added as a super class for the following integration tests:

AccountAllowanceApproveTransactionIntegrationTest
AccountBalanceQueryIntegrationTest
AccountCreateTransactionIntegrationTest
AccountDeleteTransactionIntegrationTest
AccountInfoQueryIntegrationTest
AccountRecordsQueryIntegrationTest
AccountUpdateTransactionIntegrationTest
ContractBytecodeQueryIntegrationTest
ContractCallQueryIntegrationTest
ContractCreateTransactionIntegrationTest
ContractDeleteTransactionIntegrationTest
ContractExecuteTransactionIntegrationTest
ContractInfoQueryIntegrationTest
ContractUpdateTransactionIntegrationTest

Related issue(s):
This PR is a mandatory part to be able to start working on issue #340 - Integration tests - common logic to setup the local node - Part 2
Fixes: #284
Notes for reviewer:

Second portion of refactoring will be introduced within  issue #340.
Suggested improvement - method getTestSmartContractBytecode() from class ContractBytecodeQueryIntegrationTest could also be moved in BaseIntegrationTest.

Checklist

[x] Documented (Code comments, README, etc.)
[x] Tested (unit, integration, etc.)

There are a couple small things I think could be changed, and I think this should be reworked so that the client is constructed only once. I'm thinking making just a separate IntegrationTestEnv class of some sort that has an init() function that can be called in each test's SetUp() that checks if its already initialized with the JSON data and reads the JSON data if it's not initialized. This makes sure that the client and network map are initialized for each test, is independent of test order, and only reads in the JSON file once.

I totally agree with you - using a Singleton class IntegrationTestEnv will encapsulate the JSON file loading in one place only. Also the parsing could be done only once. I just created this new issue #349 to track this improvement.
Also in 2d9ab452516fd6f9dfff95dc8ad828bf40492bf6 I moved method getTestSmartContractBytecode() in the base class BaseIntegrationTest. This also reduce code duplication in some of integration tests related to Smart Contracts.


Binary Operations Plugin

@mmvih This PR seems to be merging an incorrect branch. Please close and open a new PR with the appropriate branch.


Timeout for wget model parameters

I'm getting timed out when trying to get model parameters.
Is this a known issue or is there anything I need to do?
Thanks.

I am getting something similar, both when I try to run with the bash file (-q disabled) and when I try to run the commands directly on the terminal.
Trying to access the links using the web doesn't work either.
I am assuming this is only a temporary issue which will be fixed soon, but I am not certain.

I must add that, when wget fails, chrome has no problem downloading the files.


Bug: bundles added through the admin endpoint doesn't get properly served

Describe the bug
File service operator can use the admin endpoint to add new bundles/files while the service is running. Status can properly updated, but the service doesn't serve properly - file server will serve file with correct range specification, but downloader claims to receive 400 as the request eventually fails.
To Reproduce
Steps to reproduce the behavior:

run a server
add a new bundle to the server
download the new bundle

Expected behavior
Same behavior as if bundle was part of the initial bundles; serve the bundle such that downloader can receive 200 response and validate the corresponding data.

resolved by 18ae7ef33aa274d60747c896334df446804e82ae


Expand and Pin Requirements

Originally reported by: herriojr (Bitbucket: herriojr, GitHub: herriojr)

Setuptools itself already supports both deployment in "development" mode well as a "distribution" mode, but I've come to the conclusion that this needs to be broken down a bit further in terms of distribution.  Right now, "bdist_wheel", or "bdist_egg" are very naive in what they are told to do for dependencies.  They just list whatever you put in your setup.py without worrying about whether those packages exist or not and only validate the syntax.  For libraries, this is all good, but when it comes to "applications", things get a bit more hairy.  The problem at the application level is that in production you want to make sure every box is running the exact same version of all dependencies.
Most pyramid and any other web project always has a setup.py at the root directory of the project, however, deployment becomes a problem if you aren't pinning your versions during development.  Generally, I prefer not to pin in development as I want to make sure I keep up to date with any library changes as much as possible, however, once it goes out to QA/Production, I want it to be pinned.  This workflow allows me to keep up to date on breaking changes and minimize risk in production.  To follow this workflow, right now, what has to happen is a requirements.txt file has to be generated and have all packages pinned and then pass around that requirements.txt file to install from.  Why do this, when wheels and eggs are really meant to manage dependencies anyways?  Why not have them deal with it?
Basically, what I'm proposing is adding two new options for when generating the egg_info (since bdist_wheel just calls bdist_egg and converts it to wheel format):
--expand-requirements
This expands all dependencies and transient dependencies to create one giant list
--pin-requirements
This pins the requirements to specific versions, similar to a pip freeze
The only edge case I can think of is when pinning when you are working on other modules which are installed as "development".  In this case, I would argue that the build should fail if --pin-requirements is set as it is unable to pin it.  As part of this, it should also fail if two dependencies require two different versions of the same dependency which are incompatible (version ranges don't overlap).
I'm currently trying to work on this, but I wanted to get a discussion going around this as, to me, it seems like this would be a common problem.  If it isn't something that most people want, I'll opt to build this is a separate package which can be used to override the default commands for those that want it, however, my preference would be that this be part of the main setuptools ecosystem.

Bitbucket: https://bitbucket.org/pypa/setuptools/issue/255

@herriojr Now that we have https://github.com/jazzband/pip-tools and https://github.com/kennethreitz/pipenv, do you think this issue can be solved by those tools, rather?

@tuukkamustonen I'm so far removed from python development at this point that you can feel free to close this if you like.

Indeed, I believe pip and other tools are the best place to materialize a requirements list at a point in time.


Help text incorrect

The first two lines are erranous... ;-)
C:\WINDOWS\system32>mdbook-cmdrun -h
mdbook-toc
mdbook preprocessor to add Table of Contents

USAGE:
    mdbook-cmdrun [SUBCOMMAND]

OPTIONS:
    -h, --help    Print help information

SUBCOMMANDS:
    help        Print this message or the help of the given subcommand(s)
    supports    Check whether a renderer is supported by this preprocessor

Ty for reporting this :hugs: . I fixed it and released version 0.5.0.