Managing failed operations

For specific operations, errors are an expected use case, but specific errors cannot be detected by the user of the NAL trait.
Consider the following case where a user is attempting to connect a TCP socket. Possible errors in the operation are:

Communication failure with an external TCP/IP stack (e.g. NACK over I2C, invalid data over SPI, etc)
TCP received a RST during the sync process
ARP failed to resolve the requested address
TCP failed to receive a SYN-ACK in a specified timeout

In these cases, the first error is likely fatal and a user of a TcpStack would want to propagate this error to the user application. However, the following 3 errors (network-based) are an error that should not be propagated to the user application. Instead, it's likely that the requested device is not present on the network and the user of the TcpStack will want to re-attempt to connect() some time in the future.
I believe the solution here is to provide a non-exhaustive Error enum in the embedded-nal and allow device drivers to report those instead. This allows a user of the TcpStack to use known error types for detecting specific types of errors (e.g. recoverable vs fatal conditions).

Right now, the current solution to this would be to just return a TcpSocket as a result of connect() that is not in the connected state (e.g. calling is_connected() would return false). This seems counter-intuitive at best.

Worth noting is the conversation happening in https://github.com/rust-embedded/embedded-hal/issues/229, as we will likely want to follow a very similar pattern here.

In general I like this idea, because generic drivers currently don't know anything about what went wrong, other than that it's an Err.
I would like a trait bound on Error more than an enum. There you could define a method like is_internal_error() (I know I'm bad with naming things) for your first case, without locking implementers into a specific type they cannot extend.


docs: add smash.gg to users

Added smash.gg with logo to the list of users for Docusaurus

@yangshun just did!

Thank you very much!


pyftinspect "import gtk" means it won't run on macOS

Traceback (most recent call last):
  File "/usr/local/bin/pyftinspect", line 7, in <module>
    from fontTools.inspect import main
  File "/Library/Python/2.7/site-packages/fontTools/inspect.py", line 19, in <module>
    import gtk
ImportError: No module named gtk

how do I get gtk module on macOS?

try brew install pygtk

I did, didn't help

you sure you're using the homebrew python (usually /usr/local/bin/python and /usr/local/bin/python3) and not a different python binary from somewhere else (the built-in system /usr/bin/python)?
python packages installed via homebrew can only be imported from the homebrew python.

you're right, even though i have homebrew python install which python states i'm using system python. thanks!

I give up, in a world of pain here

@gingerbeardman try using python2 [module path] if you are executing the script directly or remove fontTools from Py2 (pip uninstall fontTools) and reinstall on Homebrew Python3 (installed with brew install python3) with pip3 install fontTools.
I've recently had this issue too with Homebrew installed Python versions.  I think that macOS updates are removing the links to the Homebrew Python installs and my attempts to re-link python to  Homebrew Py2 do not work.  This leads to a situation where python != python2.  Unfortunately, pip is still associated with the Homebrew Py2 on my system so execution of anything with python [script] fails to pick up pip installed packages.  python defaults to system (currently 2.7.10 for me), python2 to homebrew Py2 (2.7.14), and python3 to homebrew Py3 (3.6.3) on my system.
Alternatively, run from within a virtualenv with whatever Py version you want and all of the proper dependencies installed.  Maybe that takes care of the problem?

so i am now running the correct python /usr/local/bin/python but still no joy
ffffffffffffffffffffffffffff

Here is what I get when I try to import gtk (Homebrew pygtk v2.24.0_1) in Py2.7.14:
Python 2.7.14 (default, Sep 25 2017, 09:53:22)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
/usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type 'PangoRenderer'
  from gtk import _gtk
/usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_once_init_leave: assertion 'result != 0' failed
  from gtk import _gtk
/usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_register_static: assertion 'parent_type > 0' failed
  from gtk import _gtk
/usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
[1]    86775 segmentation fault  python2

@anthrotype may be worth a deeper dive.  I have never used pyftinspect so can't say how long this has been the case, but it appears that gtk is having issues on OS X platform in current release version.

A bit drastic but I nuked homebrew and started again from scratch
(install homebrew)
brew install python
(check/fix python)
brew install pygtk
pip install fonttools
...now it's working
and relax :)
thanks for sticking with me

Until the next macOS update ;)

pyftinspect isn't that useful really, it does not tel you much that you can't find reading ttx output.

Also, it's effectively the same as FTXViewer from the Apple Font Tool Suite
I wish I had known this before hand X)

@gingerbeardman here is the fix for the Homebrew Python / system Python issue:
https://github.com/googlefonts/tools/issues/40#issuecomment-347694194
It may not matter here anymore but it will fix other Python issues that are bound to come up on OS X with this problem.

Thanks, I eventually spotted that but had got in such a mess it was easier to nuke homebrew (and thus newer python) and start again. Just checked my .bash_profile and i did use that caveat method. annoying that it doesn't pause for user input when it displays that!!!


feat: add Vectara destination connector

Thanks to Ofer at Vectara, we now have a Vectara destination connector.

There are no dependencies since it is all REST calls to API

checking, was there any resolution on validation of the stored and embedded results?

I can make a post request with a query. And then have it give the top example. We do get some metadata we can check for. But once the partitioned file hits Vectara, it is a black box. So no guarantee what the are doing as far as embeddings and search.
Example of response:
{     "responseSet": [         {             "response": [                 {                     "text": "I confess all these festivities and fireworks are becoming wearisome. \"If they had known that you wished it, the entertainment would have been put off,\" said the prince, who, like a wound-up clock, by force of habit said things he did not even wish to be believed. \"Don't tease! Well, and what has been decided about Novosiltsev's dispatch? You know everything. \"What can one say about it?\" replied the prince in a cold, listless tone. \"What has been decided?",                     "score": 0.75966287,                     "metadata": [                         {                             "name": "url",                             "value": "example-docs/book-war-and-peace-1p.txt"                         },                         {                             "name": "filename",                             "value": "book-war-and-peace-1p.txt"                         },                         {                             "name": "filetype",                             "value": "text/plain"                         },                         {                             "name": "last_modified",                             "value": "2024-01-18T09:39:46"                         },                         {                             "name": "lang",                             "value": "eng"                         },                         {                             "name": "offset",                             "value": "76"                         },                         {                             "name": "len",                             "value": "20"                         }                     ],                     "documentIndex": 0,                     "corpusKey": {                         "customerId": 0,                         "corpusId": 61,                         "semantics": "DEFAULT",                         "dim": [],                         "metadataFilter": "",                         "lexicalInterpolationConfig": null                     },                     "resultOffset": 344,                     "resultLength": 20                 }             ],             "status": [],             "document": [                 {                     "id": "726c32ce-acf0-471e-88b2-a4a8b040d324",                     "metadata": []                 }             ],             "summary": [],             "futureId": 1         }     ],     "status": [],     "metrics": null }

checking, was there any resolution on validation of the stored and embedded results?

@ryannikolaidis I can make a post request with a text query. (but not an embedding) And then have it give the top example. We do get some metadata we can check for. But once the partitioned file hits Vectara, it is a black box. So no guarantee what the are doing as far as embeddings and search.
Example of response: { "responseSet": [ { "response": [ { "text": "I confess all these festivities and fireworks are becoming wearisome. \"If they had known that you wished it, the entertainment would have been put off,\" said the prince, who, like a wound-up clock, by force of habit said things he did not even wish to be believed. \"Don't tease! Well, and what has been decided about Novosiltsev's dispatch? You know everything. \"What can one say about it?\" replied the prince in a cold, listless tone. \"What has been decided?", "score": 0.75966287, "metadata": [ { "name": "url", "value": "example-docs/book-war-and-peace-1p.txt" }, { "name": "filename", "value": "book-war-and-peace-1p.txt" }, { "name": "filetype", "value": "text/plain" }, { "name": "last_modified", "value": "2024-01-18T09:39:46" }, { "name": "lang", "value": "eng" }, { "name": "offset", "value": "76" }, { "name": "len", "value": "20" } ], "documentIndex": 0, "corpusKey": { "customerId": 0, "corpusId": 61, "semantics": "DEFAULT", "dim": [], "metadataFilter": "", "lexicalInterpolationConfig": null }, "resultOffset": 344, "resultLength": 20 } ], "status": [], "document": [ { "id": "726c32ce-acf0-471e-88b2-a4a8b040d324", "metadata": [] } ], "summary": [], "futureId": 1 } ], "status": [], "metrics": null }
I looked for some other endpoints that might give us embedding information. But there wasn't anything I found useful.

Ahh, I see. I think we could but we would need to build and hit the appropriate app in Vectara that also leverages the data we've written.


Windows VM Encryption Extension Details

Can information be added about using HSM keys with a premium key vault?  Or at least whether or not this is possible.

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

ID: 6b2cf75b-7d46-2565-cec2-8436bfbd6bdf
Version Independent ID: e8b54243-bfb9-5457-7c3d-fe5cf026a4e2
Content: Azure Disk Encryption for Windows - Azure Virtual Machines
Content Source: articles/virtual-machines/extensions/azure-disk-enc-windows.md
Service: virtual-machines
Sub-service: disks
GitHub Login: @ejarvi
Microsoft Alias: ejarvi

Thanks for the feedback! We are currently investigating and will update you shortly.

This information is available here in this document : https://docs.microsoft.com/en-us/azure/key-vault/keys/about-keys#key-types-and-protection-methods

Thanks for bringing this to our attention. We will now close this issue. If there are further questions regarding this matter, please tag me in a comment. I will reopen it and we will gladly continue the discussion.

@Karishma-Tiwari-MSFT The doc you linked explains what key vault supports.  It doesn't explain how we can use those key types with the encryption extension.  Using the extension as documented in the article I referenced, a secret is created, not a key.  The only options listed are 'RSA-OAEP', 'RSA-OAEP-256',  and 'RSA1_5'.  I don't even know how those correlate to the supported keys.  When ADE is enabled via the disk blade of a VM it behaves very differently.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_e709d360-4198-41dd-b54a-bb9cf7e92353/pull/1 is merged into live branch.
Auto archive content to https://github.com/VSC-Service-Account/docs-archive-test-target_e709d360-4198-41dd-b54a-bb9cf7e92353.git

