Implementation of Flask-Migrate for database migrations

I've sketched a way to implement Flask-Migrate into the webservices blueprint (including some notes in the README)

One question. Did you consider some sort of make_db.py that has create_engine(), rather than committing the alembic migration files. Currently, the first upgrade needs to be manually deleted or modified by hand once you've made your models. I'm not sure which is more appealing, so wanted your opinions.

Good question; I think the repo should serve as a template to any developers that want to develop a (flask based) microservice for adsabs. With that in mind, I'd think we should keep things simple (+1 towards make_db.py), but also realistic of a real development workflow (+1 migration scripts).
@ehenneken Thoughts? Also, I can't merge if travis says things are broken.

The migration tools would be setup by make_db and managed by manage.py. The only unexplicit step is to commit the migration files to the repository.
Given this is a blueprint where you don't necessarily want a db, the alembic files add uneeded weight. This would require their removal by the user from the repo.
I guess the type of laziness preferred wins.

Makes sense, up for a PR?

@edwin, do you like the idea? I can forward a make db template I have and you can include it in the current PR if you prefer that laziness :).

@jonnybazookatone sure, go ahead and forward... no promises here on when I'll implement :-)

I deleted it, but I only wanted something simple like this:
from models import db
from app import create_app

with create_app().app_context():
    db.create_all()

Then you just need to do python make_db.py, and python manage.py db init to generate the migration files.
Not to keep making the PR longer, but would we want to include an example test that uses the db, that creates/destroys on setup/teardown, if you have one handy @ehenneken?

@ehenneken, let me know if something wasn't clear. In the end I had suggested the following:

remove the commited alembic files, (env.py, alembic.ini, migrations/, etc. that are made when you run manage.py db init)
make a make_db.py file that contains:

```
from models import db
from app import create_app
with create_app().app_context():
    db.create_all()
 ```

Add a test, for example, unittests/testDatabase.py, that contains something like

```
from flask.ext.testing import TestCase
from app import create_app
from models import db

class TestDatabase(TestCase):
    def create_app(self):
        return app.create_app()
    def setUp(self):
        db.create_all()
    def tearDown(self):
        db.session_remove()
        db.drop_all()
    def test_something(self):
        ..... perhaps you have a nice endpoint example that uses the DB?
```
1. Update the docs to include how to setup the database using make_db.py, and how to manage and create the alembic files using manage.py.

Let me know if something wasn't clear or if you need some help. It will make a nice edition to the blueprints, so the sooner we can close it, the better. Of course, if you still think something I suggested was a bad idea, then let me know. I will be heavily using these patterns for the libraries, so it would be nice if we all had the same ideas on paper.

We could explicitly add flask-script in the requirements (it's likely already installed as part of the alembic extension anyways) and wrap that make_db.py into a management command, too.
@jonnybazookatone So you'd not have any alembic/ committed, then? The point of the repo is to serve as a cloneable blueprint and not necessarily a tutorial, so I think that makes sense in that context.

@vsudilov: I have no strong preference. I feel the blueprint is in the form of the manage.py, i.e., we are saying to use flask-migrate and alembic, with flask-sqlalchemy. In the early development I don't need the migration files if I'm creating/destroying the db's, and so I feel the alembic files add extra weight.
Also, you may need to delete them later as they already contain preconfigured details related to the models defined in models.py. It just feels like extra things to remember when you're changing it.
In the end it's not a major issue, just taste. I prefer without, unless they are explicitly needed (if I overlooked something).

Flask-Script is a requirement for Flask-Migrate, so you'll have to install it anyway.
I'll see what I can do. Hopefully sometime later this week.

@jonnybazookatone: Is the PR I just did kind of what you are thinking of?

Ideally, methinks, we should have unittests for a database migration. I definitely don't have time for that.

I can see it in the actual project repo, but maybe is a bit overkill here. PR looks good to me, just the renaming of 'database' to 'models' in manage.py to match your other files.

Thanks for the effort and discussion, guys.


New music

Description
Change the music system to introduce new music and allow for new music in the future.

Replace the OG box boy background music with my epic 8-bit music
Refactor music playing to accept a music type (normal, boss), making it easier to switch between music types mid-game without having to keep track of asset paths.

Dependencies

Maps team will likely be adding boss music, I will try to design the code so they only have to change one string for the asset path.

Milestones

[x] Create and add the new default music to the repo (10 Oct)
[x] Add code for music switching (11 Oct)
[x] Manual testing (11 Oct)
[x] PR (11 Oct)
[x] Documentation, sprint form (11 Oct)

Completion Deadline: 12 Oct
Extras (optional)

Even more music e.g. menu music? Death screen music?

Documentation
Playing, changing and stopping music
Members
Ian Pinto @IanP96

There was a change of plans, death screen music has been added and is now in main.


violation of read access *get_chain_info() was nullptr

Collected under Windows. This error comes out. How can it be solved ?

This kind of thing usually happens if you dont have the VulkanSDK installed. Could try installing and see if that fixes it

I have it installed

Hmm okay. Not sure then. Could you try in release mode?

I checked the vulcan installation and it was executed incorrectly. I reinstalled it. But now, at startup, the Vector error pops up :back() called on empty vector

Do you have the callstack of where the .back() is being called?

and if you try to run on opengl


Handle non searchlogic conditions when searching

What does this PR do?
Allows the search method to handle non searchlogic search parameters
When the search method was passed a condition that is a plain column name there was no logic branch to handle it. This resulted in matches that were false positives.
This fix adds a logic branch that sends plain column search conditions to ActiveRecord's where method.

 ActiveRecord::RecordInvalid: Validation failed: Album “The Chronic 2” by Aristic6 already exists


Formatter un-expands parenthesized if-expression

Somewhat related: #6588
Line-length: 88
IMO Ruff's output is better. Reporting anyway.
# Input
class A:
    def b():
        before = (
            # comment
            0
            if self.thing is None
            else before - after
        )

# Black (23.7.0)
class A:
    def b():
        before = (
            # comment
            0
            if self.thing is None
            else before - after
        )

# Ruff (0.0.287)
class A:
    def b():
        before = (
            # comment
            0 if self.thing is None else before - after
        )

Black Playground
Ruff Playground

Oh wow I called it a comprehension lol. Thanks!

Oh no prob :) It might also apply to comprehensions, I’m not sure, but I renamed to reflect the example.

