text:
bug(styles): mdc-icon-button-state-layer-size is not globally available anymore

Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
7.1.2
Description
The generated styles.css does not contain the CSS variable (property) "mdc-icon-button-state-layer-size" under "html" anymore.
In my apps I'm using that variable to calculate the half of an icon-button's height.
How are we supposed to know the size of an icon-button now? Is there a different variable available?
Reproduction
Build apps with Angular Material 7.1.2 and 7.2.2 (or 7.3.0). In the latter version, inspect the missing CSS variable "mdc-icon-button-state-layer-size" under "html".
Expected Behavior
In an earlier version (7.1.2) we had this variable defined under hmlt:
html {
  // ... other non-icon-button tokens
  // In version 7.1.2 we *have* "mdc-icon-button-state-layer-size":
  --mdc-icon-button-state-layer-size: 48px;
  --mdc-icon-button-icon-size: 24px;
  --mdc-icon-button-icon-color: inherit;
  // ... more "--mdc-icon-button-xyz" variables
}

And we were able to use that variable globally in order to calculate stuff. E.g.:
:root {
    --half-button-size: calc(0.5 * var(--mdc-icon-button-state-layer-size));
    --half-button-negative-size: calc(-1* 0.5 * var(--mdc-icon-button-state-layer-size));
}

Actual Behavior
In (7.2.2 and 7.3.0) we don't have this variable anymore in the generated styles.css:
html {
  // ... other non-icon-button tokens
  // NOTE: In 7.2.2 (and 7.3.0) this is missing the "mdc-icon-button-state-layer-size" variable.
   --mdc-icon-button-icon-size: 24px;
  --mdc-icon-button-icon-color: inherit;
  // ... more "--mdc-icon-button-xyz" variables
}

Environment

Angular: 7.1.2
CDK/Material: 7.3.0
Browser(s): Edge
Operating System (e.g. Windows, macOS, Ubuntu): Windows

I believe that variable is still present, though its not set under html, its set under .mat-mdc-icon-button.mat-mdc-button-base.

@mmalerba: Unfortunately this is not how CSS variables (custom properties) work.
I'm not a CSS pro (as well), so I had to research this as well today: Variables are scoped; the variable under ".mat-mdc-icon-button.mat-mdc-button-base" is not available to the outer scope.
Effectively this means: consumers are not able to get the size of a button anymore. Any layout depending on that will break.
Hmm, I don't see a "reopen" button here, so I have to ask you to reopen this issue.

@mmalerba: I waited a month, just in case you really went on holidays.
So, you closed this issue without understanding the issue, while I am not able to reopen this issue.
What I asked for is: how to be get the size of a button, now that Material has removed its dimensions from being globally available.
You effective answner was: it's still available non-globally. You can't use it, but the numbers are there.
I stuggle to see the logic here.

@mmalerba: Had to open my first question on SO after 14 years due to this. Thanks.
https://stackoverflow.com/questions/78359033/how-to-get-the-size-of-the-angular-material-button-am-version-7-2

Hello @Casimodo72 ,
If you are still interested in this topic, I suggest creating a Github discussion. I think the conversation would be more productive that way. If you have new information, it could be helpful to fine a new issue report or feature request. I think you would get more information one of those ways.
I would like leave a reminder that Angular has a Code of Conduct for all of its projects.
Best Regards,
Zach

@zarend : Hi, yes I'm still interested in Angular material not introducing regression bugs. For me this is a bug because it hinders me from designing a good looking UI due to the removed information about the dimension of a component.
If your team is still interested in this bug: feel free to reopen this issue (I still am not allowed to reopen this issue). It's easy to do and would allow others to look at it.
I won't post a duplicate of this issue. My frustration-meter is full and I felt anxious in the last month due to this issue. I won't risk that duplicate issue being immediately marked as a duplicate and closed again by the next guy. The cycle would repeat itself.
A person on SO made me aware of a very ugly but working hack to get the size  of a button via JS and I can set the missing CSS custom property on the document element.
I also think that I should let you guys work in peace. From what I read, folks are working on M3. Maybe stuff has a higher chance to get fixed in M3.
Not nice just shutting people out by closing unresolved issues and then sticking fingers in ears and then pointing to a Code of Conduct when the frustration-meter is full. Feels like a cheap mechanism.
But hey, as the say in the Fallout series: it's the way of the wasteland.

authors: Casimodo72 mmalerba zarend


text:
bug(MatDatepicker): Overriding MatDatepickerIntl texts

Is this a regression?

[ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
Hello, I'd like to override the closeCalendarLabel for all places in the application where the Material Datepicker is used.
According to the documentation: https://material.angular.io/components/datepicker/overview#localizing-labels-and-messages,
I've provided my values, but it doesn't seem to work. The new texts are applied only if I provide a custom MatDatepickerIntl in the child component where the MatDatepicker is used. Am I doing something wrong that prevents me from overriding it globally?
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-6vdvpgxv?file=src%2Fmain.ts
Steps to reproduce:

Override MatDatepickerIntl globally
Use the material datepicker in the child component
Open the datepicker and press TAB to show the close button.

Expected Behavior
Overriding MatDatepickerIntl globally applies new labels to all MatDatepicker instances.
Actual Behavior
Overriding MatDatepickerIntl globally does not applies new labels to all MatDatepicker instances.
Environment

Angular: 18
CDK/Material: 18
Browser(s): Firefox, Edge
Operating System (e.g. Windows, macOS, Ubuntu): Windows, macOS

It's because you're importing the MatDatepickerModule which then re-provides the default implementation. You should import the individual directives: https://stackblitz.com/edit/stackblitz-starters-f3zbbv71?file=src%2Ffoo%2Fdate-example%2Fdate-example.component.ts

source: gharchive/issue

authors: crisbeto wsacha

repo: angular/components

license: MIT

license_type: permissive

license_source: github-api


text:
Issue: md-toolbar: unable to alter CSS on first row (auto-generated)

Bug, feature request, or proposal:
When using md-toolbar in Angular, it creates the first md-toolbar row automatically. Since there is no tag designation for this in the html, you are unable to alter the CSS for it (ie, change the height)
What is the expected behavior?
You should be able to alter the CSS on every piece of the md-toolbar
What is the current behavior?
What are the steps to reproduce?
Plunker: http://plnkr.co/edit/kP6MYoVdFQlECDX7T7Hs?p=preview
What is the use-case or motivation for changing an existing behavior?
A user will have limited control over the first md-toolbar-row while using this framework
Which versions of Angular, Material, OS, browsers are affected?
Angular2: 2.0.1
Material: 2.0.0-alpha.8-2
Chrome:  53.0.2785.116 m
Is there anything else we should know?

@Hugmungus You can use the :host >>> md-toolbar-row selector. Here's a modified plunkr: http://plnkr.co/edit/IWq5nWl4ymU3rR3xKwrH?p=preview

Thanks @PascalTemel, that seems to do the trick.

@DevVersion we should discuss this a bit

@jelbourn Sounds good. I already have some API ideas, how we could fix this issue and perhaps #1718 as well.

Related to #1718

I will close that issue in favor of #1718.

authors: DevVersion Hugmungus PascalTemel jelbourn


text:
[Datepicker] Inline mode

Bug, feature request, or proposal:
Feature request
What is the expected behavior?
What is the current behavior?
Right now it only shows as a popup or inside a dialog.
It would be good to be able to render it inside a section or div, and fill up it's parent container.
What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
It would be good to have a multipurpose calendar component.
The use case is to have a calendar UI element on the screen, where you can show events for a given month(s), create events, etc.
For this we need to be able to have the calendar always opened, preferably filling up it's parent container. And have a nice API to interact with it.
It would be good enough to be able to use the internal implementation already in place used for the Datepicker component (maybe as part of the CDK?)
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?

Something akin to: https://fullcalendar.io/

I think I remember reading that the team doesn't plan on supporting a scheduling calendar with appointments, etc. However I think MdCalendar is exported now (https://github.com/angular/material2/issues/4801) so you can look into using just the calendar and maybe extending it.

Duplicate of #8812

authors: jelbourn lobo-tuerto willshowell


text:
build(): Dartanalyzer travis

Adding Dartanalyzer to travis. Please note this is branched off PR #69, which needs to be merged first.

@jelbourn please review. This enables the travis check.

The Promise changes is so we process.exit() properly. The analyzer code does not reject the promise when there's an error.

The only thing needed for this change here is the ts2dart Promise changes.

LGTM

source: gharchive/pull-request

authors: hansl jelbourn


text:
how to set $interval instead of timeout in Protractor Tests

I am working on iOS Hybrid app automation using appium and Protractor. I am using the timeout in my config.js file but getting the errors: Below are my config.js and spec.js file.
Kindly advise on how to use $interval instead of timeout.
Config.js:
exports.config = { allScriptsTimeout: 30000 , getPageTimeout: 30000 , ignoreSynchronization: true , seleniumAddress: 'http://localhost:4723/wd/hub',
specs: ['PageObjectSpec.js'],
capabilities: {
browserName: 'iOS' ,
'appium-version':'1.3.4',
platformName:'iOS'   ,
platformVersion: 7.1 ,
deviceName:'iPhone' ,
autoWebview:true ,
},
baseUrl: 'http://localhost:8000',
jasmineNodeOpts: {showColors: true, defaultTimeoutInterval:60000} ,
onPrepare: function() {
browser.manage().timeouts().setScriptTimeout(60000);
},
};
Spec.js file::
'use strict';
describe('Abbvie app test', function()
{
var userName = browser.element(by.model('credentials.username'));
var passwd = browser.element(by.model('credentials.password'));
var signin = browser.element(by.buttonText('Sign In'));
it('Login Page test', function()
{
userName.click();
//userName.sendKeys(name)
passwd.click();
//passwd.sendKeys(pass)
signin.click();
}, 60000);
});
**Protractor Log:**Using the selenium server at
http://localhost:4723/wd/hub
[launcher] Running 1 instances of WebDriver
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was:
Protractor.waitForAngular()
at [object Object].webdriver.WebDriver.schedule (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:345:15)
at [object Object].Protractor.executeAsyncScript_ (/usr/local/lib/node_modules/protractor/lib/protractor.js:251:26)
at [object Object].Protractor.waitForAngular (/usr/local/lib/node_modules/protractor/lib/protractor.js:274:15)
at [object Object].getWebElements (/usr/local/lib/node_modules/protractor/lib/element.js:136:19)
at [object Object].getWebElements (/usr/local/lib/node_modules/protractor/lib/element.js:669:31)
at [object Object].ElementArrayFinder.applyAction_ (/usr/local/lib/node_modules/protractor/lib/element.js:391:28)
at [object Object].self.(anonymous function) [as click] (/usr/local/lib/node_modules/protractor/lib/element.js:77:19)
at [object Object].self.(anonymous function) [as click] (/usr/local/lib/node_modules/protractor/lib/element.js:698:11)
at [object Object]. (/Users/qualcomm/Desktop/ProtractorTest/PageObjectSpec.js:13:11)
F
Failures:

Abbvie app test Login Page test
Message:
timeout: timed out after 60000 msec waiting for spec to complete
Stacktrace:
undefined

Finished in 65.404 seconds
1 test, 1 assertion, 1 failure
[launcher] 0 instance(s) of WebDriver still running
[launcher] iOS #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

Please read the contributing guidelines; these types of questions are ill-suited for GitHub. Thanks!
Please post on SO and link from here!

repo: angular/protractor


text:
Incorrect parameters to patchEventTarget

websocket.ts has
patchEventTarget(api, _global, [WS.prototype]);

https://github.com/angular/zone.js/blob/b0c5076d70f65f48b743c981cdc56efb9745bd44/lib/browser/websocket.ts#L18
However, patchEventTarget looks like:
export function patchEventTarget(
    _global: any, apis: any[], patchOptions?: PatchEventTargetOptions) {

This error was caught by TS 2.4.  I'm not exactly sure what the correct params to patchEventTarget are here, but what this code currently has looks wrong.

@JiaLiPassion wrote this code I think.

@evmar , thanks for posting the issue, I will fix it.

authors: JiaLiPassion evmar

license: mit

license_source: bigquery


text:
Installation crashed for python 3.9 due to numpy

Hello, I am trying to install this package in this environment:

Ubuntu 22.04
Python: 3.9.0
pip: 24.0

and I get this error:
~ ❯ pip install py_stringmatching
Collecting py_stringmatching
  Downloading py-stringmatching-0.4.5.tar.gz (849 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.5/849.5 kB 6.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting numpy>=1.7.0 (from py_stringmatching)
  Downloading numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.9/60.9 kB 71.5 MB/s eta 0:00:00
Downloading numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.3/19.3 MB 70.3 MB/s eta 0:00:00
Building wheels for collected packages: py_stringmatching
  Building wheel for py_stringmatching (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [94 lines of output]
      /home/nikoletos/.conda/envs/pyjedai39/lib/python3.9/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/py_stringmatching
      copying py_stringmatching/utils.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching
      copying py_stringmatching/__init__.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching
      creating build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      copying py_stringmatching/tests/test_sim_Soundex.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      copying py_stringmatching/tests/test_tokenizers.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      copying py_stringmatching/tests/test_simfunctions.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      copying py_stringmatching/tests/utils.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      copying py_stringmatching/tests/__init__.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tests
      creating build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/ratio.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/soundex.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/editex.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/jaro_winkler.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/partial_token_sort.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/soft_tfidf.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/hamming_distance.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/tversky_index.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/phonetic_similarity_measure.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/overlap_coefficient.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/smith_waterman.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/affine.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/cosine.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/sequence_similarity_measure.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/partial_ratio.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/levenshtein.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/needleman_wunsch.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/jaccard.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/jaro.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/dice.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/token_sort.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/token_similarity_measure.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/similarity_measure.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/generalized_jaccard.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/hybrid_similarity_measure.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/__init__.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/tfidf.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/bag_distance.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      copying py_stringmatching/similarity_measure/monge_elkan.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      creating build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/definition_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/qgram_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/alphanumeric_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/whitespace_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/alphabetic_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/delimiter_tokenizer.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      copying py_stringmatching/tokenizer/__init__.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/tokenizer
      creating build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/__init__.py -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      running egg_info
      writing py_stringmatching.egg-info/PKG-INFO
      writing dependency_links to py_stringmatching.egg-info/dependency_links.txt
      writing requirements to py_stringmatching.egg-info/requires.txt
      writing top-level names to py_stringmatching.egg-info/top_level.txt
      reading manifest file 'py_stringmatching.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'requirements.txt'
      adding license file 'LICENSE'
      writing manifest file 'py_stringmatching.egg-info/SOURCES.txt'
      copying py_stringmatching/similarity_measure/cython/cython_affine.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_jaro.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_jaro_winkler.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_levenshtein.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_needleman_wunsch.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_smith_waterman.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      copying py_stringmatching/similarity_measure/cython/cython_utils.c -> build/lib.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      running build_ext
      building 'py_stringmatching.similarity_measure.cython.cython_levenshtein' extension
      creating build/temp.linux-x86_64-cpython-39
      creating build/temp.linux-x86_64-cpython-39/py_stringmatching
      creating build/temp.linux-x86_64-cpython-39/py_stringmatching/similarity_measure
      creating build/temp.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython
      gcc -pthread -B /home/nikoletos/.conda/envs/pyjedai39/compiler_compat -Wl,--sysroot=/ -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikoletos/.conda/envs/pyjedai39/include -fPIC -O2 -isystem /home/nikoletos/.conda/envs/pyjedai39/include -fPIC -I/tmp/pip-install-jrblljcn/py-stringmatching_95bff3da063b47e58ee3bd43c8f216b2/.eggs/numpy-2.0.0-py3.9-linux-x86_64.egg/numpy/core/include -I/home/nikoletos/.conda/envs/pyjedai39/include/python3.9 -c py_stringmatching/similarity_measure/cython/cython_levenshtein.c -o build/temp.linux-x86_64-cpython-39/py_stringmatching/similarity_measure/cython/cython_levenshtein.o
      py_stringmatching/similarity_measure/cython/cython_levenshtein.c:1205:10: fatal error: numpy/arrayobject.h: No such file or directory
       1205 | #include "numpy/arrayobject.h"
            |          ^~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for py_stringmatching
  Running setup.py clean for py_stringmatching
Failed to build py_stringmatching
ERROR: Could not build wheels for py_stringmatching, which is required to install pyproject.toml-based projects

#100 looks to be fixing this.

Yeah this works. However I hope to new release soon, having this dependency correct.
Thank you @RoopeHakulinen! Saved me a lot of time.

Silly question but how did you try it out? By setting that repo & commit as the library reference perhaps?

No unfortunately I couldn't do this in my setting. What I did, it was to first install numpy
pip install numpy==1.26.4

and then
pip install py_stringmatching==0.4.5

This way it gets the pre-installed numpy package, so py_stringmatching is finally installed.

You can also do this:  pip install numpy>=1.7.0,<2.0' instead of a specific numpy version.

It looks like cython hasn't been updated for compatibility with numpy 2.0 yet. I've released a new minor version incorporating https://github.com/anhaidgroup/py_stringmatching/pull/100; this should work as a temporary fix until all dependencies have been updated. Thank you for bringing this to my attention.

authors: Anson-Doan Nikoletos-K RoopeHakulinen


text:
add pre-commit-config.yaml

First step of #143

Codecov Report

Merging #156 (7942e5c) into master (4bb2849) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   94.68%   94.68%
=======================================
  Files          23       23
  Lines        2354     2354
=======================================
  Hits         2229     2229
  Misses        125      125

Continue to review full report at Codecov.

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

@raybellwaves is this work in progress or ready to merge?

ready to merge

repo: anitagraser/movingpandas


text:
not support @import

@import url('https://fonts.googleapis.com/css?family=Saira');
not work

you must use something like tis
@import url("http://usercss.ru/styles/night/night.css");
it's work

closing as duplicate of #501

authors: RX-3200 ankit greathan

repo: ankit/stylebot


text:
How to generate small size image with synthtext background?

Hi, I am trying to generate small size synthtext images, e.g. 64*64 output size.
I do not have any available segmentation images by myself, so I am trying to resize/crop the background data which downloaded from this repo.
The org image size is around (500, 500). So I resized the img, seg and depth to (64, 64). But I do not know how to make fake values for labels and area.
If I do not change them, no text is generated. If I fake them to zeros or ones, it does not work either.
I just need to generate 1~5 line words in (64,64) images. I do not need these texts to be generated on a safe area. Rrandom places is ok for my case. Do you have any suggestions?
Thanks a lot.

You can try using a constant valued image/matrix for seg and depth images, and set the area and label correspondingly (to scalar values).
You could also extract text regions using the bounding boxes after they have been generated on the original images as provided in this code repo.

authors: ankush-me ziyeZzz

repo: ankush-me/SynthText


text:
🛑 Everest is down

In 3fe32ea, Everest (https://everest-edu.ru) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Everest is back up in 03bc9f7 after 28 minutes.

repo: ano-pedproject/repo


text:
PoS add re-delegation

Add a transaction for re-delegation (using a version with longer delay, which has to wait for unbonding epoch, but simpler to implement than faster re-delegation).
┆Issue is synchronized with this Asana task by Unito

There's a potential problem with slashing that's applied after re-delegation, because the re-delegated amount would be unbonded and bonded to the new target at unbonding offset, but unlike tokens that are unbonded for withdrawal, which are being slashed when they are being withdrawn, there's no further action required with the current re-delegation design.
When we re-visit re-delegation, we should add spec of it as it has to be accepted by the validity predicate and we should re-visit the integration spec in https://dev.anoma.net/master/explore/design/ledger/pos-integration.html?highlight=redelegate#delegator-transactions - this is not very clear, because we're re-using delegate function definition, which also transfers tokens, but re-delegation keeps all the tokens in PoS.

At the point the re-delegated amount is bonded to the new target, can we check if there were any slashes since discovered that need to be applied?
(this may require some sort of queue, but the processing required should be low and thus safe, I think?)

Yeah, we can do that with some queue that is processed by the protocol - it will need to update data in the re-delegation target if and when some slash(es) for the source are found

authors: cwgoes tzemanovic

repo: anoma/anoma


text:
[Request] DOM elements as labels

There seem to be lots of people, like in issue #23, #21 or #10, who want to add a click event to a line.
Instead, how about a feature where you can just add your own DOM elements as labels for a line. This would be extremely customizable, because you could just add styling or events directly to the label like with any other HTML element.
If that is not technically possible, please at least add a click Event for labels.

Hi @CheeseCrustery, thank you for the comment.
That should not be implemented as already mentioned in the past issues over and over again.
And, you wrong, users who wanted that are not many, also, those were already solved.
However, your plan the "labels" may be another solution. I will think that if more requests come.
Thank you. :smile:

Well, you know whats best for your library.
Thanks for considering.

:smile:

authors: CheeseCrustery anseki

repo: anseki/leader-line


text:
Support ANSIBLE_COLLECTIONS_PATH environment var

This commit adds supports for reading ANSIBLE_COLLECTIONS_PATH from the environment, in a similar manner to how ANSIBLE_ROLES_PATH is handled.
—-
Fixes https://github.com/ansible-community/molecule/issues/3663

Hi @nre-ableton
Thanks for your work.
IMHO, even if you extend the collection paths, the molecule will also install dependencies into ~/.cache/ansible-compat/hash-vaule/, which is an isolated cache path defined in ansible-compat package.
You can find more details in  ansible-compat package.
Are you sure the test result is correct?

@zhan9san Yes, molecule behaves the same with roles. I wish that molecule had proper offline support, but that is a separate discussion (see https://github.com/ansible/galaxy/issues/2030).
For this to work, prerun: false must also be set in the scenario's molecule.yml file. With that in place, molecule will install collections to ANSIBLE_COLLECTIONS_PATH.

I wonder if we can introduce an offline mode, no need to install dependencies when run molecule. But instead, we can install them in a cache path on CI server in advance, and let molecule respect this cache path.
---
dependency:
  name: galaxy
  offline: true
  role-file: requirements.yml
  requirements-file: collections.yml

Please allow me to explain it in detail.
Internet access
Currently, there are two kinds of dependencies need to be downloaded from internet when run molecule dependency.

role dependencies which are defined in requirements.yml
dependencies for testing the role in different scenarios, which are defined in role-file: requirements.yml and requirements-file: collections.yml, referring to molecule.dependency.ansible_galaxy.AnsibleGalaxy

Installation location
Assume the my role name is my_role_2.
For the 1st, the dependencies will be installed by ansible-compat in /Users/jackzhang/.cache/ansible-compat/0afefd/roles and /Users/jackzhang/.cache/ansible-compat/0afefd/collections.
For the 2nd, the dependencies for scenario test will be installed by molecule in /Users/jackzhang/.cache/molecule/my_role_2/default/roles and /Users/jackzhang/.cache/molecule/my_role_2/default/collections
Then, the installed location would be as below.

/Users/jackzhang/.cache/ansible-compat/0afefd/roles
/Users/jackzhang/.cache/ansible-compat/0afefd/collections
/Users/jackzhang/.cache/molecule/my_role_2/default/roles
/Users/jackzhang/.cache/molecule/my_role_2/default/collections
/Users/jackzhang/.cache/molecule/my_role_2/scenario-2/roles
/Users/jackzhang/.cache/molecule/my_role_2/scenario-2/collections
/Users/jackzhang/.cache/molecule/my_role_2/scenario-3/roles
/Users/jackzhang/.cache/molecule/my_role_2/scenario-3/collections
other scenaios, etc.

Unified location
As we can see, there are many different locations. If we install them in one unified location, and ensure molecule respects it, this issue would be solved.
Let me know what you think.

@zhan9san I think that this would be a great idea, and I wouldn't mind to implement something like this. Offline mode would be very useful for us. However, I also think that it is a bit beyond the scope of this PR. 😁 I'll go ahead and un-draft this PR, unless you have any strong objections.

LGTM.
Go ahead please

@zhan9san Thanks for the merge!

repo: ansible-community/molecule


text:
2023 FAQ Updates

Overall Review of Changes:
2023 FAQ Updates
Issue Fixes:
2023 FAQ Updates
Enhancements:
N/A
How has this been tested?:
In ReadTheDocs

great work

repo: ansible-lockdown/MPG-AL-READTHEDOCS


text:
Revert "fixed gnutls as per issue 196 thansk to @jmalpede"

This reverts commit 63c4c8406e7f6b49eeb94d787f258917e8716b0b.
Overall Review of Changes:
Reversion of a previous commit that introduced a regression.
Issue Fixes:
Fixes #233
How has this been tested?:
File content verified after running playbook.

hi @qwestduck
Thank you for raising this issue, unfortunately since the ansible galaxy changes this has broken older ansible releases. We are trying to give clients a longer support around older ansible versions. This means we need to update the collections method for the pipeline.
I am raising this and pushing a new branch today into devel with these fixes.
many thanks
uk-bolly

authors: qwestduck uk-bolly


text:
Fix 2.2.14 evaluate dnsmasq instead of postfix

Corrected rule 2.2.14 Ensure dnsmasq is not installed (Automated) on an RHEL 9 machine without postfix.
Overall Review of Changes:
Fixed 2.2.14 to evaluate dnsmasq instead of postfix.
Issue Fixes:
Previous code evaluate postfix and triggers postfix restart handler when is not needed.
RUNNING HANDLER [RHEL9-CIS : Restart postfix] ************************************************
fatal: [rhel.example.com]: FAILED! => {"changed": false, "msg": "Could not find the requested service postfix: host"}

Enhancements:
Running the code on a machine without "postfix" installed didn't end with the "Restart postfix" handler error.
How has this been tested?:
Tested locally on freshly installed RHEL9 with rhel9cis_dnsmasq_server = false  and rhel9cis_is_mail_server  = false .

Great catch, thanks you for taking the time to find the issue and raise the PR.


text:
Error messages aren't displaying on the remote container create form

https://issues.redhat.com/browse/AAH-1845
This PR refactors error handling using utils. Every error (including field validation and server side validation together) is now in one associative array formErrors, which can hold error message per form field (for example formErrors['name']).
Also, validation from server in attempt to save the form is now included.

There's a lot of commented-out code, and no  PR description.
What is this supposed to do?

One more thing noticed during testing... this doesn't deal with unknown errors from the server in any way, no alerts, no messages, just a stuck form.
Try adding a EE with a name like foo/. - this passes the name validation, but the server responds with a base_path validation message .. we should be displaying unknown messages on error.
(The response looks like...
{
  "errors": [
    {
      "status": "400",
      "code": "invalid",
      "title": "Invalid input.",
      "detail": "The provided base path contains forbidden characters.",
      "source": {
        "parameter": "base_path"
      }
    }
  ]
}

)

TODO - delete validation errors when alert is shown and error does not belong to any field.

Looks like this works :+1:

(just needs a rebase to get tests green, #3018 )

authors: MilanPospisil himdel

repo: ansible/ansible-hub-ui


text:
[AAP-11337] Send heartbeat on web socket channel

If ansible-rulebook is invoked with --heartbeat nn, where nn is the seconds to wait between sending heartbeat, it will send session stats about all running ruleset sessions. This allows the server to monitor if the ansible-rulebook is responsive.
The payload coming back from the server
{'type': 'SessionStats',
'activation_id': '42',
'stats': {'start': '2023-04-25T17:02:03.736195Z', 'end': '2023-04-25T17:02:04.856004Z', 'numberOfRules': 1, 'numberOfDisabledRules': 0, 'rulesTriggered': 1, 'eventsProcessed': 2000, 'eventsMatched': 1, 'eventsSuppressed': 1999, 'permanentStorageSize': 0, 'asyncResponses': 0, 'bytesSentOnAsync': 0, 'sessionId': 1, 'ruleSetName': 'Test websocket range events'},
'reported_at': '2023-04-25T17:02:04.857362Z'}

The end is sent only when the ruleset session has ended
The stats can be used to update the stats in this screen

@Alex-Izquierdo Added changeling and usage.rst

repo: ansible/ansible-rulebook


text:
Playbook explanation for task files and playbooks w/o tasks

Modifications of the playbook explanation feature for

Task files, and
Playbooks that do not contain tasks, for example, playbooks that have roles only

For 1. We do not enable playbook explanation. The "Explain the current playbook" button on the sidebar will be grayed out.
For 2. We will display an informational message: Explaining a playbook with no tasks in the playbook is not supported.

Tests are failing because of TypeError: Cannot read properties of undefined (reading 'openEditor') which was removed.

authors: TamiTakamiya goneri

repo: ansible/vscode-ansible


text:
Build before deploy?

Hi,
I started using Ansistrano. But it has some major architecture problems.
Even scripted languages (php, ...) needs the build phase. Usualy web projects have assets and we have to minify those, combine sprites. Also remove some files (tests, build scenarios, etc...).
Building in every production server is bad idea.
Ansible and build machine have to be separate machines also. Due to security. And because our central orchestration machine (Ansible) manages multiple interconnected projects. Every project has it's own system requirements and tools.
So... Two "deployments" with some hacks have to be implemented.

Ansible/Ansistrano connects to build machine, uses git to download code and builds an archive.
Ansible/Ansistrano connects to every production servers, uses a hack to scp (pull) the built achive and extracts it.

Do you plan any changes to face with build phase?

I would argue there are major architecture problems as the build phase is not Ansistrano's responsibility
If you have a complex build phase, you should be able to create artifacts from your CI / CD pipelines and upload them to either S3, your local apt servers or similar options.
And then you would be able to use strategies like the s3_download or http_download
I would also disagree that build and deploy boxes need to be different, they certainly can be different but there is no fundamental security concern there if you have proper network segmentation and rules
Maybe Ansistrano is not a tool for your CI / CD cycle and that's just fine and anyway starting with "There are major architecture problems" when thousands of people are using it is not a great start TBH

Hi. Thanks for the comment.
Maybe Ansistrano is not the tool for build :)
Although it was the fastest way to make full deployment chain.

authors: emanuelis ricardclau

repo: ansistrano/deploy


text:
rsync, each release folder has twice the original size

Well, this is more a question than an issue.
When using rsync, all content is transfered first to a hidden .shared-copy folder, and then copied to the final place.
Because of that, each release folder has two copies of the same content, and spends double space.
What's the reason of .shared-copy?
Why doesn't it get moved/removed at the end?
Thanks,

Ok, sorry, my fault.
My playbook executed 2 times the role carlosbuenosvinos.ansistrano-deploy, and surprisingly all went ok, except for this small effect.

Hum, it also happens when you deploy to times using the same release ansistrano_release_version
So carlosbuenosvinos.ansistrano-deploy is not idempotent, at least while using rsync.

.shared-copy is used to support the way rsync works
The rsync process creates some extra files that should not be in the releases folder so that subsequent deployments will "diff" against this to know what changed
BTW a deployment role cannot be idempotent, it is completely stupid.
When you release something you release it at some time. Files can be the same, but they are released at a different time

authors: ivan-at-wiris ricardclau


text:
Support s3 rgw option

I use s3-compatible object storage (Ceph RGW) for storing artifacts.
From ansible v2.2, ansible s3 module supports Ceph RGW.
Now, ansistrano support s3, so I just add an option for supporting Ceph RGW.

even if use rgw, ansistrano_deploy_via is s3 or s3_unarchive
switch s3 or rgw by ansistrano_s3_rgw bool parameter
when rgw is true, use ansistrano_s3_url as an s3 endpoint

Reference

ansible s3 module
Ceph RGW

I didn't update the following line of meta/main.yml yet.
  min_ansible_version: 1.8

When using rgw, ansible version must be greater than or equal to 2.2.
However, most ansistrano users don't use rgw, so they can use the version with less than 2.2.
Should I update this to 2.2?

Hi
We are not going to update Ansible minimum version to 2.2 for such a niche feature, that is for sure
Let me test this with older Ansible versions and see if it is not breaking any compatibility, worst case we can create separate s3-rgw & s3-rgw-donwload strategies despite having to duplicate code
Thanks for the PR but we cannot break compatibilities and this is hard to test automatically so I will have to do some manual testing :(

Good news, when the rgw option is skipped, the arguments are not analysed so we don't break existing stuff and lower Ansible versions
If you can please update the README.md so that it says that the rgw option is only supported in Ansible 2.2 I will merge this and generate a new tag
Thanks!
Thanks!

Hi, @ricardclau,
Thank you for checking my PR & testing!
I updated README.md. Please check it.

Thanks @hitsumabushi !

authors: hitsumabushi ricardclau


text:
Reorganize buttons in the plotter

The buttons in the plotter should be reorganized to improve user experience.

Not applicable anymore to PyAnsys Geometry - it is now this repo's scope

authors: AlejandroFernandezLuces RobPasMue


text:
docs: Remove temperature addition and disallow unimplemented unit construction

Closes https://github.com/ansys/pyansys-units/issues/255 and https://github.com/ansys/pyansys-units/issues/256

Updated temperature docs.
Added test for temperature addition.
Raise an exception for unimplemented units.
Added test to check unimplemented units.

----------------------------------------------------

@hpohekar
There is already a custom exception for such units:
>>> import ansys.units as au
>>> Q_ = au.Quantity
>>> Q_(1, "ZZ")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\quantity.py", line 100, in __init__
    units = Unit(units)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 76, in __init__
    _dimensions = _units_to_dim(units=units)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 384, in _units_to_dim
    _, unit_term, unit_term_exponent = _filter_unit_term(term)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 561, in _filter_unit_term
    raise UnconfiguredUnit(unit_term)
ansys.units.unit.UnconfiguredUnit: `ZZ` is an unconfigured unit.

Unconfigured is good because the fact is that the user can configure what they like in the yaml file.
Can we also include h for hour in the yaml file. Python console users will not know how to configure the units and h might be quite popular.

@hpohekar There is already a custom exception for such units:
>>> import ansys.units as au
>>> Q_ = au.Quantity
>>> Q_(1, "ZZ")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\quantity.py", line 100, in __init__
    units = Unit(units)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 76, in __init__
    _dimensions = _units_to_dim(units=units)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 384, in _units_to_dim
    _, unit_term, unit_term_exponent = _filter_unit_term(term)
  File "C:\ANSYSDev\pyfluent\.venv\lib\site-packages\ansys\units\unit.py", line 561, in _filter_unit_term
    raise UnconfiguredUnit(unit_term)
ansys.units.unit.UnconfiguredUnit: `ZZ` is an unconfigured unit.

Unconfigured is good because the fact is that the user can configure what they like in the yaml file.
Can we also include h for hour in the yaml file. Python console users will not know how to configure the units and h might be quite popular.

@seanpearsonuk Yes, sure.

authors: hpohekar seanpearsonuk

repo: ansys/pyansys-units


text:
feat: add useConnection hook

close https://github.com/ant-design/ant-design-web3/issues/208

@kiner-tang 再看下？


text:
💥 feat: valueEnum support map

close https://github.com/ant-design/pro-table/issues/354
close https://github.com/ant-design/pro-table/issues/346
close https://github.com/ant-design/pro-table/issues/314

这个问题window现在还是存在？我同事用的苹果本就没这个问题？

repo: ant-design/pro-table


text:
Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function in typescripts

Hello,
I'm having trouble using your library to implement some functions in typescript. Is showing me the message
"Error: [vue-composition-api] must call Vue.use (VueCompositionAPI) before using any function."

I leave below the error output.
I will appreciate your help and your prompt response.!!
import {ref, reactive, UnwrapRef, Ref } from 'vue-demi';

export function fxReactive<T extends object>(obj: T): UnwrapRef<T> {
  return reactive(obj);
}

const fx = fxReactive({
  data: []
});

console.log(fx.data);

devDependecies
"@vue/composition-api": "^1.0.0-beta.1",
"vue": "^2.6.11"

dependecies
"vue-demi": "latest"

error
C:\Users\c\Desktop\reactivefx\node_modules\@vue\composition-api\dist\vue-composition-api.common.js:43
        throw new Error("[vue-composition-api] " + msg);
              ^
Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.
    at assert (C:\Users\c\Desktop\reactivefx\node_modules\@vue\composition-api\dist\vue-composition-api.common.js:43:15)
    at getVueConstructor (C:\Users\c\Desktop\reactivefx\node_modules\@vue\composition-api\dist\vue-composition-api.common.js:83:9)
    at observe (C:\Users\c\Desktop\reactivefx\node_modules\@vue\composition-api\dist\vue-composition-api.common.js:470:15)
    at Function.reactive (C:\Users\c\Desktop\reactivefx\node_modules\@vue\composition-api\dist\vue-composition-api.common.js:595:20)
    at fxReactive (C:\Users\c\Desktop\reactivefx\src\index.ts:6:10)
    at Object.<anonymous> (C:\Users\c\Desktop\reactivefx\src\index.ts:9:12)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Module.m._compile (C:\Users\c\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:473:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Object.require.extensions.<computed> [as .ts] (C:\Users\c\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:476:12)

@ChrisMichaelPerezSantiago Can try to remove @vue/composition-api in your dev deps and run the install again. It might be some version conflicts in your env. And, can you find the installed version of vue-demi in your lock file or node_modules so I can have a better sense of where is breaking? Thanks

@antfu ,
I removed the @vue/composition-api package and then also removed the node_module along with the package-lock.
Then I did npm install, this generated the node_module again.
When running the program it shows me the same error that I showed you previously.
But I could see that in the package-lock they are registered:
  "vue": {
       "version": "2.6.12",
       "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz",
       "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg ==",
       "dev": true
     },
     "vue-demi": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.2.0.tgz",
       "integrity": "sha512-EbB3UxYacKwORuey3VShOO0IJ + h8W2aq6v574m0XRMYrVOH2TkfO660gm7ZfNVHKHK4leNzVkAGGIfYDxrAFPg ==",
       "requires": {
         "@ vue / composition-api": "> = 1.0.0-beta.1"
       }
     },

And in the node_module the package is also registered
@vue/composition-api and vue

Here is the repo
To run the project you just have to write
npm run start

I don't think you can use @vue/composition-api in bare node environment. You might need to setup up a Vue project to test out your plugin.

@antfu ,
Any starter template that you recommend?

Planned to make one but didn't get time to do so. You might want to check the simple demo in the examples for now.

authors: ChrisMichaelPerezSantiago antfu

repo: antfu/vue-demi


text:
panic: lost connection to pod after forwarding is closed

Hi !
I have the following question/issue: go panics panic: lost connection to pod even after port-forwards were closed.
github.com/anthhub/forwarder v1.1.0

Here is simplified code I use. The main function actually is executed in Go routine (it is some e2e tests running in k8s)
package main

import (
	"context"
	"fmt"
	"time"

	"github.com/anthhub/forwarder"
)

func PortForward(options []*forwarder.Option, config string) (*forwarder.Result, error) {
	ret, err := forwarder.WithForwarders(context.Background(), options, config)
	if err != nil {
		fmt.Printf("Error occurred while configuring port-forwarding with config (%s) and options %v", config, &options)
		ret.Close()
		return nil, err
	}

	ports, err := ret.Ready()
	if err != nil {
		fmt.Printf("Errror occurred while waiting for port-forwarding to be ready with config (%s) and options %v", config, options)
		ret.Close()
		return nil, err
	}
	fmt.Printf("Port-forwarding established with ports: %+v\n", ports)
	fmt.Printf("Make sure to close forwarding via Close()")

	return ret, nil
}

func main() {
	const httpsPort int = 443
	const certRenewalTimeoutSeconds = 120
	localPortForwardPort := 26842
	kubeConfig := "~/.kube/config"
	type test struct {
		Namespace  string
		Source     string
		RemotePort int
	}
	tests := []test{
		{
			Namespace:  "default",
			Source:     "svc/my-service-1",
			RemotePort: 8000,
		},
		{
			Namespace:  "default",
			Source:     "svc/my-service-2",
			RemotePort: 8443,
		},
	}

	for _, test := range tests {
		var portForward *forwarder.Result
		portForwardOptions := []*forwarder.Option{
			{
				LocalPort:  localPortForwardPort,
				RemotePort: test.RemotePort,
				Source:     test.Source,
				Namespace:  test.Namespace,
			},
		}

		portForward, err := PortForward(portForwardOptions, kubeConfig)
		if err != nil {
			fmt.Println(err)
		}
		portForwardOpenedAt := time.Now().Unix()
		fmt.Printf("Portforward opened to %d at %d", localPortForwardPort, portForwardOpenedAt)

		close := func(rst *forwarder.Result, port int, timestamp int64) {
			fmt.Printf("Closing portforward %v on port %d opened at %d", rst, port, timestamp)
			rst.Close()
		}
		defer close(portForward, localPortForwardPort, portForwardOpenedAt)
		// do some tests here, this code returns some value
		localPortForwardPort++
		fmt.Printf("Port incremented. Next port-forwarding will be opened at %d. They all will be closed on return from this func", localPortForwardPort)
	}

}

It all works great, in logs after this particular test is concluded I see
2024/06/19 10:30:42 Closing portforward &{0x1041d7c30 0x1041d7ab0 0x1041d79c0} on port 26843 opened at 1718782197
2024/06/19 10:30:42 Closing portforward &{0x1041d7c30 0x1041d7ab0 0x1041d79c0} on port 26842 opened at 1718782153

However down the road, long after all ports were supposedly closed,  in the next tests Go panics with
panic: lost connection to pod
goroutine 3903 [running]:
github.com/anthhub/forwarder.portForwardAPod.func1()
	/vendor/github.com/anthhub/forwarder/forwarder.go:164 +0x2d
created by github.com/anthhub/forwarder.portForwardAPod in goroutine 3902
	/vendor/github.com/anthhub/forwarder/forwarder.go:162 +0x419

In my initial implementation I was calling Close() on each iteration manually (not through defer), but on the second iteration port from the first one was still in use somehow, so I resorted to use separate port in each iteration. Now I tried with defer and ports are closed on return (as they should) , but still this issue persists.
Any thoughts will be appreciated.

I've added some logs to my vendored package version and observed, that only the first call to "Close()" is handled.
Looks like module level  var once sync.Once prevents subsequent calls, even though new port-forward instances are created (and they all run successfully).
As a workaround I've moved it to to the top of forwarders func, then all my port-forward were successfully closed on defer.
This probably just a hack, but works for me for now.

repo: anthhub/forwarder


text:
Bump tesseract-sys, leptonica-sys deps

depends on:

https://github.com/ccouzens/leptonica-sys/pull/5
https://github.com/ccouzens/tesseract-sys/pull/2

I'm getting clang version conflicts when adding tesseract-rs as a dependency to my project, another one of my dependencies uses a new version of bindgen which in turn uses a newer version of clang.
Going through the process of updating all of tesseracts dependencies so that these two dependencies can co-exist in my project.

Thank you. I've merged and released https://crates.io/crates/tesseract/0.6.1
Have fun with Tesseract! I hope you make something cool 🙂

authors: ccouzens davidrusu


text:
Proposal to Update React Peer Dependency to Allow Installation of Later Versions

Is your feature request related to a problem? Please describe.
The current peer dependency configuration in the beautiful-react-hooks package is preventing the installation of later versions of React, such as 18.3.1, due to the exact version requirement of 18.2.0. This limits users' ability to utilize the latest features and bug fixes in React.
Describe the solution you'd like
I propose updating the peer dependency of React in the beautiful-react-hooks package from 18.2.0 to ^18.2.0. This would allow users to install later versions of React while maintaining compatibility with the package.
Describe alternatives you've considered
One alternative would be to force the React version to 18.3.1 in the package.json file of projects using beautiful-react-hooks. However, this approach may not be the best solution as it could lead to compatibility issues with other dependencies expecting a specific version of React. Additionally, it might hinder the flexibility of users in managing their dependencies.
Additional context
This change would enable users to benefit from the latest features and bug fixes in React without sacrificing compatibility with beautiful-react-hooks. It's essential to maintain flexibility in managing dependencies while ensuring users can leverage the advancements in the React ecosystem.

Hey @fakkio , thanks a lot for opening this issue
I believe you've found a bug in the way this package defines the peer dependencies, the correct approach is indeed the one you're suggesting: to change the peer dependency to react ^18.2.0.
Would you like to open a pull request?
You've actually already solved the problem, it would be nice to have you among the contributors...
Let me know what you think, if you can't manage it, I'll update the package.json myself
Speak soon and thanks a lot

Hi @antonioru,
I'm more than happy to contribute to the project and open a pull request to implement this change.
I'll start working on the pull request right away.
Thank you!

authors: antonioru fakkio

repo: antonioru/beautiful-react-hooks


text:
feat: add sankey sort

feat: add sankey sort

Closes: #2243


text:
Feat legend padding

[x] legend padding
[x] theme 默认 8
[x] 修复单测

冲突了

冲突了

done

authors: hustcc simaQ


text:
feat(component): support axis grid

feat(component): GUI axis supports grid options. In G2, should calculate grid.items by the actual ticks, now support non-discrete scale to display grid by default.
change(facet): modify the createGuide method of rect and matrix, make sure axis grid display elegant by default.

Demo of basic (default)

Demo of composition

@pearmini 其实可以 frame 也给普通图形增加~ 现在如果横竖都有网格的话，看起来糙糙的

@pearmini 其实可以 frame 也给普通图形增加~ 现在如果横竖都有网格的话，看起来糙糙的

嗯嗯，frame 之后会作为一个独立的 mark，可以给任意的 view 加上

牛呀牛呀，不过这个为啥没有 Grid？

x scale 上的 grid 还没有加上，只展示 y scale 的 grid 的话，会有一点点丑

authors: pearmini visiky


text:
请问支持节点中嵌入 G6 Darge 流程图么？

问题描述
在G6 Darge 流程图的节点中，再嵌入完整的 一个 Darge 流程图。
重现链接
https://g6.antv.antgroup.com/zh/examples/item/customNode/#intervalChartNode
重现步骤

类似 https://g6.antv.antgroup.com/zh/examples/item/customNode/#intervalChartNode 节点中嵌入 G2 的柱状图一样，想在节点中嵌入 g6 的 Darge 流程图

预期行为
类似 https://g6.antv.antgroup.com/zh/examples/item/customNode/#intervalChartNode 节点中嵌入 G2 的柱状图一样，支持节点中嵌入 g6 的 Darge 流程图。
平台

操作系统: [macOS, Windows, Linux, React Native ...]
网页浏览器: [Google Chrome, Safari, Firefox]
G6 版本: [4.5.1 ... ]

屏幕截图或视频（可选）
想实现这样的效果

补充说明（可选）
No response

我可以很负责地告诉你，是可以实现这种布局的。
看一下我之前实现的。
具体思路就是先给节点分组，每一组使用dagre算法生成坐标，然后给他们排版，最后套一个壳combo。链接到其他的节点。

我可以很负责地告诉你，是可以实现这种布局的。 看一下我之前实现的。 具体思路就是先给节点分组，每一组使用dagre算法生成坐标，然后给他们排版，最后套一个壳combo。链接到其他的节点。

太牛了，愿意贡献到官网 demo 吗

@PmcFizz 感谢解答，我看了文档，和节点分组不一样，因为我要实现的是点击节点上的+号之后，要根据当前节点的name去调用接口，再动态渲染节点内部嵌套的darge 流程图。外层节点是连线的，内层darge流程图不会和外部的节点连线。

@PmcFizz 感谢解答，我看了文档，和节点分组不一样，因为我要实现的是点击节点上的+号之后，要根据当前节点的name去调用接口，再动态渲染节点内部嵌套的darge 流程图。外层节点是连线的，内层darge流程图不会和外部的节点连线。

边可以连接到 combo 上，不连接到节点上就好了

我可以很负责地告诉你，是可以实现这种布局的。 看一下我之前实现的。 具体思路就是先给节点分组，每一组使用dagre算法生成坐标，然后给他们排版，最后套一个壳combo。链接到其他的节点。

太牛了，愿意贡献到官网 demo 吗

好的，我抽时间整理一下。

authors: PmcFizz Yanyan-Wang xiaoke-mgl


text:
chore: fix eslint errors

Checklist

[x] npm test passes
[x] tests and/or benchmarks are included
[x] commit message follows commit guidelines

Description of change

为啥我这点改动会影响覆盖率？

为啥我这点改动会影响覆盖率？

为啥我这点改动会影响覆盖率？

很迷


text:
node Image Type bug

In order to add an image type icon to the nodes in the canvas, the relevant line must be added.

@RackweLLizm Thank you for your contribution！

authors: RackweLLizm pomelo-nwu


text:
节点支持边框模式和渐变模式吗

功能描述

比如这种图形支持吗
期望解决方案
支持自定义设置特殊属性

这个用 HTML/React/Vue 节点来实现会简单很多。

可以自定义节点的

自定义 path 节点，配合 fillOpacity 属性可以实现。可以参考 drawio 上这个图形：

authors: NewByVector allenzoe webpig


text:
Stylesheets disabling and re-enabling causing jitter when exporting as PNG

Describe the bug
Tried to export the graph using toPNG method provided. Had a look at the code and found that we are disabling and re-enabling the entire stylesheets in the owner document of the svg. This actually causes some jitter in the app when using it.
Your Example Website or App
Common Problem - Reproducible in any instance
Steps to Reproduce the Bug or Issue

Create a button and make sure it calls the toPNG method
The existing styles of the app will be disabled and re-enabled, thus causing a jitter when the download is done

Expected behavior
The PNG should be downloaded without a jitter.
Screenshots or Videos
No response
Platform

OS: [macOS]
Browser: [Chrome]
Version: [106.0.5249.119]

Additional context
No response

Sorry, we don't have a good way to solve this problem at present.

authors: NewByVector harshaktg


text:
去掉axis或legend后图表剩余部分不能自动铺满容器

G2 Version:
Platform:
Mini Showcase(like screenshots):
CodePen Link:

去掉g2的axis和legend:
chart.axis("value", {
label: null
});
chart.legend('date',false);
原先的位置变成了一片空白而不是去掉这一部分,导致图表部分看起来是往右移了一样,很不美观
去掉axis之前:

去掉axis之后:

因为有默认的 padding。可以手动设置 padding https://antv.alipay.com/zh-cn/g2/3.x/api/chart.html#_padding

authors: NereusLee leungwensen


text:
iOS上拉回弹期间触摸图表，会造成页面卡死

F2 Version:

v1.1.4

Platform:

仅iOS

问题描述:

iOS上拉后，在页面回弹效果未结束期间触摸图表，会造成页面卡死，需要滚动非图表区域才能使页面恢复正常。
你们官方的 demo 就可以复现这个问题。

我也遇到同样的问题，是否有解决方案？

我也遇到同样的问题，是否有解决方案？

我有个不算完美的方案
{
        onReachBottomDistance: 0
}

    // fix ios 上拉回弹时触摸图表导致卡死的 bug
    onReachBottom() {
        wx.pageScrollTo({
            selector: "#bug-fix" // 页面底部放个空白元素就行
        })
    }

只能处理用户从上面滚动下来的情况，要是本来就在底部，还往下滑去触发这个bug，因为触底事件不会触发，所以没辙。

@ddosakura 我用你这个方法处理但问题还是存在

我也遇到同样的问题，是否有解决方案？

我有个不算完美的方案
{
        "onReachBottomDistance": 0
}

    // fix ios 上拉回弹时触摸图表导致卡死的 bug
    onReachBottom() {
        wx.pageScrollTo({
            selector: "#bug-fix" // 页面底部放个空白元素就行
        })
    }

只能处理用户从上面滚动下来的情况，要是本来就在底部，还往下滑去触发这个bug，因为触底事件不会触发，所以没辙。

但是下拉回弹的时候触摸图表同样还是卡死了，并且文档找不到设置距离顶部多少距离触发的参数可以填写

我用了一个看起来比较笨的方法，如果只需要展示的话，在图表组件同级下面增加一个CoverView
<CoverView className="cover-view"></CoverView>
CoverView的样式为
.cover-view{     position: absolute;     top: 0;     left: 0;     width: 100%;     height: 100%;     z-index: 99999; }
也就是用一个透明的覆盖物把图表组件全部覆盖住，这样上拉和下滑就不会触摸到图表了，并且依然不影响展示

authors: MrChen2016-08-27 ddosakura herofei qiaobox


text:
Cannot login on chrome

After pressing Authorize button, we are sent back to the login page.
Example: https://github.com/kimishidairessha/diabetes
It works just fine for linux and Android

Resolved. Closing

authors: gjwgit kimishidairessha

repo: anusii/solid-auth


text:
增加字体显示功能

原有anycad中
String fontName = "simhei.ttf";
AnyCAD.Platform.Font font = GlobalInstance.FontManager.FindFont(fontName);
if (font != null)
{
font.SetCharHeight(24);
font.SetCharWdith(24);
font.Update();
}
可以指定显示的字体
而AnyCAD.Rapid版本中，缺乏这个功能
var fontMaterial = FontMaterial.Create("font-texture-1");
fontMaterial.SetFaceSide(EnumFaceSide.DoubleSide);
fontMaterial.SetColor(new Vector3(1, 1, 0));
fontMaterial.SetBackground(new Vector3(0, 0, 1));
fontMaterial.SetBillboard(true);
        var dim = fontMaterial.SetText("Hello 世界!", 32);
        var shape = GeometryBuilder.CreatePlane(dim.x * 0.1f, dim.y * 0.1f);
        var node = new PrimitiveSceneNode(shape, fontMaterial);
        node.SetPickable(false);

        render.ShowSceneNode(node);

Add user defined Font API:
FontManager.Instance().AddFont("LS", @"C:\Windows\Fonts\STLITI.TTF");
var dim = fontMaterial.SetText("Hello 世界!", 128, "LS");
"LS" the Font Name/ID


text:
multi select in recyclerview

hi, I've implement your library, but there is one problem! when you swipe multi cells, all of them will swipe!!!! but the right way is to swipe onle one cell at the time! how can I fix this issue?!

hello,I internally use a static variable to control, you can do thread-safe control of static variables, you should be able to solve

recyclerView.setMotionEventSplittingEnabled(false);

authors: Azinnilchi githubzaibao spever

repo: anzaizai/EasySwipeMenuLayout


text:
Add a subcommand 'wanipv6'

There is a way to get the WAN side IPv6 address.

@rdh27785
Sorry for not helping with this pull request for a long time.
I will merge this pull request soon and fix the type-hint issue myself.
Thanks for your contribution!

authors: Sdssourcing aoirint rdh27785

license: Unlicense


text:
🛑 android-11.0.0_r1 is down

In ed89592, android-11.0.0_r1 (https://aosp.app/android-11.0.0_r1) was down:

HTTP code: 0
Response time: 0 ms

Resolved: android-11.0.0_r1 is back up in c6e7f73 after 8 minutes.

repo: aospapp/upptime


text:
Support new bulk import API in shell

This is follow up work for #436.  Need to support the new bulk import API in the shell.

@keith-turner do you think the shell should support the old and new bulk import APIs?

The shell has its own API. I don't think we need to confuse it with multiple commands that map to different Java APIs. We can just change its options, for example, to make failure directory optional.

So you are saying have the one command support both?  If you pass a failure directory use the old technique, otherwise use the new one?

One command, but should use the new implementation if the failure directory isn't specified.

Perhaps... but I think it might be better to only use the new one, leaving the failure directory arg as optional, so it doesn't break people who provide one, and give a deprecation warning if they do provide one.

Think we need to worry about backwards compatibility?  The way the CLI options work, I think I am going to have to change the command from:
importdirectory  <directory> <failureDirectory> true|false
to
importdirectory  <directory> true|false [-f <directory>]

I found the NO_FIXED_ARG_LENGTH_CHECK so I will make the command work with old and new based on number of parameters.

authors: ctubbsii keith-turner milleruntime

repo: apache/accumulo


text:
Add ability for Scanner to request an executor

Building on the work done in #549 it would be nice if Scanners could request an executor.  Scanner could have a method like requestScanExecutor(String name).  The requested executor would be made available (via the ScanInfo interface) to the per table ScanDispatcher on the server side, which may or may not honor this request.  The built in SimpleScanDispatcher could have an option to enable honoring these request, but ignore them by default.

This could be a bit more general, with a scanner having a method like the following :
/**
 * Provides information to the server side scan dispatcher and prioritizer that may be used when making decisions.  However those server side classes may ignore these hints.
 */
void setHints(Map<String, String> hints){}


text:
Some files with *Test.java naming convention aren't running as JUnit tests

Some tests seem to match the naming conventions for surefire to run JUnit tests, but they aren't actually JUnit tests, and they don't actually get executed (because they are in test/src/main/java, which contains ITs run by failsafe).
If they are intended as ITs, they should be renamed to match the *IT.java naming convention for the failsafe plugin.
If they are intended to be run as JUnit tests, they should be moved to the test/src/test/java/ directory so they can be run by the surefire plugin.
If they are neither ITs nor Unit tests, then they should be renamed so as not to cause confusion.

After further inspection, most of these classes are util classes, and aren't JUnit test cases, so whether or not they match the pattern is confusing, but not really a problem. Some of them make sense to move into a util package. Others could be renamed, and others (like TestIngest) which are used by a lot of other things are probably fine as they are.

The only important tests which aren't running are the TestProxy* tests, which weren't running at all, but should be ITs against mini (originally written for MockAccumulo, which was removed in 2.0, but weren't actually running because they were in the wrong directory).


text:
feat: add support for Knative

Knative is designed for serverless workloads on top of Kubernetes. Knative Serving runs scalable containers based on ingress gateway as its network layer. Currently, a few ingress gateway implementations such as Istio, Kong and Gloo are supported. APISIX ingress controller, however, is not among them.
This issue aims at exploring Knative ingress management mechanism and adding support for Knative. In other words, make APISIX ingress controller an alternative Knative network layer to manage ingress traffic.
Any suggestions or comments are welcome! And thanks @Yiyiyimu and @moonming for being mentors!

Interesting, welcome to submit proposals!

any news on the PRs?

Here is a PR I was working on to add support for Knative #606.

Thanks for your contribution, would you like to pick it up? @fhuzero

@tao12345666333 Thanks for the follow-up! So glad to see that the APISIX ingress controller project has grown a lot since when I created this issue.
My schedule is tight right now, but I'm willing to pick it up from where I left if I have time in the future. By the way, I'm curious about the development machine and environment for the project. Any recommendations for setting up the environment? I used to develop on an AWS EC2 instance but it cost a bit.

Typically, we use KIND to start a local cluster when developing locally, and deploy 1 replica of APISIX and etcd in it.  That's enough.
In addition, if you don't want to develop locally, you can also choose a cloud environment like GitPod, which is also very convenient

Thank you for the info!

authors: MBoui fhuzero tao12345666333 tokers

repo: apache/apisix-ingress-controller


text:
request help: How about change field retries to value from pointer.

apisix admin upstream api describe field retries:

If not set the retry mechanism is enabled by default
0 means disable retry mechanism.

I wanna disable retry meechanism, but 0 not pass to the admin upstream api because the omitempty
https://github.com/apache/apisix-ingress-controller/blob/master/pkg/kube/apisix/apis/config/v1/types.go#L115

https://github.com/apache/apisix-ingress-controller/blob/master/pkg/types/apisix/v1/types.go#L184

Retries *int that ok

@chzhuo Good, *int works well, PR's welcome!

#647 has been merged.  I will close this issue. Feel free to reopen it, if you have any question.

authors: chzhuo tao12345666333 tokers


text:
chore: add schema for ApisixUpstream

Please answer these questions before submitting a pull request
This Pull Request adds schema for ApisixUpstream.

Why submit this pull request?

[ ] Bugfix

[x] New feature provided

[ ] Improve performance

[ ] Backport patches

Related issues

Bugfix

Description

How to fix?

New feature or improvement

Describe the details and related test reports.

Backport patches

Why need to backport?

Source branch

Related commits and pull requests

Target branch

Codecov Report

Merging #407 (52e82f4) into master (3c6f911) will decrease coverage by 1.13%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
- Coverage   40.31%   39.18%   -1.14%
==========================================
  Files          39       40       +1
  Lines        3264     3300      +36
==========================================
- Hits         1316     1293      -23
- Misses       1785     1846      +61
+ Partials      163      161       -2

Impacted Files
Coverage Δ

pkg/apisix/cluster.go
29.95% <0.00%> (-6.29%)
:arrow_down:

pkg/apisix/route.go
33.33% <0.00%> (-2.23%)
:arrow_down:

pkg/kube/translation/ingress.go
90.90% <0.00%> (-0.54%)
:arrow_down:

pkg/ingress/apisix_tls.go
0.00% <0.00%> (ø)

pkg/ingress/controller.go
0.00% <0.00%> (ø)

pkg/ingress/apisix_route.go
0.00% <0.00%> (ø)

pkg/ingress/apisix_upstream.go
0.00% <0.00%> (ø)

pkg/kube/translation/plugin.go
100.00% <0.00%> (ø)

test/e2e/e2e.go

pkg/ingress/status.go
0.00% <0.00%> (ø)

... and 3 more

Continue to review full report at Codecov.

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

authors: codecov-commenter tokers


text:
Fix inconsistent array type for binary numerical operators result between array and scalar

Which issue does this PR close?

Closes #6243.
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Thank you @viirya

Now that some of the kernels actually support dictionary encoded arrays natively, I wonder if it would be possible to maintain the dictionary encoding as part of the coercion rules (rather than coercing the output to a primitive type)?

For mathematics numerical kernels, the returned type of two dictionary input arrays is primitive array. So for mathematics_numerical_coercion, this looks still correct.

For mathematics numerical kernels, the returned type of two dictionary input arrays is primitive array. So for mathematics_numerical_coercion, this looks still correct.

Yeah, I guess I was thinking it would nice to avoid the unpacking of the dictionary result into a primitive array (when possible)

Yeah, I guess I was thinking it would nice to avoid the unpacking of the dictionary result into a primitive array (when possible)

I meant, for mathematics numerical kernels (e.g. add, minus etc.), the result of operation between two dictionary arrays is primitive array. We don't unpack dictionary array into primitive array. This is why the coercion rule specifies the result type of such op as primitive type instead of dictionary of it.
But for such op between dictionary and a scalar, the result is dictionary array as for such op it can simply apply on dictionary values which is not the same for above case (dictionary and dictionary). So the inconsistency (primitive for dictionary/dictionary and dictionary for dictionary/scalar) leads to the bug we saw.
We can either changing primitive result of op on dictionary/dictionary to dictionary, or changing dictionary result of op on dictionary/scalar to primitive. This takes the later one as a fix. One reason is that this is simply to apply to fix the issue now. Another reason is that I'm not sure packing op result of dictionary/dictionary as dictionary making sense. It is doable but considering dictionary encoding during mathematics numerical op, it might be introducing performance penalty. I'll find some time trying that.

Thanks @alamb. I will find some time looking at the possibility to packing primitive result of math kernels on dictionary/dictionary as dictionary.

authors: alamb viirya

repo: apache/arrow-datafusion


text:
GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset

Describe the bug
Whilst perusing the code I noticed that GenericBinaryArray::from_list and GenericBinaryArray::from_list have the following logic
let mut builder = ArrayData::builder(Self::get_data_type())
    .len(v.len())
    .add_buffer(v.data_ref().buffers()[0].clone())
    .add_buffer(v.data_ref().child_data()[0].buffers()[0].clone());
if let Some(bitmap) = v.data_ref().null_bitmap() {
    builder = builder.null_bit_buffer(bitmap.bits.clone())
}

let data = unsafe { builder.build_unchecked() };

This does not propagate any offset that might be present in the source data
To Reproduce
I suspect if you slice an ArrayList and then pass it to this method, you will lose the offset position.
Expected behavior
The offset, and probably the null count, should be preserved by both methods

The issue also seems to appear in From<FixedSizeListArray> for FixedSizeBinaryArray and similar methods

I will work on this if no one else what to do it.

repo: apache/arrow-rs


text:
Support casting of Float16 with other numeric types

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

We support casting between various numeric types (signed/unsigned integers, floating), but for floating types, Float16 is not in supported list.
Describe the solution you'd like

Make sure Float16 is supported as like Float32/64 in numeric type casting.
Describe alternatives you've considered

Additional context

label_issue.py automatically added labels {'arrow'} from #5139

authors: tustvold viirya


text:
RecordBatch conversion from pyarrow loses Schema's metadata

Describe the bug
When importing a pyarrow RecordBatch, we instantiate a StructArray, then convert it to a RecordBatch.
This loses the metadata from the original schema. This is not seen in the current tests, because pyarrow's
tests for equality on schemas ignores metadata.
https://github.com/apache/arrow-rs/blob/31cf5ce23febf076104f064358a24fe8af09ee4b/arrow/src/pyarrow.rs#L357-L358
To Reproduce
# In arrow-pyarrow-integration-testing/tests/test_sql.py:470
batch = pa.record_batch([f32_array], ["tensor"], metadata={b'key1': b'value1'})
    b = rust.round_trip_record_batch(batch)
    assert b == batch  # OK
    assert b.schema == batch.schema  # OK
    assert b.schema.metadata == batch.schema.metadata  # Fails

Expected behavior
Imported RecordBatch's schema should keep its metadata.

This looks to have been introduced by https://github.com/apache/arrow-rs/pull/5070 perhaps @kylebarron you might be able to take a look. Also tagging @pitrou for some pyarrow knowledge

That's correct, I think #5070 introduced it, by transforming from a StructArray in the capsule case. The code for non-capsule conversion will work fine, because it keeps the schema around.
On the pyarrow side, I was surprised that a.schema == b.schema would work when fields match, but metadata is different (which is how tests were green).

On the pyarrow side, I was surprised that a.schema == b.schema would work when fields match, but metadata is different (which is how tests were green).

Sorry for that. Indeed, by default Schema equality doesn't check the metadata. You would have to change the code to a.equals(b, check_metadata=True).
(see https://arrow.apache.org/docs/python/generated/pyarrow.Schema.html#pyarrow.Schema.equals)

IMHO that would be a good idea, since it would make the tests stricter :-)

The source of that additional metadata seems to come from arrow's code, which is called by pyarrow to export the array and schema. pyarrow calls arrow's ExportArray, which itself exports the schema and adds metadata to the field to handle its extension type.
https://github.com/apache/arrow/blob/787afa1594586d2d556d21471647f9cd2c55b18f/cpp/src/arrow/c/bridge.cc#L283C1-L292C6

That is similar to how things are done for Arrow IPC. Knowledge of the extension type is serialized as metadata fields, and then extracted from the metadata on deserialization.

... it still means that schema.equals fails when there are extension fields, because the original pyarrow schema does not have it, yet exports it to the rust object, and it is still present when it comes back from its round-trip.
A few solutions come to mind:

Either we just test that the schema metadata is the same, and ignore fields metadata.
Or we allow the returned schema to be different, but ensure that any metadata in the original schema/fields comes back unharmed (and we allow for new metadata keys)

Ok, I opened https://github.com/apache/arrow/issues/39865 for Arrow C++.

I believe I also hit this recently but hadn't debugged where the conversion was failing. Thanks for the issue and PR!
I've also hit related pyarrow issues around extension types and schema metadata. Not sure what the right solution is to those (personally I wish the schema metadata were always accessible on the Field even when an extension type is registered, because it's possible that a third party has registered an extension and you don't know what attributes are guaranteed to exist on that class).

authors: atwam kylebarron pitrou tustvold


text:
BinaryViewArray doesn't roundtrip a single Some(&[]) through parquet

Describe the bug
It seems that a BinaryViewArray of a single Some(&[]) comes back as None (null) after being roundtripped through parquet. A non-empty byte slice, such as Some(&[1]) works, however.
To Reproduce
Using version 52.1.0
#[test]
fn binary_view_bug() {
    #[track_caller]
    fn roundtrips(x: &[u8]) {
        let before = BinaryViewArray::from(vec![x]);
        let batch =
            RecordBatch::try_from_iter(vec![("val", Arc::new(before.clone()) as ArrayRef)])
                .unwrap();

        let mut buf = Vec::new();
        let mut writer = ArrowWriter::try_new(&mut buf, batch.schema(), None).unwrap();
        writer.write(&batch).unwrap();
        writer.close().unwrap();

        let builder = ParquetRecordBatchReaderBuilder::try_new(Bytes::from(buf)).unwrap();
        let mut reader = builder.build().unwrap();
        let batch = reader.next().unwrap().unwrap();
        let after = batch.columns()[0].as_binary_view();
        assert_eq!(
            before.iter().collect::<Vec<_>>(),
            after.iter().collect::<Vec<_>>()
        );
    }

    roundtrips(&[1]); // This one works
    roundtrips(&[]); // This one fails
}

The output on failure is
assertion `left == right` failed
  left: [Some([])]
 right: [None]

Expected behavior
The value should be Some([]) on decode.
Additional context

Hi @danhhz , thank you for reporting this! But I can't reproduce the bug; probably already fixed in the master branch?

I have reproduced the bug from 52.1.0 on crates.io. We recently revamped the StringViewArray and ByteViewArray in arrow, but those changes do not propagate to 52.1.0, it should be fixed in the next release! cc @alamb

Yup, I can confirm that my repro as well as the original use that led me to find it are both fixed on master. Thanks!
Should I close this issue or do y'all want to keep it open until the fix makes it into a crates.io release?

Thanks @danhhz and @XiangpengHao  -- I'll mark this bug closed. https://github.com/apache/arrow-rs/issues/5998 tracks the release. I am hoping to be a closer to Aug 1 than Aug 7

authors: XiangpengHao alamb danhhz


text:
minor fix on checking index

Which issue does this PR close?
Closes #6693
Rationale for this change
Code bug on checking index.
What changes are included in this PR?
Bug fix
Are there any user-facing changes?
no

👍


text:
[Python] Parquet filter keyword of read_table docstring is outdated

Describe the bug, including details regarding any error messages, version, and platform.
The filter states that it needs it in DNF format, but since the use_legacy_dataset=False is now the default, we can also push in an expression. If you supply a DNF format, it will be converted into an expression later on:
https://github.com/apache/arrow/blob/master/python/pyarrow/parquet/core.py#L2414-L2416
Component(s)
Python

Issue resolved by pull request 33974
https://github.com/apache/arrow/pull/33974

authors: Fokko jorisvandenbossche

repo: apache/arrow


text:
ArrowTypeError: "object of type <class 'str'> cannot be converted to int"

Describe the bug, including details regarding any error messages, version, and platform.
I have a python3 script reading from JSON log files and storing them in parquet with pyarrow schema. Recently ran into this weird case with the error in title, ArrowTypeError: "object of type <class 'str'> cannot be converted to int".
Here's the log file:
{"uuid":"D4D8806A-4794-11EE-BC2C-31A44E74A5E9","timestamp":"2023-08-30T00:21:12+0000","version":"0.1","event_data":{"amount":27.1048,"user":19323160,"timestamp":"2023-08-30T00:21:12+0000"}}

Here's my script:
#!/usr/bin/python3

import pandas as pd
import pyarrow as pa

SCHEMA = pa.schema([
    ('uuid', pa.string()),
    ('timestamp', pa.timestamp('s', tz='UTC')),
    ('version', pa.float64()),
    ('event_data', pa.struct([
        ('amount', pa.float64()),
        ('user', pa.int64()),
        ('timestamp', pa.timestamp('s', tz='UTC')),
    ])),
])

def main():
    df = pd.read_json('pa_bad.log', lines=True)
    df.to_parquet(path='pa.parquet', schema=SCHEMA)

if __name__ == '__main__':
    main()

and the error looks like this:
$ python3 pa.py
Traceback (most recent call last):
  File "pa.py", line 24, in <module>
    main()
  File "pa.py", line 20, in main
    df.to_parquet(path='pa.parquet', schema=SCHEMA)
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pandas/util/_decorators.py", line 199, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pandas/core/frame.py", line 2463, in to_parquet
    **kwargs,
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pandas/io/parquet.py", line 397, in to_parquet
    **kwargs,
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pandas/io/parquet.py", line 152, in write
    table = self.api.Table.from_pandas(df, **from_pandas_kwargs)
  File "pyarrow/table.pxi", line 3681, in pyarrow.lib.Table.from_pandas
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 612, in dataframe_to_arrays
    for c, f in zip(columns_to_convert, convert_fields)]
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 612, in <listcomp>
    for c, f in zip(columns_to_convert, convert_fields)]
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 598, in convert_column
    raise e
  File "/home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 592, in convert_column
    result = pa.array(col, type=type_, from_pandas=True, safe=safe)
  File "pyarrow/array.pxi", line 323, in pyarrow.lib.array
  File "pyarrow/array.pxi", line 83, in pyarrow.lib._ndarray_to_array
  File "pyarrow/error.pxi", line 123, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: ("object of type <class 'str'> cannot be converted to int", 'Conversion failed for column event_data with type object')

I was digging into the JSON file and found that it works if I remove the event_data.timestamp from the JSON log file:
{"uuid":"D4D8806A-4794-11EE-BC2C-31A44E74A5E9","timestamp":"2023-08-30T00:21:12+0000","version":"0.1","event_data":{"amount":27.1048,"user":19323160}}

Please note that the schema entry for the event_data.timestamp in the pa.py has been removed as well.
I tried these variaions of JSON input and they all worked with no problem.
{
  "uuid": "D4D8806A-4794-11EE-BC2C-31A44E74A5E9",
  "timestamp": "2023-08-30T00:21:12+0000",
  "version": "0.1",
  "event_data": {
    "amount": 27.1048,
    "user": 19323160,
    "uuid": "D4D8806A-4794-11EE-BC2C-31A44E74A5E9"  <-------- works
  }
}

{
  "uuid": "D4D8806A-4794-11EE-BC2C-31A44E74A5E9",
  "timestamp": "2023-08-30T00:21:12+0000",
  "version": "0.1",
  "event_data": {
    "amount": 27.1048,
    "user": 19323160,
    "version": "0.1"  <-------- works
  }
}

Problem happens only when there is a timestamp value in a nested object:
{
  "uuid": "D4D8806A-4794-11EE-BC2C-31A44E74A5E9",
  "version": "0.1",
  "event": {
    "amount": 27.1048,
    "user": 19323160,
    "ts": "2023-08-30T00:21:12+0000" <----------- DOES NOT WORK
  }
}

Tested on these systems.
# macOS

$ pyenv local
3.11.1

$ pip show pandas pyarrow
Name: pandas
Version: 1.5.1
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: https://pandas.pydata.org
Author: The Pandas Development Team
Author-email: pandas-dev@python.org
License: BSD-3-Clause
Location: /Users/user/.pyenv/versions/3.11.1/lib/python3.11/site-packages
Requires: numpy, python-dateutil, pytz
Required-by: parquet-tools
---
Name: pyarrow
Version: 13.0.0
Summary: Python library for Apache Arrow
Home-page: https://arrow.apache.org/
Author:
Author-email:
License: Apache License, Version 2.0
Location: /Users/user/.pyenv/versions/3.11.1/lib/python3.11/site-packages
Requires: numpy
Required-by: parquet-tools

# CentOS 7

$ pyenv local
3.7.1

$ pip show pandas pyarrow
Name: pandas
Version: 1.2.0
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: https://pandas.pydata.org
Author: None
Author-email: None
License: BSD
Location: /home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages
Requires: python-dateutil, pytz, numpy
Required-by:
---
Name: pyarrow
Version: 12.0.1
Summary: Python library for Apache Arrow
Home-page: https://arrow.apache.org/
Author: None
Author-email: None
License: Apache License, Version 2.0
Location: /home/user/.pyenv/versions/3.7.1/lib/python3.7/site-packages
Requires: numpy
Required-by:

Component(s)
Parquet, Python

Hi, this is because Pandas reads event.data.timestamp as a string, not a Datetime, therefore the error message.
>>> type(df['event_data'][0]['timestamp'])
str

You can however bypass Pandas by using only pyarrow:
import pyarrow as pa
import pyarrow.parquet as pq

SCHEMA = pa.schema([
    ('uuid', pa.string()),
    ('timestamp', pa.timestamp('s', tz='UTC')),
    ('version', pa.float64()),
    ('event_data', pa.struct([
        ('amount', pa.float64()),
        ('user', pa.int64()),
        ('timestamp', pa.timestamp('s', tz='UTC')),
    ])),
])

table = pa.json.read_json('test.jsonl')
print(table)
pq.write_table(table, 'test.parquet')

Thanks @js8544 for the reply. But why does my code work for the timestamp on the root level?
Thanks for your suggestion to only use pyarrow! Though, we'll need to handle dataframes a bit so I'm not sure if I can go pyarrow only.

That's because the top level timestamp column is of type datetime64, which can correctly be converted to pyarrow timestamp:
>>> print(df['timestamp'].dtype)
datetime64[ns, UTC]

Perhaps you should ask the Pandas community about this inconsistency.

Makes sense. Thanks for the suggestions!


text:
[Go][Parquet] Trouble using the C++ reader to read a Parquet file written with the Go writer

Describe the bug, including details regarding any error messages, version, and platform.
Version: https://github.com/apache/arrow/commit/7ef517e31ec3
OS: macOS 13 arm64
I'm uncertain if this is user error, an issue with the Go packages, or an issue with the C++ reader.  I've put together a test that demonstrates the issue here: https://github.com/tschaub/parquet-issue-38503
I'm trying to use the pqarrow package to read an input Parquet file, transform some of the data, and write an output Parquet file.  In the linked test case, there is no transformation step.  So the test uses a pqarrow.FileReader, gets a pqarrow.RowGroupReader for each row group, reads each column as an arrow.Chunked, and uses a pqarrow.ArrowColumnWriter to write out the same.
When I try to use the C++ parquet-reader to read in the output file, I see the following error:
# parquet-reader output.parquet > /dev/null
Parquet error: Malformed levels. min: 2 max: 2 out of range.  Max Level: 1

This same test passes for other Parquet files.  I originally encountered the problem with one of the Overture Maps Parquet files, and the linked test case is based on a subset of that data using only two columns and a single row.
Summarizing

file
C++ reader
Go reader

input.parquet
✅
✅

output.parquet
❌
✅

Component(s)
Go, Parquet

Sorry for late reply. Run case in https://github.com/tschaub/parquet-issue-38503 can generate the case?

# parquet-reader output.parquet > /dev/null
Parquet error: Malformed levels. min: 2 max: 2 out of range.  Max Level: 1

This is weird 😅 This means go generate level == 2 when max-level == 1. Let me checkout the reason.

Updated: I think C++ reader checks max-rep-level, and it's 1. (and def-max is 3). So it report the error.

After rethink the impl, I found it's the impl's problem rather than a bug.
	ctx := context.Background()
	numFields := len(arrowReader.Manifest.Fields)
	numRowGroups := fileReader.NumRowGroups()
	for rowGroupIndex := 0; rowGroupIndex < numRowGroups; rowGroupIndex += 1 {
		rowGroupReader := arrowReader.RowGroup(rowGroupIndex)
		rowGroupWriter := fileWriter.AppendRowGroup()
		for fieldNum := 0; fieldNum < numFields; fieldNum += 1 {
			arr, err := rowGroupReader.Column(fieldNum).Read(ctx)
			fmt.Println("Read field: ", fieldNum)
			if err != nil {
				return nil, err
			}
			colWriter, err := pqarrow.NewArrowColumnWriter(arr, 0, int64(arr.Len()), arrowReader.Manifest, rowGroupWriter, fieldNum)
			if err != nil {
				return nil, err
			}
			if err := colWriter.Write(ctx); err != nil {
				return nil, err
			}
		}
	}
	if err := fileWriter.Close(); err != nil {
		return nil, err
	}

colWriter, err := pqarrow.NewArrowColumnWriter(arr, 0, int64(arr.Len()), arrowReader.Manifest, rowGroupWriter, fieldNum)

The code above is abit dangerous, the real code should be:
	numRowGroups := fileReader.NumRowGroups()
	for rowGroupIndex := 0; rowGroupIndex < numRowGroups; rowGroupIndex += 1 {
		rowGroupReader := arrowReader.RowGroup(rowGroupIndex)
		rowGroupWriter := fileWriter.AppendRowGroup()
		colIdx := 0
		for fieldNum := 0; fieldNum < numFields; fieldNum += 1 {
			arr, err := rowGroupReader.Column(fieldNum).Read(ctx)
			fmt.Println("Read field: ", fieldNum)
			for _, v := range arr.Chunks() {
				fmt.Println("CHUNK:" , v)
			}
			if err != nil {
				return nil, err
			}
			colWriter, err := pqarrow.NewArrowColumnWriter(arr, 0, int64(arr.Len()), arrowReader.Manifest, rowGroupWriter, colIdx)
			if err != nil {
				return nil, err
			}
			if err := colWriter.Write(ctx); err != nil {
				return nil, err
			}
			colIdx += colWriter.LeafCount()
		}
	}

colWriter.LeafCount() cannot be get now, maybe we need using other way.

And currently, the generated file is a bad file here...

authors: mapleFU tschaub


text:
MINOR: [Docs] Fix ARROW_USER_SIMD_LEVEL supported values

Substitutes SSE4.2 with SSE4_2 in https://arrow.apache.org/docs/dev/cpp/env_vars.html#envvar-ARROW_USER_SIMD_LEVEL.
See https://github.com/apache/arrow/blob/546c3771a209cbcac5e03cf26e07bcd8c9601d5a/cpp/src/arrow/util/cpu_info.cc#L443-L444

Potential 9.0.0 candidate @raulcd @kszucs

authors: agiudiceandrea pitrou


text:
GH-38300: [Dev][Docs] Update dev/README.md for the current merge_arrow_pr.py

Rationale for this change
dev/README.md is outdated.
What changes are included in this PR?

Don't require arrow remote
Remove ARROW Jira related documents

Are these changes tested?
No.
Are there any user-facing changes?
No.

Closes: #38300

Can we merge this?


text:
MINOR: [R] Remove writing_bindings from _pkgdown.yml

Rationale for this change
Missed this in #41576
Are these changes tested?
We should make sure.
Are there any user-facing changes?
No.

@github-actions crossbow-submit debian-docs

@github-actions crossbow submit debian-docs

I can't seem to trigger the docs build, but I confirmed locally that pkgdown builds.

@github-actions crossbow submit preview-docs

authors: kou nealrichardson


text:
AVRO-2627: Unify NullPointerException Management

Make sure you have checked all steps below.
Jira

[ X] My PR addresses the following AVRO-2627 issues and references them in the PR title.

Tests

[X] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Does not change behavior.  Unifies implementation and improves documentation.
Commits

[X] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[X] In case of new functionality, my PR adds documentation that describes how to use it.

All the public functions and the classes in the PR contain Javadoc that explain what it does

Merged manually to squash the 'fix' commit. Thanks @belugabehr

authors: belugabehr iemejia

repo: apache/avro


text:
Eliminate nullability errors from :sdks:java:extensions:sorter

Just edit build.gradle and set enableChecker: true and fix some errors!
Imported from Jira BEAM-10561. Original Jira may contain additional context.
Reported by: kenn.
Subtask of issue #20497

Please assign me this issue , I want to work on this.

Sorry for the delay @aditya-mistri. Do you still want to work on this? You can also use the .take-issue command in the future to take an issue.

authors: aditya-mistri damccorm kennknowles

repo: apache/beam


text:
[Task]: Update mypy type checker in tox.ini

What needs to happen?
If we try to update mypy-protobuf in build-requirements.txt to a latest version and run myypy==0.782(this is what we use currently to run mypy) type checker on the stubs generated by mypy-protobuf, we will see some errors which are wrong.

Update mypy to the latest version since the current version we use (0.782) was released almost 2 years back.
Issue Priority
Priority: 3 (nice-to-have improvement)
Issue Components

[X] Component: Python SDK
[ ] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[ ] Component: IO connector
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[ ] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

.take-issue

Version 0.790 seems to solve this and raise 7 errors. The newer version 1.0.1 is throwing 128 errors on  the PR https://github.com/apache/beam/pull/24599
I will go ahead and update mypy to 0.790 to unblock https://github.com/apache/beam/pull/24599

Version 0.790 seems to throw minimal errors with Beam codebase.  mypy 1.0.1 throwing 128 errors indicates that Beam code base has lot more type hinting errors which were not identified by old versions of mypy.