feat: Support importlib.resources in edittable installs

Here's an initial attempt at getting importlib.resources to work with editable install.
Closes #388

I need some advice on getting the pre-commit working and on how I can run pip install -e . and have it link to the version of scikit-build-core in my virtual environment.

Ok, this one is somehow working. Do you know a python way to get the list of functions, or any other way to test if a library is cython or not?

I need some advice on getting the pre-commit working

If it's the mypy part, I can touch that up in _editable.py; given that that's imported whenever you start up Python, keeping it minimal is important - I almost don't even want to import typing to get typing.TYPE_CHECKING. But we can use that to protect anything else that's only imported for typing (including importlib.abc.Traversable). Also that's moving to importlib.resources.abc.Traversable.

pip install -e .

Easiest way is to add --no-build-isolation. That's better for editable installs usually anyway. I'd love a single-letter version of this to make it easier to use (ideally one that could also be used with build for --no-isolation).

Do you know a python way to get the list of functions, or any other way to test if a library is cython or not?

From what? A module (dir(module)), or something else? Why do we need to know if something is Cython?

module.__path__

Pretty sure we can get that working, though manipulating it won't always be correct.

We should also clearly support (or not support) namespace packages.

--no-build-isolation

Thanks a lot. Now I understand what that option does.

Do you know a python way to get the list of functions, or any other way to test if a library is cython or not?

From what? A module (dir(module)), or something else? Why do we need to know if something is Cython?

This is because loadable library modules with suffix .so must contain PyInit, i.e. you can't have a shortcut of import my_pkg.bundled_lib as a shortcut for just load my C library. It must be a valid python module. So if you could do the equivalent of readelf you can then distinguish between bundled library and python module.

module.__path__

Pretty sure we can get that working, though manipulating it won't always be correct.

That one is weird, because I imagined that using the native set_data would fix that, but it seems to be a different section that manipulates that.

We should also clearly support (or not support) namespace packages.

I haven't played around with namespaces, but isn't that natively supported due to the tree mapping? Got any folder structure or mwe to see how namespaces are supposed to work?

Idea for the future: navigate the cmake-file-api to extract the install paths without doing the actual install. Then use the build/source files directly. That way library linkage is preserved without patching rpaths.
The file-api can also be used to find the python module target by checking their dependencies assuming the python binding is set to private.
I was trying to find a way to check if the configuration is dirty, but couldn't find a way. But on the other hand the build system could handle the unnecessary re-builds. The configure-log from 3.26 can be used to check if a build was triggered, or some simple stdout parsing.

FYI, one of the first things added to scikit-build-core was the file API module, but we've not used it yet anywhere except tests. It reads the FileAPI into fully typed dataclasses.

TODO:

[ ] Update the test to try various path locations and import (i.e. test that setting __path__ is sufficient to resolve sources in src-dir or build/install dir)
[ ] Update the editable install to inject all __path__

I think that is all the todos for this PR?

Hi @LecrisUT @henryiii any updates on this PR? Totally understand things get busy, so just checking in. I'm happy to try and help get this over the finish line if that would be useful/appreciated (to be clear I don't know much about this PR so would have to get myself up to speed, but I'm willing to do that), but I'm also OK waiting if there's a plan to get back to this. I don't want to step on any toes, was just hoping to tackle #442 at some point soonish and I know @henryiii wanted this PR to get done first.

I will work on this more today and try to get the tests for the different cases with a simple python binding

@henryiii I am starting over with this one, I will start with a2e7452f1a2805a274e38b55502416a5910444ff, do the type-checking and other style fixes, add importlib calls to the tests and then bring back the implementation that was there so far.

Okay, couple of things to keep in mind:
Every single usage of Python imports this file, just to start up the import system. You really want to avoid importing anything unnecessary (like pathlib) (unless it’s already imported by something else).
It’s fine if we have to disable linter checks for this file. It’s not normal Python, don’t worry if a check is telling you to use pathlib, etc.

Also, I prefer import x and x.y over from x import y. It’s easier for a reader to see where things come from, reduces name collisions, and most importantly protects from circular import issues.
Also A | None is better than Optional[A] as long as you can use the future import (which is also faster).

I had the pathlib dependence from class SKBuildFile(type(Path()), SKBuildTraversable). I am wondering though if just setting __path__ would be sufficient

Also, I prefer import x and x.y over from x import y. It’s easier for a reader to see where things come from, reduces name collisions, and most importantly protects from circular import issues. (Types and common imports are okay)

Ok. I thought from x import y is safer in that it will not import the whole module and avoid potential breakage from other parts of the module.

Also A | None is better than Optional[A] as long as you can use the future import (which is also faster).

This we have to drop in this file because of python 3.8 support

wondering though if just setting path would be sufficient

Fine for now, but we will try after we get it working.

Ok. I thought from x import y is safer in that it will not import the whole module and avoid potential breakage from other parts of the module.

No, it always imports the whole module either way and it forces the object you are importing to be available sooner in the import process.

This we have to drop in this file because of python 3.8 support

It’s supported in 3.7+ as long as you use the import and use it only in annotations. You only need Union or Optional if you make a type alias.

wondering though if just setting path would be sufficient

Fine for now, but we will try after we get it working.

I'll try tomorrow setting just submodule_searc_path, I was messing around with it and I might have something on it, and it would be the minimal approach if it works.

Ok. I thought from x import y is safer in that it will not import the whole module and avoid potential breakage from other parts of the module.

No, it always imports the whole module either way and it forces the object you are importing to be available sooner in the import process.

Ok, I'll handle this and removing unnecessary libraries at the review. I still have the old version in a backup branch and I want to be able to quickly copy snippets until we find a good approach for this

This we have to drop in this file because of python 3.8 support

It’s supported in 3.7+ as long as you use the __future__ import and use it only in annotations. You only need Union or Optional if you make a type alias. It’s faster, too, as the future import makes the annotations all unevaluated strings.

Which package introduces the backwards compatibility? Now that I think of it, the actual editable install file would not go through mypy, so as long as the generated file is importable at runtime it should be fine (other than IDE navigation). Is this what you mean about __future__?
Also do you have a better way to call the import importlib.resources within the venv fixture? I.e. alternatives to the last 2 checks.

I was messing around with it

Feel free to mess around, we can touch up once something is working. :)

Which package introduces the backwards compatibility?

The line:
from __future__ import annotations

Causes all annotations to just be strings. You don't need them at runtime, so that's fine, you can put any valid syntax in. Type checkers and IDE's understand the modern syntax (even when targeting 3.7); it's only some older runtime Pythons that would have issues if you used them at runtime. But we don't. :)

Also do you have a better way to call

Assuming you mean getting files, the imports can be inside the file instead of the functions, but otherwise, that's about right.

Also do you have a better way to call

Assuming you mean getting files, the imports can be inside the file instead of the functions, but otherwise, that's about right.

What about calling assert or some pytest functions?

