Fails to read parquet file after generating using refs_to_dataframe

It seems like an error when trying to read parquet files. I generated the parquet file using
refs_to_dataframe(refs, 'refs_9.parq', partition=False)

Then read it using the following code:
from fsspec.implementations.reference import DFReferenceFileSystem
fs = DFReferenceFileSystem("refs_9.parq", lazy=True, remote_protocol='s3')
ds =  ds = xr.open_dataset(
    fs.get_mapper(), engine="zarr",
    backend_kwargs={"consolidated": False}
)

But then I struggle with ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.
Full dump below:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[78], line 3
      1 from fsspec.implementations.reference import DFReferenceFileSystem
      2 fs = DFReferenceFileSystem("refs_9.parq", lazy=True, remote_protocol='s3')
----> 3 ds =  ds = xr.open_dataset(
      4     fs.get_mapper(), engine="zarr",
      5     backend_kwargs={"consolidated": False}
      6 )

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/backends/api.py:541, in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, inline_array, backend_kwargs, **kwargs)
    529 decoders = _resolve_decoders_kwargs(
    530     decode_cf,
    531     open_backend_dataset_parameters=backend.open_dataset_parameters,
   (...)
    537     decode_coords=decode_coords,
    538 )
    540 overwrite_encoded_chunks = kwargs.pop("overwrite_encoded_chunks", None)
--> 541 backend_ds = backend.open_dataset(
    542     filename_or_obj,
    543     drop_variables=drop_variables,
    544     **decoders,
    545     **kwargs,
    546 )
    547 ds = _dataset_from_backend_dataset(
    548     backend_ds,
    549     filename_or_obj,
   (...)
    557     **kwargs,
    558 )
    559 return ds

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/backends/zarr.py:902, in ZarrBackendEntrypoint.open_dataset(self, filename_or_obj, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, use_cftime, decode_timedelta, group, mode, synchronizer, consolidated, chunk_store, storage_options, stacklevel, zarr_version)
    900 store_entrypoint = StoreBackendEntrypoint()
    901 with close_on_error(store):
--> 902     ds = store_entrypoint.open_dataset(
    903         store,
    904         mask_and_scale=mask_and_scale,
    905         decode_times=decode_times,
    906         concat_characters=concat_characters,
    907         decode_coords=decode_coords,
    908         drop_variables=drop_variables,
    909         use_cftime=use_cftime,
    910         decode_timedelta=decode_timedelta,
    911     )
    912 return ds

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/backends/store.py:47, in StoreBackendEntrypoint.open_dataset(self, store, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, use_cftime, decode_timedelta)
     33 encoding = store.get_encoding()
     35 vars, attrs, coord_names = conventions.decode_cf_variables(
     36     vars,
     37     attrs,
   (...)
     44     decode_timedelta=decode_timedelta,
     45 )
---> 47 ds = Dataset(vars, attrs=attrs)
     48 ds = ds.set_coords(coord_names.intersection(vars))
     49 ds.set_close(store.close)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/dataset.py:613, in Dataset.__init__(self, data_vars, coords, attrs)
    610 if isinstance(coords, Dataset):
    611     coords = coords.variables
--> 613 variables, coord_names, dims, indexes, _ = merge_data_and_coords(
    614     data_vars, coords, compat="broadcast_equals"
    615 )
    617 self._attrs = dict(attrs) if attrs is not None else None
    618 self._close = None

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/merge.py:575, in merge_data_and_coords(data_vars, coords, compat, join)
    573 objects = [data_vars, coords]
    574 explicit_coords = coords.keys()
--> 575 return merge_core(
    576     objects,
    577     compat,
    578     join,
    579     explicit_coords=explicit_coords,
    580     indexes=Indexes(indexes, coords),
    581 )

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/merge.py:755, in merge_core(objects, compat, join, combine_attrs, priority_arg, explicit_coords, indexes, fill_value)
    751 coerced = coerce_pandas_values(objects)
    752 aligned = deep_align(
    753     coerced, join=join, copy=False, indexes=indexes, fill_value=fill_value
    754 )
--> 755 collected = collect_variables_and_indexes(aligned, indexes=indexes)
    756 prioritized = _get_priority_vars_and_indexes(aligned, priority_arg, compat=compat)
    757 variables, out_indexes = merge_collected(
    758     collected, prioritized, compat=compat, combine_attrs=combine_attrs
    759 )

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/merge.py:365, in collect_variables_and_indexes(list_of_mappings, indexes)
    362     indexes_.pop(name, None)
    363     append_all(coords_, indexes_)
--> 365 variable = as_variable(variable, name=name)
    366 if name in indexes:
    367     append(name, variable, indexes[name])

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/variable.py:167, in as_variable(obj, name)
    161     if obj.ndim != 1:
    162         raise MissingDimensionsError(
    163             f"{name!r} has more than 1-dimension and the same name as one of its "
    164             f"dimensions {obj.dims!r}. xarray disallows such variables because they "
    165             "conflict with the coordinates used to label dimensions."
    166         )
--> 167     obj = obj.to_index_variable()
    169 return obj

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/variable.py:623, in Variable.to_index_variable(self)
    621 def to_index_variable(self) -> IndexVariable:
    622     """Return this variable as an xarray.IndexVariable"""
--> 623     return IndexVariable(
    624         self._dims, self._data, self._attrs, encoding=self._encoding, fastpath=True
    625     )

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/variable.py:2852, in IndexVariable.__init__(self, dims, data, attrs, encoding, fastpath)
   2850 # Unlike in Variable, always eagerly load values into memory
   2851 if not isinstance(self._data, PandasIndexingAdapter):
-> 2852     self._data = PandasIndexingAdapter(self._data)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/indexing.py:1425, in PandasIndexingAdapter.__init__(self, array, dtype)
   1422 def __init__(self, array: pd.Index, dtype: DTypeLike = None):
   1423     from xarray.core.indexes import safe_cast_to_index
-> 1425     self.array = safe_cast_to_index(array)
   1427     if dtype is None:
   1428         self._dtype = get_valid_numpy_dtype(array)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/indexes.py:183, in safe_cast_to_index(array)
    181     if hasattr(array, "dtype") and array.dtype.kind == "O":
    182         kwargs["dtype"] = object
--> 183     index = pd.Index(np.asarray(array), **kwargs)
    185 return _maybe_cast_to_cftimeindex(index)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/indexing.py:529, in LazilyIndexedArray.__array__(self, dtype)
    527 def __array__(self, dtype=None):
    528     array = as_indexable(self.array)
--> 529     return np.asarray(array[self.key], dtype=None)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/coding/variables.py:72, in _ElementwiseFunctionArray.__array__(self, dtype)
     71 def __array__(self, dtype=None):
---> 72     return self.func(self.array)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/coding/variables.py:144, in _apply_mask(data, encoded_fill_values, decoded_fill_value, dtype)
    137 def _apply_mask(
    138     data: np.ndarray,
    139     encoded_fill_values: list,
    140     decoded_fill_value: Any,
    141     dtype: np.typing.DTypeLike,
    142 ) -> np.ndarray:
    143     """Mask all matching values in a NumPy arrays."""
--> 144     data = np.asarray(data, dtype=dtype)
    145     condition = False
    146     for fv in encoded_fill_values:

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/core/indexing.py:529, in LazilyIndexedArray.__array__(self, dtype)
    527 def __array__(self, dtype=None):
    528     array = as_indexable(self.array)
--> 529     return np.asarray(array[self.key], dtype=None)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/xarray/backends/zarr.py:73, in ZarrArrayWrapper.__getitem__(self, key)
     71 array = self.get_array()
     72 if isinstance(key, indexing.BasicIndexer):
---> 73     return array[key.tuple]
     74 elif isinstance(key, indexing.VectorizedIndexer):
     75     return array.vindex[
     76         indexing._arrayize_vectorized_indexer(key, self.shape).tuple
     77     ]

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:807, in Array.__getitem__(self, selection)
    805     result = self.vindex[selection]
    806 else:
--> 807     result = self.get_basic_selection(pure_selection, fields=fields)
    808 return result

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:933, in Array.get_basic_selection(self, selection, out, fields)
    930     return self._get_basic_selection_zd(selection=selection, out=out,
    931                                         fields=fields)
    932 else:
--> 933     return self._get_basic_selection_nd(selection=selection, out=out,
    934                                         fields=fields)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:976, in Array._get_basic_selection_nd(self, selection, out, fields)
    970 def _get_basic_selection_nd(self, selection, out=None, fields=None):
    971     # implementation of basic selection for array with at least one dimension
    972
    973     # setup indexer
    974     indexer = BasicIndexer(selection, self)
--> 976     return self._get_selection(indexer=indexer, out=out, fields=fields)

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:1272, in Array._get_selection(self, indexer, out, fields)
   1269 else:
   1270     # allow storage to get multiple items at once
   1271     lchunk_coords, lchunk_selection, lout_selection = zip(*indexer)
-> 1272     self._chunk_getitems(lchunk_coords, lchunk_selection, out, lout_selection,
   1273                          drop_axes=indexer.drop_axes, fields=fields)
   1275 if out.shape:
   1276     return out

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:2015, in Array._chunk_getitems(self, lchunk_coords, lchunk_selection, out, lout_selection, drop_axes, fields)
   2013 for ckey, chunk_select, out_select in zip(ckeys, lchunk_selection, lout_selection):
   2014     if ckey in cdatas:
-> 2015         self._process_chunk(
   2016             out,
   2017             cdatas[ckey],
   2018             chunk_select,
   2019             drop_axes,
   2020             out_is_ndarray,
   2021             fields,
   2022             out_select,
   2023             partial_read_decode=partial_read_decode,
   2024         )
   2025     else:
   2026         # check exception type
   2027         if self._fill_value is not None:

File ~/Library/Caches/pypoetry/virtualenvs/weather-2k_D06Fn-py3.9/lib/python3.9/site-packages/zarr/core.py:1888, in Array._process_chunk(self, out, cdata, chunk_selection, drop_axes, out_is_ndarray, fields, out_selection, partial_read_decode)
   1886     self._compressor.decode(cdata, dest)
   1887 else:
