Problems with "smart enter"

I love your plugin -- it gets better with every release.
I have found a few issues with the "smart enter" completion behaviour.
As far as I can tell, if you hit <enter> two things happen w.r.t completion behaviour/"smart enter":

If the cursor is in a block with a missing end then an end is inserted on the next line (same withuntil, etc)
Some code is reformatted

First, please, please, please remove (2), or add an option to turn off automatic code formatting.  Not only do I hate it when my code is reformatted by the IDE, but the current logic has some bugs which makes the reformatting 'broken' in certain situations.
Bugs:

In the simple case, the cursor is not properly positioned.
E.g. (for this, and all further examples, | represents the position of the cursor)
If you have

if someCondition then|

and hit <enter>, you get
if someCondition then|
end

instead of
if someCondition then
    |
end

If there is no space between the current keyword and the missing end (etc) from an outer block, the end is not recognized.  And things get weird.

e.g. Just say this is your original code
if a then doSomething() end
nextLine
anotherLine
thirdline

then you replace doSomething() with another (incomplete) condition, (notice, no space between then and end)
if a then if b then|end
nextLine
anotherLine
thirdline

and hit <enter> (notice how then end keyword is inserted, but incorrectly, how the end following the cursor is not recognized, and how everything gets indented when it shouldn't be)
if a then if b then|
    endend
    nextLine
    anotherLine
    thirdline

and hit <enter> a second time (this is just the first bug showing up again)
if a then if b then
end
    endend
    nextLine
    anotherLine
    thirdline

The behaviour seems to depend on what follows the cursor.  For example:
Initial code:
if a then return end
nextLine
anotherLine
thirdline

Add a new, incomplete condition (again, no space between then and return)
if a then if b then|return end
nextLine
anotherLine
thirdline

hit <enter>
if a then if b then|
    endreturn end
nextLine
anotherLine
thirdline

hit <enter> again
if a then if b then|
end
    endreturn end
nextLine
anotherLine
thirdline

Oh so that's when reformat happens... I couldn't quite catch it, very annoying indeed

Thanks a good issue.

Also added a settings for smart enter, you can on/off it :smiley:

Anything else?

You're awesome, thank you :-)
Does that "smart close 'end'" feature also cover "until"?  For example, repeat if a then|until condition.


Greek in Word search show latin letters

In the "Wordsearch" game the greek words:
a) appear amongst latin letters in the grid and
b) with lowercase letters, despite that I wrote them with capitals. (attachment 5.jpg)

This is solved.

Hi @ingedonke I think this should stay open for now as it doesn't work if you have 2 different language wordsearches in the same LO, even if the first is english, then you have the second.
I plan to look at that again but just haven't had time yet!!
John


fixing bug: bollinger_lband_indicator

fixes bug: bollinger_lband_indicator() currently returns the indicator from the hband

Thanks @bbriegel


Expose postgres DB on port 25432 instead of 5432

Description
The exposed port is not used by any of the automation of this repository. Instead, it is just used for debugging when needed. Let's use 25432 so it does not conflict with any locally running PSQL server
Type of change

Refactor (refactoring code, removing useless files)

Testing steps
None
Checklist

[ ] Pylint passes for Python sources
[ ] sources has been pre-processed by Black
[ ] updated documentation wherever necessary
[ ] new tests can be executed both locally and within docker container
[ ] new tests have been included in scenario list (make update-scenarios)

I just reviewed and I can see that the port is used in:

Dockerfile, as environment variable that will be used by any process running the container image
Lot of *.toml configuration files for the programs under test
The environment variable defined in Dockerfile is being used by Behave Python code (environment.py)

I just reviewed and I can see that the port is used in:

Dockerfile, as environment variable that will be used by any process running the container image
Lot of *.toml configuration files for the programs under test
The environment variable defined in Dockerfile is being used by Behave Python code (environment.py)

@joselsegura I think there's a misunderstanding. When using the port keyword and not the expose keyword in the docker-compose file, the format is HOST:CONTAINER, the services connect between each other using the value defined on the right, which represents the container's port. The other value would be used to access a container from the host machine. So this should work fine. But I think I'll do more testing, especially in the CI env, before merging, so we're more sure of this change =)

tested by running the tests within docker and no local postgres running


whereHas query and error in count query

I have table users and roles, relation many to many. Now I need in users list display all users with role, for example "admin".
Query:
$users = User::select(array( 'users.id', 'users.status', 'users.first_name', 'users.last_name', 'users.email', 'users.last_seen'))
->whereHas('roles', function($q) {
    $q->where('id', '=', 'admin');
})->with('roles');

This query is ok when not use it for Datatables, but when I add ::of($users) then I have exception:
Column not found: 1054 Unknown column 'roles' in 'where clause' (SQL: select count(*) as aggregate from (select '1' as row_count from `users` where (select count(*) from `roles` inner join `role_user` on `roles`.`id` = `role_user`.`role_id` where `role_user`.`user_id` = `users`.`id` and `name` = admin) >= 1 and `roles` LIKE %1%) count_row_table)
/framework/src/Illuminate/Database/Connection.php#620

Query without hasMany works fine, but filters only on users table.
I use Laravel 5, newest version of Datatables library and javascript plugin. I'm new in Laravel world, maybe I do it wrong way.

Hi, one way to display the roles is by using this approach:
        $users = User::select(array('users.id', 'users.username','users.email',DB::raw("'roles'"), 'users.confirmed', 'users.created_at'));

        return Datatables::of($users)
            ->editColumn('roles','{{ implode(", ", User::find($id)->roles()->lists(\'name\')) }}')
            ->make(true);

On the other hand, I haven't tried this package yet on query with whereHas implementation. Will also check this out it and tests if it works given the time.

After my investigation,