Docs Build status updates of commit 9cbe62d:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-UserAccountBuildPermissionInsufficientError] Owner v-alji no longer has Read permission of the repository https://github.com/VSC-Service-Account/docs-archive-test-source. It might be due to recent GitHub changes on SSO. Please ask the owner v-alji to logon to Docs Portal https://ops.microsoft.com once again. If it is not the case, please ask anyone of Admin permission of the repo to assign a new owner via Docs Portal https://ops.microsoft.com

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 9cbe62d:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-UserAccountBuildPermissionInsufficientError] Owner v-alji no longer has Read permission of the repository https://github.com/VSC-Service-Account/docs-archive-test-source. It might be due to recent GitHub changes on SSO. Please ask the owner v-alji to logon to Docs Portal https://ops.microsoft.com once again. If it is not the case, please ask anyone of Admin permission of the repo to assign a new owner via Docs Portal https://ops.microsoft.com

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Create fork remote template

Description
Fixes #43
Type of Change:

Code
Quality Assurance
User Interface
Outreach
Documentation

Code/Quality Assurance Only

Bug fix (non-breaking change which fixes an issue)
This change requires a documentation update (software upgrade on readme file)
New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Checklist:

[ ] My PR follows the style guidelines of this project
[ ] I have performed a self-review of my own code or materials
[ ] I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] Any dependent changes have been merged

Code/Quality Assurance Only

[ ] My changes generate no new warnings
[ ] My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been published in downstream modules

@mtreacy002 made the suggested changes to change ``` to ` backquote.

@mtreacy002 could you please review this again?

@Jasmine9003 awesome contribution! thank you for working on this 🙏🏾


Add reward eligibility check to reward card & cover "specific team" use case

Story
As a user
I want to know whether I am eligbible for a reward
So that I know whether to try to compete to earn it
Acceptance Criteria

[ ] Add an icon that denotes a specific team

[ ] Suggest using the existing team icon and adding a little list icon next to it
[ ] When you hover over the icon we should show a simple popup list showing the list of team names (this can be a v simple list as it is unlikely to be used any time soon, no design needed)

[ ] When my wallet is connected, on the reward card it should show along the bottom:

