Implement Color object in react-stately

🙋 Feature Request
In preparation for building out various color picker components, we need a base representation of a Color value that will be used by all of these components. Colors can be represented in many different ways, e.g. hex (#abcdef), RGB strings rgb(25, 50, 75), HSL, HSB/HSV, CMYK, Lab, etc. These are all representations of the same value, and it's possible to convert between them for display purposes. Therefore, representing colors as strings doesn't really make sense, and it would be useful to have a standard Color value that is agnostic to the format it is eventually converted to.
💁 Possible Solution
There are various libraries out there which include color parsing, manipulation, and formatting capabilities. For example tinycolor, color, color-convert, and color-js. Unfortunately, these tend to be quite large and have many more features than we need. In addition, we'd like for React Spectrum's color representation to be agnostic to libraries even if we do use one so that we hide that implementation detail and can change it out later.
The API for the Color object should look like the following.
/** A list of supported color formats. */
type ColorFormat = 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hsb' | 'hsba';

/** A list of color channels. */
type ColorChannel = 'hue' | 'saturation' | 'brightness' | 'lightness' | 'red' | 'green' | 'blue' | 'alpha';

interface Color {
  /** Constructs a color from a string value */
  constructor(value: string),

  /** The color format of the input value. */
  readonly format: ColorFormat;

  /** Converts the color to a string in the given format */
  toString(format: ColorFormat): string,

  /** Converts the color to the given color format, and returns a new Color object */
  toFormat(format: ColorFormat): Color,

  /** Gets the minimum numeric value for a given channel, e.g. for a slider. */
  getChannelMin(channel: ColorChannel): number,

  /** Gets the maximum numeric value for a given channel, e.g. for a slider. */
  getChannelMax(channel: ColorChannel): number,

  /** Gets the step value for a given channel, e.g. for a slider. */
  getChannelStep(channel: ColorChannel): number,

  /**
   * Gets the numeric value for a given channel.
   * Throws an error if the channel is unsupported in the current color format.
   */
  getChannelValue(channel: ColorChannel): number,

  /**
   * Sets the numeric value for a given channel, and returns a new Color object.
   * Throws an error if the channel is unsupported in the current color format.
   */
  setChannelValue(channel: ColorChannel, value: number): Color,

  /** Returns a localized string name for the current color. */
  getName(locale: string): string
}

Color objects accept a string value which is parsed into an internal object structure. This can then be converted to other color formats. Color objects have a property which stores the input color format. This is so that when channel values are requested, an error can be thrown if the channel is not in the current format, and so that we can disambiguate between channels with the same name across multiple formats. For example, the saturation value is different between HSL and HSB, so we'll need to know which format we're in to do the proper conversions.
Users can convert between formats by calling toFormat, which returns a new Color object in the requested format, or by calling toString, which does the conversion and also converts the value to a color string. Color objects are immutable, so any time a method is called that changes something about the color, a new Color object is returned rather than mutating the existing one.
Internally, we could implement a few color models, e.g. RGB, HSL, and HSB, with conversion functions to map between them. There are fewer color models than formats. For example, hex and rgb are both represented as RGB, and rgb and rgba could be represented by the same model. A Color object could have an internal color value object that provides the implementation for these models, including conversions to other models. For example, the RGBColor implementation could have toHSL and toHSB methods to convert to HSLColor and HSBColor instances. We can copy the conversion functions from the libraries linked above to implement this.
This should be implemented in the @react-stately/color package.
We don't need to implement all of this right away, for example we could start with only supporting hex and RGB, and with only the methods we need. This API is mainly to get a sense for what we'll need eventually.
🧢 Your Company/Team
RSP

I like the idea of wrapping an existing library for at least the initial version.
I have to caution the logic of creating "Yet Another Color Library" as we did the same thing at my (recently closed) company.
As use cases and application demands grow you will be left refactoring or attempting to overcome limitations that previous libraries had already resolved..
As I'm now refactoring/porting to React I was planning on starting with tinycolor and implementing a very similar interface to the one you described.
I would also bring in isLight() and isDark() which for editor UI's is incredibly useful for things like X/Y position, labels, etc.
And as a major goal of the spectrum project is accessibility I would also consider getLuminance()
Another project I'd take a look at is Pickr
The whole library is for it's own picker but the color modifying is significantly smaller/simpler than some of the other implementations. He generally converts all colors to HSVA and then outputs/modifies from that object.
Another thing to consider would be modularizing the models/uses for example "CMYK" which would be very useful for any type of print or design from print application, but not very useful for most others. Color names (string conversion), gradients, extended logic, etc. could either be imported in a Color-extended type way or as module imports. This would help keep the initial codebase small while allowing later features and extensions.
Question
As you've already written a draft outline is this something you are going to tackle immediately or is this something you are open/interested in someone contributing?
As I mentioned, I was already planning on doing something like this, and decided today to leverage Spectrum as the UI component base of my new application. I'm actively looking for Open Source projects to contribute to so this seems like it would be a good fit.
Here's a quick little video of our material color-picker working back in 2016

Thanks @DennisSmolek! I've put together a very basic setup for what I think it could look like here: https://github.com/adobe/react-spectrum/pull/979.

I have to caution the logic of creating "Yet Another Color Library" as we did the same thing at my (recently closed) company.

Totally valid concern. The main issue I see is that many of these libraries have a lot of features we don't need. We mainly need basic color conversions. If such a library exists that is tree-shakeable so we only pull in the functions we need, that would be great. Otherwise, it doesn't seem like too much work to copy/paste the ones we need for our color picker components.

I would also bring in isLight() and isDark() which for editor UI's is incredibly useful for things like X/Y position, labels, etc. And as a major goal of the spectrum project is accessibility I would also consider getLuminance()

Yeah but I don't think I want to get into supporting too much functionality out of the box that the color picker components themselves don't need. Perhaps these types of functions could be implemented as separate functions outside the core Color object such that they can be tree-shaken when unused by an application?

Another thing to consider would be modularizing the models/uses for example "CMYK" which would be very useful for any type of print or design from print application, but not very useful for most others.

In the basic setup I did, the models are implemented in separate classes, so it should be fairly easy to add new ones if needed. I suppose we could make it extensible via a registration mechanism for new models, but I don't want to get too complicated too quickly. Let's see how it goes first.

As you've already written a draft outline is this something you are going to tackle immediately or is this something you are open/interested in someone contributing?

We are starting to work on it, but will be tackling the basics first. If you'd like to help us implement some of the missing functionality for color conversions, we'd love it! We're starting with a hex color field (see #974), but will be speccing the other color picker components (e.g. color sliders, areas, wheels, etc.) very soon, and would love some help from contributors on those as well. Let me know what you have time to work on! 😄

Could I suggest https://github.com/thi-ng/umbrella/tree/develop/packages/color Very minimal and tree shakeable.

I'm curious about this aspect of the API:
/** A list of color channels. */
type ColorChannel = 'hue' | 'saturation' | 'brightness' | 'lightness' | 'red' | 'green' | 'blue' | 'alpha';

Would this enumeration simply be added to as additional color models and formats are supported? For example, HSV is synonymous with HSB but if you support both outputs there would be channel names value and brightness that are the equivalent (same value would be returned). However, the term lightness spans a number of models with very different values being returned (for example, HSL vs LCH lightnesses are very different).
Another interesting example would be when/if you support Lab colorspace. The a and b channels reference "Redness / greenness" and "Blueness / yellowness". In this case, specifying the color channel by it's individual character representation may be more reasonable.
For example, let's say I have a color lab(49,9,-67)
If I want to know the b value, it would be strange to write color. getChannelValue('blueYellow'). It would be preferable in my opinion to specify the channel as a single character, ie color.getChannelValue('b')
The use of strings for these channel names also could be potentially confusing as the strings are closer to terms people use to describe color, rather than the actual channel -- such that a user could easily mis-match terminology when they want the saturation level of a color that is defined in lch color space (which the correct term would then be "chroma"). Tying directly to the specific abbreviated character used in the colorspace name could make it more intuitive -- "I want the c value of color lch(100, 97, 45)

Yeah that's right, we'd add more channels as we implement more models/formats. However, only the channels that are part of the current color format would be supported. For example, if you have a color in RGB format, then asking for the hue channel would throw an error. You'd need to convert this to an HSB/HSV/HSL color first before asking for that channel.
You're right that a channel name can map to different values depending on the color model. For example, HSL and HSB/HSV both have a "saturation" channel, but they will be different values. Same with LCH as you mentioned. This would also be true if we switched to single letter names for channel names too (the l or the s would be different values depending on the model).
That's interesting feedback though - I was thinking it would be clearer to use full names in case the single letters mapped to different names (e.g. "brightness" vs "blue"). I could see either way though... 🤔

This has been merged https://github.com/adobe/react-spectrum/pull/979 and updated so now it is this: https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/color/src/Color.ts


Property of a type is not assignable to Pick of this type

🔎 Search Terms
"TS2322 pick"
"not assignable to pick"
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about Pick
I was unable to test this on prior versions because it already happens at oldest available version in playground - 3.3.3

⏯ Playground Link
https://www.typescriptlang.org/play?ts=5.4.0-dev.20240123#code/C4TwDgpgBAksEFsoF4oG8CwAoKurAEtgAbCAfgC4oBnYAJwIDsBzKAHykYFdjjsBfbNgDGAe0a0oRRFTiIU6bHnxFSVAOQALCL1HqBQrADMujYYXFQAhgApCJCFQAKBYQGsAPHIQAaKOvtSdQA+AEp0MQlRUgA6YlFmO1UIUMFjU3MCSwAjJIdnV09vPwDkkPYoUwATCCMmCCrwtEjqaIg4hLzSVOwTMwtGKGEuxygXdy94X39AiHKOatr6qoruXiaWto7E2Z6sbFtpBBjd7Fyjk+TQkRsL3aA
💻 Code
type Item = {
    title?: string | null
}

const item: Item = {
    title: 'hello'
}

function a(title: Pick<Item, 'title'>) {console.log(title)}
function b(title: Pick<Item, 'title'> | undefined) {console.log(title)}
function c(title: Pick<Item, 'title'> | undefined | null) {console.log(title)}

a(item.title)
b(item.title)
c(item.title)

🙁 Actual behavior
Type Item has property title which is string | null | undefined.
Trying to assign property title of type Item to consumer with type Pick<Item, 'title'> results in error ts2322 - cannot assign undefined to property which already supports undefined:
Argument of type 'string | null | undefined' is not assignable to parameter of type 'Pick<Item, "title">'.
  Type 'undefined' is not assignable to type 'Pick<Item, "title">'.

But what if we explicitly add undefined to consumer? Pick<Item, 'title'> | undefined results in same error ts2322 - but now it is about null, which consumer already supports:
Argument of type 'string | null | undefined' is not assignable to parameter of type 'Pick<Item, "title"> | undefined'.
  Type 'null' is not assignable to type 'Pick<Item, "title"> | undefined'.

What if we explicitly add null to consumer too? Pick<Item, 'title'> | undefined | null results in same error ts2322 - but now that we manually redefined two thirds of initial type, it fails to assign string to the only remaining option from picked type, which is string:
Argument of type 'string | null | undefined' is not assignable to parameter of type 'Pick<Item, "title"> | null | undefined'.
  Type 'string' has no properties in common with type 'Pick<Item, "title">'.

🙂 Expected behavior
All 3 options (pick, pick undefined, pick undefined null) should work without error because all possible types of consumer are derived (and/or overwritten by identical types) from the same type definition that argument in function call uses - thus both have exactly same type.
Additional information about the issue
I searched for other occurrences of ts2322 error, but non of them were in context of Pick, and workarounds for them were not applicable here.

The type of Pick<Item, 'title'> is { title?: string | null | undefined }. It is not string | null | undefined.
Pick<> is basically "give me an object with only these properties".

Right. Probably I oversimplified my example. I will see if I can reproduce it with more complex types.

I made more complex example that shows problem I encountered in real code.
playground
Code:
type Item = {
    title: string
    categories?: (string | Category)[] | null
}

type Category = {
    id: string
    slug: string
}

const allItems:Item[] = []

type ItemNarrowed = Pick<Item, 'title'> & {
    categories?: Pick<Category, 'id' | 'slug'>[] // | null
}
function a(item: ItemNarrowed) {console.log(item)}

allItems
    .filter(item => typeof item.categories !== 'undefined' && item.categories !== null && !!item.categories) // only items where categories is not null and not undefined
    // function call gives error: Type 'null' is not assignable to type 'Pick<Category, "id" | "slug">[] | undefined'.

    .filter(item => Array.isArray(item.categories)) // only items where categories is array (same as previous filter)
    // gives same error

    .filter(item => typeof item.categories !== 'string') // only items whre item.categories is Category
    // if you uncomment null in ItemNarrowed.categories, it will give this error instead: Type 'string' is not assignable to type 'Pick<Category, "id" | "slug">'.

    .forEach(item => {
        a(item)
    })

So unless I did something wrong, .filter() does nothing for type narrowing.

So unless I did something wrong, .filter() does nothing for type narrowing.

That's correct: type predicates are not automatically inferred.  You need to write e.g. .filter((item): item is ItemNarrowed => ...) to get it to narrow.

Yes, it appears to be the only actual problem.
This workaround feels strange, but if it works - it works.
Since it is duplicate, is there estimated timeline for it? Original topic started 7 years ago already, but progress is still unknown to public.

All our progress, commits, and meeting notes are public. For approximately all things, if you don't see it here, it's not being worked on due to the other work you see having higher priority.


Some texts are not translated in the html build

When writing a book in another language (in my case is spanish), and with the correct language set in the sphinx section of _config.yml, some text appears in English.
Such is the case for the search box:

and the table of contents:

The messages generated by sphinx, for instance after a search, are ok:

To Reproduce
Steps to reproduce the behavior:

Create a book
Set the language to spanish
Build the book
See error

Expected behavior
All english messages are translated.
Environment

Python 3.8.3
Jupyter Book: 0.7.4
MyST-NB: 0.8.5
Sphinx Book Theme: 0.0.35
MyST-Parser: 0.9.1
Jupyter-Cache: 0.3.0
Operating System: Ubuntu 20.04

Additional context
Sphinx configuration section in _config.yml
sphinx:
  config:
    latex_elements:
      fncychap: \usepackage[Glenn]{fncychap}
      babel: \usepackage[spanish]{babel}
    language: "es"

I had the same issue. While you can change the string "Search this book..." by overriding "search_bar_text" in configuration files, the string "Contents" seems to be hardcoded in topbar.html. Replacing this literal string by a variable should be simple to do. The same comment applies to some strings in footer.html (e.g., "Last updated on"). Thanks!

Yes we should definitely make it possible to customize the contents text. Would be happy to review any PRs that give this a shot. For reference, here's where contents is placed:
https://github.com/executablebooks/sphinx-book-theme/blob/master/sphinx_book_theme/topbar.html#L30
and here is where the search bar text is configured in the theme:
https://github.com/executablebooks/sphinx-book-theme/blob/master/sphinx_book_theme/sidebar.html#L14

Also opened up https://github.com/executablebooks/sphinx-book-theme/issues/197 to discuss i18n in this theme more generally 👍

In 3b002b4cd8f56d806c6c4f0e8816819a22cbb3d4, "Contents" is now auto-translated.
The search box default can be set by in your conf.py:
html_theme_options = {
  "search_bar_text": "My default text"
}

There's no translation specifically available for the default text ("Search the docs ..."), so it would be a bit trickier to do that one automatically.
I'll close this then, and any further discussion can be had in #197.

actually the search text is now translated + all buttons and tooltips 😄

👏
Miguel Montes
On Wed, Sep 23, 2020 at 2:34 AM Chris Sewell<EMAIL_ADDRESS>wrote:

actually the search text is now translated + all buttons and tooltips 😄
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/executablebooks/sphinx-book-theme/issues/188#issuecomment-697143965,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWDL6MYLWIEEZ7QM73VYP3SHGCGFANCNFSM4QFICAPQ
.


python3Packages.ihatemoney: disable sandbox unfriendly tests

Motivation for this change
also fixed the passthru.tests, as nix-build won't normally recurse into a nested set, so nix-build -A python3Packages.ihatemoney.passthru.tests would actually build nothing.
ZHF #97479
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

https://github.com/NixOS/nixpkgs/pull/98060
2 packages built:
python37Packages.ihatemoney python38Packages.ihatemoney

The regression is due to a7b5b18ab92 python: dnspython: 1.16.0 -> 2.0.0

I guess disabling the tests is fine, because I can't figure out what broke or even if it should work at all.

WFM macos 10.14

@symphorien yea, that's fair. These failures might be indicative of an actual failure.
I guess it's just the tests are viewing the errors as "clients" and all that gets dumped is "unable to reach service" which isn't helpful.


Change credential log statement to INFO from DEBUG

When logger is defined anywhere in the program Botocore is mostly silent with its logging statements except for this single logger. This commit changes it to be more in-line with other logging statement levels.

Current coverage is 97.95% (diff: 100%)

Merging #1136 into develop will not change coverage

@@            develop      #1136   diff @@
==========================================
  Files            45         45
  Lines          7093       7093
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           6948       6948
  Misses          145        145
  Partials          0          0

Powered by Codecov. Last update 26decfe...1858a98

:shipit: Thanks!

..just realized changes haven't been merged yet. Re-opening.

Thanks! Merging.


fix some race conditions with short lived pods

solves a couple of race conditions that are seen with short lived pods.
More details in each of the commits

/test all

/retest

@runcom are you fine with this version (after my comment why I did this way), or do you prefer if I change it?

LGTM

/lgtm


Question: Possible to close form dialog?

Hi,
thanks for releasing UIBooster, it really helps setting up a UI.
Is it possible to close a form dialog, other than closing its window? I'd like to do simple 'ok' and 'cancel' buttons on the bottom of the dialog. In the form class doesn't seem to be a method for that.
best,
Philip

Nevermind, sorry to bother, form.close(); did the trick--

Don't worry. I am glad that UiBooster is useful to you and it works for your needs ☺


Add choices and documentcloud_pages to FilerToFilerTypeCd.county_cd (in other.py)

Overview
Add choices and documentcloud_pages to the county_cd field on FilerToFilerTypeCd the database model.
Basically, we think county_cd should be defined as a "choice field" (in Django parlance), which just means it's a field with a defined list of valid values and an intelligible definition for each value.
Our goal is for every potential choice field to include references to locations in the official documentation where the field's valid values and their meanings are described AND to have those choices included in the field's definition.
And we need your help!
What to do
Step 1: Claim this ticket by adding yourself as an Assignee (to the right)
Step 2: Find where in the official documentation county_cd's list of valid values is defined.
The best place to look first is in the .CAL layout documents: .CAL Format version 2.01 and .CAL Format version 1.05.02. These are documents that describe the layout of the .CAL file format, which is the required electronic format of any filings ingested by the CAL-ACCESS system (more on that here if you are interested).
You can start by opening the document and just searching for "county_cd". For example, if you were assigned to tackle the stmt_type field on the CvrCampaignDisclosureCd model, you would be looking for something like this::

But note that the same column might appear on multiple tables, and the list of valid values may vary depending on the table. We want to be sure to find the list of valid values for the county_cd on the FilerToFilerTypeCd model.
Another good place to look is in the MapCalFormat2Fields document, which describes how .CAL format fields are mapped to CAL-ACCESS database table columns. Note the Valid_V column on the far right.
Step 3: Copy the DocumentCloud ID and the page number(s) where county_cd's list of valid values is defined.
The DocumentCloud ID can be found the in the URL that points to the document. For example, the url to the .CAL Format version 2.01 doc is http://www.documentcloud.org/documents/2712034-Cal-Format-201.html#document/p1, and the id is 2712034-Cal-Format-201.
And the start page we want to grab is the DocumentCloud page number, not the page number printed on the .PDF. If the list of valid values spans multiple pages, then grab the page where the list ends as well.
Step 4: Find where county_cd is defined in other.py in the /calaccess_raw/models/other.py file underneath the FilerToFilerTypeCd class.
Since the model files are rather long, take care to be sure you find the where county_cd is defined for the FilerToFilerTypeCd model. It should look something like this:
    class FilerToFilerTypeCd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        county_cd = fields.IntegerField(
            max_length=None,
            db_column='COUNTY_CD',
            blank=True,
            verbose_name='county cd',
            help_text='Filer's county code',
        )

Step 5: Add the document references
Say you found the list of valid values listed in three places. You would list them in the documentcloud_pages attribute like this:
    class FilerToFilerTypeCd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        county_cd = fields.IntegerField(
            max_length=None,
            db_column='COUNTY_CD',
            blank=True,
            verbose_name='county cd',
            help_text='Filer's county code',
            documentcloud_pages=[
                DocumentCloud(id='2711616-MapCalFormat2Fields', start_page=10),
                DocumentCloud(id='2712033-Cal-Format-1-05-02', start_page=19),
                DocumentCloud(id='2712034-Cal-Format-201', start_page=24, end_page=25),
            ]
        )

Note: You only need to specify the end_page if the list spans multiple pages.
Step 6: Update the county_cd's help_text (if necessary)
It might be missing or it might be an empty string or it might not be consistent with what you see in the documentation. Note: The entire help_text string needs to be enclosed in single- or double-quotes like this:
    help_text='This is the help text',

If the help text is really long (80+ characters), then it needs to span multiple lines like this:
    help_text='This is the help text...blah...blah...blah...blah...blah...blah...\
...blah...blah...blah',

Step 7: Define the choices
The normal Django pattern is to define choices within the model class as a tuple which contains a bunch of two item tuples. The first item of each inner tuple is the valid database column value, and the second item is the definition. It should look something like this:
    COUNTY_CD_CHOICES = (
        ('AAA', 'Some definition of AAA'),
        ('BBB', 'Some definition of BBB'),
        ('CCC', 'Some definition of CCC'),
        # ...and more..
    )

Then we assign this tuple of tuples to 's choice argument with a single line: choices=COUNTY_CD_CHOICES.
When finished, it should all look something like this:
    class FilerToFilerTypeCd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        COUNTY_CD_CHOICES = (
            ('AAA', 'Some definition of AAA'),
            ('BBB', 'Some definition of BBB'),
            ('CCC', 'Some definition of CCC'),
            # ...and more..
        )
        county_cd = fields.IntegerField(
            choices=COUNTY_CD_CHOICES,
            max_length=None,
            db_column='COUNTY_CD',
            blank=True,
            verbose_name='county cd',
            help_text='Filer's county code',
            documentcloud_pages=[
                DocumentCloud(id='2711616-MapCalFormat2Fields', start_page=10),
                DocumentCloud(id='2712033-Cal-Format-1-05-02', start_page=19),
                DocumentCloud(id='2712034-Cal-Format-201', start_page=24, end_page=25),
            ]
        )

So some of these choice fields show up on multiple tables (the various office_cd fields are a good example), and of course it's rather redundant to repeat these values and their definitions over and over. In some these cases, we've consolidated these valid values into one place: calaccess_raw/annotations/choices.py.
So then instead of listing out all the choices in the tuple of tuples, we can do this:
    OFFICE_CD_CHOICES = get_sorted_choices(choices.OFFICE_CODES)
    office_cd = fields.CharField(
        choices=OFFICE_CD_CHOICES,
        # ...other stuff...
    )

If you think the field your looking at is a candidate for this sort of consolidation, let's have a conversation about it. Just post a comment below.
If you can, check the county_cd's defined choices against the actual values in county_cd's database column.
This will require you to install the app and run the updatecalaccessrawdata command. Then you can get the distinct column values with a GROUP BY query like this:
    SELECT COUNTY_CD, COUNT(*)
    FROM FILER_TO_FILER_TYPE_CD
    GROUP BY 1
    ORDER BY 1;

It's likely that you'll find undocumented values in database column, some of which are variants of the valid values. You can note these by repeating the same definition for each variant like this:
    OFFICE_CD_CHOICES = (
        ('GOV', 'Governor'),
        ('gov', 'Governor'),
        ('GUV', 'Governor'),
        # ...
    ),

If you're dealing with a set of choices that's been consolidated into calaccess_raw/annotations/choices.py, you can map the different variants to the same definition using the key of the choices dict like this:
    OFFICE_CD_CHOICES = (
        ('gov', look_ups.OFFICE_CODES['GOV']),
        ('GUV', look_ups.OFFICE_CODES['GOV']),
        # ...
    ),

If you're not able to check the database column values for whatever reason, don't sweat it. We'll deal with it in a later issue.
Wrap up: Review your changes and create a pull request

That's it!
PS: If any of this feels confusing, or if it doesn't seem to match up with what you are seeing, or if you have any suggestions about another approach, don't hesitate to speak up. You can post a comment below, or hit up the #california-civic-data channel on the News Nerdery Slack.

Done.


Question: forwarding ref (component instance)

Question:
Hi, I'm struggling to figure out how to use Reference when I'm not using a button wrapper with styled-components.
From styled-components docs:

Passing a ref prop to a styled component will give you one of two things depending on the styled target:

the underlying DOM node (if targeting a basic element, e.g. styled.div)
a React component instance (if targeting a custom component e.g. extended from React.Component)

Since the ref I'm getting back is the full instance, I'm not quite sure how to use it in Reference since Reference expects the underlying DOM node. Is there a simple way to solve this without defining a custom buttonRef in my styled component and pass it inside?

@donifer

Do you wrap your styled-components with a React.forwardRef?

Not sure if you still need help with this, but basically you'll want to use forwardRef in the component that you're wrapping. This component needs to attach the passed ref to the element that you want the ref to return (so, most likely the outermost element of the component).
This will make sure that styled-components can forward the ref correctly.


chore: bdd-spring-1580663952 to 0.0.1

chore: Promote bdd-spring-1580663952 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Prepare kedro-airflow release 0.4.2

Description

Development notes

Changes:

Drop context/session usage to fetch pipelines to support Kedro>=0.17.5, details can be found here
Forcing kedro<=0.18 due to dependecies issue, since 0.5.0 would support kedro>=0.18 anyway.

Checklist

[x] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[x] Updated the documentation to reflect the code changes
[x] Added a description of this change in the relevant RELEASE.md file
[ ] Added tests to cover my changes

The 0.4.2 will support kedro<0.18.0 only due to many dependencies issues we had during kedro release since 0.5.0 would support Kedro>=0.18.0 anyway, so it should be fine


Common config: enhancement to reactor_config prebuild plugin

The reactor_config plugin could take additional parameters and use them to update the config object it stores. For this to be useful it should be possible not to specify a config_path parameter.
This could be used to store configuration required by multiple plugins, for example Koji information (URLs, certificates) etc.
The benefit of this is that configuration does not have to be set for each and every plugin requiring a particular configuration value.
Example:
{
  "name": "reactor_config",
  "args": {
    "config_path": "/var/run/secrets/config.yaml",
    "integrations": {
      "koji": {
        "kojihub": "...",
        "kojiroot": "...",
        "target": "...",
        "koji_proxy_user": "...",
        "koji_ssl_certs_dir": "...",
        ...
      }
    }
  },
  {
    "name": "koji"
  }
}

Resulting object returned by get_config() would be something like:
{
  "version: 1,
  "clusters": {
    ...
  },
  "integrations": {
    "koji": {
      "kojihub": "...",
      "kojiroot": "...",
      "target": "...",
      "koji_proxy_user": "...",
      "koji_ssl_certs_dir": "...",
      ...
    }
  }
}

This will require a new plugin "arrangement version".

Even better would be to use 3.6.1's ConfigMap support for BuildConfigs, i.e.
  strategy:
    customStrategy:
      env:
        - name: ...
          valueFrom:
            - configMapKeyRef:
                name: ...
                key: ...
                optional: true/false

and have get_config() parse a base64-encoded environment variable populated that way.

Some things like koji_ssl_secret_dir would be known to osbs-client and awkward to have to change in a ConfigMap, so probably we'd want a mix of these two approaches.

That would create a new env for build, but we could simply pass the name of ConfigMap where the data would be stored - and plugins would fetch the data manually, as atomic-reactor has access to oc

We now use common config.


some N/A token appears in FIFA asset card after upgrade to test flight 1.0(212)

0xbc8dAfeacA658Ae0857C80D8Aa6dE4D487577c63

0x4C41552485Af22Ed277c221854F97887deA500bC

It cannot be transferred, we tried, and it failed as below
https://etherscan.io/tx/0xa01b88c0a60031391ececb6dc90ddc636c7348d74a0624767b2a01c45c993262

@hboon on this, have a hunch it is adding the null tokens


Test fix for multidim rechunking _invert_meshgrid error

@cisaacstern and I just came up with a fix for https://github.com/pangeo-forge/pangeo-forge-recipes/pull/658 and I want to see if this alleviates some of the failures I have seen.

[x] Revert test pr iid list changes once they ran.

@rsignell I just added the iids from #73 to the PR test list to see if this fixes the issue. Stay tuned.

Trying to submit some runs from the MPI-ESM1-2-LR, which previously failed due to this particular error.

So far all the MPI runs pass now 🚀 Example
Waiting for the HighResMIP runs now.

HELL YEAH, one of them ran successful already.

There is is @rsignell:

Nicely chunked in space. Ill consider this a success and merge this to the main branch.

That is awesome Julius! Way to go!!

The other runs were killed by our zombie killer. I will adjust the timing of that for now, merge this and see how the full time range datasets fare.

This is exciting!!


string type size

within the S7Type the different data types, their converter classes and theirs sizes are described. I think the sizes specified there are the type sizes on the PLC, aren't they? As far as i have seen the S7 PLCs always "reserve" 256 Byte for a STRING type even if the user does not use it completely. I wonder why STRING is specified like that within S7Type:
/** 	 * String type, size must be specified manually 	 */ 	STRING(StringConverter.class, 2, 0),
and not like this:
STRING(StringConverter.class, 256, 0),

From my experience (mostly reverse engineered): The S7 String has a dynamic size.
The first byte is the overall size and the second is the current size, but the overall size can't be more than 256 bytes anyway (1 byte length inidicator) and the current size can't be more than the overall size.
The code is pretty clear on that:
https://github.com/s7connector/s7connector/blob/master/src/main/java/com/github/s7connector/impl/serializer/converter/StringConverter.java#L23


docs translation managing state

Closes https://github.com/reactjs/id.react.dev/issues/378
Description
Translate the https://id.react.dev/learn/managing-state page
Page URL: https://id.react.dev/learn/managing-state

Thanks for contributing, @andriansanto! 🙏 Though I have a few comments that might lead to significant changes. So please address them first, and then I will give it another review once you addressed them all. 😁

Thankyou for the feedback, will solve it soon 😄

Thanks for contributing, @andriansanto! 🙏 Though I have a few comments that might lead to significant changes. So please address them first, and then I will give it another review once you addressed them all. 😁

Thankyou for the feedback, will solve it soon 😄

Done, Kindly for the review again @zainfathoni  🙏

@resir014 and @zainfathoni can check and approve if okay.


global_placement fails without -disable_routability_driven option

I removed the -disable_routability_driven option from the tests:
index 86ea4639..29a7bd77 100644
--- a/test/flow.tcl
+++ b/test/flow.tcl
@@ -20,7 +20,7 @@ place_pins -random -hor_layers $io_placer_hor_layer -ver_layers $io_placer_ver_l
 # Macro Placement
 if { [have_macros] } {
   # tdms_place (but replace isn't timing driven)
-  global_placement -disable_routability_driven -density $global_place_density
+  global_placement -density $global_place_density

   macro_placement -global_config $ip_global_cfg
 }
@@ -35,7 +35,7 @@ pdngen -verbose $pdn_cfg

 ################################################################
 # Global placement
-global_placement -disable_routability_driven \
+global_placement \
   -density $global_place_density \
   -init_density_penalty $global_place_density_penalty \
   -pad_left $global_place_pad -pad_right $global_place_pad

And they fail during routing. eg:
../build/src/openroad gcd_sky130.tcl

...

post process guides ...

This looks to be fixed, closing


Not able to install sktime

Unable to install sktime. I am getting the attached error:

Pls use the issue template and provide required information.

@ksaurabh21 seems like we don't provide a wheel for your platform, which operating system are you on?

Here are the os details:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o
enterprise_linux:7.9
server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
On Mon, May 31, 2021 at 2:05 PM Markus Löning @.***>
wrote:

@ksaurabh21 https://github.com/ksaurabh21 seems like we don't provide a
wheel for your platform, which operating system are you on?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alan-turing-institute/sktime/issues/904#issuecomment-851319872,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABYEN64IQWTMNRJTJTSEAULTQNC65ANCNFSM45RYLECA
.

You could try to use a more recent Python and/or sktime version. Otherwise see if the advanced installation instructions help you to compile sktime on your platform: https://www.sktime.org/en/latest/installation.html

hi @ksaurabh21 can we close this issue?

Yes, please do.
On Wed, Jun 30, 2021 at 8:06 PM Tony Bagnall @.***>
wrote:

hi @ksaurabh21 https://github.com/ksaurabh21 can we close this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alan-turing-institute/sktime/issues/904#issuecomment-871461562,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABYEN6ZS26AHPW7CEZH6BITTVMTYFANCNFSM45RYLECA
.


Orange Pi Zero 3

Basic information

Board URL (official): http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html
Board purchased from: Amazon US
Board purchase date: 12/28/2023
Board specs (as tested): 4GB + Expansion Board, 64GB PNY Elite-X MicroSD, no heatsink
Board price (as tested): $38 without tax

Linux/system information
Official Ubuntu Image
orangepi@orangepizero3:~$ neofetch
            .-/+oossssoo+/-.               orangepi@orangepizero3
        `:+ssssssssssssssssss+:`           ----------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.3 LTS aarch64
    .ossssssssssssssssssdMMMNysssso.       Host: OrangePi Zero3
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.1.31-sun50iw9
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 14 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1531 (dpkg)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Terminal: /dev/pts/0
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   CPU: (4) @ 1.512GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   Memory: 451MiB / 3930MiB
+sssshhhyNMMNyssssssssssssyNMMMysssssss+
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
  +sssssssssdmydMMMMMMMMddddyssssssss+
   /ssssssssssshdmNNNNmyNMMMMhssssss/
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

Linux orangepizero3 6.1.31-sun50iw9 #1.0.2 SMP Thu Sep 28 13:55:18 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

Benchmark results
CPU

Geekbench 6: (155 single/ 457 multi -(https://browser.geekbench.com/v6/cpu/4279497))
TODO Gflops (geerlingguy/top500-benchmark HPL result)

Power

Idle power draw (at wall): ~1 W
Maximum simulated power draw (stress-ng --matrix 0): ~2 W
During Geekbench multicore benchmark: ~2W
During top500 HPL benchmark: TODO W

Disk
PNY Elite-X 64GB micro SD

Benchmark
Result

fio 1M sequential read
TODO MB/s

iozone 1M random read
TODO MB/s

iozone 1M random write
TODO MB/s

iozone 4K random read
TODO MB/s

iozone 4K random write
TODO MB/s

Network
iperf3 results:

iperf3 -c $SERVER_IP: TODO Mbps
iperf3 --reverse -c $SERVER_IP: TODO Mbps
iperf3 --bidir -c $SERVER_IP: TODO Mbps up, TODO Mbps down

GPU

TODO: Haven't determined standardized benchmark yet. See Issue #2.

Memory
tinymembench results:

Click to expand memory benchmark result
tinymembench v0.4.10 (simple benchmark for memory throughput and latency)
==========================================================================
== Memory bandwidth tests                                               ==
==                                                                      ==
== Note 1: 1MB = 1000000 bytes                                          ==
== Note 2: Results for 'copy' tests show how many bytes can be          ==
==         copied per second (adding together read and writen           ==
==         bytes would have provided twice higher numbers)              ==
== Note 3: 2-pass copy means that we are using a small temporary buffer ==
==         to first fetch data into it, and only then write it to the   ==
==         destination (source -> L1 cache, L1 cache -> destination)    ==
== Note 4: If sample standard deviation exceeds 0.1%, it is shown in    ==
==         brackets                                                     ==
C copy backwards                                     :   1507.2 MB/s (0.6%)
C copy backwards (32 byte blocks)                    :   1524.4 MB/s (0.2%)
C copy backwards (64 byte blocks)                    :   1538.0 MB/s (0.4%)
C copy                                               :   1464.8 MB/s (1.2%)
C copy prefetched (32 bytes step)                    :   1082.4 MB/s
C copy prefetched (64 bytes step)                    :   1000.3 MB/s
C 2-pass copy                                        :   1294.4 MB/s
C 2-pass copy prefetched (32 bytes step)             :    913.7 MB/s
C 2-pass copy prefetched (64 bytes step)             :    773.7 MB/s
C fill                                               :   5991.7 MB/s (0.3%)
C fill (shuffle within 16 byte blocks)               :   5990.3 MB/s
C fill (shuffle within 32 byte blocks)               :   5986.2 MB/s
C fill (shuffle within 64 byte blocks)               :   5992.5 MB/s (0.1%)
NEON 64x2 COPY                                       :   1533.9 MB/s (0.3%)
NEON 64x2x4 COPY                                     :   1549.2 MB/s
NEON 64x1x4_x2 COPY                                  :   1209.8 MB/s (1.0%)
NEON 64x2 COPY prefetch x2                           :    340.1 MB/s
NEON 64x2x4 COPY prefetch x1                         :   1598.2 MB/s
NEON 64x2 COPY prefetch x1                           :   1656.7 MB/s
NEON 64x2x4 COPY prefetch x1                         :   1598.3 MB/s
standard memcpy                                      :   1548.2 MB/s (0.1%)
standard memset                                      :   6000.6 MB/s (0.2%)
NEON LDP/STP copy                                    :   1523.8 MB/s (0.5%)
NEON LDP/STP copy pldl2strm (32 bytes step)          :    955.5 MB/s (1.2%)
NEON LDP/STP copy pldl2strm (64 bytes step)          :   1160.9 MB/s (0.3%)
NEON LDP/STP copy pldl1keep (32 bytes step)          :   1768.4 MB/s
NEON LDP/STP copy pldl1keep (64 bytes step)          :   1768.0 MB/s
NEON LD1/ST1 copy                                    :   1523.4 MB/s (0.7%)
NEON STP fill                                        :   5995.0 MB/s (0.3%)
NEON STNP fill                                       :   3854.1 MB/s (0.5%)
ARM LDP/STP copy                                     :   1530.3 MB/s (0.6%)
ARM STP fill                                         :   5999.8 MB/s (0.3%)
ARM STNP fill                                        :   3904.9 MB/s (0.8%)
==========================================================================
== Memory latency test                                                  ==
==                                                                      ==
== Average time is measured for random memory accesses in the buffers   ==
== of different sizes. The larger is the buffer, the more significant   ==
== are relative contributions of TLB, L1/L2 cache misses and SDRAM      ==
== accesses. For extremely large buffer sizes we are expecting to see   ==
== page table walk with several requests to SDRAM for almost every      ==
== memory access (though 64MiB is not nearly large enough to experience ==
== this effect to its fullest).                                         ==
==                                                                      ==
== Note 1: All the numbers are representing extra time, which needs to  ==
==         be added to L1 cache latency. The cycle timings for L1 cache ==
==         latency can be usually found in the processor documentation. ==
== Note 2: Dual random read means that we are simultaneously performing ==
==         two independent memory accesses at a time. In the case if    ==
==         the memory subsystem can't handle multiple outstanding       ==
==         requests, dual random read has the same timings as two       ==
==         single reads performed one after another.                    ==
block size : single random read / dual random read, [MADV_NOHUGEPAGE]
1024 :    0.0 ns          /     0.0 ns
2048 :    0.0 ns          /     0.0 ns
4096 :    0.0 ns          /     0.0 ns
8192 :    0.0 ns          /     0.0 ns
16384 :    0.0 ns          /     0.0 ns
32768 :    0.0 ns          /     0.0 ns
65536 :    4.3 ns          /     7.3 ns
131072 :    6.6 ns          /    10.4 ns
262144 :    7.7 ns          /    11.7 ns
524288 :    8.3 ns          /    12.4 ns
1048576 :   10.1 ns          /    14.8 ns
2097152 :   94.1 ns          /   142.7 ns
4194304 :  141.2 ns          /   186.7 ns
8388608 :  165.0 ns          /   201.7 ns
16777216 :  178.7 ns          /   211.1 ns
33554432 :  186.9 ns          /   215.3 ns
67108864 :  191.3 ns          /   217.2 ns
block size : single random read / dual random read, [MADV_HUGEPAGE]
1024 :    0.0 ns          /     0.0 ns
2048 :    0.0 ns          /     0.0 ns
4096 :    0.0 ns          /     0.0 ns
8192 :    0.0 ns          /     0.0 ns
16384 :    0.0 ns          /     0.0 ns
32768 :    0.0 ns          /     0.0 ns
65536 :    4.3 ns          /     7.3 ns
131072 :    6.6 ns          /    10.4 ns
262144 :    7.7 ns          /    11.7 ns
524288 :    8.3 ns          /    12.3 ns
1048576 :   10.0 ns          /    14.6 ns
2097152 :   93.4 ns          /   141.5 ns
4194304 :  135.3 ns          /   178.2 ns
8388608 :  155.1 ns          /   189.3 ns
16777216 :  164.3 ns          /   193.2 ns
33554432 :  169.3 ns          /   196.0 ns
67108864 :  172.0 ns          /   197.9 ns

sbc-bench results
Run sbc-bench and paste a link to the results here: gist
Phoronix Test Suite
Results from pi-general-benchmark.sh:

pts/encode-mp3: TODO sec
pts/x264 4K: TODO fps
pts/x264 1080p: TODO fps
pts/phpbench: TODO
pts/build-linux-kernel (defconfig): TODO sec

Can I please ask you to do iperf3 test? I'm interested in ethernet speed.

Can I please ask you to do iperf3 test? I'm interested in ethernet speed.

Sorry, I no longer have access to the device, but I would imagine it's similar to other h618 devices.


Codecov

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@6117bdf). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage        ?   97.50%
=======================================
  Files           ?       20
  Lines           ?      400
  Branches        ?        0
=======================================
  Hits            ?      390
  Misses          ?       10
  Partials        ?        0

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 6117bdf...d78f43c. Read the comment docs.


serverless cold start perf: enlarge sample & print

What does this PR do?
Given the importance of cold start latency to Serverless Agent performance, gathering a larger data set would enable us to better estimate quantile statistics, as well as estimate the accuracy of those estimates (e.g., using a confidence interval).
This pull request increases the iteration count of the cold start container loop from 10 to 301 so that:

this test still runs in an hour or less (hopefully)

we can plot a histogram of the raw data to better understand the distribution of cold start times

the data set is large enough to use bootstrapping methods to construct confidence intervals on the median

In addition, this pull request should print the raw cold start data in a CSV-like format on a single line so it's easy to import into a numpy array for exploratory data analysis.

Motivation
Improve understanding of how PRs affect cold starts in practice. Explore potentially incorporating uncertainty in the estimated median cold start time into the serverless cold start performance test.

Additional Notes
Larger data sets (like 1,000+) would be better, resources permitting. Under some mild assumptions[^1], as the sample size approaches infinity, the distribution of the sample median approaches a normal distribution[^2], which can be used to compute confidence intervals[^3].
[^1]: Assuming the cold start latency could be modeled as an absolutely continuous random variable, and samples are independently and identically distributed.
[^2]: Google "asymptotic normality median", or see chapter 21 of A. W. van der Vaart, Asymptotic Statistics, Cambridge University Press, 1998.
[^3]: In practice, one would use bootstrapping to approximate the distribution of medians, which is sort of like computing a correction to this asymptotic result. T. Hesterberg, "What teachers should know about the bootstrap: resampling in the undergraduate statistics curriculum", arXiv:1411.5279 is a nice introduction to why this approach is useful. Rigorous mathematical justification for this argument can be found in Chapter 3 of P. Hall, The Bootstrap and Edgeworth Expansion, Springer, 1992. The "correction" I allude to is the second (and sometimes third) term in an Edgeworth expansion about a normal distribution.

Possible Drawbacks / Trade-offs
Increasing the sample size used to compute median cold start time means that the serverless perf test will run longer. Given that other functional tests (e.g., the regression detector tests) have an SLO of around an hour, I used that SLO as a guideline when increasing that sample size.

Describe how to test/QA your changes
Look at the CI output for this test.

Curious if there's additional precision in measuring startup times, given that other output in the CI logs lists timings in milliseconds to three decimal places.

Gave up on separating elements of the raw data array by commas; a space-delimited string will work just as well, and printing the raw data to console in some format is better than not printing it at all.
An example job using 301 iterations took 55 minutes, 21 seconds, meeting the 1 hour target, and also had some interesting outliers on the high end.

/merge


Password prompt trying to install on OSX

~/brew tap simple2/tap
==> Tapping simple2/tap
Cloning into '/usr/local/Homebrew/Library/Taps/simple2/homebrew-tap'...
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/simple2/homebrew-tap/'
Error: Failure while executing; `git clone https://github.com/simple2/homebrew-tap /usr/local/Homebrew/Library/Taps/simple2/homebrew-tap --depth=1` exited with 128.

Whoops, looks like you’ve got a typo. Try:
brew tap simple2d/tap

😅  thanks mate, it's been a long week.


ctrl.sizeSearchInput needs to fire on window resize

Bug description:
If you aren't using this as fixed width, the "input" doesn't resize when the parent container resizes. so, if the container gets small, the input will wrap to a second line.
Just adding a resize handler isn't a great solution because it can fire thousands of times per second. Usually, I would debounce the resize event handler but there are no external dependencies providing a debounce method. You could include a debounce or throttle function in this code base. I just wasn't sure what the preferred approach would be.
Link to minimally-working plunker that reproduces the issue:
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular: All
UI-Select: Latest

Please add a plunker this will help with the issue.

Any updates on this issue?
Thanks


Error: nippy jar error: 拒绝访问。 (os error 5)

Describe the bug
Error: nippy jar error: 拒绝访问。 (os error 5)

Steps to reproduce
1 run reth on windows 2 see the bug

Node logs
2024-07-23T23:12:53.971245Z  INFO reth::cli: Initialized tracing, debug log directory: C:\Users\10200\AppData\Local\reth\logs\mainnet
2024-07-23T23:12:53.974415Z  INFO reth::cli: Starting reth version="1.0.3 (6ce7c9e3)"
2024-07-23T23:12:54.175145Z  INFO reth::cli: Opening database path=".\\db"
2024-07-23T23:12:54.196656Z DEBUG storage::db::mdbx: Commit total_duration=309.9µs commit_latency=Some(CommitLatency(MDBX_commit_latency { preparation: 0, gc_wallclock: 1, audit: 0, write: 7, sync: 9, ending: 0, whole: 19, gc_cputime: 0, gc_prof: MDBX_commit_latency__bindgen_ty_1 { wloops: 1, coalescences: 0, wipes: 0, flushes: 0, kicks: 0, work_counter: 2, work_rtime_monotonic: 0, work_xtime_cpu: 0, work_rsteps: 0, work_xpages: 0, work_majflt: 2, self_counter: 3, self_rtime_monotonic: 0, self_xtime_cpu: 0, self_rsteps: 0, self_xpages: 0, self_majflt: 1 } })) is_read_only=false
2024-07-23T23:12:54.203920Z  INFO reth::cli: Configuration loaded path=".\\reth.toml"
2024-07-23T23:12:54.210639Z  INFO reth::cli: Verifying storage consistency.
2024-07-23T23:12:54.218487Z ERROR reth::cli: shutting down due to error

Platform(s)
Windows (x86)
What version/commit are you on?
reth Version: 1.0.3
Commit SHA: 6ce7c9e3a38c5757ce14a5c49a22ba0d82e4abbc
Build Timestamp: 2024-07-23T23:07:46.325152100Z
Build Features: jemalloc
Build Profile: debug
What database version are you on?
2024-07-23T23:20:16.474702Z  INFO Initialized tracing, debug log directory: C:\Users\10200\AppData\Local\reth\logs\mainnet
Current database version: 2
Local database version: 2
Which chain / network are you on?
mainnet
What type of node are you running?
Archive (default)
What prune config do you use, if any?
[stages.prune]
commit_threshold = 1000000
If you've built Reth from source, provide the full command you used
cargo build
Code of Conduct

[X] I agree to follow the Code of Conduct

### Tasks

This is an access denied error, please check that the user running the node has R/W access to  your node's data directory.

I am double checked that the user running the node has R/W access to your node's data directory.

I confirm that there are no issues with read and write permissions. If you have Windows, you can run it and see what problem I'm referring to.

I'm facing the same issue: Error: nippy jar error: Acceso denegado. (os error 5). This is with the tutorial hello_world of exex

@lucyzhang314 I solved it by running reth in WSL (Ubuntu 20.04), seems that for windows it's not fully prepared

https://medium.com/@oriolsaguilo/exex-of-reth-install-on-windows-16a12f843245

I ran into this problem and troubleshooted it.
The bug is caused by this line of code in ./crates/storage/nippy-jar/src/lib.rs:
OpenOptions::new().read(true).open(parent)?.sync_all()?;
This is trying to open a directory. However on Windows this only works for files.
Fixed this by filtering out the code in case of Windows:
#[cfg(not(windows))]
This is what the complete fixed code looks like:
// fsync() dir if platform is not windows
#[cfg(not(windows))]
if let Some(parent) = tmp_path.parent() {
      OpenOptions::new().read(true).open(parent)?.sync_all()?;
}

And of course the use clause...
#[cfg(not(windows))]
use std::fs::OpenOptions;
With this change the node is starting just fine.
Should I create a PR?
I am new to Reth.

Actually here is the correct solution after checking how to do sync_all() on Windows...
Modify ./crates/storage/nippy-jar/src/lib.rs:
Add:
#[cfg(windows)]
use std::os::windows::prelude::OpenOptionsExt;

Replace:
OpenOptions::new().read(true).open(parent)?.sync_all()?;

...with
            #[cfg(windows)]
            OpenOptions::new()
            .read(true)
            .write(true)
            .custom_flags(0x02000000)   // FILE_FLAG_BACKUP_SEMANTICS
            .open(parent)?
            .sync_all()?;

            #[cfg(not(windows))]
            OpenOptions::new()
            .read(true)
            .open(parent)?
            .sync_all()?;

that makes sense
do you want to submit a pr for this @kaxxa123 ?

yes assign to me.


Bugfix/ver 89713 dev refresh

Refresh DEVELOPER.md to make it more clear.

TOC contents reorg
Updated headings
Improved command description and results
rm $ from each command for copy/paste
general copy editing

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: rs-vertica:x: rseymourrseymour seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Rearrangement updates for v1.2

Collection of Rearrangement documentation, schema and R/python package changes for v1.2.

All right, I don't know why the Travis job is passing for push and failing for pr for R-release. I'm suspecting it's a package cache issue. Maybe?
I say we just merge without fixing that. I'll fight with it in master if needed. It's already failing there anyway (without any changes to the R package having been made since the failure started).

Okay, cool. Assuming no objections from anyone, then I'll merge this in later today.


[#5768] improvement(CLI): improve formatted output

What changes were proposed in this pull request?
Enhanced the Gravitino CLI to support properly formatted output. Fixed alignment issues in formatted output when it includes Chinese characters.
The bounding box length calculation is now based on the number of characters rather than the character display width . The correct output should look like this(Here are the results of my local tests):

Only change the implementation of the TableFormatImpl class, the same effect is achieved when the catalog list --output table command is supported
Why are the changes needed?
Fix: #5768
Does this PR introduce any user-facing change?
NO.
How was this patch tested?
gcli catalog details --name <catalog>  --metalake <metalake> --output table
gcli metalake details --name <metalake>  --output table
gcli metalake list --output table

@xunliu   I’m new to this project and would greatly appreciate your help reviewing this PR. Could you please take a look when you have time? Thank you so much for your guidance!  if possible, could you grant me the necessary permissions to run workflows?

@mchades  I’m new to this project and would greatly appreciate your help reviewing this PR. Could you please take a look when you have time? Thank you so much for your guidance! if possible, could you grant me the necessary permissions to run workflows?

CI is passed now, we will review this ASAP

hi @Abyss-lord
This PR CI failed, Please fix it.

hi @Abyss-lord This PR CI failed, Please fix it.

done

hi @Abyss-lord
Can you send your email address to me? I think to discuss with you.
My email<EMAIL_ADDRESS>Tanks!

hi @Abyss-lord Can you send your email address to me? I think to discuss with you. My email<EMAIL_ADDRESS>Tanks!

hi, @xunliu I just sent you an email.

@xunliu @mchades hello guys, could you plz review this PR again?


Bump deps

Coverage decreased (-0.2%) to 89.444% when pulling 1a15923407e9965f127ef2f9c16da8b5f51e431b on bump-deps into 0325866b428c927098498faf5c43aea743fcfdb0 on main.


Allow LanguageDirection and LanguageName in root of configuration

This would:

Mirror the API for .Site.LanguageCode

Allow you to do this on monolingual and multilingual sites
<html lang="{{ site.LanguageCode }}" dir="{{ site.LanguageDirection }}">

To me, this is the basic configuration for a language:
[languages.en]
languageCode = 'en-US'
languageDirection = 'ltr'
languageName = 'English'
weight = 1

But the way you access the values is (conceptually) inconsistent:

Key
Code
Notes

languageCode
{{ .Site.LanguageCode }}
{{ .Site.Language.LanguageCode }} does not work

languageDirection
{{ .Site.Language.LanguageDirection }}

languageName
{{ .Site.Language.LanguageName }}

weight
{{ .Site.Language.Weight }}
Not sure why this is exposed

I will suggest we do it the other way, we (conceptually) move LanuageCode down to Language. It should be easy to make the old work, but that field belongs on Language-- the only reason it's not there is because it came before ...
That will also make the smallest change set and keep some values in Language.

Sounds good to me.


Add Containerd support for network experiments

What needs to be done

Add containerd support for network experiments.

In present scenario,  Network experiments are using Pumba job to inject the network chaos and supports docker runtime only. It should be enhanced to support containerd runtime as well.

Fixed via https://github.com/litmuschaos/litmus-go/pull/104 & https://github.com/litmuschaos/litmus-go/pull/119


Permission error in portainer logs after starting

Hello, so the portianer logs show following:
Error: mkdir failed for '/var/run/kong/logs': Permission denied (code 13)
  Run with --v (verbose) or --vv (debug) for more details

I checkd if the folder exist which was not the case so i created the folder and added chmod permission 777 to it, sadly the issue keeps being the same. I also slightly modified the compose file because i dont want to have it exposed on public ips, instead it should only run internally and then i make use of nginx proxy manager to connect it to a domain in order to access it outside of the vps.
Here the docker-compose.yml file i use as a portainer stack:
version: '3.0'

x-kong-config:
  &kong-env
  KONG_DATABASE: ${KONG_DATABASE:-off}
  KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong}
  KONG_PG_HOST: db
  KONG_PG_USER: ${KONG_PG_USER:-kong}
  KONG_PG_PASSWORD_FILE: /run/secrets/kong_postgres_password

services:
  kong-migrations:
    image: "${KONG_DOCKER_TAG:-kong:latest}"
    command: kong migrations bootstrap
    profiles: [ "database" ]
    depends_on:
      - db
    environment:
      <<: *kong-env
    secrets:
      - kong_postgres_password
    networks:
      webproxy:
        ipv4_address: <IP_ADDRESS>
    restart: on-failure

  kong-migrations-up:
    image: "${KONG_DOCKER_TAG:-kong:latest}"
    command: kong migrations up && kong migrations finish
    profiles: [ "database" ]
    depends_on:
      - db
    environment:
      <<: *kong-env
    secrets:
      - kong_postgres_password
    networks:
      webproxy:
        ipv4_address: <IP_ADDRESS>
    restart: on-failure

  kong:
    image: "${KONG_DOCKER_TAG:-kong:latest}"
    user: "${KONG_USER:-kong}"
    environment:
      <<: *kong-env
      KONG_ADMIN_ACCESS_LOG: /dev/stdout
      KONG_ADMIN_ERROR_LOG: /dev/stderr
      KONG_PROXY_LISTEN: "${KONG_PROXY_LISTEN:-<IP_ADDRESS>:8000}"
      KONG_ADMIN_LISTEN: "${KONG_ADMIN_LISTEN:-<IP_ADDRESS>:8001}"
      KONG_ADMIN_GUI_LISTEN: "${KONG_ADMIN_GUI_LISTEN:-<IP_ADDRESS>:8002}"
      KONG_PROXY_ACCESS_LOG: /dev/stdout
      KONG_PROXY_ERROR_LOG: /dev/stderr
      KONG_PREFIX: ${KONG_PREFIX:-/var/run/kong}
      KONG_DECLARATIVE_CONFIG: "/opt/kong/kong.yaml"
    secrets:
      - kong_postgres_password
    networks:
      webproxy:
        ipv4_address: <IP_ADDRESS>

    #ports:
      #- "<IP_ADDRESS>:8000:8000/tcp"
      #- "<IP_ADDRESS>:8443:8443/tcp"
      #- "<IP_ADDRESS>:8001:8001/tcp"
      #- "<IP_ADDRESS>:8444:8444/tcp"
      #- "<IP_ADDRESS>:8002:8002/tcp"
    healthcheck:
      test: [ "CMD", "kong", "health" ]
      interval: 10s
      timeout: 10s
      retries: 10
    restart: on-failure:5
    read_only: true
    volumes:
      - prefix_vol:${KONG_PREFIX:-/var/run/kong}
      - tmp_vol:/tmp
      - ./config:/opt/kong
    security_opt:
      - no-new-privileges

  db:
    image: postgres:latest
    profiles: [ "database" ]
    environment:
      POSTGRES_DB: ${KONG_PG_DATABASE:-kong}
      POSTGRES_USER: ${KONG_PG_USER:-kong}
      POSTGRES_PASSWORD_FILE: /run/secrets/kong_postgres_password
    secrets:
      - kong_postgres_password
    healthcheck:
      test:
        [
          "CMD",
          "pg_isready",
          "-d",
          "${KONG_PG_DATABASE:-kong}",
          "-U",
          "${KONG_PG_USER:-kong}"
        ]
      interval: 30s
      timeout: 30s
      retries: 3
    restart: on-failure
    stdin_open: true
    tty: true
    networks:
      webproxy:
        ipv4_address: <IP_ADDRESS>
    volumes:
      - pgdata:/var/lib/postgresql/data

networks:
  webproxy:
    external: true

secrets:
  kong_postgres_password:
    file: /run/secrets/./kong_postgres_password

volumes:
  pgdata:
  prefix_vol:
  tmp_vol:

@flrgh is this related to the prefix location stuff?

@brentos fyi

@flrgh is this related to the prefix location stuff?

This seems to me like a frustrating chicken/egg scenario that I've run into time and time again with docker.
Your prefix volume will be owned by root when docker[-compose] creates it and mounts it into the container, so it cannot be used by an unprivileged user without some initialization. You have a couple options:
use the default kong prefix of /usr/local/kong
The images are built with /usr/local/kong as the preferred prefix directory, which is created when the kong package is installed and then properly chown-ed to the kong user.
I have yet to find docker documentation that adequately explains this behavior, but when creating a container, mounted volumes interact with the image's filesystem layer in such a way that things are retained from the image layer and even promoted to the volume. Check this out:

t.sh
#!/usr/bin/env bash

export KONG_PREFIX=$1
export IMAGE=${2:-kong}

volume=$(docker volume create)
trap 'echo "removing volume $volume"; docker volume rm "$volume" > /dev/null' EXIT

echo "volume $volume will be mounted at $KONG_PREFIX"

echo "checking permissions of $KONG_PREFIX"
docker run \
    --rm \
    -it \
    -e "KONG_PREFIX=$KONG_PREFIX" \
    --volume "$volume:$KONG_PREFIX" \
    --entrypoint /bin/bash \
    --read-only \
    --user kong \
    "$IMAGE" \
    -c "ls -ld \"$KONG_PREFIX\""

echo "creating a file within $KONG_PREFIX"
docker run \
    --rm \
    -it \
    -e "KONG_PREFIX=$KONG_PREFIX" \
    --volume "$volume:$KONG_PREFIX" \
    --entrypoint /bin/bash \
    --read-only \
    --user kong \
    "$IMAGE" \
    -c "touch \"$KONG_PREFIX\"/test"

host_dir=$(docker volume inspect "$volume" | jq -r '.[].Mountpoint')

echo "view of $KONG_PREFIX from the host ($host_dir)"
sudo ls -la "$host_dir"

./t.sh /var/run/kong
$ ./t.sh /var/run/kong
volume 1e152c065634d3a8ecfee1b02eed3ffc3b8a30b39f8955d7ada52f2472603467 will be mounted at /var/run/kong
checking permissions of /var/run/kong
drwxr-xr-x. 2 root root 4096 Dec 13 19:08 /var/run/kong
creating a file within /var/run/kong
touch: cannot touch '/var/run/kong/test': Permission denied
view of /var/run/kong from the host (/mnt/fast/docker/volumes/1e152c065634d3a8ecfee1b02eed3ffc3b8a30b39f8955d7ada52f2472603467/_data)
total 8
drwxr-xr-x. 2 root root 4096 Dec 13 11:08 .
drwx-----x. 3 root root 4096 Dec 13 11:08 ..
removing volume 1e152c065634d3a8ecfee1b02eed3ffc3b8a30b39f8955d7ada52f2472603467

./t.sh /some/other/path
$ ./t.sh /some/other/path
volume 39614ff5db125822b05931c065b49beb37cf729a63438d29f4cc577da490db3a will be mounted at /some/other/path
checking permissions of /some/other/path
drwxr-xr-x. 2 root root 4096 Dec 13 19:12 /some/other/path
creating a file within /some/other/path
touch: cannot touch '/some/other/path/test': Permission denied
view of /some/other/path from the host (/mnt/fast/docker/volumes/39614ff5db125822b05931c065b49beb37cf729a63438d29f4cc577da490db3a/_data)
total 8
drwxr-xr-x. 2 root root 4096 Dec 13 11:12 .
drwx-----x. 3 root root 4096 Dec 13 11:12 ..
removing volume 39614ff5db125822b05931c065b49beb37cf729a63438d29f4cc577da490db3a

./t.sh /usr/local/kong
$ ./t.sh /usr/local/kong
volume 5217cede029d0fb7b62cdfea66342943e56993809d3f285657c0b3a382b44f61 will be mounted at /usr/local/kong
checking permissions of /usr/local/kong
drwxrwxr-x. 5 kong root 4096 Dec 13 19:15 /usr/local/kong
creating a file within /usr/local/kong
view of /usr/local/kong from the host (/mnt/fast/docker/volumes/5217cede029d0fb7b62cdfea66342943e56993809d3f285657c0b3a382b44f61/_data)
total 20
drwxrwxr-x. 5 michaelm root     4096 Dec 13 11:15 .
drwx-----x. 3 root     root     4096 Dec 13 11:15 ..
drwxrwxr-x. 3 michaelm root     4096 Dec 13 11:15 gui
drwxrwxr-x. 6 michaelm root     4096 Dec 13 11:15 include
drwxrwxr-x. 5 michaelm root     4096 Dec 13 11:15 lib
lrwxrwxrwx. 1 michaelm root       26 Nov  8 00:43 modules -> ../openresty/nginx/modules
-rw-r--r--. 1 michaelm michaelm    0 Dec 13 11:15 test
removing volume 5217cede029d0fb7b62cdfea66342943e56993809d3f285657c0b3a382b44f61

Note: michaelm on my host system shares the same UID as kong within the container (1000), so that's why ls reports as such.

You can observe this behavior with (I think) any image and any arbitrary directory. Let's try with a directory /kong within an ubuntu:jammy-based image:

Dockerfile
FROM ubuntu:jammy

USER root

RUN useradd -u 1000 kong \
    && mkdir -p /kong \
    && chown kong:0 /kong \
    && echo 'hello from my test image' > /kong/image

./t.sh /var/run/kong my-test-image
volume f2fdf4aa445b8279801b228ea1a462a969007aadaae7a7f04b460a19f08e7f5d will be mounted at /var/run/kong
checking permissions of /var/run/kong
drwxr-xr-x. 2 root root 4096 Dec 13 19:24 /var/run/kong
creating a file within /var/run/kong
touch: cannot touch '/var/run/kong/test': Permission denied
view of /var/run/kong from the host (/mnt/fast/docker/volumes/f2fdf4aa445b8279801b228ea1a462a969007aadaae7a7f04b460a19f08e7f5d/_data)
total 8
drwxr-xr-x. 2 root root 4096 Dec 13 11:24 .
drwx-----x. 3 root root 4096 Dec 13 11:24 ..
removing volume f2fdf4aa445b8279801b228ea1a462a969007aadaae7a7f04b460a19f08e7f5d

./t.sh /kong my-test-image
$ ./t.sh /kong test
volume 815eb3cb52269372f32cb60fe6cf8a8de8ec1efd036e83aab903a34150424312 will be mounted at /kong
checking permissions of /kong
drwxr-xr-x. 2 kong root 4096 Dec 13 19:25 /kong
creating a file within /kong
view of /kong from the host (/mnt/fast/docker/volumes/815eb3cb52269372f32cb60fe6cf8a8de8ec1efd036e83aab903a34150424312/_data)
total 12
drwxr-xr-x. 2 michaelm root     4096 Dec 13 11:25 .
drwx-----x. 3 root     root     4096 Dec 13 11:25 ..
-rw-r--r--. 1 root     root       25 Dec 13 11:25 image
-rw-r--r--. 1 michaelm michaelm    0 Dec 13 11:25 test
removing volume 815eb3cb52269372f32cb60fe6cf8a8de8ec1efd036e83aab903a34150424312

use the init container pattern to initialize the prefix before kong starts
If you don't want to use /usr/local/kong for some reason, you'll need to do some more work to initialize your desired prefix directory before starting kong:
  kong-init:
    image: alpine:latest
    volumes:
      - prefix_vol:/kong-prefix
    # must use the uid/gid here because the user 'kong' won't
    # exist in your bare alpine image
    command: chown -Rv 1000:1000 /kong-prefix

...then add kong-init to depends_on for your kong service.


[Bug] Disabeling a theme with invalid name will disable wrong theme if two or more exist

Describe the Bug
Disabling a theme with invalid name while another theme with invalid name is active will disable the wrong theme due to the fact they both share the same ID ("-")
To Reproduce

Create and enable 2 themes as shown in screenshot 1
Disable the theme you enabled last (or bottom in dev-tools)

Expected Behavior
Expected behaviour would be to have the correct theme be disabled, but because both themes share their identifier, simply the first one in the DOM will be removed.
Screenshots
1:

2:

Discord Version
Stable, not tested on others
Additional Context
A proposed fix would be to ensure all themes have a unique identifier, so only the correct theme will be removed.

I'm okay with this--don't use bad names for themes.

To further discourage bad theme names, just reject loading them and make it show an error similar to what happens when the meta is missing.


added more output

regarding #45
I added more output, especially in case DNS entries are set wrong or not at all.

Thanks!


Exception of null_driver on the simulating setup

Starting from  08:58:18,397 the setup started warning about null_driver exceptions.

starting from 2020-04-07 08:58:18,397 to 08:58:29
starting from 2020-02-13 16:17:48 to 16:23:06,487

Does not reproduce


ImportError: cannot import name opentype

Breaks with pyasn1==0.1.9 when the pyasn1-modules > 0.0.8
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/opt/python/2.7.10/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/travis/build/bkvirendra/voltbe2/voltbe2/settings/__init__.py", line 9, in <module>
    from .travis_settings import *
  File "/home/travis/build/bkvirendra/voltbe2/voltbe2/settings/travis_settings.py", line 1, in <module>
    from base import *
  File "/home/travis/build/bkvirendra/voltbe2/voltbe2/settings/base.py", line 15, in <module>
    import firebase_admin
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/firebase_admin/__init__.py", line 22, in <module>
    from firebase_admin import credentials
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/firebase_admin/credentials.py", line 23, in <module>
    from google.oauth2 import service_account
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/google/oauth2/service_account.py", line 77, in <module>
    from google.auth import _service_account_info
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/google/auth/_service_account_info.py", line 22, in <module>
    from google.auth import crypt
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/google/auth/crypt/__init__.py", line 39, in <module>
    from google.auth.crypt import rsa
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/google/auth/crypt/rsa.py", line 17, in <module>
    from google.auth.crypt import _python_rsa
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/google/auth/crypt/_python_rsa.py", line 29, in <module>
    from pyasn1_modules.rfc2459 import Certificate
  File "/home/travis/virtualenv/python2.7.10/lib/python2.7/site-packages/pyasn1_modules/rfc2459.py", line 20, in <module>
    from pyasn1.type import opentype
ImportError: cannot import name opentype

Fixed when I set the pyasn1-modules==0.0.8 in requirements

How it is possible that you use pyasn1-modules 0.2.1 which requires pyasn1 0.4.1+?
All pyasn1-modules 0.1.x should work just fine with pyasn1 0.1.x.

I was getting this issue with the firebase-admin lib on my travis build. It showed that it was unable to import it, hence I had to pin the requirement version on my requirements.


HTTPS/2 Issues

Do you have a guide on how this works?
I have the certs in the right place, but my browser returns this error when trying to open as https
An error occurred during a connection to <IP_ADDRESS>:8080. PR_END_OF_FILE_ERROR
The extension says it should start in https mode automatically, so the Go Live section listing as http://<IP_ADDRESS>:8080/ might be an issue?
Curl
❯ curl -k https://<IP_ADDRESS>:8080
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

this error is indicative of the web server not supporting ssl?
Certs were generated in WSL by mkcert using a hostfile mapping to the IP that hq spits out.

Thanks for reporting. That might be some regression that I missed. Command line suppose to show invitation to https. I'll take a look.

Found regression during refactoring. Will fix in the next version together with other changes.

Please check if it is working for you with<EMAIL_ADDRESS>Please note that you can put certificates in any place, server should be able to find them if they are in .pem format and key file name should ends with key.pem

This fixed my https woes! Thank you. :)


Add a static enumeration template creator.

This adds one web page of static content.
Without any server interaction, you can upload a .pbtxt, click on some fields to replace them with enumeration macros, and download the result.
Maybe it's easier than using a text editor. Persuant to #63.

This is cool! A couple suggestions:

Clicking twice should "undo" the replacement.
Please highlight the replaced fields.
I get the same variable name for multiple fields that show up in the same level of nesting (e.g. identifiers for multiple components).
It would probably be easier for users if the variable names were editable...

This is cool! A couple suggestions:

Clicking twice should "undo" the replacement.
Please highlight the replaced fields.
I get the same variable name for multiple fields that show up in the same level of nesting (e.g. identifiers for multiple components).
It would probably be easier for users if the variable names were editable...

I followed skearnes' excellent suggestions. The enumeration macros are now drawn in red. You can edit their macro names by clicking on them. And if you click to their left they will revert to their original non-macro value from the input .pbtxt.

Please take a look. This PR now has instructions at the top, including a how-to graphic. Names are automatically normalized to follow the rules for dollar signs and quotation marks. And in case of an input name collision, the new name gets a counter appended.

Thanks! The instructions are great. Just one minor thing: clicking on a name and then clicking away causes it to be updated with e.g. "_2" added as a suffix.

That was deliberate. I made the sequence be "X", "X_2", "X_3", "X_4", etc. figuring it would be more user-friendly to add "_1" than "_0".


Handling of NaN

Short question, is it somehow possible to extend this to handle NaN, like numpy nanmedian?

@ajcr Thanks for looking into this. I'll definitely try your suggestion using rolling.Apply(array, window_size, operation=np.nanmedian)).


Issues with ArcFace model with default values

Hello,
I am facing strange accuracy issues with almost ALL models after I upgraded from deepface V0.65 to the current version 0.68, i am using the following code to turn on facial recognition on my built in camera:
video0 = 0
metrics = ["cosine", "euclidean", "euclidean_l2"]
DeepFace.stream("database", detector_backend = 'ssd',enable_face_analysis=False,
frame_threshold=2,time_threshold=1,distance_metric=metrics[2],model_name='ArcFace',source=video0)
I am using the demo images in your dataset folder along with my own image, after loading the frames from the webcam, my face is False positively identified as another face with (surprisingly) very low distance score on ALL distance metrics ("cosine", "euclidean", "euclidean_l2").
what am i doing wrong?
I have not changed the default thresholds of any model but its impossible that the distance of a wrong image is lower than the distance of similar images (my own face).

@serengil pls advise how can I send you samples?  if you meant sample images then i can not publish these here, can i send to ur email instead?
when comparing images you will notice that different models create surprisingly wrong predictions (low distance score)

@serengil I am running the below code:
metrics = ["cosine", "euclidean", "euclidean_l2"]
result = DeepFace.verify('./database/person1/image2.jpg','./database/person2/Moodi_old.jpg',model_name='Facenet512',
distance_metric=metrics[1],detector_backend='mtcnn')
result:
{'verified': True, 'distance': 23.34801139896054, 'max_threshold_to_verify': 23.56, 'model': 'Facenet512', 'similarity_metric': 'euclidean'}
Please note that images 'person1' and 'person2' are completely different:

@serengil @sugyan @biranchi2018 @deepuvsdeepu can i get your opinion on this please?

please try retinafafe as a detector_backend and use regular facenet instead of facenet512

@serengil RetinaFace is not able to detect any face, unlike all other detector backends.
In principal: no matter what combination of model / face_detector i use, i always end up with False Positives, although i have not changed a single line of code.
I wonder what could be wrong?

If retinaface can detect face, then the accuracy will increase. I think that is the problem.

I am still facing this issue, retinaface can not detect faces when using live stream, can u take a look on issue
accuracy is still low on ALL models (facenet, facenet512, arcface)

to sum up, running a facial recongition with a camera offering that aspect causes underperforming. nothing to do unfortunately.


Update README.md

minor typofix + adding Framasoft in Associations list

Thanks! I added the radar to the bot's whitelist because if it's in HTTP, the website redirects to the HTTPS version so the bot complains either way.


Inconsistent use of pattern matching

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
What changes are you suggesting?
There seems to be a bug with the pattern matching syntax outlined in the docs.

Pattern
Description of matches
Example matches

'*.jsx?'
The ? character matches zero or one of the preceding character.
page.js page.jsx

*.jsx? doesn't match .js|jsx files as seen in the output below
Additional information
CURRENT
> const glob = require("@actions/glob");
undefined
> const files = "*.jsx?"
undefined
> const globOptions = {followSymbolicLinks: true};
undefined
> const globber = await glob.create(files, globOptions);
::debug::followSymbolicLinks 'true'
undefined
> let paths = await globber.glob();
::debug::followSymbolicLinks 'true'
::debug::implicitDescendants 'true'
::debug::matchDirectories 'true'
::debug::omitBrokenSymbolicLinks 'true'
::debug::Search path '/.../workspace/glob'
undefined
> paths
[]

WORKAROUND
> const glob = require("@actions/glob");
undefined
> const files = "*.jsx\n*.js";
undefined
> const globOptions = {followSymbolicLinks: true};
undefined
> const globber = await glob.create(files, globOptions);
::debug::followSymbolicLinks 'true'
undefined
> let paths = await globber.glob();
::debug::followSymbolicLinks 'true'
::debug::implicitDescendants 'true'
::debug::matchDirectories 'true'
::debug::omitBrokenSymbolicLinks 'true'
::debug::Search path '/.../workspace/glob'
undefined
> paths
[
  '/.../workspace/glob/test.js',
  '/.../workspace/glob/test.jsx',
]

@jackton1
Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

👋 @jackton1 Thanks for opening this issue!
The syntax that is in the docs is correct for Actions workflows. It looks like in your example you are using the @actions/glob package from the Actions toolkit. In some situations, the toolkit package's globbing behaves differently from workflow syntax globbing.
Because the docs are currently correct for the workflow syntax, I'll close this issue. Feel free to open an issue in the Actions toolkit repo, or give the product team feedback on GitHub discussions.

@lucascosti Thanks for clearing this up, I’m also curious what package is used for handling the action workflows?

@lucascosti Thanks for clearing this up, I’m also curious what package is used for handling the action workflows?

IIRC, it's internally developed code and isn't using a separate package.


feat: Case.data_generation_method attribute that provides the information of the underlying data generation method

Codecov Report

Merging #1198 (42f0c7f) into master (12b0049) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1198      +/-   ##
==========================================
- Coverage   99.04%   98.92%   -0.13%
==========================================
  Files          74       74
  Lines        5668     5668
  Branches      950      950
==========================================
- Hits         5614     5607       -7
- Misses         28       32       +4
- Partials       26       29       +3

Flag
Coverage Δ

unittests
98.92% <100.00%> (-0.09%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/schemathesis/specs/openapi/_hypothesis.py
97.70% <ø> (+0.57%)
:arrow_up:

src/schemathesis/models.py
99.19% <100.00%> (+<0.01%)
:arrow_up:

src/schemathesis/_compat.py
50.00% <0.00%> (-50.00%)
:arrow_down:

src/schemathesis/extra/pytest_plugin.py
98.23% <0.00%> (-1.77%)
:arrow_down:

src/schemathesis/cli/callbacks.py
98.27% <0.00%> (-1.73%)
:arrow_down:

src/schemathesis/cli/cassettes.py
98.43% <0.00%> (-1.57%)
:arrow_down:

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 12b0049...42f0c7f. Read the comment docs.


Code for canvas element on website?

Love the javascript canvas on https://affinelayer.com/pixsrv/ and how you can select the type of box.  Is the code for that available anywhere?

It's JavaScript, you can take a look at the source code of that page by pressing CTRL+U inside Google Chrome.


e2e: node sync between different versions

Composition tests are essential to us as we want to catch cases like this as soon as they arise
Ref: #539 #511
Tests should include all node types syncing between each other on different versions:

latest main branch
release tags
hot-fixes(especially)

Grooming 16/11/2022:
Moving to ITN once we start caring more about interop with diff versions of the sw


Enumerate version maintenance and version bumps

I think we should spell out in the documentation:

What we mean when we bump a major version
What we mean when we bump a minor version
How far back we will provide patch releases for bugs (maybe something like the last 2 minor versions of the last 2 major versions?)

I would like to follow semantic versioning, though to do so we should figure out what our API is, so we know when we are making a backwards incompatible change.
If we do so, then the biggest thing on my mind... is the new index format a backwards incompatible change or not? I think we could reasonably say that any HTTP requests happening behind the scenes are not really our API, and so I would consider it a minor update. Yet, it is still potentially a big change that introduces risk, and that might not be conveyed properly in a minor version update, so maybe that doesn't matter.
/cc @pcarranza @indirect

The new index format should fully backwards compatible, since it doesn't touch any existing URLs, and is made available via entirely new URLs.
FWIW, we have reached release candidate for Bundler 1.12, which has support for the new index. We've also shipped the new index in bundler-api, if you're interested in seeing a server-side implementation of it. We're planning to ship gems with the extracted client and server code, but I don't think they're done yet...

Agreement then @smellsblue ?


Use parcelify with karma

Hello,
I'd like to use parcelify as a browserify-plugin in a karma test. My karma.conf.js contains this:
browserify: {
    plugin: [ [ 'parcelify', { o: './bundle.css' } ] ]
}

However this doesn't work. I found out that this is because karma-browserify is adding the test-files to be bundled with w.require on bro.js#L317.
Seems that parcelify only works on entry files. If I change that line to w.add, parcelify does its job.
Can you help me understanding that part and maybe even outline the path to a working solution?
Many thanks.
Edi

From what I remember w.add is just a shorthand for w.require(..., { expose: false }) so I wonder why it should not be working.
Some details on our implementation: In order to properly work together with karma and benefit from watchify's incremental re-building we require all the actual test files via stubs (check the developer console to see the stub files as well as the one single generated bundle).
If you need more help from our side, please upload an example project somewhere on GitHub that shows your case and allows us to look into it, too.
Anyhow it seems like you take some more time to investigate the issue and ask the parcelify guys to land a fix.

Closing this for now.

I wasn't able to get to the bottom of this. A first milestone would be to find out what has to be fixed in which github repo. Is it a browserify issue? A karma-browserify issue or a parcelify issue?
I added a repository for you to reproduce the case: https://github.com/mediafreakch/parcelify-karma-browserify
Could you help with that?

@nikku


v0.47.0 tracking issue

Target release date: February 7
Blockers:

[ ] Add visible note about maintenance status to the README
[ ] Bump all dependencies
[x] Merge https://github.com/rusoto/rusoto/pull/1872
[ ] Merge https://github.com/rusoto/rusoto/pull/1890

I'd like to propose adding https://github.com/rusoto/rusoto/pull/1897 if possible -- rusoto_credential has been in a sore spot for a bit now.

I'd like to propose adding https://github.com/rusoto/rusoto/pull/1897 if possible -- rusoto_credential has been in a sore spot for a bit now.

Noted! @iliana is that a request for me to review it, or do you think you'll have the time?

Noted! @iliana is that a request for me to review it, or do you think you'll have the time?

I hope I'll have the time but we shall see :) If it slips for 0.47.0 not a big deal, but best to merge before rusoto_credential diverges too much.

I hope I'll have the time but we shall see :) If it slips for 0.47.0 not a big deal, but best to merge before rusoto_credential diverges too much.

Unfortunately I never got around to #1897, and it's been closed now. I'm way late on this, so we'll just have to ship without it! Release PR out in #1942.


[Feature Request] Index files based on extensions so they are searchable through search

when using "search in all files", the result not including the word in the txt file

The reason this doesn't work yet is because the default search functionality only searches through indexed files. Currently, Plaintext does not index any files, so it's expected to not work.

expected to not work

I'm very surprised a plugin for plaintext cannot handle plain search (maybe driven by a flaw in Obsidian plugin ecosystem, but still odd from the outside).
I can't find the text I want to edit without Ctrl+F or / so this plugin is definitely not useful even though it seems like it's 99% of the way there 🤔
I'm commenting to hopefully sign up to help add this functionality, not complain 😇


changed the source of Owner and updated field to be searchable and so…

…rtable

https://issues.redhat.com/browse/RHOAIENG-7566
Description
Update the source of the Owner - now it's just a field that we get from the API response. I've attached the screenshot that shows where this field on the page now is coming from.
In addition I've made the owner a sortable field as well as a Search option. See screenshots attached.
How Has This Been Tested?
Tested on the Model Registry Cluster
Test Impact
Updated the tests to cover now both field options scenarios( with Author and when "-" )
Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

[x] Included any necessary screenshots or gifs if it was a UI change.
[ ] Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

Ready for hopefully final review @mturley @gitdallas


Fixes to download archive

The current download archive button sometimes does not yield a consistent cta archive (e.g., sample is not saved from UI state).

Done


OCO applies only to last functional component

When multiple functional components are rendered by mapping, the onclickoutside only applies to the last component. This only occurs when defining the component as a stateless function, but works just fine when it's a class component.

This feels like a consquence of how this HOC works - if you need more than one of these on a page, you're probably not better off with a functional component, and that thing should probably be a class. See https://github.com/Pomax/react-onclickoutside/issues/320 and https://github.com/Pomax/react-onclickoutside/issues/307

Can you update the readme with this ? I lost a couple of hours with it.


Does the code use Unet?

First of all thank you so much for sharing such wonderful work. But I apologize for asking this question on a personal level, is there any framework like Unet used in this work?

Thank you. Nope, I would not know how to design an effective UNet for molecule data, this uses the EGNN.


Bug report - [X]cpp example

in file examples/cpp/silero-vad-onnx.cpp, line 124
Do you mean "if (temp_end == 0)" ?
Otherwise temp_end will never get non-zero values

Thanks for the report! You are right on that.
It should be if (temp_end == 0) correspond to line 506 if not self.temp_end in utils_vad.py.  You can create a pull request to fix.

Newer ticket for cpp example bug tracking - https://github.com/snakers4/silero-vad/issues/315
A community PR would be appreciated to update the example