-> 1888     chunk = ensure_ndarray_like(cdata).view(self._dtype)
   1889     chunk = chunk.reshape(self._chunks, order=self._order)
   1890     np.copyto(dest, chunk)

ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.

Can you confirm that the original references worked OK with referenceFS?

It is possible that you need the main branch dev version of fastparquet to make this work.

New fastparquet is on pypi and building for conda-forge.

Thanks for the quick replies @martindurant.

New fastparquet is on pypi and building for conda-forge.

We updated to the new release of fastparquet, but still had exception.

Can you confirm that the original references worked OK with referenceFS?

We found it working as expected with referenceFS.
I think I've narrowed down the behaviour we noticed:
While debugging the two different implementations, I noticed that the cdata had 1 additional byte in the failing case.
With DFReferenceFileSystem the offset is an int64 which means it does not hit this condition in fsspec: https://github.com/fsspec/filesystem_spec/blob/4a5b81660f0c1b52d765acaa98781c53f73cbc9b/fsspec/asyn.py#L396-L397

Thus we fetched one byte too many with s3fs, which leads to failures when trying to parse the retrieved bytes. I quickly added some casting to regular int, and it loaded the dataset as expected.

Right, understood - annoying! I wonder how best to fix that without importing numpy within fsspec.

Also, I wonder why this did not happen before!

Perhaps this is enough
--- a/fsspec/implementations/reference.py
+++ b/fsspec/implementations/reference.py
@@ -829,7 +829,7 @@ class DFReferenceFileSystem(AbstractFileSystem):
                     proto_dict[prot][0].append(path)
                     if s is None or s >= 0:
                         proto_dict[prot][1].append(
-                            self.dataframes[pref]["offset"][i] or s
+                            int(self.dataframes[pref]["offset"][i]) or s
                         )
                     else:
                         # range is from end of file, which we do not know