[ ] Check my entity scope to see if I am eligible (use the teams API to see if I am in a team or not) and display tick / cross
[ ] Check my staked vega balance and compare to the value on the reward, if I have enough tick, if not cross
[ ] Check my average position as found on [slack thread hopefully]
[ ] Each of the three requirements should have their own tick/cross
[ ] Fix alignment of requirement titles and icons
(https://vegaprotocol.slack.com/archives/C9E6XA8GK/p1705063617891869), if I am meeting it tick if not cross

Tasks

[ ] UX (if needed)
[ ] Design (if needed)
[ ] Team and stakeholder review
[ ] Specs reviewed and created or adjusted
[ ] Implementation
[ ] Testing (unit and/or e2e)
[ ] Code review
[ ] QA review

Sketch

The standard tick / cross will do .... maybe make them vega green / red

Suggest adding this icon from foundations to the existing team icon, probably dont need the little vegabond

Additional details / background info

This probably needs to be put on hold until the changes in #5580 have been done since it may change what we want to do here

I take back my earlier statement ... this isnt blocked by #5580 and we need to sort it out quite soon.

Core ticket here for notional time weighted position
https://github.com/vegaprotocol/vega/issues/10831

This Core ticket should be merged soon per Gordon


bug(batch): Ctrlc + C doesn't work in local mode.

Describe the bug
When user issued a complex query in local mode, it may run for a long time and user want to cancel it, but currently ctrl + c is working for query in local mode.
To Reproduce
Issue a complex query in local mode.
Expected behavior
It should stop.
Additional context
No response

During investigate about this problem, I found that there are several problems with current system:

Since the root fragment is executed in frontend, which maybe blocking, it may block the listening socket task to be woken up.
The current task cancelling method may not work, it stops polling stream, but some blocking operator may not be stopped, for example the build phase of hash join, nested loop join and sort.


TEI Stylesheets and Saxon 10

I noticed that the TEI Stylesheets have switched to Saxon 10 for their build. We should confirm that this will or won't cause problems for our build process.
See: https://github.com/TEIC/Stylesheets/pull/498

thanks for bringing this up! Where did you find the info (just curious)?


Add settings for route protocol and disabling external route remove

Description
This adds two settings DeviceRouteProtocol and RemoveExternalRoutes.
DeviceRouteProtocol allows the user to specify the protocol (proto in ip route) to use on routes progreammed by Felix. This defaults to RTPROT_BOOT (https://elixir.bootlin.com/linux/v4.2/source/include/uapi/linux/rtnetlink.h#L225) which is currently used.
RemoveExternalRoutes allows the user to control whether or not Felix should remove routes installed by external applications. It will use the protocol specified in DeviceRouteProtocol to determine whether or not the route was added by external applications.
Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Marlin Cremers seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


feature request: task in notification-drawer

add an option to view the tasks in the notification drawer like this app for calendar:
https://play.google.com/store/apps/details?id=de.steverohrlack.statusagenda
so it will be possible to have them on the lockscreen and you can have a quick look on open tasks.

Interesting idea. Have you tried the pinned tasks feature though? It might cover a similar use case.

that feature fits my needs. just didn't noticed it yet.


spark-xml partitioning multiple xml.gz files

Hi,
I am trying to parse 130,000 .xml.gz files using spark-xml. After loading the data, Spark always creates 130,000 partitions (the number of files). However, this slows down the performance as each file size is small and having less number of partitions is better. I tried to repartition the dataframe in which the data loaded several times but it does not work and the number of partitions is always equals to the number of files.
How can I solve that? ... Thanks

Spark has an optimisation about it for file based data sources as far as I remember. Probably, it's a duplicate of https://github.com/databricks/spark-xml/issues/4 to enable this optimization. Let'a close this for now. I plan to resolve it soon.


Refactored agreement backend

Changes Unknown when pulling e5ed4e773ddebc41b04664af51851dc17d6bedc5 on fixAgreementShow into ** on master**.

Changes Unknown when pulling 6ba8d65968ce4cd452cff424ded438a8da8703a8 on fixAgreementShow into ** on master**.


Improving edit_control with adding ID to marker, polygon, polyline, rectangle, circle, circlemarker

Suggestions I'd like to make with specifically edit_control, probably extremely nitche and petty but if we could receive a geojson_edit response from the edit specific tool in EditControl that would be amazing.
For reference, I designed Dash EmojiMart and am currently working on a map index app:

I have been able to set it up so EmojiMart and select an icon and add it to the map from a callback which references  an input of clickData but haven't been able to set up the same functionality from the EditControl.
I'd like to use the EditControl to add marker's, I can add a blue base leaflet-marker-icon however their is no id for me to hit with a callback to replace it with a custom icon which I have setup. My suggestion would be to base id's on marker, polygon, polyline, rectangle, circle, circlemarker from EditControl id so adding a marker would return for example edit_control_marker_1 and iter from that. This would allow a developer to reference the individual marks created via EditControl and change them live.

I like the concept of extending the flexibility. Other options could be to pass a (JS) render function, which will control the icon. I'll be happy to look at a PR, which ever route you find most appropriate.

One suggestion that might work is using a dynamic id like:  id={"type": "dynamic-input", "index": location["pk"]} Not entirely sure if its relevant but I needed to create markers with id's that can be called over and over again and what I came up with is:
dl.Marker(
            position=[location["lat"], location["lon"]],
            children=dl.Tooltip(
                children=html.Img(
                    src=location["image"],
                    style={
                        "width": "30vw",
                        "height": "20vh",
                        "max-width": "250px",
                        "max-height": "250px",
                    },
                ),
                direction="top",
            ),
            icon=custom_icon,
            id={"type": "dynamic-input", "index": location["pk"]},
        )

Also considering how much work you've put into dash leaflet I think you might enjoy checking out the app I've been building with it: https://dash.geomapindex.com . Just launched it this past weekend, still in active development but the main focus of development is around dash leaflet.


Update impolite-slayer

Updates the plugin to the latest merged pull request

There are API usage changes needed, as mentioned in the build log. Also, you are not the author of this plugin. @jdkleuver do you want this update to go through?


Styles cleanups

This pull request will implement SASS as well as some general style cleanups sitewide.

@jtomeck, I'm curious if you've made any progress on the final few items we discussed? For repitition, I'm putting the checklist here:

[ ] Can we improve the layout of the detail pages?
[ ] Switch tabs to have Geospatial and Faceted search forms

[ ] Move current geospatial tabs to hide/show with dropdown choice

[ ] Put stats (count) in the top bar
[ ] Make the table better/scrollable (not running off page)
[ ] Copy/paste button for the GeoJSON field in detail view only
[ ] Remove Welcome button and get rid of drop down

@banesullivan - a couple things about this. I couldn't get the button copying to work properly. I also think it should display an alert that the text copied successfully.
Also, I think there needs to be an if statement in the titlebar to only show the meta information if you're on the detail page. Everything I tried wasn't working so I thought I'd stop wasting time trying to figure out things that're probably trivial for you.

Also, I think there needs to be an if statement in the titlebar to only show the meta information if you're on the detail page. Everything I tried wasn't working so I thought I'd stop wasting time trying to figure out things that're probably trivial for you.

I went ahead and handled this by implementing it a bit different. The base template imports the block and the sub templates for search and detail views add specific content per what makes sense.
It looks good in the detail view. But the search view has the "Spatial Entries" column in a weird place...

Detail View
Search View

I couldn't get the button copying to work properly.

Hm. I'll see if I can do some research on how to implement this if you don't have time to hook it up. Having the styling and the button enough for me to take it from there

I also think it should display an alert that the text copied successfully.

ah yes, absolutely! Could you hook up some sort of alert/dialog/response? Once we figure out how to actually copy that content to the clipboard, we can do a status check of some sort before displaying it. For now, maybe just have an alert that appears any time the button is pressed?

Can you explain in a little further detail what's happening with the tabs? I understand that there will be 2 tabs (Geospatial and Faceted Search) and that there will be a dropdown with the current tabs living in it. My questions are:

Is there any content or form already built that you want me to include on each of the 2 tabs?
Where does the dropdown live now? Is it under only 1 of the tabs, or is it a general thing that will need to be displayed regardless of what tab you're on?

My reason for asking this is because we might want to keep it in it's own panel if the information in the dropdown needs to be global

Going to answer backward because I think that makes sense to explain what we are looking for.

Where does the dropdown live now? Is it under only 1 of the tabs, or is it a general thing that will need to be displayed regardless of what tab you're on?

This dropdown is not global but within the geospatial search tab. The dropdown is for choosing which type of geospatial search to perform, with options: Point Radius, Bounding Box, and GeoJSON for the three search forms we currently have in rgd/geodata/templates/geodata/_includes/search_form.html

Is there any content or form already built that you want me to include on each of the 2 tabs?

Yes for the geospatial tab and no for the faceted search tab.
The dropdown in the geospatial tab will hide/show the fields from the three current forms we have based on the type of search (as mentioned above). For the faceted search tab, can you add a form with some arbitrary fields for us?
When implementing the form in the Geospatial tab, can you have one form, where the dropdown is contained within to hide/show specific fields, then have the Submit button outside that dropdown context but still in the form? For now, the Use Map button with varying callbacks can be hidden/shown with its corresponding fields.
Does this provide enough context?

@jared, on the latest changes, I noticed that the "Copy GeoJSON" button overlaps the metadata columns in the title bar

@jtomeck, on the latest changes, I noticed that the "Copy GeoJSON" button overlaps the metadata columns in the title bar
Oof, smaller screen size. I also don't have anything showing up under created or modified, so it was hard to plan the widths of that. I'll figure it out!

@banesullivan let me know how this looks now.

There is still something going on with the vertical alignment. See screen capture. Can we fix this so the page has no vertical scroll?

Also, there is still some minor overlap with the Copy GeoJSON button. Maybe we should move it to overlay on the map? (I can handle that positioning)

Otherwise, this is looking excellent and I can handle the rest of the tweaking/getting things working.


Workaround just FYI

To circumvent redownloading aborted downloads you can just add:
import os
import curlify as cy

and replace the two open(new_folder+final, 'wb').write(myfile.content) statements with:
os.popen("{}{}\"{}\"{}".format(cy.to_curl(myfile.request), " -o ", new_folder+final, " -C -").replace("'", "\""))

Assumes a working curl binary nonetheless on your system.

Nevermind, wrong repo, see #12 for tracking.


Option "Enable Atom-Typescript for JavaScript files" cannot be disabled

This option is "on" by default.  If I set it to "off" and then restart Atom, it's still in the "on" state.  The version of atom-typescript is 14.0.3.

Can't reproduce.
If you're using a non-official Atom distribution, it's something that fork might be doing, take it up with the distributor.
Otherwise, post outputs of the following commands:
apm --version
atom --version
apm list

I've searched for a bit, and apparently
atom-ide-javascript package forces this option to the "on" state. If you're using it, feel free to take it up with them but be aware that it's a "wrapper" package -- it doesn't really do much besides installing some dependencies and configuring atom-typescript, so you should be free to disable/remove it in case you don't want atom-typescript on JS.

Indeed, disabling aom-ide-javascript resolves this issue.


New extension: Simplelogin.io

Description
Add new SimpleLogin extension for raycast.
With SImpleLogin you can receive and send emails anonymously and protect the inbox against spam and phishing.
Screencast
https://user-images.githubusercontent.com/322735/211196975-b53bdcbd-abb5-4f3b-8fd5-e78c4ff5fb72.mp4
Screenshots

for testing

register on https://simplelogin.io/
head over to https://app.simplelogin.io/dashboard/api_key
enter API key in the extension

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

@pernielsentikaer you can take a look again  ;)

hi @adrian-schnell! 👋 hope it's alright, I've refactored the list command a bit to avoid the initial empty state flickering. Mind having a look if everything still works as expected? 😸

thank you 🙏 @sxn

Let's merge it! 🔥


Sometimes failing: SOFileLockRegistryTest>>#testAcquireAndGarbageCollect

When running all tests of in Soil-File-Tests,
SOFileLockRegistryTest>>#testAcquireAndGarbageCollect
fails sometimes. It is green when running it alone

This is something not necesarily guaranteed with pharo10. But with ephemerons my understanding is that it should be reliable

this was fixed by https://github.com/ApptiveGrid/Soil/pull/248


Add content as HTML to announce note

The structured data from the notification sent to the inbox should be added as HTML snippet (including thumbnail etc.) to the announce note so that apps can easily present it

The data should be added in the content field. It looks like currently the content from description is also put into content and it already works good with mastodon, see e.g. https://test.skohub.io/m/bed8d41c-f129-4c1b-aeb3-3d0d2b45104c

I am not sure how to best show an image of a resource, though. Will think about this tomorrow.

For now, we will use <p>${title}: ${url}</p>

On test, see e.g. https://test.skohub.io/m/0322ef82-e268-4c0b-b23d-4b2f8864c395

+1 Looks good.


Added new Guided Experience (Assisted Setup) Snippet

This PR attempts to add a new Snippet which is based on the Assisted Setup Snippets.
The new Snippet uses the Guided Experience Codeunit in favor of the "Assisted Setup" Codeunit.
Please try this Snippet on your own and provide some feedback. Thanks in advance.
EDIT: Site note - for the future I would recommend to create a new file called Onboarding.json and put the related Snippets into that file instead of the DesignPatterns.json.

Lol, I didn't notice the url :-).  But sure - love it 🤣.
ok for the filenames and moving the snippets - makes lots of sense!
I'm not completely sure about the guidedexperience-methods .. not using that myself (yet).  I'd just leave it as is ..

Tested the behavior with simple xliff translation and it looks good to me overall. So that's when I decided to remove that bit of translation logic. Feel free to correct me on this one.

Found a mistake by me: the package.json has to be extended by the new snippet file will add this later this day ...

What do you think? Is this PR now complete or shall we add some more things for the new "Guided Experience" assisted setup?

Let's gather info on the people using it ;-).


Inception-v3 only for specific classes

Hi,
is it possible to use Inception-v3 to classify images only for dogs?The example at tensorflow/examples/label_image/ classify images into 1000 classes.

Duplicate of https://github.com/tensorflow/tensorflow/issues/504


consumer_id expected to be uuid in Kong 0.12

I upgraded kong from 0.11 to 0.12 and ran into a problem with consumer_id which didn't happen before.
When user logs in successfully, kong-oidc passes user.sub as the id in ngx.ctx.authenticated_consumer.
https://github.com/nokia/kong-oidc/blob/6ff94662ff78e1c61149b8d09f872bf3b34170a3/kong/plugins/oidc/utils.lua#L64
This will trigger consumer lookup at kong level. Since the user.sub that I have is not a uuid, it results in error.

responses.lua:121: load_plugin_configuration(): failed to get from node cache: callback threw an error: [postgres error] consumer_id=00u1xxxx is not a valid uuid

It's running fine when I comment out the code that sets ngx.ctx.authenticated_consumer.

The main purpose for setting the ngx.ctx.authenticated_consumer was to make this plugin somehow compatible with other plugins, which could use the information about the consumer, but I know it was a bit of a hack. Looks we'll need to remove it in the next version.
BTW. Could I know what OIDC Provider do you use?

Thanks for the info.
It works fine when I replace ngx.ctx.authenticated_consumer with ngx.ctx.authenticated_credential as what you suggested.
I'm using Okta as the OIDC Provider. You can set up a trial server, it's free for 30 days.


[Issue-488] load data result is not correct when there are blank lines in data

in this pr, I have fixed #488 , and add a testcase.
pls check it

how about all the column is null?

LGTM


No existing catalan translations

Issue Summary
I need some catalan translations which don't exists
Technical details

Python version: 3.8
Django version: 2.2
Oscar version: 2.1

Hey @rbetancourt27 thanks for doing this. We use Transifex to manage all translations.
https://www.transifex.com/projects/p/django-oscar/
Would you be so kind to sign up and add them to the Transifex project?
If you need any help please ask.

Hey @viggo-devries Is it needed the translations to be approved? When they're added must I close the pull request?

hey @rbetancourt27 thank you very much for adding the translations!
I released Oscar 3.2 alpha today and they have been added to that release!
so you can install that version on your project and you should have the new translations added.
Please note that this is an alpha release and could have some issues still. A 3.2 final release should be here in a couple of weeks.


Carthage builds 'Object Server Tests'

I have no clue why it's building a unit test bundle, but there it is:
*** Building scheme "Object Server Tests" in Realm.xcworkspace

This is with Carthage 0.18.1 and Realm 2.1.0.
See https://ci.realm.io/job/create_github_release_cocoa/60/console

Fixing this might be as simple as moving the object server tests scheme down in the list.

Related: #4267.

rdar://29407087

Unfortunately, reordering the schemes won't work because that info is stored in xcuserdata, not xcshareddata.

Made a PR to Carthage that drastically improves the situation: Carthage/Carthage#1616


Trying to get property 'default_locale' of non-object

Bug report
Title
*Trying to get property 'default_locale' of non-object
Issue Description
I get error message after bagisto update to latest version
/var/www/html/bagistocustomize/packages/Webkul/Shop/src/Http/Middleware/Locale.php
app()->setLocale(core()->getDefaultChannel()->default_locale->code);
Preconditions
1. framework Version : 0.1.6
2. Commit id : 3c3676fc14dabcc0178455d35d7743c579bcac83.

Steps to reproduce
1. setup project > login using customer credetial > logout
2. close tab > and reopen project BOOM

Actual result

Sorry i forgot to run seeder command

php artisan db:seed


Module "fs" has been externalized for browser compatibility and cannot be accessed in client code.

Describe the bug
I tried to use i18next liblary with backend extention but /i18next-fs-backend throw error "fs cannot be accessed in client code".
I reproduce it in online editor and console prints same error as locally.
i18next::backendConnector: loading namespace translation for language en failed Error: Module "fs" has been externalized      for browser compatibility and cannot be accessed in client code.
    at Object.get (i18next-fs-backend.js?v=c86d5e72:20:15)     at i18next-fs-backend.js?v=c86d5e72:3949:8     at new Promise (<anonymous>)     at readFileInNode2 (i18next-fs-backend.js?v=c86d5e72:3948:10)     at i18next-fs-backend.js?v=c86d5e72:4065:5     at new Promise (<anonymous>)     at readFile (i18next-fs-backend.js?v=c86d5e72:4064:10)     at Backend2.read2 (i18next-fs-backend.js?v=c86d5e72:4269:7)     at Connector2.read (i18next.js?v=c86d5e72:2113:34)     at Connector2.loadOne (i18next.js?v=c86d5e72:2172:12)
Reproduction
https://stackblitz.com/edit/vitejs-vite-ayqemp?file=src/i18next.js
System Info
I reproduce error in stackblitz

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

fs is a nodejs module, and Vite does not polyfill them by default. Also it won't make sense to polyfill fs for this library. Closing as intended behaviour.


Error when trying to use isArray() within an expression

Describe the bug
I get an error when trying to use the isArray() function within an expression. It is in fact a valid function:

Version
1.0.0

this should be also be fixed in https://github.com/microsoft/BotFramework-Composer/issues/3168

this should be also be fixed in #3141, right @zhixzhan

Yes, it's fixed in #3141


Vectorize rng_fn in CLV distribution classes

Closes #37.
The rng_fn of ContNonContract (and ContContract) is done via a while loop: generate $T_1$, decide if a customer "dies", then generate $T_2$ and so on as long as the purchase times are under some censoring time $T$. However, this data-generating mechanism can be vectorized, but it required some thought. ContContract can be vectorized in a similar manner. The tests should and are left untouched.
Also, I remove T0 as an argument because it is unused. This is in the first commit of this PR.
The bigger overarching question: how should we better construct, name and establish our CLV distribution building blocks? For instance, ContNonContract refers to a continuous non-contractual setting, but the dropout variable manifests as a Bernoulli variable (e.g. BG/NBD) rather than another censoring time (e.g. ParetoNBD). This is related to #128.
Statistical Details
Let $0 < \tilde T_1 < \tilde T_2, \dots$ be the purchase times and $N(t) = \sum_j 1[T_j \leq t]$ be a counting process for the number of purchases in $[0, t]$. Because customers can dropout/die after any purchase, let $D_j \sim \operatorname{Bernouilli}(p)$ be the dropout indicator after the $j$ th purchase. We define these dropouts for every purchase times even if customers are already "dead". More specifically, for BG/NBD, we assume that $N(t)$ is a homogenous Poisson process with hazard $\lambda$, hence $T_j - T_{j-1} \stackrel{\small{\text{i.i.d.}}}{\sim} \operatorname{Exp}(\lambda)$. Formally, $( \tilde T_j, D_j)_{j \geq 1}$ characterizes a marked point process, but that's not really useful here.
Data from a Poisson process can be generated sequentially. That is, generate $T_j - T_{j-1} \sim \operatorname{Exp}(\lambda)$ until $T_j$ exceeds some censoring time $T$. Coupled with the dropout process due to the non-contractual setting, $D_j$ is also generated with every $T_j$ and we stop when $D_j = 1$. This sequential process is more intuitive in its implementation and that's what we have now.
However, we can opt for a more efficient data-generating mechanism by using the fact that the joint distribution of $T_1, \dots, T_x$ is the uniform order statistics over the interval $[0, T]$ conditioned on $N(t) = n$. In other words, we can do: (1) $N(t) \sim \operatorname{Poisson}(\lambda T)$ followed by (2) $T_j \equiv U_{(j)}$ where $U_{(j)}$ is the order statistics of $U_1, \dots, U_x$ with $U_j \stackrel{\small{\text{i.i.d.}}}{\sim} \operatorname{Unif}(0, T)$.
Conditioned on $N(t) = x$, we don't know if a customer will drop out before completing the "x" purchases (according to this data-generating process). To account for the drop out, we can simply retrieve the order statistic $U_{(R)}$ corresponding to when the customer drops out with $R \sim \operatorname{Geometric}(p)$. Given that the order statistics of uniformly distributed variables over $[0, 1]$ follows a Beta distribution, $U_{(R)}$ can be sampled from a Beta distribution then scaling it by $T$ to map $[0, 1]$ to $[0, T]$.
All in all, the data-generating procedure in this PR is more efficient and vectorized, and all tests are passing.

Some failing test but otherwise looks good


Sequence length in dnc/dnc.py

While implementing bAbI task based on your code,
I've found that the sequence length is defined as a single integer for each batch in dnc.py.
For copy task, you fed the same length items for each batch (though its random),
but if each item in one batch varies in their length (like sentences in bAbI), shouldn't it be array of sequence lengths?  (size of batch)

Yes, it should be an array of sequence lengths, that's indeed a current limitation in the implementation,  and it's mentioned explicitly in the usage guide and implicitly in the to-dos.
The reason behind going with such a limiting design is performance as I'm using a kid of modest hardware. but I'm planning to remove that limitation, so I'll keep this issue open till then. However, this shouldn't be an obstacle for the bAbI task, as per the paper, their best performing model used a batch of size 1.

Oh I've missed that their batch size was 1. Thank you for your kind reply!


Leaves in broken state if rm2fb fails to start

Collected errors:
 * pkg_run_script: package "genie" prerm script returned status 1.
 * pkg_run_script: package "remux" prerm script returned status 1.
 * pkg_run_script: package "display" postinst script returned status 1.
 * opkg_configure: display.postinst returned 1.

When running toltecctl reenable with rm2fb not starting correctly.

The errors come from here https://github.com/toltec-dev/toltec/blob/stable/package/display/package#L65-L74

This is specifically when running on an unsupported version. While we don't support it, I do think we should handle the error better and not leave rm2fb enabled if it failed to start.

@Jayy001 Now that #686 has been merged, have you had a chance to see if this is still an issue?

@Jayy001 poke


feat: prellocate-semaphores-fences

it makes sense to reserve more framebuffers then anyone would ever use and it should avoid an extra indirection for all of these elements.

I'm not sure it's worth taking a dependency for this. The cost of this indirection is dominated by actually using the fences/semaphores.

I though you planned to use smallvector

I'm not strongly against the change. It also occurs to me filling out structures for vulkan/dx12 may be less hazardous with something like arrayvec/smallvec. It's very easy to accidentally pass a pointer to the contents of a Vec to DX12/vulkan structures and do something that reallocates the Vec making that pointer invalid.
I think there's several smallvec/arrayvec implementations, but I haven't taken the time to review them. Is there a reason you like this one in particular? Just curious.
In the cases where we've had a lot of allocations we ended up using AtomicOnceCellArray/AtomicOnceCellStack. This tends to be when copying data from the "game" to the render thread, so it's per-frame allocations. But I think if we do want to change this to avoid the indirection, something like arrayvec/smallvec would be the better choice.
I'm still not sure that this is really the place where arrayvec/smallvec is going to make much of a difference. But if you want to move forward with the change I'm ok with it. I would just ask that 1) not use the "8" magic number in multiple places 2) We should pin this to MAX_NUM_FRAMES_IN_FLIGHT + 1. There's no reason to have a sync primitive per image. (On that note maybe we can use a simple array.)