It actually worked. It partly handles namespace packages as well (not sure about python ones, couldn't wrap my head on how to set them up, just add multiple entries to wheel.packages?). The tests should be flushed out a bit to add more navigation situations (including root modules).
As a first pass I think this will work. A next improvement would be to use file-api and skip the install step.

Ready for review @henryiii. There are a few failing CIs, but I'm not sure how to resolve them, can you help on these?

AFAICT the only remaining issue is the weird 3.9 UNIX behavior. I've added a macOS run so we can see if it's all UNIX or just Linux.

Ok, seems like I've overlooked something. If the shared_pkg.data is a package files("shared_pkg.data") will generate a Path object which does not have multiple path identities. But if it isn't a package it will generate a MultiplexedPath. Not sure what causes this distinction :worried:. It seems we still might have to implement the approach that was in meson. Should we for now just support editably importing non-package files for now or keep working in this PR?

I've added xfails.  We could put this in then continue to work on getting rid of the xfails in followups.

@henryiii Quick update about the Python 3.9 issue. Apparently using importlib_resources for that python version does fix the issue. Since it is needed for 3.8 anyway, I think it would be reasonable to document that it should be a dependency for 3.9 as well?

I thought I checked that. Yes, if it works, then we can document that & test it.


Compute_86

Noticed that CUDA>=11.1 supports a new compute capability, let's try building for it. Exploratory ping to @teju85 to check that what I've done post-upstream-cmake-refactor this is still correct, hopefully.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


add Tapo devices compatibility P110/P115/L530E/L900-10 on README.md

Tested, it works well.

Thanks for confirming the unknown device.


Committing solution for Uploaded files #23738

I changed the pixel to leave more space for the file column, 48% instead of 50 to compromise for different languages.
Fixes: https://github.com/zulip/zulip/issues/23738
before changes:

after changesr:

As can be seen, I increased width of the table

fixed trailing white space issue

formatting issue is fixed

removed code for formatting additional tables as they did not change the column widths

Thanks @blipblopblop ! Please clean up your commit history and post again to request a review. See https://zulip.readthedocs.io/en/latest/contributing/version-control.html.

This issue was fixed by https://github.com/zulip/zulip/pull/23969.


Issues with Keras trained model and the Carlin-Wagner L2 attack

I have not been able to successfully generate adversarial examples on the MNIST dataset when the model is trained in Keras.
Quite possibly I am doing something rather silly here.
The jupyter notebook highlighting this issue is here:
https://github.com/vinayprabhu/Lyapunov_defense/blob/master/MNIST_CW_Fail_Keras.ipynb
Also, cw_params = {'binary_search_steps': 15,
'y_target': adv_ys,
'max_iterations': 50000,
'learning_rate': 1,
'batch_size': source_samples * nb_classes if
targeted else source_samples,
'initial_const': 0.1,
'verbose':False}

I haven't run the ipython notebook. What specifically goes wrong?

For the MNIST  architecture and the specific image examples, (in the examples), 'Successfully generated adversarial examples on 100 of 100 instances' was a given.
However, the number of 'Successfully generated adversarial examples' dramatically drops when the model is trained in Keras and imported into TF.
With, the CW-parameters being set at:
cw = CarliniWagnerL2(model, back='tf', sess=sess)
cw_params = {'binary_search_steps': 15,
'y_target': adv_ys,
'max_iterations': 50000,
'learning_rate': 1, # Now trying with higher learning rate
'batch_size': source_samples * nb_classes if
targeted else source_samples,
'initial_const': 0.1,
'verbose':False}
adv = cw.generate_np(adv_inputs, **cw_params),
I get:
[INFO 2017-11-03 11:24:06,239 cleverhans] Constructing new graph for attack CarliniWagnerL2
[DEBUG 2017-11-03 11:24:06,591 cleverhans] Running CWL2 attack on instance 0 of 100
[DEBUG 2017-11-03 11:24:06,607 cleverhans]   Binary search step 0 of 15
[DEBUG 2017-11-03 11:24:06,656 cleverhans]     Iteration 0 of 50000: loss=8.98 l2=0 f=0.1
[DEBUG 2017-11-03 11:24:35,039 cleverhans]     Iteration 5000 of 50000: loss=9.78 l2=0.00807 f=0.1
[DEBUG 2017-11-03 11:24:35,039 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:24:35,041 cleverhans]   Successfully generated adversarial examples on 12 of 100 instances.
[DEBUG 2017-11-03 11:24:35,042 cleverhans]    Mean successful distortion: 0.5183
[DEBUG 2017-11-03 11:24:35,043 cleverhans]   Binary search step 1 of 15
[DEBUG 2017-11-03 11:24:35,048 cleverhans]     Iteration 0 of 50000: loss=87.9 l2=0 f=0.1
[DEBUG 2017-11-03 11:25:04,936 cleverhans]     Iteration 5000 of 50000: loss=89.2 l2=0.0126 f=0.1
[DEBUG 2017-11-03 11:25:04,938 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:25:04,940 cleverhans]   Successfully generated adversarial examples on 13 of 100 instances.
[DEBUG 2017-11-03 11:25:04,941 cleverhans]    Mean successful distortion: 0.7094
[DEBUG 2017-11-03 11:25:04,942 cleverhans]   Binary search step 2 of 15
[DEBUG 2017-11-03 11:25:04,947 cleverhans]     Iteration 0 of 50000: loss=869 l2=0 f=0.1
[DEBUG 2017-11-03 11:25:33,665 cleverhans]     Iteration 5000 of 50000: loss=945 l2=1.94 f=0.1
[DEBUG 2017-11-03 11:25:33,666 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:25:33,667 cleverhans]   Successfully generated adversarial examples on 21 of 100 instances.
[DEBUG 2017-11-03 11:25:33,668 cleverhans]    Mean successful distortion: 1.308
[DEBUG 2017-11-03 11:25:33,669 cleverhans]   Binary search step 3 of 15
[DEBUG 2017-11-03 11:25:33,674 cleverhans]     Iteration 0 of 50000: loss=7.93e+03 l2=0 f=0.1
[DEBUG 2017-11-03 11:26:01,821 cleverhans]     Iteration 5000 of 50000: loss=5.9e+03 l2=7.74 f=0.1
[DEBUG 2017-11-03 11:26:27,807 cleverhans]     Iteration 10000 of 50000: loss=5.95e+03 l2=8.26 f=0.1
[DEBUG 2017-11-03 11:26:27,808 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:26:27,810 cleverhans]   Successfully generated adversarial examples on 29 of 100 instances.
[DEBUG 2017-11-03 11:26:27,810 cleverhans]    Mean successful distortion: 1.986
[DEBUG 2017-11-03 11:26:27,811 cleverhans]   Binary search step 4 of 15
[DEBUG 2017-11-03 11:26:27,816 cleverhans]     Iteration 0 of 50000: loss=7.13e+04 l2=0 f=0.1
[DEBUG 2017-11-03 11:26:53,880 cleverhans]     Iteration 5000 of 50000: loss=3.19e+04 l2=29.7 f=0.1
[DEBUG 2017-11-03 11:27:18,578 cleverhans]     Iteration 10000 of 50000: loss=3.12e+04 l2=30.9 f=0.1
[DEBUG 2017-11-03 11:27:41,984 cleverhans]     Iteration 15000 of 50000: loss=2.99e+04 l2=31.6 f=0.1
[DEBUG 2017-11-03 11:28:06,907 cleverhans]     Iteration 20000 of 50000: loss=2.98e+04 l2=31.5 f=0.1
[DEBUG 2017-11-03 11:28:29,756 cleverhans]     Iteration 25000 of 50000: loss=2.98e+04 l2=31.5 f=0.1
[DEBUG 2017-11-03 11:28:29,757 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:28:29,758 cleverhans]   Successfully generated adversarial examples on 44 of 100 instances.
[DEBUG 2017-11-03 11:28:29,759 cleverhans]    Mean successful distortion: 3.098
[DEBUG 2017-11-03 11:28:29,760 cleverhans]   Binary search step 5 of 15
[DEBUG 2017-11-03 11:28:29,766 cleverhans]     Iteration 0 of 50000: loss=5.67e+05 l2=0 f=0.1
[DEBUG 2017-11-03 11:28:52,962 cleverhans]     Iteration 5000 of 50000: loss=2.21e+05 l2=39 f=0.1
[DEBUG 2017-11-03 11:29:16,913 cleverhans]     Iteration 10000 of 50000: loss=2.18e+05 l2=39.1 f=0.1
[DEBUG 2017-11-03 11:29:39,540 cleverhans]     Iteration 15000 of 50000: loss=2.15e+05 l2=39.5 f=0.1
[DEBUG 2017-11-03 11:30:05,767 cleverhans]     Iteration 20000 of 50000: loss=2.15e+05 l2=39.4 f=0.1
[DEBUG 2017-11-03 11:30:27,869 cleverhans]     Iteration 25000 of 50000: loss=2.15e+05 l2=39.4 f=0.1
[DEBUG 2017-11-03 11:30:51,580 cleverhans]     Iteration 30000 of 50000: loss=2.14e+05 l2=39.4 f=0.1
[DEBUG 2017-11-03 11:31:16,913 cleverhans]     Iteration 35000 of 50000: loss=2.15e+05 l2=39.4 f=0.1
[DEBUG 2017-11-03 11:31:16,914 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,916 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,917 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,918 cleverhans]   Binary search step 6 of 15
[DEBUG 2017-11-03 11:31:16,925 cleverhans]     Iteration 0 of 50000: loss=5.03e+06 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,926 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,928 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,929 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,930 cleverhans]   Binary search step 7 of 15
[DEBUG 2017-11-03 11:31:16,936 cleverhans]     Iteration 0 of 50000: loss=4.99e+07 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,937 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,940 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,941 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,942 cleverhans]   Binary search step 8 of 15
[DEBUG 2017-11-03 11:31:16,948 cleverhans]     Iteration 0 of 50000: loss=4.99e+08 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,949 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,951 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,952 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,954 cleverhans]   Binary search step 9 of 15
[DEBUG 2017-11-03 11:31:16,959 cleverhans]     Iteration 0 of 50000: loss=4.99e+09 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,961 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,963 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,964 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,965 cleverhans]   Binary search step 10 of 15
[DEBUG 2017-11-03 11:31:16,972 cleverhans]     Iteration 0 of 50000: loss=4.99e+10 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,973 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,975 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,976 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,978 cleverhans]   Binary search step 11 of 15
[DEBUG 2017-11-03 11:31:16,984 cleverhans]     Iteration 0 of 50000: loss=4.99e+11 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,985 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,988 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:16,989 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:16,990 cleverhans]   Binary search step 12 of 15
[DEBUG 2017-11-03 11:31:16,996 cleverhans]     Iteration 0 of 50000: loss=4.99e+12 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:16,997 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:16,999 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:17,000 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:17,001 cleverhans]   Binary search step 13 of 15
[DEBUG 2017-11-03 11:31:17,007 cleverhans]     Iteration 0 of 50000: loss=4.99e+13 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:17,008 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:17,011 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:17,012 cleverhans]    Mean successful distortion: 3.435
[DEBUG 2017-11-03 11:31:17,013 cleverhans]   Binary search step 14 of 15
[DEBUG 2017-11-03 11:31:17,019 cleverhans]     Iteration 0 of 50000: loss=4.99e+11 l2=0 f=0.1
[DEBUG 2017-11-03 11:31:17,020 cleverhans]     Failed to make progress; stop early
[DEBUG 2017-11-03 11:31:17,023 cleverhans]   Successfully generated adversarial examples on 50 of 100 instances.
[DEBUG 2017-11-03 11:31:17,023 cleverhans]    Mean successful distortion: 3.435

It seems you have commented out a line that wraps the Keras model into a CleverHans model. Let us know if this is the source of the problem.
model_wrap = KerasModelWrapper(model)

Thanks for the reply!
I had the KerasModelWrapper in the code before when it threw up errors. I will update this reply with the errors.

@npapernot I get the following tensorshape error upon using the model wrapper:
###################################################################
[INFO 2017-11-11 22:22:09,677 cleverhans] Constructing new graph for attack CarliniWagnerL2
[DEBUG 2017-11-11 22:22:09,956 cleverhans] Running CWL2 attack on instance 0 of 100
[DEBUG 2017-11-11 22:22:09,965 cleverhans]   Binary search step 0 of 1
UnknownErrorTraceback (most recent call last)
 in ()
21              targeted else source_samples,
22              'initial_const': 10}
---> 23 adv = cw.generate_np(adv_inputs, **cw_params)
/notebooks/Deep_grebox_attacks/src/cleverhans/cleverhans/attacks.pyc in generate_np(self, x_val, **kwargs)
185             feed_dict[new_kwargs[name]] = feedable[name]
186
--> 187         return self.sess.run(x_adv, feed_dict)
188
189     def get_or_guess_labels(self, x, kwargs):
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
887     try:
888       result = self._run(None, fetches, feed_dict, options_ptr,
--> 889                          run_metadata_ptr)
890       if run_metadata:
891         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
1118     if final_fetches or final_targets or (handle and feed_dict_tensor):
1119       results = self._do_run(handle, final_targets, final_fetches,
-> 1120                              feed_dict_tensor, options, run_metadata)
1121     else:
1122       results = []
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1315     if handle is None:
1316       return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1317                            options, run_metadata)
1318     else:
1319       return self._do_call(_prun_fn, self._session, handle, feeds, fetches)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
1334         except KeyError:
1335           pass
-> 1336       raise type(e)(node_def, op, message)
1337
1338   def _extend_graph(self):
UnknownError: InvalidArgumentError: Incompatible shapes: [100,10] vs. [100,128]
[[Node: mul_15 = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](sub_9, model_1/flatten_1/Reshape)]]


