Swift3 issues

Two issues - please help adjust for Swift3:
extension JSON: Swift.CollectionType, Swift.SequenceType, Swift.Indexable {

/Pods/SwiftyJSON/Source/SwiftyJSON.swift:198:1: error: type 'JSON' does not conform to protocol 'IndexableBase' extension JSON: Swift.CollectionType, Swift.SequenceType, Swift.Indexable {

public func rawString(encoding: UInt = NSUTF8StringEncoding, options opt: JSONSerialization.WritingOptions = .prettyPrinted) -> String? {

/Pods/SwiftyJSON/Source/SwiftyJSON.swift:646:41: error: default argument value of type 'String.Encoding' cannot be converted to type 'UInt'

Found first solution - IndexableBase was missing a function to complete conformation - no idea if response is correct but compiles now:
public func index(after i: JSON.Index) -> JSON.Index {
return JSON.Index();
}

Are you using Swift3 branch? It compiles

Installed via cocoapods

How do I install swift3 branch via cocoapods? Any help?

Try this:
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', branch: 'swift3'

I tryed the swift3 branch but is not working, I still have compiling errors

Yeah the branch works via pods but had to manually fix a few issues
On Saturday, September 17, 2016, Luis Ezcurdia<EMAIL_ADDRESS>wrote:

I tryed the swift3 branch but is not working, I still have compiling errors
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/SwiftyJSON/SwiftyJSON/issues/542#issuecomment-247807962,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATO_Va2MxFG47UNWcWOdbbOqui3i_s5Lks5qrFXugaJpZM4I_H8A
.

@bloqlist Seems that the issue is fixed for you so I'm gonna go ahead and close this. Thank you!


Enum appsource validation Question

Hi all
Is it ok to change enum type of a field for example I have field in my custom table with a custom Enum but due to issues changed to a similar standard Enum?
Is it ok to delete a value in an Enum i.e if an enum has around 6 values want to delete the last one?

Hi @bachii1010, for the first question see this comment about why we do not allow it.
For the second question, this is also a breaking change as removing an enum value would break the dependent extensions that are referencing it. The appsourcecop should validate for it. If not, it is a bug.

The AppSourceCop currently allows to remove enum values while it should not, I will use this issue will track this scenario.

We have added rules in AppSourceCop to prevent removing enum values. This will be part of the next minor release (17.1) and of the developer preview.


Deprecate and define EOL/EOS path for XML

This issue is to discuss the possibility for eliminating support for XML
Currently, XML and JSON Schemas have some inconsistencies. Some of the inconsistencies are described in #146. There are many benefits to removing support for XML, including:

Eliminate unnecessary complexity in libraries and tools supporting CycloneDX
Reduce the number of dependencies needed in libraries/tools
Decrease the amount of time needed by maintainers to keep libraries/tools up to date with current spec versions
Decrease the probability of defects introduced in libraries/tools supporting CycloneDX
Decrease the amount of time necessary for CycloneDX/Ecma standards development, review, and approval

If there is agreement by the CycloneDX Core Working Group and by Ecma TC54, we will need to define a deprecation path that leads to the eventual EOL/EOS for XML.
Community feedback necessary. Lets the comments commence...

At Apache Logging Services, we are publishing only the XML version of CycloneDX documents.
The reason behind this is that we can use a simple XSLT stylesheet (like this one) to overcome the limitation of the tools generating the SBOM (in our case cyclonedx-maven-pluging).
Sure, we could also move to some JSON technologies and tools.

As @ppkarwasz indicated, at Apache Logging Services, in Maven-based projects, we fixed everything to XML, since the rest of the ecosystem is XML. Put another way, Maven speaks XML. That said, if needed, we can move our tooling to JSON.

Currently, XML and JSON Schemas have some inconsistencies. Some of the inconsistencies are described in https://github.com/CycloneDX/specification/issues/146. There are many benefits to removing support for XML, including:

@stevespringett, I am not able to follow the "there are some inconsistencies between XML and JSON schema, let's drop the XML support" reasoning. Such that, the listed arguments can very well be used to pitch for "drop JSON support in favor of XML". Could you help us understand what is the rationale behind choosing XML over JSON as the extra weight to drop?

I am fine with leaving XML behind. Any issues with JSON has to be handled separately.

@vy

Could you help us understand what is the rationale behind choosing XML over JSON as the extra weight to drop?

Its based simply on demand. There are many tools that support CycloneDX, some of which support both XML & JSON, and others that only support JSON. We're seeing a lot more use of JSON over XML, so that is the only rationale behind favoring JSON over XML.
@io7m

It's been 13 years(!) and JSON Schema hasn't even shown any signs of being anything other than an endless series of "drafts".

I'm with you. My frustrations with JSON Schema are endless. Even simple things like providing a description for an enum cannot be done in JSON Schema, but can in XML Schema. So we have to overload the properties description with descriptions for each enum. It's a mess.
@oej
I think most folks have a similar outlook of XML and JSON. Writing complex schemas in XML Schema is much more verbose than JSON Schema. Even with all the limitations of JSON, its a better developer experience IME.

We are using the XML version of the specification in order to be able to add extensions to the format via namespaced elements. We cannot do that with JSON in a strongly interoperable way.

We could make properties work for our current use case. We are exploring another use case for extending service definition which would almost certainly require the creation of structures beyond simple name/value pairs. We are generally XSLT/XProc users so we'd need to change our toolchain as well.

i would love to keep XML a thing.
data transformation is a use case i have from time to time, and using XSLT for it is very convinient.


Rename build_pygments_data.py, add hubot to "Interactive bots".

@timabbott: This is a follow-up to #6103! :)

@timabbott: Huh, I seem to be missing coverage on lines I didn't even touch. Is this from a recent commit?

Nice, merged, thanks @eeshangarg !  Yeah, that coverage issue is something that got merged into master last night, sorry!


Add commentstring for gnuplot filetype

The default commentstring for gnuplot files (.plt, .gnu etc.) does not work. But hash type does.

Thanks for the PR. Just one nit, cmake also has same block commenstring perhaps we could make it common in the M table as cmake_b or hash_bracket.

cmake also has same block commenstring
The block commentstring does not work quite completely in gnuplot, it works for a single line but not for multiple lines (an actual block); but is still is better than the default one which works nowhere :)
perhaps we could make it common in the M table as cmake_b or hash_bracket.
Just did that.

cmake also has same block commenstring
The block commentstring does not work quite completely in gnuplot, it works for a single line but not for multiple lines (an actual block); but is still is better than the default one which works nowhere :)
perhaps we could make it common in the M table as cmake_b or hash_bracket.
Just did that.


[CRASH] Hub crashes when selecting Bluetooth (CSR Dongle) in GUI without a dongle plugged in

Problem
Observed on Windows, might be platform-independent:

Don't plug in anything to the computer (no dongles, no receivers)
Launch HUB
Launch GUI
Hit "LIVE (from Ganglion)"
Hit "Blueooth (CSR Dongle)"
Hub will display an error "OpenBCIHub Fatal Error" "No compatible USB Bluetooth 4.0 device found!".
Press OK, and the HUB will exit.
The GUI is also left in a weird state. Hitting "LIVE (from Cyton)" afterwards generates a NullPointerException

Expected
I expect the HUB to handle this gracefully instead of going into Fatal Error and quitting. For example, the HUB could notify the GUI that there is no bluetooth device, and the GUI could handle this by putting a message in the status bar, and/or simply leaving the device list blank.
Operating System and Version
Windows
GUI Version
The version is displayed on startup.
Running standalone app
Are you running the downloaded app or are you running from Processing 3
Type of OpenBCI Board
No board needed to repro.
Are you using a WiFi Shield?
No

not fixing, CSR deprecated


launch application error with lackey

I try to launch iTunes with lackey.
import lackey
app = lackey.App("C:\\Program Files\\iTunes\\iTunes.exe").open()

nothing happens.
when I test with app = lackey.App("notepad.exe").open()
the notepad is opened. I change to
app = lackey.App("iTunes.exe").open()
also nothing happens

I solved by using app = lackey.App(r'"C:\Program Files\iTunes\iTunes.exe"').open()

That's the correct answer. Lackey will treat the string as a single command, so if there are spaces, the path has to be enclosed in quotes within the string to make sure the operating system recognizes it as a single token:
[C:\Program] [Files\iTunes\iTunes.exe]

vs
["C:\Program Files\iTunes\iTunes.exe"]

This looks like it's operating as designed. Unless you have any concerns, I think we can close out this issue?

ok. you can close. A small issue is that when i use app.close() to kill the app, it outputs some error information from the client. but the client can be closed without problem. can you remove this error information?

Can you post a sample?

Child read:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AMSMessageSignatureKey</key>
	<array>
		<string>AMSNotificationPipeNameKey</string>
	</array>
	<key>AMSNotificationPipeNameKey</key>
	<string>\\.\pipe\30578924-576340073114863428</string>
	<key>AMSRequestKey</key>
	<string>AMSSetUpNotificationPipeRequest</string>
</dict>
</plist>

Child sending:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

Child: Can't read length for data, error code 109

I think sometimes lackey can't close the itunes properly.

After a bit of research, I think I've figured out how to muffle these errors. Doing a bit more testing to make sure it doesn't break anything. I've committed a fix to the develop ring and will roll it out to production when it's ready.

For launching application this will work:
app = lackey.App(""C:\Program Files\iTunes\iTunes.exe"").open()

It will if you replace those outer quotes with single quotes. =)

