Update tests to get rid of extra files created when running tests

Description
Added several pushd tmp_paths to the tests so that the tests would not create unneeded files or directories when running.
How Has This Been Tested?
Unit tests passed locally. The changes do not modify or affect any other tests or functionality in the program besides what they were intended for.
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] I have added an explanation of what your changes do and why you'd like us to include them.
[ ] I have written new tests for your core changes, as applicable.
[x] I have successfully ran tests with your changes locally.
[ ] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.

@jlmaurer

@jlmaurer

It looks like test_GUNW.py::test_azimuth_timing_interp_against_center_time_interp is still producing files in the repo directory. These are the files it outputted for me:

GUNW_20210723-20210711_015000.yaml
HRRR_tropo_20210711T015024_ray.nc
HRRR_tropo_20210723T015024_ray.nc
orbits\S1B_OPER_AUX_POEORB_OPOD_20210812T111941_V20210722T225942_20210724T005942.EOF
test\gunw_azimuth_test_data\weather_files\HRRR_2021_07_11T01_50_24_timeInterp_33N_36N_120W_115W.nc
test\gunw_azimuth_test_data\weather_files\HRRR_2021_07_11T01_50_24_timeInterpAziGrid_33N_36N_120W_115W.nc
test\gunw_azimuth_test_data\weather_files\HRRR_2021_07_23T01_50_24_timeInterp_33N_36N_120W_115W.nc
test\gunw_azimuth_test_data\weather_files\HRRR_2021_07_23T01_50_24_timeInterpAziGrid_33N_36N_120W_115W.nc

I am on dev branch commit 077674f.


opt(torii): remove unused receipt from processor & reduce one rpc call per transaction

Summary by CodeRabbit

New Features

Added a new dependency (hashlink) to enhance project capabilities.
Introduced a public queue field in the QueryQueue struct, allowing external access and manipulation.
Enhanced event processing with new methods for better handling of transactions and events.

Bug Fixes

Corrected the LOG_TARGET constant for clarity.

Refactor

Simplified various method signatures by removing unnecessary parameters related to transaction receipts.
Improved observability with additional logging in the execute method of the Sql implementation.

Hmm what is the point of the process_txn_with_events, if we still end up fetching the txn receipt for the sync range

It would be also nice if we could include in this PR an optimization regarding the sync_pending. Basically, the pending_tx_cursor only is for txns that have a world event, so when we go through the sync_pending again, if txns are not world events, we always refetch them


🚀 Personal Profile New Initial Setup

Adding the personal profile app to the Job Seeker project.
Including the following changes:

Initiated the personal profile app
Added a personal profile HTML file
Set the profile page to the right path in the project
Added the base template for the personal profile HTML file.

Depends on #34
Close #25

Please note that I opened this PR instead of the old #24 PR (because it was very confusing), so #24  can be closed.

Please note that I opened this PR instead of the old #24 PR (because it was very confusing), so #24 can be closed.

Done.

This PR is too big. I would recommend concentrating only in the model

Including the following changes:

Initiated the personal profile app
Added a personal profile HTML file
Set the profile page to the right path in the project
Added the base template for the personal profile HTML file.

Please make only one of the above

Hi @Yarboa, the "feature"-app in this PR was just initialized, and a basic HTML was added just to check that it works fine.
This PR is very minimal. Can you take a second look please?


Add RecordsPackage

A package icon for records shall be added. This package shall have the typical record appearance withing a package icon.

Done


[webview_flutter] add support for desktop version

@alihassan143
There's already open issues to add support for Linux, macOS and Windows desktop. See below filter and follow-up in them for further updates.
https://github.com/flutter/flutter/issues?q=is%3Aopen+label%3A"p%3A+webview"+label%3A"a%3A+desktop"
Closing as duplicate.


Variable in Tile's Title Field

Hi Guys,
As the title suggest - I want to ideally run a function, in the title field so I can 'dynamically' change/set the title of the tile, based on another sensor value in HA (Much like how the value: function() {} works...
Does anyone have any suggestions?
So far I've tried setting a global variable, and then variable when the value is set - however this doesn't seem to work...

Cheers,

Both variable and anonymous function work just fine for title and state.

Looks like I was just being a noob - HA returns the integer value as a string - not actually an integer...
Thanks for clarifying though!
Cheers,


Add "default_route_table_id" to outputs

v1.7.0 is released and it contains this PR. Thanks for the contribution!


new change.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#475  👈
#474
#458
#457
#454
#453
dev

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alonh5 and the rest of your teammates on  Graphite


[BEAM-14357] Fix BigqueryFullResultStreamingMatcher unit test

patch bigquery.Client in test class

Please add a meaningful description for your change here
The original patch for '_query_with_retry' actually did not work. BigqueryMatcher._query_with_retry still get called. The test passed because timeout checking passed before the first call of this method. In local machine that runs fast enough, it may still make actual bigquery request and fail.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

R: @pabloem

A github action fails due to BEAM-14367 not relevant to this change.

LGTM!


Gentle request for a 1.20.2 version - no pressure!

 No stress if it's not.

Hey, right now my main focus is on other mods, afaik the available 1.20.1 version should also just work on 1.20.2, which is why i haven't bothered pushing out an update yet, should probably get to that at some point tho
If you have any issues using the latest version on 1.20.2 however, please don't hesitate to let me know!

The 1.20.1 version is indeed working fine on 1.20.2 from what I've experienced so far - thanks for letting me know about that! Only caveat is the game does freeze for a second or two each time you click "save and quit to title" (which I don't recall happening in the 1.19.4 version I was using prior) but after that it catches up and works like a charm - still light-years faster than vanilla 😆

Ignore that caveat I mentioned, I've realized just now that brief pause is the work of Seamless Loading Screen doing its thing (taking a screenshot) and has nothing to do with FastQuit whatsoever. Apologies, and thanks again!

if 1.20.1 version can be using in 1.20.2, can you add 1.20.2 version in your modrinth mod version?

1.20.4 is broken tho


Can't specify max tokens in createChatCompletion

Describe the bug
Title pretty much says it all. The api docs specify a max_tokens value:
https://platform.openai.com/docs/api-reference/chat/create
However, when I use the api to create a request:
const completion = await openai.createChatCompletion({
	model: "gpt-4",
	messages: [
		{role: 'system', content: prompt},
		...msg
	],
	max_tokens: 300
	top_p: 1,
	frequency_penalty: 1,
	presence_penalty: 0.6,
	temperature: 0.5,
})

max_tokens doesn't seem to be specified in the input type for the function.
To Reproduce

Get the latest openai-node package (3.2.0)
Write out a createChatCompletion request
Try to use the max_tokens param in the request

Code snippets
No response
OS
Ventura 13.2
Node version
Node v18.12.0
Library version
openai 3.2.0

Same issue here, createCompletion has max_tokens option, but createChatCompletion doesn't

