Make Lexer lazy

Summary
This PR updates the Lexer to make it lazy in the sense that the tokens are emitted only when it's requested.
Lexer

Remove Iterator implementation
Remove SoftkeywordTransformer
Collect all LexicalError in the lexer and return it on finish call
Store the current token and provide methods to query it
Implement a new TokenValue struct which stores the owned value for certain tokens [^1]
Update all lex_* methods to return the token instead of Result
Update Lexer::new to take a start_offset parameter

This will be used to start lexing from a specific offset

Add checkpoint - rewind logic for the lexer, f-strings and indentation stack

Token Source

Remove Iterator implementation
Provide lookahead via checkpoint - rewind logic on the Lexer
Store all the lexed tokens

Parser

Update the soft keywords to identifier when parsing as an identifier
Add bump_value to bump the given token kind and return the corresponding owned value
Add bump_any to bump any token except for end of file

[^1]: At the end, we'll remove the Tok completely
Test Plan
TODO

I'm going to merge this into another PR to keep going. I'm finding it difficult to refactor with changes separated in different branches.


[WIP] Add README.md

Fix #2
Remaining tasks:

[ ] How to test that the produced NuGet package can be safely published (ie. Running the LibGit2sharp tests against it)
[ ] Add a section explaining how to build the NuGet package (see https://github.com/libgit2/libgit2sharp.nativebinaries/pull/3#issuecomment-102006022 for inspiration, although that will surely be automated at some moment in time)

Describe how to work against a WIP libgit2 (a branch in a pull request)

Given libgit2/libgit2#3127 the pull request you're willing to work with

$ cd libgit2
$ git fetch origin refs/pull/3127/merge:refs/remotes/pr/3127
$ git checkout refs/remotes/pr/3127

Apply the following changes to your commit to make the CI servers do the dance
PS > .\UpdateLibgit2ToSha.ps1 pr/2137

diff --git a/.travis.yml b/.travis.yml
index 33aeca6..c4c5be1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,6 +12,10 @@ before_install:
  - date -u
  - uname -a
  - env | grep -v "BINTRAY_API_KEY" | sort
+ - cd libgit2
+ - git fetch origin refs/pull/3127/merge:refs/remotes/pr/3127
+ - git checkout refs/remotes/pr/3127
+ - cd ..

 install: true

diff --git a/appveyor.yml b/appveyor.yml
index e53c359..8a98466 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -4,6 +4,10 @@ skip_tags: true

 install:
 - git submodule update --init --recursive
+- cd libgit2
+- git fetch origin refs/pull/3127/merge:refs/remotes/pr/3127
+- git checkout refs/remotes/pr/3127
+- cd ..

 build_script:
 - ps: .\build.libgit2.ps1 -vs 12

Troubleshooting managed/native issues:
diff --git a/appveyor.yml b/appveyor.yml
index 0efc216..6b05d85 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,7 +10,7 @@ install:
 - git submodule update --init --recursive

 build_script:
-- ps: .\build.libgit2.ps1 -vs 12
+- ps: .\build.libgit2.ps1 -vs 12 -debug

 after_build:
 - ps: |


#142 - Add support for Heroku Deploy

Added heroku deploy button and support to quickly deploy your own coinb.in instance on heroku.

Fixes #142


Support periodic query of emotions in API endpoint

I would like to: Support periodic query of emotions in API endpoint during SER processing
So that I can: Let users to analyse their audio file in chunks

Done in endpoint-periodic-emotions branch.
Note that as documented before, the endpoint for using the periodic query is /analyse/{emotions}/{period}


Update please

Nuget packages seem outdated. There's no "Microsoft.Bot.Builder.Ai" but instead there's for instance "Microsoft.Bot.Builder.Ai.Lois". When you guys churn, please be sure to keep the docs in sync! Thanks in advance.

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

ID: 82c406c6-b851-189e-4996-4e9ec7b6079b
Version Independent ID: 4d5e7967-bddf-818d-1a6b-1a1ca4628bf4
Content: Translate user input to make your bot multilingual - Bot Service
Content Source: articles/v4sdk/bot-builder-how-to-translation.md
Product: bot-framework
GitHub Login: @DeniseMak
Microsoft Alias: v-demak

In general, code references classes that do not exists, does not specify nuget versions (just "prerelease").

This page is no longer linked to and updated by our docs, so these don't get updated. For current usage of translation, take a look at our sample (JS has the same one if you prefer) https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/17.multilingual-bot
Where did you see the misspelled "Lois"? The docs should be updated with the current usage of the libraries, but if we missed one that's definitely something we want to fix!

Is there any way to see that this is "outdated"/no longer maintained? At the top of the page it states this page is for the latest SDK.
The nuget naming issue is not about mispelling, but about referencing packages that do not exist (eg. "Microsoft.Bot.Builder.Ai" which does not exists). The code itself also uses classses that cannot be found in the indicated nuget packages.
Thanks for the link to the other sample. Unfortunantly, I found that repo the other day as well, but I frankly find the sample somewhat useless as it's unclear what is "bot framework" best practise, and what is the minimal code example (its a sample I could spend days taking apart, when I expected translation to be a something I could wise up in a few hours). Other Translation Text apis samples would reduce the minmal code to just the HTTP post, which I found way too reduced.

It is not longer updated if it isn't included in the Table of Contents on the left - usually you'll see the page you're currently on highlighted in blue. If there is nothing highlighted it's not in the TOC and likely outdated. The only way you would be reaching a page like that is if you have the link saved/bookmarked - all links to it from our docs are removed when we no longer update the page.
Do you mean as opposed to "Microsoft.Bot.Builder. AI"? All of the up to date articles should reflect that new package naming, including the sample code in our articles.
The actual translation is still done with the TranslationMiddleware, which is added in Startup.cs > ConfigureServices, which is similar to how it is in the article this issue was originally logged against. If you look at Startup.cs, line 125-128, you'll see the initialization of it has changed, but it works similarly in the end. That initialization code, the provided translation middleware, and the short bit in MultiLingualBot.cs > OnTurnAsync should be all you need - if it's not clear enough there, I'm happy to try to help

@stofte - We will also add a redirect to the sample.

Hi, it seems like the redirect is still not implemented.


fix(conversational_retrieval_chain.ts): keep the chat history context alongside the vector store context

The question_generator_template in conversational_retrieval_chain.ts file was updated to provide more clarity and include an optional chat history excerpt. The template now instructs to return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question. The updated template also includes the phrase "Standalone question and optional chat history excerpt:".

@jopcmelo

Fixes #1800

CC @nfcampos

I like this, just worried about potential regressions for folks using it in production right now. Let me circulate it a bit with the Python crew - maybe adding it under a flag would be a good compromise.
Would also want to add some tests/comparisons/docs if possible but hold off for now.

Consensus is this is useful but definite worries about regression - let's go with a flag in fromLLM. How about extractConversationContext in questionGeneratorChainOptions?

Consensus is this is useful but definite worries about regression - let's go with a flag in fromLLM. How about extractConversationContext in questionGeneratorChainOptions?

@jacoblee93, tt really is concerning to add, it might be something close to a breaking change. Let's go with a flag instead! I'll update the PR in a few hours :)

Consensus is this is useful but definite worries about regression - let's go with a flag in fromLLM. How about extractConversationContext in questionGeneratorChainOptions?

@jacoblee93, tt really is concerning to add, it might be something close to a breaking change. Let's go with a flag instead! I'll update the PR in a few hours :)

Ok cool! Would be great to have a few integration tests too

@jacoblee93, could you review it again, please?
I just added:

new tests testing the behavior with and without questionGeneratorChainOptions.extractConversationContext
updated the docs including this new feature

Have tried it out a bit and I think there's a lot of edge cases to where I'm nervous about adding this new prompt directly into the framework - for example, the model hallucinated a bad standalone question here and gave an incorrect response:
  await chain.call({
    question:
      "I have a friend called Bob. He's 28 years old. He'd like to know what is the powerhouse of the cell?",
  });

  const res2 = await chain.call({
    question: "What is the airspeed velocity of an unladen swallow?",
  });

GPT-4 would probably help but given we can pass the prompt in as a template into the questionGeneratorChainOptions directly, to start I'd love to use this as an example of how folks can customize the chain in the docs. Does that sound alright to you?

Have tried it out a bit and I think there's a lot of edge cases to where I'm nervous about adding this new prompt directly into the framework - for example, the model hallucinated a bad standalone question here and gave a confidently incorrect response:
  await chain.call({
    question:
      "I have a friend called Bob. He's 28 years old. He'd like to know what is the powerhouse of the cell?",
  });

  const res2 = await chain.call({
    question: "What is the airspeed velocity of an unladen swallow?",
  });
  // It returned "Mitochondria are the powerhouse of the cell"

GPT-4 would probably help, but it still breaks the abstraction a bit in that the generated question is also not technically a standalone question anymore.
Given we can pass the prompt in as a template into the questionGeneratorChainOptions directly, I think there's a more moderate starting point of adding this as an example of how folks can customize the chain in the docs.
Basically, we'd encourage people to try this and potentially tweak on their own:
  const chain = ConversationalRetrievalQAChain.fromLLM(
    model,
    vectorStore.asRetriever(),
    {
      memory: new BufferMemory({
        memoryKey: "chat_history",
        returnMessages: true,
      }),
      questionGeneratorChainOptions: {
        template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

Chat History:
{chat_history}
Follow Up Input: {question}

Your answer should follow the following format:
\`\`\`
Use the following pieces of context to answer the users question.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
----------------
<Relevant chat history excerpt as context here>

Standalone question: <Rephrased question here>
\`\`\`

Your answer:`
      },
    }
  );

Does that sound alright to you?

So how can we maintain the history of each user?
Suppose there are 10 user simultaneously using this and the chain is one so I think all the response would be based on all the chats till now right?
And I guess still this version isn't yet published