I don't fully understand Black's rules here (some examples -- e.g., the first vs. second case is odd and likely a bug given that they drop the comment entirely). The preview style is also quite different.
It might be sufficient to expand the parent if the IfExp has leading or trailing own-line comments:
diff --git a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs
index 1b22fb568..dec9b7d5f 100644
--- a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs
+++ b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs
@@ -53,9 +53,13 @@ impl FormatNodeRule<ExprIfExp> for FormatExprIfExp {
         let comments = f.context().comments().clone();

         let inner = format_with(|f: &mut PyFormatter| {
-            // We place `if test` and `else orelse` on a single line, so the `test` and `orelse` leading
-            // comments go on the line before the `if` or `else` instead of directly ahead `test` or
-            // `orelse`
+            if comments.has_leading(item) || comments.has_trailing(item) {
+                expand_parent().fmt(f)?;
+            }

It would be nice to map this behavior to code in Black to better understand the rules.

We decided to accept this as a deviation: https://github.com/astral-sh/ruff/pull/7082


⚠ Bofrost.at has degraded performance

In dee8c99, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2441 ms

Resolved: Bofrost.at performance has improved in 78d5f39.


add inventory model

resolves #11

I have requested a review from @brandondees if he has time.
On any note, I'd like 1 more peer review before we pull this in.
Nice job man!


Ensure library works with Elasticsearch 5.x too

I've been having issues with this as well. I can't use the current fieldtypes of text or keyword, and have to use the deprecated string fieldtype for now.

@hungnq1989 will take a look at this when we has time, probably within a month or so.

Might i bump this issue? Are there any immediate plans to look into this?

Plans, yes. Immediate, depends. We haven't needed any 5.x features ourselves so far which is why there hasn't been much progress. I'll see if we can allocate some resources to this sooner.

@Jalle19 ok thanks! Actually for us this isn't going to be an issue right now anyway as it turns out :)
Thanks for the library!


scheduler startup

Very Basic Scheduler, lots of TODOs on where we can improve etc... Wanted to share without test cases for now (coming tomorrow) since folks seemed interested in how this was progressing in sprint planning.

Scheduler object and methods is in charge of scheduling a Job.   Will return that it has successfully scheduled a job once a Start Saga Log entry has been made, and nodes reserved.  This gives us automatic backpressure (can't overschedule the cluster)
Job Runner is in charge of running a job to completion and adding the Saga Log Entries.
Demo is updated to use the actual scheduler now, instead of the dumb demo code.
Removed Job parameter from ReserveNode in PoolDistributor not needed

The updateSagaState function in JobRunner definitely needs a refactor to share common error handling code.  Any Suggestions?  Go doesn't really support lambdas right?  Going to play with this tomorrow as well.

[Current coverage][cc-pull] is 75.61%

Merging [#50][cc-pull] into [master][cc-base-branch] will increase coverage by 2.93%

@@             master        #50   diff @@
==========================================
  Files            22         22
  Lines          1047       1009    -38
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            761        763     +2
+ Misses          254        215    -39
+ Partials         32         31     -1

Powered by Codecov. Last updated by [a64f021...b1bfd59][cc-compare]
[cc-base-branch]: https://codecov.io/gh/scootdev/scoot/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/scootdev/scoot/compare/a64f021a1242bc6f9760a05adac3fc3379f72a43...b1bfd595a3340c73b17f47a0945359050b3add8f
[cc-pull]: https://codecov.io/gh/scootdev/scoot/pull/50?src=pr

LGTM

lgtm, but the requires a couple changes first kind.


Difficulty specific modcharts

Works, might be a little spaghetti but eh at least it works. Simpler than I thought it would be

what about the songs that only has modchart.lua

The lua modchart already has the difficulty variable. I can't really see a use for this.

The lua modchart already has the difficulty variable. I can't really see a use for this.

I have realised, didn't know because modchart.md is poofed. I'll close it now.

The lua modchart already has the difficulty variable. I can't really see a use for this.

I have realised, didn't know because modchart.md is poofed. I'll close it now.

it's on the website


With fontspec 2.9b, a font is wrongly claimed to be not found

Description
With fontspec 2.9b, a font is wrongly claimed to be not found.
Check/indicate

[x] Relevant for XeTeX
[x] Relevant for LuaTeX
[x] Issue tracker has been searched for similar issues?

Minimal example demonstrating the issue
\documentclass{article}
\usepackage{fontspec}
\setmonofont{FiraCode-Regular.ttf}[ItalicFont= FiraCode-RegularItalic.otf]
\begin{document}
Foo
\end{document}

Further details
With fontspec:

v2.9a, the previous MCE used to:

lualatex-compile,
not xelatex-compile: that failed with the error:

! Package fontspec Error: The font "FiraCode-Regular" cannot be found.
For immediate help type H .
...
l.3 ...}[ItalicFont= FiraCode-RegularItalic.otf]
?

v2.9b, the previous MCE fails to both lualatex-compile and xelatex-compile, with the error (the first line only with lualatex):

luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: File not found: "FiraCode-Regular.otf".
! Package fontspec Error:
(fontspec)                The font "FiraCode-Regular" cannot be found; this
(fontspec)                may be but usually is not a fontspec bug. Either
(fontspec)                there is a typo in the font name/file, the font is
(fontspec)                not installed (correctly), or there is a bug in
(fontspec)                the underlying font loading engine
(fontspec)                (XeTeX/luaotfload).
For immediate help type H .
...
l.3 ....ttf}[ItalicFont= FiraCode-RegularItalic.otf]
?

BTW, with fontspec 2.9b, the following MCE:
\documentclass{article}
\usepackage{fontspec}
\setmonofont{FiraCode-Regular.ttf}
\begin{document}
Foo
\end{document}

lualatex-compiles,
not xelatex-compiles: that failed with the error:

! Package fontspec Error: The font "FiraCode-Regular" cannot be found.
For immediate help type H .
...
l.3 ...}[ItalicFont= FiraCode-RegularItalic.otf]
?

Where did you get the fonts? There is no FiraCode-Regular.ttf in texlive, and at https://github.com/tonsky/FiraCode I only find ttf-files and  no FiraCode-RegularItalic.otf
After I installed the firacode fonts (in my system), \setmonofont{FiraCode-Regular.ttf} worked fine for me with lualatex and xelatex.

Where did you get the fonts? There is no FiraCode-Regular.ttf in texlive, and at https://github.com/tonsky/FiraCode I only find ttf-files and no FiraCode-RegularItalic.otf

A friend gave them to me. But I guess they come from this repository.

After I installed the firacode fonts (in my system), \setmonofont{FiraCode-Regular.ttf} worked fine for me with lualatex and xelatex.

Strange! My system is GNU/Linux Mageia 9 with a vanilla install of TeX Live 2024. And:
$ fc-list | grep FiraCode-Regular
/usr/share/fonts/drakfont/Type1/FiraCode-Regular.pfb: Fira Code:style=Regular
/usr/share/fonts/drakfont/ttf/FiraCode-Regular.ttf: Fira Code:style=Regular
/usr/share/fonts/drakfont/otf/FiraCode-RegularItalic.otf: Fira Code:style=Regular Italic,Italic

I thought this might be a bug with mixing ttf and otf extensions in the same font family call, but this seems to work for me:
\documentclass{article}
\usepackage{fontspec}
\setmonofont{Ysabeau-Regular.otf}[ItalicFont=Lato-Regular.ttf]
\begin{document}
\ttfamily
Foo
\itshape
Foo
\end{document}

At the moment I am thinking this might not be a fontspec issue, so I'll close this issue now to avoid it lingering -- but let me know if you can find another example.

At the moment I am thinking this might not be a fontspec issue, so I'll close this issue now to avoid it lingering -- but let me know if you can find another example.

But isn't it a bug of fontspec that the following MCE doesn't compile with xelatex?
\documentclass{article}
\usepackage{fontspec}
\setmonofont{FiraCode-Regular.ttf}
\begin{document}
Foo
\end{document}

But isn't it a bug of fontspec that the following MCE doesn't compile with xelatex?

It compiles fine for me. But you can test if it is a problem with fontspec or your font installation by compiling without fontspec:
\documentclass{article}
\begin{document}
\font\test="[FiraCode-Regular.ttf]/OT:script=latn;language=dflt;" \test blub
\end{document}

@dbitouze  — I don't understand this example. The * notation is intended to copy the first argument into the subsequent arguments, and the Extension notation is to add .otf to them. So it seems correct that fontspec would be looking for:

TeX Gyre Pagella-Regular.otf
TeX Gyre Pagella-Bold.otf
TeX Gyre Pagella-Italic.otf
TeX Gyre Pagella-BoldItalic.otf

And it also seems correct that it couldn't find these fonts using those filenames. How this ever worked I'm not too sure, but it was surely a mis-feature.

@wspr OK, thanks: removing the Extension = .otf option makes it work. Nevertheless, another example which used to work and that doesn't work anymore:
\documentclass{article}
\usepackage{fontspec}
\setmonofont{GoMono}[
UprightFont    = *-Regular,
BoldFont       = *-Bold,
ItalicFont     = *-Regular-Italic,
BoldItalicFont = *-Bold-Italic,
]
\begin{document}
\ttfamily
Test
\textbf{Test}
\textit{Test}
\textbf{\textit{Test}}
\end{document}

despite:
$ fc-list | rg GoMono | rg tf
/usr/local/texlive/2024/texmf-dist/fonts/truetype/bh/gofonts/GoMono-Regular.ttf: Go Mono:style=Regular
/usr/local/texlive/2024/texmf-dist/fonts/truetype/bh/gofonts/GoMono-Bold-Italic.ttf: Go Mono:style=Bold Italic
/usr/local/texlive/2024/texmf-dist/fonts/truetype/bh/gofonts/GoMono-Regular-Italic.ttf: Go Mono:style=Italic
/usr/local/texlive/2024/texmf-dist/fonts/truetype/bh/gofonts/GoMono-Bold.ttf: Go Mono:style=Bold

OK, the expected result is obtained with just \setmonofont{GoMono} (without the options specifying the UprightFont, BoldFont, ItalicFont, and BoldItalicFont).

hmmm, this seems to be working for me in LuaTeX right now (albeit with a prerelease fontspec). But I think it's dangerous to ask for a file on disk without also giving an extension or specifying "Path" — otherwise you are relying on heuristics of the engine searching for the font name, failing to find it, then falling back to searching on disk.

@wspr OK but still it was working before :wink:
But I'm a bit lost: could you please give the code that should be used for this GoMono font with the extension provided and the UprightFont, BoldFont, ItalicFont, BoldItalicFont specified?

@dbitouze  — apologies for the inconvenience here! I am sorry that these changes have caused issues.
I prefer to load fonts by filename to avoid portability issues so I would recommend here:
\setmonofont{GoMono}[
Extension = .ttf,
UprightFont    = *-Regular,
BoldFont       = *-Bold,
ItalicFont     = *-Regular-Italic,
BoldItalicFont = *-Bold-Italic,
]

@wspr You're welcome! Many thanks to you for your answer, for fontspec and for your numerous other contributions!

For what it's worth, with fontspec v2.9d, the file of the OP:
\documentclass{article}
\usepackage{fontspec}
\setmonofont{FiraCode-Regular.ttf}[ItalicFont= FiraCode-RegularItalic.otf]
\begin{document}
Foo
\end{document}

now compiles with lualatex,
still doesn't compile with xelatex, with the same error:

! Package fontspec Error:
(fontspec)                The font "FiraCode-Regular" cannot be found; this
(fontspec)                may be but usually is not a fontspec bug. Either
(fontspec)                there is a typo in the font name/file, the font is
(fontspec)                not installed (correctly), or there is a bug in
(fontspec)                the underlying font loading engine
(fontspec)                (XeTeX/luaotfload).

For immediate help type H <return>.
 ...

l.3 ...tf}[ItalicFont= FiraCode-RegularItalic.otf]

?

@dbitouze — thanks for letting me know... this was definitely supposed to be fixed! :(

XeTeX does not load system fonts by file name, only TDS fonts, and vice versa. Luaotfload will load system fonts by file names (unless kpse: prefix is used).

XeTeX does not load system fonts by file name, only TDS fonts, and vice versa. Luaotfload will load system fonts by file names (unless kpse: prefix is used).

@khaledhosny Thanks! But, given that:
$ fc-list | rg -v wght | rg -v pfb | rg FiraCode | rg Italic
/usr/share/fonts/drakfont/otf/FiraCode-BoldItalic.otf: Fira Code:style=Bold Italic
/usr/share/fonts/drakfont/otf/FiraCode-RegularItalic.otf: Fira Code:style=Regular Italic,Italic

what would be with XeTeX the code to use in order to get the font provided by FiraCode-RegularItalic.otf (last line above) as ItalicFont?

\setmonofont{Fira Code} should work, you don’t need to explicitly specify ItalicFont.
Bit if you want to load the fonts by file name, then the simplest solution is to copy them to the current directory.

Shouldn't it also work to write Path=/usr/share/fonts/drakfont/otf/ ?

That would work too.


Hanging at Ensure Homebrew parent directory has correct permissions

Hi Jeff (and Elliot 😛), big fan here.
I'm having apparent permissions issues. Story of my career. Any guidance is greatly appreciated.
Homebrew
[14:18:13] jake.harris:cmdr git:(main*) $ brew --version
Homebrew 3.1.4
Homebrew/homebrew-core (git revision 99a41050d8; last commit 2021-04-28)

MacOS
[14:18:14] jake.harris:cmdr git:(main*) $ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G8022

Ansible:
[14:19:15] jake.harris:cmdr git:(main*) $ ansible --version
ansible 2.10.7
  config file = None
  configured module search path = ['/Users/jake.harris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/3.2.0/libexec/lib/python3.9/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.9.4 (default, Apr  5 2021, 01:47:16) [Clang 11.0.0 (clang-1<IP_ADDRESS>)]

Python:
[14:23:03] jake.harris:cmdr git:(main*) $ python --version
Python 2.7.16

Galaxy:
ansible-galaxy list
# /Users/jake.harris/.ansible/roles
- elliotweiser.osx-command-line-tools, 2.3.0
- ...
- geerlingguy.homebrew, 3.1.0

And lastly, the command:
ansible-playbook \
  --ask-become-pass \
  --connection=local \
  --inventory <IP_ADDRESS>, \
  --limit <IP_ADDRESS> main.yml

Playing with this some more, and somewhere along the lines I got it to work. I think I just had a bad combo of becomes somewhere that I sorted out without realizing it. Apologies to any future internet travelers who were looking for a solution.


[flutter_tools] gradual migration to package:vm_service

Description
Implements the bootstrap and first migration described in https://github.com/flutter/flutter/issues/52179
The streamListen APIs are updated to use the new vm_service delegate, which modifies the log listening in the physical iOS devices and benchmark mode tracing

One problem with this technique is  that I'm not able to ignore service requests that the tool itself sends. Looking for a solution

The double vmservice client wasn't really working, testing a slightly less gradual that only uses a single vmservice  client

Overall this looks good to me, but I'm not sure what the comments about manual testing mean.

Sorry for the confusion on that, those we're mostly breadcrumbs for myself because I'm not 100% confident everything changed has integration testing

Closing in favor of https://github.com/flutter/flutter/pull/53809


Next episode option for a TV show on raspberry pi 4

Bug report
Your Environment

Netflix add-on version: 1.5.1
Operating system version/name: LibreElec 9.2.1
Device model:  Raspberry pi 4

Used Operating system:

[ ] Android
[ ] iOS
[x] Linux
[ ] OSX
[x] Raspberry-Pi
[ ] Windows

Describe the bug

I realized that the option to directly play the next episode for a TV show seems to be missing on raspberry pi. I tested on my linux computer and the option is available so it is not a missing feature.
Expected behavior

A next button should appear in the playback menu when a TV show's episode is playing.
Actual behavior

No next button appear in the playback menu.
Steps to reproduce the behavior

Play any TV show episode
Notice that the next button doesn't show up

Possible fix

Maybe a dependency or something is missing for accessing that feature on rpi?
Debug log

The debug log can be found from this link:
https://pastebin.com/PBHjGnvw
Additional context or screenshots (if appropriate)
Installation

[ ] I'm using other Netflix Repo
[ ] I'm using a different source

Other information

Screenshots

Here's a screenshot of the playback menu options on the rpi :

Here's a screenshot of the playback menu options on a linux desktop :

this is handled by kodi not addon


Bump pandas version

This loosens the requirement on the pandas version (2.0 was released in April).
None of the breaking changes from v1.0 affects scivision.
Closes #593

LGTM


organized segmentation

Integrated with https://github.com/WPI-RAIL/rail_segmentation/commit/4a1a1a679fe74dc0bcd2775e634a368f7413c0ab


Integrate API calls to facilitate PreTalx data analysis

I have figured out some tooling to grab data from submissions (proposals) and reviews out of PreTalx, which may be useful for assigning proposal reviews to volunteers.
First, both relevant PreTalx APIs authenticate using a fixed token already assigned to each user. Fetch it from the user profile page, scroll down to the API Access heading.
Second, both APIs are streaming: each invocation returns a subset of the sequence of either submissions or reviews, along with a URL whose GET fetches the next page. The following function articulates the logic to pull the whole stream associated to one of these two API endpoints:
from contextlib import closing
import requests
from tqdm.auto import tqdm

def fetch_sequence(url1, token, max_queries=50):
    sequence = []
    url = url1
    max_queries = 50
    num_queries = 0
    num_results_expected = None

    with closing(tqdm(total=max_queries)) as progress:
        while True:
            response = requests.get(url, headers={"Authorization": f"Token {token}"})
            assert response.ok
            data = response.json()
            progress.update()
            num_queries += 1

            assert "results" in data
            assert "next" in data

            if num_results_expected is None and "count" in data:
                num_results_expected = data["count"]
                max_queries = int(np.ceil(num_results_expected / len(data["results"])))
                progress.reset(max_queries)
                progress.update(num_queries)
            else:
                assert num_results_expected == data["count"]

            sequence += data["results"]
            url = data["next"]
            if not url:
                break

    return sequence

The endpoints in question:

Submissions: https://cfp.scipy.org/api/events/2024/submissions/
Reviews: https://cfp.scipy.org/api/events/2024/reviews/

Easy peasy!

@matthewfeickert here is the relevant API knowledge I hacked together.

Thanks @hamelin! I'm going to step through this on Friday, and I'll tag both you and @guenp for a PR review once I think I know what I'm doing. :+1:


Support for parameterized queries

When I make an SQL query via the API, I'd like to optionally pass in parameters, e.g.,
{user}.carto.com/api/v2/sql/?api_key=XXXX&sql=SELECT * FROM table WHERE num > $1&params[]=5
// runs SELECT * FROM table WHERE num > 5

This helps protect against SQL injection and simplifies client code (as opposed to rolling my own string sanitization functions).
It looks like it should be a straightforward change. Is this something you would be open to if I put up a PR?

Closing as this is a duplicate of #239.


Error in parsing My Clippings.txt

I'm getting a strange error when trying to load the plugin.
Steps to reproduce the error:

Download and activate plugin
Run through command pallet, choose My Clippings.txt from folder

I haven`t touched anything on the plugins settings page. I have many highlights from portuguese books.
My Clippings.txt
I attached my clippings.txt file
VM164:2 Could not parse entry in clippings file n {_bookTitleAndAuthors: "Garota exemplar (Flynn, Gillian)", _contentClipp: "Na verdade, queria que ela lesse minha mente para …er de me rebaixar à arte feminina da articulação.", _metdataClipp: "- Seu destaque ou posição 2829-2829 | Adicionado: sexta-feira, 29 de novembro de 2019 18:00:13"}
eval @ VM164:2
t.parseKindleEntries @ VM164:2
eval @ VM164:2
startSync @ VM164:2
async function (async)
startSync @ VM164:2
onMyClippingsSync @ VM164:2
onClick @ VM164:2
eval @ VM164:2
VM164:2 Error parsing C:\Users\camil\Google Drive\3 Referências\Kindle\My Clippings.txt. Error: Error: Couldn't parse type of Entry: pageMetadataStr: - Seu destaque ou posição 2829-2829
    at eval (eval at <anonymous> (app.js:1), <anonymous>:2:4641)
    at Array.forEach (<anonymous>)
    at Object.t.parseKindleEntries (eval at <anonymous> (app.js:1), <anonymous>:2:4515)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:2:489993)
    at Dt.startSync (eval at <anonymous> (app.js:1), <anonymous>:2:490066)
startSync @ VM164:2
async function (async)
startSync @ VM164:2
onMyClippingsSync @ VM164:2
onClick @ VM164:2
eval @ VM164:2

Thanks for sharing.
I believe you are getting this message because your My Clippings file is in a language (Spanish?) that is not supported.
Can you send me your original file to<EMAIL_ADDRESS>I will update the plugin to support your language too.

Thanks for sending through your email and file.
Your data is in Portuguese which is currently not supported by the plugin. That is a straight forward change that I can make though. I'll pick this up over my weekend in NZ and let you know here when it is done.

The latest version of the plugin (v0.2.13) that I just published should resolve your issue now.
Try it now and let me know so we can close the issue.


Connecting to non-existing vhost can hang the program

The following program can get stuck at the .await when vhost bad does not exist.
#[tokio::main(flavor = "current_thread")]
async fn main() {
    let conn = lapin::Connection::connect(
        "amqp://rabbitmq_user:rabbitmq_passwd@localhost:5672/bad",
        lapin::ConnectionProperties::default(),
    )
    .await;

    match conn {
        Ok(_conn) => {
            println!("connected");
        }
        Err(_error) => {
            println!("error");
        }
    }
}

[dependencies]
lapin = "2.1.0"
tokio = { version = "1.17", features = ["full"] }

It is not consistent though. In ~50% of the cases the future never resolves, in the other ~50% it returns Err(_). The workaround I used is specifying timeout with deadpool_lapin crate.
Affected lapin versions: 2.0.0, 2.1.0, lapin 1.9.0 and 1.10.0 work ok, that is they always return Err(_)
Runtime: tokio 1.17
RabbitMQ version: 3.9
OS: Linux 5.16.12

Thanks, shouldn't e too hard to track down

I can indeed reproduce locally


[Feature Request] Status Updated For Device

Is your feature request related to a problem? Please describe.
Not a problem, on the old Smarthinqs integration the status for the device updates based on the status, IE, washing, rinsing, drying, night drying etc.  Whereas this one is either off or on.
Describe the solution you'd like
Any chance you could do the same?
Describe alternatives you've considered
N/A
Additional context
N/A

There is a sensor attribute to get this information, and if you need you can use platform_template to create a dedicated sensor with this value.

I see, I'm glad you make it sound so easy :D , there is zero chance I'll be able to figure that out.  I can't even get my fan template to work after all the changes they made.  Thanks for the info though!

Somenthing like this in your configuration.yaml:
sensor:
  - platform: template

    sensors:

      washer_current_run_state:
        friendly_name: 'Whasher Phase'
        icon_template: mdi:washing-machine
        value_template: "{{ state_attr('sensor.washer', 'run_state') }}"

Replace sensor.washer with your sensor name, really not so complex 😉
Did you check fan documentation to find out what you have to change.

  Yeah I looked through the HA docs about the fan changes just not certain on how to get the things that I want out of it (yet).

In any case you can find additional info in readme, great job by @KTibow.

Somenthing like this in your configuration.yaml:
sensor:
  - platform: template

    sensors:

      washer_current_run_state:
        friendly_name: 'Whasher Phase'
        icon_template: mdi:washing-machine
        value_template: "{{ state_attr('sensor.washer', 'run_state') }}"

Replace sensor.washer with your sensor name, really not so complex 😉
Did you check fan documentation to find out what you have to change?

This worked perfectly and now looking at your code I understand how those values work more, the first '' is the entity, the second '' is the subentity that gives a state, thanks!

Then can you close?


Timeseries messages not sent when flush called immediately after buffering.

If you try to send timeseries messages through a buffer and then immediately call the flush function, the messages that were most recently added to the buffer may not get sent.
However, if I sleep for even a 0.1 seconds before calling the flush function, all messages are sent as expected.
The same behaviour happens in both C# and python client.
Reproducible example in Benchmark kafka libraries repo

Merged.


Improvements/Suggestions

Hello!
Thanks for the wonderful docker app!
Can we seperate the Environment variables to a seperate file? Currently it clutters up the docker-compose file with settings not really related to server configuration. It also does not make any sense if you plan to add more supported services.
Also can we have the option to rearrange the links? And to add custom links as well for advanced users as well?
i could propose a yml configuration file something like this (ps: github doesnt support uploading of yml files.):
sample.yml.txt

Hey, thanks for the suggestions.  These are related to the server configuration since it is server side rendered and needs to modify the output.  Unfortunately I do not plan on changing the API in a breaking way and time soon unless there is a good reason too.  There's also a lot of mapping that would also have to change.  Sorting links is already planned https://github.com/techno-tim/littlelink-server/issues/2

Okay, although you might say it relates to server configuration, i would think of it as content management of the website. I was referring to more docker related settings like port, timezone, password, etc, in the docker-compose file than website links content management. Using a seperate file for links can allow the expandability to add custom links. :) It could also be a json file where it is possible for the website to read from :)

You can put the environment variables in a separate file with
env_file:
      - variables.env


Game windows focus/unfocus signal or properties

How i can identify focus/defocus on Game window on PC|Mac platform?
I use both keyboard and window draging as character control, but if key was been pressed and then window has been defocused or draged, keyboard action Input.is_action_pressed  got stuck on true and resets only after focusing on window and pressing on another key.

You can use this:
func _notification(what):
	if what == MainLoop.NOTIFICATION_WM_FOCUS_IN:
		print("Focused!")
	elif what == MainLoop.NOTIFICATION_WM_FOCUS_OUT:
		print("Unfocused!")


Update ReadMe for better user experience in oap-data-source installation

What changes were proposed in this pull request?
Closes #1771
An updated ReadMe for oap-data-source installation and set up.
How was this patch tested?
Only ReadMe update and has been tested offline step by step
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@weiting-chen thanks for the great efforts!

@weiting-chen Do we also need to cherry-pick this commit to master?

@weiting-chen Do we also need to cherry-pick this commit to master?

Yes, but a couple of places must be changed for master, will cherry-pick from this commit with the modification, and send a new PR to address it in master.


Factor out EntityTag from Etag header

Allow use of EntityTag in other headers that use entity tags.

There were the following issues with your Pull Request

Commit: 7fef4c4ef72acc4bed2fb9948eaecea016afa395
Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md

This message was auto-generated by https://gitcop.com

What's another example of a header needing an entity tag?

If-Match?

Fair enough! I'm sold. Just the deref nit and I'll merge.
On Fri, Feb 6, 2015, 2:27 PM Josh Matthews<EMAIL_ADDRESS>wrote:

If-Match?
—
Reply to this email directly or view it on GitHub
https://github.com/hyperium/hyper/pull/296#issuecomment-73324633.

Would you like these squashed to a single commit?

Yes please!


Build failure due to cryptography 3.4.7

The farbic-py-sdk is unable to build on CentOS 8.0.
While processing dependencies for fabric-py-sdk==0.9.0, the build looks for cryptography>=1.9 and ends up on version 3.4.7. The corresponding setup.py throws a  error.
Logs below for the error scenario -
[2021-06-30T14:04:42.635Z] Searching for cryptography>=1.9
[2021-06-30T14:04:42.635Z] Reading https://pypi.org/simple/cryptography/
[2021-06-30T14:04:44.060Z] Downloading https://files.pythonhosted.org/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz#sha256=3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713
[2021-06-30T14:04:44.331Z] Best match: cryptography 3.4.7
[2021-06-30T14:04:44.331Z] Processing cryptography-3.4.7.tar.gz
[2021-06-30T14:04:44.331Z] Writing /tmp/easy_install-tgr1m2va/cryptography-3.4.7/setup.cfg
[2021-06-30T14:04:44.331Z] Running cryptography-3.4.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tgr1m2va/cryptography-3.4.7/egg-dist-tmp-7b5pxrsu
[2021-06-30T14:04:44.768Z]
[2021-06-30T14:04:44.768Z]         =============================DEBUG ASSISTANCE==========================
[2021-06-30T14:04:44.768Z]         If you are seeing an error here please try the following to
[2021-06-30T14:04:44.768Z]         successfully install cryptography:
[2021-06-30T14:04:44.768Z]
[2021-06-30T14:04:44.768Z]         Upgrade to the latest pip and try again. This will fix errors for most
[2021-06-30T14:04:44.768Z]         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
[2021-06-30T14:04:44.768Z]         =============================DEBUG ASSISTANCE==========================
[2021-06-30T14:04:44.768Z]
[2021-06-30T14:04:44.768Z] Traceback (most recent call last):
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
[2021-06-30T14:04:44.768Z]     yield saved
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
[2021-06-30T14:04:44.768Z]     yield
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
[2021-06-30T14:04:44.768Z]     _execfile(setup_script, ns)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
[2021-06-30T14:04:44.768Z]     exec(code, globals, locals)
[2021-06-30T14:04:44.768Z]   File "/tmp/easy_install-tgr1m2va/cryptography-3.4.7/setup.py", line 14, in
[2021-06-30T14:04:44.768Z]     with open('./requirements.txt') as reqs_txt:
[2021-06-30T14:04:44.768Z] ModuleNotFoundError: No module named 'setuptools_rust'
[2021-06-30T14:04:44.768Z]
[2021-06-30T14:04:44.768Z] During handling of the above exception, another exception occurred:
[2021-06-30T14:04:44.768Z]
[2021-06-30T14:04:44.768Z] Traceback (most recent call last):
[2021-06-30T14:04:44.768Z]   File "setup.py", line 46, in
[2021-06-30T14:04:44.768Z]     include_package_data=True,
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
[2021-06-30T14:04:44.768Z]     return distutils.core.setup(**attrs)
[2021-06-30T14:04:44.768Z]   File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
[2021-06-30T14:04:44.768Z]     dist.run_commands()
[2021-06-30T14:04:44.768Z]   File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
[2021-06-30T14:04:44.768Z]     self.run_command(cmd)
[2021-06-30T14:04:44.768Z]   File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
[2021-06-30T14:04:44.768Z]     cmd_obj.run()
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
[2021-06-30T14:04:44.768Z]     self.do_egg_install()
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/install.py", line 117, in do_egg_install
[2021-06-30T14:04:44.768Z]     cmd.run()
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 411, in run
[2021-06-30T14:04:44.768Z]     self.easy_install(spec, not self.no_deps)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
[2021-06-30T14:04:44.768Z]     return self.install_item(None, spec, tmpdir, deps, True)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 706, in install_item
[2021-06-30T14:04:44.768Z]     self.process_distribution(spec, dist, deps)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 751, in process_distribution
[2021-06-30T14:04:44.768Z]     [requirement], self.local_index, self.easy_install
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 770, in resolve
[2021-06-30T14:04:44.768Z]     replace_conflicting=replace_conflicting
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 1053, in best_match
[2021-06-30T14:04:44.768Z]     return self.obtain(req, installer)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 1065, in obtain
[2021-06-30T14:04:44.768Z]     return installer(requirement)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 678, in easy_install
[2021-06-30T14:04:44.768Z]     return self.install_item(spec, dist.location, tmpdir, deps)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 704, in install_item
[2021-06-30T14:04:44.768Z]     dists = self.install_eggs(spec, download, tmpdir)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 889, in install_eggs
[2021-06-30T14:04:44.768Z]     return self.build_and_install(setup_script, setup_base)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1157, in build_and_install
[2021-06-30T14:04:44.768Z]     self.run_setup(setup_script, setup_base, args)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1143, in run_setup
[2021-06-30T14:04:44.768Z]     run_setup(setup_script, args)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup
[2021-06-30T14:04:44.768Z]     raise
[2021-06-30T14:04:44.768Z]   File "/usr/lib64/python3.6/contextlib.py", line 99, in exit
[2021-06-30T14:04:44.768Z]     self.gen.throw(type, value, traceback)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
[2021-06-30T14:04:44.768Z]     yield
[2021-06-30T14:04:44.768Z]   File "/usr/lib64/python3.6/contextlib.py", line 99, in exit
[2021-06-30T14:04:44.768Z]     self.gen.throw(type, value, traceback)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules
[2021-06-30T14:04:44.768Z]     saved_exc.resume()
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume
[2021-06-30T14:04:44.768Z]     six.reraise(type, exc, self._tb)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise
[2021-06-30T14:04:44.768Z]     raise value.with_traceback(tb)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
[2021-06-30T14:04:44.768Z]     yield saved
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
[2021-06-30T14:04:44.768Z]     yield
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
[2021-06-30T14:04:44.768Z]     _execfile(setup_script, ns)
[2021-06-30T14:04:44.768Z]   File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
[2021-06-30T14:04:44.768Z]     exec(code, globals, locals)
[2021-06-30T14:04:44.768Z]   File "/tmp/easy_install-tgr1m2va/cryptography-3.4.7/setup.py", line 14, in
[2021-06-30T14:04:44.768Z]     with open('./requirements.txt') as reqs_txt:
[2021-06-30T14:04:44.768Z] ModuleNotFoundError: No module named 'setuptools_rust'
[2021-06-30T14:04:44.768Z] make: *** [Makefile:85: install] Error 1

Would suggest specify a lower version of cryptography.
We have not tested with CentOS 8.0 yet.
Anyone has such an OS to give it a try? Let me know, thanks!


Enyo 1740 Refactoring css class for CheckboxItem

Issue
check mark layout of CheckboxItem needs to fix
Cause
CheckboxItem uses some css class of moon.Item. But we do not require it from .js file
Fix
Refactor CheckboxItem.less to meet some feature of moon.Item
Enyo-DCO-1.1-Signed-off-by: David Um<EMAIL_ADDRESS>

Closing in favor of #2269


ASA-185: Add USL Super League

Closes #185
Description
Add USL Super League
Checklist

[x] Code compiles correctly
[ ] Created tests which fail without the change (if applicable)
[ ] All lint and unit tests passing
[ ] Extended the README / documentation, if necessary

Additional Comments
Do I need to bump version here since its already at 1.2.2?

@lvanden We should bump to 1.3.0 since it's a new league is technically a new feature


Unable to upload files larger >= 2GB

I'm experiencing an issue when trying to upload files larger than 2GB.
What happened: I get an overflow error when uploading large files
What you expected to happen: Upload to finish successfully
Minimal Complete Verifiable Example:
import gcsfs

fs = gcsfs.GCSFileSystem()

# Works fine
with fs.open("gs://bucket/path/to/upload/one", "wb") as f:
    f.write(b"0" * (2 ** 30))

# Raises `ClientOSError: [Errno 1] malloc failure (_ssl.c:2423)`
with fs.open("gs://bucket/path/to/upload/two", "wb") as f:
    f.write(b"0" * (2 ** 31 - 1))

# Raises `OverflowError: string longer than<PHONE_NUMBER> bytes`
with fs.open("gs://bucket/path/to/upload/three", "wb") as f:
    f.write(b"0" * (2 ** 31))

Anything else we need to know?: I've tried this on various machines and see the same thing each time, definitely not mac only.
Environment:

Python version: 3.7.9
Operating System: macOS Catalina 10.15.7
Install method (conda, pip, source): pip
GCSFS version: 0.7.1

Apparently this is a known issue with aiohttp. You could work around it by splitting your writes into multiple pieces of <2**30bytes.
Our code only currently checks for blocks that are too small, and it seems no one has tried to push a block this big before. The code could be changed to split such big blocks internally to save you the hassle.

Apparently this is a known issue with aiohttp. You could work around it by splitting your writes into multiple pieces of <2**30bytes.
Our code only currently checks for blocks that are too small, and it seems no one has tried to push a block this big before. The code could be changed to split such big blocks internally to save you the hassle.

Apparently this is a known issue with aiohttp. You could work around it by splitting your writes into multiple pieces of <2**30bytes.
Our code only currently checks for blocks that are too small, and it seems no one has tried to push a block this big before. The code could be changed to split such big blocks internally to save you the hassle.

Oh, that's a bit of a surprise. Can you share a link to the known aiohttp issue, please?
Also, is there any chance you could provide some pointers for fixing this? I might be interested in helping out.

Apparently this is a known issue with aiohttp. You could work around it by splitting your writes into multiple pieces of <2**30bytes.
Our code only currently checks for blocks that are too small, and it seems no one has tried to push a block this big before. The code could be changed to split such big blocks internally to save you the hassle.

Oh, that's a bit of a surprise. Can you share a link to the known aiohttp issue, please?
Also, is there any chance you could provide some pointers for fixing this? I might be interested in helping out.

Actually, it seems to be deeper, in ssl or httplib, see discussions like https://github.com/psf/requests/issues/2717 (for the requests library).
So there are two possibilities, the first of which might not work, but is far simpler

in GCSFile._upload_chunk passing the internal BytesIO file-like self.buffer to the HTTP call, instead of extracting its bytes data (see https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession , in request, data can be a file-like rather than bytes). Note that the API stated that it's still possible that only part of the file is uploaded.
wrap the current code in GCSFile._upload_chunk to check and break up the bytes block to be below some maximum size, presumably 2**30 (or maybe user settable).

Actually, it seems to be deeper, in ssl or httplib, see discussions like https://github.com/psf/requests/issues/2717 (for the requests library).
So there are two possibilities, the first of which might not work, but is far simpler

in GCSFile._upload_chunk passing the internal BytesIO file-like self.buffer to the HTTP call, instead of extracting its bytes data (see https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession , in request, data can be a file-like rather than bytes). Note that the API stated that it's still possible that only part of the file is uploaded.
wrap the current code in GCSFile._upload_chunk to check and break up the bytes block to be below some maximum size, presumably 2**30 (or maybe user settable).

@agrinh : do you think you will be able to make a fix based on this?

@agrinh : do you think you will be able to make a fix based on this?

@agrinh : do you think you will be able to make a fix based on this?

It's enough to get me started, let me see if I can get some time to try your first suggestion to begin with.

@agrinh : do you think you will be able to make a fix based on this?

It's enough to get me started, let me see if I can get some time to try your first suggestion to begin with.


trainer decorator for mldg, dial

https://github.com/marrlab/DomainLab/pull/391

fe864cf
almost fixed, mldg trainer need to be incorprated


Studies dropdown menu: My studies and Curated studies sections always should be open (remove ability to close)

On qa.restricted.clinepi, the studies dropdown looks like this, with My studies closed initially and Curated studies opened initially

If I use the search bar (ex: search for avenir), this causes My studies to disappear and Curated studies to close (such that I cannot see the study I searched for without opening it up)

Please change the functionality of this so that My studies and Curated studies are always open (there is no need to close these sections).
If I search for a study, please keep the My studies and Curated studies headers, but just show the studies that meet the search below the headers

This is related to #642. @jernestmyers if we want to retain the ability to collapse, I think we should force these sections to be open when the studies are being filtered.
@danicahelb if we implement my suggestion, would you be okay with keeping the collapsible behavior?

if we want to retain the ability to collapse, I think we should force these sections to be open when the studies are being filtered.

I agree, and actually implemented this yesterday (but didn't yet push). However, I did not retain the "My studies" or "Curated studies" headers when no studies match. If desired, it wouldn't be difficult to render a "No results" string under a section with no matches. I'm not sure it's necessary, but it's an easy change nonetheless!
Here's a screencast of current behavior, which opens the sections when filtering and defaults both sections to be open when the page loads:
https://github.com/VEuPathDB/web-monorepo/assets/69446567/476c80f8-191f-4d3a-b884-fbe7b0bb0bb6


WM ext browser support - Firefox

Context
WM extension compatibility with the Firefox browser.
Todos
TBC

Tested and ready to close.


Update the README with info about GitHub Enterprise

This covers some issues I encountered while implementing deploy keys in GitHub Enterprise.

@natemccurdy thank you first off for sending this over.  I believe I can just integrate the 'api/v3' into both GHE and Github.com URLs.  Will test tonight.  If it works I will implement and test on current working versions of git_deploy_key and git_webhook.


#1955 Fix foreign key generation in MetadataExp

I collect the foreign keys that should be generated
into a set and only add them to the classModel if
there is any foreign key.

Yeah, this is indeed an issue.
Thanks for opening up a PR.
I left a comment in the diff, but I don't know whether others have comments or not.

Maybe still squash the commits

If I look at the Files changed tab, I see that the isEmpty function is used now.

I meant to combine the two commits into one. The end result is fine.

@timowest  I see. I have never done it before, but I think I managed to merge the two commits.

Looks good, thanks a lot for the contribution @balazs-zsoldos!

Look good to me as well.
I'll merge it then.
@balazs-zsoldos Thanks for the contribution!


Fixing point error and aspect ratio in XML and images

Also updated the README.md picture with better aspect ratio.
Aspect ratio is not included in the WKT string, only in XML.

Thanks for sharing!


Refactor the logic of loading graph from streams (single stream or multiple stream)

Codecov Report

Merging #59 (a460746) into main (596b25a) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   77.67%   77.69%   +0.02%
==========================================
  Files          52       52
  Lines        3713     3712       -1
==========================================
  Hits         2884     2884
+ Misses        829      828       -1

Impacted Files
Coverage Δ

src/common/util/status.h
48.31% <ø> (+0.53%)
:arrow_up:


Cannot switch to new repository

Hi,
We have recently had to move the location of out repo in TFS. After the move I have tried to switch the location of the remote however it is still pointing back to the old location. Just to clarify the tfs-remote url is the same but the tfs-remote repository is different. I have tried to change this in the config file but when I do a tfs pull it says it is "Unable to locate remote for [our old remote url/ $/repo]".
Thanks,
JP.

Looks like the issue is solved. Closing it now


frontend: remove query-string library

we used native URLSearchParams instead.

Used URLSearchParams, PTAL @thisconnect

Made the change to ditch the object null/undef checking and only used URLSearchParams since the checking of null/undef will be done in the BE.
This means an object like this:
  const params = {
        filters: ['filter1', 'filter2'],
        fromTimestamp: undefined,
        includeFailures: true,
        limit: 50,
        offset: 10,
        toTimestamp: null,
      };

new URLSearchParams(params).toString();
will result in
filters=filter1%2Cfilter2&fromTimestamp=undefined&includeFailures=true&limit=50&offset=10&toTimestamp=null.
Also updated commit message. PTAL :)

This PR (FE) is basically ready. 🙂
What's left to do is the filtering of undef and or null values which will be done in the BE instead. Would you like to take that one? cc @dangeross


date parsing error

using either URL Input or File Input I am getting the following error:

Error
Unfortunately an error occurred while attempting to parse the HTML data: invalid literal for int() with base 10: '2024-07-27'
OK

Having the same issue.

same any solution?


Manifest diff doesn't show 'tags' as changed

Having a deployment with tags and redeploying it with changed tags, does not result in any diff.
Response from director's /:deployment/diff:
{"context":{"cloud_config_id":1,"runtime_config_ids":[1]},"diff":[]}

Hey @Kiemes do you know what version you saw this on? Is it still a problem?

@mfine30 sorry. But if you know which version was latest on 23 of August last year, I am pretty sure that it was that version as I am mostly up to date :)

Current implementation doesn't track tags for the resources so it doesn't know when they've changed. Similar behavior to changing properties on the CPI releases - they're not taken into affect until a [re]create.

Fixed in https://www.pivotaltracker.com/story/show/168917397.


final_measurement_mapping function in qiskit.primitive.utils.py does not work properly with mid-circuit measurements

Environment

Qiskit version: 0.45.1 and 1.0.0
Python version: 3.9.12
Operating system: MacOS 13.6.7

What is happening?
The final_measurement_mapping function in qiskit.primitives.utils.py creates an  errorous mapping between measured qubits and classical bits if the considered circuit uses mid-circuit measurements. Specifcally, if one qubit is measured twice in the circuit (outcome mapped to different classical bits), only the last measurement is considered the mapping because the final_measurement_mapping function does not consider already meaasured qubits any further.
This results in unexpected errors when trying to run the circuit, e.g., with the sampler primitive from qiskit-aer.
How can we reproduce the issue?
from qiskit import QuantumCircuit
from qiskit.primitives.utils import final_measurement_mapping

# create minimal example circuit
c = QuantumCircuit(1,2)
c.h(0)
c.measure(0,0)
c.h(1)
c.measure(0,1)

# create measurement mapping using qiskit.primitives.utils. returns {0: 1}
map = final_measurement_mapping(c)
print("result from final_measurement_mapping function: {}".format(map))

print("expected outcome: {0: (0,1)}")

What should happen?
From the above code example the final_measurement_mapping function outputs the dictionary {0: 1}.
The first measurement, where the outcome is mapped to classical bit 0 is not considered.
Any suggestions?
From the function decription the expected output should consider all measurements, including mid-circuit measurements.
The dictionary should thus have a list as its values carrying all classical bits to which measurement outcomes of the qubit where mapped.

I believe this can be solved by using the M3 version that does account for mid-circuit measurements: https://github.com/Qiskit-Extensions/mthree/blob/30d35d03b2a4ffdd9c4d0a29299dd41a683f5a84/mthree/utils.py#L52

final_measurement_mapping will be deprecated #12575. I suggest migrating to the M3 version.

I close this because the function is deprecated #12575.


fasd_cd command not found ubuntu bash

there is no fasd_cd function defined for this platform.
the following function in your bashrc will fix there errors running the z and zz error
function fasd_cd {
[ "$2" = '-i' ] && { cd `fasd -id "$1"   `  | awk '{print "$2"}';  return; }
{ cd `fasd  -d "$1" -1`  | awk '{print "$2"}';  return; }
}

+1, still works neither on ubuntu nor on osx for me. Can someone take a look at this? pretty useless without z.

I've been using fasd on Ubuntu for years now.  Works fine.
bash:
  Installed: 4.3-7ubuntu1.5
  Candidate: 4.3-7ubuntu1.5
  Version table:
 *** 4.3-7ubuntu1.5 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4.3-6ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

+1 Also not working on osx for me.

I'm guessing somehow the fasd_cd definition is not run in your shell rc. Please double check the installation notes and put relevant init code into your shell rc.

Added init command to shell, but it still does not work.
installed through homebrew and apt-get. This Error might be but probably is not related to the OSX El Capitan beta as I still manage to screw it up on Ubuntu.

@FranzSkuffka

What shell are you using? (run echo $SHELL)
Is fasd accessible by your shell? (run which fasd)
Where did you put the fasd init code? Was it really sourced by your shell? Put echo test or something after fasd init code and re-open your shell again.
What are the error messages, if any?

Ubuntu (working)

Both machines have the same zshrc
Ubuntu (working after zsh upgrad i think)

[~] echo $SHELL
/usr/bin/zsh
[~] which fasd
/home/jan/bin/fasd
[~] fasd
...
test

no errors
OSX (not working)

That is odd. What exactly is the init command you used? fasd --init auto?

Yes

[~] fasd --init auto
{ if [ "$ZSH_VERSION" ] && compctl; then # zsh
    eval "$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \
      zsh-wcomp zsh-wcomp-install)"
  elif [ "$BASH_VERSION" ] && complete; then # bash
    eval "$(fasd --init posix-alias bash-hook bash-ccomp bash-ccomp-install)"
  else # posix shell
    eval "$(fasd --init posix-alias posix-hook)"
  fi
} >> "/dev/null" 2>&1

[~] fasd_cd
zsh: command not found: fasd_cd

However, this issue is not urgent to me, I stick with rupa's z until this is resolved. Will provide more information if needed though.

Well, I think you need eval "$(fasd --init auto)". That should work.
fasd --init auto doesn't do anything to your shell if fasd is an executable, and that is where z and fasd differ. You could, however, source fasd just like you would with z.

echo 'eval "$(fasd --init auto)"' >> ~/.zshrc
source ~/.zshrc

change zshrc to bashrc if you use bash

It works for me now. My error.


Deploy portal with and without lorawan

Description
What's new?

Implement #826

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other

Small issue when selecting LoRaWAN feature +not deploy edge device :

Small issue when selecting LoRaWAN feature +not deploy edge device :

Same when not-selecting lorawan :


Simplify rrtmgp interfaces

Removes sizes from function arguments -> pack/unpack
Simplies documentation
Moves itropo_upper/itropo_lower to InterpolationCoefficients as tropo_lims
Adds type restrictions to upper,lower,upper_aux,lower_aux in GasOptics
Adds StaticArrays to reduce allocations
Reformulates interpolation2D and interpolation3D

This PR should make extending some of the methods in GasOptics and GasOptics_Kernels to per-grid-point much simpler.

bors r+


ocamlPackages.curly: 0.2.0 -> 0.3.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/rgrinberg/curly/releases.
meta.description for ocamlPackages.curly is: Curly is a brain dead wrapper around the curl command line utility
meta.homepage for ocamlPackages.curly is: https://github.com/rgrinberg/curly
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.3.0 with grep in /nix/store/78ng63fw03lx7c3f05j6nhwqxgfb5jz8-ocaml5.1.1-curly-0.3.0
found 0.3.0 in filename of file in /nix/store/78ng63fw03lx7c3f05j6nhwqxgfb5jz8-ocaml5.1.1-curly-0.3.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
dune-release

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/78ng63fw03lx7c3f05j6nhwqxgfb5jz8-ocaml5.1.1-curly-0.3.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A ocamlPackages.curly https://github.com/r-ryantm/nixpkgs/archive/bc57f200b5018b556f9f0dde6c68b501125da9aa.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/bc57f200b5018b556f9f0dde6c68b501125da9aa#ocamlPackages.curly

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/78ng63fw03lx7c3f05j6nhwqxgfb5jz8-ocaml5.1.1-curly-0.3.0
ls -la /nix/store/78ng63fw03lx7c3f05j6nhwqxgfb5jz8-ocaml5.1.1-curly-0.3.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

dune-release
ocamlPackages.curly

Maintainer pings
cc @sternenseemann for testing.

@ofborg build ocamlPackages.curly


[Flaky Test] Fix Flaky Test ClusterRerouteIT.testDelayWithALargeAmountOfShards

Signed-off-by: kkewwei<EMAIL_ADDRESS>
Description
[BUG] org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards test is flaky.
We can see that the shards are rebalanced back and forth:
https://build.ci.opensearch.org/blue/rest/organizations/jenkins/pipelines/gradle-check/runs/41527/nodes/18/steps/32/log/?start=0
We can see from the log：

2024-06-22T23:45:36,760:   node_t0 is shut down.
2024-06-22T23:45:37,042: node_t3 is elected as new cluster manager.
2024-06-22T23:45:49,898: all the indices are green.
2024-06-22T23:45:49,898 ~ 2024-06-22T23:47:39,526: the test8][4] and [test4][4] are rebalanced back and forth.
2024-06-22T23:47:39,526: ensureGreen timed out.

It seems to be a very low probability bug, I tried to reproduce several times, but failed. The bug about the shards being rebalanced back and forth should be solved in a new issue. If needed, I will create a new issue to track this case.
So we just solve it by temporary ignoring the RelocatingShards when get the ClusterHealthStatus.
Related Issues
Resolves #10558

Check List

[ ] Functionality includes testing.
[ ] API changes companion pull request created, if applicable.
[ ] Public documentation issue/PR created, if applicable.

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

👏

@andrross Any concerns?
@kkewwei Care to open a new issue describing the unlikely back-and-forth? It clearly does happen and was surfaced by the flakiness of this test.

@dblock, of course.


"In-Graph Replication" Multi-GPU training in local/single machine not working.

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Wrote a minimal version custom code using TensorFlow API's (see attachment)
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
TensorFlow installed from (source or binary): Installed through pip
TensorFlow version (use command below): ('v1.3.0-rc2-20-g0787eee', '1.3.0')
Python version: Python 2.7.12
Bazel version (if compiling from source): N/A
CUDA/cuDNN version: Cuda Version 8.0, cuDNN version 1.6
GPU model and memory: GeForce GTX Titan X GPU 12 GB memory
Exact command to reproduce: sh run_dist_tf_exp.sh (attached as zip file)
distributed_tf_issue.zip

Describe the problem
We are trying to get single machine multi-gpu training with Distributed Tensor Flow for increasing model throughput. Our set-up is as follows, We have a single compute machine running Ubuntu 16.04 with 8 GPU's and we would like to enable "Data Parallelism" by training model on multiple(4 GPU's) device present in the local machine to increase throughput.
I will explain three scenarios below which uses minimal code that just runs a LinearClassifier (see attached code),
Scenario 1:
tf_config set to run single worker and single parameter server config below,
tf_config = {
    "cluster": {
        'ps': ['<IP_ADDRESS>:9000'],
        'worker': ['<IP_ADDRESS>:9001']
    }
  }

Does not run, execution just freezes. Also tried the suggestion that came in logs to use cloud as environment in tf_config, still didn't work. Read similar issue written here commented out the line in Experiment.py that checks if Environment is not LOCAL. By doing so it was successfully running training and worker exited after finished with training_steps. Should that line be commented for local distributed training runs?
Scenario 2:
tf_config set to run two worker and single parameter server config below,
tf_config = {
    "cluster": {
        'ps': ['<IP_ADDRESS>:9000'],
        'worker': ['<IP_ADDRESS>:9001', '<IP_ADDRESS>:9002']
    }
  }

Had commented out [Experiment.py] (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/experiment.py#L336) line as explained in Scenario 1, Did not work, the script was just hanging forever.
Scenario 3:
tf_config set to run one worker and a single parameter server config similar to Scenario 1.
Change done here was learn_runner.run(..., schedule='continuous_train_and_eval), In continuous_train_and_eval mode the training just froze. Is continuous_train_and_eval not supported with distributed training? Seems to have some problem. Only change here compared to the working Scenario 1 setup with Experiment.py line commented out was changing the schedule to continuous_train_and eval.
Source code / logs
Following modification was done to Experiment.py in run function, Had to comment out LOCAL environment check.
    if (#config.environment != run_config.Environment.LOCAL and
        config.environment != run_config.Environment.GOOGLE and
        config.cluster_spec and config.master):
      self._start_server()

This question is better asked on  StackOverflow since it is not a  bug or feature request. There is also a larger community that reads questions there. Thanks!


Convert to JUnit 5

Replace an implied JUnit 4 with an explicit JUnit 5 Jupiter.
This was mostly straightforward, with the only real change being to adjust
tests for expecting certain exceptions (unfortunately assertThrows doesn't
have the facility to match the exception message, just its type).
CardIdResourceITest seems about 5 seconds quicker now.

Thanks, we’ll take this on in https://github.com/alphagov/pay-cardid/pull/478.


Delete method not sending signals

When deleting an object it would be nice if it sends signals

@dmp593 this issue is because you are not using Collector from django. This class is responsible to emit the signals.
Maybe the best approach is implement a timestamps.models.collectors.SoftCollector and (using as reference django.db.models.deletion.Collector) and use on the model:
def delete(self, using=None, keep_parents=False):
        if self.pk is None:
            raise ValueError(
                "%s object can't be deleted because its %s attribute is set "
                "to None." % (self._meta.object_name, self._meta.pk.attname)
            )
        using = using or router.db_for_write(self.__class__, instance=self)
        collector = SoftCollector(using=using, origin=self)
        collector.collect([self], keep_parents=keep_parents)
        return collector.delete()

def restore(self, using=None, keep_parents=False):
        if self.pk is None:
            raise ValueError(
                "%s object can't be deleted because its %s attribute is set "
                "to None." % (self._meta.object_name, self._meta.pk.attname)
            )
        using = using or router.db_for_write(self.__class__, instance=self)
        collector = SoftCollector(using=using, origin=self)
        collector.collect([self], keep_parents=keep_parents)
        return collector.restore()

Hello @mohaali482 and @arkady-truelogic.
First of all, thank you both for the contribution. 😊
Secondly, I'm really sorry for the delay in addressing this.
@mohaali482 Regarding sending signals when soft deleting (as well as when restoring), you can use the default Django signal (pre_save/post_save) since soft deleting is just setting the "deleted_at" attribute with the value of timezone.utc() and when restoring it puts the deleted_at back to null again.
If we check the documentation I think that we can look into the "updated_fields" array to understand if the property "deleted_at" was updated.
But either way, that seemed a good improvement to add! 💯
Sometimes you only want to listen to the deleted/restored event without the need to do if/else conditions based on the presence or the absence of the field "deleted_at" in the updated_fields array.
Because of that, I'm currently working on the issue. It's still a work in progress, but you can check pull request #7.
Finally, also thank @arkady-truelogic for the suggestion, but I think that in this case the use of a collector is not applicable since a soft delete or a restore operation are, in fact, operations of update. Either way, please check PR #7 and give your insight. 😎
Again, thank you both! 🤩


snake game

Description
   Added How to build Snake using only JavaScript, HTML & CSS

Motivation and Context
  Add project to html tag

Looks fine.


Handle 3rd party packages in src

Including editable packages. Any package installed in src instead of site-packages would have this issue.
The tricky thing is, with virtualenvs, the path could be anywhere, so can't rely on .venv detection either.
Example:
pip install -e git+https://github.com/etianen/django-reversion.git#egg=reversion
# add reversion to INSTALLED_APPS
./manage.py runserver

Expected: works fine.
Actual:
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: (dlm.E001) reversion's max_migration.txt does not exist.
	HINT: If you just installed django-linear-migrations, run 'python manage.py create-max-migration-files'. Otherwise, check how it has gone missing.

This fixes the issue. Not 100% sure it's the best solution, but it seems like a reliable way to detect pip-installed packages.

I can look at importlib-metadata and see about updating this.
My immediate problem is that a package from GitHub (which is private), installs into src even without the editable flag. Do you know what causes that? If I could make it go into site-packages that would work.

So I've been thinking about this and looking at importlib a bit, and I am not sure there's a reliable way to detect third party packages. I'm considering instead have the current detection as a first line, and if that doesn't work tell users to define FIRST_PARTY_APPS in their settings, e.g.
FIRST_PARTY_APPS ["core", ...]
INSTALLED_APPS = FIRST_PARTY_APPS + ["somepackage", "django.contrib.auth", ...]

That'd be fine, I almost went that route myself. Seems the simplest and most reliable, unfortunately.
I also thought about checking if the app directory is version controlled by git, but that seems like it could cause issues too... (what if people don't use git, what about the server side, etc)

I've created the FIRST_PARTY_APPS setting over in #40, so closing this.

I've created the FIRST_PARTY_APPS setting over in #40, so closing this.

Thank you @adamchainz . Will try it out soon, should be all good now.

Thank you @adamchainz . Will try it out soon, should be all good now.


Update package tags for "integration" and "library" terms

Updates the package tags to use the "integration" term. The previously termed "component" packages have "library" added also, so we have "integration hosting" packages and "integration library" packages. The "component" tag isn't being removed as yet as the Visual Studio "Add Aspire package" experience still relies on it.

/backport to release/8.2

Failure looks like a Helix job timeout. Is this common @radical?

Failure looks like a Helix job timeout. Is this common @radical?

Only the Cosmos failure in Aspire.Playground.Tests is known to fail sometimes.
The other two:

Mysql - times out waiting for s_mySqlReadyText = log => log.Contains("ready for connections") && log.Contains("port: 3306");.

RabbitMQ is timing out after 1 minute because the docker image was being pulled before the container could be started.

For a separate PR: We should add WaitForResources in general before WaitForTextAsync in the tests.

We should add WaitForResources in general before WaitForTextAsync in the tests.

Opened https://github.com/dotnet/aspire/issues/5414


@conda-forge-admin,please add bot automerge

Additional comment:
NA

@xl0 Would it be okay if I add you as a co-maintainer here as well?

@sugatoray , yes, please! :)


Update vendor for urfave/cli back to master

Signed-off-by: TomSweeneyRedHat<EMAIL_ADDRESS>Stealing @vrothberg 's https://github.com/containers/libpod/pull/1310 commit for Buildah too.  Getting Buildah back on urfave/cli master after @vrothberg's short option commit was merged.  No changes to any files other than vendor.conf.
I've also added changes to .papr.yml to fix an authentication issue there with the local registry.

LGTM :)

hmm, looks like the registry setup by papr is having issues that it's not had prior.  Will see if I can figure out what's what there.....

LGTM

bot, retest this please

@rhatdan papr tests are failing on an auth to the local registry without much error information.  This is a new behavior for something that hasn't changed in many months, maybe a year now.  Same exact setup is working in Travis.  Trying to figure out what's what, if worse comes to worse I may yank it all out later today so builds can progress.

LGTM

The Red Hat CI got past the registry setup then ran the bats twice successfully and then failed on the third iteration:
ok 113 from volume test
not ok 114 from volume ro test
# (in test file ./from.bats, line 304)
#   `[ "$status" -eq 0 ]' failed
# /root/gopath/src/github.com/projectatomic/buildah/runc
...
# time="2018-08-21T17:25:15Z" level=debug msg="saved image metadata \"{}\""
# time="2018-08-21T17:25:15Z" level=debug msg="Creating dest directory: /var/tmp/tmpcc1a7ab12b1554745126bb2a/root/vfs/dir/f6f22f152ad27243bd3a4d80d06aec485771da6314ba8fde8bc5c48f760e9953"
# time="2018-08-21T17:25:15Z" level=debug msg="Calling TarUntar(/var/tmp/tmpcc1a7ab12b1554745126bb2a/root/vfs/dir/73046094a9b835e443af1a9d736fcfc11a994107500e474d0abf399499ed280c, /var/tmp/tmpcc1a7ab12b1554745126bb2a/root/vfs/dir/f6f22f152ad27243bd3a4d80d06aec485771da6314ba8fde8bc5c48f760e9953)"
# time="2018-08-21T17:25:15Z" level=debug msg="TarUntar(/var/tmp/tmpcc1a7ab12b1554745126bb2a/root/vfs/dir/73046094a9b835e443af1a9d736fcfc11a994107500e474d0abf399499ed280c /var/tmp/tmpcc1a7ab12b1554745126bb2a/root/vfs/dir/f6f22f152ad27243bd3a4d80d06aec485771da6314ba8fde8bc5c48f760e9953)"
# time="2018-08-21T17:25:15Z" level=debug msg="exporting opaque data as blob \"sha256:11cd0b38bc3ceb958ffb2f9bd70be3fb317ce7d255c8a4c3f4af30e298aa1aab\""
# error running container: error creating container for [/bin/cat /proc/mounts]: container_linux.go:336: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:57: mounting \\\"/var/tmp/buildah315817231/mnt/buildah-bind-target-6\\\" to rootfs \\\"/var/tmp/buildah315817231/mnt/rootfs\\\" at \\\"/var/tmp/buildah315817231/mnt/rootfs/myvol\\\" caused \\\"operation not permitted\\\"\"" : exit status 1

Going to rekick as this is blocking other builds.

bot, retest this please.

OK bot, ignore me and I'll squish you!

bot, retest this please.

Ugh, we're hosed until the registry rights itself.

bot, retest this please.

bot, retest this please.

bot, retest this please.

Still not able to get to the registry from papr....

Yeah!  finally a green Red Hat CI test run.

@nalind or @rhdatan can you approve/merge this if appropriate please?  Once in, this will clear up the test issues the other jobs are hitting.

@rh-atomic-bot r+


Make Linux UI frameless (use custom title bar)

Current

Desired

This is accomplished by adding frame: true to browserDefaults if on Linux.
Custom elements for closing, minimizing, and maximizing will need to be added.
Electron Frameless-window docs

It's even worse on my setup (Ubuntu Gnome 16.04):

Where to put the frame: true?

@karlbateman click the browserDefaults link and it'll show you the object to on which to add frame.

@flybayer Thank you, although I have it running on Debian Jessie amd64, so where would I edit that?

@karlbateman did you install using the .deb package or did you clone this git repo and build it from scratch? If you did the first, you'll need to do the second following the instructions in the README.
After cloning, edit the app/index.js file and then run npm start.

@flybayer I did the .deb install, so will follow your suggestion. Thanks for the help :wink:

Yo y'all please check #946 😄

Is this included in the Linux binaries now?

Not right now @karlbateman, but will be in the next release – which will be shipped very soon 😄

@matheuss Thank you, great job btw such an awesome app :+1:


Protocols directive not being honored with mutliple VirtualHosts

I have multiple VirtualHosts in one apache configuration with a mutiple domain certificate (à la #59).  I enabled mod_h2 on one and only one VirtualHost with the line:
Protocols h2 http/1.1

All the other VirtualHosts are using:
 Protocols http/1.1

If I navigate to the h2-enabled site, Chrome reports that it is using h2.  If I navigate to another non-h2 enabled sited, Chrome still reports that it is using h2 and I get the issue that is being fixed and released in issue #59 .
If I first navigate to a http/1.1 site, it uses 1.1 and the h2-enabled site uses h2.  However, when I refresh the 1.1 page, it goes to h2 again.
This behavior happens with or without the presence of:
ProtocolsHonorOrder On

( I see that On is its default)

Chrome really does not remember how it connected to a site in the past, it seems. When it has a h2 connection open, and it keeps them open longer than http/1.1 ones, and the certificate matches, it uses that connection.
And you run into #59 (which we will fix in 2.4.18, coming out soonish).
With 2.4.18, your http/1.1 only site will also be served over the h2 connection to the other site - given that the SSL parameters are all the same. If not, httpd will give 421 again. Depending on the feedback on 2.4.18, I probably have to open a bug against chrome then.
And they'll argue that sites with the same cert should all be reachable over the same connection...we'll see.

And more to the topic of this issue:

different protocols settings on virtual hosts that share the very same certificate will not really be supported, even in 2.4.18
when sites share a certificate, clients will expect the same security and protocol options to apply to all, at least for HTTP/2 clients.
mod_http2 will therefore make no extra attempts to fix such a mixed configuration, since there is no correct behaviour that will work with browsers, I think.
if you have a proposal what should happen, let's hear it!
ProtocolsHonorOrder only has an effect when the connection is started. When the clients wants protocol "x or y" and the server is configured with protocols "y or x", this directive will influence the outcome.

Sounds good to me.  I was just trying to find a workaround until you guys got to 2.4.18.
Thanks for speeding up my website and making me look good with mod_h2!


Add a DynamicObject::downcast method

Would you like to work on this feature?
No response
What problem are you trying to solve?
When dealing with AdmissionReview types we have to deal with DynamicObject inputs and do a manual dance to convert a DynamicObject into one (or more) of the types we created the admission controller for.
I would like to have a quick method to try to convert the input object into one of the actual types.
Describe the solution you'd like
A method or trait impl on DynamicObject to try to convert the DynamicObject into a K.
I don't rust allows an impl<K: Resource> TryFrom<DynamicObject> for K so something like:

DynamicObject::try_parse(self) -> Result<K>
DynamicObject::downcast(self) -> Result<K>

with some new small error type for the operation.
Describe alternatives you've considered
Trying to parse the DynamicObject::data into a PodSpec, and copying over DynamicObject::types and DynamicObject::metadata into a `Pod.
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-core

Can I work on this?

Sure, go for it!

I have not been able to find a good way to convert DynamicObject to K: Resource. I have attempted to use a serde based approach serializing the data in DynamicObject and then deserializing into  K but this requires K to implement the Deserialize trait. I ran into a  few issues here with lifetimes but I think I can get it to work if the Deserialize trait is an acceptable requirement to place on K.
I also tried to downcast using std::any::Any which of course didn't work, as there is no relation between DynamicObject and K except for the shared Resource trait, at least to my knowledge.
Do you have any other ideas for approaching this?

hm, yeah, I can see that being awkward. Having Serialize and Deserialize requirement on K is not a big deal imo, it's generally always there. That said, you might avoid serialize by taking a shortcut;

take the data field
extend it with types + metadata
pass this single serde_json::Value (with all properties) through serde_json::from_value into K

I think that should work, and would be ok.

Awesome thanks :+1:

@clux did I miss something on this issue or is it ready to be closed? :)

Ah, forgot to link it. Thanks!


Abnormally high resource usage and slow builds

I'm noticing high CPU and RAM usage when building using version >0.5.3.
I've tested most versions from 0.5.1-0.5.8 (latest) and 0.5.2/0.5.3 seem to be the fastest, with version 0.5.1 being a close second.
Each time after I get the last "Image at xxx optimized in yyyms", I get a "Completed in xx." and then the CPU spikes. No transformed images are written to the build dir at that point, This last "step" takes much more time than the rest of the build when in finishes. Emphasis on when because I've had to forcibly terminate the build a couple of times. Using versions above 0.5.5 (I think) dramatically worsens the effect.
On the latest version, this last "step" pushes my CPU to 100% and I've noticed it take as much as 9.5GB of RAM. (For reference I have a desktop computer with a 6 core/12 thread i7 8700K and 16GBs of RAM). Initially I thought it was an issue with Windows so I rebooted to my Linux install and tried it there.... It crashed my desktop environment and I got kicked back to the login screen.
Something of note, later versions also throw an error only on Windows when building basically anything else apart from avif files. I don't know if these are caused by the same issue (earlier versions are ok).
I'd also like to note what I'm trying to do:
I am working on a blog website that uses wordpress as a CMS. I'm currently only using the Picture component passing the src attribute as a URL. The blog currently has <50 images.

Thank you for reporting the issue @skourismanolis ! I would like to ask you a few questions :

Is this problem specific to build only? Or, do you face similar issues in dev mode too?
Do you see less RAM usage on Windows or were you able to successfully build in Linux using v0.5.3?

Build mode seems fine
I haven't tried bulding on Linux but I'm using Netlify and it built successfully, so I suppose it's a general issue.

I can try to make an example setup demonstrating the bug should that be required.
Thanks a lot for your care and time, I really like astro-imagetools it's super useful for optimizing speed and SEO, and I plan on using it in production for this small blog website I'm working on!

Thank you @skourismanolis, an example setup will really help to investigate the issue.

I created this repo to explore and demonstrate the issue astro-imagetools-example. It's using the astro blog starter, with modifications in src/pages/index.astro.  I tried to simply display a single image from imgur multiple times but the build worked perfectly.
However with experimentation I've found the following:

High resource usage still happens on 0.5.3, although it's not as bad as on 0.5.8. Builds actually finish
Once a build finishes in 0.5.3, subsequent builds are very fast and the same effect is not observed. I suppose you're implementing some sort of cache.
The problem seems to appear (or worsen) when having images with a large total size. This example fetches 64 images but by using Array.slice() I managed to reproduce the problem on much smaller counts of images.
On windows, build fails on >=0.5.4 with Input file is missing error.
I used gitpod to make this example, on 0.5.3 - 0.5.6 the first build finishes on ~160s while subsequent builds finish in ~5s. On 0.5.7 and 0.5.8 it never finishes. Here's a gitpod snapshot.

I changed versions on gitpod with:
rm -rf node_modules
yarn add astro-imagetools@version
yarn build

While on my windows pc I just removed node_modules/.cache since deleting and reinstalling the whole node_modules folder took a lot of time.

Thank you for your efforts @skourismanolis and especially thanks for using GitPod. It'll help a lot to investigate the issue.

On windows, build fails on >=0.5.4 with Input file is missing error.

It's very odd! Can you confirm if sharp is being installed correctly?

It's very odd! Can you confirm if sharp is being installed correctly?

I saw sharp mentioned on yarn install's 'Building fresh packages' with no errors. I also have a sharp folder in my node_modules.
I made a new project, installed sharp and did a console.log(sharp.versions) which run successfully.  Do I need to anything else to verify ?

No, it's enough information @skourismanolis. Thank you @skourismanolis.

I'm also seeing Input file is missing from sharp during the generating static routes part of a build.  I'm using astro 1.0.0-beta.24, and astro-imagetools 0.6.3.  I have my images in /public, if that matters.

OK, I think I traced mine down to markdown files being processed, which included images like:
![Screenshot of editing an Unsafe Route](/images/docs/unsafe_routes.png)

Which is sent to sharp as .//images/docs/unsafe_routes.png

I think one of the reasons the build is slow is that there are 240 .avif files being written to disk, which apparently is pretty slow with sharp: https://github.com/lovell/sharp/issues/2597
If I change the format in the example repo to just 'jpg', the build completes in 50.94s, after writing 316 image files to the /dist/assets folder.
I'm not sure there's much more that can be done in this package to improve this, other than to find another tool that is faster than sharp, which would be a pretty major change.

Good catch @IanVS ! I ran a few tests on GitPod and here are the results:

jpg- it took 8s to generate jpg image for all the 240 images
png- it took 11s to generate png image for all the 240 images
webp- it took 15s to generate webp image for all the 240 images
avif- it took 179s to generate jpg image for all the 240 images

Oops. Sorry @skourismanolis, I didn't see that you have locked astro-imagetools to 0.5.3. I upgraded it to 0.6.8 and now the build is failing. I am getting an error Processed image is too large for the WebP format after 1/2 minutes, and then after 15/20 seconds the build is failing with exit code 137. That means it ran out of memory. But I don't know why it's throwing the error Processed image is too large for the WebP format.

After upgrading to<EMAIL_ADDRESS>and running the same tests on GitPod:

jpg- it took 59s to generate jpg image for all the 240 images
png- it took 86s to generate png image for all the 240 images
webp- took a long time and then exited with error code 1 saying Processed image is too large for the WebP format
avif- took a long time and then exited with error code 137

I am confirming that this issue starts from 0.5.7.

@skourismanolis a fix for the regression has been merged and released in 0.6.9.
After upgrading to<EMAIL_ADDRESS>and running the same tests on GitPod:

jpg- it took 9s to generate jpg images for all the 240 images
png- it took 13s to generate png images for all the 240 images
webp- it took 20s to generate webp images for all the 240 images
avif- it took 204s to generate jpg images for all the 240 images

I just got bitten by this (converting an existing blog).
Disabling avif solved the issue.
Would it be acceptable to disable by default in format ? (["webp"])
Since it is known to be 10x slower than other conversions, it would be a much nicer experience for newcomers like me :smile:


Color palette issue

Hi,
It seems that most colors are well translated from "normal text" to "hex format", apart for black and white : when typing "white" in the "Trait color" input, the color becomes black, and when typing "black", the color becomes white.
Best,
V

This is actually the correct behaviour. The colors are inverted when switching from light to dark mode and vice versa. Hence if you choose a color  lets say "red" in light theme then it will show actual red color but when switching to dark theme, it will  get updated to lighter version of red so its feasable for dark theme.  Functionality wise the behaviour is correct but UI wise it can create confusion as you mentioned specially for white/black its noticeable. We will check on how we can make this better.