Profile app with shinyloadtest to test latency issues with concurrent users

There are reports of the app sending a 504 disconnect error when multiple users are accessing it simultaneously. Look into shinyloadtest to document potential bottlenecks.

Profiling the app with <5 users yields consistently good results. However, with >5 latency issues pop up and shinycannon cannot complete the tests, returning messages like WS_RECV line 82: Haven't received message after 30 seconds. High latency apps are a known issue for shinyloadtest.
Notably, running shinycannon in the office yields much better results than my home connection. Not only do fewer sessions hang indefinitely with the above message, but the app executes much faster.

[ ] what points are hanging up?
Acceptance Criteria:

Document fx or calls to synapse that are stalling

@ychae @milen-sage Swapping metadata_model$getModelManifest with the schematic REST API, using very limited, hard-coded functionality did not result in much of a difference in execution time or latency issues with multiple users.
The same Synapse query is getting downloaded by DCA and the manifest API call. It's a 14.2kB dataset, but its worth exploring it's contribution to latency issues. I think it's coming from this part of synapse store . Maybe we can cache this dataset somewhere.

@rrchai found similar issues in April https://github.com/Sage-Bionetworks/data_curator/issues/139


Basic auth does not work

Pushing via https doesn't seem to work as authentication fails.
ssh looks fine

Fixed, two-factor authentication was causing this issue.
Added handler for two-factor authentication + instructions for user on how to work with it.


Feature: Ensure the type passed to createCommand is retained, inferred, and enforced

Issue created from a Q-and-A post over at Discord: https://discord.com/channels/953974421008293909/955972012541628456/990966752110325771
I really dig the command system in Lexical, but there are two things that irks me a little bit:

Strongly typing the command seems like a great idea, but the underlying types makes it a bit hard to debug the code. Basically, createCommand()-call just creates an empty object {} that's used as a unique key for a Map. This is great, but given that approach, whenever a command is dispatched, the type is simply {}. Would it make sense to have some internal field or name to trace which command is being dispatched?

Each LexicalCommand is generic in terms of the payload, so you can have a LexicalCommand<boolean>, or LexicalCommand<KeyboardEvent>. However, the LexicalCommand<T> is really just an alias for Readonly<Record<string, unknown>>, so the required type of the payload isn't saved. This also makes us lose type safety down the line, where you can do

const SOME_EVENT = createCommand<boolean>();

// ...

editor.dispatchCommand(SOME_EVENT, 'Not a boolean...');