Fix Circle-CI configuration

Circle-CI configuration is broken. We should write a config file that handles the same build process used for Travis :

[x] Environment dependencies
[x] Angular & Ionic unit testing
[x] Ionic building for android

Current configuration fix is blocked by an outdated node-sass package dependency declared in @ionic/app-scripts.
The provided docker-image on circle-ci currently requires node-sass to call an non-existent node binding which leads to 404 HTTP. Building from sources fails also due to missing python2 dependency.
A PR is opened here to update the node-sass package declaration so node-sass can rely to an existing node binding.

PR has been merged and node-sass dependency for alpine image is fixed. see here.
We can now proceed to further steps of configuration

CI seems stuck on chrome launch for testing. We'll need to configure this step in order to be able to process the tests batch before getting to the ionic build step.

Fixed tests. However, test process is triggered with the default environment configuration. We should see how to detect circleci environment in order to pass the same paraters as for travis.
Once done, only ionic build will be left in order to validate CI.

Concurrency fixed. Build seems to work. Last fix to provide is to remove a local Plugin that shouldn't be brought to the current repo from sources and avoid it to be called in CI.
Once done, PR will be opened to merge

circle-ci build seems successful see here as travis ci also.
Opening PR.

PR tests & builds successful on Travis and Circle-CI. PR Merged


DXF : Binary Reader

The DXF deserializer should be able to read binary versions of the specification.

I have yet to see a library support DXF binary format, so this is kind of a waste of time. Closing.

I have yet to see a library support DXF binary format, so this is kind of a waste of time. Closing.


skopeo: 0.2.0 -> 1.0.0, don't set policy and tmpdir during build

Motivation for this change
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

I think Skopeo should work out of the box without having to specify any specific arguments, excepting for security reasons.
We should instead work on Skopeo to improve its current configuration file management: they are working hard on rootless stuffs but a root account is required to use Skopeo out-of-the-box :/

I think Skopeo should work out of the box without having to specify any specific arguments, excepting for security reasons.

I think skopeo disregarding the NixOS managed /etc/containers/policy.json without communicating that to the user could perhapts be called a security issue.

We should instead work on Skopeo to improve its current configuration file management: they are working hard on rootless stuffs but a root account is required to use Skopeo out-of-the-box

I agree with this, if they change this upstream in a consistent way for all of the tools that would be good.
However I see this as a inconsistency that we should resolve as we are the ones that are setting the policy for at build time causing /etc/containers/policy.json to be ignored by skopeo while the other tools respect it and actually require it to function.
I think we should just accept that it doesn't work out of the box.

Not necessarily a good alternative but we could the same method to set the default policy for all of the tools and remove the etc/containers/policy.json managed by the module?

@NixOS/podman Any thoughts on this?

We should instead work on Skopeo to improve its current configuration file management: they are working hard on rootless stuffs but a root account is required to use Skopeo out-of-the-box

This is a very good longer term goal, but in the mean time setting the policy to a built-in causing Skopeo to ignore /etc/containers/policy.json is the wrong call and completely inconsistent with the rest of the libpod/libcontainer ecosystem.
This issue is about more than just Skopeo, and more than just this one file. See https://github.com/containers/libpod/issues/6053.

I think we should just accept that it doesn't work out of the box.

It seems you are right :(

This issue is about more than just Skopeo, and more than just this one file. See containers/libpod#6053.

I don't think the Graham proposal would fix our current issue.

@zowoq Could you rebase, nixosTests.docker-tools is fixed on master.

Bumped to 1.0.0.

This broke nix-prefetch-docker, I've opened https://github.com/NixOS/nixpkgs/pull/88856 to fix it.


feat: Add logs Command to Harbor CLI

Summary
This PR adds a new audit-log command to the Harbor CLI, allowing users to retrieve recent operation logs for the projects they are members of.

Adding this command will allow users to efficiently retrieve and filter recent operation logs for projects.
Enhances audit and monitoring capabilities within the Harbor CLI.

#94

Please add screenshots.

Screenshots:
Logs:

Yeah, this absolutely make sense. Would be good if we can implement tail logging mechanism. for fetching logs in realtime.

or we can leverage the websocket connection to retireve logs


feat: add button for closing all tabs

I saw that there was already functionality to close all tabs, so I just added a button that appears on hover to run the function.
Right now it defaults to closing all but the active tab and pinned tabs, but let me know if you have any suggestions functionality or style -wise.

I think this is feature is ready to go. Let's see the community's reaction about this change.


Grafana won't generate a graph

No graphs are being generated by Grafana although a correct Data Source has been added. I have tried doing a curl with multiple different tags to hawkular-metrics and I get a response with data. Some examples:
curl -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Hawkular-Tenant: ci" -X GET 'https://hawkular-metrics.env.xxxxxxx/hawkular/metrics/counters/data?stacked=true&tags=descriptor_name:cpu%2Fusage,type:pod_container,labels:%5E%28%3F%3D.%2A%5Cbapplication%3Axxxx-xxxxxx-xxxxximpl%5Cb%29%28%3F%3D.%2A%5Cbdeployment%3Axxxx-xxxxxx-xxxxximpl-6%5Cb%29%28%3F%3D.%2A%5Cbdeploymentconfig%3Axxxx-xxxxxx-xxxxximpl%5Cb%29.%2A%24&bucketDuration=60000ms&start=1485884985375' --insecure

curl -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Hawkular-Tenant: ci" -X GET 'https://hawkular-metrics.env.xxxxxxx/hawkular/metrics/counters/data?stacked=true&tags=collector:hawkular_openshift_agent,type:pod,labels:%5E%28%3F%3D.%2A%5Cbapplication%3Axxxx-xxxxxx-xxxxximpl%5Cb%29%28%3F%3D.%2A%5Cbdeployment%3Axxxx-xxxxxx-xxxxximpl-6%5Cb%29%28%3F%3D.%2A%5Cbdeploymentconfig%3Axxxx-xxxxxx-xxxxximpl%5Cb%29.%2A%24&bucketDuration=60000ms&start=1485884985375' --insecure

So this data should appear in Grafana but it doesn't. Grafana even automatically suggests which metrics to draw:

but when I choose nothing happens.

Hi @francizs
Can you check your version of both hawkular-metrics and the hawkular-grafana-datasource? Based on your screenshots, it seems a bit old (no search by tags capability) and, knowing that some old versions were not able to speak with openshift pods, I fear it's the problem here.
Note, in order to know your version of hawkular-metrics you can check the endpoint (GET) /hawkular/metrics/status with your authorization token in headers.
The version of the grafana plugin is given in the Plugins page of Grafana under datasources.

@jotak hello agian!
{"MetricsService":"STARTED","Implementation-Version":"0.18.4.Final-redhat-1" and
Grafana v3.1.1 (commit: a4d2708).
You can either search by metric id or by tag, assuming your version of hawkular-metrics is at least 0.20.0. Prior versions only allow searching by id. I saw that but assumed it shouldn't give any problems to get themetrics.
So this version 0.18.4.Final-redhat-1 must be too old and is not able to receive data from pods? Will try to update the version but could I ask for a suggested version for production? I will try latest for now but it would be great to know the most stable one, thanks!

Actually, 0.18.xx should work with openshift pods. I would personally recommend a newer version, especially in the context of openshift + grafana because querying by tags offers a much more flexible way to build dashboards (I wrote a blog post about it).
I'm not especially aware of a version of Hawkular that would be "better for production". 0.19.x added some performance improvements, 0.20.x added a compression algorithm, and til 0.23.x there's been again performance and compression enhancements so I'd say it's all benefits for a production environment. But I am not the best placed to answer your question here, so I'll check that with my colleagues.
Even if you want to continue with 0.18, there's a couple of things you can further check to sort out this issue:

Can you check in the hawkular datasource configuration (in Grafana) if you're in "proxy" mode and not "direct" mode
Can you open the javascript console of your browser, and see if there's any error? You can also track here the requests to hawkular-metrics and try to see if there's something weird.
Does restarting grafana-server fix the problem?

@jotak First of all I set the latest version and I can see the graph now! It seems 0.18 still has some issues with connecting to pods.
Regarding 0.18 version, I have tried 2 of the points you suggested and

I am/was using direct in Grafana
Haven't tried inspecting the webpage code
Restarting was done multiple times

Thanks for helping out!

You're welcome. So, if you're fine with the latest version, I'll close the issue. But if you want to stick to 0.18 then you would have to use the proxy mode in Grafana, not direct.
You can let me know / reopen if it's not ok.


Proof of concept for refactor closed streams

It fails right now only tests for test/test_closed_streams.py which seems are used only there


Use poll(Duration)

Summary

Currently, Decaton uses KafkaConsumer#poll(long) which could block indefinitely and already marked as deprecated

https://github.com/line/decaton/blob/v3.0.1/processor/src/main/java/com/linecorp/decaton/processor/runtime/internal/ConsumeManager.java#L165

We should migrate to poll(Duration) overload

closed by #174


Untracked hl usages

Usage of hl value in the rld and rrd instructions is not properly tracked, causing invalid "Remove unused ld hl,nnnn (3 bytes, 11 t-states saved)" optimizations to be suggested.

oh, indeed! ok! that's an easy fix, I just missed adding HL to the input dependencies of those instructions in the z80*-instruction-set.tsv files! Will fix later after work. Thanks for reporting!!!

alright, resolved! I also added test42.asm to make sure this works! :)


DCOS configuration

Provide DCOS configuration to launch the framework from the DCOS cli.

We forked mesosphere/universe and added logstash package: https://github.com/triforkse/universe
We'll close that issue after merging to mesosphere

Check if it was merged

Mention the Mesosphere package in our README here

From https://github.com/triforkse/universe/network it looks like there are 5 commits on version-1.x branch that are unmerged

Definitely unmerged - there is no logstash package here https://github.com/mesosphere/universe/tree/version-1.x/repo/packages

Couldn't see a PR so I opened one https://github.com/mesosphere/universe/pull/278

CI failed with error:
[11:30:30][Step 1/1] - /L/logstash/0/package.json
[11:30:30][Step 1/1] {'images': {'icon-large': 'http://logstash.net/images/logstash.png', 'icon-small': 'http://logstash.net/images/logstash.png', 'icon-medium': 'http://logstash.net/images/logstash.png'}, 'description': 'Logstash framwork for Mesos.', 'website': 'https://github.com/mesos/logstash', 'scm': 'https://github.com/mesos/logstash.git', 'name': 'logstash', 'maintainer'<EMAIL_ADDRESS>'version': '0.0.6'}: 'tags' is a required property
[11:30:30][Step 1/1] Process exited with code 1
[11:30:30][Step 1/1] Step Command Line failed

so we need to add some kind of tags property

Fixed up, CI passes

DCOS support has been down prioritised.


fixed to use environment variable for path

fixed deprecated path variable

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.
GitHub Users Who Are Not Authorized To Contribute
The following GitHub users do not appear to have signed a CLA:

@aaronkvanmeerten

Please sign the CLA here.

I'm going to close this out since it's been more than 6 months and the CLA hasn't been signed.  Feel free to open it back up with a valid CLA and we'll review for merge.


Dependency on Node.js Buffer which crashes in Browser unless you are running from a Node Server.

When you create a RijndaelBlock the constructor will convert the key to an array using its Utils.toArray function.  This function if it's not already an array uses Node.js Buffer to convert it to an array.  Didn't notice this as all my jasmine tests always worked because well its runs in Node. However, when I run this in a non-node environment it crashes because Buffer is undefined.
This library states it is a Pure JS library, however, having a dependency on server side Node.js kind of makes it not really pure as you compare them to two node libraries. I was depending on this not having any node.js dependencies.
I would consider this dependency a bug based on the readme.

Okay, I was able to bypass all the uses of Buffer in encrypting except for the last one which has no if blocks around it.  So the last Buffer.from used to return the encrypted data cannot be avoided and is always undefined.  So I tried other crypto libs that support Rijndael and they are more complex or are not really Rijndael and are really AES.  I would like to use this library, going to fork and try to find a replacement for Buffer.from but may have to use browserify which I would like to avoid.
If there are any easy ways to get Buffer to be properly defined in a browser as pure js please let me know.

Sorry for very late response!
I've just release v2.0.0 which (hopefully) resolves this issue. New version does not use Buffer directly, and returns byte Array instead. If you are using this module in browser environment, you can convert it into Uint8Array or some other types you want.


[BugFix] import crypto library GLOBAL

compatible with cmake 3.11
ALIAS library can be only targeted to a GLOBAL target for cmake version <3.18

Fixes #issue
What type of PR is this:

[X] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[X] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

@mergifyio rebase


Support for Outputs

Thanks for the work on this. Are there any plans to add outputs to the action?
Before diving in to a PR, I wanted to see if it was being worked on or whether there are valid reasons not to add support.
Info: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter

I would love to see this.  It would be very helpful to get the repo digest and image name in following steps.  Let me know if I can contribute!

Some outputs are defined in https://github.com/docker/build-push-action/issues/71 . Comment on that issue if you need more.


NGROK_ERR_8000

C:\Users\vx_10>ngrok diagnose
Testing ngrok connectivity...
Internet Connectivity
Name Resolution [ OK ]
TCP [ OK ]
TLS [ OK ]
Localhost Connectivity
Name Resolution [ OK ]
Ngrok Connectivity - Region: Auto (lowest latency)
Name Resolution [ WARN ]
TCP [ OK ]
TLS [ OK ]
Tunnel Protocol [ OK ]
Successfully established ngrok connection! (region: 'auto', latency: unknown)
Warnings and non-fatal errors encountered during diagnostics:
Diagnostics
Name Resolution
Resolver: system
Hostname: connect.ngrok-agent.com
Err: Failed to resolve host connect.ngrok-agent.com: lookup
connect.ngrok-agent.com: no such host
(NGROK_ERR_8000)
Report written to C:\Users\vx_10\AppData\Local\Temp\ngrok-diagnose512093328/diagnose.json
any idea why this is happening ? i can no longer connect to anything Ngrok

Hi @ameen-roayan!
Is this issue still occurring for you?

yes


chore: backports of adaptations for leanprover/lean4#6024

leanprover/lean4#6024 fixes a serious elaboration bug which, perversely, was quite helpful.
Kyle is investigating replacing the bug with something intentional, but we definitively need to fix the bug in the meantime.
This is the backport of changes from lean-pr-testing-6024 which do not have conflicts with master. There are a few more changes that we'll need to handle separately later.

bors d+

Good point @kbuzzard, I'll adjust the adaptation notes.
Regarding the workflow, with this PR we're just trying to modify Mathlib to avoid making use of an existing bug. It's not necessary to do this, but it's a way we can make the adaptation PRs less massive down the line.

bors r+


Time scedule!

Hey when trying to schedule campaign it throws error and does not start campaign!

What value did you enter into the Start Time input field? The fields could likely use some better client/server side input validation, but the input is expected to be in the format of: MM/DD/YYYY HH:MM:SS.  Based on the error you're getting, without more information, I'd assume the value you submitted was either missing a space between the date and time, or incomplete.


Remove default classes on table component

Maybe there's a reason I don't know of for them to be there. But it seems like bloat and if there are classnames added to just be added. I have already run into a conflict with a foundation style:
class*="column"]+[class*="column"]:last-child {
    float: right;
}

