[feat-req] ability to provide formatter for template, script & style tag like vetur

Hi,
I am working in a team and I want to keep consistent code across my whole project. For this reason, I am using formatters like stylelint, eslint etc.
I was able to specify which formatter to choose in vetur but this is not the case with volar.
I already mentioned this in the discord channel previously and I was completely satisfied with your response but as the project grows and new team members are introduced, it is getting hard to keep consistency.
Below are some notes, I think providing features like this is important:

Code consistency across the whole project
Ability to use already popular formatters for specific language. (like stylelint for scss)
Fewer bugs if we add strict linter (eslint)
Formatters like stylelint allows following people preferred/chosen CSS format/order without knowing it
Writing clean & formatted code for building products for developers or handling code over to other dev

I already tried for 2 months without the above feature but I still miss awesome things created by people around the world. Volar will be the future of Vue and I think using popular tools like eslint & stylelint with vue will be great.
I am totally fine if you still don't want to introduce a feature like this or volar later provide this. These are just my thoughts and what I am facing.
Regards.

I am working in a team and I want to keep consistent code across my whole project. For this reason, I am using formatters like stylelint, eslint etc.

You just need to add eslint-plugin-vue to make ESLint understand .vue files and which parts of it are html and which JS/TS. It will then use the rules you've defined for normal JS/TS files also in Vue.
That way, your IDE's ESLint extension will show you the errors, instead of Volar. See here for the extensions.
Here's a web demo:
https://ota-meshi.github.io/eslint-plugin-vue-demo/
As you can see, this demo shows linting errors even for generic JavaScript rules — see line 31 and the "no-unused-var" rule which comes from regular ESLint.
https://eslint.vuejs.org/user-guide/#installation (just don't use the @vue/cli option, use "install via npm" since there's no vue cli in vue 3)
https://vue-loader.vuejs.org/guide/linting.html#stylelint - this is a link from the Vue 2 days (I think) but stylelint seems to support vue files out of the box. To get linting information in VS Code, see https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
Related:

https://github.com/johnsoncodehk/volar/issues/478
https://github.com/johnsoncodehk/volar/blame/17b50db7dbcee55457fa55127ad93a3806111abd/extensions/vscode-vue-language-features/README.md#L107
https://github.com/johnsoncodehk/volar/discussions/53 (Formatting tab size config & Change formatter)

Made a demo quickly: https://github.com/sethidden/vue3-eslint-stylelint-demo . Lemme know if there are any problems. Make sure to install the eslint and stylelint exts for vscode

@jd-0001 similar to #672, we need to with for plugin API(#185) implemented.
@sethidden do you want to change vue3-eslint-stylelint-demo to a template repo so that I add it to readme? I think some peoples interested in it.

@sethidden done. Also added husky for pre-commit linting

@sethidden added, thank you. :)

Thanks @sethidden I was able to enable stylelint in SFC after refering to your repo, I just updated .stylelintrc.json to below:
{
    "extends": [
        "stylelint-config-standard-scss"
    ],
    "overrides": [
        {
            "files": [
                "**/*.scss"
            ],
            "customSyntax": "postcss-scss"
        },
        {
            "files": [
                "**/*.vue"
            ],
            "customSyntax": "postcss-html"
        }
    ]
}

had to install postcss-html.
I was already linting my template & script tag using eslint.
Btw, I am not using prettier because of they don't want to merge this PR.
@johnsoncodehk Shall I close this?

I will close it because already has a similar issue #672.


Template in identity.xml doesn't support for "GrantTypeValidatorImplClass" in "custom grant handler"

doc fix - https://github.com/wso2/docs-is/pull/439

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Ensure no user functions are called

If fd is aliased, Search Directory will hang until fd finishes executing. This is because fish functions buffer. Resolves #281.

Re-opening based on further discussion in #281 .

I've fixed one dangling alias that I've missed. It wasn't blocking but for completeness it should be unaliased too.
I don't know why the test are failing.

