files_upload_v2 does not work with io.BytesIO file parameters

Is this type hint correct? I tried to pass in a io.BytesIO object here as the file as I thought IOBase covers that as well as a real file handle (e.g. from open("filename", "rb")) - but it failed with TypeError: object of type '_io.BytesIO' has no len() - len comes from _to_v2_file_upload_item I believe. So either the type hint is incorrect or the implementation of _to_v2_file_upload_item needs tweaking? You could probably just do something like this?
def _to_v2_file_upload_item(upload_file: Dict[str, Any]) -> Dict[str, Optional[Any]]:
    file = upload_file.get("file")
    content = upload_file.get("content")
    data: Optional[bytes] = None
    if file is not None:
        if isinstance(file, str):  # filepath
            with open(file.encode("utf-8", "ignore"), "rb") as readable:
                data = readable.read()
        elif isinstance(file, io.IOBase):
            # new stuff
            data = file.read()
            if isinstance(data, str):
                data = data.encode()
        elif isinstance(file, bytes):
            data = file
        else:
            raise SlackRequestError("The given file must be either a filepath as str or data as bytes/IOBase")
    elif content is not None:
        if isinstance(content, str):  # str content
            data = content.encode("utf-8")
        elif isinstance(content, bytes):
            data = content
        else:
            raise SlackRequestError("The given content given as str or as bytes")

    filename = upload_file.get("filename")
    if upload_file.get("filename") is None and isinstance(file, str):
        # use the local filename if filename is missing
        if upload_file.get("filename") is None:
            filename = file.split(os.path.sep)[-1]
        else:
            filename = "Uploaded file"

    title = upload_file.get("title", "Uploaded file")
    if data is None:
        raise SlackRequestError(f"File content not found for filename: {filename}, title: {title}")

    if title is None:
        title = filename  # to be consistent with files.upload API

    return {
        "filename": filename,
        "data": data,
        "length": len(data),
        "title": title,
        "alt_txt": upload_file.get("alt_txt"),
        "snippet_type": upload_file.get("snippet_type"),
    }

Originally posted by @Alex-ley-scrub in https://github.com/slackapi/python-slack-sdk/pull/1272#discussion_r1008760159

Since files_upload supports oi.BytesIO I feel it would be expected behavior for files_upload_v2 to support it as well

you also seem to need more permissions for upload_v2? Can that be true?
I get: SlackApiError: {'ok': False, 'error': 'missing_scope', 'needed': 'files:read', 'provided': 'incoming-webhook,chat:write,files:write,chat:write.customize,usergroups:read'}

v3.19.2 (released a few days ago) adds a request_file_info argument that can be set to False if the files:read scope is not available.

thanks @eddyg but I think that means I don't get the same info as I did with v1, right? And I need that info for my use case.
Previously I could do:
upload = client.files_upload(**file_dict)
url = upload["file"]["permalink"]

now I can't do this?
upload = client.files_upload(**file_dict)
url = upload["file"]["permalink"] # OR this upload["files"][0]["permalink"]

How can I get that same info with v2?
Note I was trying to migrate to v2 because of this warning message:
~\anaconda3\envs\py39\lib\site-packages\slack_sdk\web\internal_utils.py:441: UserWarning: client.files_upload() may cause some issues like timeouts for relatively large files. Our latest recommendation is to use client.files_upload_v2(), which is mostly compatible and much stabler, instead.

ok fair enough, thanks for the link to the explanation. I will use v1 or change the way I solve my use case with v2 or just add the read scope

The use case is using client.files_upload or client.files_upload_v2 to upload multiple files, and then to use client.chat_postMessage to post the message to channel with multiple files (with upload v1 I was adding the permalink of each file into the markdown message) but also, to change the username and the icon_url for the bot, based on the context in my application using client.chat_postMessage which is not possible using e.g. client.files_upload_v2 to directly upload and post with the initial_comment is it? I've tried to look around the sdk code/docs but I can't figure it out. I was trying to see if i could use the file id somehow like < F0441L9JWL3 | > but that didn't work

Hi @Alex-ley-scrub from what I know there are limitations with the initial_comment not supporting markdown for the near future.
If I understand your use case correctly I would tend to use client.files_upload_v2 with the appropriate files:read scope and use client.chat_postMessage over initial_comment to post the message to a channel with multiple files. If this fails files_upload is still a valid option

@eddyg / @seratch / @WilliamBergamin
Am I correct in assuming that Pull https://github.com/slackapi/python-slack-sdk/pull/1408 now solves the issue I was having above? Namely, needing to add additional read scope with file_upload_v2 that I did not need with v1?
https://github.com/slackapi/python-slack-sdk/pull/1408/files#diff-43db19ac0a29454cd1da520664806b266d75a54632e9661cc131406b3270b040R3424
https://github.com/slackapi/python-slack-sdk/pull/1408/files#diff-81c2cbebafffbfe19cb91928f7df395c29a10c271fbc681fb40d9cee1c140dfbR3415
request_file_info: bool = True,  # since v3.23, this flag is no longer necessary

If so, that is awesome 👏 - thank you


Dragging a project into the editor while a dialog is open leaves the dialog behind

Found in IE11

Ha the bug still exists!
Get Outlook for iOShttps://aka.ms/o0ukef

