Customisable config file storage paths goal on future enhancements

Hello!
I really like clipse, especially with it being a TUI app, and really wanted to help out by contributing something.
Looking at your list of future enhancements, I came upon the "Customisable config file storage paths" goal, and wanted to ask what you meant by it... Do you mean having a config file that is not stored in the default ~/.config/clipse/? If so, how do you envision knowing where the config file is to read from it? The only ways I can think of is via cli arguments or setting environment variables.
If you permit, I would like to try my hand at adding a config file for item limits, keybinds, etc. and making it's storage path customisable.

Hi @Pranav-Badrinathan 👋
Thank you so much for the kind words and for planning to contribute!
To clarify what I meant, I was thinking to keep the .config/clipse dir and add a new config file that could potentially allow the specification of custom paths for the other files. I would say the custom paths is less important than the custom binds/limit size etc.
That was just initial thoughts though so feel free to experiment with any other solutions.
Also thought about combining the custom config with the theme config file. It would make that file more complex but probably save some lines of code from having to manage a new source file.
Overall though I'd want to prioritise the user experience so that's the best thing to keep in mind. Adding addition cli args for updating the config on the fly may be a good way to manage this.
Excited to see how you get on, let me know if I can assist/clarify further :)

Thanks for the prompt reply!

To clarify what I meant, I was thinking to keep the .config/clipse dir and add a new config file that could potentially allow the specification of custom paths for the other files.

So something like this (assuming .json format for config files, as you are currently using that):
{
  "sources": [
    {
      "type": "theme",
      "path": "~/path/to/theme/file/here",
    },
    {
      "type": "config",
      "path": "~/path/to/config/file/here",
    },
    {
      "type": "dir",
      "path": "~/path/to/entire/dir/to/include/here",
    }
  ]
"other config options like item limits, key rebinds, etc. here"
}

Also thought about combining the custom config with the theme config file. It would make that file more complex but probably save some lines of code from having to manage a new source file.

Personally, I think keeping them separate is nice, due to separation of concerns. Having multiple themes you switch between can also be a feature in the future. And if we go with the sourcing of files as above, it is essentially managing any number of source files 😅.

Adding addition cli args for updating the config on the fly may be a good way to manage this.

Auto updating on config save could also be something good then, for UX. Makes configuration (especially theming) much easier.
I implement the system above and test it out, and report my findings. Do tell me if something is missing/not preferrable in my proposition.

As for how the configuration data split between multiple files (they type "config" files specifically) could be handled nicely, it could be represented as a static struct that holds the config state and is loaded upon calling clipse -listen

Hi @Pranav-Badrinathan,
Yeah that example looks great! I know toml/yaml is more commonly used for these configs recently but I'd prefer sticking to json for now to maintain consistency like you suggested.
Also I agree the separate file system works better here to allow modularity for future developments, great point.
I like the idea of update on save. Currently the theme file is loaded each time the TUI view is ran which (given how the TUI only tends to be open temporarily) achieves the same effect. It sounds like what you're suggesting here, including the load from clipse -listen would be an optimisation of this as would potentially require less file processing, but if this method still requires a check of the config each time the TUI is loaded though there may not be a need for the update on save.
Your suggestion sounds good to me and I'm excited to see your findings :smile:

Great! 😄
Ideally, it would not re-source the config each time the TUI opens, but this is probably lightweight enough to not see much of a difference.
I unfortunately am busy today, but I will start on this tomorrow!

So I was working on the code and noticed you flip between using "historyFile" and "configFile" to refer to the clipboard_history.json file. I am probably going to rename this for consistency and use historyFile to refer to the actual clipboard history, using configFile for the new config file.

Hi @Pranav-Badrinathan ,
I appreciate your attention to detail here and I agree with your approach towards naming conventions. I did think the clipboardConfig.go file was getting a bit busy.
Please feel free to make these adjustments and I can make any suggestions when the PR is raised (if necessary).
One extra thing to add in case you are not already aware, since you picked this up there has been a new commit for implementing two new keybindings, one for pinning items and one for toggling the pinned view. See PR#27 for more info. You may want to consider this for the custom binds you add.
Thank you again and I look forward to seeing your progress 😁

Hey @savedra1, there is something I wanted your input on. So taking in an arbitary number of source files (ones that can be config files themselves, and thus define more source files and settings) means that multiple config files could define the same setting. To address this, I decided we could just pick the last set value and use that, allowing the end user to overwrite the same value in different files. If you take a look at config.go, you can see how I am loading the source files.
The problem arises because Go's primitives are not nilable, and it does not have an optional type. So there is effectively no way to say "This value is undefined", as the zero values themselves can be values set in the config. Currently, I am checking to see if the field of a source file is a zero value (meaning it is not defined in json), and if no, use it to overwrite the old value. This means a zero value, like false, can never overwrite a non zero value.
The only way I see to fix this behaviour as of right now is to have the config struct's members be pointers to primitives, so they are nilable and can be checked to see if the value is undefined. Any thoughts or suggestions?
relevant commit.

Hey @Pranav-Badrinathan, it looks like you've made some great progress!
Honestly I can't think of any immediate fixes myself, but if enforcing a single 'master' config file that can only define paths for other 'non-master' sources (like theme/history/imgs etc) would solve the issue, I would be happy with that solution. EG if the base dir .config/clipse has  to be used for at least clipse_config.json, but then other source locations can be specified within that file.
I will have a deeper look into this though when I get the chance, I see you may already have a siolution as well so will keep an eye out for that :smile:

Hi @Pranav-Badrinathan,
After some more thought I do think a single config file would be easiest here, maintaining the need for the original .config/clipse dir for at least that file - if you have a nice solution to the above though do let me know :smile:

Oh wow @Pranav-Badrinathan great spot!
The items you mentioned that would currently exist in the config sound perfect for the first iteration!
The window resizing would also be great, I think this would be highly dependant on the user's system though which could be tricky, which is why the advice for that is currently to let the window manager do the heavy lifting there.
I look forward to receiving the PR! Once we get that merged I'll be ready to ship out the next release :heart_eyes:

Just finished reading all the theme files from config and using them for the themes. So that is now configurable. Last 2 things I need to do before PR is adding support for relative file paths ("~/" and maybe "./") in the config files, as it currently requires an absolute path, and last thing would be to use os/fsnotify or something similar to only re-load the config and all related source files upon change.
Even if you do not want to support the file reload on change in this PR, I think at least relative file paths are a must, so I'll get to doing at least that.

Amazing! thank you for keeping me updated. I look forwarded to testing out your PR  when it comes through and let me know if there's any way I can assist :smile:

DONE! I think at lease. I will update the README and then open a Pull Request.

Thank you so much @Pranav-Badrinathan! I will test as soon as I'm back from vacation and update the PR 🤩

#36 merged!
Massive shout outs to you in the next release notes. Thank you so much for the excellent work :rocket:


add help menu and page for Chinese language, backport to v1.0

backport to v1.0 of #77

LGTM

LGTM


Feat/user management

Added initial UI components and begann with user management page. Issues are not finished yet but the merge is to share the components in the master branch.

Cooli Sach 🥇 Hesch dir eh Medallie verdient!

Danka 👨🏼💻


I can't change my avatar image in web page.

Describe the bug
I can't change my avatar image in web page.
To Reproduce
Steps to reproduce the behavior:

Go to https://mtgarena.pro/u/Ticket with my account.
Click on Change Avatar.
Select same Image and push "SET AVATAR".
Page is reloaded. But avatar image was not changed.

I retry 1-4 from IE, Chrome, Android mobile phone.
And I retry with other Images(big or small).
...I can't change my avatar.

The same here. A few days ago I succeed in changing my avatar, and today when I was testing for one of my friends, it doesn't work and Karn was my new avatar...
Thank you for the hard work ! Your tracker is amazing, with some bug, but awesome :)

Yes.
My Avatar is Karn too.

Thanks for reporting, avatar is can be change now :)

I checked it.
And I can change my avatar.
Thank you for your support.


Add support for recycling meta images and the cy-GB locale

Fixes WRAP-576
Fixes WRAP-577
Also includes some small translation fixes
Fixes WRAP-582
Fixes WRAP-583

