bug with invalid redir

This host lacks a Location: in this redir  -- a not unusual thing on the Internets:
$ curl -D /dev/tty https://www.enterprisecarshare.com/robots.txt
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html;charset=UTF-8
Dispatcher: dispatcher 1d
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Length: 0
Cache-Control: max-age=168018
Expires: Tue, 15 Nov 2016 02:30:09 GMT
Date: Sun, 13 Nov 2016 03:49:51 GMT
Connection: keep-alive

I updated to 1.1.0, and if there's allow_redirects=True the code now calls yarl.URL(None) which throws
 TypeError: Constructor parameter should be str

which is not so super-useful to the programmer! May I suggest instead looking to see if we're about to pass None into yarl.URL and in this case raise ValueError(url + ' is a redirect but lacks a Location: or URI: header')
$ python bug.py
Traceback (most recent call last):
  File "bug.py", line 11, in <module>
    loop.run_until_complete(main(url))
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "bug.py", line 6, in main
    async with session.get(url, allow_redirects=True) as response:
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/client.py", line 558, in __aenter__
    self._resp = yield from self._coro
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/client.py", line 245, in _request
    resp.headers.get(hdrs.URI))
  File "/home/lindahl/.pyenv/versions/3.5.2/lib/python3.5/site-packages/yarl/__init__.py", line 150, in __init__
    raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str

$ more bug.py
import asyncio
import aiohttp

async def main(url):
    async with aiohttp.ClientSession() as session:
        async with session.get(url, allow_redirects=True) as response:
            await response.read()

url = 'https://www.enterprisecarshare.com/robots.txt'
loop = asyncio.get_event_loop()
loop.run_until_complete(main(url))

Makes sense.
Would you make a Pull Request?

Fixed by
Now it raises RuntimeError with text like 'GET http://<IP_ADDRESS>:56346/redirect returns a redirect [301] status but response lacks a Location or URI HTTP header'.
Exception type is RuntimeError because ValueError is about wrong value passed to function  but for this case real error source is a server answer.
@wumpus is error text looks good and informative enough?

Thank you, that looks perfect.
(Thanks for the test example, I haven't gotten through the learning curve of your test suite yet)

The test suite is based on pytest tool with adding several pytest fixtures and hooks.
It's described by http://aiohttp.readthedocs.io/en/stable/testing.html but I pretty sure the chapter is not perfect. It needs a love for polishing.
Please make a Pull Request (or just an issue) with proposal for solving dark documentation's corners.
I really need feedbacks for documentation.
Maybe somebody will become an awesome docs writer for the project but now it's just a dream.


[assignee_no_login] KeyError: 'triage_owner_detail'

2023-03-20 12:16:30,403 - ERROR - Tool assignee_no_login
Traceback (most recent call last):
  File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 839, in run
    self.send_email(date=date)
  File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 762, in send_email
    data = self.get_email_data(date)
  File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 680, in get_email_data
    bugs = self.get_bugs(date=date)
  File "/home/rm_bot/relman-auto-nag/auto_nag/scripts/assignee_no_login.py", line 59, in get_bugs
    bugs = super().get_bugs(*args, **kwargs)
  File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 454, in get_bugs
    timeout=self.get_config("bz_query_timeout"),
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 176, in wait
    self.wait_bugs()
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 187, in wait_bugs
    r.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/sessions.py", line 653, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/bugzilla.py", line 552, in __bugs_cb
    self.bughandler.handle(bug)
  File "/home/rm_bot/relman-auto-nag/venv/lib/python3.7/site-packages/libmozdata/handler.py", line 15, in handle
    self.handler(*args)
  File "/home/rm_bot/relman-auto-nag/auto_nag/bzcleaner.py", line 342, in bughandler
    if self.handle_bug(bug, data) is None:
  File "/home/rm_bot/relman-auto-nag/auto_nag/scripts/assignee_no_login.py", line 130, in handle_bug
    bug["triage_owner_detail"]
KeyError: 'triage_owner_detail'

The tool fails on the following bug because the Untriaged component does not have a  triage owner:
{
  "groups": [],
  "keywords": [],
  "triage_owner": "",
  "severity": "--",
  "flags": [],
  "summary": "Add an early return mechanism to line handling in ProcessExecutionMixin",
  "id": 1820139,
  "priority": "--",
  "product": "Firefox",
  "component": "Untriaged",
  "assigned_to"<EMAIL_ADDRESS>  "assigned_to_detail": {
    "nick": "arthur.carcano",
    "name"<EMAIL_ADDRESS>    "email"<EMAIL_ADDRESS>    "id": 713459,
    "real_name": "Arthur Carcano"
  }
}

The tool fails on the following bug because the Untriaged component does not have a triage owner

Currently, the same is true for the Core::Web Speech component.


Update dependencies to latest versions

(By running 'cargo outdated')
This shouldn't break (or fix) anything, but it makes
the crate friendlier to consume for other crates using
latest libraries.
For example, other crates might want to compare ApiErrors
via nix::errno::Errno (where they are using latest nix)

If cargo check came back clean then it's probably fine. I'll wait for the CI to run also :)


Add --allow-dup-ids flag

I'm not sure about wording but it should fix #20
Also, there are 2 falling tests and I can't figure out what Alcotest expects: strings are almost identical but due to weird terminal output I'm not sure why Alcotest doesn't accept expected result.

Thanks a lot!
The tests can be fixed like this:
  let dupWithoutFlagError = "Error: duplicate message id: test3.msg1.1\n";

  let testExtractDupWithoutFlagError = () =>
    checkRes("test/test3/Test_1_1.re test/test3/Test_1_2.re", ("", dupWithoutFlagError));

  let dupWithDifferentDefaultMessageError = "Error: duplicate message id: test3.msg1.1 with different default messages\n";

  let testExtractDupWithDifferentDefaultMessageError = () =>
    checkRes(
      "--allow-dup-ids test/test3/Test_1_1.re test/test3/Test_1_2.re test/test3/Test_1_3.re",
      ("", dupWithDifferentDefaultMessageError),
    );

Maybe the wording should rather be --allow-duplicates?

This is way better wording indeed. Done.

Could you run yarn format on your code? The project's format settings are for a line width of 120 characters, not the default 80.

Sure, done. Occasionally, bump into this lol


Check npm dependencies for build warnings

Currently, the build outputs some warnings that should be examined:
npm WARN deprecated<EMAIL_ADDRESS>cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated<EMAIL_ADDRESS>to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Jade is tricky one because they haven't had final 2.x release yet.

@michaelkleinhenz can you please check this and post any warnings you are still getting. I have cleared a lot of them.

@michaelkleinhenz can you please confirm?

I still get some warnings:
npm WARN deprecated<EMAIL_ADDRESS>cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated<EMAIL_ADDRESS>This package is discontinued. Use<EMAIL_ADDRESS>npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g

last two are new. I don't know how severe that is. Maybe these are just integration warnings between 3rd party dependencies.
I also get a warning in the prostinstall of Patternfly:
><EMAIL_ADDRESS>install /home/kleinhenz/RedHat/almighty-ui/node_modules/patternfly/node_modules/patternfly-bootstrap-treeview
> bower install

sh: bower: Command not found.

Looks like a missing dependency of bower in Patternfly's package.json. They might consider bower a global prerequisite.
Also, at the end of the build there are some warning from codelyzer:
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.

These should be low impact, though.

