feat(docs): version 2.0.0 + migration to starlight

Component / Package Name: docs
This PR contains:

[ ] bugfix
[ ] feature
[ ] refactor
[x] documentation
[ ] other

Are tests included?

[ ] yes (bugfixes and features will not be merged without tests)
[x] no

Breaking Changes?

[ ] yes (breaking changes will not be merged unless absolutely necessary)
[x] no

Description
Hello, I'm creating this draft pull request so the progress of migrating to starlight is public.
I created a new folder under apps/docs so that for now nothing is deleted an can be later migrated to another folder or something else.
I had some issues with installing moon and linting so for now nothing is linted with the command and I had to suppress eslint errors because they were preventing me from committing my changes.

The current state of things is pretty good, the main parts of the docs are pretty much done.
The things that are left to do are:

[ ] Wait for 2.0 to be ready to be merged and update the docs accordingly.
[ ] Re-write of some of the introduction/quick start. Since I only copy pasted the md files and fixed "graphical" things (for example the :::tip asides) some things are wrong, such as referencing the docs when the user is already reading them (eg. in the introduction).

Hey @casungo great work so far! I was chatting with @shellscape about this but looks like you beat me to it. Here are some notes from our conversation that should help you make this even better.
1. You can find the current vitepress docs under /apps/web, you should also probably change the PR so that the starlight docs replaces the code in this directory.
2. There are some include directives in the markdown files that import parts of other markdown files / and sometimes standalone components. There are also some symlinks, symlinks and starlight don't seem to work great right now, and starlight doesn't support the import directives at all.
Currently the repo is keeping docs under /docs for them to be easily accessible through github directly, and using a symlink to include it in the docs, you could have a similar system that references the docs markdown files to avoid duplication, while not turning /docs into mdx files, as those look a bit ugly since the import statements etc. stick around in githubs preview.
Here is what my approach would be:
apps/web/src/components/Install.mdx
import { Tabs, TabItem, Code } from '@astrojs/starlight/components';

## Install

Install the { props.type } from your command line

<Tabs>
  <TabItem label="pnpm">

  </TabItem>
    <TabItem label="bun">

  </TabItem>
    <TabItem label="npm">

  </TabItem>
    <TabItem label="yarn">

  </TabItem>
</Tabs>

apps/web/src/content/docs/components/body.mdx
---
title: 'Body'
description: 'A JSX email component for using a React `Body` component to wrap email content'
---

import Install from<EMAIL_ADDRESS>import Body from<EMAIL_ADDRESS>
<Install type="component" />

apps/web/tsconfig.json