Have tried it out a bit and I think there's a lot of edge cases to where I'm nervous about adding this new prompt directly into the framework - for example, the model hallucinated a bad standalone question here and gave a confidently incorrect response:

  await chain.call({

    question:

      "I have a friend called Bob. He's 28 years old. He'd like to know what is the powerhouse of the cell?",

  });

  const res2 = await chain.call({

    question: "What is the airspeed velocity of an unladen swallow?",

  });

  // It returned "Mitochondria are the powerhouse of the cell"

GPT-4 would probably help, but it still breaks the abstraction a bit in that the generated question is also not technically a standalone question anymore.
Given we can pass the prompt in as a template into the questionGeneratorChainOptions directly, I think there's a more moderate starting point of adding this as an example of how folks can customize the chain in the docs.
Basically, we'd encourage people to try this and potentially tweak on their own:

  const chain = ConversationalRetrievalQAChain.fromLLM(

    model,

    vectorStore.asRetriever(),

    {

      memory: new BufferMemory({

        memoryKey: "chat_history",

        returnMessages: true,

      }),

      questionGeneratorChainOptions: {

        template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

Chat History:

{chat_history}

Follow Up Input: {question}

Your answer should follow the following format:

\`\`\`

Use the following pieces of context to answer the users question.

If you don't know the answer, just say that you don't know, don't try to make up an answer.

----------------

<Relevant chat history excerpt as context here>

Standalone question: <Rephrased question here>

\`\`\`

Your answer:`

      },

    }

  );

Does that sound alright to you?

Will this really have a working memory? Which args to use with chain.call() then?

@juzarantri

So how can we maintain the history of each user?
Suppose there are 10 user simultaneously using this and the chain is one so I think all the response would be based on all the chats till now right?
And I guess still this version isn't yet published

I'm not sure if I understand you. Why would you create only one chat for 10 or more users? In this case, Langchain isn't capable of keeping track of different human messages in its memory since it only stores messages from human and ai.
If you want to have many users using your chain, you'd have to create different session IDs for each of them so that each of them have their own chat history.

Have tried it out a bit and I think there's a lot of edge cases to where I'm nervous about adding this new prompt directly into the framework - for example, the model hallucinated a bad standalone question here and gave a confidently incorrect response:
  await chain.call({
    question:
      "I have a friend called Bob. He's 28 years old. He'd like to know what is the powerhouse of the cell?",
  });

  const res2 = await chain.call({
    question: "What is the airspeed velocity of an unladen swallow?",
  });
  // It returned "Mitochondria are the powerhouse of the cell"

GPT-4 would probably help, but it still breaks the abstraction a bit in that the generated question is also not technically a standalone question anymore.
Given we can pass the prompt in as a template into the questionGeneratorChainOptions directly, I think there's a more moderate starting point of adding this as an example of how folks can customize the chain in the docs.
Basically, we'd encourage people to try this and potentially tweak on their own:
  const chain = ConversationalRetrievalQAChain.fromLLM(
    model,
    vectorStore.asRetriever(),
    {
      memory: new BufferMemory({
        memoryKey: "chat_history",
        returnMessages: true,
      }),
      questionGeneratorChainOptions: {
        template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

Chat History:
{chat_history}
Follow Up Input: {question}

Your answer should follow the following format:
\`\`\`
Use the following pieces of context to answer the users question.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
----------------
<Relevant chat history excerpt as context here>

Standalone question: <Rephrased question here>
\`\`\`

Your answer:`
      },
    }
  );

Does that sound alright to you?

@jacoblee93, that makes sense! This is how I ended up fixing this issue at @getproducthub. Let me update the PR to include only the examples then :)

Will this really have a working memory? Which args to use with chain.call() then?

@its-anas, it does have a working memory. There's no secret with chain.call(). You just have to provide the question to the chain and it will consider relevant character history excerpt alongside the vector store context under the hood.
Let me know if I've answered your question :)

@its-anas, it does have a working memory. There's no secret with chain.call(). You just have to provide the question to the chain and it will consider relevant character history excerpt alongside the vector store context under the hood.
Let me know if I've answered your question :)

@joaopcm based on your explanation and @jacoblee93 code, then the following chain must have the memory working. But when i interact with it, it doesn't remember anything.
Shouldn't i pass chat_history somewhere? When i pass it to chain.call() i get an error. So when i should pass it?
const question = 'Hi, my name is John';

const sanitizedQuestion = question.trim().replaceAll('\n', ' ');

const history = [
  ['Hi, my name is John', 'Hi John! How can I assist you today?'],
];

const chain = ConversationalRetrievalQAChain.fromLLM(
  new ChatOpenAI({
    temperature: 0,
    modelName: 'gpt-3.5-turbo',
  }),
  vectorStore.asRetriever(),
  {
    memory: new BufferMemory({
      memoryKey: 'chat_history',
      returnMessages: true,
    }),
    questionGeneratorChainOptions: {
      template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

                Chat History:
                {chat_history}
                Follow Up Input: {question}

                Your answer should follow the following format:
                \`\`\`
                Use the following pieces of context to answer the users question.
                If you don't know the answer, just say that you don't know, don't try to make up an answer.
                ----------------
                <Relevant chat history excerpt as context here>

                Standalone question: <Rephrased question here>
                \`\`\`

                Your answer:`,
    },
  },
);

const response = await chain.call({
  question: sanitizedQuestion,
  // chat_history: history, > this result in Error: input values have 2 keys, you must specify an input key or pass only 1 key as input
});

@its-anas, it does have a working memory. There's no secret with chain.call(). You just have to provide the question to the chain and it will consider relevant character history excerpt alongside the vector store context under the hood.
Let me know if I've answered your question :)

@joaopcm based on your explanation and @jacoblee93 code, then the following chain must have the memory working. But when i interact with it, it doesn't remember anything.
Shouldn't i pass chat_history somewhere? When i pass it to chain.call() i get an error. So when i should pass it?
const question = 'Hi, my name is John';

const sanitizedQuestion = question.trim().replaceAll('\n', ' ');

const history = [
  ['Hi, my name is John', 'Hi John! How can I assist you today?'],
];

const chain = ConversationalRetrievalQAChain.fromLLM(
  new ChatOpenAI({
    temperature: 0,
    modelName: 'gpt-3.5-turbo',
  }),
  vectorStore.asRetriever(),
  {
    memory: new BufferMemory({
      memoryKey: 'chat_history',
      returnMessages: true,
    }),
    questionGeneratorChainOptions: {
      template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

                Chat History:
                {chat_history}
                Follow Up Input: {question}

                Your answer should follow the following format:
                \`\`\`
                Use the following pieces of context to answer the users question.
                If you don't know the answer, just say that you don't know, don't try to make up an answer.
                ----------------
                <Relevant chat history excerpt as context here>

                Standalone question: <Rephrased question here>
                \`\`\`

                Your answer:`,
    },
  },
);

const response = await chain.call({
  question: sanitizedQuestion,
  // chat_history: history, > this result in Error: input values have 2 keys, you must specify an input key or pass only 1 key as input
});

@its-anas, try adding inputKey to BufferMemory:
memory: new BufferMemory({
    memoryKey: 'chat_history',
    inputKey: 'question',
    returnMessages: true,
  }),

@its-anas , also, you might want to provide the history messages directly to BufferMemory instead of passing it to the chain.call.
Something like this:
const pastMessages = [
  new HumanChatMessage("My name's Jonas"),
  new AIChatMessage("Nice to meet you, Jonas!"),
];

const memory = new BufferMemory({
  chatHistory: new ChatMessageHistory(pastMessages),
});

@joaopcm Thanks for helping me about this. But  I tried to do it like you said and it's still not remembering the conversation.
Note: when i asked it about what inside the chat history, it answered with what is stored in the vector database instead of what inside chat history.
import { AIChatMessage, HumanChatMessage } from 'langchain/schema';
import { BufferMemory, ChatMessageHistory } from 'langchain/memory';

const question = 'Question should be here';

const sanitizedQuestion = question.trim().replaceAll('\n', ' ');

const history = [
  ['Hi, my name is John', 'Hello John! How can I assist you today?'],
  [
    "I'm from New York, you?",
    'I am an AI assistant and do not have a physical location.',
  ],
  [
    "Ok, but you remember who i am and where i'm from?",
    "I'm sorry, but as an AI assistant, I don't have the ability to remember personal information about individuals.",
  ],
  [
    'But what inside chat_history?',
    "The chat history contains information about the website's pages, such as the contact page.",
  ],
];

const pastMessages = history.reduce(
  (acc, subArray) => [
    ...acc,
    new HumanChatMessage(subArray[0]),
    new AIChatMessage(subArray[1]),
  ],
  [],
);

const model = new ChatOpenAI({
  temperature: 0,
  modelName: 'gpt-3.5-turbo',
});

const chain = ConversationalRetrievalQAChain.fromLLM(
  model,
  vectorstore.asRetriever(),
  {
    memory: new BufferMemory({
      memoryKey: 'chat_history',
      inputKey: 'question',
      chatHistory: new ChatMessageHistory(pastMessages),
      returnMessages: true,
    }),
    questionGeneratorChainOptions: {
      template: `Given the following conversation and a follow up question, return the conversation history excerpt that includes any relevant context to the question if it exists and rephrase the follow up question to be a standalone question.

                Chat History:
                {chat_history}
                Follow Up Input: {question}

                Your answer should follow the following format:
                \`\`\`
                Use the following pieces of context to answer the users question.
                If you don't know the answer, just say that you don't know, don't try to make up an answer.
                ----------------
                <Relevant chat history excerpt as context here>

                Standalone question: <Rephrased question here>
                \`\`\`

                Your answer:`,
    },
  },
);

const response = await chain.call({
  question: sanitizedQuestion,
});

You'd need to initialize ChatMessageHistory like this:
import { BufferMemory, ChatMessageHistory } from "langchain/memory";
import { HumanChatMessage, AIChatMessage } from "langchain/schema";