The test is failing for the same reason that the test is failing in #282.

Closing in favor of #282. Next time, just update the same PR. 😉


Remove a workaround since rails 5-0-stable has fixed the regression

https://github.com/rails/rails/issues/24959
5-0-stable commit: https://github.com/rails/rails/commit/6458610d0b95049

cc @carbonin


Remove the dependency on the styled API from emotion for Accordion components

We don't actually need to use the styled API from Emotion to create the Accordion components. Anytime we are using styled, we can use Box instead.
Example:
// Original
export const Accordion = styled('div')<AccordionProps>(
  {
    boxSizing: 'border-box',
    margin: 0,
    minWidth: 0,
  },
  base,
  ({ variant: variantProp = '', variantKey = 'accordions', theme }) =>
    _variant({ variant: variantProp, theme, variantKey }),
  sx,
)

// Refactor
export function Accordion(props) {
  return <Box __base={{}} {...props} />
}

Box will accept the variant props and add the appropriate styles to the element.
Components

[ ] Accordion
[ ] AccordionBody
[ ] AccordionFooter
[ ] AccordionHeader
[ ] AccordionItem

Closing this as there isn't a good way to fully remove emotion and styled right now.


Bash arrays

Implemented bash arrays. I found out that bash does not support printing arrays so I added in logic that prevents translation from print[1,2] to echo (1, 2)

TODO: throw error if nested arrays in bash


Allow for a default enabled state for new modules

As mentioned in #184 this provides the ability for the user to set every new module as disabled by default, currently it is the opposite with modules also being enabled.

The builds seem to be failing because Mockery was not found. Not sure if this is something I have done though? Don't have much experience with tests and PHPUnit/Mockery.

Nope, you're all good. I simply need to fix the build check~
Thanks for the PR!

Ah ok, no problem :)


Update GI documentation once the display is live

For now only the interface for legacy GIs is described.

Sorry, I merged the pull request before I noticed this issue.  I think it's OK to have your new text in the documentation but I can quickly revert it if you think that makes sense.


Typo fix: varialbe -> variable

Hello! I just noticed a small typo in library_scripts.sh where you print out "Found a pre-existing nanolayer which were given in env varialbe". I updated it from "varialbe" to "variable".

Thanks!


add alpha feature gate check for param array indexing

Changes
Before this commit, if alpha feature gate is not enabled, the array indexing params will not be added to string replacements, thus will lead to non-existent variable error. This is confusing to users and doesn't provide correct guidance. This commit adds the check to the array indexing validation.
/kind bug
fixes #6102
Signed-off-by: Yongxuan Zhang<EMAIL_ADDRESS>
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[ ] Has Docs included if any changes are user facing
[x] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including
functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[ ] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
[ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

/test all

/test all

hope this can fix https://github.com/tektoncd/pipeline/issues/6102

/assign @pritidesai

/retest
flake log https://prow.tekton.dev/view/gs/tekton-prow/pr-logs/pull/tektoncd_pipeline/6120/pull-tekton-pipeline-unit-tests/1623358151954796544
flake https://github.com/tektoncd/pipeline/issues/4643

If this approach is ok, I can add more cases to test err check to improve test cov

thank you @Yongxuanzhang for this PR, I have left a few minor comments. We definitely need to add more tests like you mentioned. If its easier to break this PR down after adding tests, please feel free to do so. Thanks!

/assign

Thanks @Yongxuanzhang for this PR. It seems to me that this PR and https://github.com/tektoncd/pipeline/pull/6103 have a dependency since this adds a new alpha flag related to indexing for array params and @pritidesai's PR promotes indexing for array parameters to beta. If my understanding is correct, we need to agree on which PR should be merged first, and updated the other one accordingly.

Thanks @Yongxuanzhang for this PR. It seems to me that this PR and #6103 have a dependency since this adds a new alpha flag related to indexing for array params and @pritidesai's PR promotes indexing for array parameters to beta. If my understanding is correct, we need to agree on which PR should be merged first, and updated the other one accordingly.

Yes, thanks! @afrittoli. I lean to merge @pritidesai's https://github.com/tektoncd/pipeline/pull/6103 first. I will hold my PR and update once it is merged

/hold

Wondering if alpha feature gate checking would need to be in the release note? Or this is something that shall already been acknowledged before 🤔

Wondering if alpha feature gate checking would need to be in the release note? Or this is something that shall already been acknowledged before 🤔

Sounds good, will add after I rebase

/assign
Hey Yongxuan, thank you for the PR and for dividing the PR into three, could you please fix the build failure for this PR :) ?