cross-spawn-async comes with ghooks which seems not to be used in project (see https://github.com/almighty/almighty-ui/issues/145), there is new version of ghooks so upgrade might help
lodash-node comes with karma-htmlfile-reporter, upgrade to latest version helps
problem with patternfly-bootstrap-treeview is fixed in newer versions of patternfly
warnings by codelyzer should disappear when we upgrade to Angular 2.1 (https://github.com/almighty/almighty-ui/issues/175)


⚠ Processors has degraded performance

In b6cd3b1, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 61 ms

Resolved: Processors performance has improved in 096a9e9.


what is the default value of d_coef if not specificed? (for prodigy optimizer)

sorry if this is a dumb question but i cant find an answer online

@Hugs288 No worries -- the source code for the optimiser is available on GitHub: https://github.com/konstmish/prodigy
The specific lines that show all the default initialisation values are here: https://github.com/konstmish/prodigy/blob/009a7156779ae213c0bc13b4c2fe5a93fca00c15/prodigyopt/prodigy.py#L59-L65
For d_coef, the default value is 1.0.

Thank you.


Feat: refresh left menu

Description
Fixes #951
Notes (out of scope, known issues, hints for reviewing code, ...)  (optional)
...
Test cases
Group use cases

[ ] Case 1: edit group

Given I am the usual user
When I go to this group edit page
And I change the group name and save (throttle network if you want)
Then I see the group nav is refreshed after a while, the group name is updated in the nav

[ ] Case 2: add subgroup then remove subgroup

Given I am the usual user
When I go to this group edit page
And I create the subgroup "RefreshNavDemo" (throttle network if you want)
Then I see the group nav is refreshed after a while, "RefreshNavDemo" is added in current group children in the nav
And I click on "sub group" tab and remove "RefreshNavDemo" from the sub-groups list
Then I see the group nav is refreshed after a while, "RefreshNavDemo" is removed from current group children in the nav

[ ] Case 3:

Given I am the usual user
When I go to this group edit page
And I create the subgroup "RefreshNavDemo" (throttle network if you want)
Then I see the group nav is refreshed after a while, "RefreshNavDemo" is added in current group children in the nav
And I navigate to "RefreshNavDemo"
And I edit "RefreshNavDemo"
And I delete "RefreshNavDemo"
Then I see the nav is refreshed while I'm redirected to "My groups"

[ ] Case 4: Add group-at-root by code and leave it

Given I am the usual user
When I visit this group
And I copy the join code
And as demo user I visit my groups page
And I join the group by code
Then I see "Another" is added to the "my groups" list
And I click on "Another" group
And I leave the group
Then I see "Another" is removed from the left nav

[ ] Case 5: Leave not-at-root-group

Given I am the usual user
When I visit this group
And I copy the join code
And as demo user I visit my groups page
And I join the group by code
And I navigate to group "4LTDI1819" > "Sea"
And I leave the group
Then I see "Sea" is removed from the left nav

Item use cases

[ ] Case 1: not-at-root item (chapter)

Given I am the usual user
When I go to this item edit page
And I edit the title
And I save
Then the title is updated in the left nav
And I add a new content "Subtask 1" and save
Then the item "Subtask 1" appears in the left nav under "Thomas Tasks"
And I remote the item "Subtask 1" and save
Then the item "Subtask 1" is removed from the left nav

[ ] Case 1b: at-root item (task)

Given I am the usual user
When I go to this item edit page
And I edit the title and save
Then I see the title is updated in the left nav

[ ] Case 2: not-at-root skill

Given I am the usual user
this skill edit page
And I edit the title
And I save
Then the title is updated in the left nav
And I add a new content "Subskill 1" and save
Then the item "Subskill 1" appears in the left nav under "Thomas Tasks"
And I remote the item "Subskill 1" and save
Then the item "Subskill 1" is removed from the left nav

[ ] Case 2b: at-root skill

:warning: There's only one skill at the root, and it is uneditable.

Fixed by #1072


Why not use dataTaskPublisher

I see that you have Combine as a dependency in the HTTP module and yet you are not using URLSession#dataTaskPublisher(for:) and rely on callbacks. Would be awesome to have AnyPublisher<Value, Error> returned from HTTP#send

This sounds like a great idea. Could you create a PR?

Not sure why we import Combine there since it's not actually used. dataTaskPublished(for:) is iOS 13+ and macOS 10.15+ so we'd have to have the current send methods AND a publisher version.

Current minimum iOS version for this library is 13 and macOS 10.15 as far as I see.  So nothing is stopping from having just the Publisher version.

Oh, you were faster than me :)

Hmm, not sure why the Package is iOS 13+. I'm using it through private cocoapods release on iOS 12 too so for me removing the current send methods would strand me on the older versions 😆

@NeverwinterMoon we are planning to address this issue in the next couple of days. Could you maybe share a couple of examples of the desired API (e.g. return types, function calls) and docs related to Combine functionality that we'd use?

@maticzav Hi! Sorry for the delay reply.
Implementation
I'll show what I myself implemented really quickly when using your neat library.  Most probably you don't want to go this way and instead implement dataTaskPublisher. Example of this follows
func send<Type, TypeLock: GraphQLHttpOperation & Decodable>(
    _ selection: Selection<Type, TypeLock>
  ) -> AnyPublisher<Type, Error> {

/// Most probably, needs to be wrapped in Deferred (https://developer.apple.com/documentation/combine/deferred)
/// as Future will produce a result immediately when called (even if there is no subscriber)
/// in my case I never call this without a subscriber, so I didn't bother with Deferred
  Future<GraphQLResult<Type, TypeLock>, Error> { promise in
      send(selection, to: baseURL, headers: ["Authorization": "Bearer \(jwt)"]) { result in
        switch result {
          case .success(let result):
            promise(.success(result))

          case .failure(let error):
            promise(.failure(error))
        }
      }
    }
      .tryMap { result in
        result.data
      }
      .eraseToAnyPublisher()
  }

Here is how I see the implementation using dataTaskPublisher:
let configuration = URLSessionConfiguration.default
configuration.timeoutIntervalForRequest = 60
configuration.timeoutIntervalForResource = 120
configuration.waitsForConnectivity = true
configuration.httpMaximumConnectionsPerHost = 5
let session = URLSession(configuration: configuration)

guard let url = URL(string: "https://intotheunknown") else {
  throw APIError.invalidURL
}
let urlRequest = URLRequest(url: url)
/// urlRequest configuration

/// to validate expected response code, here we expect success only
let httpCodes: Range<Int> = 200..<300

let decoder: JSONDecoder = {
  let decoder = JSONDecoder()
  decoder.dateDecodingStrategy = .iso8601

  return decoder
}()

/// This tries to decode the result
session
  .dataTaskPublisher(for: request)
  .tryMap {
    guard let code = (output.response as? HTTPURLResponse)?.statusCode else {
      throw APIError.unexpectedResponse
    }

    guard httpCodes.contains(code) else {
      throw APIError.httpCode(code)
    }

    return output.data
  }
  .mapError {
    (($0 as NSError).userInfo[NSUnderlyingErrorKey] as? Failure) ?? $0
  }
  /// https://developer.apple.com/documentation/combine/fail/decode(type:decoder:)
  .decode(type: Value.self, decoder: decoder)
  .receive(on: DispatchQueue.main)
  .eraseToAnyPublisher()

Usage
Something like this:
let someMutation = Selection<(), Objects.Mutation> { ... }

send(someMutation)
      .print("GQL")
      .ignoreOutput()
      .sink(receiveCompletion: { _ in }, receiveValue: { _ in })
      .store(in: cancelBag)

Also, I am more than willing to give PR a whirl, if you still think it's a good idea.

I am going to close this issue since the new version heavily relies on Combine.
I think @NeverwinterMoon's answer can still help people using only the library's core, but we no longer make any assumptions on how you perform your URLRequest there.


make geom/Box immutable

also no need for MutablePoint I don't believe.

geom/Box is now immutable (case class), and MutablePoint is deprecated so we can remove it soon.


[10.x] Round milliseconds in database seeder console output runtime

Since https://github.com/laravel/framework/pull/43400 the runtime of console commands is rounded to the nearest millisecond. I noticed today that seeders still show their runtime with two decimals.
Before this PR:

After this PR:

@SjorsO why in migrations we does not have an empty space between the number and ms but for seeds we have?


generate a CLI

it might be nice to be able to generate a CLI from a swagger spec.
it could use the same syntax as httpie for specifying params in different positions.
Perhaps it can make use of pygments when present to colorize the output for a better experience.
The generator could also generate a bash and zsh completion document for better usability

it could use the same syntax as httpie for specifying params in different positions.
The generator could also generate a bash and zsh completion document for better usability

You could use gcli, a tool for generating the boilerplate code for the command-line interface. With gcli you can use the CLI framework that you like, but since you need bash-zsh autocompletion I suggest Cobra, because it has built-in support for generation of bash-zsh autocompletion; as a bonus Cobra has support for generating man pages too, which is a nice addition.

This would be terrifically useful!
A couple lessons learned from building some cli tools for APIs:

session file, so we can store session data for ease of use
Detect login endpoint so auth APIs are easy to use with the cli
Cross platform: portable cli binaries are very useful for testing an API

there is also this: https://github.com/tikalk/commandcar
obviously it's not go and not as semantically nice but it's an option to get a CLI right now

This is exactly why am using go-swagger. To make a CLI. It would be great to have a tool to fully generate CLIs.
@drewwells summarized it well.
For his second point, I would probably check for /user endpoint and /user/auth, /user/login.
Also maybe ask a few questions regarding this during generation. Like type of authentication, login endpoint...

This ticket is labeled with raspberry pi 3 bounty. Solve the ticket and I'll send you a pi

I think this is out of scope for the core go-swagger. But that would be a cool project using the go-swagger libs.

The operationId is a key property of an operation to provide short commands.

Reviving this thread back from the dead — I recently wanted to write a CLI for a service that has a Swagger spec and came up with the following proof of concept https://github.com/jsilland/go-swagger-cli. It's incredibly experimental and incomplete at this time but might be a good starting point for automatically generating Go CLIs. Please feel free to log issues there if you so please.
I've been successfully using the custom generator as a basis for the actual CLI, which implements the authentication flow and provisioning of the API client.

Reviving this thread O believe Swagger did solve this problem for us now: https://github.com/form3tech-oss/swagger-codegen
Thank me later.

I am working on this. It is partially working.
I am aware of the swagger-codegen's bash client generation: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/bash/README.md
I am using docker to test the cli functionality, and dockerctl (https://github.com/go-swagger/dockerctl) is a generated CLI for showcase. I will update this thread when more features are supported.

This comment tracks what is completed and what is missing in CLI implementation.

[x] allOf
[x] use config file for shared variables
[x] auto-completion. bash, zsh, powershell, fish.
[ ] add go-swagger flag to set generated executable name. Currently cmd/cli/main.go is used and is blocking go install xxx from working
[ ] more strfmt types
[ ] enum and its auto-completion
[ ] discriminators, base type and sub type. Currently generated CLI code does not compile.
[ ] validate params before sending request, and flag to disable validate


Add a periodic timer receiver

The current timer provided is very convenient to implement timers, but it's not very helpful to implement a peridic timer that doesn't accumulate drift.
This commit adds a util.PeriodicTimer that ensures that drift is not accumulated and that the receiver will be ready exactly after one interval has passed (not counting any delay introduced by the event loop being busy with another task).
It is also possible to control when this timer is started, and can be stopped and reset/restarted.
Fixes #78.

I'm marking this as a draft only because it is lacking tests, but it should be ready to review (I did some basic testing manually). I would like to get feedback before spending too much time with tests (as I would like to introduce also async-solipsism here).

Updated according to what we talked about. So now PeriodicTimer can have different behaviors when ticks are missed and can replace Timer, which I misunderstood how it worked. It is still a WIP but the implementation of the timer should be "finished" (I only need to review the docs). On some local tests it seems to work as expected.
I didn't include the datetime as we don't have any use cases for it yet and it is complex enough as it is, we can add it in the future if needed.
The tests are failing because of styling issues, it would be good if you can review it @sahas-subramanian-frequenz to see if you are good with it now so I can finish the docs, PR and removing Timer.

Fixed some bugs and added some tests. I need to add some more but I consider this almost done. Not ready for merging because of the above, but not a draft anymore either.

Since nobody looked at this yet, I'm converting to draft again because when doing more tests and using hypothesis to test better some cases, it become evident that using floats internally and doing modulo math and comparisons is very problematic in cases where values differ a lot in magnitude or significant digits, so I'm considering to use int internal representation (in ms or so).
I also don't like that delay_tolerance doesn't apply to every missed tick behavior, and that we need to handle every behavior in ready(), which is not scalable nor customizable, so I'll use classes to represent behaviors instead.
So a couple of major changes are coming.

Updated to implement this suggestion based on the comment from @sahas-subramanian-frequenz

True. Even more, with the skip and drift policy the timer isn't really periodic anymore, I think what we have now is a generic timer. So I propose to rename the class to Timer, make the missed_tick_policy a required argument and add shortcut constructors for the most common use cases: Timer.timeout(delay) that returns a timer with skip and drift and 0 tolerance and Timer.periodic(period, skip_missed_ticks=False), using trigger all or skip and resync policies as appropriate.

Also added a commit to update the release notes to prepare it for the next release.

I know, and me too. Thanks for pushing back!


./makehosts crashing on macOS

On macOS I'm getting this (below) for all data.
Updating source ./data/adaway.org from https://...
Error in updating source:  https://...
Updating source ./data/add.2o7Net from https://...
Error in updating source:  https://...
etc...

Testing I find it works great at 65f0421, so commit 2ff5dc2 looks to be the cause.

@gfyoung  ^^^

@StevenBlack : Can you replace the print statement with raise to see what the error is?  I don't have access to Mac, sorry :cry:

Also, I cannot reproduce that error either on Windows or Linux.

Are you sure that this is the commit that broke things?  I fail to see how that could have happened.

No worries @gfyoung. It's the one commit.
The path_join_robust() thing isn't ready on macOS.
I really liked get_defaults() piece which was nice, though unrelated to path_join_robust().
As of 26d73051 both get_defaults() and path_join_robust() are extracted.
I don't yet know how path_join_robust() was failing on macOS.  I just know reverting updateHostsFile.py to 65f04210c1 fixes the issue.
I'd love to see the get_defaults() piece re-submitted as a separate commit.

@StevenBlack : I actually know the error.  This patch is very quick.

OK!

@StevenBlack : PR is up.  Could you pull down the branch to see if everything works for you now?


Add tagging in git corresponding to PyPi package

Might have to add tagging in git as well, as it does now not reflect the same state in repo and PyPi
Originally posted by @christo-ph in https://github.com/quantorconsulting/mkdocs_build_plantuml/issues/32#issuecomment-1806320107

Considerations about versioning and GitHub action
The current GitHub action triggers on each push to the master/main branch. However, a challenge arises as not every commit equals a new release version for the PlantUML plugin. If the version number remains unchanged, the GitHub action fails since PyPi does not allow packages with identical versions. Commits, such as pipeline improvements or typo fixes, do not result in a new version number.
I propose three potential solutions:

Develop Branch Approach:

Create a "develop" branch for general updates.
Increase the version number when a new release is necessary.
Merge to master/main to trigger the action.

Ignore GitHub Action Failure:

Allow the GitHub action to fail with same version number als currently released package.
This won't impact the system negatively, as the package won't be re-released to PyPi with an existing version. However, checking the error message becomes crucial to check if the pipeline error is really because of the version number.

Dynamic Version Checking:

Find a way to check the current version number against the version on PyPi at the pipeline's start.
Determine whether the pipeline should proceed based on version changes.
Challenge: One has to remember that a release is only triggered when the version is changed correctly.

I believe any of these approaches could be a valid solution. However, having a dedicated "develop" branch for general development seems like the cleanest solution. A failed pipeline would accurately indicate that the version number wasn't increased when merging from develop to master/main. The PR process would involve merging or committing to develop, consider whether a release is needed and if it is merge with a new version number to master/main.
Feel free to give feedback on these solutions or any alternative suggestions.

A comment directly connected to the issue (Adding git tag when releasing on PyPi). The latest release tag (1.9.0) has still to be done manually as the upcoming pipeline PR will not check for already released package versions.

I have the change ready to open a PR. Depends on you whether the target will be a "develop" branch or master :)

I suppose git tagging is not that crucial to introduce some gitflow and a develop branch. So it would be fine for me to go with version 2.

That't true. I will open the PR. I've tested it on my fork. Since I do not increase the version number in the PR the action should fail with a version number related PyPi error.


Update README.md with new Domain name

@alexander0042  - so far so good.
It actually fixed hte issues I had  - so I decided to share it :)


