style: making the code less complex in the fps_counter

Clarified the conditions under which frame rate falling is allowed, making the system more predictable and easier to debug;
Simplified the decision structure to return true immediately in scenarios where no drop is required, reducing nested conditions;
I've renamed the variables to be clearer about their objectives.

Simplified the decision structure to return true immediately in scenarios where no drop is required, reducing nested conditions;

This item does not match the PR, was there any git push left? Or can I merge anyway?
@lnpotter

@lnpotter If you are interested in other refactorings #52

Simplified the decision structure to return true immediately in scenarios where no drop is required, reducing nested conditions;

This item does not match the PR, was there any git push left? Or can I merge anyway?
@lnpotter

The function was adjusted to return true immediately if there are no frame drops (drop_count == 0), which reduces the depth of nested conditions that follow this check.
-- original code
if fps_obj.drop_count == 0 then
    return true
end

if fps_obj.total + fps_obj.drop_count > fps_limit then
    fps_obj.falls = 0
    return true
end

-- modified code
if fps_tracker.drop_count == 0 then
    return true
end

if fps_tracker.total_fps + fps_tracker.drop_count > fps_limit then
    fps_tracker.fall_streak = 0
    return true
end

This simplification occurs early in the function, reducing the need for further evaluation within the same evaluation period, thus streamlining the decision path.

@lnpotter If you are interested in other refactorings #52

I'll take a look.


Edit the README

Oh whoops, I can't believe I reviewed this twice. :rofl:

Haha, thanks for the review :)


[MERGE] Merge master branch

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19615/
Test PASSed.


ERROR : The type or method CreateBook cannot be used for Extension development.

Facing above error while convert our extension from V1 to V2

The table "Excel Buffer" has methods that are not allowed for 'Extension' development such as 'CreateBook', 'OpenBook'. I have read the FAQ and I know that I can change my target to Internal, but if I want to create a real extension that can read and write Excel files, what options do I have? I'm assuming that the MSDyn365BC product will include the ability to import a budget from Excel and export a budget to Excel, so why can't we do the same in our own extensions? If there is a work-around for this, can you please provide some details on how an Extension could be written to import and Excel spreadsheet.

The problem with the CreateBook and OpenBook functions is, that they use files, which aren't allowed in BC extension development. The solution to this problem is to use streams instead of files. For OpenBook, we've implemented the alternative OpenBookStream, which you can use instead. The CreateBook alternative for now is CreateNewBook, but we still have some refactoring to do, as that function does use a tempfile in the background. That is work in progress. But you should be able to unblock yourself by using those to replacement functions.
I hope that helps! If you have further questions, please let me know!

Thanks to everyone.
i am using streams to fulfill my requirement


Comments on Tests

I'm not sure if it is best practice to include helper_tests.py as part of the main package.
There is no documentation for helper_tests.get_ref_test_Signal. Just make it known that it represents a signal with known features for unit testing.
Try to make sure as much of the framework as possible is covered by unit tests. There are many branches of functions (mainly as a result of differing parameter values) that are currently not covered.
How come the comparison value within test_Signal.test_Signal_envelop_time is 2? This seems arbitrary.
There is an asymmetry between the full types of checks in test_Signal.test_Signal_log_envelop_time with respect to those conducted in test_Signal.test_Signal_envelop and test_Signal.test_Signal_envelop_time.
There are no unit tests for Signal.old_plot or Signal.peaks_old.
In addition to testing Signal.save_wav in test_Signal.test_save_signal, it would be nice to test utils.load_wav to verify the signal is preserved. There should also probably be unit tests for other functions in utils.py.
The unit test test_Sound.test_Sound_bin_divide does not actually test or call Sound.bin_divide.
There are no unit tests for the SoundPack plotting functions (i.e., freq_bin_plot, combine_envelop, fundamentals, integral_plot, bin_power_table, bin_power_hist, listen, compare_peaks, fft_mirror, fft_diff, integral_compare, coherence_plot).
There is no if __name__ == '__main__': included in test_SoundPack.py. While it doesn't seem to be necessary to run the unit tests, it is inconsistent with the other files.
It would be nice to have unit tests for the GUI.

I moved helpers_test.py to the tests directory
Added docstring to helper_tests.get_ref_test_Signal
Replaced the arbitrary 2 value with 10% of the total signal time (This should ensure that the last point of the signal envelop time is not too different from the actual signal time samples)
Made the Signal.log_envelop test have the same checks as Signal.envelop when possible
Added a test for Signal.old_plot and removed the Signal.peaks_old method as it was not used
Added tests for utils.py
Added if __name__ == '__main__': in test_SoundPack.py

TODO

test sound file preservation with utils.load_wav
add Sound.bin_divide call in test
add tests for the SoundPack plotting functions
add tests for the GUI

Thanks for addressing these comments. Note that an outdated copy of helpers_test.py is still located under the main package and I believe this is the version that documentation is being generated from.


haskell: tls package override is broken on aarch64

The tls package currently has this override in pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
  tls = appendConfigureFlags
    (lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [ "--ghc-option=-fllvm" ])
    super.tls;

However this doesn't work because ghc is not wrapped with a suitable llvm installation so when you attempt to build the package you get errors along the lines of:
Building library for tls-1.6.0..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [11 and 16)

cc @sternenseemann

Yeah, this known by me and I have drafted a clean fix that I’ll have to push in the next days. (I was a bit lazy about this, since it was broken already, sorry.)On 9. Oct 2023, at 18:02, Matthew Pickering @.***> wrote:
The tls package currently has this override in pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
tls = appendConfigureFlags
(lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [ "--ghc-option=-fllvm" ])
super.tls;
However this doesn't work because ghc is not wrapped with a suitable llvm installation so when you attempt to build the package you get errors along the lines of:
Building library for tls-1.6.0..
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [11 and 16)
cc @sternenseemann
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

#260079


Refs #185, remove trailing comma for .mention-bot file before JSON parse

connects #185

Hey @jeffreyleeon, sorry it took me a few days to review this. Unfortunately, the JSON specification disallows trailing commas. I would rather not start supporting invalid JSON there.
However, it would be awesome to report back on the pull request that the configuration was invalid so that it's easy to spot the error.
Would you mind sending a pull request for that instead? Thanks!

@vjeux Good idea!

@vjeux That's a nice feature! I will try to give a pull request for this. Thanks!

@jeffreyleeon thanks! I will review it more quickly this time!


Clean up the controllers and treating exceptions

Would be great clean up the controllers and move the extra logical code to repositories or models.
I realized that when a problem occurs with the DB::transaction, the controllers are not firing the exception, but only returning a error message. It is very difficult to track the errors occurred when saving or updating data.
Ex:
DB::beginTransaction();

try {
            ...
} catch (\Exception $e) {

            DB::rollback();

            // I think here we can throw an exception, with the message below. Then, on the
            // exceptions handler, we check if the system env is dev or production, to show the error
            // or only flash the message.

            flash()->error('Error while creating the member');

            return redirect(action('MembersController@index'));

}

I think it's too early to tackle down exception even because on Laravel 5.5 and 5.6 you can handler everything using the renderable interface

@TiagoSilvaPereira, not just controllers we will need refactoring at lot more places, currently working on the items list for the same.


LuffyArtist-Nathan

This artwork is a drawing of Luffy eating a burger. The brightness/contrast of the drawing will change each time you run the program. I had a great time coding this project. I had to incorporate some python imaging techniques before transferring to the JS.

How do you generate the data points?

I used python to convert the data from an AI image before transferring it
to the blot editor.
On Sun, Apr 14, 2024 at 9:17 PM Jobin Selvanose @.***>
wrote:

How do you generate the data points?
—
Reply to this email directly, view it on GitHub
https://github.com/hackclub/blot/pull/403#issuecomment-2054944566, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AQSCSWWN47Q6JXYNWTOTEUDY5NIHFAVCNFSM6AAAAABGFUJ3OOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUHE2DINJWGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Thanks for the submission. Your Blot program should generate the image not just render an image from somewhere else. We do have some rasterizers but the aim is for them to be transformative. I think the simplest versions (like pixel present or not) are already in the gallery.
I'm going to close this for housekeeping but please resubmit when you are ready.


Connection

Hello,
Im using a Raspberry Pi 2B with a USB BT Dongle.
Via SSH i can find, connect and pair with the EQ3-Bluetooth.
But if i put in the BT Address of the device into the Node, it only shows me "disconnected".
Even if i use low or high letters.
The valve is paired with my phone and i can control it via its App without problems.
After injecting something (in this case only "Boolean True".) it shows me
"the specified device at 00:1a:22:0e:ed:99 has not been found yet"
"list of all available addressess will be retrieved..."
But i never get any list...
Is this thing still supported?
Are there any other easy solutions to connect and control this valves via node-red ?

I am having the same problem at this moment.