keep the changes small the focused, are there key areas of allocation to focus on?

are there key areas of allocation to focus on?

The areas we (actualy mostly @DavidVonDerau) put a lot of work into were capturing from the main thread to the rendering thread. You could find these by searching AtomicOnceCellArray/AtomicOnceCellStack. These were more-than-per-frame, dynamically growing allocations that definitely show up as small latency spikes. Something like this where we are very rarely re-allocating, and it's along with a lot of other work that's heavy (like rebuilding a swapchain) is not going to be noticeable.
It's true this is one less indirection and we access the data per-frame, but given this is a "volunteer" project, people's time is at a premium. I think there are other places where we get more impact like 1) ways to make the renderer scale better (i.e. number of lights/meshes/etc.) 2) ways to make the image quality better (i.e. improved rendering techniques) 3) making things easier to use either by tools or APIs.
Again this isn't a bad change, I just think in terms of impact I think there are other places that add more value for the time spent.
The projects I am considering taking on at some point:

Finish bringing up the DX12 backend. It mostly works!
Switch from GLSL to HLSL (GLSL is basically dead/not getting updates at this point, and dxc gets better and better. All the industry investment is there right now and it's being done mostly in the open.)
New content pipeline to address some of the usability issues with distill
Deferred texturing
Hybrid ray-tracing (i.e. raytraced shadows/reflections)

Also just a heads up I will probably be shifting my focus with this library from "general purpose do anything" to "platform for graphics research" as this is what I personally need. So less focus on baseline compatibility everywhere and more focus on modernization/graphics features.


Add event OnCreateReservationOnBeforeCreateReservEntry2 into codeunit 99000833 "Req. Line-Reserve"

Describe the request
The code shoul be like this:
procedure CreateReservation(var ReqLine: Record "Requisition Line"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal; ForReservEntry: Record "Reservation Entry")
var
    ShipmentDate: Date;
    IsHandled: Boolean;
begin
    if FromTrackingSpecification."Source Type" = 0 then
        Error(Text005);

    ReqLine.TestField(Type, ReqLine.Type::Item);
    ReqLine.TestField("No.");
    ReqLine.TestField("Due Date");
    ReqLine.CalcFields("Reserved Qty. (Base)");
    if Abs(ReqLine."Quantity (Base)") < Abs(ReqLine."Reserved Qty. (Base)") + QuantityBase then
        Error(
          Text000,
          Abs(ReqLine."Quantity (Base)") - Abs(ReqLine."Reserved Qty. (Base)"));

    ReqLine.TestField("Variant Code", FromTrackingSpecification."Variant Code");
    ReqLine.TestField("Location Code", FromTrackingSpecification."Location Code");

    if QuantityBase < 0 then
        ShipmentDate := ReqLine."Due Date"
    else begin
        ShipmentDate := ExpectedReceiptDate;
        ExpectedReceiptDate := ReqLine."Due Date";
    end;

    if ReqLine."Planning Flexibility" <> ReqLine."Planning Flexibility"::Unlimited then
        CreateReservEntry.SetPlanningFlexibility(ReqLine."Planning Flexibility");

    IsHandled := false;
    OnCreateReservationOnBeforeCreateReservEntry(ReqLine, Quantity, QuantityBase, ForReservEntry, IsHandled);
    OnCreateReservationOnBeforeCreateReservEntry2(ReqLine, Quantity, QuantityBase, ForReservEntry, FromTrackingSpecification, IsHandled, ExpectedReceiptDate, Description, ShipmentDate);
    if not IsHandled then begin
        CreateReservEntry.CreateReservEntryFor(
        Database::"Requisition Line", 0,
        ReqLine."Worksheet Template Name", ReqLine."Journal Batch Name", 0, ReqLine."Line No.",
        ReqLine."Qty. per Unit of Measure", Quantity, QuantityBase, ForReservEntry);
        CreateReservEntry.CreateReservEntryFrom(FromTrackingSpecification);
    end;
    CreateReservEntry.CreateReservEntry(
      ReqLine."No.", ReqLine."Variant Code", ReqLine."Location Code",
      Description, ExpectedReceiptDate, ShipmentDate, 0);

    FromTrackingSpecification."Source Type" := 0;

    OnAfterCreateReservation(ReqLine);
end;

[IntegrationEvent(false, false)]
local procedure OnCreateReservationOnBeforeCreateReservEntry2(var ReqLine: Record "Requisition Line"; var Quantity: Decimal; var QuantityBase: Decimal; var ForReservEntry: Record "Reservation Entry"; var FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean; ExpectedReceiptDate: Date; Description: Text[100]; ShipmentDate: Date)
begin
end;

Additional context
This event override the precedent event because there aren't all parameters of CreateReservation function usefull if anyone change the logic below the IsHanlded variable.
Internal work item: AB#536971

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


packages.microsoft.com are super slow

The repo seems problematic this morning. Both Azure Devops pipelines are taking an eternity to download Packages and my workstation too (avg 85kb/s)
Code to reproduce:
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update
sudo apt-get install azure-functions-core-tools-3

https://github.com/microsoft/linux-package-repositories/issues/13 related issue.
We are looking into this right now.

some problem here.

some pipelines run into a time out due to this.

closing since this issue has been resolved https://github.com/microsoft/linux-package-repositories/issues/13


ProviderTest failing with latest nightly build

closes #115
The ProvidersTest might fail quite often as it will always fail with keycloak-server nightly release whenever any new provider is added. Could we be less strict in the client testsuite and just check that all "expected" items are present in the providers, which are returned from server? This means that providers from server can contain some more providers.
This means that ProviderTest won't fail always whenever new provider is implemented on the Keycloak server side.

@jonkoops Thanks!


Support for Arrow PyCapsule Interface

👋  The Arrow project recently created the Arrow PyCapsule Interface, a new protocol for sharing Arrow data in Python. Among its goals is allowing Arrow data interchange without requiring the use of pyarrow, but I'm also excited about the prospect of an ecosystem that can share data only be the presence of dunder methods, where producer and consumer don't have to have prior knowledge of each other.
I'm trying to promote usage of this protocol throughout the Python Arrow ecosystem.
On the write side, through write_dataset, it looks like coerce_reader does not yet check for __arrow_c_stream__. It would be awesome if coerce_reader could check for __arrow_c_stream__ and just call pyarrow.RecordBatchReader.from_stream. In the longer term, you could potentially remove the pyarrow dependency altogether, though I understand if that's not a priority.
On the read side, would you consider changing the return type of to_batches to something like a pyarrow.RecordBatchReader? This would potentially not even be a backwards incompatible change, because the RecordBatchReader still acts as an iterator of RecordBatch, but it also has the benefit of holding the Arrow iterator at the C level, so it can be passed to other compiled code without needing to iterate the Python loop.
Maybe there are some classes that make sense to have __arrow_c_stream__ defined on them directly? Maybe the LanceFragment? It might not make sense if there are still required parameters to materialize an Arrow stream, like a column projection or an expression.
Edit: on top, it would also be awesome to integrate the pycapsule interface with LanceSchema

Yes, I think this is something we'd be happy to support.

On the read side, would you consider changing the return type of to_batches to something like a pyarrow.RecordBatchReader? This would potentially not even be a backwards incompatible change, because the RecordBatchReader still acts as an iterator of RecordBatch,

I agree that should probably be a RBR.

Maybe there are some classes that make sense to have arrow_c_stream defined on them directly? Maybe the LanceFragment? It might not make sense if there are still required parameters to materialize an Arrow stream, like a column projection or an expression.

Yeah I don't think that would makes sense. LanceFragment doesn't represent in-memory data, just something on disk that can be scanned. I think it should instead just have a to_batches() method, which I believe it does.

Edit: on top, it would also be awesome to integrate the pycapsule interface with LanceSchema

Yeah that would make a lot of sense.

On the read side, would you consider changing the return type of to_batches to something like a pyarrow.RecordBatchReader? This would potentially not even be a backwards incompatible change, because the RecordBatchReader still acts as an iterator of RecordBatch, but it also has the benefit of holding the Arrow iterator at the C level, so it can be passed to other compiled code without needing to iterate the Python loop.

I don't remember if we return a RecordBatchReader here already or not.  However, if we don't, I agree we should be returning something that supports __arrow_c_stream__.  Other than the inputs / outputs, which I think you have covered (also, merge_insert, and wherever else we accept / consume RBR), I'm not sure we have much else mapping to __arrow_c_stream__.

I don't remember if we return a RecordBatchReader here already or not. However, if we don't, I agree we should be returning something that supports __arrow_c_stream__.

If I'm reading this correctly, to_batches currently returns a Python iterator
https://github.com/lancedb/lance/blob/fa089be2bf0457e6bf8a92c6ef67e43e4c0c3177/python/python/lance/dataset.py#L2345-L2346

Since LanceSchema has pyarrow interop anyways,
https://github.com/lancedb/lance/blob/fa089be2bf0457e6bf8a92c6ef67e43e4c0c3177/python/src/schema.rs#L47-L61
It might as well expose/ingest c schemas too. You could easily reuse the pyarrow dunders if you don't want to manage the rust FFI yourselves


Fix bug in timeseries upload

Since load monitoring metric upload requests are serviced in parallel, it looks like metrics with earlier time-stamps are sometimes sent to the cloud monitoring service after metrics with later time-stamps have been uploaded.
This is not allowed by Google Cloud Monitoring version 2 causing an error and the metrics are lost.
In this fix, we catch such a failure, sleep for one second and retry with the current time-stamp.
Testing
The issue can be reproduced by triggering scaling, by loading the cluster with enough user sessions.  The metrics are successfully uploaded with this fix.

LGTM

Note: API v2 seems to have been deprecated already in favor of v3, though v3 seems to have the same restriction and won't help in this case. Hopefully, future versions would handle out of turn updates (like AWS).
It may be worthwhile to mention the other approach discussed. Since each instance records to a unique timeseries (instance id is part of the group name), the only possibility of updates arriving out of turn is when jbox and jboxd threads on the same instance log simultaneously. Funneling all updates via messages to one jboxd thread should avoid this issue. Implementation will be more complex though.


custom collection

is it possible to add our own custom collection with this plugin?
im trying to use my own svg file, is there any work around?

Sorry currently no. This project is no longer actively maintained, you might want to take a look at https://github.com/antfu/unplugin-icons, which supports custom collections.


fix wasm build and tests

try using pytest-speed as a substitute for pytest-benchmark for wasm builds.

Note that pytest-benchmark works on Pyodide's main branch, though I don't know what the differences are between pytest-benchmark and pytest-speed.

OverflowError: timestamp out of range for platform time_t

There are also errors with datetime on PyO3:
https://github.com/PyO3/pyo3/pull/2436/files#diff-0475f1ee5a37fa84fc40bdb6aa3e0e463ebbd19d67fa60b5872244497480dbd3
I assumed that it was not a real bug and is due to some dumb configuration mistake but seeing it here makes it more likely to be real. Someone will have to investigate.

Interesting, thanks.
I've been working on pytest-speed today to fix some frustrations with pytest-benchmark, it's backwards compatible with pytest-benchmark in this codebase. I thought the problem was with a dependency of pytest-benchmark which didn't distribute wheels? Either way, over time I'll replace pytest-benchmark complete in time.

The problem is that py-cpuinfo doesn't support wasm. It would be an easy fix but py-cpuinfo doesn't look maintained.

The whole of pytest-benchmark looks pretty unloved I'm afraid.
Quite about from the hard to read output, the actual measurements seem to vary a lot, hence why I went down the rabbit whole of starting anotherpackage.


Error with imbalanced parentheses during Token obfuscation

Problem
There seems to be an issue that can arise when doing string token obfuscation when using one of the special characters that use the string "replace" obfuscation. I encountered this issue when obfuscating the Get-SQLColumnSampleData module in Empire.
Steps to reproduce
PS > Invoke-Obfuscation -ScriptPath 'https://raw.githubusercontent.com/EmpireProject/Empire/2.0_beta/data/module_source/collection/Get-SQLColumnSampleData.ps1' -Command 'Token\All\1' -Quiet
Exception calling "Create" with "1" argument(s): "At line:843 char:23
+         HelpMessage = {("{3}{4}{1}{0}{2}"-f 'tput anyt','ou','hing.', ...
+                       ~
Missing closing '}' in statement block or type definition.
At line:843 char:85
+ ... ("{3}{4}{1}{0}{2}"-f 'tput anyt','ou','hing.','DonCK','Et ')).REplacE ...
+                                                                  ~
Missing ] at end of attribute or type literal.
At line:843 char:85
+ ... ("{3}{4}{1}{0}{2}"-f 'tput anyt','ou','hing.','DonCK','Et ')).REplacE ...
+                                                                  ~
Parameter declarations are a comma-separated list of variable names with optional initializer expressions.
At line:843 char:85
+ ... ("{3}{4}{1}{0}{2}"-f 'tput anyt','ou','hing.','DonCK','Et ')).REplacE ...
+                                                                  ~
Missing ')' in function parameter list."