inputClass prop is not assigned to the input el

<datepicker inputClass="form-control" v-model="bookingDate"></datepicker>
It's assigning  a "NaN" value to the wrapper class...
<div class="datepicker" inputclass="NaN"><input type="text" readonly="readonly">....

you need to make html attributes hyphenated:
<datepicker input-class="form-control" v-model="bookingDate"></datepicker>

Thank you (Y)

It would be really helpful if this is mentioned in the documentation. Thanks again for the help 👍

It's not specific to this component - it's the way Vue works.

I just started exploring Vue, good to know. Sorry about that.


Catch JSON parsing errors

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: chrismwendt sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

I can't seem to sign the CLA. Any ideas?

Oh, it might not be set up for this repository yet

That is strange. Need to look into this. I have no idea since CLA is enabled automatically.
Does this link work for you? https://cla.opensource.microsoft.com/microsoft/vscode-lsif-extension?pullRequest=14

Or https://cla.opensource.microsoft.com/microsoft/vscode-lsif-extension

I merged the PR by hand. But we should try to find out why you can't sign the CLA


Release OpenSearch Simple Schema

The OpenSearch Simple Schema (OS3) is an open source specification. The goal of OS3 is to enable and encourage users of OpenSearch to normalize their event data, so that they can better analyze, visualize, and correlate the data represented in their events.
In this docs, we want to elaborate the fields required by the OpenSearch "Observability" product. We have the tenets to compatibility with ECS and OpenTelemetry at this stage, so when defining the fields in OS3, we follow the principle
1.1.Requirement