I got it working by
1/ installing the proper packages:
apt-get install bluetooth bluez libbluetooth-dev libudev-dev
2/ assure nodered  has root privileges (see https://github.com/noble/noble#running-without-rootsudo ) by running following command:
RUN sudo setcap cap_net_raw+eip $(eval readlink -f which node)

I also got above error when my raspberry pi was too far away (e.g. on another floor in the house) from my eQ-3 device.

@MeisterQ is it OK to close this issue ?

Yes.
Im using an ESP32 to communicate to my EQ3 valves now. I can send Messages via MQTT and the ESP is translating it into Bluetoothcommands for the valves.
Much better

Gentelman could You show me flow in Node Red? I`m trying to start NR with eq3 BLE.


getting transcript from multiple video ids?

Hi I'm using windows at the moment and I used the lates version of the API. I just wonder how can I getting transcript from multiple video ids at the same time?
Currently I'm using the same code from https://stackoverflow.com/questions/42867732/getting-youtube-auto-transcript-from-api (the answer from user2585501) but for some reason the code only fetch the transcript of the last video id from the list.
Any tips for the reason/ how to solve? @jdepoix
Thanks in advance!

Hi @helmimuharram, could you please share the exact code your using and error message you are getting doing so?

`from youtube_transcript_api import YouTubeTranscriptApi
#srt = YouTubeTranscriptApi.get_transcript(video_id)
videoListName = "youtubeVideoIDlist.txt"
with open(videoListName) as f:
video_ids = f.read().splitlines()
transcript_list, unretrievable_videos = YouTubeTranscriptApi.get_transcripts(video_ids, continue_after_error=True)
for video_id in video_ids:
if video_id in transcript_list.keys():

    print("\nvideo_id = ", video_id)
    #print(transcript)

    srt = transcript_list.get(video_id)

    text_list = []
    for i in srt:
        text_list.append(i['text'])

    text = ' '.join(text_list)
    print(text)`

this is the code that I used. I'm not getting error or anything. But the result is not kinda what I expected.
I thought I could get transcripts from multiple videos by looping from the list I have. But, it turns out I only get 1 transcript from 1 videos only. Is there a way to get multiple transcript from multiple videos at the same time? Thanks for the response @jdepoix

The easiest way to get multiple transcripts probably is YouTubeTranscriptApi.get_transcripts(["video_id1", "video_id2", "..."]). Please read the README for more detailed information on how to use this module.

wow, you really HAVE TO close this instantly huh. Well for your information: your solution doesn't work and if the features for multiple downloads didn't exist yet, maybe can you at least count it as a suggestion for the next update of this API.

I think you are kind of missing the point of GitHub issues. This should be used to report bugs in the repository, or discuss possible features/direction the repository should move in to, not so explain to you why some code you copied of stackoverflow doesn't work. The reason your code is not working as you expect it to does not have anything to do with this module. As I explained to you (although it is already clearly documented in the README), there is a simple way to get multiple transcripts. I am not going to explain to you how to read video IDs from a file etc. That's python basics. You can go to stackoverflow for that. This is not free python support!
I work a full time job and do my best to support this repository in the limited free time I have so people can benefit from it (for free!). Therefore, I have to make sure to close issues as quickly as I can so that the issues count doesn't grow to an unmanageable number, and I have to quickly identify issues which are reporting an actual bug in this repository so that I can dedicate my time to fixing those. Please manage your expectations when using something for free!

here let me rephrase it for you:

I'm sorry, but this place is only for reporting bugs or discussing new features in the repository. If you have a problem with some code from StackOverflow, then discuss it over there and not here. I'm sorry that I close your inquiries too early without explaining much and not with the answer you expecting from this "free" repository.
I might consider your suggestion for future version of the repository. Thanks!

and for those of you who come here with the question same as mine (from google or whatever) and can't find the answer, the code is the same as what I paste from the StackOverflow, but just add this at the end:
with open(video_id + '.txt', 'w', encoding='utf-8') as txt_file:             txt_file.write(text)
I manage to find the solution before this thread closed but you do you I guess?

here let me rephrase it for you:

I'm sorry, I don't quite understand why this got closed. Would you mind explaining, as my problem still remains?


FEATURE: Add danish translation

:tada: This PR is included in version 3.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


DELETE from server by property of a JSON object

I am trying to delete an item on the server by stipulating the ID which is one of the properties. I have the following structure on my server:
"groups": [
{
"id": "28c59d54-8d26-4b3e-b8de-74fe375355e1",
"name": "Digia",
"contacts": [
"a0f33004-0482-4174-b0c7-efacd90341bd",
"10976cbe-e8ed-47b0-9b44-d143b1d32a13",
"8012d896-378e-4db2-83a9-4c8771a8146a",
"d2cfde3e-ec47-4b6a-8c84-5cf3a32e0980"
]
},
{
"id": "8781fc9e-a4a5-43ab-a8a4-0977d372682b",
"name": "Star Wars",
"contacts": [
"faadef6c-8f98-4631-9dbc-6d106f4148b5",
"63c9d0ea-cfec-4b39-bb94-1e30006eab55"
]
},
{
"id": "ea26867f-d946-4b0c-932d-f1b63afced9f",
"name": "POST TEST",
"contacts": [
"10976cbe-e8ed-47b0-9b44-d143b1d32a13",
"a0f33004-0482-4174-b0c7-efacd90341bd"
]
}
]
I keep getting a 404 error, even though viewing the entry in the browser with the URL works. Here is the log I get from the console:
DELETE /groups?id=80696e56-3166-49a2-b437-b1bdede27bb7 404 3.185 ms - 2

Hi @Morne-Digia,
JSON Server doesn't support query parameters for DELETE. You need to use the following request DELETE /groups/80696e56-3166-49a2-b437-b1bdede27bb7.

@typicode for some reason it doesn't work for me - I'm getting 404. Maybe it's because I'm using generate.js  and not static json file?


Feature: Add flag-gated solution for upgrading CRDs

CRDs maintained with proper version compatibility can generally be upgraded safely.
https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts.html
The Hub and Spoke model mentioned in the Kubebuilder project's documentation details a path to version compatibility that would allow CRDs to be upgraded in a safe manner. This would require all maintainers of CRDs to get on board for the best experience, so I am suggesting we add a flag that would let users who are confident in their solution bypass the current CRD functionality in order to get updates.
Suggested change:
Add this flag to helm upgrade
--upgrade-crds
which would perform the same sort of merging that kubectl apply currently does
This would allow users with CRD based solutions to have a smoother helm experience without having to use kubectl or kustomize to handle updates to CRDs.

I may have bandwidth to look at this. Wanted to put it up here for discussion first.

hi @frodopwns. Have you had a chance to look at #5871 yet and how this proposal may be affected by that discussion?
You might also find this comment interesting: https://github.com/helm/helm/issues/7735#issuecomment-617795653

@bacongobbler there is an awful lot to catch up on
What I think I picked up on...
The main problems preventing the implementation of an upgrade or deletion solution appears to be about protecting users from other users. Ie. Chart/Operator consumers from the developers of those charts. This is problematic for users not in multi-tenant situations or users with fully compatible versioning solutions.
The outcome of this is that users are leaving helm in favor of straight kubectl/kustomize alternatives.

Actually I guess I see another issue with the ordering.
The operator has to be serving webhook endpoints in order for CRDs to be converted when the stored version is updated.
The way kustomize handles this...
Deploys CRDs with conversion.strategy = "none"
Then it updates the CRDs with conversion.strategy = "webhook" at the time it deploys the operator.
Not quite as straight-forward as I would like it to be.

I will read up and see if I still think I have a suitable solution in mind.

Hi, @frodopwns - as the CRD discussion is being clarified in https://github.com/helm/community/pull/138 and this issue is inactive, I'm resolving it now. Thanks for your interest, and please weigh in on the ongoing discussion in https://github.com/helm/helm/issues/5871 if desired.


One Way Portal

I set the power cost for the portal to 0 but it still won't allow me through. I want to use these for world spawn. I am able to go through them from spawn, but i can't go back

Also this is the 1.16.5 one that im mentioning


review caching of public/private sources

maybe not cache it for MEDIA_ADMIN

not sure what this was in reference to... @rahulbot do you remember?


RainFARM in pure Julia

This is an implementation of RainFARM which uses julia also for the main diagnostic driver, no R is involved. This allows to avoid using JuliaCall from R and fixes #1180

please merge the latest version2_development into your branch to solve the failed test(s)

so this will solve the latest evolution of #1180 (the problem I am reporting at the bottom) right?

Yes @valeriupredoi  it avoids all the problems of #1180 completely, since it is not using R at all anymore. Not sure what is happening there, I tried to reproduce but got even different errors than yours.
I just made a test with this branch (version2_julia_rainfarm) using the recommended julia installation method and it runs flawlessly for me.

great, cheers @jhardenberg :beer:
which is the method you used to install Julia - the conda approach or the one I mention in #1254

I am using the #1254 method

aha great, cheers! I'll write up the dox for it now :beer:

recipe_rainfarm.yml works now! :tada:
Note that I changed the author tags as per #1164.
I'll merge once the tests are completed.

awesome! :beer:

@jhardenberg Can esmvaltool/diag_scripts/rainfarm/rainfarm.R be removed now?

Sorry if it took me awhile to come back to this. Thanks for merging this, that's great!
@bouweandela yes, indeed esmvaltool/diag_scripts/rainfarm/rainfarm.R is not needed anymore, sorry, I forgot to remove it in the branch. I will make a small PR just for that.
As for using JSON.jl to write provenance, thanks for the suggestion. I actually considered it originally, but then I preferred writing my short yaml writer. I will explore this option in #1240 and if all is fine I will also implement it for RainFARM.


[Bug Report] 2.0.0-rc.1 Table fail when nested property is null

Element UI version
2.0.0-rc.1
OS/Browsers version
Chrome
Vue version
2.5.2
Reproduction Link
https://jsfiddle.net/pj71jkyw/656/
Steps to reproduce
Enter to the jsfiddle (https://jsfiddle.net/pj71jkyw/656/) and the data will not display because the nested property 'country' is null.
In previous version this example work. Checkout this jsfiddle https://jsfiddle.net/pj71jkyw/655/
What is Expected?
When a nested property is null it expected that will not display the column such as previous version  (https://jsfiddle.net/pj71jkyw/655/), but now it fails all the component
What is actually happening?
The table is not render

Fixed in #7772


pkg_resources.ContextualVersionConflict between Flask, werkzeug

I installed chainerui by the following commnads,
pip install chainerui
chainerui servser

but I caught the following error
pkg_resources.ContextualVersionConflict: (Werkzeug 0.12.2 (/home/hiroshimatsui/.pyenv/vers
ions/3.6.5/envs/bilstm-chainer/lib/python3.6/site-packages), Requirement.parse('Werkzeug>=
0.14'), {'Flask'})

flask 1.0.2 has requirement Werkzeug>=0.14.
Which version of flask is needed for chainerui?

I read requirements.txt in this repository.
I installed Flask==0.12.2, and it works.

Thank you for the issue.
The next release will solve this problem.
cf. #99


Hello World in Motoko

Kindly assign me this under HacktoberFest

I wish to contribute. Kindly assign this to me.

I wish to contribute. Kindly assign this to me.

@6-CSE Can I contribute to this issue

hey ! @Utkarsh-Shivhare I also want to contribute in it.


The Error message should be more digestible

The error message should be more informative , right now it brings this "Not working" feeling when everything is working well, this might confuse users.
Suggestion:
Remove all the brackets and etc and leave only the main message and that is "Node 99e2717c-cec7-4575-bd8e-fed566f92067 already belongs to Spark cluster AAA" and etc..."

fixed


When editing an input with an alias, HOME and END suddenly don't work.

Describe the bug
When editing an input with an alias, HOME and END suddenly don't work, after refocusing it is fixed, but then locks again.
Expected behavior
Expect that HOME and END work, also without having to refocusing it.
Slack
https://figmatokens.slack.com/archives/C04284ZALGL/p1663658629704259

Released in 129

I am still experiencing this same issue after Fix


Add ability to easily update query cache

Hey all, awesome project! This is allowing me to easily switch away from swr over to using tanstack/query.
One thing I miss however is the ability to easily update the query cache.
With swr, each instance has a mutate function that includes the curried key, so I can easily pass it the new value.
With the current iteration of this library, the refetch function that is returned from useQuery takes no parameters.
In order for me to update the underlying cache, I have to do something like this:
const queryclient = useQueryClient();
const { mutateAsync } = useMutation(createMyValue);

async function onSubmit(values: MyFormValues): Promise<void> {
  const resp = await mutateAsync(...values...);
  queryclient.setQueryData(
    createConnectQueryKey(geyMyValue, {
      id: resp.myvalue.id,
    }),
    new GetMyValueResponse({
      myvalue: resp.myvalue,
    })
  );
}

I'd love it if there were an easier way to trigger a cache update for a useQuery value that didn't involve so much boilerplate.

Thanks for the issue! In general, invalidating queries (triggering a refresh) instead of manipulating the cache is preferable because it's so simple and reliable (for example, you'll never forget to also update a lastUpdated property).
For example, I've often seen a pattern like this:
  const res = useMutation(createMyValue, {
    onSuccess: (data) =>
      queryClient.invalidateQueries({
        queryKey: createConnectQueryKey(geyMyValue, {
          id: data.id,
        }),
      })
  });

I'm not closely familiar with swr. Is it more common to update the cache than to let it update?

Thanks for the response! Unclear if it's more common or not to do that. swr works effectively the same way as the refetch does with their mutate, but they optionally allow you to provide a cache value.
Since our mutation APIs like Create, Update return the latest object, I like to optimistically update the cache because we have the latest object instead of just calling refetch again to hit the API one more time.
Perhaps this is an anti-patten and it's just way more common to simply call refetch or invalidate.

Since our mutation APIs like Create, Update return the latest object, I like to optimistically update the cache

I'm not sure I'd call it an anti-pattern, just that I would generally recommend to invalidate and refetch for simplicity. Makes perfect sense to me to not waste a roundtrip, if you know what you're doing 🙂
Here's the tanstack/query guide on this topic: https://tanstack.com/query/latest/docs/framework/react/guides/updates-from-mutation-responses
Maybe the most straight-forward improvement would be a function similar to this:
import {type Message, type PartialMessage,} from "@bufbuild/protobuf";
import {QueryClient} from "@tanstack/react-query";
import {createConnectQueryKey, type MethodUnaryDescriptor} from "@connectrpc/connect-query";

export function setQueryData<
  I extends Message<I>,
  O extends Message<O>,
>(
  client: QueryClient,
  methodDescriptor: Pick<MethodUnaryDescriptor<I, O>, "I" | "name" | "service">,
  input: PartialMessage<I>,
  output: O,
): void {
  const key = createConnectQueryKey<I, O>(methodDescriptor, input);
  client.setQueryData(key, output);
}

It just provides a bit of type-safety for RPCs on top of QueryClient.setQueryData. Maybe we can add it to the package if it works out well.

Thanks for the note @paul-sachs - I must have missed that function in the docs. Will have to go through my code and update the refs, that is very helpful!
Apologies for the comment delay, my github emails need to be reworked...
Saw that there is also more work happening in v2, which is exciting!


[REFACTOR] Remove inclure_slug and inclure_score parameters

depends on https://github.com/etalab/annuaire-entreprises-search-api/pull/281
These filters are now included in include parameter.

@XavierJp The only team that potentially uses include_score is the inclusion team and I sent a message to notify them.


Modify unit tests to assert on event counts and ordering instead of metrics gathered

This makes unit tests more concise and decouples command unit tests from metrics

NetflixOSS » Hystrix » Hystrix-pull-requests #273 SUCCESS
This pull request looks good


RightOn Fixed Android Icons: P3

Assets previously prepared for Android were only appropriate for the Play Store, but do not necessarily fit for the Android platform itself.
For example, the app icon over here appears as an eye, instead of showing the monster's body. (Referring to the app icon above the "How to Play!" title)

New assets have been prepared in Figma to follow the guidelines indicated at https://developer.android.com/develop/ui/views/launch/icon_design_adaptive.
To export these assets:

Select this Figma frame
Go to File > Export..., which should open the following window:
All the assets exported this way should already be named correctly for integration according to the developer guidelines.

Oops assigning it back to @drewjhart so he can properly prioritise the work. Sorry for the confusion!


Backend Communication Profiling

Pull Request Description
Expands the profiling tooling

adds Enso specific metadata functionality
adds profiling to backend communication
enables visualizations of async task that are not active
enables profiling of FRP outputs (important to track user interactions that trigger computations that take a lot of time)
expands the sample demo scene rendering profiling data to easily allow rendering of custom profiling data

This shows the updated sample data. The grey bars show an async task that is not currently active. The vertical bars show a "Mark" that has been set in the timeline.
https://user-images.githubusercontent.com/1428930/161980616-aa2beead-5919-445c-ab02-7055dcb7e4af.mp4
Checklist
Please include the following checklist in your PR:

[x] The documentation has been updated if necessary.
[x] All code conforms to the Scala, Java, and Rust style guides.
All code has been tested:

[x] Unit tests have been written where possible.
[x] If GUI codebase was changed: Enso GUI was tested when built using BOTH ./run dist and ./run watch.

@kazcw could you review it pls? I would just do super fast check after your review.

@kazcw could you review it pls? I would just do super fast check after your review.


[BUG] - Invalid option header usage to Load and unload

Describe the bug
When using dsbulk to load/unload/count you want to use header option.
As stated in the dsbulk documentations it should be -header true and not -header

Fix is to add arity 1 to the option header. Will be shipped in 0.1.1

Released as part of 0.2


Cascading permissions

As a user, I want to have a cascading permission system:
Every user that can_manage an item also can_borrow and can_view this item.
Every user that can_borrow an item also can_view this item.
Dependencies
Depends on:

#86
#69
#75
#153 (might be conflicting)

Acceptance Criteria

[ ]  Every user that can_manage an item also can_borrow and can_view this item
[ ]  Every user that can_borrow an item also can_view this item

We have to keep an eye on how #153 is implemented, so that we don't rebuild or destroy logic they thought of.

When the cascading permissions were added, please also change parts of the code where multiple permissions were set at once to get all permissions. For example see Tims comment on #283.


Run tmpnb on openstack?

Is it possible to run tmpnb on openstack? There is docker support, but the API for starting/stopping containers seems to be different, so I suspect it won't work. Which parts would need changing?

tmpnb talks to the docker API via docker-py, so you would need to get a proper handle on a docker socket, and then it should work.

I think that wouldn't be possible with openstack's docker support.

In that case, you would need an alternate implementation of dockworker and spawnpool that use a different API, which is pretty much the whole thing other than a few simple HTTP handlers.

Which OpenStack docker support are you aiming for? A Nova driver or Magnum's /containers endpoint?

By the way if you're at the OpenStack Summit @kimstebel, you can find me at the Rackspace cantina on the second floor in the Carina area.


[CM-0731]flutter_image_compress   stream.addListener(listener, onError: errorListener);

Compiler message:
file:///Users/guangjing.feng/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.5.0/lib/flutter_image_compress.dart:205:32: Error: No named parameter with the name 'onError'.
stream.addListener(listener, onError: errorListener);
^^^^^^^
file:///Users/guangjing.feng/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.5.0/lib/flutter_image_compress.dart:207:27: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/guangjing.feng/github/flutter/packages/flutter/lib/src/painting/image_stream.dart').
'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/guangjing.feng/github/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.removeListener(listener);
^
Compiler failed on /Users/guangjing.feng/gitlab/flutter_finizi/plugins/flutter_verify_module/example/lib/main.dart

FAILURE: Build failed with an exception.

Where:
Script '/Users/guangjing.feng/github/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 665

What went wrong:
Execution failed for task ':app:compileflutterBuildDebugArm64'.

Process 'command '/Users/guangjing.feng/github/flutter/bin/flutter'' finished with non-zero exit value 1

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 12s
Finished with error: Gradle task assembleDebug failed with exit code 1

stream.addListener(ImageStreamListener(listener, onError: errorListener));
completer.future.then((ImageInfo info) {
stream.removeListener(ImageStreamListener(listener));
});


Proposal: Add url to chart maintainer details

There are times you want a URL to a package maintainer.
For example, in Monocular (as seen on Kubeapps.com) the name is taken and turned into a url to a location on GitHub (see issue about it as a bug). This doesn't work for a variety of reasons.
It would be nice to use a URL to a maintainers chosen location. This could even be used as an alternative to an email address for those who don't want to give it out. See the monocular issue for a couple example of hiding email addresses.
The proposal is to add a URL field alongside the email one...
https://github.com/kubernetes/helm/blob/3fc189d688fdfd4c0423fa6888a7762f8cde2381/_proto/hapi/chart/metadata.proto#L21-L28

I could see the value in a URL field like "report-bugs-to". I've seen that format used in other places where the maintainers want to point users to file bug reports or further discussion over, such as a mailing list or a forum.
For example, PEP 1 describes the "Discussions-To" field in PEPs as

PEP review and resolution may also occur on a list other than python-dev (for example, distutils-sig for packaging related PEPs that don't immediately affect the standard library). In this case, the "Discussions-To" heading in the PEP will identify the appropriate alternative list where discussion, review and pronouncement on the PEP will occur.

Would that help resolve the issue for monocular?

Another valid use case:
We (as the former Deis team) set up an<EMAIL_ADDRESS>email address for users to file bug reports with the charts to satisfy this field. However, we would prefer to point users over to https://github.com/deis/workflow/issues instead.
Does that seem to satisfy the requirements? :)

Just to add some context, the reason we point to a GitHub profile was to provide a better experience than a mailto link in the case of the stable/incubator repos. The Charts team decided on using GitHub IDs for maintainer names, but this is being implemented gradually and so we currently have some broken links.
I do feel that a URL field will be useful and agree with @bacongobbler's usecases. +1 for adding url as an optional field to the maintainer object.


Update package to support Swift 6.0; Drop older than 5.7

Update to support Swift 6.0 and drop old versions, same as all other server packages by now.
resolves rdar://113848512

@swift-server-bot test this please

@swift-server-bot test this please

@swift-server-bot test this please

@swift-server-bot test this please

Ok we're good 5.7+
I did keep the source compat version... had to disable warnings as errors to do so though


[FLINK-4723] [kafka-connector] Unify committed offsets to Kafka to be the next record to process

The description within the JIRA ticket (FLINK-4723) explains the reasoning for this change.
With this change, offsets committed to Kafka of both 0.8 and 0.9 are larger by 1 compared to the internally checkpointed offsets. This is changed at the FlinkKafkaConsumerBase level, so that offsets given through the abstract commitSpecificOffsetsToKafka() method to the version-specific implementations are already incremented and represent the next record to process. This way, the version-specific implementations simply commit the given offsets without the need to manipulate them.
To test the behaviour on both connector versions, this PR also includes major refactoring of the IT tests by adding offset committing related IT tests to FlinkKafkaConsumerTestBase, and let both the 0.8 and 0.9 consumers run offset committing / initial offset startup tests (previously only the 0.8 consumer had these tests).
R: @rmetzger what do you think of this?

Seems like one of the new IT tests is a bit unstable, fixing it ...

Looks quite good. I would suggest one change, though:
Can we avoid copying the offsets in the checkpoint into a new map (with increment by one) and passing that to the ZooKeeper Offset Committer or the Kafka Offset Committer? I am just not a big fan of copying things back and forth (especially in "prepareSnaoshot()", which we want to keep as lightweight as possible). Instead, can we have the contract that the offset committers always commit "+1" from the value they get (pretty much as it was in the 0.9 committer after FLINK-4618)?
Concerning the tests, is the stability issue fixed there?
What I frequently do is push the same commit to 10 different newly created branches to keep Travis busy over night with 10 test runs and see if I see a stability issue.

Thanks for the review @StephanEwen.
Concerning changing the contract for commitSpecificOffsetsToKafka:
Makes sense, I don't really like excessive copying too. With proper tests on both 0.8 and 0.9, I think it's reasonable to change this. I'll update this, and probably also rename commitSpecficOffsetsToKafka to reflect the contract behaviour.
Thanks for the tip and test stability, I'll do that ;)

Thanks for the review @rmetzger. I've created several local branches to test out the new IT tests stability as @StephanEwen suggested, and they seem to be fine.
I'll rebase this, address the last few comments, and give the changes a final test run before merging.

Merging this once tests turn green.

Merging this to master now ...


wazevo(amd64): simd f32x4, f64x4 spec tests

same unrelated issue as #2004
--- FAIL: TestFileCache_compiler (77.28s)
    --- FAIL: TestFileCache_compiler/spectest (75.24s)
        require.go:331: expected no error, but was exit status 2: unexpected fault address 0x2c879000

https://github.com/tetratelabs/wazero/actions/runs/7853356149/job/21432882550?pr=2036


Add latest SlimerJS and fix download URLs

Add and fix URLs as stated in #1141

:+1:
thank you @paazmaya


Link examples sites with source code

You have lots of links to examples sites, but no links to the example sites with github repos. This is common with other static site generators trying to showcase their usefulness and for a newbie developer it's invaluable.
I'm just trying to make a basic blog site with markdown files using react-static and I'm already frustrated because I can't find readily available source code that does it.
Please add example sites with source code! It's extremely valuable for newbies.

I'll send out a notice to all of the example owners to PR the source if possible. Good idea :)


App run slow when fast scroll down when use branch "release/v2.0.0-RC4" or crash app in branch "release/v2.1.0" with url special

Hi eneim.
I meet bug below when change url
"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
into
"http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism"
My device

Version 6.0.1
Sony Z3+ Dual

Hi, do you have the crash log? Can you confirm your link works well with ExoPlayer?

"Can you confirm your link works well with ExoPlayer?"
==> Yes. I take link url from https://github.com/google/ExoPlayer/blob/release-v1/demo/src/main/java/com/google/android/exoplayer/demo/Samples.java and It works well in exoplayer
In  ""release/v2.1.0" it show log error:

ATAL EXCEPTION: main
                                                                   Process: forked.app.id.debug, PID: 2124
                                                                   java.lang.IndexOutOfBoundsException
                                                                       at com.google.android.exoplayer2.Timeline$1.getWindow(Timeline.java:107)
                                                                       at com.google.android.exoplayer2.Timeline.getWindow(Timeline.java:161)
                                                                       at com.google.android.exoplayer2.Timeline.getWindow(Timeline.java:148)
                                                                       at im.ene.toro.exoplayer2.ExoVideoView.releasePlayer(ExoVideoView.java:422)
                                                                       at im.ene.toro.exoplayer2.ExoVideoViewHolder.releasePlayer(ExoVideoViewHolder.java:75)
                                                                       at im.ene.toro.PlayerViewHelper.onDetachedFromWindow(PlayerViewHelper.java:78)
                                                                       at im.ene.toro.exoplayer2.ExoVideoViewHolder.onDetachedFromWindow(ExoVideoViewHolder.java:56)
                                                                       at im.ene.toro.ToroAdapter.onViewDetachedFromWindow(ToroAdapter.java:50)
                                                                       at im.ene.toro.ToroAdapter.onViewDetachedFromWindow(ToroAdapter.java:29)
                                                                       at android.support.v7.widget.RecyclerView.dispatchChildDetached(RecyclerView.java:6744)
                                                                       at android.support.v7.widget.RecyclerView$5.removeViewAt(RecyclerView.java:708)
                                                                       at android.support.v7.widget.ChildHelper.removeViewAt(ChildHelper.java:168)

if you are working on a fork, please take a look at ExoVideoView line 40x (in the crash log) and fix the IndexOutOfBoundException <- work around for now. I will fix it later on my ongoing branch.

Sorry, Bug log error above happen when I test in branch "dev-v2" and I deleting the wrong code when build app.
But I still get an error as image below when fast scroll down or up with link url "http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism" in branch "release/v2.0.0-RC4" and "release/v2.1.0"

@sonvp Can you checkout branch dev-v3 and try it again?

In branch "dev-v3" when I build app , I get error in class "ExoVideoView.java" .I have to change exoPlayer2Version = 'r2.1.1'==>  exoPlayer2Version = 'r2.0.4'. And run app, I get log error below when fast scroll down or up with link url "http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism"
Log Error:
java.lang.IndexOutOfBoundsException
                                                                       at com.google.android.exoplayer2.Timeline$1.getWindow(Timeline.java:107)
                                                                       at com.google.android.exoplayer2.Timeline.getWindow(Timeline.java:161)
                                                                       at com.google.android.exoplayer2.Timeline.getWindow(Timeline.java:148)
                                                                       at im.ene.toro.exoplayer2.ExoVideoView.releasePlayer(ExoVideoView.java:421)
                                                                       at im.ene.toro.exoplayer2.ExoVideoViewHolder.releasePlayer(ExoVideoViewHolder.java:75)
                                                                       at im.ene.toro.PlayerViewHelper.onDetachedFromWindow(PlayerViewHelper.java:78)
                                                                       at im.ene.toro.exoplayer2.ExoVideoViewHolder.onDetachedFromWindow(ExoVideoViewHolder.java:56)
                                                                       at im.ene.toro.ToroAdapter.onViewDetachedFromWindow(ToroAdapter.java:50)
                                                                       at im.ene.toro.ToroAdapter.onViewDetachedFromWindow(ToroAdapter.java:29)

Hmm, @sonvp it is weird, can you make a clean clone for dev-v3? I have updated ExoVideoView to match latest ExoPlayer update though. Please clear stuff and rebuild to prevent cache :D.

I had rebuild project but still not solve problem . If i not change exoPlayer2Version = 'r2.0.4' , it will show error :

Class 'ComponentListener' must either be declared abstract or implement abstract method 'onTracksChanged(TrackGroupArray, TrackSelectionArray)' in 'EventListener
Cannot resolve constructor 'DefaultTrackSelector(android.os.Handler, com.google.android.exoplayer2.trackselection.TrackSelection.Factory)'.

@sonvp here is server version of dev-v3 ExoVideoView: link which already has "onTracksChanged" implemented. Can you confirm the content? Please make sure you are on sync with origin or upstream dev-v3 branch :-?

Thank @eneim . I think mistake something .I checkout again branch "dev-v3" and test app. I not see errors above.
Thank again.


Allow resolving did:webs with ports

A few months ago, while maintaining the fork for LEF, I noticed that did:web's with ports currently aren't being resolved! The spec states to percent encode the colon as %3A for ports, so I added that in!
This is particularly useful when hosting dids locally and trying to resolve a did:web:localhost%3A3000 did during development. I also accounted for this by adjusting the http check from domain_name == "localhost" to domain_name.starts_with("localhost"), thereby allowing the domain localhost%3A3000 to still use http rather than https.

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

This is already done, and I've already got two other PRs merged here! (https://github.com/spruceid/ssi/pulls?q=is%3Apr+author%3ATaylorBeeston+is%3Aclosed)
(see https://github.com/spruceid/ssi/pull/442#issuecomment-1140058966)

Thank you for the PR


[SCRUM-39]chore: set Webcam container to sit next to Captured image, …

…used tailwind classes to modify text

LGTM!


Missing Structure object?

In file search_model_gdas.py in lib/models/cell_searchs package.
from .genotypes import Structure

I can not find the Structure object. Could you share this file?

The method forward_gdas  in SearchCell class doesn't exists too.
Could you share this method?
Thanks!

Thanks.

@auroua Please find the functions at https://github.com/D-X-Y/NAS-Projects/blob/master/lib/models/cell_searchs/search_cells.py#L47


ffi-rzmq only supports 3.2.x + 4.x API of ZMQ

Updated documentation to reflect current state (ffi-rzmq supports zmq 3.2.x or 4.x)

Hi @breml, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile?

@karmi just updated my profile.

I only changed comments. It seems the build is otherwise broken.

@karmi, @avishai-ish-shalom in this PR I only changed some commets, the failing of the travis ci builds was due to an other problem. Do you mind to have a look at this PR and merge it?


📃: Spotify Clone

:red_circle: Title : Spotify Clone
:red_circle: Aim : I want to add Spotify clone to frontend projects
:red_circle: Tech Stack Used : React
Screenshots 📷

:white_check_mark: To be Mentioned while taking the issue :

Full name : Pasupuleti Revanth
What is your participant role? GSSOC'24 (Mention the Open Source Program name. Eg. GSSOC, SSOC, JWOC, etc.)

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Please assign me this issue under GSSOC @Avdhesh-Varshney


isValid read-only during testing for Ember 1.11

I have a model ModelA which has a nested model NestedModelB. ModelA looks like this:
export default DS.Model.extend(EmberValidations.Mixin, {
  /* Associations */
  nestedModelB: DS.belongsTo('nestedModelB'),

  /* Validations */
  isValid: function() {
    return this._super() && this.get('nestedModelB.isValid');
<EMAIL_ADDRESS>'nestedModelB.isValid')
});

So every instance of ModelA is valid iff it is itself valid and its nested models are valid. I have a unit test for ModelA that tests this:
test('isValid', function() {
  Ember.run(function() {
    // Make sure that modelA is valid in itself
    const modelA = this.subject();
    const nestedModelB = this.store().createRecord('nestedModelB', { modelA: modelA });

    nestedModelB.set('isValid', false);
    ok(! modelA.get('isValid'));

    nestedModelB.set('isValid', true);
    ok(modelA.get('isValid'));
  });
});

This worked in Ember.js up until 1.10. However, after upgrading to Ember 1.11, it says cannot set read-only property isValid on nestedModelB.
I searched the ember-validations repository for the keyword readOnly but there's no match. So I'm not too sure how this isValid property becomes readOnly.

DS.Model's isValid property is now readOnly

@raycohen I wasn't aware that it was in Ember Data, not in ember-validations. Thanks!

If you use the ember validations mixin with your nestedModelB's DS.Model.extend you will get the isValid CP from this project and it should not error when using nestedModelB.set('isValid', ...)


ESP32-C3: ADC documentation issues (IDFGH-11205)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
When checking in the ESP-IDF Programming Guide documentation for ADC, I noticed two issues:

Here the programming guide mentions 11 dB attenuation:

enumerator ADC_ATTEN_DB_11
The input voltage of ADC will be attenuated extending the range of measurement by about 11 dB (3.55 x)

However, the TRM mentions 12 dB instead:

So which one is correct?

Here the programming guide mentions bit widths ranging from 9 to 13, but the TRM only mentions 12 bit and the formula has a fixed value of 4095:

Are bit widths other than 12 supported (emulated?) by ESP-IDF?

@cyberhuman
About the attenuation, both of them are wrong. Should be 10dB.
We'll update the TRM as well.
About the bitwidth, there's check when using the ADC driver, other enums (except for ADC_BITWIDTH_12) are left for extensibility.

@Icarus113 I'm sorry but can you please confirm that the attenuation is indeed 10dB? I'm asking because I made some measurements and they don't quite match the provided number.
I have a battery-powered ESP32-C3 (via a voltage regulator of course). The battery output is connected to ADC1 channel 4 via a voltage divider, 2:1. The attenuation is set to ADC_ATTEN_DB_11. The reading I get in the one-shot mode is 2872. Using the formula, 2×1.1V×10^(10÷20)×2872÷4095=4.88V but the voltmeter shows 4.09V (all expected since it's nearly charged LiPo battery).
Going backwards from the measured values, the attenuation is 20log(4.09V÷(2×1.1V×2872÷4095))=8.47. Even trying with Vref=1.0 or 1.2 the value is between 7.7dB and 9.3dB.
Are my calculations wrong, or am I missing something?

@cyberhuman  Hi, sorry for the late update here. The condition is:
By design, when using the ADC_ATTEN_DB_11, the hardware will try to attenuate the input signal to its 1/4. This means by design the attenuation is 12dB. But in reality there are some errors there, so the code says it's attenuation is 1/3.55. This error is different among chips.
Besides, the  2×1.1V×10^(10÷20)×2872÷4095 is not a recommended way as 2872 is the raw result from the adc oneshot mode. ESP-IDF provided a calibration scheme to help you get real voltage number, see this adc_cali_raw_to_voltage API and this example.
Therefore you can select an attenuation based on this data in the C3 datasheet:

About the plan, as by design we expect the attenuation to be 12dB, we'll update the code to ADC_ATTEN_DB_12 later. And we'll try to give an attenuation error in the datasheet.

@Icarus113 thank you for the explanation!
I saw the adc_cali_raw_to_voltage API but I was scared off from using it by unclear documentation. Some high-level description of how it is supposed to work is missing (or I just didn't manage to find it). Specifically, the ADC Calibration Driver documentation mentions the call adc_cali_create_scheme_curve_fitting may fail because "the calibration scheme required eFuse bits are not burnt on your board". The example you referred to also mentions it in the Troubleshooting section  but it is not explained what needs to be done to use this functionality.
It would be great if the documentation explained it.

@Icarus113 I went ahead with the ADC calibration driver and it worked out of the box. Thank you!
Still, more clarity in the documentation would still be greatly appreciated.

@cyberhuman
Thanks for the feedback. So you're confused because the lack of the description about failures due to ADC calibration related efuse bits, am I understanding this correctly?

@Icarus113 yes I was looking at that documentation page, and yes

confused because the lack of the description about failures due to ADC calibration related efuse bits

Especially, when the function return ESP_ERR_NOT_SUPPORTED, this means the calibration scheme required eFuse bits are not burnt on your board.

=> without the high level understanding of how the calibration works raises questions like

which exactly eFuse bits?
do I have to burn them myself? how?
etc...

Hi @cyberhuman
Thanks for letting us know.
ESP-IDF provided ADC calibration scheme is based on the values in certain ADC calibration related on-chip eFuse bits. Espressif guarantees these bits during module manufacturing, so you don't have to burn theses eFuses bits yourself.
I will add some notes in the doc clarifying this, as well an official link to contact us.


Remove OASP after devon migration

OASP still occurs in our scripts as OASP_PROJECT_HOME:
https://github.com/devonfw/devon-ide/blob/master/scripts/src/main/resources/scripts/environment-project#L6
We should get rid of all this legacy stuff and clean up. Maybe we do not even need the variable (see #5).

The crucial thing is that this is used in the variables script:
https://github.com/devonfw/devon-ide/blob/master/scripts/src/main/resources/variables#L15
However it may only cause issues if some user used it in his personal variables-customized file.

Interesting is that the variable is not defined on windows. As Linux support is currently broken anyway and not really used, I do not see any risk for cleanup here.

IMHO folder names like

software (SOFTWARE_PATH)
workspaces (WORKSPACES_PATH)
conf (CONF_PATH)
scripts (SCRIPTS_PATH)

could all be hardcoded. There is absolutely no need to make this customizable. This is only a source for errors that make debugging errors more complex.
Please note that no linux and mac you can use regular symlinks (ln -s) if you have no space left on your projects device and want to have big software somewhere else. This is even possible on windows with Link Shell Extension (http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html).

Done.


Issue 1137 with test

A test passing locally fails on Jenkins.  Opened this PR to help investigate.

Re-open if needed.


Get some analytics on RSS

Since I've got privacy-respecting analytics, why not get some info on who's coming in via RSS?
I can add utm_source=RSS&utm_medium=none&utm_campaign=none&utm_content=rss_feed to the links within the RSS feed and get an understanding of whether anyone is using it. (I love RSS, so mostly this is just interesting to me)

https://github.com/jekyll/jekyll-feed/issues/410


feat(rejected items): [BACk-1492] Make fields optional on rejected items

Goal
Fix a long-running bug in the Curation Admin Tools when occasionally the Prospecting page crashes on fetching prospects.

Updated GraphQL schema to make topic, publisher, title and language fields optional.

Updated Prisma schema to make topic (the only field from the above list that was not yet optional) optional.

Took this opportunity to rename the Prisma entity and all other references to RejectedItem (was: RejectedCuratedCorpusItem). Updated all tests and helpers.

Updated some Faker library calls to remove deprecated notices from integration tests.

References
JIRA ticket:

https://getpocket.atlassian.net/browse/BACK-1492

Force-pushing the commit to reference the correct JIRA ticket.


Since the syntax is similar to Scala can it be contributed to Scala 3.+?

Can the work done here be directed so it can be added to a production language like Scala. It would be good to have it sooner than later hence can the research be adopted and contributed to Scala 3.+?

This is a very good question and sorry for only responding now! Yes, the syntax is very similar, but the underlying language is still far away from Scala. We do not have subtyping, path-dependent types, or objects in Effekt. So there is still a lot of research left to be done :)

I mean use the insight to contribute to effects implementation in Scala.

Thanks for the suggestion. Indeed we are in close collaboration with the Scala team. I am closing this issue, since it is not directly actionable. But feel free to ask any questions :)


Average time

Adding average time, following on from clisops pr: https://github.com/roocs/clisops/pull/211

Hi @ellesmith88, this looks great. Please go ahead and merge. Thanks

@cehbrecht FYI that average time is now in daops


Problem with number of Processors and Cores in a virtual machine

Describe the bug
We are using the library in a virtual machine hosted in Digital Ocean, and it seems like there is a misleading in the info retrieved by cpu function, mixing processors and cores
To Reproduce
When using the si.cpu() function
Current Output
{
"manufacturer": "Intel®",
"brand": "Xeon® Gold 6140",
"vendor": "GenuineIntel",
"family": "6",
"model": "85",
"stepping": "4",
"revision": "",
"voltage": "",
"speed": "2.30",
"speedmin": "",
"speedmax": "",
"governor": "",
"cores": 4,
"physicalCores": 4,
"processors": 4,
"socket": "",
"cache": {
"l1d": 131072,
"l1i": 131072,
"l2": 16,
"l3": ""
},
"flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 pku ospke md_clear",
"currentSpeed": {
"min": 2.29,
"max": 2.29,
"avg": 2.29,
"cores": [
2.29,
2.29,
2.29,
2.29
]
},
"currentLoad": {
"avgload": 0.02,
"currentload": 5.955334987593052,
"currentload_user": 1.9851116625310175,
"currentload_system": 3.970223325062035,
"currentload_nice": 0,
"currentload_idle": 94.04466501240695,
"currentload_irq": 0,
"raw_currentload": 240,
"raw_currentload_user": 80,
"raw_currentload_system": 160,
"raw_currentload_nice": 0,
"raw_currentload_idle": 3790,
"raw_currentload_irq": 0,
"cpus": [
{...},
{...},
{...},
{...}
]
},
"temp": {
"main": -1,
"cores": [],
"max": -1
}
}
Expected behavior
We think that from DO documentation, each vCPU = 1 core, so as we are using 4vCPU it means 4 cores of 1 single processor so the output should be at least something like this:
{
...
"cores": 4,
"physicalCores": 4,
"processors": 1,
...
}
We don't really know how the virtual machine treats the cores and physical cores but the processor should be 1
Environment (please complete the following information):

systeminformation package version: 4.27.3
OS: Ubuntu 20.04
Hardware: virtual machine hosted in DO

Thank you so much, once again, for your wonderful library.
Best regards

@jiferrero can you run the following two commands:
lscpu
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

and post the output here? Thank you in advance.

Hi @sebhildebrandt .... yes sure... following you can find lscpu command output
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   40 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              1
Socket(s):                       2
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
Stepping:                        4
CPU MHz:                         2494.096
BogoMIPS:                        4988.19
Virtualization:                  VT-x
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        8 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabled
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and _user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant
tsc arch_perfmon rep_good nopl cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_ti
mer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb tpr_shadow vnmi flexpriori
ty ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx51
2bw avx512vl xsaveopt xsavec xgetbv1 pku ospke md_clear
The cat output for system cpu it is not available far away of cpu0 so I can not give you the route you asked it for...
It that helps you?
Thank you in advance

@jiferrero thank you! This helps a lot identifying the issue. I guess I will provide a fix tomorrow.

Thank you so much @sebhildebrandt ... that's would be awesome!

@jiferrero I had a look at the output of lscpu you provided ...
Due to this output, we have a machine with 2 physical processors (socket(s) = 2)
funny enough that systeminformation gives the output you provided ... with this lscpu output we should get
{
   ...
   "cores": 4,
   "physicalCores": 4,
   "processors": 2,
   ...
}

One more favour: can you recheck the following:
Command line:
lscpu | grep "Socket(s):"

In node (cli)
os.cpus().length;

with systeminformation (latest version):
const si = require('systeminformation');

// promises style - new since version 3
si.cpu()
    .then(data => console.log(data))
    .catch(error => console.error(error));

Can you post once again the output ... Thank you so much!

hi @sebhildebrandt ...... oh yes so funny that's a fault of mine .... we destroyed the virtual machine a couple of days ago before and I did not realize it when you answered me
The output I gave you yesterday was in a virtual machine with 2 vcpu what it is maybe more consistent with what you have expected to have... sorry again about this mistake.
But I'm still don't understand how to map this info, I mean if systeminformation recognizes 2 physical sockets and 4 physical cores with no hyperthreading then then info provided at digital ocean of 2vcpu equivalent to only 2 cores are far away of systeminformation given power XD

@jiferrero OK, but then ... if you run the systeminformationcode one more time on the new machine ... you should get:
{
   ...
   "cores": 2,
   "physicalCores": 2,
   "processors": 2,
   ...
}

... which should be fine, right? Can you check it?

yes @sebhildebrandt ... you are right ... the output of systeminformation for cpu on this new machine with 2 vcpu is the following:
{
manufacturer: 'Intel®',
brand: 'Xeon® Gold 6140',
vendor: 'GenuineIntel',
family: '6',
model: '85',
stepping: '4',
revision: '',
voltage: '',
speed: '2.30',
speedmin: '',
speedmax: '',
governor: '',
cores: 2,
physicalCores: 2,
processors: 2,
socket: '',
cache: { l1d: 65536, l1i: 65536, l2: 8, l3: '' }
}
But the question is still that I think that processors in the virtual machine is correlated to physical cores, I mean the other machine with tested on before destroyed showed up
{
...
"cores": 4,
"physicalCores": 4,
"processors": 4,
...
}
so I suppose that a machine with 8 vcpu will shows up those fields filled with 8 and a machine with 40 vcpu will shows up 40 on all those same fields

@jiferrero So here some details:

cores are dependent on what node really sees (os.cpus().length;), and what lscpu shows in the line CPU(s) ... these should be the same.
physicalCores defaults to cores but if there are more detailed information like in lscpu line thread(s) per core I can then calculate the physical cores. In your example this line returns 1 so cores = physical cores
processors defaults to 1 but if lscpu returns a line with socket(s):  then THIS is the true number of processors.

In this specific case this is the same. So if you have 4 vCpus then it depends on the implementation of lscpu or to be more specific: how linux "sees" the virtual cores. If lscpus returns 4 sockets but physically there is only one, then linux thinks there are 4 processors and so does systeminformation. I do not see a better way to get the true number of processors if linux also "fails" to get it correctly.
Hope this makes it clear. I would the close this issue ...
And one more time: thank you for helping testing!!!

hi @sebhildebrandt ... thank you for all of this information an all your time and effort to make this awesome library, we all appreciate it so much. We keep in touch for other issues and enhancements as we still on developing...
You can close this issue
Thank you again

@jiferrero you are welcome! If you have any other issues just give me a note. I really appreciate all comments to improve this library ;-) Have a nice Sunday!


extundelete: fix build with e2fsprogs 1.44

Motivation for this change
Didn't build  with e2fsprogs 1.44 because one of the inode fields was renamed and repurposed.
Please backport to 18.03.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Success on x86_64-linux (full log)
Attempted: extundelete
Partial log (click to expand)
Making install in src
  /nix/store/jy9knxp7nmw80jkf932axrs1b4p9k4hi-coreutils-8.29/bin/install -c extundelete '/nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4/bin'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4
shrinking /nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4/bin/extundelete
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4/bin
patching script interpreter paths in /nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4
checking for references to /build in /nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4...
/nix/store/jayndzmal4blf9j53q2yh0621cwwwkky-extundelete-0.2.4

Success on aarch64-linux (full log)
Attempted: extundelete
Partial log (click to expand)
Making install in src
  /nix/store/0svz5all13h1lxkfbx5y9vvy6r4cy422-coreutils-8.29/bin/install -c extundelete '/nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4/bin'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4
shrinking /nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4/bin/extundelete
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4/bin
patching script interpreter paths in /nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4
checking for references to /build in /nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4...
/nix/store/2ndznqrvr1crlhz16pc14p8nigab1fq8-extundelete-0.2.4

@Mic92 please backport to 18.03. Thank you.

[detached HEAD a228c69892a] extundelete: fix build with e2fsprogs 1.44
Author: xeji<EMAIL_ADDRESS>Date: Sun Apr 15 01:23:07 2018 +0200
1 file changed, 8 insertions(+)


9cc436abbbbe11c78811ffd6727b11a2

sentry_9cc436abbbbe11c78811ffd6727b11a2.json.zip
New Issue Checklist

[x] Updated fastlane to the latest version
[x] I have read the Contribution Guidelines

Issue Description
Complete output when running fastlane, including the stack trace and command used
INSERT OUTPUT HERE

Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
# INSERT CONTENT HERE

Environment
fastlane version (run fastlane -v):
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)?

Hi @sopig! Great to hear that you are using Fastlane. Can you provide more details about the issue you are experiencing so we can look into it. Fill in each part of the template above.
Thanks!


Add selector to extract current page URL

Coverage decreased (-0.42%) to 36.53% when pulling d31cfe51facc7aea6a1ff7255f161aefdb045921 on AlexMathew:scrapple into 597cba9e2cd1c6287d784e0c32f2d84734d90f65 on scrappleapp:master.

Coverage decreased (-0.42%) to 36.53% when pulling d31cfe51facc7aea6a1ff7255f161aefdb045921 on AlexMathew:scrapple into 597cba9e2cd1c6287d784e0c32f2d84734d90f65 on scrappleapp:master.


Make the HTML alternative arguments to text clearer

Currently several of the Nunjucks macros also accept html arguments, as well as text, which has the effect of not escaping the HTML tags.
This is documented here: https://github.com/alphagov/govuk-frontend/blob/master/package/components/details/README.md#component-arguments and linked to from relevant components, but is easy to miss. (Well, that might just be me).
One option might be to add some documentation and examples of the HTML alternatives to the relevant component pages, eg https://design-system.service.gov.uk/components/details/
This could be achieved by some explanatory text and an alternative example like the following:
{{ govukDetails({
  summaryText: "Help with nationality",
  html: "
We need to know your nationality so we can work out which elections you’re entitled to vote in.

If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.
"
}) }}

Hey Frankie,
This sounds like it relates more to the way we document the components in the Design System than it does to Frontend itself? Assuming that's the case and I'm not misunderstanding, would you mind raising this issue in the Design System repo instead?
Ta!


Enabling vim-plug conflicts with VHDL indent

Hello,
I just discovered that simply enabling vim-plug causes the default VHDL indent plugin to fail indenting VHDL code. It's fairly easy to reproduce with he following snippet:
entity latch is
begin
port(
a : in bit
);
end entity latch;

Loading that snippet in a .vhdl file and calling gg=G without vim-plug enabled results to this:
entity latch is
begin
port(
                a : in bit
    );
end entity latch;

While doing the same with vim-plug enabled results to that:
entity latch is
begin
  port(
    a : in bit
);
end entity latch;

Could you please take a look ?
Thanks !

before using vim-plug, did you use filetype indent in your config? seems like you didn't and vim-pug use that by default. look at #156

Hi, I think @vheon is spot on. vim-plug enables filetype-specific indentation (filetype indent on) and it gives me the following result:
entity latch is
begin
  port(
        a : in bit
      );
end entity latch;

But you can disable indentation by saying filetype indent off just after plug#end() call and it gives
entity latch is
begin
port(
    a : in bit
    );
end entity latch;

(note that I have set expandtab tabstop=2)
Isn't the former what you would expect for VHDL file? I don't see anything wrong with the current behavior. Thanks.

Actually it is. I just realized I had a wandering ';' at the end of my last line, causing the closing ')' to improperly indent. Sorry for the noise.

No problem.


Changing the UI of the source button

Hey ! . I want to contribute to this by changing  the UI of the source button by adding some of  the hovering feature to the button , adding  font color, changing the shape  and background color of the button etc   .Kindly assign me this issue.

@anjana-18Singh Issue assigned to you


fix Issue 113, allow setting to "no"

allow setting "Cache = no"

The specs need to be adapted to pass

This PR will result in a change of default behavior, setting the cache to no by default.
@bastelfreak @ekohl what do you think?


environment variables are no longer expanded in engine scripts

This used to work, but master fails with [Engine] [12:37:34.793525] <140474469795392> dumb2uci ---> python: can't open file '/git/cdblib/cdb2uci.py': [Errno 2] No such file or directory.
> rm -f cdblog.txt && ./fastchess -engine cmd=../stockfish/src/stockfish name=sf tc=1+0.1 -engine cmd=../cdblib/dumb2uci.sh name=dumb2uci tc=10+5 -concurrency 1 -openings file=grob.epd -log file=cdblog.txt level=trace -rounds 2 -games 1 -pgnout file=grob_sf_cdb2uci.pgn
Started game 1 of 2 (sf vs dumb2uci)
Engine dumb2uci didn't respond to uci with uciok after startup.
Finished game 1 (sf vs dumb2uci): 1/2-1/2 {}
Finished match

> cat ../cdblib/dumb2uci.sh
#! /bin/bash

python $HOME/git/cdblib/cdb2uci.py -c 1

I could do a bisect to find which commit caused it, but likely culprits are the ones dealing with CTRL-C.
Edit: Original post was for old binary, repeating with new fastchess binary gives same error.

In cutechess this works, see e.g.  #623.

https://github.com/Disservin/fastchess/commit/48ce9aa9cfd5e194ccd2ac75705a84b19ff47ba0
must be this one

can you check if replacing inline with extern here works ? https://github.com/Disservin/fastchess/blob/master/app/src/engine/process/process_posix.hpp#L50

does not build for me:
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:163: ..//fastchess] Error 1
make[1]: Leaving directory '/home/rn/git/fast-chess/app'
make: *** [Makefile:3: all] Error 2

> git diff
diff --git a/app/src/engine/process/process_posix.hpp b/app/src/engine/process/process_posix.hpp
index 9e5c346..176afc9 100644
--- a/app/src/engine/process/process_posix.hpp
+++ b/app/src/engine/process/process_posix.hpp
@@ -47,7 +47,7 @@ extern std::atomic_bool stop;

 namespace engine::process {

-inline char **environ;
+extern char **environ;

 class Process : public IProcess {
    public:

Mh maybe move it out of the namespace

Ok. That solves the issue for me:
> git diff
diff --git a/app/src/engine/process/process_posix.hpp b/app/src/engine/process/process_posix.hpp
index 9e5c346..33968c6 100644
--- a/app/src/engine/process/process_posix.hpp
+++ b/app/src/engine/process/process_posix.hpp
@@ -38,6 +38,8 @@

 #    include <argv_split.hpp>

+extern char **environ;
+
 namespace fastchess {
 extern util::ThreadVector<ProcessInformation> process_list;

@@ -47,8 +49,6 @@ extern std::atomic_bool stop;

 namespace engine::process {

-inline char **environ;
-
 class Process : public IProcess {
    public:
     virtual ~Process() override { killProcess(); }


Adding Filter module

This is a follow up thread of  https://github.com/googlei18n/fontmake/issues/275
Overview
Create ufo2ft/filter.py module, which is constructed by the private com.github.googlei18n.ufo2ft.filters key in ufo.lib
Some pseudocode
class Filter:
  def __init__(self, ufo):
    if not ufo['com.github.googlei18n.ufo2ft.filters']:
      return
    self.transform = ...
    self.keepoverlap = ...
  def apply(ufo):
    '''Apply the filter to ufo'''
    for glyph in ufo:
        glyph.move(self.transform)
        ....

I was thinking of the following suggestions from Cosimo:

The default filters would live in a sub-package, e.g. ufo2ft.filters, each in its own module. They could be based on the PointPen API (see ufoLib/pointPen.py), which is the standard way in the UFO world to manipulate outlines. They would work like "filter" pens, i.e. pens that take another pen that actually does the drawing, and before passing drawing commands to the inner pen, they do some transformations (the fonttools TransformPen is an example).

It's a great idea to make filter as a intercepter (Alternatively we will use glyph.move() provided by defcon to do the transformation, but it's less versatile than pen I guess).
From my understanding it looks like this:
# filterPen.py
class FilterPen:
  def __init__(self, ufo, pen):
    self.transform = XXXX
    self.pen = pen
  def _moveTo(self, pt):
    pt += transform
    self.pen._moveTo(pt)
  def _curveTo(self, *pts):
    for pt in *pts:
      pt += transform
    self.pen._curveTo(*pts)

# outlineCompiler.py
def setupTable_glyf(self):
  ...
  pen = TTGlyphPen(allGlyphs)
  filterpen = FilterPen(ufo, pen)
  glyph.draw(filterpen)

def getCharStringForGlyphs(self, glyph, ..):
  pen = T2CharString...
  filterpen = FilterPen(ufo, pen)
  glyph.draw(filterpen)

Please correct me if I'm wrong, since I don't know how to use the pointPen.py as a base class. And this approach seems to work as well.

Maybe we don't need a specific Filter class; filters can just be treated as pens that take another pen as argument, apply transformations to the coordinates they receive and pass them on the other pen -- which in turn can be another filter pen, etc.
Something like this (maybe should go to fontTools.pens.filterPen?)
from fontTools.pens.basePen import AbstractPen

class BaseFilterPen(AbstractPen):

    """ Base class for segment pens that transform coordinates and pass
    them to another pen.
    """

    def __init__(self, outPen, *args, **kwargs):
        self._outPen = outPen

class PassThroughFilterPen(BaseFilterPen):

    """Does nothing but pass commands to other pen with no modifications."""

    def moveTo(self, pt):
        self._outPen.moveTo(pt)

    def lineTo(self, pt):
        self._outPen.lineTo(pt)

    def curveTo(self, *points):
        self._outPen.curveTo(*points)

    def qCurveTo(self, *points):
        self._outPen.qCurveTo(*points)

    def closePath(self):
        self._outPen.closePath()

    def endPath(self):
        self._outPen.endPath()

    def addComponent(self, glyphName, transformation):
        self._outPen.addComponent(glyphName, transformation)

PointPens come from robofab originally (while segment pens originated in fontTools), and in fact the base class is now in ufoLib package. They carry more information than a segment pen, and the point-based approach lend itself better for some tasks. However, if we want to simply apply some transformations to the outlines immediately before writing glyf and CFF tables, then segment pens should be enough for our ufo2ft filters.
Defcon glyph objects support both the point-pen and the segment-pen protocol (indirectly, via converter pens, also defined in ufoLib.pointPen): to draw a glyph with a point pen, you use it's drawPoint method, to draw it with a segment pen, you use its draw method instead.
Note that the cu2qu.pens.Cu2Qu pen is already one of these filter pen; see how it's being used in ufo2ft OutlineTTFCompiler.setupTable_glyf method.

or actually maybe we need a Filter object, so we can iterate over each glyph in the UFO and instantiate filter pens with given options and the drawing pen of that glyph, returning the transformed glyph:
class BaseFilter(object):

    # subclasses need to override this class attribute
    filterPenClass = None

    def __init__(self, include=frozenset(), *args, **kwargs):
        self.include = include
        self.args = args
        self.kwargs = kwargs

    def __call__(self, glyph):
        if glyph.name not in include:
            return glyph
        newGlyph = glyph.__class__()
        newGlyph.name = glyph.name
        outPen = newGlyph.getPen()
        glyph.draw(filterPenClass(outPen, *self.args, **self.kwargs))
        return newGlyph

I need to run now, sorry!

filterPen.py

For affine transformations there's transformPen in fonttools.

@adrientetar of course, the fonttools' TransformPen is the archetypal filter pen, and we are definitely going to use it for affine transformations.
Here we're trying to build a more modular interface for adding other similar filters.
I like the idea of making Filter callable objects that take a glyph instance and return a new, modified glyph. Then we could accumulate their results through something like an inverse map(): the built-in applies the same function to list of objects, while this applies a list of callables to the same object, for example:
def applyFilters(filters, glyph):
    result = glyph
    for func in filters:
        result = func(result)
    return result

Note that, although pens would definitely be involved in manipulating outline data, there is other glyph data that is not carried with neither segment- nor point-pens, i.e. anchors, width, sidebearings, etc. Basically pens can only do contours and components.
Our filters should be able to also apply modifications to the other glyph data, so it makes sense to have Filter classes that use filter pens inside their __call__ method to deal with outlines, but can also manipulate other glyph attributes directly.

I need to run now, sorry!

No worry Cosimo. Thanks for the instructions!
I'm thinking to implement a straightforward and workable solution in the first PR. And we can enrich it later.
I'm planning to write the FilterPen first, supporting only OffsetX and OffsetY in Transform(probably also support exclude/include parameter).
from fontTools.pens.basePen import AbstractPen

class BaseFilterPen(AbstractPen):

    """ Base class for segment pens that transform coordinates and pass
    them to another pen.
    """

    def __init__(self, outPen, *args, **kwargs):
        self._outPen = outPen

class PassThroughFilterPen(BaseFilterPen):

    """Does nothing but pass commands to other pen with no modifications."""

    def moveTo(self, pt):
        self._outPen.moveTo(pt)

    def lineTo(self, pt):
        self._outPen.lineTo(pt)

    def curveTo(self, *points):
        self._outPen.curveTo(*points)

    def qCurveTo(self, *points):
        self._outPen.qCurveTo(*points)

    def closePath(self):
        self._outPen.closePath()

    def endPath(self):
        self._outPen.endPath()

    def addComponent(self, glyphName, transformation):
        self._outPen.addComponent(glyphName, transformation)

class FilterPen(PassThroughFilterPen):
"""Does transformations based on the ufo2ft filter"""
    def __init__(self, outpen, filter):
        self._outpen = outpen
        self.filter = filter
     def moveTo(self, pt):
        # did some transformation on pt
        self._outPen.moveTo(self, transformedPt)
      # more operations.

Oh here comes the problem. We are so far so good with OffsetX, OffsetY or other parameters in Transform filter.
However, if we want to support the other filter types like AddExtremes, HatchOutlineFilter, etc. I suspect we can not apply the filter via the drawing functions like moveTo(pt) or lineTo(pt), etc. We have to gather the information for all points in a glyph and modify them as a whole.
Now we have two approaches.

apply filter via draw() method
apply filter by modify the data in glyph directly.

I personally like the second option since code in function draw() only knows the points it has drawn and next point that will be draw. It doesn't has a big picture of the glyph.(Am I right?)
class UFO2FTFilter(object):

    def __init__(self, exclude=None, filter):
        self.exclude = exclude or frozenset()
        self.filter = filter

    def __call__(self, glyph):
        newGlyph = glyph.__class__()
        newGlyph.name = glyph.name
        outPen = newGlyph.getPen()
        glyph.draw(outPen)
        if glyph.name in self.exclude: # Guarantee to create a new glyph instance
            return newGlyph
       switch(filter['name'].lower()):
           case 'transformations':
               return self.transformations(newGlyph)
           case 'addextremes':
               return self.addextremes(newGlyph)
        # some more cases

    def transformations(self, glyph):
        if filter.kwargs['offsetX']:
            glyph.move((offsetX, 0))
        # some more cases
        return glyph

def applyFilters(filters, glyph):
    result = glyph
    for func in filters:
        result = func(result)
    return result

And with this approach we can still accumulate the result of applyFilters .

what's the difference between outline and contour? What is component and why do we sometimes need to decompose it?

An outline, generally speaking, comprises contours (which in turn can be seen as lists of points, or lists of segments, in turn lists of points), and/or components (references to other outlines).

code in function draw() only knows the points it has drawn and next point that will be draw

not necessarily; it could also append the points of the current contour in a list, and only when that is closed or ended, it can "flush" all the points that contour before proceeding to the next contour (see in ufoLib.pointPen or cu2qu.pens for the _flushContour method).
As regards the pseudocode above, i'd prefer if each filter class was distinct from one another and each did one thing at a time (transformations, add extremes, etc.); each with the same interface (the init with filter parameters, and the call which applies the filter to an individual glyph). In your example it appears as if there is a single UFO2FTFilter that does all.

An outline, generally speaking, comprises contours (which in turn can be seen as lists of points, or lists of segments, in turn lists of points), and/or components (references to other outlines).

So for example, this 'Q' contains two outlines/contours/components, marked as 1 and 2 in the image.

not necessarily; it could also append the points of the current contour in a list, and only when that is closed or ended, it can "flush" all the points of that contour before proceeding to the next contour (see in ufoLib.pointPen or cu2qu.pens for the _flushContour method).

Good to know. So the it knows the current contour information to apply the filter behavior.

As regards the pseudocode above, i'd prefer if each filter class was distinct from one another and each did one thing at a time (transformations, add extremes, etc.); each with the same interface (the init with filter parameters, and the call which applies the filter to an individual glyph). In your example it appears as if there is a single UFO2FTFilter that does all.

Agreed. Will separate these filters.

That Q's outline contains two (closed) contours.

As to why sometimes we need to decompose components: in CFF there can be no components (sub-shapes that repeat themselves are shared by means of so-called "subroutines", cf. compreffor); in TTF, there can be only two kinds of glyphs (besides the empty ones): simple glyphs with contours, and composite (or compound) glyphs containing only components (references to other glyphs), but not mixed contour-component glyphs. The latter sometimes are useful when drawing and are allowed in source font formats, but not in output binary formats.

As to why sometimes we need to decompose components: in CFF there can be no components (sub-shapes that repeat themselves are shared by means of so-called "subroutines", cf. compreffor); in TTF, there can be only two kinds of glyphs (besides the empty ones): simple glyphs with contours, and composite (or compound) glyphs containing only components (references to other glyphs), but not mixed contour-component glyphs. The latter sometimes are useful when drawing and are allowed in source font formats, but not in output binary formats.

Got it. So decomposing a glyph is basically cuting off the reference link and let the composite glyph contains real contour data rather than references to other glyphs!

contourGlyph1 = [(1,2), (2,2)]
contourGlyph2 = [(2,3), (3,2)]

compositeGlyph = [contourGlyph1, contourGlyph2] # I think it also contains some position config or scaling config for these two components

mixedGlyph = [contourGlyph1, [(3,3), (2,2)]] # This is not allowed in TTF

def decompose(compositeGlyph):
  newGlyph = []
  for component in compositeGlyph:
    newGlyph.append(copy.deepcopy(component))
  return newGlyph

Please correct me if i'm wrong. I was confused by the word 'decompose' since I was thinking it is an operation to 'take apart' a glyph which does not make sense to me :(.  Now it is much more clear.


feat: upgrade debug

Old version drops support for node 4 and 5, which doesn't
affect us all that much.

:tada: This PR is included in version 2.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


COPYING.LESSER (i.e. all caps) not detected and repo wrongfully classified as GPL

I have read issue https://github.com/benbalter/licensee/issues/108 and pr https://github.com/benbalter/licensee/pull/113 in which lgpl detection is special cased. #108 also quotes the instructions from the license saying

If you are releasing your program under the LGPL, you should also include the text version of the LGPL, usually in a file called COPYING.LESSER ...

In the code I read two variations, but not the all caps recommendation above.
        'COPYING.lesser' => 1,
        'copying.lesser' => 1,

In my naivety I assume this is the reason my repository here on github is wrongfully classified as GPL, where it should be LGPL, as I have a file named COPYING.LESSER. Am I correct in my understanding or is this somehow intentional?

@aothms I added an explicit test via https://github.com/benbalter/licensee/pull/159, and it looks like it's passing (meaning that it's accounted for).
Those are tests, but the relevant line is https://github.com/benbalter/licensee/blob/6dffa7383264aa64742fc31eb170c1a38f465029/lib/licensee/project_files/license_file.rb#L47, which is case insensitive (or at least should be).

Many thanks for your quick response, I'm really rather illiterate in ruby. Just hope my repo (https://github.com/IfcOpenShell/IfcOpenShell) can show op as LGPL here on github, that single letter can make a difference to some people.
I've been trying to test things locally, but so far not succeeding. If I especially point licensee to the COPYING file (using a fresh download from gnu officially) I can get it to detect GPL [1], but using the entire directory (which I assume is necessary to have LGPL appended) I get a different hash for the same COPYING file and no match. This seems to be similar to https://github.com/benbalter/licensee/issues/132 somehow.
wget -qOCOPYING https://www.gnu.org/licenses/gpl-3.0.txt
wget -qOCOPYING.LESSER https://www.gnu.org/licenses/lgpl-3.0.txt

$ ~/licensee/bin/licensee COPYING
License file: COPYING
License hash: 7d8eb971d140e485a1cdf7dbabfbb718db2e3dfa
Attribution: Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
License: GNU General Public License v3.0
Confidence: 99.90%
Method: Licensee::Matchers::Dice

$ ~/licensee/bin/licensee .
License file: COPYING
License hash: 8e7c567fed531449221e8e03e9119f38fdd7d4e7
Attribution: Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>

[1] The fixture in this repository has some white space differences so it's not an exact match https://raw.githubusercontent.com/benbalter/licensee/master/spec/fixtures/lgpl/LICENSE

I have the same issue, but in my case both of the licenses are in the same file (goes like copyright -> GPLv3 -> LGPLv3), which github detects as GPLv3

Same problem with our Mapsforge repository.
And until recently problem existed also in our VTM repository, but now it's correctly detected as LGPL.

Same problem with our Mapsforge repository.

GitHub caches the detected license. I redetected the Mapsforge license, but if you have any other repos, GitHub support can redetect the license (or you can update the LICENSE file).
If anyone can reproduce the problem locally, I'd love to be able to recreate it.

Thanks for the quick solution!

or you can update the LICENSE file

This would trigger a license re-detection?
And how update without pushing a different file?
(we have original COPYING and COPYING.LESSER)

This would trigger a license re-detection?

Any push that modifies a license file queues a redetection job. You could do this, e.g., by changing whitespace or updating the copyright year.


Build error with C++17

When trying to build pinocchio 2.1.1 with gcc-8 and the flag -std=c++17, I get a lot of build errors like this one:
pinocchio/serialization/archive.hpp:39:60: error: ISO C++17 does not allow dynamic exception specifications
                              const std::string & filename) throw (std::invalid_argument)
                                                            ^~~~~
pinocchio/serialization/archive.hpp:66:58: error: ISO C++17 does not allow dynamic exception specifications
                            const std::string & filename) throw (std::invalid_argument)
                                                          ^~~~~

I'm not familiar with dynamic exception specifications, but according to cppref, they were deprecated since c++11 and removed in c++17. Is it a good idea to remove them from pinocchio ?

Hi @aelkhour, thanks a lot for this feedback.
We indeed need to make our code compliant with C++17 and C++11. It would be interesting to make them silent for the new versions of C++ I think.

Solved by #788.

Thanks @jcarpent ! Would it be possible to tag a new release?

@aelkhour Done!

Thanks!

Thanks