Interface vs Pure abstract class in the API

Pros for Abstract

Keep backwards compatibility between the API and implementation.

Cons for Abstract

No support for multiple inheritance.
Interfaces may be consider cleaner for API than abstract classes.

I think a related question here is API vs. SPI. Currently Tracer abstract class has things like withRunnable(), which are simply util methods that normally don't require vendors overriding them.
Regarding backwards compatibility of the abstract class, it can still be achieved by providing both the interface (the basic API block) and an abstract implementation that vendors are encouraged to extend in order to benefit from default / util methods (but again, default/util methods on the same type are a bit of a design smell, hinting at inadequate API/SPI separation).

Based on my understanding users instrumentation code should not depend on SPI (SPI is intended to be used by the service provider (vendor) to implement the API). See https://en.wikipedia.org/wiki/Service_provider_interface
The abstract implementation that vendors should extend seems to be the SPI.

For now, we are using Abstract implementation.
@carlosalberto will get feedback from implementors as to whether this is a workable choice..

Interface PRO: interfaces allow implementations to control their class hierarchy better. For example, an implementation that implements both Span and SpanBuilder.
We can still offer an Abstract class which implements each interface, for convenience.
TODO: switch to interfaces in Java.

Shall we switch to interfaces then?


Cleanup of unused mixin classes

Removes 2 worldgen mixin classes that were not used anymore (not included in mixin config & use of obfuscated class names)
Last mixin error left now is from the boats, but that might simply be because of the use of BoatEntity.Type[] field_7724, so it might just be the dev env shitting itself:
I:\FabricModding\Incubus-Core\src\main\java\net\id\incubus_core\mixin\woodtypefactory\boat\BoatEntityTypeMixin.java:19: warning: Cannot find target for @Shadow field in net.minecraft.entity.vehicle.BoatEntity$Type
@Shadow
^

That last warning can be fixed by using divine intervention's enum extender instead

Time to deduplicate shovels


Support for '-' (dash) in syslog TAG field.

An nginx.conf contains dash in syslog tag:
error_log  syslog:local6:info:<IP_ADDRESS>:514:XXX-nginx-error-YYY;

# nginx -c /etc/nginx/nginx.conf -t
nginx: [emerg] syslog "tag" only allows alphanumeric characters and underscore in /etc/nginx/nginx.conf:8

The syslog TAG field is defined in RFC3164 as "a string of ABNF alphanumeric characters that MUST NOT exceed 32 characters.", and the ABNF naming rule is defined in RFC2234 as "a sequence of characters, beginning with  an alphabetic character, and followed by  a combination of alphabetics, digits and hyphens (dashes)."
While the nginx syslog module does not include '-' in the check logic, it returns NGX_CONF_ERROR.
I modified the TAG checking logic, and it works, in combination with rsyslog (which is comply with RFC3164 specification).

RFC3164 "Any non-alphanumeric character will terminate the TAG field and will be assumed to be the starting character of the CONTENT field."
https://trac.nginx.org/nginx/ticket/667 adds exception of '_' (underscore) for the ease of syslog filter, that should be enough.


[WFCORE-870] :  Seeing frequent "java.lang.UnsupportedOperationException: 'acl:acl' not supported as initial attribute" on Solaris arch

Catching the exception and creating the file without the ACL attibutes if it fails.
Build : http://brontes.lab.eng.brq.redhat.com/viewLog.html?buildId=63789&tab=buildResultsDiv&buildTypeId=WildFlyCore_MasterSolaris
Jira: https://issues.jboss.org/browse/WFCORE-870

Windows Build 1841 is now running using a merge of a15759255d1cc8825f4c6fcfa249aee952654137

Linux Build 2324 is now running using a merge of a15759255d1cc8825f4c6fcfa249aee952654137

Core - Full Integration Build 1461 is now running using a merge of a15759255d1cc8825f4c6fcfa249aee952654137

Windows Build 1841 outcome was FAILURE using a merge of a15759255d1cc8825f4c6fcfa249aee952654137
Summary: Tests failed: 2 (2 new), passed: 3421, ignored: 64 Build time: 0:35:20
Build problems:
Failed tests detected
Failed tests
org.jboss.as.test.manualmode.auditlog.AuditLogBootingLogTestCase.testBootIsLogged: <no details avaliable>

org.jboss.as.test.manualmode.auditlog.AuditLogFieldsOfLogTestCase.testAuditLoggingFields: <no details avaliable>

Linux Build 2324 outcome was SUCCESS using a merge of a15759255d1cc8825f4c6fcfa249aee952654137
Summary: Tests passed: 3423, ignored: 64 Build time: 0:36:42

Core - Full Integration Build 1461 outcome was SUCCESS using a merge of a15759255d1cc8825f4c6fcfa249aee952654137
Summary: Tests passed: 3082, ignored: 368 Build time: 0:49:07


CS: Revert "disable triggering syncing agent sandbox entries into datomic

Changes proposed in this PR

This reverts commit f2b5847 enabling the sandbox syncing for non-cook-executor instances

Why are we making these changes?
We would like timely sandbox directory updates for tasks that are not executed via the cook executor. This can significantly save the load time on the list pages as they do not trigger the sandbox syncing logic. Additionally, saving the sandbox directory into datomic means once the directory is available, it is consistently always rendered instead of relying on the availability of the data from the Mesos agent state.

@dpo the PR is ready for review and is split into two commits.  The second commit handles merge conflicts and adds metrics.

@dposada I have looked at them internally and they look good.


example 2 won't finish

Hi,
thanks for the code, looks very interesting.
I am trying to run a variant of example 2. I also use logging with
result_logger = hpres.json_result_logger(directory=working_directory, overwrite=True)
that I pass to BOHB(...result_logger=result_logger,...)
There are 2 problems:

The logger produces config.json and results.json but the latter will typically miss results for all but one initial [0,num_workers) configurations, but will show results for [num_workers, n_iterations) configurations.
After the optimizer goes over all configurations it just hangs, waiting for workers:

DEBUG:hpbandster:HBMASTER: Trying to run another job!
DEBUG:hpbandster:job_callback for (19, 0, 0) finished
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
............
and so on until I kill the processes.
Am I missing something: is there a way to exit gracefully?
Thanks!

