Use of Azure endpoints?

This is really awesome. Is it possible to use with Azure endpoints?
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?pivots=programming-language-python&tabs=command-line
Thanks

Yes, it should be possible, although I have not tested it with Azure myself.
When you call chatstream.chat_server(), you can pass it a url. See the docs here:
https://wch.github.io/chatstream/reference/chat_server.html#chatstream.chat_server
I believe you should still set the OPENAI_API_KEY environment variable. In the docs you linked to, they recommend setting AZURE_OPENAI_KEY, which you could do, but then you would need to get that env var's value manually and pass it like chatstream.chat_server(api_key=os.getenv("AZURE_OPENAI_KEY"), ...).
If you test it out, please let me know how it goes!

I tried but it didn't seem to work  - perhaps due to company firewall. I will dig in further

Hi @wch, any chance you can add proxy and deployment_name as arguments to chat_server? There have been some issues regarding discrepancies between model and engine/deployment names on the Azure endpoint.
I modified my server function in basic/app.py as follows:
def server(input: Inputs, output: Outputs, session: Session):
    chatstream.chat_server(
        "mychat",
        model="Turbo", # also tried "gpt-35-turbo", didn't work
        url=os.getenv("OPENAI_API_BASE"),
        api_key=os.getenv("OPENAI_API_KEY"),
    )

and getting

Unhandled error: 'Could not automatically map Turbo to a tokeniser. Please use tiktok.get_encoding to explicitly get the tokeniser you expect.'

When I set model="gpt-3.5-turbo", I got

Unhandled error: Please set the OPENAI_API_KEY environment variable to your OpenAI API key.
which sounds like it's still using the default Open AI url, not my Azure endpoint.

I'm not sure if we're using langchain but I wanted to include a few issues in case they're relevant:

https://github.com/openai/openai-python/issues/318
https://github.com/hwchase17/langchain/issues/3251
https://github.com/hwchase17/langchain/pull/6697/files
https://github.com/hwchase17/langchain/issues/4575
https://github.com/hwchase17/langchain/pull/3076

In case it is useful information gptstudio provides the ability to connect to an Azure endpoint.
https://github.com/MichelNivard/gptstudio

@trangdata I don't have access to Azure OpenAI, but I just applied for access. Hopefully I will be given access in the near future, but until then I'm not able to test anything with Azure.
I'll try adding proxy and deployment_name in a pull request.
For reference, this is their documentation on the differences between using OpenAI's endpoints vs. Azure's endpoints.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/switching-endpoints

@trangdata I don't see proxy as a possible parameter to .create() or .acreate(). Taking a quick look at the openai source code, I think you will have to set it like this:
import openai

openai.proxy = "..."

I've created a PR for Azure support, #10. Please see that PR and test it out. There is more information and instructions in the PR.

Thank you for the quick response! I installed the new chatstream version in the PR, added some openai configs (below) to my app.py, and uses endpoint_type = "azure" in chat_server, and it doesn't error out but the app just kinda stalls with ... in the response text box.
openai.api_type = os.getenv("OPENAI_API_TYPE")
openai.api_base = os.getenv("OPENAI_API_BASE")
openai.api_key = os.getenv("OPENAI_API_KEY")
openai.proxy = os.getenv("OPENAI_PROXY")
openai.api_version = "2023-03-15-preview"  # "2022-12-01"

When I set model="Turbo" or model="gpt-35-turbo", which is what I would do for other projects using the Azure endpoint, I received the same error as before.

Unhandled error: 'Could not automatically map gpt-35-turbo to a tokeniser. Please use tiktok.get_encoding to explicitly get the tokeniser you expect.'

Quick answer because I’m on my phone: shouldn’t there be a period in gpt-3.5-turbo?

Actually no. Azure is very odd with their engine/deployment name and model name. See https://github.com/hwchase17/langchain/issues/1577#issuecomment-1479489910 and example: https://github.com/hwchase17/langchain/issues/3251#issuecomment-1566531223

In the PR I just pushed some code to map from Azure model names to OpenAI model names.
@trangdata Please give it another shot. Thanks!

I received access to Azure OpenAI, and got it working; see #10 again for instructions and an example app. Please give it a shot!
The API in that PR is currently really awkward to accommodate OpenAI and Azure-OpenAI, and I will clean that up before merging.

Hmm, so I installed the new changes, but the app hangs after I enter a prompt.

openai.error.APIConnectionError: Error communicating with OpenAI