queries convert to raw sql before run,
check for relations with $this->query->getEagerLoads();`
replace and related_table_name LIKE ? with empty string
run raw sql

This is done in count method
private function count()
{
    $query = $this->query;

    // if its a normal query ( no union ) replace the select with static text to improve performance
    $myQuery = clone $query;
    if ( ! preg_match('/UNION/i', strtoupper($myQuery->toSql()))) {
        $myQuery->select($this->connection->Raw("'1' as row_count"));
    }
    $relations = $myQuery->getEagerLoads();
    if (count($relations) > 0) {
        $relation_tables = array_keys($relations);
        $raw_query = str_ireplace("AND `{$relation_tables[0]}` LIKE ?", '', $myQuery->toSql());

    } else {
        $raw_query = $myQuery->toSql();
    }
    return $this->connection->table($this->connection->raw('(' . $raw_query . ') count_row_table'))
        ->setBindings($myQuery->getBindings())->count();
}

But in method getResult() I still have a problem:
Exception Call to undefined method Illuminate\Database\Query\Builder::toArray()
private function getResult()
{
    $relations = $this->query->getEagerLoads();
    if (count($relations) > 0) {
        $relation_tables = array_keys($relations);
        $raw_query = str_ireplace("AND `{$relation_tables[0]}` LIKE ?", '', $this->query->toSql());

    } else {
        $raw_query = $this->query->toSql();
    }
    $this->result_object = $this->connection->table( $this->connection->raw($raw_query) )->setBindings($this->query->getBindings());
    if ($this->query_type == 'eloquent') {
        $this->result_array = array_map(function ($object) {
            return (array) $object;
        }, $this->result_object->toArray());
    } else {
        $this->result_array = array_map(function ($object) {
            return (array) $object;
        }, $this->result_object);
    }
}

Probably something bad in run query. This is tested only for my needs with one whereHas, I don't have experience with Laravel or other ORM, my solution may be stupid.

Hi, I just tried testing this using Laravel 5 and DT1.10++ and it works well. Maybe there is something wrong in your view and js file? Would it be possible to paste your view with js here so i can further check. Thanks!

@yajra i had the same issue lately and i confirm that using your query with "->select('*')" instead of "->get()" fixes it.


[BUG] Multiple Cluster state objects found in data node's heap snapshot

Describe the bug
While analyzing a heap dump taken on a domain with 1000 nodes and 200k shards, it is found that out of 16.1 GB, ~14.7 GB in the retained heap is due to TransportResponseHandlers. The dump is from a data node and there were _bulk queries running in the domain at the time when heap dump was captured.

Expanding TransportResponseHandler

On expanding a ConcurrentHashMap object, it is found that TransportBulkAction$ConcreteIndices is taking ~63 MB. Most of which is taken by ClusterState.https://github.com/opensearch-project/OpenSearch/blob/5e72e1df6d14d1eb5e24385a2c9c6bca96066a5d/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java#L829
The histogram below shows 215 ClusterState object taking ~11 GB of heap.

The incoming object reference for most of the ClusterState object is TransportBulkAction$ConcreteIndices.

There seem to be a bug in TransportBulkAction path which is creating new ClusterState objects rather than referencing one.
Related component
Indexing:Performance
To Reproduce

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
There has to be atmost 2 cluster state objects in the domain when updates are going on. TransportBulkAction should not create new ClusterState objects.
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):

OS: [e.g. iOS]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Thanks @anshu1106 for filing this issue. It is an interesting one.

This looks like due to dynamic mapping, cluster state is changing often and hence that many different objects are present. One thing we should evaluate is instead of passing the whole cluster state what we sub object (indicesLookUp ?) we can pass to ConcreteIndices constructor so that retained heap is not so much until the bulk request is processed.


Create entry subcommand

The feedbin entries endpoint can also take ids to retrieve. Not sure how that's supposed to interact with flags such as read and starred. Integrating with this subcommand will be a little weird.
Originally posted by @crossjam in https://github.com/crossjam/feedbin-tools/issues/2#issuecomment-1765335400

Instead let's create an entry subcommand that strictly takes a list of entry ids as an argument and only uses a subset of the entries endpoint parameters.

since
extended
mode
per_page
page(?)
include_original
include_content_diff
include_enclosure


[FR] Add timestamp when resolving a market to invalidate trades after it.

Because the market resolution is a manual process from the market creator, there exists a time between the resolution of the market being known by everyone and the market being resolved. That period is rife with people making a sure-fire bet and abusing the manual resolution for profit.
I suggest we add an option to specify when the "resolution" was public knowledge when resolving, which would invalidate every trade after that timestamp. This will simulate the market being resolved at the exact time it was possible to resolve it, without the extra period afterwards.

Metaculus handles this problem by averaging points over time:
https://www.metaculus.com/help/faq/#howscore


Byo subnets

Fixes #182

There is one thing that this PR doesn't fix, that I had hoped it would.
Although it allows you to choose your own subnets for each item, it doesn't allow you to define a single subnet for Web, Redis, San, Tika, Elastic (AppGW and Vnet GW always need their own). This would be useful for testing scenarios, scenarios where your segregation is taken care of via a Virtual Firewall, or scenarios where you are restricted on subnets
I welcome any feedback on how to achieve this part.

Going to pull this one back as I did some work later that improved this a lot.


wip: new(sdk/plugins): add builtin event stream instance implementations for push and pull models

What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area plugin-sdk
/area tests
What this PR does / why we need it:
This PR introduces two builtin implementations of the source.Instance interface of the sdk/plugins/source package. This interface is responsible of representing opened event sources and of producing event data through the NextBatch() method.
There are two built-in implementations provided, each implemented for its use case:

"Pull model": for use cases in which the event source can be implemented sequentially and the time required to generate a sequence of event is deterministic. This is implemented with a functional design, where the passed-in callback is expected to be non-suspensive and to return quickly.
"Push model": for use cases in with the event source can be suspensive and there is no time guarantee reguarding when an event gets produced. For instance, this applies for all event sources that generate events from webhook events. Given the event-driven nature of this use case, this is implemented by passing event data in the form of byte slices through a channel.

On top of this, in-memory implementations have been added for core SDK interfaces such as sdk.EventWriter and sdk.EventReader. This is now used to implement benchmarks and unit tests for the two push and pull implementations. This was a long due necessity in the SDK, and these new sdk.InMemory* types can be used for a variety of use cases (tests being the most obvious ones).
Which issue(s) this PR fixes:
Special notes for your reviewer:
After starting developing the first plugins, I came to the conclusion that implementing the NextBatch() is not trivial in the general case. There are many things to be aware of:

Return as fast as possible and should try to fill-up the event batch as much as possible
Listen for a timeout and return the batch in its current state once the timeout is expired
Conceive the case in which Close() is called before NextBatch() has returned. This can happen if the plugin framework receives signals such as CTRL+C from the user.
Keep memory allocations to the minimum
Keep returning EOF after returning it the first time

As such, I though that creating an officially-maintained version of it for few use cases would be beneficial for the community. As a matter of fact, most of the plugins under the falcosecurity/plugins repo could be refactored to use these newly-introduced prebuilts.
Obviously, the SDK leaves plugin developers the choice of implementing their own source.Instance type with custom NextBatch() implementations for advanced or specific use cases.
Does this PR introduce a user-facing change?:
new(sdk/plugins): add builtin event stream instance implementations for push and pull models

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Here's the report of the benchmarks of these two implementations on my machine. The code is inside sdk/plugins/source/instance_test.go.
Terminology:

Empty: Generating events with no content
Fixed: Generating events with content of fixed size of 1KB
Random: Generating events with content of random size between 1KB and 1MB

goos: linux
goarch: amd64
pkg: github.com/falcosecurity/plugin-sdk-go/pkg/sdk/plugins/source
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkPullEmpty-8    	   16788	     67774 ns/op	       0 B/op	       0 allocs/op
BenchmarkPushEmpty-8    	    2990	    363268 ns/op	       0 B/op	       0 allocs/op
BenchmarkPullFixed-8    	     392	   3026410 ns/op	 2277720 B/op	    5120 allocs/op
BenchmarkPushFixed-8    	     303	   5817083 ns/op	 2279797 B/op	    5125 allocs/op
BenchmarkPullRandom-8   	       1<PHONE_NUMBER> ns/op<PHONE_NUMBER> B/op	   14753 allocs/op
BenchmarkPushRandom-8   	       1<PHONE_NUMBER> ns/op<PHONE_NUMBER> B/op	   15058 allocs/op
PASS
ok  	github.com/falcosecurity/plugin-sdk-go/pkg/sdk/plugins/source	9.950s

The source example has been updated to use the "pull" prebuilt. See: https://github.com/falcosecurity/plugin-sdk-go/pull/50/files#diff-9c5325f5e8159881ad3abf0eab413b61070b1b51276cd878f764c130cf11ac20R84
func (m *MyPlugin) Open(params string) (source.Instance, error) {
	counter := 0
	pull := func(ctx context.Context, evt sdk.EventWriter) error {
		counter++
		if err := gob.NewEncoder(evt.Writer()).Encode(counter); err != nil {
			return err
		}
		evt.SetTimestamp(uint64(time.Now().UnixNano()))
		return nil
	}
	return source.OpenPullInstance(pull)
}

@jasondellaluce: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

build-plugin-sdk-go
63644b600d8f77a0ff68c443860451635dbc52f6
link
true
/test build-plugin-sdk-go

Full PR test history. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

LGTM label has been added.  Git tree hash: e693df47fb194ec31f1b35d0be540fb7e7e16d07


OS selection is not working right

@ninxsoft @parnas
hello! and thank for this awesome and wonderful app!
i may found a bug, when i check sequoia standard and public releases other showed up too in the main app window.
can this be fixed?

@JohnnyFireOne this is actually expected behaviour - the Software Update Catalogs contain installer releases for multiple operating systems, and not just operating systems for that individual SUCatalog.
The specific installers will vary from catalog to catalog, but generally speaking, another way of thinking about is:

SUCatalog
15.x
14.x
13.x
12.x
11.x
10.15.x

macOS Sequoia
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:

macOS Sonoma
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:

macOS Ventura
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:

macOS Monterey
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:


crash happened

!!! MANDATORY TO FILL OUT !!!

Goals

Solve the problem
Expected Results

no crash
Actual Results

crash
Steps to Reproduce

RealmSwift is used with KVO, when used 'open func addObserver(_ observer: NSObject, forKeyPath keyPath: String, options: NSKeyValueObservingOptions = [], context: UnsafeMutableRawPointer?)' On the 11-inch iPad Pro，crash is happened.
Code Sample

self.model.addObserver(self, forKeyPath: "***", options: [.new, .old], context: &myContext)
Version of Realm and Tooling

Realm framework version: ?
3.11.2
Realm Object Server version: ?
no server
Xcode version: ?
Version 10.1 (10B61)
iOS/OSX version: ?
12.1(16B92)
Dependency manager + version: ?

@lzx2015 We need much more information to be able to help you.
Which crash are you getting? Please give as much info as possible.
Is it reproducible? How exactly - please provide a project or test case that demonstrate the issue.

Closing this issue due to no response. Feel free to reopen if additional information can be provided.


The use of Javascript Reserved Keywords as Property Names

First of all, great job on the module! I am one of those poor souls who has to make his single page app work in IE8. While doing that, I got the "Expected Identifier" errors in console. Results from google search suggested Javascript reserved keywords being used as property names as the possible cause. The first of these errors was pointing to "e.default", and sure enough, after changing it to "e['default']", the error was gone. There were a few more errors pointing to places where ".enum" was used. Thanks in advance for looking into this.

Heads up, it looks like we're dropping IE8 in the future.

:+1: for dropping IE8 support! Angular 1.3 drops support for IE8 as well.

Yes, and so have we for every place where we use schema form. Angular 1.3 dropping support tipped the balance for us (And there was much rejoicing).
Anyway I would really like to upgrade to angular 1.3 as a requirement so we can use bind once expressions, which should speed up things, but I have no idea what version people are still using.

Please re-open if you do not feel the question has been answered sufficiently.


Change the scope for logback-classic to test to avoid pulling in the jar for regular builds

@davidxia  pls review and merge as appropriate
As per https://www.slf4j.org/codes.html#multiple_bindings we should avoid dependency on any one implementation. The inclusion of logback-classic (which probably is meant to be a test scope dependency) was causing the following problem in my app:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/sanjay/.m2/repository/ch/qos/logback/logback-classic/1.2.1/logback-classic-1.2.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.8.2-1.cdh5.8.2.p0.3/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Needed my app to use the correct intended implementation

Codecov Report

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

@@            Coverage Diff            @@
##             master     #881   +/-   ##
=========================================
  Coverage     66.04%   66.04%
  Complexity      769      769
=========================================
  Files           171      171
  Lines          3240     3240
  Branches        369      369
=========================================
  Hits           2140     2140
  Misses          940      940
  Partials        160      160

Thanks!


Could you please clarify documentation:

Your documentation at https://github.com/marketplace/actions/setup-msys2 reads:
MSYS2 is available by default in windows-latest virtual environment for GitHub Actions. However, the default installation is updated every ~10 days, and it includes some pre-installed packages. As a result, startup time can be up to 10 min. Moreover, MSYS2/MINGW are neither added to the PATH nor available as a custom shell option.
From this, I understand that your github action "Setup MSYS2" is mainly for people who

require their msys2 packages to be always up-to-date, i.e. a 10 days old msys package is too old for them.
actually experience this 10 minute startup time
do not want to add a custom default shell like the following to their .yml file:

    defaults:
      run:
        shell: bash.exe --login -eo pipefail "{0}"

At least this is what I understood and concluded that the Setup MSYS2 action is not for me, because the default msys2 installation seems to work fine so far. Can you confirm this understanding and maybe clarify your documentation?
Thank you!

You can also use this action with release: false (yeah, not sure about that naming) to use the system environment, which would gain you caching of packages specified via install: ..., and you could easily switch between them, handle updates etc.
Thanks for writing this up, as you said it's not very clear.

Thanks for pointing me to release: false. It is mentioned only 2 paragraphs below the one I quoted here, and I now remember seeing it, but somehow it did not register that this would be how I could use your action.

I'll keep this open a bit if you don't mind. So we don't forget to improve the docs.

Sure!

In fact, I was waiting for actions/virtual-environments#1648 to be deployed. It was merged a couple of days ago, so it should be done in about a week. There are still reasons to keep using this Action (see actions/virtual-environments#1572), but docs need to be updated.

At least this is what I understood and concluded that the Setup MSYS2 action is not for me, because the default msys2 installation seems to work fine so far.

Partial updates are a not supported use case in MSYS2. Therefore, if you need to install any package which is not already installed in the default MSYS2 installation, you should first pacman -Syu. That's where the 10min overhead can kick in. It is independent from what packages you want to have installed, as it will first update several GBs of preinstalled toolchains.
Conversely, this action ensures that only the minimal packages you need are installed and updated. Plus, as @lazka said, caching is enabled by default if you use install:.

Partial updates are a not supported use case in MSYS2.

installs should work though, as long as we don't remove those old packages from the server.


KOGITO-6402: Create test for DMN Boxed Expression Editor undo operation

For more details see:

https://issues.redhat.com/browse/KOGITO-6402

@yesamer conflict resolved. I can not unskip the test. KOGITO-6402 is not fixed. This PR is addding test in advance to facilitate verification of KOGITO-6402 fix in future.


Reduce time to sync wallet and sync less often

We only want to sync for 1000 addresses during the first sync. This is because we might have generated over 1000 addresses in the past and if we would not sync that far ahead we would miss some balance.
For repeatedly sync it is enough to sync for the default 100 addresses because everytime we generate a change address it is automatically included.
This is a minor improvement because generating 1000 addresses and syncing for it takes some time.
The last commit might be a reason for our ever growing ram usage.

bors r+


Crop text from beforeAfter.png and add a caption

File: TransformPropertyPage.jsx
Description:
     This pull request performs the following changes:

Remove text from BeforeAfter image
I changed the beforeAfter.png file in src/images directory.
Add a caption to image
Removed alt attrubute from image and add H2 tag for caption then added are-labelledby attribute.

Does this close any currently open issues?
This PR addresses #665

@zhenbright thanks for addressing my feedback. Since you have a new PR targeting staging, I'll close this PR and review the other one.


Line numbers

It is possible that you alright have line numbers somewhere.  But I have not been able to find the spot to turn them.  If not, I am requesting that line numbers be added if possible.
Thank you for your time and consideration.
Mark

I have a potential fix here if you want to try it out before I publish a new version:
https://github.com/microsoft/XmlNotepad/pull/251


dbsnp-150.vcf.gz truncated

Hi Brad,
For some reason, /gpfs/home/nsyed/bcbio/genomes/Hsapiens/GRCh37/variation/dbsnp-150.vcf.gz was truncated and hence it was creating problme. I wanted to download it again but update data is not updating this file.
Any alternate to download this particular file ?
Thanks
Najeeb

Najeeb;
Thanks for the report and apologies about the issues. If you had an incorrect download and bcbio didn't realize, it will have finalized the install and not re-do it unless you manually edit the versions file:
/gpfs/home/nsyed/bcbio/genomes/Hsapiens/GRCh37/version.csv

remove dbsnp,150, and then re-run bcbio_nextgen.py upgrade --data. That should re-download the file. If you still have issues please feel free to reopen.


URL encode datasources, task ids, authenticator names.

Fixes various bugs related to objects with characters in their names
that must be URL encoded (such as spaces). The one that made me notice
this was that the task log and shutdown APIs don't work when task IDs
have spaces in them.

I think this is a very common mistake, so that we need another way to prevent such mistakes. I suggest to add a sort of UrlBuilder which enforces encoding to input elements if needed.

nasty bug!

I think this is a very common mistake, so we need another way to prevent such mistakes. I suggest to add a sort of UrlBuilder which enforces encoding to input elements if needed.

How would you check the "if needed" ?

looks like most of the fixes are in the calls to makeWorkerUrl(..), is it possible to put the fix inside impl of that method instead ?

@himanshug, re:

looks like most of the fixes are in the calls to makeWorkerUrl(..), is it possible to put the fix inside impl of that method instead ?

I made that change and re-pushed. I also consolidated the two makeWorkerURL methods into one helper method in TaskRunnerUtils.
@jihoonson, re:

I think this is a very common mistake, so we need another way to prevent such mistakes. I suggest to add a sort of UrlBuilder which enforces encoding to input elements if needed.

I considered doing this, but then we have a new problem of how to get callers to use UrlBuilder rather than making their own URLs. So I ended up just adding a urlEncode method to StringUtils and calling that where appropriate. (Note: it isn't always appropriate, since sometimes the format parameter is a literal path string like "foo/bar" and in that case we should not url encode.)

I've pushed a fix for the tests.

Fixed conflicts.

Please check the build failure.
[ERROR] Forbidden field access: java.lang.System#out [prints to System.out; should only be used for debugging, not in production code]
[ERROR]   in io.druid.query.topn.types.NumericTopNColumnSelectorStrategy (NumericTopNColumnSelectorStrategy.java:153)
[ERROR] Forbidden method invocation: java.lang.String#format(java.lang.String,java.lang.Object[]) [Uses default locale]
[ERROR]   in io.druid.query.topn.types.NumericTopNColumnSelectorStrategy (NumericTopNColumnSelectorStrategy.java:153)
[ERROR] Forbidden field access: java.lang.System#out [prints to System.out; should only be used for debugging, not in production code]
[ERROR]   in io.druid.query.topn.TopNLexicographicResultBuilder (TopNLexicographicResultBuilder.java:79)
[ERROR] Scanned 1596 (and 630 related) class file(s) for forbidden API invocations (in 1.63s), 3 error(s).

@gianm this is having a hard time passing integration tests

I wasn't sure if it was timing out (we are pretty close to the timeout) or if there was something wrong with the patch that affects the integration tests. I'll take a closer look soon.

I added some fixes for the router that might have been affecting the integration tests. It was double-encoding any encoded paths that it received from a client, meaning it would garble those URLs.

Also please check the travis fail. Looks legit.
[ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1,646.446 s <<< FAILURE! - in TestSuite
[ERROR] testIndexData(org.apache.druid.tests.indexer.ITParallelIndexTest)  Time elapsed: 242.129 s  <<< FAILURE!
org.apache.druid.java.util.common.ISE: Error while making request to url[http://<IP_ADDRESS>:8081/druid/coordinator/v1/datasources/wikipedia_parallel_index_test/intervals] status[204 No Content] content[]
	at org.apache.druid.tests.indexer.ITParallelIndexTest.testIndexData(ITParallelIndexTest.java:44)

@gianm I think this is failing integration tests

The integration test issue seems to be due to some double-encoding happening (the URI constructor encodes its parameters, URL doesn't). Will sort that out.

I fixed the double-encoding and I think this is good to go now.


SPI.transfer16 - does not properly handle word size.

Describe the bug
SPI.transfer16(0x2ff) - with MSBFIRST defined in the transaction, outputs the bytes in LSB, MSB order
The issue, is that the code, does not update the word size from 8 to 16 in the config.operation field.
Optional: attach the sketch
#include <SPI.h>
void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);
    SPI.begin();
    SPI.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE0));
    pinMode(53, OUTPUT);
    digitalWrite(53, HIGH);
}

uint16_t loop_count = 0;

void loop() {
    loop_count++;
    digitalWrite(53, LOW);
    SPI.transfer(loop_count >> 8);
    SPI.transfer(loop_count & 0xff);

    delayMicroseconds(5);
    SPI.transfer16(loop_count);
}

Additional context
I thought I could fix this, by simply editing the Transfer16 method to:
uint16_t arduino::ZephyrSPI::transfer16(uint16_t data) {
  int ret;
  uint16_t rx;
  const struct spi_buf tx_buf = {.buf = &data, .len = sizeof(data)};
  const struct spi_buf_set tx_buf_set = {
      .buffers = &tx_buf,
      .count = 1,
  };
  const struct spi_buf rx_buf = {.buf = &rx, .len = sizeof(rx)};
  const struct spi_buf_set rx_buf_set = {
      .buffers = &rx_buf,
      .count = 1,
  };

  spi_operation_t operation_save = config.operation;
  config.operation = (operation_save &= ~(SPI_WORD_SET(0x3f))) | SPI_WORD_SET(16);

  ret = spi_transceive(spi_dev, &config, &tx_buf_set, &rx_buf_set);
  config.operation = operation_save;
  if (ret < 0) {
    return 0;
  }

  return rx;
}

But running it faulted:

uart:~$ sketch
[00:00:12.771,000] <err> os: ***** USAGE FAULT *****
[00:00:12.777,000] <err> os:   Attempt to execute undefined instruction
[00:00:12.784,000] <err> os: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x240008b0
[00:00:12.793,000] <err> os: r3/a4:  0x240008b0 r12/ip:  0x0805b2a0 r14/lr:  0x0804e8f9
[00:00:12.801,000] <err> os:  xpsr:  0x61000000
[00:00:12.807,000] <err> os: s[ 0]:  0x2400eb6d  s[ 1]:  0x2400eba3  s[ 2]:  0x2400f05d  s[ 3]:  0x2400d714
[00:00:12.817,000] <err> os: s[ 4]:  0x2400eb89  s[ 5]:  0x08048dfd  s[ 6]:  0x2400d714  s[ 7]:  0x2400eb89
[00:00:12.827,000] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
[00:00:12.838,000] <err> os: s[12]:  0x00003a48  s[13]:  0x08042adf  s[14]:  0xaaaaaaaa  s[15]:  0xaaaaaaaa
[00:00:12.848,000] <err> os: fpscr:  0xaaaaaaaa
[00:00:12.853,000] <err> os: Faulting instruction address (r15/pc): 0x2400e750
[00:00:12.861,000] <err> os: >>> ZEPHYR FATAL ERROR 36: Unknown error on CPU 0
[00:00:12.869,000] <err> os: Current thread: 0x240008b0 (shell_uart)
[00:00:12.876,000] <err> os: Halting system

I probably missed something, but thought I would at least first mention this as an issue.

Edit to the above: this line:
config.operation = (operation_save &= ~(SPI_WORD_SET(0x3f))) | SPI_WORD_SET(16);
Should be:
config.operation = (operation_save & ~(SPI_WORD_SET(0x3f))) | SPI_WORD_SET(16);
And it then properly changed it from 0x100 to 0x200.
However it did not change the output at all.  Thought maybe MSBFIRST -> SPI_TRANSFER_MSB
Maybe issue with MSBFIRST is 1 and LSBFIRST is 0, and SPI_TRANSFER_MSB is 0...
So I hacked setting bit 5 to see if it made a difference and no, as far as the Logic Analyzer output.

@facchinm - I figured out what the issue is, but not necessarily what the best solution for it would be.  I have a version, which at least shows how it can potentially work...
The issue is, with the use of the config object.
The spi_transceive function calls through to the function transceive within the file spi_ii_stm32.c.   Which then passes the
config off to the function: spi_stm32_configure, which then calls off to:
	if (spi_context_configured(&data->ctx, config)) {
		/* Nothing to do */
		return 0;
	}

Which in spi_context.h simply does:
static inline bool spi_context_configured(struct spi_context *ctx,
					  const struct spi_config *config)
{
	return !!(ctx->config == config);
}

Which at the end of the spi_transceive function it assigns the ctx->config to the value passed in.  Or in other words,
if you pass in the same context object,
My first quick and dirty hack version:
uint16_t arduino::ZephyrSPI::transfer16(uint16_t data) {
  int ret;
  uint16_t rx;
  const struct spi_buf tx_buf = {.buf = &data, .len = sizeof(data)};
  const struct spi_buf_set tx_buf_set = {
      .buffers = &tx_buf,
      .count = 1,
  };
  const struct spi_buf rx_buf = {.buf = &rx, .len = sizeof(rx)};
  const struct spi_buf_set rx_buf_set = {
      .buffers = &rx_buf,
      .count = 1,
  };

  struct spi_config config16;
  memcpy((void*)&config16, (void*)&config, sizeof(config));
  config16.operation = (config.operation & ~(SPI_WORD_SET(0x3f))) | SPI_WORD_SET(16);

  static uint8_t debug_count = 2;
  static SPI_TypeDef *DBGSPIx;
  if (debug_count) {
    Serial.print(config.operation, HEX);
    Serial.print("->");
    Serial.println(config16.operation, HEX);
    if (this == &SPI1) DBGSPIx = (SPI_TypeDef *)0x40015000ul;
    else  DBGSPIx = (SPI_TypeDef *)0x40013000ul;
    Serial.print("B:"); Serial.print((uint32_t)DBGSPIx, HEX);
    Serial.print(" "); Serial.print(DBGSPIx->CFG1, HEX);
    Serial.print(" "); Serial.print(DBGSPIx->CFG2, HEX);
    Serial.print(" "); Serial.print(DBGSPIx->CR1, HEX);
    Serial.print(" "); Serial.println(DBGSPIx->CR2, HEX);
    delay(50);
  }

  ret = spi_transceive(spi_dev, &config16, &tx_buf_set, &rx_buf_set);
  if (debug_count) {
    debug_count--;
    Serial.print("A:         "); Serial.print(DBGSPIx->CFG1, HEX);
    Serial.print(" "); Serial.print(DBGSPIx->CFG2, HEX);
    Serial.print(" "); Serial.print(DBGSPIx->CR1, HEX);
    Serial.print(" "); Serial.println(DBGSPIx->CR2, HEX);
    delay(50);
  }
  if (ret < 0) {
    return 0;
  }

  return rx;
}

Which is mostly debug code, currently puts a spi_config structure on the stack, copies the current one to it and
updates the operation from 8 bits to 16 bits.   And the Logic Analyzer output shows it updated:

Like I manually did for the two 8 bit outputs:
void loop() {
    loop_count++;
    digitalWrite(53, LOW);
    SPI.transfer(loop_count >> 8);
    SPI.transfer(loop_count & 0xff);
    SPI.transfer16(loop_count);
    digitalWrite(53, HIGH);
    delayMicroseconds(5);
}

I also want to confirm that the registers were properly updated (debug code above):
Output:
S:40013000 70007 0 0 0
100->200
B:40013000 20070007 20400000 0 0
A:         2007000F 20400000 0 0
100->200
B:40013000 20070007 20400000 0 0
A:         2007000F 20400000 0 0

So it did update the CFG1 setting, DSIZE, the other 7 checked was the CRCSIZE, and my guess is we don't use this.
How to Properly fix?
a) Change how the testing is done for change... More complex, probalby need to keep copy of last config, not
pointer...
b) Which I will play with:
Change SPI object, to have two config objects, config and config16, both of which are setup within beginTransaction and probably should be done as part of begin() as well... And then transfer16 simply uses the config16...
Thoughts?

b) Which I will play with:
Change SPI object, to have two config objects, config and config16, both of which are setup within beginTransaction and probably should be done as part of begin() as well... And then transfer16 simply uses the config16...

This approach seems to be more logical, at least to me.  Also I believe in the KISS principle

@mjs513 Thanks,
@facchinm,
I have an implementation that appears to be working using b)
That I would check in, but I am currently working off of your PR branch, so not sure
best way to do so...
It is here:
I added the config16, initialized in beginTransaction, and then transfer16 uses it.
I also updated begin() to call beginTransaction(SPISettings()); endTransaction();
so that if anyone does any transfers without calling beginTranaction it should output using the defaults.
SPI.zip
Both appeared to work using test sketch:
#include <SPI.h>
void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);
    SPI.begin();

    static SPI_TypeDef *DBGSPIx;
    DBGSPIx = (SPI_TypeDef *)0x40013000ul;
    Serial.print("S:");
    Serial.print((uint32_t)DBGSPIx, HEX);
    Serial.print(" ");
    Serial.print(DBGSPIx->CFG1, HEX);
    Serial.print(" ");
    Serial.print(DBGSPIx->CFG2, HEX);
    Serial.print(" ");
    Serial.print(DBGSPIx->CR1, HEX);
    Serial.print(" ");
    Serial.println(DBGSPIx->CR2, HEX);
    delay(50);

    // Check before we do begin transaction.
    pinMode(53, OUTPUT);
    digitalWrite(53, HIGH);
    digitalWrite(53, LOW);
    for (uint8_t i = 0; i < 10; i++) SPI.transfer(i);
    digitalWrite(53, HIGH);
    delay(5);
    digitalWrite(53, LOW);
    for (uint16_t i = 0; i < 64 * 10; i += 64) SPI.transfer16(i);
    digitalWrite(53, HIGH);

    SPI.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE0));
}

uint16_t loop_count = 0;

void loop() {
    loop_count++;
    digitalWrite(53, LOW);
    SPI.transfer(loop_count >> 8);
    SPI.transfer(loop_count & 0xff);
    SPI.transfer16(loop_count);
    digitalWrite(53, HIGH);
    delayMicroseconds(5);
}

@KurtE good catch! I almost never use transfer16() so that code patch went untested.
Would you mind submitting a PR?


xfce4-terminal ignores configuration files, discards gui settings

Describe the bug
xfce4-terminal discards any change made to its settings/preference app (reopening shows everything reset). None of the locations that the upstream docs say should be used for a settings file seem to have one and the default location under .config is ignored. The result is that it seems it is impossible to customize the application.
Steps To Reproduce
GUI only
Steps to reproduce the behavior:

Install xfce4-terminal
Open settings dialog
Change something
Close dialogue
Observe the setting change does not take effect
Open dialogue
See your change reverted

text based

Place a configuration file at ~/.config/xfce4/terminal/terminalrc
Open the app
Observe that your settings are ignored
Open preferences
Observe the settings in your config are not reflected in the dialogue

Expected behavior
I expect the preferences dialogue to be usable and I expect the terminalrc file to be honored
Additional context
I posted about this at https://discourse.nixos.org/t/unable-to-change-settings-in-xfce4-terminal/33084 and on Mastodon. The latter resulted in another user confirming the issue.
Notify maintainers
@Artturin @muscaln @romildo
Metadata
╔ ☕  rainbow-planet ~
╚ᐅ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.52, NixOS, 23.11 (Tapir), 23.11.20230911.bb446a1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/unable-to-change-settings-in-xfce4-terminal/33084/2

https://github.com/NixOS/nixpkgs/issues/65771 ;) I had this same problem when i started using nixos

Someone could look into if the dbus service is always necessary and if propagating xfconf could work

Based on this @Artturin, I added programs.xfconf.enable to my config and things seem to work... how is a user supposed to know to do this?

Also @Artturin, thank you! Do you know if the settings in the gui are written to disk anywhere? I'd like to edit there and then copy to my config.

Docs could be added to nixos/doc/manual/configuration/xfce.chapter.md about using xfce programs outside of xfce the de mentioning some common keywords


error: No overload variant of "fillna" of "Series" matches argument type "NAType"  [call-overload]

import pandas as pd
s = pd.Series([1.2, float('nan')])
s = s.fillna(pd.NA)
print(s)

Have to add NaTType to various overloads of fillna() in both core/series.pyi and core/frame.pyi


Tree shaking issue

Hey team,
We currently use this plugin and for a few weeks now we have been experiencing the following issue.

✘ [ERROR] Could not resolve "../_virtual/_rollupPluginBabelHelpers.js"

    node_modules/.pnpm/@ensdomains+ens-avatar@0.3.2/node_modules/@ensdomains/ens-avatar/dist/index.esm.js:1:108:
      1 │ import { inheritsLoose as _inheritsLoose, asyncToGenerator as _asyncToGenerator, extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
        ╵                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] Could not resolve "../node_modules/regenerator-runtime/runtime.esm.js"

    node_modules/.pnpm/@ensdomains+ens-avatar@0.3.2/node_modules/@ensdomains/ens-avatar/dist/index.esm.js:2:32:
      2 │ import _regeneratorRuntime from '../node_modules/regenerator-runtime/runtime.esm.js';
        ╵                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We are using PNPM & Vite and in versions 3+ we experience this issue.
Downgrading to 0.2.5 is our current fix so this issue doesn't occur.

Hey @nickdoherty, thanks for the report! I double-checked and it seems there was a bug in the pre-publish packing process. Made a fix and published the new version 0.3.3. Please let me know if it solves your problem.

Perfect, thank you so much! This has fixed the issue.

This is still happening to me on Vercel

I have the same issue as @fabriguespe when using Bun/docker for deployment. Strange enough it build locally, issue appears isolated to CI.
It works fine using Pnpm/npm using docker or building locally.
3.321  ERROR  Could not resolve "./node_modules/regenerator-runtime/runtime.esm.js" from<EMAIL_ADDRESS>3.321 file<EMAIL_ADDRESS>3.321
3.324
3.324  ERROR  error during build:
3.324 RollupError: Could not resolve "./node_modules/regenerator-runtime/runtime.esm.js" from<EMAIL_ADDRESS>3.324     at error (/app/node_modules/rollup/dist/es/shared/parseAst.js:339:10)
3.324     at <anonymous> (/app/node_modules/rollup/dist/es/shared/node-entry.js:17894:9)
3.324     at processTicksAndRejections (:61:39)

@nickdoherty @fabriguespe does this happen with v0.3.3 ?

Still occurs on 0.3.3 for me. Currently using 0.3.5.

Yes happens also with 0.3.5

sorry for the long due. with version 0.3.6, this issue must disappear, please let me know if the issue still persist.


Fetch only the secret specified in the SecretSync from the provider per reconcile

Currently in the controller we fetch all secrets in a SecretProviderClass from the provider each time we reconcile a SecretSync. This can have a large impact in costs from providers and is an inefficiency.
Describe the solution you'd like
I would like to only fetch the secret referenced in the secret sync that we are reconciling.
Environment:

Secrets Store Sync Controller version: (use the image tag): v0.0.1

Thanks for raising the issue @AlexanderStocks.
The SecretsProviderClass (SPC) serves as the common interface between the Secrets Store CSI Driver and the Secrets Store Sync Controller. Although we expect a 1:1 mapping for secrets between SecretsSync and SPC, there is no such requirement when SPC is used in the Secrets Store CSI driver. Users can define multiple secrets they want to fetch from an external key vault and mount on the volume.
In SecretsSync, you can define only one secret that needs to be created as a Kubernetes Secret. Given this 1:1 mapping, is there a specific reason you are defining multiple secrets in SPC?

/assign

@AlexanderStocks, We discussed this in the community call on 09/05. Another thing to consider is that SecretsSync does not have an understanding of how secrets are defined in the SPC. It’s just a map that can be defined however individual providers want to implement or consume it from the SPC.
The recommendation here is:
1.	Do not include additional secrets in the SPC that are not used for sync.
2.	If you are using a common SPC between both the driver and the sync controller, separate those secrets in different SPCs to ensure the controller does not generate additional calls to Key Vaults.
/close


Please add CM3

https://github.com/modula3/cm3

The language's name is Modula 3, CM3 is the implementation.

Thanks!


Could not pass event PlayerDeathEvent to MinecraftManhunt v1.3.1

At the end of a manhunt session I noticed some errors in the logs.
Everytime the hunter died, there was a Could not pass event PlayerDeathEvent to MinecraftManhunt v1.3.1 error.
Logs below or here (color coded)
[17:47:15] [Server thread/INFO]: Golden_Armada has made the advancement [Acquire Hardware]
[17:47:17] [Server thread/INFO]: Golden_Armada has made the advancement [Diamonds!]
[17:48:09] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to MinecraftManhunt v1.3.1
org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:928) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:828) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.EntityLiving.a(EntityLiving.java:1524) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.a(EntityHuman.java:938) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:983) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.d(EntityHuman.java:1275) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.d(EntityPlayer.java:2031) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.PlayerConnection$3.a(PlayerConnection.java:2380) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity$1.a(SourceFile:166) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:66) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2305) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:53) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:13) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:33) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:156) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1191) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:1) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.x(SourceFile:130) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1170) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1163) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:139) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1147) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1060) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "org.bukkit.inventory.meta.ItemMeta.getLore()" is null
	at me.matistan05.minecraftmanhunt.listeners.DeathListener.DeathEvent(DeathListener.java:26) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	... 30 more
[17:48:09] [Server thread/INFO]: FluxiumYT was slain by Golden_Armada
[17:48:09] [Server thread/INFO]: Golden_Armada has made the advancement [Isn't It Iron Pick]
[17:48:09] [Server thread/INFO]: Golden_Armada has made the advancement [Stone Age]
[17:48:09] [Server thread/INFO]: Golden_Armada has made the advancement [Suit Up]
[17:50:06] [Server thread/INFO]: FluxiumYT has made the advancement [Getting an Upgrade]
[17:54:10] [Server thread/INFO]: FluxiumYT has made the advancement [Hot Stuff]
[17:55:01] [Server thread/INFO]: Golden_Armada has made the advancement [Monster Hunter]
[17:56:25] [Server thread/INFO]: FluxiumYT has made the advancement [Monster Hunter]
[17:56:33] [Server thread/INFO]: Golden_Armada has made the advancement [Hot Stuff]
[17:58:03] [Server thread/INFO]: FluxiumYT issued server command: /manhunt pause
[17:58:14] [Server thread/INFO]: Golden_Armada issued server command: /manhunt pause
[17:58:42] [Server thread/INFO]: FluxiumYT issued server command: /manhunt resume
[17:58:46] [Server thread/INFO]: FluxiumYT issued server command: /manhunt unpause
[17:58:52] [Server thread/INFO]: Golden_Armada issued server command: /manhunt unpause
[18:04:48] [Server thread/INFO]: Golden_Armada issued server command: /manhunt pause
[18:04:50] [Server thread/INFO]: FluxiumYT issued server command: /manhunt pause
[18:05:09] [Server thread/INFO]: Golden_Armada issued server command: /manhunt unpause
[18:05:09] [Server thread/INFO]: FluxiumYT issued server command: /manhunt unpause
[18:16:05] [Server thread/INFO]: FluxiumYT has made the advancement [Sweet Dreams]
[18:16:31] [Server thread/INFO]: Villager EntityVillager['Cartographer'/22356, l='ServerLevel[survival_2024]', x=-480.92, y=64.00, z=-1548.35] died, message: 'Cartographer was slain by Husk'
[18:18:03] [Server thread/INFO]: FluxiumYT has made the advancement [Not Today, Thank You]
[18:20:17] [Server thread/INFO]: Golden_Armada issued server command: /manhunt pause
[18:20:19] [Server thread/INFO]: FluxiumYT issued server command: /manhunt pause
[18:20:27] [Server thread/INFO]: FluxiumYT issued server command: /manhunt unpause
[18:20:29] [Server thread/INFO]: Golden_Armada issued server command: /manhunt unpause
[18:22:46] [Server thread/INFO]: Golden_Armada has made the advancement [We Need to Go Deeper]
[18:24:55] [Server thread/INFO]: FluxiumYT has made the advancement [We Need to Go Deeper]
[18:25:08] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to MinecraftManhunt v1.3.1
org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:928) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:828) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.EntityLiving.a(EntityLiving.java:1524) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.a(EntityHuman.java:938) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:983) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.Entity.as(Entity.java:630) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.EntityLiving.as(EntityLiving.java:406) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.Entity.l(Entity.java:584) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.EntityLiving.l(EntityLiving.java:2893) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.l(EntityHuman.java:268) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.m(EntityPlayer.java:670) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.PlayerConnection.e(PlayerConnection.java:336) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.NetworkManager.d(NetworkManager.java:392) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.ServerConnection.c(ServerConnection.java:180) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1399) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:387) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1242) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1054) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "org.bukkit.inventory.meta.ItemMeta.getLore()" is null
	at me.matistan05.minecraftmanhunt.listeners.DeathListener.DeathEvent(DeathListener.java:26) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	... 23 more
[18:25:08] [Server thread/INFO]: FluxiumYT burned to death
[18:25:46] [Server thread/INFO]: FluxiumYT was burned to a crisp while fighting Golden_Armada
[18:26:04] [Server thread/INFO]: FluxiumYT was slain by Golden_Armada
[18:26:20] [Server thread/INFO]: FluxiumYT has made the advancement [Diamonds!]
[18:26:57] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to MinecraftManhunt v1.3.1
org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:928) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:828) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.EntityLiving.a(EntityLiving.java:1524) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.a(EntityHuman.java:938) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:983) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.world.entity.player.EntityHuman.d(EntityHuman.java:1275) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.level.EntityPlayer.d(EntityPlayer.java:2031) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.PlayerConnection$3.a(PlayerConnection.java:2380) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity$1.a(SourceFile:166) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:66) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2305) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:53) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:13) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:33) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:156) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1191) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:1) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.x(SourceFile:130) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1170) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1163) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:139) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1147) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1060) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4077-Spigot-e9ec548-dfaa89b]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "org.bukkit.inventory.meta.ItemMeta.getLore()" is null
	at me.matistan05.minecraftmanhunt.listeners.DeathListener.DeathEvent(DeathListener.java:26) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	... 30 more
[18:26:57] [Server thread/INFO]: FluxiumYT was slain by Golden_Armada

Thanks for your feedback, I will fix this bug right away.


Running config server on Mac

This has been a proof of concept - the commit should not be merged with master.
Step 1. Maven build everything (except tests, source jars, javadoc, etc)
Step 2. Install the config server to e.g. ~/vespa:
configserver/src/main/sh/install-configserver -j -H ~/vespa
Step 3. Start the config server:
VESPA_HOSTNAME=localhost VESPA_CONFIGSERVERS=localhost ~/vespa/libexec/vespa/start-configserver
Step 4. Verify it's up by e.g.:

Viewing logs in ~/vespa/logs/vespa/vespa.log
curl localhost:19071/state/v1/health
Step 5. Control-C to shut down config server

To make this work, the following had to be done:

Copy lots of JAR files, def files, scripts, and various files to destination
directory (aka VESPA_HOME). This is 300MB, but could be pruned much more.
There are lots of similarities between this and
vespa-standalone-container.sh (of course).
Modify the start-configserver script and dependent scripts to 1. avoid using
C++ binaries like vespa-detect-hostname, vespa-print-default,
vespa-run-as-vespa-user, and vespa-runserver, 2. avoid non-working bash,
3. skip vespamalloc and logd, and 4. make various directories etc that are
assumed to exist.

The changes to stop-configserver is strictly not necessary if the config server
stays in the foreground as start-configserver currently does (for local runs).
The changes to StandaloneMain and sigterm files are only needed to properly
shutdown with Control-C when running config server in foreground.

@hakonhall Still relevant, or close ?


How to reach the template directory from a router.py in a sub diretory?

I tried to follow the tutoria to form a bigger application
https://fastapi.tiangolo.com/tutorial/bigger-applications/
the project structure is like :
.
├── app
│   ├── __init__.py
│   ├── main.py
│   ├── model.py
│   ├── countries.gz
│   └── routers
│         ├── __init__.py
│         ├── items.py
│         └── users.py
│   └── templates
│         ├── layout.html
│         ├── home.html
│         └── world.html

main.py:
from fastapi import FastAPI, Request, APIRouter
from .routers import us_router, world_router

app = FastAPI()
# should I add some config here?

app.include_router(us_router.router)
app.include_router(world_router.wrouter)

in the /routers/items.py
from fastapi.templating import Jinja2Templates

wrouter = APIRouter()

templates = Jinja2Templates(directory='templates')
# if the router.py is in the same level of templates directory, this will work.
# should I change something here? I tried '../templates', not work.

@wrouter.get("/world", response_class=HTMLResponse)
async def world(request: Request):
    flist = fig.fig_world('total_cases')
    return templates.TemplateResponse('world.html', {'request': request,
                                                     'line_latest': flist[0],
                                                     }
                                      )

The problem:
cannot find the world.html, which is in templates directory.
If I use a absolute directory 'home/eric/fastapi/app/templates', it will work.
model.py:
import pandas as pd

df = pd.read_pickle('countries.gz')
# this is very confusing, I tried './countries.gz', not work

......

Problem:
cannot find the 'countries.gz' in the same directory. use absolute directory will work.
expected answer:
As a beginner, I am confused on the logic. I would like to know what is the best practice to handle the directories in the fastapi project?
Thanks a lot.

can you put here your executes command?
do you run the command inside app directory or outside of that?

I execute just outside the app directory: uvicorn app.main:app --reload
OH!
change like this will work:
templates = Jinja2Templates(directory='./app/templates')

Thank you so much, the project root dir is the excute directory, NOT the main.py.directory.
My follow up question is:
Will it be more reasonable if I set the main.py directory as root? where should I config, If I want to do this,

You probably want to do something like this:
from os.path import dirname, join

current_dir = dirname(__file__)  # this will be the location of the current .py file
templates = join(current_dir, 'templates')

Thanks!
wonderful!

Thanks for the help here everyone! :clap: :bow:
Thanks for reporting back and closing the issue :+1:

Pretty odd. What do we do with unit tests?
tests folder is at the same level as app  in my case.
I have to do this to make it work:
templates = Jinja2Templates(directory="../app/templates")
But that won't work then when running the actual server outside unit testing. It's a catch 22.  Is there a better way to achieve this? Thanks

@houmie What I did is create the templates variable inside a config.py file in my project root. That way, I can import templates from whatever place in the app (sub-routers, main app, tests, ...) and not worry about directory paths.

@houmie if you still have issues, please create a new issue following the template to be able to understand your problem. :nerd_face:

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.

@tiangolo No problem.
I ended up solving this with an absolute path instead of relative path:
config.py
@lru_cache()
def get_app_root():
    return os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))

dashboard.py
from fastapi.templating import Jinja2Templates
templates = Jinja2Templates(directory=get_app_root() + "/app/templates")

@router_board.get("/", response_class=HTMLResponse)
async def analysis(request: Request, credentials: HTTPBasicCredentials = Depends(security)):
    return templates.TemplateResponse("dashboard.html", {...})


Is this actually BM25?

I don't think the implementation here for the BM25Encoder is standard BM25.
If you have a look at the standard B25 formula from, e.g. Wikipedia, it has two terms in the sum--the IDF term and the other term.  The other term is what is being calculated during the document encoding phase here.  It leaves out the constant k+1 factor but that shouldn't matter for the ranking when the dot product happens with the query later.
The IDF term appears to be calculated via the query encoding here.
There are two issues with this calculation.  The first is that the variable tf here is confusingly misnamed because that's actually document frequency, not term frequency.
Second, the formula is just different from the usual BM25 formula.  What is implemented here appears to be, using the Wikipedia notation,
ln { (N + 1) / (n(q) + 0.5) }

It's also then normalized.  The BM25 IDF term is
ln { 1 + (N - n(q) + 0.5) / (n(q) + 0.5) }

and it isn't normalized.
Are you all sure that your implementation is correct?  Or did you intend to implement some other BM25?  If it's the latter could you include a reference to it?

Hi @mdagost,

Regarding the naming - you are completely right I created a PR to fix it: #70
Regarding the IDF term - note that both terms are identical: ln { 1 + (N - n(q) + 0.5) / (n(q) + 0.5) } = ln { (n(q) + 0.5) / (n(q) + 0.5) + (N - n(q) + 0.5) / (n(q) + 0.5)} = ln { ( N + n(q) - n(q) + 0.5 + 0.5) } = ln { (N + 1) / (n(q) + 0.5) }

Doh. Sorry for the noise over some dumb algebra :)
On Sun, Jan 21, 2024 at 2:37 AM Amnon Catav @.***>
wrote:

Hi @mdagost https://github.com/mdagost,

Regarding the naming - you are completely right I created a PR to
fix it: #70 https://github.com/pinecone-io/pinecone-text/pull/70
Regarding the IDF term - note that both terms are identical: ln { 1

(N - n(q) + 0.5) / (n(q) + 0.5) } = ln { (n(q) + 0.5) / (n(q) + 0.5) + (N

n(q) + 0.5) / (n(q) + 0.5)} = ln { ( N + n(q) - n(q) + 0.5 + 0.5) } = ln
{ (N + 1) / (n(q) + 0.5) }

—
Reply to this email directly, view it on GitHub
https://github.com/pinecone-io/pinecone-text/issues/69#issuecomment-1902555377,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKF4IJTWZ7BNHYVDFYSXDTYPTHWPAVCNFSM6AAAAABCDN5UGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGU2TKMZXG4
.
You are receiving this because you were mentioned.Message ID:
@.***>


Volcano scheduler: minResource configuration support for spark-on-k8s-operator

It looks like the minResource configuration is not supported for the spark operator which is crutial for gang scheduling pods in a spark-application. There is default value for minResource that is the total resource of driver and executor which we have to use if we use the spark operator.
(The latest update on this is that it is still being worked on. However, I will be opening this issue to track the progress of this feature)
This feature is currently supported for spark-submit in the Huawei fork of apache/spark (https://github.com/huawei-cloudnative/spark/tree/spark-2.4-volcano-0.1) and since the spark operator automatically runs spark-submit under the hood, we should be able to bring this feature to the spark-on-k8s-operator as well.

@hzxuzhonghu , please help on that when you have time :)

@Gouthamkreddy1234 releated PR is https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/pull/966

I'm still perfecting e2e case about the feature. New commit is on the  way.

Thanks @Thor-wl for the PR. @k82cn @hzxuzhonghu could you please take a look at the PR? Thanks.

Thanks @Thor-wl! :)

I have a doubt: whether custom configed request resource is less than the total resource of executors and drivers is permitted. I'm not so familiar with the real scenes of Spark application. Current code logic has no limition to the custom request resource.

I have a doubt: whether custom configed request resource less than the total resource of executors and drivers is permitted. I'm not so familiar with the real scenes of Spark application. Current code logic has no limition to the custom request resource.

Usually the custom configed request resource is less than total resource of executors and drivers.

Usually the custom configed request resource is less than total resource of executors and drivers.

ok, thx

Fixed in GoogleCloudPlatform/spark-on-k8s-operator#966


[Hub Generated] add missing date-time format specifier across map clients for cleaner codegen with datetime types

This is a PR generated at OpenAPI Hub. You can view your work branch via this link.
Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[x] add missing date-time format specifier across map clients for cleaner codegen with datetime types

When are you targeting to deploy the new service/feature to public regions?
Services are already deployed.
When do you expect to publish the swagger?
ASAP
If updating an existing version, please select the specific langauge SDKs and CLIs that must be refreshed after the swagger is published.
No data-plane SDKs are onboarded yet, so no refresh required.

Contribution checklist:

[x] I commit to follow the Breaking Change Policy of "no breaking changes"
[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in a stable version
[ ] Removing properties in a stable version
[ ] Removing API version(s) in a stable version
[ ] Updating API in a stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

@tjprescott: adding "format":"date-time" is not breaking in any way as there is no codegened clients onboarded yet.

@lmazuel can you merge this. The breaking change failure is a false positive as they have not released a data-plane client.


Dealing with dates

I'm not sure how dates are currently summarised as where I've tried this the output is suppressed due to small numbers (there are many different date values returned), however it would be useful if they could be summarised into months or years or similar, either as specified by the user or automatically based on the range of dates found (e.g. if dates span more than 24 months, use years, else if dates span more than 2 months use months, else use weeks, etc)

Let's distinguish between dates-as-type and dates-as-pattern. Dates-as-type are described in the Pandas documentation; essentially instances of datetime64. Dates-as-pattern are instances of some other type; often strings, such as "2021-11-11".
Your dates may arrive as-type or as-pattern. If you're not sure which, then you can use the variable_types property to cast them to as-type. Cohort-report v2.1.0 would prefer your dates to be as-type; it treats a column (Series) of dates-as-type as discrete and counts them (see also the datetime_is_numeric argument to  Series.describe, for precedent). This means their resolution is always to the day, which means days may be redacted when they don't satisfy the heuristics. For more on the heuristics, see the cohortreport.processing.redact function.
I think you're asking for cohort-report to treat a column of dates-as-type as continuous and to use an appropriate binning strategy. Because of complexities of how we, as humans, think about the passage of time, an appropriate binning strategy means different things to different people. See, for example, Vega's TimeUnit transform and Pandas' time series resampling functionality.
Hopefully this answers your question 🙂 We should spend some time discussing new functionality before implementing it, because... well... it's complicated. I will label this issue as documentation in the first instance; we can relabel it as enhancement later.

So - at present cohort-report will summarise dates by individual day (ie the histogram will show the frequency on every single date)?
This will probably quite often produce a large number of values (usually hundreds, ie. a few months or a couple of years), but will sometimes span 1900-01-01 (the default for anything lacking a date) to present day, e.g. for something like the date of diabetes diagnosis - which may make it difficult to interpret.
As a potentially simple/interim solution, could we return, as well as the most commonly occurring date, the most common Month and most common Year?


Can't repeat the result.

Wonderful work, but I cannot repeat your results. Specifically, I try to use ResNet12 as the backbone to solve the 5-way 1-shot task on CIFAR-FS. But the final accuracy I got was 70.63%.
[2020-07-16 09:08:10,015] [main] step : 67000  test_edge_loss : 2.035566942691803  test_node_acc : 0.7063199849426747
[2020-07-16 09:08:10,016] [main] evaluation: total_count=999, accuracy: mean=70.63%, std=7.18%, ci95=0.44%

My program environment is
CUDA Version: 10.0
Python : 3.6.7

Does the environment have such a big impact on accuracy?

Yes, as you know, different devices and environments could lead to different experiment results.
Sincerely
DPGN Team

I try to use ResNet12 as the backbone to solve the 5-way 1-shot task on CIFAR-FS. But the final accuracy I got was 70.63%.

Also, we run the 5-way 1-shot task on CIFAR-FS with ResNet12 backbone using a brand new Python3.6 environment.
Sincerely
DPGN Team


IMAP O365 - issue sync

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
After connecting to imap on Office365, folders are not synchronized, deleted emails are not synchronized, I do not see sent mail.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Add a hosted account to Office365
What is the expected behavior?
To make it work correctly
Did this work in previous versions of DocumentServer?
N/A
DocumentServer Docker tag:
Host Operating System:
Debian Buster

thank you, sorry for the bad repository. I use a docker

Hello @ajtak-angelus Sorry, but onlyoffice mail module works only as aggregator, don't have full imap synchronization. In future version we will add this feature.

Do you have any idea when it might be? My client is very satisfied with your software and there is a good chance that it will change to a paid version. Thank you

I can’t give you any specific dates, it's a big feature.


Option to enable Sticky Scroll (always see current scope in code)

Check for existing issues

[X] Completed

Describe the feature
Would be nice to have the Sticky Scroll feature as seen in VS Code and Xcode.

If applicable, add mockups / screenshots to help present your vision of the feature
A demo of what it does:
https://user-images.githubusercontent.com/5619348/224485697-63a8ef9a-22c4-44e8-9990-cfaff2062663.mp4

I believe this is a duplicate of https://github.com/zed-industries/community/issues/141

@fdionisi Looks like so! Didn't find it with some keywords I tried. Will close this one and 👍 there instead. Thanks.


Request cancel external workflow execution fixes.

New IDL error 'CancellationAlreadyRequestedError' to communicate there
is already a pending cancellation for workflow execution.
Added schema support for storing pending request cancel as mutable
state.  Mutable state now also stores cancel_requested and cancel_request_id
which can be used for deduping cancellation requests.
History engine changes to update mutable state to record outstanding
request cancellation events and also transfer task processor changes to
pass in the cancel request id and handle errors from target execution.
Fixes issue #145

Also added test coverage for testing dedupe logic


Include JCTools sources for shaded classes in the sources jar

Motivation:
We should include the shaded sources for JCTools in our sources jar to make it easier to debug.
Modifications:

Adjust plugin configuration to execute plugins in correct order
Update source plugin
Add configuration for shade plugin to generate source jar content

Result:
Fixes https://github.com/netty/netty/issues/6640.

/cc @cstancu

@netty-bot test this please

@normanmaurer thank you!


[Airbrake] [Production] undefined method `ancestors' for nil:NilClass