From: Richard Knoll<EMAIL_ADDRESS>Sent: Friday, February 1, 2019 2:56:53 PM
To: Microsoft/pxt-arcade
Cc: Subscribed
Subject: [Microsoft/pxt-arcade] Dragging a project into the editor while a dialog is open leaves the dialog behind (#720)
Found in IE11
[dialog_drag_drop]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F13754588%2F52154152-92396a00-2631-11e9-8adc-c10381451e51.gif&data=02|01|jhalleux%40microsoft.com|ef554fdf88454f56980908d688988f65|72f988bf86f141af91ab2d7cd011db47|1|0|636846586153334561&sdata=Zpei90fRBhgIhWDia%2F9%2B4wM%2FraIPNt5NG2X7bMejmAo%3D&reserved=0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt-arcade%2Fissues%2F720&data=02|01|jhalleux%40microsoft.com|ef554fdf88454f56980908d688988f65|72f988bf86f141af91ab2d7cd011db47|1|0|636846586153334561&sdata=QGxnuu4jPsU3PS%2FA5yi5Z4MR1UkBxrnrzhJgGCKDzKo%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KQ9_a7lUu6Kbgqk0LB13t5TenZuhks5vJMY1gaJpZM4afOcG&data=02|01|jhalleux%40microsoft.com|ef554fdf88454f56980908d688988f65|72f988bf86f141af91ab2d7cd011db47|1|0|636846586153334561&sdata=0R0GXXceM8jjWIVgIRCPKmoKC1xE%2FBchX5MxmTt22cU%3D&reserved=0.

No support for IE11


feat(query_rules): Add query rules

My fault, as I forgot to state that explicitly: The naming should be coordinated with the other API clients, and we went for "rules" alone, not "query rules" for method naming. So this would be saveRule instead of saveQueryRules. Sorry for that... 😬

@clement-leprovost done here also

Coverage decreased (-2.06%) to 27.393% when pulling 7752823e3807d8f2d7b264d936ba960770acf39f on feat/query_rules into e85657bca7315756e891f1b5d349abeaebd5dc7f on master.

Coverage decreased (-2.4%) to 27.094% when pulling a835d084457f44182df899cde6b1dd33bd44e39d on feat/query_rules into e85657bca7315756e891f1b5d349abeaebd5dc7f on master.

Coverage decreased (-2.4%) to 27.094% when pulling a835d084457f44182df899cde6b1dd33bd44e39d on feat/query_rules into e85657bca7315756e891f1b5d349abeaebd5dc7f on master.

Coverage decreased (-2.3%) to 27.153% when pulling 839df413dd5a374ad7b9fa3b0a5a98eb4bfb96e8 on feat/query_rules into e85657bca7315756e891f1b5d349abeaebd5dc7f on master.

Coverage decreased (-4.05%) to 25.45% when pulling c9c31d4c70ff985a21d089bd3ff99b5de32617d2 on feat/query_rules into c02d4ecb97fc39f1b98d0e9ed85651f3a93fc843 on master.

Coverage decreased (-4.05%) to 25.45% when pulling 0cbacb7904af7701311c60b8584a9ca16f4547b0 on feat/query_rules into c02d4ecb97fc39f1b98d0e9ed85651f3a93fc843 on master.

Changes Unknown when pulling f2298e053341a9fb0846c036d5a052cc263d4e47 on feat/query_rules into ** on master**.


macOS installation issue

When installing the package via pip it fails.
Collecting google-search-results
  Using cached https://files.pythonhosted.org/packages/08/eb/38646304d98db83d85f57599d2ccc8caf325961e8792100a1014950197a6/google_search_results-1.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3m/91gj9l890y71886_7sfndl3r0000gn/T/pip-install-YVqFKL/google-search-results/setup.py", line 7, in <module>
        with open(path.join(here, 'SHORT_README.rst'), encoding='utf-8') as f:
      File<EMAIL_ADDRESS>line 898, in open
        file = __builtin__.open(filename, mode, buffering)
    IOError: [Errno 2] No such file or directory: '/private/var/folders/3m/91gj9l890y71886_7sfndl3r0000gn/T/pip-install-YVqFKL/google-search-results/SHORT_README.rst'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3m/91gj9l890y71886_7sfndl3r0000gn/T/pip-install-YVqFKL/google-search-results/

Running macOS catalina and python 2.7
~ ❯❯❯ pip --version
pip 19.0.2 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
~ ❯❯❯ python --version
Python 2.7.15

Python 2.7 is end of life.
$> pip instal...
"DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020."
I'm not supporting python 2 moving forward.
Thanks for reporting this. I have updated the documentation.

👍


Make DropdownButtonFormField disable-able

In a regular DropdownButton, one can disable the field (visually and functionally) by passing onChanged: null.
However, DropdownButtonFormField will only disable the field visually -- the field still responds to user input when onChanged: null is passed.
This PR fixes this behavior.

Thanks for this fix. Looks good. We will need a test for this. Can you add one to the test/material/dropdown_test.dart? If not, we can find someone to take this on.

@darrenaustin Can you please add this, please.

@darrenaustin Is the 'waiting for customer response' label still valid?

This change has been added with https://github.com/flutter/flutter/pull/36998/, so I'll close this PR. Thanks for the initial work!


Problem serving Twitter Bootstrap 3 font files

Hi,
I'm having some trouble getting Cowboy to render Twitter Bootstrap font files.
Instructions for setup are here:
http://stackoverflow.com/questions/19608873/how-to-include-glyphicons-in-bootstrap-3
and recommend you use the following dir structure:
/css      <-- Bootstrap.css here
/fonts    <-- Bootstrap fonts here
I have it slightly differently for legacy reasons:
/css/lib  	   <-- Bootstrap.css here
/css/fonts    	   <-- Bootstrap fonts here
but the way Bootstrap loads font files via relative CSS paths means this should still work (I think):
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
I have verified all the Bootstrap files (css, fonts, js) exist at their correct locations.
My Cowboy handling code is as follows:
%% http://ninenines.eu/docs/en/cowboy/1.0/guide/static_handlers/
{"/css/[...]", cowboy_static, {priv_dir, ?APP_NAME, "/css"}}
What happens is that core Bootstrap loads fine, but the fonts and glyphs don't.
This directory setup works fine with my usual Python webserver. Am I messing up re serving the font files, or is it possible that Cowboy's static serving code is doing something odd here ?
Many thanks.

But do they load if you access them directly?

Yeah actually I can. Good point. Must be something else. Sorry for trouble.


Docker build doesn't respect Gemfile.lock

Describe the bug
My project has a Gemfile and a Gemfile.lock but when I sls deploy I end up with a different set of gems being installed than what is specified in the lock file. If I remove Gemfile.lock the build process also does not generate one, which it seems like it should.
Error Stack Trace
None
Example Config files
My Gemfile.lock contains:
aws-sdk-core (3.113.0)

But the .serverless/ruby_layer/gemLayer.zip package contains version 3.113.1.
unzip -l .serverless/ruby_layer/gemLayer.zip | grep aws-sdk-core
   0  04-02-2021 18:17   ruby/2.7.0/gems/aws-sdk-core-3.113.1/
...

Desktop (please complete the following information):

OS: [e.g. Mac OS]
NodeVersion [e.g. 12.16.1]
Ruby version [e.g. 2.5.8]
Bundler version [e.g. 2.1.2]

Additional context
Add any other context about the problem here.

After merging your valuable changes, I have created a proper gemfile.lock example and test case for both basic and docker case.

Basic case without docker works without issue.
With docker case, we need to take care of the missing bundler version else it will fail with the following error

 Could not find 'bundler' (1.16.6) required by your /var/gem_build/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.16.6`

Currently working on handling this version missing case.

Handled missing bundler version error for use_docker case by installing respecting bundler. Now the test case is green.

@jagthedrummer  This fix is included in release 1.5.0. Please update the npm version and verify.
npm i serverless-ruby-layer


writing a like or contain query for search

hi , now when i use this package and when i search my model like below :
 public function search(Request $request){
        $search = $request->get('search');
        $data = Test::search($search)->get();
        return $data;
    }

when i pass for example te to my model nothing as result return because in my elastic i have the record as test i want to know if there is any method to write LIKE search or something like contains thanks for great package

Hi @farshadff, the result depends on your model's mapping. If it's a keyword, then it can be found only by exact match. If it's a text, then it can be found by a partial match.


Please bump argcomplete dependency to 2.0.0 or higher

The azure-cli-core component still depends on argcomplete ~= 1.8 while 2.0.0 has been available since Jan 3, 2022.
Could you bump the version for argcomplete so that Linux distributions are not stuck in older versions of the dependency?

bump argcomplete

argcomplete will be bumped by https://github.com/Azure/azure-cli/pull/22991

#22991 is closed :/

It will bump to 2.0.0 once https://github.com/Azure/azure-cli/pull/24752 is merged.

I saw @major has deleted the repo/branch, so https://github.com/Azure/azure-cli/pull/22991 can't be reopened. Let's bump argcomplete for now, regardless of https://github.com/Azure/azure-cli/pull/24752.

Thanks, @jiasli. I think I recreated the fork a while back. Oops. 🤭

I still can't access https://github.com/major/azure-cli. Do you mind recreating that branch so that we can reopen https://github.com/Azure/azure-cli/pull/22991 (and giving you credit for it)?

https://github.com/Azure/azure-cli/pull/24903 has been merged.


Cuda with opencvsharp3

How do you get opencvsharp3 to work with the cuda libraries? I keep getting 0 for Cv2Gpu.GetCudaEnabledDeviceCount(). I can't just replace opencv_gpu with a cuda enabled library from cmake since it uses different dlls such as opencv_world310.dll Could someone list the steps to do so?
Thanks!

Hi,
How are your dlls different?
We tried to use OpenCvSharp with CUDA and had to recompile OpenCV with CUDA enabled - be aware that dlls for OpenCv come in 2 flavors: versiond - debug dll ( 310d.dll ) and version - release dll ( 310.dll ).

Where are you replacing the dlls?
I installed opencvsharp <IP_ADDRESS>60316 through nuget. The dlls I have for opencv are in the native dll folder under packages called
msvcp120.dll
msvcr120.dll
opencv_ffmpeg310_64.dll
opencv_world310.dll
there's also a OpenCvSharpExtern.dll in this folder
I can't find a way to replace the opencv_world310.dll and I'm not sure if I need to. Maybe I'm looking for the opencv dlls in the wrong place?

Hmm, this is a bit outside my experience with OpenCVSharp unfortunately. I just downloaded it from here and then replaced the dlls with opencv dlls compiled by me with CUDA enabled.
Maybe someone who used it with nuget can help you more.

Would you mind listing what version you used to do this and the location of the .dll files you replaced? Maybe I could do it without nuget like you did.
Thanks!

Hey,
I used part of this tutorial : https://initialneil.wordpress.com/2014/09/25/opencv-2-4-9-cuda-6-5-visual-studio-2013/ in conjunction with OpenCVSharp 2.4.10 (20 Dec., 2015) when I tried.


🐛UI | Splash screen has different icon on Android 12+ (API 32+)

Starting with Android 12 Google has changed their approach to Splash Screens https://developer.android.com/develop/ui/views/launch/splash-screen . In a nutshell, apps should use a vector drawable (kinda svg for Android) of certain sizes as an icon for the Splash Screen.
As the application hasn't been migrated yet, it displays different icons on Splash Screens on different Android versions (see the figures below).

Before Android 12
Android 12+

Fixed as part of MAUI migration

This is how it looks like now

Android 12+


Add types and clean TYPEOF

Also merged reducer, mapper and bucketizer under aggregator because they cannot be differentiated.

The function typeof(Class c) is needed by some other classes.

Which ones? Couldn't find any.

Mostly in extensions.

Can you be more precise?

Here for example: https://github.com/senx/warp10-ext-arrow/search?q=typeof&unscoped_q=typeof

Thanks for the heads-up @randomboolean, this is fixed.


hackish fixes to make it work with Font Awesome JS. Hardcoded preview…

… with jquery.html because of time
Refer https://github.com/furcan/IconPicker/issues/3
The CSS  fixes under dist/iconpicker-1.5.0.css works 100% (thanks to @Volmarg) from https://github.com/furcan/IconPicker/issues/2
I also used his eachIconEventListener(firstOrSearch) - you can't just merge it, but compare to the original to see what needs to change to support <svg> tags instead of hardcoded <i>
Then the Preview wasnt working, so i opted just in the name of time (got to go soon) to just remove it from my fork and hardcode a replacement,  will come back and fix when I get time.  I think its as simple as forgetting to update the button's html data-iconpicker-preview="i#IconPreview" to data-iconpicker-preview="svg#IconPreview" oops

Yip fixed the preview, data-iconpicker-preview="#IconPreview" did the trick - sorry stupid one in the rush of things)
So merge CSS, compare JS, and make it work (;

hax or not - i gonna check this out in free moment as i have small problems with picker now anyway, thanks for mentioning me so that i know that something jus happened

hax or not - i gonna check this out in free moment as i have small problems with picker now anyway, thanks for mentioning me so that i know that something jus happened

@Volmarg you saved me day!

So i only made tiny test and with this i can say that I can interract with the icons loaded via fontawesome/all.js

However I will need to check this deeper later as in my case due to webpack i had to replace the
$("#macroIconPreview").html("<i class='" + iconClassName + " fa-2x m-2'></i>");

to plain js, but will play a bit with this first as something still crashes for me, anyway Your fix fixes my bug with strange  icons shown as [ ], [ ] , [ ] - squares so:

Your fix if my fix so gonna fix the bug in fix for my use case anyway - lol

It might be so that it crashes only for me due to some workarounds caused by webpack.

https://github.com/furcan/IconPicker/issues/3


RELATED: 4880 set initial SDK beta for release 8.12.1

Build succeeded (gate pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-create-gooddata-react-app-merge-compliance-check/193/ : SUCCESS in 13s
https://checklist.intgdc.com/job/client-libs/job/gooddata-create-gooddata-react-app-unit-tests-zuul-docker/40/ : SUCCESS in 26s
https://checklist.intgdc.com/job/compliance/job/gooddata-create-gooddata-react-app-fossa-scanning-zuul/17/ : FAILURE in 1m 05s (non-voting)


ods:livingOrPreserved: can a DigitalSpecimen ever be alive?

Term Name
ods:livingOrPreserved
Digital Object Name
DigitalSpecimen
Feedback
I found it unusual to find this term as a property of DigitalSpecimen. Shouldn't it belong with MaterialEntity? I can't see any way that a DigitalSpecimen could be considered "alive".
Current definition
Whether the specimen is living or preserved
If it must be in DigitalSpecimen perhaps a different definition makes it clearer?

Whether the MaterialEntity associated with the DigitalSpecimen  is living or preserved.

I would make the same observation for ods:isMarkedAsType. The DigitalSpecimen is NOT a type, That status belongs to the MaterialEntity it represents.

There a lot of term that I feel this way about - I won't keep listing them, but await others' responses.

Hi Teresa,
Thanks for your review and valuable comments.
We discussed changing our approach to Material Entity.
At the moment, we saw DigitalSpecimen as a kind of super class for Material Entity. This would be the main entrance into the specimen data and be filled with the top level specimen. Any material entities that would be part of the main specimen that had not received their own registration number could be described as a Material Entity.
However, your comment triggered a rethinking about this part of the model. Seeing the 'main' Material Entity as just one of the Material Entities remove duplicate terms and make us more in line with the TDWG Material Entity.
We will remove any terms which feel like they should concern an individual Material Entity, and only leave terms that are concerned with the overall information.
Kind regards,
Sam


feat: add new rule to prefer single resources (#764)

This pull request adds a new single resource preference rule according to proposal defined in #764.
fixes #764.

:+1:

👍

:+1:


Wrong messages in popup

For example:

Twitter is not banned, but there is traffic shaping.

Fixed


Yellow text messages

Yellow text does not go well with background colour.   See link.

Can you change it to Black?

It works if you change EDMC's theme to dark but still needs fixing with the default setting.

Hello! I'm sorry for the inconvenience. However I still would like to emphasise the text with a different colour than the rest of the interface. I changed it to orange; does this look any better to you? If it does, I can get a new update out very shortly.

Looks good to me in the screenshot :) Works for me,

Update to version 1.0.4.


Is there a Bug in the OpenCV Java Wrapper?

I tried to use several feature detectors and got an exception. This exception led me to a post that sais, that there is a bug in the OpenCV 3.0. To fix this OpenCV must be buildt again from source. Here is where i found a solution: http://stackoverflow.com/questions/30657774/surf-and-sift-algorithms-doesnt-work-in-opencv-3-0-java
Is it possible to fix it or switch to Opencv 2.4?

Hi @CeadeS. These bindings are using the OpenCV libraries built for v3.1 (not v3.0). Are you sure that bug is still present in v3.1? If so I can look into rebuilding them with the fix suggested in that thread.
I don't think just switching to v2.4 is an option. IIRC v2.4 has a different interface to v3.0+, so a lot of methods/classes are called something else or missing completely. I could have the v2.4 bindings on a separate branch if you think it would help.

I receive exact the same exception message for these FeatureDetectors. It may have something to do with the fakt that SIFT and SURF are non-free software. They may be excluded for that reason in all versions newer then 3.

@CeadeS That's unfortunate. If it's a case that they just haven't included the .so files you should be able to compile it for the abi you wish to use and put it in the correct lib folder. Since this isn't a bug with the bindings themselves I'll probably close this issue. Thanks for letting me know anyway.


Need help with understanding Showroom

Hi there,
I have a web component HeaderImage.js which looks something like this
export default class HeaderImage extends HTMLElement {
  constructor() {

    // We are not even going to touch this.
    super();
    // lets create our shadow root
    this.shadowObj = this.attachShadow({mode: 'open'});

    this.altText = this.getAttribute('alt');
    this.src = this.getAttribute('src');

    // Then lets render the template
    this.render();
  }

  render() {
    this.shadowObj.innerHTML = this.getTemplate();
  }

  getTemplate() {
    return `

      ${this.handleErrors()}

    `;
  }

  handleErrors() {
    if(!this.getAttribute('alt')) {
      return `

Missing Alt Text

      `;
    }

    return ``;
  }
}

And I would like to write a unit test to check the following:

altText is getting set in the beginning
src is getting set in the beginning
if altText is empty string or null, the function handleErrors() is getting called.

I have been trying for the past few days now, and I havent been able to understand how I can check these. I was wondering if someone would be able to help me out.
I really dont know what I am doing here, but here is the code:

HeaderImage.showroom.js file inside .showroom folder

export default {
  component: 'header-image',
  alias: 'Extending Native Elements',
  section: 'Vanilla',
  path: '../HeaderImage.js',
  attributes: {
    alt: 'Sky and Clouds',
    src: '../sky.jpg'
  },
  innerHTML: `

  `,
  outerHTML: `

  `

}

HeaderImage.spec.js in test folder

const showroom = require('showroom/puppeteer')();
const assert = require('assert');

describe('header-image', () => {
  before( async () => {
    await showroom.start();
  })

  after( async () => {
    await showroom.stop();
  })

  beforeEach( async () => {
    await showroom.setTestSubject('header-image');
  })

  it('Should update alt text', async () => {
    await showroom.setAttribute('alt', 'Hello Sky');
    const alt = await showroom.getAttribute('alt');
    assert.equal(alt, 'Hello Sky');
  })

  it('Should update altText property', async () => {
    await showroom.setAttribute('alt', 'Hello Sky');
    const imgAlt = await showroom.getProperty('altText');

    // FAILS
    assert.equal(imgAlt, 'test alt text');
  })

  it('should show error class when alt text is not present', async () => {
    await showroom.setAttribute('alt', '');
    await showroom.setAttribute('src', '../sky.jpg');
    const src = await showroom.getAttribute('src');
    assert.equal(src, '../sky.jpg');
  })

  it('Should update src property', async () => {
    await showroom.setAttribute('src', '../sky.jpg');
    const src = await showroom.getProperty('src');

    // FAILS
    assert.equal(src, 'test alt text');
  })
});

The error that I see in Mocha is
1) header-image
       Should update altText property:
     AssertionError [ERR_ASSERTION]: undefined == 'test alt text'
      at Context.it (test/HeaderImage.spec.js:28:12)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  2) header-image
       Should update src property:
     AssertionError [ERR_ASSERTION]: undefined == 'test alt text'
      at Context.it (test/HeaderImage.spec.js:43:12)
      at process._tickCallback (internal/process/next_tick.js:68:7)

I really have no clue what is going on here. And I dont know what I am missing here. Sorry :(
Any help is appreciated.
Thanks

I wonder if you solved your issue.

Nope, sorry.
If you have any suggestions, i would love to hear them.

Sorry no.
Im desperately searching for a webComponent testing lib to integrate with our mocha setup with no avail

Lol... same
I totally understand  your pain.
I have been searching for months.

@prateekjadhwani
your component does not have static get observedAttributes and therefore does not reacts to changes in the attribute.
Could you try again?

@prateekjadhwani Did that work for you?

Sorry @eavichay I havent tried it. I will give it a try this weekend.
Are there more examples in the documentation that I can reference? As in for complex and nested components?

@prateekjadhwani
in your showroom file /.showroom/my-component.showroom.js add to the default export outerHTML property with anything you want.
for example:

<my-component>
<my-nested-component></my-nested-component>
</my-component>

```

Showroom will identify your component within the markup and attach listeners/commands to it. The nested component, however will not be part of the scenario. You can add custom methods to interact with it if required.


Suggestion about the mnist example

Thanks for the nice work!
Just a suggestion about the code of mnist example.
From line 95 - 97, I guess it's better to write in the following way?
    loss_super_avg += loss_super.data*targets.size(0)
    loss_JR_avg += loss_JR.data*targets.size(0)
    loss_avg += loss.data*targets.size(0)

The original code would require a lot more unnecessary memory.

Thank you very much for catching that memory-growth bug! We have fixed it [with .item() rather than .data in order to keep it a bit more uniform with the training part of the code].


Implement spatial block-validation in ibis.iSDM ?

(Spatial) Block validation has so far not been added to the package given the complexities of assigning blocks to single or multiple datasets that might be specified in the model. Thus in most projects we usually implement the cross-validation externally, e.g. providing subsets of training data to individual ibis fits and then validate them externally. I still think outsourcing validation to the user makes the most sense.
However...., given that increasingly we have a range of projects that need to rely on this, we could brainstorm on how to best support this functionality within ibis.
I judge this as a relatively big overhaul if implemented well.
So possible implementation steps:

[ ] I would suggest an implementation using the new spatialsample, which is relatively clean and aligns with the tidy philosophy.
[ ] Idea would be to have a new function called cross_validate() (or another name?) opposed to just validate(). This function would need to store the method and blocks somehow in the BiodiversityDistribution-class object so that it can be queried from within the object.
[ ] During the setup and training stage for each engine, there could be a query for these attributes to create the sets, run per set and store the validation statistics. Note that some engines support internal cross-validation (XGBoost for example).
[ ] The metric to be used for cross-validation would need to be saved in the BiodiversityDistribution-class object and also in the resulting object with the fits.
[ ] (Optional) functionality to not only make a cross-validation but also an ensemble of the various distributions fitted within the object.
[ ] The whole pipeline requires several unittests and likely its own vignette article ("Cross-validation and ensemble modelling") as well to demonstrate the procedure.

Thoughts?

This has been dormant since a while and as we implement this already in a range of processing pipelines, I am still in favour of not adding it directly I think.
Instead provide an extra vignette highlighting (spatial) cross-validation approaches might be an idea. The vignette could simply import and use the spatialsample package


Deprecation Notice with Composer >= 1.10

I have the last php-mock version but I get this notice when composer i -o:
Deprecation Notice: Class phpmock\test\MockNamespaceTest located in ./vendor/php-mock/php-mock/tests/MockNamespaceTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

This pull request solves the issue you described https://github.com/php-mock/php-mock/pull/34.


build(deps-dev): bump @types/node from 18.19.67 to 18.19.68 (#3570)

Bumps @types/node from 18.19.67 to 18.19.68.

Release notes
Commits

updated-dependencies:

dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ...

/test


Session::regenerateSessionId() can trigger warnings

Affected Version
4.3.5 & 4.4.4
Description
After upgrading to 4.4.4, I’ve started seeing the following errors being logged when users reach /Security/changepassword/ after clicking the password reset link in their email:

E_WARNING: session_regenerate_id(): Cannot regenerate session id - session is not active

Steps to reproduce

Perform a password reset for an account you already know the credentials for
When you receive the email, don’t click the link (yet)
Log in with the username/password
Click the reset link in the email

ChangePasswordHandler will log the user out, which in turn “restarts” the current PHP session: https://github.com/silverstripe/silverstripe-framework/blob/eccfa9b10d246d741de2fa83d502339d45068983/src/Security/MemberAuthenticator/ChangePasswordHandler.php#L155-L159
https://github.com/silverstripe/silverstripe-framework/blob/eccfa9b10d246d741de2fa83d502339d45068983/src/Security/MemberAuthenticator/SessionAuthenticationHandler.php#L109-L116
However I don’t think that Session::restart() is working as intended here... I haven’t dug into why, but it looks like it doesn’t actually restart the session properly (that’s what the error suggests anyway...)

That seemt to be a regression introduced by a fix for CVE-2019-12203.
That seems to be only the case for logged-in users. Looks like logOut destroys the active session, so the following session_regenerate_id cannot actually regenerate it after that
https://github.com/silverstripe/silverstripe-framework/blob/eccfa9b10d246d741de2fa83d502339d45068983/src/Security/MemberAuthenticator/ChangePasswordHandler.php#L156-L161

Closed with #9327


Split the workflows on Mainnet and Testnet

Split the workflows on Mainnet and Testnet. Added checks for branch name and tag convention.
Signed-off-by: svetlio<EMAIL_ADDRESS>Detailed description:
Split the workflows on Mainnet and Testnet. Added checks for branch name and tag convention.
Which issue(s) this PR fixes:
Fixes #409
Special notes for your reviewer:

The steps for Setup, Auth, Build, and Push are commented for the review.
A possible solution will be with one workflow. The cons are that there will be many if conditions

Checks look ok!


"Genpact" company - scraper doesn't work

URL: https://admin.peviitor.ro/
Browser: Chrome
Device: Laptop
OS: Windows 11
STEPS TO REPRODUCE:

Open the URL in the browser.
Click on "Scraperi".
Click on "scrapers_python_iurie".
Enter "Genpact" in the search bar.
Select "genpact.py".
Click on "Ruleaza".

EXPECTED RESULTS:
The scraper should run without issues.
ACTUAL RESULTS:
An error occurs.

API has been changed
scraper will be reviewed


Hot Exit: backups are being discarded on shutdown even though file is not dirty?

I noticed that we seem to discard backups for files that are not dirty on shutdown. My understanding is that a non-dirty file cannot be in the backup DB at all, otherwise we have a bug?

@Tyriar that makes sense. As mentioned in other issue I think this should be driven from the main side who is also adding the backup dir.


Indentation failure with many generic arguments

When a set of generic arguments hits max-width, rustfmt seems to have trouble with indentation.
Here's an example:
fn omg() {
fn bar() {
self.core
.exchange::<LeaseBufReader<_, BUFSIZ>, _, LeaseBufWriter<_, BUFSIZ>, _>(
device_index,
src,
dest,
)
.map_err(RequestError::from)
}
}

$ rustfmt --config max_width=80 test.rs

fn omg() {
    fn bar() {
        self.core
.exchange::<LeaseBufReader<_, BUFSIZ>, _, LeaseBufWriter<_, BUFSIZ>, _>(
device_index,
src,
dest,
)
.map_err(RequestError::from)
    }
}

It properly indents the functions, but then gives up on the call to .exchange<...>.

Thanks for reaching out! I believe this is a duplicate of #5249. I'll hold off on closing this until I can confirm if PR #5252 also resolves this issue.

@mkeeter thanks again for opening up the issue. Confirming PR https://github.com/rust-lang/rustfmt/pull/5252 resolves this issue.
If you're curious what the new formatting is you can check out the test case I've added in the linked PR (tests/target/issue_5657.rs).  When we merge the PR we'll close this as well.

Awesome, thanks!


Add component 'date input'

Added in 3.14.2
We can implement this via a template for datetime-inputs module.

DateCompositeField, with no placeholders

DatetimeCompositeField, with placeholder values

If we want the placeholder attributes, which provide hinting, to be completely readable on wider forms, the style needs to be overridden here so that the fields take up the full width of the continer.
Looks like setting  .nsw-form__date-input / --large width as auto would do that.
Would also maintain consistency with other fields in a form.

Full width example, with field above for comparison

Sidebar example, with picker field for comparison. In narrow contexts, the picker field would be better and also native on mobile

@tardinha full width or no ?

It looks nice, except for the placeholder text in the narrow width.

It looks nice, except for the placeholder text in the narrow width.

In the sidebar context, I'd lean to using a standard date input field or clear the default placeholders in the fields. Just an attribute on the field.

resolved in #93


Show progress dialog showing in the foreground during the auth

Describe the bug
Currently, In auth screen when we try to login there is a progress dialog showing in the foreground so we need to show the progress dialog during the auth.
To Reproduce
Steps to reproduce the behaviour:

Launch app
Add correct credentials
Login

Expected behaviour
Show progress dialog as once waits to be authenticated
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):

Emulator
Additional context
N/A

What's the status of this issue @syedowaisali90?

@f-odhiambo WIP will be done by today-end


Using npm start instead of node start

This follows the discussion in #6. Using npm start rather than hardcoding the entry point makes no assumptions about the user's project setup, allowing the cartridge to be more flexible

Thanks, will pull this later today!
My only slight concern is that using npm start creates an additional process which, as far as I've noticed, takes about 31 MB of memory on OSX.
31 MB doesn't seem like much on a development machine, but I remember I once had to do some memory usage fine-tuning for an application running on Heroku.
I guess we'll have to see what it means for an actual application running on OpenShift.

Thanks for this @icflorescu :-) I can't imagine 31 MB being too much of an issue, but we'll have to wait and see!