const pastMessages = [
  new HumanChatMessage("My name's Jonas"),
  new AIChatMessage("Nice to meet you, Jonas!"),
];

const memory = new BufferMemory({
  chatHistory: new ChatMessageHistory(pastMessages),
});

Let's move help requests to Discord though.

@joaopcm yeah let's just add it to the docs as an example for now - I think this issue might require more structural changes to fix in a robust way.

Thanks @joaopcm, i updated Langchain and memory is working. Thanks @jacoblee93 for you answer. Sorry guys for ruining your PR comments.

Sounds good, dude! Thanks!

Sounds good, dude! Thanks!

Thank you for pushing hard on this!

yes. solution working fine.
but while streaming chat-history and rephrased question also in the token.
how to stream the output only as token ?
const model = new ChatOpenAI({
    openAIApiKey: this.config.get('openai.keys'),
    temperature: 0,
    modelName: modelName,
    streaming: true,
    callbacks: [
      {
        handleLLMNewToken(token: string) {
          console.log({ token });
        },
      },
    ],
  });

my issue is more or like this
https://github.com/langchain-ai/langchain/issues/7599


Update README.md

Update pg_embedding readme

hnsw inde
@bayandin
Thank you for the review.
How about: "Vector similarity search with the HNSW algorithm"


Flutter/Supabase - problem with multiple OR in filters

I am using Supabase as my Flutter app backend, and I've hit a problem trying to build a complex SQL query using the Flutter-Supabase library
Here is the query I am trying to create in SQL...
select
*
* from gd_task
where
("scheduled"->>'absolute' >= '2023-07-19' and "scheduled"->>'absolute' <= '2023-07-25')
or
("scheduled"->>'absolute' < '2023-07-19' AND "taskOpen" = true)
or
("scheduled"->>'absolute' < '2023-07-19'  AND "taskOpen" = false AND "actualFinish" = '2023-07-19')

Building the same thing in the Flutter Supabase query classes, I end up with the following three 'or' filter being added to the query...
...
.or('scheduled->>absolute.gte.2023-07-19T00:00:00.000,and(scheduled->>absolute.lte.2023-07-25T23:59:59.000)')
.or('scheduled->>absolute.lt.2023-07-19T00:00:00.000,and(taskOpen.eq.true)')
.or('scheduled->>absolute.lt.2023-07-19T00:00:00.000,and(taskOpen.eq.false),and(actualFinish.eq.2023-07-19T00:00:00.000)')

but this is not returning the correct results.  In particular, the data from the 1st 'or' is not being returned.

Drilling into the Supabase Flutter code, the URI ends up as...

https://muordrkfvnxbdpnlesix.supabase.co/rest/v1/gd_task?select=%2A&or=%28scheduled-%3E%3Eabsolute.gte.2023-07-19T00%3A00%3A00.000%2Cand%28scheduled-%3E%3Eabsolute.lte.2023-07-20T00%3A00%3A00.000%29%29&or=%28scheduled-%3E%3Eabsolute.lt.2023-07-19T00%3A00%3A00.000%2Cand%28taskOpen.eq.true%29%29&or=%28scheduled-%3E%3Eabsolute.lt.2023-07-19T00%3A00%3A00.000%2Cand%28taskOpen.eq.false%29%2Cand%28actualFinish.eq.2023-07-19T00%3A00%3A00.000%29%29

Any suggestions?

Resolved -  the docs explaining how to use the 'or' function method are confusing, and when I read the PgSyntax docs I found the correct solution


An error when installing xesmf package

(base) C:\Users\JY Gao>pip install xesmf
Collecting xesmf
Using cached xesmf-0.3.0.tar.gz (532 kB)
ERROR: Could not find a version that satisfies the requirement esmpy (from xesmf) (from versions: none)
ERROR: No matching distribution found for esmpy (from xesmf)

esmpy isn't supported on the Windows system. You can try WSL or docker-miniconda.
Please follow the installation guide.

I get an identical error when installing this on Linux. Is this package designed to only be installed via conda? esmpy is not on PyPI.


QT is $

Thanks to the authors for drafting this simple library. It works great and I've shown it off to my teammates. Keep up the good work.

You're welcome - glad you like it.


add StartTLS proxying

What does this PR do?
This adds postgres starttls support which allows to reverse proxy postgres connections through Traefik (via SNI).
Fixes #7366
Motivation
I'm part of a team that provides managed databases inside our company.
We needed to reverse-proxy many databases and to do this we use Traefik enhanced with this feature successfully for almost 2 years now.
Context:
We have a number of PostgreSQL databases running inside our kubernetes cluster.
All database instances are accessed through Traefik via a single IP address. In order to
access the right PostgreSQL instances from the clients we want to use different subdomains.
One subdomain should be the target address of a specific PostgreSQL instance and we want to
route to it via the SNI (server name indication in TLS header).
This approach seems to be the only possible solution in our setup. We don't have any other information
to identify the target PostgreSQL instance from a client request as it is a tcp connection and not http-based.
Problem:
PostgreSQL performs a StartTLS handshake before sending any TLS header. Since Traefik doesn't perform
this handshake no TLS header is sent and hence Traefik cannot extract the target server name.
Idea:
We propose the following steps:

Traefik simulates a PostgreSQl server and performs StartTLS handshake with client
client now sends TLS header
Traefik extracts SNI
Traefik performs StartTLS handshake with server
Traefik routes connection from client to target PostgreSQL instance

More

[x] Added/updated tests
[x] Added/updated documentation

Additional Notes
Other starttls flavors might be added in future.
Michael Kuhnt<EMAIL_ADDRESS>Daimler TSS GmbH (ProviderInformation)

#8751

.. I just want to point out that my PR most certainly does not fix https://github.com/traefik/traefik/issues/7366.
This was added by somebody.
There are many different StartTLS flavors and in this PR I focused on postgres StartTLS. But the changes in the PR could be a good starting point to also implement SMTP StartTLS.

Thanks for your PR!  We popped it into the design review process, we have scheduled it for review the week of Feb 14th.
There is another PR 8182 that touches the same topic that we wish to integrate before so that we can make sure they play nicely together.

Just letting you know that there has been a delay with PR 8182.  We still need that merged before we can review this one.  Once it is merged one of the reviewers on PR 8182 (@mpl, @tomMoulard, @rtribotte @juliens) will be reviewing this PR.

Currently there is a merge conflict. Due to the router proxy changes this is not a trial merge. I will merge it in the next couple of days .. But it would also be awesome to get feedback to this feature even though it's not fully merged yet.
(The overall feature won't change much)
Is this feature something you would consider to merge? So if you have time to review it, I would really appreciate any ideas on this.

Hello @maigl,
Thanks for your interest in Traefik and for your contribution,
I already handled the rebase locally to take a look at the code in the context of the refactoring implied by the introduction of the TCP muxer.
The PR is labeled as needs-design-review, as you can see in our contribution guide, this means that we have to take a longer look to evaluate how it would interact with the other parts of Traefik, as well as the opportunity of introducing this new feature.
We will come back to you once the design review iteration is done.
As of now, I can say that we understand the changes, and I tested it successfully to proxy TLS connections (well, TCP STARTTLS connections) to PostgreSQL.
We are currently concerned by the interaction with non-STARTTLS routing, as well as the impact on performances.
Moreover, we are also hesitating on adding/supporting a specific implementation for each STARTTLS flavor. Plus, we identified that unfortunately server-first protocols like SMTP, are not going to work, and hence it would not be sufficient to add a new hook. This is a bit of a downside to that PR since most traction we have to support STARTTLS is for SMTP if I'm not mistaken.
As a side concern, ideally, we would have liked that supporting STARTTLS doesn't add more complexity to the actual TCP routing. We have no alternative yet, but we want to take the time to think about it.
In short, thank you for the work done here, and we are going to handle the rebase for you if we decide to validate the design (but I can definitely push the rebased branch right away if you prefer).

@rtribotte Thanks for your feedback, I understand all your points and concerns very well .. we also thought about the downsides (like SMTP problem) and we have no good solution either ..
It would be awesome if you could handle the rebase.
Also, I'm happy to take part in further discussions, maybe we find a better way.

Hello @maigl,
I tried to push to your branch the rebased changes, unfortunately, this is not allowed for branches belonging to organization forks.
Can you re-open a PR from a branch on your personal fork?

Hello @maigl,
I tried to push to your branch the rebased changes, unfortunately, this is not allowed for branches belonging to organization forks. Can you re-open a PR from a branch on your personal fork?

.. sure I can do this .. but it would be a new PR and we would loose the current thread right ? Alternatively, you can also send me a patch and I push it ? What do you prefer ?


Dont throw too_many_columns() when using ignore_extra_column

Hi! Many thanks for a beautiful library.
I noticed that when we use in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
if the csv file's last column is not "vendor", "size" or "speed" a too_many_columns error is thrown.
Would it make sense to not throw that error if we used the ignore_extra_column policy on the reader?

Hi,
On 07/26/2016 07:06 AM, Hugues Malphettes wrote:

Hi! Many thanks for a beautiful library.

Thanks :)

I noticed that when we use |in.read_header(io::ignore_extra_column,
"vendor", "size", "speed");|
if the csv file's last column is not "vendor", "size" or "speed" a
|too_many_columns| error is thrown.
Would it make sense to not throw that error if we used the
|ignore_extra_column| policy on the reader?

Thanks for the bug report, and yes, ignore_extra_column should ignore
additional columns. However, I cannot reproduce the error. My code is
main.cpp:
include "csv.h"
include
using namespace std;
int main(){
io::CSVReader<3> in("ram.csv");
in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
std::string vendor; int size; double speed;
while(in.read_row(vendor, size, speed)){
cout << vendor << ":" << size << ":" << speed << endl;
}
}
ram.csv:
size,speed,vendor,aba
1,3.2,foo,b
5,4.7,bar,a
output:
foo:1:3.2
bar:5:4.7
I am using the latest version of library. Could you please give me a
minimal example that triggers the bug?
Best Regards
Ben Strasser