Airbrake error: #0564
Airbrake project: ETMoses
Error type: NoMethodError
Error message: undefined method `ancestors' for nil:NilClass
Where: gas_asset_lists#gas_load
Occurred at: Jun 20, 2016 09:01:59 UTC
First seen at: Jun 20, 2016 09:01:59 UTC
Occurrences: 1 (1 since last deploy on Jun 12, 2016 15:59:55 UTC)
URL: https://moses.energytransitionmodel.com/testing_grounds/485/gas_asset_lists/6/gas_load
File: [PROJECT_ROOT]/app/models/network/path.rb
Backtrace:
[PROJECT_ROOT]/app/models/network/path.rb:16:in find
[PROJECT_ROOT]/app/models/calculation/technology_load.rb:30:in block (2 levels) in run
[PROJECT_ROOT]/app/models/calculation/technology_load.rb:27:in each
[PROJECT_ROOT]/app/models/calculation/technology_load.rb:27:in block in run

Dup: #1100


remove another unnecessary modular image field

Get rid of Image.nb_channels, since it had become redundant, especially in the decoder.
Also fixes https://github.com/libjxl/libjxl/issues/184, removes/updates some stale comments, and removes a check that is already implied by an earlier check (so the condition will always fail).

do we want to backport the fix to 0.4? Could we split the commit to have the fix separated from the removal of the unnecessary field? I see a bit semantic changes here, sometimes is chanels.size() but sometimes is changed to channels.size() - nb_meta_channels.
Could we add a test for this fix as well?

One bug this fixes is a minor encoder regression where it would output an error in cases where palette is done and a manual global RCT is specified (it would still encode fine, just unnecessarily show an error).
Another bug it fixes is in the default squeeze params in the theoretical case where multiple squeeze transforms are done (something the encoder currently doesn't do).

I split off the change that is an actual (hypothetical) decoder bugfix, see https://github.com/libjxl/libjxl/pull/194.
The bug doesn't affect any existing bitstream and is unlikely to affect any future bitstream (the case in which it would make a difference is not something I think an encoder would want to do), but still, it would be good to backport that fix to 0.4 just to ensure it is forward-compatible.


[Bug]: Generate HL7 fake messages missing sender_id.

Contact Details
No response
What happened?
When I generate fake HL7 messages for KS and run it through RS hl7Serializer, it throws exception as below:
Exception in thread "main" gov.cdc.prime.router.ActionError:
Blank value for element (sender_id). Please refer to the ReportStream Programmer's Guide for required fields.
at gov.cdc.prime.router.serializers.Hl7Serializer.readExternal(Hl7Serializer.kt:438)
at gov.cdc.prime.router.cli.ProcessData.readReportFromFile(ProcessDataCommands.kt:274)
at gov.cdc.prime.router.cli.ProcessData.run(ProcessDataCommands.kt:433)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at gov.cdc.prime.router.cli.MainKt.main(main.kt:296)
To reproduce the problem follow the steps below:
'================================
1.) Generate fake hl7 file:
./prime data --input-fake 5 --input-schema primedatainput/pdi-covid-19 --output-format HL7 --output ./junk/KS/Testing/pdi-covid-19-ks.hl7 --target-states KS
2.) Run through RS prime cli
./prime data --input junk/KS/Testing/pdi-covid-19-ks.hl7 --input-schema HL7/hl7-ingest-covid-19-prod --output-dir junk/KS/output --route
Version
1.0.2 (Default)
What browsers are you seeing the problem on?
No response
Relevant log output
Exception in thread "main" gov.cdc.prime.router.ActionError:
Blank value for element (sender_id). Please refer to the ReportStream Programmer's Guide for required fields.
        at gov.cdc.prime.router.serializers.Hl7Serializer.readExternal(Hl7Serializer.kt:438)
        at gov.cdc.prime.router.cli.ProcessData.readReportFromFile(ProcessDataCommands.kt:274)
        at gov.cdc.prime.router.cli.ProcessData.run(ProcessDataCommands.kt:433)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
        at gov.cdc.prime.router.cli.MainKt.main(main.kt:296)

Code of Conduct

[X] I agree to follow this project's Code of Conduct

@oslynn As far as I can tell there is nothing wrong with the file that's generated here. It passes validation. sender_id is not an HL7 field, so it wouldn't be in the file that's generated.  Aside from that, the problem appears to be in the --route command. Since this is a command that only works locally, I think I'm going to add in a --sender option to let you set a sender_id with the command, unless there's some objection.

After digging into this deeper when I was trying to add the --sender option, I realized that if you have a sender in your local settings that uses the schema you are trying to use when you run the --route command, you don't get that error. I tested this by updating ignore.ignore-hl7 to use the schema hl7/hl7-ingest-covid-19-prod, running ./gradlew reloadSettings and running the second command. I'm closing this issue as not a problem.


Implement backend configuration sorting based on dependencies

Decription:
This pull request adds functionality to sort the backend configuration based on dependencies between calls. It introduces a new function sortBackends that takes a slice of BackendConfig as input and returns a sorted slice of BackendConfig. The sorting is done by checking the DependsOn field of each BackendConfig and ensuring that there are no circular dependencies. If a circular dependency is detected, an error is returned. This sorting logic is then applied in the NewCallsRepository function to sort the BackendConfig slice before processing the requests.
Notable Changes:

Added dependency handling to the Composer struct and functions in pkg/core/composer/composer.go.
Updated test cases to reflect changes in the Composer struct in pkg/core/composer/composer_test.go.
Modified interfaces to handle dependencies in pkg/core/handler/handler.go.
Updated Handler methods to incorporate dependency-based request processing.
Refactored request generation and handling logic.

Codecov Report
Attention: Patch coverage is 25.00000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 89.22%. Comparing base (54cdb5b) to head (934f91f).

Files with missing lines
Patch %
Lines

pkg/repo/callrepo.go
25.00%
12 Missing and 3 partials :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
- Coverage   91.15%   89.22%   -1.93%
==========================================
  Files          21       21
  Lines         667      687      +20
==========================================
+ Hits          608      613       +5
- Misses         41       53      +12
- Partials       18       21       +3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@shan-96 If you have time could you help to review the PR

Added a question and a comment. Rest LGTM


Consider switching from jest-fetch-mock to fetch-mock

We both ran into the issue of order in which you mock URLs which is super annoying. This issue was reported here, and as no real solution seems to exist, people suggested to use fetch-mock instead.
Now, it also seems empty response bodies are not supported by jest-fetch-mock so I suggest we give fetch-mock a try?

I am fine with that


Feature/welsh addresses

Adding welsh address linking prototype to dev.
A complete rewrite of the linking prototype will take place after the PR is approved, so there is no need to have a detailed review of this PR. The complete rewrite will turn the current linking prototypes into a single linking class which can be inherited to enable automated testing of different datasets.

LGTM


icons for "final" and "readonly" declarations

IntelliJ has a pin icon for final, and a grey padlock for "readonly" (i.e. stuff in binary archives).
I think we should make use of these. The pin could annotate final classes, and also shared, non-default, non-formal members.

Done.