{
  "extends": "astro/tsconfigs/strict",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@assets/*": ["src/assets/*"],
      "@components/*": ["src/components/*"],
      "@docs/*": ["../../docs/*"]
    }
  }
}

I think the way starlight does things, the Header component doesn't need to be migrated. There are also tooltips that start with ::: tip that need to be converted to the starlight equivalent (Aside), this would be an mdx component, so this is something you might want to exclude from /docs and include in the components that import docs & other necessary components.
So, in short there's a bit of going through markdown files, and converting syntaxes that need to be done; also be vary of certain include statements that only include parts of other markdown files, that content will need to be copy pasted over.
3. Current theming should also be applied to starlight.
Feel free to ask for help if you need any.

Sure thing! Seems like a solid plan, will work on it in these days. Also would like to rewrite the https://samples.jsx.email/ webpage someday with Astro + daisyUI (+ Svelte if necessary :) ). I will also deploy the current state of this PR on cloudflare as a temporary webpage so everyone can see the progress being made, if that seems like a good idea!

While working on this, I wondered why there is a need for two folders for the documentation—one at the root of the project and another in apps/web. Wouldn't it be more efficient to consolidate all the information into a single location within apps/web? This way, there would be no need for importing from various files. Users looking for documentation could simply visit the website, or if they prefer, they could browse the repository directly under apps/web to find all the content in one place. Having two separate folders seems unnecessary.

@casungo to give you a quick response from our conversation... the reason for having a /docs at the root is so that people on github can easily find the docs without needing to dig much into the codebase, but with the mdx components now, some of the content (tips) would be under /apps/web, while the rest of the content is in /docs, so the split is getting not so pretty, maybe it could be better to do it the way you're proposing and symlink /docs to apps/web. @shellscape thoughts?

Also would like to rewrite the https://samples.jsx.email/ webpage someday with Astro + daisyUI (+ Svelte if necessary :) ). I will also deploy the current state of this PR on cloudflare as a temporary webpage so everyone can see the progress being made, if that seems like a good idea!

@casungo that sounds awesome. I totally welcome it.

Doc at one place is better

maybe it could be better to do it the way you're proposing and symlink /docs to apps/web/src/content. @shellscape thoughts?

@casungo @dan-smt yeah I'm open to the symlink being reversed

I merged the v2.0.0 changes to main without releasing them. That should make it easier for this PR. Going to start working on docs in a temp directory on another branch, so that it doesn't conflict with the work here. I'll update manually once we get this PR in.

Perfect, seems good!

The final version has landed! Everything is fresh and new. you can preview the site at: https://jsx-email.pages.dev/ (temp site just to preview, will bring it down once everything is merged)

@casungo looks like the color theme dropped again. this is still something I want to do very badly 🙏


remove _ from sass import statements in grunt-injector task

This removes the _ from the partial sass imports when injecting the statements into sass files.

Thanks for the PR :+1:
See my above code comments to see how to make this a much more robust solution. Also, be sure to add this/your fix to the <% if (sassSyntax === 'sass') { %> section as well. Might as well fix both SCSS and SASS :smile:

:+1:  for the regex solution. Unfortunately I cant seem to get it to work. If I run, for example:
var filePath = 'myfolder/my_folder/_mypartial';

filePath = filePath.replace(/(\/)(_)([a-zA-z]+\.[A-Za-z]*)/, '$1$3');

console.log(filePath); // myfolder/my_folder/_mypartial

filePath seems to be unchanged. Could you look into this and verify that it is indeed working?

Double checked, looks like it works perfectly! Thanks :+1:


Requirements error

Am I doing something wrong?
My python 3.12 is too new?
$ pip install -r requirements.txt
Collecting numpy==1.24.3 (from -r requirements.txt (line 4))
  Using cached numpy-1.24.3.tar.gz (10.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        File "/Users/user/ComfyUI/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module
File "/private/var/folders/26/p_012vlj62bgnyfcn9qnkqfm0000gn/T/pip-build-env-fr70i2jg/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.

@romanr
I only tried this node on Python 3.11. I updated requirements.txt, so try again.


Extended GA flow checking more commands.

Commands checked: info, create-org, orgs.
Inactive preps for push, apps, delete.

Yes, the sleep looks to be necessary. Not sure how small we can make it. The value set right now is based on my local experience, where I knew it had worked.

Yes, the sleep looks to be necessary. Not sure how small we can make it. The value set right now is based on my local experience, where I knew it had worked.


docs for contributing

I'd be nice to have documentation around how to contribute to this project.
I'm trying to work on #37 and had a hard time figuring out how to run tests.
This is what I ended up having to do ... not sure if there's a better or more correct way.
docker run --privileged -it -v $(pwd):/code ubuntu /bin/sh
apt update
apt install curl golang
cd /code
scripts/test # repeat this as needed

Also had to spend a little time to figure out how to build with experimental stuff using DOCKER_BUILDKIT=1:
DOCKER_BUILDKIT=1 docker build -t vito/oci-build-task:rc .

I've found something like docker run -it --privileged --mount type=bind,source=$(pwd),target=/code golang /bin/bash works great, rather than having to start with ubuntu and mess with apt.

Finally got around to this - not perfect yet but it's a start!

I think it's good enough to close this issue.  Thanks for getting that out there!


Is it possible to decrypt the connection string while doing MSSQLServer Sink

In My situation i will store the connection string with Username and Password encrypted. So while sinking i want to decrypt and pass to MSSQLSERVER Sink and i should use ReadFrom.Config()
Can some one help me with example.

i m kind of on the same boat with you. I need to replace the token in the connection string with docker secret or something. not sure if it's easy to accomplish.

Hi, thanks for getting in touch and sorry for the late response.
The sink does not support reading an encrypted connection string from the config but you can read and decrypt it in your app code (or read it from a docker secret or from any other secure source) and pass it to the config extension method and let the sink read all other parameters from the config.
A small sample app that. does that is included in the sink source under samples\CombinedConfigDemo.


chore(deps): update module github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper to v1.6.1

This PR contains the following updates:

Package
Type
Update
Change

github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper
require
minor
v1.5.7 -> v1.6.1

Release Notes

terraform-ibm-modules/ibmcloud-terratest-wrapper
v1.6.1
Compare Source
Bug Fixes

deps: update gomod (#432) (882761c)

v1.6.0
Compare Source
Features

add skip test setup and teardown (f06c28f)

v1.5.8
Compare Source
Bug Fixes

deps: update gomod (#425) (0984a7a)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

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

GitHub release
v5.0.0

Your semantic-release bot :package::rocket:


Crash when gif command does not find any results

Submitted by

If someone else without github account submitted the bug to you
Delete this if you are the bug submiter

Issue Type

[x] Bug
[ ] Enhancement
[ ] Feature Suggestion
[x] Crash

Description
If the gif search does not return any results, the crash below will cause.
Logs & Screenshots
TIME:      04/16/2018 - 10:16:56
TYPE:      TypeError
MESSAGE:   Cannot read property 'url' of undefined

STACK TRACE:

TypeError: Cannot read property 'url' of undefined
    at IncomingMessage.res.on (/Programs/discordBots/zekroBot2/src/commands/gif.js:48:73)
    at IncomingMessage.emit (events.js:165:20)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19)

Should be fixed with 1095731a038ee2a1c3faae58609f1540bb747c30
Testing in progress.


WedgeMolBonds should add both wedge and dashed bonds for carbons with 4 heavy substituents.

Presently WedgeMolBonds adds BEGINDASH parameter for only one bond in carbons with 4 heavy substituents. It results in structures that are difficult analyse when depicted, because one have to imagine 3d situation, and place one bond below the plane, and all three other bonds above plane. Eg:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import rdCoordGen
mol1 = Chem.MolFromSmiles('CCC[C@](F)(I)C')
mol1

Chem.WedgeMolBonds(mol1, mol1.GetConformers()[0])
for bond in mol1.GetBonds():
    print(bond.GetBondDir())

NONE
NONE
NONE
NONE
NONE
BEGINDASH
I think it would be reasonable if two bonds were updated in this situation. One should get BEGINDASH and the second BEGINWEDGE BondDir parameter. It should resulted in easier to analyse pictures eg:

I am not telling it should be default behavior, but it could be useful if there was a parameter for this options.

Hi @wopozka, this is also what the IUPAC recommends (https://www.degruyter.com/document/doi/10.1351/pac200678101897/html?lang=en):

and I agree that it can be clearer.
We need to revisit the bond wedging code anyway as part of supporting non-tetrahedral stereochemistry, which also works better with multiple wedges at atoms. This is unlikely to get done in time for the 2022.03 release, but I would like to have it in for 2022.09.
One significant complication in fully implementing the actual IUPAC recommendation is that the two wedged bonds should be closer to each other than the other two bonds, so we'd have to change the 2D coordinate generation algorithm in addition to the bond wedging. I think it'd be worth doing the partial solution.

@greglandrum great to hear that. For my personal application it would be enought if I have BEGINDASH and BEGINWEDGE bonddir set for two different bonds. Otherwise I need to set them manually. I am using 2d coordinates as well, but having properly calculated coordinates is not big issue for me.

@wopozka : I'm not sure what your use case is, but what the RDKit current does is generally unambiguous and is a quite common way of depicting atomic sterochemistry (IUPAC recommendations aside).

@greglandrum I am integrating rdkit into bkchem drawing software. Presently I am working on smiles/inchi reading and creation. For generation of coordinates of atoms I am using rdkit functionality and it works pritty well, apart from non IUPAC depicting of stereocenters. As I said, I can live with it, but I would like to achieve at least dashed and wedged bonds. This is why I am complaining a bit. I would love if the library could do it for me, as it is better than do it manually :D. Thanks Greg.

@wopozka I have built a python library called pychemprojections. One of the features it provides are to display WedgeDash structure of compounds. This library is built on top of rdkit.
You can find an example notebook here.
Hope it is useful for you.

We might want to think about making this the default behavior at some point, but for now the option is at least there.


Enable mail template customization

It currently is not possible to customize email templates by using the customize system. I looked in the code, it seems like Gitea does not look for customized templates.
Relevant bit (among others): models/mail.go:167

The current mail template is too low, and I would like to customize it too.

I think it actually does look for customisable templates.

I think @zeripath is right. I haven't test it, but see https://github.com/go-gitea/gitea/blob/master/modules/templates/static.go#L174 . Customize mail template should be OK.

the mechanism of customization works


WIP : Telegram support

Add function to send and fetch from telegram.
Add function to identify user from a start button
add a sender class that decides through which channel (sms, email, telegram) to send a message.
Add integration in message server

The API rate limit seem to be around 30 sent messages/s so it would likely be necessary to spread out Telegram actions. Is this what telegram_updates_every does already?

The API rate limit seem to be around 30 sent messages/s so it would likely be necessary to spread out Telegram actions. Is this what telegram_updates_every does already?

I believe 30 messages / s is fine for now, but it's good to know.
Basically there are two ways to get the messages from telegram to our server. Either set up a webhook (best way imo), so that telegram sends us the messages (updates) on our endpoint. Or we can periodically call telegram to ask for the updates.
In this PR I am implementing the second methods because it is either in dev mode to do. To setup a webhook we need a valid domain, which we have in prod but not on our local machines. (ngrok can be convenient here). The telegram_updates_every exactly the time to wait beetween asking again for the update to the telegram servers.

Thanks for the comments Roman! I ll update the code soon.

Thanks for the review Roman. I believe I have addressed all the comments.
I agree it is a long PR, that has been growing over the week. We still need to wait for PR #378 before merging anyway.


Implement CI for checking acquisition parameters

The current implementation is using pybids and it checks for TR,TE,FlipAngle and InversionTime (for GE) for T1w. The optimal acquisition parameters from the protocol can be found under code/specs.json
Report from travis: https://travis-ci.com/github/spine-generic/data-single-subject/jobs/359953744
Not sure if we should change the exit code for travis if the script founds warnings.
The current CI is safelisted only for the af/acq_param_ci branch. To be changed when ready to merge to master.

Not sure if we should change the exit code for travis if the script founds warnings.

i would not exit with errors-- there will always be warning (like on openneuro) and the only purpose of this CI is to display them. At some point we could think of more rigorous error tests (e.g. if a param is missing, etc.)

https://travis-ci.com/github/spine-generic/data-single-subject/jobs/359953744#L236
FA=20deg for the T1w mprage? are you sure about this?

https://travis-ci.com/github/spine-generic/data-single-subject/jobs/359953744#L236
can you show TE in ms?  same for TR

https://travis-ci.com/github/spine-generic/data-single-subject/jobs/359953744#L238
we need to have tolerance here. i would suggest a tolerance of 0.1ms for TE

I migrated the CI params to  https://github.com/spine-generic/spine-generic
TE is given in ms.
TR is given in s.
I'll add the tolerance of 0.1ms for TE.

I also fixed the FA for Trio and Verio.


Logged in

How to save session after logged in when apps start up?

@zhabyans  your code is working? how? please let me know!!!


Events emited by Addon's ClusterInstance are not shown in cosmoctl get events

Now it retrieves events only in a user namespace but  cluster-scoped events are in default namespace. We need to fetch events the two namespaces and return merged list.

Close by #826


Capsule collision shape is half the of the height set in Editor

https://playcanvas.com/editor/scene/971593
The Capsule collision height needs to be twice the height it is meant to be.

Launch window of the capsule resting on the plane:

It's an Editor side bug. The capsule is being rendered at double the height. Closed


email notification show only php-code in the mailbody

Hello!
first: thank you very much for this really good tool !!!
2nd ;) With 1.0.11 I´ve got e-mail notification with shows only php-code in the body:
e.g.
(#) e($task['title']) ?> () ()
render('notification/footer', array('task' => $task)) ?>
(it doesnt matter if I set to smtp/sendmail/mail)
(unzipping the github-repository over the "original" zip didnt solve it)

Something is probably wrong with your installation, that means php didn't parse your files.
It's hard to guess what is wrong, you should give us more details to find the issue. How did you install Kanboard? Where? What is the environment? Do you have any PHP errors?

Helo Frederic,
thanks for reply. Sorry! I analyzed litte deeper. on opensuse where we have kanboard running, there is a /etc/php5/apache2 folder and a /etc/php5/cli (both with php.ini). Because we used php on cli not yet on other programs I copied the apache2 php.ini to the cli-folder...and ... it works.
Sorry for wasting your time!
Have a good time! regards ulli


Cannot read property 'scrollTop' of null

MixItUp fails on the append() method if disable animation.
Inititialization:
const mixer = mixitup('#mix-collection', {
      animation: {
          enable: false
      },
    });

Stacktrace:
mixitup.js:6330 Uncaught TypeError: Cannot read property 'scrollTop' of null
    at mixitup.Mixer.goMix (mixitup.js:6330)
    at mixitup.Mixer.multimix (mixitup.js:8458)
    at mixitup.Mixer.insert (mixitup.js:8730)
    at mixitup.Mixer.append (mixitup.js:8912)

Fails here:
           // If we should animate and the platform supports transitions, go for it
            if (window.pageYOffset !== operation.docState.scrollTop) {
                window.scrollTo(operation.docState.scrollLeft, operation.docState.scrollTop);
            }

Hi there - thanks for reporting. I'm unable to reproduce this issue. Can you include your append API call code too - or a jsfiddle reproduction?
Thanks


Allowed sections of custom attributes to display

A function to return the displayable sections of custom attributes.
Helper method for https://github.com/ManageIQ/manageiq-ui-classic/pull/290

@simon3z @mzazrivec @zgalor

:+1: LGTM

@enoodle I have the feeling that we could keep this UI-only (no need to create this new interface).

@simon3z :  @mzazrivec commented that the UI team prefers to have such interfaces with the backend: https://github.com/ManageIQ/manageiq-ui-classic/pull/290#discussion_r99796322

... or in the model's decorator, which live in classical-ui.


Strange color issue with treesitter

Every time I save a file, syntax color changes while Treesitter loads the workspace. By "Load the workspace", I'm simply reporting what the fidget plugin is reporting in the lower left hand corner. Once Treesitter stops doing its thing, syntax colors change to what they should be.
How to reproduce:
for i in ~/.config ~/.local/share ~/.cache; do
  mv $i/nvim $i/nvim.bak
  mkdir $i/nvim.test
  ln -s $i/nvim.test $i/nvim
done

cd ~/.config/nvim
wget https://raw.githubusercontent.com/nvim-lua/kickstart.nvim/master/init.lua
vi init.lua
:q

Plugins are now installed
vi init.lua
:w

Figured it out. It's the autocmd that's restarting the LSP whenever init.lua is written.


Save search results

I love VSCode, but the search result doesn't work all that well sometimes...
For example, it could be great that user can save the details of search results of a folder, such as support copy or export function in search.

VSCode Version: 1.8.1
OS Version: Microsoft Windows 6.1.7601

Steps to Reproduce:

Click 'Search' button
Enter some keywords and trigger the search
A list of results appears, but user cannot save that results.

@charlestac May I know how it helps in saving search results?

@sandy081 I have a very basic scenario which is logging the search results as part of a document. I can copy the search results out from Notepad++ and proceed further actions (i.e. diff/log/search), so I hope this function could be available as well in VSCode.

Please add this. I've been tasked with determining the scope of rewriting a certain core feature of our code and I want to show my boss just how much work is required. Copying the search results would help me show this.

There are multiple uses of being able to capture search results in a document.

Ability to use the results for some type of communication to team members.
Ability to do some post processing on results.  For example, search all uses of some types of tokens.  Then post filtering to find all unique values.
Ability to change the view representation.  If the results were captured as CSV for example, sorting on columns by file name, folder, number of results etc.

Please add a context menu with "Save" or "Export".
Simply export all items in a log file, or export them in CSV or excel file would be better.
suggested columns:
file path, file name, matched count, match lines, match snippet, etc...

This is a much needed feature.

We currently have a use case to find the files that has a certain snippet. Yeah, the search works but it's kinda tiring to type in all the files that have the snippet.

Having search results in a separate buffer a'la Sublime would be very useful. Maintaining a history and having new searches appended to the buffer would also be great.
Appreciate that this is a nice-to-have though. Possible extension candidate?

This is the one feature that drives me mad for vs code not having - its the only time i've needed to return to notepad++.
Doing search, having full search line matches in a text window to allow more searches and filtering, generating new text file output is a real boon for diagnosis and troubleshooting logs while fixing bugs.

I was also surprised there was no way to even copy the search result text  to the clipboard. It's very common in large refactoring projects to start by locating all the affected files, and then transferring the list to a spreadsheet for further analysis and progress tracking. Sure we can do the search with other tools outside VS Code, but that's a pain.
Of course, you can do this in emacs ... :-)

This is indeed a killer feature missing. Why not have a multi-tab search results, like IntelliJ does? Maybe with an option to pin certain search results.

There are so many different ways people would like search results presented.
I would strongly prefer that an API be exposed so that extension authors can make all the flavors of search results that the community wants.

Sure, an API would be even better - I do not insist on having this in the core :-)

I admit being able to save search results would be pretty useful.

I would love to see a also recend search results, it would help me to search two things and compare them.
I think sublimetext had it when i came from it. I just noticed i miss it.

+1

+1

You should also consider putting the search results in an editor like Sublime Text does.  Benefits: keeps a history of your search results, allows you to edit them (ex: delete a chunk you don't care about), lets you copy, select paths to files and copy, etc, etc.  It's very simple, but very useful.

I wish I could have the search result panel exported to a tab so I could work with multiple result sets that were based on different search queries. Having to reenter search queries and closing out the same unwanted matches wastes time I could be using to fix code. If not a tab, please create the ability to save queries in my settings.json and let me recall a query (and all its filters) using a dropdown box.

@jmo84 i like this approach very much !

+1. Please add this feature. It will make code reviews / security reviews much easier to do inside of VS Code. Example, finding all instances of some pattern, copying out of the search window, and putting into a ticket / code review comment.

+1 definitely useful, export search results

Excellent job! Thank you everyone!


WIP: getDefaultLocale and getDefaultTimeZone

I did a dumb and forgot to make the bytecode regen its own commit. I can fix that in a bit.

@jackhorton,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Update concepts-intelligent-tuning.md

@Nathan-Wisner : Thanks for your contribution! The author(s) have been notified to review your proposed change.


"No Such Table" And DriftDbViewer view has

Describe the bug
this is my database
const List<Type> tables = [KillipDic, GscDic, NihssDic];

@DriftDatabase(tables: tables)
class AppDatabase extends _$AppDatabase {
  AppDatabase() : super(_openConnection());

  @override
  int get schemaVersion => 1;

  Future<void> syncKillipDic(List<KillipDicData> list) async {
    for (var item in list) {
      var a = await (select(killipDic)
            ..where((tbl) => tbl.rank.equals(item.rank)))
          .get();
      if (a.length > 0) {
        await update(killipDic).replace(item);
      } else {
        await into(killipDic).insert(KillipDicCompanion.insert(
            rank: item.rank, rankDesc: item.rankDesc));
      }
    }
  }

  Future<void> syncNissDic(List<NihssDicData> list) async {
    for (var item in list) {
      List a = await (select(nihssDic)..where((tbl) => tbl.id.equals(item.id)))
          .get();
      print(a);
    }
  }
}

LazyDatabase _openConnection() {
  // the LazyDatabase util lets us find the right location for the file async.
  return LazyDatabase(() async {
    // put the database file, called db.sqlite here, into the documents folder
    // for your app.
    final dbFolder = await getApplicationDocumentsDirectory();
    final file = File(p.join(dbFolder.path, 'db.sqlite'));
    return NativeDatabase(file);
  });

This is the NihssDic Table code
class NihssDic extends Table {
  TextColumn get id => text()();

  TextColumn get itemType => text()();

  TextColumn get itemDesc => text()();

  TextColumn get itemValue => text()();

  Set<Column> get primaryKey => {id};
}

Error when I use AppDatabase.syncNissDic
final appDatabase = AppDatabase();
List<dynamic>? _list = nihssDicRes['dataset'];
if (_list != null) {
  List<NihssDicData> _listNihss = _list
      .map((e) => NihssDicData(
            id: e['Id'],
            itemType: e['ItemType'],
            itemDesc: e['ItemDesc'],
            itemValue: e['ItemValue'],
          ))
      .toList();
  await appDatabase.syncNissDic(_listNihss);
}

“no such table: nihss_dic"

But when I view it with DriftDbViewer, I find that I have this table

Finally, I have a requirement. When inserting, check whether there is the same data, if there is, update, if not, insert, am I right?
Future<void> syncKillipDic(List<KillipDicData> list) async {
    for (var item in list) {
      var a = await (select(killipDic)
            ..where((tbl) => tbl.rank.equals(item.rank)))
          .get();
      if (a.length > 0) {
        await update(killipDic).replace(item);
      } else {
        await into(killipDic).insert(KillipDicCompanion.insert(
            rank: item.rank, rankDesc: item.rankDesc));
      }
    }
  }

But when I view it with DriftDbViewer, I find that I have this table

Huh, interesting. Is there any exception when you view the rows in that table? If you restart your app, does this still happen? It's not obvious from your code what might be causing this, if you have a full repro I'd love to try it out and take a look.

When inserting, check whether there is the same data, if there is, update, if not, insert, am I right?

Your code works, but has a potential race condition if someone else manages to write data after your select finishes but before your update or insert is done. You could put your sync operation into a transaction, or just use an upsert for this:
Future<void> syncKillipDic(List<KillipDicData> list) async {
    for (var item in list) {
      await into(killipDic).insertOnConflictUpdate(item);
    }
  }

As you can see, this also simplifies the code a lot (and it's more efficient).

Drift will only create a database if one doesn't already exist. If one does exist and it's different from your db definition it won't automatically update it. You have to write the migrations yourself: https://drift.simonbinder.eu/docs/advanced-features/migrations/
You can use something like this to validate your db during development: #1428

Thank you I just finished a demo but the strange thing is that the problem doesn't appear again after one time. This makes me unable to locate the problem. I feel it has something to do with this
have one (singleton) instance of your database

I feel it has something to do with this

If you end up with more than one database instance active at the same time, drift will emit an error message to the console. Did you get any such message?

After I uninstalled the software and debugged it again, the problem disappeared. I am not sure where the problem is. If I add a table during development, do I need to uninstall and reinstall the application?

As @North101 also said: Yes! By default, drift will create tables only when the database is created. So if you already have a database on a device, add a new table and install the new version, drift will detect that the database is already there and not add any new tables. During development, the easiest solution to this problem may be to just clear the database. For production, you probably don't want to delete all data for each update. Here, you'll want to use migrations to add the new tables or other changes to your database.
I too think this is probably due to a missing migration, so I'll close this issue and hope it's solved. If this happens again or you have more details on how to reproduce this, please let me know and I'll re-open this.


TimePicker: Can't select 2 am on the day DST goes into effect

Environment

Tech
Version

@material-ui/pickers
3.2.10

material-ui
4.9.0

TypeScript
3.5.3

React
16.8.6

Browser
Chrome

Peer library
Luxon 1.21.2

Steps to reproduce

Change system date to March 8th, 2020
Use time picker to set time to 2 am
Time will automatically skip to 3 am

Expected behavior
2 am doesn't exist on the day that daylight saving time goes into effect (time goes from 1:59 to 3:00), however,  a time picker is expected to work independently of the date so DST shouldn't affect the time picked (i.e. the user should still be able to select 2 am without it switching)
Actual behavior
Time switches from 2 am to 3 am because the TimePicker creates a DateTime object on the current day and  2 am doesn't exist on that day. The developer can't simply fix this by changing to a day that isn't affected by DST and then reverting back to 2 am because they have no way of knowing if the user intentionally selected 3 am or if it changed.
Live example
N/A (the problem is dependent on your system date)
Possible Solutions

Could pass the selected time as a string to the onChange method so that the developer can check the DateTime hour against the string and if they're different change the DateTime to a different day/week/etc. that isn't affected by daylight saving time.
Could allow the developer to set a default date for the TimePicker so that the DateTime object passed to the onChange method isn't a date affected by DST (this is the better option IMO).

Please provide a full reproduction test case with the latest version (v4.0.0-alpha.5 as we are writing). This would help a lot 👷 .
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

@oliviertassinari As I mentioned in the original post, I can't provide a reproduction test case because the problem is dependent on your system time and I can't set that in a sandbox. The only way to reproduce this is to set the time on your local system to March 8th, 2020 (or the day that DST goes into effect for another year), then pull out any timepicker (the example sandbox you shared will work perfectly fine as is), and then try to set the time to 2 am. You'll see that you won't be able to and it auto switch to 3am, even though timepicker should work independently of the date. To see why this is a problem, lets say that a restaurant owner uses a time picker to set his opening and closing times and he's just switched to a late night schedule so he changes it to close at 2am. Well if he happens to try and do this on the week that DST goes into effect, when he tries to change the closing time for that Saturday night to 2am Sunday morning (the day DST happens), it will switch to 3am. However, the owner won't know why it switches because he's just trying to change the general closing time for every Saturday, so he shouldn't have to worry about the fact that 2am doesn't exist on that particular Saturday.


transition to dep

Codecov Report

Merging #235 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
- Coverage   65.56%   65.54%   -0.03%
==========================================
  Files         135      135
  Lines        9774     9774
==========================================
- Hits         6408     6406       -2
- Misses       2666     2668       +2
  Partials      700      700

Impacted Files
Coverage Δ

device/device.go
71.11% <0%> (-2.23%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d56f7d...431e4ad. Read the comment docs.


Considered protected instead of private ?

Hi!
Would you consider making class properties protected instead of private?
Considering #205 (I just discovered I need to extend Guzzle Middleware class as well) all properties are private which won't let me extend classes but rewrite pretty much everything.

Can you elaborate on what you're trying to do? That class is not required to use and is pretty simple.

@dragoscirjan I think you can perfectly do everything using inheritance by using composition. Anything particular you want to extend the classes?

@jcchavezs it seems I'm missing some knowledge. Could you elaborate how I could extend, let's say, Guzzle Middleware class to use a different propagator?
@chingor13 please #205 and you will better understand what I need to do


v4 introduces dependency on react in core package

Describe the bug
In the beta branch i have noticed that hydration.ts contains reference to react types.
This will introduce transitive dependency on react for vue package.
Your minimal, reproducible example
N/A
Steps to reproduce
N/A
Expected behavior
I think we need to remove react reference from core package.
Maybe introducing some kind of overload in react sub-package would be a solution?
How often does this bug happen?
No response
Screenshots or Videos
No response
Platform
N/A
react-query version
v4
TypeScript version
No response
Additional context
https://github.com/tannerlinsley/react-query/blob/beta/src/core/hydration.ts#L1
https://github.com/tannerlinsley/react-query/blob/beta/src/reactjs/types.ts#L12
https://github.com/tannerlinsley/react-query/blob/beta/src/reactjs/types.ts#L18

Thanks for spotting that, I think it's a mistake. The types in the core should stay the same as in v3, and the types we use in the react package, where we need the hydration (e.g. Hydrate.tsx) should just extend the base one and add the react context if needed.
would you like to fix that for us maybe?

I think I'm gonna setup eslint import zones or so to prevent this mistake in the future 👍

Yeah, i will try to fix it when i will have some free time.

:tada: This issue has been resolved in version 4.0.0-beta.8 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


European calendar

Thank you for your good libraries, but i want to know how can I set European standard of calendars ?
For example, I want that weekColumn started from Monday, not Sunday ???
Thank you for your attention.

Hmmm I think you could modify the calendar adapters to provide different calendar formats.


Remove implementation of /v1/oauth/tokens endpoint

The oauth/tokens endpoint is already deprecated for removal due to security concerns. The path forward is described in this doc.

We don't recommend anyone to use it in a prod env, but it's a nice feature to allow people to try Polaris out, otherwise they have to hook a third-party token service before doing anything else. What we can do here is to remove it while providing an private endpoint with the same functionality for test purpose. In that case, the real prod user can hook their token service, while we still use the private endpoint for testing.

It is pretty easy to setup Keycloak, for example, as an IdP for "getting started" environments.
Nessie has an example here: https://github.com/projectnessie/nessie/tree/main/docker/authn-keycloak

providing an private endpoint with the same functionality for test purpose

I'm not sure it is as easy as it sounds. A proper OAuth2 implementation is not a small effort. On the other hand, a test impl. that has gaps wrt to the OAuth2 RFC can lead to bugs in production code because it would be tested against a non-compliant OAuth2 server.
I believe it is preferable to reuse existing OSS implementations that provide OAuth2.

A tangential point: if Quarkus were used as the server platform, it provides easy ways to test authN/Z in CI without requiring a full OAuth2/OIDC implementation.

Agreed, it's great to reuse an existing OAuth2 implementation. We will need to see how integration works to choose between them.


Tests readme polish

Just a bit of rewriting seeking clarity.

@dafriend These are great. As someone who spends time on documentation I really appreciate your attentiveness.
Something I learned recently... if you are just editing the User Guide or comments (i.e. things that won't affect tests) you can prefix your commits (not the PR, the commits) with [ci skip] and it will skip the pipelines.

Something I learned recently... if you are just editing the User Guide or comments (i.e. things that won't affect tests) you can prefix your commits (not the PR, the commits) with [ci skip] and it will skip the pipelines.

Thanks for confirming what I assumed [ci skip] was for. I think I tried that on a different PR but travis ran anyway. Or, maybe I wasn't really paying attention. At any rate, I'll use it next time it's documentation changes only.


refactor refactor copy into make logic clear

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

run buildall


Update packages 2.4

https://github.com/stolostron/backlog/issues/19545
https://github.com/stolostron/backlog/issues/19551
https://github.com/stolostron/backlog/issues/19900
Before
shelljs 0.8.4
node-fetch 2.6.1
nanoid 3.1.25
npm uninstall @redhat-cloud-services/rule-components i18next-http-backend @stolostron/ui-components @kubernetes/client-node jest-fetch-mock @types/css-minimizer-webpack-plugin css-loader
npm i -D<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>npm audit fix
After
shelljs 0.8.5
node-fetch 2.6.7
nanoid 3.3.1

@KevinFCormier incidentally, this also contains the fix for https://github.com/stolostron/backlog/issues/19487 (for the 2.4 release anyway). Mind if I close my PR for this branch in favor of yours?

@Randy424 Ah, right... yup, I'll add it to the list of addressed ones. Hopefully streams will open late next week.

/cc @chenz4027

/test lint-check-unittests-sonarcloud

/cc @mark-nc

/cc @zlayne


Vnet integration for ADF, KV & Databricks

Resolves #33

Managed virtual network for Databricks with secure cluster connectivity
Managed virtual network for ADF
Vnet integration for KeyVault
ADF Linked service configuration for KeyVault
Databricks secrets scope integration with KeyVault
Remove unnecessary Databricks provider from core and serve modules

😢
azurerm_role_assignment.deployer_can_administrate_kv: Creating...
╷
│ Error: authorization.RoleAssignmentsClient#Create: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client 'x' with object id 'x' does not have authorization to perfxxorm action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/xxx/resourceGroups/rg-xxx-dev/providers/Microsoft.KeyVault/vaults/kv-xxx/providers/Microsoft.Authorization/roleAssignments/xxx' or the scope is invalid. If access was recently granted, please refresh your credentials."

😢
azurerm_role_assignment.deployer_can_administrate_kv: Creating...
╷
│ Error: authorization.RoleAssignmentsClient#Create: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client 'x' with object id 'x' does not have authorization to perfxxorm action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/xxx/resourceGroups/rg-xxx-dev/providers/Microsoft.KeyVault/vaults/kv-xxx/providers/Microsoft.Authorization/roleAssignments/xxx' or the scope is invalid. If access was recently granted, please refresh your credentials."

Well that's a new one! Which subscription are you deploying to and can you heck what roles you're assigned?

As discussed in chat you'll need to be owner to assign role permissions

/test

/test


buildPythonPackage: port catch-conflicts to importlib.metadata

To escape the pkg_resources API deprecation:

catch-conflicts.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

Not working quite correct yet. Didn't quite understand what req contains.
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Example when building privacyidea.
Before
typeguard> pythonCatchConflictsPhase
typeguard> /nix/store/q2zpnf017gccs9w9mb0ikdqhkf0k5v82-catch_conflicts.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
typeguard>   import pkg_resources
typeguard> Found duplicated packages in closure for dependency 'sphinx':
typeguard>   sphinx 5.3.0 (/nix/store/nscmi1vzj2m3sm99060pxw5fkl9vgd70-python3.10-sphinx-5.3.0/lib/python3.10/site-packages)
typeguard>   sphinx 5.3.0 (/nix/store/714459c1bxkb37gg2ymlxfla7zmzwgl6-python3.10-sphinx-5.3.0/lib/python3.10/site-packages)
typeguard> Found duplicated packages in closure for dependency 'Jinja2':
typeguard>   Jinja2 3.1.2 (/nix/store/6h35a2gpvkxdkpz9cr8qxqd5j55i68kn-python3.10-Jinja2-3.1.2/lib/python3.10/site-packages)
typeguard>   Jinja2 2.11.3 (/nix/store/vxdr66nnzsmrqfnzs0z79rfm5q0v5n3y-python3.10-Jinja2-2.11.3/lib/python3.10/site-packages)
typeguard> Found duplicated packages in closure for dependency 'MarkupSafe':
typeguard>   MarkupSafe 2.1.3 (/nix/store/7yqy0l90asl4i3pgg1h41wbq60qj1s95-python3.10-markupsafe-2.1.3/lib/python3.10/site-packages)
typeguard>   MarkupSafe 2.0.1 (/nix/store/px6gry8k8j0dqlmdypjh2mpdsnff3zpn-python3.10-markupsafe-2.0.1/lib/python3.10/site-packages)
typeguard>
typeguard> Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.

After
typeguard> pythonCatchConflictsPhase
typeguard> Found duplicated packages in closure for dependency 'sphinx':
typeguard>   'sphinx 5.3.0 (/nix/store/w95lvla01g513lvvcw4qapjcpsr50zb4-python3.10-sphinx-5.3.0/lib/python3.10/site-packages/sphinx-5.3.0.dist-info)'
typeguard>   'sphinx 5.3.0 (/nix/store/g646dzbadj7p4k3hmaimd7f5xz4z9410-python3.10-sphinx-5.3.0/lib/python3.10/site-packages/sphinx-5.3.0.dist-info)'
typeguard> Found duplicated packages in closure for dependency 'jinja2':
typeguard>   'jinja2 3.1.2 (/nix/store/bp9v60r5cr4na4lgla87ssa05izsa56s-python3.10-Jinja2-3.1.2/lib/python3.10/site-packages/Jinja2-3.1.2.dist-info)'
typeguard>   'jinja2 2.11.3 (/nix/store/y0bml8r9qw4r1mv0apa4zx8lqwps39xq-python3.10-Jinja2-2.11.3/lib/python3.10/site-packages/Jinja2-2.11.3.dist-info)'
typeguard> Found duplicated packages in closure for dependency 'markupsafe':
typeguard>   'markupsafe 2.1.3 (/nix/store/x7gbmq8465xa8w2178611pha5320v4ci-python3.10-markupsafe-2.1.3/lib/python3.10/site-packages/MarkupSafe-2.1.3.dist-info)'
typeguard>   'markupsafe 2.0.1 (/nix/store/nzspyk2mm36d2p5gx3wm65w3bw4jq1ai-python3.10-markupsafe-2.0.1/lib/python3.10/site-packages/MarkupSafe-2.0.1.dist-info)'
typeguard>
typeguard> Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.

I don't think that makes sense. This hook doesn't propagate anything but relies only on the standard library.
The pyocd package is just missing a few propagates. See https://github.com/NixOS/nixpkgs/pull/263611.

Ok, cleaned up a bit more and now looks like this.
django-phonenumber-field> pythonCatchConflictsPhase
django-phonenumber-field> Found duplicated packages in closure for dependency 'django':
django-phonenumber-field> 	django 4.2.6 (/nix/store/vxl39r3bh0ljqs2agskkvgyc1vrxixn2-python3.11-Django-4.2.6/lib/python3.11/site-packages/Django-4.2.6.dist-info)
django-phonenumber-field> 	django 3.2.22 (/nix/store/zlkyjpfdnhhgs8g1iz5f94l5dj0wgmwi-python3.11-django-3.2.22/lib/python3.11/site-packages/Django-3.2.22.dist-info)
django-phonenumber-field>
django-phonenumber-field> Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.

Lovely, thank you!

Looks like this broke python2.7. :shrug:
https://hydra.nixos.org/build/240532695/nixlog/2

fstring?

Also pathlib and importlib.metadata.

We can't use pathlib2 and importlib_metadata backports?

#267669


Add -initWithFinishHandler: to OPBlockObserver

I found myself using observers to wait till certain operation finished to enqueue next one based on the result of preceding operation. That's said, standard initializer for block observer that takes three blocks is not convenient and overly verbose.
This is not the case in Swift since it allows you to provide the only block and it will correspond to the last parameter. That's said I think it would be a good deviation from Apple's code due to Objective-C limitations.
This is how it's done in Earthquakes app:
let blockObserver = BlockObserver { _, errors in
    /*
        If the operation errored (ex: a condition failed) then the segue
        isn't going to happen. We shouldn't leave the row selected.
    */
    if !errors.isEmpty {
        dispatch_async(dispatch_get_main_queue()) {
            tableView.deselectRowAtIndexPath(indexPath, animated: true)
        }
    }
}