This fix has been rolled out to Pypi.


sidebar in blog.css pushed to bottom

I hesitate to post this since by no means am I a css, js, or bootstrap expert, but I just copied and pasted the new blog.css and blog template examples from this repo without changes and the sidebar is all the way at the bottom, instead of on the right side as in the example on getbootstrap.
The main body container is sm-8, and the sidebar is sm-3 with an offset of 1, so 8 + 3 + 1 = 12, and I assume that is right. But when I look at it in the inspector, both the main and the sidebar have a width of 1080. I also note that the well background to "About" is quite a bit wider than the rest of the sidebar.
I suspect this is the problem but I am not entirely sure how to fix it, since I thought that was what the col settings were for.
Ubuntu 16.04, Firefox 50.1.0
--update, 5 minutes later--
I got an idea to look at the example http://getbootstrap.com/examples/blog/ in the inspector and sure enough, there, blog-main is col-sm-8, but it is also 862.222 wide while sidebar is 323.333. Maybe there is some relative setting here that determines the widths, I'm not sure, but still, since I haven't changed anything, shouldn't that have worked unchanged?
I've also counted divs and I don't see any missing or unclosed tags.

This template hasn't been modified in any significant way for a couple years now. This could be an issue with copying the code into the wrong version of Bootstrap (I don't think this works with v4). You could also be missing Bootstrap's CSS entirely? Hard to tell without a live demo.
If none of those things are the problem, please share a reduced test case (something on JS Bin or similar) so we can look at your code. Otherwise, there's nothing we can do here, especially since this is for v3, which we're not currently developing any further.


"preview" mode

As a query designer, when I create / edit a transformation step, I have access to a "preview" button that will ask the host to recompute the dataset so I can preview the result.
The preview is also accessible when I click on a specific step in the pipeline pane.

This has been implemented for a long time now :)


x/mobile: Add support for signing Android applications using v2+ scheme

Note:
This was suggested as part of the security issue filed as part of #38438 and might be relevant.
Description:
The signing of Android applications in gomobile is currently using the old v1 signing scheme and not the new and improved v2 or v3 schemes that have been available for quite some time now. See the Application Signing documentation for more information regarding the various signing schemes.
The v2+ schemes introduce both security and performance improvements and could be beneficial for improving the application signing. There are two way that this could be done due to v2+ being compatible on older Android phones as long as applications are signed with both (or possibly all three) protocols. This means that we could fix the security issue mentioned in #38438 and still sign with the v1 scheme for supporting Android 7 and below, but also sign with v2+ for better security and install performance on newer versions. Another possible way to solve it would be to drop support for v1 and just support v2+ and thus Android 7 and newer. The choice of the best option depends on how you look at it, but I will leave that to someone else to decide.

/CC @hyangah

Is this still an issue?


libarmadillo not found if Armadillo is built from source

Right now it appears to only be possible to build mcnp2cad if it finds libarmadillo.so in /usr/lib. It doesn't know how to find Armadillo otherwise.

There is some discussion of this in #26

Changes to Makefile and documentation was added in #26


Allow audio input

This feature would allow people to directly use their microphone to input audio. For example, Whisper could then transcribe this into a text message.

If i understand correctly it is about using your own transcribe model instead of the browser's?

yes

This is something I am interested in as well. Would be happy to help in trying to add this functionality if I can be given some idea as to where to start in the code base (I found the current implementation in the react code, but am struggling to understand how the UI from React interacts with the python code).

We acknowledge the community interest on that feature and we are open to contributions. The easiest way to do it is probably to make the audio recording a mp3 file through the browser apis and send this audio element with an empty message. Send elements with a message is already supported (like in multi modal examples).

I am also looking for this feature. @jdb78 did you found any solution?

The feature request referenced only allows for the browser engine, however if i understand @jdb78 correctly it is about using a transcribe model instead of the browser's. Is there any progress in this direction or at least a way to save / get the audio input? It would be a major improvement compared to the browser engine. Thank you.

.wav file receive wrong？ is only support MP3 format？

I wanted to tackle this issue, had given it a go from my side and did made some progress.
So far the only issue I see is with browser audio APIs, I was only able to record generate .webm file (can generate .wav).
Any suggestions on how to tackle this? or should we do the conversion from backend side with ffmpeg?

Hi @b4s36t4.  Thank you for giving it a go! I believe most speech-to-text APIs (including Whisper) can support wav files, thus being able to access a user's microphone recording in the backend as a wav file would be a major step forward.
I believe that depending on the use-case, it could be changed to MP4 in the backend via ffmpeg, but for the functionality stated by @jdb78 (which my team is also looking for), what you described would already be absolutely fantastic!

i  think should be better to use webrtc to do that because ffmpeg doesn't work correctly on mac and windows.
and webrtc implementation is made for this . then it's open possibility to use something like this
https://github.com/toverainc/willow-inference-server

It would be great to have audio working in Chainlit. Below is the code that I use to do audio conversions in Gradio.
    # Transcribe audio to text
    def speech_to_text(self, audio):
        # Use OpenAI Whisper API. API reference: https://platform.openai.com/docs/api-reference/audio/createTranscription
        # Here audio is a path to the audio file
        try:
            self.log.info("Temporary audio file path: " + audio)
            audio_file = open(audio, "rb")
            transcript = openai.audio.transcriptions.create(
                model="whisper-1", file=audio_file, response_format="text"
            )
            self.log.info("Transcript: " + transcript)
            return transcript
        except Exception as e:
            self.log.error(e)
        return None

    # Generate audio from text using OpenAI API
    def text_to_speech(self, text):
        try:

            file_path = self.audio_out_dir + "/" + str(generate_uuid()) + ".m4a"

            with openai.audio.speech.with_streaming_response.create(
                model="tts-1", voice="shimmer", input=text, response_format="aac"
            ) as response:
                response.stream_to_file(file_path)
                return file_path
        except Exception as e:
            self.log.error(e)
        return None

Note: This is just a snippet from my audio utility class.

Great work to have Microphone voice input capability with Chainlit. I have set it up by following the example audio-assistant, it works well on the laptop I launched the chainlit App, see below picture. But for other device within the same wifi network and using the same ip and port the voice/audio is not working. Any ideas/direction to resolve it?

I think I am facing similar issue with @chenrq2005. If I run my chainlit app on a specific address (not localhost), voice/audio function is gone.
@chenrq2005 have you found a solution to your problem?

Reopening this issue
@chenrq2005 @Nau-git , I am facing similar issue in #1295 .
@willydouhard Please help with this

I figured out why.
When you inspect the chainlit app, you'll see an error saying getuserMedia() is undefined. According to this (issue)[https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia], it's because the url is not secure - i.e. it's not a "https" URL. So you need to deploy on a https link.

for mic usage you have to deploy over https if host is not localhost, you can create a self signed cert for private ip testing and install that cert on the testing machine to get the browser more relaxed on security blockings.


DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

I was doing some unit testing for some code that uses the amqtt.client module and this warning showed up two times.
This are the exact spots:
/home/user/.local/lib/python3.8/site-packages/amqtt/client.py:119: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.   self._connected_state = asyncio.Event(loop=self._loop)
And
/home/user/.local/lib/python3.8/site-packages/amqtt/client.py:120: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.   self._no_more_connections = asyncio.Event(loop=self._loop)
I'm using the 0.10.0 version.

3.10 is here, and this causes an exception. Could you please prioritize this issue now?

Solved by PR #84

This is now merged and the CI also checks with Python 3.10.


Add link to user profile in markdown mention only if user exists

Previously mentioning a user would link to its profile, regardless of whether the user existed. This change tests if the user exists and only if it does - a link to its profile is added.

Fixes #3444

Before

After

I think the unit tests are failing because of db context issues. This is my first PR that has database interactions, could a maintainer help me understand these errors?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xb01cc5]

