mempool allocator is broken

There is a bug in mempool implementation. When memory is allocated allocator gets an available block and if it is large enough it splits these block into 4 smaller blocks. This is repeated until allocator reaches the smallest block that satisfies the request. When block_free is called situation is reversed and when 4 neighboring blocks are found to be free allocator concatenates them and returns to the pool as one larger block.
The problem is that to avoid the locking allocator allows a situation when big block or 4 smaller blocks are taken from the pool before the split or merge. Author seemed to know about this limitation and added -EAGAIN that would allow alloc to retry but:

first, when there are no free blocks -ENOMEM is returned: even though these blocks may be at the moment be reserved for concatenation _sys_mem_pool_block_alloc will not be able to see them, the same happens when block_free is merging blocks,
second, this solution is non-stable: when free is performed by lower priority context and will be interrupted by high priority context just before block_free is about to be recursively called, memory will never be reported as free even if we switch to -EAGAIN in the _sys_mem_pool_block_alloc.

To replicate the problem with higher probability create two context competing for allocation (threads or thread/interrupt) and add busy wait just before block_free is recursively called.
There is also question of performance impact. Note that at the moment code is merging smaller blocks in every call to free and break it again with every alloc. Note that in normal situation application will be allocating small blocks only to free them short time later. Wouldn't it be better to merge blocks only when application requests bigger chunk?
I also think that operation of split and merge should be done atomically with free/alloc. If merge is done only on big chunk request the impact may not be big and the code would be stable.

@pizi-nordic

Temporary fix https://github.com/zephyrproject-rtos/zephyr/pull/11106

There is also question of performance impact. Note that at the moment code is merging smaller blocks in every call to free and break it again with every alloc. Note that in normal situation application will be allocating small blocks only to free them short time later. Wouldn't it be better to merge blocks only when application requests bigger chunk?

I also think that operation of split and merge should be done atomically with free/alloc. If merge is done only on big chunk request the impact may not be big and the code would be stable.

Can you file enhancements for these two points, and we can use this ticket to track the incorrect behavior you noticed?

I'll take this one.  @pizi-nordic set me straight on the need, see comments in the linked patch.

Thank you!

Root cause fix up in #11220, should be good to go though I didn't wait for a full sanitycheck on my end before pushing.


Add faceting

Facets would be returned within the meta response.

If faceting is on, limit=0 is allowed (return facets, but no documents) - will this work with Atlas Search?

If faceting is on, limit=0 is allowed (return facets, but no documents) - will this work with Atlas Search?

Or switch to $searchMeta when limit=0.


Move no-warn-orphans into Cabal test suite

Or, it doesn't really make sense to mandate this across all tests.


Added gemma specific fp8 quantization file

What does this PR do?
There is an accuracy issue on Gemma fp8 run and it's not shown on bf16 run.
And it appears that some blocks can not be run as fp8.
Added Gemma specific quantization file with blocklist.

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


enable pushState on browser history

The original pure JS framework7 has a pushState property in it's initiation configurations. It enables the browser history control and synced routing with URl. In the framework7-react docs, It's written that all those configuration props are supporter. Although I use pushState as a prop on Framework7App component, It doesn't enable this feature.
export const App = () => (
  <Framework7App pushState={true} routes={routes}>
    <MainView />
  </Framework7App>
)

I have the same problem. This prop will show correct url when access pages, right?

Right. for example if you set a /about/ path and About component on routes, by visiting /about/, It gotta mount About component and update the window.location.href.

Yep. I did think that is my mistake. Kkkk So, let's wait the dev answer.

I've tested here and works it. What's your version?

1.6.2

1.6.2? But the last version is 0.8.5.

I thought you are referring to framework7 version. 0.8.5-beta.10

I'm sorry. You said about BROWSER HISTORY. That not works here.

I can't even get my hashHistory work.

@farskid - hash history should be working. For example, if I go into the Framework7App component in the kitchen sink and add a prop for pushState={true} just like you did, I can navigate around the kitchen sink and see the URL change in the browser.
Does it work in the kitchen sink for you? If so, perhaps you could share what your <MainView /> component looks like?
If you get into more advanced use cases beyond hash history, you'll likely run into some trouble. The router in Framework7 Vue still needs some work in order to be able to support all of the use cases that React Router and Vue Router do. You can see that there are several open issues about the router / push state in Framework7 Vue:  https://github.com/nolimits4web/Framework7-Vue. Framework7 React basically just converts the Vue components into React components, so the same issues exist in Framework7 React.

@bencompton Could you please tell me where I can find framewrok7-react kitchen sink?

Check out these instructions:
https://github.com/bencompton/framework7-react#kitchen-sink.
Alternatively, if you don't already have the kitchen sink running, it might be quicker for you to clone a starter template and set pushState={true}:
https://github.com/bencompton/framework7-react-app-template
It should work equally well in either.


Microsoft Go 1.21 tar.gz directories are out of order, causing dir timestamps to be reset to now

Found this while looking into why this check detected bad timestamps:
https://github.com/docker-library/golang/commit/81c0d3115b37997c04828faba09440fd9fffce33#diff-b3c0fcf605d397bd3fce8ea61588d2c9da8b24a9fe6886b2e640d97914f1d01fR147
(This is a check in the Go official image community maintained Dockerfile that looks for files that were inadvertently changed during the build process, which could impact reproducibility.)
Our 1.21 tar.gz files are generated by tooling maintained in this repository. tar -tvvf go...tar.gz | less shows this:
-rw-rw-r-- cloudtest/cloudtest      648 2024-07-02 14:56 go/go.env
-rw-rw-r-- cloudtest/cloudtest      390 2024-07-02 14:56 go/lib/time/README
drwxrwxr-x cloudtest/cloudtest        0 2024-07-02 14:57 go/lib/time/
drwxrwxr-x cloudtest/cloudtest        0 2024-07-02 14:57 go/lib/
-rw-rw-r-- cloudtest/cloudtest     2161 2024-07-02 14:56 go/lib/time/mkzip.go
-rwxrwxr-x cloudtest/cloudtest     1882 2024-07-02 14:56 go/lib/time/update.bash
-rw-rw-r-- cloudtest/cloudtest<PHONE_NUMBER>-07-02 14:56 go/lib/time/zoneinfo.zip
-rw-rw-r-- cloudtest/cloudtest      919 2024-07-02 14:56 go/misc/cgo/gmp/fib.go

Note that the go/lib/time/README is before go/lib/time/. My understanding is that tar -xzf goes through one entry at a time, and if the folder doesn't exist for a specified file tar creates it. That is why when you extract it, go/lib/time/ shows up with the current time, not 2024-07-02:
$ ls -la go/lib
[...]
drwxr-xr-x. 10 dagood dagood 4096 Jul  2 14:57 ..
drwxr-xr-x.  2 dagood dagood 4096 Jul 19 15:55 time