@@ -839,8 +839,8 @@ class DFReferenceFileSystem(AbstractFileSystem):

                     if e is None or e >= 0:
                         proto_dict[prot][2].append(
-                            self.dataframes[pref]["offset"][i]
-                            + self.dataframes[pref]["size"][i]
+                            int(self.dataframes[pref]["offset"][i])
+                            + int(self.dataframes[pref]["size"][i])

That would work for my case, but wondering if perhaps it is a better alternative to make changes in fsspec? (without introducing numpy)
Numpy integers are numbers.Integral, at least in current versions. Docs for numbers module.
Here is output from some quick and dirty verification:
>>> from numbers import Integral
>>> import numpy as np
>>> isinstance(3, Integral)
True
>>> isinstance(np.int8(1), Integral)
True
>>> isinstance(np.int16(1), Integral)
True
>>> isinstance(np.int32(1), Integral)
True
>>> isinstance(np.int64(1), Integral)
True

Should the isinstance line in fsspec instead check for numbers.Integral?

Yes, that would be reasonable


Crashed Android App

When you click on close button  in google pay bottom sheet the app destroyed
https://user-images.githubusercontent.com/27555246/195558357-e7120161-c16d-4fa3-9b10-661a2afc323e.mov

How did you change button style? For example, by default google pay button is oval. But I want to change border-radius.

How did you change button style? For example, by default google pay button is oval. But I want to change border-radius.

Default style

What I need

you can use PayClinet class and make your custom btn

Hi @osamamohammed98, I'm not able to reproduce the issue. What version of pay are you using? Can you share more details about your integration?

@v-pavlovskyi @osamamohammed98, make sure to follow the brand guidelines for the Google Pay button.
Note that this is instrumental in approving your integration for production access.

Hi @osamamohammed98, I'm not able to reproduce the issue. What version of pay are you using? Can you share more details about your integration?

pay: ^1.0.10

I remove it from my app at this time and i will do it in features


map gen interference 2

Terrain generation has been fixed, but subsurface has now decided to disable all uranium upon world load phase, no uranium on nauvis or the subsurface level, seems to be turning off uranium all together

Just started a new world and it generated uranium in subsurface

Well that's the issue, it's disabling uranium generation on the main nauvis surface, and some of my other mods only work with uranium on the main surface to be functional

Well that's the issue, it's disabling uranium generation on the main nauvis surface, and some of my other mods only work with uranium on the main surface to be functional

Which mods? Do they prevent surface drilling?
That was my intention to move uranium into underground, to delay and make nuclear power more challenging.

It's a mod that adds water ore for some of my cargo ships made it so uranium needs to be mined off land, and every time I want subsurface running at the same time it just straight up deletes em from the water, maybe add an option to have uranium only generate on the subsurface or to have it generate in smaller quantities on both?

yeah I'm gonna add settings for that


Add 'regularize' helper function to all relevant tools, and document (was: HRGT sorting has some unwanted side-effects)

The tev2-glossaries-demo has a set of tabs that show different ways in which a glossary can be created. The tab "Latest eSSIF-Lab glossary" (at the right) has the MRGref {% hrg="essif-lab:latest" converter="markdown-section-3" sorter="{{glossaryText}}" %}, which means that the resulting glossary should be ordered according to the glossaryText of its entries. The screenshot below shows that this is not the case:

The reason for this would be that the first two entries start with a termref, i.e., with the [-character. I'm wondering if/what we should do about this.

Perhaps we can fix this by having a helper function regularize, that regularizes its argument. Regularizing glossaryText would certainly do the trick. Also, I think that having such a helper function may prove to be useful at some point in other contexts.

@Ca5e mentions that having the NoRefs helper function would be what you would really want, and this is true. However, it would require the NoRefs function to know what the TermRef interpreter would be, and then things become difficult.
Decision:

the regularize function will be added.

I've added all of the helper functions to the converter profile. @RieksJ please take a look.

Good start. @Ca5e, could you:

[ ] check the example I gave converter profile. Can you pay attention to the int section and see how that is? I was wondering there whether that would be the interpreter as specified (which could be a predefined one) or the actual regex. Does this section allow for one field that has the interpreter 'as specified' (predefined, or regex_ and another one 'as used' (regex only)?
[ ] the int section needs better explanation. I cannot unambiguously learn whether int.type is the only field in that section, or what that int.type field actually contains.
[ ] The err.file needs better explanation. Is it a path? just a filename? ...? Does this need some rethinking, e.g., taking into account what one might need to construct an error message that can help readers to find out where and what went wrong?
[ ] Can we add a remedy field to the err section (as an array of strings)? The idea is that if a tool may be able to provide a set of (possible/likely/...) remedies that the err-converter might turn into a usefule message. We could do that even if tools (currently) do not yet provide such remedies; it would to serve tool-creators as a reminder to think harder to make life of the tool-users easier...
[ ] Pls. review the noRefs helper section as I changed it. Here are some questions I had:

the 'type' argument, would that be any of the predefined termref interpreters, or a regex? If so, that should be stated here, and we can simply refer to them them with the termref [xxxx](trrt#predefined-interpreters@).
One example you give starts and terminates with /. That is not how regexes are typically passed as an argument within TEv2. The use of that (if it isn't a mistake) should be clarified.
I'm not sure what multiple types do. Are they processed in sequence (so all termrefs of the identified types get removed), or have I missed something, or ...?

Since the code was updated, and I myself did documentation updates, I am satisfied to close this issue. If any documentation/code discrepancies exist, they should be addressed in a new issue (that also goes for the request for a 'remedy' feature)


Add a pescetarian meals option

Link to feature: https://tmrow.productboard.com/feature-board/planning/features/3455922

Data to be found here: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4372775/


always iterate cnodes after index of generic foreign key

The generic foreign key index added in pull/98 means that iterating of cnodes is fast, so let's just revert to the original behaviour of doing that. This makes the code a bit more future proof in case we start linking multiple component nodes to a component for types other than RPM.

LGTM


[Feature] Check if Wi-Fi is enabled on MainActivity start, show dialog if disabled

Won't implement


Clear selection when scrolling horizontally in less

When running less -S <FILE> in a window which isn't wide enough to show the full content of the file, it is possible to scroll left/right in less. Having a selection active in this scenario will lead to the selection staying in place while the content under it moves.
I've tested this in XTerm, URxvt and Termite and all these terminal emulators remove the selection when scrolling horizontally. So instead of keeping the selection in place, Alacritty should follow their example.
Note that the selection isn't always removed when left/right is pressed in the alternate screen buffer. The selection should only be removed when the content actually moves horizontally.

since the left-right scrolling is handled by less, i imagine we'll have to detect when the content under the selection changes. i'm happy to take a crack at it but i could use some guidance. would i need to add some kind of reaction when display content updates?

less actually sends an escape sequence to clear the screen. When this is invoked, the selection should be cleared too (it currently is not).
There's no need to listen for changes and that would likely be pretty bad for performance anyways.

Fixed in #2090.


Find a way to reduce build time or build acceptable system

Update create-rino-template as well
Few ways that is possible:

Waiting properly
Like setting up loading screen and reload the web page after build is done.

In case of assets, only update changed assets.

Create pages and components data store
This data store is for reducing build time for any changes.
pages - components being used
components - pages that has the component
However this is not really effective as rino always build from root.
Or build relationship trees using bgraph so it can track page and reduce webpage building time

Done in v2.0.0


Add operator account balance as metric

Signed-off-by: svetlio<EMAIL_ADDRESS>Detailed Description:
Add operator account balance as metric in Prometheus/Grafana
Which issue(s) this PR fixes:
Issue #360
Checklist

[x] Documentation added
[x] Tests updated

Done in https://github.com/LimeChain/hashport-validator/pull/369


cannot find -lOpenCL

Forgive me if Windows installs aren't supported, but I'm running into the following issue when trying to build on Windows 10 with mingw64 and an nvidia gpu.
$ go get github.com/robvanmieghem/gominer
# github.com/robvanmieghem/go-opencl/cl
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status

I'll keep trying to get this working, but thought I'd post in case you know the solution off hand.

It means that the linker can not find the OpenCL library. You have to set the library path properly for the linker to find it.
For example, in powershell, on a system with the intel sdk installed, you can execute the following command before executing go get or go build:
PS>  $env:LIBRARY_PATH = "C:\Program Files (x86)\Intel\OpenCL SDK\lib\x64"


Open default editor for added files instead of diff editor

When opening a file for review from the pull requests view, it always opens in the diff editor, which is perfectly fine for files with changes, but rather inconvenient for files which have been newly added in the PR for a few reasons:

When having the diff editor set to "split mode", one half of the screen (editor) is always empty without any kind of gain.
I usually use the "split mode", so I'd always have to toggle between split & inline mode when going from a newly added file to a changed file and vice versa to "work around this".
Split & inline mode: All lines are highlighted as "newly added" (some background color which covers the whole editor area in my current color theme) which I conceive as unnecessarily distracting and which makes it harder for me to concentrate on the code at hand.

ATM, I'm not opening added files from the pull requests view anymore but open them in the normal editor using VS Codes file search etc.
Whilst this basically works since I can comment and see existing comments there as well it has the downside that I have to switch between 2 "usage modes" (open from pull requests view & using "VSCode built ins") which is a minor but nonetheless additional mental burden and distraction from the review task at hand.
Feature request
Either always open the normal editor instead of the diff editor when reviewing newly added files or add some setting to make this behavior configurable.

There's already an action in the tree to open the file and not the diff:

Is this enough, or do you still think we should have a way to always open added files as files, not as diffs?

@alexr00 Thanks for pointing that out, I completely missed this until now 🙈
Whilst this does help & makes things noticable easier, I'd still love to see the default behavior changed or have an option for it as explained in my initial post simply because I don't see no gain in opening the diff editor in those situations but only drawbacks.

@alexr00 Thank you very much for implementing this 🎉!
The explicit "Open file" button turned out to be a very good alternative but it doesn't really make it into my "muscle memory" which is why I oftentimes still open the diff view first, close it & then use this button.
Off topic:
I really like the way you're handling issues reported here in general. Always fast feedback, always helpful, always looking for meaningful solutions, always very friendly 👌🙏

To verify:

Install the pre-release version of GitHub Pull Requests and Issues
Find a PR that has an added file
Click on the tree node for the added file. Verify that a diff isn't opened and instead the file is just opened.

@CombeeMike thanks for verifying!


misc: Add dependencies to requirements.txt. Fix missing dependency. Fix missing args errors

Thanks ltfschoen. Really appreciate your work!
Currently I am having an issue with parallel progress bars.  They are getting shifted up when download is complete. Let me know do you have same issues?
PS: I am using a bit different version of tqdm to resolve that, thats why tqdm was not included in "install_requires" section of setup.py. So, no requirements.txt is required at all once this issue is resolved.

I am currently using this patch: https://github.com/nikhilkumarsingh/tqdm

@nikhilkumarsingh I installed your Patch with pip install git+https://github.com/nikhilkumarsingh/tqdm of tqdm 4.11.2 and when I run it with python ctdl/ctdl.py -g mov -p "cat" it just shows a common progress bar in yellow for all the file downloads and then prints "Download complete" on a new line when finished:
i.e.
Downloading 10 mov files on topic cat and saving to directory: cat

Overall: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:05<00:00,  1.52it/s]
Download complete.

Whereas if I install tqdm from its main repo by first uninstalling yours pip uninstall tqdm and installing theirs with pip install tqdm, and uninstalling and reinstalling all dependencies (i.e. requests, html5lib, bs4, setuptools, webencodings, six, beautifulsoup4, appdirs, pyparsing) then when I run python ctdl/ctdl.py -g mov -p "cat" the same thing it shows a new Overall new after a while instead of being on the same line, as shown below.
Overall:  40%|█████████████████████████████▌                                            | 4/10 [00:01<00:02,  2.61it/s]

Overall: 100%|█████████████████████████████████████████████████████████████████████████| 10/10 [00:03<00:00,  1.75it/s]     Download complete.

In Bash in both cases the Blue coloured text (i.e. 700-cats.mov%3Fid%3DBl1hrvKWFB8: 0KB [00:00, ?KB/s], KPOW%2521-Fortress-Mountain-Cat-Skiing.mov%3Fid%3DBCXTPM_vqno: 0KB [00:00, ?KB/s], etc) only appears jitterly lower down in the terminal window. I don't know what causes this.
Shouldn't these lines be appearing between Overall ... and Download complete.?
If I run it in IntelliJ Ultimate debugger it shows everything as its printed as shown below, with an extra new line being added each time (possible fro Line 199 and Line 1079 in _tqdm.py):
Downloading 10 mov files on topic cat and saving to directory: cat

Overall:   0%|          | 0/10 [00:00<?, ?it/s]

700-cats.mov%3Fid%3DBl1hrvKWFB8: 0KB [00:00, ?KB/s]

Overall:  10%|█         | 1/10 [04:05<36:48, 245.35s/it]

KPOW%2521-Fortress-Mountain-Cat-Skiing.mov%3Fid%3DBCXTPM_vqno: 0KB [00:00, ?KB/s]

Overall:  20%|██        | 2/10 [16:57<53:47, 403.41s/it]

col.streaming.3-12-12.mov%3Fcat%3DSpecial:   0%|          | 0/39.41015625 [00:00<?, ?KB/s]


Testers needed for VisualStudio extension RestEaseClientGenerator

Hi all,
I've created an Visual Studio extension which can generate a RestEase compatible interface + models from a swagger OpenApi specification file (.json, .yml or .yaml)

For the extension, see this link.
For the github project, see this link.
You can also try it online via Blazor WebAssembly demo

I somebody has time, please test and provide feedback or issues on my github project.
Best regards,
Stef

I will definately give it a try in about two weeks
Op wo 25 dec. 2019 12:47 schreef Stef Heyenrath<EMAIL_ADDRESS>
Hi all,
I've created an Visual Studio extension which can generate a RestEase
compatible interface + models from a swagger OpenApi specification file
(.json, .yml or .yaml)

For the extension, see this link
https://marketplace.visualstudio.com/items?itemName=StefHeyenrath.RestEaseClientGenerator
.
For the github project, see this link
https://github.com/StefH/RestEase-Client-Generator.

I somebody has time, please test and provide feedback or issues on my
github project.
Best regards,
Stef
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/canton7/RestEase/issues/143?email_source=notifications&email_token=ABOKPSYDCDWTZEML7T3F73LQ2NB4ZA5CNFSM4J7EQCNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICTI3AA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABOKPSYCAAUNVVTCHKXYYALQ2NB4ZANCNFSM4J7EQCNA
.

Nice one!
It'd be nice to see a small example input/output in the README.

@canton7 I've updated the readme

1.0.8 (29 February 2020)

#20 - Add RAML + update Enum support contributed by StefH

1.0.7 (22 January 2020)

#19 - DefineSharedMethodQueryParametersOnInterface [enhancement] contributed by StefH

You can also try it online via Blazor WebAssembly demo

Closing, as I'm tidying up the issue list and a year's publicity isn't bad 😄

That said, I think I'd like to put a section in the README on third-party tools, and include this.

Sounds like plan !
;-)

This is still open, so my feedback is that it failed spectacularly:
$ dotnet resteaseclientgenerator -f .\tonic_api.json --DestinationFolder '.' -n tonic_client -a TonicApiClient
info: RestEaseClientGenerator[0] Starting
fail: RestEaseClientGenerator[0] OpenApiDiagnostic Errors: ,

The .json is available here: https://app.tonic.ai/swagger/v2023.07.0/swagger.json


会話履歴にローディングを追加

Issue #, if available:
https://github.com/aws-samples/bedrock-claude-chat/issues/17
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@statefb
ISSUE　対応しました！


ERROR: Command Dispatched Async: pex user Gamer group set player_r1

https://www.spigotmc.org/threads/plugins-triggering-commands-async.31815/
PaperSpigot

Duplicate of #353


ValueError: Input contains NaN.

I encountered this error when I was adding text. Hope to get a solution to deal with this error.Thank you very much.
Traceback (most recent call last):
File "/home/jyc23/raptor-master/demo/newdemo.py", line 123, in
RA.add_documents(text)
File "/home/jyc23/raptor-master/raptor/RetrievalAugmentation.py", line 217, in add_documents
self.tree = self.tree_builder.build_from_text(text=docs)
File "/home/jyc23/raptor-master/raptor/tree_builder.py", line 280, in build_from_text
root_nodes = self.construct_tree(all_nodes, all_nodes, layer_to_nodes)
File "/home/jyc23/raptor-master/raptor/cluster_tree_builder.py", line 102, in construct_tree
clusters = self.clustering_algorithm.perform_clustering(
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 194, in perform_clustering
clusters = perform_clustering(
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 120, in perform_clustering
reduced_embeddings_global = global_cluster_embeddings(embeddings, dim)
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 32, in global_cluster_embeddings
reduced_embeddings = umap.UMAP(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/umap/umap_.py", line 2887, in fit_transform
self.fit(X, y, force_all_finite)
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/umap/umap_.py", line 2354, in fit
X = check_array(X, dtype=np.float32, accept_sparse="csr", order="C", force_all_finite=force_all_finite)
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 957, in check_array
_assert_all_finite(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 122, in _assert_all_finite
_assert_all_finite_element_wise(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 171, in _assert_all_finite_element_wise
raise ValueError(msg_err)
ValueError: Input contains NaN.

Hey! Can you provide some more details about the text you are adding? How many tokens is it?

Hey! Can you provide some more details about the text you are adding? How many tokens is it?

I have encountered this problem several times. The document read is sample.txt in the demo. The LLM currently used is Qwen/Qwen-1_8B-Chat-Int4, and the embedding model is BAAI/bge-small-zh-v1.5. This bug also occurred when using the demo's default embedding model multi-qa-mpnet-base-cos-v1, and the error is still reported in this place.

Reproducing example :
import os

import torch
from raptor import BaseSummarizationModel, BaseQAModel, BaseEmbeddingModel, RetrievalAugmentationConfig
from transformers import AutoTokenizer, pipeline

from huggingface_hub import login
login()
class GEMMASummarizationModel(BaseSummarizationModel):
    def __init__(self, model_name="google/gemma-2b-it"):
        # Initialize the tokenizer and the pipeline for the GEMMA model
        self.tokenizer = AutoTokenizer.from_pretrained(model_name)
        self.summarization_pipeline = pipeline(
            "text-generation",
            model=model_name,
            model_kwargs={"torch_dtype": torch.bfloat16},
            device=torch.device('cuda' if torch.cuda.is_available() else 'cpu'),  # Use "cpu" if CUDA is not available
        )

    def summarize(self, context, max_tokens=150):
        # Format the prompt for summarization
        messages=[
            {"role": "user", "content": f"Write a summary of the following, including as many key details as possible: {context}:"}
        ]

        prompt = self.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

        # Generate the summary using the pipeline
        outputs = self.summarization_pipeline(
            prompt,
            max_new_tokens=max_tokens,
            do_sample=True,
            temperature=0.7,
            top_k=50,
            top_p=0.95
        )

        # Extracting and returning the generated summary
        summary = outputs[0]["generated_text"].strip()
        return summary

class GEMMAQAModel(BaseQAModel):
    def __init__(self, model_name= "google/gemma-2b-it"):
        # Initialize the tokenizer and the pipeline for the model
        self.tokenizer = AutoTokenizer.from_pretrained(model_name)
        self.qa_pipeline = pipeline(
            "text-generation",
            model=model_name,
            model_kwargs={"torch_dtype": torch.bfloat16},
            device=torch.device('cuda' if torch.cuda.is_available() else 'cpu'),
        )

    def answer_question(self, context, question):
        # Apply the chat template for the context and question
        messages=[
              {"role": "user", "content": f"Given Context: {context} Give the best full answer amongst the option to question {question}"}
        ]
        prompt = self.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

        # Generate the answer using the pipeline
        outputs = self.qa_pipeline(
            prompt,
            max_new_tokens=256,
            do_sample=True,
            temperature=0.7,
            top_k=50,
            top_p=0.95
        )

        # Extracting and returning the generated answer
        answer = outputs[0]["generated_text"][len(prompt):]
        return answer

from sentence_transformers import SentenceTransformer
class SBertEmbeddingModel(BaseEmbeddingModel):
    def __init__(self, model_name="sentence-transformers/multi-qa-mpnet-base-cos-v1"):
        self.model = SentenceTransformer(model_name)

    def create_embedding(self, text):
        return self.model.encode(text)

os.environ["OPENAI_API_KEY"] = "your-openai-api-key"

from raptor import RetrievalAugmentation, RetrievalAugmentationConfig

RAC = RetrievalAugmentationConfig(summarization_model=GEMMASummarizationModel(), qa_model=GEMMAQAModel(), embedding_model=SBertEmbeddingModel())
RA = RetrievalAugmentation(config=RAC)

with open('harry.txt', 'r', encoding="utf8") as file:
    text = file.read()
RA.add_documents(text)

SAVE_PATH = "demo/cinderella"
RA.save(SAVE_PATH)

#extract text from harry-potter-3-le-prisonnier-dazkaban.pdf

txt data linked in this message
harry.txt

Didn’t retry

I had a similar issue and when I ran pip install -U sentence-transformers it worked fine

it seems that the error is casued by using multiprocess when generating embeddings. set multiprocess=False and it worked fine

I had a similar issue and when I ran pip install -U sentence-transformers it worked fine

Installing sentence-transformers==2.2.2 as specified in requirements.txt gave me this issue. I solved it by upgrading to sentence-transformers==3.0.1.


Flutter GraphQL support?

Hello dev, is this package already support for flutter_graphql ?
Thank you

Not yet @santomalau03

Thank you dev, is it any chance this package will support to flutter_graphql in the future?

Yes it will be Insha Allah.
By the way, it would be great if you can contribute to add graph ql support in your free time🙂


Catch up specification changes.

Accept Event API changed.
Accept Event for Box API deleted.

Released v1.4.8.


missing mongoose

I been trying to get the latest docker image to work.. it's failing with the following error (stack trace)
npm install strapi-hook-strapi-mongoose
strapi_1  | [2018-08-10T11:00:37.463Z] warn (hook:strapi-mongoose) strapi-hook-strapi-mongoose is missing in your dependencies. Please run npm install strapi-hook-strapi-mongoose
strapi_1  | error TypeError: strapi.models.core_store.forge is not a function
strapi_1  |     at Object.get (/usr/local/lib/node_modules/strapi/lib/core/store.js:55:47)
strapi_1  |     at module.exports (/usr/src/api/strapi-app/plugins/content-manager/config/functions/bootstrap.js:156:42)
strapi_1  |     at Promise (/usr/local/lib/node_modules/strapi/lib/Strapi.js:285:13)
strapi_1  |     at new Promise ()
strapi_1  |     at execBootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:273:11)
strapi_1  |     at Promise.all.Object.values.map.x (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:44)
strapi_1  |     at Array.map ()
strapi_1  |     at Strapi.bootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:35)
strapi_1  |     at Strapi.start (/usr/local/lib/node_modules/strapi/lib/Strapi.js:107:18)
strapi_1  |     at
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
strapi_1  |     at Object.get (/usr/local/lib/node_modules/strapi/lib/core/store.js:55:47)
strapi_1  |     at module.exports (/usr/src/api/strapi-app/plugins/settings-manager/config/functions/bootstrap.js:17:26)
strapi_1  |     at Promise (/usr/local/lib/node_modules/strapi/lib/Strapi.js:285:13)
strapi_1  |     at new Promise ()
strapi_1  |     at execBootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:273:11)
strapi_1  |     at Promise.all.Object.values.map.x (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:44)
strapi_1  |     at Array.map ()
strapi_1  |     at Strapi.bootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:35)
strapi_1  |     at Strapi.start (/usr/local/lib/node_modules/strapi/lib/Strapi.js:107:18)
strapi_1  |     at
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh
ich was not handled with .catch(). (rejection id: 7)
strapi_1  | (node:18) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero ex
it code.
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
strapi_1  |     at Object.get (/usr/local/lib/node_modules/strapi/lib/core/store.js:55:47)
strapi_1  |     at module.exports (/usr/src/api/strapi-app/plugins/users-permissions/config/functions/bootstrap.js:77:45)
strapi_1  |     at Promise (/usr/local/lib/node_modules/strapi/lib/Strapi.js:285:13)
strapi_1  |     at new Promise ()
strapi_1  |     at execBootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:273:11)
strapi_1  |     at Promise.all.Object.values.map.x (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:44)
strapi_1  |     at Array.map ()
strapi_1  |     at Strapi.bootstrap (/usr/local/lib/node_modules/strapi/lib/Strapi.js:312:35)
strapi_1  |     at Strapi.start (/usr/local/lib/node_modules/strapi/lib/Strapi.js:107:18)
strapi_1  |     at
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh
ich was not handled with .catch(). (rejection id: 8)
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
strapi_1  |     at fs.readdir (/usr/src/api/strapi-app/plugins/email/config/functions/bootstrap.js:53:40)
strapi_1  |     at
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh
ich was not handled with .catch(). (rejection id: 11)
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
strapi_1  |     at fs.readdir (/usr/src/api/strapi-app/plugins/upload/config/functions/bootstrap.js:55:40)
strapi_1  |     at
strapi_1  |     at process._tickCallback (internal/process/next_tick.js:182:7)
strapi_1  | (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh
ich was not handled with .catch(). (rejection id: 14)

same problem here... i just recreated the container with the newest strapi image

Hello, @lauriejim is it something related to the core?

@lucaperret I think it need an update somewhere since we move strapi-mongoose to strapi-hook-mongoose.
I think a dependencies has not been changed.

I am closing this issue because we don’t have any updated/needed information regarding it.
Will reopen it if activity come back.

any solution?


Consider exposing matchRoute helper function

I wanted to ask if you would consider exposing the matchRoute helper function that is internally used by useRoute and Switch.
I'm trying to create a custom hook which receives a list of routes in order to check which one matches, but this list of routes is dynamic, so it's not possible to call useRoute a bunch of times, since it needs to loop over the list of routes.
However, if matchRoute was exported by this package, it would allow userland programmatic logic like this:
import { matchRoute, useLocation, useRouter } from 'wouter-preact';

function useMatchingRoute(candidates: string[]): [string, Record] | undefined {
  const { parser } = useRouter();
  const [location] = useLocation();

  return useMemo(() => {
    for (const route of candidates) {
      const [matches, params] = matchRoute(parser, route, location);
      if (matches) {
        return [route, params];
      }
    }

    return undefined;
  }, [location, parser, candidates]);
}

I can provide a PR if you are ok with this.

I wanted to ask if you would consider exposing the matchRoute helper function that is internally used by useRoute and Switch.
I'm trying to create a custom hook which receives a list of routes in order to check which one matches, but this list of routes is dynamic, so it's not possible to call useRoute a bunch of times, since it needs to loop over the list of routes.
However, if matchRoute was exported by this package, it would allow userland programmatic logic like this:
import { matchRoute, useLocation, useRouter } from 'wouter-preact';

function useMatchingRoute(candidates: string[]): [string, Record] | undefined {
  const { parser } = useRouter();
  const [location] = useLocation();

  return useMemo(() => {
    for (const route of candidates) {
      const [matches, params] = matchRoute(parser, route, location);
      if (matches) {
        return [route, params];
      }
    }

    return undefined;
  }, [location, parser, candidates]);
}

I can provide a PR if you are ok with this.

Hey @acelaya, thank you for suggesting this. I think it makes a lot of sense, so feel free to open a pull request.

Hey @acelaya, thank you for suggesting this. I think it makes a lot of sense, so feel free to open a pull request.

Just created it https://github.com/molefrog/wouter/pull/456

Just published the new version.


Tween Question

Could someone shed some light on how to use tween to move entities around? I used a tween plugin in a previous impact game I did and it worked well, but after seeing impact++, I was very excited about using it. At this point, I am really lost in the depths and trying to figure everything out. A tween seems like it should be a simple thing, but I can't get it to work for moving position at all. Other properties work fine, and I can even modify custom properties, so I am under the assuming it has something to do with the movement physics.
What restrictions are there on tween for moving things around? The end goal is to have some text bounce down with the title. Thanks.

Hi @breitenbach128,
to be honest the whole tween thing in ++ is not very well explained and I don't used it a lot until now. Also there are no examples which I am aware of. But @collinhover knows about that issue and commented on this topic a while ago. You can see his answer here:
https://github.com/collinhover/impactplusplus/issues/174
Basically ++ uses the TWEEN.JS library ( https://github.com/sole/tween.js/ ) and there are some built in tweening functions available as @collinhover mentioned it in the issue I posted above.
I hope you will figure things out with the JSDoc comments of that functions, and maybe with some information from the TWEEN.JS documentation.

Here is some basic idea of what I am running into. Everything seems to flow ok with the alpha fades, but with position changes, it is like it does not get the x/y subproperties of pos. I get a NaN error.
        this.TitleImage = ig.game.spawnEntity(EntityEyecandy, 100, 220, {
            size: { x: 16, y: 32 },
            animSheet: new ig.AnimationSheet('media/min_scienctist.png', 16, 32),
            zIndex: 100,
            tileSeries: [0]
        });

        this.TitleImage.tween({
            pos: { x: 100, y:100 }
            //alpha: .01
            }, {
            name: "TestTween",
            duration: 500,
            noComplete: false,
            stopped: false,
            onComplete: function () {
                //console.log("move completed " + JSON.stringify(this.TitleImage.pos))
                console.log("move completed ");
            },
        });

Some console logging output:
Property in Tween Array: pos
tweens.js:356 Updating Tween Start:pos : 0.6272159999934956 delta NaN : ObjProp : NaN

Alright, looking at everything is as much as I can understand and doing a ton of log output, It definitely seems like it does not do any recursive breakdown of property objects passed to it. It goes NULL when it try to convert it to a number because the object Pos is being passed. I don't see a spot for it to then open up the object and pass first the X and then the Y. I am looking at another tween.js plugin to see if I can come up with something to make it work. I am still really amateur as far as programming goes, so I will do the best I can, but I might need help.


YouTube Auto-Liker [Feature]

This feature should automatically likes YouTube videos when they reach a specified watch threshold. My previous auto-liker userscript broke, and the creator isn't updating it anymore.

So it managed to trigger once, which is a good sign, but the timing was off and I couldn't get it to work again.

I also noticed the automatic quality selector became wonky but i'm not sure if that's related to the auto-liker.

I tested and I can't get it to trigger the like button.
I used to use this script https://greasyfork.org/en/scripts/33865-youtube-auto-liker, but it no longer works.
I think yours could be improved by checking the watchtime in intervals and stopping when the video is liked.
This is just an idea, let me know what you think...
`let observer, mutationCount = 0;
const doSomething = () => {
// Impliment Auto-Liker and observer.disconnect(); when triggered
// Impliment eventlistener for when the user manually likes the video, or somehow check if the video is alrady liked.
};
const handleMutation = mutations => {
if (/* put condition here */) doSomething();
else observer.disconnect();
};
const startObserver = () => {
observer = new MutationObserver(handleMutation);
observer.observe(document.body, {
childList: true,
subtree: true
});
};
const resumeMutation = () => {
mutationCount = 0;
if (window.location.href.includes('watch')) startObserver();
};
document.addEventListener('yt-navigate-start', resumeMutation);`


IE11 not picking up class when using SSR

Environment
System:

OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 9.84 GB / 32.00 GB
Shell: 5.7.1 - /usr/local/bin/zsh

Binaries:

Node: 12.9.0 - ~/.nvm/versions/node/v12.9.0/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v12.9.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman

npmPackages:

styled-components: ^5.0.0-beta.8 => 5.0.0-beta.8-groupsizefix

Steps to reproduce
Sadly I'm not able to properly reproduce this issue outside of our application.
Expected Behavior
Rendered styles should be rendered by IE11.
Actual Behavior
Using SSR, the class/rule definition is correctly rendered to the client and appended into the DOM. But IE11 doesn't seem to be able to pick up the styles in certain cases, I got an element with class="r5r22j-0 lkVjVW" but the style panel shows no styles being applied to the element.
The corresponding generated style rules are:
.lkVjVW{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;position:relative;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-transition-property:-webkit-transform;-webkit-transition-property:transform;transition-property:transform;width:562.7484662576687px;}

I don't see anything going wrong but the result is nonetheless an element without styles 🤔. It works perfectly fine in other browsers and once I force a rerender by toggling the element it seems to be working (I assume styled-components generate a new style rule and injects new styles into the DOM).

As a workaround I got it fixed by using a forced rerender and setting a class on the styled component:
class MyComponent extends React.Component {
  state = { forceRerender: false };
  componentDidMount() {
    this.setState({ forceRerender: true });
  }
  render() {
    return <MyStyledComponent className={`forced-rerender-{this.state.forceRerender}`} />;
  }
}

Not very happy with this, but at least a way to move forward.

@topaxi can you try beta 11? We had a bug that likely caused this.

The mentioned issue/code was not in beta-8 yet. But I can definitely try it out at some point.


WGSL Compute Shaders support

Use case
Push expensive math operations on GPU, enrich the newly added shader feature in Flutter 3.3.0
Proposal
Implement WGSL specs https://www.w3.org/TR/WGSL/

/cc @chinmaygarde


Add verbose VFS logging

Fixes #14185
This adds -Dorg.gradle.vfs.verbose=true to enable some logging like:
$ gradle assemble --watch-fs -Dorg.gradle.vfs.verbose=true
Virtual file system retained information about 36 files, 17 directories and 4 missing files since last build
Received 14 file system events since last build

BUILD SUCCESSFUL in 589ms
5 actionable tasks: 5 up-to-date
Virtual file system retains information about 36 files, 17 directories and 4 missing files until next build
Received 7 file system events during the current build

@bot-gradle test QFL please

OK, I've already triggered QuickFeedbackLinux build for you.

@bot-gradle test this please.

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test this please.

OK, I've already triggered ReadyForMerge build for you.

@wolfs PTAL post merge.


Add warnings in comments

The following scenario's should have HUGE warnings implemented as comments:

[ x] Updating the privacy policy should be communicated to members by email.
[x ] Updating the GDPR document should be communicated to members by email.
(additional warnings can be added based on codebase analysis)

Not very hard, but we do need to formulate the comments properly, and make sure everyone that reads them understands that they need to update documents if they change something.
Codebase analysis might be better for a separate ticket after we implement the basics of GDPR.

This seems to be ready. Shall we close this and modify the progress on the primary Open Source ticket (#1).

Fixed in Inter-Actief/amelie-private#371


Deploy to IBM Cloud not working

Hi, I am not able to deploy the app in IBM Cloud here is the log
watson-discovery-ui-20180613140428118-log.txt

@sebacea can you run the cf logs watson-discovery-ui-20180613140428118 --recent command? Or go into the ibm cloud console and check the application logs, not the deployment logs.
i'm not seeing anything app specific in that log. I see a few warnings about the watson node library, but
Stopping instance 21b082ac-ee72-4b65-9242-611b8c5f69ca
Successfully destroyed container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

TIP: use 'cf logs watson-discovery-ui-20180613140428118 --recent' for more information

Finished: FAILED

doesn't help much -- i hate to ask to restart it and try again, but can you do that?

Hie Steve, I deleted the cloud foundry app and re-deploy it using the button in th github repository. The error changed (attached below) but after a second deployment of the same app it works!
Preparing to start the job...
Logging into Bluemix as user<EMAIL_ADDRESS>Preparing the build artifacts...
Target: https://api.ng.bluemix.net
Creating service instance wdui-discovery-service in org<EMAIL_ADDRESS>/ space dev as<EMAIL_ADDRESS>OK
Create in progress. Use 'cf services' or 'cf service wdui-discovery-service' to check operation status.
Using manifest file /home/pipeline/5593a8e0-4d37-489f-8124-43f55975b205/manifest.yml
Creating app watson-discovery-ui-20180613234207493 in org<EMAIL_ADDRESS>/ space dev as<EMAIL_ADDRESS>OK
Creating route watson-discovery-ui-20180613234207493-precipitative-superabominableness.mybluemix.net...
OK
FAILED
Server error, status code: 400, error code: 210001, message: The route is invalid: host must be no more than 63 characters
Finished: FAILED

We need to change manifest.yml so that:
random-route: false


add linux dep?

https://github.com/twosigma/beaker-notebook/commit/cd664b34ccd3bc19e365d4c1f7150694af02967c
should be added to install-linux-dependencies.sh?

this was done


git: Remove usage of git symbolic-ref.

Changes
Not 100% sure why we were doing this before, but as of
https://github.com/git/git/commit/9081a421a6dbeeda637df8edb0ebf0da11a05b69
this is causing Git to return this error when trying to call git checkout -f FETCH_HEAD:
BUG: builtin/checkout.c:1102: should be able to skip past 'refs/heads/' in 'refs/remotes/origin/HEAD'!

IIUC, the symbolic-ref command isn't necessary so we can safely remove
it. Local HEAD will be set on the final git checkout call.
New command flow:
[git init /tmp/git-init-3587814010]
[git remote add origin /tmp/git-init-3399927535]
[git config http.sslVerify false]
[git fetch origin --force ]
[git show -q --pretty=format:%H FETCH_HEAD]
[git checkout -f FETCH_HEAD]

/kind bug
Fixes #4463

Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[x] Docs included if any changes are user facing
[x] Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including
functionality, content, code)
[x] Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

NONE

/assign @vinamra28 - Would like your review here, since this is undoing changes made in https://github.com/tektoncd/pipeline/commit/9aff0a076f70c7bf32a6e275762e6097f8f3cb2d and want to double check that I'm not undoing important behavior.

/test pull-tekton-pipeline-integration-tests

/assign @vinamra28 - Would like your review here, since this is undoing changes made in 9aff0a0 and want to double check that I'm not undoing important behavior.

@wlynch, thanks for doing this. At the time of adding the commit 9aff0a0, there were some failures on openshift based clusters but now I guess it is resolved.
/lgtm

Nice, cheers @wlynch !
/lgtm

/cc @chmouel

/lgtm
i don't see why Revision needs to be set in struct (if not specified by user) either...

/retest


Exception: ('Invalid merge mode:', 'join')

Hi,
When running with latest Keras, I have the following message:
File "", line 1, in
model = get_graph(num_users, num_items, 256)
File "", line 15, in get_graph
merge_mode='join')
File "D:_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\lib\site-packages\keras\legacy\models.py", line 241, in add_shared_node
raise Exception('Invalid merge mode:', merge_mode)
Exception: ('Invalid merge mode:', 'join')
Any idea ?
Thanks

You should use keras 0.3.2 to run this code. For triplet prediction, I think this is a good example to follow.

I'll update this to the newest Keras at some point. For the moment, try with 0.3.2.

I forked this project and changed some code.
Now, it works for me.
https://github.com/Kyung-Min/triplet_recommendations_keras

@Kyung-Min Your running result of your code seems not right. In addition, you current code should import the Activation first. The result is shown as follows:
AUC before training 0.503034233801
Epoch 0
Train on 49906 samples, validate on 5469 samples
Epoch 1/1
2s - loss: -5.0171e-01 - val_loss: -5.0393e-01
AUC 0.501176010872
Epoch 1
Train on 49906 samples, validate on 5469 samples
Epoch 1/1
2s - loss: -5.0882e-01 - val_loss: -5.0773e-01
AUC 0.500396098802
Epoch 2
Train on 49906 samples, validate on 5469 samples
Epoch 1/1
2s - loss: -5.1569e-01 - val_loss: -5.1147e-01
AUC 0.499127734927
Epoch 3
Train on 49906 samples, validate on 5469 samples
Epoch 1/1
2s - loss: -5.2249e-01 - val_loss: -5.1514e-01
AUC 0.498307014854
Epoch 4
Train on 49906 samples, validate on 5469 samples
Epoch 1/1
2s - loss: -5.2920e-01 - val_loss: -5.1877e-01
AUC 0.497376781555
Does the result in your README using the same code?

Updated with https://github.com/maciejkula/triplet_recommendations_keras/pull/8


compose: Redesign mobile message buttons popover.

As part of the popover menu redesign, this redesigns the mobile message buttons popover using the new "popover-menu" tippy theme and improves accessibility by using appropriate ARIA attributes.
This PR also updates the logic for the mobile message buttons popover to mimic the "Start new conversation" button's logic — show new topic option only when in a stream narrow, else show the new channel message option. And removes the is_in_private_narrow check from the logic, as we show the new direct message option regardless of it.
Fixes part of #28699.
CZO Discussion

Screenshots and screen captures:

Desc
Before
After

Light Mode

Dark Mode

Non-specific view (Inbox/Combined Feed)

Stream Narrow

Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[x] Explains differences from previous plans (e.g., issue description).
[x] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[x] Visual appearance of the changes.
[x] Responsiveness and internationalization.
[x] Strings and tooltips.
[x] End-to-end functionality of buttons, interactions and flows.
[x] Corner cases, error conditions, and easily imagined bugs.

lgtm aside from the prettier error. Please post in #design for feedback there as well.

Oh seems like I didn't have the git pre-commit hook setup. Fixed the error.

@timabbott this is ready for another review.
Updates:

Changed from the conditional menu option "New channel message"/"New topic" -> a static "Start new conversation" abstracting the behavior from the UI.
Added the hotkey hints.

We still need to remove the keyboard shortcut from this tooltip, since the button opens a menu.

Testing it out, I'm happy with the "Start new conversation" label, especially since you could just as well use that menu option to start a DM or a channel thread.

Merged, thanks @sayamsamal!


Xbox Controllers aren't working for me

I tried using my xbox controllers with the mod and they didn't work. But for some reason my PS4 controller worked via bluetooth.

Try a different method of connecting your controllers. I have written some guides here: https://mrcrayfish.gitbook.io/controllable-documentation/guides/how-to-connect-a-gamepad
Also consider checking the "Checklist" under troubleshooting for steps to solve issues.


Push icon

Wanted to check if it allow to add icon for the push message? Which can display in mobile device message with icon?

@dennisc2 you can do it if it’s allowed by the platform. Are you talking about web android or ios? The lib allows you to send any payload but you need to follow the official document to send exactly what’s expected on the other end.

Sorry for the newbie question, but do I add that to the payload object? Would you have any sample of it? Would like to send to both android and iOS, which should support the icon for android cloud message?

please refer to the official documentation. I can't really help with it, sorry


How to set up air resistance for rotating?

I see an option 'drag' of integrator working for moving. But no working for rotating?
Did I miss anything here?

I suppose you could write your own integrator which applies drag to rotation too?


import is typed and triggers an error even with all typings disabled

VSCode Version: 1.25.1
OS Version: Windows 10 Pro 64-bit

Steps to Reproduce:

Create an empty directory and open it in VS Code
Create tsconfig.json with the following content:

{
    "compilerOptions": {
        "noLib": true,
        "types": [],
        "typeRoots": []
    },
    "include": [
        "./**/*.ts"
    ],
}

Create a new TypeScript file with the following content:

import();

Note how the import(); statement refers to dynamic import (unexpected behavior).  Type in require(); and see how it results in "Cannot find name 'require'" (expected behavior)

If you use //@ts-ignore, an error will be reported about the missing Promise type:

Workaround
If you use //@ts-ignore AND declare a type for the Promise, the error disappears (VS Code forces Promise to have at least one type parameter, which sounds like import & Promise typing requirements are hardcoded)

Even with the declared type for Promise //@ts-ignore is still required, otherwise VS Code checks if the module exists:

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

This issue was moved to Microsoft/TypeScript#25986


Support for IBM DB2

Related Issues

links https://transcend.height.app/inbox/T-15532

Public Changelog

Add support for DB2 driver

@anotherminh does this need to be release publicly?

please update minor version / add changelog entries for new functionality. patch version is for bug fixes.
was the driver itself installed on the dockerfile in another pr? probably should be added in same deploy

Yes work is going on adding the driver but that change depends on this new driver type and blocking progress on another PR

was the driver itself installed on the dockerfile in another pr? probably should be added in same deploy

This seems like a tricky dependency between the two PRs then. @shashiranjan84 it sounds like you'll want to wait to merge this until you're pretty sure/ready to merge the app code in the monorepo.

@anotherminh does this need to be released publicly?
Once this is merged, CI will publish the new version.

@anotherminh @michaelfarrell76 can I merge this PR now?


after reindexing, remove old resource file

results in entity_store.SourceAlreadyKnown
all of this is stuff that should be handled by a proper database backend
but kudos to me for raising the exception

I think this is resolved


Document REST API using Swagger

Would offer user a more structured way of examining the REST API of Butler SOS.

No applicable API to document...


How to get videos from a channel by it's ID?

Implemented with #22

I was hoping to be able to do this today. Any updates on this?

This is already doable by using the search method.  Please see the relevant YouTube API documentation for details.  Here's a code sample that might work.
const videos = youtube.search(null, 10, { channelId: 'some channel id' });

Nice! Thanks
Tip: Have you thought of making all methods accept an object so we can always pass named parameters instead.
I'm not a big fan of passing fn(null, 10, {...}) I rather fn({...}).
No big deal, but just an idea for the next version 😉
Thanks again!

I'm looking at reworking the various method signatures for the next minor version to allow usage as you've described.  I'm also going to implement this method directly if #22 does not conform to my requests by then.


Add hacktoberfest2021 tag

Add hacktoberfest tag

We are late to that party unfortunately. :( Ping us earlier next year, @andreatosato!


Increasing sample rate

I want to increase sample rate to 44k, or 24k, 32k. I tried to play with BITS_PER_SAMPLE, BYTES_PER_SAMPLE (/# side), SAMPLES_PER_SECOND, but I couldn't find the correct ratio. Something above 20k is ok for me. I adjusted these values to 8-8-32k, 16-4-32k, 16-8-32k, 16-16-32k, 24-8-24k, 24-8-32k. 16-8-32k and 16-4-32k skip bytes I guess, because record time is correct but recording is weird. 16-16-32k records in 2x speed. How should I adjust these numbers? Previously, I was recording with these code, but its different platform:
const int headerSize = 44;
const int waveDataSize = record_time * 88000;
const int numCommunicationData = 8000;
const int numPartWavData = numCommunicationData/4;
byte header[headerSize];
char communicationData[numCommunicationData];
char partWavData[numPartWavData];
Additionaly, this code records with 16bits precision, but I2S sends 24bits. Whats happening to these 8 bits and why we re not recording with 24bits precision. I know 16bits is a good quality, but I just want to learn.

Hi.  Thanks for trying out this pull request!
Here are some ideas on your questions.
To increase the sample rate try modifying only one parameter: SAMPLES_PER_SECOND
In the first example, (record with 16 bit resolution) every audio sample is reduced from 18-bit resolution to 16bit resolution - this reduces amount of data written to a SDCard, which reduces the risk of the DMA buffer overrunning (losing audio samples).
There is a MicroPython example that records in 32bit resolution.  That should work for a 24bit microphone.
record 32 bits
I recommend experimenting with the record 32 bits example to see what sample rate can be supported before DMA overrun happens.
I'm interested in feedback on these suggestions ...


default font smoothing, selectos and ie resize

line 4 — Default font-smoothing setting for better cross OS compatibility (MAC OS & Windows)
line 23 — preserve line-height and selector appearance
line 24 — enable resizing for IE
line 25 — legend doesn't inherit in IE

Hey @zone-live, thanks for making this push. I have some requests and questions.
Have you taken a peak at sanitize.scss? This is the source file for the project. You’ll find this easier to edit, and it will automatically handle prefixes for you. sanitize.css is generated from this file. I’m going to keep changes there.
I have not added font-smoothing. antialias due to the fact that it turns off subpixel rendering and instead uses an antialiasing technique that, due to its lack of fidelity, happens to cause fonts to appear a little lighter, and not technically smoother. Often times, the perceived lightening appears better in high contrast environments, but does little to address the actual font preference, nor does it ensure a consistent experience across devices and browsers. Also, it hinders the experience on light-weighted fonts in lower contrast environments. (reference) (reference)
You’ve written some statements to correct IE behavior (and perhaps other browser behavior) that may be outside current browser support. I’ll need you to be more specific about which versions of IE these changes affect, so that they might be tested first. For instance, I’ve noted exactly which browsers are missing a display definition for the template element. This will be especially helpful in the future of the project, both internally and for developers who wish to contribute as you have.

Hey @zone-live, let me know your thoughts. Otherwise, I’ll close this tomorrow based on my initial feedback.

Hi @jonathantneal you can delete this pull request, i just saw that sanitize.css is for IE10 and 11, so there is no need for the rules i created in this pull.
But to answer your question, the rule in line 24 - enable resizing IE, is there because normally you specify a global font in the body, but this doesn't get applied (inherited) on the form controls in all web browsers its not only IE. So one way to do it is to set the font to inherit on those elements:
input, select, textarea {
font: inherit;
}
But that doesn't work in IE6/7. So we use a specific hack for IE <7:
*property: value; // applies the property value in IE 7 and below
As to the second line 25 —because legend doesn't inherit in IE, the legend tag doesn't inherit the color from its parent element in old IE6 and 7 browsers.


Fix typo

		"type": "Alert", ← type, Not Type
		"name": "[variables('Alert').Name]", ← name, Not Name
		"description": "[variables('Alert').Description]", ← description, Not Description
		"severity": "[variables('Alert').Severity]", ← severity, Not Severity

@changeworld : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@bwren Although minor and not a blocking issue, the casing for Element names varies throughout the article.

@ktoliver : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Verified the updates; merging.
@changeworld - Thank you for your contribution.


Document which threads/queues all user-provided blocks are invoked on

The block arguments for the methods in our public APIs are sometimes invoked once synchronously (Realm.write(...)), sometimes multiple times asynchronously on the thread on which it was added (Realm.addNotificationBlock(...)) and sometimes multiple times asynchronously on an internal thread or queue (SyncUser.logIn(...)).
We should audit all our APIs that accept blocks to specify their behavior.

In terms of the Login callback (and all other sync callbacks in which users are expected to do UI work or set up Realms), I think the best solution is to just dispatch them to the main queue. Right now the way all these callbacks work violates the principle of least surprise.

We've discussed this before. I don't think forcing a queue dispatch is the right move, since as a user you then can't avoid it.
In some other ticket, we proposed an improved API where an optional callback queue could be specified, defaulting to the main queue (which addresses the principle of least surprise which you mention) but also settable to nil to avoid a dispatch of any sort.
Regardless that's not what this issue is tracking, rather just documenting our existing behavior.


Pyright does not work with yt typings [request for pyi files]

Problem
Pyright fails to understand this magic:
https://github.com/ytsaurus/ytsaurus/blob/0cb099dce692d6bda9038be19c38e8e0aa3a35a9/yt/python/yt/wrapper/schema/types.py#L31-L38
Without additional changes I got something like this on mr example:
$ PYRIGHT_PYTHON_FORCE_VERSION=1.1.332 <python_from_my_venv> -m pyright --pythonpath <path/to/my/venv> example.py
// ...
/home/<>/example.py
  /home/<>/example.py:18:5 - warning: Instance variable "name" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
  /home/<>/example.py:19:5 - warning: Instance variable "login" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
  /home/<>/example.py:20:5 - warning: Instance variable "uid" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
  /home/<>/example.py:25:5 - warning: Instance variable "name" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
  /home/<>/example.py:26:5 - warning: Instance variable "count" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
  /home/<>/example.py:37:42 - error: Expected no type arguments for class "RowIteratorProtocol" (reportGeneralTypeIssues)
  /home/<>/example.py:43:29 - error: "name" is possibly unbound (reportUnboundVariable)

With some help like this (inside my venv):
# if typing.TYPE_CHECKING and is_schema_module_available():
#     try:
#         from yt.packages.typing_extensions import dataclass_transform
#     except ImportError:
#         from typing_extensions import dataclass_transform
# else:
#     def dataclass_transform():
#         return lambda x: x

from typing_extensions import dataclass_transform

It becomes better:
$ PYRIGHT_PYTHON_FORCE_VERSION=1.1.332 <python_from_my_venv> -m pyright --pythonpath <path/to/my/venv> example.py
// ...
/home/<>/example.py
  /home/<>/example.py:37:42 - error: Expected no type arguments for class "RowIteratorProtocol" (reportGeneralTypeIssues)
  /home/<>/example.py:43:29 - error: "name" is possibly unbound (reportUnboundVariable)
2 errors, 0 warnings, 0 informations

And after this change here:
https://github.com/ytsaurus/ytsaurus/blob/0cb099dce692d6bda9038be19c38e8e0aa3a35a9/yt/python/yt/wrapper/schema/types.py#L11-L14
# try:
#     import typing
# except ImportError:
#     import yt.packages.typing as typing

import typing

Only one "error" remains:
/home/<>/example.py
  /home/<>/example.py:43:29 - error: "name" is possibly unbound (reportUnboundVariable)
1 error, 0 warnings, 0 informations

Suggestion
I understand what this code is written for, but it really makes it difficult for pyright to understand what is actually happening.
I believe this problem can be solved with a couple of pyi files, they don't affect runtime, but allow static type checking to be done without an issue. However, it can't be done without changes to the main code (you can use this issue as a reference).
Versions
$ <python_from_my_venv> --version
Python 3.11.4

$ <pip_from_my_venv> list | grep ytsaurus
ytsaurus-client                    0.13.7
ytsaurus-rpc-driver                1.0.0
ytsaurus-yson                      0.4.3

Configs

pyproject.toml (pyright part)

[tool.pyright]
typeCheckingMode = "strict"

strictListInference = true
strictDictionaryInference = true
strictSetInference = true
analyzeUnannotatedFunctions = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
reportMissingModuleSource = "error"
reportMissingImports = "error"
reportUndefinedVariable = "error"
reportAssertAlwaysTrue = "warning"
reportInvalidStringEscapeSequence = "error"
reportInvalidTypeVarUse = "error"
reportMissingTypeStubs = "none"
reportSelfClsParameterName = "error"
reportUnsupportedDunderAll = "warning"
reportUnusedExpression = "error"
reportWildcardImportFromLibrary = "error"
reportGeneralTypeIssues = "error"
reportOptionalSubscript = "error"
reportOptionalMemberAccess = "error"
reportOptionalCall = "error"
reportOptionalIterable = "error"
reportOptionalContextManager = "error"
reportOptionalOperand = "error"
reportTypedDictNotRequiredAccess = "error"
reportPrivateImportUsage = "none"
reportUnboundVariable = "error"
reportUnusedCoroutine = "error"
reportConstantRedefinition = "warning"
reportDeprecated = "warning"
reportDuplicateImport = "error"
reportFunctionMemberAccess = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportIncompleteStub = "none"
reportInconsistentConstructor = "error"
reportInvalidStubStatement = "none"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeArgument = "none"
reportOverlappingOverload = "error"
reportPrivateUsage = "none"
reportTypeCommentUsage = "error"
reportUnknownArgumentType = "none"
reportUnknownLambdaType = "none"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownVariableType = "none"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "none"  # because pyright assumes values of different types cannot be equal
reportUnnecessaryContains = "warning"
reportUnnecessaryIsInstance = "none"  # might make a warning or error once we have good pyright coverage
reportUnusedClass = "error"
reportUnusedImport = "error"
reportUnusedFunction = "error"
reportUnusedVariable = "error"
reportUntypedBaseClass = "warning"  # might relax later?
reportUntypedClassDecorator = "none"
reportUntypedFunctionDecorator = "none"
reportUntypedNamedTuple = "none"
reportCallInDefaultInitializer = "none"
reportImplicitOverride = "none"
reportImplicitStringConcatenation = "none"
reportImportCycles = "warning"
reportMissingSuperCall = "none"  # because it triggers even on init in class derived from object
reportPropertyTypeMismatch = "warning"
reportShadowedImports = "warning"
reportUninitializedInstanceVariable = "warning"
reportUnnecessaryTypeIgnoreComment = "none"  # might make an error once we stop running mypy
reportUnusedCallResult = "none"

Main parts are:
typeCheckingMode = "strict"

reportGeneralTypeIssues = "error"
reportUninitializedInstanceVariable = "warning"

If you're interested, I have this branch: https://github.com/ytsaurus/ytsaurus/compare/main...chegoryu:ytsaurus:pyright-hacks
It's obviously not for merging, but with this command:
$ python3.11 -m pyright --pythonpath /path/to/venv/bin/python3.11 --createstub yt

It produces +/- good typing stub:

Bump!
For me pyright cannot even resolve class YtClient.
Problem is here: https://github.com/ytsaurus/ytsaurus/blob/b3c258e7b4a322c6e8dbe196a9150faeecfeb7d3/yt/python/yt/wrapper/client.py#L31
Conditional import with clear constant expression solves the problem:
if YANDEX_VERSION:
  from .client_impl_yandex import YtClient
else:
  from .client_impl import YtClient

Heh
I had the same problem.
Even after this fix pyright is still useless (it should be done almost at all files with conditional imports).
You can generate stub from my branch and add it to your pyright config (result is on the screenshots).
The disadvantage is that my typings are not 100% accurate and in some places reduce the variability of the API (and also they are incomplete, I only cover YtClient and some useful classes).

Python package could include FLAVOR OPEN_SOURCE=True|False into generated version.py
https://github.com/ytsaurus/ytsaurus/blob/b6634cd52ba6afdb1c8459f6de87c6067e19eef4/yt/python/packages/ytsaurus-client/setup.py#L13
And then use this for all conditional imports with ease.

Sorry for the delay, lost types in yt_dataclass members/constructor are testing now and will be fixed soon.
Here's what about hints for API methods.
In original report i see no errors about unknown attribute, so pyright can determine at least method.
@koct9i - how i can reproduce For me pyright cannot even resolve class YtClient?

Distilled problem:
$ cat a.py
from yt.wrapper.client import YtClient
$ pyright a.py
/home/khlebnikov/work/yt-suite/a.py
  /home/khlebnikov/work/yt-suite/a.py:1:31 - error: "YtClient" is unknown import symbol (reportAttributeAccessIssue)
1 error, 0 warnings, 0 informations

For example, this change in client.py fixes issue:
try:
    if False:
        from .client_impl_yandex import YtClient
    else:
        from .client_impl import YtClient

I am afraid there is no good solution for conditional import (pyright do not evaluate expressions in condition) and pyi files for client_impl do not help either.
Thinking about removing it from runtime (moving into some build phase).

and pyi files for client_impl do not help either.
Why?

For me they work very well

Examples:

As i can see, you cut off conditional import, so pyright use correct pyi (for client_impl) without confusing with absent client_impl_yandex

Kinda like this:
~/git/repo/pyroot/typings$ cat ~/git/repo/pyproject.toml | grep tool.pyright -A5
[tool.pyright]
# see https://github.com/microsoft/pyright/blob/main/docs/configuration.md
extraPaths = [<censored>]
stubPath = "pyroot/typings"
typeCheckingMode = "strict"

~/git/repo/pyroot/typings$ tree
.
├── cli
│   └── __init__.pyi
├── clickhouse
│   ├── clickhouse.pyi
│   ├── client.pyi
│   ├── compatibility.pyi
│   ├── defaults.pyi
│   ├── execute.pyi
│   ├── helpers.pyi
│   ├── __init__.pyi
│   ├── log_tailer.pyi
│   └── spec_builder.pyi
├── common.pyi
├── __init__.pyi
├── json_wrapper.pyi
├── logger_config.pyi
├── logger.pyi
├── skiff
│   └── __init__.pyi
├── subprocess_wrapper.pyi
├── type_info
│   ├── __init__.pyi
│   ├── type_base.pyi
│   └── typing.pyi
├── wrapper
│   ├── acl_commands.pyi
│   ├── admin_commands.pyi
│   ├── auth_commands.pyi
│   ├── batch_api.pyi
│   ├── batch_client.pyi
│   ├── batch_execution.pyi
│   ├── batch_helpers.pyi
│   ├── batch_response.pyi
│   ├── chaos_commands.pyi
│   ├── client_api.pyi
...

So you can just provide separated pyi files

Pyright selects pyi files and doesn't even look at the original.

Please don't do that. It's better to fix original files rather providing bunch of crutches.

Yep =(
Everything is more complicated than "if True" or "if not True" are not evaluated.
typing.Final does not work too


Android build 🤖

@CRex15

just test if it builds successfully. crashes on start. not sure why @CRex15


ENH: Improve accuracy of lomax for small x.

Improve the accuracy of the lomax distribution for small x, by replacing(1+x) with exp(log1p(x), exp(x)-1 with expm1(x) and log(1+x) with log1p(x).

Merging, thanks @maniteja123

Thanks @ev-br, I am new to contributing to scipy and was trying to do some easy fixes.

@maniteja123 I think also here you should change assert_equal to approximate comparison with the right tolerance. You could take that along in the rayleigh PR (gh-4423).


add historic multiple sensor data to PAA

Add the ability to retrieve multiple sensors' historic data. But from the looks of PR #21, the PurpleAirAPI team may be disabling this feature.
Looks like they may want us to use this page instead: https://www.purpleair.com/sensorlist

The API for historical access is not available at the moment ( Downloaded data not appearing in CSV file - #5 by Ethan_Breinholt). I think you’ll need special access to download historical data. Especially if it is for a big time range. I would suggest reaching out to purple air support for help.
<EMAIL_ADDRESS>


Update MintMaker image in prod

This commit updates MintMaker's prod image to a newer version.
This version is still pinned.

/lgtm
/approve


Fine-grained config of the SSR renderer's Nitro event handler via hook

Describe the feature
Hey all 👋🏻
We have defineCachedEventHandler for custom event handlers from Nitro, e.g. for API endpoints. The only scenario where we can't use these at the moment is the main Server-Side Rendering handler as it is not under the end users control.
I propose a hook to have the option to insert custom code which should be able to configure the handler's options.
Additional information

[x] Would you be willing to help implement this feature?
[ ] Could this feature be implemented as a module?

Final checks

[X] Read the contribution guide.
[X] Check existing discussions and issues.

@manniL 🙋♂,
I hope you're doing well! Could you kindly explain how this proposed feature will address routeRules? I noticed you closed the question thread as a duplicate, but I'm not entirely sure how it's linked. I would love to understand more about this.
Thank you so much!

This probably has to be done in Nitro-side for defineRenderHandler wrapper https://github.com/unjs/nitro/issues/2530

@manniL hey will this enable me to ignore swr cache if I have a query parameter attached (?preview=true), trying to find a way to do this and really not sure how to ignore routeRules for query params

Thank you for the response. I am aware of the pipeline handling this but i had to ask anyways. Currently, I am hiding all the pages behind parent parameter page [preview]. Using it in combination with i18n i managed to circumvent the cache and get this working but recently i tried pluging in nuxtseo for sitemap and i lost the entire route auto generation bcs all the routes are in fact dynamic. Did try to do a custom router but for some reason this is bugging out and i am not sure where i am even going with it. Nevermind. I'll build my sitemap manually and wait for thia to get in so i can finally get away with this page hacks


Repository Handling Updates: install and remove commands

Improve handling of multiple TTP repositories - this is crucial to allow organizations
to maintain internal TTP repositories with their own secret sauce, and also facilitates working with forks.
The new features in this PR are demonstrated as follows:

Install TTPs from a new repository

Fork the ForgeArmory repository, then install your fork (substitute your username for mine)
./ttpforge install repo --name mine https://github.com/d3sch41n/ForgeArmory

You will now see your new repository listed when you run ttpforge list repos

List TTPs from your new repository

The command below will list the new TTPs
./ttpforge list ttps --repo mine

Run a TTP from your new repository

Use the repo//my/ttp syntax as follows:
./ttpforge run \
  mine//examples/args/define-args.yaml \
  --arg a_message="hello" \
  --arg a_number=1337

Remove the new repository

This will clean up the new repository now that we don't need it anymore:
./ttpforge remove repo mine

Other changes:

the config.yaml is no longer required unless you wish to use sub-TTPs or repository-scoped TTP references (repo//my/ttp)
regular users most likely want to run ttpforge init and get the default config under their home - we warn about this now:

However, if you are executing TTPs directly from a file path (which happens in some deployment scenarios without a config.yaml) then it will still run after the warning, as desired:

Fixing last test issue once I get some sleep

Issue is from Conf being a global variable - going to finally take care of that and scope it to an individual root command instance

@l50 thank you for comments - I implemented all of them

@l50 done


handle 400 errors

BACKEND PULL REQUEST
Related Issue

fixes #4295

Changes Proposed

New queue created
When a 400 error happens all the current messages (in the function) go into the new queue
When this happens (should be very rare) manual intervention will be required.
Write up a doc on the process for that manual intervention

Additional Information

Parsing out the line number is less straight forward than I would have hoped which is why I'm going the route of just putting the entire file in the new queue.  Would be interested to hear people's thoughts on that.

Testing

I'm taking over dev3 for the sake of testing this.  Might be a longer lived testing process than most PRs.

DEVOPS CHANGES

Creating a new queue to hold problematic records destined for report stream.
Create an alert to fire when this happens as it will require manual intervention

I was able to manually test this successfully on dev3.
Still TODO before I take this out of draft:

Alerting when this happens (and probably improved logging)
Write up a on-call doc for how to handle things when this happens.

But with that in mind the code for this should be good for review.

utf 8 actually

Not sure why its showing 0% coverage when I very clearly have coverage on the new code. 🤔

not to over engineer things here but are there any other RS upload failures we'd want to move messages to the error queue for?
what if we just move all messages with a dequeue count above a certain threshold to the error queue? kind of like manually implementing the poison queue functionality they provide for queue-triggered functions

Parsing out the line number is less straight forward than I would have hoped which is why I'm going the route of just putting the entire file in the new queue. Would be interested to hear people's thoughts on that.

this seems sufficient to me

not to over engineer things here but are there any other RS upload failures we'd want to move messages to the error queue for? what if we just move all messages with a dequeue count above a certain threshold to the error queue? kind of like manually implementing the poison queue functionality they provide for queue-triggered functions

Yeah one of the things that I ran into while testing this was messages getting stuck in the publishing queue because of parse failures.  I'm not sure if we see this in prod or not?  I would expect not but it would be nice to have some way to detect that.


add CUB dataset

New features

Adds CUB dataset which can be built as follows

from multivae.data.datasets import CUB

cub = CUB('path/to_cub, 'train', captions_per_image=10, im_size=(28, 28))

This dataset returns a DatasetOutput where the modalities are located in a dictionary under the data key. The images can be accessed as follows
>>> cub[0].data['img'].shape
... torch.Size([3, 28, 28])

The text caption can be retreived as follows
>>> cub[0].data['text']
... {
...    'tokens': tensor([ 2, 32,  5, 29, 33, 18, 26, 34,  7, 18, 35,  0,  1,  1,  1,  1,  1,  1]),
...    'padding_mask': tensor([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0.])
... }

The tokens are basically the tokenized caption while padding_mask allows to handle catpions of different dimensions. Caption tokenization relies on nltk.tokenize.RegexpTokenizer.

Adds CubTextEncoder a transformer-based encoder for text in multivae.models.nn.cub which can be instantiated as follows

from multivae.models.nn.cub import CubTextEncoder

encoder = CubTextEncoder(
    config,
    max_sentence_length=cub.max_words_in_captions,
    ntokens=cub.vocab_size,
    embed_size=512,
    nhead=4,
    ff_size=1024,
    n_layers=4,
    dropout=0.5,
)

Adds a simple MLP decoder for text which can be instantiated as follows

from multivae.models.nn.cub import CubTextDecoderMLP
from pythae.models.base import BaseAEConfig

decoder = CubTextDecoderMLP(
    BaseAEConfig(latent_dim=11, input_dim=(cub.max_words_in_captions, cub.vocab_size))
)

Add an example on cub with mvtcae model
Updates setup.py with nltk and pandas dependencies
Adds tests

Thank you for this PR @clementchadebec !