I could go one way or the other with this one...
OPBlockObserver *observer = [[OPBlockObserver alloc] init];
[observer setFinishHandler:^(OPOperation *operation, NSArray *errors) {
    NSLog(@"Start the party, because we are finished!");
}];

^^^^ this isn't that difficult, however, -initWithFinishHandler: might be good too...

@colinmcardell I agree, this is exactly what I was doing before this change. Just trying to avoid local variables that are never meant to be used anyway for anything else but being passed to addObserver:


[CELEBORN-619][CORE][SHUFFLE] Support enable DRA with Apache Celeborn.

What changes were proposed in this pull request?
Adapt Spark DRA patch for spark 3.4
Why are the changes needed?
To support enabling DRA w/ Celeborn on Spark 3.4
Does this PR introduce any user-facing change?
Yes, this PR provides a DRA patch for Spark 3.4
How was this patch tested?
Compiled with Spark 3.4

LGTM, mind trying #1539?

I'll try the script to merge this PR.


form-check-inline doesn't remove margin-left when going into new line

I have multiple form-check-inline elements like:
<div className="form-check form-check-inline">                             <label className="form-check-label">                                 <Field name="create_event_is_studi" component="input" className="form-check-input"                                        type="checkbox" id="inlineCheckbox1"/> Studenten Special                             </label>                         </div>
When scaling the resolution smaller, the inline element that goes into a new line still has the margin-left: .75rem, which makes it very ugly and hard to fix manually.
I dont really want to media querry every element lol.
Image that shows the issue:

Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via CodePen or JS Bin and report back with your link, Bootstrap version, and specific browser and OS details.