It unintentionally targets .mui-table-row-column and .mui-table-header-column.

@anthony-dandrea Yeah we've been meaning to do that. but that's a breaking change.
@oliviertassinari @shaurya947 Should we push this breaking change to 0.14.0? this can annoy a lot of people.

I see. In hindsight I could see how these classes would make it easier for people to write styles. Maybe if there was a prop to turn off the default class. Or if className="" set the className to an empty string.

actually we plan to ONLY support className which defaults to ''
So, yeah we'd like to do that. but it's a breaking change. it must be planned


Running crictl commands give grpclog output

Describe the bug
When running crictl (through k3s), I get grpclog output.
The command still works OK, but it looks rather ugly.
To Reproduce
Steps to reproduce the behavior:
Run any crictl command.
Expected behavior
There should be no such output.
Regular cri-tools works.
Screenshots
k3s:
tc@k8s:~$ sudo crictl ps
I0623 19:58:13.113910    7075 clientconn.go:431] parsed scheme: ""
I0623 19:58:13.114833    7075 clientconn.go:431] scheme "" not registered, fallback to default scheme
I0623 19:58:13.115289    7075 asm_amd64.s:1337] ccResolverWrapper: sending new addresses to cc: [{/var/run/crio/crio.sock 0  <nil>}]
I0623 19:58:13.115558    7075 clientconn.go:785] ClientConn switching balancer to "pick_first"
I0623 19:58:13.115907    7075 balancer_conn_wrappers.go:131] pickfirstBalancer: HandleSubConnStateChange: 0xc00061c280, CONNECTING
I0623 19:58:13.116464    7075 balancer_conn_wrappers.go:131] pickfirstBalancer: HandleSubConnStateChange: 0xc00061c280, READY
I0623 19:58:13.116839    7075 clientconn.go:431] parsed scheme: ""
I0623 19:58:13.117103    7075 clientconn.go:431] scheme "" not registered, fallback to default scheme
I0623 19:58:13.117359    7075 asm_amd64.s:1337] ccResolverWrapper: sending new addresses to cc: [{/var/run/crio/crio.sock 0  <nil>}]
I0623 19:58:13.117638    7075 clientconn.go:785] ClientConn switching balancer to "pick_first"
I0623 19:58:13.117904    7075 balancer_conn_wrappers.go:131] pickfirstBalancer: HandleSubConnStateChange: 0xc00061c5b0, CONNECTING
I0623 19:58:13.118322    7075 balancer_conn_wrappers.go:131] pickfirstBalancer: HandleSubConnStateChange: 0xc00061c5b0, READY
CONTAINER ID        IMAGE                                                              CREATED             STATE               NAME                ATTEMPT             POD ID
7c4815a46d670       2ee68ed074c6e06374666ad34098fb5a3a9602ac32c803acbdcc563523a902e1   26 minutes ago      Running             coredns             1                   c3f5d5f6bca04

cri-tools:
tc@k8s:~$ sudo ./crictl ps
CONTAINER ID        IMAGE                                                              CREATED             STATE               NAME                ATTEMPT             POD ID
7c4815a46d670       2ee68ed074c6e06374666ad34098fb5a3a9602ac32c803acbdcc563523a902e1   24 minutes ago      Running             coredns             1                   c3f5d5f6bca04

Additional context
Add any other context about the problem here.
custom build of k3s: k3s version dev (HEAD)

@afbjorklund I wasn't able to reproduce the issue with the latest build of the master:
sudo ./k3s crictl ps
CONTAINER ID        IMAGE               CREATED             STATE               NAME                ATTEMPT             POD ID
69c61f8169d7c       4a065d8dfa588       20 hours ago        Running             lb-port-443         0                   0e76ce900af1c
a6373d611481b       98768a8bf3fed       20 hours ago        Running             traefik             0                   dc6b158624ac6
1b6f004404c09       4a065d8dfa588       20 hours ago        Running             lb-port-80          0                   0e76ce900af1c
535d1fa7ab95e       2ee68ed074c6e       20 hours ago        Running             coredns             0                   89e3b99b5c3b0

Can you add the steps for your custom build and how are you running crictl exactly?

I am using cri-o, maybe that could make a difference ?
go build -tags "libsqlite3 seccomp no_btrfs netgo osusergo" -ldflags "-w -s" -o k3s ./cmd/server/main.go

Ah, just found this little snippet in containerd init():
        // Discard grpc logs so that they don't mess with our stdio
        grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))

I'm thinking that this has something to do with it.

It looks like you need to compile with the ctrd tag.

It looks like you need to compile with the ctrd tag.

That might have to be the workaround for now, yes.

Is there a reason not to?

Don't really need both containerd and crio, but I'm not sure how much extra baggage it brings anyway.
Not sure that I will try to bundle cri-o with k3s, as it seems to be working just fine as a stand-alone binary.

Closing due to age.


bug

https://github.com/metaphysicser/PS-Mixer/blob/3e4fc7fc75b73c90f34e699bf5faac22d18d7022/config.py#
I think it is "PS_Mixer" instead of "PS-Mixer".

I modified the config.py as you suggested


Assignment 2

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
What did you learn from the changes you have made?
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
Checklist

[ ] I can confirm that my changes are working as intended

