Support namespace filtering for reading resources from local file

What type of PR is this?
/kind feature
What this PR does / why we need it:
Support namespace filtering for reading resources from local file
Fixes https://github.com/kubernetes-sigs/ingress2gateway/issues/37
NONE

I less like the namespace moving around between functions.
I think we got into the stage where we should have a printRunner object that holds the data we need; for example all the flags we hold in vars etc.
And break the i2gw.Run(). something like:
cmd/print.go
type printRunner struct {
	namespace string
	outputFormat string
	...
}

func (pr *printRunner) PrintGatewaysAndHttpRoutes(cmd *cobra.Command, args []string) error  {
  i2gw.aggregate (something like, we should break i2gw package to smaller things other than Run() and use it here)
  ...
}

func newPrintCommand() *cobra.Command  {
  pr :=  &printRunner{}
  cmd := &cobra.Command{
	Use:   "print .....",
	Short: "print http routes and gateway converted from ingresses...",
	RunE:  pr.PrintGatewaysAndHttpRoutes,
  }
  cmd.Flags().StringVarP(&outputFormat, "output", "o", "yaml",
		fmt.Sprintf(`Output format. One of: (%s)`, strings.Join(allowedFormats, ", ")))
  ... (other flags)
  return cmd
}

and change cmd/root.go accordingly like adding rootCmd.AddCommand(newPrintCommand)
Long comment but I hope that makes sense.

As discussed offline, I will implement this as a separate issue and PR as this one is focused on implementing the namespace filtering for files


Relate Resources/Training/Studies to Participant

This is somewhat undefined, but we want the ability to surface studies,resources, and training to participants that will be most applicable to them.  To do this, we need to clearly and unambiguously link data we are collecting about participants to data we collect about a study.  Some options would include:

Associating certain diagnosis with a Study/Resource/Training
Associating age ranges to a Study/Resource/Training
Associating a location with a Study/Resource/Training

There are likely more links

In the 11/19/19 meeting we talked about allowing users to set "My Topics" -- we could pre-populate this list with suggestions based on registry questions (age, location, behaviors, diagnoses) and the user could add/subtract topics as they wished.
We would then display search results on their profile page based on these topics


Tasklist post-playtest

Motivation
This is a collection of everything that we want to implement post-playtest, either as a request by the playtesters, or other things we noticed along the way. Expand this list with everything we mentioned in old PRs as future issues.
To Do

[ ] About Page, which should include our GitHub Repository
[ ] Update the README.
[ ] #295

For overworld

[ ] remove saving coordinates and items or implement complete saving system
[ ] simplify creating dialogues
[ ] allow dialogues without any quest attached
[ ] restructure dialogue system --> should not require active_dialogue as reference point to obtain state of dialogue-entries --> this should be communicated in the module itself
[ ] refactor singleton --> remove the npc-creation methods! --> don't belong there --> those should be contained in a class that can be called to initialize all dialogues and return the dictionary which is currently created in the singleton

this was all fixed in the current release. Everything that wasnt fixed is tracked in #380


Leverage Existing Helm Repo

When using a repo already installed into the helm repo list, the cli will now use that reference instead  of creating a new temp repo.
Closes #259

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

Thanks for your contribution @runyontr!
Apologies this took so long.


WSL2 defaults to root directory (/) instead of user home (~) on start up

Version
Microsoft Windows [Version 10.0.19044.1415]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
Ubuntu 20.04
Other Software
Windows Terminal 1.11.2921.0
Repro Steps
Open WSL2 using Windows Terminal and look at the landing directory.
Expected Behavior
It should be in the user's home directory, ~ or /home/navneethc.
Actual Behavior
It is the / (root) directory
Diagnostic Logs
This has always been the home directory.
The profile in Windows Terminal for this disto points to //wsl$/Ubuntu-20.04/home/navneethc as the starting directory.
The changes that have happened between the last time I saw ~ (in the last week or so) is I installed a few Windows updates including 21H2 for Windows 10.

Change starting directory from //wsl$/Ubuntu-20.04/home/navneethc to /home/navneethc likes below.

@yes89929, thank you, that worked! When did this change happen? Is it due to the 21H2 update?


Standalone installation instructions

Currently, there is no information on separating the language server from the VSCode extension. For users of other editors, it might be good to provide instructions for installing the server outside of VSCode to be used in something like Neovim.

Hi @Simerax and @enderger . Yes, that's the recommended method for getting it running. The https://github.com/bscan/PerlNavigator docs have more information about this type of configuration, as the Perl and Raku Navigators both share the same architecture. For the Perl version, it also can be downloaded from NPM, which is something I'd like to add here.
Pull requests would also be more than welcome. The settings will likely vary per editor, so crowdsourcing this would be helpful.

I couldn't get the Raku language server to work with emacs 29.1. I did these steps:
git clone https://github.com/bscan/RakuNavigator(https://github.com/bscan/RakuNavigator)
cd RakuNavigator
npm install
npm run compile

Then I went to the PerlNavigator repo, where there are instructions for emacs and eglot, and I converted this:
     (setq-default eglot-workspace-configuration
          '((:perlnavigator . (:perlPath
                    "/path/to/perl"
                    :enableWarnings t))))

    (with-eval-after-load 'eglot
      (add-to-list 'eglot-server-programs
        `((cperl-mode perl-mode) . ("/path/to/perlnavigator", "--stdio"))))

    (global-company-mode)

    (add-hook 'cperl-mode-hook 'eglot-ensure)
    (add-hook 'perl-mode-hook 'eglot-ensure)

to this:
    ;;Raku languag server:
    (setq-default eglot-workspace-configuration
        '((:rakunavigator . (:rakuPath
        "/usr/local/bin/rakudo-moar-2024.01-01-macos-arm64-clang/bin/raku"
         :enableWarnings t))))

    (with-eval-after-load 'eglot
      (add-to-list 'eglot-server-programs
          `((raku-mode) . ("/Users/7stud/RakuNavigator/server/out/server.js", "--stdio"))))

    ;;(global-company-mode)

    ;;(add-hook 'cperl-mode-hook 'eglot-ensure)
    (add-hook 'raku-mode-hook 'eglot-ensure)

I added that to my .emacs file, then I restarted emacs, then I opened the file b.raku and the mode line specified (Raku), then I did M-x eglot  , but I got the error:
Doing vfork: Exec format error