This was fixed in Beta 2. #22607


#2 Replication REST api should support anonymous user

@ctapobep

+1 from me. But I'd start adding tests for this kind of changes.

LGTM. It fixes #2.


Adding Timer#isRunning method

Just adding a simple utility method to check if the timer is running.

Fixed @luanpotter


Misspelling in function expression for Primitives2D.py in Modeler

The parameter radius is misspelled in this function expression:
def create_ellipse(self,position, major_raidus, ratio, bIsCovered=True, name=None, matname=None):

Still an issue.  See:
./pyaedt/modeler/Primitives3D.py\0455:    def create_ellipse(self, cs_plane, position, major_raidus, ratio, is_covered=True, name=None, matname=None):
./pyaedt/modeler/Primitives3D.py\0464:        major_raidus : float
./pyaedt/modeler/Primitives3D.py\0486:        MajorRadius = self._arg_with_dim(major_raidus)

Parameters have been renamed.
Current method's signature is:
def create_ellipse(self, position, major_radius, ratio, is_covered=True, name=None, matname=None):

Hi,
Sorry for commenting on a closed issue, but it seems that the typo is still in main:
https://github.com/pyansys/pyaedt/blob/146680f6b2d9fc73d5f70c09cf0556cda8cd2645/pyaedt/modeler/Primitives3D.py#L565