Error in ScmRun.filter

When using the filter function of ScmRun I sometimes get the error
'Index' object has no attribute 'categories'
raised in line 179 of filter.py. If you need more information on inputs, I can provide them, but to me it looks like an error that will always appear when running this specific line.
Below the detailed output.
The error appears both in the current revision and e21bda1. I have not checked revisions in between.
Pandas version is 1.1.5 on Python 3.8
  File "/home/XXX/.local/lib/python3.8/site-packages/scmdata/run.py", line 1050, in filter
    _keep_times, _keep_rows = self._apply_filters(kwargs)

  File "/home/XXX/.local/lib/python3.8/site-packages/scmdata/run.py", line 1118, in _apply_filters
    keep_meta &= pattern_match(

  File "/home/XXX/.local/lib/python3.8/site-packages/scmdata/filters.py", line 179, in pattern_match
    subset = [m for m in meta_col.categories if pattern.match(m)]

AttributeError: 'Index' object has no attribute 'categories'

****************************************
Entering post mortem debugging...
****************************************
> /home/XXX/.local/lib/python3.8/site-packages/scmdata/filters.py(179)pattern_match()
    177                 pattern = re.compile(_regexp if not regexp else str(s))
    178
--> 179                 subset = [m for m in meta_col.categories if pattern.match(m)]
    180
    181                 if level is not None:

Thanks for raising, it’s probably pandas 1.1.5 but can you provide a test case so we can check if we can reproduce?

The error also appeared with Pandas 1.0.5
I'll produce a simple test case. For me it appeared during processing of a longer file, so I have to find the actual data that caused the error.

I think the problem is on my side. I modify the metadata structure before the error occurs and it seems that I modify it's datatype as well and thus the error occurs.

The problem is not directly in scmdata, but in how I manipulate the metadata. But in case you're interested here is a minimal example to reproduce the error.
test_data_2.csv.zip
test_file = 'test_data_2.csv'
test_filter = {'category': ['temp', 'test']}
replacements = {'0': 'temp', '1': 'test'}

# read some data
DF = scmdata.run.ScmRun(test_data_2.csv)
# get the metadata for manipulation
index_DF = DF._meta.to_frame()
# do some replacing of category codes (without this operation the error does not occur)
index_DF['category'].replace(replacements, inplace = True)
# write back the metadata
DF._meta = pd.MultiIndex.from_frame(index_DF)
# filter
DF = DF.filter(**test_filter, inplace = False, keep = True)

DF._meta = pd.MultiIndex.from_frame(index_DF)

This is the problem line, manipulating _meta directly means you end up with an index that is not of categorical type, that leads to your later error.
You can instead do
replacements = {'0': 'temp', '1': 'test'}
test_filter = {'category': ['temp', 'test']}

df = scmdata.ScmRun(test_file)
# just update directly, no need to alter `_meta`
df["category"] = df["category"].replace(replacements)
df.filter(**test_filter)

Thanks for the support. I had figured out the categorical problem (just no time to post it here), but not the easy solution. Was this already possible in the old scmDataFrame? The direct updating of _meta came from updating code that used scmDataFrame and was no longer working. I'll close the issue now unless there are objections.

No it’s a new thing (I think). Closing sounds good


Wrap in backticks the command in case of internal parse errors

Follow up to #366.
Outputting the original command as code avoids a tag and it's also easier to read.
In the following case the error message comes from an exception. A simple replace should work imo.

In my case I've got a customized error message, using
parseErrorStrategy = ParseErrorStrategy.COMMENT_MESSAGE_HELP_ERRORS,
parseErrorMessage = "> `%s`\n\n:warning: Unable to parse the command.",

So don't mind the duplication.

Btw, the outputted help content is too generic, so it's also unnecessary in this case.
I don't know if there is way to output a the actual command help.

Btw, the outputted help content is too generic, so it's also unnecessary in this case.

There's no way to make it more specific given we were unable to parse the message, I will just remove it.
I like your output, I will make it the default and also get rid of the command in the unbalanced quotes error as it's redundant.

@gsmet

There's no way to make it more specific given we were unable to parse the message, I will just remove it.

Sounds perfect for this kind of errors.

I like your output

Before you merge the PR, consider my current convention (the screenshot a couple days old).
Errors: :rotating_light: 🚨
Warnings: :warning: ⚠
Info: :loudspeaker: 📢
So this would be 🚨
Well seems like I wasn't fast enough 🤣

Ah yeah, I struggled to find a nice error icon but yours is a good proposal. I'll update it and it can go in the next release.

Adjusted and I shipped another release while at it. So 1.13.2 should hit Central soon with all the changes.
Thanks for the suggestions!

@allcontributors add lppedd for bugs


Vocoder ParallelWaveGAN

Hi,
I have learned model in our language using your repository. Melgan as vocoder was learning very slow, so i used https://github.com/kan-bayashi/ParallelWaveGAN
Have you tried to use it with this vocoder?
I have learned new model using your default configuration and this  configuration from ParallelWaveGAN. Did i miss something?
Final audio is here "Hello how are you". When using grifim limm as vocoder, it is working fine.
I don't see fft_bins or bits in ParallelWavegan configuration, is this the problem?
Thanks a lot for your work!
Tom

I have tried default melgan vocoder (from https://github.com/seungwonpark/melgan). I have synthesized hello world 4x times using my model.
Output from melgan vocoder is like reversed https://soundcloud.com/tom-lysek-832824742/hello-world-melgan/s-liaMpH3Ijx5
This is spectrogram from mels

Transformation from mels to wav was performed using this code
`m = (torch.tensor(mels).unsqueeze(0))
with torch.no_grad():
if len(m.shape) == 2:
m = m.unsqueeze(0)
wav = model.inference(m).cpu().numpy()
ipd.Audio(wav, rate=hp.sample_rate)`
and mels is m from synthesize funkction in notebook_utils/synthesize.py
Do you have any thoughts?
Tom

Hi, therthe synthesize.py from notebook_utils already outputs mels in the correct format for melgan, maybe you are expanding too much? In the colab notebook its using the default melgan model for LJSpeech. PWGAN should actually work similarly I believe (it has the same preprocessing as melgan)
Thats the synthesize.py mel processing for melgan:

m = torch.tensor(m).unsqueeze(0).cuda()

There are same result when i use gen_forward.py to produce .mel file and then convert it to wav with inference.py from melgan as if I was using jupyter.
I have tried to use your function synthesize with this setup

And result is same.
If i change this bad vocoder for default vocoder (from your example) result is this https://soundcloud.com/tom-lysek-832824742/hello-world-default-melgan/s-zpnjVYgxrAu
So i assume that this vocoder was learned with some error.
I was using this hyperparameters (default hyperparameters):

left is hparams from ForwardTacotron right is default.yaml from melgan repository.
Did I miss something? Is there some misconfiguration? Only difference is filter_length vs. fft_bins, but I don't think that is the difference :/
I have used sox to see if there is problem with input files but they have same parameters:

1.wav is my own dataset, LJXXX.wav is LJ speech.

Hi, there is a sample rate of 16k for melgan, this would be a mismatch!

Hmm I don't see a mismatch. Does the pretrained ForwardTacotron model work for you with the standard melgan?

i have used vocgan and everything was fine. Maybe model was learned badly.


[SPARK-22136][SS] Evaluate one-sided conditions early in stream-stream joins.

What changes were proposed in this pull request?
Evaluate one-sided conditions early in stream-stream joins.
This is in addition to normal filter pushdown, because integrating it with the join logic allows it to take place in outer join scenarios. This means that rows which can never satisfy the join condition won't clog up the state.
How was this patch tested?
new unit tests

Test build #82526 has started for PR 19452 at commit c90fb3c.

Test build #82528 has started for PR 19452 at commit 026a33b.

Test build #82526 has finished for PR 19452 at commit c90fb3c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82526/
Test PASSed.

Test build #82528 has finished for PR 19452 at commit 026a33b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82528/
Test PASSed.

Merged build finished. Test PASSed.

Test build #82533 has started for PR 19452 at commit 8c2a39f.

Test build #82533 has finished for PR 19452 at commit 8c2a39f.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
  case class JoinConditionSplitPredicates(

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82533/
Test PASSed.

Test build #82706 has started for PR 19452 at commit 347b92d.

Test build #82706 has finished for PR 19452 at commit 347b92d.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82706/
Test FAILed.

Test build #82710 has started for PR 19452 at commit 6753825.

Test build #82710 has finished for PR 19452 at commit 6753825.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82710/
Test PASSed.

Test build #82743 has started for PR 19452 at commit 94dfa85.

Test build #82743 has finished for PR 19452 at commit 94dfa85.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82743/
Test PASSed.

Test build #82748 has started for PR 19452 at commit 0a753ed.

Test build #82748 has finished for PR 19452 at commit 0a753ed.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82748/
Test PASSed.

Test build #82794 has started for PR 19452 at commit caf8638.

Test build #82794 has finished for PR 19452 at commit caf8638.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82794/
Test PASSed.

Test build #82817 has started for PR 19452 at commit d4984c7.

Test build #82818 has started for PR 19452 at commit 8eb1228.

Test build #82819 has started for PR 19452 at commit 23db42c.

LGTM. Will merge after tests pass.

Test build #82817 has finished for PR 19452 at commit d4984c7.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82817/
Test PASSed.

Test build #82818 has finished for PR 19452 at commit 8eb1228.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82818/
Test PASSed.

Waiting for build 82819 to pass.

Test build #82819 has finished for PR 19452 at commit 23db42c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82819/
Test PASSed.

Merged build finished. Test PASSed.


Single file Uri without list

Thank you for this library.
Your documentation and sample app seem to only make reference to multiple files (list). I will love to see how you recommend I implement this for a file picker than will only pick one file.

I appreciate the feedback.
I chose to use only lists to reduce the amount of methods, leaving the library cleaner.
These methods are for both multiple uri's and just one. I would recommend the same usage it contains in the example. Since you are working with only one uri, you would receive a list with only one element.
If you think you are confused to understand let me know that I update the documentation and sample application, adding the use of just one file.
If you have any suggestions to add to the library or to change, I would be grateful to know.

@buildbro Hello,
Have you made any progress?
Any suggestions or questions you have, I will be happy to help you.

@buildbro Hello,
Have you made any progress?
Any suggestions or questions you have, I will be happy to help you.

Thanks for your response. And yeah I made progress.

@buildbro It really was a little confusing for anyone working with a single uri. Sorry for the delay, but this project runs in parallel with my other projects.
This week I will add methods to work with just one uri. I will put it in the readme and update the sample application with the demo.
As soon as I'm done, I'll mark it here.

As soon as version 1.0.7 is published, the readme will be updated with the methods referring to the pull request.

@buildbro.
Published version 1.0.7 and updated readme for use with a single uri.
I hope the documentation helps you. If you need anything, I'm at your disposal.


Join side aliases should be optional

Description
Imaging a case as following: Assume table1, table2, and table3 all contain a column id.
select
  *
from
  table1 t1,
  table2 t2,
  table3 t3
where
 t1.id = t2.id
 and t1.id = t3.id

To rewrite above SQL query to PPL query, we will get
source = table1
| join left = t1 right = t2 ON t1.id = t2.id table2
| join left = l1 right = t3 ON t1.id = t3.id table3 // <------ issue here!

The PPL query throws an exception with message:

t1.id cannot be resolved, Did you mean one of the following? [l1.id, l1.id, t3.id].

It because the required left side alias l1 overrides the table alias t1 and t2.
Its logical plan looks
'Project [*]
+- 'Filter (('t1.id = 't2.id) AND ('t1.id = 't3.id)) <------ t1.id cannot be resolved
   +- 'Join Inner
      :- 'SubqueryAlias l1  <------ issue root cause
      :  +- 'Join Inner
      :    :- 'SubqueryAlias t1
      :    :  +- 'UnresolvedRelation [table1], [], false
      :    +- 'SubqueryAlias t2
      :       +- 'UnresolvedRelation [table2], [], false
      +- 'SubqueryAlias t3
         +- 'UnresolvedRelation [table3], [], false

Check #857 for details
Related Issues
Resolves #857
Check List

[x] Updated documentation (docs/ppl-lang/README.md)
[x] Implemented unit tests
[x] Implemented tests for combination with other commands
[ ] New added source code should include a copyright header
[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Without this fixing, q21 in TPCH couldn't be rewritten to PPL. Link https://github.com/opensearch-project/opensearch-spark/issues/806

@LantaoJin also plz resolve conflicts...

Conflicts is related to imports. CI tests succeed with the related files. Merging to main.


Find bad DateTimeZone.forID / TimeZone.getTimeZone parameters

@kluever found ~20 files with occurrences of "America/Los Angeles" (rather than "America/Los_Angeles").  I see ~15 with "America/New York."
There are at least two ways to approach this:

In about 1/3 of these cases is the string literal used directly as a parameter to one of the standard "create a time zone" methods. For those cases, we can actually call the method at compile time (or otherwise maintain a list of known good time zones) -- if we trust for the data available to Error Prone to match the data available at runtime. The upside here is that we catch not only space-underscore mixups but also misspellings.
Regardless of how it is being used, "America/Los Angeles" is unlikely to be correct. We could error out on all strings with apparent space-underscore time-zone mixups (or on all strings with an edit distance close to a known time zone -- edit-distance support may show up in Guava in 2016, if that helps).

(Does JDK8 have any new time-zone APIs? Maybe ZoneId.of?)

Kurt points out that some of these APIs will, when given a bad timezone, actually return The Unknown Timezone rather than throw an exception as I would have expected.

It looks like org.joda.time.DateTimeZone, java.util.TimeZone, and java.time.ZoneId all have getAvailableIDs methods that enumerate all valid ID strings.
We have edit distance already in Error Prone:

InvalidTimeZoneID was introduced to cover TimeZone.getTimeZone, but I'm not sure we did anything with the other two.

Oh, wait, there's InvalidZoneId, too. So maybe just not the Joda one, which we care less about.


Increase test tolerances on some analytical decomposition tests

Fixes #5533
I don't feel great about this, because we don't have a principled way of choosing these tolerances, some of which already seem quite generous (1e-4 is not enough in one case). But this should upblock other PRs.

Automerge cancelled: Pull Request is not mergeable.


NestedScrollView + TabBarView + AutomaticKeepAliveClientMixin Abnormal behavior

Please watch the two videos.
Did not use AutomaticKeepAliveClientMixin.
https://user-images.githubusercontent.com/7686137/103390437-5aa20800-4b4f-11eb-917b-ede9a4bdc351.mp4
Used AutomaticKeepAliveClientMixin.
https://user-images.githubusercontent.com/7686137/103390442-6097e900-4b4f-11eb-921a-65a86625525a.mp4
After sliding the second page, the headerSliver behaves abnormally when sliding the first page again.
class DemoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Demo'),
      ),
      body: NestedScrollView(
        headerSliverBuilder: (context, _) {
          return [
            SliverToBoxAdapter(
              child: Container(
                height: 200,
                color: Colors.red,
              ),
            )
          ];
        },
        body: DefaultTabController(
          length: 2,
          child: TabBarView(
            children: [
              _ListPage1(),
              _ListPage2(),
            ],
          ),
        ),
      ),
    );
  }
}