Here's the full output:
Loading /opt/local/share/emacs/site-lisp/subdirs.el (source)...done
Loading /Users/7stud/.emacs.d/custom.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
b.raku has auto save data; consider M-x recover-this-file
Error in post-command-hook (#\[0 "\\303\\301!\\205�r\\301q\\210\\304\\305\\300\\242\\306#\\210
?\\205�\\307\\310\\311 \\")\\207" \[(#0) #<buffer b.raku> eglot--managed-mode buffer-live-p remove-hook post-command-hook t apply eglot--connect eglot--guess-contact\] 4\]): (file-error "Doing vfork" "Exec format error")
Mark set
funcall-interactively: Buffer is read-only: #<buffer \*Messages\*>
Mark set
Doing vfork: Exec format error

Hi @7stud, I believe the issue is that server.js is not an executable. For perlnavigator, I provide an executable that is installed in /usr/local/bin automatically when you npm install perlnavigator-server (see here: https://github.com/bscan/PerlNavigator/blob/main/server/bin/perlnavigator )
For the Raku version, I have not yet uploaded this to npm or added the executable. In the meantime, you can preface the command with "node" and it should work. See the comment from @rcmlz as well where they used this as a command:
"argv": ["node", "/Users/me/.raku/RakuNavigator/server/out/server.js", "--stdio"],

There's lots of good information here, but could I sugest adding installation instructions to README documentation per editor?

It is working for me in emacs, installing as in https://github.com/bscan/RakuNavigator/issues/13#issuecomment-1424557742 and then:
(with-eval-after-load 'lsp-mode
  (add-to-list 'lsp-language-id-configuration '(raku-mode . "raku"))

  (lsp-register-client (make-lsp-client
                        :new-connection (lsp-stdio-connection '("node" "/home/user/RakuNavigator/server/out/server.js" "--stdio"))
                        :activation-fn (lsp-activate-on "raku")
                        :server-id 'raku-navigator)))

However it is extremely limited. I don't have VSCode installed to test, so I'm not sure if in VSCode it has more functionality and I haven't fully configured it right. It only completes symbols in my code, not from the standard library, and sometimes gets wrong which symbols are in scope for completion. The doc doesn't show docstrings, just (subroutine) name.

Hi @bo-tato, glad it's working. A pull-request on how to get this working in emacs would certainly be welcome. There is similar documentation on the Perl Navigator that could be of use: https://github.com/bscan/PerlNavigator#emacs
Yes, the functionality is currently limited. For autocompletion, it does not currently consider scope. It also supports autocompletion of installed modules, including docstrings, plus go-to definition to those modules.

Another nice feature is the reporting of DocumentSymbol which vscode uses heavily. Here's an example showing the outline view on the left, the "sticky scroll" feature where it pins the line of code containing the class, and the breadcrumbs.

The other key feature is syntax checking where it compiles the code and gets diagnostics from the raku compiler:

Although generally speaking, you are correct that this language server is missing a variety of features (e.g. code formatting, standard library functions and docs, parsing all files in a project, better understanding of scope). I've had much more success with the Perl version, both in terms of the features it supports, and the larger community of contributors. I'd certainly love some help with this project if anyone is interested in collaborating.

Thanks a lot for the great answer and images. It is working like that for completion and documentation of module names. Other than module names I think it doesn't support docstrings yet? If I have:
#| some doc for foo
sub foo { say "foo" }
say &foo.WHY;

and request lsp documentation with the cursor on foo, it just says (subroutine) foo without the docstring. And it doesn't show any documentation for say or any other method.
The current raku-mode for emacs does support the equivalent of documentsymbols (through SMIE, basic grammar that somewhat parses raku) and syntax checking (through flycheck). It's goto definition is just simple text search though, raku navigator's goto definition is better. I was hoping for more display of documentation and autocompletion but it seems that's limited for now. For adding emacs instructions to the documentation, it should probably be using eglot rather than lsp-mode. eglot is the now standard, included in emacs by default, lsp client. I just happen to still be using the older 3rd party lsp-mode.
Right now I'm just at the stage of playing around a little with Raku. But if I do actually end up adopting it as a language I use for scripting or coding then I would be interested in collaborating on improving the lsp and editor support

Thanks @bo-tato, sounds great! It does not support docstrings yet, but that would be a great addition. Should be straightforward since it's already parsing documentation. And yes, I'd love to collaborate if you continue down the path of using Raku.


Fix Uris.getUri

Uris.getUri(@NonNull String path) is replacing https://agpush-dpassos.rhcloud.com/ag-push/ by
/https%3A%2F%2Fagpush-dpassos.rhcloud.com%2Fag-push%2F

Most likely was a wrong call after the refactoring. Probably fixed via d0df3e2b.


Add Sentinel Password Option

Add Sentinel Password Option
However, it can not support sentinels usage with different passwords, but I think this should not happen.
issue: https://github.com/go-redis/redis/issues/1020#issuecomment-494358866

Thanks, but closing in favor of https://github.com/go-redis/redis/pull/1043


Documentation mistype - custom scalar

In ferry docuemntation, can see a complete build.yaml example.
This build.yaml has a misstype with type_overrides that should be types_overrides. Attention with extra s in types.
With mistype type_overrides, I get this error but with types_overrides no

With mistype type_overrides, I get this error but with types_overrides no

No, this is not a typo. It should be type_overrides.
Just because the error isn't thrown when you change it to types_overrides doesn't mean that your type overrides are in fact being recognized (feel free to test it). You could put any key, it will just be ignored by the builder.

Interesting. So, I back to first problem described here.
Should I close this issue and open other with these problem?

I suggest using the discord to get support with your specific implementation


Tooltips do not support line breaks

Well, they do when rolled over, but when clicked, they do not and it makes them a bit cumbersome to read, forcing the user to scroll to the right. Also it does not look good.
I tried to keep the text to one line, but sometimes this just cannot be done.
Can something be done about it?

Migrated to bootstrap's tooltips, it should be OK now.

Migrated to bootstrap's tooltips, it should be OK now.

 But it is only now I have noticed that:

The text in the tooltips is horizontally aligned to the center, which does not look good especially for longer tooltips, could you make it aligned to the left?
And the tooltips displayed when rolled-over are maybe tad bit narrow (definitely narrower than when the question mark is clicked), making it hard to read the longer ones. Could you make the displayed tooltips as wide as those displayed when clicked?

TODO: remove the hover

Hover still supported, but behaviour is now the same as for the "clicking" option. This is to keep the user friendliness and consistency for desktop browsing.


AlwaysExpandDepth prevents table formatting

The AlwaysExpandDepth option doesn't allow table formatting at the specified level.  Since tables write their children each on separate lines, they should qualify as "expanded" for purposes of this setting.
Example:
input (with AlwaysExpandDepth=0):
[ [1, 22, 9 ], [333, 4, 9 ] ]

expected/desired output:
[
    [  1, 22, 9],
    [333,  4, 9]
]

actual output:
[
    [1, 22, 9],
    [333, 4, 9]
]

Fixed in 3.0.2.


Fix internlm after https://github.com/vllm-project/vllm/pull/2860

Sorry, I was shooting a little too fast with https://github.com/vllm-project/vllm/pull/2860 and it got merged before I could try it out end-to-end. This PR fixes the model, to verify the fix I ran the following:
In [1]: from vllm import LLM, SamplingParams

In [2]: prompts = [
   ...:     "Hello, my name is",
   ...:     "The president of the United States is",
   ...:     "The capital of France is",
   ...:     "The future of AI is",
   ...: ]
   ...: sampling_params = SamplingParams(temperature=0.8, top_p=0.95)

In [3]: llm = LLM(model="internlm/internlm-7b", trust_remote_code=True)

In [5]: outputs = llm.generate(prompts, sampling_params)

In [6]: # Print the outputs.
   ...: for output in outputs:
   ...:     prompt = output.prompt
   ...:     generated_text = output.outputs[0].text
   ...:     print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
   ...:
Prompt: 'Hello, my name is', Generated text: ' Lorena. I am a native Spanish speaker who loves to travel, read,'
Prompt: 'The president of the United States is', Generated text: " in Europe this week, but he's only making one stop in the former Soviet"
Prompt: 'The capital of France is', Generated text: ' Paris. The city is also called “City of Light” and “City of'
Prompt: 'The future of AI is', Generated text: ' bright, but there are a few things to be aware of\n\nThe future of'

The error was that https://huggingface.co/internlm/internlm-7b/blob/main/config.json doesn't have num_key_value_heads.

No worries, I should have written that I hadn't tested it yet 😓
I tested it now with internlm/internlm-chat-20b, internlm/internlm-7b and internlm/internlm-chat-7b so should be ready :)


Problems with React -->There is no action for buttons on the website

Thanks @mahmoudmohamed22 for pointing the issue I had resolved this by adding the missing class.


[Bug] Cats are spawning around regardless of non-conditional cat spawning

I've tried turning non-conditional cat spawning on and off, neither seems to impact the random cats spawning in my base lol. The mod is incredible otherwise though, it's really cute!

Hi Wpgradford, nice to hear you are enjoying the mod :).
What Version are you using?
How long did you play with it disabled that you were still seeing cats spawn?
ty for bringing this issue up!

I'm using Cats Expanded 1.0.0 for Fabric version 1.18.2. I'm not sure how long it takes for a cat to spawn, I'll start a new world and keep my eye out for when the first one spawns

Hi, sry for seemingly abandoning this issue.
Development has shifted to 1.19.0 and last time i tested it while working on 1.18.2 it worked correctly for me.
If you find any other issues feel free to mention them here.


Document use of external memory Spark/JVM

I was helping out a user in the forum, and I found out about the useExternalMemory parameter that, as far as I can understand, will make use of the out-of-core algorithm.
I'm a bit confused about the purpose of this parameter vs. the examples we have for how to use external memory, i.e. changing the input data path.
Is the effect of these two the same? We might want to document this in that case.

@thvasilo useExternalMemory is needed for XGBoost4J-Spark, since you are not reading from a text input. Here is the documentation: https://xgboost.readthedocs.io/en/latest/jvm/scaladocs/xgboost4j-spark/index.html#ml.dmlc.xgboost4j.scala.spark.XGBoostClassifier@useExternalMemory:org.apache.spark.ml.param.BooleanParam


 Please call client.syncShutdown() when no longer needed.
2022-06-22 20:25:53.435699+0500 Autrado[17144:133064] SotoCore/AWSClient.swift:110: Assertion failed: AWSClient not shut down before the deinit. Please call client.syncShutdown() when no longer needed.

As the error message says you need to call client.syncShutdown() once you have finished with it. There is also an async/await version client.shutdown you could use.
It is best practice to not keep creating and destroying AWSClients as the construction can use a lot of resources. You are best to store one globally and reuse across all the functions that need one.

Thanks for quick reply
Really sorry I'm new in swift can you please guide me where I wrong ?
var client = AWSClient(
credentialProvider: .static(accessKeyId: access, secretAccessKey: secret)
, httpClientProvider: .createNew
)
    let s3 = S3(client: client, region: .eucentral1)

    let s3FileTransfer = S3FileTransferManager(s3: s3, threadPoolProvider: .createNew)

    let downloadFuture = s3FileTransfer.copy(
        from: S3File(url: "s3://my-buckett/my-key")!,
        to: filePath)

   I use that library for file transfer :
   https://github.com/soto-project/soto-s3-file-transfer

You need to call at the end of your code. These assume you are running inside an async function though
// wait for download future to complete
try await downloadFuture.get()
// shutdown client now we don't need it anymore
try await client.shutdown()

Alternatively you could store AWSClient in a global variable and not worry about shutting it down
let client = AWSClient(...)

func download() async throws {
        let s3 = S3(client: client, region: .eucentral1)
        let s3FileTransfer = S3FileTransferManager(s3: s3, threadPoolProvider: .createNew)
       try await s3FileTransfer.copy(
            from: S3File(url: "s3://my-buckett/my-key")!,
            to: filePath
        ).get()

Great Thanks


TagUI hangs when running visual automation - new version of Sikuli v1.1.2

Sikuli v1.1.2 released in March 2018 requires at least Java v8 JDK to work with TagUI. Raising this as proactive issue for users who may not get vision automation to work.
Running java -version from command prompt or terminal must show v8 or above, eg > 1.8.0.

Java v8 JDK can be downloaded here for your operating system - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Above commit adds note to make sure JDK v8 is installed, with a link to the installation URL to download JDK8. Also updated tutorial instruction for visual automation.


add new variable to define compiler/flags for generator project when crosscompiling

This is a hack, as officially CMake would want us to make two CMake builds. But this also works and is easier to do

Needed for https://github.com/WerWolv/ImHex/issues/1299


Create and push a docker image

We want to eventually use the CircleCI CLI, and we should keep it updated, but this will allow us to iterate faster during rollout phase.

I remembered that pipelines with enabled setup workflows only support 1 workflow, so I had to merge all the jobs into one workflow.


Openapi schema fixes

This fixes two things:

removes "Object" suffix from some type names
points the JSONSchema type definition to http://json-schema.org/draft-04/schema instead of it it being an arbitrary object (type: object)

I removed the "Object" suffix because it is unnecessary and makes the naming of these types inconsistent with other type definitions in the schema. For example, in the spec document, we call it "Plan Object", but in the OpenAPI schema, we simply call it Plan.
The following type definitions contained the "Object" suffix:

SchemasObject
ServiceInstanceSchemaObject
ServiceBindingSchemaObject
JSONSchemaObject

LGTM

cc @spadgett

LGTM

LGTM

LGTM


MangaSee

Description
Please add MangaSee, it allows for fast downloads of very high quality scans.
Desired Behavior

Additional Context
No response
Code of Conduct

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

https://mangasee123.com/


hunspellDicts.nl_NL: correct license

The previous authors were incorrect: It's just BY, not BY-NC; CC-BY-3.0 is free.
I opted to use the in-line comment syntax to denote a dual-license. See https://github.com/NixOS/nixpkgs/issues/283706 for more information.
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

https://github.com/OpenTaal/opentaal-hunspell?tab=License-1-ov-file#readme


hls support

https://stream.vagalume.fm/hls/14623883771774082279/aac.m3u8
I have this radio link, and would I be able to update it to work?

.m3u8 streams are not fully supported and there is no implementation planned yet.


Feedback on Milestones 3 and 4

Hello,
In Milestones 3 and 4, I can see that you have addressed all of the issues that you had in milestone 2. You have improved the project significantly in this milestone, and I believe that now your project exceeds the expectations.
Cheers,
Mohamd

Thank You!


Restore control state

This PR allows control state to persist across executions without the script author needing to perform any additional handling.
At the moment I've just done the base control properties from FCControl, but before I continue with the control-specific properties, I was wondering if someone could test it on Mac, since I only have a Windows machine (I'm assuming it should be fine but this proved to be more of a headache than I initially anticipated, so I would like to make sure).
Here is a test script (also uncomment the line near the bottom for additional testing):
local mixin = require("library.mixin")

function create()
    local window = mixin.FCXCustomLuaWindow()
    window:CreateEdit(0, 0, "edit")

    window:CreateButton(0, 40):SetWidth(75):SetText("Toggle Enable"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetEnable(not edit:GetEnable())
    end)

    window:CreateButton(80, 40):SetWidth(75):SetText("Toggle Visible"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetVisible(not edit:GetVisible())
    end)

    window:CreateButton(0, 70):SetText("Move Left"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetLeft(edit:GetLeft() - 10)
    end)

    window:CreateButton(80, 70):SetText("Move Right"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetLeft(edit:GetLeft() + 10)
    end)

    window:CreateButton(0, 100):SetText("Narrower"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetWidth(edit:GetWidth() - 10)
    end)

    window:CreateButton(80, 100):SetText("Wider"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetWidth(edit:GetWidth() + 10)
    end)

    window:CreateButton(0, 130):SetText("Shorter"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetHeight(edit:GetHeight() - 10)
    end)

    window:CreateButton(80, 130):SetText("Taller"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        edit:SetHeight(edit:GetHeight() + 10)
    end)

    return window
end

dialog = dialog or create()

-- This should make the edit control one notch shorter on each opening (and invisible on the very first opening, since GetHeight returns 0)
-- (tests the ability to edit control values outside of window execution and still preserve correct state)
--dialog:GetControl("edit"):SetHeight(dialog:GetControl("edit"):GetHeight() - 10)

finenv.RetainLuaState = true

dialog:ShowModeless()

Is that macOS's native behaviour? I don't have that issue on Windows and I haven't done any magic with the Set* methods.
Edit: when you say it loses the contents, do you mean on restore, or immediately while the dialog is running?

Hmm, what happens if you try the following vanilla script?
local dialog = finale.FCCustomLuaWindow()
local edit = dialog:CreateEdit(0, 0)
local btn = dialog:CreateButton(0, 40)

dialog:RegisterHandleCommand(function(ctrl)
    if ctrl:GetControlID() == btn:GetControlID() then
        edit:SetEnable(not edit:GetEnable())
    end
end)

dialog:ExecuteModal(nil)

So it turn out this is macOS behavior. The contents of an edit text box do not update internally until the control loses focus. On these test dialogs, by default there is no way to make the edit text lose focus because there is only one edit text box. Thus when enabled or visible state changes, the OS updates with the last known contents which, at least at first, is nothing. (You can test with your original test script by entering some data, closing the window, then reopening. At that point when you click the buttons, it retains the original contents from the last time it opened.)
Another way is to enable the tab-to-all-controls keyboard mode in macOS that allows you to tab to other controls besides edit text boxes, like Windows does. Then you can tab out of the edit text and it remembers what you typed.
There appears to be an option on edit text to update continuously. I am going to look into what it would take to make that available in RGP Lua.
More details at this Stackoverflow article.

It looks like this solves the problem, even on existing Lua plugins:
    window:CreateButton(0, 40):SetWidth(75):SetText("Toggle Enable"):AddHandleCommand(function(self)
        local edit = self:GetParent():GetControl("edit")
        local str = finale.FCString()
        edit:GetText(str)
        edit:SetText(str)
        edit:SetEnable(not edit:GetEnable())
    end)

Awesome, glad it got sorted out!
Is it worth adding some backwards-compatibility for SetEnable and SetVisible to FCMControl? Eg
if finenv.UI():IsOnMac() and finenv.MajorVersion == 0 and finenv.MinorVersion < 63 then
    self:GetText_(temp_str)
    self:GetText_(temp_str)
end

I'm not sure how much it matters. But surely you meant:
if finenv.UI():IsOnMac() and finenv.MajorVersion == 0 and finenv.MinorVersion < 63 then
    self:GetText_(temp_str)
    self:SetText_(temp_str) -- <== *SetText
end

Ah whoops, thanks for picking that up.

Apologies for the hold up, life got in the way for a little while there. I'll resume working on it this week.

@rpatters1
A quick question about something that came up in testing: If an error is thrown in an attached CloseWindow handler, then storing control state won't work, since control state is stored after all CloseWindow handlers are executed. Two options come to mind: 1) Do nothing, leave it as is. 2) Execute handlers in a pcall, then store control state, and if there's an error, throw it afterwards.
I'm leaning towards number 2, but I guess the underlying question is, if there is an error, do we want control state stored? (I can't think of any reason why not, I just thought I'd ask).

Option 2 seems like a good option to me as well. I guess it would ultimately depend on the nature of the error, but I can't think of one where I wouldn't prefer to store the state.

@rpatters1 A couple more questions:

Should I add an FCMCtrlStatic mixin to store/restore SetTextColor? In my testing, setting the color while the window is showing produced no visible change anyway (although it updates to the new color the next time the window is shown). It's only a small job, I'm just wondering whether it's useful.
Timers only seem to work if they are Set after the window has been shown. This had me stumped for some time, so would it be possible to add this to the PDK Framework documentation?
Command/Control events don't fire for FCCtrlSlider controls when clicking and dragging it. Is this able to be fixed in RGPLua?

Other than these I only have FCMTree left, and I'm still working out how best to tackle it. Would it be safe to make FCTreeNode objects persist across multiple executions? Or am I better off just storing the tree nodes as Lua strings in a table and recreating the whole thing every time the window is shown? If I do that, then any FCTreeNode objects that might be held by the script will be voided (perhaps they shouldn't be held anyway?).

SetTimer has to be called while the Window is running. The earliest option is during InitWindow. I'll add that to the docs.
I think it would be nice if SetTextColor is retained the next time the window opens. If this requires FCMCtrlStatic to be created, then it probably should be.
If you have a script for FCCtrlSlider that isn't working, or is lacking features you'd like added, please send it to me and I'll look at it. I have not touched the code for FCCtrlSlider.
Same goes for FCTree. I don't know anything about it. My instinct would always be to retain the context in Lua strings/tables and recreate the underlying controls from scratch. So if there is any doubt, that would be the direction I'd choose.

Okay, here are a couple of test scripts:
First one is testing slider (the text should update as the slider is moved):
local dialog = finale.FCCustomLuaWindow()
local str = finale.FCString()
local static = dialog:CreateStatic(0, 0)

local slider = dialog:CreateSlider(0, 30)
slider:SetMinValue(0)
slider:SetMaxValue(10)
slider:SetThumbPosition(2)

str.LuaString = "Thumb position: " .. slider:GetThumbPosition()
static:SetText(str)

dialog:RegisterHandleCommand(function(ctrl)
    str.LuaString = "Thumb position: " .. slider:GetThumbPosition()
    static:SetText(str)
end)

dialog:ExecuteModal(nil)

The text doesn't change at all for me on Windows.
Next one is static control text color:
local function create_dialog()
    local dialog = finale.FCCustomLuaWindow()
    local str = finale.FCString()
    str.LuaString = "Here is some text"
    local static = dialog:CreateStatic(0, 0)
    static:SetText(str)

    str.LuaString = "Red"
    local redbtn = dialog:CreateButton(0, 30)
    redbtn:SetText(str)
    redbtn:SetWidth(30)

    str.LuaString = "Green"
    local greenbtn = dialog:CreateButton(40, 30)
    greenbtn:SetText(str)
    greenbtn:SetWidth(30)

    dialog:RegisterHandleControlEvent(redbtn, function(ctrl)
        static:SetTextColor(255, 0, 0)
    end)

    dialog:RegisterHandleControlEvent(greenbtn, function(ctrl)
        static:SetTextColor(0, 255, 0)
    end)

    return dialog
end

window = window or create_dialog()
finenv.RetainLuaState = true
window:ExecuteModal(nil)

When I press either button, nothing happens. But if I close the window and run the script again, the text shows the color of the last button pressed.

About SetTextColor, you may need to rewrite the text into the control for it to change. Here is a script I've been working on to monitor the current layer. I haven't completed it because it only works when the document is set to "show only current layer". But then it can change color without any issues.
-- These colors are the Finale default program settings for layer colors.
-- The PDK does not provide access to these values, but
-- you can override them with a configuration file.
config = {
    color_layer1 = {0, 0, 0},
    color_layer2 = {170, 31, 55},
    color_layer3 = {52, 112, 92},
    color_layer4 = {46, 85, 138}
}

local mixin = require("library.mixin")

function calc_current_layer_string()
    local misc_prefs = finale.FCMiscDocPrefs()
    local curr_doc = finale.FCDocument(-1) -- current document
    if curr_doc.ID > 0 and misc_prefs:Load(1) then
        if misc_prefs.ShowActiveLayerOnly then
            for layer_number = 1, finenv.UI():GetMaxLayers() do
                if finenv.UI():IsLayerVisible(layer_number) then
                    return tostring(layer_number)
                end
            end
        else
            return "All"
        end
    else
        return "N/A"
    end
    return "Err"
end

function calc_layer_color(layer_string)
    local retval = config["color_layer"..layer_string]
    if not retval then
        retval = config.color_layer1
    end
    return retval
end

global_timer_id = 1         -- per docs, we supply the timer id, starting at 1

function create_dialog_box()
    local dialog = mixin.FCXCustomLuaWindow():SetTitle("Layer")
    local font = finale.FCFontInfo()
    font.Name = "Helvetica"
    font.Size = 36
    font.Bold = true
    dialog:CreateStatic(0, 10, "layer_string")
                :SetText(calc_current_layer_string())
                :SetFont(font)
                :SetWidth(85)
                :SetHeight(45)
    dialog:CreateOkButton():SetText("Close")
    dialog:RegisterHandleTimer(function(self, timer_id)
            local static = self:GetControl("layer_string")
            local layer_text = calc_current_layer_string()
            local layer_color = calc_layer_color(layer_text)
            static:SetTextColor(layer_color[1], layer_color[2], layer_color[3]) -- table.unpack generates a warning, so don't use it
            static:SetText(layer_text)
        end
    )
    dialog:RegisterInitWindow(function(self)
            self.OkButtonCanClose = true -- override default behavior of RunModeless()
            self:SetTimer(global_timer_id, 100) -- timer can't be set until window is created
        end
    )
    dialog:RegisterCloseWindow(function(self)
            self:StopTimer(global_timer_id)
        end
    )
    return dialog
end

function layer_monitor()
    global_dialog = global_dialog or create_dialog_box()
    global_dialog:RunModeless(true) -- true: no selection required
    --global_dialog:StartTimer(global_timer_id, 100) -- timer can't be set until window is created
end

layer_monitor()

I'll look into the example for FCCtrlSlider.

I'm noticing this is starting to become a very large PR—currently at almost 2,000 lines of code changed. That's going to make it very difficult to review, and potentially cause several merge conflicts.
Would it be possible to go ahead and review/merge this PR as is, then have a follow-up PR add the remaining items in the todo list?
In general, it's a really good idea to keep PRs decently small in both size and scope. Many small PRs are preferable to one large PR.
https://google.github.io/eng-practices/review/developer/small-cls.html

Okay, I'll make the mixin version of SetTextColor set the text again under the hood.
@Nick-Mazuk
Sure thing. I can split up this PR as well and resubmit parts of it later if you'd prefer?

@Nick-Mazuk Sure thing. I can split up this PR as well and resubmit parts of it later if you'd prefer?

That would be great. Thanks!

I've marked this as ready for review. It just contains the base changes required for control state restoration to work, as well as a couple of indentation things.

This message is just to confirm that FCCtrlSlider does not send change notification on either macOS or Windows. But they will be added in the next release of RGP Lua.

What's the status of this pull request? Is it ready to be merged? Is it still compatible with later PRs?

Yes it is ready to be merged.
The only possible issue that I can think of is the change in line 417 of mixin/FCXCustomLuaWindow.lua which I think was already fixed in one of your PRs. I'm not sure how git handles these things.

Btw, @ThistleSifter, there is an enhancement in RGP Lua 0.64 that may affect this PR down the line. Until 0.64, the control instance passed back to the HandleControlEvent and HandleCommand handlers only had access to the base methods and properties of FCControl, even though GetClassName returned the proper subclass name. As of 0.64, the controls passed into those handlers have all the methods and properties pertaining to the subclass.

@rpatters1 The mixin dialogs disregard the instance that's passed to the handler and instead always use the original object that was returned from the Create* method.


How to download segmentation masks per object not

I have an image where a single pixel consist of two classes. My annotators annotate them in  the following way:

Masks overlap. How to download the mask per individual object not the whole segmentation mask? Exporting the dataset as Segmenttation 1:1 gives the following result:

Where the last object is the one "on top". Is there a way to get individual masks for each object so they don't overlap?

Hi, currently it is only available in COCO format, which stores a separate mask per instance. However, it stores them as RLE-encoded arrays, instead of images. Will it be sufficient for you task?

yeah, coco format solves this problem somehow, thanks
from pycocotools.coco import COCO


Fix conditional validation in Field

Description
Fix a bug that causes FormFields to not display the correct validation state when using conditional validations

Example

[x] I have verified if my change requires an example

Changeset

[x] I have verified if my change requires a changeset

Related tasks and documents

Further information

This is a not obvious change and needs a proper description. Please some time (at least 10 minutes) explaining what the problem is and how the solution works.


Update to bazel 3.2

Update to bazel 3.2

Pin to xctestrunner 0.2.10
0.2.12, the default in the most recent rules_apple, does not work on 10.14.
https://github.com/google/xctestrunner/issues/18

Update rules_apple / rules_swift

Update xcodegen

Looks like some CI failure, but otherwise LGTM:
ERROR: Skipping '//tests/ios/frameworks/mixed-source/sources-with-prebuilt-binaries/...': no targets found beneath 'tests/ios/frameworks/mixed-source/sources-with-prebuilt-binaries'
ERROR: no targets found beneath 'tests/ios/frameworks/mixed-source/sources-with-prebuilt-binaries'


Unable to get license information of dependent packages when using yarn workspaces

I am using two workspaces.
And each workspace depends on the same package with different versions.
In this case, the package is installed under the workspace directory.
This is the output of the yarn list:
~ yarn list
yarn list v1.15.2
├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  │  └─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  │  ├─<EMAIL_ADDRESS>│  │  ├─<EMAIL_ADDRESS>│  │  └─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  │  └─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>│     └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>└─<EMAIL_ADDRESS>✨  Done in 0.08s.

In this case, licensed is unable to get the license information of the packages installed under the workspace directory.
The following is the output of the licensed cache:
~ licensed cache
Caching dependency records for licensed-with-yarn-warkspaces
  yarn
    Using cross-env-5.0.5 (5.0.5)
    Error cross-env-7.0.3 (7.0.3)
    Using cross-spawn-5.1.0 (5.1.0)
    Error cross-spawn-7.0.3 (7.0.3)
    Using is-windows (1.0.2)
    Using isexe (2.0.0)
    Using lru-cache (4.1.5)
    Using path-key (3.1.1)
    Using pseudomap (1.0.2)
    Using shebang-command-1.2.0 (1.2.0)
    Error shebang-command-2.0.0 (2.0.0)
    Using shebang-regex-1.0.0 (1.0.0)
    Error shebang-regex-3.0.0 (3.0.0)
    Using which-1.3.1 (1.3.1)
    Error which-2.0.2 (2.0.2)
    Error workspace-a (1.0.0)
    Error workspace-b (1.0.0)
    Using yallist (2.1.2)

  * Errors:
    * licensed-with-yarn-warkspaces.yarn.cross-env-7.0.3
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.cross-spawn-7.0.3
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.shebang-command-2.0.0
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.shebang-regex-3.0.0
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.which-2.0.2
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.workspace-a
      - dependency path not found

    * licensed-with-yarn-warkspaces.yarn.workspace-b
      - dependency path not found
      - ```

@ledsun thanks for the report!  I'll take a look when I'm able - is this an urgent issue for you?

I'm in no hurry. I have a workaround.
I assume that the cause of this issue is that yarn workspaces creates symbolic links in the node_modules directory.
~ ls -lah node_modules/
total 8
drwxr-xr-x  17 shigerunakajima  staff   544B  3 30 18:06 .
drwxr-xr-x   8 shigerunakajima  staff   256B  3 30 17:39 ..
drwxr-xr-x   5 shigerunakajima  staff   160B  3 30 18:06 .bin
-rw-r--r--   1 shigerunakajima  staff   2.4K  3 30 18:06 .yarn-integrity
drwxr-xr-x   7 shigerunakajima  staff   224B  3 30 18:06 cross-env
drwxr-xr-x   9 shigerunakajima  staff   288B  3 30 18:06 cross-spawn
drwxr-xr-x   6 shigerunakajima  staff   192B  3 30 18:06 is-windows
drwxr-xr-x  10 shigerunakajima  staff   320B  3 30 17:37 isexe
drwxr-xr-x   6 shigerunakajima  staff   192B  3 30 18:06 lru-cache
drwxr-xr-x   7 shigerunakajima  staff   224B  3 30 17:45 path-key
drwxr-xr-x   8 shigerunakajima  staff   256B  3 30 18:06 pseudomap
drwxr-xr-x   6 shigerunakajima  staff   192B  3 30 18:06 shebang-command
drwxr-xr-x   6 shigerunakajima  staff   192B  3 30 18:06 shebang-regex
drwxr-xr-x   8 shigerunakajima  staff   256B  3 30 18:06 which
lrwxr-xr-x   1 shigerunakajima  staff    14B  3 30 18:06 workspace-a -> ../workspace-a
lrwxr-xr-x   1 shigerunakajima  staff    14B  3 30 18:06 workspace-b -> ../workspace-b
drwxr-xr-x   7 shigerunakajima  staff   224B  3 30 18:06 yallist

I think licensed is getting the directory under node_modules in the next line:
https://github.com/github/licensed/blob/2.15.1/lib/licensed/sources/yarn.rb#L79
But Dir.glob(config.pwd.join("node_modules/**/package.json")) does not follow symbolic links.
My workaround is a patch to replace this with Dir.glob(config.pwd.join('node_modules/**{,/*/**}/package.json')).

@ledsun

I assume that the cause of this issue is that yarn workspaces creates symbolic links in the node_modules directory.
My workaround is a patch to replace this with Dir.glob(config.pwd.join('node_modules/{,/*/}/package.json')).

👍  that makes sense.  That would be an easy patch to put in but I'd like to learn more about how you'd expect licensed to work with them before adding that as a general fix.
I'm also not super up to speed on yarn workspaces themselves.  I've read a few docs on them and they appear to be a way to manage dependencies among multiple projects/packages in a monorepo setup when one project takes a dependency on another project in the repo... is that correct?
I have a concern that a package with the same name and version but different licensing or other metadata might exist in different locations under node_modules which would make the logic for the yarn source indeterminate.  Whichever duplicate name-version package is parsed last would be used for all projects.  I'm not sure how realistic this scenario is but I think it might be possible if a package is forked and/or multiple package registries are used.
Can you set up a reproduction environment for the problem, removing any sensitive and non-public content?  I'm wondering whether building knowledge about workspaces into the yarn source would be more appropriate.  Something like enumerating workspaces, then changing dependency_paths to make use of them like Dir.glob(config.pwd.join("node_modules/**{,/${workspace}/**}/package.json"))

Sorry. I can't provide a reproducible environment.

I'm running into this as well, specifically with package paths specified in nohoist. Here's a reproduction: https://github.com/jgeurts/licensed_yarn

@jonabc Please let me know if that helps or if I can provide anything else related to this!

@jgeurts :wave: sorry I've been pretty busy and haven't had a chance to take a look.  I'll try to get to it within the next 24 hrs

@jguerts thanks for the example repo.  the repo with some additional yarn documentation for the nohoist syntax helped me wrap my head around the problem.  This is an interesting problem space in that the workspaces functionality is solving for monorepos with multiple built packages.  If each of these packages are distributed and used separately they should probably be tracked as individual "apps" from licensed's POV.  I'm thinking the best way to handle this is

consider workspaces as separate apps

the easiest way to handle this in licensed is to force users to specify their workspaces glob patterns in the licensed config file, however that can cause issues if .licensed.yml and package.json get out of sync.  automagically handling workspaces detected from package.json will require some refactoring of how licensed apps are detected.  I'll have to think on this one a bit more and see if there's an ideal solution

update the yarn source's handling of node_modules to look at both the root node_modules directory and the workspaces node_modules directory.  I don't know if adjusting the node_modules search path is a good idea in this case because it's possible to find the same dependency, at the same version, in two different locations and the metadata should know how to reference the correct one.

Off the top of my head this sounds like a fairly significant chunk of work, and as I mentioned things are pretty busy for me at the moment.  Is this blocking you from using licensed and something you need fixed ASAP?

It’s a blocker for me, but I’ll try working around it by removing the nohoist part of package.json before installing npms and running licensed. That should force all npms to install to the root. I’ve been holding off on that in case this was a relatively easy/quick update to licensed.

I tried removing the nohoist part of the package.json file, but licensed failed to get paths for a couple dependencies still. So, I ended up writing a script to remove the monorepo dependencies from each workspace package.json, use npm install for each workspace and then used the npm source type with each workspace as an explicit licensed app.
That mostly worked, but I had some troubles with licenses for some of the dependencies not coming through accurately. I'll open a separate issue for that, if I can get it reproducing.

@jgeurts FYI I've started looking at a fix.  There is some complexity in the solution but I'm hopeful to have this fixed and able to put out a release in the next few days.

@jgeurts I've hit a wall in how to get useful information out of yarn's CLI that perhaps you might be more knowledgable on?
When I call yarn list from a package defined as a yarn workspace, it still gives full information on dependencies used by everything in the repo, and not information specific to that workspace.  That means that licensed has no way to distinguish which dependencies are specific to that workspace package or not.  That is pretty consequential if someone is publishing individual packages out of a monorepo - it would not be correct to say that every dependency from the repo applies to all packages.
Even worse is that, at least with the version of yarn I have locally (1.22.10), yarn's hoisting mechanism is making packages available to workspaces that don't call them out as dependencies 😢 .  I am able to use packages listed as a dependencies of workspace A inside of files in workspace B without any direct dependency linkage of workspace A -> B.
TBH I'm not sure how to support yarn workspaces given that I can't accurately tell what dependencies a project uses.  For a tool that's purpose relates to licensing compliance I tend to err towards the safer option and am inclined to explicitly deny support for workspaces.   I'll try with yarn v2 tomorrow and see if maybe they've fixed things in later versions.
If you have any ideas on how to support this I'd be very interested in hearing them 😆

@jonabc This seems to also be an issue with npm workspaces:

Project setup
// ./package.json
{
	"name": "@grano/mygrano-serverless",
	"version": "1.0.0",
	"description": "My Grano Serverless",
	"private": true,
	"workspaces": [
		"serverless-utils",
		"cognito",
		"antivirus",
		"ecom-cloudfront",
		"iam-cloudfront",
		"iam-ses-notifications",
		"ses-events",
		"ses"
	]
}

// ./antivirus/package.json
{
	"name": "@grano/antivirus",
	"version": "1.0.0",
	"description": "Virus Check Lambda for Widdix antivirus",
	"private": true,
	"dependencies": {
		"@grano/logger": "^2.12.1",
		"callbackify": "^1.1.0",
		"dotenv": "^16.0.0",
		"es6-promisify": "^7.0.0",
		"lodash": "^4.17.21",
		"superagent": "^7.1.1"
	}
}

# licensed.yml
apps:
- name: antivirus
  source_path: "/home/runner/work/mygrano-serverless/mygrano-serverless/antivirus"
  cache_path: "/home/runner/work/mygrano-serverless/mygrano-serverless/.licenses/antivirus"
  sources:
  - name: antivirus.npm

Results:
# npm install --ignore-scripts --no-audit --production
added 65 packages in 3s
# npm ls callbackify
<EMAIL_ADDRESS>/Users/ville.lahdenvuo/Documents/Grano/repot/mygrano-serverless
└─┬<EMAIL_ADDRESS>-> ./antivirus
  └──<EMAIL_ADDRESS>
...

  Caching dependency records for antivirus
    * Errors:
      * antivirus.npm.callbackify
        - missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>
      * antivirus.npm.dotenv
        - missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>
      * antivirus.npm.es6-promisify
        - missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>
      * antivirus.npm.superagent
        - missing<EMAIL_ADDRESS>required by<EMAIL_ADDRESS>
I assume it's because npm de-dupes dependencies in the root node_modules folder, but licensed does not traverse into parent folders.

For people having problems with npm workspaces I added this script before running licensed to work around the issue:
echo "::group::Workspaces workaround"
WORKSPACES=$(jq -r '.workspaces // [] | join(" ")' package.json)
if [[ -n "$WORKSPACES" ]]; then
  for package in $WORKSPACES; do
    echo "Copying node_modules to $package"
    rsync -r --exclude ".bin" --exclude "@grano/*" ./node_modules/ "./$package/node_modules"
  done
fi
echo "::endgroup::"

thanks for the repro - taking a look!

@villelahdenvuo in this case, the errors being reported by licensed are actually coming from npm.  I set up a quick repro for the above setup and got the same errors running npm list from the individual workspace.
There's an issue that was opened on the npm cli about this where npm ls run from a workspace isn't aware that it's dependencies are installed elsewhere.  It looks like the latest versions of npm (8.5.0+) enable automatic workspace root detection which will solve this with a little extra logic in licensed to strip the current workspace from the list of detected dependencies
Are you able to upgrade to using npm 8.5+?  I'd like to make that a requirement if possible for using npm workspaces because it allows the closest parity to existing licensed usage without requiring any additional configuration options.


Pinning the Qhub-dask in Qhub

The metapackage approach for qhub-dask allows us to update our pinned versions for dask dependencies. close #86
See for reference #385
This is the current package dependencies qhub-dask inherits
- dask ==2.30.0
- distributed ==2.30.1
- dask-gateway ==0.9.0

@viniciusdc I think you also need to change the dependencies listed in DEFAULT_ENVIRONMENTS of qhub/initialize.py

Sure, I will do. I missed that in my search. Other then that shouldn't dashboard.yml environmet contain those pacakges too (I could oly see the ipykernel, ipywidgets >=7.6 there)?

Well, I guess it depends on whether we think dask is something likely to be used in a dashboard... If they are relatively small installs, maybe put them in dashboard.yml too.

Well, I guess it depends on whether we think dask is something likely to be used in a dashboard... If they are relatively small installs, maybe put them in dashboard.yml too.

Uhm I see, so I added it in this last commit, but my guess is that we really want to set this as a user choice right?

Oh yes, that's fine - leave it as you have.

Shall I leave it to you to resolve the documentation conflicts and merge?


Incorrect documentation around starting Chronos UI

In the link: http://mesos.github.io/chronos/docs/, there is no way provided to get to the Chronos UI. I had to add --htto_port 8081 and point to localhost:8081 to access the UI.
Is this deliberate, or something that was overlooked?

This is the expected way. You go to the host and the port where Chronos is deployed. Perhaps the docs should make this clearer (PR's welcome), but it is mentioned in the documentation.


Verifying libsodium with minisign instead of sha2

This would resolve 326, and makes it so we don't have to keep updating hard-coded SHA hashes all the time. The build seems to run fine on Windows and Ubuntu.
Sorry if anything is out of order - I'm a bit new to Rust, not to mention contributing to open source projects in general.

Pull Request Test Coverage Report for Build 931

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-1.0%) to 93.55%

Totals

Change from base Build 929:
-1.0%

Covered Lines:
2277

Relevant Lines:
2434

💛  - Coveralls

Looks good. How does it affect total number of deps in dependency tree?  I count 20 new dependencies that we weren't already using (without an (*)).

That’s a shame we need so many deps to verify hashes :(

The ironic part is that minisign would be easy to implement without further dependencies if we had access to libsodium :)

These are just build dependencies, and are required by ed25519-dalek. I can get rid of ed25519-dalek, but is it worth it, especially for a build dependency?

but is it worth it, especially for a build dependency?

https://github.com/tox-rs/tox-node already got 195 deps and roughly half of them are ssl, http, tar and sha2 to download and verify libsodium. I thought it did not matter until I tried to compile tox-node under AWS micro and it took 12 minutes.
I believe we don't have an option, so it's a yes from me. A sad but yes.

Keep in mind that this resolves the build failure, but the root cause that we're using mutable data in our build makes the build nondeterministic from a reproducible builds point of view. To guarantee independent verification of the binary we would need to track which rebuild of the library release was used during our build or make sure all inputs of the build are immutable (eg. by building libsodium from immutable source releases).
More on that topic can be found here: https://reproducible-builds.org/

Also note that this allows a subtle way for the owner of the minisign private key to carry out very targeted attacks by serving a malicious pre-built library with a valid signature. Since there's no binary transparency you can't be sure you are getting the same library everybody else is getting unless we're pinning the file content by hash.

Version 0.1.2 of the crate doesn't have any dependency any more besides base64.

serving a malicious pre-built library with a valid signature

That is so true.

That is a really good point about reproducible builds. Especially when considering what kind of downstream projects could be using this library, reproducible builds would be a good feature to provide. I wonder if it would be worthwhile maintaining our own libsodium repo by forking it, and using the GitHub Releases feature to host libsodium releases in an immutable way (i.e. <IP_ADDRESS>, <IP_ADDRESS>, etc.).
And to be clear, I'm not suggesting forking the project. Just forking the repository and keeping it in sync with the original.

Closed in favor of https://github.com/sodiumoxide/sodiumoxide/pull/332


CupertinoContextMenu: they lack blur and transparency

Report from https://x.com/mahersafadii/status/1818049080695603260
Related to https://api.flutter.dev/flutter/cupertino/CupertinoContextMenu-class.html

Treating this as a proposal.

I think it's considered a "bug" in that our implementation doesn't yet match the platform's default implementation.

Thanks, updated labels accordingly.


Getting recorded video object

Hi, thanks for this great package.
I want to access to the recorded video in order to upload to my webserver. But I couldn't figure out how to get recorded video object. Can you give me an example?
Thanks.

Hello, This is for sure a great library, my team also missed this functionality, therefore we updated the library's hook version and added one more function to it with name getFile, I'll make a PR for getting it added to this library

@n4beel Hey would you be able to make the PR?

@iltertaha @n4beel @martimarkov
Hey guys sorry I've been too busy with work to attend to this package. I've updated the version and theres now a getRecording function you can run from the hook to get the recording blob, which you can then send over to whatever API you have.
I've updated the CodeSandbox URL with examples for both hooks and render props.


Fix incorrect axis data in Chord when not all buttons are pressed

Fixes #430

Is there anything else that needs to be changed here?

Nope, looks great! Thanks a ton.


Remove LineNrAbove/Below specific colors

Hi, small PR to remove specific values for LineNrAbove and Below, causing relativenumber to appear in fixed (here white) color. By simply removing those lines, vim and nvim fall back to the LineNr value for relativenumber.

I knew this was a problem, but I thought it was a terminal issue, since for some terminals the colors of the numbers are respected and in others they are white, by removing the lines in your PR anyway I get all gray numbers.

I knew this was a problem, but I thought it was a terminal issue

I tried with Alacritty and st, both seem to work the same way, but can't say for any other terminal.

by removing the lines in your PR anyway I get all gray number

Isn't that the expected look ?

Nope, the expected look is in the README screenshot, i figured out what is the problem, i'm going to fix it now

This should work

I think that broke classic numbers (aka no relativenumber) on my end. All line number but the current are blue.
With relativenumber, things look good when cursorlineopt is not set to number (which is part of the default).

What do you think about it now?

Seems good to me, nicely done.

Nice


Meeting notes 29/11/2023

Presentations:

Annika: overview of polarization correction workflow and polarization components
Simon: overview on a typical pipeline in scipp

Discussions:

To be inserted by Annika (see word file)

To do:

Annika: send around ppt of polarization correction
Annika/Hal/scipp-team: Review workflow
Annika/instrument-scientists: speak about monitor correction and where to insert instrument-dependent stuff

I am in particular unsure about how the time-dependence of the polarizer and analyzer transmission functions interact with the time-dependence of the monitors (and other normalization terms). Consider, e.g., SANS (or the equivalent definition for $I(Q_x,Q_y)$:

Assume we have event-mode detector data and event-mode monitor data. We have the following options:

Handle polarization after computing $I(Q_x,Q_y)$. This would imply we need wavelength and time information. This could be done:

in event mode (by normalizing in event mode[^1]) to handle time and wavelength dependence for the detectors, but I don't think it would work, since the monitor also depends on time and wavelength.
in histogram mode, computing $(Q_x, Q_y, t, \lambda)$

Handle polarization before normalization. We can then independently treat detector data and monitor data before feeding them into the above equation.

Are there terms that actually cancel out here? May depend on relative position of monitors and polarizer/analyzer.

[^1]: This can cause trouble with error propagation

Conclusion based on discussion:

$I$ from paper is $C/M$.
Apply polarization correction to that vector
Sum over time and wavelength afterwards?

Questions (for @SimonHeybrock):

Can we do this in event mode?
Do we need to worry about zeros in denominator?

Second, now a comment on the beam monitor correction:

In a paper from NIST ( doi:10.1107/S0021889812003445) I find that the 3He Direct Beam measurements should always be normalized to the beam monitor first, and I think this should be only the incident beam monitor before the sample, NOT the monitor after the sample position (be careful, this paper is written for a reactor source and for having a supermirror polarizer) - hence, here we should correct for M(lambda) first (?)
In a paper from JPARC (arXiv:2005.14399v1 [physics.ins-det] 29 May 2020), they have characterized their 3He cell while including corrections from e.g. detector efficiency. Hence, maybe all corrections (especially detector efficiency and normalization to the incident beam monitor before sample) should be done before the Polarization corrections (?), but not including the wavelength to Q conversion ?
--> Hence, this would be according to our last conclusion:
Conclusion based on discussion:

I from paper is C/M
Apply polarization correction to that vector
Sum over time and wavelength afterwards?

To think about:

get 3He time decay: calculate 3He(C_DB(R,lambda)/M(lambda)) (to get transmission-functions as function of spin state T+,T-) after integration around direct beam

to correct sample data: apply PA(C(R,lambda)/M(lambda)), before recalculating to Q
---> need to think about if this is applicable

two issues:

is M is before analyzer, but after polarizer ?
if bg with and without cells are same, it should not matter, but if not?

Simon, could you describe in detail again here how the data correction for unpolarized SANS is done, i.e., in which order exactly you typically do the different correction steps for monitor correction and solid angle integration etc?
And why you think that if we do the sum over time and wavelength after PA correction, why you expect zeros in the denominator, i.e., which exact monitor is used (because I see it is a M(lambda) monitor, but no dependence on R).

SOrry for some previous mistakes. I have updated the pptx-file with the overview from tuesday again and also have uploaded a word file with a table on input data, input parameters, output parameters, for each part of the workflow. To comment on this:

previously, we have made the workflow for each cell with assuming we need the information from both polarization channels through the cell, up and down.
---> after speaking with Hal, he mentioned it is sufficient to measure only one channel (either up OR down), as they mathematically should be the same and also experimentally this is a sufficient assumption. Hence, we dont need to split for the spin channels for the DREAM instrument, for later instruments that will have to be decided again
I have changed some naming according to more typical convention, i.e.: Opacity O (instead of mu), and decay-time T(instead of Gamma)

Simon, could you describe in detail again here how the data correction for unpolarized SANS is done, i.e., in which order exactly you typically do the different correction steps for monitor correction and solid angle integration etc? And why you think that if we do the sum over time and wavelength after PA correction, why you expect zeros in the denominator, i.e., which exact monitor is used (because I see it is a M(lambda) monitor, but no dependence on R).

Descrption: https://scipp.github.io/ess/instruments/loki/sans2d_to_I_of_Q.html
The implementation with Sciline is here (for Sans2d): https://scipp.github.io/esssans/examples/sans2d.html

And why you think that if we do the sum over time and wavelength after PA correction, why you expect zeros in the denominator, i.e., which exact monitor is used (because I see it is a M(lambda) monitor, but no dependence on R).

In what I have linked above, we are using a time-integrated monitor. What I said earlier was probably wrong, I thought we would compute something like C(t)/M(t), then to the time-dependent polarization correction, and then sum. But obviously that cannot be the case, since $\sum_t C(t)/M(t) \ne \sum_t C(t) / \sum_t M(t)$.
So now I assume we simply compute $C(t) / M$, i.e., ignore time-dependence of the monitor? It is still unclear to me why that is fully correct, i.e., if we see low counts during some part of the polarizer "decay" but more in others, shouldn't that be taken into account? Or will that simply lead to a slightly suboptimal weighting of the different contributions? Will we actually compute a weighted sum in the end?

First I need to understand if you mean here the integration over time for one time_bin? I.e.,
 ?
--> we now thought that it would be fully correct to make the monitor corrections for each neutron pulse as stated above with single integrals (not
)
--> then to apply all other typical unpolarized SANS corrections for each neutron pulse
--> then use these "unpolarized-SANS-corrected" C of the Direct Beam measurements with He-cell to get PA-correction factors for each neutron pulse
--> then apply the correction-matrix on the "unpolarized-SANS-corrected" C of the sample measurements for each neutron pulse
--> Then sum up over all neutron pulses

In general, does it matter if the "typical SANS corrections) (i.e., DB-function, solid-angle correction, ...) is done on time or on wavelength?

Also, does it matter if we do

or

?

I don't think I can follow, maybe we should discuss this in person next week.

I also think thats the best! I think it is quite useful to meet twice, on 13th and on 19th, if that is still ok with you


[BUG] MiniRocket to comply with sklearn init specification, fix random_state modification in __init__

Fixes #2026

... and we have a hanging CI/CD here.


Issue importing non-binary dependencies nltk

[Enter feedback here]
The function can't be deployed because of non-binary dependencies.
This thread (https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python#publishing-to-azure) adresses this issue but the command line given produces this error :
Unable to connect to Azure. Make sure you have the az CLI or Az.Accounts PowerShell module installed and logged in and try again

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d955d169-8fb8-c511-8911-3e49f95c5ce6
Version Independent ID: 8a3d927c-51ce-d7d4-e5d1-acd928826db2
Content: Python developer reference for Azure Functions
Content Source: articles/azure-functions/functions-reference-python.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

@cconcordet Thanks for the question! We will review and get back to you!

@cconcordet The func CLI relies on either the az CLI or Az.Accounts cmdlet to be available for publishing to azure. Installing either one should resolve your issue.
There is already an issue on the azure-functions-core-tools repo for adding this information in the installation logs, GitHub README and the publish command help output.
We are assigning this issue to the content author for further review and updating the docs with this information accordingly.

I wasn't aware that the Azure CLI was a requirement to run Azure Functions Core Tools (func.exe). I'm checking with the product team about this.

It turns out that you do need to have Azure CLI or AzAccounts cmdlet installed for sign-in when using any of the func azure commands. We will need to add this to several articles that use Core Tools (1615659).

Thanks this worked out fine, but I still have an issue with the xgboost package that is being followed here : (https://github.com/MicrosoftDocs/azure-docs/issues/40856)


Bump OLM to v0.18.3

Description of the change:
Motivation for the change:
Reviewer Checklist

[ ] Implementation matches the proposed design, or proposal is updated to match implementation
[ ] Sufficient unit test coverage
[ ] Sufficient end-to-end test coverage
[ ] Docs updated or added to /doc
[ ] Commit messages sensible and descriptive

/rerun-all

/lgtm

/approve


No data written to SD card

The following should both write to the SD card and print temperature data to the SD card, but does neither:
bool SD_write(String data)
{
    File dataFile = SD.open("today.txt", FILE_WRITE);
    // If the file is available, write to it:
    if (dataFile) {
        dataFile.println(data);
        dataFile.close();
        // Print to the serial port too:
        // Serial.println(data);
      }
// More code omitted

The following function temperature() does print visible output to the Serial Monitor:
double temperature(int sensorRange, int pinNum, unsigned voltMax)
{
        // Read raw value, which is 0-sensorRange
        double sensorValue = (double)analogRead(pinNum);
        // Compute as fraction of voltage against voltage max
        double voltage = (sensorValue / sensorRange) * voltMax;
        Serial.println(voltToTemp(voltage));
        return voltToTemp(voltage);
}

Commit 96b796b4a3217e315e310c7bddc069b2e9be2930 fixes this issue.


How to set multigpu tranining/testing?

Hi, kamnitsask:
Thanks for your great work. Now I am training a segmentation task use the deepmedic tool. However, i CANNOT use multi-gpu to train my task. For example, if I have four gpus, I can only run my job properly with the gpu parameters set as: "gpu0" or "gpu1" or "gpu2" or "gpu3". So do you have any advice how can i use four gpus to train my work?
Thank you very much!
BRs!
Venus

Hello and sorry for the super-delayed reply. I ve been seriously overwhelmed and failed to keep up with issues. I hope I ll be able to support / keep updating this project better from now on again.
Multi-gpu was added with 0.9 theano which I haven't integrated to yet. So, currently, this project is single gpu only. Supporting theano 0.9 and 0.10 is the first thing I ll do, so I ll update you soon on how this goes.
Sorry again for the super slow reply.
Kostas


Allow non-CUDA device to be used

This PR allows users (for example mac OS users) without CUDA to run the code

Confirmed working on Linux machine without CUDA


Selection issues

In the current master there seems to be many selection related issues compared with the version on https://frappe.io/gantt. eg.

Clicking the text makes the bar disappear
Resizing and dragging selects the text and header area

Issues in both Safari and Chrome.

I am experiencing the same issue.  Is there any update on this?

Adding pointer-events: none; to the .bar-label fixed the bar disappearing/jumping for me. Also happens to prevent the text from being selected as well.

Fixed in #382.


Realm access crash

!!! MANDATORY TO FILL OUT !!!

Goals
Access DB to fetch some information
Expected Results
Access succedes  and use the app
Actual Results
App crashes instead
Steps to Reproduce
Code Sample

Version of Realm and Tooling

Realm framework version: 3.21.0
Realm Object Server version: N/A
Xcode version: 10.1
iOS/OSX version: iPhone OS 13.2.3
Dependency manager + version: ?

Code Sample
var oldSchemaVersion:UInt64 = 0
do {
oldSchemaVersion = try schemaVersionAtURL(localRealm(named: user))
} catch  {
logger.error("(error)")
}
    if oldSchemaVersion > newSchemaVersion {
        var config = Realm.Configuration.defaultConfiguration
        let realmPath = localRealm(named: user)
        config.schemaVersion = oldSchemaVersion
        config.fileURL = realmPath
        return config
    } else {
        var config = Realm.Configuration(schemaVersion : newSchemaVersion,
                                         migrationBlock: { migration, oldSchemaVersion in

                                            UccRealmMigrations.migrate(migration: migration,
                                                                       oldSchemaVersion: oldSchemaVersion,
                                                                       newSchemaVersion: newSchemaVersion, user: user)
        }, shouldCompactOnLaunch: { totalBytes, usedBytes in
            // totalBytes refers to the size of the file on disk in bytes (data + free space)
            // usedBytes refers to the number of bytes used by data in the file
            // Compact if the file is over 20MB in size and less than 50% 'used'
            let twentyMB = 20 * 1024 * 1024
            let canCompact = (totalBytes > twentyMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
            logger.info("totalbytes \(totalBytes) - usedbytes \(usedBytes) - CanCompact \(canCompact)")
            return canCompact
        })

        let realmPath = localRealm(named: user)
        config.fileURL = realmPath
        return config
    }

➤ Lee Maguire commented:
Hi,
Could you show us a code snippet of your localRealm function?
Thanks

➤ Brian Munkholm commented:
Closing due to no response. Should you get more information, please reopen the issue.


[NEMO-183] DAG-centric translation from Beam pipeline to IR DAG

JIRA: NEMO-183: DAG-centric translation from Beam pipeline to IR DAG
Major changes:

Implemented DAG-centric translation from Beam pipeline to Nemo IR, which consists to the two phases:

PipelineVisitor traverses through the given Beam pipeline to construct DAG of Beam transforms, while preserving the hierarchy of CompositeTransforms.
PipelineTranslator defines not only mappings between PrimitiveTransform and IRVertex, but also correspondneces between CompositeTransform and TranslationContext, based on which PipelineTranslator can tune translation behavior.

Minor changes to note:

N/A

Tests for the changes:

Modified existing tests to match the topological ordering produced by the new visitor.

Other comments:

N/A

resolves NEMO-183

@johnyangk Thanks for the review. Please check the updates.

Sounds good. I'll merge once the tests pass.


No Blazor template appears

Problem encountered on https://dotnet.microsoft.com/es-es/learn/aspnet/blazor-tutorial/create
Operating System: windows
When you type Blazor in the search box, no project template appears. I am using Visual Studio 2022 Version 17.8.0

Can you confirm the "ASP.NET and web development" workload is installed? You can check this by running the Visual Studio Installer and choosing 'Modify'.

Yes, the "ASP.NET and web development" is installed

Fixed by reinstalling Visual Studio 2022 again and previously fixing issues with Microsoft Visual C++ 2022 X86

Thanks for the help


Kill BlizzardError.exe

Kill the BlizzardError.exe process before restarting the game.
If the game quits due to an error, a BlizzardError window will appear and it will cause botty to restart the game and then fail to select the game window properly.
This is my first pull requests, so please forgive me if there is something wrong.

I see no issue having this added. Thx.

@aeon0 I see you merged this but I never heard back from the author in response to my comment. You think it'd work without changes?


The option to embed a Gist is always available in a Gist Workspace on KIE Sandbox

See original Jira: https://issues.redhat.com/browse/KOGITO-7562

Bug seems to be functioning differently than the original ticket described. Now the option to embed a gist seems to be permanently disabled


Fashion200k data

I am currently working with the Fashion200k dataset and was wondering if you could provide the JSON file containing the relevant keywords associated with the dataset. This file would be very helpful for my research, and I would greatly appreciate it if you could share it or guide me on how to access it.
Thank you in advance for your help and support.

Hi~ I'm not entirely sure what you actually need. As you can see from the datasets.py file, the triplets in the Fashion200k dataset are constructed on the fly. Specifically, it first mines the image pairs that have one different word in their descriptions and then utilizes the template "replace A with B". So, in actuality, there isn't a JSON file for the triplet data like there is for other datasets. In our work, we considered "B" as the keywords.


the native path intelligence seems broken

VSCode Version: 1.11.0
OS Version: Windows 7

Steps to Reproduce:

create a javascript file and write code like require( '../Store/some-store.js' )
2.there is no directory or filename tips while it works perfect in VSCode 1.10

Now I installed the VSCode 1.10.2, everything is good! But I really hope you fix this as soon as possible, thanks a lot in advance

Tracked with #23962


Added [bStats] badges

Added bStats badges.
The main thing here is that I had to make a 'bridge' of sorts as the bStats API for players/servers helpfully returns [[1545685200000,57224]] [[time,amount]] and so isn't formatted properly. The 'bridge' formats it and returns as {"pluginid": 1, "servers": 57224} so that Joi can validate it.
It is hosted with Glitch (which usually turns off envs after 15 mins) but Uptime Robot will be pinging it every 5 mins (which Glitch allows) to keep it online, but this isn't really a permanent solution.
Bridge:
bStats Issue #28- Add shields

Messages

:book:
:sparkles: Thanks for your contribution to Shields, @Prouser123!

  Generated by :no_entry_sign: dangerJS against b459d846c080837592f29717339597bdd9027329

Can you also include a link to the repo where your bridge code lives?  Once those come through I'll happily review


Fixed spelling errors

Removed the letter 'e' in the word child on lines 27, 37, and 48

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.


[BugFix] MemmapTensor from MemmapTensor dir issue

Description
This PR fixes a bug that arises when you construct one MemmapTensor from another which I noticed while working on #189
Repro:
>>> import torch
>>> from tensordict import MemmapTensor
>>> mt = MemmapTensor(4, 3, 2, 1)
>>> assert mt.squeeze(-1).shape == torch.Size([4, 3, 2])  # this is fine
>>> mt2 = MemmapTensor(mt)
>>> mt2.squeeze(-1)  # AttributeError: squeeze not found

Issue is that internal attribute self._tensor_dir was constructed from elem.__dir__(), but this leads to attributes not being found.

I tried this and it breaks:

Your first example runs fine for me on this branch. At least, when I copy paste the snippet I don't see an AttributeError.
I can reproduce the second example though, that does indeed seem nasty. Let me have a think about that...

This PR is kind of obsolete with the changes from #193.
We can either merge to add the new test or abandon.

Codecov Report
Base: 89.90% // Head: 89.91% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (c4a6bff) compared to base (e406ddf).
Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #192   +/-   ##
=======================================
  Coverage   89.90%   89.91%
=======================================
  Files          24       24
  Lines        8154     8157    +3
=======================================
+ Hits         7331     7334    +3
  Misses        823      823

Flag
Coverage Δ

linux-cpu
85.71% <100.00%> (+<0.01%)
:arrow_up:

linux-gpu
87.94% <100.00%> (+<0.01%)
:arrow_up:

linux-macos-cpu
85.71% <100.00%> (+<0.01%)
:arrow_up:

linux-stable-cpu
85.75% <100.00%> (+<0.01%)
:arrow_up:

linux-stable-gpu
87.94% <100.00%> (+<0.01%)
:arrow_up:

linux-torchrec-gpu
89.56% <100.00%> (+<0.01%)
:arrow_up:

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

Impacted Files
Coverage Δ

test/test_memmap.py
85.32% <100.00%> (+0.15%)
: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.


Change linux netfs running message to be more descriptive

The wording on the current error screen makes it look like a command line program is missing could the error message be reformatted to indicate that a service needs to be started?
Note sure if this should go into a different issue, but maybe give a suggestion for what command should be run to check that it's running, e.g. sudo sytemctl start nfs-server

can you link the message your talking about, I want to make sure we get the correct message

Using nanobox with docker-machine requires tools that appear to not be available on your system.
netfs
View these requirements at docs.nanobox.io/install/requirements/docker-machine/

The messaging in this location is intended to point the user not to a solution but to the documentation where more details can be found.
Although the message from nanobox is intentionally vague i believe the contents of the link is sufficient to point people to take appropriate action.
If more could be done I would appreciate feedback.

I'd agree about the link if it contained info for linux, though a vague error message is mostly useless to a user especially since that error message had me searching for a LONG time since it did not specify what part was wrong

The information at that link is specific about Linux
On Tue, Mar 7, 2017, 11:43 AM Benjamin Claassen<EMAIL_ADDRESS>wrote:

I'd agree about the link if it contained info for linux, though a vague
error message is mostly useless to a user especially since that error
message had me searching for a LONG time since it did not specify what part
was wrong
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nanobox-io/nanobox/issues/333#issuecomment-284816519,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbs3338HwmcAYmb7Ra2hobLE_6ijIvkks5rjaU-gaJpZM4LsyzN
.

OSX
linux

@sanderson I believe it should be detecting your OS and taking you there automatically.

Sorry, the page is supposed to auto-detect the OS and display the content accordingly. I tested on Linux, but it may not be detecting your specific distro correctly. I just updated the content in that doc a bit to clarify a bit of what is needed.
We don't provide specific installation/start/stop instructions for nfs because the methods vary widely between distros. It'd be a tall-order to document and maintain all of them.
On a side note, using native docker on Linux is a lot faster than running docker-machine in VirtualBox


How to improve Big() constructor without forking? (question)

I want to improve the big constructor so it accepts "," as decimal separator and ignores them. For example Big('1,234.50') and Big(100).plus('1,000.50') shall not raise and exception and parse correctly.
I'am using Big.js (and toFormat) with webpack and babel for ES2016 compatibility. So I'm doing import { Big } from 'big.js' etc.
Sorry, JS is not my main language so this may be a simple question.

No, it is not simple. As a starting point:
const stripCommas = n => String(n).replace(/,/g, '');

class B extends Big {

  constructor(n) {
    super(stripCommas(n));
  }

  plus(n) {
    return super.plus(stripCommas(n));
  }
}

// Example

let x = new B('1,000,000');
let y = x.plus('999,999.12345');

console.log(y.toString());    // "1999999.12345"

Including div would involve having to work around the problem that calling super.div will use Big.DP not B.DP, so:
class B extends Big {

  constructor(n) {
    super(stripCommas(n));
  }

  plus(n) {
    return super.plus(stripCommas(n));
  }

  div(n) {
    Big.DP = B.DP;
    Big.RM = B.RM;
    return super.div(stripCommas(n));
  }
}

B.DP = Big.DP;
B.RM = Big.RM;

Ultimately, it will be quite complicated and I do not think it will be worth doing.
It would be much simpler to just use something like
Big(100).plus(stripCommas('1,000.50'))

or
Big.fromString = function (s) {
  return Big(s.replace(/,/g, ''));
};

let x = Big(100);
let y = Big.fromString('1,000.50');
let z = x.plus(y);
console.log(z.toString());    // "1100.5"

Also remember that this is locale specific, so one should take into account, that in some countries comma , is the decimal separator and the thousand separator is a space   etc. Those must anyway be parsed using the specific locale.
IMHO any string logic in this library is not needed as it's a separate problem domain. ( The formatting of numbers. For an example see https://github.com/osrec/currencyFormatter.js )

@MikeMcl :
Thanks for your reply, ended up doing this:
import Big from 'big.js'
import toFormat from 'toformat'

toFormat(Big)

String.prototype.toBig = function() {
  return new Big(this.replace(/,/g, ''))
}

export default Big

Still, I believe a simple extension point should be provided for this.
@swftvsn: this has nothing to do with locales, because we are asuming standard english rules which dictate that '.' is the decimal separator and ',' thousands.

@vizcay Then this is for sure application specific, as this library can't make assumptions about locale.

@swftvsn of course a specific locale is assumed, since is parsing "." as decimal separator. What I say is just to support it completely anyway.


minimize changes with default unattended-upgrades configuration

I'd like us to consider the idea that this module should do a minimal diff with a default unattended-upgrades configuration.
There are two main ways of doing so:

do not touch the default config at all and instead configure in a separate file
do rewrite the configuration but keep the existing commented out lines

We could also mix and match, for example new features like #144 could be done in a separate file completely.
What do people think here?

@anarcat
I'm not entirely sure I understand why this is important. Could you please elaborate? It seems to me it doesn't really matter if you can reproduce the default configuration on your side with the module.
If this is implemented, I think I would prefer option 2, as option 1 means some configuration wouldn't be managed by the module (and that means inconsistency imo).

I'm not entirely sure I understand why this is important. Could you please elaborate?

I think it's important that Puppet modules do not diverge needlessly from shipped configurations. For new users, it makes it hard to review if the package is doing what they expect, because there can be spurious diffs (e.g. on whitespace or comments) with the existing configuration files.

It seems to me it doesn't really matter if you can reproduce the default configuration on your side with the module.

Well that's part of the problem: it's hard for admins to actually tell if they are reproducing default config, because of the extra diff.

If this is implemented, I think I would prefer option 2, as option 1 means some configuration wouldn't be managed by the module (and that means inconsistency imo).

The problem with option 2 is that it is harder to keep in sync. But I agree consistency might be best.


Password reset malfunctioning

Subject: Password reset malfunctioning
Description:
I clicked on the Reset Password link I received via email, then it said it was validated, then it took me to the login page, after entering my email and hitting enter, the Continue button turned grey but then it froze there.
Results:
I should have been able to reset my password and then log in.  It may just be a delay.
Backend version: develop-7c33e18d
Frontend version:
User Agent: Mozilla/5.0 (X11; CrOS x86_64 14092.77.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.107 Safari/537.36
Page: https://couchers.org/login
User:

not enough info or can't reproduce


Fix/557ww 7.4 configs

Tweaks to the 557ww-7.4 config and attribs files:

Changed the JULES-5.0 and Noah-3.9 soil moisture DA model pertattribs files on the recommendation of the LIS DA team.  The new standard deviation values are now found in this files for 557ww-7.4.

Minor tweaks (primarily for consistency when comparing between various files) of the ldt.config and lis.config files for jules50, noah39, and noahmp401, for both ops mode and "for_discover".

It would be appreciated if @emkemp and @yhkwon81 confirm these changes before this PR is merged.

I confirmed the new standard deviation values for JULES-5.0 and Noah-3.9 soil moisture DA model pertattribs. Thanks.


Enhance existing tools

Enhance existing tools

Hi AseanK, I want try to help. Do you have any specific enhancement's criteria, or which tools are open to enhance ?

Hi AseanK, I want try to help. Do you have any specific enhancement's criteria, or which tools are open to enhance ?

Hello, all of them are open! Personally, I'd like the encoding to have multiple encoding types (unicode, base64, etc.) or the NATO_translator to translate the whole sentence. I mean, you're welcome to try out and see if you have any suggestions!

Hello! @rexbrandy
I can think of two enhancements for now

adding encryption to tools/encode.py (cryptography libraries or custom algorithm)
customized betting amount for games/gambler.py

You're welcome to try out our games and tools and see if you can spot any room for enhancement or even typos!

@AseanK
Cool happy to jump into both. Quick question, what are the use cases for tools/encode.py?

@rexbrandy
The use case for tools/encode.py is to encrypt/decrypt the entered string.
Right now, the program uses the Caesar Cipher as encryption.
In this case, the shift variable is the key to encode/decode.

@AseanK, I wish to enhance a few of the games too! Could you please assign this to me?


refactor: Delete isFinal , isStatic to support recored

#105
val modifiers = field.getModifiers();
      if (isFinal(modifiers) || isStatic(modifiers)) {
        continue;
      }

This code causes the recorded dto to not work correctly when used with Java 17 and later versions.
More precisely, the @FormProperty annotation does not work.
Removing that code does not cause the problem.
I upgraded my project to JDK 17 and ran the test.
We found that removing that code made the record work.

Example
@FeignClient(url="https://oauth2.googleapis.com", value = "GoogleAuthApi")
public interface GoogleAccessTokenClient {

    @PostMapping(
            value = "/token",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE
    )
    GoogleAccessTokenResponse getGoogleToken(
            GoogleAccessTokenRequest request
    );
}

@Data
public class GoogleAccessTokenRequest {

    @FormProperty("client_id")
    private String clientId;
    @FormProperty("client_secret")
    private String clientSecret;
    private String code;
    @FormProperty("redirect_uri")
    private String redirectUri;
    @FormProperty("grant_type")
    private String grantType;
}

Code where the @FormProperty annotation works correctly
public record GoogleAccessTokenRequest(

        @FormProperty("client_id")
        String clientId,
        @FormProperty("client_secret")
        String clientSecret,
        String code,
        @FormProperty("redirect_uri")
        String redirectUri,
        @FormProperty("grant_type")
        String grantType
) {
}

Code where @FormProperty annotations don't work correctly

Thanks, I'm not a maintainer in the OpenFeign org, only in Spring Cloud OpenFeign. CC @velo .

@velo
Although the project hasn't been updated in 4 years, it is still actively used. This modification might seem minor, but it can make a significant difference in the project's functionality and efficiency.

Just out of curiosity, do we need to update the test cases?
And can someone also shed some light of the use cases for which these isStatic & isFinal filters were added.

These isStatic and isFinal filters also affect data classes with vals in Kotlin - they simply won't be serialized.

Does anybody know, there is any plans to merge this PR?