Hi, Sorry for commenting on a closed issue, but it seems that the typo is still in main:
https://github.com/pyansys/pyaedt/blob/146680f6b2d9fc73d5f70c09cf0556cda8cd2645/pyaedt/modeler/Primitives3D.py#L565

Hi Piwakk,
Indeed the argument "major_raidus" is mispelled in Primitives3D, the title of this issue mentionned Primitives2D. That's why we have been closing it.
Thanks for raising this issue.
I just created a new issue.


Extracted out RawEGraph type

This is another attempt with a similar motivation to #293 (It still assumes #291).
Instead of trying to work with compositional traits, I decided to extract out a RawEGraph type with raw versions of add, union and rebuild that each has various hooks, and then reimplement EGraph to use RawEGraph in a more backwards-compatible way. I also created the EGraphResidual type to represent what's left of a RawEGraph without its classes, so it could still be used while mutably borrowing data from an eclass. The EGraphResidual type has methods like find, lookup, and id_to_node and both RawEGraph and EGraph dereference to EGraphResidual so these implementations are shared.
None of the RawEGraph implementation is pub(crate), so it could be extracted into its own crate, although it depends on Id, Language, UnionFind, and RecExpr so they would need to be moved as well.

Cool! Just so I understand, what is the overall motivation here? Is this to reduce complexity in the current implementation? Or is there a particular use-case/feature that you are looking to support?