/assign
Hey Yongxuan, thank you for the PR and for dividing the PR into three, could you please fix the build failure for this PR :) ?

Yeah I will fix it when I merge the other 2 and rebase the code. This PR is currently held. Sorry I should mention it

Hi Yongxuan, wanna double check is this PR still active? I.e once the two PRs https://github.com/tektoncd/pipeline/pull/6179 https://github.com/tektoncd/pipeline/pull/6180 get merged,  are you going to work on this PR to add the feature gate check or you are going to create a new PR for it?

Hi Yongxuan, wanna double check is this PR still active? I.e once the two PRs #6179 #6180 get merged, are you going to work on this PR to add the feature gate check or you are going to create a new PR for it?

I plan to rebase PR after those 2 merged. But if it is of too much work I will probably open a new one.
Sometimes a new PR is easier. 😂

Move to https://github.com/tektoncd/pipeline/pull/6280 instead


avoid overtraining

Hello, I have simple 1D function to be fitted, but all the best solution are very overtrained. Example:

the red one is proposed by deep-symbolic-optimization, the green one is just a polynominal of 9th degree.
{
    "task" : {
        "task_type" : "regression",
        "dataset" : "mydataset.csv",
        "function_set" : ["add", "sub", "mul", "div", "log", "sin", "cos", "exp", "const"]
    },
    "controller": {"max_length": 16},
    "prior": {"length": {"max_": 16}}

}

mydataset.csv:
9.00e+01, 1.22e-03
9.50e+01, 1.39e-03
1.00e+02, 1.58e-03
1.05e+02, 1.77e-03
1.10e+02, 1.95e-03
1.15e+02, 2.11e-03
1.20e+02, 2.23e-03
1.25e+02, 2.28e-03
1.30e+02, 2.24e-03
1.35e+02, 2.12e-03
1.40e+02, 1.93e-03
1.45e+02, 1.67e-03
1.50e+02, 1.36e-03
1.60e+02, 5.32e-04
1.70e+02, 1.58e-04
1.80e+02, 1.05e-04
1.90e+02, 7.05e-05
2.00e+02, 5.51e-05
2.10e+02, 4.54e-05

It would help if you posted the expression, the reward, and other details like how long you trained before discovering the expresion. Hard to believe you could overfit anything with only 16 tokens.
You can also do a simple train-test split to avoid ovrefitting.

The expression, ported to numpy is
np.exp(-69.7934 * np.exp(-2.44152784 * np.sin(1.2736765 * x - 1.4101 + 105.01/x)))

it took ~30 minutes to find it on a cpu. I haven't saved the reward, but it was > 0.9.
Here another example:
(0.05 * np.exp(np.sin(1.30 * x + 1.7)) - 0.020) / (x - 80)

Is this real or synthetic data? It's hard to say whether this has truly overfit. Looks like it identified the period which matches the interval between your datapoints, and some function around that to hit amplitudes.
Removing the const token would prevent this, as would including datapoints that aren't evenly spaced.

These are the values of a physical quantities computed from the theory. The points on the x-axis are equispaced by construction.
By overfit here I mean that the red curve (dso) is fitting very well the points, but it is not able to give a good estimation between the points. I need something much smoother, as the poly9 example.