goroutine 99 [running]:
code.gitea.io/gitea/models/db.GetEngine({0x0, 0x0})
        /workspace/gitea/models/db/context.go:78 +0x45
code.gitea.io/gitea/models/user.IsUserExist({0x0?, 0x0?}, 0x130be1b?, {0xc001624f63, 0x6})
        /workspace/gitea/models/user/user.go:533 +0x53
code.gitea.io/gitea/modules/markup.mentionProcessor(0xc001a6ab40, 0xc001aab600?)
        /workspace/gitea/modules/markup/html.go:611 +0x20c
code.gitea.io/gitea/modules/markup.textNode(...)
        /workspace/gitea/modules/markup/html.go:434
code.gitea.io/gitea/modules/markup.visitNode(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x26a1dc0?, 0x7fb84c27a080?, 0x0?}, 0xc0002f6150)
        /workspace/gitea/modules/markup/html.go:377 +0x18d
code.gitea.io/gitea/modules/markup.visitNode(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x26a1dc0?, 0xc000285948?, 0xc0002859b0?}, 0xc0002f60e0)
        /workspace/gitea/modules/markup/html.go:424 +0x1f8
code.gitea.io/gitea/modules/markup.visitNode(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x26a1dc0?, 0xc000285b40?, 0x47f545?}, 0xc0002f1f80)
        /workspace/gitea/modules/markup/html.go:424 +0x1f8
code.gitea.io/gitea/modules/markup.visitNode(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x26a1dc0?, 0xee17d3?, 0xdf1?}, 0xc0002f1650)
        /workspace/gitea/modules/markup/html.go:424 +0x1f8
code.gitea.io/gitea/modules/markup.visitNode(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x26a1dc0?, 0x6?, 0x6?}, 0xc0002f1570)
        /workspace/gitea/modules/markup/html.go:424 +0x1f8
code.gitea.io/gitea/modules/markup.postProcess(0xc001a6ab40, {0x26a1dc0, 0xb, 0xb}, {0x19fb020?, 0xc001a47010?}, {0x19fb040, 0xc001a47028})
        /workspace/gitea/modules/markup/html.go:331 +0x24c
code.gitea.io/gitea/modules/markup.PostProcess(...)
        /workspace/gitea/modules/markup/html.go:186
code.gitea.io/gitea/modules/markup.render.func4()
        /workspace/gitea/modules/markup/renderer.go:238 +0x118
created by code.gitea.io/gitea/modules/markup.render
        /workspace/gitea/modules/markup/renderer.go:236 +0x673

I figured out how to initialize the database

Share my thoughts: although I do not think it's good to  make modules/markup depend  on modals/db and modals/user, but to make the dependency clear it needs  some more (maybe a lot) work  to split the packages.
So I am neutral for this approach if other maintainers feel good of it.

I do not think it's good to make modules/markup depend on modals/db and modals/user

Maybe just move the affected function out into a new module?

As soon as the new module is imported the dependency would still exist, wouldn't it?

As soon as the new module is imported the dependency would still exist, wouldn't it?

Something like:
pkg.api.FuncInterface
pkg.impl1.Func1
pkg.impl2.Func2
pkg.markup.RenderWith(pkg.api.FuncInterface) -> call FuncInterface(...)
pkg.web.DoSomthing() -> pkg.markup.RenderWith(pkg.impl1.Func1)

Then there is no dependency  between pkg.markup  and pkg.impl1/pkg.impl2
That's what I meant "but to make the dependency clear it needs some more (maybe a lot) work to split the packages"
According the suggested dependency relation: https://docs.gitea.io/en-us/guidelines-backend/#package-dependencies ,  it's better not making modules depend on models

There are many instances where modules depend on models

There are many instances where modules depend on models

Yup, that's just for historical reasons. The codebase  was quite messy before, there are many refactoring PRs for splitting the packages. That's why the guideline came.
The root problem is that Golang's dependency management is quite strict and it can not bear cycle imports, so making the dependency clear would help a lot and make the codebase more healthy.
IIRC the consensus at the moment is "avoid importing models to modules if there is no strong reason", I am not sure how others think about it.  So I just  keep neutral for this approach.

The root problem is that Golang's dependency management is quite strict and it can not bear cycle imports

That is certainly a benefit in my eyes that the compiler is so strict. I've dealt with untangling circular dependencies in JS before, it's absolutely no fun :)

I proposed a refactoring for this  PR

https://github.com/yardenshoham/gitea/pull/19

It  decouples the modules/markup and models/user, and you can use modules/context in services/markup/processhelper now.

The root problem is that Golang's dependency management is quite strict and it can not bear cycle imports

That is certainly a benefit in my eyes that the compiler is so strict. I've dealt with untangling circular dependencies in JS before, it's absolutely no fun :)

Too strict is no fun either. It's very difficult to refactor existing code. Even if you only tried to move  a single function, the cycle dependency  problem occurs.
 JS is still friendly to cycle imports and it's useful for some intermediate refactoring steps. All other modern languages are quite friendly to cycle imports.

All other modern languages are quite friendly to cycle imports.

Cyclic imports in JS can lead to some nasty bugs depending on which module evaluates first. We forbid them here via linter rule as well, I think it's a net positive to not allow them.

I'm working on fixing the tests

Some questions about the  tests:

Why a new user user34 is added? I didn't see where it is really used.
Does "markup/markdown/markdown_test.go" really need to prepare database? Now there is no access to database from the markdown module.
The same question as above for "api/v1/misc/main_test.go" and "api/v1/misc/markdown_test.go"
The tests in "integration/setting_test.go" seems unrelated, could it be reverted

Some questions about the tests:

Why a new user user34 is added? I didn't see where it is really used.
Does "markup/markdown/markdown_test.go" really need to prepare database? Now there is no access to database from the markdown module.
The same question as above for "api/v1/misc/main_test.go" and "api/v1/misc/markdown_test.go"

TestTotal_RenderWiki and TestAPI_RenderGFM mention the user @r-lyeh

The tests in "integration/setting_test.go" seems unrelated, could it be reverted?

They fail because user4 is not on explore's first page anymore

Some questions about the tests:

Why a new user user34 is added? I didn't see where it is really used.
Does "markup/markdown/markdown_test.go" really need to prepare database? Now there is no access to database from the markdown module.
The same question as above for "api/v1/misc/main_test.go" and "api/v1/misc/markdown_test.go"

TestTotal_RenderWiki and TestAPI_RenderGFM mention the user @r-lyeh

The tests in "integration/setting_test.go" seems unrelated, could it be reverted?

They fail because user4 is not on explore's first page anymore

How about fix other tests, assume the user r-lyeh doesn't exist, instead of adding more fixtures?
IMO the mention render could be tested separately.

OK, I'm on it

I added a separate processorhelper_test.go  to test IsUsernameMentionable with database.
And make markdown_test.go use mocked IsUsernameMentionable. Then no need to match the usernames during markdown_test.

TestTotal_RenderWiki and TestAPI_RenderGFM  pass for you @wxiaoguang

No problem, I will take the remaining work.

CI passes


Allow use of Azure OpenAI API Keys (Azure Cognitive Service API)

What's the problem?
Being able to utilise Azure Open AI API keys ( Cognitive Service API) (not to get confused with OpenAI API Keys). Azure OpenAI is its own billed service on Azure. This is good for businesses and teams who utilise OpenAI via Azure to power their own internal LLM.
What's the solution?
Set up connectivity to Azure OpenAI AI (Cognitive Service API)
Additional context
Azure Cognitive Serivces Documentation: https://learn.microsoft.com/en-AU/azure/cognitive-services/

Hi @mrjk05, we do use Azure OpenAI to on our LLM backend.

@ggordonhall, where can I find instructions on using Azure OpenAI for the locally run version of bloop?


Is it possible to have an image link instead of base64?

Summary
When I use an upload image option, the image gets translated to base64. This is huge content. Is there any other alternative that we can use to render the image?
Version
I use the version 3.2.3

same question


[ID] Nevada's SPOC button appears even for non-Nevada tenants

From OH:

Once the user indicates if they are interested or not, a button that says SPOC appears. If you click it, it is the form for the State of Nevada. Ohio does not follow the SPOC process nor has a form.

Is the SPOC process rare or common? I'm wondering if this should be controlled a user setting, or if USDR should just set it on an account by account basis.
(Maybe the latter for MVP and Settings Page later?)

USDR should set it on a per-tenant basis. SPOC is a state program, ~11 states have it, each state has a different form for it. This feature doesn't need to be user configurable.

@mhuang-usdr merged to staging

I'm unable to log into the staging environment to check

Just reviewed in the staging environment. Looks good to me.

Closing this issue as it is complete 🥳

Noticing that this PR was not merged. Will revisit this.