The problem can be minimized with this script as input:
PS> cat .\test.ps1
Function Get-DomainObject {
    [CmdletBinding()]
    Param(
        [Parameter(HelpMessage = 'domain\user')]
        [string]$Username
    )
}
PS > Invoke-Obfuscation -ScriptPath .\test.ps1 -Command 'Token\All\1' -Quiet
Exception calling "Create" with "1" argument(s): "At line:4 char:34
+         [Parameter(HelpMessage = {("{2}{0}{4}{1}{3}" -f'om','P','d',' ...
+                                  ~
Missing closing '}' in statement block or type definition.
At line:4 char:85
+ ... Message = {("{2}{0}{4}{1}{3}" -f'om','P','d','Huser','ain6')).rEPLAce ...
+                                                                  ~
Missing ] at end of attribute or type literal.
At line:4 char:85
+ ... Message = {("{2}{0}{4}{1}{3}" -f'om','P','d','Huser','ain6')).rEPLAce ...
+                                                                  ~
Parameter declarations are a comma-separated list of variable names with optional initializer expressions.
At line:4 char:85
+ ... Message = {("{2}{0}{4}{1}{3}" -f'om','P','d','Huser','ain6')).rEPLAce ...

It may take a few tries to reproduce the error, as the error only occurs when the ".replace()" method of replacement is randomly selected.
Solution
The issue appears to stem from this section of code in Out-ObfuscatedTokenCommand.ps1:
# Evenly trim leading/trailing parentheses.
While($ObfuscatedToken.StartsWith('(') -AND $ObfuscatedToken.EndsWith(')'))
{
    $ObfuscatedToken = ($ObfuscatedToken.SubString(1,$ObfuscatedToken.Length-2)).Trim()
}

When the ".replace()" technique of replacement is used it results in an $ObfuscatedToken of this form: (something).replace(something). You can see why trimming the leading and trailing parentheses wouldn't work in this case.
This can be fixed by checking if the parantheses are properly balanced post-trim before permanently removing the parentheses:
# Evenly trim leading/trailing parentheses.
While($ObfuscatedToken.StartsWith('(') -AND $ObfuscatedToken.EndsWith(')'))
{
    $TrimmedObfuscatedToken = ($ObfuscatedToken.SubString(1,$ObfuscatedToken.Length-2)).Trim()
    # Check if the parentheses are balanced before permenantly trimming
    $Balanced = $True
    $Counter = 0
    ForEach($char in $TrimmedObfuscatedToken.ToCharArray()) {
        If($char -eq '(') {
            $Counter = $Counter + 1
        }
        ElseIf($char -eq ')') {
            If($Counter -eq 0) {
                $Balanced = $False
                break
            }
            Else {
                $Counter = $Counter - 1
            }
        }
    }
    # If parantheses are balanced, we can safely trim the parentheses
    If($Balanced -and $Counter -eq 0) {
        $ObfuscatedToken = $TrimmedObfuscatedToken
    }
    # If parentheses cannot be trimmed, break out of loop
    Else {
        break
    }
}

There might be other ways of solving it, but this was the only one I could think of. There is another suspiciously similar looking block of code in Out-ObfuscatedTokenCommand.ps1:
# Evenly trim leading/trailing parentheses.
While($ObfuscatedSubToken.StartsWith('(') -AND $ObfuscatedSubToken.EndsWith(')'))
{
    $ObfuscatedSubToken = ($ObfuscatedSubToken.SubString(1,$ObfuscatedSubToken.Length-2)).Trim()
}

I haven't run into any problems from this block of code, but it may be worth investigating as well.

950785e5f846fb0e8d3be8484d2ba466c2340469


Insufficient funds errors when opening a channel are confusing

env: testnet
I have tried to open a channel, and I repeatedly was unable to do so, even when I changed the amount to be well within range (like 20% of my confirmed balance). I suspect that the maker did not have balance, and it was reporting insufficient funds the same way as the taker.
Eventually I opened a crazy low channel and ended up with #372
This is quite a blocker, as this point of friction can discourage people from actually testing our app.

Was this fixed with https://github.com/itchysats/10101/pull/370/commits/51d491c5d2691eca2a58d71bb6e9b5773db89705?

Was this fixed with 51d491c?

It hasn't - it still says it happened due to insufficient funds (error is from the other party). I'll see to add more context.


Bounds in get_or_make_var

There exists a bug in the get_or_make_var code for the wsum operator.
The bug occurs when using negative coefficients in the operator.
Example:
expr = -2 * boolvar() + 2 * boolvar()
var, _ = get_or_make_var(expr)
var.lb, var.ub
output: (0,0)

Expected: (-2, 2)

Current code in get_or_make_var:
https://github.com/CPMpy/cpmpy/blob/e6bda5fac9cb5ef4c2ce1250be43723f4aba10e2/cpmpy/transformations/flatten_model.py#L330-L337
Possible fix:
lb = sum(min(weight * fvar.lb, weight * fvar.ub) for fvar, weight in zip(flatvars, weights))
ub = sum(max(weight * fvar.lb, weight * fvar.ub) for fvar, weight in zip(flatvars, weights))

Fixed in bbd401e


feat: speed up nix build by adding cache of build result

Tested on my fork
build time: 1h 34m 44s -> 3m 24s

Oh, I just realized that it's actually possible to download from cachix to speed up the process, and it's probably because the settings in my fork repository are not properly configured that leads to slow compilation.


⚠ Turnos 24x7 has degraded performance

In b53cc41, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 8144 ms

Resolved: Turnos 24x7 performance has improved in d00857e.


Support moreh_getitem forward

Support moreh_getitem forward.
import torch

a = torch.rand([20,30,40,50], dtype=torch.float)

idx = torch.tensor([1,2,3])

ret = a[:,idx,idx,:]
print(ret.shape) # (20, 3, 50)

moreh_getitem is an operation that copies input to output based on the indicies, as shown in the example above.

Are you using this operation only from C++?

We have a __getitem__ in ttnn/operations/core.py and it would nice to update it to use this operation in the cases where it can be used

We have a getitem in ttnn/operations/core.py and it would nice to update it to use this operation in the cases where it can be used

Currently, moreh_getitem has limited support scope. I'll update moreh_getitem further and check __getitem__.


Drop support rack ~> 1 ?

Should we drop support to rack ~> 1 ?
Rails 6.0 which is more than 4 years old is rack (~> 2.0, >= 2.0.8)
Sinatra : since 2.0, rack is `~> 2.0'.

What's the benefit of dropping Rack ~> 1 support? Is it EOL?

According their Security Policy, it's not.


Failed to test module package with ts-node

Hi, I have a package tested with tape and I'm having problem to change my package to a module.
The problem seems to be that I'm using the ts-node register to invoke the tests execution and it seems to be incompatible with the current "importOrRequire" implementation, as it requires the file to have a ".js" extension but when running with ts-node the reported file extension is ".ts".
Can ".ts" and ".mts" be added there as possible extensions for a module?
Thank you in advance, and thanks for this cool library.

That shouldn't be required; if the extension is anything besides mjs or js, it'll just use require, which ts-node should be intercepting.

I'm running the tests like:
c8 --check-coverage --lines 100 tape -r ts-node/register/transpile-only ./index.spec.ts

As soon as I change the package.json type to module I get this error:
/Users/givi/dev/PromiseReentrantLock/node_modules/ts-node/dist-raw/node-internal-errors.js:46
  const err = new Error(getErrRequireEsmMessage(filename, parentPath, packageJsonPath))
              ^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/givi/dev/PromiseReentrantLock/index.spec.ts
require() of ES modules is not supported.
require() of /Users/givi/dev/PromiseReentrantLock/index.spec.ts from /Users/givi/dev/PromiseReentrantLock/node_modules/tape/bin/import-or-require.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /Users/givi/dev/PromiseReentrantLock/package.json.

    at createErrRequireEsm (/Users/givi/dev/PromiseReentrantLock/node_modules/ts-node/dist-raw/node-internal-errors.js:46:15)
    at assertScriptCanLoadAsCJSImpl (/Users/givi/dev/PromiseReentrantLock/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js:584:11)
    at Object.require.extensions.<computed> [as .ts] (/Users/givi/dev/PromiseReentrantLock/node_modules/ts-node/src/index.ts:1610:5)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at importOrRequire (/Users/givi/dev/PromiseReentrantLock/node_modules/tape/bin/import-or-require.js:14:2)
    at /Users/givi/dev/PromiseReentrantLock/node_modules/tape/bin/tape:96:8
    at Array.reduce (<anonymous>) {
  code: 'ERR_REQUIRE_ESM'
}

Should run the test in a different way?

You're using type module, though - why?

Closing due to lack of response.


Cleanup and tests

I'm reorganizing the cosipy module in preparation for the unit tests. Each module will have at least a test.
Work done so far:

Removed cosipy/coordinates. That code is now in mhealpy or scoords
Removed cosipy/config. That code is now in yayc

Added yayc to the dependencies, and changed the import where appropriate (DataIO and  imaging modules)

Moved cosipy_makeplots to DataIO (only module using it)
Fix existing unit tests

The response module test was failing because the config file now uses the astromodels format for source specification
(IMC: actually still failing, but for another reason. Investigating.) The Data IO module was failing because it was missing the corresponding test data. I added a subset (621 event) of GalacticScan.inc1.id1.crab2hr.extracted(.testsample.)tra.gz and inputs_crab.yaml

Fixes #170

@ckarwin Yes, good catch. I fixed it by using tempfile to create a system temporary folder that is automatically removed at the end of the tests. Since I was at it, I added a few test cases to have full coverage for that file.
However, due to what it seems an unrelated issue, the automatic pipelines are not failing. I think it has to do with new releases of some dependencies. I'll look into it, but they are passing on my machine.

@israelmcmc Yeah, everything is still passing on my machine as well, after pulling your latest commit.

@Yong2Sheng @israelmcmc Thanks, Yong, for approving the PR. So can it be merged soon, or still waiting on something? I see there is still a problem with some of the unit tests.

Thanks @Yong2Sheng and @ckarwin. I'd like to have the test passing before merging. I think it's a problem with the dependencies, maybe I just need to specify the versions. I'll work on it.

Thanks @israelmcmc! Yeah, it would be helpful to have it merged whenever you can, to make it easier for adding more tests.

In the meantime, people can branch off my branch (israelmcmc:cleanup_and_tests) instead of develop, and everything else is the same. But yet, I agree it's easier and better to just merge it, I'll get to it

Hi @israelmcmc, do you mean to fork and make PR to your branch (israelmcmc:cleanup_and_test)? Thanks!

 Yes to making a new branch from my branch, but you don't need to fork my repo and you can open the PR directly to develop on this repo.

@israelmcmc I tested the error in the checks as follows:

I Copied your cleanup and tests branch into my forked repo.
I Made a PR #185, to replicate the error that you get.
Indeed, I get the same errors related to matplotlib.cm, relating to the discussion in issue #180.
I then updated install_requires in setup.py file with 'matplotlib<=3.8.3'. After doing this all checks passed.

So I think if you do the same in your setup file it should fix the issue. Can you try?

@israelmcmc Actually, I just made a PR into your branch with the update, if that's easier.


Wrong terraformWorkingDir when user not type path with leading "/" in workspace configuration

Bug description 🐞
If user does not write the path with the initial "/" the executor working directory path is wrong and can be not exist.
For example if you set Terraform Working Directory as environment/test, the executor run Terraform or OpenTofu in directory: /home/cnb/.terraform-spring-boot/executor/816a1372-1c53-42b8-a0bd-a1fbd8a191dc/94408cba-17df-4381-a604-b019563bf34aenvironment/test
Steps to reproduce

Create new workspace
Set working directory without initial "/"
Run plan
Wait plan without changes because working directory it's wrong and check executor log for find bad path.

Expected behavior
Path correct even if the initial "/" is missing
Example repository
No response
Anything else?
No response

I create pull request for fix this bug https://github.com/AzBuilder/terrakube/pull/1269


Sticky Parent folders in folder tree view

When a project has many files in a folder it can become a bit cumbersome to navigate to the parent folder as that item may not usually be in view. To mitigate this it would be nice if all parent folders could be sticky at the top of the folder view similar to how function signatures and code blocks can be made sticky in the code view.

Duplicate https://github.com/microsoft/vscode/issues/194903


code training_GB encountered an IndexError error

Hello, when I run your code training_GB in your ESP dataset, I encounter an index error: IndexError: Resulting IndexError in DataLoader worker process 0
Original Traceback (most recent call last):
File "/mnt/usb/code/luohuiqian/prosmith/code/training/utils/datautils.py",  line 112, in getitem
raise IndexError(f"Index {idx} out of bounds for dataset with length {len(self.mappings)}")
IndexError: Index -889 out of bounds for dataset with length 967
May I ask where I didn't handle it properly, which caused this problem to occur? Do you have any clues

Hi luohuiqian,
sorry for my late response. It is hard to tell what is going on without further information. Your index seems to be negative, which is weird. Did you change anything from the code provided in the repository?


Compensate for SQLitePCL.raw's lack of SafeHandles

Before, our native handles were implemented using SafeHandle to ensure they eventually got freed by the garbage collector thus preventing a native memory leak. I'm not sure if SQLitePCL.raw has the same guarantee. We need to investigate and compensate as necessary.
cc @ericsink in case he has a quick answer to this

From testing, it looks like the connection will get collected and free itself along with everything associated with it. Unfortunately, if the connection remains open, any non-disposed handles associated with it will be leaked until the connection is closed.
As @AlexanderTaeschner found, we'll need to dispose sqlite3_stmt objects in the finalizers of any owning objects.

Last time I looked at this issue, I remember thinking I would like to use SafeHandle but that it would be a breaking change.  Not sure if there were any other caveats also.

@ericsink I'm totally fine compensating in our library--it just caught me a little off guard.

Nonetheless, I'd like to keep an eye on this matter, just in case your efforts make me realize a change should be made to SQLitePCL.raw which would benefit all users.
That said, I think the code I've got now could be described as sensible if I said it like this:
Once you open a sqlite3 connection handle, you should close it.
It is an error (from SQLite itself) to close a sqlite3 connection handle if it still has statement handles open.  (Probably also true for blob handls.)  So, before you close a connection handle, you have to finalize any of its statement handles first.
Apps or libraries that follow these rules should not have problems.
And when you say "compensating in our library", I hear you saying that you want to use the GC as part of your plan to "follow these rules". But it is possible for apps/libraries to "follow these rules" without using the GC.
Does that make sense?

Correct. Makes sense to me.


Move slow db interactions to tokio blocking pool

All database interactions going through Diesel are synchronous, even though most of them happen within tokio's cooperative multitasking framework. That means that long-running db interactions will block the tokio worker they are running on; if enough workers (by default, one per CPU core) block, the whole system grinds to a halt. At that point, no work can be done, including work that doesn't even involve the database, but simply gets scheduled on the tokio runtime.
Upstream Diesel is not going to add async database interactions anytime soon so we need to come up with our own approach. One possible way to address this is with tokio's tokio_threadpool::blocking where slow work gets pushed to a separate pool of slow tasks, freeing up the main workers.
Open questions around this:

how to best integrate that and how to change our internal API's (should most Store functions return Future?)
how to determine which db work is slow and needs to be treated that way (might be that we should do all db work on the blocking pool)

What we should do is change the store to move actual work to the blocking pool itself by having some internal function Store.with_connection(f:Fn(Connection)->Result) which first acquires a semaphore sized according to the max number of connections in the pool and then executes f on the blocking pool. We'd then change all Store methods that right now just get a connection to use with_connection and do their work inside that.
Once we do that, we should also remove the semaphore introduced in #1522

We have with_conn now so the API question is solved. Maybe we don't use it everywhere we should but keeping this issue open isn't what's going to solve that.

Actually we have way too much spawn_blocking around our code to consider this done. This will be done when graph::task_spawn::spawn_blocking is no longer in use, since it assumes that a future may block.

cc @mangas because we discussed this during yesterday's standup.


added --input-fasta-file argument

This change is

LGTM! :shipit:

Coverage decreased (-0.8%) to 82.703% when pulling d96c79076b8c18adc0848497e62b23c62d729446 on cli-multiple-peptides into c0944eebb882c98f877d7702d49dff6a2095a19e on master.

@julia326 @tavinathanson Locally these tests work for me but on Travis they fail in a few instances with NetMHCpan returning 0 binding predictions. Do you think that might be related to recent changes in netmhc-bundle?

Weird, maybe related to switching the default definition of netMHCpan to 3.0? @iskandr if you git pull the latest bundle from master do the tests fail locally?

What's weirder is that travis-ci/pr passed but travis-ci/push failed - possible that it is a local issue?

@tavinathanson @julia326 Upgrading my local netmhc-bundle causes the same failures.
test.test_known_class1_epitopes.test_MAGE_epitope(NetMHCpan(alleles=['HLA-A*01:01'], epitope_lengths=[9]), 'ESDPIVAQY') ... ERROR
test.test_known_class1_epitopes.test_MAGE_epitope(NetMHC4(alleles=['HLA-A*01:01'], epitope_lengths=[9]), 'ESDPIVAQY') ... ok
test.test_known_class1_epitopes.test_MAGE_epitope(NetMHC3(alleles=['HLA-A*01:01'], epitope_lengths=[9]), 'ESDPIVAQY') ... ok

Now the question is: why? What's different about netmhcpan 3.0? Why does it return 0 predictions?
Expected 4 epitopes from <EpitopeCollection with 0 elements>

@tavinathanson @julia326 Using NetMHCpan from ipython gives the same result:
In [7]: NetMHCpan(alleles=["A0101"]).predict({"seq":"ESDPIVAQY"})
Out[7]: <EpitopeCollection with 0 elements>

Rebasing should fix this branch, we'll find out in a minute.

Coverage decreased (-0.8%) to 82.703% when pulling 2305e1c78cecd7edf15b820ef81ff9f21b1c66ec on cli-multiple-peptides into c0944eebb882c98f877d7702d49dff6a2095a19e on master.


Edge render order

Is there a way to force the order of edged rendered? I'm having a problem where I would like to highlight some edges, but less important edges are being drawn on top of them. See the screenshot for an example. I'd like the green edges to be on top and the gray edges to be below. I'm using the canvas render if it makes a difference.

also if its possible make the z-index cross elements,
I've made a cluster plugin that enables nodes and edges within nodes but the order of the rendering makes it irrelevant...

I'd like to leave a second on this issue^. I'm not a skilled web developer so I don't have any great ideas on how to fix this but I'd really really appreciate having this feature on my projects.

For this, you would have to design a custom renderer that would render cluster after clusters rather than rendering edges then nodes. The default renderer does not work this way for performance reasons but I can see the appeal of you use case.

You should see issue 820 about node and edges overlap rendering


Ollama floods /tmp with unnecessary libraries

This is what my /tmp dir looks after a few hours. I have no idea why ollama does this and why no cleanup is in place. ollama version is 0.1.24. haven't noticed this before this release.

The files in the /tmp directory are libraries bundled with the llama.cpp build. Normally the ollama application removes the files in the /tmp directory, for some reason it isn't. That being said, that folder is wiped clean on reboot, and it's safe to remove any file in that directory.

@knoopx can you try upgrading to the latest version?  Under normal circumstances, the system should clean these up on graceful shutdown, so if you're still seeing a lot of them, that might imply the server is crashing.  Can you check the server log and see if you see crashes?  If so, lets get to the bottom of those.

Do we have a environment variable to set this to another folder?

@glaudiston see ollama serve --help - this is covered by OLLAMA_TMPDIR


Awesome books: a complete website with navigation

Description:
This pull request enhances the Awesome Books application by adding new features and improving the overall user experience. The updates include the implementation of a navigation bar, three distinct content sections (Books List, Add Book Form, Contact Info), and a footer. The project's structure follows best practices for HTML, CSS, and JavaScript, and ensures a seamless user interface as per the provided wireframe.
Changes Made

Navigation Bar:

Added a responsive navigation bar with links to the Books List, Add Book Form, and Contact Info sections.
Implemented smooth transitions between sections using plain JavaScript to manipulate CSS classes.

Content Sections:

Books List: Displayed the list of books with options to add and remove books.
Add Book Form: Provided a form for users to input and add new books to the list.
Contact Info: Created a contact section with placeholder information for user interaction.

Footer:

Added a footer to the website, containing basic information and links.

Technical Details

Adhered to best practices, ensuring clean and semantic HTML markup. Applied consistent styling with CSS, following the provided wireframe as a design guide.
Used plain JavaScript to handle dynamic content and navigation. No external libraries or frameworks were used, ensuring lightweight and efficient code.
Ensured no linter errors were present and maintained clean, readable code. Followed best practices for JavaScript, including modular design and avoiding the use of this as specified.
Followed proper GitHub Flow for version control, including feature branches, regular commits, and a clean merge process.

How to Test

Clone the repository and navigate to the project directory.
Open the index.html file in a web browser to view the application.
Use the navigation bar to switch between the Books List, Add Book Form, and Contact Info sections.
Add and remove books using the provided form and buttons.
Verify that the footer is displayed correctly and contains the expected content.

screenshot of work done:

LGTM
Just one thing, please increase the size of the navbar... you can merge after updating it

This feedback is appreciated
The navbar size as been increased and the changes as been updated.


create-react-app should allow TypeScript imports outside src

Is your proposal related to a problem?
Code reuse is a good thing. It is not uncommon that a backend and a frontend can use the same code, and live in the same repository. The need for sharing code is particularly strong with TypeScript type definitions, because developers on the backend and the frontend want to make sure that they are building against a common types.
Describe the solution you'd like
I don't know the CRA internals, but maybe one of the following:

Allow baseUrl to point outside . to enable absolute imports like `import * as foo from 'common/foo``.
Enable relative imports outside src like import * as foo from '../../common/foo'.

Describe alternatives you've considered
There are work-arounds using a combination of third-party cra-patching libraries. They are tedious to setup though (I worked 3 evenings on coming up with a solution), potentially fragile, and the use case seems so fundamental that I'm very surprised that it is not to supported out-of-the-box.

Hi @bluenote10
You can disable this feature but only after eject operation of create-react-app project or use  react-app-rewired package this way you do not have to eject.

I know that it is possible, as I have documented in the link.
However the process to get there is out of proportion. The area of working against the CRA defaults is quite a mess for a newbie, and because the settings of CRA are hidden, documentation is poor. I worked on the solution for 3 evenings, roughly 3 hours each.  I thought the idea of CRA was to get people going quickly. After spending 9 hours on solving a problem that seems to be a basic requirement and facing limitations that have no clear motivation at all, I though I report my experience.

#8785

+1, typescript should be enabled for outside the src folder by default. Or at least there has to be a way to import typescript dependencies by relative path in package.json - which seems to be currently impossible to do, without ejecting and pretty much losing any benefit of cra.
  "dependencies": {
    "@mycore-ui": "file:./../mycore-ui"
   }

I'd think this should work even if the mycore dependency above is in written in typescript

Running into a similar issue. I have a types.ts that has an enum in it somewhere in my client/src folder. I imported this enum indirectly to the my server side for stub data. After doing so, the react-scripts build passed but the client build folder had an extra directory level: src w/ types.js in the enum inside, and build with the actually client build (which should be 1 directory level up). It's strange to me that importing this type from a folder not related to the client app would cause the client to build differently.

+1, I would say this is one of the deal-breakers for us, we have lots of shared components and utility functions/classes, and sharing them across multiple CRA projects has been more than painful.
Ofc we can hack our way through this, using things like react-app-rewired or craco, but it's not an ideal solution, and I
m curious to know why is this not supported out of the box?

just to document react-app-rewired/customize-cra workaround for anyone looking for a solution:

add external typescript source dependencies into project's package.json

  "dependencies": {
...
    "component-ui": "file:./../component-ui",
...
  },

install react-app-rewired and customize-cra and replace script build/start/test eact-app-rewired build/start/test
add config-overrides.js into cra project's root with

const {removeModuleScopePlugin, override, babelInclude, addWebpackAlias} = require("customize-cra");
const path = require("path");

module.exports = override(
  removeModuleScopePlugin(),
  addWebpackAlias({
...
    ["component-ui"]: path.resolve(__dirname, "../component-ui")
..
  }),
  babelInclude([
    path.resolve("src"),
    path.resolve("../component-ui/src")
  ])
);

with these changes, CRA starts detecting and building typescript codebases outside of the project src tree.

@ttaranov react-app-rewired stopped supporting CRA at version 2.0 and now we are at 4.0, so isn't this a very fragile setup?

This could be solved by adding support for simple Env setting that allows imports outside src-folder. Should not be such a big deal especially now that aliases are supported anyways.

@bluenote10 I had facing this problem lately, and I agree with you totally.
So I've just submit Add DISABLE_MODULE_SCOPE_PLUGIN option PR.

ModuleScopePlugin restricts import file outside /src internally, therefore we could import from everywhere if you disable it.

Is it explained somewhere why the restriction on not importing things from outside src/ exists? What do the CRA maintainers recommend for sharing e.g. TypeScript files with the frontend?

@erjiang Because ModuleScopePlugin working inside webpack.
This code block is setting on webpack config file that disable include file from outside src/.
Original motivation is here

  // Prevents users from importing files from outside of src/ (or node_modules/).
 // This often causes confusion because we only process files within src/ with babel.
 // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
 // please link the files into your node_modules/ and let module-resolution kick in.
 // Make sure your source files are compiled, as they will not be processed in any way.

quote from  #2189

I have a repo with structure like:
-- frontend-app1
|
--frontend-app2
|
--domain
|
----some common logic
With above setup I want to work on both apps with shared logics inside domain directory. It would be hard to rebuild this logic and setup it as package, then install from package manager in both apps - just to have it in node_modules directory.
Is there any chance that this option will be at least considered?

It should be noted that this TypeScript issue is a bit of a showstopper for enabling imports outside src.
Basically TypeScript has a bug (or design limitation?) that allows it to import from a "foreign" node_modules folder. This can have nasty consequences: For instance you forget to specify dependency foo in your package.json in your "frontend-app1". But in "frontend-app1" you make an import to "domain" which uses foo. If "domain" contains a node_modules folder TypeScript may accidentally use foo from there. I.e., you can end up in situations where the dependencies in "frontend-app1" are incomplete without realizing. Or it could cause headaches, because you assume you're using version X as specified in the local package.json but you're rather using version Y from that foreign node_modules.
Ideally that TypeScript issue should be fixed first to allow for sensible cross-folder imports.

For instance you forget to specify dependency foo in your package.json in your "frontend-app1". But in "frontend-app1" you make an import to "domain" which uses foo. If "domain" contains a node_modules folder TypeScript may accidentally use foo from there. I.e., you can end up in situations where the dependencies in "frontend-app1" are incomplete without realizing. Or it could cause headaches, because you assume you're using version X as specified in the local package.json but you're rather using version Y from that foreign node_modules.

That actually sounds like a good argument. However, there could be an easier way to tell TS that I eventually want to hurt myself and import something outside src directory.

I ended up side stepping this issue by syncing sources from a shared directory into one inside src using lsyncd. It's easiest if your shared directory is an npm package, Webpack will resolve dependencies from the nearest node_modules so the react app doesn't need to reference internal dependencies of the shared package.

I have the exact same situation as @sculpt0r described above. I have had to make some shared npm packages to share things across different CRA apps, but I would much rather be able to share components/logic across different CRA apps in a mono-repo. Please, please--for all the reasons described above-- allow us to import files outside of source.

It's a very common/useful structure to have multiple CRA apps/things within a monorepo
Any of the current solutions with ejecting, using rewired etc, are extremely difficult, finnicky, and brittle.

@lingdocs  Only removing that part will not solve the issue as I am struggling a few days to come up with a solution.

+1, typescript should be enabled for outside the src folder by default. Or at least there has to be a way to import typescript dependencies by relative path in package.json - which seems to be currently impossible to do, without ejecting and pretty much losing any benefit of cra.
  "dependencies": {
    "@mycore-ui": "file:./../mycore-ui"
   }

I'd think this should work even if the mycore dependency above is in written in typescript

no its not working for me

import {
CommerceContextProvider,
PrimeCatalogContainer,
PrimeCommunityBoardList,
PrimeCommunityBoardPage,
PrimeInstancePage,
PrimeNotificationContainer,
PrimeTrainingPage,
} from "@almLib/almLib";
here @almLib is declared in package.json
and still shows error
My goal is to access components from almLib which is outside of src

@ttaranov solution works well in 2022, for sharing a common logic folder between react and react-native projects in the same repo. Only JS and no JSX in there though - not sure if that would work.

@erjiang Because ModuleScopePlugin working inside webpack. This code block is setting on webpack config file that disable include file from outside src/.
Original motivation is here

  // Prevents users from importing files from outside of src/ (or node_modules/).
 // This often causes confusion because we only process files within src/ with babel.
 // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
 // please link the files into your node_modules/ and let module-resolution kick in.
 // Make sure your source files are compiled, as they will not be processed in any way.

quote from #2189

This sounds like a joke. What if we want to reference a file that doesn't need any babel processing?

I am also encountering similar issues to others in the threads, and the hacky solutions proposed did not work for me. This is definitely an important ask

I am currently working on an app using Electron and React.
I am in a situation right now where I have several enums and other data/functions that need to be shared between the src and electron folders, but this is not possible.
This has led to me copy pasting the same data/functions to separate directories and having to update both when a change is made. Horrendous.

+1.
Significant limitation of CRA; looking forward to a resolution.

Vite does this perfectly among other things, if you want a lightweight OOTB-usable framework for React that has hot reload and produces static assets I think it's the reasonable choice.

When is this change going to be made to allow outside of /src? Any ETA?

Hi guys I don't know if this might be helpful to you, but I published this npm package  so I could "inject" the code inside a CRA project rather than eject itself.
This solution has few issues though:

I lose the hot-reload of the component I want to inject. I had to build everytime I make a change (or I could work inside the lib folder for small changes, then rewrite them into the ouside folder "src"),
[less important] If there are any other files (such as .svg) inside the src, I had to specify inside the "build" script.
The main problem was the hot-reload for me. That's why I was searching for other solutions. But maybe this solution can help someone

I just tried doing a whole project in Vite and it does this perfectly among other things, if you want a lightweight OOTB-usable framework for React that has hot reload and produces static assets I think it's the reasonable choice.

This reply helped a lot, seems the world is moving away from create react app, this works by default in Vite

I am having similar issue, but it occurs only when I build application from Linux container. When I build from my local widow machine it works fine.
is it some environment issue?
Also how does it allow us to import controls from node_modules folder which is outside SRC directory as well.