Could you provide a bit more detail, please?
What's the OS, python version etc.

Ubuntu 16.04, python 3.7, part of anaconda 5.2.
Thanks

On Feb 25, 2019, at 13:02, Stefan Falkner<EMAIL_ADDRESS>wrote:
Could you provide a bit more detail, please?
What's the OS, python version etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Ubuntu 16.04, python 3.7, part of anaconda 5.2.
Thanks

On Feb 25, 2019, at 13:02, Stefan Falkner<EMAIL_ADDRESS>wrote:
Could you provide a bit more detail, please?
What's the OS, python version etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hmmm...the original example runs through fine here. Have you changed anything else, e.g. the worker?

Yes, the worker is modified, it is problem-specific. The code runs well on my mac inside pycharm, but hangs in background runs on ubuntu.
Here is the fragment of “main” that calls the optimizer:
host = '<IP_ADDRESS>'
port = 9090
result_logger = hpres.json_result_logger(directory=working_directory, overwrite=True)
Step 1: Start a nameserver
Every run needs a nameserver. It could be a 'static' server with a
permanent address, but here it will be started for the local machine with the default port.
The nameserver manages the concurrent running workers across all possible threads or clusternodes.
Note the run_id argument. This uniquely identifies a run of any HpBandSter optimizer.
NS = hpns.NameServer(run_id=run_id, host=host, port=None)
NS.start()
Step 2: Start a worker
Now we can instantiate a worker, providing the mandatory information
Besides the sleep_interval, we need to define the nameserver information and
the same run_id as above.
workers = []
for i in range(args.num_workers):
worker = bohb_worker.BOHBWorker(args, device, nameserver=host, run_id=run_id, save_log=False, id=i)
worker.run(background=True)
workers.append(worker)
Step 3: Run an optimizer
Now we can create an optimizer object and start the run.
Here, we run BOHB, but that is not essential.
The run method will return the Result that contains all runs performed.
bohb = BOHB(configspace=worker.get_configspace(),
run_id=run_id, nameserver=host, host=host,
result_logger=result_logger,
min_budget=args.min_budget, max_budget=args.max_budget,
working_directory=working_directory
)
result = bohb.run(n_iterations=args.num_configurations, min_n_workers=args.num_workers)
Step 4: Shutdown
After the optimizer run, we must shutdown the master and the nameserver.
bohb.shutdown(shutdown_workers=True)
NS.shutdown()
From: Stefan Falkner<EMAIL_ADDRESS>Reply-To: automl/HpBandSter<EMAIL_ADDRESS>Date: Monday, February 25, 2019 at 1:17 PM
To: automl/HpBandSter<EMAIL_ADDRESS>Cc: Evgeny Sorkin<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [automl/HpBandSter] example 2 won't finish (#48)
Hmmm...the original example runs through fine here. Have you changed anything else, e.g. the worker?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/automl/HpBandSter/issues/48#issuecomment-467186704, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFjnmYkuh_3rqjnZ5UQjkY5qd_PC4d7Aks5vRFLXgaJpZM4bMxUA.

That code looks fine. You can try to run that with the example worker to make sure.
What does your worker return?

The worker returns dict={‘loss’:.., ‘info’:…}.
I was further looking at the analysis of the run, and at least in the multi-threaded setup the results are somewhat confusing. I got a few questions:
•  Job order vs. budget

Does BOHB start all runs at a given budget before starting jobs at the next higher budget?

Or does it simultaneously start jobs at multiple budgets?
•  Jobs per budget

How many jobs are run at each budget?

Is it C/budget for some constant C? (The data for the existing run does not follow this rule, e.g. third plot in  https://automl.github.io/HpBandSter/build/html/auto_examples/plot_example_6_analysis.html ).
•  Hyperparameter configuration reuse

Does BOHB sometimes reuse hyperparameter configurations for one budget in a run with a higher budget?

If yes, how does it decide when to do this?

Is the run with higher budget started from scratch, or does it start from the result of the training at the lower budget (i.e. a warm start?
•  Rank correlation

Is rank correlation based only on runs that used the exact same hyperparameters at two different budgets?
Thanks!
Evgeny

From: Stefan Falkner<EMAIL_ADDRESS>Reply-To: automl/HpBandSter<EMAIL_ADDRESS>Date: Monday, February 25, 2019 at 1:28 PM
To: automl/HpBandSter<EMAIL_ADDRESS>Cc: Evgeny Sorkin<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [automl/HpBandSter] example 2 won't finish (#48)
That code looks fine. You can try to run that with the example worker to make sure.
What does your worker return?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/automl/HpBandSter/issues/48#issuecomment-467190471, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFjnmWcoZvr3KnAyFG5cJ1s_FkSMwLUwks5vRFV2gaJpZM4bMxUA.

Hey Evgeny,
About the return value of your workers compute method. What are the entries in the info dict. If you try to return any non-build in types (like numpy arrays) the workers will hang and the run does not finish.
I will try to answer your questions, but for further detail, please refer to the paper.
• Job order vs. budget:
For each iteration, BOHB will start a certain number of configurations. For most iterations, that starting budget is smaller than the max_budget. After all of them finish, a third of them will then be evaluated on a higher budget (usually three times the previous budget). This is repeated until max_budget is reached. The strategy is called SuccessiveHalving (although SuccessiveThirding would be a better name ;) ) Depending on how many workers are available, BOHB will start running jobs on different budgets. In fact, most of the time most workers are busy evaluating a configuration on the biggest budget.
• Jobs per budget:
In each iteration there are roughly  3 times more evaluations from one budget to the next larger one. As different iterations start with different budgets, this factor does not hold exactly when you look at all iterations. I didn't do the math exactly, but one could determine the constant for each budget, but I is not essential. The plot you mention in you post does follow this trend of a constant number of evaluations per budget per time if you average out the effect of the iterations/limited number of workers. Those cause the 'staircase' look, but if you smooth that out, you should recover a linear trend for all budgets.
• Hyperparameter configuration reuse
Yes, configurations that performed well on the smaller budget will be evaluated on a larger budget (see above). By default, BOHB does not know about your computation, hence cannot save your intermediate training results and warmstart from there. Checkout this issue for some more detail.
• Rank correlation
Yes, it's the only way to empirically measure how good of an indicator  the performance on a smaller budget is for the performance on larger budget.
Hope that helps.

OK, got it, some of the entries in returned dict were elements of numpy. Casting then to floats helps to solve problem 1 in the original post. Now I am testing if problem 2 is resolved also.
I did read the paper before trying out the software :). Still confused though:

What do you call 'iteration': is it complete training with a number of configurations at a given budget? Or is it a complete training of a number of configurations across all budgets?
I understand the successive halving (SH) and the continuation of good 1/3 of configurations to a higher budget, but I thought that in the paper you discuss generating a set of configurations based on current model before moving to the next budget... Your description now seems to imply that fractions of the original configurations chosen at the lowest budget are propagated across budgets as in SH. Do you use the configurations that survived that race to the highest budget in order to update the model and pick up new set of configurations for next iteration at the lowest budget?
The plot follows the trend, but the ratio between the highest to the lowest budget runs is ~1/2 not 1/9.

One iteration is one round of SuccessiveHalving, meaning a bunch of configuration on a small budget and then less and less configurations thereof evaluated on larger and larger budgets.
BOHB does use the original SH, but the sampling of random configurations is replaced by samples from a model. Every evaluation is used to update the model though.
Okay, let's do the math for a simple example. Let's say `min_budget=1' and 'max_budget=9'. Then the budgets are [1,3,9]. The first, fourth, seventh and so on iterations will run 9 configs on budget 1, 3 on 3 and 1 on 9. The second, fifth, eighth and so iteration will use 3 as the lowest budget and start with  3 or 5 configs (not sure right now) on budget 3 and have 1 on the largest budget. The third, sixth, ninth and so on iteration will have only 3 configuration on the maximum budget. If I sum that up:
9 configurations on the smallest budget and 1+1+3 = 5 configurations on the largest budgets, which is a ratio of 5/9 ~ 0.5.
Does that clarify things a bit?

OK, great. This does clarify, thanks.
Number of iterations is the parameter passed to BOHB.run(n_iterations)?

In your example: I think the second iteration should have 5 configs on budget=3, based on Algorithm 1, line 3, in the paper, correct?  Line 4 in the same algorithms should have eta^{-s} b_max, shouldn't it?

I think the implementation here will actually produce 3 configs in the second iteration. This is due to some confusion I had about the original HyperBand implementation. The paper shows a different equation than the demo here.
I hope you don't mind if I close the issue.

xx

Hi
whether following problem 2 is resolved,how to solve it?
After the optimizer goes over all configurations it just hangs, waiting for workers:
DEBUG:hpbandster:HBMASTER: Trying to run another job!
DEBUG:hpbandster:job_callback for (19, 0, 0) finished
DEBUG:hpbandster:DISPATCHER: Starting worker discovery
DEBUG:hpbandster:DISPATCHER: Found 8 potential workers, 8 currently in the pool.
DEBUG:hpbandster:DISPATCHER: Finished worker discovery
DEBUG:hpbandster:DISPATCHER: Starting worker discovery


Reorganize documentation

Ticket
Resolves #120
Changes

Create template-only-docs folder for instructions on how to use the template that should not be kept in the project repo itself
Split up infra/README.md into smaller documents
Reorganize/add documentation for setting up:

team workflow
terraform backend and oidc
CI
ECR
environments

Context for reviewers
Per our discussion, wanted to start with the instruction docs, then proceed to implementation in separate PRs. I think starting from the developer user perspective is a helpful way to make sure we're doing the right thing to make it easy to understand and use.
The best way to review this is to probably browse the docs directly from the branch
Testing

For docs, just viewed them in my VS code preview
Since I did some renaming, I retested the template-only.mak scripts

make -f template-only.mak set-up-account
make -f template-only.mak set-up-app-backends
make -f template-only.mak destroy-account

Thanks for the review! I'll take a look. And no worries about not reading everything, we can always change things.


[SPARK-48857][SQL] Restrict charsets in CSVOptions

What changes were proposed in this pull request?

SPARK-46115 SPARK-46220 started the work for building a consistent charset list for spark, the PR brings it to CSV options
Why are the changes needed?
To make the charset list consistent across different platforms/JDKs
Does this PR introduce any user-facing change?

Yes, legacyCharsets is provided
How was this patch tested?

new tests
Was this patch authored or co-authored using generative AI tooling?

no

Thank you @cloud-fan, Merged to master


wasm files are not loaded on Firefox due to wrong Content-Type

Describe the bug
On Firefox I get an error in JS console:
wasm streaming compile failed: TypeError: WebAssembly: Response has unsupported MIME type 'application/octet-stream' expected 'application/wasm'

This is in relation for request to /libs/olm.wasm.
With out this WASM compiled the performance is so low that video does not work and client gets "Connection: poor" even thought there is plenty of bandwidth available.
Context

Hardware: VM on home server (Dell PC)
YunoHost version: 11.0.11
I have access to my server: Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes

If yes, please explain: It is behind Caddy, and I work around the issue there, direct request still gives wrong Content-Type.

Using, or trying to install package version/branch: 2.0.8138~ynh1

Steps to reproduce

Go to Jitsi Meet
Start a conference
Check JS console output for

wasm streaming compile failed: TypeError: WebAssembly: Response has unsupported MIME type 'application/octet-stream' expected 'application/wasm'

OR
curl https://example.com/libs/olm.wasm -v

If you get this there is a problem:
< content-type: application/octet-stream

Expected behavior
No error, video working and curl request giving:
< content-type: application/wasm

seems that nginx configuration is missing:
https://github.com/jitsi/jitsi-meet/blob/5e90e725626bf8a63c227897b9ddb0194f9b8651/doc/debian/jitsi-meet/jitsi-meet.example#L3-L7


Invalid command 'ModPagespeed' error

What steps will reproduce the problem?
1. install mod-pagespeed-beta on apache2.4 debian jessie
2. a2enmod pagespeed
3. restart apache

What is the expected output?
apache starting normally with pagespeed

What do you see instead?
AH00526: Syntax error on line 38 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command 'ModPadgespeed', perhaps misspelled or defined by a module not
included in the server configuration
Action 'configtest' failed.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
latest-beta

Package: mod-pagespeed-beta
Status: install ok installed
Priority: optional
Section: httpd
Installed-Size: 14532
Maintainer: mod_pagespeed developers<EMAIL_ADDRESS>Architecture: amd64
Version: <IP_ADDRESS>-r3346
Replaces: mod-pagespeed-stable
Depends: apache2.2-common | apache2-api-20120211, libc6 (>= 2.4), libgcc1 (>=
1:4.1.1-21), libstdc++6 (>= 4.2.1-4)
Pre-Depends: dpkg (>= 1.14.0)
Conflicts: mod-pagespeed-stable
Conffiles:
 /etc/apache2/mods-available/pagespeed.load 946b3a808325a06293333b19548feece
 /etc/apache2/mods-available/pagespeed.conf 9a2079f94e5fbaeef415e182d049103f
 /etc/apache2/conf.d/pagespeed_libraries.conf 7aa7213b7d35fbefe891794218bd2640
 /etc/cron.daily/mod-pagespeed dc36fb0b3bd42564d326e2e7f6c9c59e
Description: Apache 2 module to optimize web content.
 mod_pagespeed is an Apache module that aims to speed up load time of pages by applying web performance best practices automatically.

On what operating system?
debian jessie
Linux something 3.10-2-amd64 #1 SMP Debian 3.10.5-1 (2013-08-07) x86_64
GNU/Linux

Which version of Apache?
2.4.6-3

Which MPM?
prefork

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 27 Aug 2013 at 8:47

Hello, I followed the footsteps of Igor able to fix the error but I still see the same problem.
I have installed Pagespeed of Google but still is not working when trying to put that data to configure jumps that error. Please Help!!!
Thank you very much.


Update Package Version for Component Governance

This PR updates to 17.11 packages and hardcodes System.Text.Json and Microsoft.IO.Redist for CG.

Do you want to update the MIEngine package version to 17.12 at the same time?


B 18823 ghc create requested office user int

B-18823
Issue Ticket
Summary
Db level unique constraints were not getting passed back from the API as detailed errors, and instead was sending back a blank 500 error code, as detailed in the issue ticket.
First Integration PR
The validation errors were not all pooled together as this is a DB level constraint error, not a service level.
The quotation mark changes in swagger-def come from merging the main base.
How to test

Import latest ghc.yaml into postman
Grab a transportation office id from the transportation-offices GHC endpoint. Grab the “Id”, not the “Address -> Id”. There are 2 Ids per response back, grab the root one.
Login to office as any office user
Open network tab in browser dev tools and refresh page
Select latest network request, select headers
Grab ‘X-Csrf-Token’ value from the headers
Open postman
Navigate to MilMove GHC API requested-office-users “POST Create an Office User”
Navigate to Headers and add a new header, ‘X-Csrf-Token’, past your value in the value box
Update the URL to be respective of your environment, such as officelocal:3000/ghc/v1/requested-office-users
Update the body to be something like this (Update the transportationOfficeId:

{
  "firstName": "John",
  "lastName": "Doe",
  "email"<EMAIL_ADDRESS>  "telephone": "555-555-5555",
  "transportationOfficeId": "5a3388e1-6d46-4639-ac8f-a8937dc26938",
  "roles": [
    {
      "name": "Transportation Ordering Officer",
      "roleType": "transportation_ordering_officer"
    }
  ],
  "edipi": “1234456789",
  "otherUniqueId": "2234567892"
}

Now, submit it again. You should receive a response back from the server that the email is already taken
Change the email and send again, now the server should say it's your EDIPI
Change the EDIPI and send again, now it should say it's your otherUniqueID

So are edipi & otherUniqueId unique in the database? I'm not seeing that they are.

So are edipi & otherUniqueId unique in the database? I'm not seeing that they are.

They are in the office_users table.

Are you not returning the invalid_fields we discussed in slack? When I send a post without email:

I get no invalid_fields:

Are you not returning the invalid_fields we discussed in slack? When I send a post without email:
I get no invalid_fields:

You have to provide an email to hit the invalid fields from the service object

So are edipi & otherUniqueId unique in the database? I'm not seeing that they are.

@danieljordan-caci I think they are in the office_users table.

Oh you're right. I was thinking of the service_members table. Thanks.


Add Solana information to user profiles

Users who add their Solana addresses to their existing profiles will need the information appended to their user information in the database
Also vice versa for users who have solana and add an ethereum adresses

We would build on the DB change discussed here https://app.zenhub.com/workspaces/all-devs-61644589b92edf0016f6999c/issues/gh/giveth/impact-graph/1173, but Frontend ofcourse needs to show relevant information.

@jainkrati - Is there something missing from the issue specification? Or more details myself or @MoeNick can provide?
If not please assign this issue if you have sufficient clarity.

To clarify @MoeNick 's points
Project Owners Adding Solana Address
Since a project owner is aliased by their eth address in order for them to add a solana address for their existing project they would need to log in with their eth address (since we can't alias the two together... yet)
This is okay for now, unless @aminlatifi thinks it will cause lots of problems later.
We should absolutely make sure a user can sign in w/ solana and make a project w/ a solana address as part of MVP since we are required to onboard solana native projects and have them receive donations as part of the final grant milestone.
Sign In with Solana
I think it's okay for now if v1 is only sign in w/ Solana and we can't handle having joined sol/eth profiles.
@aminlatifi If you think it won't be a major headache to join existing separated solana and ethereum profiles then I'm okay, as long as you keep it in mind for post-MVP it is a requirement that users can have 1 profile with a joined solana/ethereum address

In general since our deadlines are VERY tight we should cut scope as much as possible and meet the minimum requirements of the grant.
While development is in process @MoeNick can do the necessary planning & research for post MVP follow up.

This is the most complex part. And can easily take 3-4 days (24-32 hours of work) if NO big side effects arise.
As the user is tightly coupled with the eth wallet and called in many places.
Also changes in logic in the frontend might occur, since interacting with the backend depends on the schema.
Ideal solution would be to abstract the user from the wallet and add a linking functionality + what Amin said in this comment.

It's better to go for merging accounts at the last step.
Currently, we have an authentication issue with the Solana wallet. If we resolve it, we can complete the flow of donating in Solana and Creating projects with the Solana address. I hope we can have them implemented by next week, then aim for supporting both ETH and Solana address for single user.

I think we will get in trouble if we go live and we going to have duplicate users.
if you have a clear solution for it @divine-comedian  I'm down that we have it in 2 separate version, unless I not sure.

@aminlatifi @CarlosQ96
This one should be in QA, right?

@aminlatifi @CarlosQ96 This one should be in QA, right?

Yes

@maryjaf FYI

We excluded the merging account feature from this issue and made another EPIC here, which that epic is out of scope.
But the acceptance criteria for this story is I can complete my SOL profile, as a new user. @maryjaf


Criação de carreira PHP

ROADMAP
[How Internet & Websites works]
[Browser/Server request flow, HTTP Protocol, Status codes]
[Basics of HTML/CSS]
[Basics of Javascript]
[Introduction to Databases]
[Version Control System (Git & Github)]
[Getting Familiar with PHP: Syntax, functions, dates, JSON, File System, CURL, etc...]
[Understanding Composer]
[PHP beginner projects]
[Object Oriented PHP]
[Build Projects]
[Build custom MVC Framework]
[What is API]
[Learn Existing Framework]
[Learn JavaScript]
[Basics of JavaScript Frameworks]
[Build Projects with existing frameworks]
[Get Familiar with Terminal]
[Editors/IDEs]
[Docker]
[Design Patterns]

Olá Bruno,
Já temos uma carreira de PHP! :)
Segue o link: https://techguide.sh/pt-BR/path/php/


[WIP] Add copy argument to obs/var_vector

Per some benchmarking results in https://github.com/theislab/anndata/issues/317#issuecomment-583963717, it looks like we can speed up getting a vector out of a dense array with the obs_vector methods. Since it always returned a copy before, I figure this was worth a keyword argument.
This gives a 1000x speed up when the array which values are being taken from is dense.
Needs tests.

Why do we have 4 almost identical blocks of code and why do they differ?

For raw, it's a different set of attributes. Then there's obs and var, and at the time I was less comfortable with doing getattr instead of obj.attr.

The last 6 lines each are identical, yet people trying to modify it have to be aware they have to modify 4 places. Please change. Case in point: Why does var_vector grab stuff from .var but obs_vector doesn’t grab stuff from .parent.obs or so? Please make it all work identically.


Mikro ORM doesn't allow passing "server" to MSSQL

Describe the bug
Hello,
It's not possible to pass the "server" parameter to mssql so it is not yet possible to connect to a named instance.
The documentation doesn't mention it either.
Tedious needs "server" option in format "HOST\INSTANCE" in order to allow connecting to a named instance of SQL Server.
Reproduction
MikroOrmModule.forRoot({
    driver: MsSqlDriver,
    dbName: 'my_awesome_database',
    user: 'sa',
    password: 'sa password',
    server: 'LOCALHOST\\SQLEXPRESS2022' // <-- this is mendatory to be able to login to the local named instance,
    driverOptions: {
      encrypt: false,
    },
    debug: true,
}),

What driver are you using?
None
MikroORM version
6.2.0
Node.js version
v21.7.1
Operating system
No response
Validations

[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Slack.
[X] The provided reproduction is a minimal reproducible example of the bug.

You can use driverOptions here too. I will have a look if we can map such value from host option, I dont see why we would need anything else.

Is driverOptions passed to new Connection(/* here */) of tedious?
I can get tedious to connect to my database but cannot get Mikro ORM to it yet. You are probably right, it's a option mapping issue I think

I could get it working with this configuration (on tedious alone):
const connection = new Connection({
    server: 'name of the server',
    options: {
        database: 'my_awesome_database',
        instanceName: 'SQLEXPRESS2022'
    },
    authentication: {
        type: 'default',
        options: {
            user: 'sa',
            password: 'sa password'
        }
    }
});

Is driverOptions passed to new Connection(/* here */) of tedious?

No, as I just said, it's passed to knex(), MikroORM does not directly work with tedious.


[Fit&Finish] Security analytics overview page

Description

getting started card font size/element
page title show based on current navgroup

Issues Resolved
[List any issues this PR will resolve]
Check List

[x] Commits are signed per the DCO using --signoff

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

@amsiglan @riysaxen-amzn can you help to review this?


Inform user multiple transactions might be needed

There are a few places the UI needs to inform the user multiple transactions might be needed.

[x] Trading Order Form. simulate trade will give number of fills, need to tell user 1-N transactions might be needed.

[x] All Modals that allow the user to ... All like redeem all or claim all need to inform user if there are multiple of transactions needed.

This was added -- will all be re-tested with onboarding / trading / etc design qa.


NIFI-7600 - Defining JMS attribute types breaks due to invalid charac…

…ters
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
fixes bug NIFI-7600. _
Removed '.type' attributes being added to JMS properties. These attributes act only as meta data and cause JMS Exceptions as they contain invalid characters (e.g. the dot)
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

[ ] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[YES  ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ NO] Have you written or updated unit tests to verify your changes?
[ YES] Have you verified that the full build is successful on JDK 8?
[ YES] Have you verified that the full build is successful on JDK 11?
[ N/A] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ N/A] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ N/A] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ N/A] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

@dazhitchman Thanks for this! I was just thinking about this over the weekend and it's definitely needed. One question: should it be so broad as to remove anything ending in '.type' or would it make sense to do something more narrow? E.g., I always see this with mime.type since it frequently gets populated but if someone has defined their own attributes it might not be obvious where they're going.

Hi Joey
I think that opens up others issues. NIFI uses attributes for both data (to augment content) and metadata to control behaviour.  In the JMS example, there is no valid JMS field for “JMS_IBM_Encoding.type” , it is just used to help the processor build the headers so it shouldn’t leak from the processor.  The mime type however is used by downstream applications like a web/email server so they should be passed along. I am new to NIFI though so happy to take advice.
Darren

On 7 Jul 2020, at 5:23 am, Joey<EMAIL_ADDRESS>wrote:
@jfrazee commented on this pull request.
In nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSPublisher.java https://github.com/apache/nifi/pull/4385#discussion_r450432161:

@@ -108,6 +108,13 @@ void setMessageHeaderAndProperties(final Session session, final Message message,
}
} else {
// not a special attribute handled above, so send it as a property using the specified property type

                   String key=entry.getKey();

                   if (key.endsWith(".type")){

If we go broad and apply this to anything ending in '.type' I think it deserves a WARN.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/apache/nifi/pull/4385#pullrequestreview-443347444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLUPLLFJR7ULDX764J72EDR2IQC5ANCNFSM4ORGHSFQ.


rust not installed as part of startup

causes exa issues when typing ls.. very annoying for new users

related to #51

fixed


Form reset in react-hook-form does not clear fields' values.

I have been experiencing a problem while trying to reset form when the submit is successfully completed.
After the submission completed, the inner form value (react-hook-form inner value states) will be cleared (expected behavior), yet the visible input value are still visible to the user even though react-hook-form's states are already cleared.

Below is my custom hook for react-hook-form initialization & side effect handling.
// import ...
export const useProjectUpdateHandler = ({
  status,
}: {
  status?: ProjectStatusType;
}) => {
  const form = useForm<z.infer<typeof projectUpdateFormSchema>>({
    shouldUnregister: true,
    defaultValues: {
      status: status,
      subject: "",
      comment: "",
    },
    resolver: zodResolver(projectUpdateFormSchema),
  });

// ...

  /**
   *  Handle the result of updating the project status.
   * */
  useEffect(() => {
    if (updatingStatus === "success") {
      toast({
        title: "Project status updated successfully",
        variant: "successive", // custom variant
      });

      form.reset();
    }

    if (updatingStatus === "error") {
      toast({
        title: "Project status updated failed",
        variant: "destructive",
      });
    }
  }, [updatingStatus, toast, form, router]);
  // ...
};

The solution currently that I found is to pass your default values to the reset function. This shouldn't be the intended functionality since you're providing the default values at initialization, but, seems like this is what we have to do currently. It's a react-hook-form issue as it happens with or without using shadcn/ui.
form.reset({ status: status, subject: "", comment: "", })

Hello @PlagueFPS . Thank you for your replay. Unfortunately, that solution does not work either. I have tried them already, and even forcing page to refresh as well. But it's still no use.

I think I have found a solution: form.control._reset(); does the work; however IMO, this feels so illegal to access the forbidden control.

try to wrap it like this
useEffect(() => {
form.reset({....})
},[])

don't forget to add which depedency you want to listen into the useEffect depedency listener. Hope it works

Yeah, I already use it with useEffect and included all necessary dependency array, but that's not working. I have also found a temporary solution above.

Yeah, I already use it with useEffect and included all necessary dependencies array, but that's not working. I have also found a temporary solution above.

maybe try to use controller from RHF??

Here's a workaround I found, try:
form.setValue("fieldValue", "");

Straight and simple. By the way, it still take a significant amount of codes if we have lots of fields.

Why not just form.reset({})?

What you guys did to handle default case if say select menu's options are dynamic? On resetting using form.reset(), the states are reset but their values are still shown in the menu. I don't intend to use undefined which is ig not the best practice.


Add my QQ bot to Readme

Hi!
I wrote a QQ Bot with oicq and your ChatGPT-api. (with RabbitMQ)

Looks great 💪


Add remaining underscore / lodash features

Some points:

Standards succeed where they pave existing cowpaths. lodash is the most depended upon npm package.

Standards succeed when there are multiple independent implentations. There are already two implementations of underscore / lodash. Underscore is also quite popular.

While many of _ features are in ES8, a bunch - like .get() for getting a deeply nested key in an object - are not. Pretty much everyone who has to get some data from JSON needs to (safely, ie not failing if onee of the keys doesn't exist) get a deeply nested key in an object.

TC39 should implement the features from lodash andd underscore that do not already have ES equivalents.

We're working on optional chaining, which I think should handle use cases of _.get() when the path string is fixed. Can we continue this discussion in that repository?

Please consider providing something equivalent to underscore's omit. I find myself reaching for this all the time.

Omit can be emulated using object destructuring:
> let a = { foo: 5, bar: 6, baz: 7 }
undefined
> a
{ foo: 5, bar: 6, baz: 7 }
> let { bar, ...noBar } = a
undefined
> noBar
{ foo: 5, baz: 7 }

It's weird because I recommended this, and it was closed as off topic and I was called disruptive
The next day Dan asked for this in public and now it's a good idea
There's a whole lot down there
https://github.com/tc39/proposal-javascript-standard-library/issues/39

We really should pick up our basic functional predicates.  Much of what lodash and ramda actually are are that.
The best place to look would be in the standard library of a very old functional language, like lisp, or a very active modern one, like clojure, because this is their bread and butter
It would be better to look at ramda than lodash.  Underscore got a lot of its critical basics wrong in important ways

@Timer using destruct we'll generate unused variables (such as bar in your example). I suggest add a specific utility for omit, that will return exactly what you need, without creating unused stuffs.

@renatoagds You could also write it like this:
let a = { foo: 5, bar: 6, baz: 7 };
let { bar: _, ...noBar } = a;

Another option:
let a = { foo: 5, bar: 6, baz: 7 };
var noBar = Object.assign(
    ...Object.entries(a)
        .filter(([key, value]) => key !== 'foo')
        .map(([key, value]) => ({ [key]: value }))
);

If we would have something like a Object.from we could simplify that to:
let a = { foo: 5, bar: 6, baz: 7 };
var noBar = Object.from(Object.entries(a).filter(([key, value]) => key !== 'foo'));

Regarding Object.from, there's Object.fromEntries which is close to stage 4.

@kasperpeulen I know that we can do in a lot of ways, but that's exactly what lodash does. The exactly topic here is put this boilerplate inside the stdr library.

@jdalton you've got some pretty unique insight here - any thoughts?

Thanks for the ping @mikemaccana! I've been following this thread at a distance.
I believe the goal of this proposal is to define a mechanism for providing a more extensive standard library in JavaScript and not really about the specific methods that compose the various standard modules. We have a proposal process that folks can follow and bring to the attention of TC39 delegates like myself.
At the top of my wish list of things to be added to the language would be nicer ways to deep clone and deep compare (think Node's util.isDeepStrictEqual) values.


adds signup_resource.inc, SignupTransformer.php, and registers it in …

…dosomething_api.module
What does this PR do?
Creates the signup.resource.inc and SignupTransformer.php files. Registers this in dosomething_api.module
How should this be manually tested?
signup should be it's own category highlighted in light blue in on the Services page: http://dev.dosomething.org:8888/admin/structure/services/list/drupalapi/resources. Dropdown should include retrieve and index.
What are the relevant tickets?
First step for #6110. Endpoint still needs to be enabled and parameters need to be commented in.

Remove the weird ._signup_resource.inc hidden file that got committed.

ah, thanks @weerd ! For some reason that always happens to me! Deleted it :)

Looks good! :+1:
Didn't really look to much into the SignupTransformer stuff, cause it doesn't really matter just yet. Mostly just need the resource file and to update the module before we can activate the endpoint :)


Fix: Disable xdebug when we don't need it

This PR

[x] disables xdebug when we don't need it

Related to #288.
:information_desk_person: We only need it when we want to collect coverage, right?

Thanks @localheinz ! If you get a chance, please double-check ab55c404e7e96e89f0401a9c679cd7dd4a93e7d3 for me. It's late here and was editing on phone. I want to make sure I understood properly what you meant by adjusting the conditional. I assumed logical negation of the condition where we would generate / report coverage.
Wonder if there's a cleaner way for us to express "only generate coverage on a single build when code is merged into master". Probably not... wonder if we can compute it as part of setting up the environment and just reuse that variable further down. Thoughts?

@mdwheele
Looks good!


Who knows the source code? Explain it to me.

Any of you can read the source code and explain it to me. I need yalu102 source code to make 10.3 ~ 10.3.2 jailbreak tools.

If u can't read it then sorry plus Yalu102 won't help u at all its all patched in 10.3-10.3.2
-Sincerely Caleb
On Aug 1, 2017, at 12:44 AM, jackiossy <notifications<EMAIL_ADDRESS>wrote:
Any of you can read the source code and explain it to me. I need yalu102 source code to make 10.3 ~ 10.3.2 jailbreak tools.
—
You are receiving this because you are subscribed to this thread.
 If you can't read, you can't write. Simple as that.
Trust me, if it was possible what you're trying to do, then it'll already been done kiddo.

@king4q good news, a leak for 10.3.1 & 10.3.2 was found. However 10.3.3 is patched and so forth.

#162

thats not how it works @jackiossy


114 custom folderfile naming

Description
Adds custom folderfile naming
Linked Issues
Closes #114
Additional context

Is there any documentation on how to use Standard episode format and Standard podcast format? I'd like to use those features but I can't find any information on how, and I'm not at all familiar with Rust so can't interpret the code very well


Enable zbb on aosp builds

Now that https://github.com/google/android-riscv64/issues/63 is merged, we should be able to enable zbb.

https://android-review.git.corp.google.com/c/platform/build/soong/+/2617535

Enables zbb for Android by default https://reviews.llvm.org/D152729


Create new configuration to be able to disable '[Producer] Sending' logs.

We get an overwhelming amount of these logs in production - and they do not provide a ton of value for us. Would be good to be able to turn off this type of logs via a configuration in ruby-kafka.
https://github.com/zendesk/ruby-kafka/blob/a56d16bf1ff30d784c4617159033569045e157eb/lib/kafka/produce_operation.rb#L107

But it's an info one. Can't you just escalate your logger to a non info level?


test: consistently group test cases by content

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 62.153%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
179

Relevant Lines:
288

💛  - Coveralls


Feature | Adding withRequestMocks() helper + introducing HasFakeData interface

This PR consists of two new features. I worked on it with @onlime, credits to him for the idea!
Request Mocks
The first feature is a withRequestMocks() method that you may call, for example, on a Connector. You may use both Request class names and URLs. Under the hood, it transforms the array into an array of mock responses that are passed to the MockClient. Also, you may now pass arrays and strings in addition to using MockResponse/Fixture instances and callbacks.
ForgeConnector::make()->withRequestMocks([
    GetUserRequest::class => 'Sam',
    GetServersRequest::class => ['Server A', 'Server B'],
    OtherServiceRequest::class => MockResponse::fixture('other-service'),
    WildcardServiceRequest::class => fn (PendingRequest $pendingRequest) => MockResponse::make(['...'])

    // or...

    '/user/1' => 'Sam',
    '/servers' => ['Server A', 'Server B'],
]);

If you don't provide a response, it simply uses an empty MockResponse:
HasFakeData interface
The second feature is a HasFakeData interface that you may use on a Request class. Also here, you may return a string, an array, or a MockResponse or Fixture instance:
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\PendingRequest;
use Saloon\Contracts\HasFakeData;

class GetUserRequest extends Request implements HasFakeData
{
    /**
     * Define the HTTP method.
     */
    protected Method $method = Method::GET;

    /**
     * Define the endpoint for the request.
     */
    public function resolveEndpoint(): string
    {
        return '/user';
    }

    /**
     * Get the fake data for the mocked request.
     */
    public function getFakeData(PendingRequest $request): mixed
    {
        return ['Sam'];
    }
}

Now when you pass the request to the withRequestMocks method, it will use the getFakeData method to mock the response:
ForgeConnector::make()->withRequestMocks([
    GetUserRequest::class,
]);

You may even mix requests with and without this interface, as well as URLs:
ForgeConnector::make()->withRequestMocks([
    GetUserRequest::class,
    GetServersRequest::class => ['Server A', 'Server B'],
    '/meta' => ['status' => 'pending'],
]);

Hey @Sammyjo20  – sure, I'm happy to show you my use case where I think it totally makes sense to have some kind of helper/abstraction for Request mocking. We are using mocked/fake responses not just for testing but also for development, and in each integration's constructor, we can enable/disable mocking by configuration. So a very basic example would look like this:
    public function __construct()
    {
        if (! config('acme.api.enable')) {
            $this->withMockClient(new MockClient([
                FetchNote::class  => fn (PendingRequest $request) => MockResponse::make($request->getRequest()->getFakeData()),
                FetchNotes::class => MockResponse::fixture('Acme/notes'),
                CreateNote::class => fn (PendingRequest $request) => MockResponse::make($request->getRequest()->getFakeData()),
            ]));
        }
    }

vs. (with this PR merged):
    public function __construct()
    {
        if (! config('acme.api.enable')) {
            $this->withRequestMocks([
                FetchNote::class,
                FetchNotes::class,
                CreateNote::class,
            ]);
        }
    }

In the first code snippet you see how blown up it will get, especially since I have just added 3 requests, but in a real SDK/integration, it will be potentially hundreds. We could group them by resource, though, something like new MockClient([...NoteResource::getRequestMocks(), ...AnotherResource::getRequestMocks()]), but that does not solve the problem of massively blown up code for the mocked responses.
So why did I pull the fake data for the response from a separate helper method in the request like $request->getRequest()->getFakeData()? Because in almost every fake data I want to use some dynamic data from within the Request object, e.g. $this->id (lots of APIs return part of the submitted data in their responses). It should not just be dumb and return static or random/fake data. If we would skip the abstraction of an extra getFakeData() method, we would end up in even longer callbacks, couldn't use an arrow function, but instead would need to do something like this:
            $this->withMockClient(new MockClient([
                FetchNote::class => function (PendingRequest $pendingRequest) {
                    /** @var FetchNote $request */
                    $request = $pendingRequest->getRequest();
                    return MockResponse::make($request->getFakeData());
                },
                // ...
            ]));

The @var typehint would be needed, as the IDE does not know about the effective Request object ($pendingRequest->getRequest()). So we have now 5 lines per mocked response but would still depend on the getFakeData() helper method from within the Request, as we want to access also protected properties or other non-public methods from within the Request.
All-in-all, it just gets completely messy and unmaintainable. For my use cases, the connector's constructor could easily grow to 10+ screen heights, mainly caused by extra bulk like in the example above. But with this PR, we can build all fake data directly in the Request object in a standardized way, and still have the luxury of returning anything from array|string|MockResponse|Fixture – fully matching your implementation. It's then just a single line with a single class name to enable the whole mocking per Request, or even just a single line per resource, if we want to group the mocked Requests by resource. Completely readable and maintainable. And I always see the fake data right on the spot, where it belongs to, inside the Request object.
Hope this makes it clear why this is totally needed! I mean, it is super easy to extend it that way in your own project with a simple HasFakeData interface for the Requests and a HasMockHelper trait for the connector. But we wanted to share that work and it's a non breaking change / new feature.

Hey @onlime
Thank you so much for the detailed explanation of your use case, that helps a lot. I think it's a cool implementation but in the interest of honesty - I wouldn't say I like the idea of mixing test data and architecture (Requests). When I'm looking at a given request class in my application, I shouldn't have to worry at all about the tests. In my opinion, the fixture/mock data should live within the test or a separate test file that is loaded to populate the mock responses.
I understand the point of standardisation (because well that's Saloon's whole point) however I did try this idea of having mock data inside of requests very very early on in v1 and I didn't like the idea of mixing.
I agree with you though that for large test scenarios it can get pretty messy! You could create invokable classes that you use in your tests. For example, I could have a FetchNoteData class in my tests directory.
class FetchNoteData
{
     public static function success(): array
     {
           return [...];
     }

     public static function failure(): array
     {
           return [...];
     }
}

and then in your tests you would write something like...
Saloon::fake([
     FetchNote::class => FetchNoteData::success(),
]);

I'm going to close this PR for now, thank you for the suggestion.

Hey @Sammyjo20
Sorry about the silence and thanks for your response. I would like to pick up the conversation on this topic, as I think you quite misunderstood my use case last time.
It's not (just) about testing, it's about using 100% of my requests of all Saloon integrations in local dev environment or staging, so I always get "working" response data from all requests fired.
I am firing a lot of requests to various API integrations, often directly from some Eloquent model hooks (updated, created, saved, etc model events). So even in development, I want to inspect the log (using my Laravel HTTP Client Global Logger for detailed logging incl. all request and response headers/body). I couldn't think of anything better than request mocking. And providing fake date from the Request object itself makes it so much easier, as I can access all local properties directly, without doing the work twice (previously, when using plain Laravel Http Client, I had to parse the path, and inspect the request, sometimes even parsing the body of the request,... all bulk without any advantages, just a complete mess.)
I now have a larger project in development that integrates 6 different APIs as Saloon integrations. All of them use this HasFakeData interface and all connectors grab the request mocks from the resources, which group all request mocks. And I depend so much on local properties to build smart fake data, so doing that directly in the requests feels definitely right.
It's quite a wild code base where I have used Saloon extensively. If you are ready to look into it, I am glad to share it with you in a private repo (just the Saloon integration's subtree, as otherwise it's an internal project for my own hosting company). Would you find some time to glance over it and comment? I am sure you will understand my use case then. And that nice implementation which @pascalbaljet built for me in this PR then hopefully may also be of interest to you or other Saloon users.
Cheers,
Pipo


Fails to compile: error: could not find native static library DOtherSideStatic, perhaps an -L flag is missing?

I installed Qt SDK 5.7.0, installed cmake, set QTDIR=C:\Qt\Qt5.7.0\5.7\msvc2015_64 and cloned the project, git submodule init && git submodule update, with cargo run --example properties I get
   Compiling qml v0.0.9 (file:///C:/Users/bombless/qml-rust)
error: could not find native static library `DOtherSideStatic`, perhaps an -L flag is missing?

error: Could not compile `qml`.

To learn more, run the command again with --verbose.

I'm on Windows 10 64-bit, using Visual Studio 2017, cmake version 3.7.2
What did I prosibilly missed?

Ah, seems that I need to build DOtherSide manually.
Got another error though,
CMake Error: Error: generator : MSYS Makefiles
Does not match the generator used previously: NMake Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1