This button still shows up on the USDR tenant, though downloading it is broken


License of artwork

It's doesn't become clear from the content alone to me so far. I should ask upstream about it.

If the license of the artwork cannot be established, we need to replace it with original (open) artwork.

I searched for it and it is used elsewhere. It may not be openly available. Will ask the original developers.


Nominatim always return "None"

I am trying to use OSM but I always get "None" on the result
from geopy.geocoders import Nominatim

geolocator = Nominatim()

address, (latitude, longitude) = geolocator.geocode('Avenida Paulista, Cerqueira Cesar Sao Paulo')

I got this error:
TypeError: 'NoneType' object is not iterable

Very old post but raising an exception would be very helpful. It was only picked up that the address didn't exist because elsewhere in my code it produced an error that I had been passing None around.


Jupyter tile, merge cert info from old notebook to avoid loss

https://issues.redhat.com/browse/RHOAIENG-6455
Description

Merges in the volumeMounts, and the notebook container's volumes & envs to keep the cert information around instead of overriding it with the k8s patch logic.
How Has This Been Tested?

Manually using the Jupyter tile.
Needs self signed cert stuff setup (cc @harshad16 for details)

Go to the Jupyter tile
Create a notebook - details do not matter (if you have one before this, delete it & the PVC)
Check the yaml on OpenShift Console (look for the ca-bundle references)
Stop Notebook
Create the notebook again
Check the yaml still has the ca-bundle references

Test Impact

None, backend only change.
Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[x] Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

[ ] Included any necessary screenshots or gifs if it was a UI change.
[ ] Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

/cc @harshad16

@harshad16 please give it a test and let me know if this is what you're looking for.

Tested this in our dev cluster.
the solution sticks to the Notebook CR changes as expected.


Ignore from ... import * imports in stub files

Fixes #152. No tests yet, I have no idea what I'm doing there 😅

@AlexWaygood no worries bro, actually, the Refactor._refactor unit tests are very complicated and need refactoring 😅.

@AlexWaygood BTW, I've moved the filetype check to another function avoiding unnecessary scan.expand_import_star calls.

I feel like that I didn't provide enough context of why I've changed the point where we filter stub files, so please feel free to ask for clarification.

@AlexWaygood BTW, I've moved the filetype check to another function avoiding unnecessary scan.expand_import_star calls.
(scan.expand_import_star is considered costy because it includes both pathfinding and static file analysis using scan.ImportablesAnalyzer)

Nice! I tried it out on typeshed again, and can confirm the bug is still fixed :)

@AlexWaygood BTW, I've moved the filetype check to another function avoiding unnecessary scan.expand_import_star calls.
(scan.expand_import_star is considered costy because it includes both pathfinding and static file analysis using scan.ImportablesAnalyzer)

Nice! I tried it out on typeshed again, and can confirm the bug is still fixed :)

Awesome! I'll merge the PR now!

FYI, typeshed is now using pycln as a pre-commit hook in CI :)
I think it's going to be a big quality-of-life improvement for us!

Awesome! Thanks a lot for supporting Pycln.. btw, I'll add typeshed to the notable projects list that uses pycln!
https://github.com/hadialqattan/pycln#used-by


Feature/add accordion

added component accordion, small changes to button where component necessary

@brunottonurb Please clean up the PR commits, I'll approve afterwards


Mesh Info in Settings Screen Changes

The whole section needs to be updated and not display info already displayed in app screens:

Remove rewards account row - it is displayed in the smeshing screen.
Remove net id, status and sync status - these are now displayed in the network screen.
When running with a local p2p node, add row with node version and build string. e.g.

Version: v0.1.17
Build: 5f1237a7ee06884d55712faf04655b064fe49225

Sync status wasn't removed.


Possible memory leaks

Hello,
first thanks for this library. I plan to use it as scripting language inside my STM32 project.
As MCUs are short on memory and generally have problems with alloc/free I'm using memory manager inside statically allocated array. This allows me to see how the memory is used or freed after tcl_eval() and tcl_destroy(). I found one problem which I yet do not understand. When I try to run this tcl:
 = y";
I receive lexer error of course, but I see 2 not freed fragment inside memory:
=
y