A2: INCOMPLETE
Please attempt the questions and refer to module lessons provided via the learning sessions. If you have any questions you need help with please attend office hours or the working stations to get the support you need

A2: Complete
Q3: There more numerical predictors that can be used in the linear model beyond
"numeric_predictors =  ['horsepower', 'weight', 'displacement']"
There is an error in the code. Have you defined pd.DataFrame anywhere?
Q4: Cannot see the output that you got for RSME


Twitter share

Twitter is pretty stupid and doesn't pull the URL from a share click so the url needs to have the page url in it when its clicked.
Here is documentation:
https://dev.twitter.com/web/tweet-button/web-intent
Example:
https://twitter.com/intent/tweet?url=http:%3A%2F%2Fexample.com%2F
Might need to add more to this but wont know till its tested.

@sirtastic : Make your twitter link with the following erb (rails) code:
<%= link_to "https://twitter.com/intent/tweet?url="+CGI.escape(@canonical_url || request.url) do %>
   Tweet
<% end %>

That'll output:

   Tweet


Added backtracking algorithm

Sudoku puzzle solved using backtracking.

Sudoku puzzle solved using backtracking.

@anand4234 Sudoku Solver is already present.
Have a look

@siddharth25pandey I've added another backtracking problem.


A closing tag does not appear when an HTML tag name is entered in a VUE

VSCode Version:
OS Version:

Steps to Reproduce:

Does this issue occur when all extensions are disabled?: Yes/No

/causedByExtension

https://github.com/vuejs/vetur/issues/565


Respect folder hierarchy when highlighting tree items

Description
It would be a huge visual improvement if tree items were highlighted according to the hierarchy they belong to.
For example, the dropdown lines respect the hierarchy:

But highlighted items, whether hovering or selected, do not:

Improved Behavior
Highlighting tree items, whether hovering or selected, according to the directory hierarchy they belong to.

I'm afraid this cannot be achieved with CSS due to the usage of !important statements in inline styling. For reference:

Can it not be achieved at all in Obsidian, or just given the constraints of this theme?
I was about to reference the work on AnuPpuccin, and then I realized you’re the developer! I think your handling of the file explorer is pretty good. When rainbow folders are enabled, highlighted items are bounded by hierarchy. And when rainbow isn’t enabled, your boxes do span the whole tree’s width, but you have them opaque so it’s still clear where I am w.r.t the parent directory.

If it's being done inline and with an !important declaration, it's both from the app and can't be superseded by the theme. I will look at some ways to better clarify hierarchy and location in the file tree as part of the theme rewrite, though -- thanks for the feedback!

Can I ask how to change the colour when selected, I want it not to be spread out but to show an outer border

I apologize for the delay on this -- I am having some health issues that have left me unable to work for the time-being. I am hoping to get a diagnosis in April and that whatever the cause is has some decent treatment options! Then I will be back to active development here.

Can I ask how to change the colour when selected, I want it not to be spread out but to show an outer border

If I understand correctly, try snippet something like (this is very hacky, I apologize):
.theme-dark:not(.css-settings-manager) body:not(.is-grabbing) .tree-item-self.is-active:hover,
.theme-dark:not(.css-settings-manager) .tree-item-self.is-active,
.theme-light:not(.css-settings-manager) body:not(.is-grabbing) .tree-item-self.is-active:hover,
.theme-light:not(.css-settings-manager) .tree-item-self.is-active,
.ctp-full-palette body:not(.is-grabbing) .tree-item-self.is-active:hover,
.ctp-full-palette .tree-item-self.is-active {
	color: rgb(205, 214, 244); /*ctp-text*/
	background-color: inherit;
	outline: solid 1px rgb(203, 166, 247); /*ctp-mauve*/
}

You're going to encounter the issue of the indentation marker. This occurs in the default theme as well, but will be more noticeable here using the colors of Catppuccin.


Move inner classes to the bottom of their containing classes

It is a bad practice to keep inner classes at the top or other arbitrary locations within their parent class. Based on every formatting guide I can find online, it says to keep them at the bottom of the class.
Please reformat this to make everything significantly easier to understand.

Acknowledged.

Oh wow, I didn't expect you to get to this that fast. Thanks mate!


Documentation for keep in diff

We need documentation for the keep parameter as well as endpoint specification.

Closed by #2.


addTextMarker() interferes with click handlers on Chrome

This repro is a simplified version of some code we used to highlight what things you can usefully click on when you hold ctrl/cmd and hover over that link.
Repro:

Open codemirror.net
Enter the following in the dev console:

var cmEl = document.querySelector('.CodeMirror');

var onMouseOver = function(e) {
  // Marker deletion omitted ...
  if (e.ctrlKey || e.metaKey) {
    var cur = editor.coordsChar({left: e.clientX, top: e.clientY});
    var token = editor.getTokenAt(cur);
    if (token.type == 'word' || token.type == 'property' ||
        token.type == 'variable') {
      var marker = editor.markText(
      	  {line: cur.line, ch: token.start},
          {line: cur.line, ch: token.end},
          {className: 'word_underline'});
    }
  }
};

var onMouseDown = function(e) {
	console.log('Mouse down %o', e);
};

cmEl.addEventListener('mousedown', onMouseDown);
cmEl.addEventListener('mouseover', onMouseOver);

Move your cursor over some white space in the editor
Press down ctrl or cmd
Move your cursor over a black token in the JS part of the editor
Click (while holding ctrl/cmd down)

Expected:
The mousedown handler fires
Actual (Chrome):
The mousedown handler doesn't fire.
This repros in Chrome on Mac and Linux, but works as expected in FF.
If you're able to repro this issue with a smaller test case this might be something to submit as a bug report to FF or Chrome.

Seems to be a Chrome bug. Here's a tiny (CM-free) reproducing snippet:
<!doctype html>

foo


Better structure for different 'levels' of preprocessing.

I have been thinking about a major restructuring of the package which would go along with an actual documentation.
This has been inspired by the continued use of the package in my own projects and some great discussions in the Pangeo CMIP6 group. In particular @agstephens got me thinking about what cmip6_preprocessing 'fixes' at which 'level' of the processing.
Let me try to illustrate:

All CMIP6 data starts from multiple files.

These files then form a dataset (this is usually a single variable)

Several datasets of different variables and grid metrics can be combined to a member, which represents 'the stuff you would normally get when you run a model', e.g. a bunch of variables (possibly on a staggered grid) and maybe some grid metrics like the vertical cell thickness and cell area.

Then some models have several members, which can be combined again, calling this an experiment (e.g. a preindustrial control experiment, or a historical forcing experiment).

One could then combine these experiments into some sort of super dataset for each model, but that is often impractical due to the different time frames they run over, so ill stop here.

Or in short for each level file-dataset-member-experiment.
It is important to know when a fix should/has to be applied. There are many fixes that have been applied by @naomi-henderson on the file level in order to put out the zarr stores for the Pangeo CMIP6 data.
Most of the stuff in the preprocessing.py module is meant to be applied at the dataset level, but I am planning to add more of my prototyped code to the package soon and so I wanted to discuss if everybody thinks that this 'vocabulary' looks ok or if I am missing some important level/use-case here.

See https://daops.readthedocs.io/en/latest/readme.html for ideas?

@jbusecke I think your file/dataset/member/experiment approach makes sense for most use cases. I tend to think of CMIP6 as a multi-dimensional hypercube of facets, e.g. MIP, Institute, Model, Experiment, EnsembleMember etc.
I think that there are some slices through the hypercube that will not be covered by your approach. An extension over multiple experiments that can be logically aggregated. Because of that, we wanted to generalise our approach in daops so that everything was reduced to a simple dataset ID string. This has its pros and cons. The main pro is that it avoids the software knowing about any complex hierarchies and relationships. The main con is that you need one "fix" record per ESGF Dataset - which means you need a big data store to hold them. I'm still not sure what the best approach is.
(Part of me has been thinking a lot about STAC/Intake/Xarray/others in terms of aggregations and hierarchies...in some cases, there is value in recording information at the granular (e.g. file) level and in others it is much more useful/efficient to look at higher order aggregations - unfortunately, we seem to need both at the same time...and the ultimate software will transition between them seamlessly).

Thanks for the input @agstephens, indeed I myself have been switching back and forth between processing a full experiment and single members. I think ultimately I favor the more fine-grained approach here, purely for computational reasons related to xarray/dask (they regularly blow up in my processing pipeline, even with just a single member).
I think as a short-term goal I will try to migrate some of my more fine-grained fixes to the daops framework to get acquainted with it and then we should see how to migrate the other features. That will take some time since my current approach is rather 'check and process if necessary' for every dataset, whereas with a daops based approach this would be separated into a scan and parse step or manual entry that is carried out before the datasets are actually modified, if I understand correctly.
Let me actually start with some easy metadata corrections. Ill start an issue over at daops for that.

I have added a modified version of this graph and some text in the docs. I will close this issue for now.


"butterfly" crossover in railroad diagrams

Suppose we want to describe a grammar that recognizes an alternating sequence of identifiers and *s (describing a glob pattern). The natural way to render this in a railroad diagram would be to have two nodes, with the entry path going to both, the exit path coming from both, and each connected to the other.
(Can provide diagram if the above is not sufficient.) There appears to be no way to represent this in bikeshed's railroad diagram language without significant node duplication. Here a couple of bad ways of expressing this:

Or:
    Seq:
        OneOrMore:
            N: identifier
            T: *
        Opt:
            T: *
    Seq:
        OneOrMore:
            T: *
            N: identifier
        Opt:
            N: identifier

Or:
    Seq:
        Opt:
            T: *
        OneOrMore:
            N: identifier
            T: *
        Opt:
            T: *
    T: *

Hmm, yeah, there really is no good way to do this. If you allowed any sequence of identifiers and * characters, this is easy - I apparently haven't updated the parser yet to work with this, but I added a MultipleChoice node to the official repo (https://github.com/tabatkins/railroad-diagrams) that makes this simple:
Plus:
  AnyOf:
	T: *
	N: identifier

But if you have to explicitly alternate, and can start and end with either one, it's definitely harder.  Another new node I've added to the official repo but apparently not mirrored over here (jeez...) is OptionalSequence, which does exactly reproduce what you want and reduces the duplication a little bit, at least:
OptionalSeq:
	T: *
	Plus:
		N: identifier
		T: *
	T: *