:tada: This PR is included in version 1.31.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Litmus example is not working

Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
What happened:
Tried to run the example provided in Litmus Docs. The result is not getting populated in chaosresult CR. The nginx pod was never killed and the chaosresult engine-nginx-pod-delete was never created. However when I ran kubectl get pods -n litmus the pod engine-nginx-runner is shown as completed.
What you expected to happen:
running kubectl describe chaosresult engine-nginx-pod-delete should return something like this from the example docs
Name:         engine-nginx-pod-delete
Namespace:    default
Labels:       <none>
Annotations:  kubectl.kubernetes.io/last-applied-configuration:
              {"apiVersion":"litmuschaos.io/v1alpha1","kind":"ChaosResult","metadata":{"annotations":{},"name":"engine-nginx-pod-delete","namespace":"de...
API Version:  litmuschaos.io/v1alpha1
Kind:         ChaosResult
Metadata:
  Creation Timestamp:  2019-05-22T12:10:19Z
  Generation:          9
  Resource Version:    8898730
  Self Link:           /apis/litmuschaos.io/v1alpha1/namespaces/default/chaosresults/engine-nginx-pod-delete
  UID:                 911ada69-7c8a-11e9-b37f-42010a80019f
Spec:
  Experimentstatus:
    Phase:    <nil>
    Verdict:  pass
Events:       <none>

How to reproduce it (as minimally and precisely as possible):

Open Litmus example docs (version 0.6.0)
Follow the steps as provided
When I ran kubectl describe chaosresult engine-nginx-pod-delete it throws the error Error from server (NotFound): chaosresults.litmuschaos.io "engine-nginx-pod-delete" not found

Anything else we need to know?:
kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Host OS : MacOS using Docker for Desktop with Kubernetes 1.14.3

@kmjayadeep , can you share the logs of the engine-nginx-runner pod?

PLAY [localhost] ***************************************************************
2019-10-06T03:56:40.908523 (delta: 0.031031)         elapsed: 0.031031 ********
===============================================================================

TASK [Gathering Facts] *********************************************************
2019-10-06T03:56:40.915079 (delta: 0.006531)         elapsed: 0.037587 ********
ok: [<IP_ADDRESS>]

TASK [debug] *******************************************************************
2019-10-06T03:56:45.741971 (delta: 4.82687)         elapsed: 4.864479 *********
ok: [<IP_ADDRESS>] => {
    "msg": [
        "List of Chaos Experiments: [u'pod-delete']",
        "Each experiment will be launched & monitored by the executor",
        "Beginning Execution, view experiment logs on respective job"
    ]
}

TASK [debug] *******************************************************************
2019-10-06T03:56:45.805465 (delta: 0.063463)         elapsed: 4.927973 ********
ok: [<IP_ADDRESS>] => {
    "msg": [
        "c_rand value is: ",
        "c_max value is: "
    ]
}

TASK [include] *****************************************************************
2019-10-06T03:56:45.869706 (delta: 0.064208)         elapsed: 4.992214 ********
included: /executor/executor.yml for <IP_ADDRESS>

TASK [Verify if ChaosExperiment CR is available] *******************************
2019-10-06T03:56:45.976147 (delta: 0.106409)         elapsed: 5.098655 ********
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": true, "cmd": "kubectl get chaosexperiment pod-delete --no-headers -o custom-columns=:metadata.name", "delta": "0:00:00.553590", "end": "2019-10-06 03:56:46.738373", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2019-10-06 03:56:46.184783", "stderr": "Error from server (NotFound): chaosexperiments.litmuschaos.io \"pod-delete\" not found", "stderr_lines": ["Error from server (NotFound): chaosexperiments.litmuschaos.io \"pod-delete\" not found"], "stdout": "", "stdout_lines": []}
	to retry, use: --limit @/executor/test.retry

PLAY RECAP *********************************************************************
<IP_ADDRESS>                  : ok=4    changed=0    unreachable=0    failed=1

2019-10-06T03:56:46.764939 (delta: 0.78876)         elapsed: 5.887447 *********
=

When I ran the command kubectl get chaosexperiment
I get :
NAME                AGE
container-kill      3h18m
pod-delete          3h18m
pod-network-delay   3h18m

Sir, make your deployment in litmus namespace, and change the chaosengine's yaml to get the apps in litmus namespace, give the chaosServiceAccount as 'litmus' , appns: 'litmus',metadata.namespace: 'litmus'.
And then use the instruction in this PR, it just changes the chaosExperiments namespace to 'litmus'.
PR link : https://github.com/litmuschaos/litmus-docs/pull/39

Thanks @rahulchheda
It worked after some trial and error. I think we have few more changes to be done in https://docs.litmuschaos.io/docs/next/example.html page. Here are the changes I did to make it work.
Added -n litmus to
kubectl create -f https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/experiments.yaml

Added -n litmus to
kubectl run myserver --image=nginx

Change appns from default to litmus in chaosengine.yaml
And finally
Added -n litmus to
kubectl describe chaosresult engine-nginx-pod-delete

Following these exact steps (with the changes above) worked for me. I have tested in 2 different devices and 1 cluster. I think these should me added to the doc as well. I can create a PR if it is okay.
Also I would suggest, getting started section should contain instructions to run experiments on already running deployments and the example page should contain step by step instructions for a newbie to try it out and see it in action.
I'm still not able to run it for default namespace though :(

Great! Thanks @kmjayadeep , please go ahead & raise the PR with the working steps.

Thanks for the detailed explanation @ksatchit
I'm trying out these as you explained

generally, the idea is to keep chaos resources in the same ns as the one where the app ns is present (just FYI ..as this will help to isolate app-specific chaos ..or even run parallel chaos for different apps, the chaos operator however, can continue to stay in litmus ns).In such cases, the following changes should be made. The same should work for existing/already deployed apps as well. (Taking example of default ns):Note: Right now this is supported only on K8s deployments with support for other types (statefulsets, daemonsets coming up in 0.7 release)# Annotate the deployment Annotate the app in default ns with the same one used in your earlier trial (litmuschaos.io/chaos="true")# Pull the experiments into default ns- This time without the |-n litmus` flag# Create ChaosEngine manifest yaml like this:- Provide metadata.namespace of ChaosEngine as default

Provide spec.appinfo.appns as default
Identify a unique label of the app (one by which it can filtered). Typically this should be present at metadata.labels & spec.template.metadata.labels of the app deployment (you can get this via kubectl get deploy  -o yaml) or via a -- show-labels` cmd.
Provide above label in spec.appinfo.applabel of the ChaosEngine yaml.
Create an serviceaccount in the default ns and provide it in spec.chaosServiceAccount (link to example provided on this thread &GitHub  issue - you can apply this yaml to create one svcAcc). - Apply/Create the chaosEngine.# ChaosResults- This can be viewed/described in the default ns itself (edited)

I will try to run it on default and litmus namespaces as you suggested and create a PR with changes to be made on the doc
Thanks for all the help!


Adding Netflix clone.

Netflix clone using HTML, CSS & Js will be added.

Hey @HarshwardhanPatil07 can you assign me this issue under Hacktoberfest?

@Shubbu-07 @TRISHAHALDER there you go!

Hey! @HarshwardhanPatil07 I've added Netflix clone website. Please check it out.

This repository is excluded from the Hacktoberfest event. @HarshwardhanPatil07 please checkt it out.


refactor: add svelte-ignore a11y comment

Description
Changes to prevent warnings on compilation.
svelte: A11y: A form label must be associated with a control.
Related Issue
#17

Thanks @mugi111!

@mateomorris
Thank you as well !
I would be happy to help you again if I get the chance.

Sounds great! I hope you do


Add timeout and improve message statistics

This PR depends on https://github.com/01org/mavlink-router/pull/15

Fixed Lucas comments

You can fix that by having some fwd declarations. No need to have Mainloop
implement the Router interface.
On Feb 8, 2017 4:51 PM, "José Roberto de Souza"<EMAIL_ADDRESS>wrote:
@zehortigoza commented on this pull request.
In mainloop.h https://github.com/01org/mavlink-router/pull/16:

struct endpoint_entry {
struct endpoint_entry *next;
Endpoint *endpoint;
bool remove;
};
-class Mainloop {
+class Mainloop : public Router {
I don't think that we will need another Router implementation, Mainloop is
only implementing Router because this way Endpoint can include router.h
without cause a circular dependency.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/01org/mavlink-router/pull/16, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB8eFeSxhWylxQOLLBRlJX-LMUdR-jFks5ramMrgaJpZM4L6HLy
.

Can you explain the numbers please?
                messages with CRC error: 916 0.163405% 48KBytes
                sequence of messages lost: 539945 96.320885%
                messages handled: 19708 792KBytes

So you counted 916 messages with crc error. But you are saying you had 539945 messages lost (due to resync, etc).... Given the seq number is uint8_t, it wraps quickly and you can only be sure of 256 * 916 == 234496.... How come you concluded you have more than 2 times that maximum?

Can you explain the numbers please?
               messages with CRC error: 916 0.163405% 48KBytes
               sequence of messages lost: 539945 96.320885%
               messages handled: 19708 792KBytes

So you counted 916 messages with crc error. But you are saying you had 539945 messages lost >(due to resync, etc).... Given the seq number is uint8_t, it wraps quickly and you can only be sure of >256 * 916 == 234496.... How come you concluded you have more than 2 times that maximum?

The calculation of sequence lost only takes place after CRC, so this 256 * 916 == 234496 do not apply.

Merged

To clarify here for possible future reference. The issue with the math is that for each message sucessfully received we can have 255 with error .. so the maximum theoretical errored messages are n_success * 255 and not n_crc_errored


[DOC] add documentation for macros

Several of the items in here could / should probably be tackled in separate PRs

[x] transfer content from hackmd
[x] add links to mkdocs, mkdocs material, macro plugins (https://github.com/bids-standard/bids-specification/pull/963#pullrequestreview-836488200)
[x] remove current doc from CONTRIBUTING (or integrate it in the new doc)
[ ] decide where this doc on macros should go (root folder, in tools, somewhere else?)
[ ] finalize content of doc

[x] possibly remove direct reference to the schema to avoid having too many "new" concepts in that doc
[ ] improve doc string of each macro

[ ] preface each macro call with link to the macro doc (see #960)
[x]  table of available macros
[x]  first example should be a simple example that doesn't rely on any information from the schema

[ ]  add a link checker for our doc (as the issue was raised that we had undetected dead links in the doc)

related: #960

@VisLab created a table of available macros (very rough but better than nothing), also made sure that the first example is "schema less". Feel free to make wordsmithing suggestions.
@tsalo added links at the end

Thank you for making the changes.... Here are a few more:
In the table of contents, I would suggest changing the title to:
Below you will find answers to frequently asked questions regarding using macros in the BIDS specification:
and then eliminating the first level of the table of contents.

The section that titles the table, I would suggest changing to:

What macros are available?

In the Adding a new term to the table section.  There is a typo:

If this is the case because the term already exists

In the Should I create a macro if I need a new kind of table? section, I would change the second paragraph to start with:

... unless it is clear that this kind of table will reappear many times in the future in the specification.

Otherwise it isn't a sentence...

Thank you again for producing this document.  I am looking forward to the links to the examples... but I think that it has cleared up many of my own confusions, and hopefully others as well.

@VisLab made the suggested changes in this commit: https://github.com/bids-standard/bids-specification/pull/963/commits/be1a2ed51c194321c2dbb9e16996aa933e304895

Thank you again for producing this document. I am looking forward to the links to the examples... but I think that it has cleared up many of my own confusions, and hopefully others as well.

Regarding examples, I am uncertain what the best way to proceed.
2 suggestions that are not mutually exclusive (a mix and match is possible depending on the examples)

link to some (simple) "live examples" that exist in the specification.

pros:

this is more "ecological" and stays close to what users might have to do
can allow users to "run" the examples but using mkdocs serve to see how they render for real

cons:

harder to maintain because the link might break (though quite a few macros are used only once and in location that don't change often)

add examples that in the same documentation

pro: some examples already exist in that documentation
con:

examples cannot be run to be rendered

there is notebook for the file tree one but it is not an example of the macro per se but one for its underlying code.

those examples will have to be updated if the macro change

Feedback welcome.

Either way or mix is okay with me.   One way is to have links in the table to examples in the document.  Some of the examples could have links to live examples at the end of the example.

@Remi-Gau, I'm hoping we'll be able to transition to proper auto-executed examples as we move toward a separate repo and/or documentation, but for right now I think static examples would be easier to draft.

Added some links to examples as used in the spec currently. Those might "break" (by not pointing the the correct line) but this is better than nothing for now.
So this should be ready for merging IMHO: the unticked boxes in the top messages should probably be tackled in different issues.


Training: TypeError: init() takes from 1 to 2 positional arguments but 4 were given

Any suggestions? I was just trying to train using your code on the original file but keep getting errors cropping up I've been blocked by this one.
AITextGenerator/src/json_generation/paragraph_preprocessing.py", line 20, in separate_paragraphs_all_files
parser = ParagraphParser(min_threshold, min_length, max_length)
TypeError: init() takes from 1 to 2 positional arguments but 4 were given

Hello, I pushed a commit to master branch that should fix the issue. Didn't test it though but it's simple enough.
Simply put, we changed our ParagraphParser at some point to handle paragraph sizes by itself, randomizing them along the way ; and we forgot to change it in the initialization of the parser in the function you pointed out.

I'll let the issue open until you confirm it solved the problem! :)

It fixed the problem and successfully got past the point it had an error above. I see how you fixed it... I was way off down left field and appreciate the assistance. I'm just replicating what you did prior to trying my own datasets so you may see me asking more questions. Great work. Appreciate it.


python3Packages.pysecuritas: init at 0.1.6

Motivation for this change
Python client to access Securitas Direct Mobile API
https://github.com/Cebeerre/pysecuritas
This could become a Home Assistant dependency.
Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

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

2 packages built:

python38Packages.pysecuritas
python39Packages.pysecuritas

@ofborg eval


Add rollover log driver, and --log-driver-opts flag

Closes #8911
This adds log rollover capability to docker. I have added a new driver called rollover for this.
There are two options that can be specified along with this option. In order to specify these options, I added a new flag called --log-driver-opts. That would allow one to specify options like this
docker run --logging-driver rollover --log-driver-opts max_size=1k --log-driver-opts file_count=10

@wlan0 Gofmt check failed.
We need design review on new flag, but I sorta like it, not tried to use though.
ping @crosbymichael @tiborvass @jfrazelle

@LK4D4 fixed the gofmt issue.

@wlan0 Haha, tests don't compile :)

@LK4D4 Fixed it. There was a package that was unused, I removed it..

@LK4D4 All tests pass now.. There were some unused packages earlier

@wlan0 @LK4D4 I'd much rather have --log-opt like we have --storage-opt.
Also, I think we should not make it a new driver, but instead make the default json-file driver have options with this new flag. So rollover would be done like this: docker run --log-opt max_file=10 --log-opt max_size=1k.
Proposed defaults:

max_size = 0 (no limit)
max_file = 1

What do you guys think of this? If we can agree, we could move on to code review.

+1 I like @tiborvass's suggestion.

@tiborvass I'm okay with moving that logic to default driver.

@tiborvass I also agree it should be in the default, we did it as a separate only because we didn't know if you guys would want us screwing with the default logging driver.  For example, just keep the default stupid simple because you know it works.

@ibuildthecloud except this PR would introduce log options, and that's a whole new world :)

Okay.  To sum up.

Change --log-driver-opts to --log-opts
Remove "rollover" driver and put logic in json-file
max_size = 0 should mean unlimited
Defaults should be max_size=0, max_file=1

Question:

Should it be max-size or max_size, which is more consistent with existing Docker?
docker logs should read from all historical logs or just the latest?

@ibuildthecloud
flag would be singular: --log-opt.
Let's make it max-size to make it consistent with -restart on-failure[:max-retry]. Also I generally prefer - rather than _.
If docker logs outputs only the latest file, the default value of --tail would need to change to latest or something like that. I'm not sure what's the best solution for that, I'm still thinking.

@LK4D4 @tiborvass updated the code according to comments.

Now, the flag is --log-opt
the options use - instead of _, so max-file and max-size are the options
the options have been added to the json-file log driver
the options have default values max-file=1 and max-size=0 (infinite)
updated docs

@wlan0 in your example --log-driver json-file is not necessary since it's the default.
I agree with everything you pointed out. Don't forget to update the API as well.
What's left to decide is what to do with docker logs... :S @LK4D4 @jfrazelle @icecrime

Great!

:+1:

+1

@tiborvass Once the max is reached, I go back to file1

@wlan0 What do the filename look like?  When a container is destroyed, do all the log files get deleted?

The logs are always written to the default log file - /var/lib/docker/containers/$CONTAINER_ID-json.log
Then the logs are rotated amongst
/var/lib/docker/containers/$CONTAINER_ID-json.log-1
/var/lib/docker/containers/$CONTAINER_ID-json.log-2
/var/lib/docker/containers/$CONTAINER_ID-json.log....
/var/lib/docker/containers/$CONTAINER_ID-json.log-$(n-1)
where n = the maximum number of log files
I start by writing to the default log file. Then once this file reaches (max_size/n), I remove the last log file (/var/lib/docker/containers/$CONTAINER_ID-json.log-$(n-1)) and switch the contents of file-$(n-2) to file-$(n-1), and file-$(n-3) to file-$(n-2) and so on...
i.e. The higher the number on the log file name, the older the log is.
When a container is destroyed, the log files are deleted as well

Any reason why the default is unlimited? Just thinking about situations where a user has not configured docker and their systems will fill up with logs.

@defunctzombie because that's how it currently works.

@tiborvass for the docker logs command, we could add a new flag called index (i)
The index flag represents the file number that you want to tail. i would be a valid option only for the rollover log driver. it would have a default value of 0, meaning you tail the latest logs.
this way, a user can tail whichever one of the log files they want to.

If any kind of driver specific options are to be added for logging, these need to be specified in a dynamic way without adding a ton of flags which are driver dependent.
This would be OK:
docker logs --driver-options "option1=value1,option2=value2" container-id

NOT OK:
docker logs --some-driver-option 6 --some-driver-another-option foo container-id

@unclejack we already have --storage-opt. So the format is --log-opt k1=v1 --log-opt k2=v2

@wlan0 like I said earlier, there would not be a rollover driver, it would be part of the default json-file driver.
Everyone, are we all okay naming the different files *.log then *.log-1, then *.log-2 ? Shouldn't we do *.log then *.log.1 then *.log.2 instead?
@wlan0 if you want to add a new --index flag to docker logs, it has to have a meaning for ALL drivers, and I'm afraid it does not. So we need a better solution. Basically each driver would get a request saying "gimme the last --tail logs". By default --tail=all. Should all be interpreted differently by different drivers? I feel like there's something wrong with docker logs. Maybe docker logs only makes sense for with the default driver :S Ping @LK4D4 @icecrime @crosbymichael

I think that developing docker logs for each driver is PITA and doesn't worth it.
But this driver will be default, so for now we can end with tailing last file and document it.

@LK4D4 then how would you tail ALL files ?

@tiborvass I would just document that you can't tail ALL files now. I'm not sure that there is person in world who want so big tails(I'm sure they exist, but they want it only to make me sad).

@LK4D4 how about having --tail last by default, and still keep --tail all ?

@tiborvass Do we have --tail=all already implemented to keep it?

@LK4D4 currently --tail=all is the default behavior :)

@tiborvass But currently there is no rollover :)

@tiborvass -- I like this *.log, *.log.1 *.log.2 better too. I'll update the code.

@LK4D4 yes but if --log-opt max-size=1k --log-opt max-file=3 is set, then --tail=all should still mean all logs. So I would suggest --tail=latest be the default and return only logs from the latest file.
Also, docker logs should probably error out if the driver is something else than json-file.

I don't think you should rollover at max-size/n.  If I set max-file 5 and max-size as 50mb, in my brain it makes more sense that that would create 5 50mb files (=250mb).  That seems more in line with other logging systems.
For logs I think we should do one of the following:

Don't change the logs UI at all.  docker logs --tail=all means that we would pipe the response of log-n, log-(n-1), ..., log.
If option 1 is difficult, we punt and just document that docker logs only works against the latest log.

@ibuildthecloud I agree with you for max-file and max-size.
I think it makes sense that by default docker logs returns only the latest log file. But I don't want that to be upon --tail=all coz that would be misleading, hence have --tail=all return all logs, and make --tail=latest default that would only return the latest log file.
On second thought, each logging driver could implement however they want both --tail=all and --tail=latest, on a best effort basis.

@tiborvass @ibuildthecloud
I've accommodate the changes suggested. To sum up the current code behavior,

Now, the flag is --log-opt
the options use - instead of _, so max-file and max-size are the options
the options have been added to the json-file log driver
the options have default values max-file=1 and max-size=0 (infinite)
updated docs
we do *.log then *.log.1 then *.log.2 instead of *.log then *.log-1 then *.log-2
we rollover at max-size for each file, instead of max-size/n

docker logs

docker logs --tail all prints all the logs (from all files) in order in which they were written,
docker logs --tail latest print the current log file only
--follow option has the same behavior as before
default tail option is 'latest'
docker logs --tail n,  where n is a number tails the last n lines of the current log file only

@wlan0 wow you rock! Just keep in mind this is still in design review and there can be back-and-forths :)
Small nit: I don't see why docker logs --tail n should tail the last n lines of the current log file only. It's fine to optimize for that's probably the most frequent usecase though. We could check the number of lines TailFile returned, and if it's less than what was requested, then move on to the next file.
@LK4D4 @ibuildthecloud @jfrazelle do you guys agree on --tail=latest vs --tail=all and make --tail=latest default?

@tiborvass I agree, with all and latest, and that latest should be the default.

@tiborvass Fixed the code to return last n lines combining multiple files, if latest file doesn't have enough lines

ping @tiborvass

I like --log-opt thanks! and I think --tail latest,all is sane

I'd love to have @LK4D4's opinion before moving to code review.

@tiborvass Ok for me

@LK4D4 should we split this PR into two PRs?  That way we can get log-opts in first and and use it with the syslog driver.

@ibuildthecloud Yes, I'm okay with introducing log-opts for syslog first.

any idea when this will be merged? thx

@wlan0 @ibuildthecloud is this thus dependent on #12422 ? If so, I would really appreciate if @wlan0 could close it and reopen it when it's ready again for review. Thanks!

closing this, will reopen after #12422 gets merged

https://github.com/docker/docker/pull/12422 was merged. I'll re-open this PR so we don't forget
ping @wlan0 this probably needs a rebase now :)

Thanks @thaJeztah! Will rebase now.

@LK4D4 @tiborvass @thaJeztah rebased and ready.

@wlan0 awesome, thanks!

(repushed to resolve merge conflicts)

Sadly this needs another rebase

Can you please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "rollover_log" git@github.com:wlan0/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

This will update the existing PR, so DO NOT open a new one.

ping @LK4D4 @tiborvass @cpuguy83 PR was updated

thanks @thaJeztah. Rebased and Repushed.

@tiborvass @cpuguy83 Updated based on your comments.

Functionality is generally working, however.
If I pass in, let's say... --log-opt max-file=3 to the daemon, and then do --log-opt max-size=10K on docker run, the daemon max-file is not taken into account.

@cpuguy83 The behavior you described is correct. It doesn't make sense to specify max-file without specifying max-size. With the current logic, it selects either the defaultlogConfig or runConfig.hostConfig.LogConfig, it doesn't merge them into one.

ping @cpuguy83. The log-opts validations happens in the driver now.

@wlan0 Would you like someone to carry?

@cpuguy83 Updated the PR.

LGTM

@cpuguy83 @LK4D4 I separated logger and reader interfaces.

oh man needs rebase then I promise we should be able to get this in, hopefully, no promises, well kinda... ;)

not a problem :) Gimme till the end of the day.

@jfrazelle the rebase was fortunately easier than last time. :) It's ready.

ping @LK4D4 for last review :)

code LGMT. Moving to docs review.

@calavera Fixed the doc!

@wlan0 Thanks for the contribution. Please check your docs output with a make docs from the docs dir.

@moxiegirl @thaJeztah I've updated the docs based on your comments.

@thaJeztah @moxiegirl Updated.

Hi,
Thanks for the PR as I have no doubt it adds a very useful feature to Docker. Here are some comments about the doc changes.

docs/reference/logging/index.md

As @thaJeztah mentioned, I think it is worthwhile to clearly document that max-file is meaningless without max-size. At the same time, we should also mention the default value for max-size (which is unlimited).

There is a missing space in "The docker logscommand"  though it is not this PR's doing.

docs/reference/commandline/logs.md

It is not clear to me why log-opt option is added to docker logs command. What exactly can I pass with this option? I may be missing something here but the options max-size and max-file make sense only  for docker run command.

If I run docker logs without any options, does it combine all the log files or just return the latest? I ask because the command seems to default to "latest" when an invalid value is passed to --tail option. Similarly, does --since option apply across all the log files?

docs/reference/commandline/run.md
It would be beneficial if an example is provided in this file covering the new log options.

@draghuram makes very good points. @wlan0 can you clarify in the docs these points please? Thank you for being so cooperative on making changes. User would appreciate this extra clarification.

@moxiegirl @draghuram Thanks! Absolutely not a problem. I would like to be as clear as possible while describing these options as well.
Firstly, I've updated the docs keeping in mind all of your comments. Secondly, to answer your questions -

--log-opt doesn't make sense in logs command. Good catch. Removed this from the logs.md file in the docs.
If you run docker logs without options, it only provides the latest logs. Added this to the docs.

I've updated the docs according to the rest of your comments.

@wlan0 Thanks for the changes. In addition to my comment above, I would really like to see an example in run.md but I am ok with the PR being merged without one.

LGTM thanks @wlan0

@thaJeztah for the merge.

LGTM! Thanks so much for being so patient and cooperative, @wlan0. Apologies that it took so long :-)

yaay finally!!! thanks all... :)

+1!!!

Hello,
thanks for this feature!
Is it possible to use it with docker-compose?
How do I specify/call it in the compose.yml
Greetings,
Hendrik

@henfri please don't comment on closed/merged PR's for support questions; the issue tracker is meant for tracking bugs, and reviewing pull requests; your question is better asked;

in the #docker or #docker-compose) IRC channel on freenode
the docker-user Google Group (https://groups.google.com/forum/m/#!forum/docker-user
https://forums.docker.com


ng2-datepicker

I'm submitting a ...
[ ] bug report
[ * ] feature request
[ ] question about the decisions made in the repository

I would like to request date picker feature.
Would you please add demo into Form Elements > Form Inputs?
You may consider to import following Angular2 Datepicker Component.
https://github.com/jkuri/ng2-datepicker
Thanks a lot.

+1
I came here to request the same control.  also a cool date range picker would be awesome!


isort does not pick up settings if they are not in the workspace folder

I have two VSCode dev environments:
One is my local workstation VScode (mac) with the latest isort and black available in $PATH.
The other one is pure devcontainer with controlled environment and the latest isort and black available as well.
Before the latest vscode isort and black extensions. I was able to pick the correct configuration using isort.cfg in the root of each project.
That way both VScode environments where not fighting with each other and were not applying different "standards".
With the installation of "ms-python.isort" the situation has changed:
Local vscode is using new "built-in" isort.
While I by default was not able to install dev-extenstion in dev-container - container continued using standard isort.
this is the only isort config included in both vscode settings and isort.cfg
"isort.args":[
		"--profile",
		"black",
		"--skip-gitignore",
		"--line-length",
		"99"
],

Now ms-python.isort is trying to apply this standard:
import logging

from config import settings as s
from selenium import webdriver

while native isort is trying to apply:
import logging

from selenium import webdriver

from config import settings as s

MS extension is putting local module with the third-party module in one section and alphabetically above it.
Your ms-python.isort built-in isort is using "wrong", non-default sections setting. Thas is documented here:
https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html
I need this:
sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER

Providing "isort.path": ["/usr/local/bin/isort"] setting has completely broken Formatting. Will open separate issue.

@karthiknadig
I'm not able to provide a project's structure. But it is extremely primitive.
regarding including "--settings-file", "./isort.cfg"
First I've got error, because I'm using "multi-folder" vscode project:

isort.exceptions.InvalidSettingsPath: isort was told to use the settings_path: /Users/den/work/sky/projects/isort.cfg as the base directory or file that represents the starting point of config file discovery, but it does not exist.

ok... let's fix it and add isort.cfg there.
my default isort.cfg had no "section" config i was always using default
[settings]
profile=black
line_length=99
skip_gitignore=true

Adding that setting still made to move my LOCALFILE and put it with THIRDPARTY
adding: sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER to isort.cfg did not work :/
these are all vscode settings related to python that I have:
    "python.languageServer": "Pylance",
    "python.formatting.provider": "black",
    "python.linting.pylintArgs": [
        "--disable=missing-docstring,unused-import",
        "--max-line-length=99"
    ],
    "python.linting.flake8Args": [
        "--max-line-length=99",
        "--ignore=E402,F841,F401"
    ],
    "python.linting.pylintPath": "/home/vscode/.local/bin/pylint",
    "[python]": {
        "editor.tabSize": 4,
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },
    "black-formatter.args" : [
        "--line-length",
        "99"
    ],
    // "isort.path": ["/usr/local/bin/isort"],
    "isort.args": [
        "--profile",
        "black",
        "--line-length",
        "99",
        "--skip-gitignore",
        "--settings-file",
        "./.isort.cfg",
    ],

my complete .devcontainer settings, feel free to use it:
{

	"name": "py3",

	"image": "diskandarov/pydevenv",

	// "forwardPorts": [5000],

	"settings": {
		"editor.tabSize": 2,
		"terminal.integrated.defaultProfile.linux": "zsh",
		"python.defaultInterpreterPath": "/usr/local/bin/python",
		"python.linting.enabled": true,
		"python.linting.pylintEnabled": false,
		"python.linting.flake8Enabled": true,
		"python.formatting.provider": "black",
		"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
		// required if not using "ms-python.black-formatter" ext
		"python.formatting.blackArgs": ["--line-length", "99"],
		"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
		"python.sortImports.path": "/usr/local/py-utils/bin/isort",
		"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
		"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
		"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
		"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
		"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
		"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
		"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
		"python.languageServer": "Pylance",
		"[python]": {
			"editor.tabSize": 4,
			// requires "ms-python.black-formatter"
			// not able to install not-released "dev" extension into devcontainer
			// "editor.defaultFormatter": "ms-python.black-formatter",
			"editor.formatOnSave": true,
			"editor.codeActionsOnSave": {
					"source.organizeImports": true
			}
		},
		"black-formatter.args" : [
			"--line-length",
			"99"
		],
		"isort.args":[
				"--profile",
				"black",
				"--skip-gitignore",
				"--line-length",
				"99"
		],
		// specific linters settings should go in own config files in project's root
		"python.linting.pylintArgs": [
			"--max-line-length=99",
			"--disable=C0111,W0611"
		],
		"python.linting.flake8Args": [
			"--max-line-length=99",
			"--ignore=E402,F841,F401,W503"
		]
	},

	"extensions": [
		"ms-python.python",
		"ms-python.vscode-pylance",
		// not working, can't install unreleased dev extensions
		// "ms-python.black-formatter",
		// "ms-python.isort",
		"formulahendry.code-runner",
		"mrmlnc.vscode-duplicate",
		"redhat.vscode-yaml",
		"ahebrank.yaml2json",
		"mechatroner.rainbow-csv",
		"oderwat.indent-rainbow",
		"semgrep.semgrep",
		"esbenp.prettier-vscode"
	],

	// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode",

	// Install globaly probably as root user.
	// "postCreateCommand": "pip install -r requirements.txt",

	// Install with user that runs container non-root.
	// Helps to avoid breaking dependencies and interfering with system libs.
	"postCreateCommand": ".devcontainer/startup.sh",

}

Would it be possible for you to provide a minimal repro of this, if you can't share the entire project? Note that there is a limitation in VS Code on installing pre-release versions of extension in dev container. See here on how to add them:
https://github.com/microsoft/vscode/issues/149383#issuecomment-1132192731

I ran into the same issue. I have black and isort extensions running in VSCode. Works like a charm. I also implemented a git pre-commit hook that runs black and isort. This can be used by teammates not using VSCode. One would expect the outcome to be the same. But the extension isort removes a new line in my imports and running it from command line adds one. I use the default settings for both.

I have really tried to come up with some trivial python package with a couple of modules in it and external dependencies. But it somehow did not work for a trivial package.
I have even tried to set a custom isort path for that extension, since you have fixed my previous issue - did not work.
I have removed that new isort extension and everything started to work as intended.

This might be something that I will need input from isort developers, there difference between how, vscode-python extension triggers this vs vscode-isort is runpy,
In vscode-python extension, we insert the path to isort bundled with the python extension and then call main on it.
isort_path = os.path.join(os.path.dirname(__file__), "lib", "python")
sys.path.insert(0, isort_path)

import isort.main

isort.main.main()

in vscode-python extension we get the diff and try to calculate the edits. The content of the file is passed in via stdin.
isort - --diff

# with --profile black
isort - --diff --profile black

Where as in vscode-isort, we insert the path to isort bundled with the python extension and then call runpy.run_module on it.
sys.path.append(str(pathlib.Path(__file__).parent.parent / "libs"))
result = utils.run_module(
                module=module, argv=argv, use_stdin=True, cwd=cwd, source=source
            )

in vscode-isort extension we get the formatted content and use it directly. The content of the file is passed in via stdin.
isort - --filename <path>

# with --profile black
isort - --filename <path> --profile black

So not really sure why there is any difference here.

Created https://github.com/PyCQA/isort/issues/1940 on isort to get input on how this should be done.

Ran into the same issue. Had to disable extension for everything to work as intended

@SandroJijavadze Can you try adding --show-config to isort.args and see if that shows where the extension is picking up config from? you should be able to see this in Output > isort panel.
Run that same thing isort --show-config ... from the terminal and share config details from both cases.

@karthiknadig
I just reenabled isort to test your suggestion bu I can't seem to get it working at all anymore.
Restarted vscode, cleared settings.json, etc but still, I get shis error:
[2022-06-21 10:17:07.900] [renderer1] [error] Cannot read properties of null (reading 'map'): TypeError: Cannot read properties of null (reading 'map')
	at g (/home/buda/.vscode/extensions/ms-python.isort-2022.2.0/dist/extension.js:1:213014)
	at Object.asCodeAction (/home/buda/.vscode/extensions/ms-python.isort-2022.2.0/dist/extension.js:1:223954)
	at /home/buda/.vscode/extensions/ms-python.isort-2022.2.0/dist/extension.js:1:152688
	at async U.provideCodeActions (/opt/visual-studio-code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:103131)

@SandroJijavadze Can you try switching to the pre-release version?

@karthiknadig
Switched to pre-release, repeated steps (restart, test with/without options, etc) still get the same output:
[2022-06-21 10:42:13.425] [renderer1] [error] Cannot read properties of null (reading 'map'): TypeError: Cannot read properties of null (reading 'map')
	at g (/home/buda/.vscode/extensions/ms-python.isort-2022.3.11671003/dist/extension.js:1:213014)
	at Object.asCodeAction (/home/buda/.vscode/extensions/ms-python.isort-2022.3.11671003/dist/extension.js:1:223954)
	at /home/buda/.vscode/extensions/ms-python.isort-2022.3.11671003/dist/extension.js:1:152688
	at async U.provideCodeActions (/opt/visual-studio-code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:103131)

In isort panel:
isort - --profile black --line-length 99 --skip-gitignore --show-config --check --filename /../../../..path_to_py_file.py
CWD Formatter: /home/buda/code/py/projectdir

If I comment out settings.json then I get additional:
isort - --profile black --line-length 99 --skip-gitignore --show-config --check --filename /../../../..path_to_py_file.py
CWD Formatter: /home/buda/code/py/projectdir
CWD Format Server: /home/buda/code/py/projectdir
sys.path used to run Formatter:
    /home/buda/.vscode/extensions/ms-python.isort-2022.3.11671003/bundled/formatter
    /usr/lib/python310.zip
    /usr/lib/python3.10
    /usr/lib/python3.10/lib-dynload
    /home/buda/.local/lib/python3.10/site-packages
    /usr/lib/python3.10/site-packages
    /home/buda/.vscode/extensions/ms-python.isort-2022.3.11671003/bundled/libs

Settings used to run Formatter:
[
    {
        "workspace": "file:///home/buda/code/py/projectdir",
        "trace": "error",
        "args": [],
        "severity": {},
        "path": [],
        "interpreter": [
            "/bin/python"
        ]
    }
]

If I run isort --show-config in terminal
{
    "_known_patterns": null,
    "_section_comments": null,
    "_section_comments_end": null,
    "_skips": null,
    "_skip_globs": null,
    "_sorting_function": null,
    "py_version": "py3",
    "force_to_top": [],
    "skip": [
        "dist",
        "build",
        ".direnv",
        ".bzr",
        ".mypy_cache",
        "_build",
        ".pants.d",
        ".nox",
        ".eggs",
        "buck-out",
        "node_modules",
        ".git",
        ".hg",
        ".venv",
        "__pypackages__",
        ".tox",
        ".svn",
        "venv"
    ],
    "extend_skip": [],
    "skip_glob": [],
    "extend_skip_glob": [],
    "skip_gitignore": false,
    "line_length": 79,
    "wrap_length": 0,
    "line_ending": "",
    "sections": [
        "FUTURE",
        "STDLIB",
        "THIRDPARTY",
        "FIRSTPARTY",
        "LOCALFOLDER"
    ],
    "no_sections": false,
    "known_future_library": [
        "__future__"
    ],
    "known_third_party": [],
    "known_first_party": [],
    "known_local_folder": [],
    "known_standard_library": [
        "numbers",
        "zipapp",
        "locale",
        "configparser",
        "smtpd",
        "binascii",
        "calendar",
        "code",
        "subprocess",
        "binhex",
        "ntpath",
        "compileall",
        "rlcompleter",
        "cmath",
        "importlib",
        "signal",
        "turtle",
        "sunau",
        "time",
        "_thread",
        "errno",
        "msvcrt",
        "netrc",
        "syslog",
        "aifc",
        "formatter",
        "json",
        "imghdr",
        "sched",
        "xdrlib",
        "sre_parse",
        "ossaudiodev",
        "dummy_threading",
        "lib2to3",
        "readline",
        "token",
        "io",
        "fpectl",
        "logging",
        "socketserver",
        "platform",
        "plistlib",
        "datetime",
        "heapq",
        "argparse",
        "sre_compile",
        "traceback",
        "decimal",
        "bdb",
        "parser",
        "builtins",
        "html",
        "distutils",
        "_ast",
        "dataclasses",
        "sqlite3",
        "codeop",
        "py_compile",
        "os",
        "winreg",
        "tempfile",
        "array",
        "sre",
        "stat",
        "encodings",
        "keyword",
        "colorsys",
        "concurrent",
        "runpy",
        "graphlib",
        "pyclbr",
        "random",
        "sndhdr",
        "tty",
        "cgitb",
        "symtable",
        "curses",
        "sys",
        "termios",
        "telnetlib",
        "macpath",
        "tkinter",
        "contextlib",
        "mailcap",
        "trace",
        "fileinput",
        "zlib",
        "asyncore",
        "gettext",
        "ctypes",
        "multiprocessing",
        "threading",
        "http",
        "profile",
        "pathlib",
        "base64",
        "select",
        "math",
        "grp",
        "pdb",
        "tabnanny",
        "crypt",
        "gc",
        "operator",
        "socket",
        "csv",
        "copy",
        "cgi",
        "posix",
        "tracemalloc",
        "getpass",
        "mimetypes",
        "ast",
        "_dummy_thread",
        "marshal",
        "nis",
        "mailbox",
        "contextvars",
        "zoneinfo",
        "getopt",
        "ensurepip",
        "symbol",
        "reprlib",
        "dis",
        "ssl",
        "msilib",
        "shelve",
        "quopri",
        "pydoc",
        "secrets",
        "xmlrpc",
        "sre_constants",
        "selectors",
        "cmd",
        "fcntl",
        "atexit",
        "nntplib",
        "zipimport",
        "types",
        "asyncio",
        "itertools",
        "test",
        "filecmp",
        "imp",
        "winsound",
        "fnmatch",
        "audioop",
        "spwd",
        "codecs",
        "statistics",
        "bz2",
        "imaplib",
        "zipfile",
        "queue",
        "wsgiref",
        "faulthandler",
        "cProfile",
        "timeit",
        "struct",
        "pprint",
        "functools",
        "typing",
        "hmac",
        "linecache",
        "modulefinder",
        "shlex",
        "venv",
        "ipaddress",
        "site",
        "posixpath",
        "dbm",
        "pstats",
        "sysconfig",
        "doctest",
        "weakref",
        "re",
        "textwrap",
        "unittest",
        "uu",
        "pwd",
        "mmap",
        "ftplib",
        "xml",
        "difflib",
        "pty",
        "copyreg",
        "shutil",
        "optparse",
        "string",
        "pickle",
        "urllib",
        "tarfile",
        "enum",
        "pkgutil",
        "pickletools",
        "hashlib",
        "pipes",
        "abc",
        "gzip",
        "asynchat",
        "inspect",
        "turtledemo",
        "smtplib",
        "poplib",
        "stringprep",
        "collections",
        "fractions",
        "chunk",
        "uuid",
        "webbrowser",
        "tokenize",
        "wave",
        "glob",
        "unicodedata",
        "bisect",
        "lzma",
        "warnings",
        "resource",
        "email"
    ],
    "extra_standard_library": [],
    "known_other": {},
    "multi_line_output": "GRID",
    "forced_separate": [],
    "indent": "    ",
    "comment_prefix": "  #",
    "length_sort": false,
    "length_sort_straight": false,
    "length_sort_sections": [],
    "add_imports": [],
    "remove_imports": [],
    "append_only": false,
    "reverse_relative": false,
    "force_single_line": false,
    "single_line_exclusions": [],
    "default_section": "THIRDPARTY",
    "import_headings": {},
    "import_footers": {},
    "balanced_wrapping": false,
    "use_parentheses": false,
    "order_by_type": true,
    "atomic": false,
    "lines_before_imports": -1,
    "lines_after_imports": -1,
    "lines_between_sections": 1,
    "lines_between_types": 0,
    "combine_as_imports": false,
    "combine_star": false,
    "include_trailing_comma": false,
    "from_first": false,
    "verbose": false,
    "quiet": false,
    "force_adds": false,
    "force_alphabetical_sort_within_sections": false,
    "force_alphabetical_sort": false,
    "force_grid_wrap": 0,
    "force_sort_within_sections": false,
    "lexicographical": false,
    "group_by_package": false,
    "ignore_whitespace": false,
    "no_lines_before": [],
    "no_inline_sort": false,
    "ignore_comments": false,
    "case_sensitive": false,
    "sources": [
        {
            "py_version": "py3",
            "force_to_top": [],
            "skip": [
                "dist",
                "build",
                ".direnv",
                ".bzr",
                ".mypy_cache",
                "_build",
                ".pants.d",
                ".nox",
                ".eggs",
                "buck-out",
                "node_modules",
                ".git",
                ".hg",
                ".venv",
                "__pypackages__",
                ".tox",
                ".svn",
                "venv"
            ],
            "extend_skip": [],
            "skip_glob": [],
            "extend_skip_glob": [],
            "skip_gitignore": false,
            "line_length": 79,
            "wrap_length": 0,
            "line_ending": "",
            "sections": [
                "FUTURE",
                "STDLIB",
                "THIRDPARTY",
                "FIRSTPARTY",
                "LOCALFOLDER"
            ],
            "no_sections": false,
            "known_future_library": [
                "__future__"
            ],
            "known_third_party": [],
            "known_first_party": [],
            "known_local_folder": [],
            "known_standard_library": [
                "numbers",
                "zipapp",
                "locale",
                "configparser",
                "smtpd",
                "binascii",
                "calendar",
                "code",
                "subprocess",
                "binhex",
                "ntpath",
                "compileall",
                "rlcompleter",
                "cmath",
                "importlib",
                "signal",
                "turtle",
                "sunau",
                "time",
                "_thread",
                "errno",
                "msvcrt",
                "netrc",
                "syslog",
                "aifc",
                "formatter",
                "json",
                "imghdr",
                "sched",
                "xdrlib",
                "sre_parse",
                "ossaudiodev",
                "dummy_threading",
                "lib2to3",
                "readline",
                "token",
                "io",
                "fpectl",
                "logging",
                "socketserver",
                "platform",
                "plistlib",
                "datetime",
                "heapq",
                "argparse",
                "sre_compile",
                "traceback",
                "decimal",
                "bdb",
                "parser",
                "builtins",
                "html",
                "distutils",
                "_ast",
                "dataclasses",
                "sqlite3",
                "codeop",
                "py_compile",
                "os",
                "winreg",
                "tempfile",
                "array",
                "sre",
                "stat",
                "encodings",
                "keyword",
                "colorsys",
                "concurrent",
                "runpy",
                "graphlib",
                "pyclbr",
                "random",
                "sndhdr",
                "tty",
                "cgitb",
                "symtable",
                "curses",
                "sys",
                "termios",
                "telnetlib",
                "macpath",
                "tkinter",
                "contextlib",
                "mailcap",
                "trace",
                "fileinput",
                "zlib",
                "asyncore",
                "gettext",
                "ctypes",
                "multiprocessing",
                "threading",
                "http",
                "profile",
                "pathlib",
                "base64",
                "select",
                "math",
                "grp",
                "pdb",
                "tabnanny",
                "crypt",
                "gc",
                "operator",
                "socket",
                "csv",
                "copy",
                "cgi",
                "posix",
                "tracemalloc",
                "getpass",
                "mimetypes",
                "ast",
                "_dummy_thread",
                "marshal",
                "nis",
                "mailbox",
                "contextvars",
                "zoneinfo",
                "getopt",
                "ensurepip",
                "symbol",
                "reprlib",
                "dis",
                "ssl",
                "msilib",
                "shelve",
                "quopri",
                "pydoc",
                "secrets",
                "xmlrpc",
                "sre_constants",
                "selectors",
                "cmd",
                "fcntl",
                "atexit",
                "nntplib",
                "zipimport",
                "types",
                "asyncio",
                "itertools",
                "test",
                "filecmp",
                "imp",
                "winsound",
                "fnmatch",
                "audioop",
                "spwd",
                "codecs",
                "statistics",
                "bz2",
                "imaplib",
                "zipfile",
                "queue",
                "wsgiref",
                "faulthandler",
                "cProfile",
                "timeit",
                "struct",
                "pprint",
                "functools",
                "typing",
                "hmac",
                "linecache",
                "modulefinder",
                "shlex",
                "venv",
                "ipaddress",
                "site",
                "posixpath",
                "dbm",
                "pstats",
                "sysconfig",
                "doctest",
                "weakref",
                "re",
                "textwrap",
                "unittest",
                "uu",
                "pwd",
                "mmap",
                "ftplib",
                "xml",
                "difflib",
                "pty",
                "copyreg",
                "shutil",
                "optparse",
                "string",
                "pickle",
                "urllib",
                "tarfile",
                "enum",
                "pkgutil",
                "pickletools",
                "hashlib",
                "pipes",
                "abc",
                "gzip",
                "asynchat",
                "inspect",
                "turtledemo",
                "smtplib",
                "poplib",
                "stringprep",
                "collections",
                "fractions",
                "chunk",
                "uuid",
                "webbrowser",
                "tokenize",
                "wave",
                "glob",
                "unicodedata",
                "bisect",
                "lzma",
                "warnings",
                "resource",
                "email"
            ],
            "extra_standard_library": [],
            "known_other": {},
            "multi_line_output": "GRID",
            "forced_separate": [],
            "indent": "    ",
            "comment_prefix": "  #",
            "length_sort": false,
            "length_sort_straight": false,
            "length_sort_sections": [],
            "add_imports": [],
            "remove_imports": [],
            "append_only": false,
            "reverse_relative": false,
            "force_single_line": false,
            "single_line_exclusions": [],
            "default_section": "THIRDPARTY",
            "import_headings": {},
            "import_footers": {},
            "balanced_wrapping": false,
            "use_parentheses": false,
            "order_by_type": true,
            "atomic": false,
            "lines_before_imports": -1,
            "lines_after_imports": -1,
            "lines_between_sections": 1,
            "lines_between_types": 0,
            "combine_as_imports": false,
            "combine_star": false,
            "include_trailing_comma": false,
            "from_first": false,
            "verbose": false,
            "quiet": false,
            "force_adds": false,
            "force_alphabetical_sort_within_sections": false,
            "force_alphabetical_sort": false,
            "force_grid_wrap": 0,
            "force_sort_within_sections": false,
            "lexicographical": false,
            "group_by_package": false,
            "ignore_whitespace": false,
            "no_lines_before": [],
            "no_inline_sort": false,
            "ignore_comments": false,
            "case_sensitive": false,
            "sources": [],
            "virtual_env": "",
            "conda_env": "",
            "ensure_newline_before_comments": false,
            "directory": "",
            "profile": "",
            "honor_noqa": false,
            "src_paths": [],
            "old_finders": false,
            "remove_redundant_aliases": false,
            "float_to_top": false,
            "filter_files": false,
            "formatter": "",
            "formatting_function": null,
            "color_output": false,
            "treat_comments_as_code": [],
            "treat_all_comments_as_code": false,
            "supported_extensions": [
                "pyi",
                "pyx",
                "py",
                "pxd"
            ],
            "blocked_extensions": [
                "pex"
            ],
            "constants": [],
            "classes": [],
            "variables": [],
            "dedup_headings": false,
            "only_sections": false,
            "only_modified": false,
            "combine_straight_imports": false,
            "auto_identify_namespace_packages": true,
            "namespace_packages": [],
            "follow_links": true,
            "indented_import_headings": true,
            "honor_case_in_force_sorted_sections": false,
            "sort_relative_in_force_sorted_sections": false,
            "overwrite_in_place": false,
            "reverse_sort": false,
            "star_first": false,
            "git_ignore": {},
            "format_error": "{error}: {message}",
            "format_success": "{success}: {message}",
            "sort_order": "natural",
            "source": "defaults"
        }
    ],
    "virtual_env": "",
    "conda_env": "",
    "ensure_newline_before_comments": false,
    "directory": "/home/buda/code/py/projectdir",
    "profile": "",
    "honor_noqa": false,
    "src_paths": [
        "/home/buda/code/py/projectdir/src",
        "/home/buda/code/py/projectdir"
    ],
    "old_finders": false,
    "remove_redundant_aliases": false,
    "float_to_top": false,
    "filter_files": false,
    "formatter": "",
    "formatting_function": null,
    "color_output": false,
    "treat_comments_as_code": [],
    "treat_all_comments_as_code": false,
    "supported_extensions": [
        "pyi",
        "pyx",
        "py",
        "pxd"
    ],
    "blocked_extensions": [
        "pex"
    ],
    "constants": [],
    "classes": [],
    "variables": [],
    "dedup_headings": false,
    "only_sections": false,
    "only_modified": false,
    "combine_straight_imports": false,
    "auto_identify_namespace_packages": true,
    "namespace_packages": [],
    "follow_links": true,
    "indented_import_headings": true,
    "honor_case_in_force_sorted_sections": false,
    "sort_relative_in_force_sorted_sections": false,
    "overwrite_in_place": false,
    "reverse_sort": false,
    "star_first": false,
    "git_ignore": {},
    "format_error": "{error}: {message}",
    "format_success": "{success}: {message}",
    "sort_order": "natural"

@SandroJijavadze I see two other issues that I need to address before we can get to digging into the original problem here.

--show-config should just work. I created https://github.com/microsoft/vscode-isort/issues/78 to show what isort will use on start. So there should not be a need to run with --show-config.
The TypeError, that seems to be a LS protocol error. https://github.com/microsoft/vscode-isort/issues/77

I will post next steps on those issues. We will come back to this once we have that. It should make it easier to dig into the difference between bundled isort and isort in terminal.

After investigation it looks like this comes from isort not searching for configuration when using stdin with --filename. See https://github.com/PyCQA/isort/issues/1989

FYI I've also just raised https://github.com/microsoft/vscode-python/issues/20205 because this actually used to work for us before updating to VScode 1.7.3.

@bluenote10 the problem is with how isort works. We have a minimal repro see here: https://github.com/PyCQA/isort/issues/1989 , this can be reproduced just via command line (even without the extension). The thing is we need this fixed in isort to properly support organize imports on save. Because the content is not yet written to disk, we have to send it via stdin. That is where this is failing. Please upvote that issue.
Python extension used to work around this by creating a temporary file and saving the content there, and then running isort on it. The issue with that approach was that as VS Code started to light up newer ways to work with repositories, we can't continue to support that workaround for isort.
Here is a work around, add this to your setting: "isort.args": ["--settings-path", "${workspaceFolder}/<project>/pyproject.toml"]
You could actually turn this into a multi root project, with your main directory, and your sub-directory as two roots. Like this:
Create a myproject.code-workspace, with this content, and open that with VS Code.:
{
    "folders": [
        {
            "path": "."
        },
        {
            "path": "./py_project_root"
        }
    ],
    "settings": {
           // common settings go here.
    }
}

Another workaround for this using the tasks and keybinding:
https://github.com/microsoft/vscode-python/issues/18714#issuecomment-1100641778

Yeah, I'm wondering if providing a task as a fallback option makes sense? Otherwise we could have the language server fallback to subprocess if the config file is found somewhere else (although honestly I think it would be better if folks specified the config location instead).

@Olindholm Please see the isort change log, it hasn't been released to pypi yet: https://github.com/PyCQA/isort/blob/main/CHANGELOG.md

I always put the pyproject.toml file in the root folder of the workspace and still vscode-isort doesn't work by default: it doesn't run the isort command like you would manually do from the terminal, so it doesn't read the [tool.isort] section of the pyproject.toml file where all the settings are listed.
The only way I could make vscode-isort work is by adding "isort.path": ["isort"] to my VS Code settings.json file.

I always put the pyproject.toml file in the root folder of the workspace and yet vscode-isort wouldn't work by default: it doesn't run the isort command like you would manually do from the terminal, so it doesn't read the [tool.isort] section of the pyproject.toml file where all the settings are listed.
The only way I could make vscode-isort work is by adding "isort.path": ["isort"] to my VS Code settings.json file.

Same problem here, I also tried to debug with the -v option passed as args in the settings, but the output is written to the file sorted instead of being written to the log.

@matteoaletti isort has not released the fix for this, so not much can be done about it. You could try and install directly from the github main. An alternative is to pass the configuration using command line arguments.
As for getting config info. you can set the log level for the isort extension to debug or trace and reload VS Code. The extension will get the --show-config output in the logs.
If people are looking for alternatives, look for Ruff extension. It is a multi-tool of python tools, it has import sorting, formatting support, and implements several linte rules (like pylint, flake8, pycodestyle, pydocstyle, bandit, pyflakes etc). It is implemented in rust and is blazingly fast. It is built on top of our templates for contributing python tools extensions for VS Code.
See docs for ruff: https://docs.astral.sh/ruff/

@karthiknadig thank you for your answer, I had indeed tried the "develop" version of isort and it works!

This appears to have been fixed as of isort 5.13.0 (though that version seems to have included all of its development dependencies 😂).
Updating the bundled isort to the latest isort should clear this up (as of this comment that is version 5.13.2)
Until that is done you should be able to work with a local (virtualenv installation) by installing said versions into your environment and using the "fromEnvironment" import strategy in the vscode/isort settings.

json for that setting is
{
  "isort.importStrategy": "fromEnvironment"
}

Found updates this thread in my email. Decided to share my workflow.
I've switched to ruff and official ruff extension.
Ruff formatting - formats imports only, also configured to use black style
Ruff linting - does linting
Black - formats everything else except imports


[HELP] Discord community for MagicUI library

Magic UI Library Discord Server Proposal
Purpose
Create a dedicated Discord community for developers and users of the Magic UI library to enhance communication and collaboration.
Server Structure
General Channels

#welcome: Introductions and rules.
#announcements: Official updates.

Developer Channels

#dev-general: Developer discussions.
#dev-help: Support for developers.
#dev-collaboration: Find collaborators.

User Channels

#user-general: User discussions.
#user-showcase: Project showcases.
#user-support: Support for users.
#user-feedback: User feedback.

Resource Channels

#resources: Documentation and tutorials.
#community-resources: User-created resources.

Off-topic Channels

#off-topic: Non-technical discussions.
#memes: Fun content.

Roles and Permissions

Admin: Full control.
Moderator: Manage and moderate.
Developer: Access developer channels.
User: Access user channels.
Guest: Limited access.

Guidelines

Respectful Communication: Be inclusive and respectful.
No Spam: Keep channels relevant.
Support Etiquette: Provide clear questions and context.

i would be happy to make it @dillionverma . Just assign it to me.

Discord  server here  - https://discord.gg/Y5YTZTue

@Wellitsabhi we already have a discord server - https://magicui.design/discord
Thanks,
Arghya


Preserve cursor positions when switching tabs

Issue Type: Bug
Steps:

Open 2 tabs or .sql files
Make sure both tabs contain lines that require scrolling on both files to the SQL code that will be run
On tab 1, scroll to the bottom of the file. Select the SQL query to run and run the query to produce the table as output as the bottom part of the tab. Then scroll down a number of rows in the table.
Click on tab 2 and then back to tab 1
You will find that the cursor position in .sql file and the cursor in the table, would both have been reset to line 1 and row 1 in each.

The effect on useability is that when working across multiple tabs, you loose your position in any tab you switch away from and then back. This is disruptive if the files grow in length.
The same does not happen in VS Code.
SQL Operations Studio version: sqlops 0.31.4 (e026ab85a72c190cc4ccc834503aa9fe36dd6407, 2018-07-18T02:14:21.826Z)
OS version: Windows_NT x64 10.0.17713

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
31.93GB (20.65GB free)

Process Argv
C:\Program Files\SQL Operations Studio\sqlops.exe

Screen Reader
no

VM
0%

Extensions (4)

Extension
Author (truncated)
Version

agent
Mic
0.31.4

profiler
Mic
0.1.2

server-report
Mic
0.1.2

whoisactive
Mic
0.1.1

Hi @snympi, this issue should be fixed in the latest insider build, which comes out today. Here's the main issue thread for this particular bug if you want to follow it - #114. I'm going to close this issue as it's a duplicate.


Invalid SSL certificate on t15.deviantart.net, image refuses to load over HTTPS

A request to the API returned the following image, and my website uses a simple replace operation to change HTTP URLs into HTTPS, which results in the new URL not serving the image due to a certificate error. I haven't had this happen before, it appears to be specific to this domain.

We are doing some changes in SSL setup, try again sometime soon


EEG stream is unavailable or unsupported

I am trying to access the raw EEG data via Cortex v2 API using the example code from this repo. I made sure I have a pro license and I was granted access to the raw EEG data. Nevertheless I keep getting messages saying that I have no access to the eeg data stream.
I logged out and logged in of my account on the Emotiv App. I even uninstalled the emotiv apps, removed any emotiv data folders left on the my computer and installed it again. Same result.
I also tried to remove the current app, create and authorize a new one with new client_id and client_secret codes, but same result.
I copied and pasted the debugging messages from the python example code here. I tried it with the CSharp code and I get the same result. I removed the credentials, user-related ids, tokens and so on by "foo":
** USER LOGIN **
Sending request:
{"jsonrpc": "2.0", "method": "getUserLogin", "params": {}, "id": 1}
sent; awaiting response
lib.cortex resp:
{'currentOSUId': '1002', 'currentOSUsername': 'foo', 'loggedInOSUId': '1002', 'loggedInOSUsername': 'foo', 'username': 'foo'}
** GET CORTEX INFO **
Sending request:
{"jsonrpc": "2.0", "method": "getCortexInfo", "params": {}, "id": 2}
sent; awaiting response
lib.cortex resp:
{'id': 2, 'jsonrpc': '2.0', 'result': {'buildDate': '2019-11-12T09:47:41', 'buildNumber': 'v2.2.1-10-ge7781ad', 'version': '2.2.3'}}
** HAS ACCESS RIGHT **
Sending request:
{"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "foo", "clientSecret": "foo"}, "id": 3}
sent; awaiting response
lib.cortex resp:
{'id': 3, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The user has granted access right to this application.'}}
** REQUEST ACCESS **
Sending request:
{"jsonrpc": "2.0", "method": "requestAccess", "params": {"clientId": "foo", "clientSecret": "foo"}, "id": 4}
sent; awaiting response
lib.cortex resp:
{'id': 4, 'jsonrpc': '2.0', 'result': {'accessGranted': True, 'message': 'The user has granted access right to this application.'}}
** AUTHORIZE **
Sending request:
{"jsonrpc": "2.0", "method": "authorize", "params": {"clientId": "foo", "clientSecret": "foo", "debit": 100}, "id": 5}
sent; awaiting response
lib.cortex resp:
{'id': 5, 'jsonrpc': '2.0', 'result': {'cortexToken': 'foo'}}
** GET LICENSE INFO **
Sending request:
{"jsonrpc": "2.0", "method": "getLicenseInfo", "params": {"cortexToken": "foo"}, "id": 6}
sent; awaiting response
lib.cortex resp:
{'id': 6, 'jsonrpc': '2.0', 'result': {'isOnline': True, 'license': {'applications': ['com.emotiv.sdk.basic'], 'billingFrom': '2019-10-29T01:00:00.000+01:00', 'billingTo': '2029-10-26T02:00:00.000+02:00', 'deviceInfo': {'deviceLimit': 3, 'devicesPerSeat': 3, 'sessionLimit': {'day': None, 'month': None, 'year': None}}, 'expired': False, 'extenderLimit': 0, 'hardLimitTime': '2019-12-07T00:59:59.999+01:00', 'isCommercial': False, 'licenseId': 'foo', 'licenseName': 'Basic License', 'localQuota': 218, 'maxDebit': None, 'scopes': [''], 'seatCount': 1, 'sessionCount': 10, 'softLimitTime':
'2019-11-30T00:59:59.999+01:00', 'totalDebit': 3130, 'totalRegisteredDevices': 1, 'validFrom': '2019-10-29T01:00:00.000+01:00', 'validTo': '2029-10-27T01:59:59.999+02:00'}}}
** QUERY HEADSETS **
Sending request:
{"jsonrpc": "2.0", "method": "queryHeadsets", "params": {}, "id": 7}
sent; awaiting response
lib.cortex found headsets ['EPOC-60874887']
lib.cortex resp:
{'id': 7, 'jsonrpc': '2.0', 'result': [{'connectedBy': 'dongle', 'customName': '', 'dongle': '565', 'firmware': '565', 'id': 'EPOC-60874887', 'motionSensors': ['GYROX', 'GYROY'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 128, 'eegRes': 14, 'memsRate': 128, 'memsRes': 14, 'mode': 'STANDARD'}, 'status': 'connected'}]}
** CREATE SESSION **
Sending request:
{"jsonrpc": "2.0", "method": "createSession", "params": {"cortexToken": "foo", "headset": "EPOC-60874887", "status": "active"}, "id": 8}
sent; awaiting response
lib.cortex resp:
{'id': 8, 'jsonrpc': '2.0', 'result': {'appId': 'com.mvidaldepalo.rawdata', 'headset': {'connectedBy': 'dongle', 'customName': '', 'dongle': '565', 'firmware': '565', 'id': 'EPOC-60874887', 'motionSensors': ['GYROX', 'GYROY'], 'sensors': ['AF3', 'F7', 'F3', 'FC5', 'T7', 'P7', 'O1', 'O2', 'P8', 'T8', 'FC6', 'F4', 'F8', 'AF4'], 'settings': {'eegRate': 128, 'eegRes': 14, 'memsRate': 128, 'memsRes': 14, 'mode': 'STANDARD'}, 'status': 'connected'}, 'id': 'd2d02ae5-490a-485c-b1b1-2e48de2ddb86', 'license': '6cba759c-a9fc-48af-9dd8-0b3220d9dfa7', 'owner': 'mvidaldepalo', 'recordIds': [], 'recording': False, 'started': '2019-11-19T12:13:30.136+01:00', 'status': 'activated', 'stopped': '', 'streams': []}}
** CREATE RECORD **
Sending request:
{"jsonrpc": "2.0", "method": "createRecord", "params": {"cortexToken": "foo", "session": "d2d02ae5-490a-485c-b1b1-2e48de2ddb86", "title": "test record 1"}, "id": 9}
sent; awaiting response
lib.cortex resp:
{'id': 9, 'jsonrpc': '2.0', 'result': {'record': {'applicationId': 'com.mvidaldepalo.rawdata', 'applicationVersion': '1.0', 'description': '', 'endDatetime': '', 'experimentId': 0, 'licenseId': 'foo', 'licenseScope': [''], 'localOnly': False, 'ownerId': 'foo', 'startDatetime': '2019-11-19T12:13:30.058710+01:00', 'tags': [], 'title': 'test record 1', 'uuid': '63b7d15c-cbda-4e6e-a834-ebdd8cfdc95e'}, 'sessionId': 'foo'}}
** SUBSCRIBE POW & MET **
Sending request:
{"jsonrpc": "2.0", "method": "subscribe", "params": {"cortexToken": "foo", "session": "d2d02ae5-490a-485c-b1b1-2e48de2ddb86", "streams": ["eeg"]}, "id": 10}
sent; awaiting response
lib.cortex resp:
{'id': 10, 'jsonrpc': '2.0', 'result': {'failure': [{'code': -32016, 'message': 'The stream is unavailable or unsupported.', 'streamName': 'eeg'}], 'success': []}}

@mvidaldp , in the request "authorize" you don't set param "license". So, by default you are using basic license. you can see in the response of request "getLicenseInfo"
'licenseName': 'Basic License'

@mvidaldp , in the request "authorize" you don't set param "license". So, by default you are using basic license. you can see in the response of request "getLicenseInfo"
'licenseName': 'Basic License'

Actually the parameter is optional and expects my license id. By trying I realized that the key 'license_id' on params (line 202) was wrong. By changing it to license I can use this parameter but I am getting the same error as below. I am afraid there is something not properly set internally about my license.

Hi @mvidaldp
Can you see the EEG data in EmotivPRO? If yes, then your license is probably OK.
Please note that to use your PRO license in your app you need to fill an application form on the Emotiv web site.
https://emotiv.gitbook.io/cortex-api/#license

Hi @mvidaldp
Can you see the EEG data in EmotivPRO? If yes, then your license is probably OK.
Please note that to use your PRO license in your app you need to fill an application form on the Emotiv web site.
https://emotiv.gitbook.io/cortex-api/#license

Hi @bchaperon
Yes, I can see it and also export it into a file once a session is recorded on EmotivPRO. I also filled out the application and my access was confirmed per email. However, I realized that on my EmotivApp my license information says "EmotivPRO Student" and "Basic License". Also, if I check my subscription on the site, on the status it says "pending".

Ok, so maybe there is a problem with your license after all.
Please contact the Emotiv customer support, they can check you subscription.
https://www.emotiv.com/contact-support/

@bchaperon @nguoithichkhampha
It is already fixed.  Thanks for your support :)

Hi @mvidaldp Can you see the EEG data in EmotivPRO? If yes, then your license is probably OK. Please note that to use your PRO license in your app you need to fill an application form on the Emotiv web site. https://emotiv.gitbook.io/cortex-api/#license

Hi @bchaperon
Do I need to fill the application each time I purchase a new PRO license?

Hi @haidergb
Yes, you do :)


LWMS ID 11507: Added missing index file

Add here your WMS ID
General requirements

Information in the workshop is adequate and updated
Code is correct and working
Links are correct
Make sure you enter the help email link in your manifest.json
Please make sure WMS URLs are updated as needed after your PR is approved

Checklist - Refer to the QA document for the complete list
Please confirm that the following is completed before submitting your PR

[ ] All filenames are lower case (including folders, images, files, etc.)
[ ] Filenames are descriptive
[ ] Your workshop folder structure should be similar to the one used in the sample workshop (https://github.com/oracle-livelabs/common/tree/main/sample-livelabs-templates/sample-workshop)
[ ] Are you using multiple versions (desktop/, sandbox/, tenancy/)? Make sure that each of them contains a manifest.json and an index.html
[ ] Image references in markdown contain an alternate text

Please deploy this as soon as possible. Users are not able to access this site.

@aiijazfatima this branch is out-of-date please merge it with the latest changes


change github description link to https://gitflic.ru/project/erthink/libmdbx/

repository admin has to do it

done


Causes application freeze (not crash)

This video which is recorded on a device will show you the steps to reproduce the bug. The application I've used is your example project. The only change I made to the project is resizing the images to smaller resolution.
simpleimageviewer_freeze_reproduce.zip

Hi @sukov! Thank you very much for creating this ticket. I'm able to reproduce your issue. I hope to find some free time in the coming days to fix it.


Enhancement: concept of "finally" filter

It runs in the finally clause of MatcherFilter, so it give you the guarantee of the filter will be executed even if exception is thrown.
Can you provide me some feedback about this code, and if its contemplate the whole idea discussed on issue #195 ?

This one is needed badly!

I agree with @kodfodrasz that we need this one badly (or anything that can provide us with such a thing, perhaps another solution is more middleware like exception handling).
I can see something like this work:

Spark.exception(Exception.class, (e, req, res) -> {
 //do all things finally / transactiony;
}

Spark.exception(MySpecificExceptionThatNeedsSpecificResponseHandling.class, (e,req,res) -> {
}

@basdek  I think a finally clause would be better, as it would be idiomatic with the java exception handling mechanism, and because it would enable more concise code, and it wouldn't need the knowledge of Spark internals (like halt is handled by a special exception type).

@perwendel  @gutobortolozzo How can we help fixing this? And if @gutobortolozzo, is not able to finish it, can we continue working this PReq, perhaps via a fork of your repo?

@basdek @kodfodrasz I willing to start working again in this PR, since more people need it, probably tomorrow I will take a look at my one year old code and see if it keep working after a merge with master code :)
If you have any suggestion, it would be welcome.
@perwendel Any thoughts about this feature? What's your opinion about a finally filter?

great news! I'm looking forward to having it in spark! :+1:

#406

@gutobortolozzo Thank you for this awesome work man! (Will be checking into it as soon as my meetings are over today)


Cannot send message: status 500: 411 Length Required

Describe the bug
When I try to send a message on mainnet or testnets, I receive the following error from the mailchain client:
ERRO[2019-09-04T23:14:59+01:00] status 500: 411 Length Required <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<title>411 Length Required</title>

Length Required

A request of the requested method POST requires a valid Content-length.

could not determine chain id
could not send transaction
could not send message

The api url is: https://inbox.mailchain.xyz/api/ethereum/ropsten/messages/send
To Reproduce
Steps to reproduce the behavior:
Start the mailchain client

Go to 'inbox.mailchain.xyz'
Click on 'compose'
Compose a message
Click send
See error on console output

What version of Mailchain are you using ?
$ mailchain version
Version: v0.0.32
Expected behavior
The message should send and there should be no console output
Desktop (please complete the following information):
OS: iOS
Browser chrome

Appears to be related to response from Alchemy.
Will keep an eye out for similar issues.

This root cause of this issue is due to the content-length header being dropped by the proxy, which ordinarily would not be a problem when creating a new request as the length is obtained from the reader. However since the reader is not accessed the length is not set. This needs to be explicitly set. See https://deliveroo.engineering/2019/02/22/go-down-the-rabbit-hole.html for an example


Manage toggles for action sheet/ popup / modal

I have the use case of a top bar and some dropdown menu's. Currently handled by a styled popup, it could also be a styled action sheet. I sounds simple however, how would you manage that once a menu button is pressed and the submenu is shown, another menu dropdown is closed if it was already open?
Maybe setup an event channel to group toggling events and a manager to handle them?

I have been giving this more thought and I could thing of several options to solve this.

group actions sheets/ popup or modals that belong together
or do this globally, ie. Extjs has a window manager
or add a manager to the existing services lile FoundationPopUpManager, then each instance can be tracked there and a method FoundationPopUpManager::getActive could already solve my use case

Solved in a similar way as foundationApi.closeActiveElements


Update scalaz-core to 7.3.6

Updates org.scalaz:scalaz-core from 7.3.5 to 7.3.6.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalaz", artifactId = "scalaz-core" } ]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Codecov Report

Merging #1520 (8b62fea) into unstable (b8b8664) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           unstable    #1520   +/-   ##
=========================================
  Coverage     74.89%   74.89%
=========================================
  Files           358      358
  Lines         11471    11471
  Branches        545      545
=========================================
  Hits           8591     8591
  Misses         2880     2880

Impacted Files
Coverage Δ

...he/io/annotations/parser/CommentPreprocessor.scala
95.60% <0.00%> (ø)

Continue to review full report at Codecov.

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


Creates .bash_profile if it doesn't exist, messing up shell init

Describe the bug
Updated to 1.4.1, and when I start a new shell I get no PS1 or other normal environment setup.

With 1.4.1, Orbstack seems to write the following to ~/.bash_profile (and maybe to ~/.profile too, or it previously wrote to ~/.profile — it appears there too)
# Added by OrbStack: command-line tools and integration
source ~/.orbstack/shell/init.bash 2>/dev/null || :

Which is fine, but if ~/.bash_profile doesn't already exist then it creates it. This prevents ~/.profile from being executed when creating a shell (as described in the ~/.profile header below), which can be ... a little disruptive and non-obvious.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.

To Reproduce
No response
Expected behavior
Suggest that maybe only write to .bash_profile if it already exists.
Diagnostic report (REQUIRED)
OrbStack info:
Version: 1.4.1
Commit: 402f6cfcd5a2b2debef3e36929540c3c6f79ece3 (v1.4.1)
System info:
macOS: 14.3 (23D56)
CPU: arm64, 10 cores
CPU model: Apple M1 Max
Model: MacBookPro18,4
Memory: 32 GiB
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-02-05T10-38-42.738636Z.zip

Screenshots and additional context (optional)
No response

Nice catch, wasn't aware of this behavior. The idea is that this should only affect bash and not any other shell.
Fixed for the next version, thanks!

As a temporary workaround you can create the following bash_profile:
source ~/.profile

Released in v1.4.2.