class _ListPage1 extends StatefulWidget {
  const _ListPage1({
    Key key,
  }) : super(key: key);

  @override
  __ListPage1State createState() => __ListPage1State();
}

class __ListPage1State extends State<_ListPage1>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return ListView.builder(
      itemCount: 100,
      itemBuilder: (context, index) {
        return Container(
          height: 50,
          color: index % 2 == 0 ? Colors.green : Colors.blue,
          alignment: Alignment.center,
          child: Text(index.toString()),
        );
      },
    );
  }

  @override
  bool get wantKeepAlive => true;
}

class _ListPage2 extends StatefulWidget {
  const _ListPage2({
    Key key,
  }) : super(key: key);

  @override
  __ListPage2State createState() => __ListPage2State();
}

class __ListPage2State extends State<_ListPage2>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return ListView.builder(
      itemCount: 5,
      itemBuilder: (context, index) {
        return Container(
          height: 50,
          color: index % 2 == 0 ? Colors.yellow : Colors.amber,
          alignment: Alignment.center,
          child: Text(index.toString()),
        );
      },
    );
  }

  @override
  bool get wantKeepAlive => true;
}

@HaijunWei
Can you check out this similar open issue and confirm if it resemble yours ?

Yes, the problem he described also exists

Yes, the problem he described also exists