The main motivation is flexibility, currently anyone using EGraph is locked into using the current explanation implementation, and tracking the nodes in each EClass. For example, I think it would be interesting to revisit the idea of database-based ematching within egg, and that implementation probably wouldn't want to store nodes in each EClass but may want to use the various RawEGraph hooks keeping the database in sync with egraph.
A potential side benefit is that with the core egraph abstracted away it may be less costly to revisit something like #284

This looks like an interesting refactor. Is one of the motivations of this PR to support multiple or composable Analysis?

Partially, my idea was to have a flexible lower-level plain egraph, that doesn't do extra work, (eg. managing explanations, keeping track of nodes in each class, managing a lattice based analysis (although this could already be turned off)). My specific motivation was https://github.com/dewert99/bat_egg_smt, a toy QF_UF. It uses a different strategy for explanations, and doesn't need to store a list of nodes in each eclass so I didn't want the overhead of a full egg::EGraph.

I wonder if one strategy here is to work on a new rust-based API for egglog. It may be comparable work to doing this huge refactor of egg.

I haven't looked as closely at egglog but it seem to work quite differently, so I'm guessing it would have quite different performance characteristics for an smt solver.

Very cool! I'll be interested to see how you implement explanations and how the solver performs.
Egglog might have different performance characteristics, though it's usually faster than egg for a few reasons. Currently it doesn't have parent pointers, explanations, or uncanonical ids.

Egglog might have different performance characteristics, though it's usually faster than egg for a few reasons. Currently it doesn't have parent pointers, explanations, or uncanonical ids.
When you say that it doesn't have uncanonical ids, do you mean that it doesn't have store the original node for each uncanonical ids, and how does rebuilding work without parent pointers?

I'll be interested to see how you implement explanations and how the solver performs.

My original explanation implementation was similar to egg's but didn't worry about finding the shortest instead always giving the oldest explanation (so each explain node only need a next connection instead of a list of all connections), and used boolean literals (from the sat solver) as justifications instead of symbols.
Recently I tried switching to a different implementation based on https://www.cs.upc.edu/~oliveras/rta05.pdf  "2.1 Union-find with an O(k log n) Explain operation" which seemed to give a minor performance benefit.

Yeah, it doesn't store the original node for uncanonical ids.
Rebuiding works basically by running a query. For example, rebuilding all Add nodes can be though of a binary join:
(Add child1 child2 eclass1)
(Add child1 child2 eclass2)

The query finds Add nodes that differ in the eclass they belong to. It then makes them equal. I think egglog's rebuilding is eggs as a result, and timestamps help it only find new matches to this query.

Rebuiding works basically by running a query. For example, rebuilding all Add nodes can be though of a binary join:
(Add child1 child2 eclass1)
(Add child1 child2 eclass2)

The query finds Add nodes that differ in the eclass they belong to. It then makes them equal. I think egglog's rebuilding is eggs as a result, and timestamps help it only find new matches to this query.

Sorry if I'm missing something, but if the database had (F child1 eclass1) and (F child2 eclass2), and I unioned child1 with child2 where child2 became canonical, the timestamp for (F child1 eclass1) would seem to need to be updated, to the rebuilding join would find it and union eclass1 with class2, and the association from child1 to the row (F child1 eclass1) would seem like a sort of parent pointer.

That's the paper I used to implement egg's explain function. When proof size optimization is off, it gives the oldest proof I believe.

Since I was only interested in the oldest proofs, I didn't want the overhead of keeping Vecs of connections

Sorry if I'm missing something, but if the database had (F child1 eclass1) and (F child2 eclass2), and I unioned child1 with child2 where child2 became canonical, the timestamp for (F child1 eclass1) would seem to need to be updated, to the rebuilding join would find it and union eclass1 with class2, and the association from child1 to the row (F child1 eclass1) would seem like a sort of parent pointer.

Good point! The indices that we build for queries are like parent pointers.

That's the paper I used to implement egg's explain function. When proof size optimization is off, it gives the oldest proof I believe.

Since I was only interested in the oldest proofs, I didn't want the overhead of keeping Vecs of connections

Is there a way to make the current implementation in egg as performant as yours when explanation optimization is disabled?
Sorry this is off topic for this PR

Is there a way to make the current implementation in egg as performant as yours when explanation optimization is disabled?
Probably not without making the explanation a generic/type parameter of EGraph, instead of having it be controlled at runtime

