MEF works for sedmv2

Last little modification to MultiExtParser to make sure it works for everyone. There was a path (splitfile_path) that wasn't utilizing the attribute introduced in the last PR (self.output_img_dir). To accommodate these changes, the call to MultiExtParser in sedmv2/blocks.py has been updated.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 4 (50.0%)  changed or added relevant lines in 2 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.02%) to 82.486%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

mirar/processors/utils/multi_ext_parser.py
1
3
33.33%

Files with Coverage Reduction
New Missed Lines
%

mirar/processors/utils/multi_ext_parser.py
1
43.24%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
8143

Relevant Lines:
9872

💛  - Coveralls


Support fetch submodule by actions/checkout

Changes
Support fetch submodule by actions/checkout in build_test.yaml and formatting_test.yaml

I found out that Flutter 3.13's dart format has changed a little. If you're using Flutter SDK 3.10 or earlier, could you upgrade it with flutter upgrade --force?

I found out that Flutter 3.13's dart format has changed a little. If you're using Flutter SDK 3.10 or earlier, could you upgrade it with flutter upgrade --force?

My Flutter version is 3.10.6, Dart version is 3.0.6.
I will attempt to upgrade SDKs.

@temeddix Ready to be merged.

@bookshiyi Great, I also understand that this is needed for your new PR. Though the CI is not finished yet, because I'm confident that this won't break anything I'll merge it right away.


[$500] Threads - __ fake __ appears in Search list after leaving and rejoining thread

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.15-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause- Internal Team
Slack conversation:
Action Performed:

Go to workspace chat
Send a message
Right click on the message > Reply in thread
Send a message
Leave the thread
Rejoin the thread by clicking on the message in the main chat and sending a reply
Click on the Search icon
Create a split bill with __ fake __

Expected Result:
__ fake __ is not present in the Search list
Actual Result:
__ fake __ is present in the Search list
When splitting bill with __ fake __, app crashes
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/60b28898-9023-4b5d-b8c8-104bbd2ac42e
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~011134428cbeec541d
Upwork Job ID:<PHONE_NUMBER>304057856
Last Price Increase: 2023-12-21

Proposal
Please re-state the problem that we are trying to solve in this issue.
The __fake__ accounts are present in the options list.
What is the root cause of that problem?
We do not filter out the __fake__ accounts while building the list of the participants.
What changes do you think we should make in order to solve the problem?
Here, we should ignore not only Expensify emails, but the __fake__ logins as well:
[...CONST.EXPENSIFY_EMAILS, CONST.REPORT.OWNER_EMAIL_FAKE]

https://github.com/Expensify/App/blob/0b0e664a85ca16c124e6cc641ee8aa02ce940840/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js#L232
We should handle this in other places where we build the optionsList as well.
What alternative solutions did you explore? (Optional)

I have debugged it, It is a backend issue when we open a thread we have left from we call open child report here
https://github.com/Expensify/App/blob/2f7c2b2caa32002455165965d140230a38e3f18c/src/pages/home/report/ReportActionItemThread.tsx#L45-L46
the server response for OpenReport command has the __fake__ personal detail in the list; it only happens for workspace chat not 1:1 chat

when we open a thread we have left from

It's not necessary to leave the thread. This response comes whenever we open an existing thread in a workspace chat.
And while it may be fixed from the BE, it also can be fixed on the FE side without any major difference.

@paultsimura's proposal looks good to me!
I've tested this and the bug doesn't seem to happen for recents list, but we have to make sure we filter out the fake account for all of the lists
🎀👀🎀 C+ reviewed!

@paultsimura's proposal looks good for the front end; I think we should probably fix this in both places. If you want to go ahead with that, I can investigate doing it in BE!

Thanks. The PR is ready for review: https://github.com/Expensify/App/pull/34015

Looks like we're ready for the checklist and payment!

The PR that introduced the bug has been identified. Link to the PR: there isn't a PR that caused this, the data is returned by back end
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: I don't think an additional discussion is needed, this is a pretty minor bug, updating our processes/checklists isn't worth it
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? Yes
Is it an impactful bug? No
The bug has little impact, but it's related to the part of the application that's used a lot and it's easy to test, so we might add a regression test (testing steps from https://github.com/Expensify/App/pull/34015 can be used)

Regression Test Proposal

Go to a workspace chat
Send a message
Right-click on the message > Reply in thread
Send a message
Leave the thread
Rejoin the thread by clicking on the message in the main chat and sending a new reply
Click FAB -> Request Money
Enter amount and proceed to user selection

Do we agree 👍 or 👎

Payouts due:

[x] Contributor: $500 @paultsimura - contract

Contributor+: $500 @eVoloshchak through NewDot Manual Requests
Upwork job is here.

Looks like I didn't request the payment for this (no "Approved payment for.." message). Cannot find the request on Expensify either.
I'll request the payment, but please double-check this hasn't been paid already. Thanks!

I can confirm that this was not paid via Upwork (see summary above) and I don't have the context for a manual request!


doc: fix missing resource cleanup in README

The stdlib example in demonstrate iter.ForEach missed cleanup channel afterwards

Codecov Report

Merging #33 (e1071d5) into main (916b107) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #33   +/-   ##
=======================================
  Coverage   99.44%   99.44%
=======================================
  Files          10       10
  Lines         358      358
=======================================
  Hits          356      356
  Misses          2        2

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


[Bug] Advancement info spamming

Checks

[X] I confirm that I have searched for existing issues / pull requests before reporting to avoid duplicate reporting.
[X] I confirm that I followed the MCDC Docs and read the Changelog, but this problem still exists.
[X] I confirm that I noted that if I don't follow the instructions, the issue may be closed directly.

Minecraft Version
1.20.1
MC-Discord-Chat Version
Latest Build
Description
Hi!
We are using, besides other plugins, Ultris https://modrinth.com/datapack/ultris on our moded server as well as MC-Discord-Chat as the bridge.
This worked actually very well for some time until one specific Ultris advancement got spammed over and over to discord:

The message stops when the specific player logs out, but starts again when he logs in.
We disabled the announcements for the moment. If we turn it on and the player logs in, the messages reappear, spamming several messages each second.
Any suggestion what's going wrong and how to stop this would be highly appreciated!
Latest Log:
latest_2.log
To Reproduce
Get the 'Ultris Conqueror' advancement.

Hi. I am able to reproduce this issue, but I am unable to find the cause of it in the source code of MCDC, as MCDC follows the same way as the game itself to announce advancements.
I believe that the spam may be caused by the Ultris side, as I tested it and it appears that Ultris has a scheduled timer that checks the count of bosses killed and grants advancement to the player at very short intervals.
I suggest that you file an issue with Ultris first, as I currently have limited personal time to delve into further details.

Hi Xujiayao, thanks for responding.
We already got in contact with limesplatus, the Ultris dev through their Discord before I posted on your Github.
Unfortunately they are referring us to you, as they don't see anything wrong with their plugin:

So it seems we hit the wall...

I tested the same scenario using another Fabric Discord mod and found it to have no problem, so this may be a bug in the MCDC code. However, this might take some time to study.

Please try the latest build.