This seems reasonable overall, and I'm willing to add a new node. Can you give me a sketch of what you think it would look like?

Maybe something like this:

Ah, that's cute and I like it. Yeah, I'll happily add this - I've just ported it over to an issue on the right repo https://github.com/tabatkins/railroad-diagrams/issues/50

Okay, JS version of the new node is complete - check it out at https://tabatkins.github.io/railroad-diagrams/example.html#glob. Just need to write the Python version, copy it over here, then write the parsing code for it (and the other two new constructs that I haven't ported over to Bikeshed).

Thank you, that looks great.


Make SSHTimeout variable

After some discussion on #69, this makes SSHTimeout a configurable part of a VM package.
@lilirui @mbhinder @yaso195 @zquestz

LOVE IT. LGTM.

We probably want a lock around it to make it thread safe, no?

Okay. Adding locks might break the API.
var sshTimeout = 5 * time.Minutes
var mu sync.Mutex

func SSHTimeout() time.Duration {
  return sshTimeout
}
func SetSSHTimeout(d time.Duration) {
  mu.Lock()
  sshTimeout = d
  mu.Unlock()
}

But, now SSHTimeout isn't a numeric constant and this will break code that uses it as a const. Changing this just to var won't break existing code, but, as you said, now this isn't thread-safe.

I think we are fine without locks, the consumer just needs to set this in his initializer, that way they can set the global ssh timeout.

Okay. Updated the doc with note about thread-safety.

LGTM


No stair stepping on slopes when CollisionShape3D is offset.

Issue:
When the CollisionShape3D's transform position is offset (not Vector3.ZERO) from the CharacterBody the IKCC stair stepping logic fails for sloped surfaces. This happens specifically for cylinders and capsule shapes.
Environment:
Improved-KCC: 25073ee
godot-jolt: 0.13.0-stable
Godot: 4.3-stable_win64
OS: Windows 11
Example:
ikcc_no_sloped_step_issue.zip Godot Jolt is not included with the example project because of file size limits.
https://github.com/user-attachments/assets/8b055e93-66eb-4218-b841-966759ebb106

Thanks for reporting this and providing an example project! Will look into this soon.


Redis v2.6 Lua Scripting

I've started converting the python library to use the new Lua scripting (starting with the Job feeds)
This uses the redis-py lua scripting branch discussed here: https://github.com/andymccurdy/redis-py/pull/207
As it's possible to do logic within the lua scripts, I've replaced this construct from the contracts:
WATCH [schema]:[feed]
ZRANK [schema]:[feed] [id] // if nil: fail
MULTI
    ZREM [schema]:[feed] [id]
EXEC

with this (the ZRANK call is no longer necessary)
if redis.call('zrem', [schema]:[feed]) == 0 then
    return false
end

On a side note, is there a plan for maintaining common versions of the lua scripts for all language implementations? (maybe in a separate repo?)

Yes there will be separate repo for the Lua scripts. Look in github.com/andyet/thoonk.js in the scripting branch for what has been converted so far.
Interestingly, this topic was just raised in the thoonk.js version a few days ago: https://github.com/andyet/thoonk.js/issues/12

Yeah, I saw the scripting branch on thoonk.js, but i'm more interested in the python version at the moment, so put my contributions here (plus there's only the one lua script there, which I copied to the scripts folder here)
I'm holding off converting the other scripts if there's going to be a change to the contracts to handle versioning.


Bump cockroach to 20.2.4 for katacoda scenarios

This change is

This change is

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/87a3ee7d3ca8090dfc6501f3747b0c775bb85905/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/87a3ee7d3ca8090dfc6501f3747b0c775bb85905/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/ed1dc1294166be5fc7cd971a29007d8d6688554d/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/ed1dc1294166be5fc7cd971a29007d8d6688554d/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/63f463764eee07507f735e5aa0ff068f313b82d7/

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/63f463764eee07507f735e5aa0ff068f313b82d7/


Error in ggpicrust2 (There are no statistically significant biomarkers in the dataset)