and TypeScript will happily accept it. It'd be good if the payload was constrained by the type of the command here.
Additionally, when you registerCommand you need to repeat the type of the payload. Given that the type information was stored inside of the command itself, this could then be inferred, along the lines of:
editor.registerCommand(SOME_EVENT, (payload) => { /* do stuff with inferred boolean */ }

Finally, if the registerCommand could infer the payload type from the command itself, then we could ensure that the command handler has the expected signature. With the current approach there is nothing preventing a very similar error as in the dispatchCommand example, where the registerCommand-handler expects a payload differing from the one provided to createCommand.

As a starting point to the second bullet, I've created a PoC draft PR. There are still some type checking errors introduced by this change, related to LexicalEvents:
packages/lexical/src/LexicalEvents.ts:514:68 - error TS2345: Argument of type 'InputEvent' is not assignable
  to parameter of type 'string'.

514         dispatchCommand(editor, CONTROLLED_TEXT_INSERTION_COMMAND, event);
                                                                       ~~~~~

packages/lexical/src/LexicalEvents.ts:521:68 - error TS2345: Argument of type 'InputEvent' is not assignable
  to parameter of type 'string'.

521         dispatchCommand(editor, CONTROLLED_TEXT_INSERTION_COMMAND, event);
                                                                       ~~~~~

packages/lexical/src/LexicalEvents.ts:550:48 - error TS2345: Argument of type 'InputEvent' is not assignable
  to parameter of type 'ClipboardEvent'.
  Property 'clipboardData' is missing in type 'InputEvent' but required in type 'ClipboardEvent'.

550         dispatchCommand(editor, PASTE_COMMAND, event);
                                                   ~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:3533:14
    3533     readonly clipboardData: DataTransfer | null;
                      ~~~~~~~~~~~~~
    'clipboardData' is declared here.

packages/lexical/src/LexicalEvents.ts:872:47 - error TS2345: Argument of type 'KeyboardEvent' is not
  assignable to parameter of type 'ClipboardEvent'.
  Property 'clipboardData' is missing in type 'KeyboardEvent' but required in type 'ClipboardEvent'.

872         dispatchCommand(editor, COPY_COMMAND, event);
                                                  ~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:3533:14
    3533     readonly clipboardData: DataTransfer | null;
                      ~~~~~~~~~~~~~
    'clipboardData' is declared here.

packages/lexical/src/LexicalEvents.ts:875:46 - error TS2345: Argument of type 'KeyboardEvent' is not
  assignable to parameter of type 'ClipboardEvent'.

875         dispatchCommand(editor, CUT_COMMAND, event);
                                                 ~~~~~

Thanks for these @PAkerstrand. Your working solution to 2 seems really strong. We used to have payload to command type inference when we used Flow, but we must have lost that when we auto-generated the new TypeScript types.
If you have type conflicts in any of the registerCommand callbacks, use instanceof in the registerCommand if we shouldn't be calling any subsequent functions i.e.:
 editor.registerCommand(
      CUT_COMMAND,
      (event) => {
         const selection = $getSelection();
        if (!$isRangeSelection(selection)) {
          return false;
        }
        if (event instanceof ClipboardEvent) {
          onCutForPlainText(event, editor);
        }
        return true;
      },
      COMMAND_PRIORITY_EDITOR,
    ),

The other issue you identified in 1. is definitely on my radar as it will affect our ability to add command logging as part of #2393. Sadly, I'm actually not sure if there's a way around it without changing the existing API. We don't want to require the developer to have to pass a type argument, but we also can't access the instantiating variable name in the enclosing scope of createCommand.
Still not sure of a solution, but I will keep thinking.

@thegreatercurve I'm having some issues with various events not being available in the unit tests. I guess this is down to the testing environment in Jest and what's exposed by the jsdom-environment?
 LexicalSelection tests › Paste text, move selection and delete word forward (#129)

    ReferenceError: ClipboardEvent is not defined

      381 |     const selection = $getSelection();
      382 |     const clipboardData =
    > 383 |       event instanceof ClipboardEvent ? event.clipboardData : null;
          |                        ^
      384 |     if (
      385 |       clipboardData != null &&
      386 |       ($isRangeSelection(selection) || $isGridSelection(selection))

      at packages/lexical-rich-text/src/index.ts:383:24
      at processNestedUpdates (packages/lexical/src/LexicalUpdates.ts:738:7)
      at beginUpdate (packages/lexical/src/LexicalUpdates.ts:796:22)
      at updateEditor (packages/lexical/src/LexicalUpdates.ts:902:5)
      at LexicalEditor.update (packages/lexical/src/LexicalEditor.ts:746:17)
      at packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:159:20
      at Object.act (node_modules/react/cjs/react.development.js:2510:16)
      at update (packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:158:26)
      at applySelectionInputs (packages/lexical-selection/src/__tests__/utils/index.ts:646:13)
      at Object.<anonymous> (packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:949:33)

Any ideas whether it is fixable and how to set it up?

@thegreatercurve I'm having some issues with various events not being available in the unit tests. I guess this is down to the testing environment in Jest and what's exposed by the jsdom-environment?
 LexicalSelection tests › Paste text, move selection and delete word forward (#129)

    ReferenceError: ClipboardEvent is not defined

      381 |     const selection = $getSelection();
      382 |     const clipboardData =
    > 383 |       event instanceof ClipboardEvent ? event.clipboardData : null;
          |                        ^
      384 |     if (
      385 |       clipboardData != null &&
      386 |       ($isRangeSelection(selection) || $isGridSelection(selection))

      at packages/lexical-rich-text/src/index.ts:383:24
      at processNestedUpdates (packages/lexical/src/LexicalUpdates.ts:738:7)
      at beginUpdate (packages/lexical/src/LexicalUpdates.ts:796:22)
      at updateEditor (packages/lexical/src/LexicalUpdates.ts:902:5)
      at LexicalEditor.update (packages/lexical/src/LexicalEditor.ts:746:17)
      at packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:159:20
      at Object.act (node_modules/react/cjs/react.development.js:2510:16)
      at update (packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:158:26)
      at applySelectionInputs (packages/lexical-selection/src/__tests__/utils/index.ts:646:13)
      at Object.<anonymous> (packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx:949:33)

Any ideas whether it is fixable and how to set it up?

Interesting.
I think this might be a bug within Jest or JSDOM. From a quick experiment, it works the other way around if you do the check as event instanceof KeyboardEvent ? null : event.clipboardData;.
That should be enough to overcome the CI issues.

Closed by #2537


nhost init --remote does not pull down settings set in nhost console/dashboard

Describe the bug
The nhost/config.yaml file does not reflect the settings set via the nhost console/dashboard.
For example, if I have Require Verified Emails unchecked (aka, set to False), the config.yaml file will indicate that setting as being set to True.
To Reproduce
Steps to reproduce the behavior:

In an nhost project dashboard, go to Settings -> Sign-In Methods -> Email and Password
Make sure Require Verified Emails is unchecked
Open a terminal from the directory where the local instance/development of the project altered in Step 1 is kept
Make sure nhost/ and .nhost/ directories have been removed from the project directory
Run nhost init --remote
Select the nhost project that was altered in Step 1
Check the new nhost/config.yaml file

signin_email_verified_required will be set to True instead of the expected False

Expected behavior
nhost init --remote produces a config.yaml file that reflects the state of the nhost dashboard
Screenshots
N/A
Desktop (please complete the following information):

OS: Ubuntu
Browser Brave
Version 1.45.127

Smartphone (please complete the following information):
N/A
Additional context
nhost cli information : Nhost CLI v0.9.4 for linux-amd64

This isn't currently supported but [good timing] we will be announcing something related to this very soon.

Sorry for the late response but this is already supported.


Unknown identifier error in Baystation

Applies to Baystation.
Error:
Error OD0404 at code/modules/mob/gender.dm:13:32: Unknown identifier "by_key"
Code:
/hook/startup/proc/populate_gender_datum_list()
	for(var/type in subtypesof(/datum/gender))
		var/datum/gender/G = new type
		GLOB.gender_datums[G.key] = G
		if(!G.formal_term)
			G.formal_term = G.key

		var/datum/pronouns/P = GLOB.pronouns.by_key[G.default_pronouns] // This is the error
		GLOB.pronouns_from_gender[G.key] = P
		GLOB.pronouns_from_gender[G] = P

	return 1

The var is declared here:
/datum/pronouns_manager
	var/static/list/datum/pronouns/instances = list()
	var/static/list/datum/pronouns/by_key = list()

/datum/pronouns_manager/New()
	instances.Cut()
	by_key.Cut()
	for (var/datum/pronouns/pronouns as anything in subtypesof(/datum/pronouns))
		pronouns = new pronouns
		instances += pronouns
		by_key[pronouns.key] = pronouns

GLOBAL_DATUM_INIT(pronouns, /datum/pronouns_manager, new)

At first I assumed this was an issue with by_key being declared later in compilation order, but moving that code to the start didn't resolve the issue. I'm not really sure what the cause is here.

If you want to reproduce without compiling baystation, here is the minimum necessary code:
/datum/globals
	var/static/atom/movable/clickable_stat/__stat_line
var/global/datum/globals/GLOB

#define GLOBAL_INIT(X, V) \
/datum/globals/proc/GI_I_##X() { \
	var/static/done; \
	if (done) { \
		world.log << ("GLOB.GI_I_[#X] ran >1 time"); \
		return; \
	} \
	done = TRUE; \
	##X = V; \
}

#define GLOBAL_DATUM(X, P) /datum/globals/var/static##P/##X;
#define GLOBAL_DATUM_INIT(X, P, V) GLOBAL_DATUM(X, P) GLOBAL_INIT(X, V)

/datum/gender
	var/key

/datum/pronouns
	var/key

/datum/pronouns_manager
	var/static/list/datum/pronouns/instances = list()
	var/static/list/datum/pronouns/by_key = list()

/datum/pronouns_manager/New()
	instances.Cut()
	by_key.Cut()
	for (var/datum/pronouns/pronouns as anything in typesof(/datum/pronouns))
		pronouns = new pronouns
		instances += pronouns
		by_key[pronouns.key] = pronouns

GLOBAL_DATUM_INIT(pronouns, /datum/pronouns_manager, new)

/hook/startup/proc/populate_gender_datum_list()
	for(var/type in typesof(/datum/gender))
		var/datum/gender/G = new type

		var/datum/pronouns/P = GLOB.pronouns.by_key[G.default_pronouns] // This is the error
		GLOB.pronouns_from_gender[G.key] = P
		GLOB.pronouns_from_gender[G] = P

	return 1


[#noissue] Add class exclude for code coverage

Codecov Report

Merging #7972 (ef17ae2) into master (bea4d62) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #7972      +/-   ##
============================================
- Coverage     30.64%   30.61%   -0.03%
+ Complexity    11261    11257       -4
============================================
  Files          3277     3277
  Lines        117243   117243
  Branches      16183    16183
============================================
- Hits          35926    35898      -28
- Misses        77971    77999      +28
  Partials       3346     3346

Impacted Files
Coverage Δ

.../pinpoint/rpc/packet/stream/StreamClosePacket.java
57.14% <0.00%> (-25.00%)
:arrow_down:

...rp/pinpoint/rpc/packet/ControlHandshakePacket.java
44.82% <0.00%> (-24.14%)
:arrow_down:

...p/pinpoint/rpc/client/WriteFailFutureListener.java
50.00% <0.00%> (-22.23%)
:arrow_down:

...m/navercorp/pinpoint/rpc/client/ConnectFuture.java
70.83% <0.00%> (-8.34%)
:arrow_down:

...vercorp/pinpoint/rpc/packet/ClientClosePacket.java
46.66% <0.00%> (-6.67%)
:arrow_down:

...orp/pinpoint/profiler/sender/NioUDPDataSender.java
62.82% <0.00%> (-5.13%)
:arrow_down:

...tor/metric/datasource/DefaultDataSourceMetric.java
74.19% <0.00%> (-3.23%)
:arrow_down:

...point/rpc/client/DefaultPinpointClientHandler.java
67.24% <0.00%> (-2.42%)
:arrow_down:

...orp/pinpoint/rpc/server/DefaultPinpointServer.java
79.83% <0.00%> (-1.24%)
:arrow_down:

...pinpoint/profiler/monitor/DeadlockMonitorTask.java
22.09% <0.00%> (+1.16%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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


The initial Debian package of farmhash FTBFS on several architectures

All buildlogs can be found here:
https://buildd.debian.org/status/package.php?p=farmhash&suite=experimental
Farmhash failed to build on s390x and mips etc.

The newest commit was successfully built on all architectures that Debian supports.
https://buildd.debian.org/status/package.php?p=farmhash

Thanks!


Add task marking for running more specific tests

Closes #1275
Still need to write tests, but thought I'd let you guys take a look at this implementation before I go too far down that road in case I need to make major changes.
Adds the @mark decorator which allows users to mark tasks, then be picky about what tasks are executed in a test run using the --marks argument.
TaskSets can be marked too, but doing this doesn't actually apply the mark to the TaskSet, but instead to all the tasks defined within that TaskSet (recursively). Then, in order to determine if a TaskSet should be executed, the locust_mark_set property of a TaskSet definition actually collects all the marks of its inner tasks (recursively). This is to avoid executing TaskSets that don't have any appropriately marked tasks, even if there are nested TaskSets.
Let me know what you think!

Interesting! I can see the use for having the ability to run a single tasks, or subsets of tasks, while developing tests. I'm not yet convinced that having a tagging system is the best solution, though I'm also not convinced that it's not. Since it introduces a brand new concept to Locust, and it's (implementation-wise) very entangled to the core functionality of user simulation, it's important that we get it right if we are to implement it. However, I think a PR is a great start to be able to have some actual code to play with when exploring our options.
Here's a non-exhaustive list of my initial thoughts on the concept

Wouldn't it make more sense to call it "tags" instead of "marks"? I feel that tag is more commonly used than mark for these kind of things.

Instead of a --marks/--tags CLI option, there could be two options: --include-tags and --exclude-tags (or perhaps --only-tags if we don't think it's obvious that include implicitly means that everything else is excluded).

How would we handle nested TaskSets? In the following example the user would get stuck only executing taskset_task if started with -m mark1:
class MyTaskSet(TaskSet):
    @task
    @mark("mark1")
    def taskset_task(self):
        print("taskset_task")

    @task
    def stop(self):
        self.interrupt()

class MyUser(User):
    wait_time = constant(0.5)
    tasks = [MyTaskSet]

    @mark("mark1")
    @task
    def task1(self):
        print("task1")

That's because the stop task doesn't have the "mark1" tag, and I imagine that could perhaps be confusing. Though maybe that's okay?

I imagine that there might be other edge cases that could cause problems (though I can't think of any specific from the top of my head right now) since tasks are python callables where end-users could do all sort of crazy stuff :).

Some initial thoughts on the implementation
I think that it should be possible to implement this without having to do the task filtering at "run time". So instead of having to call apply_marks every time a Locust enters a TaskSet, and having to modify get_next_task() we should be able to do one of two options:

Make the get_tasks_from_base_classes function "tag aware" so that it automatically filters out the tasks based on the given include/exclude settings.

Or, maybe even better, just let the @mark/@tag decorator simply populate a tags attribute on the task callable, with no other changes to the locust task execution code in core.py, and then write a function (that we could call from Environment) that goes through the user_classes and simply filters out tasks from all of the computed TaskSet.tasks lists based on the include/exclude criterias.
This could perhaps also have the benefit of making tags/marks into a more general concept that end-users could use within their own custom test code.

These are great points!

* Wouldn't it make more sense to call it "tags" instead of "marks"? I feel that `tag` is more commonly used than `mark` for these kind of things.

I agree. I think the mark was originally suggested because that's what pytest uses, but I think calling it the more commonly used thing will help users understand it

* Instead of a `--marks`/`--tags` CLI option, there could be two options: `--include-tags` and `--exclude-tags` (or perhaps `--only-tags` if we don't think it's obvious that `include` implicitly means that everything else is excluded).

I like this too. I think if we did it this way, exclusion should always win over inclusion. So, if a task is tagged with 'tag1' and 'tag2', and the user ran with --include-tags tag1 --exclude-tags tag2, the task wouldn't execute. This also covers the edge case where users include and exclude the same tag. I think this would warrant its own argument group in argument_parser.

* How would we handle nested TaskSets? In the following example the user would get stuck only executing `taskset_task` if started with `-m mark1`:

I actually thought about this one. I had a few ideas for it, including having special tags that were always included, but this had issues due to how including a TaskSet works and how tagging a TaskSet works. The idea I had that makes the most sense would be to add a @required decorator for tasks/TaskSets. If a task or TaskSet is required, it will always be executed, so long as the TaskSet it belongs to is executed. I think a task or TaskSet being required should win over it being tagged with something excluded.

Make the get_tasks_from_base_classes function "tag aware" so that it automatically filters out the tasks based on the given include/exclude settings.

Or, maybe even better, just let the @mark/@tag decorator simply populate a tags attribute on the task callable, with no other changes to the locust task execution code in core.py, and then write a function (that we could call from Environment) that goes through the user_classes and simply filters out tasks from all of the computed TaskSet.tasks lists based on the include/exclude criterias.

I agree that the latter is probably better than both the former and the current implementation. I actually tried the former when I first picked this up, but I had trouble thinking of a good way for that function to have access to the tags supplied by the command line.
One of the reasons I added the marked_tasks attribute to TaskSets is that I didn't like the idea of the tasks that get excluded being gone from the TaskSet entirely. I could potentially see a user wanting to change the marks applied to the test during the test if they're using locust a library, and not separating tasks from marked_tasks would make it so previously excluded excluded tasks would never be included again. However, I don't think this is a common/valuable enough use case to worry about too much, especially considering there'd probably be a decent workaround by creating a deep copy of the tasks attribute before applying the tags.
I'll start implementing some of this after I get off work probably. Thanks for the feedback!

I think if we did it this way, exclusion should always win over inclusion.

Makes sense!

I think this would warrant its own argument group in argument_parser.

:+1:

I actually thought about this one. I had a few ideas for it, including having special tags that were always included, but this had issues due to how including a TaskSet works and how tagging a TaskSet works. The idea I had that makes the most sense would be to add a @required decorator for tasks/TaskSets. If a task or TaskSet is required, it will always be executed, so long as the TaskSet it belongs to is executed. I think a task or TaskSet being required should win over it being tagged with something excluded.

Having given it some more thoughts, I think the current behaviour where a User could get "stuck" in a TaskSet, if the task(s) calling interrupt() doesn't have the specified tag, is totally fine. People who uses this function should hopefully understand why that could happen, and it would be fairly easy to work-around in your own test scripts by simply adding a required tag to your "stop" tasks and just make sure to include "required" as a -m parameter.
Speaking of the -m parameter, what would we call a short-hand parameter if we're calling the concept "tags" (-t is taken by --stop-timeout)? -i as in "include" perhaps? Should we have a shorthand parameter?

I could potentially see a user wanting to change the marks applied to the test during the test if they're using locust a library, and not separating tasks from marked_tasks would make it so previously excluded tasks would never be included again. However, I don't think this is a common/valuable enough use case to worry about too much

I agree! I imagine that the most common use-case for including and excluding tasks would be to test/exclude certain tasks or sets of tasks while developing the test scripts.

Also, note that the final TaskSet.tasks attribute will contain multiple references to the same tasks and TaskSets, since the following code:
class MyUser(User):
    tasks = {SomeTaskSet:4}
    @task(3)
    def a(self):
        ...
    @task(2):
    def b(self):
       ...

will result in a MyUser.tasks that looks like this:
[SomeTaskSet, SomeTaskSet, SomeTaskSet, SomeTaskSet, a, a, a, b, b]

So a recursive function that filters out tasks needs to remove all references to tasks that should be removed, and keep track of which TaskSets it has already "examined".

Note that I merged #1361 which most likely causes a merge conflict for this branch. So if you're starting a new implementation make sure to pull and merge master first. Sorry about that! I figured it wouldn't be too bad since the new implementation won't be as entangled in core.py (now user/task.py and user/users.py).

No worries! Thanks for the heads up

Speaking of the -m parameter, what would we call a short-hand parameter if we're calling the concept "tags" (-t is taken by --stop-timeout)? -i as in "include" perhaps? Should we have a shorthand parameter?

My gut tells me it would be nice to have shorthand versions since --include-tags and --exclude-tags are both pretty long and I could see it being annoying if somebody was trying to debug something quickly. I think -i and -e could be okay. Maybe it could be --tags and --exclude-tags, and then -T and -E? I'm not really sold on any of this

Maybe it could be --tags and --exclude-tags, and then -T and -E?

Ah, good idea, I think I like that more actually!

Great with some tests! We should also have tests for:

Tagged tasks directly under a User class
Tagged tasks that have a weight > 1 (to make sure the right number of tasks is kept in the filtered tasks list)
A task/TaskSet that is used in multiple User/TaskSet classes (referenced in the tasks list/dict attribute).

I think we could also move the tests into a separate test_tags.py file.


Cannot unmarshal number into Go struct field RequestOrdersV1Response.err-code of type string

Message:
{"op":"req","ts":1598615344364,"topic":"orders.list","err-code":10021,"cid":"","err-msg":"req orders.list query error:Please enter a valid account-id."}
RequestOrdersV1Response.ErrCode field must be integer.

@filinvadim thanks for your feedback, it is fixed in latest master branch.
Reminder: the websocket v1 will be obsolete, it is suggest you use websocket v2.


Death notifs: TOA safe deaths

Currently, all TOA deaths trigger the discord notification, even the safe deaths with the "Ignore Safe Deaths" setting toggled on.
My suggestion is to have this only cause the event when you've run out of lives. If the issue concerns how to know which one is safe, have the screenshot taken on death but wait for the "You failed to survive the Tombs of Amascut." message before actually sending the notification.

Y'all are amazing, thank you 🙏


Cannot query s3 data from datafusion-cli

Describe the bug
When following steps from user guide for cli:
https://github.com/apache/arrow-datafusion/blob/fc669d5892954cbd2612a272314785758a7cb176/docs/source/user-guide/cli.md?plain=1#L154-L187
Cannot create a table as it states.
To Reproduce
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_ACCESS_KEY_ID=****************
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_SECRET_ACCESS_KEY=****************
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_REGION=ap-southeast-2
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `/media/jeffrey/1tb_860evo_ssd/.cargo_target_cache/debug/datafusion-cli`
DataFusion CLI v14.0.0
❯ create external table test stored as parquet location 's3://tremendous-orange-fork/customer/part-0.parquet';
Execution("Generic S3 error: Missing region")
❯

Expected behavior
Be able to create a table from s3 and query it, per instructions in the user doc.
Additional context
User doc also states that AWS_REGION must be set as per:
https://github.com/apache/arrow-datafusion/blob/fc669d5892954cbd2612a272314785758a7cb176/docs/source/user-guide/cli.md?plain=1#L162-L164
However it seems this issue https://github.com/apache/arrow-rs/issues/2795 has been resolved and the fix merged a while back, and attempting the above steps without an AWS_REGION env var set still results in same error. Unsure whether user doc is wrong or there is another bug relating to AWS_REGION?
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_ACCESS_KEY_ID=****************
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_SECRET_ACCESS_KEY=****************
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ export AWS_REGION=
jeffrey:~/Code/arrow-datafusion/datafusion-cli$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `/media/jeffrey/1tb_860evo_ssd/.cargo_target_cache/debug/datafusion-cli`
DataFusion CLI v14.0.0
❯ create external table test stored as parquet location 's3://tremendous-orange-fork/customer/part-0.parquet';
Execution("Generic S3 error: Missing region")
❯

The region is specified via AWS_DEFAULT_REGION  environment variable.


feat: add job to create namespaces post install

What was changed
Add a kubernetes job to create namespaces post-install
Why?
Makes environments easier to setup and deployments replicable
Checklist

Closes

How was this tested:
Used it to create replicable deployment in my organization

Any docs updates needed?

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

appreciate this PR, but unfortunately is off topic for the goals of this repo. However, we're trying to preserve the modifications people make for others to find, so have added an Alternative label that we'll be promoting more in coming months as we curate good modifications.


Fix code scanning alert - Inclusion of functionality from an untrusted source

Tracking issue for:

[ ] https://github.com/Astraxx04/LearnZ/security/code-scanning/7

@ahmedfadil You didnt link this with the last PR. Close this issue if you forgot to link else leave it for now.


more colors for Pie Charts

If you have a Pie Chart with more than 5 series the one above number 5 will all be in the same color so you can't see a difference any more.

Thank you very much for adding more colors.

@gionkunz is there any way we can expand Chartist's color palette to ~8 colors? 4 is fine for line charts, but not for bar charts and pie charts where there are very frequently more than 4 pieces of data.

Just add more colors in your Sass settings file. If you import your own copy of the Sass settings file and change this line https://github.com/gionkunz/chartist-js/blob/develop/src/styles/settings/_chartist-settings.scss#L65 you can add as many colors as you like.

@gionkunz it is nice that we can customize it, but what is the weight in adding 2-4 more colors?

Hey there. We already track this in the ticket #124 . I'll close this ticket now and we can track the creation of more colors in the default settings in the other ticket.

Sorry this ticket was already closed ;-)

@gionkunz I thought that issue was somewhat related to functionality. I'll follow there.

here is the solution.. you just have to copy the relevant classes to your chart type from and apply your custom colors to that chart strokes. like I have done for donut.
.ct-chart .ct-series.ct-series-a .ct-slice.ct-donut {
	    stroke: #002827
	}
	.ct-chart .ct-series.ct-series-b .ct-slice.ct-donut {
	    stroke: #00382f
	}
	.ct-chart .ct-series.ct-series-c .ct-slice.ct-donut {
	    stroke: #00591e
	}
	.ct-chart .ct-series.ct-series-d .ct-slice.ct-donut {
	    stroke: #007f00
	}
	.ct-chart .ct-series.ct-series-e .ct-slice.ct-donut {
	    stroke: #009900
	}
	.ct-chart .ct-series.ct-series-f .ct-slice.ct-donut {
	    stroke: #00b200
	}
	.ct-chart .ct-series.ct-series-g .ct-slice.ct-donut {
	    stroke: #51ce00
	}
	.ct-chart .ct-series.ct-series-h .ct-slice.ct-donut {
	    stroke: #96ff00
	}
	.ct-chart .ct-series.ct-series-i .ct-slice.ct-donut {
	    stroke: #ceff00
	}

check this JSBin http://jsbin.com/cecaha/1/edit?css,output

@snickers54  thanks very much. You saved my day.

I will apply className: "myclass1" in my js.
But what is css property for custom pie color? background-color? Dont works!

app.title = '环形图';
option = {
tooltip: {
trigger: 'item',
formatter: "{b} {c} ({d}%)"
},
legend: {
orient: 'vertical',
x: 'left',
data:['1','2','3','4','5']
},
series: [
{
name:[1,2,3,4,5],
type:'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: true,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{value:335, name:'1'},
{value:310, name:'2'},
{value:234, name:'3'},
{value:135, name:'4'},
{value:154, name:'5'}
]
}
],
color:["#ffcccc", "#ccd9ff", "#000099", "#bd0f66","	#cc0000"]
};

I will apply className: "myclass1" in my js.
But what is css property for custom pie color? background-color? Dont works!

Hi. Svg elements uses fill: not background-color:


Internal server error when trying to use trusted network authentication

Home Assistant release with the issue:
0.84.6
Operating environment (Hass.io/Docker/Windows/etc.):
Linux, HASS installed using pip
Component/platform:
http
Description of problem:
I am trying to use Home Assistant in a CI environment. This means that logging in manually and creating bearer tokens is not feasible. So I tried using the trusted network authentication. I try to use the API with the following command:
curl -X GET -v 'http://localhost:18123/api/states'

I get an Internal Server Error, and there is a Python exception in hass.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
homeassistant:
    name: test
    auth_providers:
        - type: trusted_networks

http:
    server_port: 18123
    trusted_networks:
        - <IP_ADDRESS>

api:

websocket_api:

Traceback (if applicable):
Traceback (most recent call last):
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
    resp = await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
    return await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 66, in staticresource_middleware
    return await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 67, in ban_middleware
    return await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 99, in auth_middleware
    return await handler(request)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 115, in handle
    result = handler(request, **request.match_info)
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/homeassistant/components/api.py", line 194, in get
    user = request['hass_user']
  File "/home/petersohn/workspace/home-assistant-config/custom/homeassistant/lib/python3.6/site-packages/aiohttp/web_request.py", line 201, in __getitem__
    return self._state[key]
KeyError: 'hass_user'

Additional information:

The Auth API changed recently. From the doc regarding trusted network authentification:

The Trusted Networks auth provider defines a range of IP addresses for which no authentication will be required (also known as “whitelisting”). For example, you can whitelist your local network so you won’t be prompted for a password if you access Home Assistant from inside your home.

When you log in from one of these networks, you will be asked which user account to use and won’t need to enter a password.

So from a trusted network you'll still need to provide a user account (thus the KeyError: 'hass_user'). I couldn't find a way to provide a user in the doc so I used a "Long-lived access token" (see https://developers.home-assistant.io/docs/en/auth_api.html#making-authenticated-requests ) to get around this issue.
Updating the documentation on how to provide a user for a request from a trusted network would help.

Whatever the cause, an Internal Server Error is a wrong response. The server should reply with a meaningful error message, not an exception.


trueseeing: init at 2.1.4

Description of changes
Non-decompiling Android vulnerability scanner
https://github.com/alterakey/trueseeing
Related to https://github.com/NixOS/nixpkgs/issues/81418

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 171653 run on x86_64-linux 1

1 package built:

trueseeing


FOSSDEM Video Link

If this is the code used with the FOSSDEM presentation, can you please add the video link for others to see what you can do.
https://fosdem.org/2021/schedule/event/geopandasholoviews/

Thanks Guido! I've added the link to the readme.


docs: update README.md Ios configuration

Updated the instruction to configure IOS icons
I had to set this up for my App and found out that following the previous instructions did not work.
It is also much simpler to do it this way.
Maybe I'm omitting a use case where it is necessary to use the info.plist, but I think it should work fine with this method.
See this video https://www.youtube.com/watch?v=AT89ofYpWTU

This is great!. Much easier than messing with Info.plist.

@all-contributors please add @hadouin for doc


Fix/new api schema changes

Note: You can Ignore /client/operations/* and /models/* directory while reviewing as they are boilerplate codes generated by go-swagger.

The cluster creates which is good, but I did get this:
pgedge_cluster.main: Still creating... [2m40s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to pgedge_cluster.main, provider "provider["registry.terraform.io/pgedge/pgedge"]" produced an unexpected new value:
│ .firewall_rules[0].name: was null, but now cty.StringVal("").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to pgedge_cluster.main, provider "provider["registry.terraform.io/pgedge/pgedge"]" produced an unexpected new value:
│ .firewall_rules[1].name: was null, but now cty.StringVal("").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

I fixed that and simplified some things for now. Some commented out attributes we can add back in after more testing.


Allow the EventData body to be created and retrieved as a string

Summary
The body of an event is currently represented by a read-only set of bytes in memory and accessible only in this form.  In order to offer greater convenience for transporting types that have been serialized to a string format (JSON, XML), and improved interoperability with other client libraries that prefer to operate on string data, it would be helpful to expose the EventData.Body as a string during creation and when accessing the data.
Scope of Work

Discuss the design for members and naming with the .NET architect and the feature team; adjusting as needed to reach consensus and sign-off.

Overload the constructor for EventData with a form that takes a string body and assumes UTF-8 encoding.  This constructor assumes responsibility for converting the string to ReadOnlyMemory<byte>.

Overload the constructor for EventData with a form that takes a string body and System.Text.Encoding instance.  This constructor assumes responsibility for converting the string to ReadOnlyMemory<byte>.

Introduce a BodyAsString method that takes no parameters and assumes UTF-8 encoding.  This method assumes responsibility for converting the event body to a string.

Introduce a BodyAsString overload that takes a System.Text.Encoding parameter.  This method assumes responsibility for converting the event body to a string.

Tests have been added to cover the new method and ensure its functionality.

Out of Scope

Updates or changes to samples; these will be covered under a dedicated workstream.

Example Skeleton
Note: This skeleton is intended for illustration only and has not yet been reviewed and approved by the feature team or architecture board.
public class EventData
{
    // New constructors
    public EventData(string eventBody);
    public EventData(string eventBody, Encoding bodyEncoding);

    // New Members
    public string BodyAsString { get; }
    public string GetBodyAsString(Encoding bodyEncoding);

    // Existing constructors
    public EventData(ReadOnlyMemory<byte> eventBody);

    protected EventData(
        ReadOnlyMemory<byte> eventBody,
        IDictionary<string, object> properties = null,
        IReadOnlyDictionary<string, object> systemProperties = null,
        long? sequenceNumber = default,
        long? offset = default,
        DateTimeOffset? enqueuedTime = default,
        string partitionKey = null);

    // Existing members
    public ReadOnlyMemory<byte> Body { get; }
    public Stream BodyAsStream { get; }
    public DateTimeOffset EnqueuedTime { get; }
    public long Offset { get; }
    public string PartitionKey { get; }
    public IDictionary<string, object> Properties { get; }
    public long SequenceNumber { get; }
    public IReadOnlyDictionary<string, object> SystemProperties { get; }
}

Success Criteria

The additional members for EventData detailed by the scope has been created.

The tests necessary for their validation have been created and pass reliably.

The existing test suite continues to produce deterministic results and pass reliably.

This looks like something that can be related to Service Registry requirement to serialize strongly typed objects.
If we even invent EventData and EventBatch for those cases we might reuse it for the case where T is a string.
cc @KrzysztofCwalina

Agreed.   That's something that has to be balanced, as well as considered against the existing BodyAsStream member.    For context, this came out of a conversation with @KrzysztofCwalina and @JoshLove-msft regarding the same feature within Service Bus, which will also be a case where we'll want to plug in serialization support.

Agreed. That's something that has to be balanced, as well as considered against the existing BodyAsStream member. For context, this came out of a conversation with @KrzysztofCwalina and @JoshLove-msft regarding the same feature within Service Bus, which will also be a case where we'll want to plug in serialization support.

Would we still want to expose BodyAsString as a convenience if even if there was generic support, or does the generic parameter become required in which case it would be redundant?
In ServiceBus, we don't have the BodyAsStream member.

I can see it either way, honestly.   String is primitive enough that I can see it as complimentary to a full-on object serializer and part of me thinks that it would be strange to have a full serializer abstraction to just do string => byte[] serialization.    However, I can also see the case for one consistent method for translation that doesn't care what the surrounding context is.
I'd like to think on it a bit and come up with some API shapes/examples for discussion and see where we stand.

public string BodyAsString { get; }
public string GetBodyAsString(Encoding bodyEncoding);

Not sure how I feel about this asymmetry, though I do see it lines up with the existing BodyAsStream. My concern is that the ability to pass in encoding may not be fully discoverable.
What about having an optional parameter:
public string GetBodyAsString(Encoding encoding = default);
public EventData(string eventBody, Encoding encoding = default);

Not sure how I feel about this asymmetry, though I do see it lines up with the existing BodyAsStream. My concern is that the ability to pass in encoding may not be fully discoverable.

I know exactly how I feel bout it...  I hate it.   But, there's already a BodyAsStream property in Event Hubs which gives us an imbalance whichever way we go.   Service Bus still has the flexibility to go with only methods, which is much cleaner once we start talking parameters.
This problem does go if we consider making this EventData<T> where T is string and have some kind of serializer in place to do the byte translation, which maps back to Pavel's thought.


YARN-7499. Application page layout changes

IA changes to YARN application page

Quicklinks menu

Settings menu

Changes to Applications page layout

Fetch yarn-app details at the parent route

Yarn applications page layout change

render application master info links

Fixes issue with service param

Render quicklinks on services page

Implement start/stop service

style fixes inside application body

Committed to trunk with sha id 641ba5c7a1471f8d799b1f919cd41daffb9da84e


reason: 'unkown' misspelled

When you added the reason key, the value for unknown is misspelled.

Thank you @Evaneaston for pointing to it.
Fixed in https://github.com/Atinux/schema-inspector/releases/tag/v1.6.8


WagtailPageTests Error

In the wagtail.tests.utils.WagtailPageTests class the assertCanCreate method errors when setting the data parameter to an empty dictionary. e.g. self.assertCanCreate(HomePage, AboutUs,{}) throws the following error:
Traceback (most recent call last):
  File "/Users/openstax/workspace/openstax-cms/pages/tests/tests.py", line 76, in test_class_setup
    self.assertCanCreate(HomePage, AboutUs,{})
  File "/Users/openstax/workspace/openstax-cms/venv/lib/python3.5/site-packages/wagtail/tests/utils.py", line 106, in assertCanCreate
    self.assertCanCreateAt(parent.specific_class, child_model)
  File "/Users/openstax/workspace/openstax-cms/venv/lib/python3.5/site-packages/wagtail/tests/utils.py", line 79, in assertCanCreateAt
    if not self._testCanCreateAt(parent_model, child_model):
  File "/Users/openstax/workspace/openstax-cms/venv/lib/python3.5/site-packages/wagtail/tests/utils.py", line 71, in _testCanCreateAt
    return child_model in parent_model.allowed_subpage_models()
AttributeError: 'cached_property' object has no attribute 'allowed_subpage_models'

You need to pass a page instance as the first argument to assertCanCreate(), not a page model. The documentation for assertCanCreate has an example. You might be able to fix this by doing something like:
def test_create_about_us(self):
    homepage = HomePage.objects.first()
    self.assertCanCreate(homepage, AboutUs, {})

I tried something like that but it would then throw a
Traceback (most recent call last):
  File "/Users/openstax/workspace/openstax-cms/pages/tests/tests.py", line 82, in test_class_setup
    self.assertCanCreate(homepage, AboutUs, {})
  File "/Users/openstax/workspace/openstax-cms/venv/lib/python3.5/site-packages/wagtail/tests/utils.py", line 106, in assertCanCreate
    self.assertCanCreateAt(parent.specific_class, child_model)
AttributeError: 'NoneType' object has no attribute 'specific_class'

Perhaps the classes are not constructed properly?

So the HomePage.objects.first() returns a None type.  Is there a convenient way to create these object from the testing framework?

Hi @rich-hart - please use the Wagtail Google group for support queries.

ok


Mistake in migration guide?

The migration guide in the readme states that for AddOSInstallationID (on mac) the equivalent in v6+ should be AddSystemDriveSerialNumber but - looking at the v5 & v6 implementations I think the README should state the equivalent is actually AddPlatformSerialNumber.
AddOSInstallationID v5:
https://github.com/MatthewKing/DeviceId/blob/fd2fb79be80cbb3130d3df94e2ceed4d03514132/src/DeviceId/DeviceIdBuilderExtensions.cs#L186-L189
AddPlatformSerialNumber v6:
https://github.com/MatthewKing/DeviceId/blob/814e752699071e756cf0b1db55252367cd60675b/src/DeviceId.Mac/MacDeviceIdBuilderExtensions.cs#L28
The commands executed are identical between these two (and not in AddSystemDriveSerialNumber)

Also, did the default formatter change in v6+?
If I do the following in v5 and v6:
Using the ExampleCustomFormatter from here
Console.WriteLine(new DeviceIdBuilder().AddOSInstallationID().UseFormatter(new ExampleCustomFormatter()));
Console.WriteLine(new DeviceIdBuilder().AddSystemDriveSerialNumber().UseFormatter(new ExampleCustomFormatter()));
Console.WriteLine(new DeviceIdBuilder().AddOSInstallationID().AddSystemDriveSerialNumber());

I get essentially (values simplified because I don't want to find and copy down the actual values):
v5:

"A"
"B"
"C"

v6:

"A"
"B"
"D"

So the raw value is getting retrieved the same between v5 & v6 but the default formatter must have changed. If this is the case, I would suggest adding it to the migration guide (as I don't see anything about it on there).

Thanks, I'll need to have a look at the migration guide to double-check everything.
The default formatter did change in V6. This is mentioned in the formatting section but not in the migration guide. I'll add it to the migration guide as well when I get some time.


Allow worker_threads/forked child_processes/etc to use the 'vscode' module.

As it stands, if you want to use additional threads to perform tasks simultaneously, they cannot use or require() any files or functions in the VSCode Extension API. This can render a lot of your project useless, and feels very unintuitive.
Is there a way to allow forked processes/new threads to access the Extension API, or at least have it redirect to the data in the main thread?
My use case is an extension for modding Baldur's Gate 3- most things are pretty fast, but if I want to unpack a batch of mod files, they can get pretty big and take a lot of time to unpack. I'd love to be able to spin up a couple extra threads and work on each one individually with data and variables that the extension has already gathered, instead of going through each file and removing references to 'vscode' or figuring out janky ways of crystallizing the data needed and having the new processes parse it without any functionality from the Extension API.
Thank you for your time!

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
Happy Coding!

This unfortunately cannot be done because vscode is not a module but an instantiated object that's deeply connected with the internal of the extension host process. We just make it appear as module but it is nothing that can just be used and exposing it (or something similar) as module to workers or processes would require a special bootstrapping step which lives inside the respective context. LSP, while flavored to language features, is in a way doing this and you might wanna take inspiration from there


Rename the package

One of my team members accidentally installed your package while trying to install angular resource (with bower) and i spent over 5 hours tearing my hair off not knowing why it wouldnt work until i checked the readme.

Sorry about the confusion.
Unfortunately, I don't think that renaming the package would solve the root cause of the confusion.

Met the same problem.
Plus more: you put angular-mocks in dependencies instead of devDependencies, so bower just installed it, and then gulp pack those things in vendor.
Guess what?  Now we have angular-mocks in production release!

@Alex-Hou , I've moved the angular-mocks into into devDependencies.

@chemisus Much appreciated.
And sorry for the offensive words.


[Custom Shortcuts] nav.toggleOverview() does only toggle once

Describe the bug
When mapping a key to use nav.toggleOverview(), the overview is only toggled once.
Shortcut file:
import { defineShortcutsSetup, NavOperations } from '@slidev/types'

export default defineShortcutsSetup((nav: NavOperations) => {
  return [
    {
      key: 'Escape',
      fn: () => nav.toggleOverview(),
    }
  ]
})

To Reproduce
Steps to reproduce the behavior:

Create a new slidev project
Setup your setup/shortcuts.ts file as shown above.
Start slidev
Push ESC. You see the open overview now.
Push ESC again. It is still open.

Desktop (please complete the following information):

OS: macOS
Browser: Chrome and FF, both show the issue
Slidev version: v.0.30.2

Because there is a conflict with Escape.
Principle
https://github.com/slidevjs/slidev/blob/8d0ae82274b3528cf3bc122b0ad90110c19a0eb9/packages/client/logic/shortcuts.ts#L65
When you press the Escape, it is executed in the following order:

overview is NOT opened (showOverview is false).

Execute your custom shortcut to open it (Make showOverview to true)

overview is opened (showOverview is true).

Execute the method posted above, it will close overview (Make showOverview to false)
Then execute your custom shortcut to open it (Make showOverview to true)

This is why situations like yours happen.
Conclusion
You can't use Escape as overview open/close shortcut right now.

Oh! I somehow overread that part of the built-in shortcuts 😲
Thanks for the detailed info @WingLim  👍
An "easy" workaround regarding this issue could be the alteration of the built-in shortcut so it toggles instead of just closing the overview, right? 🤔

Yep, but I think slidev will not change the Escape shortcut for overview.
Escape for closing something is consistent with human intuition。

Yep, but I think slidev will not change the Escape shortcut for overview. Escape for closing something is consistent with human intuition.

Absolutely! But on the other hand, reveal.js is also using ESC for opening/closing the overview.
I'm fine with either of the possible behaviors though ☺


Map request: Hungary

Hey, can you add a map for Hungary?

Sorry, i see the map doesn't exit for jvectormap.


Add Jasleen Sondhi to Contributors list

Added my name to contributor.js !
This is my Hacktoberfest 2021 submission :)

Hey @jasleen101010
Thank you for your contribution, and congrats on the PR! Good luck with your Hacktoberfest contributions :smile:


In CUDA 8.0 the native compatibility mode has been discon…

…tinued. Default to padding mode instead.  I'm not sure if this is the best default mode and am open to suggestions, but it seems that anything is better than defaulting to native mode.  More info here:
https://devtalk.nvidia.com/default/topic/896719/apparently-bug-in-cufft-of-cuda-7-5-with-deprecated-native-compatibility/

This will be disruptive change for people who are currently using the defaults.
I don't know how concerned we are about that but one way to do this would be to use Base.depwarn to deprecate :native when CUDA 7.5  is used and to throw an error with explanation on CUDA 8.0.
The release after that could then change the defaults.

That makes sense. Is there a way to make the depwarn kick in only when the
user doesn't override the default?
I admit that I didn't read up on the technical differences between the two
modes, but I notice that in my application the padding mode gives the same
numerical results as native mode did in older CUDA versions, so I had hoped
it wouldn't be too disruptive.
On Mar 27, 2017 10:13 AM, "Valentin Churavy"<EMAIL_ADDRESS>wrote:

This will be disruptive change for people who are currently using the
defaults.
I don't know how concerned we are about that but one way to do this would
be to use Base.depwarn to deprecate :native when CUDA 7.5 is used and to
throw an error with explanation on CUDA 8.0.
The release after that could then change the defaults.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/JuliaGPU/CUFFT.jl/pull/6#issuecomment-289359412, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AE78hHRKJn1ydCb6ylc1QOf0wBO21Kbdks5rp018gaJpZM4Mpm5V
.

I would say given the fact that the default is broken since CUDA 7.0 we can merge this as is.
@timholy Is that fine by you?


Prevent loading all GH data on reset

The way this was setup, when running build or serve with --watch, inspect was called and was forcing everything to load. This could cause a very large number of API calls to GitHub. With these changes GitHubMetadata will no longer trigger all of those calls on reset.
The other scenario where a bunch of calls were being forced to be made was when putting the github key with any sub-keys in _config.yml. This went through every key in GitHubMetadata and loaded it, once again potentially making a very large number of calls. These changes take care of this scenario as well.
I was running into this problem when trying to make changes to a theme using this. Every time I ran tests on the theme it would incur a bunch of API calls and I would quickly get a rate limit error and have to wait some time for it to go away. I saw this was originally brought up as a problem in #237, there was a fix but it didn't totally fix it so this bug was brought up again in #242. I hope these changes are acceptable because it would be really nice to get rid of this problem.
Let me know if there is anything else I can do to help fix this!

Hello! Has anyone had a chance to take a look at this?
@parkr I see you have historically been the one to work on this repo...my apologies in advance if you no longer do!

Running the tests. This LGTM otherwise.
In your tests locally, it prevents the issue?

@parkr Yep, when running jekyll serve --verbose I can see from the Github Metadata log message it is only loading things that are actually used. And this is true when there are github variables set in _config.yml and also when the page is regenerated after it detects a change.

Sure I'd be happy to add a test. I'm not sure how to test this though? What did you have in mind?

Thanks for jumping through these hoops, a test will be really helpful if we can set it up properly. I'd want to:

Run site.process once on the fixture site
Assert that each API call happens, and that it happens once (or the proper # of times)
Run site.process a second time, asserting that no more API calls occur.

I'm not very familiar with ruby testing and I can't find anything similar to what you're asking in other tests to use as a kind of guide. I can try to put something together but I really don't know how to make a test to do this. Would this test go in site_github_munger_spec.rb? I think it needs its own context? How do I go about intercepting API calls to count them?

Run process twice and use expect_api_call time ensure things are called once. https://github.com/jekyll/github-metadata/blob/main/spec/spec_helpers/web_mock_helper.rb
I'm on mobile now but can take a closer look soon!

Okay made some good progress!
I realized that the tests you were describing weren't going to completely test this new functionality because the point of this isn't to make sure API calls only happen once. That was already happening, so that is useful to test but not the whole picture. The point of these changes was to make sure we don't load everything just because github was used in _config.yml or reset is triggered while jekyll serve is running.
So in this new commit I:

Create a new fixture site that only uses a few site.github attributes
Process the site and check that those endpoints are loaded once
Process the site again and check that those endpoints are still only loaded once
Using a new web_mock_helper.rb function, not_expect_api_call, we check to make sure other endpoints that should not have been called are not called

Let me know what you think.

@parkr I made those changes! I also added another fixture site, this time it is the rendered version of the new fixture site. I used it for checking if the rendered site is correct.

@jekyllbot: merge +minor
(I'm going minor here as a reminder to bump the minor version. It's a bug fix in a way but it's also a slight change in behavior that folks might find surprising.)

Awesome! Thanks @parkr and @ashmaroli for helping with and reviewing this! And for all that you do for Jekyll ❤

Thanks for working through this with us!


Implement tooltip

Signed-off-by: Tom Ladendorf<EMAIL_ADDRESS>

@tladendo We already have Tooltip component implemented in react components repo. Is there something which does not justify the current requirements you have for challenge listings?
cc: @ajefts


Starting a new project returns a 404 on main.css

Ionic version:  (check one with "x")
[x] 3.5.3
I'm submitting a ...  (check one with "x")
[x] bug report
Current behavior:

I created a blank project using ionic start app blank. When I load the project using ionic lab or ionic serve I am getting an 404 for main.css in the console
(index):32 GET http://localhost:8100/build/main.css

Steps to reproduce:

Start a new blank project and load the project.
Other information:
ionic info

global packages:

    @ionic/cli-utils : 1.5.0
    Ionic CLI        : 3.5.0

local packages:

    @ionic/app-scripts              : 2.0.2
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Ionic Framework                 : ionic-angular 3.5.3

System:

    Node       : v8.1.2
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.3.0

yeah , I just started seeing this issue now ,
here is more details on the error !
Your current PostCSS version is 5.2.17, but autoprefixer uses 6.0.8. Perhaps thi s is the source of the error below. [12:08:02]  ionic-app-script task: "build" [12:08:02]  TypeError: Path must be a string. Received undefined TypeError: Path must be a string. Received undefined     at assertPath (path.js:7:11)     at Object.resolve (path.js:186:7)     at eachParent (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\inde x.js:65:18)     at getStat (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\index.j s:79:12)     at browserslist (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\in dex.js:188:15)     at Browsers.parse (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\ lib\browsers.js:61:16)     at new Browsers (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\li b\browsers.js:52:30)     at loadPrefixes (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\li b\autoprefixer.js:67:24)     at plugin (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\lib\auto prefixer.js:78:24)     at LazyResult.run (C:\Users\Abanoub\Desktop\myApp\node_modules\@ionic\app-sc ripts\node_modules\postcss\lib\lazy-result.js:274:20)

You need to downgrade ionic/app-scripts to version 1.3.7 for now. (rm -rf node_modules first)
Some issue with autoprefixer npm update overnight

This is caused by the issue referenced here #12441

Could you please update the issue title to something related to the actual error ?
Something with "Your current PostCSS version is 5.2.17, but autoprefixer uses 6.0.8. Perhaps thi s is the source of the error below"

@ravindranrahul I am a newbie, I removed the node_modules dir, changed the version of app-scripts in package.jsonfrom 2.0.2 to 1.3.7, and did ionic serve but the installed version is still 2.0.2
So what should i do?

Never mind, I did npm install<EMAIL_ADDRESS>--save-dev and it worked

Please upgrade back to the latest version of app-scripts. There was a dependency that was broken that has been fixed. Delete your node modules folder and reinstall.

If it still does not work, you need to re-add your platform:
cordova platform rm ios
cordova platform add ios


No client activities?

With the "Activities" tab selected, on the left I have "Event stream" and on the right "Traces". Where are the "Client activities"? Have they been removed? I want to see the View/DOM creation/destruction times.

I've lost this too ! That was one of the best bits of Kadira Debug. Please fix soon.


Zipkin UI logsUrl does not support multiple occurrence of {traceId}

Describe the Bug
I am trying to link Kibana in Zipkin UI (Lens). The button is shown correctly. {traceId} are not replaced in the URL.
I tried with simple URL with multiple occurence of {traceId}. It is able to replace the first occurence of {traceId}.
Steps to Reproduce
zipkin.ui.logs-url=https://kibana.company.com/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'ca487de6-0028-4e74-b14b-65eddbcf1f5a',key:Trace_ID,negate:!f,params:(query:'{traceId}'),type:phrase,value:'{traceId}'),query:(match:(Trace_ID:(query:'{traceId}',type:phrase))))),index:'ca487de6-0028-4e74-b14b-65eddbcf1f5a',interval:auto,query:(language:kuery,query:''),sort:!('@timestamp',desc))
Expected Behaviour
Zipkin UI should able to replace multiple occurence of {traceId}.

Thanks for the report, will fix it!


Fix bug: change tab to inventory when banking

Description

Added a bus event listener to handle tab changes - bus.$on('show-sidebar', tabNumber). This should make any other future tab changes easier to handle as well.
In this case specifically, when the bank is displayed (the component is mounted), it emits an event with the inventory slot number.
Related Issue

https://github.com/delaford/game/issues/60
Motivation and Context

How Has This Been Tested?

Q&A (manual testing)
Manual testing - click on any tab other than inventory, click on the bank gnome
Screenshots (if appropriate):
Types of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)

Superb! Thank you so much for your contribution and welcome! 🎉

Nice!


Change default behavior of dapr uninstall -k

Describe the proposal
Right now dapr uninstall -k tries to uninstall dapr using the dapr-operator.yaml from latest release. Instead the default behavior should be to find the installed dapr version using kube client and use the dapr-operator.yaml from that specific release to uninstall dapr.

@yaron2 Is this issue still relevant? Kubernetes install and uninstall using Dapr CLI now uses the helm charts and a release name dapr.

@yaron2

No, this can be closed. we are no longer using a template file.


google-cloud-sdk: 322.0.0 -> 323.0.0

Motivation for this change
Things done

[ ] 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"
[x] 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
[x] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109445 run on x86_64-darwin 1

1 package built:

google-cloud-sdk (google-cloud-sdk-gce)

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109445 run on x86_64-darwin 1

1 package built:

google-cloud-sdk (google-cloud-sdk-gce)

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109445 run on x86_64-linux 1

1 package built:

google-cloud-sdk (google-cloud-sdk-gce)

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109445 run on x86_64-linux 1

1 package built:

google-cloud-sdk (google-cloud-sdk-gce)


GIT_LARGE weights

When I was reading issues, I found this link to download GIT_BASE model:
https://publicgit.blob.core.windows.net/data/output/GIT_BASE/snapshot/model.pt
Can you please provide a link for downloading GIT_LARGE model?

replace the keyword of GIT_BASE with the model name.

Hi, how do I download the model weights?
https://publicgit.blob.core.windows.net/data/output/GIT_BASE/snapshot/model.pt
Here I get PublicAccessNotPermitted


Evaluate the data

We need to go talk to IT, etc to determine the actual data we have and how to use it.
Helpful: Work with Sam on this part so we use his network of people to find answers.
From line# 478 of neuron notes
Aug 2:
Data primarily from survey of evalhalla, data scraped from cognos, but we dont know about the other data, need to build map of data CSPS has

Wont fix, removed from scope, will revisit when we connect with other orgs/departments/stake-holders


Add license

Its always best to add a license, for any open-source project.
You can pick from a wide variaty, using https://choosealicense.com/

We will add that now! Thank you for the suggestion!


Could not find a type definition associated with type [xlrelease.Tile] with XLR 4.8.1

Is this version 2.7.0 of this plugin compatible with XLR version 4.8.1? The Readme states 4.8+  this error  prevents XLR from starting up.

Oh, correct. I'll update the readme, as tiles are only supported since 5.x.
What you can do is, open up the jar file, and edit the synthetic.xml. I think if you remove this type: xldeploy.XLDVersionsTile it should work also in 4.8.x.

I figured that. Modifying the synth allows it to start up.


functionality request: add step on caret's current line via command palette

It'd be useful to be able to add a step without involving the mouse/trackpad/etc.

Hey! This is a great idea, and something that would be pretty quick to add 👍 I’ll get to it this weekend as part of my next release.

Hi @lostintangent If this complete, I can close this issue?

I actually never shipped this yet. So let's keep it open, and I can prioritize it this week.

I see! That's ok. I'm just doing some backlog grooming. :)


Use tarpaulin instead of grcov

Just investigation of coverage quality

Codecov Report

Merging #23 into master will increase coverage by 2.15%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master    #23      +/-   ##
========================================
+ Coverage   24.84%    27%   +2.15%
========================================
  Files         145    127      -18
  Lines        5099   3029    -2070
  Branches      844      0     -844
========================================
- Hits         1267    818     -449
+ Misses       3309   2211    -1098
+ Partials      523      0     -523

Impacted Files
Coverage Δ

carapax/src/context.rs
66.66% <0%> (-19.05%)
:arrow_down:

tgbot/src/types/callback_query.rs
0% <0%> (-7.15%)
:arrow_down:

carapax-access/src/handler.rs
85.71% <0%> (-5.2%)
:arrow_down:

tgbot/src/types/user.rs
0% <0%> (-5%)
:arrow_down:

carapax/src/handler.rs
77.89% <0%> (-5%)
:arrow_down:

tgbot/src/methods/chat_member/restrict.rs
0% <0%> (ø)
:arrow_up:

...src/types/inline_mode/query_result/cached/photo.rs
0% <0%> (ø)
:arrow_up:

tgbot/src/methods/user/get_me.rs
0% <0%> (ø)
:arrow_up:

tgbot/src/methods/poll.rs
0% <0%> (ø)
:arrow_up:

tgbot/src/methods/chat/delete_sticker_set.rs
0% <0%> (ø)
:arrow_up:

... and 142 more

Continue to review full report at Codecov.

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


Changes required as part of supporting all new boxes

@eriknordmark I've updated the PR as per our discussion. Please take a look (especially at https://github.com/zededa/zenbuild/pull/66/commits/1be1b3cd6163fb88b0605198199ec1a10e895711) this build should keep your wifi workflow basically the same

@eriknordmark I've updated the PR as per our discussion. Please take a look (especially at 1be1b3c) this build should keep your wifi workflow basically the same

LGTM


Add runner readiness waiting support

Now terraform apply will wait until the runner is registered and ready before considering the plan application as successful. All the currently supported vendors use systemd and ssh for logging and log retrieving, but this may change once we start introducing container orchestrators to the mix. Once that happens, log gathering logic should be provided separately through each vendor abstraction.

@0x2b3bfa0 very good!
There is still some issues like adding a timeout for the reasons mentioned before

@0x2b3bfa0 I have tested it so far. Everything looking great but I dont think its totally solved. Let me explain.
With a broken token and a small timeout the output looks great
iterative_cml_runner.runner-gh-2: Still creating... [3m50s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [4m0s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [4m10s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [4m20s elapsed]

Error: Error checking the runner status

-- Logs begin at Wed 2021-01-20 00:25:37 UTC, end at Mon 2021-03-22 14:19:04
UTC. --
Mar 22 14:18:38 ip-172-31-0-106 systemd[1]: Starting cml service...
Mar 22 14:18:41 ip-172-31-0-106 cml.sh[18454]: Error: repo_token does not have
enough permissions to access workflow API
Mar 22 14:18:41 ip-172-31-0-106 cml.sh[18454]:     at CML.repo_token_check
(/usr/lib/node_modules/@dvcorg/cml/src/cml.js:231:13)
Mar 22 14:18:41 ip-172-31-0-106 cml.sh[18454]:     at
processTicksAndRejections (internal/process/task_queues.js:97:5)
Mar 22 14:18:41 ip-172-31-0-106 cml.sh[18454]:         Destroy scheduled: 30
seconds remaining.

however if I put a longer timeout the output is not that great.
iterative_cml_runner.runner-gh-2: Still creating... [9m41s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [9m51s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [10m1s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [10m11s elapsed]
iterative_cml_runner.runner-gh-2: Still creating... [10m21s elapsed]

Error: Error checking the runner status

dial tcp <IP_ADDRESS>:22: i/o timeout

Ideally it should be waiting until it has the log of the machine having an error or being destroyed. We cold do a fast PR on cml for this if needed
Mar 22 14:18:41 ip-172-31-0-106 cml.sh[18454]:         Destroy scheduled: 30
seconds remaining.

And then disconnect and log.
However seems that the process is going to stay connected until timeout.

@DavidGOrtega, as per my understanding, you would like to terminate the readiness waiting loop as soon as one of these two conditions are met:

The runner becomes ready and notifies it through the log.
The runner experiences an internal error and exits immediately.

We don't cover yet the second case, and that's why you're seeing less informative error messages when using longer timeouts.
Could we emit a JSONL event report along with the destroy scheduled event and parse it from the provider as any other status report?

Could we emit a JSONL event report along with the destroy scheduled event and parse it from the provider as any other status report?
{"level": "info", "time": "···", "repo": "···", "status": "terminated"}

Anything. Definitely we have to attack the logging task to sanitise the outputs and be consistent between JSON and not JSON and stderror and normal output. But for now anything will work.
Im going to add that in the 0.3.2 release so you can revisit this later on.

blocked until 0.3.2 release and adjustment

@DavidGOrtega, my last two commits should do the trick. Can you please check them on your side and confirm that the behavior matches our expectations?

@0x2b3bfa0 works perfectly! 🙏

https://github.com/iterative/cml/issues/457


Unable to parse duration with commas

For tests longer than 17 minutes, the duration field goes into 4 digits. The maven surefire plugin outputs this in a comma separated format, e.g, 1,234.56. We should remove commas before trying to parse the duration field. Ref: https://github.com/junit-team/junit5/issues/1381

Closed by #39!


Synchronize changes from main branch to postman branch

backfills other recent changes completed in main branch to the postman documentation branch

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

prometheus = me in case anyone is wondering


Method for controlling the authorization type used?

I copied and pasted the below from the documentation that I just created a PR for (#14)...
As you can see in the second method below, if we want to manually control which authorization type we use when making queries, we have to play with the OsomeTweet._use_bearer_token field (or parameter, or w/e it's called). That being said, you can see in the WARNING (at the bottom of the message) that you can set this to whatever you want and, if you don't set it correctly, it will break the class.
Would it be valuable to create a method which controls this - ensuring the user only passes in True or False? I am happy to do this, just wanted to make sure you guys agreed this was needed.
Let me know whenever. Thanks.

Controlling which authorization type you'd like to use
As mentioned above, osometweet defaults to OAuth 2.0 Bearer Token authorization. If you'd like to use OAuth 1.0a authorization you can do that in two ways.

Don't provide the OsomeTweet class your bearer_token

osometweet needs your bearer_token for OAuth 2.0 Bearer Token authorization. Thus, if you do not provide this token, osometweet will look for your bearer_token - not find it - and then only use your user context Twitter keys/tokens (i.e. api_key, api_key_secret, access_token, access_token_secret) from then on. For example, simply initialize the OsomeTweet class like this...

from osometweet.api import OsomeTweet

api_key = "YOUR_TWITTER_API_KEY"
api_key_secret = "YOUR_TWITTER_API_KEY_SECRET"
access_token = "YOUR_TWITTER_ACCESS_TOKEN"
access_token_secret = "YOUR_TWITTER_ACCESS_TOKEN_SECRET"

ot = OsomeTweet(
	api_key = api_key,
	api_key_secret = api_key_secret,
	access_token = access_token,
	access_token_secret = access_token_secret
	)

Manually

Perhaps you have a more complicated script and you'd like to switch which authorization osometweet uses for different methods. You can manually do this by controlling what osometweet does with OsomeTweet._use_bearer_token (boolean). For example:

from osometweet.api import OsomeTweet

api_key = "YOUR_TWITTER_API_KEY"
api_key_secret = "YOUR_TWITTER_API_KEY_SECRET"
access_token = "YOUR_TWITTER_ACCESS_TOKEN"
access_token_secret = "YOUR_TWITTER_ACCESS_TOKEN_SECRET"
bearer_token = "YOUR_TWITTER_BEARER_TOKEN"

ot = OsomeTweet(
	api_key = api_key,
	api_key_secret = api_key_secret,
	access_token = access_token,
	access_token_secret = access_token_secret,
	bearer_token = bearer_token
	)

# The below line tells osometweet to NOT use the bearer_token even though it has been provided
ot._use_bearer_token = False  # <-------

# You can then switch it back with...
ot._use_bearer_token = True

WARNING: OsomeTweet._use_bearer_token can only be set to the boolean values True or False - any other value will break the class.

Would it be valuable to create a method which controls this - ensuring the user only passes in True or False? I am happy to do this, just wanted to make sure you guys agreed this was needed.

I like this!
I was actually thinking about creating a standalone OAuth class just to handle this like tweepy. This way we can decouple OSoMeTweet and oauth. The code would be easier to maintain.
Under this structure, we can many have two OAuth classes for two versions respectively. This way it would be very clear what version of OAuth the user is using.

I think that having two OAuth classes is probably the best idea, good thinking.
Not sure if you want to close this issue and start a new one or just use this one - fine with me either way. 👍

OK, I'll close this one and continue the discussion in #19


More misc logging tweaks and preparation for aggregation

Issue Number

Overview
Split off from #2583
See commit messages for overview.
Comments
Should be the more straight-forward and auxiliary parts of #2583.
Maybe af6498b98343bc51b791bb1613d2f5b9fd63b93d shouldn't be here though, as it's a slightly weird intermediate state — but I think it should work.

I have rebased and resolved merge conflicts, though it may not fully compile now.

bors r+

Ah, thanks!


TensorFlow 2.x: Model Training Indefinitely in Graph Mode

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): pip install tensorflow
Python version: python 3.9.5
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:

TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior
I am training the model in both the eager execution mode and the graph mode. The model is training well in the eager execution mode, however running for indefinitely in the graph mode. I tried to debug in multiple way with no success.
Describe the expected behavior
The model should train in the same way in both eager execution and graph mode.
Contributing

Do you want to contribute a PR? (yes/no):
Briefly describe your candidate solution(if contributing):

Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
import numpy as np
import tensorflow as tf

tf.compat.v1.disable_eager_execution() # comment to enable eager execution mode
print("[INFO] Eager mode: ", tf.executing_eagerly()) # For easy reset of notebook state.

class CustomModelV2(tf.keras.Model):
    def __init__(self):
        super(CustomModelV2, self).__init__()
        self.encoder = Encoder(32)
        self.encoder.build(input_shape=(None, 32))
        self.loss_tracker = tf.keras.metrics.Mean(name="loss")

    def call(self, inputs, training):
        return self.encoder(inputs, training)

    @property
    def metrics(self):
        # We list our `Metric` objects here so that `reset_states()` can be
        # called automatically at the start of each epoch
        # or at the start of `evaluate()`.
        # If you don't implement this property, you have to call
        # `reset_states()` yourself at the time of your choosing.
        return [self.loss_tracker]

    @tf.function
    def train_step(self, data):
        # Unpack the data. Its structure depends on your model and
        # on what you pass to `fit()`.
        x, y = data

        with tf.GradientTape() as tape:
            y_pred = self.call(x, training=True)  # Forward pass

            # Compute the loss value
            # (the loss function is configured in `compile()`)
            r_loss = tf.keras.losses.mean_squared_error(y, y_pred)
            loss = r_loss

        # Compute gradients
        trainable_vars = self.trainable_variables
        gradients = tape.gradient(loss, trainable_vars)

        # Update weights
        self.optimizer.apply_gradients(zip(gradients, trainable_vars))

        # Update metrics (includes the metric that tracks the loss)
        self.loss_tracker.update_state(loss)

        # Return a dict mapping metric names to current value
        return {"loss": self.loss_tracker.result()}

class Encoder(tf.keras.Model):
    def __init__(self, input_size):
        super(Encoder, self).__init__(name = 'Encoder')
        self.input_layer   = DenseLayer(128, input_size, 0.0, 0.0, 'float32')
        self.hidden_layer1 = DenseLayer(128, 128, 0.001, 0.0, 'float32')
        self.dropout_laye1 = tf.keras.layers.Dropout(0.2)
        self.hidden_layer2 = DenseLayer(64, 128, 0.001, 0.0, 'float32')
        self.dropout_laye2 = tf.keras.layers.Dropout(0.2)
        self.hidden_layer3 = DenseLayer(64, 64, 0.001, 0.0, 'float32')
        self.dropout_laye3 = tf.keras.layers.Dropout(0.2)
        self.output_layer  = LinearLayer(64, 64, 0.001, 0.0, 'float32')

    def call(self, input_data, training):
        fx = self.input_layer(input_data)
        fx = self.hidden_layer1(fx)
        if training:
            fx = self.dropout_laye1(fx)
        fx = self.hidden_layer2(fx)
        if training:
            fx = self.dropout_laye2(fx)
        fx = self.hidden_layer3(fx)
        if training:
            fx = self.dropout_laye3(fx)
        return self.output_layer(fx)

class LinearLayer(tf.keras.layers.Layer):

    def __init__(self, units, input_dim, weights_regularizer, bias_regularizer, d_type):
        super(LinearLayer, self).__init__()
        self.w = self.add_weight(name='w_linear',
                                shape = (input_dim, units),
                                initializer = tf.keras.initializers.RandomUniform(
                                    minval=-tf.cast(tf.math.sqrt(6/(input_dim+units)), dtype = d_type),
                                    maxval=tf.cast(tf.math.sqrt(6/(input_dim+units)), dtype = d_type),
                                    seed=16751),
                                regularizer = tf.keras.regularizers.l1(weights_regularizer),
                                trainable = True)
        self.b = self.add_weight(name='b_linear',
                                 shape = (units,),
                                 initializer = tf.zeros_initializer(),
                                 regularizer = tf.keras.regularizers.l1(bias_regularizer),
                                 trainable = True)

    def call(self, inputs):
        return tf.matmul(inputs, self.w) + self.b

class DenseLayer(tf.keras.layers.Layer):

    def __init__(self, units, input_dim, weights_regularizer, bias_regularizer, d_type):
        super(DenseLayer, self).__init__()
        self.w = self.add_weight(name='w_dense',
                                 shape = (input_dim, units),
                                 initializer = tf.keras.initializers.RandomUniform(
                                     minval=-tf.cast(tf.math.sqrt(6.0/(input_dim+units)), dtype = d_type),
                                     maxval=tf.cast(tf.math.sqrt(6.0/(input_dim+units)), dtype = d_type),
                                     seed=16751),
                                 regularizer = tf.keras.regularizers.l1(weights_regularizer),
                                 trainable = True)
        self.b = self.add_weight(name='b_dense',
                                 shape = (units,),
                                 initializer = tf.zeros_initializer(),
                                 regularizer = tf.keras.regularizers.l1(bias_regularizer),
                                 trainable = True)

    def call(self, inputs):
        x = tf.matmul(inputs, self.w) + self.b
        return tf.nn.elu(x)

# Just use `fit` as usual
x = tf.data.Dataset.from_tensor_slices(np.random.random((5000, 32)))

y_numpy = np.random.random((5000, 1))
y_numpy[:, 3:] = None
y = tf.data.Dataset.from_tensor_slices(y_numpy)

x_window = x.window(30, shift=10, stride=1)
flat_x = x_window.flat_map(lambda t: t)
flat_x_scaled = flat_x.map(lambda t: t * 2)

y_window = y.window(30, shift=10, stride=1)
flat_y = y_window.flat_map(lambda t: t)
flat_y_scaled = flat_y.map(lambda t: t * 2)

z = tf.data.Dataset.zip((flat_x_scaled, flat_y_scaled)).batch(32).cache().shuffle(buffer_size=32).prefetch(buffer_size=tf.data.experimental.AUTOTUNE)

# Stopping criteria if the training loss doesn't go down by 1e-3
early_stop_cb = tf.keras.callbacks.EarlyStopping(
    monitor='loss', min_delta = 1e-3, verbose = 1, mode='min', patience = 3,
    baseline=None, restore_best_weights=True)

# Construct and compile an instance of CustomModel
model = CustomModelV2()

model.compile(optimizer=tf.optimizers.Adagrad(0.01))

history = model.fit(z, epochs=3, callbacks=[early_stop_cb])

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
Output in Graph Mode:
WARNING:tensorflow:Output output_1 missing from loss dictionary. We assume this was done on purpose. The fit and evaluate APIs will not be expecting any data to be passed to output_1.
WARNING:tensorflow:From C:\Users\jain432\Anaconda3\envs\tf\lib\site-packages\tensorflow\python\keras\optimizer_v2\adagrad.py:87: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
Train on None steps
Epoch 1/3
 479916/Unknown - 667s 1ms/step - batch:<PHONE_NUMBER> - size: 1.0000 - loss: 2.1716e-04

Output in Eager Mode:
Epoch 1/3
468/468 [==============================] - 2s 3ms/step - loss: 0.4173
Epoch 2/3
468/468 [==============================] - 1s 3ms/step - loss: 0.3695
Epoch 3/3
468/468 [==============================] - 1s 3ms/step - loss: 0.3608

@Saduf2019 ,
I was able to reproduce the issue in tv v2.4,v2.5 and nightly.Please find the gist.Gist1,Gist2

@jainmilan
Can you please refer to this link and let us know.

Thanks @Saduf2019 for the response. The link you shared discuss a totally different issue. Do you think it is because of the TensorFlow version and it was supported in the previous version?

@jainmilan
You would  need to define steps_per_epoch in model.fit as dataset runs indefinitely

The steps_per_epoch limits the training but don’t you think it is an inconsistent behavior? Also, to do an indefinite training it might be applying a repeat over the dataset which I didn’t use and that changes the data too.

@jainmilan
This does not seem like a tensorflow bug, it coding related issue, can you open this in discussion forum or stackover flow as there is a bigger community to answer there.

Moving this to closed status due to lac of activity.

@Saduf2019: I don’t see any resolution there. The code should ideally output the same thing in both the graph mode and the eager mode. I have already shared a minimal working example that can replicate the issue.


Create integration tests for the Basic round trip

Need to figure out a way to test the basic round trip: https://github.com/alpine-hodler/gidari/blob/main/internal/web/auth/basic.go

I could write tests using the net/http/httptest package. Is that what you need?

Yes that would be perfect! You're assigned!


🐛 [BUG]: Auto-generated Handle ids change with position

Is there an existing issue for this?

[X] I have searched the existing issues and this is a new bug.

Current Behavior
Currently, if a handle is not explicitly assigned an id, one will be auto-generated.
The auto-generated id depends on the position of a handle, which causes edges created to those handles to fail their handle lookup if the position prop of the handle is changed after the edge was already created.
Expected Behavior
Handles should not require an id as long as not multiple of the same type (source / target) are used.
Furthermore handles should not auto-generate an id themselves if no id was explicitly passed, allowing us to fall back to the first handle of each type when looking up an edges' handles.
Steps To Reproduce

Create an edge between two nodes
Change the handle position of the nodes
Update node internals to signal the position change
Edge does not update to the new handle positions

Relevant log output
No response
Anything else?
This might be a breaking change since existing users might expect handle ids to pop up with new connections as that's the current behavior.
This change might be pushed into the next major release to avoid breaking existing users apps.

Fixed and refactored with 1.35.0


Support specifying button size in new material button styles and button themes

The only way to enforce a fixed height on buttons currently is to wrap the buttons in a sized box. Adding a fixedSize parameter to button styles and themes would mitigate this issue.

[cross-reference]
Similar to https://github.com/flutter/flutter/issues/62882.

[cross-reference]
Similar to https://github.com/flutter/flutter/issues/62882.

Reopening this issue. It often is the case that we only know the button height, but not necessarily the width (dynamic text or resizable text). Is there any way we can add a parameter for fixedHeight and fixedWidth instead, enforcing only whichever one (or both) that are specified?

Reopening this issue. It often is the case that we only know the button height, but not necessarily the width (dynamic text or resizable text). Is there any way we can add a parameter for fixedHeight and fixedWidth instead, enforcing only whichever one (or both) that are specified?

To specify buttons with a fixed width and the default height use fixedSize: Size.fromWidth(320). Similarly, to specify a fixed height and the default width use fixedSize: Size.fromHeight(100).


Add documentation for EV charging simulation

The simulation configuration file for the simulation is not yet in the simulation platform repository. The assumed link for the simulation configuration is given as: https://github.com/simcesplatform/Platform-Manager/blob/master/simulation_configuration_ev_charging.yml

This pull request is now superseded by pull request #3 that contains all the changes from here, fixes the merge conflict, and has some additional updates.


Enable install-powershell.ps1 to use MSI

PR Summary
Enable install-powershell.ps1 to install the MSI and not just the zip on Windows.  Also fixed it so it works from Windows PowerShell.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] User-facing Documentation needed

[ ] Issue filed - Issue link:

Testing - New and feature

[x] Not Applicable or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

[ ] Add [feature] if the change is significant or affects feature tests

Consider adding a test to https://github.com/PowerShell/PowerShell/blob/master/.vsts-ci/install-ps.yml in the future.