Now that #291, has been merged, I was wondering if you would consider merging this, in which case I would try and resolve conflicts. Otherwise, I will probably keep my fork mostly separate, maybe trying to upstream any optimizations.

I do however like the idea of one day supporting DB-like matching in egg, but I'm not sure about this architecture.
Do you have any suggestions about how to improve the architecture?

No. I’m not sure about any new architecture for egg just yet. I’m open to
suggestions, but currently I don’t quite see the benefits these changes
would bring to make it worth the additional code.
On Mon, Apr 8, 2024 at 3:28 PM David Ewert @.***> wrote:

I do however like the idea of one day supporting DB-like matching in egg,
but I'm not sure about this architecture.
Do you have any suggestions about how to improve the architecture?
—
Reply to this email directly, view it on GitHub
https://github.com/egraphs-good/egg/pull/296#issuecomment-2043743831,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTPTF7RW6UQEBHQTOZD7DY4MKXJAVCNFSM6AAAAABC4RORW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTG42DGOBTGE
.
You are receiving this because you commented.Message ID:
@.***>


Entropy Grid regenertaion( File import):Need to change path.

Need to chnage the path.File should be easily accessible.

Still i can not access the PDF.

Verified this issue on Tribe app v 2.2.2(592)


Show Tags on a collective's page

Groups can tag themselves within their settings. These tags can be used to find them using the search feature, but otherwise do not appear on the collective's page. (They now appear on the cards that appear in the search.)

MVP:
Display the tags on their page, probably at the bottom, but open to suggestions.

We currently display what we think is the collective's "main tag" in the hero (guessed through some magic formula) but not the others:

That could indeed be a nice addition that would help collectives with their page SEO. Maybe we can display that in the "About" section?

sounds like it would be nice and easy to reappropriate the design used in #4295 here in the collective page.

@opencollective/design not sure we need a full kick-ff on kick off here, would you be able to look at how tags should be presented here?

Link to figma design: https://www.figma.com/file/ZQBMWhnGGtRWeIZknFW1eP/[OC-Design]-Production-Ready-✅?node-id=16687%3A236361

I like this design!
what happens when you click on a Tag on a collective's page? In my mind, it should open a page of Search results with that tag.

it already does! disregard above comment.

Follow up issue with the design changed we shall iterate later; https://github.com/opencollective/opencollective/issues/5563


Embedding vector dimension issue in the paper

The dimension of the input data is n×k. After the convolution is completed, the dimension of the data must have changed. However, according to the content of the paper, the dimension has not changed after the convolution is completed and is still n×k. And，then send it to GATs


Battle-tested vesting contract research

Some ones to look at:

[ ] RibbonFinance (Luke)
[x] Opyn (Shahar)
[ ] Hegic (Luke)
[x] GMX (Shahar)

Opyn:
https://medium.com/opyn/introducing-opyn-developer-toolkit-2bfd5bcc7a92
https://gist.github.com/alexisgauba/cf055f521bcfded018116f3f37074f67, which leads to:
https://github.com/banteg/yearn-vesting-escrow/blob/master/contracts/VestingEscrowSimple.vy#L94, where vesting actually happens.

Gmx: https://github.com/gmx-io/gmx-contracts/blob/3b941172f1d00a794183f371218c0f83635e90ff/contracts/staking/Vester.sol#L349

Could not find Hegic vesting implementation


Hotfix/MacOS install docs

Reformatted the MacOS Install documentation to improve document structure and order of instruction to be more intuitive for the dependencies order. Enhanced using ## instead of ** to segment different sections.

DO NOT MERGE yet, we are looking for potential changes to the MacOS install documentation.

not sure if this is now addressed in #345? if not there might be a conflict, could be good to get any extra bits here onto the other one

Going to close this for now, any additions should be made to the latest instructions


<EMAIL_ADDRESS>Only Works on CHEST Types

I reported this a while back on the irc and it was fixed but it seems that the more recent builds of Denizen have reverted the fix(?). All the containers in Minecraft support custom titles. Except for the anvil.
Hopper_Inv:
  type: inventory
  inventory: HOPPER
  title: "Hello <&4>World"
  slots: []

(Essentials command)
/i brewingstand 1 name:This&1Is&5A&4Title
/i hopper 1 name:This&1Is&5A&4Title

Try out http://ci.mineconomy.org/job/Denizen_Developmental/409/ I sent in a potential fix.

Inventories are still using their default titles with that build. I took a look at the denizen irc logs and found the change that fixed titles in other inventories a while back. https://github.com/Morphan1/Denizen/commit/f8f5a908c8750be2a86be6a0afe8bf157d3a40a6
Which I think was pushed for build 1502.


rspec-rails 3.2 with Rails 4.2 causes deprecation warnings on failed matchers

Issue

Note: This issue does not happen with other rspec-rails + Rails version combinations.

The issue was first noticed when using composable matchers to verify a response object. When the expectation failed the following deprecation warning was written by Rails:
DEPRECATION WARNING: `ActionDispatch::Response#to_ary` no longer performs implicit
conversion to an array. Please use `response.to_a` instead, or a splat like `status,
headers, body = *response`. (called from flatten at /path/to/a/thing_spec.rb:4)

Steps to Reproduce
This is easily reproduced in any controller or request spec which has a response object of type: ActionDispatch::Response. In fact the issue can happen outside of composable matchers.
To reproduce, simply perform a get to a valid path then run:
[response].flatten

Root Cause
The reason this happens is with the improvements with composable matchers in: rspec/rspec-expectations#713
It just so happens that having a response object with a composed diffable matcher sends the code path into the following:
array = array.flatten(1) until (array == array.flatten(1))

When the contents of the array include an ActionDispatch::Response object, Ruby's flatten method checks to see if it responds to to_ary; Ruby's implicit "this thing is an array" converter message. Only objects that respond to this method are then attempted to be flattened again by having to_ary called on them, performing the check on the returned array elements.
This is disappointing behavior on the part of ActionDispatch::Response as that object really is not an array. This history is a bit more complicated though, as Rails is a Rack app, and Rack responses are array triplets. So it does make sense to a degree why this came about. However, splat and to_a work on the response object so the implicit to_ary is not necessary. I'm glad to see this is being deprecated / removed and the response object being treated as just that, an object.
Q.E.D This is not the fault of RSpec or something that is easily avoided.
Workarounds
Unknown at this time - outside of disabling deprecations warnings in Rails.
Solution
Unknown at this time.
Attempting to wrap ActionDispatch::Response objects with a custom wrapper seems not only a very invasive code change, but prone to many problems. I'd hate to break someone's code as we've changed the contract from under them by removing to_ary even though it shouldn't be relied on.
Attempting to undef, while being easier on rspec-rails' part, has the same code breaking potential.

More just documenting this for others who may come across it. It certainly was a head scratcher for me when it first appeared.

One hacky solution is for rspec-rails to redefine RSpec::Support::Differ#safely_flatten, and put logic that avoids calling flatten on an array of ActionDispatch::Response.
Not pretty, but seems potentially better.

I might be missing something, but wouldn't the build job fail if there was something on stderr?
Can't find any DEPRECATION message in e.g. this build.
Closing as chances are this is not an issue anymore.


chat.getgrav.org just takes you to the main Grav webpage; how to get to Grav Discord?

I hope I am posting this to the right place.  If not, please let me know.
How does one get to the Grav Discord server?  When I click the Discord icon in the upper right of https://getgrav.org/, it takes me to https://chat.getgrav.org/.  But that just loads the same page all over again.  And further down on the page where there is another Discord icon, that again just points to https://chat.getgrav.org.
I was kind of expecting the usual invite link somewhere to join the Discord server.  Am I wrong?

Sorry about that, looks like we do have an issue. You can reach the details via https://getgrav.org/discord which is where you are supposed to be redirected from chat.getgrav.org

@w00fz cool!  Thanks!  That worked.

Fixed this.


Setup prerequisite

I'm dumb - I'm using firebase nodejs and I can't understand how to install graphicsmagick and ghostscript there. Any help please?
I'd expect those modules to be available as npm packages but that doesn't seem to be the case. What is the expected way to set it up?

I AM IN THE SAME BOAT. SEND HELP :D

@jamiegalbreath I ended up using ghostscript directly - it still requires extra steps and the below guide explains those:
https://tech.residebrokerage.com/using-firebase-cloud-functions-with-ghostscript-for-pdf-to-image-conversion-f81b248d3b22
I guess similar steps should be taken to install the corresponding dependencies for this library to work (though the steps would vary depending on your node environment)

I think you need to follow the official installation directions for graphicsmagick and ghostscript for the OS you intent to run the app on. It should be installed on the system you are planning to deploy the app on.