The problem seems to be from openai directly not the library. When I try this (max_tokens: 5):
curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "hi"}], "temperature": 0.7, "max_tokens": 12}'
i get this response (total_tokens:18):
{"id":"chatcmpl-7A0rtilh4PmLILOdiMBMNIHdkGFjZ","object":"chat.completion","created":1682620973,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":9,"completion_tokens":9,"total_tokens":18},"choices":[{"message":{"role":"assistant","content":"Hello! How can I assist you today?"},"finish_reason":"stop","index":0}]}

It has the max_tokens property, it wasn't typed properly in 3.2.0, update to 3.2.1 and you should have it


Cannot install the .apk file (Parse Error)

Hey, I just found out about this app, and I really wanna use it, but every time I try to install it, it gives me the error message:
Parse error
There was a problem parsing
the package
OK
Any idea why? I'm completely out of my element here
For reference, I was able to install the standard Tachiyomi and TachiyomiJ2K without issue

What version for Android are using?  Neko is Android 7+

Aww man, I think Samsung Galaxy S5 only goes up to Android 6, maybe it's about time I actually update to a new phone


Explain Execution Plan

Hi DBeaver developers,
the explain of execution plan is fundamental for optimization of statements.
It should be supported for all DBMSs.
We mainly use: MS SQL, IBM DB/2, Oracle SQL and MySQL
Tanks,
Chris

Explain of execution plan is supported for DB2, Oracle, MySQL/MariaDB and PostgreSQL.
MS SQL support will be added along with other MS SQL features in new extension (#810).


Fix broken API fetch

Seems like the bored API is down. Fix the broken connection or change API

Can you suggest any other API to consider with the application in this case?
Like a random jokes API or random advice API (Advice Slip API)

I dont know any at the moment but feel free to choose something suitable!


Roles improvements

Added two permissions on initial SQL run:

'override-ads'
'hide-leaderboard'

[FIX] Added 'order_id' on table ares_roles_hierarchy on initial SQL run.

[FIX] Changed value in ares_settings on 'register_enabled' from true to 1.

Added two fetch on role-tree (staff page & control panel):
Staff Page Fetch doesn't contain hidden roles.
Control Panel Fetch contains hidden roles.

Added Fetch function Role Permissions by Name

Added Fetch function get Roles that have certain Permission Id

Refactored RoleRank functions

[FIX] 'Change Rank' always returned true.

Refactored Top Leaderboards Hall of Fame


Datepicker binding

I'm trying to bind a value to the datepicker and not getting the date to appear:  My datepicker looks like this:

It works when I pick a date from the datepicker but if I set the date in code, it doesn't.
I've tried formatting the date in a variety of ways with no luck.  I'm wondering if I have a problem with the datepicker itself.
Thanks,
Ross

Is it similar to issue #148?
If yes: strange, I have a button which does exactly that in my demo version (not uploaded yet).
If not, how do you set the date in code? By using the bound view model variable?
What do you set it to? A Date instance or a string (I suppose it's a string because you mention formatting).

I tried the workaround but I get the current date showing rather than the bound date.  However, the value I was trying to bind was a string so it wasn't working.  Your post gave me the hint.
Thanks

I think date instances are the better (safer) option in any case where data-binding is involved. Let materialize handle the output. :smile:
I thought about implementing a simple new Date(stringValue) in that case which throws a meaningful exception if that string cannot be parsed. But then data-binding to a date is essentially lost. The picker value is a date.

The problem was I'm getting data from a MongoDB.  The fields are date types in the database but the service is returning a string.  Makes since but it hadn't occurred to me.  Thanks again.


Add: Load API Definition from the configmap

Purpose
Load API Definition to the enforcer
Approach

Read the definition from the corresponding configmap
Load the definition to the enforcer

Codecov Report
Patch coverage has no change and project coverage change: +47.42 :tada:

Comparison is base (26f0621) 32.68% compared to head (412cb0d) 80.10%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1188       +/-   ##
===========================================
+ Coverage   32.68%   80.10%   +47.42%
===========================================
  Files         183        9      -174
  Lines       20827      548    -20279
  Branches     6746      246     -6500
===========================================
- Hits         6807      439     -6368
+ Misses      13895      109    -13786
+ Partials      125        0      -125

Flag
Coverage Δ

adapter
?

admin-domain-service
?

backoffice-domain-service
?

devportal-domain-service
?

idp-domain-service
80.10% <ø> (ø)

runtime-domain-service
?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 174 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Changes in Agent.Worker to send Job OutputVariables as part of JobCompletedEvent

Raise JobCompletedEvent from Agent.Worker
Send Job OutputVariables in JobCompletedEvent, which can be used as input to subsequent Jobs

@GitHubSriramB request you to review and let me know your comments.

@sureshtadisetty @GitHubSriramB Can you guys share a design doc with me and Bryan?

Will this agent works against TFS 2015 RTM->QUs?

delete CompleteJobRequestAsync in JobDispatcher.cs

fix the worker exit code. worker no longer need to send taskresult back to agent if you don't version the api  as Patrick suggested.

will this change affect MMS?

Looks good, i left few comments, consider them.


Implement Middleware for Handlers

This PR implements a middleware layer around handlers. Middlewares have a number of advantages over existing solutions:

User provided middlewares can be provided via extension methods packages in nuget packages
They are composable with other middlewares
They don't require any custom code in or around IHandlerAsync<T>
They are cancellable with CancellationToken, whereas IHandlerAsync<T> cannot change to add one (or at least we haven't decided to do that)
They create a nice place for users to add in cross cutting code, like custom stats, retry strategies, locking, etc etc without needing to change JustSaying.

This work is largely based on the existing middleware code added by @maisiesadler that is used in the MessageReceiveBuffer's receive pipeline.
This work is still a draft - there's no xml docs and probably some rough edges.
Some example code
Middlewares can be pulled from DI, or passed in explicitly:
var callRecord = new List<string>();

void Before(string id) => callRecord.Add($"Before_{id}");
void After(string id) => callRecord.Add($"After_{id}");

var outerMiddleware = new TrackingMiddleware("outer", Before, After);
var middleMiddleware = new TrackingMiddleware("middle", Before, After);
var innerMiddleware = new TrackingMiddleware("inner", Before, After);

var services = GivenJustSaying()
    .AddSingleton(outerMiddleware)
    .AddSingleton<IHandlerAsync<SimpleMessage>>(handler)
    .ConfigureJustSaying(builder => builder.WithLoopbackTopic<SimpleMessage>(UniqueName,
        topic => topic.WithMiddlewareConfiguration(app =>
        {
            app.Use<TrackingMiddleware>(); // from DI
            app.Use(() => middleMiddleware); // provide a Func<MiddlewareBase<HandleMessageContext, bool>
            app.Use(innerMiddleware); // Existing instance
        })));

Produces:
Before_outer
Before_middle
Before_inner
After_inner
After_middle
After_outer

Implementation of an extension method that makes a UseExactlyOnce method available to the pipeline, and resolves some services from DI
public static HandlerMiddlewareBuilder UseExactlyOnce<TMessage>(
    this HandlerMiddlewareBuilder builder,
    string lockKey,
    TimeSpan? lockDuration = null)
{
    HandleMessageMiddleware CreateMiddleware()
    {
        var messageLock = builder.ServicesBuilder?.MessageLock?.Invoke() ?? builder.ServiceResolver.ResolveService<IMessageLockAsync>();
        var logger = builder.ServiceResolver.ResolveService<ILogger<ExactlyOnceMiddleware<TMessage>>>();

        return new ExactlyOnceMiddleware<TMessage>(messageLock,
            lockDuration ?? TimeSpan.MaxValue,
            lockKey,
            logger);
    }

    builder.Use(CreateMiddleware);

    return builder;
}

Usage of UseExactlyOnce
.ConfigureJustSaying((builder) =>
    builder.WithLoopbackTopic<SimpleMessage>(UniqueName,
        c =>
            c.WithMiddlewareConfiguration(m =>
                m.UseExactlyOnce<SimpleMessage>("simple-message-lock"))))

They can be chained:
.Configure(pipe =>
                {
                    pipe.Use(m1);
                    pipe.Use(m2);
                    pipe.Use(m3);
                })

This work is still a draft - there's no xml docs and probably some rough edges.

@martincostello can we target this for post-beta? I'm really keen to get the beta process rolling so we can get some features using the new backend.

@martincostello can we target this for post-beta? I'm really keen to get the beta process rolling so we can get some features using the new backend.

We can have as many alpha/beta/gamma/whatevers as we want before release internally, and we have the ProGet feed we can host packages in, so I don't think it really matters what label we give it or whatever the release cadence is (or the need to be super-strict on SemVer).
I'd only worry about these distinctions for putting something in NuGet.org, and I think we'd want to be fairly confidently "done" and happy it's working before publishing a beta there.

@martincostello can we target this for post-beta? I'm really keen to get the beta process rolling so we can get some features using the new backend.

We can have as many alpha/beta/gamma/whatevers as we want before release internally, and we have the ProGet feed we can host packages in, so I don't think it really matters what label we give it or whatever the release cadence is (or the need to be super-strict on SemVer).
I'd only worry about these distinctions for putting something in NuGet.org, and I think we'd want to be fairly confidently "done" and happy it's working before publishing a beta there.

That makes perfect sense, thanks 👍. The main reason for a beta was so that we can switch to a package feed instead of local packages, so as you say we can just use proget 🙂.

This is now ready for review! I've documented the public interfaces, added tests, and removed the old exactly-once and stopwatch handlers and reimplemented as middlewares.


SQL Migration 00.19.00_02_null_locks_excluded.sql missing in 0.20.0 and 0.21.0

In the tags 0.20.0 and 0.21.0 the file 00.19.00_02_null_locks_excluded.sql is missing.
As per my understanding, the migrations with pattern 00.19.* should be incremental upgrades to migrate from Procrastinate 0.19.x to a newer version.

You are right. The problem is that the file is named incorrectly :( When I merged the PR several months after writing it, I failed to check the name of the PR. It should have been a 0.22 as it was added to 0.23.
We really should tackle https://github.com/procrastinate-org/procrastinate/issues/251 :(
If we reintroduce the migration in a new version with a proper name, would it fix your case ?

Yes, that would be great!

https://pypi.org/project/procrastinate/0.24.1/


chore: reexport revm create address

this reverts parts of https://github.com/paradigmxyz/reth/pull/1620
and instead reexports from revm

Codecov Report

Merging #1624 (ed6394e) into main (789ae51) will decrease coverage by 29.81%.
The diff coverage is 0.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@             Coverage Diff             @@
##             main    #1624       +/-   ##
===========================================
- Coverage   74.42%   44.61%   -29.81%
===========================================
  Files         376      376
  Lines       44928    44895       -33
===========================================
- Hits        33438    20031    -13407
- Misses      11490    24864    +13374

Flag
Coverage Δ

integration-tests
18.68% <0.00%> (-2.38%)
:arrow_down:

unit-tests
36.70% <0.00%> (-32.31%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

 Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


make new branch adapting model 0.5.x ( 1 pt )

created new branch
testing showed some changes in userwidgets/api was required
changes was made in userwidgets/api
no changes was necessary in userwidgets/ui to adapt to model 0.5.x

nothing breaks when updating the model to 0.5.x in local but still need to be updated to use live model


"drivers/unix/net_socket_posix.cpp:190 - Socket Error: 10054" while loading a scene that uses NativeScript

Godot version: v3.1.2.stable.official
OS/device including version: Windows 10
Issue description: While (I suppose) my game is loading NativeScript, it immediately crashes and prints " drivers/unix/net_socket_posix.cpp:190 - Socket error: 10054". It isn't the first time that I use GdNative, in another project GdNative works perfectly.
Steps to reproduce:

Compile the code on the minimal reproduction project (I am using visual studio 2019, but it worked before)
Make a .gdnlib and .gdns file, assign the latter an Area2D

Minimal reproduction project:
(I couldn't upload the godot_headers and include folders)
https://github.com/GbaCretin/eve_eternal_rain_bullet/

Does anything show in the console? (the external one, not in Godot)
This looks like the common error when a resource is missing.

I had this exact same error before but then I realised I accidentally removed my gdnlib file in my gdnative directory. The error is a bit confusing though.

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?


cure poison

cure always cure not check any.

I don't understand what you mean, but if you mean double clicking on cure potion always consume it without checking you have poison or not, it's always like this (if I remember correct) but if you don't want to consume it if he is not poisoned, just add On=@Dclick trigger and check statf_poisoned flag under trigger.

Mate, maybe you forgot the issue you open, could you check this issue? We need more information about that.

he says the poison level is not checked by spell/potion, so with lesser cure, you can cure deadly poison

Oh, got it now, but I guess it's all about cure spell. I can check cure spell for poison levels.

How does it work on OSI?

fix sent

I close


File "run.py", line 61, in main     l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init) AttributeError: 'Market1501' object has no attribute 'name'

Please check the content in ``examples''.

File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'

@ly-jy
Please use original code.
There is attribute 'name' for this object.
https://github.com/Yu-Wu/One-Example-Person-ReID/blob/829fb585a10cb4948a70ee53aeca348b8ed4aa8c/reid/datasets/market1501.py#L12

When I run "sh run.sh" in the terminal,：
Files already downloaded and verified
Market1501 dataset loaded
subset   | # ids | # images
train    |   651 |    11329
val      |   100 |     1607
trainval |   751 |    12936
query    |   750 |    16483
gallery  |   751 |    19281
Traceback (most recent call last):
File "run.py", line 125, in
main(parser.parse_args())
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'
How can I use the original code you said?

Excuse me, are you sure the code can run?
Can you run to make sure it can run?

@ly-jy
Please run this code under a clean python environment.
It seems you might have installed'' the reid module of other codes before. Therefore, the module Market1501'' might be referred to a previous installed path.

Thank you for your patience and answer. I hope you can help me. My problems are as follows:
I downloaded the code to the 'home' and upzip it. Put in the data set and run "sh run.sh" in the terminal. Report the error:
Traceback (most recent call last):
File "run.py", line 2, in
from reid.eug import *
ModuleNotFoundError: No module named 'reid.eug'
I cut out the 'eug.py' and modify ‘ from reid.eug import * ’ to ' ‘from eug import * ', And run 'sh run.sh'.Report the error:
Traceback (most recent call last):
File "run.py", line 2, in
from eug import *
File "/home/ly/liyang/One-Example-Person-ReID-master/eug.py", line 17, in
from reid.exclusive_loss import ExLoss
ModuleNotFoundError: No module named 'reid.exclusive_loss'
I cut out the 'exclusive_loss.py' and modify ‘ from reid.exclusive_loss import ExLoss * ’ to ' from exclusive_loss import ExLoss * ', And run 'sh run.sh'.Report the error:
Files already downloaded and verified
Market1501 dataset loaded
subset   | # ids | # images
train    |   651 |    11228
val      |   100 |     1708
trainval |   751 |    12936
query    |   750 |    16483
gallery  |   751 |    19281
Traceback (most recent call last):
File "run.py", line 125, in
main(parser.parse_args())
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'
I change ' l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init) ' to ' l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init) '. But still an error：
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'
How can I do?

@ly-jy
You should not fix the issue in this way......
I have updated my code just now. You can try the new code.
Please make sure you are using python3.

Thank you very much for your answer. I have used python3, but I have encountered the following problem:
I downloaded the code to the 'home' and upzip it. I run "sh run.sh" in the terminal. Report the error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train
I changed the ‘bounding_box_train’ file in the market to ‘train’, 'bounding_box_test' to 'gallery'.Then I put ‘train’, 'gallery', 'query' into the '/home/ly/One-Example-Person-ReID-master/data/market1501' file. And run 'sh run.sh'. Report the error:
NotADirectoryError: [Errno 20] Not a directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train/0002_c1s1_000451_03.jpg'
File '0002_c1s1_000451_03.jpg' already exists in file 'train', why is it still reported error?

Thank you very much for your answer. I have used python3, but I have encountered the following problem:
I downloaded the code to the 'home' and upzip it. I run "sh run.sh" in the terminal. Report the error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train
I changed the ‘bounding_box_train’ file in the market to ‘train’, 'bounding_box_test' to 'gallery'.Then I put ‘train’, 'gallery', 'query' into the '/home/ly/One-Example-Person-ReID-master/data/market1501' file. And run 'sh run.sh'. Report the error:
NotADirectoryError: [Errno 20] Not a directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train/0002_c1s1_000451_03.jpg'
File '0002_c1s1_000451_03.jpg' already exists in file 'train'.How can I do?

@ly-jy
You should use my changed dataset since I changed file names to make sure Image dataset work the same as the video dataset.
Please download them using the provided dataset link in readme.

Hello author, I have some thoughts after reading your article. I want to know how the datasets you provide are processed. Can you share your code that processes the dataset? I am very grateful! Plase help me! Thank you very much!

Hello author, I have some thoughts after reading your article. I want to know how the datasets you provide are processed. Can you share your code that processes the dataset? I am very grateful! Plase help me! Thank you very much!

@ly-jy
You should use my changed dataset since I changed file names to make sure Image dataset work the same as the video dataset.
Please download them using the provided dataset link in readme.

I want to know how the datasets you provide are changed. Can you share your code that change the dataset? I am very grateful! Plase help me! Thank you very much!

Sorry that the processing code is lost.
For your own dataset, you can use a very simple python scripts to generate the same format as ours. To do this, you only need some basic file operations.

You can see the difference between the original Market dataset and my provided one. It's very simple to generate our format.
You can also see https://github.com/Yu-Wu/DukeMTMC-VideoReID/blob/master/README.md to better understand my "Directory Structure"

Thank you very much for your answer. If you are convenient, I hope you can provide the code. Thank you so much！Plase help me! Thank you very much!

Sorry that the code is lost.
I cannot find it.


How to use b2c.view_labels() for cell-type or specific gene visualization?

Thank you very much for bin2cell.
@ktpolanski is b2c.view_labels() in 0.3.2 the unformalized custom function @nadavyayon referred to and was using at 18 minutes and 35 seconds (18:35) in the September 2024 - 10X Webinar here: https://pages.10xgenomics.com/WBR-2024-09-EVENT-VIS-VISIUM-HD-ANALYSIS-PARENT_LP.html?

I want to do exactly this type of visualization with this confidence score in viridis for cell-types the way that was done (high-resolution and fast/light-weight viewing of different parts of the hi-res image) in the 10X webinar.
I also want to do another separate visualization "style" with a canonical gene marker expression (instead of cell-type confidence score) also in viridis with and also with cell-type segment boundaries colored with border_color.

It looks like this can be easily done after I read through: https://github.com/Teichlab/bin2cell/issues/21#issuecomment-2450089072, https://github.com/Teichlab/bin2cell/issues/21#issuecomment-2473651041 (b2c.view_labels()), and https://bin2cell.readthedocs.io/en/latest/bin2cell.view_labels.html#bin2cell.view_labels.
Also how and where could this full scale image be visualized the way in the 10X webinar? I am guessing napari can do this. Would there be a way to save the full scale image output to disk for visualization?
If you still have some example code, could you share this, please?
It would help me do (1), and I could figure out how to do (2) from (1). I am more familiar with R and Seurat, than python. I apologize if I am asking for a spoon-feeding. 😔

The function in 0.3.2 inspired Nadav to write whatever he used to make the visualisation for the seminar, which I recently rewrote to run quickly. This has not been distributed anywhere at this time, I shared a beta version with Nadav for him to play around with. Once there's a reasonable form to share, I'll get back to you with it.

Alright, I think I have something shareable. Stick this into a Jupyter notebook cell, or just execute wherever it is you execute code:
#new deps to add!
import skimage.segmentation
import seaborn as sns
import matplotlib

import matplotlib.pyplot as plt
import scipy.sparse
import scipy.stats
import bin2cell as b2c
import numpy as np

from PIL import Image
#setting needed so PIL can load the large TIFFs
Image.MAX_IMAGE_PIXELS = None

def overlay_onto_img(img, labels_sparse, cdata, key, common_objects,
                      fill_label_weight=1,
                      make_legends=True
                     ):
    #are we in obs or in var?
    if key in cdata.obs.columns:
        #continuous or categorical?
        if ("float" in cdata.obs[key].dtype.name) or ("int" in cdata.obs[key].dtype.name):
            #we've got a continous
            #subset on common_objects, so the order matches them
            #also need to turn to string to match cdata.obs_names
            vals = cdata.obs.loc[[str(i) for i in common_objects], key].values
            #we'll continue processing shortly outside the ifs
        elif "category" in cdata.obs[key].dtype.name:
            #we've got a categorical
            #use tab20 to try to get some different ones
            #convert to uint8 for internal consistency
            fill_palette = (np.array(sns.color_palette("tab20"))*255).astype(np.uint8)
            #pull out the category indices for each of the common objects
            #and store them in a numpy array that can be indexed on the object in int form
            cats = np.zeros(np.max(common_objects)+1, dtype=np.int32)
            #need to turn common_objects back to string so cdata can be subset on them
            cats[common_objects] = cdata.obs.loc[[str(i) for i in common_objects], key].cat.codes
            #store the original present category codes for legend purposes
            cats_unique_original = np.unique(cats[common_objects])
            #reset the cats[common_objects] to start from 0 and go up by 1
            #which may avoid some palette overlaps in some corner case scenarios
            #calling this on [5,7,7,9] yields [1,2,2,3] which is what we want
            #except then shift it back by offset so it starts from 0
            cats[common_objects] = scipy.stats.rankdata(cats[common_objects], method="dense") - 1
            #now we have a master list of pixels with objects to show
            #.row is [:,0], .col is [:,1]
            #extract the existing values from the image
            #and simultaneously get a fill colour by doing % on number of fill colours
            #pull out the category index by subsetting on the actual object ID
            #weight the two together to get the new pixel value
            img[labels_sparse.row, labels_sparse.col, :] = \
                (1-fill_label_weight) * img[labels_sparse.row, labels_sparse.col, :] + \
                fill_label_weight * fill_palette[cats[labels_sparse.data] % fill_palette.shape[0], :]
            #set up legend
            #figsze is largely irrelevant because of bbox_inches='tight' when saving
            fig, ax = plt.subplots(figsize=(5, 2))
            ax.axis("off")
            #alright, there's some stuff going on here. let's explain
            #the categories don't actually get subset when you pull out a chunk of the vector
            #which kinda makes sense but is annoying
            #meanwhile we want to minimise our ID footprint to try to use the colour map nicely
            #as such, earlier we made cats_unique_original, having all the codes from the objects
            #and then we reset the cats to start at 0 and go up by 1
            #now we can get a correspondence of those to cats_unique_original
            #by doing a subset and np.unique(), as this is monotonically preserved
            #still need to % the category code like before
            legend_patches = [
                matplotlib.patches.Patch(color=fill_palette[i % fill_palette.shape[0],:]/255.0,
                                         label=cdata.obs[key].cat.categories[j]
                                        )
                for i, j in zip(np.unique(cats[common_objects]), cats_unique_original)
            ]
            ax.legend(handles=legend_patches, loc="center", title=key, frameon=False)
            #close the thing so it doesn't randomly show. still there though
            plt.close(fig)
            #okay we're happy. return to recycle continuous processing code
            return img, fig
        else:
            #we've got to raise an error
            raise ValueError("``cdata.obs['"+key+"']`` must be a float, int, or categorical")
    elif key in cdata.var_names:
        #gene, continuous
        #fast enough to just subset the cdata, as always turn to string
        #then regardless if it's sparse or dense data need to .toarray().flatten()
        #if it's sparse then this turns it dense
        #if it's dense then it gets out of ArrayView back into a normal array
        #and then flattened regardless
        vals = cdata[[str(i) for i in common_objects]][:,key].X.toarray().flatten()
    else:
        #we've got a whiff
        raise ValueError("'"+key+"' not found in ``cdata.obs`` or ``cdata.var``")
    #we're out here. so we're processing a continuous, be it obs or var
    #set up legend while vals are on their actual scale
    #figsze is largely irrelevant because of bbox_inches='tight' when saving
    fig, ax = plt.subplots(figsize=(5, 2))
    ax.axis("off")
    colormap = matplotlib.colormaps.get_cmap("viridis")
    norm = matplotlib.colors.Normalize(vmin=np.min(vals), vmax=np.max(vals))
    sm = matplotlib.cm.ScalarMappable(cmap=colormap, norm=norm)
    fig.colorbar(sm, ax=ax, orientation="horizontal", label=key)
    #close the thing so it doesn't randomly show. still there though
    plt.close(fig)
    #for continuous operations, we need a 0-1 scaled vector of values
    vals = (vals-np.min(vals))/(np.max(vals)-np.min(vals))
    #construct a fill palette by busting out a colormap
    #and then getting its values at vals, and sending them to a prepared numpy array
    #that can then be subset on the object ID to get its matching RGB of the continuous value
    fill_palette = np.zeros((np.max(common_objects)+1, 3))
    #send to common_objects, matching vals order. also convert to uint8 for consistency
    fill_palette[common_objects, :] = (matplotlib.colormaps.get_cmap('viridis')(vals)[:,:3]*255).astype(np.uint8)
    #now we have a master list of pixels with objects to show
    #.row is [:,0], .col is [:,1]
    #extract the existing values from the image
    #and simultaneously get a fill colour by subsetting the palette on the label ID
    #no fancy % needed here as each object has its own fill value prepared
    #weight the two together to get the new pixel value
    img[labels_sparse.row, labels_sparse.col, :] = \
        (1-fill_label_weight) * img[labels_sparse.row, labels_sparse.col, :] + \
        fill_label_weight * fill_palette[labels_sparse.data, :]
    return img, fig

def cell_label_render(image_path, labels_npz_path, cdata,
                      fill_key=None,
                      border_key=None,
                      crop=None,
                      stardist_normalize=False,
                      fill_label_weight=1,
                      thicken_border=True
                     ):
    #load the sparse labels
    labels_sparse = scipy.sparse.load_npz(labels_npz_path)
    #determine memory efficient dtype to load the image as
    #if we'll be normalising, we want np.float16 for optimal RAM footprint
    #otherwise use np.uint8
    if stardist_normalize:
        dtype = np.float16
    else:
        dtype = np.uint8
    if crop is None:
        #this will load greyscale as 3 channel, which is what we want here
        img = b2c.load_image(image_path, dtype=dtype)
    else:
        #PIL is better at handling crops memory efficiently than cv2
        img = Image.open(image_path)
        #ensure that it's in RGB (otherwise there's a single channel for greyscale)
        img = np.array(img.crop(crop).convert('RGB'), dtype=dtype)
        #subset labels to area of interest
        #crop is (left, upper, right, lower)
        #https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.crop
        #upper:lower, left:right
        labels_sparse = labels_sparse[crop[1]:crop[3], crop[0]:crop[2]]
    #optionally normalise image
    if stardist_normalize:
        img = b2c.normalize(img)
        #actually cap the values - currently there are sub 0 and above 1 entries
        img[img<0] = 0
        img[img>1] = 1
        #turn back to uint8 for internal consistency
        img = (255*img).astype(np.uint8)
    #turn labels to COO for ease of position retrieval
    labels_sparse = labels_sparse.tocoo()
    #identify overlap between label objects and cdata observations
    #which should be the same nomenclature for the morphology segmentation
    #just as strings, while the labels are ints
    common_objects = np.sort(list(set(np.unique(labels_sparse.data)).intersection(set([int(i) for i in cdata.obs_names]))))
    #kick out filtered out objects from segmentation results
    labels_sparse.data[~np.isin(labels_sparse.data, common_objects)] = 0
    labels_sparse.eliminate_zeros()
    #catch legends to dictionary for returning later
    legends = {}
    #do a fill if requested
    if fill_key is not None:
        #legend comes in the form of a figure
        img, fig = overlay_onto_img(img=img,
                                    labels_sparse=labels_sparse,
                                    cdata=cdata,
                                    key=fill_key,
                                    common_objects=common_objects,
                                    fill_label_weight=fill_label_weight
                                   )
        legends[fill_key] = fig
    #do a border if requested
    if border_key is not None:
        #actually get the border
        #unfortunately the boundary finder wants a dense matrix, so turn our labels to it for a sec
        #go for inner borders as that's all we care about, and that's less pixels to worry about
        #keep the border dense because of implementation reasons. it spikes RAM anyway when it's made
        border = skimage.segmentation.find_boundaries(np.array(labels_sparse.todense()), mode="inner")
        #whether we thicken or not, we need nonzero coordinates
        coords = np.nonzero(border)
        if thicken_border:
            #we're thickening. skimage.segmentation.expand_labels() explodes when asked to do this
            #the following gets the job done quicker and with lower RAM footprint
            #take existing nonzero coordinates and move them to the left, right, up and down by 1
            border_rows = np.hstack([
                np.clip(coords[0]-1, a_min=0, a_max=None),
                np.clip(coords[0]+1, a_min=None, a_max=border.shape[0]-1),
                coords[0],
                coords[0]
            ])
            border_cols = np.hstack([
                coords[1],
                coords[1],
                np.clip(coords[1]-1, a_min=0, a_max=None),
                np.clip(coords[1]+1, a_min=None, a_max=border.shape[1]-1)
            ])
            #set the positions to True. this is BLAZING FAST compared to sparse attempts
            #or, surprisingly, trying to np.unique() to get non-duplicate coordinates
            #and the entire reason we kept the borders dense for this process
            border[border_rows, border_cols] = True
            #update our nonzero coordinates
            coords = np.nonzero(border)
        #to assign borders back to objects, subset the object labels to just the border pixels
        #technically need to construct a new COO matrix for it, pulling out values at the border coordinates
        #use (data, (row, col)) constructor
        #also need to turn labels to CSR to be able to pull out their values
        #which results in a 2d numpy matrix, so turn to 1D array or constructor errors
        labels_sparse = scipy.sparse.coo_matrix((np.array(labels_sparse.tocsr()[coords[0], coords[1]]).flatten(), coords), shape=labels_sparse.shape)
        #there will be zeroes from the thickener, border mode="inner" means no thickener no zeros
        labels_sparse.eliminate_zeros()
        #can now run the overlayer, set weights to 1 to have fully opaque borders
        #legend comes in the form of a figure
        img, fig = overlay_onto_img(img=img,
                                    labels_sparse=labels_sparse,
                                    cdata=cdata,
                                    key=border_key,
                                    common_objects=common_objects,
                                    fill_label_weight=1
                                   )
        legends[border_key] = fig
    return img, legends

The function of relevance to you is cell_label_render(). You need to feed it the image_path and labels_npz_path from your morphology segmentation, and the cell-level cdata that you make at the end of the basic bin2cell notebook. You can then specify fill_key and/or border_key to be any float/int/categorical in .obs, or a gene name present in .var_names. The output is the resulting image, and a legends dictionary which has matplotlib figures for the legends of the various keys you passed (with the key value being how you pull it out of the dictionary).
A usage example on the cell object made in the mouse brain tutorial, ran after the end of the notebook. The crop is not necessary in normal full scale image use, but is specified in this illustrative example to get colours to line up with what's already familiar:
crop = b2c.get_crop(ddata, basis="spatial", spatial_key="spatial_cropped_150_buffer", mpp=mpp)
#this is a string at this time
cdata.obs["labels_joint_source"] = cdata.obs["labels_joint_source"].astype("category")

img, legends = cell_label_render(image_path="stardist/he.tiff",
                                 labels_npz_path="stardist/he.npz",
                                 cdata=cdata,
                                 crop=crop,
                                 fill_key="bin_count",
                                 border_key="labels_joint_source"
                                )

#looking at output, the legends just need to be pulled out from the dictionary and they display
plt.imshow(img)
legends["bin_count"]
legends["labels_joint_source"]

#saving output; for the image, you can do whatever really - it's a numpy array representation
plt.imsave("img.png", img)
legends["bin_count"].savefig("bin_count.png", bbox_inches="tight")
legends["labels_joint_source"].savefig("labels_joint_source.png", bbox_inches="tight")


[20.09] salt: 3001.6 -> 3001.7

Motivation for this change
3001.7 was released: https://docs.saltproject.io/en/latest/topics/releases/3001.7.html
No new CVE this time, but “hardens the fix for CVE-2020-28243”.
Backport of #117392.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 117393 at 79d0fa49 run on x86_64-linux 1

1 package marked as broken and skipped:

pepper

1 package built successfully:

salt

1 suggestion:

warning: missing-patch-comment
Please add a comment on the line above, explaining the purpose of this patch.
Near pkgs/tools/admin/salt/default.nix:29:15:
   |
29 |   patches = [ ./fix-libcrypto-loading.patch ];
   |               ^


teleop_ps3 error

Hi, i launched teleop_ps3.launch in the demo package, when i press take off button, i get the error message as follows:
[ERROR] [1529159006.799795762]: client wants service /crazyflie/takeoff to have md5sum d41d8cd98f00b204e9800998ecf8427e, but it has b665b6c83a196e4774268cc26329b159. Dropping connection.
[ERROR] [1529159006.800922]: bad callback: <bound method Controller._joyChanged of <main.Controller instance at 0x7f0f6de52a28>>
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/home/jingwen/crazyswarm/ros_ws/src/crazyflie_ros/crazyflie_demo/scripts/controller.py", line 46, in _joyChanged
self._takeoff()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in call
return self.call(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 505, in call
raise ServiceException("unable to connect to service: %s"%e)
ServiceException: unable to connect to service: remote error reported: client wants service /crazyflie/takeoff to have md5sum d41d8cd98f00b204e9800998ecf8427e, but it has b665b6c83a196e4774268cc26329b159. Dropping connection.
please help

How did you solve the issue?


Any plans for GET rpc with path-parameters?

PostgREST offers the stored-procedure call by POST /rpc/function_name, but no option to use GET and/or the usual path-parameter... There are some plan for it?

We have been discussing it in #328. It's been a while since I've reviewed it. Check out the conversation and let me know what you think.

I was enthusiastic with PostgREST... On the flip-side, many people would say "don't count your chickens before they hatch", i.e. don't expect a lot from PostgREST while hasn't been released/delivered to solve real problems. So let's  see what I think, my dreams about real life use of PostgREST.

PostgREST is not REST without GET: see OpenApi specification, that use as reference a good and mature (2012) standard, RFC 6570 (URI templates). Today we can't work without it, it is impossible to deliver professional development without it.
Short-term solutions to GET-URI-templating endpoints
As in a good controller schema design, like in Spring-boot , Django, CakePHP, and other mature frameworks, we can centralize all endpoint definitions.  With PostREST-Nginx we can centralize in the /etc/nginx/sites-available/* scripts. So a simple and natural way to do it is parse simple directives into ugly-but-reliable Nginx scripts.
The solution that I scratched at issue #825 ("templating and translating endpoints to Nginx")  is valid for both, the today's incomplete PostgREST schema (incomplete support for stored procedures) and a future complete one.
Long-term motivations
Are there a pent-up demand for PostgreSQL experts, where we see PostgREST as a potential supplier? YES:

In Agile context, PostgreSQL experts lost market share to the competition with agile-frameworks (Spring-boot, Django, CakePHP, etc.) and NoSQL. Today the cost of  a system implemented in SQL-side by PostgreSQL expert team is 2 to 10 times more expensive than a agile-framework team. We lost the game: only few older and crazy companies use SQL experts in (agile) system development.  If a back-end system can be developed with PostgREST in 1/2 or 1/10 of the competitor's development-time, will be rationale to contract a PostgreSQL experts team.

in traditional development and maintenance of traditional systems, PostgREST also can be a good tool... for plug new web functionalities, and as developer checking-tool, or a tool for a testing team.

in mix one:  if PostgREST offers a complete infrastruture to use and expose XML, JSON and JSONb datatypes of PostgreSQL 9.6+ at enpoints, will be fine... Not need "url-query syntax" for JSON, but need to offer good endpoints, as eg. MongoDB endpoints.

Long-term solutions
PostgREST use Convention over configuration, and it is good... But need an "general switch" configuration to offer other options! A full-OpenAPI spec need template URI (pathParam) with POST... See #815.

Thanks for taking the time to explain your expectations for api server design and suggesting how postgrest could address them.
However I think postgrest might not be what you're looking for, and may not ever be. What makes me think that is when you say

Today the cost of a system implemented in SQL-side by PostgreSQL expert team is 2 to 10 times more expensive than a agile-framework team. We lost the game: only few older and crazy companies use SQL experts in (agile) system development.
Having SQL experts create an API is pretty much the main goal of postgrest. We are specifically not positioning ourselves as another Django or CakePHP. Many people are super productive using those technologies I'm sure, but it's just not my interest.

Happy to help you with specific questions about using postgrest for a project, and I hope you find it useful, but I'm closing this issue. It's not the direction we're going. Feel free to reply if I've misunderstood you.


fix requirements for notebook

requirements.txt has non-existent packages and no version numbers

@WeiLiu3 Do you have a conda environment for when this notebook worked and could you run pip freeze to generate a new requirements file?

Closing with comment unless someone thinks we should reopen to try to document. I don't think we have a solution.


Bidirectional network access (ec2 <-> on-premises)

Hi,
Just wonder what I should do for enabling dual ways connections? Have done:

[AWS] Disable source / destination check on EC2 instance

You can reach your systems on-prem, however you will need to use the tunnel network.
Notice if you run ip a on the ec2 instance there is a tun0 interface.
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100     link/none     inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global tun0        valid_lft forever preferred_lft forever
The on-prem system will also be on this same network. typically at ip of  <IP_ADDRESS> you should be able to ping and even ssh into this device.

Thanks for advice.  Close for now.


Find & replace links to SystemDesign repo issues

Define whether SystemDesign issues have been moved over?

This should now be done with the merging of #795


When the $response is unsuccessful, $response->json is an object instead of an array

https://github.com/gopaycommunity/gopay-php-api/blob/8ce477a45fe29015c456789a4d591f28a4d747f8/src/Http/JsonBrowser.php#L42
The documentation promises that $response->json is an associative array. But if the response is unsuccessful, $response->json is an object (of stdClass).
In the line above, json_decode() is missing its second argument.
The potential bugfix breaks compatibility for all who process Gopay response errors.
Edit: Ahh, I see the same issue is mentioned in #21

Fixed in 4195dc2185fe6f0a8f578cac9a05431fd77f6e71
Recently two version have been released.
v1.3.6 - new payment instrument and new session sub state codes which our gateway may were added
v1.4.0 - includes 1.3.6 + fixes the issue described here, but breaks backwards compatibility


PEP 541: transfer ownership of abandoned 'utidylib package

I would like to request to transfer ownership of the name 'utidylib' to myself. I've agreed with original uTidylib author (Cory Dodt) to take over the maintenance of the package (few years ago), however it is owned by somebody else on the pypi, so he can not transfer the package ownership to me. Unfortunately I was not able to find any contacts for this user (cntrlr). Is it possible either to transfer ownership to me (nijel) or at least to get contacts for cntrlr?
I understand that the PEP 541 procedures are just being put together (https://github.com/pypa/warehouse/issues/1506) so please direct this request appropriately, but this seems to be the place to collect the requests right now.

Just to summary abandonment state:

I got permission from the original autor, but he does not control the pypi entry
There is no way for me to contact pypi entry owner (see https://github.com/pypa/warehouse/issues/933)
The code is now actively maintained by https://github.com/nijel/utidylib
Changing the name is of course possible, but that's probably not what people depending on this would expect

Hello @nijel, apologies for the delay in processing this request.
It appears that cntrlr is the sole owner of uTidylib, he should be able to transfer the project to you.
Tagging @corydodt as I believe that's his GitHub user, apologies if it's not.

Hi,
This is @corydodt on github. My pypi user is also corydodt (
https://pypi.org/user/corydodt/). @cntrlr is someone else entirely. I think
the last time I updated utidylib, pypi didn't even exist yet, so I never
created a project there and it does not currently belong to me.
C

On Tue, Aug 20, 2019 at 1:24 AM Yeray Diaz Diaz<EMAIL_ADDRESS>wrote:

Hello @nijel https://github.com/nijel, apologies for the delay in
processing this request.
It appears that cntrlr is the sole owner of uTidylib
https://pypi.org/project/uTidylib/, he should be able to transfer the
project to you.
Tagging @corydodt https://github.com/corydodt as I believe that's his
GitHub user, apologies if it's not.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pypa/warehouse/issues/4860?email_source=notifications&email_token=AAA5W2IZOS6ZIOX4DWZ3SRLQFOS3PA5CNFSM4F3RCWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4VPSUY#issuecomment-522910035,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA5W2IYWPUCHDNFVRF4DNDQFOS3PANCNFSM4F3RCWMQ
.

Right, sorry for the confusion, I will try to contact the owner via email.

No worries, best of luck!

On Wed, Aug 21, 2019 at 1:01 AM Yeray Diaz Diaz<EMAIL_ADDRESS>wrote:

Right, sorry for the confusion, I will try to contact the owner via email.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pypa/warehouse/issues/4860?email_source=notifications&email_token=AAA5W2MELLZIUM4LQYVIBFDQFTY6PA5CNFSM4F3RCWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4YZVWQ#issuecomment-523344602,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA5W2K7LRKZ4XLNPPKDTRTQFTY6PANCNFSM4F3RCWMQ
.

Hello. As I can see something strange has happened around me. I probably indeed have tried to use utidylib some time ago but the think that I may be it's owner surprises me greatly. I need to check this out guys. If you need something please contact me immediately and I will do my best to help you.

Hi @Cntrlr. I believe Cory tagged your GitHub account since it matches PyPI user "cntrlr" which sounds like it's not you, if that's the case please disregard this issue 🙂
I already tried contacting the owner via email and am waiting for a response.

I already did check all my accounts and this is not mine for sure. I hope this case will be resolved quickly. Good luck!

@nijel I've tried emailing the owner of the package but the address is now deactivated so the project can now be considered abandoned.
I will ask an admin to proceed to transfer ownership to you.

transfer complete.

Thanks!


tb_print and *_ex procedures can potentially read past end of buffer

Hello!
I see that the utf8_char_to_unicode does not check whether it has read past a null byte. This allows code like the example below to read past the intended end of a string, at best causing garbage to be printed to the screen or a crash, at worst reading sensitive information. This can happen if we use tb_print to print some malcrafted input.
 If so, it is in my humble opinion that this should be documented somewhere.
Otherwise, as far as I understand it, the only UTF-8 code with a null byte in it is the null character itself, so termbox2 should not read past null bytes regardless.
Example:
#define TB_IMPL
#include "termbox2.h"

int main(void) {
	const char ok_string[] = { 'f', 'o', 'o', '\0', 'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '\0' };
	const char bad_string[] = { 'f', 'o', 'o', 194, '\0', 'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '\0' };
	                      /* >2-byte codepoint ^^^    ^ will read past this string terminator! */
	tb_init();
	tb_clear();
	tb_print(0, 0, TB_DEFAULT, TB_DEFAULT, ok_string);
	tb_print(0, 1, TB_DEFAULT, TB_DEFAULT, bad_string);
	tb_print(0, 2, TB_DEFAULT, TB_DEFAULT, "Press ctrl+c to exit.");
	tb_present();
	struct tb_event ev;
	while (tb_poll_event(&ev) == TB_OK) {
		if (ev.key == TB_KEY_CTRL_C)
			break;
	}
	tb_shutdown();
	return 0;
}

Hello, thanks for filing this issue. I'm surprised fuzz testing never caught this. I agree this should at least be documented and probably warrants some changes.
Right now I'm leaning toward changing tb_utf8_char_to_unicode to return an error if it encounters a null char mid sequence, and changing tb_print* to replace incomplete chars with U+FFFD (replacement character). Any termbox programs hitting this case are already printing garbage (or worse), so I think this is a fine solution. A more "correct" solution might be to let the library user specify a behavior (error, replace, drop, send verbatim, custom callback, etc), but all of that would bloat the API. Programs that want different behavior can sanitize their own input and use tb_set_cell.
I'll sleep on it. If anyone has input, please weigh in.

The simple solution from the beginning of the second paragraph sounds good. The "correct" solution does not bring value to my library use. The more straightforward API does, tho.

usual behaviour of C functions is to just return error when invalid input is supplied.
so just print nothing, return -1, or TB_ERR_INVALID_UTF8

Fixed in ce6488ccb3789fb7e8ae0d751e3b49bd4e985375. Thank you @freddylist.


[FEATURE] API's extension - Cohere and Azure OpenAI

🚀 Feature
I would love to use Azure OpenAI instead of GPT4, or using Cohere API.
Motivation
I have an Azure OpenAI subscription for the company and I need to use this instead of using the GPT4 OpenAI API. In addition I have also a Cohere account.
Adding more possibilities will extend the adoption of this tool.
Regards.

Azure OpenAI is already supported. Please visit the settings page and set these according to your installation:

Basically, this enables you to use any drop in replacement for the open AI API.
We are open for PRs to support Cohere API, but it's currently not a priority.

many thanks @pascal-pfeiffer. I will take a look to the code to see if I can do a PR.


When a publisher removes a publisher feed, we should detect that and disable the publisher feed.

eg, If https://onlinebooking.1610.org.uk/OpenActive/ suddenly stopped publishing any "Slot" feed

What do you mean by "removes a feed"?

Feed reference removed from the dataset site - that feed has gone and should no longer be harvested, but other feeds should continue to be harvested.
The dataset site itself is returning a 404 - The publisher has unpublished their data, and all data relating to that publisher should be purged immediately, in case of GDPR breach or similar (Note some systems such as Gladstone are designed to return a 404 from the dataset site if a user presses the "disable open data feeds" button within their booking system, so this is by design)
A feed page returns a status of anything other than a 200, 429, or 503 - feed is in an inconsistent state, and is displaying symptoms of an error that should be fixed. Suggest harvesting is restarted from the beginning of the feed the following day, when the errors may have been resolved. If this happens ideally an error would be shown on the status page saying e.g. "Harvesting halted at {pageUrl}, which returned status code {statusCode}".

Note often a feed will often return e.g. a 500 on only one particular RPDE page due to some conditional logic, which is why it's so helpful to surface the erroneous {pageUrl}.
As an example, https://opendata.leisurecloud.live/api/feeds/1610-live-slots is now working again

For this issue, explicitly:

Feed reference removed from the dataset site - that feed has gone and should no longer be harvested, but other feeds specified in the dataset site should continue to be harvested.

eg, If https://onlinebooking.1610.org.uk/OpenActive/ suddenly stopped publishing any "Slot" feed
The existing code on the main branch won't do this, so this
I will put the rest in other issues.
But Q, if a feed is stopped publishing; should we purge all data we have for that feed straight away? (the GDPR issues mentioned)

Ah right, so for this specific case for that specific publisher: likely that the Slots feed had issues with the CDN and RPDE proxy so temporarily unpublished itself. It then automatically reappeared after proxy issues were resolved.
If a feed is removed from the dataset site then the feed contents should be purged. If it gets readded to the dataset site the feed contents should again be harvested from the beginning (same as if any new feed is added to any dataset site).

Ah right, so for this specific case for that specific publisher: likely that the Slots feed had issues with the CDN and RPDE proxy so temporarily unpublished itself. It then automatically reappeared after proxy issues were resolved.

My example was totally made up :-)
We will look into the purging rule you say.

Question for this and #39: How fast should we purge all data? As soon as we see it missing? A few days after we see it missing?
We are concerned that temporary errors might take a server down for an hour, but in that hour we notice and delete everything, and then have to start from scratch.

Realised: We can't purge data in the sql DELETE sense - because then our RPDE interface won't publish delete flags to consumers, and consumers will still have the data we are trying to clear urgently! We need to do soft deletes; UPDATE raw/normalised SET deleted=TRUE, data=NULL. That will still clear the data out of our store.

 Establish what we need to do if a publisher stops publishing either a particular feed or OA data entirely

Discussed with @thill-odi . We shouldn't actively delete data from a publisher that stops publishing, but we shouldn't seek to retain it (eg if we need to wipe the db for some reason) either.
The exception is if there's a takedown request, which we'll deal with separately.

Ok, thanks. But re-opening as I would expect we still would want to flag the fact a publisher has removed a publisher feed somehow, even just a comment on the new status page?

Ah, also see https://github.com/openactive/conformance-services/issues/39#issuecomment-657665225 - could @thill-odi confirm what should happen here?


🗄 Theme: Legacy Tech Maintenance

Description: This thread of work focuses on the tasks necessary for the team to standardise and simplify more of our offerings. To reduce operational overhead, make these offerings more applicable to the wider community, create more opportunities for sharing and reuse with the community, among other aspects.

[ ] K8s on Equinix spike using K3s
[ ] GitHub Actions spike
[ ] HAProxy spike

ETA: 2023Q2
Note: This roadmap is subject to change as priorities and circumstances evolve.
Starmap Link: https://starmap.site/roadmap/github.com/protocol/netops/issues/52

Equinix spike with k3s initial implementation - https://github.com/protocol/bifrost-infra/pull/2374


[Doc]: update xcdat Regridding doc and link to/from xESMF

Describe your documentation update
xESMF website
I have just noticed that there is an old link from the xESMF Other geospatial regridding tools page to Regridder in UV-CDAT. You may want to ask them to link to the xCDAT home page, or to your Horizontal Regridding page
xCDAT Horizontal Regridding

xCDAT Horizontal Regridding page mentions xESMF at the beginning of the page, but you have to scroll down to sections 4 and 5 to find actual links to the the xESMF documentation. Maybe you could (also) have a link to the xESMF: Universal Regridder for Geospatial Data website closer to the top

the links you use for xESMF (including your xarray.Dataset.regridder.horizontal page) use https://pangeo-xesmf.readthedocs.io/en/latest/, but I have seen that the same documentation is also available at https://xesmf.readthedocs.io/en/stable/. Both links seem to have the same content, but the one without pangeo- may be more canonical?

Thanks for opening this GitHub issue, @jypeter. Pull requests are always welcome!


Terragrunt's sops_decrypt_file() does not work with GOOGLE_CREDENTIALS environment variable

Hi
We use GOOGLE_CREDENTIALS with the service account's private key in our CI to authenticate with GCP. Recently, we decided to add sops_decrypt_file() to our CI to pass some credentials down to the module which is supposed to work with GOOGLE_CREDENTIALS according to this PR but we are consistently getting:
Call to function "sops_decrypt_file" failed: Error getting data key: 0 successful groups required, got 0.
We are running sops v3.7.3. I was able to reproduce this error on my local with a dummy Terragrunt/Terraform module and only GOOGLE_CREDENTIALS set.
Binary sops --decrypt secretsfile.yaml works fine. Only sops_decrypt_file() doesn't.
The very same Terragrunt/Terraform configuration works fine when using application default credentials.
Does sops_decrypt_file() work with GOOGLE_CREDENTIALS?
Terraform v1.3.9
terragrunt version v0.44.0
sops 3.7.3 (latest)

Would anyone be able to look at this? I can see GOOGLE_CREDENTIALS have been added in #907 a long time ago. Is there a chance sops_decrypt_file() is not using them correctly?

We have the same problem, it blocks us from using federated authentication in GCP.

Bychecking the go.mod I see that terragrunt uses sops v3.7.2 but the feature in mentioned PR is in v3.7.3 (https://github.com/gruntwork-io/terragrunt/blob/d185ed96d24ff59c906c28a019a9b2cdf29f760e/go.mod#L32). Can we bump up the sops library used for Terragrunt?


Update Flow dependencies

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 43.82%. Comparing base (5ab7a1e) to head (fd81fb5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #75   +/-   ##
=======================================
  Coverage   43.82%   43.82%
=======================================
  Files          40       40
  Lines        3366     3366
=======================================
  Hits         1475     1475
  Misses       1631     1631
  Partials      260      260

Flag
Coverage Δ

unittests
43.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Added bullet points to metric names and labels.

Added bullet points to draw attention to the importance of metric names and labels. Made small grammar changes.

Thanks @juliusv I made the changes!

:+1: Thank you, merging :)


installation instructions not clear

i tried following the rules in instructions.txt butt he chmod and sudo commands arent there on windows. i tried to open the .py commands but they dont work. its showing spotipy not downloaded.

but as you see i have already installed spotipy. when trying to upgrade its showing this error
C:\Users\GUEST123>pip install spotipy --upgrade
Collecting spotipy
  Using cached spotipy-2.18.0-py3-none-any.whl (26 kB)
Collecting requests>=2.25.0
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six>=1.15.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting urllib3>=1.26.0
  Using cached urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
Collecting chardet<5,>=3.0.2
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Installing collected packages: urllib3, idna, chardet, certifi, six, requests, spotipy
  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'c:\\python39\\Scripts\\chardetect.exe' -> 'c:\\python39\\Scripts\\chardetect.exe.deleteme'

WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

when installing the req.txt this is what happens
C:\Users\GUEST123\Downloads\smd-1.7.1\smd-1.7.1>pip3 install -r requirements.txt
Collecting notify2==0.3.1
  Downloading notify2-0.3.1-py2.py3-none-any.whl (8.0 kB)
Collecting spotipy==2.4.4
  Downloading spotipy-2.4.4.tar.gz (15 kB)
Collecting lyricsgenius==1.4.0
  Downloading lyricsgenius-1.4.0-py3-none-any.whl (13 kB)
Collecting lxml==4.3.3
  Downloading lxml-4.3.3.tar.gz (4.4 MB)
     |████████████████████████████████| 4.4 MB 328 kB/s
Collecting mutagen==1.41.0
  Downloading mutagen-1.41.0.tar.gz (918 kB)
     |████████████████████████████████| 918 kB 6.4 MB/s
Collecting requests==2.21.0
  Downloading requests-2.21.0-py2.py3-none-any.whl (57 kB)
     |████████████████████████████████| 57 kB 553 kB/s
Collecting moviepy==<IP_ADDRESS>
  Downloading moviepy-<IP_ADDRESS>.tar.gz (372 kB)
     |████████████████████████████████| 372 kB 3.3 MB/s
Collecting imageio==2.3.0
  Downloading imageio-2.3.0-py2.py3-none-any.whl (3.3 MB)
     |████████████████████████████████| 3.3 MB 2.2 MB/s
Collecting humanize==0.5.1
  Downloading humanize-0.5.1.tar.gz (14 kB)
Collecting pygame==1.9.6
  Downloading pygame-1.9.6.tar.gz (3.2 MB)
     |████████████████████████████████| 3.2 MB 3.3 MB/s
    ERROR: Command errored out with exit status 1:
     command: 'c:\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GUEST123\\AppData\\Local\\Temp\\pip-install-tix5d50_\\pygame_7efef4f40f944157ad42ece7b6f3bb66\\setup.py'"'"'; __file__='"'"'C:\\Users\\GUEST123\\AppData\\Local\\Temp\\pip-install-tix5d50_\\pygame_7efef4f40f944157ad42ece7b6f3bb66\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\GUEST123\AppData\Local\Temp\pip-pip-egg-info-4_p7gqj6'
         cwd: C:\Users\GUEST123\AppData\Local\Temp\pip-install-tix5d50_\pygame_7efef4f40f944157ad42ece7b6f3bb66\
    Complete output (17 lines):

    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using WINDOWS configuration...

    Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\GUEST123\AppData\Local\Temp\pip-install-tix5d50_\pygame_7efef4f40f944157ad42ece7b6f3bb66\setup.py", line 194, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "C:\Users\GUEST123\AppData\Local\Temp\pip-install-tix5d50_\pygame_7efef4f40f944157ad42ece7b6f3bb66\buildconfig\config.py", line 210, in main
        deps = CFG.main(**kwds)
      File "C:\Users\GUEST123\AppData\Local\Temp\pip-install-tix5d50_\pygame_7efef4f40f944157ad42ece7b6f3bb66\buildconfig\config_win.py", line 576, in main
        and download_win_prebuilt.ask(**download_kwargs):
      File "C:\Users\GUEST123\AppData\Local\Temp\pip-install-tix5d50_\pygame_7efef4f40f944157ad42ece7b6f3bb66\buildconfig\download_win_prebuilt.py", line 302, in ask
        reply = raw_input(
    EOFError: EOF when reading a line
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz#sha256=301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pygame==1.9.6 (from versions: 1.9.2rc1, 1.9.2, 1.9.3, 1.9.4.dev0, 1.9.4rc1, 1.9.4, 1.9.5rc1, 1.9.5rc2, 1.9.5, 1.9.6rc1, 1.9.6rc2, 1.9.6, 2.0.0.dev1, 2.0.0.dev2, 2.0.0.dev3, 2.0.0.dev4, 2.0.0.dev6, 2.0.0.dev8, 2.0.0.dev10, 2.0.0.dev12, 2.0.0.dev14, 2.0.0.dev16, 2.0.0.dev18, 2.0.0.dev20, 2.0.0.dev22, 2.0.0.dev24, 2.0.0, 2.0.1.dev1, 2.0.1)
ERROR: No matching distribution found for pygame==1.9.6
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

when trying to update pip a windows pop up comes up showing that app cant run on your pc

I don't think this project works with Windows easily, probably best to try it on Linux.
Anyway it looks like this project is dead/inactive.

ah damn
On Fri, Jun 11, 2021 at 8:13 PM goshawk22 @.***> wrote:

I don't think this project works with Windows easily, probably best to try
it on Linux.
Anyway it looks like this project is dead/inactive.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/artyshko/smd/issues/108#issuecomment-859689305, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AT3MRUNEWIC6SSJ4LVSERODTSIYZ5ANCNFSM46QL2T5Q
.


Mark C++ constructors and getters [[nodiscard]]

Improve compile-time error reports by marking appropriate C++ constructors and getters with [[nodiscard]].

std::ignore should already be in <utility> (since C++11), so no need for the <tuple> include I think?

You're right, thanks for catching that. I misread the docs. Thanks for the quick review too!

/merge


Added Danger, check for CHANGELOG updates.

Warnings

:warning:
Did you forget to update CHANGELOG.md?

  Generated by :no_entry_sign: dangerJS


Map not initializing correctly if center is [0,0]?

I'm not sure if I'm doing something wrong, but the map seems to initialize at the wrong zoom and center if the center starts at [0,0]. Changing the center to any other coordinates, [0,1] for example, seems to immediately fix the problem. I've managed to isolate the problem here:
import React from 'react';
import ReactDOM from 'react-dom';
import ReactMapboxGl from 'react-mapbox-gl';

import KEY from './constants/MAPBOX_API_KEY';
import STYLE from './constants/MAPBOX_STYLE';

const Map = ReactMapboxGl({
  accessToken: KEY,
  minZoom: 2,
  maxZoom: 12,
});

const EventMap = ({ center, zoom }) => (
  <Map
    style={STYLE}
    containerStyle={{
      height: '100vh',
      width: '100vw',
    }}
    center={center}
    zoom={zoom}
  />
);

class EventMapContainer extends React.Component {
  state = {
    center: [0, 0],
    zoom: 2,
  }

  render() {
    const {
      center,
      zoom,
    } = this.state;
    return (
      <EventMap
        center={center}
        zoom={[zoom]}
      />
    );
  }
}

ReactDOM.render(<EventMapContainer />, document.getElementById('app'));

Can anybody help tell me what I'm doing wrong?

Any solution here? I get the same issue. Thanks


More recent TRAPI results cause problems in PET notebook

Some TRAPI results cause an error in the PET notebook, seemingly because "name" is not found for some nodes in the returned knowledge graph.
The error is:
Error in Python
KeyError                                  Traceback (most recent call last)
 in <cell line: 6>()
5 curie_to_unified_curies = dict()
6 for k, v in trapi_message["knowledge_graph"]["nodes"].items():
----> 7     curie_to_name[k] = v["name"]
8     #first check is k is already what we want
9     [prefix, identifier] = k.split(":")
KeyError: 'name'
Query results examples (both are "what treats Huntington's disease?"):
Results URL that works: https://arax.ncats.io/api/arax/v1.3/response/a46d7144-718e-40dc-bde7-8733f38d9d04 (run around mid-Febrary)
Results URL that doesnt work: https://arax.ncats.io/api/arax/v1.3/response/33dd53d9-fd8e-4f17-9a3b-055a782d8467 (run on April 5)
For now, the PET notebook has been updated to not expect a "name", to make it possible to run the notebook. However, this affects how results from the notebook are displayed, it now presents the CURIE instead of the name, which is less human readable.

I think this is related to this issue https://github.com/biothings/BioThings_Explorer_TRAPI/issues/539#issuecomment-1487638950. We think it's related to a change in the ARS, but I'm not sure if we've reached out to their team (NCATS/Link Brokers) yet.
If possible, could we use direct responses from BTE (rather than ones that go through ARS/ARAX)? Or a local instance of BTE?

Yes, I agree with @colleenXu that this issue is related to ARS node normalization.  I expect that this issue will be fixed sometime in the (hopefully near) future.  But, to future-proof the PET notebook, I suggest adding a tiny bit of logic to say "use node name unless it's null, in which case fall back to using the CURIE"...

@khanspers I have updated the notebook as Andrew suggested. In the latest version, if the node name is missing in the knowledge graph, then the unified CURIE is used as the node name. If there is no unified CURIE for the node, then "NA" is used for the node name.  Please test it out and let me know if it works for you.

If possible, could we use direct responses from BTE (rather than ones that go through ARS/ARAX)? Or a local instance of BTE?

@colleenXu : For querying BTE directly, is this the correct URL: https://api.bte.ncats.io/v1/query?

@khanspers that is the correct URL for the "synchronous query" endpoint on our dev server.  https://api.bte.ncats.io/v1/asyncquery would be the "async endpoint" on the dev server.  The prod server would be the same with the base URL of https://bte.transltr.io/.
BUT I don't think we want the PET notebook to be executing TRAPI queries.  I think Colleen's question is whether the PET notebook will work on BTE output that hasn't been processed by the ARS and then served by the ARAX UI (like the URLs above).  More specifically, when a user executes a query using one of the async endpoints, you end up with a response URL like this: https://bte.transltr.io/v1/check_query_status/U6fjFr5WE3.  It's a TRAPI response with a little wrapper around it.
If easy, it would be great to allow for users to use a URL like that.  If not, we should assume that the ARS bug will be fixed soon, and that the changes that @ayushi-agrawal-gladstone described in this comment is a reasonable fallback.

Right, I didn't mean for the notebook to execute queries, sorry that wasn't clear. Indeed I was looking for some alternative response URL (or BTE responses in some other format) to be used in the notebook as an alternative to how it works now.
So if I post queries to https://api.bte.ncats.io/v1/asyncquery or https://bte.transltr.io/v1/asyncquery in Postman, I should be able to use the response URL (https://bte.transltr.io/v1/check_query_status/U6fjFr5WE3), swapping out the response ID?

Im getting this error again, but I can get it to run by commenting out line "curie_to_name[k] = v["name"]" fixes it. Based on the history I think this is the line that was removed earlier to fix this?

@khanspers Yes, you are right that this was the line that I had fixed. Looks like I overwrote the changes by mistake while adding new features to the notebook. This happened as my local copy of the repo was not up to date. I will be more careful about my local versions of the code. I have fixed the PET notebook to work as specified in my previous comment. Please let me know if you still get errors.

No longer seeing this issue with newer validator 3.5.3 and up (BTE issue).


Avoid downloading any files when running collect-windows-logs.ps

Is your feature request related to a problem?/Why is this needed

When running collect-windows-logs.ps, it will call collectlogs.ps which will download many files from github.
DownloadFile -Url  "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/dumpVfpPolicies.ps1" -Destination $BaseDir\dumpVfpPolicies.ps1DownloadFile -Url "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/hns.psm1" -Destination $BaseDir\hns.psm1DownloadFile -Url "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/starthnstrace.cmd" -Destination $BaseDir\starthnstrace.cmdDownloadFile -Url "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/starthnstrace.ps1" -Destination $BaseDir\starthnstrace.ps1DownloadFile -Url "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/startpacketcapture.cmd" -Destination $BaseDir\startpacketcapture.cmdDownloadFile -Url "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/startpacketcapture.ps1" -Destination $BaseDir\startpacketcapture.ps1DownloadFile -Url  "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/stoppacketcapture.cmd" -Destination $BaseDir\stoppacketcapture.cmdDownloadFile -Url  "https://raw.githubusercontent.com/$GithubSDNRepository/master/Kubernetes/windows/debug/portReservationTest.ps1" -Destination $BaseDir\portReservationTest.ps1

Describe the solution you'd like in detail

Use DownloadFileOverHttp to replace DownloadFile in collectlogs.ps
Describe alternatives you've considered

Additional context

When running collect-windows-logs.ps1, I find that the files that need to be downloaded already exist in the destination and collectlogs.ps1 does not download these files again. The logs are as follows:

Thanks, @junjiezhang1997 . It looks like that it is not an issue.


Failed to scrape jobs for MonsterScraperCANEng and IndeedScraperCANEng

Description
I have followed the exact process mentioned in the repository to setup my system. However when in am running funnel load -s my_settings.yaml, it is not giving any row.
I have setup this code in conda virtual environment 3.9 version. I am using windows 10.

#148


ProteinPredicates

The following API could be simplified
from gpsea.analysis.predicate.genotype import ProteinPredicates
ppredicates = ProteinPredicates(protein_metadata_service=pms)
abc_type1 = ppredicates.protein_feature(feature_id="ABC transmembrane type-1", tx_id=mane_tx_id)

from gpsea.analysis.predicate.genotype import monoallelic_predicate

gt_predicate = monoallelic_predicate(
    a_predicate=abc_type1,
    b_predicate=~abc_type1,
    names=("ABC transmembrane type-1","Other region") )

For instance, it might be better to protein the protein metadata instead of the protein metadata service.
A probable BUG is that the counts returned are always 100%.
See the corresponding cells in this notebook:
https://github.com/monarch-initiative/gpsea-cs/blob/develop/notebooks/ABCB7/ABCB7_gpsea.ipynb

Yeah, this needs to be reworked.

Let's be sure to use the ProteinMetadata instead of the ProteinMetadataService in the constructor, because when UniProt does not work, the PMS cannot be constructed.


Padding does not consider monitor proportions

I set up polybar modules so they be centered on my laptop screen using padding-right property. When I plug laptop to a monitor all modules shift to the right. It seems to me that it would be great if any screen had same amount of conventional width units, to make padding of 1 unit on laptop and on wide screen look proportionally same.

Oops, sorry for my ignorance of configuration details. I have added all modules to 'modules-center' and returned padding values back to 0 and that has fixed the issue.


[FR] Option for goto_today() to jump straight to file

Please confirm

[x] I am running the latest version of this plugin

Is your feature request related to a problem? Please describe.
When calling goto_today(), I always want to go to the markdown file of my note. Currently, I have to press enter in the telescope prompt. I would like to skip the telescope prompt altogether.
Describe the solution you'd like
Jump straight to the file instead of opening the telescope prompt.
Describe alternatives you've considered
I tried coming up with a mapping like
"<cmd>lua require('telekasten').goto_today()<CR><cmd>lua require('telescope.actions.set').select()<CR>"
but without success.
Additional context
It could be a boolean option like jump_if_exists, where if true you get the telescope prompt if today's note does not exist yet, and it jumps to the file if it exists already.

I agree, this would be a really nice feature.
We could even allow more customization by passing a list of pickers instead of boolean jump_if_exists_list = {goto_today, follow_links}, so it could also work with follow_link() for instance.

Same with goto thisweek !
:calendar:

Hey, just pushed a fix for this on branch https://github.com/renerocksai/telekasten.nvim/tree/93-fr-straight_jump
Could you try this?
Basically it introduces a global option journal_auto_open (default to false) that skips the prompt for goto_today and goto_thisweek.
I also made it so you can create special mappings if you do not want to change the default behavior.
nnoremap <leader>zT :lua require('telekasten').goto_today()<CR>
nnoremap <leader>zTT :lua require('telekasten').goto_today({journal_auto_open = true})<CR>

I think the same reasoning could be applied to other functions as well maybe, but I am not really sure if that would be really that useful. Do you have some opinions regarding that? Which functions then? Use a separate global setting like journal_auto_open and note_auto_open?

Hi! I checked out the PR, it works as expected, nice work!
However, I'm no longer using this plugin, I switched to vimwiki for my dailies due to the integration with taskwarrior for the to-do list, and zk for the notes due to the command-line interface.
I'll give you my opinion anyway, I like the idea of the global journal_auto_open and note_auto_open settings. The user can then fine-tune the behaviour with the mappings as you showed.

Hey! Thank you very much for taking the time to test and reply even though you no longer use the plugin. I will merge ASAP for anyone else still interested.

Well, workflows are a personal thing, so for each their own.
As written in the README bu @renerocksai,

Leaving the opening of the note to Telescope, you can decide with one keypress whether you want to open the note in a split or in the current window - or if you've seen enough.
I find that pressing the enter key to confirm the search does not interrupt my flow, and I really enjoy being able to check the preview. I often get enough information from it alone so I don't actually have to "visit" every note in terms of being able to edit it.

So this explains the current way of doing things. For me, the more options the better. So we could maybe let the user decide through an option how Telekasten should behave (or at least have arguments to the lua functions so users can make their own specific shortcuts).
This reminds me that I still have to merge that stuff btw...


Improve docs

Proposed changes
This PR has been a long time coming... Flushing out the User Guide of the documentation.
Types of changes
What types of changes does your code introduce to FESTIM?

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Code refactoring
[x] Documentation Update (if none of the other choices apply)
[ ] New tests

Checklist

[ ] Black formatted
[ ] Unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Looks nice. Several minor suggestions. @RemDelaporteMathurin, what do you think of adding some information about:

The Soret coefficient in Materials
The stepsize settings (adaptive stepsize)
An example of the PointValue usage in PP

Looks nice. Several minor suggestions. @RemDelaporteMathurin, what do you think of adding some information about:

The Soret coefficient in Materials
The stepsize settings (adaptive stepsize)
An example of the PointValue usage in PP

Done! let me know what you think.

Perfect! Though I didn't find an example of the InitialCondition usage (nowhere). Maybe, it's also worth adding. As an option, the Boundary conditions section can be extented to Initial & Boundary conditions. Nonetherless, the current version is OK to me.

@KulaginVladimir good shout! I added the initial conditions

@KulaginVladimir I split ICs and BCs and added the initial conditions from XDMF files to the docs. Once it's compiled you should see it here

I think it is a nice guide. Would have been really helpful when I started using FESTIM 😄

I think it is a nice guide. Would have been really helpful when I started using FESTIM 😄

Apologies for this... New users have a complete guide now! Thanks for your review!

@jhdark thanks for your feedback. I pushed the suggested changes, we are in no rush to merge this so if you need more time no worries.


Fix: Enable Energy Calculation in Benchmarking by Implementing Subtraction Method

Background
During the development of our benchmarking system, it was discovered that calculating the net energy consumption for text generation tasks (subtracting the energy consumed during the 'forward' operation from the 'generate' operation) was not feasible with the current implementation of the Energy class. This limitation stemmed from the absence of a method to subtract one Energy instance from another.
Solution
This pull request addresses the issue by introducing a __sub__ method to the Energy class. This method enables the direct subtraction of two Energy instances, facilitating the accurate calculation of energy differences required for benchmarking.
Implementation Details

The __sub__ method checks for unit compatibility and then subtracts the attributes (cpu, gpu, ram, total) of one Energy instance from another.
This functionality is critical for the line self.report.decode.energy = generate_energy - forward_energy to work as intended in the benchmarking workflow.

Impact

With this update, the benchmarking system can now accurately report on the energy efficiency of different models by calculating the net energy consumed during text generation tasks.

Yes totally forgot to add that method ! Thanks a lot for the finding and fixing it !

I will make sure to add some energy tests in another PR !


deleting :require => "postgres" when using AR with pg gem

Dear Team,
I found generated Gemfile might cause trouble when passing the option -d activerecord with -a postgres ...
Now Gemfile might say gem "pg", :require => "postgres" ,but I think it won't works. (It would be a trouble especially in developments with Heroku.)
So I fixed generator... Could you look into this?

I think that's a good idea, thanks udzura.

Good idea, makes sense. Thanks.


Unseen delegate protocols and stop() method

I have the module importing to my Raspberry Pi project no problem!  But for some reason it is not recognizing references to NetServiceDelegate, NetServiceBrowser and NetServiceBrowserDelegate.
In perhaps a related issue, it does not see "stop()" on NetServiceBrowser, but I can see that method implemented in your source (even though I also see an issue from last year saying it requires implementation).
Importing "NetService" is the only module required, correct?  Thanks!

I realized why the protocols were not being recognized.  I had a file full of NetService stubs around to enable execution under Linux.  I removed that file and although I still have some issues, that particular one is zapped!
Let me know about the "stop()" method.

The stop() method should be available in 0.4.0 and above: https://github.com/Bouke/NetService/commit/a8311f8b7c7bcccf01f7aa1c87cb98d2dd98eea8.

Super!  Thanks.


Cannot Export Objects

I'm logged with windows Auth. When I run the Export-NavContainerObjects I get the error below

If you type help Export-NavContainerObjects you can see the syntax.
Export-NavContainerObjects -containerName test -objectsFolder c:\demo\objects -adminPassword  -filter "Modified=Yes"
works here.
Documentation for navcontainerhelper is still due - work in progress, I just wanted to allow people to get going before everything was done done.

Thanks. I have checked the help.
When I enter the command I still get the same error.

What license are you using?

I was using the license.flf on the DEMO folder. I have changed it to my partner license and it works correctly. Thanks for your help!!!!


OSFUSE-327: f-m-p Karaf generator should get the version info of the images via build properties

Also put all image version in the parent/pom.xml for easy updating.

going to merge this and unify the property handling.
thanks !

Cosed in favor of #496


Error EOF when NewFrameBuffer()

Dear team,
I have implement selenium suport automation test but run func NewFrameBuffer() apprear error EOR.
currently, i not fix issue it, please help me.
Thank you team.

I have issue in stack https://stackoverflow.com/questions/72204841/reader-error-eof-when-use-os-pipe-and-bufio
issue done but in source still error when NewFrameFuffer()


Gauge renders the placeholder color when only one item has value

See: https://github.com/andreaferretti/paths-js/issues/47

Resolved by #70


Make shadow state visible from StreamInfo.

Signed-off-by: Paul Gallagher<EMAIL_ADDRESS>
Commit Message: Make shadow state visible from Stream Info.
Additional Description: This will give upstream http filters visibility into whether they are on a shadow stream or not.
Risk Level: Low
Testing: Unit
Docs Changes: None

@paul-r-gall test failure: https://source.cloud.google.com/results/invocations/0b94bfe3-aa51-480a-bf4a-038d09f0ffdf

/wait

Timeout.
/retest

Coverage run indicates code coverage is low in source/common/config, but I didn't touch that directory.

/retest

/retest