@HaijunWei
Please provide flutter doctor -v.

@HaijunWei
Please provide flutter doctor -v.

[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale
zh-Hans-CN)
• Flutter version 1.22.5 at /Users/haijun/flutter
• Framework revision<PHONE_NUMBER> (4 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/haijun/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.0
[✓] Connected device (1 available)

[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale
zh-Hans-CN)
• Flutter version 1.22.5 at /Users/haijun/flutter
• Framework revision<PHONE_NUMBER> (4 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/haijun/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.0
[✓] Connected device (1 available)

@HaijunWei
What's the issue here again ? I can't find the difference between the videos you linked earlier.

@HaijunWei
What's the issue here again ? I can't find the difference between the videos you linked earlier.

Please take a closer look. After switching tabs back and forth, headerSliver will appear as if float is turned on, but I did not turn on float.

Please take a closer look. After switching tabs back and forth, headerSliver will appear as if float is turned on, but I did not turn on float.

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-IN)
    • Flutter version 1.22.5 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision<PHONE_NUMBER> (4 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11
      (API 30) (emulator)

! Doctor found issues in 1 category.

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-IN)
    • Flutter version 1.22.5 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision<PHONE_NUMBER> (4 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11
      (API 30) (emulator)

! Doctor found issues in 1 category.

I have also encountered this problem. Has it been solved?

I have also encountered this problem. Has it been solved?

No, waiting for the official solution.

No, waiting for the official solution.

This problem has been raised for a long time. Are there any restoration plans in the near future?

This looks like a duplicate of https://github.com/flutter/flutter/issues/81619 I am going to close this to focus conversation and work in one place, please continue to follow https://github.com/flutter/flutter/issues/81619.
If you feel that this is a separate issue, let us know and we can take another look! Thanks!


"Mogoșani", "Chirca" are listed in the drop-down menu

Description:
When user writes ”Mogoșani” and "Chirca" the locations appear in the drop-down menu next to the comune and the county which is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Mogoșani"

Expected results
The location appears in the drop-down menu as "Sat Mogoșani, DÂMBOVIȚA (Mogoșani)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Chirca"

Expected results
The location appears in the drop-down menu as "Sat Chirca, DÂMBOVIȚA (Mogoșani)".


Wrong state of LEDs for devBoard

I am using the project-teachable code on my devBoard. Unfortunetly i do have a minor problems with the LED output.
Examples of the porbable issue
Below i try to summerize whre the issue that tirggers a problem.
Incorrect code for GPIO.write() with wiggle
From my point of view the below code should switch on the LEDs one by one and turn them off.
def wiggleLEDs(self, reps=3):
    for i in range(reps):
      for i in range(5):
        self.setLED(i, True)
        time.sleep(0.05)
        self.setLED(i, False)

But the called function does the opposite:
def setLED(self, index, state):
   """Abstracts away mix of GPIO and PWM LEDs."""
   if type(self._LEDs[index]) is GPIO: self._LEDs[index].write(not state)
   else: self._LEDs[index].duty_cycle = 0.0 if state else 1.0

Due to the not state the result of the boolean is False, so the already switched off LED gets switched off again and vice versa.
Incorrect code for classifcation signal by LED
This seems also be ture for the fowolling function:
def setOnlyLED(self, index):
    for i in range(len(self._LEDs)): self.setLED(i, False)
    if index is not None: self.setLED(index, True)

Incorrect code for --testui
The above said is also ture for the following def:
  def testButtons(self):
    while True:
      for i in range(5):
        self.setLED(i, self.isButtonPressed(i))
      print('Buttons: ', ' '.join([str(i) for i,v in
          enumerate(self.getButtonState()) if v]))
          time.sleep(0.01)

If no button is pressed the expression self.isButtonPressed(i) returns False which gets converted by not state to a true boolean. The result is a light gleam of all LEDs at all time during the button test (sudo python3 teachable.py --testui).
Possible solutions
Info: Only for GPIO
Instead of sending the state var in the def and use not it's possible to get the current "actual" state of the GPIO by using self._LEDs[index].read()
def setLED(self, index):
    """Abstracts away mix of GPIO and PWM LEDs."""
    if type(self._LEDs[index]) is GPIO:
         self._LEDs[index].write(not self._LEDs[index].read())
    else: self._LEDs[index].duty_cycle = 0.0 if state else 1.0

Use code without not in setLED()

This one worked for me

def setLED(self, index, state):
    """Abstracts away mix of GPIO and PWM LEDs."""
    if type(self._LEDs[index]) is GPIO:
         self._LEDs[index].write(state)
    else: self._LEDs[index].duty_cycle = 0.0 if state else 1.0

I just tried this on my devboard and it works correctly. Note that the LED GPIOs and PWMs are supposed to be wired as sinks, not sources. (i.e. the GPIO pin connects via the LED to 3.3V not to ground). So when the GPIO is set to high (i.e. 3.3V) the LEDs is off and when the GPIO is set to low (0V) the LED is ON, as there's now a voltage drop across it. Thus the logic in the code is inverted intentionally (self._LEDs[index].write(not state)).
Check that your wiring is exactly as shown here: https://coral.withgoogle.com/projects/teachable-machine/

Thanks for your answer. True, I do have a different wiring (inclunding ground). I'll colse the issue.


[Request] Publish scheduler events to pod

The default scheduler publishes events to pod:
  FirstSeen	LastSeen	Count	From			SubObjectPath				Type		Reason		Message
  ---------	--------	-----	----			-------------				--------	------		-------
  17m		17m		1	default-scheduler						Normal		ScheduledSuccessfully assigned kube-batchd-5f86bd5b6-hx8kt to ist

But batchd does not implement it, it seems that batchd does not have the recorder. I think it should be added to make users know which scheduler schedules the pod.

hmm... Maybe we can publish event in 'Job' level :). For some batch workload, there'll be so many tasks (Pods) there.

We already have an event for PodGroup (job level).
13s         Warning   unschedulable      PodGroup   not enough valid tasks for gang-scheduling


glib: implement DerefMut for ClassRef/InterfaceRef

Needed to be able to write such code
let cell_class: glib::object::ClassRef<CellArea> =
    glib::Class::from_type(O::static_type()).unwrap();
let pspec: Option<glib::ParamSpec> =
    from_glib_none(ffi::gtk_cell_area_class_find_cell_property(
        cell_class.as_mut() as *mut _ as *mut ffi::GtkCellAreaClass,
        property_name.to_glib_none().0,
    ));

        cell_class.as_mut() as *mut _ as *mut ffi::GtkCellAreaClass,

Should be
cell_class.as_ref() as *const _ as *mut _ as *mut ffi::GtkCellAreaClass,

Or similar. The C function is not actually changing the class, is it? It just is not a const pointer in C because C.

I'm wondering  why glib::Class::from_type doesn't have any reference to T. Which requires explicitly writing glib::object::ClassRef<T>. Any reason for not making it glib::Class::from_type::<T>?

I'm wondering why glib::Class::from_type doesn't have any reference to T. Which requires explicitly writing glib::object::ClassRef<T>. Any reason for not making it glib::Class::from_type::<T>?

How about glib::Class::<T>::from_type(typ)?

I'm wondering why glib::Class::from_type doesn't have any reference to T. Which requires explicitly writing glib::object::ClassRef<T>. Any reason for not making it glib::Class::from_type::<T>?

How about glib::Class::<T>::from_type(typ)?

That actually works. I somehow never thought you would write it that way. Also R-A seems to be unable to guess the type in such case, but that's not a problem as the code compiles :-)
I suppose, this can be closed as it's not really useful, at least, I solved the use case I thought I had.

I suppose, this can be closed as it's not really useful, at least, I solved the use case I thought I had.

Well, not just "not useful" but it's wrong :) With your change you can get mutable access to the class struct after type initialization. That must not happen.


Add Author to the Library Management System

Administrator needs to add authors to the library management system in order to manage the book entries in the system. Following tasks are identified as the tasks to complete this user story.

[x] Design the add author API Specification  https://github.com/chinthakarukshan/lbms/issues/17
[x] Implement add author API - https://github.com/chinthakarukshan/lbms-admin-service/issues/14
[x] Write unit tests to the add author API - https://github.com/chinthakarukshan/lbms-admin-service/issues/15

User Story Completed


Does it support Iaas or Xaas?

We have a plane to use this kitchen-vro plugins for Xaas service. Does it support this?

kitchen-vro just drives a workflow that you call. you can think of it like a knife command with a built in delete/test command.


Different templates in "containers" row after each page reload

If you have more then one environment, open "Environments" tab and you will see the following:

F5, and look at "containers" row:

"Hadoops" environment is made of hadoop template, second one is masters.
Seems like a bug.

fixed


Doesn't save Scale by/Scale to information.

It'd be nice (if possible) if this could (optionally?) save Scale by/to sliders and Upscaler method.

This inputs must be saved like all the others. Is something not working for you?

Typically Post-process upscaling is done in the Extras tab, but you can add it to the txt2img tab (via Settings) and have it auto-run immediately after generating an image. This extension doesn't seem to recognise this.
My go-to settings;

Upscale state test before;

Upscale state test after;

Notice the Upscale settings haven't saved.
Note that these aren't the Hires Fix settings.

I see. I checked this and unfortunatelly these elements have same ids in txt2img and img2img. I will be able to do this only after (if) this is fixed in Web UI.

Fixed in last update. State is the same for txt2img and img2img since the elements still share the same ids.


Differentiates b/w schedule vs dynamic jobs + Clears scheduled jobs upon schedule load

fixes #428
fixes #429

@markets please review.

Thanks for working on this @sandip-mane!
I think we should change a bit how with set the source: "schedule". Right now, you added it in the load_from_array method, but this can cause problems:

People calling this method from code will set "schedule" for dynamic jobs
People using the schedule_loader with a hash (https://github.com/sidekiq-cron/sidekiq-cron/blob/master/lib/sidekiq/cron/schedule_loader.rb#L13)

So, not sure if I'm missing something, but I think the correct way should be something like: merge the source: "schedule" pair only in the schedule_loader code, like: Sidekiq::Cron::Job.load_from_hash schedule, { source: "schedule" }. Everything else should be marked dynamic right?

Yes, makes sense. I'll make the change.
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

From: Marc Anguera @.>
Sent: Saturday, October 28, 2023 3:59:38 AM
To: sidekiq-cron/sidekiq-cron @.>
Cc: Sandip Mane @.>; Mention @.>
Subject: Re: [sidekiq-cron/sidekiq-cron] Differentiates b/w schedule vs dynamic jobs + Clears scheduled jobs upon schedule load (PR #431)
Thanks for working on this @sandip-manehttps://github.com/sandip-mane!
I think we should change a bit how with set the source: "schedule". Right now, you added it in the load_from_array method, but this can cause problems:

People calling this method from code will set "schedule" for dynamic jobs
People using the schedule_loader with a hash (https://github.com/sidekiq-cron/sidekiq-cron/blob/master/lib/sidekiq/cron/schedule_loader.rb#L13)

So, not sure if I'm missing something, but I think the correct way should be something like: merge the source: "schedule" pair only in the schedule_loader code, like: Sidekiq::Cron::Job.load_from_hash schedule, { source: "schedule" }. Everything else should be marked dynamic right?
—
Reply to this email directly, view it on GitHubhttps://github.com/sidekiq-cron/sidekiq-cron/pull/431#issuecomment-1783577101, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACLH6HZDM3YOG4VEHKL7U63YBQYVFAVCNFSM6AAAAAA6TMAF42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGU3TOMJQGE.
You are receiving this because you were mentioned.Message ID: @.***>

People calling this method from code will set "schedule" for dynamic jobs

I had considered this use case, and assumed that folks would be using Sidekiq::Cron::Job.create or Sidekiq::Cron::Job.new().save. I might be wrong because I have not used dynamic jobs yet.

People using the schedule_loader with a hash (https://github.com/sidekiq-cron/sidekiq-cron/blob/master/lib/sidekiq/cron/schedule_loader.rb#L13)

load_from_hash method internally uses load_from_array itself. Hence, load_from_array seems single source of truth. Ref: load_from_hash
One problem with the new approach:

Sidekiq::Cron::Job.load_from_hash schedule, { source: "schedule" }

There's still one problem with this approach.
Some people might be using their custom schedule loading mechanism, in that case, their actual scheduled jobs will still have source=dynamic.
Thoughts?

@markets missed mentioning you above.

@markets
I like the idea of setting the default to schedule. But, that way, most people, will have to make some changes to use the dynamic cronjobs and until they do, they will keep on losing the jobs. (As we are clearing the scheduled jobs on load) Assume someone using dynamic jobs in an old implementation upgrades the gem to the latest version, they will lose all their dynamic jobs, without any deprecation warning etc.
I have used dynamic as default so that when people migrate, their existing cronjobs are not lost.

I have another approach in mind:
Currently, we have load_from_hash! and load_from_array! methods, these are being used for loading the schedule from the loader script here:
https://github.com/sidekiq-cron/sidekiq-cron/blob/c020a4a4562cfe7ffe21ffdfb8175bee5a87915f/lib/sidekiq/cron/schedule_loader.rb#L12-L18
We can create 2 new methods, i.e. load_schedule_from_hash! and load_schedule_from_array! which will default to loading the jobs as schedules. We can then add these to README for loading schedules from files.
This way, even if people don't use new methods that add jobs as schedule, they will not lose their jobs that are loaded with load_from_array!/load_from_hash!.
Please suggest.

Ok! I 100% agree with this 👇🏼 That's a really important point and we don't want to broke this again.

Assume someone using dynamic jobs in an old implementation upgrades the gem to the latest version, they will lose all their dynamic jobs, without any deprecation warning etc.

About the approach with new methods: I think we are not fixing so much (they are quite similar to call it with the param { source: "schedule" }) and we're introducing new public API.
Probably going with "dynamic" by default seems safe approach. So I think we can keep that, but instead of using a default value in the method, let's pass it from the scheduler loader { source: "schedule" }. Additionally, let's add docs in the README about this new attribute (https://github.com/sidekiq-cron/sidekiq-cron?tab=readme-ov-file#job-properties), the default value, what it does, ... Around here seems also a good place to explain it for people going with option 3:

What do you think?

Sounds good. I will make these changes. 👍

@markets I've added the suggested changes, please review.

@sandip-mane just added a couple of minor comments, but overall looking good 👍🏼

@markets I have made the changes.

Thanks @sandip-mane! I'm going to prepare a new release 🚀

Hey gang, this really caught us out because it was added in a minor version bump, but the fact that the newly optional source: 'dynamic' or source: 'schedule' affects whether bang-suffixed methods delete old jobs is actually a breaking change - our schedule-loading code stopped deleting old jobs.
I think this should've been a 2.0.0 instead of a 1.11.0.


Unable to get this working

This is mostly a help request; I am not sure I'm dealing with bugs here.
First of all I find it very confusing how this library works. Despite the examples I see in the test directory, it's unclear to me what I'm doing wrong. I do not think I'm seeing logs sent to my collector.
I'll explain the issue/situation and then provide a dump of config/code/etc below.
What I'm doing is hitting a particular endpoint in my app service using Postman, which in its controller does a _log.Information("blah blah"). I expect to see that log in the console output from the ADOT collector. However, I don't think I'm seeing it (I don't see the "blah blah" message anywhere in the output).
I'm not sure why. Is it the hostname? I'm not sure where the /v1/logs endpoint comes from; is that officially documented somewhere? And why is the hostname specified separately from the same one I specify in the official OTel library configuration (I assume because the two are completely separate and this logging sink does not tie into it)?
Lastly, I know that logs can be attached to spans as events, or sent as actual logs (and that use the logs exporter type in the collector pipeline config). I'm still figuring out the difference between the two in terms of what to use and when, but I assume that the Serilogs should be attached to spans as events, since the one log in particular I'm testing with is done in the middle of the Get() method in the controller.
Please let me know what I'm doing wrong and where my misunderstandings lie. Thank you. Detailed information follows.
I'm using these packages:
    <PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.4.0-rc.3" />
    <PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.4.0-rc.3" />
    <PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.12" />
    <PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9.12" />
    <PackageVersion Include="Serilog.AspNetCore" Version="6.1.0" />
    <PackageVersion Include="Serilog.Sinks.OpenTelemetry" Version="0.5.0-dev-00078" />

Here is how I'm setting up OpenTelemetry in my ASP.NET WebApi project (using dotnet 7):
    private static void SetupOpenTelemetry(IServiceCollection services)
    {
        const string serviceName = "Monitor.Deployment";
        var resourceBuilder = ResourceBuilder.CreateDefault()
            .AddService(serviceName, GitVersionInformation.SemVer);

        var meter = new Meter(serviceName);
        var counter = meter.CreateCounter<long>("app.request-counter");

        services.AddOpenTelemetry()
            .WithTracing(builder => builder
                .AddSource(serviceName)
                .SetResourceBuilder(resourceBuilder)
                .AddHttpClientInstrumentation()
                .AddAspNetCoreInstrumentation()
                .AddOtlpExporter(options =>
                {
                    options.Endpoint = new Uri("http://otel:4317");
                }))
            .WithMetrics(builder => builder
                .AddMeter(meter.Name)
                .SetResourceBuilder(resourceBuilder)
                .AddHttpClientInstrumentation()
                .AddAspNetCoreInstrumentation()
                .AddOtlpExporter(options =>
                {
                    options.Endpoint = new Uri("http://otel:4317");
                }))
            .StartWithHost();

        services.AddTransient<IRequestCounter>(_ => new RequestCounter(counter));
    }

And here is the logger set up in C# code (I won't share appsettings.json since it's simple and just sets up the console sink):
builder.Host.UseSerilog((_, c, logConfig) => logConfig
    .ReadFrom.Configuration(c.GetRequiredService<IConfiguration>())
    .Enrich.FromLogContext()
    .Enrich.WithTraceIdAndSpanId()
    .WriteTo.OpenTelemetry("http://otel:4317/v1/logs"));

The hostname for the collector endpoint, otel, is the docker DNS name. I am using my app and the collector together in a docker compose stack, as shown below (docker-compose.yml):
networks:
  app_network:

services:
  app:
    image: snip
    build: context
    networks: [app_network]
    ports:
      - 5054:80
    volumes:
      - ${HOME}/.aws:/root/.aws:ro
    environment:
      - AWS_REGION=us-east-1
      - AWS_PROFILE
      - ASPNETCORE_ENVIRONMENT=Development
      - DeploymentsBucketName
      - DeploymentsTableName

  otel:
    image: amazon/aws-otel-collector
    command: ["--config=/config/otel-collector-config.yml"]
    networks: [app_network]
    environment:
      - AWS_REGION=us-east-1
      - AWS_PROFILE
    volumes:
      - ./otel-config:/config:ro
      - $HOME/.aws:/root/.aws:ro

Here is my collector config:
receivers:
  otlp:
    protocols:
      grpc:

processors:
  batch:

exporters:
  logging:
    verbosity: detailed
  awsxray:

extensions:
  health_check:
  pprof:
  zpages:

service:
  extensions: [health_check, pprof, zpages]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [awsxray, logging]

@nblumhardt /@loomis any chance one of you could enable the 'Discussions' feature for the repo and move these types of issues over there?

It's worth noting that if the discussion tab had been there, I would have used that in the first place. I always check for that first as I understand the annoyance of having questions posted as issues.

I'll take a look at this later today. The discussion area was opened, you can move it there if you want, but can also reply here.

I'm happy to keep it here if you are. There's a "Convert to Discussion" option on the right side, that only repo members can use.
I want to also update that I'm seeing this working if I enable service.pipelines.logs in the collector YAML. However, I was hoping the logs would get added to the span as an event, since the logs occur within the scope of an HTTP request.
Perhaps once you take a look you can help clarify my understanding of why logs show up as disconnected data instead of span events.
Thank you.


more conda-forge tarballs needed for Matplotlib...

https://anaconda.org/conda-forge/matplotlib supports quite a few more tarballs than contourpy presently does.  (In my particular case osx-arm64, but likely the others are needed as well).

New platforms needed on conda-forge contourpy-feedstock:

linux-aarch64
linux-ppc64le
osx-arm64

Closed by https://github.com/conda-forge/contourpy-feedstock/pull/11. Now available at https://anaconda.org/conda-forge/contourpy are

just checked, and this works for me on osx-arm64 (and all test_contour.py passes)
+ contourpy            1.0.2  py39hab5e169_2  conda-forge/osx-arm64     224 KB

Thanks!

Thanks for confirming.


Feedback on cmd/screenshot and the Golang client API

https://github.com/pressly/screenshot/blob/master/cmd/screenshot/main.go#L15-L39

[ ] Always check the error, never ignore it (Golang is very explicit about errors)
[ ] Replace var window [2]int https://github.com/pressly/screenshot/blob/master/cmd/screenshot/main.go#L16-L18 with WindowWidth int and WindowHeight int on the ScreenshotOptions{} struct
[ ] Can we rename ScreenshotOptions to Page or Options?
[ ] PdfOptions - I'm fine with a single argument to PDF() as long as the PdfOptions embed the above ScreenshotOptions{}
[ ] well need to use io.ReadCloser, so the consumer can close the Body

The reason I changed page to screenshotOptions is because the only thing screenshot and pdf shares is the viewport which is the Window here, if we start sharing other things it just starts getting complex IMO. I'll add some more in depth usage by EOD

@MarcelRusu sounds good then. I thought PDF options shares much more stuff with screenshot options.


online-mode?

~Maybe there could be an (unauthenticated?) online mode where both sides invoke the program, and enter texts via stdin and upon pressing enter button get the encrypted text back.~
In online mode, the header is printed before the user enters the plain text.
Expected result: an intact OneTime Message is put on the screen.

Someone else can implement this as a wrapper around OneTime, if they want :-).  I'd like to keep the core Python script as simple as possible.

Ok, i changed it in my fork. It's not very nice, but it does the job for me. Though, maybe I will change it as to no require any header at all for using it in instant messaging.


About using MoE

Thank you for your work and for sharing the code.
I am curious whether the MoE module can be applied to other VRP variants with constraints, and if it functions as a plug-and-play module. I’ve just started learning, and I’m a bit confused about how to use MoE to replace the FFN for solving constrained VRP problems.

Hi, thanks for your interest. Yes, MoE is a general concept and can be used as a plug-and-play module to enhance model capacity, but it's not intended to address constraints. It (sparsely) widens the network by duplicating a layer into multiple layers, allowing inputs to adaptively pass through selected ones via a gating network. See here regarding how to replace FFN with MoE. If you are working with autoregressive construction solvers (e.g., AM, POMO), their decoders typically handle constraints through feasibility masking. As long as your base model can solve constrained VRPs, the MoE variant will be able to handle them as well.

Thanks for the explanation!! I will try it


MSID: 100287 Version: 1 DOI: 10.1101/2<IP_ADDRESS>1058

MSID: 100287
Version: 1
Preprint DOI: https://doi.org/10.1101/2<IP_ADDRESS>1058
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=100287
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>1058

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/100287v1
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2<IP_ADDRESS>1058
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/100287/v1/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

From Fiona:

The reviews for 100287 have already been posted by ed office, but the authors have been in contact to query the assessment - please can the publication of the RP be held until this is resolved? It's still in the 'Awaiting reviews' column

Slack thread here: https://elifesciences.slack.com/archives/CAJ0M8KST/p1724317204334189


fix(index.ts, emissionsRecordCOntract.ts, get-allowance-endpoint.ts): fixed lint errors on multiple files

Primary Change

Fixed lint errors on index.ts (line 578, col 25), emissionsRecordContract.ts (line 40, col 3; line 138, col 3; line 146, col 3), and endpoint.ts (line 58, col 33)
In order to fix changes from any to unknown, had to change the output path to directed types: (Changed OASPath return type from any object to "typeof OAS.paths["/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance"]"

Signed-off-by: Alec Phong<EMAIL_ADDRESS>Partial Fix to #1366

Closing because after resolving the merge conflicts on it it became equivalent to the main branch (a previous PR made the same changes as this one)


Add support for custom rate limiter

Sort of a feature request, use cases may include private gitlab instance not doing the rate limiting itself and not returning rate limit headers and / or when someone wishes to limit load to lower than what's automatically configured.
Can make a pull request to add it, wanted some thoughts and considerations that I'm not thinking about :)
Thanks.

You can already configure pretty much all rate limiter options, or give your own HTTP client which then can have it's own rate limiter: https://github.com/xanzy/go-gitlab/blob/master/client_options.go
So no need to do any coding for that :wink:

The retryable http takes a concrete http.Client not some sort of a generic interface value, can't inject rate limiter no? :thinking:

Your right! I was too quick in typing my reply... I was looking at the retry logic not at the internal rate limiter. Sorry!
The internal rate limiter will be disabled if it doesn't receive the correct headers, so it should not be a problem if those headers are not given. There indeed is no way to configure your own rate limiter, but to be very honest I'm not too exited about adding a feature to do so.
Yet thinking about it just a little I do see a way that could introduce something like that, using an interface like:
type RateLimiter interface{
    Wait(context.Context)
}

And then in the configureLimiter() start with:
func (c *Client) configureLimiter() error {
	if c.limiter != nil {
		return nil
	}
	...

Guess that could be acceptable... But only if it really is as small as it seems 😏

Believe the nil check would be taken care of by the sync,Once, was thinking something like
func WithCustomLimiter(r rate.Limit, burst int) ClientOptionFunc {
	return func(c *Client) error {
		c.configureLimiterOnce.Do(func() {
			c.limiter = rate.NewLimiter(r, burst)
		})
		return nil
	}
}

I guess a RateLimiter interface would be cleaner :thinking:

Re: the piece on disabling internal rate limiter if it doesn't get the headers. My problem was that the rate limiting was performed at a netscaler level that's in front of the gitlab instance. Use case is to retrieve all merge request status / pipeline / approvals of a number of users and it can potentially spam quite hard and make the netscaler rate limiting kick in. (that setup isn't the greatest but...)

Hmm... Well that also looks pretty reasonable to be honest. I think the main difference is that you are still bound to the rate package while with an interface you can practically insert everything you want. Guess both are acceptable solutions...

I'll go and implement the interface version a bit later and lets see how it looks like. Thanks for all the input!

I mean the library is already quite bound to http, retryablehttp etc :thinking:

Any plans to tag it anytime soon :nerd_face:  ?

Done, v0.35.0 👍


Release .zip instead of .tar.gz for windows in sdkman

cc @bishabosha

I've just discussed with @marc0der about the presence of UNIVERSAL and we should remove it from the workflow

Thanks @marc0der for taking the time to check the workflow !