What about if your app is in next-js. I haven't been able to run this locally cause I don't know how to setup these prerequisites on windows & then how would I set this up when I deploy my app on vercel.


@ServiceActivator and Kotlin lambda function don't work together in a same component

Describe the issue
@ServiceActivator won't get called in the same component where there is already a Kotlin lambda function.
To Reproduce
package com.springcloudfunction.kotlinlambda.demo

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.cloud.function.context.PollableBean
import org.springframework.context.annotation.Bean
import org.springframework.integration.annotation.ServiceActivator
import org.springframework.messaging.support.ErrorMessage
import java.util.function.Consumer
import java.util.function.Supplier

data class Person(
	val name: String,
)

@SpringBootApplication
class DemoApplication {
	@Bean
	@PollableBean
	fun producePerson(): Supplier<Person> = Supplier {
		println("Sending person...")
		Person("person")
	}

	/*
	@Bean
	fun logPerson(): Consumer<Person> = Consumer { person ->
		throw java.lang.RuntimeException("Triggered an error")
	}
	 */

	@Bean
	fun logPerson(): (Person) -> Unit = { person ->
		throw RuntimeException("Triggered an error")
	}

	/**
	 * Expected behavior:
	 *  It should print "Received error message".
	 *
	 * Symptoms:
	 *  1. If move onErrorMessage(@ServiceActivator) to another @Component, it works.
	 *  2. If use java.util.function.Consumer as the return type of logPerson, it works.
	 *  3. If use Kotlin lambda as the return type of logPerson, it doesn't work.
	 *  4. We just could not put Kotlin lambda and @ServiceActivator in the same component.
	 */
	@ServiceActivator(inputChannel="errorChannel")
	fun onErrorMessage(errorMessage: ErrorMessage) {
		println("Received error message")
	}
}

fun main(args: Array<String>) {
	runApplication<DemoApplication>(*args)
}

Version of the framework

spring-cloud-stream: 3.2.4
spring-cloud: 2021.0.3

Expected behavior
@ServiceActivator should be called both with java.util.function.* and Kotlin lambda.
Additional context
The demo project:
https://github.com/asinbow/spring-cloud-function-kotlin-lambda/blob/193da2ffa7bbb7a721a49b66f13da29716f60596/src/main/kotlin/com/springcloudfunction/kotlinlambda/demo/DemoApplication.kt#L37-L46

On the surface it appears to be Spring Integration issue, so for now I'll ask @artembilan to take a look. ..
That said, the workaround
@Bean
	fun logPerson(): Consumer<Person> = Consumer { person ->
		throw java.lang.RuntimeException("Triggered an error")
	}

is reasonable, so for now I would go with that, but we'll certainly figure out what the issue is

Looks good, no problem.

Here is what I found in the hard debugging.
If we declare it like this fun logPerson(): Consumer<Person> = Consumer { person ->, then it is not a Kotlin lambda anymore.
And a KotlinLambdaToFunctionAutoConfiguration.KotlinFunctionWrapper is not registered. Just because kotlinToFunctionTransformer bean does not apply its logic:
if (typeName.startsWith("kotlin.jvm.functions.Function")) {

If it is lambda, then bean is resolved too early, far before many of the BeanPostProcessors are registered into a BeanFactory including the one for @ServiceActivator from Spring Integation - MessagingAnnotationPostProcessor.
Looking into that KotlinLambdaToFunctionAutoConfiguration.KotlinFunctionWrapper to understand why it is triggered too early...

So, the KotlinFunctionWrapper is a FactoryBean<FunctionRegistration>, but it does not expose the target type somehow into a BeanFactory.
Therefore when ValidationAutoConfiguration tries to resolve an Environment dependency for the methodValidationPostProcessor(), it goes to the init phase for that KotlinFunctionWrapper to be able to determine its target type.
This one triggers its own dependency to be initialized - kotlinLambdaTarget. Which in our case is that logPerson() bean in the DemoApplication.
And this one, in its turn, initialize the whole DemoApplication.
In the end all of those are initialized too early, just because the ValidationAutoConfiguration triggers an autowiring process for the BeanPostProcessor.
Probably this one has to be discussed with Spring Boot team to revise that ValidationAutoConfiguration into something else, but as an interim solution (which may remove some other problems) is like this:
cbd.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, FunctionRegistration.class);

In that KotlinLambdaToFunctionAutoConfiguration.kotlinToFunctionTransformer() bean definition.
I'll defer this to @olegz to decide to move this issue to Spring Cloud Function or to Spring Boot.
Thanks


net::ERR_ABORTED 404

Hi,
first, thank you for your plugin!
So I use this config for create PWA:
VitePWA({
  registerType: "autoUpdate",
  manifest,
  workbox: {
     globPatterns: ["**/*.{js,css,html,ico,png,svg}"],
  },
}),

When I deployed to production the PWA app, everything goes fine. But when I modify some files inside /src then build and re-deploy I get this message in devtools:
GET https://MYDOMAIN/assets/index.7cafb69e.js net::ERR_ABORTED 404
When I refresh the page again it will works as well.
The Network tab:

As you can see the two paths are not the same in the index.html. The "second" index.html is the correct which came from sw.
I try to automatic reload https://vite-pwa-org.netlify.app/guide/auto-update.html#automatic-reload but it's not working.
I think maybe it's a cache problem, however the server cache is not allowed.

@nevadavid check your cache headers: https://vite-pwa-org.netlify.app/deployment/#cache-control

Hey @userquin, yes, I checked the link.
I got these headers for the mentioned files:
/
HTTP/2 200
server: nginx
date: Sat, 04 Feb 2023 10:50:54 GMT
content-type: text/html; charset=UTF-8
strict-transport-security: max-age=31536000;
/manifest.webmanifest
HTTP/2 200
server: nginx
date: Sat, 04 Feb 2023 10:46:25 GMT
content-type: application/octet-stream
content-length: 736
last-modified: Sat, 04 Feb 2023 05:24:48 GMT
etag: "63ddec20-2e0"
strict-transport-security: max-age=31536000;
accept-ranges: bytes
/index.html
HTTP/2 200
server: nginx
date: Sat, 04 Feb 2023 10:46:20 GMT
content-type: text/html; charset=UTF-8
strict-transport-security: max-age=31536000;
/sw.js
HTTP/2 200
server: nginx
date: Sat, 04 Feb 2023 10:46:16 GMT
content-type: application/javascript; charset=UTF-8
content-length: 1748
last-modified: Sat, 04 Feb 2023 05:24:48 GMT
etag: "63ddec20-6d4"
strict-transport-security: max-age=31536000;
I cannot add any other header in my storage provider just these:

Maybe I should change the provider e.g.: Netlify?

You should also include any JS asset to be immutable, they have a hash included in the name, and so can be cached.
Check this another issue: https://github.com/vite-pwa/vite-plugin-pwa/issues/446


Bad request: 400 : Target user is not connected to voice.

Interaction error [Guild:<PHONE_NUMBER>092385340
Channel:<PHONE_NUMBER>806912100]
Exception: BadRequestException
Message:   Bad request: 400 : Target user is not connected to voice.
Stack trace:
   at Bot.Core.Interaction.BaseInteractionErrorHandler`1.TryProcessReportingErrorsAsync(TKey key, IMember requester, Func`2 process) in /home/runner/work/bot-on-the-clocktower/bot-on-the-clocktower/Bot.Core/Interaction/BaseInteractionErrorHandler.cs:line 68

Thanks for the report! Should now be quieter about users leaving the channel during a move.


How to open a file using default android app

Hi, I'm working on an app in which the user could open a file stored in scoped storage with the default android apps (like RNFetchBlob's ActionViewIntent). However, I can't find a way to do it, as RNFetchBlob requires a path rather than an URI.
Also, I need the user to access the original file and not a copy of it, so he can edit it.
I tried to stat the file path (and I get something like '/storage/emulated/0/.../myfile', but no file is found by RNFetchBlob ActionViewIntent.
As RNFetchBlob is not maintained anymore, I can't find any alternative to manage this situation... Any help will be greatly appreciated

EDIT : I have finally found out that react-native-file-viewer is able to open URIs obtained through react-native-scoped-storage.
Might be interesting to add this in the docs for any person that needs it in the future


how stable is terarkdb for production use?

i understand there are bugs previously in rocksdb.
how stable is terarkdb for production use?
advisable to store mission critical financial data using terarkdb?

So you will store "mission critical financial data" with stability guarantees from Github issues?
Yes it is pretty stable but you should always have replications, even for non-"mission critical financial data".