If they're synthetic, then I would suggest simply adding un-evenly spaced points. That should avoid this overfitting even if you include sin/cos.
Regarding your general question, you only allowed expressions up to length 16. A 9th degree polynomial would take huge amount of tokens. Roughly 9 add, 9 const, 45 mul, and 45 x1.

Right, I guess you don't have pow operator?

You can add pow with about 1 line of code...
And yes, my estimate was very much an upper-bound. Just making the point that 16 tokens is not enough to capture a high-degree polynomial.

Thanks, any suggestion for my points? They don't seems to have a strange behaviour. For example, is it possible to control the smoothness (avoiding to much changes of the concavity), or to force the function to be monotonic?

Sorry for the delay. I would try things like: making your X points unevenly spaced, using a train-validation split (where you train on a portion of your data, and evaluate it on a held-out validation set), getting rid of the const token (which can overfit) or getting rid of trig tokens (if you know a priori you want it to be monotonic, then this shouldn't be a design issue).
I don't think there are ways to force it as directly as you want, like changes in concavity or monotonicity. Those would be semantics-based constraints, which are generally infeasible (as opposed to syntactic constraints, which are tractable).
Feel free to re-open if there's something else to discuss, but closing now as I've given the same suggestions a few times.


Link to Mempool didn't work anymore after update from v1.7.1 to v1.8.0

Steps:

Updated RaspiBlitz from 1.7.1 to v1.8.0
Tried to open mempool.space but realized that url has changed to a different IP address
Tried to open the new url but the request timed out
Then I went to the new webinterface and uninstalled the mempool.space app
Tried to reinstall within the webinterface but installation failed
Installation via the SSH menu suceeded then and everything works as before

Hardware: RaspiBlitz with metal case and 4GB RAM

I think we need better error reporting on WebUI installs to see what goes wrong there. At least mempool app install to be retested - see if can be reproduced.

better error reporting will be done in #3318 - closing this issue.


extract_archive: Nix genrule for performance

Pending additional testing, it seems to me that avoiding the genrule() formulation during extract_archive makes it much nicer for the caching system.
We still need to use genrule() with local = 1 for the actual archive downloads and archive caching, but the unpack step can be hermetic, be remote-disk-cached, not depend on $PATH, etc.
I am going to test this more with Anzu before seeking review here.

This change is

+@EricCousineau-TRI for review, please.


Failing to connect with org id in the hostname

Context
Failing to connect with org id in the host name:
sean@Seans-Air ~ % psql 'postgresql://HFwxZ0pOchdZ:glaredb_pw_TDCsyJccCKNncPWZ0HgcTJJlt9b@3Da14e8a2a-5550-4677-b9ae-f3d0bc9f7464.proxy.qa.glaredb.com:6543/test'
psql: error: connection to server at "3Da14e8a2a-5550-4677-b9ae-f3d0bc9f7464.proxy.qa.glaredb.com" (<IP_ADDRESS>), port 6543 failed: FATAL:  cloud auth: missing org ID: pass it as an option, or subdomain in proxy or in database as '<org>/<db>'
connection to server at "3Da14e8a2a-5550-4677-b9ae-f3d0bc9f7464.proxy.qa.glaredb.com" (<IP_ADDRESS>), port 6543 failed: FATAL:  cloud auth: missing org ID: pass it as an option, or subdomain in proxy or in database as '<org>/<db>'

DNS setup for qa:

This might be from servername not being provided, will need to debug this a bit more.
psql version:
psql (PostgreSQL) 14.6

Expected
I can connect
Actual
I cannot connect
Impact

Yes, I was using an older version.
~❯ psql --version
psql (PostgreSQL) 13.7

But I tried to update the version to 14.x, and it is the same error for 14.x.
~❯ psql --version
psql (PostgreSQL) 14.8 (Homebrew)

~❯ psql "postgresql://oiclYxyumCcG:glaredb_pw_<password>@Shivam.proxy.glaredb.com:6543/YOLO?sslmode=disable"
psql: error: connection to server at "Shivam.proxy.glaredb.com" (<IP_ADDRESS>), port 6543 failed: FATAL:  cloud auth: missing org ID: pass it as an option, or subdomain in proxy or in database as '<org>/<db>'

The /Shivam/YOLO (TIL) workaround works well for me too, and is quite neat. Thanks. 💯


Sign in / sign out

[ ] Make the enter key work for the sign in button
[ ] Connect sign out functionality to the sign out button in the navbar dropdown(s)

/cib sign in out

Branch 106-sign-in-out created!


ENH: Prod check so that we can set up DNS now.

The idea here is we can point workshops.qiime.org to this django app, and it will show the same content as before (with our new stylesheets, though). When we move to prod just pull this check out.
In the meantime, only people who have logged into the admin can see anything.


Form retaining responses

When you go back and change the response of a question, all dependent values need to be cleared. Currently, the form retains values even after the response to a parent question is changed. It is possible to reset values through assign but this won't be safe when we have a large survey; plus, it also contributes to the size and complexity of forms.

This may not be true for all use cases. For example, in longitudinal data collection, it may be that there are sections (such as demographic information) you want to collect on the first visit, and retain for future visits, but not re-ask. So if there's a "which is the latest visit?" question and you update to the second visit, you don't want demographics to get deleted.

I think the danger is that you could wind up with an answer to a question that you didn't ask.
E.g. if you have 2 questions, where no. 2 is only asked when no. 1 has answer X.
If you answer "X" to no. 1 and then answer "something" to question no. 2 and goes back and change the answer to question no. 1 to Y (which will cause question no. 2 to be skipped) - the value of question no. 2 will still be "something".
I have worked around this using calculate fields, that basically says "if number 2 is visible, take the answer of number 2, otherwise be blank". But that does indeed contribute to the size and complexity of the form.
I think this this a bug?

As a side note - in ODK Collect there is the option of "removing" an answer entirely by long-tapping. I think that is basically because of this?

I am not sure this is a bug though in longitudinal data collection. I understand the example and cases where you end up with "extra" data. However, say you have a form that collects data longitudinally (and there are many of these). If there is a skip pattern based on the visit, it might go like this:
Choose visit 1: answer demographic section and health section
Choose visit 2: skip demographic section and do only health section
You would not want the demographic section to get deleted on the second visit. So this would create a problem in that use case.
It might need to be an option, rather than a requirement, to "empty out" questions that get skipped.

I agree that we must be careful not to create new inconveniences :-)
I am not sure I fully understand the longitudinally case; Wouldn't two visits be recorded in two separate questionnaire instances?
Perhaps we could discuss this topic at the next community call? :-)