Compatibility. To enable customer smoothly migrate OpenSearch, OS3 should compatible with ECS and OpenTelemetry. Currently, OpenSearch doesn’t have much control over variety ingestion client, e.g. Beats*, Logstash.
Public Visibility. As the open source specification, the OS3 should be published into community.

1.2.Key Concepts

Core Field: Fields that are most common across all use cases are defined as core fields.
Extended Field: Any field that is not a core field is defined as an extended field.
Custom Fields: To avoid the conflict with OS3 fields, users should follow the best practices to define the custom fields.

Where can I find more  information about "OpenSearch Simple Schema (OS3)"?
You want to insert traces, logs, and metrics compatible to OpenTelemetry. How should metrics be ingested into OpenSearch? Are you planning to have an OpenTelemetry exporter for OpenSearch? As far as I could see, there is no support to directly insert OTEL format into OpenSearch on the roadmap ....

Any updates on this?


Configurable replacement scope for Continuation.workflow(..., forkBehavior = ForkBehavior.Replace) continuations

Current situation
When a workflow is replaced by returning a continuation with forkBehavior set to ForkBehavior.Replace, the workflow engine removes the old workflow state as well as all old steps. The only elements that aren't removed, are jobs and continuation records.
This behavior might at least be surprising or even problematic if jobs are relying on the "original" workflow model.
Proposed solution

WorkflowContinuation should be extend with an optional replacementScope
The property states which workflow objects belonging to the old workflow should be replaced/removed
The WorkflowService.removeSilently function accepts this as a parameter and only removes the specified workflow elements

Relates to #10.

@masinger
What should be the new default value of the replacement scope? Or should the user be forced to pass a replacement scope when using the replace fork behaviour for a workflow continuation?
See my draft PR #141
There I set the default value to empty (and only the workflow itself is deleted).

@bobmazy Sorry for the late reply - I seem to have missed the Github notification(s).
Having a now empty replacement scope would be a breaking change when compared to the previous behavior of deleting steps and jobs. Normally I would suggest that the default should remain being [Step, Job] in order to avoid having a breaking change, that might go unnoticed (as it is only a breaking change in behavior and not noticeable during compilation). But on the other hand, having and empty default is the far more reasonable option.
All points considered, I would suggest going with an empty default because this is the "more correct" default and there are not a lot of dependent project that might be affected by the breaking change. Additionally FluxFlow's API is still be considered unstable (0.X.X) and allows us to have breaking changes.


PRs on language repositories.

Hi, I've had a PR on strider-python open for nearly a year. It's pretty simple, but seems that the repo may be unmaintained? Thought I'd see if poking the main repo might gain some traction, apologies if not.
https://github.com/Strider-CD/strider-python/pull/12

Will release a new version tomorrow.

Thanks for the ping.


Add go 1.11beta3

🎉
https://golang.org/dl/#unstable

@toshi0607 superb :tada: https://github.com/syndbg/goenv/releases/tag/1.18.0 released


docs: Update the Shared Tree roadmap

This PR brings the Shared Tree roadmap up to date with the project. It is intended for high-level consumption and thus contains quick (and possibly nit-pickable) explanations of the incoming feature set.
For reviewers:
The top priority for this document is clarity and pedagogy, and deeper explanations should be included via links to specialized documents. I'd like feedback on clarity, major issues in accuracy, and grammatical errors.

@CraigMacomber if you think the doc should have a section on schema migration let me know.


Accurate player list

Please use into_entities on the query. And to get the count, use the Vec's length. And for displaying, use the first 5 entries or only show top few players. Since with more players it'd definitely become a mess. You can loop over the Vec<usize> where usize is the Entity Id. Just do state.universe.get::<PlayerIdentity>(entity) and collect it.

Done! Thanks for the feedback, let me know if there’s anything else to adjust!

Please merge the main branch with your branch so these clippy warnings go away! Sorry!


RAM Footprint

Being a minimalistic immediate mode UI, I can't understand why 30 Mb of Private RAM usage is being measured on windows with ProcessHacker.
I noted that SDL2 calls opengl, but I don't think that this is the reason here.
The editor "exi/lite" is about 8 Mb under the same conditions.
I would expect a footprint if the range of some kb.

Not only SDL but there are GL calls here and there in the demo program.
If you closely see, the demo program first initializes SDL which allocates some space on the heap. Then moving on there's SDL_CreateWindow(...), SDL_GL_CreateContext(...), and some GL functions which individually allocates several amount of space. and they never get free'd by the program itself. Although the kernel will free the space automatically, there can be a situation where allocated space may swap out.
I'm unsure about Windows internals and the meaning of private bytes. If it means dynamic memory, ProcessHacker perhaps also reports leaked memory that the demo program creates.
I've patched the memory leak issues with SDL, and one other. It does satisfy sanitizer but valgrind still complains about memory leaks. Currently don't have enough time, but a deep look will reveal it. Here's the patch file: https://pastebin.com/SWUMNJ6q

Microui uses about 264~kb, checked it.

Is 'lite' setting up a different kind of GL context with less memory footprint?

No, OpenGL isn't a user level software. The memory usage is from SDL.
If you take a look in example, particularly here, you can see that in the demo SDL is initializing all its subsystem, which individually allocates memory. For example, the demo only needs video and a few basic contexts from SDL but it's initializing other contexts too, (e.g. an audio context).
See: https://github.com/libsdl-org/SDL/blob/efaa58732abb3faf3900b2d93a166b955fbd8ed0/include/SDL.h#L82
Even if you only initialize the video subsystem, I don't think memory footprint will be under some KiB.

Hi again,
So, I have tried today to reduce the SDL subsystems to match with the "lite" that I am comparing with.
I just got a reduction from 30 to 29 Mb of RAM usage.
https://github.com/rxi/lite/blob/38bd9b3326c02e43f244623f97a622b11f074415/src/main.c#L71
  //SDL_Init(SDL_INIT_EVERYTHING);
  SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);

Then I thought that probably lite is not using opengl at all, but actually SDL with gdi.
But this test will take some more time, since the microui example is using all GL calls.
  //window = SDL_CreateWindow( NULL,  SDL_WINDOWPOS_UNDEFINED,  SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL);
  window = SDL_CreateWindow( NULL,  SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,  width, height, SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_HIDDEN);