(However, if that reasoning is correct, I'm not sure why go/lib/ has the correct/preserved timestamp. Something more complicated might be going on. (Maybe a dir's timestamp is only set in stone once there's a file in it? There are no files in go/lib.))
In 1.22, we switched to use upstream's tar.gz creation process. (#912) As a result, our 1.22 tar.gz files have a better order (and better permission, clears out the user, etc.):
-rw-r--r-- 0/0             648 2024-06-27 15:11 go/go.env
drwxr-xr-x 0/0               0 2024-06-27 15:11 go/lib/
drwxr-xr-x 0/0               0 2024-06-27 15:11 go/lib/time/
-rw-r--r-- 0/0             390 2024-06-27 15:11 go/lib/time/README
-rw-r--r-- 0/0            2161 2024-06-27 15:11 go/lib/time/mkzip.go
-rwxr-xr-x 0/0            1882 2024-06-27 15:11 go/lib/time/update.bash
-rw-r--r-- 0/0<PHONE_NUMBER>-06-27 15:11 go/lib/time/zoneinfo.zip
drwxr-xr-x 0/0               0 2024-06-27 15:11 go/misc/

This preserves the timestamp properly:
drwxr-xr-x. 10 dagood dagood 4096 Jun 27 15:11 ..
drwxr-xr-x.  2 dagood dagood 4096 Jun 27 15:11 time

Note that upstream, Go uses distpack for 1.21 and 1.22 releases (which we use only for 1.22). That's one reason why the official Go image Dockerfiles' timestamp check is working for official builds of Go.

I don't think this is worth fixing. For one thing: 1.23 is coming out soon, dropping 1.21. Another: microsoft/go-images doesn't rely on the same amount of reproducibility because we aren't relying on the Docker --link feature being used upstream. We can just remove the check.

1.21 is out of support. Closing.


Checkbox support / Dropdowns with multiple selection at a time

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
from fastapi import UploadFile, File, Request, Query
app = FastAPI()
@app.get('/selections')
async def selection_and(_q : str= Query("regression", enum = ["regression", "classification"]), _p : str = Query("target", enum = ['target', 'response'])):
    return({"task": _q, "target": _p})

Description
Is there a way to create checkboxes based on dynamic user inputs with FastAPI and use the checkbox answers to further analyze. Also, looking for dropdowns/search bars with multiple selection to select variables. I am able to incorporate dropdowns with one selection at a time.
Already referred this: https://eugeneyan.com/writing/fastapi-html-checkbox-download/
Best Regards,
Operating System
Windows
Operating System Details
No response
FastAPI Version
0.68.0
Python Version
3.8
Additional Context
No response

https://swagger.io/docs/open-source-tools/swagger-ui/customization/plugin-api/
Fastapi just makes use of swagger ui so you'll get more support on their GitHub repo if you need it. Could you close out this issue as it is not to do with fastapi

Could you please elaborate how to integrate it in FastAPI? Swagger UI supports it as show here. `/pet/findByStatus

@gauravgund I tried as following for multiple selection. And is working. Swagger-ui supports it as I mention in above comment. Swagger json requires 'array' type. For FastApi to generate 'array' type, we need to supply Array and for this case List/list worked.
`from enum import Enum
from typing import List
from fastapi import Query
class MyEnums(str, Enum):
item_1 = "item_1"
item_2 = "item_2"
item_3 = "item_3"
@api_routes.post( '/multi-selection')
def multiSelectionField(singleSelctionDropdown: MyEnums, multiSelctionDropdown: List[MyEnums] = Query(...)):
singleDropdownValue = singleSelctionDropdown.value
multiSelectionList = [item.value for item in multiSelctionDropdown]`
Also you can check this issue. It provides more info on dropdowns.

https://swagger.io/docs/open-source-tools/swagger-ui/customization/plugin-api/
Fastapi just makes use of swagger ui so you'll get more support on their GitHub repo if you need it. Could you close out this issue as it is not to do with fastapi

Could you please elaborate how to integrate it in FastAPI? Swagger UI supports it as show here. /pet/findByStatus

@gauravgund I tried as following for multiple selection. And is working. Swagger-ui supports it as I mention in above comment. Swagger json requires 'array' type. For FastApi to generate 'array' type, we need to supply Array and for this case List/list worked.
from enum import Enum
from typing import List
from fastapi import Query

class MyEnums(str, Enum):
    item_1 = "item_1"
    item_2 = "item_2"
    item_3 = "item_3"

@api_routes.post( '/single-multi-selection')
def singleMultiSelectionField(singleSelctionDropdown: MyEnums, multiSelctionDropdown: List[MyEnums] = Query(...)):
    singleDropdownValue = singleSelctionDropdown.value
    multiSelectionList = [item.value for item in multiSelctionDropdown]

Also you can check this issue. It provides more info on dropdowns.

Anyone here have issues running  List query params in aws-lambda? The code works as expected in my local machine. However, only the last item were returned when running on aws lambda. The request url correctly transform the query param to /multiselect?items=item_1&items=item_2. Below is my sample code.
Setup:
ALB+Lambda
fastapi v0.89.0
mangum v0.17.0
Returns => ["item_2"] Assuming i selected item_1 and item_2
from enum import Enum
from typing import List

from fastapi import FastAPI, Query
from mangum import Mangum

class MyEmums(str, Enum):
    item_1 = "item_1"
    item_2 = "item_2"
    item_3 = "item_3"

app = FastAPI(title="My App")

@app.get("/multiselect")
def multiselect(items: List[MyEmums] = Query(...)):
    return items

handler = Mangum(app)

Might be worth raising this on Mangum repo 😄


[webportal] Fix sdk request timeout

Coverage remained the same at 34.484% when pulling aa73be506a8860085e01c9fd5338f911874a9959 on yiyi/webportal_fix_sdk_request_timeout_1 into a484c061d39ed59acf5e36665f9ec19df33b8b5e on pai-1.1.y.


[Ember.js] [API] status code for HTTP API delete responses

In working on #2849, I've run into an issue where Ember wants to call .set() operations on post model objects after they have been deleted (i.e., had destroyRecord() called on them), and this causes Ember to throw exceptions.
I believe this is because Ghost is currently returning status 200 and the JSON for the object in response to DELETE requests to the HTTP API.  According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7/ I feel like we should be returning 204 with an empty response body.
I've changed the API response locally and confirmed that everything works as expected with a 204 response.
Thoughts?
(refs #2187)

I believe the reasons why we couldn't do this before are now gone?
The cache invalidation code no longer needs to know what was deleted and I think that it should be possible to output deletion notifications from Ember without having to return the details of the deleted post from the API?
Wondering if it's worth revisiting this and getting it done now, as it would simplify some code as well as result in a more standard API?

I have a branch that does some refactoring and optimization of post deletion and tag relations. I'll open a PR for that and then build the changes for this on top of it.


Fix metadata.json syntax error

$ brake librarian:package --verbose
/opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/json_pure-1.8.1/lib/json/common.rb:155:in `parse': 757: unexpected token at '{ (JSON::ParserError)
  "name": "ajlanghorn-rcs",
  "version": "0.1.1",
  "author": "Andrew Langhorn",
  "summary": "Manage Ubuntu rCS boot script behaviour using Puppet.",
  "license": "Apache-2.0",
  "source": "https://github.com/ajlanghorn/puppet-rcs",
  "project_page": "https://github.com/ajlanghorn/puppet-rcs",
  "issues_url": "https://github.com/ajlanghorn/puppet-rcs/issues",
  "operatingsystem_support": [
    {
     "operatingsystem":"Ubuntu",
     "operatingsystemrelease": [ "14.04", "12.04" ]
    }
  ]
  "dependencies": [
    {"name":"puppetlabs-stdlib","version_requirement":">= 4.0.0"}
  ]
}

'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/json_pure-1.8.1/lib/json/common.rb:155:in `parse'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/lib/librarian/puppet/source/local.rb:108:in `parsed_metadata'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/lib/librarian/puppet/source/local.rb:65:in `module_version'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/lib/librarian/puppet/source/local.rb:34:in `fetch_version'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:121:in `fetch_version!'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:113:in `fetched_version'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:59:in `version'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:97:in `satisfies?'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/dependency.rb:121:in `satisfied_by?'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:103:in `block in check_manifest'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `each'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `find'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `check_manifest'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:63:in `block in recursive_resolve'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:in `block (3 levels) in resolving_dependency_map_find_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in `block in scope_checking_manifest'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in `scope_checking_manifest'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:in `block (2 levels) in resolving_dependency_map_find_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in `block in map_find'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `each'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `map_find'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in `block in resolving_dependency_map_find_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in `block (2 levels) in scope_resolving_dependency'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in `block in scope_checking_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in `scope_checking_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in `block in scope_resolving_dependency'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in `scope_resolving_dependency'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in `resolving_dependency_map_find_manifests'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in `recursive_resolve'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:50:in `resolve'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/resolver.rb:23:in `resolve'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:26:in `run'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:67:in `install'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:82:in `package'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
	from /opt/boxen/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-2.0.0/bin/librarian-puppet:7:in `<top (required)>'
	from /opt/boxen/rbenv/versions/1.9.3/bin/librarian-puppet:23:in `load'
	from /opt/boxen/rbenv/versions/1.9.3/bin/librarian-puppet:23:in `<main>'
rake aborted!

/Users/ajlanghorn/govuk/puppet/lib/tasks/librarian.rake:7:in `librarian_run'
/Users/ajlanghorn/govuk/puppet/lib/tasks/librarian.rake:19:in `block (2 levels) in <top (required)>'
Tasks: TOP => librarian:package
(See full trace by running task with --trace)

This looks to have been fixed. #12 adds metadata.json syntax checking in Travis.


Alternatives for this python package.

To anyone who's planning to try the repository, you can try Flask-JWT-Simple and Flask-JWT-Extended instead as alternatives for this repository. Both repositories offer easy access to JWT functionalities, without much of a hassle to be implemented with.
Took me around 2 hours to realize that the project's last update was 3 years ago, making it more vulnerable to code and unit test errors. Save your time and use the alternatives I've presented above.

Flask-JWT-Extended is pretty nice so far.


[SPARK-49773][SQL] uncaught Java exception from make_timestamp() with bad timezone

What changes were proposed in this pull request?
This PR proposes to fix the uncaught Java exception from make_timestamp() with bad timezone
Why are the changes needed?
To improve the error message
Does this PR introduce any user-facing change?
No API changes, but the user-facing error message is changed:
Before
spark-sql (default)> select make_timestamp(1, 2, 28, 23, 1, 1, -100);
Invalid ID for ZoneOffset, invalid format: -100

After
spark-sql (default)> select make_timestamp(1, 2, 28, 23, 1, 1, -100);
[INVALID_TIMEZONE] The timezone: -100 is invalid.  The timezone must be either a region-based zone ID or a zone offset. Region IDs must have the form ‘area/city’, such as ‘America/Los_Angeles’. Zone offsets must be in the format ‘(+|-)HH’, ‘(+|-)HH:mm’ or ‘(+|-)HH:mm:ss’, e.g ‘-08’, ‘+01:00’ or ‘-13:33:33’., and must be in the range from -18:00 to +18:00. 'Z' and 'UTC' are accepted as synonyms for '+00:00'. SQLSTATE: 22009

How was this patch tested?
CI
Was this patch authored or co-authored using generative AI tooling?
No

cc @srielau @cloud-fan

Thanks for the fix!

Added test. Thanks!

Merged to master.
Thanks @srielau and @MaxGekk for the review!


Fix Puppeteer launch with browserWSEndpoint

Puppeteer crashes with WebSocket is not open: readyState 3 (CLOSED) because we call closeOtherTabs before set a current page.
Example config
Puppeteer: {
            url: "http://localhost",
            chrome: {
                browserWSEndpoint: "ws://localhost:9990/devtools/browser/1bcc1a6c-faa7-42c2-a229-ac20ebac7b36",
                ignoreHTTPSErrors: true
            }
        },

Thanks!


General Grievance: Watch junaidwithdigitalmarketing.blogspot.com

General Grievance requests the watch of the watch_keyword junaidwithdigitalmarketing\.blogspot\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

junaidwithdigitalmarketing\.blogspot\.com has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Rejected by Jeff Schaller in Charcoal HQ. Reason: 'should drop the .com from the end for blogspot watches'


creation of lists with the possibility to check or uncheck.

I would like to ask you for support in creating lists, To do list
with an option to check and uncheck
thank you very much for this application

Would you like to make notes as checked/unchecked or To-do list support inside notes?

hello
yes I would like to be able to create a shopping list. or a to-do list.
yes directly in a note, maybe better, if we want to add text before or after. thank you
when i have more free time, i will make a french translation.

This would be very helpful.

Is this feature now available?

@Xandorion not yet.


Support homebrew

👋 just heads up, I have included this tool into homebrew-core, it would be nice to have some english descriptions about the project. :)

Thank you for your support.


Month-view with 5-day workweek does not show month label (when 1st is on weekend)

Codepen
https://codepen.io/Gumaa/pen/jOOBwLp
Describe the bug
When showing month view with 5 day work week enabled month label does not show when the first day of the month is on weekend. Label should be shown on first available day of the month.
To Reproduce
Steps to reproduce the behavior:

Create QCalendar
Add prop: :weekdays="[1,2,3,4,5]"
Add prop: view="month"
Go to December 2019
There is no month label shown for December

Expected behavior
There should be moth label on the first available day (2nd of December in that case)
Screenshots

@Gumaa Thanks for reporting this. I'll work on it as soon as I swing back around to QCalendar. :heart:

Fix will be in v1.0.8


App Scan non-Serialized Datamatrix Code

PL user story: #93 (see full overview for additional information)
Description:
Changes to the App and decoding in order to be able to scan and get the ePI for a non serialized Datamatrix code:

The ability to scan and decode a GS1 Datamatrix code without an serial number

Some markets do not have serialization but have a Datamatrix code with the GTIN, Batch and Expiry Date encoded.

The Datamatrix has the following Application Identifiers:
AI01 (GTIN)
AI10 (Batch Number)
AI17 (Expiry Date)

The rules for decoding could be:

Acceptance criteria's:
positive tests

create a non-serialized batch. (refer to #100)
create a GS1 Datamatrix with a correct GTIN, Batch and Exp Date details, when scanned this should provide the ePI.
Code with GS used as the separator

Code with FNC1 used as the separator

negative tests / error path testing

create a non-serialized batch.
create a GS1 Datamatrix with a correct GTIN, incorrect Batch and Exp Date details, when scanned this should not provide the ePI (refer to ADD REFERENCE)

Process scenario:

The attached document gives an overview of the different barcodes that are commonly used. This is for information purposes only.
Barcodes and Resolver v0.4.pdf

Additional information:
If a Datamatrix code with correct GTIN, Batch and Exp Date details is scanned with the current version then the following happens:

on the Web App(using Edge):

on an IOS

It also seem to cause the App to crash but I could not re-create this. I am not reporting this as a bug because the system was only designed to ready serialized Datamatrix codes.

tested with for Scandit scanner library: everything works as expected


Message-parameter for MethodStubVerificator

As a developer I want to set a custom message in a "verify"-command. If the verification fails, I want this message to be displayed (like with expect commands in Chai or with https://github.com/mattphillips/jest-expect-message/tree/main)

Good idea, here it is: https://github.com/TypeStrong/ts-mockito/pull/46


Incorrect total number of account in Manage website access screen when upgrade version

Describe the bug
Incorrect total number of accounts in Manage website access screen when upgrade version
Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./upgrade-ui-build-1.0.2-1-2023-04-13T13-07-40UTC.zip
Actual: Incorrect total of number

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./upgrade-ui-build-1.0.2-1-2023-04-14T12-15-12UTC.zip
Validation passed.


New tests and dead code removal

New tests for:

transaction: make_fully_valid, serialise, get_dust_return_pubkey, compose
script: scriptpubkey_to_address, get_asm, pubkeyhash_array

Removed unreachable condition and fixed exception message in transaction.get_multisig_script

Coverage increased (+0.68%) to 67.64% when pulling 9cbe9da5ee39df549ba5108464b19c53d2663e1a on Millz0r:develop into 9936782da8ef17636df59208039d603aaece45df on CounterpartyXCP:develop.


Issue/926: Make TBD Monthly Spotlight clickable

What type of PR is this? (check all applicable)

[ ] ♻ Refactor
[ ] ✨ New Feature
[ ] 🐛 Bug Fix
[ ] 📝 Documentation Update
[ ] 👷 Example Application
[ ] 🧑💻 Code Snippet
[x] 🎨 Design
[ ] 📖 Content
[ ] 🧪 Tests
[ ] 🔖 Release
[ ] 🚩 Other

Description

This PR fixes this issue.
Related Tickets & Documents

Resolves #
Mobile & Desktop Screenshots/Recordings

Added code snippets?

[x] 👍 yes
[ ] 🙅 no, because they aren't needed

 {contributorsData.map((contributor, index) => (
            <div
              key={index}
              style={{
                perspective: '1000px',
                width: '200px',
                position: 'relative',
                marginBottom: '20px',
                cursor: 'pointer', // this line was added
              }}
// ...

Added tests?

[ ] 👍 yes
[x] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

No tests? Add a note
It was just a CSS code change.
Added to documentation?

[ ] 📜 readme
[ ] 📜 contributing.md
[ ] 📓 general documentation
[x] 🙅 no documentation needed

No docs? Add a note
It was just a CSS code change.
[optional] Are there any post-deployment tasks we need to perform?
No

@KhoiUna thanks !! 🎉

@KhoiUna thanks !! 🎉

You're welcome. Glad to contribute a bit to open source!


cppcheck - warning (leveldb-1.10.0)

Original issue 171 created by Pavel.Pimenov on 2013-05-22T08:06:41.000Z:
[db\db_bench.cc:284]: (warning) Member variable 'SharedState::total' is not initialized in the constructor.
[db\db_bench.cc:284]: (warning) Member variable 'SharedState::num_initialized' is not initialized in the constructor.
[db\db_bench.cc:284]: (warning) Member variable 'SharedState::num_done' is not initialized in the constructor.
[db\db_bench.cc:284]: (warning) Member variable 'SharedState::start' is not initialized in the constructor.
[db\db_bench.cc:294]: (warning) Member variable 'ThreadState::shared' is not initialized in the constructor.
[db\db_impl.cc:46]: (warning) Member variable 'Writer::batch' is not initialized in the constructor.
[db\db_impl.cc:46]: (warning) Member variable 'Writer::sync' is not initialized in the constructor.
[db\db_impl.cc:46]: (warning) Member variable 'Writer::done' is not initialized in the constructor.
[db\version_set.cc:170]: (warning) Member variable 'LevelFileNumIterator::value_buf_' is not initialized in the constructor.
[doc\bench\db_bench_sqlite3.cc:315]: (warning) Member variable 'Benchmark::start_' is not initialized in the constructor.
[doc\bench\db_bench_sqlite3.cc:315]: (warning) Member variable 'Benchmark::last_op_finish_' is not initialized in the constructor.
[doc\bench\db_bench_sqlite3.cc:315]: (warning) Member variable 'Benchmark::done_' is not initialized in the constructor.
[doc\bench\db_bench_sqlite3.cc:315]: (warning) Member variable 'Benchmark::next_report_' is not initialized in the constructor.
[doc\bench\db_bench_tree_db.cc:291]: (warning) Member variable 'Benchmark::db_num_' is not initialized in the constructor.
[doc\bench\db_bench_tree_db.cc:291]: (warning) Member variable 'Benchmark::start_' is not initialized in the constructor.
[doc\bench\db_bench_tree_db.cc:291]: (warning) Member variable 'Benchmark::last_op_finish_' is not initialized in the constructor.
[doc\bench\db_bench_tree_db.cc:291]: (warning) Member variable 'Benchmark::done_' is not initialized in the constructor.
[doc\bench\db_bench_tree_db.cc:291]: (warning) Member variable 'Benchmark::next_report_' is not initialized in the constructor.
[util\cache.cc:170]: (warning) Member variable 'LRUCache::capacity_' is not initialized in the constructor.
[util\env_posix.cc:267]: (portability) The extra qualification 'PosixMmapFile::' is unnecessary and is considered an error by many compilers.

Compile with -Weffc++

Just tested. Issues now fixed.


SILGen: Fix accessor functions with @_backDeploy

Previously, the @_backDeploy attribute was ignored when generating SIL for accessors on declarations with the attribute since the accessor decls themselves were not directly annotated.
Also, emit an error when @_backDeploy is applied to coroutine accessors since they are not supported yet.
Resolves rdar://90112441

@swift-ci please test and merge


chore: add visual tests

This PR adds a visual testing stage to avoid issues like these in future:
#4092
#4083

[ ] update PR description
[ ] add notes to contributing guide

Codecov Report

Merging #4093 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4093   +/-   ##
=======================================
  Coverage   99.75%   99.75%
=======================================
  Files         180      180
  Lines        3231     3231
=======================================
  Hits         3223     3223
  Misses          8        8

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fbeed9...9cab9d6. Read the comment docs.


[AzureTools][Aspire] Fail to execute the command 'dotnet run' with an error for ASP.NET Web Application(.NET Framework) MVC/Web API project

Clean machine: Win11 x64 23h2 ENU
VS Version: VS 17.10.0 [34916.146.d17.10]
Aspire Version: 8.0.1
Apply NuGet Feeds
Podman Desktop: 1.10.2
Podman CLI: 5.0.3
REPRO STEPS:

Create a new ASP.NET Web Application(.NET Framework) MVC/Web API project -> Right click on the project -> Add -> .NET Aspire Orchestrator Support -> OK.
Run dotnet run in the AppHost.project folder.
Check whether succeeds to execute the command.

Expect:
Succeed to execute the command without any error.
Actual:
Fail to execute the command with an error.

More Info:
F5 successfully when F5ing this project on VS.

We aren't compatible with .NET Framework.

Actually the fact that this option showed up is a tooling issue.

OK so this works in VS, because in VS we build the project and then we rely on DCP to call VS to start the project (which it does happily). In the case of dotnet run, DCP launches the project which triggers a build via dotnet run which fails on the .NET Framework-based project.

Right, this isn't supported. It's not possible to run .NET Framework projects with .NET run, this only works in visual studio.


regression

Hi,
After upgrading to version 6 or 6.0.1, both IntelliJ Clion and Gitlab build runner (Debian) fail to find rust-analyzer which is clearly at
»ʚ which rust-analyzer /home/andrzej/.cargo/bin/rust-analyzer
in both bash and fish. For some reason, same program ran from command line does work, but not ran from IntelliJ. I can't tell why.
steps to reproduce (sorry for big repro):

checkout https://gitlab.com/njskalski/bernardo (with submodules!)
rustup component add rust-analyzer
and run from clion "show_usages_integ_test_1".

With version 5 - works.
With version 6 - fails to find rust-analyzer.
Weird.

So two things

Please don't mention Clion as a requirement in your issue if it's not required to run the unit test. You can run this just fine with cargo test show_usages_integ_test_1 and Clion adds a ton of complexity that I don't want when I'm bug hunting.
I can't reproduce this. This unit test still passes after I upgrade to which 6.0.1.

running 1 test
test big_tests::lsp_rust_integ::show_usages_test_1::show_usages_integ_test_1_INCOMPLETE ... [2024-04-06T22:43:21Z DEBUG bernardo::config::global_editor_options] discovering location of rust-analyzer
[2024-04-06T22:43:21Z WARN  bernardo::config::global_editor_options] using rust-analyzer from "/home/jacob/.cargo/bin/rust-analyzer"

Just for good measure, I went back and ran the unit test with<EMAIL_ADDRESS>using the CLion UI. I still wasn't able to reproduce the issue. If you experience further problems consider filing a bug with Clion.


Need feedback on this one

This is a spin off PR from PR https://github.com/LibertyDSNP/mrc/pull/109
@enddynayn  Should we rename all "delegate" to "provider" based off your comment on PR above

Merging it back to other PR, nothing else found which was out of the place


nhost-js from CDN

I want to use nhost in a site that doesn't have a build process. I found nhost-js on jsdelivr but when I include the script tag I get:
Uncaught ReferenceError: NhostClient is not defined

// AND

Uncaught ReferenceError: exports is not defined

I've tried a few things but nothing seems to work. Maybe I can't do what I'm trying to do?

Hello,
Our packages are now bundled into both ESM and CommonJS. This code worked:
<script type="module">
    import { NhostClient } from 'https://cdn.skypack.dev/@nhost/nhost-js'
    window.nhost = new NhostClient({
        backendUrl: 'http://localhost:1337',
    })
    console.log(window.nhost)
</script>

Also works in using https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>Closing this issue for now. Many thanks for your feedback!


feat: automated pub publish workflow

As a Dart/Flutter package developer, I want to have a reusable workflow that will automated the publish to pub.dev.

This still needs context to determine what the trigger for automated workflow should be.

This will be manually triggered when publishing is desired.

After some exploration and conversation, we decided that this is a wontfix.
Reasons:
1 - There is a matter of what value we are giving. There are some actions that take care of publishing and generating a changelog automatically is a too error-prone process.
2 -  Not everything can be automated: a tag has to be defined manually.


removed methods from the exported Node type

Document the removal of public methods in #286 in changelog

Closed by #748


Added support for extern variables file and extern images. #34

Here is the pull request that supports variables in external file and supplying image configuration from an external file.  My goal was to keep the system fully backward compatible.  If you do not change the parameters to running the main script, it should execute exactly as it did before.

new optional variables parameter allows different variables to be used in different situations. Defaults to FactoryVariables.ps1 if not specified
new optional variable $isoSearchDir that will be used to used to search for the named iso if not found in $workingDir\ISOs  directory.  This keeps me from having to copy ISO files from my MSDN download structure into the ISOs subdirectory.
new optional images parameter that allows user to use a CSV file to define which kind of VMs to create (Gen 1/2, x86/x64, GUI, Core, etc).  If not specified, it will use the embedded images defined at the bottom of Factory.ps1.  This option was added so that users do not need to edit Factory.ps1 to change which images they are interested it.  It also makes it easier to view/edit by opening in Excel. See images.md for file format.
If using CSV image file, the vhd image names will be generated automatically based on the column data.  The generated names should match the current format, For example,

 Directory of G:\_image-factory\Share

2016-10-26  03:02 PM    <DIR>          .
2016-10-26  03:02 PM    <DIR>          ..
2016-10-26  03:15 PM               924 Details.csv
2016-10-26  10:15 AM    24,129,830,912 Windows Server 2012 DataCenter with GUI - Gen 2.vhdx
2016-10-26  01:20 AM    15,674,114,048 Windows Server 2012 R2 DataCenter with GUI - Gen 2.vhdx
2016-10-26  04:23 AM    15,573,450,752 Windows Server 2012 R2 Standard with GUI - Gen 2.vhdx
2016-10-26  03:15 PM    25,941,770,240 Windows Server 2012 Standard with GUI - Gen 2.vhdx
2016-10-25  09:04 PM    12,654,215,168 Windows Server 2016 DataCenter with GUI - Gen 2.vhdx
2016-10-25  10:16 PM    12,620,660,736 Windows Server 2016 Standard with GUI - Gen 2.vhdx

Example usage from command line:
powershell.exe -File Factory.ps1 -images images-with-product-keys.csv -variables FactoryVariables-personal.ps1

I also added .gitignore file to prevent customized variables and product keys from being committed to github.  Users can create local copies of images.csv and FactoryVariables.ps1 with the following names and they will be ignored by git commands.
images-with-product-keys.csv
FactoryVariables-personal.ps1

I use the with product keys file for testing and updating and when ready, remove product keys and save as images.csv.

Thanks for merging this.


material-ui imports treeshakeable

There are some material-ui imports, which prevent webpack from tree shaking. So the whole material-ui is in the bundle, which leads to a bigger bundle size, and a longer compile time.
One example is:
src/_shared/KeyboardDateInput.tsx:5:import { IconButton } from '@material-ui/core'
Is it possible to change the imports?

Which version do you use? It should not be an issue with 3.2.

I was using 3.1.3, but I tried it now with 3.2.2 with the same result.
The code snippet of my ticket is from the current file

This issue also affects style imports for material-ui #15610


fix(exporter-jaeger): lazy require jaeger-client

Which problem is this PR solving?
The JaegerExporter currently does not support running in bundled environments, as requiring jaeger-client loads .thrift files from the file system. This causes problems in @opentelemetry/sdk-node as the JaegerExporter is required even though it is not being used (see #3521).
To circumvent this problem, this PR changes the approach of always requireing jaeger-client to do it once the constructor is actually called. Further added documentation to clarify that bundling is not supported with this package.
This PR does not add support for running the JaegerExporter in a bundled environment.
Fixes #3521
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

[x] Manual testing using the repoducer from #3521
[x] Existing unit tests

Alternatives I have considered

Pulling in relevant code from jaeger-client and pre-generating JS code from the .thrift files.

I decided against doing this as it would increase the maintenance burden on this repo, and would require significantly more work to get right.

Removing the JaegerExporter from sdk-node

The sdk-node package is deprecated, but I decided against doing this as it would break existing JaegerExporter users of the sdk-node package without warning.

Checklist:

[x] Followed the style guidelines of this project
[ ] Unit tests have been added
[x] Documentation has been updated

Would it be possible to require the whole jaeger exporter lazy from @opentelemetry/sdk-node instead? E.g. only require that one actually configured instead all of them.

Would it be possible to require the whole jaeger exporter lazy from @opentelemetry/sdk-node instead? E.g. only require that one actually configured instead all of them.

@Flarna Yes - I overlooked that this could also be an approach, and it's actually way more straightforward than this one here. I opened #3739 instead and will close this PR. Thanks for pointing this out :slightly_smiling_face:


Review final deliverable - examples and code

This issue is for Weiwu, Oleh, Sunil, and myself to review the deliverables for devcon.
To review:

Readme document
Solution design (decide if this should be part of the deliverable)
The working examples via Github pages

@AW-STJ / @colourful-land / @oleggrib - tagging you here as a task before Thursday to review the deliverables to Devcon / any progress update included. Thanks guys.


Running flutter on CL on Mac M1 returns 'sysctl -n hw.optional.arm64' returned unexpected output: ''

My flutter is in my path, as it triggers however returns 'sysctl -n hw.optional.arm64' returned unexpected output: '' as error and cannot run flutter doctor since it returns the same error. This happened after I tried to upgrade. I am using MacOs Monterey 12.5.1

Reinstalling fixed the issue


document: add missing sudo to intro install

the sequence of commands for build, install and running ovs components requires sudo statements which were missing from documentation.

Thanks for the patch!
This needs a Signed-off-by, as explained in the documentation for submitting patches.
This suggests sudo for ... in one place, which won't work.

Hi,
Thanks for your contribution.
I am closing this PR as it appears to have gone stale.
If you believe this change is still relevant then please do feel welcome to resubmit it using the preferred mechanism of the Open vSwitch project, the email workflow described in Submitting Patches.


Is there an event that is fired after a question's value changes and the question is re-rendered?

So, in my survey, I'm using a jQuery translation plugin that let's me define a dictionary of phrases, and the translations for each in each language.  The plugin basically looks for a class ("trn"), and then matches the text against the dictionary for things to translate.  This all works great for me in my surveys.
The problem I'm running into, though, is that after a question is answered, the question seems to re-render, at which time, all the text in that question goes back to English.  Is there an event that can be listened to that fires after that happens?  I've tried the "onAfterRenderQuestion" event, but it only fires once for each question, and not after the value is changed.  I've also tried the "onValueChanged" event, but the question seems to re-render itself after that event.
Any help would be great!

@SlowburnAZ Could you please describe your task in more detail?
What exactly do you need to translate to English? question and page titles?
Probably we will find/create a better solution. I guess the task, to have multiple language support for a survey, is a popular scenario.
Thank you,
Andrew

Sure..
So, the jQuery translator library I'm using looks for any element with a class of "trn", and compares the contents of that element against a JS object that contains different translations and replaces the content with translated text.  In my case, after the survey is rendered, I manually apply the 'trn' class to things such as the survey title, the text for each question and the question's choices, etc.  I then show a dropdown of the different available languages on screen along with the survey.  When the dropdown value changes, a call is made to the translator library, and the translations are applied.
Example dictionary:
var dict = {   "What is Your Age?": {     "english": "What is Your Age?",     "spanish": "¿Cuantos años tiene?"   } };
Example translator call:
translator.lang("spanish");
After that call, it will look at all elements with the class 'trn', and update the text to the text specified in that dictionary for the selected language.
That part works fine.  The problem occurs when an answer for a survey question is selected.  The question gets re-rendered, and the text for each element of the question returns to the default as specified by the survey model.
I'm looking to be able to catch an event that is triggered after the answer selection is made and the question is re-rendered, so I can then call the translator to translate the text again.
Does that help?

@SlowburnAZ What is your deadline? I may try to find the the reason why it doesn't work. Are you talking about this library? https://github.com/wsidl/jquery-translate
However, the best solution, it is to have the translated JSON.
Here is what we can do:

add a new property to JsonProperty object, isLocalizable, default is false.
Mark all required properties as IsLocalizable, for example question.title is localizable, but question.name is not, choices is localizable, where only text is localizable.
Add ability to store the localizable string together with the json, in the same object or as a separate dictionary. I am not sure the best way to do it. For example:

{
     type: "radiogroup",
     name: "favoritePet",
     title: "What is your favorite pet?",
     title-de: "Was ist dein Lieblingshaustier?",
     choices: [
      {
       value: "cat",
       text: "Cat",
       text-de: "die Katze"
      },
      {
       value: "dog",
       text: "Dog"
       text-de: "der Hund"
      }
     ]
    }

add ability to edit localizable text in the editor
use the right text on changing the survey.locale

I do not think that it will take a lot of time. Probably (4) will take some time, but I may release it without support it in the Editor.
What do yo think?
Thank you,
Andrew

@andrewtelnov
The library I'm using is here:  http://www.openxrest.com/translatejs/
My deadline is about 2 weeks from now.  I think that in the short term, if some event could be made to fire after the re-render, that would be perfect for my uses (example of the behavior for reference):

But longer term, I think what you're proposing is ideal:  To ultimately be able to configure all of this in the editor.  I assume that changing the survey.locale could be done on-the-fly, in response to something like what I've done, where you choose the language from a dropdown, and then make a call to change the survey.locale.

Sounds good, Andrew.
On Wed, Apr 5, 2017 at 10:30 AM, Andrew<EMAIL_ADDRESS>wrote:

@SlowburnAZ https://github.com/SlowburnAZ I have already started to
work on this functionality. I am pretty positive about it right now.
Let's me work on it till Monday. If I do not have an implementation at
this time, I will work on the short term solution.
Right now I see it as:
When there is no localization, the survey.locale is empty string
{
title: "Dog"
}
When there are several locales used:
{
title: {"default" :"Dog", "de": "Der Hunt"}
}
or another valid variant:
{
title: {"en" :"Dog", "de": "Der Hunt"}
}
If the library could not find a required locale, it will use the
"default", if there is no default, the first one will be used.
Additionally, I do not need to do anything in the Editor in the first
version. When the survey.locale property is an empty string, "default"
locale is used, when it is changed to another locale, for example "de", the
data is stored into "de".
Later there will be a localization window with all strings/locales in one
table.
Thank you,
Andrew
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/surveyjs/surveyjs/issues/316#issuecomment-291936283,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFZaIcguhKAq50nfYo7uhPOUpimObM8Vks5rs8-pgaJpZM4MzOVn
.

I have created a new issue: https://github.com/surveyjs/surveyjs/issues/320

@SlowburnAZ The feature is implemented: https://github.com/surveyjs/surveyjs/issues/320
You may build the library by yourself (see the Readme) and give a try.
All properties, that should be localizable, support the following syntax:
title: "The first question" or title: {"default": "The first question", "de": "Die erste Frage"} or title: {"en": "The first question", "de": "Die erste Frage"}.
We will publish the next version in several days. I have updated the Editor, it supports multiple languages as well. On changing the survey.locale property different from empty, the library starts to treat localizable strings as an object, with multiple values as shown above.
If you have any issue, please let me know.
Thank you,
Andrew

@SlowburnAZ surveyjs 0.12.7 is released. Here is the demo: http://surveyjs.org/examples/jquery/survey-multilanguages.html
Thank you,
Andrew

@andrewtelnov Awesome!  Thanks.  I'll give it a try.

@andrewtelnov Do I need to update to the latest Survey Builder as well?  It seems the structure of the surveys may have changed a bit.  When I updated to v0.12.9 of surveyjs, using survey model data created in v0.10.3 of the editor, and I select an answer to a question, the title is then displayed twice:

I also noticed that in the example of the multiple languages that you've provided, there's a difference in the structure of the survey model JSON.  For example, from v0.10.3 of the editor, it produces JSON that begins as such:
{
 "pages": [
  {
   "name": "page1",
   "questions": [
    {
     "type": "radiogroup",
     "name": "Visit Location",
     "choices": [
      "Lordsburg Clinic",
      "Animas Clinic",
      ...

The 'questions' property seems to have been changed to 'elements' in the multi-language example:
{
  locale: "de",
  pages: [
  {
    name: "page1",
    elements: [
    {
      type: "matrixdropdown",
      choices: [
      {
        value: 5,
        text: {
          default: "5 (the best)",
          de: "5 (Das beste)"
          ...

Lastly, will the "name" property for each question or choice also take an object with the localization strings in it, or does it have to be the "title" property?

@SlowburnAZ  The surveyjs should run all versions of models.
The first issue seems like a bug to me, could you share your model with me, so I can investigate the issue?
We have changed "questions" to "elements" after introducing the Panel in v0.12.7. Panel may contains questions and other panels. The old versions (v0.12.6-) of surveyjs could not understand the "elements" tag, but new versions of surveyjs could understand both "questions" and "elements".
Of course, only the latest versions of Survey Editor understands multi languages. After you change the survey.locale in the editor, editor starts to create the multi-languages tags.
So yes, you have to use v0.12.8 or higher editor and surveyjs library.
If you would use v0.12.7, for example, the multi-languages strings could not be read. It would expect a string and not an object.
name doesn't support multi-language, so it can be only a string. And I think it should not.
Thank you,
Andrew

The first issue seems like a bug to me, could you share your model with me, so I can investigate the issue?

And what version and platform do you use?

@andrewtelnov I'd rather not post the whole model publicly, so I'll send you the model to your email address directly.
I've updated the editor to 0.12.9, so that model will reflect that,  Running this all from Node on Ubuntu 16.04, latest Chrome browser.

Yes, I've got it. I will look at it tomorrow.
And what platform version of surveyjs do you use? JQuery, knockout, angular, react or vue?
Do you have handle any survey events?

For the Editor, I'm using Knockout.  For the Viewer side of things, I'm using jQuery.

@SlowburnAZ I have sent a link to plunker by e-mail.
Except this title duplication issue, do have other issues? I am very interesting in making sure that our multi language support works and I want to make sure you can use it successful.
Thank you,
Andrew

So sorry to waste your time, guys ...  it looks like both this and the issue with the matrix row.value not being set were caused by the translator plugin I had been using before you added multiple language support.

@SlowburnAZ No problem. I am glad that everything works fine!
Thank you,
Andrew


  Could you provide any code  to support  network  request ?

think you !


[lit-html] Prevent styleMap from writing to the 'style' attribute.

Internally, styleMap can't update the style attribute dynamically because it isn't allowed by the sanitizer. However, this directive already handles updates using the style property, so this change falls through to use that in all cases.

The tests are failing because of https://github.com/lit/lit/issues/1920.

@bicknellr #1920 was about a directive returning noChange removing the attribute, while #1921 is about nothing removing the attribute. #1921 is intended behavior, but #1920 is not. I think #1921 should be closed and #1920 reopened.

Actually, looking into this some... I'm not sure #1920 isn't WAI too. The question is what should render if we get noChange on first render? I'll take this to that issue, but here one workaround is to return undefined instead of noChange. That would emulate any change we might make for #1920 which would be to initialize with undefined instead of nothing.

This still has legit failures that I need to look at.


Set PACKAGE_VERSION in header file for CMake

Only set PACKAGE_VERSION on WIN32 if not set
Define PACKAGE_VERSION in .in file for CMake

I noticed that there was a value is set to 1.7.1, while ultimately it will be 1.7.2 after the release.

Some CMake runs failed for some reason...

/home/runner/work/libmaxminddb/libmaxminddb/t/version_t.c:6:21: error: ‘PACKAGE_VERSION’ undeclared (first use in this function); did you mean ‘MMDB_PACKAGE_VERSION’?
    6 |         is(version, PACKAGE_VERSION, "version is " PACKAGE_VERSION);
      |                     ^~~~~~~~~~~~~~~

That probably needs to become MMDB_PACKAGE_VERSION, like the compiler guessed.

The release script updates the version numbers to match the Changes.md. It looks like the failed build is due to the last commit I pushed. I'll fix that.

Thanks! In the end, I went with the changes from your PR. :slightly_smiling_face:

That's funny :) / in any case thanks for looking at this.
It's good that we can stop using our fork, I noticed you have made a few releases recently, so not sure if this small change is worth a new one. I have started using tarballs from release for building when I can as this make it a bit faster, or it feels like it, since you don't need to clone a repo and fetch all the history attached with it.


Auto reload video while receiving new url prop.

Hi,
So much thanks for your project. It helps a lot about what I want to implement. I just found a small defect: the component should auto-reload video once the url prop changed. It could be a solution to fix this.
Regards,
Grey Wang

Hello Grey,
I'm glad that this project has helped you with your projects! Thank you for this PR, I'll merge the commit and publish to npm a bit later.
Best,
Chris


Add support for 24GB VRAM fine tuning via 8bit optimizers

Caveats: Open to feedback on configuration - wasn't entirely clear how to separate it, but made it generic enough to pull in any optimizer from bnb.
Summary of changes

Introduces dependency on bitsandbytes
Introduces an optimizer flag to configure bnb usage
Documentation

Tests done
5k test wav dataset, stock model config, and stock pretrained model:
| Name          | Type                             | Params
0 | diffusion     | ConditionedDiffusionModelWrapper | 1.2 B
1 | diffusion_ema | EMA                              | 1.1 B
2 | losses        | MultiLoss                        | 0
1.1 B     Trainable params
1.2 B     Non-trainable params
2.3 B     Total params
9,080.665 Total estimated model params size (MB)
With VRAM usage observed:
Device 0 [NVIDIA GeForce RTX 3090] PCIe GEN 4@16x RX: 47.85 MiB/s TX: 7.812 MiB/s
GPU 1635MHz MEM 9501MHz TEMP  77°C FAN  97% POW 315 / 350 W
GPU[|||||||||||||||||||||||||||||||100%] MEM[||||||||||||||||||22.367Gi/24.000Gi]

Great work! Question - is it possible to make it an optional dependency? To divide the training and inference.


Windows stats::st_mode and stat flags type.

Synchronized the types of the st_mode property of the stat struct and the flags of the stat header file.

:umbrella: The latest upstream changes (presumably #3631) made this pull request unmergeable. Please resolve the merge conflicts.

Hi, I am the one who is working on the project to modernize the libc crate (Related: GSoC Idea GSoC Zulip).
I would like to ask that if I could rebase your commits to help merge them?

This seems reasonable for a breaking change: relevant source is at https://github.com/microsoft/win32metadata/blob/9bde55b65e3ed63b0473c47c1ef1c5d359c48945/generation/WinSDK/RecompiledIdlHeaders/ucrt/sys/stat.h#L91, Amanieu approved already.
@Lilit0x please rebase then this should be good to go.

Please run cargo fmt, then rebase and squash (to drop the merge commit)

Bit flags are commonly expressed in octal or hexadecimal. Is there any reason to change to decimal here? Using hex would make it easier to confirm that the values are equivalent to other files that define these bitmasks.

@Lilit0x ping, would you be able to update this?


Call to a member function insert() on boolean

Scanning PHP code fails on v4.7 for the this type of translation __("Foo %s", "bar")
This is working on v4.6.3
PHP Fatal error:  Uncaught Error: Call to a member function insert() on boolean in /vendor/gettext/gettext/src/Utils/FunctionsScanner.php:77
Stack trace:
#0 /vendor/gettext/gettext/src/Extractors/PhpCode.php(68): Gettext\Utils\FunctionsScanner->saveGettextFunctions(Array, Array)
#1 /vendor/gettext/gettext/src/Extractors/PhpCode.php(51): Gettext\Extractors\PhpCode::fromStringMultiple('<?php\nnamespace...', Array, Array)
#2 /vendor/gettext/gettext/src/Extractors/Extractor.php(18): Gettext\Extractors\PhpCode::fromString('<?php\nnamespace...', Object(Gettext\Translations), Array)
#3 [internal function]: Gettext\Extractors\Extractor::fromFile('/file_path/en_US/messages...', Object(Gettext\Translations), Array)
#4 /vendor/gettext/gettext/src/Translations.php(174): call_user_func('Gettext\\Extract...', '/file_path/en_US/messages...', Object(Gettext\Translations), Array)
#5 file_path: Gettext\Translations->__call( in /vendor/gettext/gettext/src/Utils/FunctionsScanner.php on line 77

Ok, I guess this is a bug introduced in #223
@briedis could you please fix this? I don't have free time these days.

I'll check it out

@mihaikelemen Could you provide more info?

Can you give me a code example that is failing?
What is the __ function, why does it have two arguments in your example? Is that a domain, context method?
Can you show the function configuration - which function is considered which?

By default, __ should have only one argument:

Hi @briedis ,
Sorry for the late response. I'm using this approach with the second argument for quite a while, based on the docs (see bellow). It is a handful approach.

Mihai

This the actual code (part of it) that generates the po file for a given locale (in this case ro_RO)
$files->files()
->name('/(.*)\.(tpl|php)/')
->depth('>=1')
->in($dirs);

$translations = new Translations();
$translations->setLanguage('ro_RO');
$translations->setDomain('messages');

# locale directory path
$dir = sprintf('%s%s/', $config->get('environment.locales'), 'ro_RO');
$potfile = sprintf('%s%s.po', $dir, $translations->getDomain());

if (!$filesystem->exists($dir)) {
    $filesystem->mkdir($dir, 0755);
    $filesystem->touch($potfile);
}

foreach ($files as $file) {
    $translations->addFromPhpCodeFile($file->getPathname());
}

if ($filesystem->exists($potfile)) {
    $translations->mergeWith(Translations::fromPoFile($potfile));
}

$translations->toPoFile($potfile);

Sorry @mihaikelemen for the delay, but I managed to run into this issue on my own too. A PR is created for the v4 branch. Actually the code to reproduce the issue was much simpler - just scan a file for one domain, but the file contains a single pgettext call without any strings from the domain you are searching for.

Hi @briedis ,
Thanks for your response. For now I'm using 4.6.3 until otherwise; eventually I will upgrade my code to run with the newer v5 branch.
Mihai


Change rpk configuration

What would you like to be added?
Helm Chart output includes a set of configuration flags that were changed (not deprecated, just hidden) in favor of the new -X flag. This was released in v23.2.
The changes are documented here: https://docs.redpanda.com/docs/get-started/intro-to-rpk/#common-configuration-properties
The goal of this issue is to change these flags in the output (for example, here: https://github.com/redpanda-data/helm-charts/blob/main/charts/redpanda/templates/_helpers.tpl#L411)
Why is this needed?
To be consistent across our different products. A similar change is being requested in the examples of our docs: https://github.com/redpanda-data/documentation/issues/1850
Please note that these flags are not deprecated and will continue working in future releases.
Added by @joejulian:
### Tasks
- [ ] Add rpk.yaml to configmap for internal connections
- [ ] Add new configmap with rpk.yaml for external connections
- [ ] change our tests to use the new rpk.yaml
- [ ] add instructions to NOTES.txt to download the rpk.yaml and use it on the command line (make sure a test matches these instructions)

Does this mean you can't put the configs in a config file now?

Yes, now we still support the rpk section in the redpanda.yaml but we encourage users to use the new profiles (rpk.yaml):
https://docs.redpanda.com/docs/get-started/config-rpk-profile/

This needs to be done to fix #662. mTLS doesn't work currently.

done


munmap_chunk(): invalid pointer

I have been trying to use @playform/compress v0.0.3 in combination with astro v4.6.3. I often ran into issues when trying to load my Astro site. The build process stopped with the following message:
14:16:59 watching for file changes...
14:17:04 [astro-icon] Loaded icons from flat-color-icons, tabler
14:17:08 munmap_chunk(): invalid pointer

After I removed @playform/compress from my astro.config.ts everything was fine.
This was my config:
import playformCompress from '@playform/compress';

// ...

playformCompress({
  CSS: true,
  HTML: {
    removeAttributeQuotes: false,
  },
  Image: false,
  JavaScript: true,
  SVG: true,
  Logger: 1,
})

Could my problems come from conflicting versions of sharp? Astro uses<EMAIL_ADDRESS>but @playform/compress wants<EMAIL_ADDRESS>

Should be fixed the latest astro-compress v2.2.23 and @playform/compress v0.0.4

I updated to @playform/compress v0.0.4 and it seems to work:

Compress:
✅ Successfully compressed a total of 1 CSS file for 429 Bytes.
23:49:34 [build] Waiting for integration "@playform/compress", hook "astro:build:done"...
✅ Successfully compressed a total of 294 HTML files for 304.97 KB.
✅ Successfully compressed a total of 1 JavaScript file for 5 Bytes.
✅ Successfully compressed a total of 1 SVG file for 4.91 KB.

Thank you for the fix! 🙏

For future reference the issue was that sharp was being imported at the main level of the module instead of where the code should be executed. sharp is now imported with:
await import('sharp')

only when it's needed. Glad it works. 🎉


term label has changed making it narrower, dos not fit existing annotations

Commenting on https://github.com/geneontology/go-ontology/issues/23260
I spotted that the term
ncRNA 3' end processing
has a label change to
small regulatory ncRNA 3'-end processing
This is incorrect
for my usage here
https://www.pombase.org/reference/PMID:34389684
and others where the ncRNAs are not "small"  some are  regulatory long ncRNA
can you make this back to the " ncRNA 3'-end processing" label

I think we could model this better, alluded to in this ticket
https://github.com/geneontology/go-ontology/issues/24161
The regulation of alternative polyadenylation pathway all seem to belong to a class of
"cotranscriptional 3’ processing of RNA polymerase II  transcripts"
(i.e torpedo model)
https://www.researchgate.net/publication/8149761_Shortcuts_to_the_end/figures?lo=1

@ValWood does that work for you?
There are other ncRNAs, such as tRNAs, snRNAs; were you also annotating these to the general 'ncRNA 3' end processing' term ?
Thanks, Pascale

No, but I think we are grouping different pathways here.
The pathway I'm using it for is always the RNA polymerase II coupled polyadenylation/termination pathway. I don't think that works on tRNAs snRNAs but I would need to double check that.

I'm not aware that RNAP II ever transcribes tRNAs.
However, snRNAs are a mix. In S. cerevisiae, if I remember correctly, RNAP II transcribes the snRNAs U1, U2, U4, & U5, while RNAP III transcribes U6. Which RNA polymerase transcribes each of these snRNAs may vary between species. Note that I know nothing about transcription of U1-atac, U2-atac, U4-atac, or U6-atac since they are not present in cerevisiae.
It may also be worth mentioning that transcription of snoRNAs is definitely a mixture, with some done by RNAP II and others by RNAP III, and which RNAP does which definitely varies between species.

In S. cerevisiae, if I remember correctly, RNAP II transcribes the snRNAs U1, U2, U4, & U5, while RNAP III transcribes U6.

refs for U6 txn by pol II in S.c in here:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5855946/
I wonder if this is a relatively recent thing evolutionarily and does not apply to other eukaryotes?
In pombe  U6 is spliced, which indicated that in fission yeast this one must be pol II transcribed.
It seems more generally that the other snRNAs are polyadenylated by similar  pol II-associated pathways as mRNA and ncRNA (for termination/3' processing and surveillance)
http://europepmc.org/article/MED/18951092
Presumably, tRNAs are polyadenylated by a completely different pathway (I can only see papers on tRNA polyadenylation for prokaryotes, or for human mitochondrial tRNAs)
@pgaudet this is why I think it makes more sense to still keep the polymerase groupings, and make these the primary organization, because many of the downstream pathways are polymerase specific (splicing and 3' end processing by polyadenylation for pol II and many processing events for pol I).  This will make it easier to  join modules later.

I thought the proposal was to make
'regulation of transcription' transcript-specific, but the non-regulatory processes (initiation, elongation, termination) and the processing would be polymerase-specific. Would that work ?

Ah right, I keep getting confused. This sounds OK. I'm finding it difficult to imagine all of the consequences, but this would probably be OK.
But what happens with regulation of  elongation, regulation of termination etc? are they still polymerase specific? (these are the things that connect to the different pathways like polyadenylation, but I suspect here we are dealing with a lot of 'affects' not regulation). There is definitely different signalling to CTD residues to regulate different termination sites.


Wrap Insertions of Resources with Transactions

Is your feature request related to a problem? Please describe.
N/A
Describe the solution you'd like
Wrap insertions of resources with a transaction due to the fact that we insert into multiple collections at once (resource and history). For more information on ACID Transactions, see the MongoDB website: https://www.mongodb.com/transactions. Mongoose provides an API for transactions here: https://mongoosejs.com/docs/transactions.html
Describe alternatives you've considered
N/A
Additional context
N/A

Also fix up the inconsistent error checking between requests


Mobile view

-Add mobile view of the festival
-Add styling for mobile view
-Add varying backgrounds

-Add mobile view of project


Fix missing include statements

There are a couple of includes missing.
This PR adds the missing statements.

Closing the PR as these changes will be include by @mc-nv with PA CI version bump as confirmed by @fpetrini15 offline.

Closing the PR as these changes will be include by @mc-nv with PA CI version bump as confirmed by @fpetrini15 offline.


Armor Rendering Registry: Render Layers

An additional feature for the Armor Rendering Registry, based off of Yttr's code.

Converting to draft for now, pending utility methods for registering non-dynamic custom models/render layers.

Hm, I assume that the requirements for getting this out of draft have been met?

oops

Hm, at this point, something tells me it would be better to rebase all Armor Rendering Registry work on 1.19.4

TODO: Armor Material Registry API for armor trim shenanigans.

If this is based off of yttr code this code either needs attribution as required by Yttr's license or @unascribed's blessing

Una has given her blessing on Greencord

Conflict with the fixed mixin needs to be fixed!

@Leo40Git can you resolve the conflicts on this PR?

oops, lemme do that rq

@EnnuiL @TheGlitch76 Conflicts resolved!
I'm considering the TODO for modifying armor trim textures (AKA custom armor trims) unresolvable until we have an ArmorMaterial registry, which I may claim later...

This PR has entered a Final Comment Period of 5 days!


[HOP-2715] Client-side canvas drawing on Hop Web

This PR allows client-side canvas drawing on Hop Web, and eventually fixes HOP-2715.
I tested on Hop GUI as well to make sure that this PR did not affect it.
Following this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a JIRA issue filed
for the change (usually before you start working on it).  Trivial changes like typos do not
require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Format the pull request title like [HOP-XXX] - Fixes bug in SessionManager,
where you replace HOP-XXX with the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the commit message.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[x] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.

Trivial changes like typos do not require a JIRA issue (javadoc, comments...).
In this case, just format the pull request title like (DOC) - Add javadoc in SessionManager.
If this is your first contribution, you have to read the Contribution Guidelines
If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement
if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

[ ] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
[ ] In any other case, please file an Apache Individual Contributor License Agreement.

Error:  Failed to execute goal on project hop-databases-greenplum: Could not resolve dependencies for project org.apache.hop:hop-databases-greenplum:jar:0.99-SNAPSHOT: Failed to collect dependencies at com.pivotal:greenplum-jdbc:jar:5.1.4: Failed to read artifact descriptor for com.pivotal:greenplum-jdbc:jar:5.1.4: Could not transfer artifact com.pivotal:greenplum-jdbc:pom:5.1.4 from/to pivotal (http://nexus.saas.hand-china.com/content/repositories/rdc/): Transfer failed for http://nexus.saas.hand-china.com/content/repositories/rdc/com/pivotal/greenplum-jdbc/5.1.4/greenplum-jdbc-5.1.4.pom: Unknown host nexus.saas.hand-china.com: Temporary failure in name resolution -> [Help 1]

Re-running the job.


Not able to use bumpversion. Error in git commit and tag

Hi,
I'm using Mac OS Sierra 10.12.5 and git version is: 2.9.2.
I'm using gpgsign to sign my commits. With the gpgsign turned on, It gives me error:
» bumpversion minor
Traceback (most recent call last):
  File "/usr/local/bin/bumpversion", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 994, in main
    vcs.commit(message=commit_message)
  File "/usr/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 73, in commit
    list(os.environ.items()) + [(b'HGENCODING', b'utf-8')]
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '[u'git', u'commit', u'-F', '/var/folders/16/zkkbtd3n1td1fb0z6lxhk2pw0000gn/T/tmpoxDKyt']' returned non-zero exit status 1

With --no-commit option, I still get an error while tagging.
» bumpversion minor --no-commit
fatal: Failed to resolve 'HEAD' as a valid ref.
Traceback (most recent call last):
  File "/usr/local/bin/bumpversion", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 1004, in main
    vcs.tag(tag_name)
  File "/usr/local/lib/python2.7/site-packages/bumpversion/__init__.py", line 150, in tag
    subprocess.check_output(["git", "tag", name])
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '[u'git', u'tag', u'v0.9.0']' returned non-zero exit status 128

Am I missing something here?

@CuriousLearner what do you get with --no-tag --no-commit option. Also, can you attach you bumpversion config, it should be available either in .bumpversion or setup.cfg

@theskumar it works with --no-tag --no-commit option.
The bumpversion config in setup.cfg is as follows:
[bumpversion]
current_version = 0.12.0
commit = True
tag = True

[bumpversion:file:hello_world/__init__.py]

[bumpversion:file:hello_world/templates/rest_framework/api.html]

[bumpversion:file:docs/index.md]

[bumpversion:file:README.md]

[bumpversion:part:release]
optional_value = placeholder
values =
	dev
	placeholder

subprocess.CalledProcessError: Command '[u'git', u'tag', u'v0.8.7']' returned non-zero exit status 128 could mean that the tag already exists.

@danmichaelo I'm pretty sure the tag does not exist already since this is a brand new repo.

Does it work if you just run git tag v0.8.7 in the repo?

bumpversion: v0.5.3 (using Python v2.7.5)  --commit and --tag unable to use!
Traceback (most recent call last):
File "/usr/bin/bumpversion", line 11, in
sys.exit(main())
File "/usr/lib/python2.7/site-packages/bumpversion/init.py", line 994, in main
vcs.commit(message=commit_message)
File "/usr/lib/python2.7/site-packages/bumpversion/init.py", line 73, in commit
list(os.environ.items()) + [(b'HGENCODING', b'utf-8')]
File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '[u'git', u'commit', u'-F', '/tmp/tmpbSDEWh']' returned non-zero exit status 1

any idea what's going on ? same  issue here

I'm facing the same issue.
My bumpversion.cfg file looks like this.
[bumpversion]
current_version = 0.3.0
commit = True
tag = True
[bumpversion:file:VERSION]
If commit=False, it works awesome. Looking for solution with commit=True

Had the same problem. Ensure that your VERSION and .bumpversion.cfg files are tracked. If don't, call git add VERSION .bumpversion.cfg.
If it doesn't help, try to manually call printed command from the error message:

subprocess.CalledProcessError: Command '[u'git', u'commit', u'-F', '/tmp/tmpbSDEWh']' returned non-zero exit status 1

git commit -F /tmp/tmpbSDEWh
to find out why git cannot make the commit.

This is probably caused by the tag already existing locally, so Git throws this message when it attempts to re-create.
To clean your local tags up, see: https://stackoverflow.com/questions/1841341/remove-local-git-tags-that-are-no-longer-on-the-remote-repository

Manually setting git's signing key worked for me. I'm not sure if I had set it manually in the past and it was still trying to use an old key but posting that here in case it helps someone else.
git config --global user.signingkey {gpg key id}
They key id should be the 8-character-key as described here:
https://www.eugenemdavis.net/finding-your-gnupg-key-id.html

This may be a bug in bump2version. Use the following in the configuration file and it should resolve the problem:
no_sign_tags = True


Fix to contact form Name and Email width bug in Chrome.

It seems that, as in your latest video, it's a bug related to Chrome (Firefox is fine) where when re-sizing the browser the Name field seems to reduce in size while the Email field is fine. Seems Chrome doesn't like "1fr 1fr" but works fine with "50% 50%".

Thanks a ton!


How can I integrate source code changes into my FastAPI install?

First Check

[X] I added a very descriptive title here.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
class OAuth2PasswordRequestForm:
    """
    This is a dependency class, use it like:
        @app.post("/login")
        def login(form_data: OAuth2PasswordRequestForm = Depends()):
            data = form_data.parse()
            print(data.username)
            print(data.password)
            for scope in data.scopes:
                print(scope)
            if data.client_id:
                print(data.client_id)
            if data.client_secret:
                print(data.client_secret)
            return data
    It creates the following Form request parameters in your endpoint:
    grant_type: the OAuth2 spec says it is required and MUST be the fixed string "password".
        Nevertheless, this dependency class is permissive and allows not passing it. If you want to enforce it,
        use instead the OAuth2PasswordRequestFormStrict dependency.
    username: username string. The OAuth2 spec requires the exact field name "username".
    password: password string. The OAuth2 spec requires the exact field name "password".
    scope: Optional string. Several scopes (each one a string) separated by spaces. E.g.
        "items:read items:write users:read profile openid"
    client_id: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
        using HTTP Basic auth, as: client_id:client_secret
    client_secret: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
        using HTTP Basic auth, as: client_id:client_secret
    """

    def __init__(
        self,
        grant_type: str = Form(default=None, regex="password"),
        username: str = Form(),
        password: str = Form(default=None), # THE ONLY CHANGE
        scope: str = Form(default=""),
        client_id: Optional[str] = Form(default=None),
        client_secret: Optional[str] = Form(default=None),
    ):
        self.grant_type = grant_type
        self.username = username
        self.password = password
        self.scopes = scope.split()
        self.client_id = client_id
        self.client_secret = client_secret

Description
For my use case I only need to pass a user_id in the username field of the OAuth2PasswordRequestForm. The best way I've found to do this without getting Auth error Error: Unprocessable Entity is by making the small edit of assigning a default value of None to password: str = Form() like password: str = Form(default=None) as seen in the code example above.
I need to containerize my app and deploy it, but this requires installing FastAPI via pip which brings me back to the same problem as before of not being able to simply pass in a value for the username. Is there a simple way to incorporate this change into the install? Or is there a pre existing way with FastAPI to not have to pass in a value for password without getting Auth error Error: Unprocessable Entity??
Many thanks.
Operating System
Linux
Operating System Details
Ubuntu 22.04
FastAPI Version
0.89.1
Python Version
3.8
Additional Context
No response

You could maybe fork the fastapi repository, make your changes and install fastapi from local source (python3 -m pip install -e <path> )
You could also override OAuth2PasswordRequestForm
class MyForm(OAuth2PasswordRequestForm):
    def __init__(
        self,
        grant_type: str = Form(default=None, regex="password"),
        username: str = Form(),
        password: str = Form(default=""),
        scope: str = Form(default=""),
        client_id: Optional[str] = Form(default=None),
        client_secret: Optional[str] = Form(default=None),
    ):
        super().__init__(
            grant_type,
            username,
            password,
            scope,
            client_id,
            client_secret
        )

@FayZ676 I suggest you an alternative approach if I understand your request correctly :
from fastapi import FastAPI, Form, HTTPException, status, Depends
from typing import Union
from datetime import datetime, timedelta
from jose import JWTError, jwt
from fastapi.security import OAuth2PasswordBearer

SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30

oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")

app = FastAPI()

fake_db = {
    "name_id" : {
        "user_id" : "name_id",
        "username" : "name_user"
    }
}

def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
    to_encode = data.copy()
    if expires_delta:
        expire = datetime.utcnow() + expires_delta
    else:
        expire = datetime.utcnow() + timedelta(minutes=15)
    to_encode.update({"exp": expire})
    encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    return encoded_jwt

def get_current_user_id(token: str = Depends(oauth2_scheme)):
    credentials_exception = HTTPException(
        status_code=status.HTTP_401_UNAUTHORIZED,
        detail="Could not validate credentials",
        headers={"WWW-Authenticate": "Bearer"},
    )
    try:
        payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
        user_id = payload.get("sub")
        if user_id is None:
            raise credentials_exception
    except JWTError:
        raise credentials_exception

    return user_id

@app.post("/token")
async def token_by_user_id(user_id: str = Form(...)):
    if user_id in fake_db :
        pass
    else :
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect user_id",
            headers={"WWW-Authenticate": "Bearer"},
        )
    access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
    access_token = create_access_token(
        data={"sub": user_id}, expires_delta=access_token_expires
    )
    return {"access_token": access_token, "token_type": "bearer"}

@app.get("/users/me/")
async def read_users_me(user_id: str = Depends(get_current_user_id)):
    return user_id

Simply, change the traditional method in token endpoint accepting only the user_id, and if it is present in your db, create token refferred to this user_id.

@ebottos94 unfortunately when I try this approach I get the following error Auth error Error: Unprocessable Entity. Here's my actual API code for reference.
from fastapi import FastAPI, File, UploadFile, Depends, HTTPException, status, Form
from fastapi.security import OAuth2PasswordBearer
from pydantic import BaseModel, Required
from passlib.context import CryptContext
from typing import Union
from jose import JWTError, jwt
from datetime import datetime, timedelta

import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
import json

from dotenv import load_dotenv
from PIL import Image
import os
import io
import openai
from captionit import captionit

# DATA CLASSES
# -----------------
class Token(BaseModel):
    access_token: str
    token_type: str

class TokenData(BaseModel):
    userId: Union[str, None] = None

class User(BaseModel):
    quota: int
    phoneNumber: str
    plan: str
    userId: str
# -----------------

# JWT AUTH DETAILS
SECRET_KEY = os.environ['JWT_SECRET_KEY']
ALGORITHM = os.environ['JWT_ALGORITHM']
ACCESS_TOKEN_EXPIRE_MINUTES = 30

# INITIALIZE OPENAI CONNECTION
load_dotenv()
KEY = os.environ['OPENAI_API_KEY']
openai.api_key = KEY

# INITIALIZE FIREBASE CONNECTION
CREDENTIALS = os.environ['FIREBASE_CREDS']
cred = credentials.Certificate(CREDENTIALS)
app = firebase_admin.initialize_app(cred)
db = firestore.client()

oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")

app = FastAPI(
    title="AI Captioning App",
    version="1.0.0"
)

# UTILITY FUNCTIONS
# -----------------
def update_quota(db, user):
    user.quota = user.quota - 1
    user_ref = db.collection(u'Users').document(user.userId)
    user_ref.update({u'quota': user.quota})

def get_user(db, userId: str):
    user_ref = db.collection(u'Users').document(userId)
    user = user_ref.get()
    if user.exists:
        user = User(**user.to_dict())
        return user

def authenticate_user(db, userId: str):
    user = get_user(db, userId)
    if not user:
        return False
    return user

def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
    to_encode = data.copy()
    if expires_delta:
        expire = datetime.utcnow() + expires_delta
    else:
        expire = datetime.utcnow() + timedelta(minutes=15)
    to_encode.update({"exp": expire})
    encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    return encoded_jwt

async def get_current_user(token: str = Depends(oauth2_scheme)):
    credentials_exception = HTTPException(
        status_code=status.HTTP_401_UNAUTHORIZED,
        detail="Could not validate credentials",
        headers={"WWW-Authenticate": "Bearer"},
    )
    try:
        payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
        userId: str = payload.get("sub")
        if userId is None:
            raise credentials_exception
        token_data = TokenData(userId=userId)

    except JWTError:
        raise credentials_exception
    user = get_user(db, userId=token_data.userId)
    if user is None:
        raise credentials_exception
    return user
# -----------------

# ROUTES
# -----------------
@app.post("/token", response_model=Token)
async def login_for_access_token(user_id: str = Form(...)):
    user = authenticate_user(db, user_id)
    if not user:
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect userid",
            headers={"WWW-Authenticate": "Bearer"},
        )
    access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
    access_token = create_access_token(
        data={"sub": user.userId}, expires_delta=access_token_expires
    )
    return {"access_token": access_token, "token_type": "bearer"}

@app.post("/caption")
async def generate_captions(current_user: User = Depends(get_current_user), file: UploadFile = File(Required)):
    request = await file.read()
    image = Image.open(io.BytesIO(request))
    description, captions = captionit(image, current_user.userId, current_user.plan)

    update_quota(db, current_user)
    return {
        "description": description,
        "captions": captions,
        "userId": current_user.userId,
        "quota": current_user.quota
    }
# -----------------

@FayZ676 I think that you didn't understand how to test it. You can't use fastapi docs to test this authorization, you can use postman for example. These are the steps :
call '/token' endpoint with user_id value via with form-data in body (this you can also do through the docs), the endpoint return you a token, after that call your endpoint that needs of authentication (in this example '/caption') and pass token value via header (you can use postman, in the client there is a section 'Authorization', select OAuth 2.0 as Type and paste token value in section 'Access Token').
The error you mentioned, it was raised beacuse probably you were trying to authenticate through the docs.
I wrote some code to test your usecase (without db connection clearly) and it works.
from fastapi import FastAPI, File, UploadFile, Depends, HTTPException, status, Form
from fastapi.security import OAuth2PasswordBearer
from pydantic import BaseModel, Required
from typing import Union
from jose import JWTError, jwt
from datetime import datetime, timedelta
import json

from dotenv import load_dotenv
import os
import io

# DATA CLASSES
# -----------------
class Token(BaseModel):
    access_token: str
    token_type: str

class TokenData(BaseModel):
    userId: Union[str, None] = None

class User(BaseModel):
    quota: int
    phoneNumber: str
    plan: str
    userId: str
# -----------------

db = {'id1': {
    'quota': 1,
    'phoneNumber' : 'string',
    'plan': 'string',
    'userId': 'id1'
    },
    'id2': {
    'quota': 1,
    'phoneNumber' : 'string',
    'plan': 'string',
    'userId': 'id2'
}}

# JWT AUTH DETAILS
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30

oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")

app = FastAPI(
    title="AI Captioning App",
    version="1.0.0"
)

# UTILITY FUNCTIONS
# -----------------

def get_user(db, userId: str):
    try :
        user = db[userId]
        user = User(**user)
        return user
    except:
        return None

def authenticate_user(db, userId: str):
    user = get_user(db, userId)
    if not user:
        return False
    return user

def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
    to_encode = data.copy()
    if expires_delta:
        expire = datetime.utcnow() + expires_delta
    else:
        expire = datetime.utcnow() + timedelta(minutes=15)
    to_encode.update({"exp": expire})
    encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    return encoded_jwt

async def get_current_user(token: str = Depends(oauth2_scheme)):
    credentials_exception = HTTPException(
        status_code=status.HTTP_401_UNAUTHORIZED,
        detail="Could not validate credentials",
        headers={"WWW-Authenticate": "Bearer"},
    )
    try:
        payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
        userId: str = payload.get("sub")
        if userId is None:
            raise credentials_exception
        token_data = TokenData(userId=userId)

    except JWTError:
        raise credentials_exception
    user = get_user(db, userId=token_data.userId)
    if user is None:
        raise credentials_exception
    return user
# -----------------

# ROUTES
# -----------------
@app.post("/token", response_model=Token)
async def login_for_access_token(user_id: str = Form(...)):
    user = authenticate_user(db, user_id)
    if not user:
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect userid",
            headers={"WWW-Authenticate": "Bearer"},
        )
    access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
    access_token = create_access_token(
        data={"sub": user.userId}, expires_delta=access_token_expires
    )
    return {"access_token": access_token, "token_type": "bearer"}

@app.post("/caption")
async def generate_captions(current_user: User = Depends(get_current_user), file: UploadFile = File(Required)):
    return {"filename": file.filename}

I hope I have been helpful to you.

@ebottos94 You're absolutely right. Just tested in Postman without any problems. I knew I must have made a rookie mistake somewhere, thank you.


WIP - Change submission_id to be a UUID

Switch from H2 to Postgres in test
Remove distinction in uuid generation since everything uses psql

#184056302

I saw a presentation this weekend that mentioned `testContainer. Might be worth checking this out, because then we could use postgres more ephemerally.

Change submission_id to be a UUID

Tests now use postgresql

[#184056302]
Co-authored-by: Alex Gonzalez<EMAIL_ADDRESS>Co-authored-by: Bethany Seeger<EMAIL_ADDRESS>Co-authored-by: Chibuisi Enyia<EMAIL_ADDRESS>