My apologies, I can't reproduce the issue anymore.
I tried on your example and then on mine.
Sorry for the noise.
Best regards,
Hugues


Column formatting sometimes rounded number

Versions

PHP version: 7.1
Laravel version: 5.4
Package version: 2.1

Description
When exporting to a excel spreadsheet, column formatting is generating a rounded number.
Steps to Reproduce
Expected behavior:
Column with following format:
$sheet->setColumnFormat(array(                     'C' => '0',                     //NUMBER format                 ));
for a number like:<PHONE_NUMBER>444444, it should reproduce the exact same number,
Actual behavior:
Instead, it is generating the following:<PHONE_NUMBER>444440
It is replacing the last "4" with a "0".
Additional Information
By changing the format to "TEXT" or "General" the same happens and the number represent in scientific notation number: 4.44444E+15

It seems that I am experiencing 15 digit precision. Anything exceeding 15 digits will result in rounding.
Is is possible for Laravel-excel do cope with this scenarios? Is it possible to set functions into a cell like for example: =ROUND(ABS(A2-B2),4) ?
Thank you.

Not the ideal solution but it works fine.
$sheet->setCellValueExplicit('C'.$rowCount, $myData);
First I append all the data with the format I want to the row, and then I populate only the cell I need with explicit data using the method setCellValueExplicit.
A little "hack", I would say.


tkinter throwing Frame Not Found for figma design that has frame

python version: 3.11.1
os: windows 10
from terminal:
`Creating Element { name: button, type: group }
Creating Element { name: rectangle, type: rectangle }
Creating Element { name: rectangle, type: rectangle }
Creating Element { name: textarea, type: rectangle }
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\designer.py", line 21, in to_code
frame = Frame(f, self.figma_file, self.output_path, self.frameCounter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\figma\frame.py", line 29, in init
self.elements = [
^
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\figma\frame.py", line 30, in
self.create_element(child)
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\figma\frame.py", line 65, in create_element
download_image(image_url, image_path)
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\utils.py", line 20, in download_image
response = requests.get(url)
^^^^^^^^^^^^^^^^^
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 528, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 456, in prepare_request
p.prepare(
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 316, in prepare
self.prepare_url(url, params)
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 390, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jera500\AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Users\jera500\Documents\Tkinter-Designer\gui\gui.py", line 72, in btn_clicked
designer.design()
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\designer.py", line 32, in design
code = self.to_code()
^^^^^^^^^^^^^^
File "C:\Users\jera500\Documents\Tkinter-Designer\tkdesigner\designer.py", line 23, in to_code
raise Exception("Frame not found in figma file or is empty")
Exception: Frame not found in figma file or is empty`
figma design in question: https://www.figma.com/file/vACgPXKDJCkgfeqcO2zUbf/Untitled?type=design&node-id=1%3A2&t=hTYQlEAcrWdOZ7Ea-1
Everything seems up to spec, Figma also reports that the calls to the Token are valid seeing as the "last used" get properly updated after each attempt.
I have tried restarting gui.py a few times and cloning the design into a new file and generating from that as well. I have successfully generated a simpler layout before and I've double checked to make sure re-generating the simpler design still works. Hopefully someone who knows how the module works can see what the issue is in the error log.

I've posted the fix on this issue post:
https://github.com/ParthJadhav/Tkinter-Designer/issues/341


Persist table column sizes

fixes #27

@JeyRathnam sorry one more thing, could you run npx changeset and do a patch bump of the app package with a change description?
That way it'll make it into the changelog and also bump versions appropriately :)

@JeyRathnam sorry one more thing, could you run npx changeset and do a patch bump of the app package with a change description?
That way it'll make it into the changelog and also bump versions appropriately :)

I have added the changeset commit. Changeset is a cool tool, learned something new!

@JeyRathnam really really sorry for the late review - didn't get a ping for some reason that this was ready again :(
Just enabled automerge to do the rest, thank you so much for contributing!!! 🙏


Package metadata

I hope this gives consistent project and repo URLs on https://www.nuget.org/

Paket
Paket.Core
FSharp.DependencyManager.Paket

I think adding the README would be useful too, since the nuget beta design puts readmes front and center:

Here's how I did this in FSAC, you've got to add the readme to the package and specify the relative path to it from the package root as a property.

@baronfel I've added the readme to the same 3 packages and also replaced the deprecated packagelicenseUrl fields.
I can't work out why, but the repo url doesn't make it into the package metadata.

Repo URLs (and type) are now appearing correctly in the nuspec files.  Should be good to go.

It's now breaking the release process

I think this is a bug with paket's template-file packaging. the two packages that don't use paket templates seem to be well-formed (precisely how fsautocomplete does it).
@forki do you remember how/why paket.core isn't using dotnet pack to package? it might be worth moving to that.

I do not remember. sorry

Looks like the Paket.Core nupkg has put README.md inside a folder named _ within the zip, rather than in the root directory.
I put the following in the paket.template file:
files
    ../../README.md ==> /

I'll see if I can get it to work.

yet another one

yay thanks for the help. Paket 6.0.13 is online


Inherit management template from debian-stretch

Currently management template has parents: ubuntu16 and openjre16
Instead of this we should make one single parent debian-stretch and install openjdk into the management template itself.

Enountered 2 problems:

Jenkins could not build  because Jenkins rh-node had old snap and many otther services running so that updating it could break other things (like snapcraft ansible and jeknins itself)
size of resulting template was bigger (debian-stretch+opendk.deb+mgmt.deb > than 320 MB where as ubuntu16+openjre+mgmt.deb was less ~ 250 Mb)

Blocked by Jenkins @etursunbaev

It's quite odd it's that much bigger.  I can't remember but are you running apt-get clean after that apt-get install?  If not the archives will be lying around in /var/cache/something.  The rest of the size probably from lists being left behind.
Oh and debian-stretch is quite a lot newer than ubuntu-xenial so it is slightly bigger - not much but it is bigger.

If not the archives will be lying around in /var/cache/something
probably yeah , will need to test this after Jenkins is fixed

Sure thing!  Let's just put it this way - I wouldn't be surprised if 5-10 % bigger than the current - but not 20 % + :)

Unblocked!

@lbthomsen cc: @Dilshat
Inside container apt-get update stucks or runs slow.  Done
W: The repository 'http://cdn.subut.ai:8080/kurjun/rest/apt  Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.debian.org/debian-security stretch/updates InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/security.debian.org_debian-security_dists_stretch_updates_InRelease
W: The repository 'http://security.debian.org/debian-security stretch/updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://cdn-fastly.deb.debian.org/debian stable-updates InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/httpredir.debian.org_debian_dists_stable-updates_InRelease
W: The repository 'http://httpredir.debian.org/debian stable-updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/httpredir.debian.org_debian_dists_stretch-backports_InRelease
W: The repository 'http://httpredir.debian.org/debian stretch-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://cdn-fastly.deb.debian.org/debian stretch Release: Couldn't execute /usr/bin/apt-key to check /var/lib/apt/lists/partial/httpredir.debian.org_debian_dists_stretch_Release
W: The repository 'http://httpredir.debian.org/debian stretch Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Network issue not might be, checked several times and downloaded directly from cdn.
What do you think? Might be insecure source?

yeah, and this works well on ubuntu16 @lbthomsen

I think generating Release file and signing it would help if there is no other solution. Pls reffer to @emli for future enhacement

This looks suspiciously like the apparmor issue with Ubuntu.  I know bugger all about Jenkins so not entirely sure.

Done.


ERROR: Cannot install face-compare==1.0.0 and face-compare==1.0.1 because these package versions have conflicting dependencies.

I tried to install as pip install face-compare but got this error.

The conflict is caused by:
    face-compare 1.0.1 depends on tensorflow==2.3.0
    face-compare 1.0.0 depends on tensorflow

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies```

Anyone knows how to fix it?

I would recommend installing face-compare in a new virtual environment. As TensorFlow changes their API over time, one would have to change the codebase of this repository to match, as it is not backward compatible. As this is a very specific model example, I decided to keep the version numbers fixed.

I would recommend installing face-compare in a new virtual environment. As TensorFlow changes their API over time, one would have to change the codebase of this repository to match, as it is not backward compatible. As this is a very specific model example, I decided to keep the version numbers fixed.

Hello. Thanks for this repo today I am planning to test it for comparing stable diffusion generated images and training images
What python version we needs for this repo?
@alexbrunops check out this tutorial for venv https://youtu.be/B5U7LJOvH6g

python >=3.7 should work


Dev Server not working

Hey 👋
I am facing some issues in setting up a local environment.Since there isn't any Contribution guide, so I am not sure whether did I miss something or it's a bug somewhere (dependencies versions most probably)
I cloned the repo and install dependencies, without any configuration to the files I tried starting the dev server but I end up with some eslint plugin issue

Google wasn't a good help in this case, so maybe someone who already faced a similar issue might be able to help me.

List of commands I used:
git clone https://github.com/WFP-VAM/prism-frontend.git --depth=1
cd .\prism-frontend\
npm install
npm start

Hi @khattakdev, thanks for your report. Have you tried using yarn? The project has been set up using yarn and a yarn.lock is available.
That should help make sure that your environment gets started with the correct versions. Please do let us know if that does not work.

I've tried both yarn and npm, nothing works for me. Both are giving the
same errors.
On Wed, Dec 9, 2020, 7:24 AM Eric Boucher<EMAIL_ADDRESS>wrote:

Hi @khattakdev https://github.com/khattakdev, thanks for your report.
Have you tried using yarn? The project has been set up using yarn and a
yarn.lock is available.
That should help make sure that your environment gets started with the
correct versions. Please do let us know if that does not work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WFP-VAM/prism-frontend/issues/119#issuecomment-741476285,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI7WOCVHGWF3LHTQXH5V6FTST3NXJANCNFSM4USLVT3Q
.

what's your OS? I I know I faced issues since EXTEND_ESLINT=true was not being set on windows, but cross-env should solve this. Maybe you can try set it globally in your OS and see if the issue persists?

Thanks to @SimplyBallistic , the issue has been fixed.
Here are the steps (for Windows Users)
git clone https://github.com/WFP-VAM/prism-frontend.git --depth=1
cd .\prism-frontend\
yarn
yarn lint
yarn start


table 5050 Contact inherit HideValidationDialog to person changes in DoModify procedure

to inherit the global variable HideValidation to the changes to the related persons, we would like to have a small addition to the DoModify procedure, marked in the code snippet below with "// BaseApp code modification start"
shortened for better reading:
procedure DoModify(ContactBeforeModify: Record Contact)
var
	OldCont: Record Contact;
	Cont: Record Contact;
	IsDuplicateCheckNeeded: Boolean;
begin
	SetLastDateTimeModified();
	if "No." <> '' then
		if IsUpdateNeeded(ContactBeforeModify) then
			UpdateCustVendBank.Run(Rec);

	if Type = Type::Company then begin
		RMSetup.Get();
		Cont.Reset();
		Cont.SetCurrentKey("Company No.");
		Cont.SetRange("Company No.", "No.");
		Cont.SetRange(Type, Type::Person);
		Cont.SetFilter("No.", '<>%1', "No.");
		if Cont.Find('-') then
			repeat
				ContChanged := false;
				OldCont := Cont;
				if Name <> ContactBeforeModify.Name then begin
					Cont."Company Name" := Name;
					ContChanged := true;
				end;
[...]
				OnBeforeApplyCompanyChangeToPerson(Cont, Rec, ContactBeforeModify, ContChanged, OldCont);
				if ContChanged then begin
					// BaseApp code modification start
					Cont.SetHideValidationDialog(HideValidationDialog);
					// BaseApp code modification stop
					Cont.DoModify(OldCont);
					Cont.Modify();
				end;
			until Cont.Next() = 0;
[...]
	end;

	OnAfterOnModify(Rec, ContactBeforeModify);
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.


qmsched - Allow to use two theme files for switching themes

This allows using the same theme files as in the settings app to switch between two custom themes instead of being fixed onto the two default light and dark themes.
This works by copying the themes into the qmsched settings and from there into system settings to make persistent. Themes are marked with an additional quiet value to make dark==false themes usable in quiet mode. Not setting any theme in the options menu still switches between the default themes.
@rigrig Do you have an opinion on these changes?

The idea was to save on checking at those points by setting the quiet property. switchTheme should only happen because of the scheduled changes or when in the menu, correct? I think the time needed by the in depth check of the theme does not really matter for those few times. Maybe it would make sense to not even store the theme but only the filename and apply it directly from the file instead of making multiple copies?

switchTheme should only happen because of the scheduled changes or when in the menu, correct?

Yes, running a complete comparison shouldn't be a problem.
(I'm not even sure we even need the check, but it seems like the safe thing to do)

Maybe it would make sense to not even store the theme but only the filename and apply it directly from the file instead of making multiple copies?

Good idea.

Seems to work fine. Manual and automatic mode switches work and themes change as expected.

Looks good - thanks!


On unchecking all the options in the feedback modal copies the header text alone.

Describe the Bug
On unchecking all the check boxes in the feedback modal and trying to copy the header alone is copied which does not make any sense.
Steps to Reproduce

In the Modeler, click open the feedback modal.
Uncheck all the check boxes.
Click on "copy to clipboard" button.
We could see the message copied in the button and when we try to paste the same in the Notepad we could see that the header "## Camunda Modeler system information" is copied.

Expected Behavior

When all the checkboxes are unchecked the "copy to clipboard" button should be disabled.
Though it is an edge case but the above said behavior could be a desired one.
Environment

OS: [Windows 10]
Camunda Modeler Version: [4.10.0]
Execution Platform: [Camunda Cloud]

https://user-images.githubusercontent.com/85225325/132756983-30479816-82de-4d0b-8bbe-3b2f8049e545.mp4

Thanks for your report. I agree that your expected behavior would be more sensible. Moving this issue to our backlog.
Let's see if we can get it closed during hacktoberfest :tada:.

Hey! Can I work on this?


clickhouse: 18.14.9 -> 18.14.18

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/clickhouse/versions.
meta.description for clickhouse is: '"Column-oriented database management system"'.
Compare changes on GitHub

Checks done (click to expand)

built on NixOS
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-report had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-server had a zero exit code or showed the expected version
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-client passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-local passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-benchmark passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-performance-test passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-copier passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-extract-from-config passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-compressor passed the binary check.
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-format had a zero exit code or showed the expected version
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-obfuscator passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-odbc-bridge passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-clang passed the binary check.
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-lld passed the binary check.
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-test had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-test-server had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/config-processor had a zero exit code or showed the expected version
/nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/corrector_utf8 passed the binary check.
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse-zookeeper-cli had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin/clickhouse had a zero exit code or showed the expected version
12 of 20 passed binary check by having a zero exit code.
2 of 20 passed binary check by having the new version present in output.
found 18.14.18 with grep in /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18
directory tree listing: https://gist.github.com/87160b8da3952522296ee5a3b4b1c19b
du listing: https://gist.github.com/689dd7f3bea1fe97f0b8d0e7bdd2a248

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)
1 package rebuild(s)
1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
clickhouse

Instructions to test this update (click to expand)

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

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

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18
ls -la /nix/store/vm87ngzyw68dnkvc1iydy5zc8dzpxabr-clickhouse-18.14.18/bin

cc @orivej for testing.

The package itself seems fine, but the module breaks (obviously for a while now) as the package tries to log everything to /var/log. Currently working on a fix, I'll push it tomorrow :)

@orivej I added some minor fixes to fix the module. Unless you have anything to add I'd merge tomorrow :)

@Mic92 anything to add from your side? Otherwise I'd merge this PR to master :)

merging for now (as the module is also broken on master).


[Waiting for #374] Add fetchMore method to the observable query

This PR is based onto #374.
It must be rebased regularly onto #374 until it's merged.
Once #374 is merged a new PR must be created against master.

TODO:

[x] Update CHANGELOG.md with your change
[x] Make sure all of the significant new logic is covered by tests
[x] Rebase your changes on master so that they can be merged easily
[x] Make sure all tests and linter rules pass

Linked to the work of #350
Usage example
let handleCount = 0;
const handle = client.watchQuery({
  query: gql`{
    allPeople @apolloFetchMore(name: "people") {
      id
      name
   }
  `
}).subscribe({
  next({data}) {
    handleCount ++;
    if(handleCount === 1) {
      // data === {allPeople: [{id: 'luke', name: 'Luke Skywalker'}]}
      handle.fetchMore(['people']);
    } else {
      // data === {allPeople: [{id: 'luke', name: 'Master Luke Skywalker'}, {id: 'jarjar', name: 'Jar Jar Binks'}]}
      // Note: if the id matches, consider the item new and discard the old one
    }
  }
});

You can't control the order in which the data is merged, that's why, for now, you should define the order in your rendering function. A next PR may change that but we have the issue of serialising functions into the store ...
Usage example after #453
let handleCount = 0;
const handle = client.watchQuery({
  query: gql`query people($cur: ID){
    allPeople(cursor: $cur) @apolloFetchMore(name: "people") {
      id
      name
   }
  `,
  paginationArguments: ['cursor'],
}).subscribe({
  next({data}) {
    handleCount ++;
    if(handleCount === 1) {
      // data === {allPeople: [{id: 'luke', name: 'Luke Skywalker'}]}
      handle.fetchMore(['people'], {cur: "afterluke"});
    } else {
      // data === {allPeople: [{id: 'luke', name: 'Luke Skywalker'}, {id: 'jarjar', name: 'Jar Jar Binks'}]}
    }
  }
});

Thanks for extracting your work from #350!
I just published a different proposal for a feature that might solve a similar provlem in #455. I would be curious to see if the two can co-exist or we should choose one.

I'll try to take a look on Monday. Thanks for the pointers!


[KARAF-6765] Improve socket collector to support "streaming" mode

retest this please

retest this please

retest this please


Added a solution in Python to 224 Basic calculator.

Pull Request Template
What have you Changed(must)
Added a solution in Python to 224 Basic calculator.
Write here what you have changed in the codebase
Added a py file in the python folder.
Issue no.(must) -
Fixes: #1354
Pr will be close and marked as spam. If issue number not found or issue was assigned to someone else.
Marking as spam can block your account from HacktoberFest.
Self Check(Tick After Making pull Request)

[x] This issue was assigned to me if not it will be marked as spam.
[x] My file is in the proper folder
[x] I am following clean code and Documentation.
[x] I have added the title and what program will do first in the file
[x] I have named the file as (Problem #). (Problem Title(in Camel Case)).(extension)
ex. 2. AddToNumbers.py

README - How to Contribute

Requesting you to review and merge.
@SSKale1
@Yashica7
@swaingotnochill
@JOKUE2002
Cheers!!


Is there any command to download all the dependencies?

Is there any command to download all the dependencies?

I currently did not have one off-the-shelf. For most of the dependencies you can simply run pip install [library name], where the library name is given in the Prerequisites section of our README. For mmcv, please remember to use the following command:
pip install mmcv==1.4.0 mmcv-full==1.4.0

Closed due to inactivity.
Update: docker support is provided in these two PRs: 144 and 145. You are welcomed to have a look at them.


implement DRY utility functionality to avoid copying module inputs and outputs to templates.

It seems to me like the current standard practice of using a template(s) to combine modules into an instantiable piece of infrastructure requires a lot of boilerplate copy/pasting which is also potentially error prone.  It would be very cool to be able to include a 'modules' block in the terragrunt block of terraform.tfvars and then just refer to them in the templates in the modules repo.  This would cause terragrunt to pull the variables and outputs from the modules listed and re-generate them as template variables and outputs - using the variables as-is and rewriting the outputs to refer to the module outputs.  Something like this (note - this isn't fully fleshed out idea - just something that occurred to me while I was hiking this morning)
terraform.tfvars:
terragrunt = {
  remote_state {
    ...
  }

  modules {
    vpc  = "git::ssh://git@github.com/gruntwork-io/module-vpc.git//modules/vpc-mgmt?ref=v0.3.0"
    ecs_cluster = "git:ssh://git@github.com/gruntwork-io/modules-ecs.git//modules/ecs-cluster?ref=v0.3.0"
  }

  terraform {
    source = "git::ssh://git@github.com/terragrunt_modules.git//vpc?ref=vX.Y.Z"
  }
  include {
    path = "${find_in_parent_folders()}"
  }
}

in terragrunt_modules.git//vpc/main.tf:
terraform {
  backend "s3" {}
}

provider "aws" {
  region = "${var.aws_region}"
}

module "vpc-myenv" {
  source = "terragrunt://vpc?output_prefix=myenv"

  module_var = "${var.some_var}"
  next_module_var = "${var.next_var}-myenv"
}

module "vpc-otherenv" {
  source = "terragrunt://vpc?output_prefix=otherenv"

  different_var = "${var.different"}
  next_module_var = "${var.next_var}-otherenv"
  extra var = ["${var.some_list}"]
}

module "ecs" {
  source = "terragrunt://ecs_cluster"

  vpc_id = "${module.vpc-myenv.vpc_id}"
}

There would be a generated_outputs.tf:
output "myenv_vpc_id" {
  value = "${module.vpc-myenv.vpc_id"}
}
...

output "otherenv_vpc_id" {
  value = "${module.vpc-otherenv.vpc_id"}
}
...

output "cluster_id" {
  value = "${module.ecs.cluster_id}"
}
...

That would cause all the outputs generated by each module to be written into a generated_outputs.tf file with the name prefix (or suffix) specified in the URL passed to the source resolver. On the inputs side, the user can specify that they want the template to have the same inputs as the module, no inputs (if there are multiple instances and they can all use the same input vars, you only need inputs from one instance), or name-munged inputs (for multiple instances that want different values).  And then the module is actually configured as-normal, with module input values specified in the module block.
I would think that such a system could all but eliminate the need to copy inputs from modules and copy-modify the outputs from modules - a process that can be a little error prone when performed manually - easy to make copy/paste errors when vars have similar names.
Now I can declare the plugin source once, in the terraform.tfvars file, but I can use it differently in each instance, all without having to deal with writing inputs and outputs except where I want to specify template-specific inputs and outputs.  If you put the modules block in the outer terraform.tfvars file, it would even be possible to just refer to modules by name in templates and it wouldn't even be necessary to configure the source at the lower level since it would just inherit it from the outer file - giving you a single place from which to maintain the set of modules you use in your infrastructure AND their versions, so you can upgrade every instance of a particular module by updating the 'ref' query param in a single place, or maintain multiple versions by simply using multiple urls with different names.
I have no clue as to the complexity of implementing such a thing, but I get the sense that terraform is modular enough to accommodate it.  Most of the work would be in terragrunt, plus needing to implement a different source resolver for modules (or rewriting that block when it copies the file).  But it all seems doable from my VERY n00b perspective.  I can already tell how much typing I'm going to have to do without it...

This would be handy for simple cases, but for the vast majority of real-world cases, it wouldn't be of much help. That's because the most common case includes not only  a module or two, but also all sorts of wiring between the modules, terraform_remote_state data sources to read info from other modules, provider configuration, Terraform version configuration, and so on. E.g., typical example:
provider "aws" {
  # ... various configs
}

terraform {
  required_version = "> 0.10.0"
}

module "foo" {
  source = "..."

  some_param = "${data.terraform_remote_state.vpc.vpc_id}"
}

module "bar" {
  source = "..."

  some_param = "${module.foo.xxx}"
}

data "terraform_remote_state" "vpc" {
  # ... various configs
}

To be able to support all of that you need to write Terraform code. That does mean a lot of copy/pasted input and output variables, which I agree is a bit annoying, but it tends to be pretty quick and easy to do, and represents < 1% of the real work with setting up infra, Terraform code, etc.

Closing in favor of #418.


No inputs were found in config file

No inputs were found in config file. I get this warning after installing next-i18next

Please provide the full error message and a way to reproduce it.


TypeError in manifest.js on Android with Chrome 28

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
This error is thrown:
TypeError: Cannot call method 'call' of undefined
1
File https://rootssearch.io/assets/js/manifest.4d446d350c0a3f09a673.js line 1 in [anonymous]

I'm only seeing it on Android with Chrome 28. I don't have access to that old of an environment. It's being reported via error tracking on my website.
If the current behavior is a bug, please provide the steps to reproduce.
https://gist.github.com/justincy/2b225d2f15429ccbfeb03a34c2e4f61e

What is the expected behavior?
No TypeError
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Chrome 28 on Android

This error happens if a module is missing in the list of loaded modules, but requested from the code.
I can't say why this happens here. Should not happen.
It could happen when i. e. vendor chunk fails to load but app chunk loads fine. In this case modules from vendor chunk are not available...

Open a new issue if you have more information.


Cannot run THEN inside native nested query

It does not appear that you can run a native nested query with a custom nested query inside it. Only way I have been able to do it is to just customer nested all the way down, which requires many more (unnecessary) API calls.

Added support for native inside custom. See https://github.com/haganbt/pepp#mixing-nested-task-types


Themes are classified as plugin

On the plugins page, themes are categorized as "plugins", so they are found in the "plugins" tab and in the "themes" tab.
I think that, as with "pack", they should only be classified as a "theme", in this way they'll no longer appear in the plugins tab.
Fabio.

Fixed in #422


Explicitly add cinderv2 endpoint

This is a new endpoint with 1.2.x and needs to be explicitly ensured.
This would normally come in via the setup tasks, but we skip those tasks
in upgrades to existing clouds.

that's slick how you grab just that one item out of the keystone.services list

It might be being overly cautious, endpoint addition is idempotent so we could just run through them all, but for now we know we're just adding the one.


qcbc content entropy and frequency options return identical results when using --out

I know the entropy is calculated from the frequency, but this might be something to note in the readme for users.

Resolved.


Hi

[Enter feedback here]

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

ID: 9421cd51-7a71-75a0-94d4-c93156fb8970
Version Independent ID: 4d5d4f9d-75bf-f968-230c-aeb0849ae506
Content: Export a Jupyter Notebook project from the Azure Notebooks Preview
Content Source: articles/notebooks/quickstart-export-jupyter-notebook-project.md
Service: azure-notebooks
GitHub Login: @JoshuaPartlow
Microsoft Alias: joshuapa

Test issue


replace starting-ip-address to ip-addresses

starting-ip-address can't handle ip such as "<IP_ADDRESS>, <IP_ADDRESS>".

Do we need open 172 - 191 ip group?

Do we need open 172 - 191 ip group?

Not necessary, the ip in env of qa is<IP_ADDRESS>-13, <IP_ADDRESS>-13 , <IP_ADDRESS>-13


Can't inspect disabled Flowchart

Reported on the forum

I've added a detailed description on how to reproduce this with a new project.
Short summary: on a disabled flowchart block the inspector will show a block from the other, active, flowchart.


Country code used for fetching areas should be part of a baseline version

As it stands country code used in the /symphony-ws/service/nationalarea/ REST endpoints is configured in set through environment.ts on the frontend. It would make more sense to put it in a baselineversion, so it is automatically set on the frontend. (The frontend setting can still exist but would only be used to override the baseline's default country code).

A first take at this would be to move the setting to the backend properties file (introduce new /service/nationalareas endpoint which uses that value instead of frontend requesting one)

Setting is moved to backend properties which should be a step in the right direction, but leaving this open for discussion on whether it should be part of the baseline entity. The advantage of that approach is that several areas can coexist on the same installation.

There is now a locale field in the baselineversion entity. If a full locale including country is specified here the country part could be used, but perhaps this is to magical and a separate column should be added.


Use width of button frame instead on windows decor width when checking for button stacking

Using the width of the window decor is not correct (at least on Lollipop and KitKat) as its width seems to be larger that the dialog width.

Cool, thank you


[EVENT] Openscapes SWOT Ocean Workshop

Summary
Hi All, This is a 2-day hands-on demo for the SWOT Oceanography Cloud Workshop for a small group of researcher principal investigators coordinated by Catalina Oaida (PODAAC) as part of NASA-Openscapes.
Event Info

Community Representative: @jules32, @erinmr
Event begin: March 16, 2022
Event end: March 17, 2022
Active times: 9:00am 1:00pm Pacific
Number of attendees: 20-30
Hub Events Calendar

Hub info

Hub URL: https://openscapes.2i2c.cloud/hub/
Hub decommisioned after event?: no

Task List
Before the event

[x] Dates confirmed with the community representative and added to Hub Events Calendar

[ ] One week before event Hub is running.

[ ] Confirm with Community Representative that their workflows function as expected.

👉Template message to send to community representative
Hey {{ COMMUNITY REPRESENTATIVE }}, the date of your event is getting close!

Could you please confirm that your hub environment is ready-to-go, and matches your hub's infrastructure setup, by ensuring the following things:
- [ ] Confirm that the "Event Info" above is correct
- [ ] On your hub: log-in and authentication works as-expected
- [ ] `nbgitpuller` links you intend to use resolve properly
- [ ] Your notebooks and content run as-expected

[ ] 1 day before event, either a separate nodegroup is provisioned for the event or the cluster is scaled up.

During and after event

[ ] Confirm event is finished.
[ ] Nodegroup created for the hub is decommissioned / cluster is scaled down.
[ ] Hub decommissioned (if needed).
[ ] Debrief with community representative.

👉Template debrief to send to community representative
Hey {{ COMMUNITY REPRESENTATIVE }}, your event appears to be over 🎉

We hope that your hub worked out well for you! We are trying to understand where we can improve our hub infrastructure and setup around events, and would love any feedback that you're willing to give. Would you mind answering the following questions? If not, just let us know and that is no problem!

- Did the infrastructure behave as expected?
- Anything that was confusing or could be improved?
- Any extra functionality you wish you would have had?
- Could you share a story about how you used the hub?

- Any other feedback that you'd like to share?

@damianavila can you do this too?

Yep, I can take care of this one too, @yuvipanda.

FYI, I have successfully already scaled up the cluster to 30 nodes.
Btw, according to @yuvipanda, the support ticket about the Dask Gateway issue (https://2i2c.freshdesk.com/a/tickets/105) was already worked out (and solved) and things should be running as expected.

Great, thanks so much @damianavila !

FYI, I have successfully scaled down the cluster since I saw user numbers around the levels before the start of the event.

Since we did not hear anything more about the Dask Gateway issue, I presume everything was working smoothly. Let us know if that is not the case.
Btw, I will be scaling up the cluster again tomorrow at about the same time I did it today.

Dask Gateway seems to be working again @damianavila, we're still trying to figure out what would be a good strategy for data persistence in the worker nodes but that's a different story. Thanks a lot!

Dask Gateway seems to be working again

Glad to know that is the case!
FYI, I have successfully already scaled up the cluster to 30 small nodes again.

we're still trying to figure out what would be a good strategy for data persistence in the worker nodes but that's a different story

I think @consideRatio might have some thoughts about this one since he has been in contact with Dask Gateway lately.

we're still trying to figure out what would be a good strategy for data persistence in the worker nodes but that's a different story

Hmm... I think the workers, which will be ephemeral when they shut down, can persist some data in memory and maybe on storage while they live. I recall a concept of managed and unmanaged data by the dask workers, and where managed data is supposed to be collected at some point in time from someplace else etc, while unmanaged is not collectable data.
I know it can be tricky to understand and know what kind of data should be considered managed, and not cleared, by dask workers. I recall the difference can be with regards to what kinds of variables your functions that run on your dask workers etc or what is being returned hmm.
I'm not a dask user, I've just been a person helping out trying to debug issues really. Well this captures my vague understanding about the situation. I think questions about this could be relevant to ask in https://dask.discourse.group/ where they will be more visible and re-findable if answered.

I don't think the Dask worker persistence is an urgent issue. Some tasks (embarrassingly parallel) require reprocessing a lot of files and dumping the results into an attached storage (available on each worker node) is more practical than sending them back to the scheduler. For cloud workflows a common pattern is to pass the workers S3 credentials so each task can persist data to an S3 bucket, so I'm guessing that's probably the path will have to take if we want to do some big data processing (costs aside).

FYI, I have successfully scaled the cluster down.
Btw, I noticed there were more than 40 users at some time during the day as it is shown below:

Given the fact we are a few users above the "planned" attendance (and arriving slowly), I guess most of your attendees did not notice the additional delay at the time to spin up a new node. Btw, if you are expecting more people at the last minute, let's know and we will try to accommodate the cluster warming as well.
As usual, feel free to write back any feedback you may have. Otherwise, I will close this issue in the next few hours/days.

Thank you @damianavila et al! This worked great this week, thank you so much. Yes we had some more than the "planned" attend and they didn't notice any delay. Thank you - in the future we'll let you know as there are more folks joining last minute.
We really appreciate your help! Really awesome to help folks get oriented in the Cloud :)


Make this optional

https://github.com/AI-READI/pyfairdatatools/blob/main/pyfairdatatools/generate.py#L41C7-L41C7

Make dataset creators affiliation have a minItems of 1

https://github.com/AI-READI/cds-specification/commit/b48924ee18371da843d4fec500c58d285d9307e1


foo-example: fix by adding 'padded'

Fixes #491 by adding padded to sum which ensures that all expressions allow for trailing / leading whitespace

All good 😅 I just saw your comment in the issue


[Bug] SpecialStatusEffects DAE Incompatibility

Description
Detection modes that rely on specialStatusEffects (such as Witch Sight) do not function when the module Dynamic Active Effects (DAE) is enabled.
Steps to Reproduce

Place any actor token on a scene with vision enabled
Grant the actor Witch Sight via the token configuration menu
Place an actor with the "Shapechanger" trait (such as a Werewolf) next to the first actor
Observe how with DAE disabled, the werewolf is detected, but with DAE enabled, the werewolf is not
Select the werewolf token, open the console, and enter _token.actor.statuses
Observe how with DAE enabled, the werewolf has no statuses

Versions
Foundry Version: 12.328
DND5e Version: 3.2.1
Vision 5e Version: 2.3.1
Other Modules
DAE 11.3.33
libWrapper <IP_ADDRESS>
socketlib 1.0.13
Likely Cause
DAE's applyDaeEffects() function appears to clear all non-active effect statuses.

I don't think I can do anything about that. I don't know why applyDaeEffects wipes the statuses. It looks like DAE needs some changes.

This is definitely a dae bug, not perfect vision. I'll have a look at it.

This appears fixed as DAE 11.3.35. Thank you both for your time.


Can't get document by id on database

The database object is missing a function to query a document by its _id.
Or I was just not able to find it but I scanned the class documentation for a couple of times.

To be complete: It seems like you can't even get a document by _id on a collection.

Hi @felixlinker
That's right. The internal REST API provided by ArangoDB (which python-arango builds on top of) does not expose calls to handle documents via their _id field. Could you please let me know what your use case is?  The _key and _rev fields should be enough to let you handle all documents uniquely.
Thanks,
Joohwan

I'm trying to validate input. In a method that will add an edge I'd like to check whether the referenced _from/_to documents are present in the database.
pyArango manages to do do it. But it seems like they just split the _id. Of course that is something I could do by myself. (But don't get me wrong I prefer your python-arango over pyArango ;) ). Here is my reference: https://github.com/tariqdaouda/pyArango/blob/master/pyArango/database.py#L118

Right I see what you mean. Adding that method to the db class should be trivial. I will take a note of this when working on the next release. Unfortunately, as of right now you will have to do the manual splitting yourself. Thanks for pointing this out and sorry for the inconvenience!

No worries! There's nothing for me to complain about. You're developing open source therefore I can't demand anything from you. In the worst case I'd stop using your package. But I won't stop using it because it's good!
Thanks anyways for adding it.

Hi @felixlinker,
I added a new method Database.get_document to cover your use case in the latest release https://github.com/joowani/python-arango/releases/tag/3.5.0. Please check it out and let me know if you have any problems with it. Closing this out. Thanks.


Calling focus on AceEditor is not working

Describe the bug
After calling focus there should be a blinking cursor in the field but it seems like focus method doesn't have any effect.
Snippet To Reproduce the problem
public class TestEditor extends VerticalLayout {
    public TestEditor() {
        var ace = new AceEditor();
        addAndExpand(ace);
        ace.focus();
    }
}

Sorry for the lack of support recently,
I was able to fix your issue. With Lit-Element as Frontend the vaadin .focus() doesnt work. I created a overwrite that calls a function in the frontend, which sets the focus on the textinput perfectly.
I'll try to contribute as much as I did some time ago to the ace editor to bring you the best experience...
Sorry again for the wait,
David

I tested and closed issue. Works perfectly.


Feature Request: X-Editable Template

Maybe it is possible to avoid requiring to maintain separate templates to render a read-only view of a document and editable auto-form templates. And to get x-editable like features at the same time:
Just defining an autoform template with desired layout classes may be enough in many cases, if autoform could toggle between rendering the fields as input elements, as click-to-edit-links (e.g. dotted underline), or plain text (making the read-only template unnecessary).
Toggling could be controlled by an option or the user clicking on the link or buttons if this is allowed.
(Additional hidden fields may still be rendered for the click-to-edit links or plain text representations, if some other field is editable and the form is submittable.)

Wondering if x-editable integration took place. In-place editing would be invaluable for screen-space optimization, especially in tables + mobile combination scenarios

Ok - I took a stab at it and was able to make simpleschema work with xeditable upto the point of being able to display the editor and update the value in UI fine - but updating the value back to the collection is leading to error Error("When the modifier option is true, validation object must have at least one operator"); Once it is fixed, this xeSelectField can be used similar to select quickfield  and other equivalents can be easily created simiarily.
Template["xeSelectField"].rendered = function () {
    var self = this;
    var collection = (self.data.collection == null ? ((self.data.doc != null && self.data.doc._af!=null)? self.data.doc._af.collection : null ): self.data.collection);
    if (!collection) {
        throw new Error("xeSelectField: You must specify a collection.");
    }
    var ss = collection.simpleSchema();
    var fieldName = self.data.name;
    self.$('a.xEditable').editable({
            pk: self.data.doc.id,
            type: 'select',
            value: self.data.doc[fieldName],
            source: _.map(self.data.options, function (x) { return { text: x.label, value: x.value }; }),
            mode: "inline",
            onblur: "ignore",
            success: function (response, newValue) { collection.update({ _id: self.data.doc.id }, { fieldName: newValue }); } //TODO: if using backend server, may want to check server response
    });
}

// HTML
<template name="container">
  {{#each esMappings}}
	{{> xeSelectField collection=esMappingsColl doc=this name="measureFn" options=measureOptions }}
  {{/each}}
</template>
<template name="xeSelectField">

</template>

Helpers
Template['container'].created = function () {
    this.esMappings = new Mongo.Collection(null);
    this.esmAFSchema = new SimpleSchema({
        label: { type: String, index: 1, unique: true },
        tgm: { type: String, optional: true },
        measureFn: { type: String },
        displayTitle: { type:String, optional: true}
    });
    this.esMappings.attachSchema(this.esmAFSchema);
}

Template['container'].helpers({
    esMappings: function () {
        return Template.instance().esMappings.find(); // a reactive cursor is returned
    },
    esMappingsColl: function () {
        return Template.instance().esMappings; // the whole collection is returned (and may not be reactive ?)
    },
    measureOptions: function() {
        return [
                { label: "Average", value: "Average" },
                { label: "Count", value: "Count" },
                { label: "Max", value: "Max" },
                { label: "Min", value: "Min" },
                { label: "Sum", value: "Sum" },
                { label:"UniqueCount", value:"UniqueCount"}
        ];
    },
});

Note that I tried both using the xeSelectField directly and also inside an autoform directive - did not help, still gets that error.
	{{#autoForm id=makeUniqueID_gb type="update" collection=esMappingsColl doc=this autosave=true  template="bootstrap3-inline"}}
	    {{> xeSelectField  doc=this name="measureFn" options=measureOptions }}
	{{/autoForm}}

:+1: for x-editable integration. The project itself is frozen, but there's a semi-promising fork.

+1


New User: Urban Airship

Name: Urban Airship
Homepage url: https://www.urbanairship.com/
Brand Guidelines/Licensing: https://urbanairship.box.com/s/as15xdiw8ydl1f5jk8gf8v36kykpq4uv
Logo: https://urbanairship.box.com/s/8rvnzyvd3vo9bht5hpgoz8xmljlxfo5j

Nice, wanna open a PR for it? Here's some examples

https://github.com/babel/babel.github.io/pull/553


I want to be a mod or admin of the turkey community.

Clear and concise description of the problem
your new project go language I want to be a part of you turkey committee is a very strong one and I want to help you assuming I live in turkey
Suggested solution
your new project go language I want to be a part of you turkey committee is a very strong one and I want to help you assuming I live in turkey
Alternative
No response
Additional context
No response
Validations

[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Thanks for your support.
Please contact @KyleIBAX at Telegram.


ci: Investigate running cargo udeps in ci.

Is your feature request related to a problem or challenge?
See discussion , we are expecting to remove unused dependencies.
Describe the solution you'd like
Run cargo udeps in ci, which requires unstable rust.
Describe alternatives you've considered
No response
Additional context
No response

take

arrow-datafusion on  main [?] is 📦 v37.0.0 via 🦀 v1.77.1 on ☁  (us-east-1) took 1m
❯ cargo +nightly udeps --all-targets
...
unused dependencies:
`datafusion v37.0.0 (/opt/dev/arrow-datafusion/datafusion/core)`
└─── dev-dependencies
     ├─── "bigdecimal"
     ├─── "postgres-protocol"
     ├─── "postgres-types"
     ├─── "rust_decimal"
     └─── "tokio-postgres"
`datafusion-benchmarks v37.0.0 (/opt/dev/arrow-datafusion/benchmarks)`
└─── dev-dependencies
     └─── "datafusion-proto"
`datafusion-functions v37.0.0 (/opt/dev/arrow-datafusion/datafusion/functions)`
└─── dev-dependencies
     └─── "rstest"
`datafusion-physical-expr v37.0.0 (/opt/dev/arrow-datafusion/datafusion/physical-expr)`
└─── dependencies
     ├─── "blake2"
     ├─── "blake3"
     ├─── "hex"
     └─── "sha2"
Note: They might be false-positive.
      For example, `cargo-udeps` cannot detect usage of crates that are only used in doc-tests.
      To ignore some dependencies, write `package.metadata.cargo-udeps.ignore` in Cargo.toml.
      ```

❤  -- this will help.a lot -- thank you

❤ -- this will help.a lot -- thank you

I'll try to integrate it into ci next week.


Search support

Close #216
The PR has not been completed and some impl may need discussions IMO
The PR adds search support. For UI it adds a search box with result dropdown on the right of breadcrumb. For utils it adds getStrSimilarity and useClickAwayListener. For API it adds new query string field q in index.ts and handle it like raw. For config it adds 2 options into config/site.json.
The searching is done by OneDrive provided API, or builtin string similarity util, according to options. The default policy ascii-onedrive-else-builtin is to use OneDrive API when all is ASCII, else builtin.
The builtin search relies on traverseFolder of MultiFileDownloader.tsx to get all files in current folder, and compute string similarity via getStrSimilarity of getStrSimilarity.ts, where there is description about the algorithm. The getStrSimilarity should work on all languages including English and Chinese.
What have not been completed in the PR are:

[x] It seems that the function to extract path from webUrl to convert ID to path works for me but not for the dev build (the dev build webUrl seems to use ID other than path). Other methods are required. Fixed
[ ] When using builtin search, it is extremely slow (minutes literally). At least a per-session per-path caching is required. Or maybe we can move traversing to api, if client-to-server is much slower than server-to-OneDrive-server (It should be, though tests are required).
[ ] Even using OneDrive provided API, search is still slow (about 3s), so a loading icon is required
[ ] Dark mode support
[ ] Mobile support

you can use this for pop up ui: https://headlessui.dev/react/dialog - already present in the dependencies
put the search button in the nav bar instead, putting it beside the breadcrumb is not ideal for mobile layouts.

IMO dropdown (also shipped in headlessui) is closer to input box to show the relationship between them, and has a consistent experience as other search such as search engines. As for dialog, because it can stop users' reading immediately, it is better to be used to ask users for urgent information like credentials. The search query string is not so urgent, so I used dropdown. However, dialog may fit the search consumption better, as it costs fairly a long time to do a searching even with OneDrive provided API. I would be OK to both solutions, and I thought it better you to make the decision.

the search in tailwind css documentation site is a pop over, and the search in github documentation site is a slideover, so...

oh, and i see you are sending quite a lot of requests when doing a search - basically traversing every subfolder and every file:

you know that we have a persistent storage now right ;), we can do some pre-indexing and perform search on the indexed files -  just a thought - the idea is basically having a cron job setup every 24 hours that:

do a full traverse of the directories inside a onedrive storage
get a serialised indexed file/directory listing that's searchable
save the serialised index in redis

and on another api endpoint (serverless function route) such as /search?q={query}

perform search on the indexed file stored in redis
and returns a list of files/directories and their respective links

i would think that this is the most performant solution for searching without onedrive's own api and with support for cjk. the only caveat is the indexing may take some time for large onedrive storages, which are not ideal as long running jobs (longer than 5 secs) may be terminated by vercel.
another thing is that i do plan on refactoring the project to use getStaticProps instead of the current useSWR implementation, which means i am definitely implementing a function for traversing the entire directory for a list of available static paths to generate (getStaticPaths (Static Generation)) sooner or later. but this would only happen during build time, which is not time limited, but vercel doesn't provide any runtime function for long running tasks, so...we need to solve this imo

ok, on the github actions thought:

cron job: ✅
available for long running command: ✅
avaible to all forked repos: ✅
connection to redis: i should think so

so, the idea would be:

user: deployment to vercel trigger github actions (or cron job)
github actions: fetch a pair of available tokens in redis
github actions: do the heavy lifting part - indexing the entire onedrive directory
github actions: save the serialised index data back in redis

and so, what we need here:

[ ] a custom github actions for the heavy lifting work
[ ] serverless function api for the search query

and voila!

GitHub Actions ToS says:
Additionally, regardless of whether an Action is using self-hosted runners, Actions should not be used for:

...

- if using GitHub-hosted runners, any other activity unrelated to the production, testing, deployment, or publication of the software project associated with the repository where GitHub Actions are used.

And last year GitHub did take some repos (even accounts) down, even they are just doing checkin tasks. So I worry that indexing via GitHub Actions is a little dangerous. Not sure.
Anyway indexing via cron job is great, only the runner is a problem.

closing in favor of #283 being merged


Remove manager to interchange work requests to speedup sequential task distribution

single-latency.py.txt
Prior to this PR, the interchange calculated how many tasks to send to a manager based on the minimum of: how many tasks the manager most recently requested (minus sent tasks); how many tasks the manager has total capacity for, minus the number of tasks in flight.
The most recently requested count is made on an exponential backoff, which continues to backoff when a manager is saturated with long tasks. That means that the requested task count is sometimes not updated for quite a long time.
This PR removes that clause entirely, and the code that delivers that information. Now the interchange relies only on the computed maximum capacity minus the number of tasks in flight - this code was added in PR #881, but alongside the previous "manager requests work" value.
A new task will be dispatched when a result arrives from a manager, freeing up a slot, rather than on a separate free_capacity poll: so new task dispatch is now much more event driven.
On my laptop on master prior to this PR, the attached demonstrator code shows that when tasks execute quickly, tasks begin executing just over 1 or just over 2 poll_periods after submission; but when tasks take a long time and a manager is saturated, backoff of poll periods in the manager means that the manager remains idle for sometimes 9 seconds before starting to execute a task.
After this PR, the same code shows tasks executing in just over one poll period in both situations.
I have tried this with a range of poll periods from 10 to 500ms.
With smaller poll periods, 1 .. 3 ms, I have noticed that the slow task saturated case takes a few ms longer for task dispatch compared to the fast task path. I have not investigated why that happens, and I don't intend to for this PR.
@WardLT noticed this behaviour in May 2022, and it is still present at time of writing this PR.
Type of change

Bug fix (non-breaking change that fixes an issue)

While profiling this, I've noticed that there is a situation where task performance is less. There's a race condition  in the sequential task case when finishing one task, looping back to user space, submitting a new task, which means that because the poll is not interrupted, that new task will take almost exactly one poll period to dispatch.
Previously this could have been lower, because the frequent task requests by managers would make the poll end before the poll period.
I'm not super concerned about this at the moment: this PR moves performance in this situation from a big range of times, some of them awful, to being almost exactly the poll period for each task.


how to create a custom method call with passing object.

Hello, I wanted to make a custom method call at a certain module, and pass an object of another model as this method accepts an object. I tried to send in form of array, json, but no matter what parameter is passed, It throws the error that the parameter is required. so there are two questions here.

how to pass a parameter to a function using call method.
is it possible to pass an object of another entity to the call method as parameter and odoo recognizes that.?

//Try this code
$stock_picking_id = 2;
$result=$odoo->call(
'stock.picking',
'action_confirm',
[(int)$stock_picking_id]
);