Hi Xujiayao!
I just wanted to give a feedback, sorry for the delay, the week-end passed to quick.
We compiled the version and can confirm that this solved the problem!
Thank you so much for your dedication and help, you are the best :)

Glad to hear that!
Actually, You can find the latest build JAR files at GitHub Actions. 😂

haha! I didn't look there, but I will in future as I wasn't aware of the 'Actions' tab.


instafeed not displaying anything

I'm getting no results on my instafeed.js page, however, the instagram api is returning images. Can anyone tell me what I'm doing wrong? There are no console errors.
html:

jquery:
$(function() {

//Set up instafeed
var feed = new Instafeed({
    clientId: '2b3f8303808e4dd6bbba72023c7c5d65',
    target: 'instafeed',
    get: 'tagged',
    tagName: 'testlaura',
    links: true,
    limit: 8,
    sortBy: 'most-recent',
    resolution: 'standard_resolution',
    filter: function(image) {
        return image.user_has_liked;
    },
    template: '

{{likes}} Likes

{{caption}}
{{model.date}}

'
});
feed.run();

});
"lauratest" is the tag I used on some photos on a different account.

Hey @lschneiderman!  It's possible that might not be doing what you originally intended for it to do.
Most likely, that is filtering out every single image from your feed, which would be why you don't see any results?

Hi, Steven,
Thanks for responding!
I want to just display the images that users submit to a hashtag that we
liked.
Best,
Laura
Laura Malt Schneiderman
Web Content Producer
Pittsburgh Post-Gazette
post-gazette.com
412.263.1923
On Fri, Feb 20, 2015 at 6:00 PM, Steven Schobert<EMAIL_ADDRESS>wrote:

Hey @lschneiderman https://github.com/lschneiderman!  It's possible that might not be doing what you originally
intended for it to do.
Most likely, that is filtering out every single image from your feed,
which would be why you don't see any results?
—
Reply to this email directly or view it on GitHub
https://github.com/stevenschobert/instafeed.js/issues/236#issuecomment-75335469
.

Ah, I see. In that case, you may want to try filtering based on the likes.data array. That array will contain an object for each like the image has received. You could then check the username property of each object to see if your account liked it.
The user_has_liked would require an accessToken to be accurate, since that is what tells the API what the current user is.

Thank you!
Laura Malt Schneiderman
Web Content Producer
Pittsburgh Post-Gazette
post-gazette.com
412.263.1923
On Mon, Feb 23, 2015 at 11:19 AM, Steven Schobert<EMAIL_ADDRESS>wrote:

Ah, I see. In that case, you may want to try filtering based on the
likes.data array. That array will contain an object for each like the
image has received. You could then check the username property of each
object to see if your account liked it.
The user_has_liked would require an accessToken to be accurate, since
that is what tells the API what the current user is.
—
Reply to this email directly or view it on GitHub
https://github.com/stevenschobert/instafeed.js/issues/236#issuecomment-75574749
.

Closing as complete.


Cannot reproduce PPL.

Running the commands from the README:
CUDA_VISIBLE_DEVICES=0 python llama.py ./llama-hf/llama-7b c4 --wbits 4 --true-sequential --act-order --groupsize 128 --save ./llama-gptq/llama7b-4bit-128g.pt

And:
CUDA_VISIBLE_DEVICES=0 python llama.py ./llama-hf/llama-7b c4 --wbits 4 --groupsize 128 --load ./llama-gptq/llama7b-4bit-128g.pt --benchmark 2048 --check

yields:
Median: 0.02406024932861328
PPL:<PHONE_NUMBER>5
max memory(MiB): 4950.0771484375

I'm working with a RTX3090 Ti on Linux Mate, CUDA 11.7. The HF converted model in 16-bits has a PPL of around 5.22 . What am I doing wrong?

I am unable to reproduce this error. If possible, recreate the environment and try the conversion again.

Strange, after removing the Conda env and re-installing everything it worked now. Removing models and updating the repo was not enough (which I tried before opening this issue).
I can't say what caused the problem, but it is resolved now.


can i get max screenshot quality while stream or record every time i got screenshot image its give me quality like streaming quality

