mypy: Fully annotations

Based on #378
Fixes #377

Codecov Report
Base: 80.59% // Head: 80.54% // Decreases project coverage by -0.05% :warning:

Coverage data is based on head (17ece19) compared to base (ed82421).
Patch coverage: 44.44% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #397      +/-   ##
===========================================
- Coverage    80.59%   80.54%   -0.06%
===========================================
  Files            6        6
  Lines          737      740       +3
===========================================
+ Hits           594      596       +2
- Misses         143      144       +1

Impacted Files
Coverage Δ

argcomplete/_check_console_script.py
0.00% <0.00%> (ø)

argcomplete/_check_module.py
39.06% <25.00%> (-0.63%)
:arrow_down:

argcomplete/my_argparse.py
81.66% <100.00%> (+0.20%)
:arrow_up:

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

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

@kislyuk This would be a huge PR for me to complete - I want to wait for a thumbs up before I start (as it'd take me half a day or more)

argcomplete on  mypy-strict [!⇕] ❯ ls argcomplete/**/*.py argcomplete/*.py | entr -c mypy
argcomplete/my_shlex.py:28: error: Unused "type: ignore" comment
argcomplete/my_shlex.py:34: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:63: error: Need type annotation for "pushback"  [var-annotated]
argcomplete/my_shlex.py:67: error: Need type annotation for "filestack"  [var-annotated]
argcomplete/my_shlex.py:76: error: Need type annotation for "_pushback_chars"  [var-annotated]
argcomplete/my_shlex.py:87: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:93: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:108: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/my_shlex.py:108: note: Use "-> None" if function does not return a value
argcomplete/my_shlex.py:117: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/my_shlex.py:125: error: Call to untyped function "read_token" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:129: error: Call to untyped function "sourcehook" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:129: error: Call to untyped function "read_token" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:132: error: Call to untyped function "push_source" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:133: error: Call to untyped function "get_token" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:139: error: Call to untyped function "pop_source" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:140: error: Call to untyped function "get_token" in typed context  [no-untyped-call]
argcomplete/my_shlex.py:149: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/my_shlex.py:167: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
argcomplete/my_shlex.py:236: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
argcomplete/my_shlex.py:289: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
argcomplete/my_shlex.py:300: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:310: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:318: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_shlex.py:321: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/my_shlex.py:322: error: Call to untyped function "get_token" in typed context  [no-untyped-call]
argcomplete/completers.py:8: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:18: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:21: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:26: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:27: error: Call to untyped function "_convert" in typed context  [no-untyped-call]
argcomplete/completers.py:30: error: Call to untyped function "ChoicesCompleter" in typed context  [no-untyped-call]
argcomplete/completers.py:38: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:46: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:50: error: Call to untyped function "_call" in typed context  [no-untyped-call]
argcomplete/completers.py:53: error: Call to untyped function "_call" in typed context  [no-untyped-call]
argcomplete/completers.py:55: error: Call to untyped function "_call" in typed context  [no-untyped-call]
argcomplete/completers.py:56: error: Call to untyped function "_call" in typed context  [no-untyped-call]
argcomplete/completers.py:65: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:75: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/completers.py:96: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/completers.py:96: note: Use "-> None" if function does not return a value
argcomplete/completers.py:97: error: Call to untyped function "__init__" in typed context  [no-untyped-call]
argcomplete/completers.py:105: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/completers.py:105: note: Use "-> None" if function does not return a value
argcomplete/completers.py:108: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/shell_integration.py:82: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:22: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:42: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:56: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:63: error: Call to untyped function "action_is_satisfied" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:75: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:78: error: Need type annotation for "active_actions" (hint: "active_actions: List[<type>] = ...")  [var-annotated]
argcomplete/my_argparse.py:85: error: Need type annotation for "action_conflicts" (hint: "action_conflicts: Dict[<type>, <type>] = ...")  [var-annotated]
argcomplete/my_argparse.py:124: error: Need type annotation for "seen_non_default_actions" (hint: "seen_non_default_actions: Set[<type>] = ...")  [var-annotated]
argcomplete/my_argparse.py:127: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:161: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:170: error: Need type annotation for "action_tuples" (hint: "action_tuples: List[<type>] = ...")  [var-annotated]
argcomplete/my_argparse.py:221: error: Invalid index type "Action" for "Dict[str, int]"; expected type "str"  [index]
argcomplete/my_argparse.py:229: error: Invalid index type "Action" for "Dict[str, int]"; expected type "str"  [index]
argcomplete/my_argparse.py:230: error: Call to untyped function "action_is_open" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:241: error: Call to untyped function "take_action" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:249: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/my_argparse.py:262: error: Invalid index type "Action" for "Dict[str, int]"; expected type "str"  [index]
argcomplete/my_argparse.py:263: error: Call to untyped function "take_action" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:286: error: Call to untyped function "consume_positionals" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:304: error: Call to untyped function "consume_optional" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:307: error: Call to untyped function "consume_positionals" in typed context  [no-untyped-call]
argcomplete/my_argparse.py:339: error: Argument 1 to "join" of "str" has incompatible type "List[Optional[str]]"; expected "Iterable[str]"  [arg-type]
argcomplete/_check_module.py:14: error: Unused "type: ignore" comment
argcomplete/_check_module.py:42: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/_check_module.py:65: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/_check_module.py:65: note: Use "-> None" if function does not return a value
argcomplete/_check_module.py:71: error: Call to untyped function "find" in typed context  [no-untyped-call]
argcomplete/_check_module.py:75: error: Incompatible types in assignment (expression has type overloaded function, variable has type "Callable[[Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]], TextIO]")  [assignment]
argcomplete/_check_module.py:91: error: Call to untyped function "main" in typed context  [no-untyped-call]
argcomplete/__init__.py:20: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:40: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/__init__.py:50: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/__init__.py:64: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:68: error: Call to untyped function "shlex" in typed context  [no-untyped-call]
argcomplete/__init__.py:73: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:79: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:95: error: Call to untyped function "get_token" in typed context  [no-untyped-call]
argcomplete/__init__.py:101: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:102: error: Call to untyped function "split_word" in typed context  [no-untyped-call]
argcomplete/__init__.py:105: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:107: error: Call to untyped function "split_word" in typed context  [no-untyped-call]
argcomplete/__init__.py:116: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:127: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:134: error: Call to untyped function "FilesCompleter" in typed context  [no-untyped-call]
argcomplete/__init__.py:151: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:161: error: Call to untyped function "FilesCompleter" in typed context  [no-untyped-call]
argcomplete/__init__.py:200: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass  [misc]
argcomplete/__init__.py:219: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:224: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:231: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:240: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:245: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:251: error: Call to untyped function "split_line" in typed context  [no-untyped-call]
argcomplete/__init__.py:265: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:275: error: Call to untyped function "_get_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:285: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:291: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:292: error: Call to untyped function "_patch_argument_parser" in typed context  [no-untyped-call]
argcomplete/__init__.py:298: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:301: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:303: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:310: error: Call to untyped function "collect_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:311: error: Call to untyped function "filter_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:312: error: Call to untyped function "quote_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:315: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/__init__.py:322: error: Need type annotation for "active_parsers" (hint: "active_parsers: List[<type>] = ...")  [var-annotated]
argcomplete/__init__.py:323: error: Need type annotation for "visited_positionals" (hint: "visited_positionals: List[<type>] = ...")  [var-annotated]
argcomplete/__init__.py:327: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:344: error: Name "action.__class__" is not defined  [name-defined]
argcomplete/__init__.py:344: error: Class cannot subclass "__class__" (has type "Any")  [misc]
argcomplete/__init__.py:345: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:346: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:347: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:348: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:349: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:354: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:355: error: Call to untyped function "patch" in typed context  [no-untyped-call]
argcomplete/__init__.py:367: error: Call to untyped function "patch" in typed context  [no-untyped-call]
argcomplete/__init__.py:369: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:370: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:374: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:375: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:378: error: Need type annotation for "aliases_by_parser" (hint: "aliases_by_parser: Dict[<type>, <type>] = ...")  [var-annotated]
argcomplete/__init__.py:384: error: Call to untyped function "filter_aliases" in typed context  [no-untyped-call]
argcomplete/__init__.py:391: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:402: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:405: error: List comprehension has incompatible type List[List[Any]]; expected List[Tuple[Any, Any]]  [misc]
argcomplete/__init__.py:415: error: Call to untyped function "suppress" in typed context  [no-untyped-call]
argcomplete/__init__.py:419: error: Call to untyped function "_action_allowed" in typed context  [no-untyped-call]
argcomplete/__init__.py:422: error: Call to untyped function "_include_options" in typed context  [no-untyped-call]
argcomplete/__init__.py:426: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:434: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:435: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:439: error: Call to untyped function "action_is_greedy" in typed context  [no-untyped-call]
argcomplete/__init__.py:444: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:461: error: Call to untyped function "action_is_open" in typed context  [no-untyped-call]
argcomplete/__init__.py:469: error: Call to untyped function "action_is_satisfied" in typed context  [no-untyped-call]
argcomplete/__init__.py:469: error: Call to untyped function "action_is_open" in typed context  [no-untyped-call]
argcomplete/__init__.py:470: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:473: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:479: error: Call to untyped function "ChoicesCompleter" in typed context  [no-untyped-call]
argcomplete/__init__.py:484: error: Call to untyped function "suppress" in typed context  [no-untyped-call]
argcomplete/__init__.py:500: error: List comprehension has incompatible type List[List[Any]]; expected List[Tuple[Any, Any]]  [misc]
argcomplete/__init__.py:503: error: List comprehension has incompatible type List[List[Sequence[Any]]]; expected List[Tuple[Any, Any]]  [misc]
argcomplete/__init__.py:505: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:507: error: Item "ChoicesCompleter" of "Union[ChoicesCompleter, Any]" has no attribute "complete"  [union-attr]
argcomplete/__init__.py:515: error: Call to untyped function "debug" in typed context  [no-untyped-call]
argcomplete/__init__.py:518: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:531: error: Call to untyped function "_get_option_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:534: error: Call to untyped function "_get_next_positional" in typed context  [no-untyped-call]
argcomplete/__init__.py:538: error: Call to untyped function "_get_subparser_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:540: error: Call to untyped function "_complete_active_option" in typed context  [no-untyped-call]
argcomplete/__init__.py:548: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/__init__.py:572: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:583: error: "add" of "set" does not return a value  [func-returns-value]
argcomplete/__init__.py:585: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:633: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:651: error: Call to untyped function "split_line" in typed context  [no-untyped-call]
argcomplete/__init__.py:653: error: Call to untyped function "_get_completions" in typed context  [no-untyped-call]
argcomplete/__init__.py:661: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/__init__.py:697: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/__init__.py:698: error: Call to untyped function "_action_allowed" of "CompletionFinder" in typed context  [no-untyped-call]
argcomplete/__init__.py:711: error: Call to untyped function "CompletionFinder" in typed context  [no-untyped-call]
argcomplete/__init__.py:715: error: Function is missing a type annotation  [no-untyped-def]
argcomplete/_check_console_script.py:25: error: Function is missing a return type annotation  [no-untyped-def]
argcomplete/_check_console_script.py:25: note: Use "-> None" if function does not return a value
argcomplete/_check_console_script.py:47: error: Call to untyped function "find" in typed context  [no-untyped-call]
argcomplete/_check_console_script.py:55: error: Call to untyped function "main" in typed context  [no-untyped-call]
Found 170 errors in 7 files (checked 7 source files)

@tony thank you for your effort! Do you have plans to continue working on this? It would be beneficial for neithere/argh#107 too (argh uses argcomplete).

@neithere Before embarking on this - I'm looking for a thumbs up from @kislyuk at https://github.com/kislyuk/argcomplete/pull/378#issuecomment-1364697960 in #378
Once #378 is in, I can continue the approach here typing the argcomplete codebase

@tony I merged #378 - please proceed.

@neithere @kislyuk Moved to #401


[ZK filter] Add support for setwatches2 ZK opcode

Commit Message: [ZK filter] Add support for setwatches2 ZK opcode
Additional Description: Add support for setwatches2 ZK opcode: https://github.com/apache/zookeeper/blob/de7c5869d372e46af43979134d0e30b49d2319b1/zookeeper-jute/src/main/resources/zookeeper.jute#L83-L90
Risk Level: low
Testing: unit tests
Docs Changes: Updates the ZK filter statistics

@JuniorHsu would you mind taking a look
@Winbobob this seems to be failing CI currently

@JuniorHsu would you mind taking a look
@Winbobob this seems to be failing CI currently

Yeah, checking

cc @rgs1


bug:  How to refetch prepareSendTransaction hook after its configuration changed

Is there an existing issue for this?

[X] I have searched the existing issues

Package Version
0.4.10
Current Behavior
I'm using usePrepareSendTransaction hook and useSendTransaction hook for sending transaction function.
When I change some parameters in usePrepareSendTransaction configuration and I call the refetch() function right after, the usePrepareSendTransaction still receives the old parameters.
Could you help me please?
Expected Behavior
usePrepareSendTransaction receives new parameters
Steps To Reproduce
No response
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response

Please provide examples

This is the prepare hook

This is the send hook

This is the watch function to observe when a parameter changes, refetch the prepare hook

Make sure your argument is ref

Can StackBlitz provide a minimal reproducible example

I've fixed that thanks to your suggestion. Thank you very much!


Allow hooks file to be parsed as a template

Add a -template command line option that instructs webhook to parse the hooks files as Go text templates.
This is a quick proof-of-concept.  Needs tests.  I may not be able to work on this for several days, but I wanted to push it out to see what others think about this approach.
Updates #160

Any updates on the state? :)

I think this is ready for review and merging.  It's fairly straight-forward.  Let me know if you have any questions.

I think this is ready for review and merging.  It's fairly straight-forward.  Let me know if you have any questions.

This looks awesome! Could you please update the wiki parameters (and perhaps create a separate page showing a simple use case how to use this. also don't forget to link to https://golang.org/pkg/text/template/ for those who would like to try more esoteric stuff with templates)

I updated the Webhook Parameters page just now.
Instead of creating a new wiki page, would it make more sense to add a short section about templates to the Readme?

Maybe we should go with the different approach. The wiki approach is a little bit flawed, as in, it is strongly related to the the latest release. How about we add docs/ folder with the markdown file(s?) containing the current wiki contents. That way we can also have versioned documentation.
How does that sound? Maybe you have a better approach to all of this?

Sounds good.  :+1:

Of course this should be a separate issue from this topic :-) Thanks for this contribution and making webhook even more awesome!


Add conditional rendering of Navlink for Consoles

Signed-off-by: Drumil Patel<EMAIL_ADDRESS>
Fixes #6705
When no files are present in consoles

When Files are added in console

:+1: Thanks, just getting a CI error now:
/home/circleci/project/web/ui/react-app/src/index.tsx
  6:36  error  Insert `;`  prettier/prettier

Could you run make react-app-lint-fix?

@juliusv Any reviews

Yup, I was just sleeping :)
:+1: Thanks, all green now, will merge! I'll send one tiny follow-up change that you'll see :)


Fix slider

attempt to fix https://github.com/pop-os/cosmic-settings/issues/628
currently, the grab handle seems a little off, but i'm not sure this is a layout  bug.
master

pr

Hum, i'm starting to think its a cosmic only issue. Will see when they rebase they fork

Initially, i wanted to fix a cosmic applet that use the slider from Iced

(only visible on hover)
but yeah, it will require more investigation from me. Sorry for the useless PR

No worries!

I tried to bring this up on discourse, but I guess not many people saw it. My suggestion is to have "saturation zones" at each end of the slider, where clicking that region would bring the slider to either 0% or 100%. The length of these regions would be equal to the half-width of the handle. So the slider would look the same as it does now, but the way it responds to events would be modified slightly.


Enrolments not working for anonymous users

I'm trying to test a simple page modification as follows:
{% experiment subtitle_text control %}

Check it out.

{% endexperiment %}

{% experiment subtitle_text explicit %}

Check this shit out!

{% endexperiment %}

but the control alternative is always shown to non-logged in users, as if the "enrolment" part of the process is not happening.
It seems everything else is in place though, since the admin user (user_id=1) got enrolled:
sqlite> select * from experiments_experiment;
subtitle_text|What should be below the title|{"control":{"default":true,"enabled":true},"explicit":{"enabled":true}}|||3|2016-09-25 21:38:50.341160|

sqlite> select * from experiments_enrollment;
1|2016-09-25 22:31:09.158882|2016-09-25 22:48:15.654098|explicit|subtitle_text|1

also I see some count data was stored in redis:
redis> HGETALL experiments:freq:subtitle_text:explicit:participant
1) "1"
2) "1"

redis> HGETALL "experiments:participants:subtitle_text:explicit:participant"
1) "user:1"
2) "1"

Is there anything I need to do to enable non-logged in user (i.e. session-based) experiment enrolment?
Also a few words about the high-level design of the project would be very useful:

What's stored in the DB
what is stored in Redis,
what data is being attached to the request and response objects
This info will help me debug and hopefully contribute a PR to fix the issue.

I'm using Django 1.10, but I also donwgraded to Django 1.9.9 and anonymous users are still not being enroled.
I have a suspicion the issue is related to the change to way request context processors are used in Django 1.8 (i.e. no more RequestContext). For the record, here are the context processors for my project:
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],

I know this issue + #155 has been kicking around for a little bit, @ivanistheone are you still using this approach / a branch to handle anonymous A/B testing, or did you migrate to a different platform?  We have a similar use case and are investigating our options: we'd prefer to stay with this repo but if it's broken with this use case we're a little reticent.
(Thanks for your time!)

Hi Justin, I haven't explored much since the time of this issue and PR. Thx to your prodding, I just tried to get it to work in a test branch, but no quick wins were had. I might be doing something wrong... I will give it another shot in a few weeks once I have the A version of my site ready. This is a very promising project and could use some maintainer love.

This should just work, and does for us :( I guess its possible the session store isn't working for some reason, which one are you using (we use db_cached). Also dumb question, but is the experiment enabled in the admin panel, they default to disabled and need activating.


Ignore .vscode directory

I usually recommend that user specific ignores like this are specified in the global gitignore. Saves the hassle of every editors files needing to be specified in every project.

While I agree in sentiment .settings/ and .project/ are already in the file.

They shouldn't be there either but :man_shrugging:


Show footer when using bestazon

Shows banner when using bestazon
Closes #442

Prerequisites

[x] My Pull Request is filled against the next branch
[ ] I have updated the CHANGELOG

Recommended Steps

[ ] My patch adds a new feature, therefore I have also added a help article about it
[x] My patch changes Elegant behavior, therefore I have updated the help article to reflect this change
[x] My commits are signed

Description

Done, thanks!

:tada: This PR is included in version 3.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Bugfix: Show lock message text & label properly

This is how it looks now:

Before, the message ("test lock") was invisible and the title "Lock Message" was aligned wrong


Validation step for self referencing products

  Modern Horizons 3 Gift Bundle Case:
    sealed:
    - count: 6
      name: Modern Horizons 3 Gift Bundle Case
      set: mh3

this is problematic, would it be possible to add a validation step to avoid products referencing themselves?

target: scripts/content_validator.py


Ensure we don't fail on stopped VM

It may happen the VM are already stopped (for instance after a
hypervisor reboot). This patch ensures we don't fail the whole cleanup
in that case.
As a pull request owner and reviewers, I checked that:

[X] Appropriate testing is done and actually running

/lgtm


package.json: Allow React 16 as a peer dependency

Is that all that's really needed?
From some comments on #972 and #1060 it sounds like it might be... I suppose it would at least prevent people from mixing different versions of React, which seems to never go well.

Yeah I tested it on my setup and everything works, except for yarn check which throws a peer dep error. react-popper will need to be updated too once https://github.com/souporserious/react-popper/pull/59 merges.


Is it possible to toggle between FSCalendarScopeMonth and FSCalendarScopeWeek using finger?

Is it possible to toggle between FSCalendarScopeMonth and FSCalendarScopeWeek using a finger? For example when it's in FSCalendarScopeWeek it would be nice to be able to pull down to switch it to FSCalendarScopeMonth.
Is it something relatively not very hard to implement with this component? What would be your suggestions for this?
Thanks in advance.

Actually this feature will be enabled next version. Thanks for reaching out.

Glad to hear this! Any time expectations for the next version release date?

Updated.

@WenchaoD great work! 👍


Exact match failure case

It seems exact match with a prefix might score lower that a set of characters scattered over the full path.
Test input (test.txt), adding extra before and after placeholder lines:
noise/to/start.txt
Home/level/other/With/ore/al.d
kind/of/very/long/path/This/is/PrefixedHelloWorld.txt
some/path/to/fillup.txt

Matching:
cat test.txt | ./cpsm_cli --limit 2 --query HelloWorld
Output:
Home/level/other/With/ore/al.d
- score:<PHONE_NUMBER>30753; prefix_level = 0, whole_basename_match = 0, basename_longest_submatch = 0, basename_match_count = 0, basename_word_gaps = 0, crfile_basename_shared_words = 0, crfile_path_distance = 6, unmatched_suffix_len = 4, item_len = 30
- match positions: 0, 3, 5, 9, 11, 17, 22, 23, 27, 29
kind/of/very/long/path/This/is/PrefixedHelloWorld.txt
- score:<PHONE_NUMBER>47210; prefix_level = 0, whole_basename_match = 0, basename_longest_submatch = 0, basename_match_count = 0, basename_word_gaps = 0, crfile_basename_shared_words = 0, crfile_path_distance = 8, unmatched_suffix_len = 22, item_len = 53
- match positions: 39, 40, 41, 42, 43, 44, 45, 46, 47, 48

The exact "HelloWorld" match is weighted lower (mostly due crfile_path_distance score)
BTW... Thanks for the great work!

I have the same problem. I wish there would be an option to honor exact match, similar to FZF's --exact.


Should deps.edn be included in the jar file?

I noticed that the ci function doesn't write gitlib dependencies to the POM file, but clj will download transitive gitlib dependencies by reading deps.edn.
This means that clj is unaware of transitive gitlib dependencies if I tell it to grab a library from clojars, for instance.
Is there some way to fix this?  In particular I'm curious if I should tell bb/jar to include deps.edn in the jar file.

Clojars, like Maven, is intended for JAR artifacts that have a pom.xml included -- and pom.xml cannot have dependencies on anything that isn't also a Clojars/Maven dependency.


Stream 392/dbt versioning

Adds avalanche properties yml

Closing in favor of https://github.com/FlipsideCrypto/datascience-models/pull/30


Extract 'Alignment' and 'Genotype' to be separate independent pipelines

See the context here in the background of the scoping document
Summary
This pull request proposes separating the alignment and genotyping stages into two distinct workflows within the production pipelines. These changes aim to enhance flexibility, control, and allow future changes to be on parity with industry best practices, particularly those established by Illumina's DRAGEN hardware. Additionally, version control, once implemented will be more easily implemented with separated alignment and genotyping from downstream workflows.
Proposed Changes

Separation of Pipelines:

Alignment and Genotyping: Split into standalone pipelines to prevent versioning conflicts and ensure consistent inputs.
Modularity: Allows independent updates and optimisations for each workflow without mutual disruption.

Pipeline Starting Points:

Detection of CRAM and gVCF Files: Adjust pipelines to ensure clear and informative error messages for missing data, and allow manual triggering of the genotyping pipeline as needed.
Resource Dependencies: Replace stage dependencies with resource dependencies, requiring a CPG-processed CRAM in Metamist before running the genotyping pipeline, as well as either fastq or CRAM files registered in Metamist prior to running the alignment pipeline.

Repository Structure:

Current Limitations: The existing structure is not conducive to navigating and understanding independent pipelines.
Proposed Structure: Consider separate repositories for the production pipelines API and actual pipelines, with clear folder structures for individual pipelines and shared resources. This PR implements an interim folder structure.
This PR will provide an interim folder structure for the alignment and genotyping pipelines.

Considerations

Integration with Custom Cohorts: Ensure that updates to cohorts with additional samples or sequencing groups are managed without disrupting the pipeline.
User Responsibilities: Users must ensure that samples in custom cohorts have the required gVCF files before running the pipeline.
Further Discussion: Topics such as repository restructuring and shared resource versioning require further discussion.
Version control: Yet to be defined but this separation will hopefully help future efforts in this domain
Breaking continuity: Production-pipelines is designed to automatically trigger stages when inputs do not exist. Extracting alignment and genotyping pipelines from downstream workflows breaks this continuity. Users will need to manually trigger alignment and/or genotyping pipelines to ensure that all sequencing groups have the correct input for downstream analysis. This break in continuity, although contrary to the design logic of production-pipelines, ensures the separation of pipelines for future version control efforts and prevents erroneous pipeline runs without the correct inputs for all samples.

I think it's worth having a conversation about how to segregate this properly - i.e. you've sub-divided these stages into cpg_workflows.stages.XXX, which feels like a very partial solution. That puts us in a weird position where we're trying to separately version a few files inside cpg_workflows, which is itself versioned at the top level.
There's a broader issue of how this pipeline is run - we start the driver image by doing a git clone of production-pipelines into the VM, then we run main.py. That's fine. But when we import cpg_workflows.XXX it imports from the relative path cpg_workflows.XXX that we just cloned into, not the installed version of the codebase (because AFAIK local filepaths are traversed first when Python locates modules). That leads to 'fun' issues where the version of the code being run is based on the current commit, up until we run a python job or a query_command - those are executed in a new VM without the git clone, so they read from the installed version of the codebase (potentially a different version of the codebase). I don't think that should really be addressed by this change, but we should resolve this ambiguity.
A blue sky thinking approach to this division:
- src
  - alignment_workflow
    - stages
      - align
      - cram_qc
    - version.py
  - genotype_workflow
    - stages
      - genotype
      - gvcf_qc
    - version.py
  - gatk_sv_workflow
    - stages
    - version.py
  - large_cohort_workflow
    - stages
    - version.py
  - rare_disease_workflow
    - stages
    - version.py
  - ...? other pipelines we want to version separately
  - cpg_workflows (the library which represents the abstract pipeline - interactions with metamist, setting up a workflow graph, etc.)
- main.py (imports from all the relevant INSTALLED pipelines and builds workflows from them)
- tests
- pyproject.toml

This would enable us to ensure we're only using the installed version of the code (from cpg_workflows.stages.XXX import YYY just doesn't work, there's no local path .cpg_workflows, so we know we're using the installed code)
This would enable use to split out the pipeline framework from the stages that rely on it
This would enable use to version each coherent pipeline separately

Undoubtably this is more effort, it would involve reorganising the production pipelines codebase and having to build a new version of the cpg_workflows image for each test run in GCP.
However, it would resolve a fundamental ambiguity in our production pipelines workflows - when we run our pipelines, we don't truly know which version of the code we're running.  We ARE using cloud compute, so we ARE using containerised pipelines. With our current structure, we're using some of the code in the container, and some pulled in from github at runtime.
This is kinda twinned with https://github.com/populationgenomics/production-pipelines/issues/647, a pet peeve of mine - we're aware, and kind of.. OK? with not really knowing exactly what code is going to run in our main pipeline.

As a side note, this is a huge leap considering that AFAIK the RFC/scoping doc here has not been reviewed by anyone in software, and there are a number of discussion points identifying that @vivbak and other members of data/software should be consulted before going ahead with implementation.


Crowdin integration

This is a stub, but off the top of my head

[x] audit strings for translatability
[ ] prepare documentation for Fluent, which is pretty different than other systems our translators have used
[x] make a decision about RTL support in MVP
[ ] automate posting strings.ftl to Crowdin, preferably in the existing iNaturalistMobile project
[ ] automate downloading translations of strings.ftl from Crowdin
[x] automate organization of strings.ftl in alphabetical order by key while preserving comments (this might require abandoning section (##) comments)
[x] check for unused i18n keys
[x] check for untranslatable i18n keys in use
[ ] Explore screenshot automation?
[ ] Explore integrated translation?
[ ] Explore translation over the wire?

I'm not going to finish this iteration. So far I've done things to get strings ready for translation, and that's taken ~4 work days. Some slowdowns have been checks to ensure all strings are being used and all keys in use are translatable, working through a bug with custom Fluent functions in selectors, and just cleaning up all the existing translations so they make sense and have context (work that will probably never be done).
The actual Crowdin upload and download work still needs to happen. My plan is to try https://github.com/crowdin/github-action much like we're doing in the Android app, but to try and rely on its pull request functionality, which I suspect is better than the hack job I did on that front in Android.

Note that on the meeting of 2024-04-16 there was consensus that RTL does not need to be supported for the Soft Launch / MVP.


found 0 syncable models Successfully finished sync

I am getting this. Person.sync_sheet() works properly. But python manage.py syncgsheets not working.

I can't get Person.sync_sheet() working. But when using python manage.py syncgsheets, it can detect the model but I get an error saying it hasn't provided a API key.

I am getting the issue , when Try model_name.sync_sheet(), it can detect the model but I get an error saying it hasn't provided a API key and when i run  Python manage.py syncgsheets it says found
0 syncable models
Successfully finished sync

The same thing. python manage.py syncgsheets gives 0 syncable models
Successfully finished sync
And no errors... and the model is not exported to anywhere... I don't get the logic. Why 0 syncable models? I've copied model from example... why zero syncable model?


Introduce caching in CI/CD process

Is your feature request related to a problem? Please describe.
Implement caching in CI to speed up the build and CD process
Describe the solution you'd like
Use actions/cache@v3 to cache libs and skip yarn install if is not needed
Example
      - name: Cache dependencies
        id: cache-dependencies
        uses: actions/cache@v3
        with:
          path: ./node_modules
          key: modules-${{ hashFiles('yarn.lock') }}

      - name: Install dependencies
        if: steps.cache-dependencies.outputs.cache-hit != 'true'
        run: yarn --frozen-lockfile

      - name: Build the project
         ...

moved to internal infra repo and closing this


Check if we need to modify the checks we do in the validate function of each tx type

We should check if we are correctly validating the txs before executing them. For example if we are checking that we don't call other contracts when doing the validation.
We should also check blockifier to be sure that we are following the same logic

Checklist:

[ ] InvokeFunction
[ ] Declare
[ ] DeclareV2
[ ] DeployAccount
[ ] Deploy
[ ] L1Handler

Validations done in Blockifier
For AccountTransactions (Declare _DeployAccoun_t Invoke):

verify_tx_version (Declare 0, 1, 2; Invoke 0, 1; DeployAccout 1)
check_fee_balance
handle_nonce
validate_tx

Run validation entrypoint (unless v0)
Verify no calls to other contracts
If the contract is Cairo 1 then the retdata should contain VALID
This validation is done before execution, except for DeployAccount, where the execution precedes the validation


Use URL instead of local file in command

Signed-off-by: shaoyue.chen<EMAIL_ADDRESS>/cc @zwd1208

/lgtm


Added russian roulette

Will test when we have time. We will also need to create a generic pitting function so that all instances where we are pitting creates a file to log the roles


shims.d.ts slow VSCode down.

// shims.d.ts

import type { AttributifyAttributes } from '@unocss/preset-attributify';

declare module 'react' {
  interface HTMLAttributes<T> extends AttributifyAttributes {}
}

Code above will slow some part of typescript language service of VSCode, eg. error report. IntelliSense works fine.
Steps to repoduce please checkout: https://github.com/Xwil/unocss-slow-down-vs-code.
It happens in Vite+React+TS and Next.js+TS projects.

What would you expect for the fix? I am not sure if there is anything we could do.

What would you expect for the fix? I am not sure if there is anything we could do.

Well, I am not sure about this too, but I think a hint may be helpful, it may take a long time to find out those codes may cause the editor to slow down.

Yes, it will slow down the TypeScript inference. But we must to do that to avoid the limitation of React, or we can't use the Attributify well.

Maybe you can try this to avoid the slow:
// src/shims.d.ts
import * as React from 'react'
declare module 'react' {
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
    flex?: boolean
    relative?: boolean
    text?: string
    grid?: boolean
    before?: string
    after?: string
    shadow?: boolean
    absolute?: boolean
  }
}

But it needs you to add the attributes manually.😂

for this problem, i decide not to use Attributify.


fix(package): update tfk-generate-jwt to version 1.0.14

Closes #112
https://greenkeeper.io/

Coverage remained the same at 39.13% when pulling 4b12178bf657edbfd7e285b56d4f494af95e78dc on greenkeeper/tfk-generate-jwt-1.0.14 into 56edd8c634b9d7387cab611e49b2122436bdb964 on master.


DRAFT: Conformance Testing Setup for Shim

Spin has created a set of conformance test to ensure all Spin runtimes conform to baseline requirements/expectations
Status: runs conformance test to successful termination 🎉
This is very draft:

We need to decide how to push and pull the images to/from a registry for the tests. We may wish to push the images to a public registry before the tests.
Determine how to implement TestEnvironment implementations for the shim without adding them to Spin core: https://github.com/kate-goldenring/spin/tree/shim-test-environment

@rylev for visibility

@Mossaka indeed the idea is to add this to CI, but I think we'll wait until we're confident that this can run more quickly and reliably than it currently can. The issue is that this requires pushing to an OCI registry, and we're currently using ttl.sh which is probably not a viable strategy.
@kate-goldenring What do you think about merging this as is? I'm fine keeping this as a draft PR until we add this to CI (and I can just keep making PRs to your branch), but it also might be easier to just merge and make PRs directly to this repo instead of your fork.

@rylev I agree we should merge the suite as is. @Mossaka do you mind giving a review?

Need a rebase

For now, I am skipping the TCP tests as they are failing https://github.com/spinkube/containerd-shim-spin/issues/147


Define imagePullSecret placeholder in operator.yaml

Describe the bug
We should define imagePullSecret placeholder in operator.yaml and as well as instruction how to update that with image secret in KC.
Expected behavior
Define imagePullSecret placeholder in operator.yaml

I don't know how useful this will be. The secret will match the user's environment, so a default is not strictly necessary. Additionally, imagePullSecrets are not in our critical path, so there's less importance to have a default.

Misread this, I actually don't believe that this should be   in the yaml file at all. This is native k8s, we shouldn't document native k8s operations.


Set deprecated field on CompletionItems

This PR aims to address #2042 by setting the deprecated field for completion items.
The setting the tags field for LSP 3.15 part still needs fixing, but that one is blocked due to lsp-types not being up to date with 3.15 yet.

bors r+
Thanks!

See also https://github.com/rust-analyzer/rust-analyzer/issues/2167


Integrating IdentityServer4 with WebApi .Net461

I am trying to integrate IdentityServer4 with ASP.NET MVC WebAPI.I want to achieve role based authorization. I have the following projects running.
I am using IdentityServer3.AccessTokenValidation at the WebApi side to validate my token
IdentityServer4 [a separate project]
WebApi
Javascript Application [using Extjs]
I have implemented the ResourceOwnerPassword flow and what I am trying to do is,
Make a post request to AccountController of the WebApi containing username and password
Inside the AccountController call the IdentityServer token endpoint for an access token and return the access token to the client (javascript app)
Make a request to the WebApi containing the access token.
For the above part I am success full, here is the code

AccountController
 [ActionName("Login")]
    [AllowAnonymous]
    [HttpPost]
    public async Task<BaseModel> Login(LoginModel model)
    {
        model.RememberMe = false;
        var status = await _security.Login(model.Email, model.Password, model.RememberMe);

        if (status.Status == LoginStatus.Succeded)
        {
            return new BaseModel { success = true, message = "login", data = status.Data };
        }
    }

SecurityService
public async Task Login(string userName, string password, bool persistCookie = false)
{
// discover endpoints from metadata
var disco = await DiscoveryClient.GetAsync("http://localhost:5000");
    // request token
    var tokenClient = new TokenClient(disco.TokenEndpoint, "ro.client", "secret");
    var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync(userName, password, "api1");

    if (tokenResponse.IsError)
    {
        return new LoginResponse { Status = LoginStatus.Failed, Message = tokenResponse.Error };
    }

    return new LoginResponse { Status = LoginStatus.Succeded, Data = tokenResponse.Json };
}

Security the API
I have two more actions inside the AccountController (just for testing) namely:

values() [returns success and requires no authentication]
SecureValues [returns success and requires authentication]

[HttpGet]
public BaseModel values()
{
    return new BaseModel
    {
        success = true
    };
}

[Authorize]
[HttpGet]
public BaseModel SecureValues()
{
    return new BaseModel
    {
        success = true
    };
}

calling "Values" action returns the success which is quite obvious, calling the "SecureValues" gives following

Which means that the user is not Authenticated.
My IdentityServer4 configuration is as follows:
 public class Config
{
    // scopes define the resources in your system
    public static IEnumerable<Scope> GetScopes()
    {
        return new List<Scope>
        {
            StandardScopes.OpenId,
            StandardScopes.Profile,

            new Scope
            {
                Name = "api1",
                Description = "My API",
                DisplayName = "API Access",
                Type = ScopeType.Resource,
                IncludeAllClaimsForUser = true,
                Claims = new List<ScopeClaim>
                {
                    new ScopeClaim(ClaimTypes.Name),
                    new ScopeClaim(ClaimTypes.Role)
                }
            },
           new Scope
           {
               Enabled = true,
               Name  = "role",
               DisplayName = "Role(s)",
               Description = "roles of user",
               Type = ScopeType.Identity,
               Claims = new List<ScopeClaim>
               {
                   new ScopeClaim(ClaimTypes.Role,false)
               }
           },
           StandardScopes.AllClaims
        };
    }

    // clients want to access resources (aka scopes)
    public static IEnumerable<Client> GetClients()
    {
        // client credentials client
        return new List<Client>
        {
            new Client
            {
                ClientId = "client",
                AllowedGrantTypes = GrantTypes.ClientCredentials,

                ClientSecrets =
                {
                    new Secret("secret".Sha256())
                },
                AllowedScopes = { "api1" }
            },

            // resource owner password grant client
            new Client
            {
                ClientId = "ro.client",
                AllowedGrantTypes = GrantTypes.ResourceOwnerPassword,

                ClientSecrets =
                {
                    new Secret("secret".Sha256())
                },
                AllowedScopes = { "api1" }
            },

            // OpenID Connect implicit flow client (MVC)
            new Client
            {
                ClientId = "mvc",
                ClientName = "MVC Client",
                AllowedGrantTypes = GrantTypes.Implicit,

                //flow

                RedirectUris = { "http://localhost:5002/signin-oidc" },
                PostLogoutRedirectUris = { "http://localhost:5002" },

                AllowedScopes =
                {
                    StandardScopes.OpenId.Name,
                    StandardScopes.Profile.Name,
                    "role"
                }
            },
            //for hybrid flow
            new Client
            {
                ClientId = "mvchybrid",
                ClientName ="mvc hybrid client",
                AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
                ClientSecrets =
                {
                    new Secret("secret".Sha256())
                },

                RedirectUris = {"http://localhost:5003/signin-oidc"},
                PostLogoutRedirectUris = {"http://localhost:5003"},

                AllowedScopes =
                {
                    StandardScopes.OpenId.Name,
                    StandardScopes.Profile.Name,
                    StandardScopes.OfflineAccess.Name,
                    "api1"
                }
            },
            new Client
            {
                ClientId = "js",
                ClientName = "javascript client",
                AllowedGrantTypes = GrantTypes.Implicit,
                AllowAccessTokensViaBrowser= true,
                RedirectUris = {"http://localhost:5004/callback.html"},
                PostLogoutRedirectUris = {"http://localhost:5004/index.html"},
                AllowedCorsOrigins = {"http://localhost:5004"},

                AllowedScopes =
                {
                    StandardScopes.OpenId.Name,
                    StandardScopes.Profile.Name,
                    "api1",
                    "role",
                    StandardScopes.AllClaims.Name
                }
            },
            //aspnet identity client
            new Client
            {
                ClientId = "mvcIdentity",
                ClientName = "Mvc Identity Client",
                AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
                RequireConsent = false,
                ClientSecrets =
                {
                    new Secret("secret".Sha256())
                },
                RedirectUris = {"http://localhost:5005/signin-oidc"},
                PostLogoutRedirectUris = {"http://localhost:5005"},
                AllowedScopes =
                {
                     StandardScopes.OpenId.Name,
                     StandardScopes.Profile.Name,
                     StandardScopes.OfflineAccess.Name,
                     "api1"
                }
            }
        };
    }

    public static List<InMemoryUser> GetUsers()
    {
        return new List<InMemoryUser>
        {
            new InMemoryUser
            {
                Subject = "1",
                Username =<EMAIL_ADDRESS>                Password = "password",

                Claims = new List<Claim>
                {
                    new Claim("name", "Alice"),
                    new Claim("website", "https://alice.com"),
                    new Claim(ClaimTypes.Role,"FreeUser")
                }
            },
            new InMemoryUser
            {
                Subject = "2",
                Username =<EMAIL_ADDRESS>                Password = "password",

                Claims = new List<Claim>
                {
                    new Claim("name", "Bob"),
                    new Claim("website", "https://bob.com"),
                    new Claim(ClaimTypes.Role,"PaidUser")
                }
            }
        };
    }
}

WebApi configuration
 public void ConfigureAuth(IAppBuilder app)
    {

        app.UseIdentityServerBearerTokenAuthentication(new IdentityServer3.AccessTokenValidation.IdentityServerBearerTokenAuthenticationOptions
        {
            Authority = "localhost:5000",
            RequiredScopes = new[] { "api1" },
            ClientId = "ro.client",
            ClientSecret = "secret",
            PreserveAccessToken = true
        });
       }

..and you have turned on Katana logging already?

No I haven't yet because i don't know how to do that, My IdentityServer and api are running from two different instances of visual studios,,I was wondering where to put on the logging on webapi config or at the identity server side?

In the API
https://identityserver.github.io/Documentation/docsv2/consuming/diagnostics.html

As I have mentioned I am using IdentityServer3.AccessTokenValidation while my token is being generated by IdentityServer4,,is it right? and is my configuration correct?... meanwhile I enable logging and see what I get and will be back to you...

I have added the logging but can't find the file to view the logs.. can u guide me how to view the log file and where to find it..?

yep - that's working.

what about logging..?

Is that necessary to run my API on HTTPS?

no

at least not for testing

Any update on the issue? closing for now - feel free to re-open if it needs further discussion.


Using an object with empty Properties, having all properties inside AdditionalProperties

I have a usage case in which I need the user to define a set of custom properties. I do not want nor need any normal properties. Adding any would just be unnecessary and obtrusive. Is it possible to make an object with empty "properties" or at least hide a fields inside of that for the end user, as a possible fix?

I solved this using widget: hidden

I think this should be re-opened as the original use-case should still be supported by the library without a workaround.
In my case I want users to input a custom mapping of {str: str} values and have no properties/keys pre-defined. I need the widget to allow them to add these mapping entries, and hiding prevents them from being able to edit it.

As a workaround I've monkey-patched JSONFormWidget to achieve the desired behavior:
from django.contrib import admin

from django_jsonform.widgets import JSONFormWidget
from django_pydantic_field.v2.fields import PydanticSchemaField

from project.models import Dependency

def patch_schema_for_jsonform(schema):
    """recursively patch a schema dictionary in-place to fix any missing properties/keys on objects"""

    # base case: schema is type: "object" with no properties/keys
    if schema.get('type') == 'object' and not ('properties' in schema or 'keys' in schema):
        if 'default' in schema and isinstance(schema['default'], dict):
            schema['properties'] = {
                key: {"type": "string", "default": value}
                for key, value in schema['default'].items()
            }
            # setting the actual value as a default on a hardcoded property is still not ideal as it doesn't allow the user to remove this entry from the UI, but at least it shows up
        else:
            schema['properties'] = {}

    # recursive case: iterate through all values and process any sub-objects
    for key, value in schema.items():
        if isinstance(value, dict):
            patch_schema_for_jsonform(value)

class PatchedJSONFormWidget(JSONFormWidget):
    def get_schema(self):
        self.schema = super().get_schema()
        patch_schema_for_jsonform(self.schema)
        return self.schema

class DependencyAdmin(admin.ModelAdmin):
    formfield_overrides = {PydanticSchemaField: {"widget": PatchedJSONFormWidget}}

admin.site.register(Dependency, DependencyAdmin)


Mobile Workspace v2 (fixed bugs and added floating keyboard)

Description
This is the second version of mobile workspace. This PR

fixed the following bugs(please refer to issue #1628):

Editor content cut off
Contribution page overflow

added the following features/improvements:

Floating keyboard for symbols
Overflow for tabs container(for future integration with Modules team)
Increase Draggable Handle size

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Code quality improvements

How to test

This project mainly has UI changes and manual testing should be done to ensure features work as intended across different devices.
Please refer to this wiki page on mobile workspace development for more detail of testing and feature description. These tests focus on the responsive features of the app (i.e. how the app handles resizing)
The following will mainly introduce the floating keyboard feature and ways to test it:
Feature:
Please note that currently the floating keyboard can only input to the Ace Editor. Keying in the REPL is not supported yet.

To be tested:

Showing and hiding works as expected
Dragging works as expected
Toggling to next row works as expected
Inputting works as expected for all buttons
when native keyboard is up, due to editor focus event, 1-4 works as expected. Editor does not lose focus due to the floating keyboard.

Checklist

[x] I have tested this code
[ ] I have updated the documentation

Pull Request Test Coverage Report for Build 620925879

1 of 43 (2.33%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.1%) to 28.613%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/commons/mobileWorkspace/MobileWorkspace.tsx
0
1
0.0%

src/commons/mobileWorkspace/mobileSideContent/MobileSideContent.tsx
0
3
0.0%

src/commons/mobileWorkspace/MobileKeyboard.tsx
1
39
2.56%

Totals

Change from base Build 589396723:
-0.1%

Covered Lines:
2212

Relevant Lines:
7125

💛  - Coveralls


sodium release

The test NaClTest fails for Linux. Which is a problem because it wants exactly Sodium 1.0.10. Which isn't available for Debian distributions. The latest Ubuntu derivates and Debian Stable all track Sodium 1.0.8. With which the build succeeded until the last commit.
Debian Stretch tracks Sodium 1.0.11. I can force a Jessy to use that package. But it's a hack and the test fails anyway - because it's not 1.0.10 either.
The only solution would be to build Sodium 1.0.10 from source. Which is absurd unless Usef RI really is unable to work with 1.0.8 or 1.0.11.
If not, I advise to downgrade this requirement back to 1.0.8 since this is by large the most commonly used version for Debian- and Ubuntu releases. Or to define a range of usable Sodium versions.

We will fix the issue in the upcoming release of the USEF Reference Implementation that is tentatively scheduled for the end of this month.

The fix for this issue is included in today's release (1.3.6).


Secondbranch

Secondbranch is merged with master.

Hi Adem, you seem to have done the assignment wrong. Did you get a conflict? I don't see any branches.


Add notebook status endpoint

Resolves: https://github.com/opendatahub-io/odh-dashboard/issues/315

This works if a notebook is started for the first time, when the stateful set is scaled down and up again the percentiles will not add up. @DaoDaoNoCode Let me know if that behavior is satisfactory.


Connect-AzureAD is not recognized on M1 Mac

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
Attempting to study for AZ-104 certification on Mac
environment:
CPU: Apple M1 Pro
OS: macOS Monterey version 12.2.1
Powershell version: 7.2.1
replication steps:
Install-Module -Name Az -Force
Install-Module -Name AzureAD -Force
Connect-AzureAD

additional diagnosis steps:
running Import-Module AzureAD results in the message:

Import-Module: The current processor architecture is: MSIL. The module 'REDACTED/.local/share/powershell/Modules/AzureAD/<IP_ADDRESS>/AzureAD.psd1' requires the following architecture: Amd64.

A note that REDACTED contained my username and was manually redacted by myself.
Expected behavior
that it works as documented

Actual behavior
The term 'Connect-AzureAD' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again

Error details
xception             :
    Type        : System.Management.Automation.CommandNotFoundException
    ErrorRecord :
        Exception             :
            Type    : System.Management.Automation.ParentContainsErrorRecordException
            Message : The term 'Connect-AzureAD' is not recognized as a name of a cmdlet, function, script file, or
executable program.
                      Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
            HResult : -2146233087
        TargetObject          : Connect-AzureAD
        CategoryInfo          : ObjectNotFound: (Connect-AzureAD:String) [], ParentContainsErrorRecordException
        FullyQualifiedErrorId : CommandNotFoundException
        InvocationInfo        :
            ScriptLineNumber : 1
            OffsetInLine     : 1
            HistoryId        : 11
            Line             : Connect-AzureAD
            PositionMessage  : At line:1 char:1
                               + Connect-AzureAD
                               + ~~~~~~~~~~~~~~~
            InvocationName   : Connect-AzureAD
            CommandOrigin    : Internal
        ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
    CommandName : Connect-AzureAD
    TargetSite  :
        Name          : LookupCommandInfo
        DeclaringType : System.Management.Automation.CommandDiscovery, System.Management.Automation,
Version=<IP_ADDRESS>0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
        MemberType    : Method
        Module        : System.Management.Automation.dll
    Message     : The term 'Connect-AzureAD' is not recognized as a name of a cmdlet, function, script file, or
executable program.
                  Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
    Data        : System.Collections.ListDictionaryInternal
    Source      : System.Management.Automation
    HResult     : -2146233087
    StackTrace  :
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes,
SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin,
ExecutionContext context)
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin)
   at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin
commandOrigin, Nullable`1 useLocalScope)
   at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
   at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[]
commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput,
CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][]
commandRedirections, FunctionContext funcContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject          : Connect-AzureAD
CategoryInfo          : ObjectNotFound: (Connect-AzureAD:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
InvocationInfo        :
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 11
    Line             : Connect-AzureAD
    PositionMessage  : At line:1 char:1
                       + Connect-AzureAD
                       + ~~~~~~~~~~~~~~~
    InvocationName   : Connect-AzureAD
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1

Environment data
Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Darwin 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

This module isn't delivered by the PowerShell group, but by another team in Microsoft.
It is written for Windows PowerShell V3 to V5.1, and the authors put this specifically in their PSD file (path in error message)
# Processor architecture (None, X86, Amd64) required by this module
ProcessorArchitecture = 'Amd64'

# A URL to the main website for this project.
ProjectUri = 'https://docs.microsoft.com/en-us/powershell/azuread/v2/azureactivedirectory'

Depending on how the DLLs behind it were compiled it may work if you simply remove the processor architecture reference from the file, but really you need to contact the team behind it.


remove default plugins

Hi ther and thanks for the excellent tool. I'm running into an issue where the automatically included CaseSensativePlugin conflicts with and breaks other plugins we use in our webpack setup. Specifically because it relys on the fs module instead of the exposed compiler filesystem. In any case it prevents my use of storybook while that issue is pending. It would be great if there was a way of completely opting out of any of the default plugins.

Check the extending default config section of our docs.

With that, you can access our plugin list and you could remove that.

perfect! missed that part


Fish config: omf and bass

Couldn't install omf and bass with script, need to try later

It's also not changing default shell to fish


Dynamic Quote Generator not working

Workflow Issue
The project named - Dynamic Quote Generator, is not functioning properly ... Not generating any quotes on click, instead, it's displaying an error alert
Event
Part of GSSOC

Assign this to me, & I will look into the issue

Yes @TidbitsJS Its not working! You can look into it.

Yes @TidbitsJS Its not working! You can look into it.

Thank you @urvashi-code1255  ... Will it be okay if I changed the UI as well? ( It doesn't seem that appealing to me )

Yeah sure you can try good designs on it. @TidbitsJS

Yeah sure you can try good designs on it. @TidbitsJS

Thank you @urvashi-code1255 :)

I am trying few designs for Dynamic Quote Generator ( The bug is resolved )
I tried the neumorphism very first ... Let me know what you think ( whether should I go with this or do something different ) @Vishal-raj-1 & @urvashi-code1255

It's looking good to me @TidbitsJS


Hystrix code corrections

Hystrix code corrections [ Used Hystrix today 👍  , looked a bit into hystrix code ]

Corrected for NullPointerException case on null command2
Used current onEmit instead of deprecated onComplete
Used System.arrayCopy() java method directly
Used StringBuilder
inner enum is static by default
narrowed scope to needed

rebuild this please, error not related to PR.


Ripple doesn't work on bootstrap modal

Hi,
Whenever I put a ripple inside of a bootstrap modal, it does not display on the button. This is maybe because on bootstrap model, it has z-index of 240 so the ripple could maybe be just below the modal or something.
Also, I love this library, thanks for making it!

@rohinarya12
Please specify className option and set z-index to that CSS class.
Or try appendTo: "parent" option.
And thank you for loving this library!

The second option with ripplet.defaultOptions.appendTo = 'parent' worked!  This is definitely the best looking waves library :D!


Autocrafting recipes that have items with durability sometimes stop working.

Issue description:
Autocrafting recipes that have items with durability sometimes stop working.
What happens:
I noticed this with 2 items. iChisel from chisel mod and empowerer from actually additions mod.
I set up full autocrafting chain for this items and it worked for some time.
At some point it stop working saying in case of ichisel - that dimond chisel is missing, in case of empowerer - double battery is missing.
To make them work again i had to remake ichisel and empowerer patterns with newly crafted dimond chisel and double battery (using items created by JEI didn't work)
What you expected to happen:
The recipes above must work.
Steps to reproduce:
I don't know what exactly causes the recipe to stop working.
...
Version (make sure you are on the latest version before reporting):

Minecraft: 1.12.2
Forge: forge-<IP_ADDRESS>85
Refined Storage: refinedstorage-1.5.31

I play singleplayer.

sounds like #1676

@Maximal-am Respond in issue #1676 with all the items that are not working. Thanks.


CORS error when visiting the demo website

Hi, I wanted to check out the demo but the website is currently not working, quick look in the console gave me a CORS error

The backend has not yet been deployed, hence the frontend will error out. This project is very much WIP.


Configuration of ingest endpoints

Is your feature request related to a problem? Please describe.
Ability to specify different endpoints for different signals. Especially important as paths may change over time.
Describe the solution you'd like
Are we going to specify more specific variables to configure ingest endpoints such as SPLUNK_INGEST_URL (e.g. https://ingest.us0.signalfx.com)? Or maybe even something more specific such as SPLUNK_METRICS_URL (e.g. https://ingest.us0.signalfx.com/v2/datapoint)?
Now the specification mentions only about the SPLUNK_REALM that allows to configure ingesting indirectly.
Describe alternatives you've considered
Just using SPLUNK_REALM
Additional context
#55

Closing as SPLUNK_REALM seems to be good enough.


Only emit declarations for code that has an /** @external */ JSDoc annotation

Search Terms
external emit declaration
Problem
When working with the --stripInternal compiler flag, you want to create a clean declaration file that only exposes the stuff your library users should use.
You as library developer must add  the /* @internal */ annotations to all the parts of your code you don't want in the declaration file. 'Sloppy developers in the team' forget to set this annotation and expose stuff without realizing it.
Suggestion
It would be handy if we could reverse this.
We could start with an empty declaration file when a compiler flag --onlyExternal is set and only expose the things that have an /* @external */ JSDoc annotation

/* @external */ exposes the 'item' and the 'parent path' to acces it.
/* @internal */ used inside an /* @external */ parent hides the 'item' and and all its children.
/* @external */ used inside an /* @internal */ parent is ignored and stays internal.

Remarks

When using the /* @internal */ annotation, you mostly try to place it on top level structures (like namespaces). In these cases it is not a problem when code is added to the namespace. It is mostly a problem when new files or namespaces are added.
When using the suggested /* @external */ annotation, you normally will place it more deeply, like on specific functions, variables or classes to expose.

Please implement this!
I'm using --stripInternal and outFile to build my library.
I have many files inside my project, but I olny want to export a single class and few interfaces.
Now I need to add /** @internal */ for every helper class/function.
But, the /** @external */ is already used by JSDoc, maybe change  to something like extern.

Completely agree. It is currently unclear how to write a typescript package without exposing all of its internal or "private" exports to the world. --stripInternal and outFile appears to be the best approach (thanks @GongT!), but a whitelist would be much better. Another approach would be to require a choke-point that exports all the members intended for publication, probably an index.ts file. Using JSDocs feels a bit clunky and second-class, IMHO :)