Full message
Task exception was never retrieved
future: <Task finished name='Task-9' coro=<stream_to_reactive..task_main() done, defined at /Users/let20/Documents/chatstream/chatstream/init.py:547> exception=APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None)>
Traceback (most recent call last):
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/openai/api_requestor.py", line 668, in arequest_raw
result = await session.request(**request_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/connector.py", line 899, in _create_connection
_, proto = await self._create_proxy_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/connector.py", line 1221, in _create_proxy_connection
proxy_req = ClientRequest(
^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 305, in init
self.update_host(url)
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 364, in update_host
raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: proxy-server.bms.com:8080
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/let20/Documents/chatstream/chatstream/init.py", line 550, in task_main
func = await func  # type: ignore
^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 45, in acreate
return await super().acreate(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 217, in acreate
response, _, api_key = await requestor.arequest(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/openai/api_requestor.py", line 372, in arequest
result = await self.arequest_raw(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/let20/miniforge3/envs/intel-search/lib/python3.11/site-packages/openai/api_requestor.py", line 685, in arequest_raw
raise error.APIConnectionError("Error communicating with OpenAI") from e
openai.error.APIConnectionError: Error communicating with OpenAI

Is there any way of testing the api call is able to connect?
I am also getting the hanging issue but I get an SSL error saying that SSL:certificate_verify_failed for our Azure endpoint.
Thanks!

@iainmwallace I have a had some difficultly getting error messages to show up immediately. I think it has something to do with it receiving the data on a separate Task, but I'm not 100% sure.
@trangdata I see some references to a proxy in the stack trace, and I know you mentioned something about a proxy earlier. I don't see anything in the Azure OpenAI docs about using a proxy, though. How are you using it?
For both of you, have you tried running the example app in https://github.com/wch/chatstream/pull/10#issuecomment-1641451668 ?
Note that you will need to set the openai.api_base URL (https://winstontest.openai.azure.com in the example) as well as a deployment ID (my-gpt-35-turbo in the example).

Here is a simple script I used to test communication with Azure:
import openai
openai.api_type = "azure"
openai.api_base = "https://winstontest.openai.azure.com/"  # <- Customize this
openai.api_version = "2023-03-15-preview"
openai.api_key = "xxxxxxx"                                 # <- Customize this

resp = await openai.ChatCompletion.acreate(
  deployment_id="my-gpt-35-turbo",                         # <- Customize this
  messages = [{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Tell me about yourself"}],
  stream=True
)

print(resp)

async for chunk in resp:
    print(chunk)

If you run this, it should print out a lot of messages which look something like this:
{
  "id": "chatcmpl-7e7JqYddw8TgaKtbzs6VTwqk1rE5R",
  "object": "chat.completion.chunk",
  "created":<PHONE_NUMBER>,
  "model": "gpt-35-turbo",
  "choices": [
    {
      "index": 0,
      "finish_reason": null,
      "delta": {
        "content": " efficient"
      }
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-7e7JqYddw8TgaKtbzs6VTwqk1rE5R",
  "object": "chat.completion.chunk",
  "created":<PHONE_NUMBER>,
  "model": "gpt-35-turbo",
  "choices": [
    {
      "index": 0,
      "finish_reason": null,
      "delta": {
        "content": "."
      }
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-7e7JqYddw8TgaKtbzs6VTwqk1rE5R",
  "object": "chat.completion.chunk",
  "created":<PHONE_NUMBER>,
  "model": "gpt-35-turbo",
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "delta": {}
    }
  ],
  "usage": null
}

If this works, I think the example app in the PR should work.

Thanks, that is incredibly helpful.
I get an errror 'InvalidURL' when I use the function acreate:
resp = await openai.ChatCompletion.acreate(model="gpt-4", deployment_id="gpt-4", messages=[{"role": "user", "content": "Hello world"}])
But with the chatcompletion function example from https://github.com/openai/openai-python#usage, it works as expected:
chat_completion = openai.ChatCompletion.create(model="gpt-4", deployment_id="gpt-4",messages=[{"role": "user", "content": "Hello world"}])
print the chat completion
print(chat_completion.choices[0].message.content)

A couple questions:
What version of openai are you using?
>>> import openai
>>> openai.__version__
'0.27.8'

What happens if you call acreate() without model? My understanding is that the model parameter isn't used by Azure, and perhaps including it doesn't cause problems for create(), but does cause problems for acreate(). See here for the docs about it: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/switching-endpoints#keyword-argument-for-model

I am using 0.27.8 and I get the same error when removing the model parameter  in acreate(). Removing create() continues to work without the model parameter.
I will ask internally if anyone has gotten this function to work, and will report back

I don't think you're running into this problem, but for future reference, I just realized that I need to mention one very important thing about the acreate() code I provided -- it must be run in an environment that's run with asyncio so that await can be called from the top level. I'll edit the comment above to mention this.
In practice, I ran it with ipython. (I think it should work from a Jupyter notebook as well but I'm not 100% sure.)
If you run it with the plain python interpreter, it will give this error when you use await at the top level. For example:
>>> resp = await openai.ChatCompletion.acreate( .... )
SyntaxError: 'await' outside function

I am trying to use it in conjunction with azure openai... did try passing the params to
chatstream.chat_server(         "mychat",         url=config['AZURE_OPENAI_BASE_URL'],         api_key=config['AZURE_OPENAI_API_KEY'],         model="gpt-4",         text_input_placeholder="How can I help you?",         deployment_id="gpt-4",         debug=True     )
but I get an error stating

and if I remove the deployment_id, I am getting the error

am I missing something??

@nsvbhat Did you install the chatstream version on that PR?
pip install chatstream@git+https://github.com/wch/chatstream.git@azure

@trangdata yes.. i have used the same one..

@nsvbhat oh I think azure_deployment_id is the argument you want, not deployment_id.

ok i see that in the library its called azure_deployment_id and not deployment_id .. will trying using that n see.

@trangdata I see some references to a proxy in the stack trace, and I know you mentioned something about a proxy earlier. I don't see anything in the Azure OpenAI docs about using a proxy, though. How are you using it?

I'm setting proxy in app.py along with other openai variables, and this has worked for me in different projects too:
openai.api_type = os.getenv("OPENAI_API_TYPE")
openai.api_base = os.getenv("OPENAI_API_BASE")
openai.api_key = os.getenv("OPENAI_API_KEY")
openai.proxy = "proxy-server.bms.com:8080"
openai.api_version = "2023-03-15-preview"

For both of you, have you tried running the example app in https://github.com/wch/chatstream/pull/10#issuecomment-1641451668 ? Note that you will need to set the openai.api_base URL (https://winstontest.openai.azure.com in the example) as well as a deployment ID (my-gpt-35-turbo in the example).

Yes. This is what my server function looks like:
def server(input: Inputs, output: Outputs, session: Session):
    chatstream.chat_server(
        "mychat",
        api_key=os.getenv("OPENAI_API_KEY"),
        model="gpt-3.5-turbo",
        azure_deployment_id="Turbo",
        debug=True,
    )

Thank you so much @wch and @nsvbhat for your help. I finally was able to deploy the app. Two things:

I needed to use the full proxy URL as "http://proxy-server.bms.com:8080" or at least add "//" in front of my usual proxy: "//proxy-server.bms.com:8080"
The model argument must be the actual OpenAI model. So even though Azure uses "gpt-35-turbo", we still have to specify model="gpt-3.5-turbo" (with the dot) in our function. This is not an issue if we use another model like "gpt-4".

Here's the entirety of my app:
import os

import openai
from dotenv import load_dotenv
from shiny import App, Inputs, Outputs, Session, ui

import chatstream

load_dotenv()

openai.api_type = os.getenv("OPENAI_API_TYPE")
openai.api_base = os.getenv("OPENAI_API_BASE")
openai.api_key = os.getenv("OPENAI_API_KEY")
openai.proxy = "http://proxy-server.bms.com:8080"
openai.api_version = "2023-03-15-preview"

app_ui = ui.page_fixed(
    chatstream.chat_ui("mychat"),
)

def server(input: Inputs, output: Outputs, session: Session):
    chatstream.chat_server(
        "mychat",
        api_key=os.getenv("OPENAI_API_KEY"),
        model="gpt-3.5-turbo",
        azure_deployment_id="Turbo",
        # model="gpt-4", # also works with GPT-4 as deployment name
        # azure_deployment_id="GPT-4",
        debug=True,
    )

app = App(app_ui, server)

I think we can merge #10 now @wch.

A final note: @wch's snippet for testing connection was really helpful. Again, this works when my proxy has "//" in front but errors out otherwise.
import openai

openai.api_type = os.getenv("OPENAI_API_TYPE")
openai.api_base = os.getenv("OPENAI_API_BASE")
openai.api_key = os.getenv("OPENAI_API_KEY")
openai.api_version = "2023-03-15-preview"
openai.proxy = "//proxy-server.bms.com:8080"

resp = await openai.ChatCompletion.acreate(
    deployment_id="Turbo",
    model="gpt-35-turbo",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Tell me about yourself"},
    ],
    stream=True,
)

print(resp)
async for chunk in resp:
    print(chunk)

Great, I'm glad to know that it is working! Before merging #10, I'm planning on making some improvements to the API.

Hi!
I can connect to the Azure API and get a response.
import openai
import os
openai.api_type = "azure"
openai.api_base = "https://chatgptustest.openai.azure.com/"
openai.api_version = "2023-07-01-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.ChatCompletion.create(
    engine="gpt-4-32k",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Tell me about yourself"},
    ],
    temperature=0.7
)
print(response)

Response
{...
  "created":<PHONE_NUMBER>,
  "model": "gpt-4-32k",
  "prompt_filter_results": [
    {
      "prompt_index": 0,
      ...
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "message": {
        "role": "assistant",
        "content": "I am an AI language model, designed to assist users with their questions, provide information, and engage in conversation. I am constantly learning and updating my knowledge base to better assist you. I can help with a wide range of topics, from general knowledge and trivia to problem-solving and advice."

But when trying to run the example above:
import os
import openai
from shiny import App, Inputs, Outputs, Session, ui
import chatstream

openai.api_type = "azure"
openai.api_base = "https://chatgptustest.openai.azure.com/"
openai.api_version = "2023-07-01-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

app_ui = ui.page_fixed(
    chatstream.chat_ui("mychat"),
)

def server(input: Inputs, output: Outputs, session: Session):
    chatstream.chat_server(
        "mychat",
        api_key=os.getenv("OPENAI_API_KEY"),
        model="gpt-4-32k",
        azure_deployment_id="gpt-4-32k",
        debug=True,
    )

app = App(app_ui, server)

The app starts and I can write a message. However, it fails when I apply the message and I get the following error message:

Error message
Traceback (most recent call last):
  File "/Users/filip.wastberg/Work/shiny-python/azure-open-ai-shiny/shinyenv/lib/python3.10/site-packages/shiny/reactive/_reactives.py", line 548, in _run
    await self._fn()
  File "/Users/filip.wastberg/Work/shiny-python/azure-open-ai-shiny/shinyenv/lib/python3.10/site-packages/shiny/reactive/_reactives.py", line 823, in new_user_async_fn
    return await user_fn()
  File "/Users/filip.wastberg/Work/shiny-python/azure-open-ai-shiny/shinyenv/lib/python3.10/site-packages/chatstream/__init__.py", line 265, in finalize_streaming_result
    if "content" in message["choices"][0]["delta"]:
IndexError: list index out of range
/Users/filip.wastberg/Work/shiny-python/azure-open-ai-shiny/shinyenv/lib/python3.10/site-packages/shiny/reactive/_reactives.py:530: ReactiveWarning: Error in Effect: list index out of range
  await self._run()

Any idea what might cause this? Looks lika a Shiny problem?
I have installed chatstream via pip install chatstream@git+https://github.com/wch/chatstream.git@azure
This is what my environment looks like:

requirements.txt
aiohttp==3.8.6
aiosignal==1.3.1
anyio==4.0.0
appdirs==1.4.4
appnope==0.1.3
asgiref==3.7.2
asttokens==2.4.0
async-timeout==4.0.3
attrs==23.1.0
backcall==0.2.0
certifi==2023.7.22
charset-normalizer==3.3.0
chatstream==0.0.1
click==8.1.7
comm==0.1.4
debugpy==1.8.0
decorator==5.1.1
docopt==0.6.2
exceptiongroup==1.1.3
executing==2.0.0
frozenlist==1.4.0
h11==0.14.0
htmltools==<IP_ADDRESS>00
idna==3.4
ipykernel==6.25.2
ipython==8.16.1
jedi==0.19.1
jupyter_client==8.4.0
jupyter_core==5.4.0
linkify-it-py==2.0.2
markdown-it-py==3.0.0
matplotlib-inline==0.1.6
mdit-py-plugins==0.4.0
mdurl==0.1.2
multidict==6.0.4
nest-asyncio==1.5.8
openai==0.28.1
packaging==23.2
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
pipreqs==0.4.13
platformdirs==3.11.0
prompt-toolkit==3.0.39
psutil==5.9.6
ptyprocess==0.7.0
pure-eval==0.2.2
Pygments==2.16.1
python-dateutil==2.8.2
python-multipart==0.0.6
pyzmq==25.1.1
regex==2023.10.3
requests==2.31.0
shiny==<IP_ADDRESS>03
six==1.16.0
sniffio==1.3.0
stack-data==0.6.3
starlette==0.31.1
tiktoken==0.5.1
tornado==6.3.3
tqdm==4.66.1
traitlets==5.11.2
typing_extensions==4.8.0
uc-micro-py==1.0.2
urllib3==2.0.6
uvicorn==0.23.2
watchfiles==0.21.0
wcwidth==0.2.8
websockets==11.0.3
yarg==0.1.9
yarl==1.9.2


adding multimatch

This PR adds the ability to exclude nested subfolders by passing the glob pattern to multimatch (https://github.com/sindresorhus/multimatch):
// .js file anywhere within and below the src directory excluding src/somefolder. The %,% splits the string into an array passed to multimatch.
  "src/**/*.js%,%!src/somefolder/*": "eslint",

Normally multimatch takes an array of globs, but because lint-staged can only take string patterns, I had to add a way to split the string of globs into an array. Hence the %,% matching.
That's it!

Can you also please add a test for this particular case you mentioned?

Please add a description with the motivation behind this PR

Hey @tnrich! Thanks for your effort on this but I think using %,% to split is a no go for me. I was thinking about it today and I think if we can't use ,  as a separator (I assume it's too ambiguous?) then we should update config format to accommodate that. Something like
{
  pattern: ['path', 'path2'],
  commands: ['cmd', 'npm-cmd']
}

in case of advanced config. Thoughts?

Maybe even better micromatch ?

Hey @okonet, yup, I thought you might say that. I think that is too big a refactor for me to make but I fully support it. You'll do it in a backwards compatible way I hope?
@trysound, micromatch seems cool. It doesn't offer a solution to the above problem of needing to pass an array though, right?

And it's faster.

It's works with array too out of the box.

@TrySound Thanks for bringing this up. I think micromatch is amazing and I'll try to integrate with it.
@tnrich I see your point. I'll try to work on this then. Let's keep this open for some time since I'm not sure about my availability :(

I've created https://github.com/okonet/lint-staged/issues/201 to track the status of this

I'm closing this one in favor of #201 and subsequent PR


Add log out option on profile page

User should be able to disconnect from site to revert to to anonymous state
Behavior:

Disconnect button should appear on top left of all windows
-[optional] If you aren't connected there could be connect button
Clicking disconnect button makes user no longer connected via facebook so that if they want to edit a page they need to connect.

For beginning I'd say put it on the profile page & on the mobile navigation bar (both doesn't exist at the moment)


Tweak Lint/MissingSuper [See #8376]

Thank you for the hard/fast work.

Seems like there are another 3 ones https://ruby-doc.org/core-2.7.1/BasicObject.html#method-i-singleton_method_added
Sorry, forgot about them also.

Seems like there are another 3 ones https://ruby-doc.org/core-2.7.1/BasicObject.html#method-i-singleton_method_added

I never realize those existed. I can't think of a reason for their existence either, as def singleton_class.method_added should have the same effect. I added them to the list 👍

Indeed!


add JsonProperty to fix the update context response

Coverage remained the same at 81.603% when pulling 1d50e873faa03340e11364bc76eba783b4b8f685 on fsuc:fix-updatecontext into 15fd550283a2a56b1cfd134e7651fee1990a111a on Orange-OpenSource:master.

👍


CU-85zryv789_Solve-javaS125-code-smell-in-SecurityConfigjava

Fetch changes made in SecurityConfig.java to solve java:S1128 code smell

Task linked: CU-85zryv789 Solve java:S125 code smell in SecurityConfig.java

Task linked: CU-85zryv789 Solve java:S125 code smell in SecurityConfig.java

Task linked: CU-85zrynwb8 Solve Backend Code Smells

Task linked: CU-85zryv74r Solve java:S1128 code smell in SecurityConfig.java


use cluster config file

fixes #598

Thanks.
Merging even if the CI is failing since this patch touches a different code path.


Site Access Info not getting populated until manual refresh.

**Rancher versions: v2.0.5-rc2
Steps to Reproduce:
Have Github/Azure AD auth enabled setup with "Allow members of Clusters, Projects, plus Authorized Users and Organizations"/"Restrict access to only Authorized Users and Organizations".
Log out.
Log in back as  Github/Azure AD admin user.
Go to Settings->Authentication to launch the auth page.
Notice that the Site Access Info is empty.

On Manual refresh ,  Site Access info shows up as expected.

@tfiduccia I think I fixed this yesterday stemming from something we talked about. Can you retest?

I am still able to reproduce this issue:
github enabled set in 2.0.4  with access site set to - "Allow members of Clusters, Projects, plus Authorized Users" with few users added.
Upgrade to 2.0.5-rc3 .
After upgrade, Log in as github enabled user.
Go to Settings->Authentication to launch the auth page.
Notice that the Site Access Info is empty.
on Manual refresh , I see the Site Access Info show up as expected.
Log out.
Log in back as Github  admin user.
Notice that the Site Access Info is empty.
on Manual refresh , I see the Site Access Info show up as expected.

This issue does not happen amymore .
But want to verify this issue again once this issue gets fixed - https://github.com/rancher/rancher/issues/14430

@westlywright  I see this issue still happen in Azure AD setup.
Reopening this issue to fix  Azure AD setup.


More dynamic handling of amplitude files

Currently 50.txt is loaded by default.  A different file can be entered with full path on the command line.
Preferably this should be loaded dynamically based on the chosen nterms setting.

Now nterms should be specified on the command line, and the smallest sufficient file is loaded.
Code to reload the file and reinstantiate the simulator if nterms is subsequently increased with be cumbersome and is not attempted at present.


Multiple home directory

Proposed change

Borrow the concept of vaults from Obsidian. Vaults correspond to different base directories in Telekasten.
Let user configure multiple vaults using setup.
Provide switch_vault() for user to switch to a new vault via telescope picker. The picker lists all the vaults configured in config.
Make the changes backward compatible. Users should not have to change their config if they update to the latest version.

Type of change

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (thank you!)
[ ] Code quality improvements to existing code or addition of tests
[x] Documentation update

Additional information

This PR fixes or closes issue: fixes #155
This PR is related to issue:

Checklist

[x] I am running the latest version of the plugin.
[x] The code change is tested and works locally.
[x] There is no commented out code in this PR.
[x] The code has been formatted using Stylua (a .stylua.toml file is provided)
[x] The code has been checked with luacheck (a .luacheckrc file is provided)
[x] The README.md has been updated according to this change.
[x] The doc/telekasten.txt helpfile has been updated according to this change.

Ping @renerocksai . Is telekasten still managed on github ?

Thank you for your awesome work on this long-awaited feature. I am currently in vacation and won't have time to review that before the end of the month. Hopefully Rene will have time to do it before.

Is telekasten still managed on github ?

Currently the Github repo is similar to the one on SourceHut. The main differences are the documentation and wiki that have been slightly modified on SH to prepare the transition and the archival of the Github's version. Currently, we still accept issues and PR here and port them to the SH's repo to keep the code bases in sync. This PR might be the last one here though.
I suggest you send a mail to the telekasten-devel mailing list to make sure Rene gets notified of this awesome PR. This might speed up the integration of the feature.

Once again thank you very much for your work!

Wow, thanks a lot for this PR! I have skimmed over it and it looks fine, apart
from formatting issues. Your formatting changes make it difficult to find the
actually meaningful changes as opposed to whitespace changes. Are you sure you
used the provided stylua config?
Anyways, I'll go and apply this for a quick test (see below).
@lambtho12 is correct. We're still on GitHub. After merging this PR, I'm also
going to apply it to the SourceHut repo, and once we've switched over, we'll
likely apply patches from SourceHut to the GitHub repo, for a brief while.
BTW: If you add .patch to the PR URL, you get a nicely formatted patch:
https://patch-diff.githubusercontent.com/raw/renerocksai/telekasten.nvim/pull/158.patch
Curling the patch and piping it to git am is super easy. :relaxed: - well,
usually. Unfortunately, you using tabs and spaces, this somehow makes git
complain. So I had to re-format the patch to make it apply in order to briefly smoke-test it.
During the smoke-test, I noticed a bug: if you don't have a vault configured,
the setup() breaks when you write to M.vaults["default"]. This immediately
breaks everyone's telekasten when they update their telekasten to this PR, since
probably noone will have prepared for the update with a vaults section in
their configs.
Luckily, it is easily solved:
M.vaults = cfg.vaults or {}  -- notice the `or {}`

Here it is in diff format:
@@ -2937,7 +2937,7 @@ local function _setup(cfg)
         cfg.vaults = nil
         Setup(cfg.vaults["default"])
     elseif cfg.home ~= nil then

-        M.vaults = cfg.vaults
+        M.vaults = cfg.vaults or {}
         cfg.vaults = nil
         M.vaults["default"] = cfg
         Setup(cfg)

I guess, in this else branch, cfg.vaults is always nil at the beginning, so,
arguably, you coud probably set M.vaults = {} here unconditionally. But maybe
I'm wrong, so the or {} is the safest option :smile:.
So, may I please ask you to:

make sure you convert tabs to spaces

I substituted them by 4 spaces YMMV

to please use the provided stylua.toml
add the or {}

Then I'll happily merge.
Thanks again for the great PR!

I am using stylua.
stylua lua/telekasten.lua -f .stylua.toml

I'm using stylua version
 stylua --version
stylua 0.14.2
``` .

I wonder what is missing.

I am using stylua.
stylua lua/telekasten.lua -f .stylua.toml
stylua version
$stylua --version stylua 0.14.2
I wonder what is missing.

I know it now! The patch breaking has nothing to do with your setup! The TAB was
in there when you cloned already!

And the source of all the problems seems to be:

ME!  😱 I hate it when that happens.... 😀
Sorry for having blamed you. Your PR diff shows so many red followed by green
lines that are identical apart from whitespace changes that I automatically
thought everything whitespace related must be rooted in the PR. IDK how I could
have introduced a tab since I don't use tabs and my vim is configured not to use
them either.

Meanwhile, let me try to change the tab configuration of my editor.

Not necessary.
The reason stylua did not catch this tab is because it's not considered an
indendation when it happens inside a comment.
So, if you don't mind, can you replace the tab in line 930 with 4 spaces to make
the patch more git-friendly (it doesn't like a mix of tabs and spaces in the
same line apparently)?
Everything else looks fine apart from me still wondering why there are so many
whitespace changes. If you've tested it and it works, it looks pretty
merge-able to me.

So, if you don't mind, can you replace the tab in line 930 with 4 spaces to
make the patch more git-friendly (it doesn't like a mix of tabs and spaces in
the same line apparently)?

You know what, forget that. No need to fix what I caused.
As soon as I have your OK that the PR is good to go, I'll apply your PR with a
fixed-up patch, re-format everything with stylua just to be sure, and commit +
push everything referencing the PR, then close the PR.
Tell me when ready.

Sure, go ahead !

So, I did the following:

squashed all 4 PR commits into one single commit
ran stylua -f .stylua.toml on both telekasten.lua and vaultpicker.lua.
got rid of TABs in doc/telekasten.txt and README.md
committed the tabs + formatting changes
squashed the PR commit and fixup commit into a single commit again

Now the diff is significantly smaller, no only-whitespace changes in unrelated
areas.
Just FYI if I do the following:
cd lua
nvim telekasten.lua

... and save the file, my stylua plugin will run, but not find a
.stylua.toml, because that's in the root dir of the plugin, not in the lua/
dir - and hence stylua will apply default formatting, which is inconsistent with
.stylua.toml and lead to lots of unintended re-formatting.
But since there were tabs in all files you touched, you clearly seem to like
them or something is going on... 😊
For potential future contributions, please make sure that you:

search for \t before you save and quit and fix any tabs into spaces
run stylua right before you commit, on ALL files you commit, not just
telekasten.lua.

Some more nitpicking: in the README, there is a table explaining all config
settings - as a sort of single point of reference. If you feel inclined, you
might want to update this section, too, for the sake of consistence. I noticed
that the previous introduction to the settings also didn't do this, but I think
that table shouldn't be incomplete. Some people use the table to look stuff up.
There's only one more thing to say:
THANKS A MILLION FOR THIS GREAT AND LONG-AWAITED FEATURE!
I am sure, many telekasten users out there will love it!


Navigating from react-native-app to playstore for cancelling in-app Subscriptions using particular url doesn't work

Version of react-native-iap
2.4.8
Version of react-native
0.59.10
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
When  using this url to navigate to playstore subscription page from react native app it should be able to navigate it
'https://play.google.com/store/account/subscriptions?package='dummypackage'&sku=box100.subscription.dev' and using the linking api of react-native
Instead It can only  navigate using 'https://play.google.com/store/apps/details?id=packagename'
Actual behavior
'https://play.google.com/store/account/subscriptions?package='dummypackage'&sku=box100.subscription.dev' and using the linking api of react-native
this url doesnt work
Tested environment (Emulator? Real Device?)
Android Oppo 5s
Steps to reproduce the behavior
Use the code below
navigateToPlaystore = productId => {
console.log('getDevicePlatform() :', getDevicePlatform(), productId)
let url = ''
if (getDevicePlatform() === 'android') {
url =
'https://play.google.com/store/account/subscriptions?package=com.peerzacademy.peertutor.dev&sku=box100.subscription.dev'
} else if (getDevicePlatform() === 'ios' && Platform.version >= 12) {
url = 'https://apps.apple.com/account/subscriptions'
} else {
url =
'https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions'
}
Linking.canOpenURL(url)
.then(supported => {
if (!supported) {
console.log("Can't handle url: " + url)
} else {
return Linking.openURL(url)
}
})
.catch(err => console.error('An error occurred', err))
}

were you able to navigate to your in-app Subscriptions from react native??


Issue with 1Password Extension in TestFlight Builds

I'm seeing a weird issue that I have no explanation for.
I have the 1password extension in my app since quite a while now.
I recently updated to 1.8.4 and to cocoapods 1.1.0 (from 0.39).
The issue is, that the 1password buttons in the app are not showing when the app is installed using TestFlight.

Building locally works fine.
Installing the build from a CI server works fine.
Using the App Store build works fine (although the App Store version is from before the update)
TestFlight no luck – the button is just not there …

Except the App Store version everything else used the same commit.
Same OS (10.1) and same device.
Any idea what the issue could be?
Or is it perfectly normal that the extension does not work using TestFlight builds?

You could possibly add some logging to see what result you get back for the [[OnePasswordExtension sharedExtension] isAppExtensionAvailable] call. It returns a bool. My guess is that for some reason you're getting back an incorrect value here (not sure why in this case) or possibly how you're handling the resulting action is behaving differently with TestFlight builds than those run from Xcode.
I assume you're using the same stable version of 1Password for this test? Or are you also using a TestFlight build?

1Password App is the latest version from the App Store.

Ok … I fixed.
It seems there was an issue the button image.
I used [UIImage<EMAIL_ADDRESS>inBundle:onepasswordExtensionResourcesBundle compatibleWithTraitCollection:nil];
After your comment I added logging to sign up and registration.
And also changed signup to simply use [UIImage imageNamed:@"onepassword-button"]; + copied the button in our Apps xcassets.
After creating a new TestFlight Build both signup and registration works again.

Great to hear you got it figured out :)
Thank you again for integrating with 1Password!

Good


Add acceleration values and a few others, plus unit test improvements

This PR adds the individual acceleration values.  These are super handy because they help tell you the orientation of the sensor.  E.g. if the sensor is on its side the Z axis will report acceleration close to zero, whereas when the sensor is lying flat it will report acceleration close to 9.8 m/s^2 (generally 1G).
Also bubbled up now are the tx power and sequence counters on the V5 version of the firmware.
Lastly with this PR comes some unit test improvments and code coverage improvements.

I am running this along w/the new values on 15 ruuvi tags, 6 running the V3 and 9 running the V5.  Also I will be unavailable until Monday so will check out any comments then.

Couple inline suggestions - it would probably make sense to rebase this on top of the current main here instead of merging it in halfway through to get rid of some of the spurious-looking changes?

Yeah I will summon up my git fu and try and get this done once I fix the other comments.

Secondly, I hope there's an easy way in HA to disable some of these entities; I wouldn't need my tags to necessarily record accelerations, etc. all the time (and save them in the Recorder database) 🤔

That part I don't understand quite as well- I noticed that the new entities were disabled by default, I had to go enable them.  If they're disabled do they still get recorded?  Even if so it's just an extra couple of bytes I think (the rate of the tag's advertisements shouldn't change).

Also, Mypy is complaining about something here.

Yeah I am looking at that.  It's whining about me adding a pytest import to test the functions that raise... I will keep looking.

Have a nice weekend! 😄 (I'm off to have some birthday beers in a bit, myself...)

Excellent!  Love me some birthday beers :)


how to solve "the number of connections to this computer is limited "

dear suppoers
how to solve this error, see attached pictures??

note : I change the  group policy editor to set max connections to 999999, and also I modified termsrv.dll.

Reboot PC.
If this not helped, then replace the rdpwrap.ini https://raw.githubusercontent.com/sebaxakerhtc/rdpwrap.ini/master/rdpwrap.ini and reboot PC.

Problem solved

thanks

dear suppoers
how to solve this error, see attached pictures??

note : I change the group policy editor to set max connections to 999999, and also I modified termsrv.dll.

Which windows version where you using?

Problem solved

Hello!
How did you solve that? I've got the same problem.

Yes I solved
Best Regards
Said A.Elnajjar
Sales and Marketing Manager
Tripoli - Libya
GSM +218 91 3462402
+218 92 5178731
Skype: said_elnajjar

From: Nostramo-DFIR @.>
Sent: Thursday, November 25, 2021 2:55:42 PM
To: stascorp/rdpwrap @.>
Cc: Said Alnajjar @.>; State change @.>
Subject: Re: [stascorp/rdpwrap] how to solve "the number of connections to this computer is limited " (#1401)
Problem solved
Hello!
How did you solve that? I've got the same problem.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/stascorp/rdpwrap/issues/1401#issuecomment-979190365, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANZYIV4YWFH3THCD7BQLDUDUNYW45ANCNFSM45FSTP3A.

I solved by Uninstaller RDP WRAPPER
And download last version,  after that download rdpwrap.ini  last version,  restart pc.

From: Nostramo-DFIR @.>
Sent: Thursday, November 25, 2021 2:55:42 PM
To: stascorp/rdpwrap @.>
Cc: Said Alnajjar @.>; State change @.>
Subject: Re: [stascorp/rdpwrap] how to solve "the number of connections to this computer is limited " (#1401)
Problem solved
Hello!
How did you solve that? I've got the same problem.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/stascorp/rdpwrap/issues/1401#issuecomment-979190365, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANZYIV4YWFH3THCD7BQLDUDUNYW45ANCNFSM45FSTP3A.

Thanks a lot !!! I'll try

I can't solve that for win11

Tried to uninstall and install again (the latest Version) and also latest ini.

Problem solved

Closed as solved
Applicable to https://github.com/stascorp/rdpwrap/issues/1883


FR: Gazelle plugin supports multiple maven install rules

We split our maven dependencies into multiple maven install rules to make adding/upgrading etc deps easier. It looks like the gazelle plugin here only supports a single maven install rule. How do people feel about making it possible to support multiple maven install rules?

This seems pretty reasonable to support - I imagine we'd do this on a sub-tree level, so you could specify that src1/... uses one maven_install, and src2/... uses another. I don't think we'd want to support it more granularly than that (e.g. per target, or per maven package).
Currently, the maven resolver is a global property of a Configuration: https://github.com/bazel-contrib/rules_jvm/blob/fae67e4df87decc0c16902230d50539a2e1897bc/java/gazelle/configure.go#L138-L147
To change this, I think we'd want to make it instead be a property of a Config: https://github.com/bazel-contrib/rules_jvm/blob/fae67e4df87decc0c16902230d50539a2e1897bc/java/gazelle/javaconfig/config.go#L89-L103
We'd want to make it so that each config inherits its parent resolver (if NewChild is called: https://github.com/bazel-contrib/rules_jvm/blob/fae67e4df87decc0c16902230d50539a2e1897bc/java/gazelle/javaconfig/config.go#L55-L57), but that if a java_maven_install_file and/or java_maven_repository_name directive is encountered (which... We may want to strictly require that both are set), we'll replace it with a new one here: https://github.com/bazel-contrib/rules_jvm/blob/fae67e4df87decc0c16902230d50539a2e1897bc/java/gazelle/configure.go#L100 and https://github.com/bazel-contrib/rules_jvm/blob/fae67e4df87decc0c16902230d50539a2e1897bc/java/gazelle/configure.go#L113-L114
I'd be happy to review a PR adding this - there's an example integration test in https://github.com/bazel-contrib/rules_jvm/tree/main/java/gazelle/testdata/maven that could be cribbed from to add a test for this functionality.

Thank you for the comment & pointers @illicitonion,
It is getting me thinking a little bit more about what this would look like.
Our usage is actually a little more complex/dynamic than different packages using different maven install rules. We bring in ~1000 external jars so we divide them logically into their own maven install rules (~5 -> ~70 jars in each) to minimise merge conflicts etc of the pinned JSON files. We have some tooling on-top of this to maintain single version of transitives etc but in the end it is just multiple maven_install rules. For example, we might have an @org_eclipse namespace for all org.eclipse jars & an @org_apache namespace for all org.apache jars.

rules_jvm_external actually document having multiple maven_install.json files (https://github.com/bazelbuild/rules_jvm_external#multiple-maven_installjson-files) so it is probably something a lot of larger repos do. I'll take a look at the code you linked above anyway & think about it a little bit more.

rules_jvm_external actually document having multiple maven_install.json files (https://github.com/bazelbuild/rules_jvm_external#multiple-maven_installjson-files) so it is probably something a lot of larger repos do.

I think there's a strong assumption that they're used independently, though :)

The typical usage pattern is that most repos declare one main maven_install including all their dependencies, and break out separate maven_install declarations for particularly troublesome libraries (some of the Apache Spark stuff springs to mind) which are used in tightly controlled areas of the repo.
The approach of stitching together multiple different maven_install instances as @kriscfoster describes is very unusual (first I've heard of it), though it may be noting that the new lock file format in recent rules_jvm_external releases was specifically designed to reduce conflicts, so it may be worth investigating consolidating them back into a single default maven_install again.

The typical usage pattern is that most repos declare one main maven_install including all their dependencies, and break out separate maven_install declarations for particularly troublesome libraries (some of the Apache Spark stuff springs to mind) which are used in tightly controlled areas of the repo.
The approach of stitching together multiple different maven_install instances as @kriscfoster describes is very unusual (first I've heard of it), though it may be noting that the new lock file format in recent rules_jvm_external releases was specifically designed to reduce conflicts, so it may be worth investigating consolidating them back into a single default maven_install again.

Thank you @shs96c, we didn't know about the new lock-file format. It may help us a little bit in this case!

@illicitonion Let me add our use case here as well.
We have two separate rules_jvm_external trees for SpringBoot 2 and SpringBoot 3. We didn't have the capacity to do a mass migration, so we allowed service owners to upgrade at their own pace. To make things more complicated, we also have some services using DropWizard 3 and they have their own tree coz their transitives are different from SB2 and SB3, but for the sake of presenting our use case (and for my sanity), let's just consider the SB2 and SB3 trees.
Some of the core libraries that we have written are shared between the SB2 and SB3 and the major difference between them is that the former uses the javax namespace while the latter uses jakarta namespace. The other major differences are the transitive dependencies. So, instead of forking the source code, what we did was create a Bazel rule that replaces javax imports to jakarta. So, a sample BUILD file would look like this:
java_library(
    name = "my-core-lib",
    deps = [
        "@maven_sb2//:...",
        ...
    ],
)

java_library_jakarta(
    name = "my-core-lib-jakarta",
    deps = [
        "@maven_sb3//:...",
        ...
    ],
)

Our current situation should go away as everything moves to SB3, but this could potentially be something that happens with another migration in the future. Having said that, the forking would have made this simpler, but forking a significant amount of libraries is also not trivial and is not easy to maintain during the transition period and this strategy helped us get going faster.
Something we don't do, like in @kriscfoster's case, is mix trees. We don't have the technology to deal with managing transitive across trees and I don't think that's something we'll explore either (although we do have the same conflict issues that they mentioned and I'll talk a bit about that later).

I imagine we'd do this on a sub-tree level, so you could specify that src1/... uses one maven_install, and src2/... uses another. I don't think we'd want to support it more granularly than that (e.g. per target, or per maven package).

We would like to have at least per target granularity or even be able to auto-detect which tree to use per target based on the dependencies it uses. Compiling the same source set with different deps + transitives seems like a potentially common use-case especially during transition periods.
Would love to hear your thoughts on this! I am open to hearing some process recommendations too as we are still at the early stages of managing a monorepo.

though it may be noting that the new lock file format in recent rules_jvm_external releases was specifically designed to reduce conflicts, so it may be worth investigating consolidating them back into a single default maven_install again.

@shs96c We are using the new lock format (and also trying out the new BOM resolver to see if things get easier), but as it is, it doesn't help a whole lot as the __INPUT_ARTIFACTS_HASH and the __RESOLVED_ARTIFACTS_HASH ALWAYS causes conflicts... We have Renovate updating the versions for us, but our dep trees are not comprehensive (at least yet), so it is common for developers to need to add new libraries / manually do upgrades when Renovate fails.
We have tried several things like moving Renovate MRs to run during off peak hours, but we still end up getting at least a couple of conflicts a day and is a major point of frustration for our developers.
Since it is a generated file, we end up choosing either version on git and re-run the repinning process, but that takes a significant amount of time as we have a large number of dependencies. And then it's back to the rat race to see who can get their changes in first and then it is back to conflicts for the next person...
We read up on Alex Eagle's Easier merges on lockfiles as well, but that doesn't really solve the problem that we are having. It is an easier way to solve the merge conflicts, but we still have to run the repinning process again.
Maybe we are doing something wrong here / not using things as intended and there might be some recommendations from your end that might help us out and would love to hear your thoughts!

I imagine we'd do this on a sub-tree level, so you could specify that src1/... uses one maven_install, and src2/... uses another. I don't think we'd want to support it more granularly than that (e.g. per target, or per maven package).

We would like to have at least per target granularity or even be able to auto-detect which tree to use per target based on the dependencies it uses. Compiling the same source set with different deps + transitives seems like a potentially common use-case especially during transition periods.

I don't think Gazelle really has a way of expressing "I want to constrain a particular target in a particular way". Directives are package-level concepts, so if we wanted to introduce this, it would a novel configuration concept for gazelle.
We could express a package-level "generate two versions of all targets in this package" option, or we could have a directive which contained a list of files or target names within a package that we wanted to generate multiple versions of, or perhaps a mapping of "depended on package name to universe", i.e. something like:
# gazelle:java_maven_repository_for_package javax.blah maven_sb2
# gazelle:java_maven_repository_for_package jakarta.blah maven_sb3

I guess: Can you write an strawman example of the BUILD files that you wish gazelle would generate for you, and we can work out how to model that? Some things it'd be good to include in the example:

Two maven_install calls
Some targets which are configured for both universes
Some targets that depend on them which may need to selectively depend on one or the other
Anything else you think is interesting/novel/complicated

I'll have a go at this because we are encountering the same issue, in our case it's between Spark and non-Spark code that want to use the same shared libraries.
The non-Spark code often uses newer versions of some libraries than are supported in the Spark runtime we're using. So we have two Maven repos: @maven, and @maven_spark, which each include most of the same dependencies, except the changes needed to match the Spark runtime.
We would love to be able to optionally (within a certain package or directory tree) generate a BUILD file that just has two almost identical java_libraries, one for each Maven repository. Each would also need to use the correct Spark or non-Spark internal dependencies as well (shown with "other-shared-code"). This would ideally look something like this (though I suspect the Gazelle directives might need more information):
# gazelle:java_maven_repository maven
java_library(
  name = "shared",
  srcs = glob(["*.java"]),
  deps = [
    "//other-shared-code",
    "@maven//dep_1",
    "@maven//dep_2",
  ],
)

# gazelle:java_maven_repository maven_spark
java_library(
  name = "shared-spark",
  srcs = glob(["*.java"]),
  deps = [
    "//other-shared-code-spark",
    "@maven_spark//dep_1",
    "@maven_spark//dep_2",
  ],
)

There may be situations where the different dependency versions actually require code changes too, which would need us to do some more manual work to split out the code. However, most of the time the code works with either dependency version, so this would save a lot of hassle!
As an aside, I wish we could just "exclude" the conflicting deps at a later stage, when we import "//shared" into the Spark-specific code. This is what we used to do with Maven, and meant we didn't need to change anything about the shared package at all. However, this doesn't seem possible with Bazel. Please let me know if others have found a way though!
Compiling against the correct deps, like in the BUILD file above, brings the advantage of compile time checking against the different dependency versions, but it is currently tough to make this work with Gazelle at all.


Adding more info to Schema and JSONParser

In a fork of this repo I have added some more metadata helpful in our stencil templates,
In Schema:
  let isOptional: Bool
  let isMutable: Bool
  let jsonKey: String?
  var hasCustomJsonKey: Bool {
    return jsonKey != nil
  }

Inside JsonParser:
  public var customKeyProperties: [SchemaProperty] {
    return properties.filter { $0.hasCustomJsonKey }
  }

  public var nonCustomKeyProperties: [SchemaProperty] {
    return properties.filter { !$0.hasCustomJsonKey }
  }

  public var nonOptionalProperties: [SchemaProperty] {
    return properties.filter { !$0.isOptional }
  }

  public var nonOptionalProperties: [SchemaProperty] {
    return properties.filter { $0.isOptional }
  }

  public var immutableProperties: [SchemaProperty] {
    return properties.filter { !$0.isMutable }
  }

  public var mutableProperties: [SchemaProperty] {
    return properties.filter { $0.isMutable }
  }

I added these arrays allowing for filtering on properties since stencil does not support filtering. Only map.
Here are some use cases for these filtered properties;
CustomStringConvertible
If I declare a protocol in my template.stencil and let that protocol, let's call it MyModel as CustomStringConvertible, we can then give it a default implementation of var description: String that we can override. We don't want to print optional properties without unwrapping them, so we want to first iterate through all nonoptional properties and then unwrap all optional. So we need the nonOptionalProperties and the nonOptionalProperties computed properties, an ugly example of usage:
public extension {{ protocol }} {
    var description: String {
var nonOptional = ""
nonOptional = "{% for p in spec.nonOptionalProperties %}{{p.name}}: `\({{p.name}})`{% if not forloop.last %}, {% endif %}{% endfor %}"
{% if spec.optionalProperties.count > 0 %}
    {% for p in spec.optionalProperties %}
        if let value = {{ p.name }} {
            nonOptional.append(", {{ p.name }}: `\(value)`")
        }
    {% endfor %}
{% endif %}

return nonOptional
    }
}

CodingKeys
Or let's say we want to make MyModel conform to Codable with default implementations, then we want to separate between those properties who have a custom jsonKey and those who have not:
enum {{ codingKeys }}: String, CodingKey {

    //MARK: Custom JSON key cases
{% for customKeyCase in spec.customKeyProperties %}
    case {{ customKeyCase.name }} = "{{ customKeyCase.jsonKey }}"
{% endfor %}

    //MARK: Standard cases
{% if spec.nonCustomKeyProperties.count > 0 %}
    case {% for case in spec.nonCustomKeyProperties %}{{ case.name }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %}
}

Which result in e.g. this Swift code for a Hotel model:
enum HotelCodingKeys: String, CodingKey {

    //MARK: Custom JSON key cases
    case location = "geolocation"

    //MARK: Standard cases
    case name, propertyCode, image, phoneNumber, address
}

For this template:
{
  "title": "Hotel",
  "concreteType": "struct",
  "properties": {
    "name": {"type": "string"},
    "propertyCode": {"type": "string"},
    "image": {"type": "string"},
    "phoneNumber": {"type": "string"},
    "address": {"$ref": "address.json"},
    "location": {"$ref": "location.json", "jsonKey": "geolocation"}
  }
}

I have already implemented this in a fork, do you feel like this is something that you want part of this repo? If so I can create a PR?

Overal I think this is interesting and useful for me too, could you create the PR and I will test it and we continue the improvements.
Couple things:

You propose to remove the required (from JSON Schema) property and add isOptional?
Did you disable SwiftLint? It is important to enforce the code style/convention...

Thank you for working on this!

Do you still have this fork?

@hebertialmeida sorry for slow response, I just created this PR, not mergable, so that you can copy paste/Git cherry pick if you find anything interesting.
https://github.com/hebertialmeida/ModelGen/pull/8

Cool, that will be useful


Added multiple axes support for np.expand_dims

This PR adds support for passing multiple axes as a tuple to np.expand_dims().
import numpy as np
import numba

orig_shape = (3,4,5)
orig = np.random.normal(size=orig_shape)
new_order_tuple = (1, 3)

ref = np.expand_dims(orig, new_order_tuple)

@numba.njit
def expand_dims_fn(x, new_order):
    return np.expand_dims(x, new_order)

res = expand_dims_fn(orig, new_order_tuple)

print(ref.shape) # (3, 1, 4, 1, 5)
print(res.shape) # (3, 1, 4, 1, 5)

I also wanted to add a similar support (of multiple user defined axes) for np.squeeze but I couldn't find the code where Numba has binded that function to it's respective  implementation. (At least nothing that goes by the name of sqeeze)
Can anyone point me towards the Numba implementation for that particular function?

@kc611 many thanks for the PR, it's now queued for review.
RE: np.squeeze I don't think Numba supports this at present (what is supported is largely noted in https://numba.readthedocs.io/en/stable/reference/numpysupported.html), maybe you could write the initial implementation and then add support for axes if this is important for your use case?!
The use of Numba's extension API @overload decorator is strongly recommended for this task. A guide to using @overload is here: https://numba.readthedocs.io/en/stable/extending/overloading-guide.html and the API documentation is here: https://numba.readthedocs.io/en/stable/extending/high-level.html#implementing-functions. Hope this helps.

Hi @stuartarchibald , So I tried using @overload for np.squeeze and I think I'd be a great idea to also add it as an bound method attribute to arrays too,  i.e. we would also be able to do something like array.squeeze() in njit-ed functions.
So I plan to something more or less similar to following code:
# This code goes in numba/np/arrayobj.py
@lower_builtin('array.squeeze', types.Array)
def array_squeeze(context, builder, sig, args):
    return args[0] #This will return the squeezed array instead

@lower_builtin('array.squeeze', types.Array, types.BaseTuple)
def array_squeeze_tuple(context, builder, sig, args):
    return args[0] #This will return the squeezed array instead

@lower_builtin('array.squeeze', types.Array, types.VarArg(types.Any))
def array_squeeze_vararg(context, builder, sig, args):
    new_sig, new_args = vararg_to_tuple(context, builder, sig, args)
    return array_squeeze_tuple(context, builder, new_sig, new_args)

@overload(np.squeeze)
def numpy_transpose(a, axes=None):

    if axes is None:
        def np_transpose_impl(a, axes=None):
            return a.squeeze()
    else:
        def np_transpose_impl(a, axes=None):
            return a.squeeze(axes)

    return np_transpose_impl

However the immediate problem that I run into with this approach is that we need to know the dimensions of the return signature of the array to properly bind this method, similar to how other methods are bound, for example:
https://github.com/numba/numba/blob/8be3456a271de3e1edb9e996a722376bc249b3ae/numba/core/typing/arraydecl.py#L479-L484
In np.squeeze (with just the array argument) the dimensions of return signature might differ based on how many axes are 1.
So my question here is basically is it possible for us to know at the type level, which of these axes are 1 (or has zero strides or are 'broadcastable', if Numba has something like that) ? Alternatively is there a better approach for this (like not using @lower_builtin) ?

Can't overload_method be used instead?

There are a few issues with overload_method too.
For instance, We cannot have return types of different dimensions in a single overload method.
Also It seems that we can't have overloads of same method with different signatures and having default arguments i.e. dims=None is not allowed so basically we won't be able to do arr.squeeze() and arr.squeeze(dims).

We can go ahead for a review with the current functionality of this PR. (Implementing np.squeeze will probably require more discussion and planning than the scope of this particular PR.)

OK - adding this to 0.56, to try and get it in for then.

Depends on/currently built on top of: https://github.com/numba/numba/pull/8234

@kc611 I've given this an initial pass and left a few questions for you to answer.

The above mentioned issue has also been resolved in 4e4c820

As release manager, I have decided that this isn't mature enough to be ready for the upcoming 0.58 release (next week) and as such I am moving this into the next release.


Updated and styled responsive CSS in sell section of laptop speakers phone and tablets

Hopefully this is up to the mark!

okkk


test

Change-Id: If4648dd0034cf9166a7dbdc96609645f0da216c9
Reviewed-on: https://gerrit.musta.ch/c/public/istio/+/6880
Reviewed-by: Douglas Jordan<EMAIL_ADDRESS>Please provide a description of this PR:

Hi @edieYoung. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.


ag-grid-community version 30

ag-grid-community version 30 has been released can this project work with it

I'll take a look at v30 and see if there's any changes needed here.

I would love to see this since the new features look very promising. Thank you for your work @MichaelKim !

I'm glad to hear that! I've been slowly going over the v30 changelog to check for breaking changes, but I should be able to get a release out soon.

<EMAIL_ADDRESS>now supports AG Grid v30. Make sure to use at least<EMAIL_ADDRESS>to avoid build errors (see https://github.com/ag-grid/ag-grid/issues/6744 for more info). If you encounter any issues, please feel free to create a new issue.

Thank you very much


one click/keypress option to escape invalid regular expression in searches

sometimes I'm about to use a regex but most of the regex is a literal match, so I'd like to be able to type all that out, then click the error message to automatically escape my regex:

It took me some time to understand this so idea, so alternative use case for illustration:
"Find all occurrences of characters folded in two curly brackets, like first and last "word" in {{a}} b {{c}}"
"Nice looking" {{.}} is obviously not a valid regexp: we need \{\{.\}\} which is cumbersome to write; so if I understand it well this proposal asks for introduction of mean to RegExp.escape current search input value.  Resulting workflow would be:

Type {{.}} into search field.
Invoke proposed feature and get search field value replaced with \{\{\.\}\}.
Manually delete the middle backslash and get intended regexp, \{\{.\}\}.

(It is different from already well supported use case  "I need to toggle RexExp altogether", because there is visible ".* button" with Altr shortcut in tooltip hint for this.)

How would you feel about escaping/unescaping regex characters when toggling regex mode on/off? So the flow would be

Type foo(
Turn regex mode on
The query becomes foo\(
Turn regex mode off
The query reverts to foo(

This isn't exactly what you are asking for but I like it better than something that looks like a "fix this error" button which has the potential to give a technically wrong result, like in @myfonj's example.

How would you feel about escaping/unescaping regex characters when toggling regex mode on/off?

For me it feels that switching mode should not have unexpected effect on the value: if you start writing or paste proper regexp into search field and only after that realize that you haven't regexp enabled, you probably do not want to have your (pasted) regexp escaped.
I think this proposal could be better fulfilled by introducing commands (and corresponding buttons) that would "blindly" add/remove regexp escape, but I see there is no good place to add them. Like:
.* → \.\* add regexp escape sequences (+ switch regexp mode on?)
\.\* → .* remove regexp escape sequences (+ switch regexp mode off?)
I think such buttons still should not switch modes, because it feels like unexpected side effect.
BTW, I suppose extensions cannot hook into find/replace panel, can they? Considering that spell-checking extensions are not checking SCM commit messages by now I deduce it is not possible for them to operate outside main editor. But if they could then this proposal would be nice adept for small extension.


Fixed issue where only Masterkeys Pro L worked

Fixes issue mentioned in comments of #802 where keyboard lights weren't working for any Masterkeys keyboards except Pro L.

Do you have a Masterkeys device that you tested this change with?

I briefly tested it on a Masterkeys Pro S.  The issue seemed to be that CurrentDevice was defaulting to DEV_MKeys_L.  I assume that people with that Masterkeys L had no issue.

Thanks for the contribution!


Update maze wall data correctly

Known exits in cells were not updated on the map correctly.

I see the problem with the wall update = well spotted.
however, I don't think I like the proposed solution. The cast from bool to t_wall_state assumes knowledge of the actual values used which is not safe. They may change arbitrarily.
I suggest this alternative:
maze.set_wall_state(location, NORTH, frontWall ? WALL : EXIT);
Which also compiles to less code - bonus!

The compiler here on nano33 and normal nano does not show a reduction in code space used, how did you work that out? it's tested and works ok, I don't like casting either it's just better than the other nonsense I came up with.

The AVR compiler just shows a saller image if I change one of the assignments. The compilers will all treat it differently. You pushed the new revision to your fork but not to the pull request.

And how exactly do you do that? (no command line nonsense). Everything I can see shows 3 commits on that pull request.
From: Peter Harrison @.>
Sent: 06 March 2023 00:42
To: micromouseonline/mazerunner-core @.>
Cc: MicroMouse @.>; Author @.>
Subject: Re: [micromouseonline/mazerunner-core] Update maze wall data correctly (PR #3)
The AVR compiler just shows a saller image if I change one of the assignments. The compilers will all treat it differently. You pushed the new revision to your fork but not to the pull request.
—
Reply to this email directly, view it on GitHub https://github.com/micromouseonline/mazerunner-core/pull/3#issuecomment-1455270409 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6LWRPAEM74OBJS5RULN4DW2UXDZANCNFSM6AAAAAAVQJRSCY .
You are receiving this because you authored the thread.  https://github.com/notifications/beacon/AB6LWROLYZPUNWPLSMYOEXLW2UXDZA5CNFSM6AAAAAAVQJRSC2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSWXWVAS.gif Message ID: @.*** @.***> >


updated

@cryptobuks Hello sir, I was wondering if I could get some assistance from you.  I know you are active in the Posw project.  Recently you guys removed several coins to better assist your business.  Well a lot of people in the Bitbean community are really feeling the pain, and I was wondering if you could direct me to a template to where we could help this specific community.  please please get back with me whenever you have a chance sir.  thank u


creating the private-endpoint fails for cross subscriptions

Hi,
I am creating a vnetprivate endpoint for a Postgres service which is running in a different subscription but it fails via golang SDK because it tries for auto-approval, ideally for cross subscriptions, it should be manual approval.
Example:
Subscription A: Postgres service has been created.
Subscription B: Trying to create a private endpoint for the Postgres service which is created in the Subscription A
version : github.com/Azure/azure-sdk-for-go v49.2.0+incompatible
2021-02-16T22:36:00.339+0530	ERROR	controllers.VnetPrivateEndpoint	Create event handler failed	{"vnetprivateendpoint": "pac/vnetprivateendpoint-example-foo", "error": "cannot create private endpoint: network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=403 -- Original Error: Code=\"LinkedAuthorizationFailed\" Message=\"The client '447a4e3a-658c-4597-xxx' with object id '447a4e3a-658c-4597-xxxx' has permission to perform action 'Microsoft.Network/privateEndpoints/write' on scope '/subscriptions/8ab0fead-09eb-46dc-xxx/resourceGroups/rgtesitd/providers/Microsoft.Network/privateEndpoints/vnetprivateendpoint-example-foo'; however, it does not have permission to perform action 'PrivateEndpointConnectionsApproval/action' on the linked scope(s) '/subscriptions/6a08c93c-5ce0-4acb-xxxx/resourceGroups/dev2-customer-postgresql/providers/Microsoft.DBforPostgreSQL/servers/pacdemopostgresql1' or the linked scope(s) are invalid.\""} github.com/go-logr/zapr.(*zapLogger).Error
In addition to that golang SDK don't support adding approval note.
PS: if I do the same thing via azure console It works.
BRs, Gowrisankar

@gowrisankar22 can you share a code sample in golang?
The PrivateLinkServiceConnectionProperties type does have a request message. Is that what you mean by approval note?

@MSSedusch  Yes right for approval note. I will share the code via email to you.

after using ManualPrivateLinkServiceConnections  it worked but approval note is still not available

The approval note also worked.  the property name is: Request Message


Auto-drop for 1.20.1

Can you make auto-drop fuction on 1.20.1 version too, everyone need this I swear please

Added in 1.5.0. Use ViaFabricPlus to connect with 1.20.4 to 1.20.1.


4.0.0: pytest fails in multiple units with 'Analysis' object has no attribute 'file_reporter' error

Describe the Bug
Looks like pytest fails in multiple units with 'Analysis' object has no attribute 'file_reporter' error message.
To Reproduce
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix> using installer module
run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Expected Behavior
pyetst should not fail.
 I'll get a patch release up shortly, in the meantime you can pin to coverage<7.5 to avoid the issue.
Will look into the git tests, thought I had a pytest.mark.skip in there, but I guess not!

Oh, interesting, I just noticed I had already pinned to <7.5 (thought this error looked familiar!):
https://github.com/TheKevJames/coveralls-python/blob/ee0f09b529ee8c701e1519390deb49a27d1802eb/pyproject.toml#L35
coverage = { version = ">=5.0,<7.5,!=6.0.*,!=6.1,!=6.1.1", extras = ["toml"] }

I'm not super familiar with the build process you're using. Is there any reason you're aware of why it would be ignoring my specified compatible dependency ranges?

pytest do not check pyproject.toml tests dependencies.

Right, I mean wherever you're installing the relevant dependencies. Looks like it might be an issue in the installer step?
If I replicate your build process:
# in a fresh venv
$ pip install build  # is this the build package you're using?
$ pip install 'poetry-core>=1.0.0'  # since you're using --no-isolation, it looks like you need to manually install my PEP-517 build-system?
$ python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Successfully built coveralls-4.0.0-py3-none-any.whl

Then in another fresh venv:
$ pip install dist/coveralls-4.0.0-py3-none-any.whl                                                                                [afea549|✓]
Looking in indexes: https://pypi.org/simple<EMAIL_ADDRESS>Processing ./dist/coveralls-4.0.0-py3-none-any.whl
Collecting coverage!=6.0.*,!=6.1,!=6.1.1,<7.5,>=5.0 (from coverage[toml]!=6.0.*,!=6.1,!=6.1.1,<7.5,>=5.0->coveralls==4.0.0)
  Using cached coverage-7.4.4-cp311-cp311-macosx_11_0_arm64.whl.metadata (8.2 kB)
Collecting docopt<0.7.0,>=0.6.1 (from coveralls==4.0.0)
  Using cached docopt-0.6.2-py2.py3-none-any.whl
Collecting requests<3.0.0,>=1.0.0 (from coveralls==4.0.0)
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting charset-normalizer<4,>=2 (from requests<3.0.0,>=1.0.0->coveralls==4.0.0)
  Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests<3.0.0,>=1.0.0->coveralls==4.0.0)
  Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=1.0.0->coveralls==4.0.0)
  Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=1.0.0->coveralls==4.0.0)
  Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
Using cached coverage-7.4.4-cp311-cp311-macosx_11_0_arm64.whl (206 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl (118 kB)
Using cached idna-3.7-py3-none-any.whl (66 kB)
Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Installing collected packages: docopt, urllib3, idna, coverage, charset-normalizer, certifi, requests, coveralls
Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 coverage-7.4.4 coveralls-4.0.0 docopt-0.6.2 idna-3.7 requests-2.31.0 urllib3-2.2.1

The wheel seems to get built with the correct coverage<7.5 restriction.
If I use the installer package, I get just the wheel and none of the dependencies, as expected:
$ pip install installer
Looking in indexes: https://pypi.org/simple<EMAIL_ADDRESS>Collecting installer
  Using cached installer-0.7.0-py3-none-any.whl.metadata (936 bytes)
Using cached installer-0.7.0-py3-none-any.whl (453 kB)
Installing collected packages: installer
Successfully installed installer-0.7.0
$ python3 -m installer -d ./localinstall dist/coveralls-4.0.0-py3-none-any.whl
$ ls -la localinstall/private/var/folders/7h/c97966217hx9pp1hsgd_0v200000gq/T/tmpenv.FjOfrOUGVo/lib/python3.11/site-packages/
drwxr-xr-x - kevin 15 May 13:49 coveralls
drwxr-xr-x - kevin 15 May 13:49 coveralls-4.0.0.dist-info

So it looks like your build env is the one getting the wrong dependencies solved. How did you genereate the build environment.

Heads up: I've just released v4.0.1, which supports coveralls v7.5+ and skips the git tests, so you should be good to go either way. I'll keep this issue open for now in case we uncover a build system issue I need to address.

installer is used only to unpack just generated .whl archive before package all those files as rpm package.
Then rpm is using module metadata to generate rpm package install-time dependencies.
All modules present in build env are installed out of rpm packages. Normal rpm packaging procedure is not using any .whl archives from pypi.

Then rpm is using module metadata to generate rpm package install-time dependencies.

This step seems to be reading incorrect metadata, then, if it generated coverage==7.5.1 as a valid install-time dependency?

https://github.com/TheKevJames/coveralls-python/blob/e20a8c8c119b7be9ee33026376a836522dd2c971/pyproject.toml#L33-L37
Above it is coveralls install time dependency.
Again: poetry-core as (pep517 backend) neither pytest do not check that on coveralls {build,test}-time.
I was unable to generate rpm package with coveralls module because its build procedure fails on testing ..

Note that I've just updated it, for coveralls==4.0.0 the install time dependency was as follows (tagged code):
coverage = { version = ">=5.0,<7.5,!=6.0.*,!=6.1,!=6.1.1", extras = ["toml"] }

So before you even got to the point of running pytest, the build environment did not correctly parse the build metadata; poetry-core solves the above as coverage[toml]==7.4.4 as shown in my sample output above. I think somewhere in your step of having rpm read the poetry-core output and generate the required dependencies, something is getting dropped.

Just tested 4.0.1 and all looks good now 👍 😄
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-coveralls-4.0.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-coveralls-4.0.1-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network' --import-mode=importlib
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/coveralls-python-4.0.1
configfile: pyproject.toml
plugins: typeguard-4.2.1, jaraco.test-5.4.0, subprocess-1.5.0
collected 73 items

tests/api/configuration_test.py .s..................                                                                                [ 27%]
tests/api/encoding_test.py ..                                                                                [ 30%]
tests/api/exception_test.py ...                                                                                [ 34%]
tests/api/reporter_test.py ..........                                                                                [ 47%]
tests/api/wear_test.py ............                                                                                [ 64%]
tests/api_test.py .                                                                                [ 65%]
tests/cli_test.py ..............                                                                                [ 84%]
tests/git_test.py ..s..sss                                                                                [ 95%]
tests/integration_test.py ...                                                                                [100%]

================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/api/configuration_test.py:41: requires no PyYAML
SKIPPED [1] tests/git_test.py:91: requires .git directory
SKIPPED [1] tests/git_test.py:172: requires .git directory
SKIPPED [1] tests/git_test.py:159: requires .git directory
SKIPPED [1] tests/git_test.py:185: requires .git directory
=============================================================================== 68 passed, 5 skipped in 3.14s ===============================================================================

Great! I'll close this ticket, feel free to open another if you want to keep chatting about the build issue.


feat(prow/config): limit the merge operation accounts

allow bot account or bot app
Signed-off-by: wuhuizuo<EMAIL_ADDRESS>
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:

/cc @Rustin170506 @D3Hunter


Adding launchfiles, sample rosbags and improving documentation

Changes

Added description on all configuration file parameters
Added ROS2 launchfile for running the node
Added sample folder with a demo rosbag and a proper configuration file to match bag data
Added a launchfile for playing demo rosbag and node
Fixed unstable test (see latest pipeline output)
Fixed velocity reporting (replaced angle by angular)
Fixed timestamp update. Now it's updated each time the message is sent.

@miguelgarcia ready for review!


[Breaking Change Request] [vm] Deprecate and remove dart native extensions

Summary
Dart Native Extensions is a mechanism for loading native code into a running Dart program and binding Dart methods to native implementatations.
It consists of the following parts:

dart-ext:... import scheme which instructs VM to load a native library;
native keyword which specifies that a function has a native implementation;
Dart VM C API (as defined in runtime/include/dart_api.h) which can be used to reflectively inspect and mutate the state of the Dart program;

Currently native extensions only really work in a standalone Dart VM - Flutter embedder hides VM C API symbols and does not allow developers to interact with Dart through Dart VM APIs.
Relience on C API means that:

Native extensions are not very efficient for fine-grained binding.
Reflective access through Dart VM C API is also incompatible with AOT (requires careful usage of @pragma('vm:entry-point') which in turn disables treeshaking).

dart:ffi was designed to not have these problems - be both more effecient and more AOT friendly. dart:ffi works in standalone VM as well as Flutter.
From our perspective it does not make sense to maintain two completely different approaches to binding Dart code to native especially given that one of them is obviously superior. We don't want more packages using native extensions to appear in the ecosystem and we want to push all new Dart users to use dart:ffi.
We propose the following:

In Dart 2.14 issue a deprecatin warning whenever analyzer or CFE see dart-ext: import.
In Dart 2.15 remove support for dart-ext: imports and hide Dart VM C API symbols from standalone dart binary shipped with SDK

Impact
All packages that use dart-ext: will be broken by the release. We will work to estimate the impact, but we consider it to be very small because none of the Flutter compatible packages will be affected, as Flutter does not support this mechanism in the first place.

/cc @a-siva @mkustermann

Adding the March milestone for the deprecation warning in 2.13 from analyzer and CFE when dart-ext import is seen.
In 2.14 we should also remove samples/sample_extension

Also added area-analyzer and area-front-end labels for the warning work in 2.13

A deprecation warning wouldn't be much work, but we probably want to discuss adding new work to a release a few working days before a branch cut.

@devoncarew I have updated versions to 2.14 and 2.15 and moved the milestone. No intention to fall over ourselves with this.

Does Dart SDK follow semver versioning?

Ping @vsmenon @matanlurey @Hixie for approval

Fine by me since this doesn't affect Flutter anyway. :-)

lgtm

Approved

@mraleph Please add a post to https://groups.google.com/a/dartlang.org/g/announce

@devoncarew @johnniwinther does it sound reasonable to have analyzer produce deprecation warnings in 2.14? I want to get versions right in the announcement.

SGTM
Do you have wording to use in the deprecation warning?

@johnniwinther I suggest "Dart native extensions are deprecated and will be removed in 2.15 release of Dart SDK. Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)". @mit-mit any thoughts?

What is the plan for moving internal code off  of dart-ext? I see a few cases when I search lang:dart import\ ['"]dart-ext in code search.

I have reached to some of the internal owners and working on planning migration

I have reached to some of the internal owners and working on planning migration

Great! I assume internal users would be able to ignore the deprecation message at the use sites, in which case we could do the analyzer work - the deprecation message - w/o being blocked on removing uses internally first.

FWIW, currently I think there is actually only 1 user that needs to be migrated. Other uses are either on legacy Dart v1 or are can be deleted. I am planning to migrate that 1 user myself. I will update this thread once I have all the data.

@mraleph @devoncarew @johnniwinther
Should we have the warning message for CFE and analyzer be release on the same month?
Currently CFE  is on current milestone and analyzer is on May

I am fine with May milestone for both

Before we do this, I think we need a replacement for https://dart.dev/server/c-interop-native-extensions that describes (at least in some detail) how to do integration/embedding with FFI.

Should we have the warning message for CFE and analyzer be release on the same month?
Currently CFE is on current milestone and analyzer is on May

Yup, I moved the analyzer one to May given the timing of when this would need to be done ('Dart 2.14 issue a deprecation warning').

Moving CFE to May

@mraleph Is there anything else we are tracking for April here, now that we moved all the depreciation warning to May?

Moved to May.
(Related: I have migrated 1 internal customer. 2 to go).

Internal customers are fully migrated (the last CL is under review).
Announcement sent.

@mraleph Are there any other work here for 2.14?  We have tracking issues for the warning messages.
I can move this out of the May milestone if the 2.14 work is done

No, only changes to the CFE and analyzer are pending. We are all set to go internally.

I have a question about this deprecation. There are some C APIs that are very asyncronous, and recently on dart:ffi there was some work in enabling sending data from arbitrary threads through SendPorts. Is this change going to affect those? https://api.dart.dev/stable/2.13.1/dart-ffi/NativeApi-class.html

@Piero512 no, things you have referenced will continue to work

Will it ever be a possibility to use Dart to compile to a dynamic/static lib?
I know this isn't possible at the moment (only a binary), but I'm not sure I get why. I recognize that Dart has a runtime, but the situation is similar for .NET and the solution they adopted was to require the runtime present/loaded and initialized prior to trying to load/call any export symbols from the object.
It would be really cool to have Dart as an option when looking to write native libs.

I believe we were going to deprecate in 2.14 (shipping soon) and remove in 2.15.

Yes the removal will be in the first beta of 2.15

@GavinRay97 asking off-topic questions on clearly unrelated process issues is not a good strategy to get an answer. We don't have concrete plans to implement what you describe, but we discussed implementing something like that before. The main reason for no implementing it is lack of clear demand and lack of resources. Feel free to file a separate issue with a feature request.

@johnniwinther @srawlins could you make changes to CFE and analyzer to start rejecting dart-ext: imports?

@lrhn yeah, I will do few separate changes to replace native with an annotation.

VM and CFE has removed support for dart-ext. Analyzer work pending.
Removal of native syntax is tracked in https://github.com/dart-lang/sdk/issues/28791

@mraleph - do you know what the remaining work here is for the stable release? If there is work remaining, perhaps  track using sub-issues and update the first comment in this one to be a checklist / meta issue.


Performance improvements in the SDL viewer.

Render less points while moving.
Never use LOD.
Choose the level to render on the amount of nodes that fit in the
cache.

@wally-the-cartographer merge

Merge requested by authorized user SirVer. Merge queue now has a length of 1.


Database configuration in ini files

Hi Guys,
We have moved the location where the database name is specified so that we now specify it:
[database]
name=csvdb

but all of the standard pipeline.ini files still specify it
[general]
database=csvdb

The standard ini's need to be updated. I can do it something, but I'm really busy teaching for the next couple of weeks.

Hi Ian,
We've got a scrum on Monday/Tuesday so we can sort this then.
Cheers

I have removed all these statements.

Erm, shouldn't the ini files contain a
[database]
name=csvdb

section?


PixmapPacker.pack method may change Pixmap.Blending value

Issue details
Running multiple instances of PixmapPacker on background thread may change Pixmap.Blending value to Pixmap.Blending.None.
This is caused by PixmapPacker.pack method changing Pixmap.Blending which is global state: https://github.com/libgdx/libgdx/blob/1.9.5/gdx/src/com/badlogic/gdx/graphics/g2d/PixmapPacker.java#L174
Reproduction steps/code
Run multiple instances on PixmapPacker on background thread. Eventually Pixmap.Blending will be changed to Pixmap.Blending.None.
Version of LibGDX and/or relevant dependencies
1.9.x
Please select the affected platforms
Probably all of them, observed on android and iOS.

[x] Android
[x] iOS (robovm)
[ ] iOS (MOE)
[ ] HTML/GWT
[ ] Windows
[ ] Linux
[ ] MacOS

Are you using multiple instances of PixmapPacker across multiple threads, or are you running them all on the same thread?

This occured when using multiple threads, each having it's own instance of PixmapPacker.
Thanks for fixing this.

This change does not work on GWT!! Please fix.

Fixed in commit 46d4a62fec74c2c821cf3fbd1831719552041b1d
Thanks.


The path /var/log/harbor is not shared from OS X and is not known to Docker.

Got this issue, when run docker-compose up -d,
Creating harbor_log_1

ERROR: for log  Cannot start service log: Mounts denied:
The path /var/log/harbor
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERROR: Encountered errors while bringing up the project.

my docker is latest native docker for mac:
$ docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.7.1
 Git commit:   6f9534c
 Built:        Thu Sep 15 11:20:26 2016
 OS/Arch:      darwin/amd64
 Experimental: true

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:32:24 2016
 OS/Arch:      linux/amd64
 Experimental: true

You can change the Deploy/docker-compose.yml just like this:
volumes:
    #- /var/log/harbor/:/var/log/docker/
    - ../dev/var/log/harbor/:/var/log/docker/

Thanks, @KaleoCheng.


Some questions about loop closure detection

extern const float surroundingKeyframeSearchRadius = 50.0; // key frame that is within n meters from current pose will be considerd for scan-to-map optimization (when loop closure disabled)
extern const int   surroundingKeyframeSearchNum = 50; // submap size (when loop closure enabled)
// history key frames (history submap for loop closure)
extern const float historyKeyframeSearchRadius = 7.0; // key frame that is within n meters from current pose will be considerd for loop closure
extern const int historyKeyframeSearchNum = 25; // 2n+1 number of hostory key frames will be fused into a submap for loop closure
If I want to make the loop closure detection as good as possible, which of the above parameters should be increased? and which should be reduced? Thank you!

for my case, I just reduced the historyKeyframeSearchRadius from 7.0 to 5.0.
Sensor tested: Hesai 40 channel Lidar
Speed:             around 50km/h

BTW fyi,
I integrated the global loop detector (scan context) into the LeGO-LOAM pipeline
https://github.com/irapkaist/SC-LeGO-LOAM
This ad-hook global loop detector works even large drift exist (e.g., https://www.youtube.com/watch?v=p-NsVs8GATA&feature=youtu.be&t=436)
and could enhance LeGO-LOAM's original radius search-based loop detection.

@YushengWHU  @kissb2  Thank you for your reply！


regulate concurrency per category, not per job

We should really configure job concurrency at a category level:
Introduce category cpu-heavy for test/ide/community build and limit to 2 jobs per node. No need to limit concurrency for other jobs I think.
Create this file in jenkins root: hudson.plugins.throttleconcurrents.ThrottleJobProperty.xml
<?xml version='1.0' encoding='UTF-8'?>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty_-DescriptorImpl<EMAIL_ADDRESS>  <categories>
    <hudson.plugins.throttleconcurrents.ThrottleJobProperty_-ThrottleCategory>
      <categoryName>cpu-heavy</categoryName>
      <maxConcurrentPerNode>2</maxConcurrentPerNode>
      <maxConcurrentTotal>0</maxConcurrentTotal>
      <nodeLabeledPairs/>
    </hudson.plugins.throttleconcurrents.ThrottleJobProperty_-ThrottleCategory>
  </categories>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty_-DescriptorImpl

The job config's ThrottleJobProperty (see job_blurbs) should look like:
<hudson.plugins.throttleconcurrents.ThrottleJobProperty<EMAIL_ADDRESS>      <maxConcurrentPerNode>2</maxConcurrentPerNode>
      <maxConcurrentTotal>0</maxConcurrentTotal>
      <categories>
        <string>cpu-heavy</string>
      </categories>
      <throttleEnabled>true</throttleEnabled>
      <throttleOption>category</throttleOption>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>

the current parallelism setup has seemed fine to me, especially since we moved to the bigger behemoths. most jobs are moving off Jenkins anyway


Voice convertion -> 3 step -> IndexError

I have error in script 03_align_src_with_target.sh:

--- DTW alignment started ---
1
110
121
132
143
154
165
176
187
Traceback (most recent call last):
File "/home/tarik/merlin-master/misc/scripts/voice_conversion/dtw_aligner_festvox.py", line 158, in
pool.map(process, mgc_files)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
IndexError: index 437 is out of bounds for axis 0 with size 437
Copying features to acoustic data directory...
preparing file list...
done...!

What can I do?

I have a similar error. Were you able to solve it?

I haven't solved this issue.

As an alternative, try replacing dtw_aligner_festvox.py with dtw_aligner.py at line number 60.


support kwargs in @page macro

Currently different methods of the @page macro are distinguishable only by the number of arguments, requiring the argument order url, view, layout, model, context.
With the new macro tool expressions_to_args() we can support a kwarg-like macro call, e.g.
model = @init
@page("/", ui, model = model)

for global models without the requirement to specify a layout.

Still thinking how we could support passing of more arguments to the init function ...

Now we can do:
@init(debounce = 10)

In order to change the settings after they have been already set, it is important to clear the cached route and DEPS. For this I introduced clear_cache() and @clear_cache
@clear_cache
@init(debounce = 12)

Before we think about merging, I'm going to support semicolon parameter syntax

Well, it's done. Needed to find out that macros only catch parameter syntax consistently when there is no positional argument in the definition.
Look at this:
macro f(x, expressions...)
    @show x expressions
    return nothing
end

@f(a, b="b"; c=c)
# x = :($(Expr(:parameters, :($(Expr(:kw, :c, :c))))))
# expressions = (:a, :(b = "b"))

Interesting, I've never attempted this. With functions the keyword args are collected in the named tuple.
julia> f(args...; kwargs...) = print(args, kwargs)
f (generic function with 1 method)

julia> f(2, a=:a; b=3)
(2,)Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:a, :b), Tuple{Symbol, Int64}}}(:a => :a, :b => 3)

Because it's passed before the ;, the a=:a argument is passed as one entity, a named tuple.

Yeah, the functions soll aggregate args and kwargs, I've used that thousand times.
I even investigated macro syntax when I wrote my bits of the onchange parser. But I didn't realise that distribution to args goes wrong.
I'll ask this on discourse...

One thought. Should we enforce strict ordering so that kw arguments? (if it can be done) Now you can do something like
@page("/model2", model = Model, ui )

which works since the macro rearranges the parameters inside. This may suggest that order is not important, but if one were to try
@page(ui,  model = Model, "/model2" )

it wouldn't work.
Other than this, I like the changes and it's very useful for when you want to use multiple models without specifying a layout.

I think it is known from functions that the order of positional arguments is important while the oder of kwargs is not.
That's exactly the behaviour I copied.


Support MFA and roles when doing auth

We set up our AWS so that the default account has little/zero permissions and we do everything through roles across accounts.  We also require MFA in a lot of places.  This magic incantation when creating the session makes the SDK act more like the aws command line tools.
You can do something like export AWS_DEFAULT_PROFILE=dev-joe to set the profile to the one that you want to use and now kubicorn will pick it up.

LGTM thanks @jbeda