Is there any working example on how to use microui with GDI for normal desktop applications ?

I'm not sure about it. Lite seems to only uses SDL for handling every graphics context and SDL under the hood uses OpenGL and GDI (Graphics Device Interface on Windows).
I don't think GDI is the main reason of being "lightweight" on memory. GDI is a legacy component in Windows, mainly used for 2D graphics. But again, I'm not sure how process hacker counts "Private Bytes" in this context.
What's the memory usage in task manager of that application? Is that exactly same as "Private Bytes"?

yes, gdi is legacy, but legacy-support also means high-portability, and that its associated libraries are preloaded by the OS.
However, I have the un-expert theory that opengl interaction with graphics cards requires more buffering of textures, context and scenes, that are not required with GDI. So far, I have seen almost all smallest possible apps with opengl to take 28Mb of Ram as a bare start.
I wonder if one could use microui with the bare canvas drawings of a gdi, direct2d or whatever, or is it just fixed to ogl?


[🔨settings]: settings that are inherited from Base Setting class need refactoring

TODO: rereview
@ala-n


How to use Template literals with dynamic import?

How to use Template literals with dynamic import?
 const Component = dynamic(import(/components/${kindOf}))
In console i have error
Module build failed: TypeError ... Cannot read property '0' of undefined

You can't do truly dynamic imports. Webpack can't predict the outcome and prebundle.

@timneutkens This is not true. Webpack can handle dynamic imports where part of the path is static. From the docs:

Every module that could potentially be requested on an import() call is included. For example, import(./locale/${language}.json) will cause every .json file in the ./locale directory to be bundled into the new chunk. At run time, when the variable language has been computed, any file like english.json or german.json will be available for consumption.

This error is specifically a deficiency in next/babel, where only static strings are handled but not template literals (which are of a different AST node type). Another unrelated aspect is that all import()s are transformed, even those not wrapped in a call to dynamic() – which is problematic for non-component dynamic imports.

Lets re-open the issue then.

Would really love to see this get support added.

This error is specifically a deficiency in next/babel

@herrstucki You mean because of the handle-import babel plugin?

@vjpr yes, this line fails with a template literal: https://github.com/zeit/next.js/blob/4881cd346b8155314c02a6996538fb48d324111d/server/build/babel/plugins/handle-import.js#L57

@herrstucki is there any solution for this problem?

I'd just like to add that this is especially useful when trying to internationalize an app since it allows us to split up imports from moment and react-intl.
For reference: https://github.com/yahoo/react-intl/issues/777#issuecomment-270134176

Fixed in #4639


ModuleNotFoundError: No module named 'chardet'

This happens when downloading/cloning by myself as well as with the Applio Installer.