No, it is not possible with opengl. I can try implement it with camera1 and camera2 (I'm not sure if I can do it with camera2 without restart camera) but this will not capture filters.


5 issues , when install using package manager

hello,
i'm countered with 5 errors, one of the error was Generic parameter 'Style' could not be inferred
anyone can help?

the version was 2.1.0 and 2.0.0
but when using 1.2.6 the error did not occured.

We've noticed this error too, trying to fix it now, will be done on next release!

+1 to 2.1.0 in Xcode 13.4 building on iPhone 13.0 iOS 15.0

+1 to 2.1.0 in Xcode 13.4 building on iPhone 13.0 iOS 15.0


"QRScanner plugin is not installed" on iOS

I have the plugin installed and working on the Android emulator and on my Android device, but when I try to run on my iPhone or on the iOS emultator, I receive the following message:
[22:08:49]  console.warn: Native: tried calling QRScanner.prepare, but the QRScanner plugin is not installed.
[22:08:49]  console.warn: Install the QRScanner plugin: 'ionic cordova plugin add cordova-plugin-qrscanner'

Well... I don't know what I did, but now this warning isn't showing anymore, altought it's not working yet, the camera doens't open on iOS.


Material reference gives NoneType

When I was attempting to export, I had issues with "data.materials[matindex] giving NoneType and crashing the Blender v2.64 exporter (I'm running Blender v2.69 on Linux). I made the following quick fix at line #855:
matprefix = ((data.materials and data.materials[matindex]) and data.materials[matindex].name) or ''

The change in question is to check if data.materials[matindex] exists before referencing its name attribute.

Okay, fixed.


GAIA Access-Control

Currently the Gaia Access Control for files is defined as such:
"Access control in a gaia storage hub is performed on a per-address basis. Writes to URLs /store// are only allowed if the writer can demonstrate that they control that address. This is achieved via an authentication token, which is a message signed by the private-key associated with that address. The message itself is a challenge-text, returned via the /hub_info/ endpoint."
After researching and interviewing various people, we came to the conclusion, that it would be beneficial for Gaia and every party involved, that the access control system is extended in such a way, that one user can grant access to their files to other users.
Additionally it should also be possible to write data on behalf of a user.
Note: it should NOT be possible to read data, only to write data
https://github.com/amark/gun
https://gun.eco/
https://ceramic.network/
LDAP type service as discussed in Slack
The process should look as follows:

Create / run a data base (one of the mentioned above)
Look up (in code) where Gaia implements the access control
Find a way to “overwrite” / add the data base permission layer

Following comments are copied from Asana (written by @wwwhickup)
Below is a database schema.
https://dbdiagram.io/d/6328c4e80911f91ba5e82fdd
Below is a process flow diagram.
https://cloud.smartdraw.com/share.aspx/?pubDocShare=84D5551C63D6E3CEDE3E09EBA2E8A35B742
I am thinking about below things.
what message has to be signed
The user control/permission layer should be under the Admin or Hub server
Where we will keep the database? in the same driver or specific gaia database provider?
Please check the database schema and process flow diagram. And commit your thought.
@wileyj could you look into the db schema and also the part regarding what message should be signed?
@wwwhickup feel free to comment any open question here rather then in Asana

Additionally it should also be possible to write data on behalf of a user.

To be clear, this is possible only if the user gives the writer permission, right?

Note: it should NOT be possible to read data, only to write data

How do you intend to enforce this when Gaia is not on the read path?  If you store your data into Amazon S3 or a directory on disk that gets served by a vanilla HTTP server (both modes are supported), then the only way to prevent someone from accessing your data is to encrypt it before you upload it (which is what apps do today).

what message has to be signed

The bearer token needs to be signed by the writer, and needs to indicate the user address it's writing on behalf of.  This is indicated today by the association token.  On receiving the write, the node would need to verify that the user has authorized the writer.

Where we will keep the database? in the same driver or specific gaia database provider?

If possible, I think it would be best to keep this database on the back-end storage provider like how we do with revoked auth timestamps.  I'm not sure how feasible this will be, but if (1) the data schema is basically just a key/value store [1], and (2) the user is only authorizing a small number of writers (e.g. less than 100), then it might make sense to simply store the authorization state as a set of small JSON blobs in the driver.
[1] Looking at the database schema, it looks like the only relations you really need are:

Given the writer, look up the user who authorized it (if they exist)
Given the user, look up the writers they authorized

If that's it, then a set of JSON blobs might be good enough, and you don't need to worry about running a separate DB process or storing authoritative state locally on the hub itself.  If we can keep it so we don't need either of these things -- i.e. keep the Gaia hub stateless -- then it remains possible for users to deploy hubs in serverless environments (which are cheaper and easier to manage).
Thoughts?

@jcnelson regarding the "writing data on behalf of another user"
Yes, the user has to give permission - otherwise it should not work
also the part about not reading the data - right now we disregard this point - this is a residual from the initial planning - will edit the task accordingly.
The other suggestions seem to be well thought and we consider them.
Thanks for helping us!

@bjorger There is the ucan authentication method (https://ucan.xyz/)  that could be helpful to implement permission delegation, no need for a database, only cryptographic verifications.
There is a library https://github.com/web3-storage/ucanto for that already.


deploy kubeflow on existing IKS

support apply and destroy which deploy and un-deploy
accordingly.
Signed-off-by: Yihong Wang<EMAIL_ADDRESS>

I verified this by doing apply and destroy twice. the workspace worked properly.


Noexec flag for tmp folder breaks things

~$ crystal init app test
      create  test/.gitignore
      create  test/LICENSE
      create  test/README.md
      create  test/.travis.yml
      create  test/Projectfile
      create  test/src/test.cr
      create  test/src/test/version.cr
      create  test/spec/spec_helper.cr
      create  test/spec/test_spec.cr
Initialized empty Git repository in ~/test/.git/
~$ cd test
~/test$ crystal spec
sh: 1: /tmp/crystal-run-spec.LdTVjk: Permission denied
Program terminated abnormally with error code: 32256

OS is Debian 8.0.
/tmp folder is mounted with noexec for security reasons.
Is there a project-wide config file where I can put TMPDIR=./tmp so crystal would apply it without needing to write TMPDIR=./tmp crystal spec every time?

@ujifgc I changed it to use the .crystal directory, which we are already using for temporary files. To test this you'll have to wait until the next release or compile a compiler. Please reopen if this didn't work for you or there's something missing. Thanks!


C#: duplicated interface/class in client generation

I have an api with a method called /search/sharepoint with 2 operations :

get_search
post_search (which takes a payload)

It generates 2 interfaces and 2 classes with the same name :
public partial interface IApiClient
    {
        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        System.Threading.Tasks.Task SearchAsync();

        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        System.Threading.Tasks.Task SearchAsync(System.Threading.CancellationToken cancellationToken);
    }

and
    public partial interface IApiClient
    {
        /// Search element
        /// <returns>Success</returns>
        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        System.Threading.Tasks.Task SearchAsync(QuerySearcn payload);

        /// Search element
        /// <returns>Success</returns>
        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        System.Threading.Tasks.Task SearchAsync(QuerySearcn payload, System.Threading.CancellationToken cancellationToken);

    }

I used the following nswag file for the generation
search-api.zip

I think your operation ids are not unique

No, it goes through a swagger validator without any issues.
It looks it's the way of generating the method names from the operations which cause the issue. If I rename my operations to the following names, the issue goes away :

get_search => search_get
post_search => search_post

https://github.com/RSuter/NSwag/blob/4cb5500ea02c95cf906dec5d0fa4bdc5ab91c1a7/src/NSwag.CodeGeneration/OperationNameGenerators/MultipleClientsFromOperationIdOperationNameGenerator.cs#L68-L72
So, with my first naming, both operations give "search", hence causing the issue

I just ran into the same issue. The client class was generated twice which caused issues because there were duplicates of some parts of the class, such as the constructor, and BaseUrl property. In my case, only one of my endpoints even had an operation id, so there were no duplicates. I changed the single operation id from Devices_Get to DevicesGet and the issue went away. This was frustrating to figure out.


Import Rake Task no longer works

Rake task no longer works since old API was deprecated. Should be updated or removed from gem.

The import task was using a deprecated version of the API. We have no plan to replace it right now.
You can do this using the intercom-ruby gem.

@Skaelv Do you have an example of how this might be done? The old rake task made it easy to batch up a number of updates. Is this something that the intercom-ruby gem natively handles for us, or do we have to roll our own batching of updates?

I don't consider this ticket closed.
We used this function quite a lot when adding new fields as it was a quick and easy way of synchronising historical records.
Deprecating it without a replacement is not very helpful and has made my working day that much longer.
I would appreciate an example of how to do the intercom:import task in intercom-ruby. I can probably work it out myself but would rather spend time working on features for our own app.
Many thanks in advance, Tom

Any news on this guys? It's been a month and our DB is growing increasingly out of sync.

For anyone looking for this I thought I'd share my solution for our product.
The job errors whine about the header type not being json (intercom-ruby should be setting this?) but it seems to update regardless.
Sleep is arbitrary to ensure we don't blow out the throttle.
class IntercomImporter
  def self.import_all_users
    intercom = Intercom::Client.new app_id: 'YOUR_APP_ID', api_key: 'YOUR_KEY'
    user = User.find_in_batches(batch_size: 100) do |users|
      users_to_update = []

      for user in users
        user_attrs = {
          user_id: user.id,
          email: user.email,
          created_at: user.created_at,
          name: user.name,
          custom_attributes: {
            business_count: user.businesses_count,
          }
        }
        users_to_update << user_attrs
      end

      result = intercom.users.submit_bulk_job create_items: users_to_update
      puts "Result: #{result.to_yaml}"

      sleep 2
    end
  end
end

Thanks, @thomasgallagher!
What a shame on Intercom, to remove an often used feature and even don`t reply questions about this move!!

As I`m using ruby 2.0 and  could not install intercom-ruby,
here is a version using intercon rest api directly...
class IntercomImporter

    URL = "https://api.intercom.io/bulk/users"
    BATCH_SIZE = 100 # Limit defined by Intercom

    def self.import_all_users
        new.import_all_users
    end

    def import_all_users
        User.find_in_batches(batch_size: BATCH_SIZE) do |users|
            ret = Util.post_json(
                URL,
                {items: users.map{|u| user_atts u}},
                basic_auth
            )
            Rails.logger.info "IntercomImporter ret: #{ ret }"
            sleep 2
        end
    end

    def user_atts user
        atts = {user_id: user.id}
        intercom_fields.each_pair do |field_name, value_getter|
            atts[field_name] = if value_getter.is_a?(Proc)
                value_getter.call user
            else
                user.send value_getter
            end
        end
        atts
    end

    def intercom_fields
        @fields ||= IntercomRails.config.user.custom_data
    end

    def basic_auth
        [
            ENV['INTERCOM_APP_ID'],
            ENV['INTERCOM_APP_KEY']
        ]
    end

    def post_json url, body, basic_auth = nil
        uri = URI.parse url

        header = {
            'Content-Type' => 'application/json',
            'Accept'       => 'application/json'
        }

        req = Net::HTTP::Post.new uri.request_uri, header
        req.basic_auth *basic_auth if basic_auth
        req.body = body.to_json

        resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
            http.request req
        end

        [resp.code.to_i, JSON.parse(resp.body)]
    end

end

@casare +1 !!
It is not very nice to deprecate such an useful function. I have not received any messages from the Intercom team regarding the new access token method either.

I'm also frustrated at the removal of this with a) no replacement and b) not even giving us an example of how to replicate this.


feat: impl From for HyperName

For context, we (Conduit) want this so that we can use GaiResolver when implementing Resolve, as it implements TowerService<Name>. Here is what we are doing currently to get around this.

I made it a new type so that reqwest didn't publicly depend on hyper-util. The reason was to allow reqwest to upgrade to new versions of hyper-util, without it being a breaking change.

Ah ok, so I guess making a public GaiResolver wouldn't be an option either?

Probably not, but I mean, maybe I could be convinced otherwise...
The code you linked doesn't seem bad to me, FWIW 🫣


chore: delete files

Current dependencies on/for this PR:

main

PR #7   👈

This stack of pull requests is managed by Graphite.


encoding 30s test streams

@nicholas-fr has produced a mezzanine stream with 30s duration in response to https://github.com/cta-wave/dpctf-tests/issues/56 .
As described in https://github.com/cta-wave/dpctf-tests/issues/56#issuecomment-1044223473,

Nicholas creates a 1920x1080 mezzanine stream with duration 30s. No other resolutions have a 30s mezzanine.

The current streams t1 to t17 inclusive (all of which are 1920x1080) are all re-encoded from this 30s mezzanine but otherwise unchanged.

Streams t20 onwards all remain at 60s (note that t20 is the only 1920x1080 one of these).

Since t1 is now 30s duration, a new stream is generated which is the same as the current t1. This is used only in the Switching Set tests. Call it t19 or t35 or t20 (& renumber existing t20 to t21 and so on).

Encrypted stream is re-encoded based on the 30s mezzanine

No change to splicing tests.

@rbouqueau can you take care of 2, 4 and 5?

It's on my todo. However I am away this week and back only next Wednesday afternoon.

For 4., would it be possible to amend the test code sparse Matrix - AVC with a new t19 column then? I don't have write access to the document.

For 4., would it be possible to amend the test code sparse Matrix - AVC with a new t19 column then? I don't have write access to the document.

Done.

I confirm this was ok for me.

Done in the latest release.

Closed.


Show an error in UI whenever byzantine can't find a consensus

and add a button to reload byzantine

Resolved by #543


Fix: Checkbox prop type color warning (#36678)

[x] I have followed (at least) the PR section of the contributing guide.

Fixes #36678

@amal-qb the couple of commands that make fail your CI are yarn docs:api && git diff --exit-code
This is because the docs:api command generates some files that should be committed. The check if all the commands are committed is done by git diff --exit-code.
How can we solve it? Run these commands locally, if the result satisfies your expectations commit it.


Feature: Allow specifying cross-rule default settings

What rule do you want to change?
(all of them! 🤘)
Describe the problem
I sometimes want to specify common options across all perfectionist/* rules. For example, I personally always enable partitionByComment: true. But in order to do that, right now I think I have to specify rule options manually -- which includes re-specifying anything non-default that was set in a config:
Example ESLint config snippet from https://github.com/typescript-eslint/typescript-eslint/pull/9698:
{
  ...perfectionistPlugin.configs['recommended-alphabetical'],
  files: ['packages/utils/src/**/*.ts'],
  rules: {
    ...perfectionistPlugin.configs['recommended-alphabetical'].rules,
    'perfectionist/sort-classes': [
      'error',
      {
        order: 'asc',
        partitionByComment: true,
        type: 'natural',
      },
    ],
    'perfectionist/sort-objects': [
      'error',
      {
        order: 'asc',
        partitionByComment: true,
        type: 'natural',
      },
    ],
  },
},

Code example
It'd be nice if we could specify options like partitionByComment: true once in ESLint configuration shared settings. That way we could avoid having to reconfigure individual rules to all adhere to our preferences.
Rough design proposal:
{
  ...perfectionistPlugin.configs['recommended-alphabetical'],
  files: ['packages/utils/src/**/*.ts'],
  settings: {
    perfectionist: {
      partitionByComment: true,
    }
  }
},

Additional comments
No response
Validations

[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

That's a good idea. Thanks, I'll take it to work.

Added in 8e15730d5e3b8032ae1a7d6b5ad1f1f18b850ad2.
Released in v3.2.0

@azat-io, I’m trying to find and provide relevant / simple examples for deeper investigation, but it seems it doesn’t work when options are already set, e.g. with perfectionist.configs['recommended-natural'] in https://github.com/OlivierZal/com.melcloud/blob/1f9637251b5e957d7fe166914b3fa9c664f0b689/eslint.config.mjs#L344
{
  rules: {
    'perfectionist/sort-named-export': [
      'error',
      {
        groupKind: 'types-first'
      }
    ]
  },
  settings: {
    ignoreCase: false
  }
}

@azat-io, works great. Thanks!


[WIP][SPARK-19707][SPARK-18922][TESTS][SQL][CORE] Fix test failures/the invalid path check for sc.addJar on Windows

What changes were proposed in this pull request?
This PR proposes two things:

A follow up for SPARK-19707 (Improving the invalid path check for sc.addJar on Windows as well).

org.apache.spark.SparkContextSuite:
 - add jar with invalid path *** FAILED *** (32 milliseconds)
   2 was not equal to 1 (SparkContextSuite.scala:309)
   ...

Fix path vs URI related test failures on Windows.

org.apache.spark.storage.LocalDirsSuite:
 - SPARK_LOCAL_DIRS override also affects driver *** FAILED *** (0 milliseconds)
   new java.io.File("/NONEXISTENT_PATH").exists() was true (LocalDirsSuite.scala:50)
   ...

 - Utils.getLocalDir() throws an exception if any temporary directory cannot be retrieved *** FAILED *** (15 milliseconds)
   Expected exception java.io.IOException to be thrown, but no exception was thrown. (LocalDirsSuite.scala:64)
   ...

org.apache.spark.sql.hive.HiveSchemaInferenceSuite:
 - orc: schema should be inferred and saved when INFER_AND_SAVE is specified *** FAILED *** (203 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-dae61ab3-a851-4dd3-bf4e-be97c501f254
   ...

 - parquet: schema should be inferred and saved when INFER_AND_SAVE is specified *** FAILED *** (203 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-fa3aff89-a66e-4376-9a37-2a9b87596939
   ...

 - orc: schema should be inferred but not stored when INFER_ONLY is specified *** FAILED *** (141 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-fb464e59-b049-481b-9c75-f53295c9fc2c
   ...

 - parquet: schema should be inferred but not stored when INFER_ONLY is specified *** FAILED *** (125 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-9487568e-80a4-42b3-b0a5-d95314c4ccbc
   ...

 - orc: schema should not be inferred when NEVER_INFER is specified *** FAILED *** (156 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-0d2dfa45-1b0f-4958-a8be-1074ed0135a
   ...

 - parquet: schema should not be inferred when NEVER_INFER is specified *** FAILED *** (547 milliseconds)
   java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\projects\spark\target\tmp\spark-6d95d64e-613e-4a59-a0f6-d198c5aa51ee
   ...

org.apache.spark.sql.execution.command.DDLSuite:
 - create temporary view using *** FAILED *** (15 milliseconds)
   org.apache.spark.sql.AnalysisException: Path does not exist: file:/C:projectsspark	arget	mpspark-3881d9ca-561b-488d-90b9-97587472b853	mp;
   ...

 - insert data to a data source table which has a non-existing location should succeed *** FAILED *** (109 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-4cad3d19-6085-4b75-b407-fe5e9d21df54 did not equal file:///C:/projects/spark/target/tmp/spark-4cad3d19-6085-4b75-b407-fe5e9d21df54 (DDLSuite.scala:1869)
   ...

 - insert into a data source table with a non-existing partition location should succeed *** FAILED *** (94 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-4b52e7de-e3aa-42fd-95d4-6d4d58d1d95d did not equal file:///C:/projects/spark/target/tmp/spark-4b52e7de-e3aa-42fd-95d4-6d4d58d1d95d (DDLSuite.scala:1910)
   ...

 - read data from a data source table which has a non-existing location should succeed *** FAILED *** (93 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-f8c281e2-08c2-4f73-abbf-f3865b702c34 did not equal file:///C:/projects/spark/target/tmp/spark-f8c281e2-08c2-4f73-abbf-f3865b702c34 (DDLSuite.scala:1937)
   ...

 - read data from a data source table with non-existing partition location should succeed *** FAILED *** (110 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - create datasource table with a non-existing location *** FAILED *** (94 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-387316ae-070c-4e78-9b78-19ebf7b29ec8 did not equal file:///C:/projects/spark/target/tmp/spark-387316ae-070c-4e78-9b78-19ebf7b29ec8 (DDLSuite.scala:1982)
   ...

 - CTAS for external data source table with a non-existing location *** FAILED *** (16 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - CTAS for external data source table with a existed location *** FAILED *** (15 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - data source table:partition column name containing a b *** FAILED *** (125 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - data source table:partition column name containing a:b *** FAILED *** (143 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - data source table:partition column name containing a%b *** FAILED *** (109 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - data source table:partition column name containing a,b *** FAILED *** (109 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - location uri contains a b for datasource table *** FAILED *** (94 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-5739cda9-b702-4e14-932c-42e8c4174480a%20b did not equal file:///C:/projects/spark/target/tmp/spark-5739cda9-b702-4e14-932c-42e8c4174480/a%20b (DDLSuite.scala:2084)
   ...

 - location uri contains a:b for datasource table *** FAILED *** (78 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-9bdd227c-840f-4f08-b7c5-4036638f098da:b did not equal file:///C:/projects/spark/target/tmp/spark-9bdd227c-840f-4f08-b7c5-4036638f098d/a:b (DDLSuite.scala:2084)
   ...

 - location uri contains a%b for datasource table *** FAILED *** (78 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-62bb5f1d-fa20-460a-b534-cb2e172a3640a%25b did not equal file:///C:/projects/spark/target/tmp/spark-62bb5f1d-fa20-460a-b534-cb2e172a3640/a%25b (DDLSuite.scala:2084)
   ...

 - location uri contains a b for database *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - location uri contains a:b for database *** FAILED *** (15 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - location uri contains a%b for database *** FAILED *** (0 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

org.apache.spark.sql.hive.execution.HiveDDLSuite:
 - create hive table with a non-existing location *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - CTAS for external hive table with a non-existing location *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - CTAS for external hive table with a existed location *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - partition column name of parquet table containing a b *** FAILED *** (156 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - partition column name of parquet table containing a:b *** FAILED *** (94 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - partition column name of parquet table containing a%b *** FAILED *** (125 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - partition column name of parquet table containing a,b *** FAILED *** (110 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

 - partition column name of hive table containing a b *** FAILED *** (15 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - partition column name of hive table containing a:b *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - partition column name of hive table containing a%b *** FAILED *** (16 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - partition column name of hive table containing a,b *** FAILED *** (0 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - hive table: location uri contains a b *** FAILED *** (0 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - hive table: location uri contains a:b *** FAILED *** (0 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

 - hive table: location uri contains a%b *** FAILED *** (0 milliseconds)
   org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
   ...

org.apache.spark.sql.sources.PathOptionSuite:
 - path option also exist for write path *** FAILED *** (94 milliseconds)
   file:/C:projectsspark%09arget%09mpspark-2870b281-7ac0-43d6-b6b6-134e01ab6fdc did not equal file:///C:/projects/spark/target/tmp/spark-2870b281-7ac0-43d6-b6b6-134e01ab6fdc (PathOptionSuite.scala:98)
   ...

org.apache.spark.sql.CachedTableSuite:
 - SPARK-19765: UNCACHE TABLE should un-cache all cached plans that refer to this table *** FAILED *** (110 milliseconds)
   java.lang.IllegalArgumentException: Can not create a Path from an empty string
   ...

org.apache.spark.sql.execution.DataSourceScanExecRedactionSuite:
 - treeString is redacted *** FAILED *** (250 milliseconds)
   "file:/C:/projects/spark/target/tmp/spark-3ecc1fa4-3e76-489c-95f4-f0b0500eae28" did not contain "C:\projects\spark\target\tmp\spark-3ecc1fa4-3e76-489c-95f4-f0b0500eae28" (DataSourceScanExecRedactionSuite.scala:46)
   ...

How was this patch tested?
Tested via AppVeyor for each and checked it passed once each. These should be retested via AppVeyor in this PR.

Test build #76945 has started for PR 17987 at commit ea11321.

Build started: [TESTS] org.apache.spark.SparkContextSuite
Build started: [TESTS] org.apache.spark.storage.LocalDirsSuite
Build started: [TESTS] org.apache.spark.sql.hive.HiveSchemaInferenceSuite
Build started: [TESTS] org.apache.spark.sql.execution.command.DDLSuite
Build started: [TESTS] org.apache.spark.sql.hive.execution.HiveDDLSuite
Build started: [TESTS] org.apache.spark.sql.sources.PathOptionSuite
Build started: [TESTS] org.apache.spark.sql.CachedTableSuite
Build started: [TESTS] org.apache.spark.sql.execution.DataSourceScanExecRedactionSuite

There are many flaky tests on Windows (and somehow it looks it became more flaky than before). So, I can't guarantee these are all the instances but I believe these are almost all.
Some of tests above probably will fail due to flaky tests. I will re-trigger them.

Thank you @srowen for your approval. (I will remove [WIP] flag if the tests pass).

Test build #76945 has finished for PR 17987 at commit ea11321.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

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/SparkPullRequestBuilder/76945/
Test PASSed.

Test build #76965 has started for PR 17987 at commit 1af7324.

Test build #76965 has finished for PR 17987 at commit 1af7324.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

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/SparkPullRequestBuilder/76965/
Test PASSed.

retest this please

Test build #77269 has started for PR 17987 at commit 1af7324.

Test build #77269 has finished for PR 17987 at commit 1af7324.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

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/SparkPullRequestBuilder/77269/
Test PASSed.

@srowen, I took another look and think it is ready.

Merged to master/2.2


light-report-uia:0.1.0

I am submitting

[x] a new package
[ ] an update for a package

Description: Template report for students at the University of Agder. It's just a copy of an extisting LaTeX template for students who would rather use typst.

I have read and followed the submission guidelines and, in particular, I

[x] selected a name that isn't the most obvious or canonical name for what the package does
[x] added a typst.toml file with all required keys
[x] added a README.md with documentation for my package
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] tested my package locally on my system and it worked
[x] excluded PDFs or README images, if any, but not the LICENSE

[x] ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

Thanks!


creation of index fails 1.10.2

thanks for your time. What am I missing here?
Following steps won't create my index:

admin > settings > index; create eg: MyIndex
admin > contentType; in appropriate CT set the index to MyIndex (published Version)
when doing 'rebuild'; I get MyIndex has been rebuilt / updated ( however .. with 0 documents)

MyIndex
0 document(s)
Update | Rebuild | Delete
The search index has not been built yet.
No fields. <----------- ?!?!

admin > settings > Search; I do NOT see any fields! (ID, Title etc.)
BUT Index/Admin Index/Fields all show 'MyIndex'

admin > modules; Indexing, Lucene, Search, content picker search, media library search, admin content search are ALL enabled

App_data/Sites/default; I do NOT see a Media.settings.xml NOR MyIndex.settings.xml

App_data/Sites/default/indexes/MyIndex; I have files segments.gen and segments_2

What do I need to do in addition to get a working Index? Otherwise the site works fine!
thanks, ed
further tests suddenly show:
deployed site: oops, Lucene , write.lock issue
VS2017: same as above described
anyway: for now I close and do some more tests!

finally I found (I think) the issue.
there was a orphaned 'ContentItemVersion' record. I.e the appropriate 'ContentItem' wasn't there anymore!


Make labels case insensitive

https://github.com/rancher/rancher/issues/7963
https://github.com/rancher/rancher/issues/7975

LGTM


Support for Scatter-gather input (iovec)

Previous comment:
Please enable the tls_write and tls_read calls to take in iovec structures. This would help avoiding 1-copy (at least) into a flat buffer while sending large amounts, something that we need for our use-case. In addition, if you can avoid further copies of the data within the TLS layer for processing (for example, during encryption), that would be great.
Response:
I'm not sure if there is a real benefit, because tls_write takes a buffer that will be packed into a TLS record. The buffer is not copied nor stored, I'm not sure about the benefits here. Same goes for tls_get_write_buffer which provides access to internal buffer (no copy). I think that maybe it would be trivial to store a list of iovec structures instead of TLSe write buffer, but this will not be backwards compatible. But I also think you would be better using TLSe + kTLS + splice/sendfile instead.
=====
Additional comments:

kTLS is limited in support to cipher suites, does not work with all the ones we would like to explore.
Even if TLS records are fixed size, those can be built to work with scatter-gather arrays (or iovec structures) to avoid copy of user data (if that comes in iovec structurs too) to flat buffers in order to create those records.  Along the lines of this work: https://www.usenix.org/legacy/events/osdi99/full_papers/pai/pai.pdf

Feel free to fork and add this TLSe. TLSe objectives are: secure, lightweight, portable.


FR: Include check if package is C extension

This SO answer provides code to determine if a package is pure-python or is a c-extension:
from importlib.machinery import ExtensionFileLoader, EXTENSION_SUFFIXES
import inspect
import logging
import os
import os.path
import pkgutil
from types import ModuleType
from typing import List

log = logging.getLogger(__name__)

def is_builtin_module(module: ModuleType) -> bool:
    """
    Is this module a built-in module, like ``os``?
    Method is as per :func:`inspect.getfile`.
    """
    return not hasattr(module, "__file__")

def is_module_a_package(module: ModuleType) -> bool:
    assert inspect.ismodule(module)
    return os.path.basename(inspect.getfile(module)) == "__init__.py"

def is_c_extension(module: ModuleType) -> bool:
    """
    Modified from
    https://stackoverflow.com/questions/20339053/in-python-how-can-one-tell-if-a-module-comes-from-a-c-extension.

    ``True`` only if the passed module is a C extension implemented as a
    dynamically linked shared library specific to the current platform.

    Args:
        module: Previously imported module object to be tested.

    Returns:
        bool: ``True`` only if this module is a C extension.

    Examples:

    .. code-block:: python

        from cardinal_pythonlib.modules import is_c_extension

        import os
        import _elementtree as et
        import numpy
        import numpy.core.multiarray as numpy_multiarray

        is_c_extension(os)  # False
        is_c_extension(numpy)  # False
        is_c_extension(et)  # False on my system (Python 3.5.6). True in the original example.
        is_c_extension(numpy_multiarray)  # True

    """  # noqa
    assert inspect.ismodule(module), f'"{module}" not a module.'

    # If this module was loaded by a PEP 302-compliant CPython-specific loader
    # loading only C extensions, this module is a C extension.
    if isinstance(getattr(module, '__loader__', None), ExtensionFileLoader):
        return True

    # If it's built-in, it's not a C extension.
    if is_builtin_module(module):
        return False

    # Else, fallback to filetype matching heuristics.
    #
    # Absolute path of the file defining this module.
    module_filename = inspect.getfile(module)

    # "."-prefixed filetype of this path if any or the empty string otherwise.
    module_filetype = os.path.splitext(module_filename)[1]

    # This module is only a C extension if this path's filetype is that of a
    # C extension specific to the current platform.
    return module_filetype in EXTENSION_SUFFIXES

def contains_c_extension(module: ModuleType,
                         import_all_submodules: bool = True,
                         include_external_imports: bool = False,
                         seen: List[ModuleType] = None,
                         verbose: bool = False) -> bool:
    """
    Extends :func:`is_c_extension` by asking: is this module, or any of its
    submodules, a C extension?

    Args:
        module: Previously imported module object to be tested.
        import_all_submodules: explicitly import all submodules of this module?
        include_external_imports: check modules in other packages that this
            module imports?
        seen: used internally for recursion (to deal with recursive modules);
            should be ``None`` when called by users
        verbose: show working via log?

    Returns:
        bool: ``True`` only if this module or one of its submodules is a C
        extension.

    Examples:

    .. code-block:: python

        import logging

        import _elementtree as et
        import os

        import arrow
        import alembic
        import django
        import numpy
        import numpy.core.multiarray as numpy_multiarray

        log = logging.getLogger(__name__)
        logging.basicConfig(level=logging.DEBUG)  # be verbose

        contains_c_extension(os)  # False
        contains_c_extension(et)  # False

        contains_c_extension(numpy)  # True -- different from is_c_extension()
        contains_c_extension(numpy_multiarray)  # True

        contains_c_extension(arrow)  # False

        contains_c_extension(alembic)  # False
        contains_c_extension(alembic, include_external_imports=True)  # True
        # ... this example shows that Alembic imports hashlib, which can import
        #     _hashlib, which is a C extension; however, that doesn't stop us (for
        #     example) installing Alembic on a machine with no C compiler

        contains_c_extension(django)

    """  # noqa
    assert inspect.ismodule(module), f'"{module}" not a module.'

    if seen is None:  # only true for the top-level call
        seen = []  # type: List[ModuleType]
    if module in seen:  # modules can "contain" themselves
        # already inspected; avoid infinite loops
        return False
    seen.append(module)

    # Check the thing we were asked about
    is_c_ext = is_c_extension(module)
    if verbose:
        log.info(f"Is module {module!r} a C extension? {is_c_ext}")
    if is_c_ext:
        return True
    if is_builtin_module(module):
        # built-in, therefore we stop searching it
        return False

    # Now check any children, in a couple of ways

    top_level_module = seen[0]
    top_path = os.path.dirname(top_level_module.__file__)

    # Recurse using dir(). This picks up modules that are automatically
    # imported by our top-level model. But it won't pick up all submodules;
    # try e.g. for django.
    for candidate_name in dir(module):
        candidate = getattr(module, candidate_name)
        # noinspection PyBroadException
        try:
            if not inspect.ismodule(candidate):
                # not a module
                continue
        except Exception:
            # e.g. a Django module that won't import until we configure its
            # settings
            log.error(f"Failed to test ismodule() status of {candidate!r}")
            continue
        if is_builtin_module(candidate):
            # built-in, therefore we stop searching it
            continue

        candidate_fname = getattr(candidate, "__file__")
        if not include_external_imports:
            if os.path.commonpath([top_path, candidate_fname]) != top_path:
                if verbose:
                    log.debug(f"Skipping, not within the top-level module's "
                              f"directory: {candidate!r}")
                continue
        # Recurse:
        if contains_c_extension(
                module=candidate,
                import_all_submodules=False,  # only done at the top level, below  # noqa
                include_external_imports=include_external_imports,
                seen=seen):
            return True

    if import_all_submodules:
        if not is_module_a_package(module):
            if verbose:
                log.debug(f"Top-level module is not a package: {module!r}")
            return False

        # Otherwise, for things like Django, we need to recurse in a different
        # way to scan everything.
        # See https://stackoverflow.com/questions/3365740/how-to-import-all-submodules.  # noqa
        log.debug(f"Walking path: {top_path!r}")
        try:
            for loader, module_name, is_pkg in pkgutil.walk_packages([top_path]):  # noqa
                if not is_pkg:
                    log.debug(f"Skipping, not a package: {module_name!r}")
                    continue
                log.debug(f"Manually importing: {module_name!r}")
                # noinspection PyBroadException
                try:
                    candidate = loader.find_module(module_name)\
                        .load_module(module_name)  # noqa
                except Exception:
                    # e.g. Alembic "autogenerate" gives: "ValueError: attempted
                    # relative import beyond top-level package"; or Django
                    # "django.core.exceptions.ImproperlyConfigured"
                    log.error(f"Package failed to import: {module_name!r}")
                    continue
                if contains_c_extension(
                        module=candidate,
                        import_all_submodules=False,  # only done at the top level  # noqa
                        include_external_imports=include_external_imports,
                        seen=seen):
                    return True
        except Exception:
            log.error("Unable to walk packages further; no C extensions "
                      "detected so far!")
            raise

    return False

I think it should be trivial to add as a feature of the output information by modifying the ReqPackage class to have the property:
    @property
    def is_c_extension(self):
        try:
            mod = importlib.import_module(self.project_name)
            return is_c_extension(mod)
        except:
            return 'unknown'

then modify its render_as_branch method to be:
   def render_as_branch(self, frozen):
        if not frozen:
            req_ver = self.version_spec if self.version_spec else 'Any'
            return (
                '{0} [required: {1}, installed: {2}, c: {3}]'
                ).format(self.project_name, req_ver, self.installed_version,self.is_c_extension)
        else:
            return self.render_as_root(frozen)

(with addition of importlib as an import)
Thought this might be a useful addition to the package.

Thanks @mike-lawrence . I missed this issue.
This looks like a useful addition to the package. But I don't have time/motivation to work on this project at the moment. But I am currently in the process of transferring the ownership of this repo to an organization so that others can maintain the project. Perhaps this can be considered once the repo is transferred.

@mike-lawrence what would be the usefulness of this?

https://github.com/tox-dev/pipdeptree/issues/89


Workspace default to empty Dir

Feature request

Today we need to define workspace  as part of triggertemplate or Task or pipeline:
      workspaces:
      - name: source
        emptyDir: {}
      - name: config
        emptyDir: {}
      - name: results
        emptyDir: {}

Use case
Could we have it defaulted to emptyDir when nothing is specified ?

Bringing over my comment from Slack:
You can configure emptyDir to be the default for taskruns today.  We don't have a general approach like this for pipelineruns tho.
Edit the config-defaults configmap in your tekton-pipelines namespace and set the default-task-run-workspace-bindingto be the workspace binding you want (e.g.emptyDir: {}`)
Example: https://github.com/tektoncd/pipeline/blob/main/config/config-defaults.yaml#L66-L70

Also I just realised we do already have a feature ticket for this.
Closing as a duplicate of https://github.com/tektoncd/pipeline/issues/2595

Thanks for the details. I'm looking for something in pipelineruns. This ticket would help - https://github.com/tektoncd/pipeline/issues/2595


XSH_RUNCOM_PREFIX

module runcom in $XSH_CONFIG_DIR/<shell-variant>/<module>/ not loded, when you set XSH_RUNCOM_PREFIX=. in ~/.bash_profile, ~/.profile, etc..

Thanks for reporting, there's indeed a bug with XSH_RUNCOM_PREFIX=. that prevents hidden files from being matched properly.
However, it should already work if your module runcoms are not hidden files, for example: module.interactive.bash
Note that in order for XSH_RUNCOM_PREFIX=. to be picked up properly, it needs to be set as described in the README:

You can change the special character for runcom files by setting the environment variable XSH_RUNCOM_PREFIX (default @). Like XSH_DIR this should be set before you user's login shell is started. Alternatively, it can be set on a per-shell basis in the xsh initialization file for that shell.

Let me know if that solves your problem. I should be able to push a fix for hidden files soon.

I think this is enough (for me), but you should include about it in readme.md to avoid the same problem.
or maybe you want to use a combination of find and sort -z to patch problems.
Thank for your great jobs.

Sorry for the delay, been quite busy.
Thanks for the suggestion but I want to avoid spawning additional processes for performance reasons.
I've fixed it on the latest master, hidden files should now properly be picked up and loaded like the others :)
Let me know if you have additional issues, I'm closing this.


chore: make felt contract_class class_hash self contained

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#1631
#1630  👈
#1629
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ArniStarkware and the rest of your teammates on  Graphite

Merge activity

Oct 31, 10:29 AM EDT: A user started a stack merge that includes this pull request via Graphite.


react-scripts  ^5.0.0 support (Buffer is not defined)

After updating my existing project to react-scripts ^5.0.0 i have faced an error which is
Uncaught (in promise) ReferenceError: Buffer is not defined
this is because of Buffer is removed in react-scripts ^5.0.0
the issue is in functions named [toHex, toTlv] at the time of creating new object of Invoice
Testing environment:

create-react-app
node = 16.13.1
react-scripts = 5.0.0
npm version = 8.1.2

Thanks

This PR can help to resolve this issue
https://github.com/axenda/zatca/pull/3


relay to multiple targets?

Hi Kevin
Just wondering, I see you can relay to multiple targets providing a comma separated list, did you ever implement a read from a file instead?

Hi,
Not directly, you should be able to do something like Invoke-InveighRelay -target (Get-Content -Path targets.txt) though.


Reformat core files [split from code coverage PR]

This applies the formatting changes from Emacs' bazel-mode, in preparation for https://github.com/bazelbuild/rules_scala/pull/692.

I’ll merge this when green then we can rebase the code coverage PR on it and it should be easier for @ittaiz to review.

Thanks! This will indeed make it much easier.
I've been reviewing several PRs lately (in other repos as well) that mix them and it adds significant cognitive overload


Validate total service DNS hostname+domain length

Docker imposes a limit of 64 chars on the container FQDN (combined hostname.domain), because docker/runc will call sethostname with the full FQDN. This results in a rather useless Docker API error if the FQDN is too long.
Fixes #825 by failing the service create with a validation error, instead of failing on the service container deploy.
The logic is slightly more complex because it also needs to take into account the number of digits required to represent the container instance number.
Example
stack: test/test-asdfasdfasdfasdf
services:
  xxxxxxxx10xx12:
    image: redis

  xxxxxxxx10xxx13:
    image: redis
    depends_on:
      - xxxxxxxx10xx12

Before
kontena stack install test/test-longname.yaml
 [done] Creating stack test-asdfasdfasdfasdf
 [done] Triggering deployment of stack test-asdfasdfasdfasdf
 [done] Waiting for deployment to start
 [done] Deploying service xxxxxxxx10xx12
 [fail] Deploying service xxxxxxxx10xxx13
Deployment of service development/test-asdfasdfasdfasdf/xxxxxxxx10xxx13 failed:
  - halting deploy of development/test-asdfasdfasdfasdf/xxxxxxxx10xxx13, one or more instances failed
  - GridServiceInstanceDeployer::ServiceError: Docker::Error::ServerError: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused \\\"invalid argument\\\"\"\n" (on node core-01)

After
kontena stack install test/test-longname.yaml
 [fail] Creating stack test-asdfasdfasdfasdf
 [error] 422 : Unprocessable Entity:
	services:
	  xxxxxxxx10xxx13:
	    name: 'Total grid service name length 65 is over limit (64): xxxxxxxx10xxx13-1.test-asdfasdfasdfasdf.development.kontena.local'

Installing a stack with two services, one under the name limit, the other over, results in an installed stack with missing services... the Stacks::Create#validate -> validate_services calls GridServices::Create#validate with the service definition, but without the stack, so the service name validation doesn't take the length of the stack name into account, and then it fails during the create_services :(
Not sure if worth fixing...
$ bin/kontena stack install test/test-longname.yaml
 [fail] Creating stack test-asdfasdfasdfasdf
 [error] 422 : Unprocessable Entity:
	services:
	  xxxxxxxx10xxx13:
	    name: 'Total grid service name length 65 is over limit (64): xxxxxxxx10xxx13-1.test-asdfasdfasdfasdf.development.kontena.local'
$ bin/kontena stack show test-asdfasdfasdfasdf
test-asdfasdfasdfasdf:
  created: 2017-09-19T08:47:24.964Z
  updated: 2017-09-19T08:47:24.966Z
  state: initialized
  stack: test/test-asdfasdfasdfasdf
  version: 0.0.1
  revision: 1
  expose: -
  parent: -
  services:
    xxxxxxxx10xx12:
      created: 2017-09-19T08:47:24.976Z
      updated: 2017-09-19T08:47:24.976Z
      image: redis:latest
      revision:
      state: initialized
      stateful: no
      scaling: 1
      strategy: ha
      read_only: no
      deploy_opts:
        min_health:
      dns: xxxxxxxx10xx12.test-asdfasdfasdfasdf.development.kontena.local


Fix image URL in project README.

Description
The URL of the Meme in the project README file is broken. The URL that is used https://matheus-silva.now.sh/static/ea73a826918ff70f7c54c66e1a6fbf59/1c72d/meme.jpg no longer exists.

Rather than using the new home of the image online https://matheus-silva.vercel.app/assets/blog/meme.jpg, this MR changes the broken URL to https://github.com/matheus1lva/matheus-silva.me/raw/master/public/assets/blog/meme.jpg.
The rational is that, should the location / domain of the website ever change (again), the image will not break as it is linked directly to the source (in the GitHub repo) rather than the distributed version (in the website).
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Related Issue

none
Motivation and Context

The image is part of a blog post relevant to this project. I think it would be good to continue to have the image in the README.
(see "Screenshots" for details on how much better the README looks with the image available!)
How Has This Been Tested?
The README file on the fix branch in the forked repository shows the change

Screenshots (if appropriate):
Before

After

Checklist:

[X] I have updated the documentation (if required).
[X] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes. (manual testing has been done)
[x] All new and existing tests passed.
[x] I added a picture of a cute animal cause it's fun

Thank you ❤


Initial draft of an overlord function for end-to-end analysis.

Also performs parallelization of the t-SNE, UMAP and clustering steps.

The big question here is what we want this interface to look like. Some organization is necessary to avoid a proliferation of namespace_*-like argument names; same for the results.
I have some ideas about organizing the arguments more hierarchically, e.g., for scranpy.analyze() to call scranpy.quality_control.analyze() which handles the coordination of the QC-related bits.

couple of thoughts,

we can define arguments as namedtuple for each step, then the analyze function for each step takes **args and we can let python do the unpacking.
may be the result can be a SingleCellExperiment object?, few results have an obvious place, few don't.

lets wait on this until I finish #27

@LTLA

options lgtm. what about the outputs? we should use a similar composibility concept for the initial analyze output, and then a separate function that massages it lossily into a SCE, e.g., scran.chan's marshalToSCE.