⚠ Processors has degraded performance

In 933fd85, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 74 ms

Resolved: Processors performance has improved in 015de7f.


[v2.8] Enable metrics in nginx template, bump nginx to 1.11.3

backport: https://github.com/rancher/rancher/issues/47681

Tested on rancher v2.8.10-alpha1 and k8s version v1.28.15.
nginx-1.11.3-rancher1 image has container argument --enable-metrics=true set. Hence issue can be closed.


WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op while saving (showing 5 of 6). These functions will not be directly callable after loading.

Click to expand!
Issue Type
Support
Have you reproduced the bug with TF nightly?
No
Source
binary
Tensorflow Version
2.11
Custom Code
Yes
OS Platform and Distribution
Ubuntu 22.04.1 LTS
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
The warning appears:

WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op while saving (showing 5 of 6). These functions will not be directly callable after loading.

Can you please, explain, what is meant by this warning and how to fix it? I have the following accompanying questions to it:

Function traces are basically graph representations of functions or something else?

If these jit traces are not found in a loaded model, will they be generated again? Is model compilation needed for regeneration?

Are these functions needed only for training or also for prediction/evaluation?

I have found in Keras docs (https://keras.io/api/models/model_saving_apis/) that I can disable saving the traces with the following note:
"Disabling this will decrease serialization time and reduce file size, but it requires that all custom layers/models implement a get_config() method."

Why would the get_config() method be only needed when I disable saving the traces?

Thanks in advance for any explanations given!
### Reproducer

It's not my code but the warnings appear e.g. here: https://jovian.com/blog/tutorials/%20parameter-logging-wandb-ai

### Relevant log output

WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op, _jit_compiled_convolution_op while saving (showing 5 of 6). These functions will not be directly callable after loading.

Hi, @clime
Apologize for the delay and as far I know, I think this warning can be safely ignored as you can find the same warning even in Tensorflow-Tutorial and that warnings are that function could not be traced. It should be safe to ignore.
model.save() will not only try to save the weights/variables, but also trace functions of the model and save their graph representations. This is what is failing for that function, and the warnings tell you about that.
If you want to continue training a model, you probably want to recreate the model from Python code anyway, and load/save just the weights. The tf.keras.callbacks.BackupAndRestore does this automatically at the end of each epoch. So if you interrupt the training script, next time you start it, it should automatically pick up from the beginning of the interrupted epoch.
As far as know these functions are needed while training the model I think those warnings are coming while training the model.
You can refer this Stack overflow answer also which supports ignoring those warnings.
If you're looking to disable absl INFO and WARNING log messages please use below code snippet:
import absl.logging
absl.logging.set_verbosity(absl.logging.ERROR)

I hope I answered your questions and if I miss something here, Please let us know ? Thank you!

Thanks, but I don't want to suppress the warning and I would also prefer not to ignore it. There should be a clean way to get rid of them.
My questions are:

Why traces of these particular functions cannot be saved?
If I decide to save the model without traces, will I be able to later load the model without recompiling and use it for evaluation?
If I compile the model (load_model(compile=True)), will these jit functions be regenerated?
Why would the get_config() method be only needed for all custom layers/models (I don't actually have any custom layers or models) when I disable saving the traces? Why is this get_config()  method relevant at all?

ping :)

Hi, @clime
Apologize for the delay and I found similar issue #47554, If you save your model in SavedModel format which is the more comprehensive save format that saves the model architecture, weights, and the traced Tensorflow subgraphs of the call functions. This enables Keras to restore both built-in layers as well as custom objects and if saved model reloads without any change in model architecture, layers or Parameters then there shouldn't be any problem.
If you're saving your model in .h5 format then you won't get any such warnings
Configuration of a Sequential model or Functional API model, These types of models are explicit graphs of layers their configuration is always available in a structured form and get_config() and from_config() API's calling will return a Python dict containing the configuration of the model. The same model can then be reconstructed via Sequential.from_config(config) (for a Sequential model) or Model.from_config(config) (for a Functional API model).
If you save the model in SavedModel format without traces, you can load the model without recompilation by doing load_model(compile=False) and if you compile the model load_model(compile=True) as far I know these jit functions warnings may come, you can refer our official documentation for Save and load Keras models  and also please refer this answer on stackoverflow, I hope I'm able to answer your questions.
If you still need any further help please let us know ? Thank you!


Grape v(1.7.1) isn't compatible with ruby v.3.2.2

I have updated my ruby from 2.7.6 to 3.2.2 Now, Grape isn't working fine with ruby v3.2.2.
I'm using fail Grape::Exceptions::Validation, params: ["Sample Param"]. Now, grape is returning the following errors.
*** ArgumentError Exception: wrong number of arguments (given 1, expected 0; required keyword: params).
https://github.com/ruby-grape/grape/blob/master/lib/grape/exceptions/validation.rb is accepting keyword argument but keyword argument is deprecated in ruby v3.
See: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Care to add ruby 3.2.2 to CI? Let's see if that fails too.

It's still failing on CircleCi.

We don't use CircleCI. Can you please make a PR into this repo so we can see the errors?

Sorry, there was an issue in my application code. There is no issue in Grape gem.


TypeError on saving .mp4 file

Platform: macOS 10.12.6
Kap Version: 2.x beta
Steps to reproduce
Do a custom sized recording
Attempt to save to Desktop as .mp4
Current behaviour
Unhandled Promise Rejection
TypeError: Error processing argument at index 1, conversion failure from undefined
at ShareService.showError (/Applications/Kap Beta.app/Contents/Resources/app.asar/dist/main/share-service.js:92:31)
at ShareService.run (/Applications/Kap Beta.app/Contents/Resources/app.asar/dist/main/share-service.js:134:12)
at
Expected behaviour
Save file without error
Workaround
Return to the 1.x release

I was just able to reproduce this error on <IP_ADDRESS>1.  OSX 10.13.3 High Sierra.
Error in plugin kap
NonError: 1
at module.exports.input (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/ensure-error/index.js:14:10)
at ShareService.showError (/Applications/Kap.app/Contents/Resources/app.asar/dist/main/share-service.js:102:108)
at /Applications/Kap.app/Contents/Resources/app.asar/dist/main/share-service.js:151:17
at Generator.throw ()
at step (/Applications/Kap.app/Contents/Resources/app.asar/dist/main/share-service.js:37:191)
at /Applications/Kap.app/Contents/Resources/app.asar/dist/main/share-service.js:37:402
at
at process._tickDomainCallback (internal/process/next_tick.js:135:7)

@sonaro Looks like your issue is related to #377, does it happen consistently and only when exporting an MP4?

@skllcrn Ah yes, #377 is more fitting than this one.  Should I add my comment to #377 and close this one?

Yes please @sonaro 🤘

Please close.

@sklllcrn @albinekb Please close.


Back Button added in all blogs

Fixes Issue #1014

Added back button in all the blogs redirect to blog.html

can you keep the colour of button blue

ok i will change it

@akshitagupta15june  please check. You have closed the issue

please check and merge

Good work!


fix an annoyance in SkylineTester when switching back and forth from parallel mode …

… - formerly the "Offscreen" setting would be forced True. It's left alone now, and its control is replaced with a text hint when parallel mode is selected

Feel free to tweak any language then merge to master

Yes, I must have messed up when trying to manually select just the meaningful changes in the salad that the IDE makes when changing a form's contents. I'll sort this out, thanks


c++ support for r3 can't compile on gcc-4.1.2

when compiling the example simple_cpp.cpp, the typedef from pcre header causes a compile error:
In file included from ../include/r3.hpp:11,
                 from simple_cpp.cpp:4:
../include/r3.h:50: error: declaration of ‘pcre_extra* _node::pcre_extra’
/usr/local/include/pcre.h:385: error: changes meaning of ‘pcre_extra’ from ‘typedef struct pcre_extra pcre_extra’
In file included from simple_cpp.cpp:4:

the code snippet from pcre.h:385:
typedef struct pcre_extra {
  unsigned long int flags;        /* Bits for which fields are set */
  void *study_data;               /* Opaque data from pcre_study() */
  unsigned long int match_limit;  /* Maximum number of calls to match() */
  void *callout_data;             /* Data passed back in callouts */
  const unsigned char *tables;    /* Pointer to character tables */
  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
  unsigned char **mark;           /* For passing back a mark pointer */
  void *executable_jit;           /* Contains a pointer to a compiled jit code */
} pcre_extra;

yes， i encounter this error on centos 6， what‘s should we do?

When building r3 and simple_cpp.cpp using an old compiler like g++-4.4.7 you get this build error.
It compiles just fine if you use a later GCC like 4.8 (from March 2013), so the recommendation is to use a more recent compiler.
Since CentOS 6 is EOF (End of life) since 2020 you should at least use CentOS 7, which provides g++-4.8.5 and works fine when I compared.
Are we OK with closing this issue with above recommendation?


Flush AsyncPoolSink on the current thread if tearing down, drop the default logger in atexit callback

Fixes #64.
I've figured out what happened with this bug. There are 2 things went wrong:

crossbeam uses thread-local internally, which is not supported in atexit callback. This is the reason of panic use of std::thread::current() is not possible after the thread's local data has been destroyed.
Fixed it by directly flushing the sinks on the current thread if the program is tearing down.

The default logger just gets flushed in atexit callback, but not dropped. This results in the program not waiting for the asynchronous thread to finish but simply exiting after the task has been sent.
~Fixed it by changing the global variable with Option<T>, so that we could explicitly drop the default logger in atexit callback.~ Reverted, paragraph 3 addresses the problem.

UPDATE: Destroying the thread pool before the final flush is required as well, otherwise pending log tasks may be lost.
Fixing this by ~adding a RwLock to ThreadPool~ and explicitly destroy the thread pool before the final flush, but needs to be benchmarked to see if the performance change is acceptable.
UPDATE: Changed to ArcSwapOption for a better performance.

Related discussion #63 #65, CC @MrCoco5921 @Bestfast

Benchmark results
On ArchLinux, commit e1f9a068b1c28dcd223ba121df7853f9dc263e65
Before
[info] --------------------------------------------
[info] Messages     : 1000000
[info] Threads      : 10
[info] Queue        : 8192 slots
[info] Queue memory : 8192 x 120 = 960 KB
[info] Total iters  : 3
[info] --------------------------------------------
[info]
[info] ********************************************
[info] Queue Overflow Policy: Block
[info] ********************************************
[info] Elapsed: 0.355563435 secs         2812437/sec
[info] Elapsed: 0.392709661 secs         2546410/sec
[info] Elapsed: 0.350509562 secs         2852989/sec
[info]
[info] ********************************************
[info] Queue Overflow Policy: DropIncoming
[info] ********************************************
[info] Elapsed: 0.080866536 secs         12366054/sec
[info] Elapsed: 0.077687493 secs         12872084/sec
[info] Elapsed: 0.075060614 secs         13322566/sec

After
[info] --------------------------------------------
[info] Messages     : 1000000
[info] Threads      : 10
[info] Queue        : 8192 slots
[info] Queue memory : 8192 x 120 = 960 KB
[info] Total iters  : 3
[info] --------------------------------------------
[info]
[info] ********************************************
[info] Queue Overflow Policy: Block
[info] ********************************************
[info] Elapsed: 0.417248511 secs         2396653/sec
[info] Elapsed: 0.434975067 secs         2298982/sec
[info] Elapsed: 0.406287435 secs         2461311/sec
[info]
[info] ********************************************
[info] Queue Overflow Policy: DropIncoming
[info] ********************************************
[info] Elapsed: 0.123620255 secs         8089289/sec
[info] Elapsed: 0.104598975 secs         9560323/sec
[info] Elapsed: 0.107852031 secs         9271962/sec

Guess the main reason for the worse is the new RwLock added to ThreadPool, I will try to see if there is a solution with better performance.

If we use ArcSwapOption instead of RwLock, we could get a nice performance - almost no impact.
[info] --------------------------------------------
[info] Messages     : 1000000
[info] Threads      : 10
[info] Queue        : 8192 slots
[info] Queue memory : 8192 x 120 = 960 KB
[info] Total iters  : 3
[info] --------------------------------------------
[info]
[info] ********************************************
[info] Queue Overflow Policy: Block
[info] ********************************************
[info] Elapsed: 0.339878523 secs         2942227/sec
[info] Elapsed: 0.388267234 secs         2575545/sec
[info] Elapsed: 0.357158248 secs         2799879/sec
[info]
[info] ********************************************
[info] Queue Overflow Policy: DropIncoming
[info] ********************************************
[info] Elapsed: 0.071169735 secs         14050916/sec
[info] Elapsed: 0.075486378 secs         13247423/sec
[info] Elapsed: 0.074043964 secs         13505489/sec

Reverted commit Drop the default logger in atexit callback. We have explicitly destroyed the thread pool, so no longer need the drop function to wait for tasks to complete. Let's minimize the changes, keep the rule in Rust that global variables don't get dropped.