Dear Chen,
Thank you very much for creating this useful analysis tool.
I am starting to use the package to analyse my PICRUST2 result, however I have got this error in my analysis:
Error in ggpicrust2(data = abundance_data, metadata = metadata_Nepal_kath,  :
Notice: There are no statistically significant biomarkers in the dataset. This is not an error, but it might indicate that the data do not contain any biomarkers passing the set significance threshold (p<=0.05). You may refer to the tutorial's FAQ for further help and suggestions.
For your information below is the codes I used following tutorial in: https://cran.rproject.org/web/packages/ggpicrust2/vignettes/using_ggpicrust2.html:
abundance_file <- "KO.tsv"
metadata_Nepal_kath <- read.csv("metadata_perimilk_kath.csv")
results_data_input <- ggpicrust2(data = abundance_data,
metadata = metadata_Nepal_kath,
group = "ABRpresence",
pathway = "KO",
daa_method = "LinDA",
ko_to_kegg = TRUE,
order = "pathway_class",
p_values_bar = TRUE,
x_lab = "pathway_name")
LinDA analysis is complete.
Error in ggpicrust2(data = abundance_data, metadata = metadata_Nepal,  :
Notice: There are no statistically significant biomarkers in the dataset. This is not an error, but it might indicate that the data do not contain any biomarkers passing the set significance threshold (p<=0.05). You may refer to the tutorial's FAQ for further help and suggestions.
In addition: Warning message:
In MicrobiomeStat::linda(abundance, LinDA_metadata_df, formula = "~Group_group_nonsense_",  :
Some features have less than 3 nonzero values!
They have virtually no statistical power. You may consider filtering them in the analysis!
I have tried to do it with different group from the metadata, but still it gave the same error.
I really hope that you can help me with this issue, what could be the possible reasons and what should I do.
Thank you very much Chen, your help is much appeciated.
Best Regards
Erda

Dear @erda712,
Thank you for reaching out and using ggpicrust2 for your analysis. I understand your concern regarding the absence of statistically significant biomarkers in your dataset. This situation is not uncommon, and there are several reasons why it might occur:

True Difference Between Groups: If the microbial communities or pathways you're comparing are very similar, it's possible that there genuinely are no significant differences between them.

Sample Size: A small sample size can limit your statistical power, making it difficult to detect differences even if they exist.

Intra-Group Variation: High variation within your groups can also obscure differences between them. This could be due to outliers or subgroups that increase variability.

To address these issues, you might consider the following:

Increase Sample Size: If possible, adding more samples can improve your statistical power.

Decrease Intra-Group Variation: Check for outliers or subgroups that might be driving the variation. Cleaning your data or stratifying your analysis could help.

Adjust Statistical Methods or Parameters: Different statistical methods or parameter adjustments might be more suitable for your data. For example, switching between parametric and non-parametric tests or tweaking the parameters of your current test.

It's important to remember that not finding significant results is still a valid outcome. It might indicate that there are no substantial differences between the groups you're studying. Always interpret your results in the context of your specific study.
For more detailed suggestions and troubleshooting, please refer to the FAQ section in our GitHub repository.
I hope this helps! If you have any further questions or need more assistance, please don't hesitate to reach out.
Best regards,
Chen

Thank you Chen for your prompt reply.
OK, I'll try work on it, and will give updates about it.
Thank you.
Best Regards
Erda

Dear Chen,
I would like ask for more assistance please.
I have tried different ways as suggested in GitHub but I still got the same error.
If I could ask for your help to look at my data and see if it gives the same error if you perform the analysis then it would be really helpful for me.
Thank you very much Chen, appreciate your assistance.
Best Regards
Erda

Dear @cafferychen777,
I'm sorry to hear you are still getting the same error after trying different approaches as I suggested. This error typically means that there are no statistically significant differences in microbial abundances between your groups in the analysis. A few things to check:

Make sure your groups have sufficient sample size (at least 3-5 samples per group). Too few samples can limit statistical power to detect differences.

Check that your groups are truly biologically distinct - for example, different disease states, treatment conditions, etc. Groups without real differences will not show any significant differences in analysis.

Double check your metadata - make sure samples are assigned to the proper groups, no typos or errors.

If you still see no statistical differences after careful checking, then it likely reflects a lack of strong microbiome differences between your particular groups. I'm happy to take a closer look if you want to share some example data files with me. Just send over some example abundance and metadata files and I can run the analysis on my end to see if I find the same issue.
Let me know if you would like me to take a look or if you have any other questions!
Best regards,
Chen YANG

Dear Chen,
Thank you very much for you reply.
Here are some information about the data:

I do have more than 5 samples for each group.
they are trully biologically distint
I did check the metadata to make sure samples are assigned to proper groups.
Thank you very much again for your help, herewith I would like to send you some example abundance and the metadata files.

metadata_ErdaPeri.csv
KO_ERH_peri.csv
EC_ERH_peri.csv
Best Regards
Erda


Redundant Statevector Conversions During Validation

Information

Qiskit Terra version: 0.10.0
Python version: 3.6
Operating system: All

What is the current behavior?
When the C++ state vector simulation is run, the state vector is returned as a JSON string to qiskit. There, the string is parsed using a JSONEncoder and validated against a schema using marshmallow (_deserialize in https://github.com/Qiskit/qiskit-terra/blob/f17f8f073e1d76d4b3573878c58415e6f9e46542/qiskit/validation/fields/custom.py#L49 ). When it is returned using Result.get_statevector(), the state vector is serialized again in ( https://github.com/Qiskit/qiskit-terra/blob/f17f8f073e1d76d4b3573878c58415e6f9e46542/qiskit/validation/fields/custom.py#L43 ) and formatted in https://github.com/Qiskit/qiskit-terra/blob/c3cdd355d3314889a1cff6597f0b5509a537d309/qiskit/result/postprocess.py#L176 .
In summary, the state vector goes through following transformations: JSON string -> JSON -> python list of complex numbers -> python list of 2-valued lists -> numpy array of complex numbers.
Steps to reproduce the problem
What is the expected behavior?
These transformations have a significant impact on the runtime when many qubits are simulated (23+). Result.get_statevector() should return a numpy array directly instead of going through _serialize.
Suggested solutions
It seems that some of the transformations are not necessary. The deserialization in custom.py should return a numpy array and the serialization should be skipped when calling Result.get_statevector(). In addition, the deserialization is slow for large state vectors as marshmallow does not reserve memory for the list containing the state vector prior to appending the variables returned by _deserialize. This can be fixed by loading the JSON string using an object_hook ( https://docs.python.org/3/library/json.html ), i.e. directly creating a numpy array while parsing the JSON string instead of relying on marshmallow.

There are several efforts in progress on this front. The first is just a band-aid to make this use case work: https://github.com/Qiskit/qiskit-terra/pull/3181 the second is: https://github.com/Qiskit/qiskit-terra/pull/3383 which is the start of reworking the current provider interface to decouple json/ibmq api from the providers interface. The third effort I don't have a link for because I'm still drafting an rfc for the effort, but is a v2 providers interface that doesn't use qobj and the ibmq api semantics at all as the interface to providers, but instead is just python objects.

Coming over from the aer issue - here's a quick test to demonstrate the problem (and its severity). TL;DR is that a temporary workaround could be replacing raw_result.get_statevector(i) with direct access np.asarray(raw_result.results[i].data.statevector). It appears that Result.get_statevector is essentially equivalent to running Result.to_dict and then accessing that dict manually (that is to get one statevector result - so if there were a loop over circuits and get_statevector is used within the loop it is REALLY bad).
I was using master branch for these tests.
Results on my machine:
Num Qubits           Sim                  naive to_dict        direct access        get_statevector
5                    0.01202155           0.00018297           0.00000976           0.00006117
7                    0.01114277           0.00023326           0.00001117           0.00011174
9                    0.01502806           0.00045379           0.00002248           0.00031649
11                   0.02526170           0.00163007           0.00011159           0.00149228
13                   0.05523828           0.00749241           0.00030521           0.00974752
15                   0.15380105           0.03816904           0.00121548           0.01784142
17                   0.59182173           0.13023160           0.00485045           0.13570576
19                   2.37321197           0.56625554           0.02343114           0.49493971
21                   9.65335323           2.23207012           0.12038622           2.08556945
Test code:
`import time
import random
from pprint import pprint
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import Aer
from qiskit.compiler import transpile, assemble
def random_circuit(num_qubits, num_ops=10):
circ = QuantumCircuit(num_qubits, num_qubits)
circ.h(range(num_qubits))
qubit_indices = [i for i in range(num_qubits)]
for i in range(num_ops):
control, target, t = random.sample(qubit_indices, 3)
circ.cx(control, target)
circ.t(t)
return circ
if name == 'main':
max_qs = 22
num_samples = 10

BACKEND_OPTS = {"method":"statevector"}
sv_sim = Aer.get_backend('statevector_simulator')

print("{: <20} {: <20} {: <20} {: <20} {: <20}".format("Num Qubits", "Sim", "naive to_dict", "direct access", "get_statevector"))

for num_qs in range(5, max_qs, 2):
    vals = [num_qs, 0, 0, 0, 0]

    for _ in range(num_samples):
        strt = time.perf_counter()
        raw_result = sv_sim.run(assemble(random_circuit(num_qs, 10), sv_sim), backend_options=BACKEND_OPTS).result()
        vals[1]+=time.perf_counter()-strt

        strt = time.perf_counter()
        dict_result = raw_result.to_dict()
        sv_naive = np.asarray(dict_result['results'][0]['data']['statevector'])
        vals[2]+=time.perf_counter()-strt

        strt = time.perf_counter()
        sv_direct = np.asarray(raw_result.results[0].data.statevector)
        vals[3]+=time.perf_counter()-strt

        strt = time.perf_counter()
        sv_get = raw_result.get_statevector()
        vals[4]+=time.perf_counter()-strt

    for i in range(1, len(vals)):
        vals[i] = vals[i] / num_samples
    print("{: <20} {:<20.8f} {: <20.8f} {: <20.8f} {: <20.8f}".format(*vals))

print(type(sv_naive), type(sv_direct), type(sv_get))
print("Are we sure? ", np.array_equal(sv_naive, sv_get), np.array_equal(sv_direct, sv_get))`

Confirmed the problem is in Result.data() - removing the to_dict() call improves the performance of get_statevector immensely (will likely improve get_unitary(...) even more, and get_counts/memory(...) equivalently but I haven't tested).
Removing the to_dict() from data(...) and updating the rest of the Result module to account for the change should fix the performance issues of the get_statevector/unitary(...) methods. So just change self.data(...)['counts'] to self.data(...).counts and self.data(...)['statevector'] to self.data(...).statevector (and so on...).
Problems will arise though if client-side code is relying on the Result.data(...) method to return a dict (even though the client could just call to_dict() on the ExperimentResult(Data) themselves) so there could be issues there. Still definitely solutions but they may be slightly more complicated.

This has been fixed now. Since we moved to avoiding marshmallow/forcing serialization and using python objects for the back and forth between terra and backends, aer has been updated to just move the output into a numpy array and return that object in the results.


adding auto complete feature

closes #6
https://user-images.githubusercontent.com/76479104/180285006-dd5b04c5-9818-4e7f-8037-de2cbb616237.mp4

Auto complete feature

Deploy not working as the API key has not been added to the code.


fit to screen width is wider than screen width?

example url: https://exhentai.org/s/c195986542/2057968-48
horizontal scroll is there

I suppose it's cuz of padding: 2px,
can the script control it maybe?

(used the e-hentai site version to check, seen here https://e-hentai.org/s/c195986542/2057968-48 )
I see what you're talking about. It's not caused by the script but the site itself's own CSS specifies the 2px padding to be there. However, none of the image is cut off. Though if you were worried about that, you can add a small bit of padding in the settings, via the Graphics Settings tab,  you can set the border for the site to be say.. 8. This'll create a small bit of padding around the image.
Anyway, the fix should be relatively easy to add, just some css override.


Feature/issue-3-twisted-trial-tests

Finished? @hodgestar

I'm :+1: on landing this and then we can create some issues for future work?


Improve error when token storage fails during sign-in

Somewhat similar to #370, we recently experienced a situation where the database was stuck in a read-only mode after a failover.
Sign-in was failing with an unhelpful message:
** (MatchError) no match of right hand side value: :error

lib/ash_authentication/strategies/password/sign_in_preparation.ex:132 AshAuthentication.Strategy.Password.SignInPreparation.generate_token/3

The SignInPreparation.generate_token fails with MatchError if Jwt.token_for_user returns :error due to being unable to store the token.
Ideally these functions that we expect to rarely fail (like generating a token) would use ! variants of any actions they call rather than failing to match on :error returns, so that a more detailed exception is recorded.
The reason is lost in the else clause of the with expression at: https://github.com/team-alembic/ash_authentication/blob/main/lib/ash_authentication/jwt.ex#L116

Looks like @simpers slipped this in with #749.  It now emits an error into the log.

Looks like @simpers slipped this in with #749. It now emits an error into the log.

Slipped in the log, or what do you mean? 😅
I didn't change the signature of the return so as to not break things, but trying to log the reason if possible would at least give us something more, but it still might not help if the reason there is as vague.

Ideally these functions that we expect to rarely fail (like generating a token) would use ! variants of any actions they call rather than failing to match on :error returns, so that a more detailed exception is recorded.
The reason is lost in the else clause of the with expression at: https://github.com/team-alembic/ash_authentication/blob/main/lib/ash_authentication/jwt.ex#L116

I agree with this, and trying to get as much info about the error as possible would be great, if it would be possible to allow it to be returned.
The original error I got was just the same unhelpful message, but in my case adding that log allowed me to find the issue. But if it is still as vague downstream, it might not help in all cases.

Yeah @jimsynz was just pointing out you'd already solved the issue by emitting a log. Well, you fixed the "we can't see what went wrong" bit, but we should change the return values as well.

Yeah @jimsynz was just pointing out you'd already solved the issue by emitting a log. Well, you fixed the "we can't see what went wrong" bit, but we should change the return values as well.

Yeah, I thought as much 😅
I'd be in favour of getting more information here, if possible. If not now, in a release that would accept such a possibly breaking change?


Add Rubocop lint checks

There's no story ID, but I looked at this while originally reviewing #202.
What
Rubocop is a static code analysis tool for Ruby. It comes with a bunch of
checks, called "cops". Some of them, such as the "style" cop, are very
opinionated and have limited value.
However I've found the "lint" cop very useful for catching unintended
behaviour in previous projects. It is described as:

Lint cops check for possible errors and very bad practices in your code.
RuboCop implements in a portable way all built-in MRI lint checks (ruby
-wc) and adds a lot of extra lint checks of its own.

We now have enough Ruby code, by way of scripts or tests, that this is worth
adding. By adding it to the test make target it will be run by Travis CI
(and locally) alongside our other tests.
See the individual commits for fixes to existing warnings.
How to review

Review the code changes.
Confirm that the Travis build has passed.

Who can review
Not @dcarley.

-3 of karma because no story no work

LGTM


Nest channel table actions in three-dot menu

I added a new action to stop current transcode sessions and it makes the channel table look wonky

Fixed in #763


make the change requested by the review

lock file go in generated section so it disapear from vendor.yml

Sorry I missclicked. The right PR is here https://github.com/github/linguist/pull/4642


style swap equals color mixture in some cases?

With the default parameters, I have got this result.

It seems to me that yellow + blue = green.
But in the paper, the feature map of the content image on each patch is replaced the closest one of the style image. Then I thought that the merged image should take the yellow color.
Could anyone please help me understand this?

It's due to the addition of overlapping patches during style swap. So apparently yellow+yellow=green inside the VGG network. Yeah, adding activations might not be the best idea..

Thank you for your quick response.
Yes, it is from optimization. And I will follow your advice and check the effect of the averaging.

I have found that the reason is that in this case, the 100 iterations of optimization is not enough.
After running about 800 iterations with learningRate=0.05, I have got

The color is good now, but the edges in the stylized image are not satisfying. I think the reason could be that the activation space in relu3_1 is not sensitive to the edges of the images.
I think the color problem is solved now and I close this issue.


Tests from checklist of slamdata/slamdata

useless, all tests probably will be managed by slamdata/slamdata repo


remote repl interaction (chibi)

I don't understand geiser interaction with remote repl:
$ chibi-scheme examples/repl-server.scm
M-x geiser-connect , Host: localhost, Port: 5556
...geiser correctly open -* Chibi REPL *- buffer to my server.
After that I open my test.scm file and on C-c C-z geiser create new local repl.  So for example geiser-eval-definition (C-c C-c) use this local repl and not my remote repl.  How can I force geiser to use my remote repl and not open new local?
Probably I misunderstood something important :)

we are moving the project to gitlab. so please, follow-up there as needed. sorry for the inconvenience!
http://gitlab.com/jaor/geiser/issues/165


chore: remove pnpm from engines except root

We've decided to remove pnpm from the engines entry in package.json files of individual packages:
    "engines": {
        "pnpm":  "VERSION"

We keep it in the root package.json to indicate pnpm as package manager. Reason for this change is, that consumers might get warnings when consuming modules from this mono repo.
Risk: developers can now run yarn install or npm install on individual packages. This will also work as long as the package does not have workspace dependencies. However, we should be able to catch such mistakes during review. No lock files for yarn or npm should be included in any PR.
Advantage: Consumers that are using yarn or npm as package manager are not getting warnings about pnpm anymore.

As @devinea said, a changeset please.

I was also wondering about this, but was not sure. I'll add it.

@devinea @tobiasqueck, changeset added, please review.

@Klaus-Keller, I just noticed that the pnpm version mentioned in the root package.json is 8.14.0 and not a range: https://github.com/SAP/open-ux-tools/blob/9f8e9dabe44b25a49e46957607f61c2fd27162a0/package.json#L59
That's pretty restrictive. Shouldn't that be changed to a range?


fix: app deprecations

Handle NR1 deprecations
In the NR1 explorer, select an entity under Services - APM. You chould see the Event Stream app under More views.
I did not find the dperecations listed in the ticket, but I did resolve a getOpenOverlayLocation is using a deprecated artifact id. Please use "data-exploration.nrql-editor" instead of "wanda-data-exploration.nrql-editor" error.
closes https://github.com/newrelic/nr1-catalog/issues/311

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


About the language

May I ask, do you support Chinese? When do I support Chinese?

No, currently Pingvin Share is only available in English. Please create an issue with the feature request template if you want to request multi language support.


Increase in Flutter memory usage

https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=56281.

This is reported to still be happening; working with a Fuchsia team member and @iskakaushik on determining what can be done.

Triage: It is still unclear if this is Flutter related because other application related changes were in the internally referenced patch delta.

Upstream issue indicates that this issue is finding a home on the Fuchsia team after @iskakaushik has done some testing and has questions. Will leave open while we see if more action is needed by the Flutter team.

Since this is waiting on an investigation by the Fuchsia team, I will change the milestone.

Triage: No change since the last update.

Upstream issue resolved.


Thanks!! And - sharing example code?

Found this after implementing react-virtualized which is great so far, thank you!
I'm running into some issues with getting js-search up and running on some tables in my app...your example at http://bvaughn.github.io/js-search/ looks really great but I was wondering if you'd be willing to share the code like in the react-virtualized repo examples, for reference?

Thanks! 😄
The code is shared in GitHub, on the gh-pages branch (here). There's just very little of it in the demo.
Hope it's helpful!

Ahh gotcha! Ok that makes more sense. Thank you!!


SuggestExtensions cop not working on JRuby

I'm not sure whether I've not done something wrong but just updating RuboCop from 1.4.2 to 1.5.0 and running it blows up with:
uninitialized constant RuboCop::CLI::Command::SuggestExtensions::Bundler
org/jruby/RubyModule.java:3760:in `const_missing'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:57:in `dependent_gems'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:52:in `block in extensions'
org/jruby/RubyHash.java:1751:in `select'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:52:in `extensions'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:15:in `run'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/command.rb:11:in `run'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli/environment.rb:18:in `run'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli.rb:65:in `run_command'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli.rb:77:in `suggest_extensions'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli.rb:72:in `block in execute_runners'
org/jruby/RubyKernel.java:1897:in `tap'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/lib/rubocop/cli.rb:41:in `run'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/exe/rubocop:13:in `block in <main>'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/benchmark.rb:308:in `realtime'
/home/boris/project/build/.gems-rubocop/gems/rubocop-1.5.0/exe/rubocop:12:in `<main>'
org/jruby/RubyKernel.java:1009:in `load'
/home/boris/project/build/.gems-rubocop/bin/rubocop:23:in `<main>'

Disabling the cop fixes the issue. This is on Linux, using JRuby. I haven't installed/am not using Bundler (which, I guess, is the problem).

Hmm, it seems we've leveraged an API that exists only for MRI. @dvandersluis, please check if there's something we can use for JRuby, otherwise let's just make this a no-op for it.

Well, for added fun, I can report that I'm having the same issue using rubocop outside of bundler on MRI. Using ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux
uninitialized constant RuboCop::CLI::Command::SuggestExtensions::Bundler
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:57:in `dependent_gems'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:52:in `block in extensions'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:52:in `select'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:52:in `extensions'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command/suggest_extensions.rb:15:in `run'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/command.rb:11:in `run'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli/environment.rb:18:in `run'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:65:in `run_command'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:77:in `suggest_extensions'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:72:in `block in execute_runners'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:72:in `tap'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/lib/rubocop/cli.rb:41:in `run'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/exe/rubocop:13:in `block in <top (required)>'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/home/ubuntu/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.5.0/exe/rubocop:12:in `<top (required)>'
/home/ubuntu/.rbenv/versions/2.6.6/bin/rubocop:23:in `load'
/home/ubuntu/.rbenv/versions/2.6.6/bin/rubocop:23:in `<main>'

I don't think it's a JRuby issue specifically, but rather that bundler isn't guaranteed to be available (it's only a development dependency). A couple checks for bundler and the presence of a Gemfile should resolve this (and #9148, which is a different error message but the same cause).

RuboCop 1.5.1 is out https://github.com/rubocop-hq/rubocop/releases/tag/v1.5.1

Thanks for so quickly resolving this! 1.5.1 works like a charm!


ComputerVision 3.2.0 gives ComputerVisionErrorException

Every method using ComputerVision 3.2.0 gives: "ComputerVisionErrorException: Operation returned an invalid status code 'NotFound'".

This is due to the change in setting the endpoint:
3.2: computerVision.Endpoint = "https://westcentralus.api.cognitive.microsoft.com";
2.1: computerVision.AzureRegion = AzureRegions.Westcentralus;
ProjectOxford: computerVision.ServiceHost = "https://westcentralus.api.cognitive.microsoft.com/vision/v1.0";
Would like to see:

On the NuGet page: an emphasis on the change in specifying the URL
A more illuminating exception message

Hi @easyj2j ,
Please try again with the latest version of the SDK. Here is a link to the Nuget: https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision
Thanks,
Chris


Datagrid action overflow is clipped with 4 more action items.

Select one ...  (check one with "x")
[X] bug
[ ] feature request
[ ] enhancement

Related issue vmware/harbor#1899
Environment details

Angular version: 2.4.10

Clarity version: 0.8.7

OS and version: 10.12

Browser: [all]

This should have been fixed in 0.8.13, so upgrading to the latest version should fix this issue. 👍

Thanks, I'll have a try on it.


feat(onyx-1276): restore progressive onboarding tooltips for new home view

This PR resolves ONYX-1276
Description
Restores missing tooltips:

PR Checklist

[x] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
#nochangelog

Need help with something? Have a look at our docs, or get in touch with us.

Warnings

:warning:

✅ No changelog changes

  Generated by :no_entry_sign: dangerJS against dc8f24c5a489c58d62125fff720711c31cafb6f9


code

Hello, thank you for your great work! I'd like to know when your code will be released?

Code has been published.


Please update NPM version of package

Hey! Great and useful package! 👍
Can you please update the version on NPM to include the new TypeScript fixes made in PR #170?
Thanks!

I'd also like to get the export of FlatList into index.js on NPM when we can!

Updated both on 0.4.0.


fix(linter): fix false positives for generics in no-unexpected-multiline

follow-up to https://github.com/oxc-project/oxc/pull/6031

#6039  👈
main

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

Join @camchenry and the rest of your teammates on  Graphite

Silly me, I thought I made that change... I must have forgotten to push it...


Accessability issue

Hi there
In mobile view the menu inserts its div right at the top of the page (div class="slicknav_menu") I have a "skip to main content" link I use for accessibility. I need it to go right at the top above the menu, any idea how I do that? Probably requires some Javascript which I have little experience in.
Appreciate any help!
Thanks
Lee

Do you have the ability to reorganize the order of appearance of elements in the DOM? If not, you could use jQuery.
Example:
HTML

Skip to Main Content

jQuery
$('.skip-link').insertBefore('.slicknav-menu');


webpack2 es6 module support

Webpack2, using webpack es6 module functions (without transpiling them with babel); react-quill 1.0.0-betav4 .
I get this error on production:

Uncaught ReferenceError: require is not defined

Which is pointed to react-quill.min.js file.
Which is strange, everything is okay on dev environment.
When I switched import ReactQuill from "react-quill" to import ReactQuill from "react-quill/dist/react-quill" , everything works correctly.
Additional note: everything was good with import ReactQuill from "react-quill" in beta-v1.
Should we switch "main": "dist/react-quill.min.js", in package.json to use non-minified file?

beta-1 didn't point at the dist files: https://github.com/zenoamaro/react-quill/blob/v1.0.0-beta-1/package.json#L16
Where is the error being thrown? In the compilation step?

@jtomaszewski Thanks again for reporting - do you think you can provide a sample configuration to reproduce the bug?

Without confirming the issue I think the problem is related to the change to the packaging in https://github.com/zenoamaro/react-quill/issues/166#issuecomment-28489133. Seems bundling and distribution are quite a contentious topic https://github.com/webpack/webpack/issues/1617 so I'll reopen #162 for discussion.
cc @zenoamaro

Also @jtomaszewski do you think it could be related to this bug: https://github.com/webpack/webpack/issues/4511?

@jtomaszewski packaging reverted to previous style in 1.0.0-rc-1. Give it a go?

Yup, it's good now.


feat: allow no query quads array on basic query

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

npm package (@latest dist-tag)
GitHub release
v2.5.0

Your semantic-release bot :package::rocket:


Add slack auto-invite

[ ] Invite users to new Slack when confirming.
[ ] Check users to send new invites to Slack on command

Inspiration: https://github.com/giginet/django-slack-invitation

Close this to add link in confirmation email.