A proposal to resolve the issue. Create a new feature with a column in the XLSX survey sheet that will let the system know to clear this value if the conditionals do not match. The idea is when the form is being converted to formDef.json is to automatically create clearing formulas based on the if conditionals. The idea is pre-process and throw compile errors if the situation is complicated by goto's, etc.

nice proposal @wbrunette.


Set iOS deployment target to 9 for Swift >= 5.3

Xcode 12 ships with 5.3 but also drops iOS 8 support. This causes a warning ("The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99.")

Thank you! We're having some problems with the CI. I'm going to fix that first.


Spawn a single particle

Picking up from where #131 left off, I'd like to be able to spawn a single particle from an emitter, even if this means setting up the emitter to always spawn a single particle.

The upcoming major update will have an emitNow() method that will emit a single wave of particles (one frequency tick, basically).

Release 5.0.0 is out, which has this!


Aggregate functions in Linq

Hi,
Can anyone please help me on how to use aggregate functions in Linq?

wow this is not related to Serenity at all and google is your friend for such questions (http://www.c-sharpcorner.com/article/aggregate-function-with-linq-in-c-sharp/)

Hi,
Thanks @kilroyFR .
Ya the solution which you suggested will work fine.
But, I need to first select Max(majorversion) with respect to Plan and then Max(Minorversion) with respect to Max(majorversion).
How to achieve this in serenity linq?

I have found there is Sql.Max() (and also other aggregate functions) .Thank You


egressSafelist: Allow specifying different ports than 80 and 443

We tried to add a rule for RDS access, but the hardcoded ports were 80
and 443. RDS uses 5432.
This refactors the entire Helm chart for specifying service entries to
account for all the different things tenants could want: they now
specify all the relevant fields in their values.yaml in the
cluster-config repos.
Now we support things other than HTTP and HTTPS, name the chart
egress-safelist.yaml rather than https-egress-safelist.yaml. This
means that we can delete http-egress-safelist.yaml.

Co-authored-by: Issy Long<EMAIL_ADDRESS>Co-authored-by: Chris Farmiloe<EMAIL_ADDRESS>https://trello.com/c/uEbwPqoN/111-make-gsp-service-operator-postgres-support-work

Is this an opportunity, given that the safelist now only adds ServiceEntry resources, to move this templating out and get "tenants" to create them (in say *-main via the configure-namespace mechanic) explicitly? It might be easier to reason about and removes some complexity from the GSP...
Just my 2 cents.

@blairboy362  I think I'd prefur to continue using the gsp-cluster chart for this (for now) without introducing a new special case, since I think it's easier to say "global cluster config stuff is in the cluster-config values.yaml" ... but I don't disagree that we may want to completely seperate cluster-config from gsp-cluster


How can I use it for downstream task

Hi,
I want to ask how should I finetune this model so that I can use it for other tasks? like instead of use for gap predictor, I want to predict the solubility, what is the training progress for it? Should I start with pretraining the predictor or I just need to do the finetune stage?

We hypothesize that the transfer learning occurs in the form of the model's understanding of molecular geometry. So, in our molecular property prediction experiments (e.g., on MOLPCBA), we only transfer the pairwise distance predictor and train the task-specific predictor (e.g., solubility predictor) from scratch.
(We found that fine-tuning the gap predictor is only relevant when targeting other related quantum chemical properties (e.g., the tasks on QM9). On the other hand, the prediction of solubility is not directly related to the prediction of the HOMO-LUMO gap, so we should not expect a positive transfer of knowledge here. Previous models probably benefitted from pertaining to PCQM4Mv2 due to the models' indirect understanding of molecular geometry. In our case, the distance predictor directly learns to do that.)
The pairwise distances (predicted by our predictor) are fed as input features to the next stage (in your case, the solubility predictor). We draw multiple distance samples with dropout turned on from the distance predictor as a form of data augmentation.
In our experiments, we do not fine-tune the distance predictor but rather use it as a frozen feature extractor. These predicted distances result in better performance on downstream tasks than even RDKit-generated coordinates.
For more details, please refer to our paper arXiv-2402.04538
We will add implementation of fine-tuning on MOLPCBA soon, but for now, here is what you could look into -

Download the  (noRDKit) distance predictor weights. You can directly use this distance predictor to make distance predictions on your target dataset.
The molecules/smiles are converted into graphs using the smiles2graph function from OGB (i.e., this is the "2D" graph). Once this graph is fed into the distance predictor it can output pairwise distances for that molecule.
Make predictions in the training mode, i.e., with dropouts turned on. This would lead to multiple sets of distance matrices for the same input molecule when you feed it in multiple times. (This is similar to forming multiple conformations for a molecule). Save them.
Load the distances and use them in your specific task as input features. Similar to how our HOMO-LUMO gap predictor uses them. You may even use architectures other than TGT/EGT.
Since you would end up with multiple sets of distance matrices for the same molecule, you should combine the predictions of individual input distance matrices during inference. In the case of classification, you can take the average of the predicted probabilities for each individual distance matrix.

Thank you very much for such a detailed reply! ! I have another problem, I followed your instructions to start training the property predictor from scratch, but I always get nan issues. My loss would become nan in the first epoch. I tried modifying the optimizer and learning rate but nothing improved. Later I found out that this was because the output of the network was nan. Have you encountered this problem? Do you know how to solve it?