is_half:True, device:cuda:0
Traceback (most recent call last):
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client_reqrep.py", line 70, in
import cchardet as chardet
ModuleNotFoundError: No module named 'cchardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\infer-web.py", line 63, in
import tabs.tts as tts
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\tabs\tts.py", line 22, in
import edge_tts
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\runtime\lib\site-packages\edge_tts_init_.py", line 6, in
from .communicate import Communicate
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\runtime\lib\site-packages\edge_tts\communicate.py", line 26, in
import aiohttp
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp_init_.py", line 6, in
from .client import (
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client.py", line 58, in
from .client_reqrep import (
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client_reqrep.py", line 72, in
import chardet  # type: ignore
ModuleNotFoundError: No module named 'chardet'

https://docs.applio.org/faq/no-module/

This happens when downloading/cloning by myself as well as with the Applio Installer.

is_half:True, device:cuda:0
Traceback (most recent call last):
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client_reqrep.py", line 70, in
import cchardet as chardet
ModuleNotFoundError: No module named 'cchardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\infer-web.py", line 63, in
import tabs.tts as tts
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\tabs\tts.py", line 22, in
import edge_tts
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\runtime\lib\site-packages\edge_tts__init__.py", line 6, in
from .communicate import Communicate
File "C:\Users\UserX\Desktop\Applio-RVC-Fork\Applio-RVC-Fork\runtime\lib\site-packages\edge_tts\communicate.py", line 26, in
import aiohttp
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp__init__.py", line 6, in
from .client import (
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client.py", line 58, in
from .client_reqrep import (
File "C:\Users\UserX\AppData\Roaming\Python\Python39\site-packages\aiohttp\client_reqrep.py", line 72, in
import chardet  # type: ignore
ModuleNotFoundError: No module named 'chardet'

https://docs.applio.org/faq/no-module/

https://docs.applio.org/faq/no-module/

Unfortunately this isn't working. Uninstalling/Installing 'chardet' works, however due to buildtools imcompatibility 'cchardet' isn't installing.


Due to CN API changes, the genshin notes cannot be parsed appropriately

Code
class Expedition(APIModel):
    """Real-Time note expedition."""

    character: ExpeditionCharacter = Aliased("avatar_side_icon")

Before
avatar_side_icon: ...character_side_icon/UI_AvatarIcon_Side_Keqing.png
After
avatar_side_icon: .../item_avatar_side_icon_u976ve/debbebbdadkadjkjk.png
What is actually happening?
pydantic.error_wrappers.ValidationError: 5 validation errors for Notes
expeditions -> 0 -> character -> __root__
  Character data incomplete (type=value_error)
expeditions -> 1 -> character -> __root__
  Character data incomplete (type=value_error)
expeditions -> 2 -> character -> __root__
  Character data incomplete (type=value_error)
expeditions -> 3 -> character -> __root__
  Character data incomplete (type=value_error)
expeditions -> 4 -> character -> __root__
  Character data incomplete (type=value_error)

Temp fix
character: str = Aliased("avatar_side_icon")

Removed ExpeditionCharacter. Really unfortunate.


DRAFT - [FIZZ-80] Load User File

Early draft, establishing the command line user interface with complete set of tests.
Other than the password, I'm not sure that it makes sense to set any of these values with environment variables. Thoughts?

I like the idea of trying out ConfigArgParse.  Drop in replacement for argparse that adds automatic environment variable and config file support in addition to command line parameters.

I like the idea of trying out ConfigArgParse. Drop in replacement for argparse that adds automatic environment variable and config file support in addition to command line parameters.

Definitely looks interesting. Not one of the options I came across in my limited searching yesterday. Most recent release was April - somewhat active project. Large number of issues. But I'm guessing a lot of these are edge cases. It is worth checking out.


Refactor API endpoints to use UUIDs

API endpoints updated to use UUIDs for ID params (claims, defendants etc).

please see merged version of this branch


json data security

HI @ericallam
It seems that json data is being stored on the server.
Can I use it without saving it on the server?

Hi @kkange, it is true that the data is stored on the server. We use Cloudflare Workers as the host and Workers KV as the storage for either the raw JSON contents or the URL you submit. There is currently no way to use it without storing data on the server (at the moment). If you want to use it currently with sensitive data, the best way would be to run it yourself. I need to flesh out the docs for this as it's pretty sparse at the moment but should come soon. I'll leave this issue open for others that are curious about this as well.

Can this issue's title be renamed to improve it's semantic qualities/discoverability (SEO)? Perhaps something like "Support offline-only/local operation (prevent upload of data)"?
Doing so might also help prevent duplicate issues.


[r11.0.0rc5] Cannot migrate Keystone database schema

Within the r11.0.0rc5 tag, the RPC-QE team is unable to complete a greenfield rpc-openstack installation. The failure occurs during the Keystone database synchronization because of duplicate, versioned scripts present in the pip package that was retrieved earlier in the installation.
The OSAD SHA that's pulled incorrectly builds the pip repo URL. Not only is the openstack-release variable set to master instead of 11.0.x, but the base of the address is that of the deployment's internal LB VIP. This is corrected within OSAD's 11.0.3 tag.
Within the 11.0.3 tag, the openstack-release variable is properly set to 11.0.3 and the pip repo URL is correctly based off of a potential upstream one.
Can the SHA be moved up to accommodate these fixes? One thing to note is the addition of a os-ansible-deployment/etc/openstack_deploy/user_group_vars.yml file. As a side note, the RPC-QE team's automation already accommodates this configuration change.

This sounds reasonable. Is the SHA of the 11.0.3 tag enough to accommodate your needs?

Yeah, 11.0.3's SHA would be good.

Released in rc6


i wanted to demand rss

but you already had it. nice.

Haha thanks! Open more issues with ideas for me :)


Update font family of cookie banner

Pull Request
What does this PR do?
Target the cookie banner & update its font-family

bors merge


[GSoC] yolov5-blazeface notebook updated with explanations.

This pull request is made for the partial fulfilment of the GSOC prerequisite task. The yolov5-blaze face notebook was updated with explanations and some modifications. I have tried my best to meet the community guidelines.

Thank you for your contribution. Before we do the review please do the self-check first (copy the list and tick the item when it's done):

[ ] each function is described by docstrings and type hints
[ ] notebook contains explicit descriptions and explanatory diagrams
[ ] the notebook doesn't use any data (image, video, etc.) that is not CC4.0 licensed
[ ] there is a README.md file in consistent style (look at other notebooks)
[ ] the notebook is added to the main README
[ ] there are no grammar, punctuation or typo issues (use any free tool for that e.g. Grammarly)
[ ] there are no committed files besides notebook and readme (please use images or videos from data dir)
[ ] your PR doesn't change any other notebooks
[ ] all CI checks passed

Hello, thank you for the response. I have ensured that all of the criteria are met. However, in the CI check, docker_treon/build_docker is cancelled after 360 mins of trying. What might be the reason for that?
[ ] -  each function is described by docstrings and type hints (Done)
[ ] -  notebook contains explicit descriptions and explanatory diagrams (Done)
[ ] -  the notebook doesn't use any data (image, video, etc.) that is not CC4.0 licensed (Done)
[ ] -  there is a README.md file in consistent style (look at other notebooks) (Done)
[ ] -  the notebook is added to the main README (Done)
[ ] -  there are no grammar, punctuation or typo issues (use any free tool for that e.g. Grammarly) (Done)
[ ] -  there are no committed files besides notebook and readme (please use images or videos from data dir) (Done)
[ ] -  your PR doesn't change any other notebooks (Done)
[ ] -  all CI checks passed (The docker_treon check is cancelled)

Please verify your PR. It doesn't contain any new notebook. Update this PR, and don't create a new one if you already provided this URL in your GSoC application. Please do it ASAP, as the deadline has passed.

The test case for my new notebook is passed. However, the test case seems to fail in this step. I haven't added any new notebooks or changed anything in my fork of the repo besides my own notebook (205-vision_background_removal).
The error log was as follows:

u2net_lite = model_config(
name="u2net_lite",
url="https://drive.google.com/uc?id=1rbSTGKAE-MTxBYHd-51l2hMOQPT_7EPy",
model=U2NETP,
model_args=(),
)
u2net = model_config(
name="u2net",
url="https://drive.google.com/uc?id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ",
model=U2NET,
model_args=(3, 1),
)
u2net_human_seg = model_config(
name="u2net_human_seg",
url="https://drive.google.com/uc?id=1-Yg0cxgrNhHP-016FPdp902BR-kSsA4P",
model=U2NET,
model_args=(3, 1),
)
Is that all the changes?

@raymondlo84 The task required a detailed notebook tutorial to run and optimize the U2-net model using the OpenVino toolkit (as mentioned in the prerequisite task section). These are the changes I made:  https://app.reviewnb.com/openvinotoolkit/openvino_notebooks/pull/984/

It was supposed to be a new notebook with a U2 model. I'm closing this, but if you want to create a new notebook, feel free to open a new PR.

Sure. I'll create a new one.


fix: resolve issues under Firefox add-on context

After #44 , add-ons won't crash during module initialization. However, I encountered other two issues when trying to redirect with pjax-api. Luckily, I managed to solve them by myself.

SyntaxError: The URI is malformed. - XHR in add-on context need host fragment in URL to work properly.

NS_ERROR_UNEXPECTED - cloning Document failure.

Please review for any cases I did not take care of.

Coverage remained the same at 73.067% when pulling 26daf1e149db61c70c025eb8127f7ad5eb0327ae on EnixCoda:master into c1911056a3594927d9dc4e3f5e80450b7dfa123f on falsandtru:master.

Looks like your extension is using pjax on the host page. Since overriding the host page by pjax from third party tools almost certainly breaks the host page I don't support such usage.

Since overriding the host page by pjax from third party tools almost certainly breaks the host page

I do agree with this point.
There is another thing to mention. GitHub officially uses PJAX to redirect, e.g. clicking on files/folders as shown below. You shall see a progress bar show at top and page re-renders without redirecting. If you look into the GitHub's source code and network activity, pjax is mentioned specifically there.

Also, one of the functions extensions provide is extending the ability of the host page, like adding stuff into page as well as making those stuff work with pjax as host page elements do. So I believe PJAX usages of my extension is not that bad, right? :)

It's totally fine if you still disagree on pushing this PR forward.

Thanks for your patience on this anyway 😄

Unfortunately, injecting pjax breaks the state transition managed by the host page. On the host page, every developer of third party tools must use the page transition provided by the host.


Include shell license boilerplate in examples/k8petstore

@jayunit100

LGTM thanks @eparis !BTW pr pending to add this to e2es


Tech Specs page

I've been thinking about all the educators and hackers who expressed interest in this idea during the Makerfaire, and I realized that it would be useful to have a Tech Specs page on the website. Stretch goal: Make a manual!!!

Closing this and moving it to the docs website repo


Destroy then initialize does not respect validation on consecutive submissions

I have an edit profile page with a simple name/email/password form. Let's say the user changes their name, then hits save. If they then change their name again and hit save, it won't validate anything (i.e., they can submit a blank name which is supposed to be required, or a password under the minimum length, etc.)

However, after this form is destroyed, I do an initialize with the server's responded values to re-initialize it.
For some reason, destroy gets rid of validation. How do I initialize after the destroy, and pass validation to it? My handleSubmit (which is declared via onSubmit in the reduxForm method in the component) still works fine, but validation does not.
Again, validation works fine on first submission. But after destroy, it doesn't work any longer.
So, to diagram this flow:
1. User enters fields and clicks save.
2. Form validates input
3. Form submits
4. I intercept with onSubmit and manually call startSubmit
5. If successful, I call stopSubmit.
6. Then I call destroy.
7. Then I call initialize.
8. User changes fields and clicks save again.
9. Form validates input but does not respect it (aka I can log from my validate method and see it's being called, but the form ignores the errors and submits anyway).
10. Form submits

Number 10 should not happen.

Also, this works if I remove step 6. Just wondering why destroy does this, and how one would re-initialize manually, keeping validation after a destroy.

I think I'm having a similar issue. I use the same form to handle creating and editing. Validation works fine at first but if I create something then try to edit it the validation doesn't work correctly. It actually does validate the form and correctly shows the errors but I'm still able to submit my form.

@kvedananda try removing destroy if you're using destroy. Like I said, that fixed it for me. Not sure if it's right or not, but it works.

@TrevorHinesley In my case the form is on two different routes/pages so it seems it's the same problem as yours but in my case I don't think I can prevent a destroy. Since validation works fine I ended up disabling the submit button if the syncErrors object was present in the form state and this at least prevents an invalid submission.

I could be wrong, but I don't believe the route changing should affect whether or not the form is destroyed, as that's just a typical unmount.

Forms are destroyed on unmount. I see the destroy event in the console when switching routes.
Did some hunting around and seems this is enabled by default but there is an option to change this.  http://redux-form.com/6.7.0/docs/api/ReduxForm.md/#-destroyonunmount-boolean-optional-
May have to try this out...

That's correct. I forgot I had that set in my form because it's a wizard. But yes, you'll need to set that option to false!

Any update on this? I'm experience the same issue on version 7.1.2 using React 15.6.2 and Redux 3.7.2. Where after calling destroy, the form will submit regardless of if there are any syncErrors sitting in the form state

For all of you using redux-saga, perhaps check out this tool I just built to convert actions into a Promise for libraries like redux-form.


release: 0.7.2

Codecov Report

Merging #475 (6265648) into maint-0.7 (ee47d72) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           maint-0.7     #475   +/-   ##
==========================================
  Coverage      15.61%   15.61%
==========================================
  Files             15       15
  Lines           1326     1326
==========================================
  Hits             207      207
  Misses          1119     1119

Impacted Files
Coverage Δ

reana/version.py
100.00% <100.00%> (ø)


Support GOF3D Compression Formats

@BaalNetbek recently discovered (#40) that, while not used in GOF2, format ID 23 is used in GOF3D for symbian.
AEIEditor seems to internally use the PowerVR SDK for a lot of texture compression. Interestingly enough, 23 is the ID in PVR for ETC2 (RGBA), and the textures provided by BaalNetbek in #40 can be decompressed successfully by the existing Tex2Img codec adaptor.
Here's a link to the relevant PVR SDK documentation: https://docs.imgtec.com/sdk-documentation/html/framework-libraries/PVRCore/library/file_texture_PixelFormat.h.html
AEIEditor stores a copy of supported PVR format IDs, used when calling the PVR SDK. If we assume that PVR format IDs can be used as AEI format IDs then, reading the AEIEditor format enum, the following formats should be representable in an AEI:

Name
AEI Format ID

PVRTC1 4bpp (RGB)
2 (mipmapping not representable)

PVRTC2 2bpp (channels unknown)
4

PVRTC2 4bpp (channels unknown)
5

DXT2 (RGBA)
5

DXT4 (RGBA)
10 (mipmapping not representable)

Shared Exponent RGB9E5 (RGB)
19 (mipmapping not representable)

RGBG 8bpp
20

GRGB 8bpp
21

ETC2 (BGR)
22 (mipmapping not representable)

ETC2 (BGRA)
23 (mipmapping not representable)

ETC2 (BGR + 1 bit alpha)
24

EAC single channel (research needed)
25

EAC dual channel (research needed)
26 (mipmapping not representable)

Some of the above format IDs require the mipmapping flag (2) to be high in order to be represented, so if they really do exist in AEIs, then we'll have to somehow assume that they will either always, or never, be stored with mipmapping.
The following formats would not be usable in an AEI, because they clash with already known AEI compression format IDs:

Name
AEIEditor Unsupported ID

PVRTC1 2bpp (RGB)
0 (clash with Unknown)

UYVY (YUV)
16 (clash with PVRTC1 4bpp (RGBA))

YUY2 (YUV)
17 (clash with ATC)

BlackWhite 1bpp
18 (clash with PVRTC1 4bpp (RGBA) + mipmapping)

Thank you for the effort unfortunately thoese ID 23 aeis is quiet buggy. I described the issue in #40 but now I realised that you may not recieve notifications for closed issues.


Nickserv identify not working

When the server connects, this is what happens on the console: http://pastebin.com/sSjFxaA4
This happens with both Jenkins 160 build, as well as release build 152.
Also, attempting to do /servirc msg NickServ Identify Ihoc187  results in the following message:
7:53:30 PM NickServ]Ihoc187: Identify Ihoc187 ************
7:53:30 PM CONSOLE: (irc.esper.net)/INFO]: [(NickServ)] Invalid command. Use $l/msg NickServ help$l for a command listing.
This is a problem in that, the correct syntax is used, which if you are on IRC it is /msg NickServ Identify [nick]

This is preventing registered nicks from being able to authenticate with the IRC NickServ and be displayed with the Op Status (if so assigned in the channel)


KmerCamel can compute lower bounds on superstring lengths.

I accidentally merged the previous PR.

Quick question: does the global greedy algorithm tweaked for computing the lower bound also use the memory optimization trick? @OndrejSladky

Quick question: does the global greedy algorithm tweaked for computing the lower bound also use the memory optimization trick? @OndrejSladky

It does.


download tool for faa files seem to provide other binary "crap"

We were collecting faa files for some genomes, and we've found some weird binary files.  Here's what they look like:
1087452.3.PATRIC.faa.phr
1087452.3.PATRIC.faa.pin
1087452.3.PATRIC.faa.psq
1087453.4.PATRIC.faa
1087453.4.PATRIC.faa.phr
1087453.4.PATRIC.faa.pin
1087453.4.PATRIC.faa.psq
1087454.3.PATRIC.faa
1087454.3.PATRIC.faa.phr
1087454.3.PATRIC.faa.pin
1087454.3.PATRIC.faa.psq
1089446.3.PATRIC.faa
1089446.3.PATRIC.faa.phr
1089446.3.PATRIC.faa.pin
1089446.3.PATRIC.faa.psq
1117942.3.PATRIC.faa

It could be a temporary thing when I was generating the BLAST libraries. However, I checked the download directories for each of the genomes listed above and did not see the blast database files.
How did you collect/see these files and from where?
-Maulik

Checked with Rebecca, the BLAST files may have been generated when she ran the phylogeny pipeline, which may have place temp blast dabatase in her original data download directory.
Closing the issue, reopen if needed.


Use of remove_original_item

https://github.com/starkware-libs/cairo/blob/ee9a0bb1e496c6e5d922c3a5071d85b45f8bc268/crates/cairo-lang-defs/src/db.rs#L310
This comment states:

The first one to change something (either generate new code, remove the original code, or both), breaks the loop

But in almost all occurrences remove_original_code is set too false even if new code is generated. derive.rs, panicable.rs and so on, except of code generated for contract. Is that a bug or there are more conditions for remove_original_code being true?

Also had a question why are we iterating over plugins here but not over attributes of an item and then mapping it to some plugin and executing generate_code?

it isn't a bug - it is a feature for cases where we do want to remove the original item (i currently indeed is only for contract stuff).
Since a plugin is not based on attributes at all in the general case - it tends to be - but nothing enforces it.
You can install a plugins that deletes all the written code - it would have nothing to do with attributes.


Initial code of the caching repository

This PR adds the initial code from @tfesenbecker.
Current state of documentation can be found in a hidden build of readthedocs.
Closes #15.

Hello @eileen-kuehn! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file custom_simulate.py:

Line 165:1: W391 blank line at end of file

In the file docs/conf.py:

Line 61:22: E231 missing whitespace after ':'

In the file lapis/cli/simulate.py:

Line 14:1: F401 'lapis.storageelement.StorageElement' imported but unused
Line 14:1: F401 'lapis.storageelement.HitrateStorage' imported but unused
Line 34:88: W291 trailing whitespace

In the file lapis/connection.py:

Line 60:73: W291 trailing whitespace
Line 194:9: E265 block comment should start with '# '

In the file lapis/drone.py:

Line 42:89: E501 line too long (100 > 88 characters)
Line 43:89: E501 line too long (94 > 88 characters)
Line 51:78: W291 trailing whitespace
Line 56:70: W291 trailing whitespace
Line 60:74: W291 trailing whitespace
Line 85:75: W291 trailing whitespace
Line 88:68: W291 trailing whitespace
Line 89:81: W291 trailing whitespace
Line 210:89: E501 line too long (100 > 88 characters)

In the file lapis/job.py:

Line 147:69: W291 trailing whitespace
Line 157:74: W291 trailing whitespace
Line 206:71: W291 trailing whitespace
Line 236:89: E501 line too long (89 > 88 characters)

In the file lapis/monitoredpipe.py:

Line 23:80: W291 trailing whitespace
Line 37:89: E501 line too long (99 > 88 characters)
Line 89:89: E501 line too long (91 > 88 characters)

In the file lapis/scheduler.py:

Line 28:1: E305 expected 2 blank lines after class or function definition, found 1
Line 233:1: E302 expected 2 blank lines, found 1
Line 863:89: E501 line too long (89 > 88 characters)
Line 865:89: E501 line too long (100 > 88 characters)

In the file lapis/scheduler_withoutClassAds.py:

Line 1:1: F401 'typing.Dict' imported but unused
Line 3:1: F401 'usim.Scope' imported but unused
Line 3:1: F401 'usim.interval' imported but unused
Line 3:1: F401 'usim.Resources' imported but unused
Line 5:1: F401 'lapis.drone.Drone' imported but unused
Line 6:1: F401 'lapis.monitor.sampling_required' imported but unused
Line 7:1: F401 'lapis.monitor.duplicates.UserDemand' imported but unused
Line 9:1: F401 'lapis.scheduler.JobScheduler' imported but unused
Line 12:1: W391 blank line at end of file

In the file lapis/storageelement.py:

Line 125:61: W291 trailing whitespace
Line 141:75: W291 trailing whitespace
Line 246:89: E501 line too long (104 > 88 characters)
Line 329:89: E501 line too long (128 > 88 characters)

In the file lapis_tests/test_caching_hitrate_based.py:

Line 4:1: F401 'functools.partial' imported but unused
Line 15:1: F401 'lapis.scheduler.CondorJobScheduler' imported but unused
Line 19:1: E302 expected 2 blank lines, found 1
Line 133:31: E121 continuation line under-indented for hanging indent
Line 136:33: E121 continuation line under-indented for hanging indent
Line 138:25: E122 continuation line missing indentation or outdented
Line 140:31: E121 continuation line under-indented for hanging indent
Line 143:33: E121 continuation line under-indented for hanging indent
Line 145:25: E122 continuation line missing indentation or outdented
Line 146:23: E122 continuation line missing indentation or outdented
Line 167:89: E501 line too long (94 > 88 characters)
Line 183:1: W391 blank line at end of file

In the file lapis_tests/test_job_caching.py:

Line 46:75: E225 missing whitespace around operator
Line 46:89: E501 line too long (96 > 88 characters)
Line 70:64: E225 missing whitespace around operator
Line 84:68: W504 line break after binary operator
Line 85:65: E127 continuation line over-indented for visual indent
Line 95:1: W391 blank line at end of file

In the file lapis_tests/test_remote_storage.py:

Line 23:54: E226 missing whitespace around arithmetic operator
Line 23:59: E226 missing whitespace around arithmetic operator
Line 23:64: E226 missing whitespace around arithmetic operator
Line 28:1: W391 blank line at end of file

In the file lapis_tests/test_storage_filebasedhitrate.py:

Line 10:1: E302 expected 2 blank lines, found 1

@maxfischer2781, this is slowly getting really huge... I will mark it as Ready for review so that we can work through the first lines 😸


FIX: A test was bleeding data into the main db.

I do not understand why this was causing bleeding...

attn @cowanml This should fix the problem with the default database being created.

I've confirmed this eliminates the 'test' db polution.
thanks!
on a vaguely related note...
I'd have a slightly warmer+fuzzy feeling if utils/testing.py had
db_name = 'mds_disposable_test_db__{0}'.format(str(uuid.uuid1()))
or something instead of just the very generic, bare uuid4:
db_name = str(uuid.uuid4())
From the docs, uuid4 is purely random, no time/host involved like for
uuid1.  The odds of inadvertently blowing away a db someone cares
about before the heat death of the universe might by pretty slim in
theory, but...  I can all too easily imagine something screwy
happening with random # seeding or something... makes my gut grumble
slightly.  Or maybe it's it's just dinner time? :)
-matt

It probably is just dinner time, but I am susceptible to such concerns.  I
also ended up with a large number of uuid named dbs on multiple machines
from debugging testing/killing tests part of the way through so having a
common prefix seems like a good idea to me.
On Wed, Apr 29, 2015 at 5:43 PM cowanml<EMAIL_ADDRESS>wrote:

I've confirmed this eliminates the 'test' db polution.
thanks!
on a vaguely related note...
I'd have a slightly warmer+fuzzy feeling if utils/testing.py had
db_name = 'mds_disposable_test_db__{0}'.format(str(uuid.uuid1()))
or something instead of just the very generic, bare uuid4:
db_name = str(uuid.uuid4())
From the docs, uuid4 is purely random, no time/host involved like for
uuid1. The odds of inadvertently blowing away a db someone cares
about before the heat death of the universe might by pretty slim in
theory, but... I can all too easily imagine something screwy
happening with random # seeding or something... makes my gut grumble
slightly. Or maybe it's it's just dinner time? :)
-matt
—
Reply to this email directly or view it on GitHub
https://github.com/NSLS-II/metadatastore/pull/135#issuecomment-97595795.


Parsing dictionary from nested key

Hello, @thoughtbot!
Thanks for such a cool library!
I am very beginner, and have an issue with parsing JSON.
My JSON structure is like:
{
    "profile": {
        "email"<EMAIL_ADDRESS>        "full_name": "Name",
        "id": 319935,
        "photo": {
            "is_placeholder": false,
            "url": "http://user/photo/220023/default_3d8e0dbb8d7f2c716cb55a525ffcafa6.png"
        },
        "updated_at": "2016-02-15T07:23:58.826-07:00"
    },
    "success": true
}

And model is like this:
rotocol User {
    var id: Int64? {get}
    var name: String? {get}
    var email: String? {get}
    var photo: String? {get}
    var updatedAt: String? {get}
}

struct UserResponse: User {
    let id: Int64?
    let name: String?
    let email: String?
    let photo: String?
    let updatedAt: String?
}

extension UserResponse: Decodable {
    static func decode(json: JSON) -> Decoded<UserResponse> {
        return curry(UserResponse.init)
            <^> json <|? "id"
            <*> json <|? "name"
            <*> json <|? "email"
            <*> json <|? "photo"
            <*> json <|? "updated_at"
    }
}

I want to read values from nested "profile" dictionary and "url", what is one more level deep, but not sure how to access them properly. What is the right signature for decode() in this case?
Best regards,
Alex

We provide a special array based syntax for accessing nested values. The array of strings that you pass reflects the path to get to the value you want. So, for example, if you wanted to parse:
{
  "foo": {
    "bar": {
      "baz": "value"
    }
  }
}

you could do so with:
let val: Decoded<String> = j <| ["foo", "bar", "baz"]

So in your case, you could change your parser to pull out the nested photo url:
extension UserResponse: Decodable {
    static func decode(json: JSON) -> Decoded<UserResponse> {
        return curry(UserResponse.init)
            <^> json <|? "id"
            <*> json <|? "name"
            <*> json <|? "email"
            <*> json <|? ["photo", "url"]
            <*> json <|? "updated_at"
    }
}

At this point we still aren't pulling out the root key, but now we have a couple of options, depending on where we are in the parsing process.
If we've already passed the AnyObject returned from NSJSONSerialization through JSON.parse (resulting in a JSON object), we can pull the root key manually and then flatMap it into UserResponse.decode:
let json: JSON = // from JSON.parse
let user = (json <| "profile") >>- UserResponse.decode
// or if you're operator-averse
let user = (json <| "profile).flatMap(UserResponse.decode)

Alternatively, if you haven't passed the AnyObject through JSON.parse, you can use our handy decodeWithRootKey function to do the whole thing in one step:
let user: UserResponse?

if let object = NSJSONSerialization.blahblahblah {
  user = decodeWithRootKey("profile", object)
} else {
  user = .None
}

You could also use the array syntax to just add profile to the path for each object, but we'd generally recommend pulling a common root key at the highest level like described here.

UNRELATED ADVICE: It might be a good idea to audit your JSON API and reflect non-optional properties as such with your types. You'll still be able to decode safely using Argo and you'll end up with a more pleasant model object to work with in your app.

Wow, looks like I am late to the party...
@gfontenot , thank you very much for such an detailed explanation!
Actually, I made it another way, maybe even simpler.
I just created another UserResponse object with fields of nested dictionary and set is as a property in UserResponse protocol and struct

@alexth 💯
Is this resolved now? Can we close it?

@gfontenot , sure, thanks!