I tried to add debug messages to all function that use tcl_malloc() or tcl_realloc, but I did not find any match to pointer address.
I quess there can be some addition to tcl_next(), somewhere after :
  } else if (*s == '"') {
    *q = !*q;
    *from = *to = s + 1;
    if (*q) {

to check for quote being closed. But it would be just to indicate to user what is the problem.
Not I'm not sure where it gets allocated, I have no idea how to free it.
Thanks for any advice.

OK simple enough solution to my problem:
tcl_list_free(list);         tcl_free(cur);
Needs to be added in case of TERROR before exit of tcl_eval().


Alternate member for projectable expression

For compatibility or performance reasons, sometimes the EF Core expression cannot be equal to the CLR expression. Although you can always have two public members (one with [Projectable] and one without it), that forces the user to know which member to use depending of the context. It would be nice to have only one public member, and instruct the library where to find the proper EF Core expression. I propose something like this:
[Projectable(UseMember = nameof(FooEF))] public string Foo => [...];
private string FooEF => [...];

UseMember instructs to find a meber with exact same signature (arguments, return type), except for different name.

I like this proposal, one concern though:
Are we going to instruct the source generator where it can find the member that can be translated into an expression (and if none are specified, use the current body)? Or should we have an override system in place where we can manually define the expression that this library uses?
class User {
     ...
     [Projectable(UseMember = "FullNameExpression")]
     public string FullName => $"{FirstName} {LastName}"; // Assuming string interpolation is not available in EF

     Expression<Func<User, string>> FullNameExpression(User user) => user.FirstName + " " + user.LastName;
}

The expression approach allows the user to take full control in exactly what expression gets used at runtime. The library will take care of swapping out calls to FullName with its expression counterpart.
Looking forward to more input.


cmd/go: flag validation fails when pkg-config --libs reports a path containing spaces

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

$ go version
go version go1.13.1 windows/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Stephen Baynham\AppData\Local\go-build
set GOENV=C:\Users\Stephen Baynham\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Stephen Baynham\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Stephen Baynham\source\repos\go-luajit\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\STEPHE~1\AppData\Local\Temp\go-build884938030=/tmp/go-build -gno-record-gcc-switches

What did you do?

Place the -L directory of a C lib into a directory with a space in it, and access it a pkg-config .pc file.
/*
#cgo pkg-config: luajit
#include "go_luajit.h"
*/
import "C"

func main() {}

Attempt to build:
$ pkg-config --cflags luajit
-IC:/Program\ Files/Git/usr/local/include/luajit-2.0

$ pkg-config --libs luajit
-LC:/Program\ Files/Git/usr/local/lib -lluajit-5.1

$ go build ./...
go build github.com/cannibalvox/luajitter: invalid flag in pkg-config --libs: Files/Git/usr/local/lib

What did you expect to see?
Successful build.
What did you see instead?
go build github.com/cannibalvox/luajitter: invalid flag in pkg-config --libs: Files/Git/usr/local/lib

Context
In 2016, this issue was brought up and was successfully solved, but only for CFlags:  https://github.com/golang/go/issues/16455
Commit: https://go-review.googlesource.com/c/go/+/32735/6/src/cmd/go/build.go
However, on windows where the (git bash) mingw /usr directory is in C:\Program Files, both the include and lib directories have spaces in them.  In issue 16455, it was determined to wait on windows until more information was provided.  However, the linked commit fixes linux as well as windows.  The only problem is that the fix was only applied to CFLAGS and not LDFLAGS.  Having LDFLAGS also use splitPkgConfigOutput instead of strings.Fields would solve this problem entirely.  Are there any considerations that might prevent me from PRing a straight 1:1 replacement?

Are there any considerations that might prevent me from PRing a straight 1:1 replacement?

I'm not aware of any. Send a PR (and, ideally, a regression test) and we can discuss on the code review?


Allow Variables as input

As mentioned in the core repo (https://github.com/bitfocus/companion/issues/1248#issuecomment-706811208) each modules wanting to support variable parsing needs to to this on its own. This does it for the field I find logical and what I need myself.

Thanks @spruce!


[Request]

That can generate the weather linked to custom tables.

Can you explain in more detail what you're hoping for?

Explaining. The weather will be generated from tables created by the user, that is, the results such as: rain, fog, cloudy, will be generated from tables that I create.

The way it works today isn't just a random roll. It moves around essentially a grid of possible weather, which is what allows the changes to make sense. For example, it won't move from unseasonably warm to cold without going through a middle state or two first.

But it sounds like you just want it to randomly pick from a table? I'm curious what the advantage is to using this module then vs just using a roll table. Is it the chat? Or the auto trigger from simple calendar? Just thinking through the different use cases...
Also, would you propose different tables for different biomes? Different seasons?
Appreciate the input.

Yes, I have tables (and their variants, by season, biome) that I roll at the beginning of the day that result in, for example, rain (the time it starts and the duration of this rain)...

https://i.imgur.com/BBjL48k.jpeg
My table for temperate climates, with its subtables and the chat output.

Thanks.  I think I see.  It looks like a very robust system.  I love people wanting to use Simple Weather, of course, but I think I'm missing why you'd want to vs. using the roll tables?  Is it just the connection to Simple Calendar?

Yes, he would call the tables rolling at the turn of the day.

Got it.  I'm new to Foundry and I don't know enough about roll tables to think through the implications of how I'd make this work or what the options would be.  But I will take a look and try to learn more.  I may have some more questions once I do that.

The way I'm thinking about handling this is with some sort of add-on modules that could replace the logic of what weather to pick.  This way specific tables like yours or for a particular system could be built and you'd still be able to use this module as the trigger and to handle the FX generation.  As a result, I'm closing this issue as now being a duplicate of #27


Possible bug when adding an entity mid update

com.badlogic.ashley.core.Engine#addEntity skips check for update, so ConcurrentModificationException couble be thrown.

Heey thanks for the ticket. However, I think adding entities mid update is fine, they are added to the end of the entities array and that's it. It doesn't affect iteration like entity removal.

Ahh forgot that ashley uses gdx custom collections :)
Anyway I feel that entity additions should be deffered, while engine performs updates.
// long time ago in a far far system one jedi loops through all entities
for (Entity entity : entities) {
     engine.addEntity(new Entity); // Oops
     engine.removeEntity(entity);
}

I guess we could defer it for consistency reasons.

Yeah, sure.


Keep a loaded BrowserWindow in memory

It takes roughly 400-600ms for the BrowserWindow to load the url before running the test.
With this change, we keep a loaded window in memory for the next test, saving us the setup time.
In our case we have ~250 test suites, this saves us 2 minutes in CI.
The preloaded BrowserWindow is destroyed on cleanup.

This would be a huge help!


Details of all the API connection permission needed for the Deployment of the script

Documentation inaccuracy
There is no detailed description what all the API NAME  and API permission needed for the deployment of the script,
I was trying to deploy in my tenant but manger is asking what all the API needed for the deployment so that we can get permission form the higher management
It would be great if You can answer my query ASAP
Thanks
Additional Info
NA

Api or Azure Permission ?
Prerequisites
To begin, you will need:
Power Apps Studio
Power Automate
Azure Subscription with Global Administrator access level
Service account with Power Apps, Power Automate, Teams, SharePoint and Exchange Licenses (must have an Exchange mailbox). This Service Account is used by Logic Apps to connect to SharePoint, send e-mails and post a welcome message to Teams. The account requires User permissions only and does NOT need to be a Global Administrator.
SharePoint
Office 365 Groups connector
A copy of the Request-a-team app zip package


Fixes --enable-bitcoin flag support with bash

fixes:
./scripts/start.sh: 1: [[: not found

in
$ yarn dfx:start --enable-bitcoin
yarn run v1.22.19
$ sh ./scripts/start.sh --enable-bitcoin
./scripts/start.sh: 1: [[: not found
Running dfx start for version 0.15.0
Using the default definition for the 'local' shared network because ~/.config/dfx/networks.json does not exist.
Initialized replica.
Dashboard: http://localhost:37947/_/dashboard

and detects --enable-bitcoin flag.

Thanks.


Protobuf type support

TL;DR
This adds a transformer to handle general Protobuf message types.
Type

[x] Bug Fix
[ ] Feature
[ ] Plugin

Are all requirements met?

[ ] Code completed
[ ] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Complete description
This feature was missing from the new API.  In the old API, you used to be able to specify a generic custom Protobuf as an interface type. This adds a new transformer to do that.

There's actually two protobuf types in the old style. https://github.com/flyteorg/flytekit/blob/master/flytekit/common/types/proto.py#L47 and https://github.com/flyteorg/flytekit/blob/master/flytekit/common/types/proto.py#L184.  The first stores a PB object as a Binary the second stores it as a Generic.  In this PR, we've opted for the latter because it plays nicer with the UI.
In order to support flexibility of future user-supplied TypeTransformers, tweaked the logic that fetches a transformer in the core TypeEngine to check for isinstance and issubclass.
Couple unrelated unit tests.

Tracking Issue
https://flyte-org.slack.com/archives/CREL4QVAQ/p1614099425013900

will wait for some l5 testing first.


City Production Panel Crashed

I had Rio build the Eiffel Tower, then queued construction of a neighborhood. Production panel won't come up for Rio anymore.
Production Panel Doesnt Load.zip

I reloaded to an autosave and recreated the problem. Step 1) Build Eiffel Tower (replaces farm immediately left of City Center). Step 2) Build Neighborhood on plains next to Oxford University. The neighborhood doesn't queue, and the production panel will not open anymore on Rio, but it does open on my other cities. If I use the arrows to navigate between cities from the bottom panel, when I get to Rio, it just displays  the info for whatever city I'm clicking away from prior to cycling through to Rio.
before ETower.zip I'm attaching the save file from immediately before the crash happens.

Same problem .Can't do anything when trying to make a 'DEAL'
with another player(nothing to choose).either

I don't think that's a related issue @Papaguss.
On Thu, Mar 30, 2017 at 10:15 AM, papaguss<EMAIL_ADDRESS>wrote:

Same problem .Can't do anything when trying to make a 'DEAL'
with another player(nothing to choose).either
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CQUI-Org/cqui/issues/446#issuecomment-290423951, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AZjT60Z91-gOqOkA5XB6gIdmyUVHV8mMks5rq7j8gaJpZM4MuRSL
.

I can confirm that topic, here too.
Work-around: in "crashed city production panel" you have to click on another city without leaving it and then you can come back to the original city...

Not it is not a related issue..BUT you should check on this also.

I have experienced this same bug, though I can't remember what I was building. I don't think it was the Effeil Tower.
I had a number (>6) cities that had queues that crashed. I attempted the workaround suggested by @JHCD with mixed success. After returning to the original city, the build queue is reduced to units only.

I've opened the save and reproduced the issue. Here's a captured stack trace:
Runtime Error: bad argument #2 to 'lLookup' (Argument must be [boolean, number, or string].)
stack traceback:
[C]: in function 'lLookup'
C:\Users\chaor\Documents\My Games\Sid Meier's Civilization VI\Mods\cqui\Assets\UI\Panels\ProductionPanel.lua:1114: in function 'PopulateList'
C:\Users\chaor\Documents\My Games\Sid Meier's Civilization VI\Mods\cqui\Assets\UI\Panels\ProductionPanel.lua:482: in function 'View'
C:\Users\chaor\Documents\My Games\Sid Meier's Civilization VI\Mods\cqui\Assets\UI\Panels\ProductionPanel.lua:2375: in function 'Refresh'
[C]: in function 'func'
[C]: in function '(anonymous)'

I've determined the root cause and am working on a fix now

Thanks for the quick fix. Can confirm that items are queuing properly again.
On Thu, Mar 30, 2017 at 10:37 PM, Chris<EMAIL_ADDRESS>wrote:

Closed #446 https://github.com/CQUI-Org/cqui/issues/446 via ffaa685
https://github.com/CQUI-Org/cqui/commit/ffaa685f49c67cc265e1bd60d812b6797efa3685
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CQUI-Org/cqui/issues/446#event-1023401465, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AZjT659tyStxHWAYUNuug4fVvv-P3vt5ks5rrGbwgaJpZM4MuRSL
.


GEOMESA-1889 Refactoring BIN code, maintaining order of BIN labels

Signed-off-by: Emilio Lahr-Vivaz<EMAIL_ADDRESS>

if we can merge #1649 before this PR, I'll make some simple feature optimizations here


Unify the operator API with numpy/tensorflow

https://github.com/caffe2/caffe2/blob/134d992daf908b23c2ce2244071406e588499cd6/caffe2/python/operator_test/reshape_ops_test.py#L62
old_shape = (4, 2, 1)
new_shape = (1, 8)
X = np.random.rand(*old_shape).astype(np.float32)

It takes 3 lines in Caffe2 to reshape a tensor.
net = core.Net('net')
net.GivenTensorFill([], 'X', shape=old_shape, values=X.flatten())
# if the users really need old_shape, they should call X.shape() or caffe2.shape(X) directly.
X_reshaped, out_old_shape = net.Reshape(['X'], ['X_out', 'old_shape'], shape=new_shape)

The numpy and tensorflow API is much simpler.
X_reshaped = np.reshape(X, new_shape)
X_reshaped = tf.reshape(X, new_shape)

@futurely,  is the ask here to provide a reshape API like TF to simplify the boiler plate code ?
this is equivalent of creating a helper python function that wraps that 3 lines in Caffe2, correct?

Yes, it is. The recently introduced brew module is where such helper functions can be implemented.

@futurely , the reshape is done through a single call today .
net.Reshape(['X'], ['X_out', 'old_shape'], shape=new_shape)
so adding a brew wrapper add little value here, it would look like
brew.reshape("X", "X_out",  new_shape)
do you think there is a value in that?

Not much.


Activity tab in Teams App not mentioned in App studio documentation

In App Studio , set up bot section has a checkbox for one-way notification only bot. I was not able to find clear documentation around it, since after selecting the option the app was only showing activity tab and took sometime to figure out the issue. Please check on this.

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

ID: 4f4a41f1-2993-7869-a1ab-b83cb6225d7e
Version Independent ID: c000998f-9192-50fb-6a0b-ace157054292
Content: Get started with App Studio for Microsoft Teams - Teams
Content Source: msteams-platform/concepts/build-and-test/app-studio-overview.md
Product: msteams
GitHub Login: @laujan
Microsoft Alias: lajanuar

@priyank29 - Teams contain only two type of tabs teams tab and personal tab. What activity tab refer to? Could you please explain the issue in more detail?

@Nikitha-MSFT -  When you install a bot , you see sections such as Chat, Files and (+) sign to add tabs.
Now, when you install a bot which is created using App studio with "one way notifcation" option checked, only Acitivity and About section appears. There is no clear documentation around this.

@priyank29  - When you enable "one way notification" you cannot see the files folder.  This is by design.


add actions to create and edit section fields

https://issues.redhat.com/browse/RHOAIENG-10317
Description

cc @simrandhaliw
Adds the ability to create, edit and delete field sections.
Tests will be added. This PR provides some plumbing for integrating the add field modal as well.
Creation modal:

Editing modal:

Popovers:

Empty field state:

Section row with actions:

Buttons beneath fields table:

How Has This Been Tested?

TODO
Test Impact

TODO
Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[ ] The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

[x] Included any necessary screenshots or gifs if it was a UI change.
[x] Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

/retest


Modify the state directly

I would like to build a chatbot with a long context. However, if the context gets too long, to prevent going over the model's context limits, I want to be able to delete old messages. I would also like the ability to modify the current context (maybe change an old message, or delete messages and replace them with a summary).
Suggestion: Be able to access the previous interactions as a list. Each time I do a lm += x, I would like the x to be appended to a state list.  The list elements could also include metadata, such as tagging.
i.e. Starting with this interaction:
llama2 = models.LlamaCpp("./models/mistral-7b-instruct-v0.1.Q8_0.gguf")
llama2 = llama2 + f"SYSTEM: I am a mean AI assistant who ruins jokes" + gen(stop=".")
with user():
    llama2 += 'Do you want a joke or a poem?'
with assistant():
    llama2 += f"A {select(['joke', 'poem'])}."`
with user():
    llama2 += 'Ok, a joke. Why did the chicken cross the road?'
with assistant():
    llama2 += gen(stop=".")

At this point, the state list would be:
["SYSTEM: I am a mean AI assistant who ruins jokes", "user: Do you want a joke or a poem?". "assistant: joke", "user:  Ok, a joke. Why did the chicken cross the road?", "assistant: Everyone knows that old joke,  to get to the other side."]
We should be able to modify the context, i.e. to update the system prompt, we could do:
llama2[0] = "SYSTEM:  I am a friendly AI assistant"
and modify the context so far, and get a new answer based on the updated contest:
llama2.pop(-1)
llama2[-1] = llama2[-1] + " Don't guess the joke though!"
with assistant():
    llama2 += gen(stop=".")

This would give the list state the value of:
["SYSTEM: I and a friendly AI assistant", "user: Do you want a joke or a poem?". "assistant: joke", "user:  Ok, a joke. Why did the chicken cross the road? Don't guess the joke though!", "assistant: No idea, why did the chicken cross the road?"]
Is this possible already?

Interesting idea.
There is nothing stopping you from doing this manually right now. You could just keep a list yourself and mark off the positions of the content at each point and then reconstruct the prompt yourself again whenever you want to change things. However, that would be a lot of bookkeeping etc.
Perhaps the best way to support this kind of "history rewriting" would be to allow named captures to be replaced in the history.
with user():
    lm += 'Ok, a joke. Why did the chicken cross the road?'
with assistant():
    lm += gen(stop=".")

lm = lm.set("system_prompt", "new value", rewrite_history=True)

with user():
    lm += 'New with the new system prompt?'
with assistant():
    lm += gen(stop=".")

One core constraint to keep in mind is that Guidance uses an iteratively constructed KV-cache, so if we change something that far back in the model then we will have to recompute a bunch of the kv-cache. (this is not specific to guidance, just the way these models work)

in the current version this results in a
TypeError: Model.set() got an unexpected keyword argument 'rewrite_history'
I cannot rewrite the history using that.
My current workaround, which I use to export a JSON object I generated in a function to the state is:
    ob = {
        "id": 1,
        "text": lm += gen("a joke")
     }

    lm += gen(name="joke"+str(id), max_tokens=0)
    lm = lm.set("joke"+str(id), json.dumps(ob))

I can then access it from the returned lm object. I could find no other way to return an object generated within an @guidance construct.


keras.wrappers.scikit_learn.KerasClassifier memory

I am applying gridsearch using keras.wrappers.scikit_learn.KerasClassifier on a CNN. My operating system is Ubuntu 16.04, I use Tensorflow with Python Jupyter Notebook and I use  GPU. In general this is doing well on small grids, but when I increase the grid I run into an error:
Delete the underlying status object from memory otherwise it stays alive as there is a reference to status from the traceback due to ResourceExhaustedError: OOM when allocating tensor.....
I found this topic https://stackoverflow.com/questions/42047497/keras-out-of-memory-when-doing-hyper-parameter-grid-search where the suggestion is done to clears.session() between the different models. But this is not possible using GridsearchCV. It is said Keras should take care of clear.session().  'If you are facing problem please submit an issue at Keras github Indraforyou'.
Is clear.session() indeed implemented in keras.wrappers.scikit_learn.KerasClassifier and what options do  I have to get this working?

Can you post a script to reproduce?

Ok, the complete script is quite long so I provide you with the model and setting up the GridsearchCV:
def gridmodel(learn_rate=0.01, momentum=0):
model = Sequential()
model.add(Conv2D(32, (3, 3), padding='same', input_shape=input_shape, use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(Conv2D(32, (3, 3), use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Conv2D(64, (3, 3), padding='same', use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(Conv2D(64, (3, 3), use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))

model.add(Conv2D(64, (3, 3), padding='same', use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(Conv2D(64, (3, 3), use_bias=False))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))

model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))

#model = multi_gpu_model(model, gpus=2)
optimizer = SGD(lr=learn_rate, momentum=momentum)
model.compile(loss='binary_crossentropy', optimizer=optimizer ,metrics=['accuracy'])

return model

learn_rate = [0.00001, 0.0001, 0.001, 0.01, 0.1]
momentum = [0.0, 0.2, 0.4, 0.6, 0.8, 0.9]
param_grid = dict(learn_rate=learn_rate, momentum=momentum)
model = KerasClassifier(build_fn=gridmodel, epochs=10, batch_size=30, verbose=0)
grid = GridSearchCV(cv=2,estimator=model, param_grid=param_grid, n_jobs=1)
grid_result = grid.fit(x,y)
I tested this both using one and two GPU's (see multi_gpu_model that has been commented out in the model), but both fail now. When I do this on on a smaller (onedimensional) grid the it succeeds most of the time. But of course I want to use a larger grid to get a better understanding of the parameters.

Can you try to add K.clear_session() before model=Sequential() ?
On Wed, 21 Nov 2018, 08:29 Steven Veenma<EMAIL_ADDRESS>wrote:

Don't know if this adds something but I send you the output of nvidia-smi
when its training:
Wed Nov 21 08:27:12 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130 Driver Version: 384.130 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN X (Pascal) Off | 00000000:03:00.0 Off | N/A |
| 50% 83C P2 153W / 250W | 11742MiB / 12189MiB | 73% Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN X (Pascal) Off | 00000000:04:00.0 On | N/A |
| 23% 30C P8 11W / 250W | 11628MiB / 12181MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 4409 C /home/philips/anaconda3/bin/python 11731MiB |
| 1 1260 G /usr/lib/xorg/Xorg 184MiB |
| 1 2996 G compiz 69MiB |
| 1 4409 C /home/philips/anaconda3/bin/python 11371MiB |
+-----------------------------------------------------------------------------+
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/keras-team/keras/issues/11693#issuecomment-440564324,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMS2K2XGNrr-10HZ4Qllrjh7HHCIV4YJks5uxQD0gaJpZM4YrJFg
.

I just met the same issue. Anybody has any idea?


can't run flutter commands due to permissions issues in the path of .pub-cache folder

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
was having issues installing flutter in home dir ~ so i tried it again with sudo
eventually found out i don't have permissions to read or write files in home dir ~ (this is because i am using an organization laptop and i don't have administrator privileges)
i delete current flutter installation and reinstall in a dir i have permissions (~/Documents)
I install flutter by extracting the zip folder for mac with the apple silicion chip, add flutter to path and run flutter doctor
Actual results
i can't run any flutter commands due to not have read and write permissions for my ~ dir. would like to specify the location flutter puts its .pub-cache folder and any related folders
i could request permissions temporarily and delete the .dartServer, .pub-cache, .dart-tool and any other flutter/dart related folders and files from home dir ~
and attempt a reinstallation of flutter. but before i do so, i wanted to confirm that flutter won't attempt to add those files back in home dir
is there a way to specify the dir of flutter pub cache folders? i would ideally like to have the paths to all those folders in ~/Documents
a similar request to this issue: https://github.com/flutter/flutter/issues/105257
Logs

Logs

dart fix
Building flutter tool...
Resolving dependencies... (3.7s)
Creation failed, path = '/Users/jefang/.pub-cache/hosted-hashes' (OS Error: Permission denied, errno = 13)
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

Logs

flutter pub get
Resolving dependencies...
Creation failed, path = '/Users/jefang/.pub-cache/hosted-hashes' (OS Error: Permission denied, errno = 13)
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries lef

Flutter Doctor output

Doctor output

Found an existing Pub cache at /Users/jefang/.pub-cache.
It can be repaired by running `dart pub cache repair`.
It can be reset by running `dart pub cache clean`.
Found an existing Dart Analysis Server cache at /Users/jefang/.dartServer.
It can be reset by deleting /Users/jefang/.dartServer.

@Jephtha I think you really need to follow up with your network administrator. FWIW, ~ is a bash expansion, and I suspect the various dart tools are actually defaulting to the path pointed at by the $HOME env variable, so you may try overriding that to a path you control. However, I am not really qualified to give you IT advice :)


Delete after played

Discussed in https://github.com/rfsbraz/deleterr/discussions/45

Originally posted by X-static November 20, 2023
Hi, if I wish to delete an episode of a movie a few days after being played, there's no option for that, isn't it?
Will last_watched_threshold: 0 delete anything?
Thank you.
Add support for deleting media X days after being played

v0.1.0-beta (deleterr:v0.1.0-beta) up with watch_status support, give it a go!
Sample config that deletes movies immediatelly after being watched:
 - name: "Movies"
    action_mode: "delete"
    last_watched_threshold: 0
    watch_status: watched
    radarr: Radarr

Use in combination with last_watched_threshold to delete X days after watching


Update the examples to use HttpClient.of() and HttpClientBuilder

Seems like it's done already. Thanks, @minwoox !


CASMINST-5843: Change to configMaps for ca-certificates

Summary and Scope
Summarize what has changed. Explain why this PR is necessary. What is impacted? Is this a new feature, critical bug fix, etc?
Security requests that hostPath mounting of certs to be removed and use configMaps instead as hostPath mounting is considered an anti-pattern.
Issues and Related PRs
List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

Resolves CASMINST-5843

Testing
List the environments in which these changes were tested.
Tested on:

frigg

Test description:

Run IUF integration test with template changes.

Pull Request Checklist

[x] Version number(s) incremented, if applicable
[x] Copyrights updated
[x] License file intact
[x] Target branch correct
[x] CHANGELOG.md updated
[x] Testing is appropriate and complete, if applicable
[x] HPC Product Announcement prepared, if applicable

sat-general template invoked with new certs seen here - https://argo.cmn.frigg.dev.cray.com/workflows/argo/jesse-test-5-deliver-3l185-managed-nodes-rollout-kfspx?tab=workflow&nodeId=jesse-test-5-deliver-3l185-managed-nodes-rollout-kfspx&nodePanelView=summary&sidePanel=yaml:jesse-test-5-deliver-3l185-managed-nodes-rollout-kfspx
Under stored-templates -> sat-general you can see the template code changes there as well as a run of sat-status which will perform an api call verifying certs are valid.


create new migrations 0023_auto_20181103_1326.py

Hi @ababic
I hope that work fine !

Hi @alfuhigi. Have closed this, as the related changes have to be made together in the same PR. Please see #286.


请问下版本java1.8 能部署吗 看官方文档上写的java 18

OpenSPG V0.5 rely on neo4j, whose client should be compiled with java 18 or higher.


[MM-22948] - Improve unread badge UI on the hamburger menu and team icons

Summary
This PR fixes the UI changes provided by the ticket linked below.
Ticket Link
Fixes https://github.com/mattermost/mattermost-server/issues/14140
Checklist

[ ] Added or updated unit tests (required for all new features)
[x] Has UI changes
[ ] Includes text changes and localization file updates

Device Information
This PR was tested on:
Iphone 11 -- 13.3.
Google Pixel 3 XL -- 10
Screenshots

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9028
https://circleci.com/gh/mattermost/mattermost-mobile/9027

Artifact links:
https://9028-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa
https://9027-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk

@matthewbirtch Absolutely! I will make those changes ASAP & push a new PR.

@matthewbirtch I am able to fix the padding issue by setting a maxWidth for the badge. However it is a bit snug when we show anything over 99+ How should I handle this case?

also,  @matthewbirtch  I have looked into the code for the smaller badge & I've found the small circle view itself has a backgroundColor of #fffff while the badge container itself has a borderColor of #1153ab I've attached images below for further reference. Please advise if these are the correct colors that should be used.

@AdrianBrown1 colors must be theme specific, but definitely @matthewbirtch can be of more help than me on that.

@matthewbirtch I am able to fix the padding issue by setting a maxWidth for the badge. However, it is a bit snug when we show anything over 99+ How should I handle this case?

Does the badge not auto-grow to handle the extra '+' character? Or is it a fixed size? Could you share a screenshot?

also, @matthewbirtch I have looked into the code for the smaller badge & I've found the small circle view itself has a backgroundColor of #fffff while the badge container itself has a borderColor of #1153ab I've attached images below for further reference. Please advise if these are the correct colors that should be used.

For this, @enahum is right, we need to use the theme colors. Some guidance on this:

the fill color of the circle badge should be using the theme color mention-badge-bg
The outline color depends on the background it sits on, for example:

On the team sidebar, it should use sidebar-bg
When used in the app header, it should use the sidebar-header-bg
When used in the main change sidebar, it should use sidebar-bg

Thanks for getting back to me @matthewbirtch I believe I have fixed the issues with the theme coloring with my latest push. For the padding issue, what's being changed is the badge's width not the padding. Attached below are images of the badge with 99+, 28 & 1. As you can see below the padding is consistently set to 3 all around. The width however is changing based on the content of the badge. I can set a width for each of these 3 scenarios or a maxWidth to stop this growth.

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9086
https://circleci.com/gh/mattermost/mattermost-mobile/9085

Artifact links:
https://9086-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk
https://9085-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9186
https://circleci.com/gh/mattermost/mattermost-mobile/9185

Artifact links:
https://9186-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa
https://9185-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk

Hey @AdrianBrown1 I'm still seeing the 99+ getting cut off in this case her:

Everything else seems to be resolved

Hey @AdrianBrown1 I'm still seeing the 99+ getting cut off in this case her:

Everything else seems to be resolved

on this last issue 👍  thanks for the feedback

2. It seems like there might be something wrong with the mention badge numbering that shows on the Team sidebar. Once I hit 99+ I can't seem to clear the 99+ and I seem to be sometimes seeing the 99+ showing on the hamburger menu like this. I can't perfectly provide the steps to reproduce unfortunately, but it seems to be happening after I mark enough unread messages and hit over 99, then try to clear out the number, but can't

I can't seem to reproduce this issue anymore. Not sure what was causing it

It seems like there might be something wrong with the mention badge numbering that shows on the Team sidebar. Once I hit 99+ I can't seem to clear the 99+ and I seem to be sometimes seeing the 99+ showing on the hamburger menu like this. I can't perfectly provide the steps to reproduce unfortunately, but it seems to be happening after I mark enough unread messages and hit over 99, then try to clear out the number, but can't

This seems to be a separate issue that is seen in the current app and has to do with how mentions are being calculated, this has been an outstanding very difficult to track bug for mobile and web for a very long period of time, that is why you can't reproduce consistently.

@matthewbirtch You should be able to give this one more quick run through to be sure everything is behaving as intended. @enahum I made the changes you suggested as well.

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9273
https://circleci.com/gh/mattermost/mattermost-mobile/9271

Artifact links:
https://9273-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa
https://9271-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk

It seems like the issue of 99+ getting clipped is resolved. However, it looks like a few minor tweaks to get this perfect. All-in-all, the badge should be centered on the top-right corner of the hamburger icon. Sorry to be so picky!
So, can we:

Move the badge down 1px in all cases
Move the badge left by 3px in the single digit case
Move the badge right by 1 px in the 99+ case

See the horizontal alignment here (red line indicates where center should be)

See the vertical alignment here (red line indicates where center should be)

@matthewbirtch I've made the changes you suggested in the last build. Please let me know if anything else needs to be tweaked & I'll get right on it 💪

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9294
https://circleci.com/gh/mattermost/mattermost-mobile/9292

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/9304
https://circleci.com/gh/mattermost/mattermost-mobile/9303

Artifact links:
https://9304-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.ipa
https://9303-70265724-gh.circle-artifacts.com/0/~/mattermost-mobile/Mattermost_Beta.apk

@matthewbirtch @migbot thanks, guys! loved being able to contribute even in the slightest bit!

@matthewbirtch this is for 1.36 right ?

@matthewbirtch this is for 1.36 right ?

I think so. Still needs QA approval by the looks of it?


Allow passing platform context from adapters

This is a draft PR that implements some of the ides in #2426 and #3426. I have only currently implemented passing in a new platform object from adapter/cloudflare-pages as an example, as it is what I am familiar with. Maintainers more familiar with the other adapters and environments should probably handle them.
The main change in this PR allows this in adapters:
return await app.render({ request: req, platform: { env } });

The developer can now access env from the new platform object, which is passed to hooks and endpoints.
Doing this PR has raised an important question though.
How should a pattern like this be handled in local development?
Perhaps each adapter could provide a default platform that can act as a sort of 'polyfill'. Something like KV and Durable Objects from Cloudflare, or user context from Netlify shouldn't be that hard to shim.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[X] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[X] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[X] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[X] Waiting on #3427 to allow changeset generation
[X] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Closes #2426

Thank you! I'd personally lean towards creating a new property on RequestEnv (perhaps meta) and allowing that to be completely controlled by the adapter, rather than muddling locals. What do you think?
response = await app.render({ request, meta: env });

The local development question is a good one, and it's actually an even deeper can of worms — should the adapter try to simulate the environment completely, by e.g. adding web APIs supported by Cloudflare Workers and Deno? should it remove Node built-ins? (It's useful to be able to use fs during prerendering, in endpoints that will never run in a worker — does that affect the decision?) It's possible that the way to solve this is to somehow integrate with platforms' own development tools, though it's far from clear what that looks like.
All of which is to say that it's probably fine to kick that can down the road for now and address it in a follow-up PR!

Thanks for the feedback, will update the PR and docs with this approach. I thought about this too but I was afraid adding yet another object passed into the handle hook event could become overbearing, but it also makes a lot of sense to keep them seperate, allowing the developer to make the choice of what to do with it.
Another question to raise is whether this should be passed all the way down to endpoints. Separation of concerns, and not forcing the dev to implement handle get up and running with an adapter to get all its features.
Again, probably a better question for a follow up PR :)

RE the environment point about fs and such, I think the Cloudflare adapter kind of handles this. I am not exactly sure how the other adapters work (yet), but the es build that happens as part of cloudflares build system forces a 'browser' like environment. It might be ok to allow node specific things to be used in dev, if they are going to fail the build anyway before a deploy.

Another question to raise is whether this should be passed all the way down to endpoints

definitely, i think — it's easiest to understand if RequestEvent is used consistently throughout the app. not to mention simpler to implement!

@Rich-Harris @benmccann PR is now ready for review. I am not sure where to put more documentation for the new object, so some guidance there would be appreciated :)
Testing with a local repo, I am thinking meta should be made Readonly? Probably want to encourage that only locals is the object that should be changed.

I'm not in love with the name meta. Two alternatives would be to rename it to platform or to stick the items directly onto the request object. We should check with the other maintainers on the desired API
The other suggestion I would have is to stick the platform request on the "meta" object or whatever we end up calling it. This has been requested several times in adapter-node especially where some middlewares will stick stuff on the request and today there's no way to access it

I'm not in love with the name meta. Two alternatives would be to rename it to platform or to stick the items directly onto the request object. We should check with the other maintainers on the desired API

I think you are right, meta doesn't quite describe what it is.

The other suggestion I would have is to stick the platform request on the "meta" object or whatever we end up calling it. This has been requested several times in adapter-node especially where some middlewares will stick stuff on the request and today there's no way to access it

👍  will give this a shot, but I don't know if it should be a hard or fast rule. It makes sense for adapter node, but each adapter should probably handle this differently

@benmccann

The other suggestion I would have is to stick the platform request on the "meta" object or whatever we end up calling it. This has been requested several times in adapter-node especially where some middlewares will stick stuff on the request and today there's no way to access it

I think this part is now done as of https://github.com/sveltejs/kit/pull/3384
This PR is still needed for the things that aren't riding on the request, like Cloudflare KV.

I think this part is now done as of #3384

They're different types. 3384 uses a web/fetch Request, but if the user wants the NodeJS / Express Request that it was created from then we would still need to provide it here

@Rich-Harris @benmccann This PR is ready for review 👍

I have now updated the readme, but we should probably just get this in now if everything looks good. If other adaptors need to be updated, they should be in their own PRs.

After discussion, we decided it makes more sense to have app.render(request, { platform }) since request is the required argument and the options are optional. This also means that it's a non-breaking change. I've updated the PR accordingly.
Though now that I review it more closely, I find myself asking what problem this actually solves. In the Cloudflare Workers case, env is a global, so as far as I can tell there's nothing to be gained from passing it around like this. The example added to the adapter-node README demonstrates reading a cookie, which is trivial to do already.
Do we actually need this?

Ah, I see there's a difference between old and new-style workers, and it isn't a global if you're using the new kind (which we are)

Yeah that’s right. For reference for others seeing this later.
Env is only global in the current common js cloudflare workers. I the newer ES Module workers, and cloudflare pages, it is only passed through as env in the fetch function call.
See
https://blog.cloudflare.com/workers-javascript-modules/
https://developers.cloudflare.com/pages/platform/functions#advanced-mode
From the durable object docs

In modules-syntax workers, bindings are delivered as a property of the environment object passed as the second parameter when an event handler or class constructor is invoked. This is new compared to pre-module workers, in which bindings show up as global variables.

Perhaps the node README could have an example with something like passport? I haven’t used a node server for a few years so I don’t know what the cool kids are using these days.
We could also delay updates to other adaptors for a future PR as well.

My inclination is probably just to leave adapter-node unchanged until a use case presents itself. Otherwise we might find we're adding the wrong surface area. Updated the PR

@Rich-Harris Ben had said on Discord

The Node adapter is passing the request which is something we really needed because some middlewares stick stuff on the request and we have no way to access those at the moment

some middlewares stick stuff on the request and we have no way to access those at the moment

Would be curious to know what these middlewares are doing and whether there's any intrinsic reason it can't be done inside Kit instead. Presumably the middleware in question doesn't have access to anything that isn't represented on the Request object, it's just shoving stuff on req in the higgledy-piggledy way traditional of Express middlewares. If there's a valid use case then we could definitely do it in a follow-up PR, but the more we can encourage people to do things in an idiomatic way that can be used beyond just Node apps, the better


Update circe to 0.2.0 (not ready to merge)

Will update after circe 0.2.0 is released, which will be shortly after Shapeless 2.3.0 is out. For now I'm just confirming that these updates don't require any changes to source.

Current coverage is 94.79%

Merging #394 into master will increase coverage by +0.73% as of f8a6c17

Powered by Codecov. Updated on successful CI builds.

@travisbrown, Any chances Circe 0.2.0 will be released in a couple of weeks so we can include this PR in 0.8.5?

@vkostyukov The only thing I'm waiting for is Shapeless 2.3.0, and it seems likely that it'll be available in less than a couple of weeks, so unless you see a problem with moving from Shapeless 2.2.5 to 2.3.0 in a patch update, merging this before 0.8.5 should be possible.

@travisbrown mind rebeasing this? I can't wait to merge this in!

@vkostyukov Done! I haven't run the tests yet locally, though.

Okay, this is ready to go as far as I'm concerned. :smile:

Great! Thanks a lot @travisbrown!