Add Kelly error indicator

This PR adds an isotropic version of the Kelly error indicator for scalar parallel finite element problems. It is commonly used for goal oriented AMR in smooth transient problems.

[x] Base implementation
[x] Integrate into example 15p
[x] Check hₑ/hₖ variants -> User can provide its own coefficient computation.
[x] Fix assertion in transient 2D simulations (fixed in #1697)
[x] Add tests
[x] Fix style
[x] Finish documentation

References

Kelly, D. W., et al. "A posteriori error analysis and adaptive processes in the finite element method: Part I—Error analysis." International journal for numerical methods in engineering 19.11 (1983): 1593-1619.
De SR Gago, J. P., et al. "A posteriori error analysis and adaptive processes in the finite element method: Part II—Adaptive mesh refinement." International journal for numerical methods in engineering 19.11 (1983): 1621-1656.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#1722
@termi-official
@v-dobrev
@jakubcerveny + @psocratis
10/19/20
12/02/20
⌛due 12/09/20

I still have a few questions left on how to implement some details correctly.

What is the rationale behind excluding the "GetTotalError" method from the ErrorEstimator and AbstractErrorEstimator?
Implementation-wise this turns out to be a small problem when having multiple error estimator in one application (see my modification of ex15p) and I do not see what can go wrong.
How to obtain the correct integration rule for face integrals?
The Kelly error estimator basically works through computing the jumps in the gradients of FE solution at the faces. Currently I get the integration rule by

auto int_rule = IntegrationRules().Get(FT->FaceGeom, 2 * FT->Face->Order() - 1);

which is basically just an educated guess how it should work out.

Is this more or less ready? If so, I would like to test it in my branch.
BTW, did you see any improvement over the ZZ estimator? I was also suggested by other people to use Kelly over ZZ. I believe Kelly is a more popular estimator among other FEM frameworks.

Hi @termi-official, sorry we did not respond to you questions earlier -- I think they can be addressed during the review process.
Go ahead and add the ready-for-review label to the PR to start the review process -- unless you prefer to address the questions before that.

Hi @tangqi , let me latter answer the question. I tried this error indicator on traveling waves in degenerated reaction diffusion systems and it worked reasonably well in order 1 and 2. Generally speaking is the ZZ error estimator more accurate in capturing the error, but the estimation process is computationally expensive, since it involves assembling and solving a linear system in the MFEM implementation. Kelly on the other hand does not require an assemple and solve, which makes the estimation computationally way faster, but at the cost of accuracy. The increase in performance was the primary driver in my case, because L2ZZ was the bottleneck in my simulation code. Further, if the solution is not smooth enough Kelly will most likely fail to capture the error properly. Regarding the popularity of Kelly, I think this comes primarily from the fact, that Kelly is pretty simple and straightforward to implement and understand.
The implementation is working for 1st order scalar transient problems, as mentioned above. I was unable to properly test higher order (above 2) simulations since my matrix free implementation is not ready yet, but it should work there too. My current workaround for vector valued problems is to estimate each dimension with its own Kelly estimator and taking the maximum of each estimator as the "true" error indication value (in the sense of an local L_\infinity indicator). Some kind of normalization will be necessary if the dimensions live on different scales. Also note that implementation currently does not work with non-uniform ansatz degree and will most likely just crash for now.
@v-dobrev no problem! :) We can address the remaining issues in the review process.

Thanks @termi-official That sounds very good. I am solving a system with high order+AMR and I sum all the ZZ errors together with some weights in front of each errors, which tries to address the scaling problem you mentioned. I can certainly test your estimator in my branch for high-order if that would help the review process. It sounds like it is almost ready.

I have a question on the description of the implementation of the ZZ error estimator given above that indicates it is expensive since it involves assembling and solving a linear system. It sounds like the description is referring to solving a global linear system. That is not the common method of implementation of the method. The common method of implementation employs a least squares fit over the patch of elements sharing the "node" that you want to calculate an "improved" value for. Once that is done for all the points needed to defined the improved field defined over the entire mesh (using the "nodal values" and appropriate shape functions, the error is calculated, element by element, based on the difference between the improved field and current finite element solution.

@tangqi I would be happy to about feedback on high order simulations! Maybe another note on using this indicator: I am still not quite sure whether the internal estimator for the element coefficients (i.e. h_e = det(J)^(-dim)/2p) is good enough for high order in basis and geometry, so I made this one exchangable through KellyErrorEstimator::ChangeCoefficientFunction. I haven't found any literature on a comparison of different approaches yet.
@MarkShephard Sorry, I was a bit imprecise here. In my use case the vanilla ZZ error estimator in MFEM failed to capture the error at some of the process boundaries, so I fell back to the L2ZZ error estimator, which in turn introduces a L2 projection and therefore a mass solve (see https://github.com/mfem/mfem/blob/065f5692b0450ed42e707adea723ca566d786070/fem/pgridfunc.cpp#L1089-L1138). This one works really great! However I have not yet figured out why exactly ZZ fails and how the L2 projection fixed the failures at process boundaries. Does this answer your question?

Let me add some comments regarding the ZZ estimators in MFEM.
There are actually two different versions of the estimator: ZienkiewiczZhuEstimator and L2ZienkiewiczZhuEstimator. The second version is the one that forms a global mass matrix to perform an L2 projection to "average the flux". In the first version, the "averaging of the flux" uses much simpler and faster local averaging of dofs (values) from neighboring elements.
Initially the first version could be used just in serial code, since in parallel it was not implemented (at least not for non-conforming meshes). For some time now, this limitation has been lifted and that version should be good to use in parallel too. The second version was originally implemented just in parallel and it is still only available in parallel (it requires ParGridFunction, ParFiniteElementSpace, etc as can be seen by the constructors.)
Thus, in parallel, one can now use the faster version, ZienkiewiczZhuEstimator, however, the slower version, L2ZienkiewiczZhuEstimator,  may still lead to better refinement results. Of course, in both cases, the choice of the "flux" FE space(s) may also lead to different results. Overall, I think the best options will depend on the specific application, and some experimentation with the available options is generally a good idea.

@termi-official, one option you can try with the ZienkiewiczZhuEstimator is to call SetWithCoeff, which is off by default and that may be causing issues if you have spatially varying coefficient.

First, thanks for the great feedback! :)
Let me start by answering @jakubcerveny .
That pattern is a nice catch. I was not aware of this one. My guess here is that the hysteresis is too tight, causing the derefinement to excessively merge patches on each process, but I have to check this one in detail. This may take some days.
Regarding ZZ and L2ZZ, let me double check over the next days (I am still testing the new NC mesh file format), but I am pretty confident that ZZ still messes up the error estimation at non-conforming faces on processor boundaries for reaction diffusion systems (while L2ZZ gives a "correct" error). Which should not be a methodical, but an implementational issue, right?
@psocratis absolutely no problem! What you should be aware of is, that this method is an error indicator and not a true estimator (excepting for Poisson-like problems), so the error measurement will almost always be somewhat off. However, this is not an issue for many simulation in practice, as it is still an excellent indicator for Problems with smooth solutions, allowing a nice starting point for goal-based refinement. The "cost" here is to find the right parameters (e.g. a working "error bound")  and a proper element coefficient function. To answer your question, if the method is used out of the box than this may expected. But, just to be sure, let me investigate this one further, because one order of dofs more in 2D for a traveling wave problem sounds off.
Regarding the error vs dof plot, there the Kelly error estimator will be almost sure behind the ZZ error estimator, because Kelly's bounds are not that sharp. The plus here is more that it is easier applicable to a wide range of problems and that it is computationally pretty cheap (basically evaluating jumps in gradient fields). I would prefer to not include this change with this PR, because I do not know whether I can find the time to do this currently. If you want to delay this PR until these new tests are implemented, then I would not have any problems with it.

First, thanks for the great feedback! :)
Let me start by answering @jakubcerveny .
That pattern is a nice catch. I was not aware of this one. My guess here is that the hysteresis is too tight, causing the derefinement to excessively merge patches on each process, but I have to check this one in detail. This may take some days.
Regarding ZZ and L2ZZ, let me double check over the next days (I am still testing the new NC mesh file format), but I am pretty confident that ZZ still messes up the error estimation at non-conforming faces on processor boundaries for reaction diffusion systems (while L2ZZ gives a "correct" error). Which should not be a methodical, but an implementational issue, right?
@psocratis absolutely no problem! What you should be aware of is, that this method is an error indicator and not a true estimator (excepting for Poisson-like problems), so the error measurement will almost always be somewhat off. However, this is not an issue for many simulation in practice, as it is still an excellent indicator for Problems with smooth solutions, allowing a nice starting point for goal-based refinement. The "cost" here is to find the right parameters (e.g. a working "error bound") and a proper element coefficient function. To answer your question, if the method is used out of the box than this may expected. But, just to be sure, let me investigate this one further, because one order of dofs more in 2D for a traveling wave problem sounds off.
Regarding the error vs dof plot, there the Kelly error estimator will be almost sure behind the ZZ error estimator, because Kelly's bounds are not that sharp. The plus here is more that it is easier applicable to a wide range of problems and that it is computationally pretty cheap (basically evaluating jumps in gradient fields). I would prefer to not include this change with this PR, because I do not know whether I can find the time to do this currently. If you want to delay this PR until these new tests are implemented, then I would not have any problems with it.

Hi @termi-official, thanks for your response, this is very helpful.
I certainly don't want to delay the PR, I might actually write a small test myself (mostly out of curiosity) after the PR is ready.
In any case, I suggest that the sample runs which are added to ex15p should not take a lot of time since they are going into automated testing.
Thanks,
Socratis

Hi again @psocratis @jakubcerveny , turns out the numerical integration is messed up. It should work now with arbitrary order basis functions, but is restricted to H-refinement. To prepare this branch for the upcoming P-refinement (#1423) I need some help, because I cannot figure out how to obtain the order of shared faces. For local faces I think the correct one is FiniteElementSpace::GetFaceOrder, but I cannot find something similar for the shared face case. At least I guess this is how the P-refinement implementation will share the order information.
Probably another note which I forgot to mention: This implementation should also work with high order geometry, but is not tested properly, since I was not sure what a proper test would look like.

Hi again @psocratis @jakubcerveny , turns out the numerical integration was messed up. It should be fixed now and work with arbitrary order basis functions, but is restricted to H-refinement.

There is indeed quite an improvement now! I tested all the sample runs and now the two estimators are a lot closer.
Note that for the two sample runs mpirun -np 4 ex15p -m ../data/mobius-strip.mesh and mpirun -np 4 ex15p -m ../data/escher.mesh -r 2 -tf 0.3 the Kelly estimator crashes. If it's not supposed to work for these meshes I suggest that the ZZ estimator is enforced or an error should be printed. Additionally, it seems to work with nurbs. I tested mpirun -np 4 ex15p -m ../data/ball-nurbs.mesh -tf 0.5 and it terminates successfully. The Kelly estimator run is much faster than the ZZ one, however, at least qualitatively, the solution does not look accurate enough. Again if this is not supposed to be supported then I suggest the ZZ estimator is enforced.

Thanks for the new round of feedback and happy to hear that it works with nurbs meshes!
Quite interesting catch there with the Mobius strip, as it really should work. I am also able to track down what the issue is and I think I misunderstand something on a conceptual level: To obtain the "flux in normal direction" of an element in the mobius strip I have to compute the outward face normal and multiply it by the flux vector, where the vectors should be 2D, right?
In the implementation I obtain the normal for a face by
Vector normal(mesh->Dimension());
auto FT = pmesh->GetFaceElementTransformations(face_index);
CalcOrtho(FT->Face->Jacobian(), normal);

however, the Jacobian here is a 3x1 matrix for the mobius strip? I am sorry, but do not understand what exactly is going wrong here, since I would expect to obtain a 2x1 matrix, because the elements are 2D.
  J.Height() = 3, J.Width() = 1, n.Size() = 2

Hi Dennis, ex15p now indeed works much better, thanks!
I'm still seeing a slight asymmetry in the finest element region, do you have any idea where this might be coming from? (mpirun -n 8 ex15p -o 2 -est 1 -tf 0.42, press e in GLVis).

As for FiniteElementSpace::GetFaceOrder, I do hope this will be the function to call for both local and shared faces (hopefully it won't matter) in p-refinement-dev, but I didn't get to the parallel hp features yet. I wouldn't worry about it at this point.

I wanted to check if this is a problem in serial too, but then realized the KellyErrorEstimator is parallel only. Is there a reason Kelly doesn't work in both serial and parallel (as ZienkiewiczZhuEstimator does)?

@psocratis please note that NURBS meshes are converted to standard H1 meshes at the beginning of ex15p, so we don't really work with them in this case.
I'm not sure how face integration works in case of 2D surface meshes embedded into 3D (mpirun -np 4 ex15p -m ../data/mobius-strip.mesh), but I think @v-dobrev know the answer to these questions...

I am excited how fast the estimator is: finally we can replace L2ZZ, and I'd probably use Kelly in ex6p too.
However I am concerned by the asymmetries I'm seeing in the results. If these could be sorted out, it would be really great. (I suspect these little errors might be caused by processor boundaries, especially as they are changing during rebalancing)
mpirun -np 8 ex15p -m ../data/inline-hex.mesh -tf 0.9 -est 1 -e 2e-5

@psocratis , I was able to track down the issue with the escher mesh. I guess using RT elements with NC tets may have a bug. ParGridFunction::ExchangeFaceNbrData throws an assertion in this case. This is reproducible with the L2ZZ error estimator by calling this function at any point in the L2ZZErrorEstimator function (using RT).
The triggered assertion is
Assertion failed: (data && i >= 0 && i < height && j >= 0 && j < width) is false:
 -->
 ... in function: double &mfem::DenseMatrix::operator()(int, int)
 ... in file: /home/termi/Repos/mfem-feature/linalg/densemat.hpp:892

@jakubcerveny the asymmetry seem to be an issue due to the way how I compute the coefficients in the estimator, where I just realized my plan does not work how it should. Switching to the coefficient presented by W. Bangerth I am able to obtain a symmetric pattern, but it does look a bit strange, since the area in front of the wave is refined in a zig-zag pattern (figure below). I should note that this does not work well out of the box with highly curved geometries, because the coefficient is based on the face diameter, which is currently approximated by the maximal distance between all vertices of a face. The implementation allows to exchange the computation of the coefficients for the local errors (i.e. face-centric and element-centric).

Regarding your question on serial computations, if you want I could rearrange the code into two classes: One working in serial and one in process-parallel. The issue for the process-parallel case is that the we must take care of fluxes on shared faces, which are handled separately. However, since the ZZ error estimator is working nice and fast for serial implementations I had skipped the serial implementation for the Kelly error estimator. To check if issues arise at process boundaries I usually fall back to an MPI run with 1 process.
Best,
Dennis

Since the Mobius strip is a surface mesh, the element transformations map from 2D reference space into 3D space, so its Jacobian matrix (i.e. gradient matrix) is 3x2. Similarly for the edges of this mesh, the transformation maps 1D reference space into 3D (a curve in 3D), so its Jacobian matrix is 3x1 -- this is simply the tangential vector at the given point. Because of this one cannot compute the normal vector just from the 3x1 matrix -- the orthogonal space is 2-dimesional. The natural choice is to pick the 3D normal vector to be also tangential to the surface as well as orthogonal to the edge tangential vector (the 3x1 Jacobian).
I have not tested this, but here is what I think the code can look like:
   Vector normal(mesh->SpaceDimension());
   Vector ref_normal(mesh->Dimension());
   auto FT = pmesh->GetFaceElementTransformations(face_index);
   // ...

   // Inside edge/face quadrature point loop:
   FT->SetAllIntPoints(&face_ip); // set the current edge/face quadrature point
   if (mesh->Dimension() == mesh->SpaceDimension())
   {
      CalcOrtho(FT->Jacobian(), normal);
   }
   else
   {
      auto loc1 = FT->GetIntPoint1Transformation();
      loc1.SetIntPoint(&face_ip);
      CalcOrtho(loc1.Transf.Jacobian(), ref_normal);
      auto e1 = FT->GetElement1Transformation();
      e1.AdjugateJacobian().MultTranspose(ref_normal, normal);
      normal /= e1.Weight();
   }

Thanks for the thorough explanation @v-dobrev ! :) Your code also worked almost out of the box. However, for some reason when using the adjacent face information (by exchanging all "1"'s by "2"s) the AdjugateJacobian method segfaults (which in turn can be tracked down to an unmapped memory error in H1Ser_QuadrilateralElement::CalcDShape). The Moebius strip does terminate sucessfully.
However, also in this case the refinement is not symmetric as @jakubcerveny already found in the large hex mesh. I could not track this one down yet, but it affects all ansatz orders and all setups which I tried. I could rule out that this is something with messed up process boundaries, as different process numbers produce exactly the same asymmetric refinement (for an example see below with 2 and 4 processes at t=0.5).

Still I think I was able to track this one down too. I obtain symmetric refinements by increasing the (Gauss-Legendre) numerical integration order by changing
auto xfes      = solution->ParFESpace();
auto FT = pmesh->GetFaceElementTransformations(face_index);
IntegrationRules().Get(FT->FaceGeom, 2 * xfes->GetFaceOrder(face_index) - 1);

to
auto xfes      = solution->ParFESpace();
auto FT = pmesh->GetFaceElementTransformations(face_index);
IntegrationRules().Get(FT->FaceGeom, 10 * xfes->GetFaceOrder(face_index) - 1);

Any idea what is going wrong with the order 2p-1?

which in turn can be tracked down to an unmapped memory error in H1Ser_QuadrilateralElement::CalcDShape

I don't think ex15p uses serendipity elements, did you switch to serendipity elements somewhere in the code?

Any idea what is going wrong with the order 2p-1?

Where is this order used? Depending on the integrand, you may need to use order 2p. Also, is this with serendipity elements?

Hi again,
sorry I do not know how I ended up with typing H1Ser_QuadrilateralElement. It is indeed H1_QuadrilateralElement . Here a fresh stacktrace:
*** Process received signal ***
[biw-km-WS-97:25955] Signal: Segmentation fault (11)
[biw-km-WS-97:25955] Signal code: Address not mapped (1)
[biw-km-WS-97:25955] Failing at address: (nil)
[biw-km-WS-97:25955] [ 0] /lib64/libpthread.so.0(+0x12360)[0x7ff0f9f23360]
[biw-km-WS-97:25955] [ 1] examples/ex15p(_ZNK4mfem23H1_QuadrilateralElement10CalcDShapeERKNS_16IntegrationPointERNS_11DenseMatrixE+0x29)[0x9072c9]
[biw-km-WS-97:25955] [ 2] examples/ex15p(_ZN4mfem27IsoparametricTransformation12EvalJacobianEv+0x3a7)[0x8c07c7]
[biw-km-WS-97:25955] [ 3] examples/ex15p(_ZN4mfem21ElementTransformation8JacobianEv+0x43)[0x648c13]
[biw-km-WS-97:25955] [ 4] examples/ex15p(_ZN4mfem21ElementTransformation13EvalAdjugateJEv+0x2b9)[0x8bd0c9]
[biw-km-WS-97:25955] [ 5] examples/ex15p(_ZN4mfem21ElementTransformation16AdjugateJacobianEv+0x40)[0x796f60]
[biw-km-WS-97:25955] [ 6] examples/ex15p(_ZN4mfem19KellyErrorEstimator16ComputeEstimatesEv+0xd94)[0x8c5214]
[biw-km-WS-97:25955] [ 7] examples/ex15p(_ZN4mfem19KellyErrorEstimator14GetLocalErrorsEv+0x2f)[0x546e9f]
[biw-km-WS-97:25955] [ 8] examples/ex15p(_ZN4mfem16ThresholdRefiner9ApplyImplERNS_4MeshE+0xa0)[0x675290]
[biw-km-WS-97:25955] [ 9] examples/ex15p(_ZN4mfem12MeshOperator5ApplyERNS_4MeshE+0x2f)[0x53e2ff]
[biw-km-WS-97:25955] [10] examples/ex15p(main+0x17d8)[0x53b388]
[biw-km-WS-97:25955] [11] /lib64/libc.so.6(__libc_start_main+0xea)[0x7ff0f9b77f8a]
[biw-km-WS-97:25955] [12] examples/ex15p(_start+0x2a)[0x539afa]
[biw-km-WS-97:25955] *** End of error message ***

for
mpirun -n 1 examples/ex15p -est 1 -o 1 -m ../../Repos/mfem/data/mobius-strip.mesh -tf 0.33 -e 0.000001

and the implementation which triggers it:
// i.e. the numerical integration of ∫ flux ⋅ n dS₂
for (int i = 0; i < nip; i++)
{
   // Evaluate flux vector at IP
   auto fip = int_rule.IntPoint(i);
   IntegrationPoint ip;
   FT->Loc2.Transform(fip, ip);

   Vector val(flux_space->GetVDim());
   flux.GetVectorValue(FT->Elem2No, ip, val);

   // And build scalar product with normal
   Vector normal(pmesh->SpaceDimension());
   FT->Face->SetIntPoint(&fip);
   if (pmesh->Dimension() == pmesh->SpaceDimension())
   {
      CalcOrtho(FT->Face->Jacobian(), normal);
   }
   else
   {
      Vector ref_normal(pmesh->Dimension());
      FT->Loc2.Transf.SetIntPoint(&fip);
      CalcOrtho(FT->Loc2.Transf.Jacobian(), ref_normal);
      auto &e2 = FT->GetElement2Transformation();
      e2.AdjugateJacobian().MultTranspose(ref_normal, normal); // Call to AdjugateJacobian crashes
      normal /= e2.Weight();
   }

   jumps(i) -= val * normal * fip.weight * FT->Face->Weight();
}

which works if I replace the "else" part by
      Vector ref_normal(pmesh->Dimension());
      FT->Loc1.Transf.SetIntPoint(&fip);
      CalcOrtho(FT->Loc1.Transf.Jacobian(), ref_normal);
      auto &e1 = FT->GetElement1Transformation();
      e1.AdjugateJacobian().MultTranspose(ref_normal, normal);
      normal /= e1.Weight();

so at least for this PR it is not an issue, as the normals at integrations points just differ by sign.
Regarding the order of integration, it is used to integrate the flux of a scalar H1 field of order p over a half face. I tested this one further and unfortunately it does not always yield a symmetric refinement. I need to write more tests to track this down, because this should be a bug, since the estimator should give a symmetric value in case of symmetric solutions.

@jakubcerveny Regarding the symmetry, it turned out that the flux field was messed up (wrong local ordering). Symmetry should be fixed now.

Testing runtimes I get in an optimized release build 13s for Kelly and 2m26 for L2ZZ (total times).

The issue with using the "side 2" methods is that the IntegrationPoint for e2 is uninitialized. That is one reason why, in the code snippet above, I used FT->SetAllIntPoints() instead of FT->Face->SetIntPoint(). The former will also set the IntegrationPoints for both e1 = FT->GetElement1Transformation() and e2 = FT->GetElement2Transformation() in addition to the face IntegrationPoint.

Thank you again @v-dobrev ! That makes sense.
I went back through the thread and think there are just two more issues open.
First, there is the question of how to properly handle the total error in ex15p, for which I would like to move the GetTotalError either up in the hierarchy or I would slightly rewrite ex15p to simply sum-reduce over the local errors. Since the former is a breaking change I should not decide this by myself. After deciding how to resolve this I will update documentation for ex15p.
Second, regarding the solution quality @psocratis . May I ask you to check again with different element error parameters whether this is fixed?

Second, regarding the solution quality @psocratis . May I ask you to check again with different element error parameters whether this is fixed?

Sure thing ... I'll report back a bit later

Hi again everyone,
With the latest commit I addressed almost all remaining issues up to now. I think fixing the Escher example is out of scope. It runs with
mpirun -n 1 examples/ex15p -o 2 -r 2 -est 1 -m ../../Repos/mfem/data/escher.mesh -e 1e-6

but crashes with
mpirun -n 2 examples/ex15p -o 2 -r 2 -est 1 -m ../../Repos/mfem/data/escher.mesh -e 1e-6

yielding
Assertion failed: (data && i >= 0 && i < height && j >= 0 && j < width) is false:
 -->
 ... in function: double &mfem::DenseMatrix::operator()(int, int)
 ... in file: /home/termi/Repos/mfem-feature/linalg/densemat.hpp:892

when calling ExchangeFaceNbrData (RT on NC tet mesh, to quickly summarize).
I also want to note that 7428c20 introduces the ZZ error estimator into ex15p for testing purposes. If this is not wanted in the master, then I can remove it again.
Some further points are not addresses in my implementation, but should be noted for future reference.

Errors at the boundaries are ignored. I left this one open for now, because it is usually not an issue.
The Kelly error indicator can be generalized to vector-valued H1 problems (e.g. linear elasticity), but this requires to decompose the fluxes for each dimension. I could not figure out how to do this, but this one may be a nice follow up.
On paper the Kelly error indicator can be used for anisotropic refinements on Hex and Quad elements by taking the errors on opposite faces. However I have no experience how good this one works out in practice and what possible issues are.
The default setup comes with a very very general and cheap to compute coefficient, to be a starting point for many problems. However the coefficient should be tuned to specific setups for maximum gain, especially when used in combination with high order geometry.
Porting the estimator to serial code can be done pretty easily with some modifications. This may be a good first task for new students which want to familiarize with MFEM and error estimators.

Other than that, I think this one is ready.

Merged in next for testing...

Re-merged in next.

Re-merged in next for testing.

Hi @termi-official, I pushed a commit (7d1bf5a) to fix an issue we were having with the unit tests when building with the Intel compiler -- take a look if you want and let me know if you have any remarks.
Also, I think it will be good to add a CHANGELOG entry for this PR. Can you please add a bullet or two? Thanks!

Hi @v-dobrev, thats a good point. I added a short description of the relevant changes and also fixed the emerging merge conflict.

Re-merged in next.


test: autoapi theme options

WIP: test autoapi theme options

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.72%. Comparing base (9757402) to head (abeedd0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1135   +/-   ##
=======================================
  Coverage   90.72%   90.72%
=======================================
  Files          93       93
  Lines        6933     6933
=======================================
  Hits         6290     6290
  Misses        643      643

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Any progress here @Revathyvenugopal162 ?

Any progress here @Revathyvenugopal162 ?

i am working on this, it will likely be finish by end of this week.


10 broken links resulting from favicons

Hey Jay,
I got this from Siteimprove:

I think that Brian mentioned either this same or a similar issue on the grad site - and I don't know if you fixed things there yet, but anyway, just let me know if you need any more info on this.
Thanks,
Carrie

@teddybradford took care of this - no longer showing up in Siteimprove results. Closing this issue now.

@teddybradford - I think this issue has reared its head again. I just initiated a recrawl on Siteimprove, just to be sure, but when I went into Siteimprove today this same thing with the favicons seemed to be happening:

I just put a change in that should fix this: 2f65a18ac4bf5d710a3a9842087dc5579440c48b

Thanks so much for this, @teddybradford - it did indeed fix these Siteimprove results. So, I'm going to close this out.


auth: add root user and root role

automatically create root user with root role when enabling auth if root user does not exist.

lgtm. /cc @mitake

@xiang90 how about simply return an error to the enabling request in a case of no root account like v2 auth? Creating with root account with fixed password seems to be a little bit dangerous, I think.

@mitake We can do that too. I will change.

@xiang90 lgtm, thanks. Let's update about root account creation later.

@mitake I actually already changed the workflow. PTAL

@xiang90 the change lets some e2e tests fail, but the content looks good to me

@mitake I will fix e2e test.


Rework avatars

backend mostly done, only misses migrations + optimization: https://github.com/HangarMC/HangarAuth/commit/c53705c51fb5afbabcef131771d62fd1d43c7453

frontend for auth too: https://github.com/HangarMC/HangarAuth/commit/95ebde7cc3cd0ed15b90c8c4306664361a9fbe4e

hangar has the backend architecture + changing stuff is supported, but its missing displaying the new urls in many places https://github.com/HangarMC/Hangar/commit/8770111bdca98d7c9096ba8aa02c1c887b125dbd
(find references to avtarUrl() and stuff)
also need to figure out how we want to default project avatars to the user avatar, guess auth backend needs to do that?

needs testing of object storage + implementing migrations

migrations in prod will be done manually

prod is done, still missing optimizations tho


Error: The getter 'addressOf' isn't defined for the class '...'

When I try to build android apk on the latest flutter stable channel I get this error:

Full error message
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
                        ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1067:7: Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.
 - 'LOGFONT' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(28).cast<Utf16>();
      ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1112:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  LOGFONT get elfLogFont => addressOf.cast<LOGFONT>().ref;
                            ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1114:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfFullName => addressOf
                            ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1120:26: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfStyle => addressOf
                         ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1126:27: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
 - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get elfScript => addressOf
                          ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2688:7: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
 - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(20).cast<Utf16>().unpackString(128);
      ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2699:11: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
 - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        ..addressOf.cast<Uint8>().elementAt(20).value = 0;
          ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2744:24: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_DEVICE_INFO'.
 - 'BLUETOOTH_DEVICE_INFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String get szName => addressOf
                       ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2837:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value;
      ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2840:5: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value =
    ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2845:28: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String.fromCharCodes(addressOf.cast<Uint8>().asTypedList(pinLength));
                           ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2853:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
 - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      addressOf.cast<Uint8>().elementAt(idx).value = pinData[idx];
      ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:38:31: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final iid = GUID.allocate().addressOf;
                              ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:56:33: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final clsid = GUID.allocate().addressOf;
                                ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/winrt/winrt_helpers.dart:86:40: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  final riidCalendar = GUID.allocate().addressOf;
                                       ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:197:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:200:49: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_DesktopWallpaper).addressOf,
                                                ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:203:48: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IDesktopWallpaper).addressOf,
                                               ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:58:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:61:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_FileOpenDialog).addressOf,
                                              ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:64:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileOpenDialog).addressOf,
                                             ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:99:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:102:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_FileSaveDialog).addressOf,
                                              ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:105:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IFileSaveDialog).addressOf,
                                             ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:164:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:167:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_KnownFolderManager).addressOf,
                                                  ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:170:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_IKnownFolderManager).addressOf,
                                                 ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:128:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:131:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(CLSID_NetworkListManager).addressOf,
                                                  ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:134:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        GUID.fromString(IID_INetworkListManager).addressOf,
                                                 ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:82:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
 - 'COMObject' is from 'package:win32/src/com/combase.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final ptr = COMObject.allocate().addressOf;
                                     ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:84:68: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
    final hr = CoCreateInstance(GUID.fromString(CLSID_WbemLocator).addressOf,
                                                                   ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:85:64: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
 - 'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        nullptr, CLSCTX_ALL, GUID.fromString(IID_IWbemLocator).addressOf, ptr);
                                                               ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
 - 'Utf8' is from 'package:ffi/src/utf8.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String toString() => fromUtf8(addressOf);
                                ^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs are undefined behavior.
class ENUMLOGFONTEX extends Struct {
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs are undefined behavior.
class BLUETOOTH_PIN_INFO extends Struct {
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs are undefined behavior.
class EXCEPINFO extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs are undefined behavior.
class PROPERTYKEY extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs are undefined behavior.
class PROPVARIANT extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs are undefined behavior.
class SAFEARRAY extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs are undefined behavior.
class CLSID extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs are undefined behavior.
class STATSTG extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs are undefined behavior.
class NLM_SIMULATED_PROFILE_INFO extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs are undefined behavior.
class Utf8 extends Struct {
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs are undefined behavior.
class Utf16 extends Struct {
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:6:7: Error: Struct 'char' is empty. Empty structs are undefined behavior.
class char extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:8:7: Error: Struct 'sqlite3' is empty. Empty structs are undefined behavior.
class sqlite3 extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:10:7: Error: Struct 'sqlite3_stmt' is empty. Empty structs are undefined behavior.
class sqlite3_stmt extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:12:7: Error: Struct 'sqlite3_value' is empty. Empty structs are undefined behavior.
class sqlite3_value extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:14:7: Error: Struct 'sqlite3_context' is empty. Empty structs are undefined behavior.
class sqlite3_context extends Struct {}
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
  final int totalSize = count * sizeOf<T>();
                                ^

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

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

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

BUILD FAILED in 43s
Exception: Gradle task assembleDebug failed with exit code 1

pubspec.yaml
name: donak
description: Donak

publish_to: 'none'

version: 0.1.3+15

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  another_flushbar: ^1.10.22
  built_value: ^7.1.0
  collection: ^1.14.13
  device_info: ^2.0.2
  dio: ^3.0.10
  equatable: ^2.0.2
  flutter:
    sdk: flutter
  flutter_bloc: ^7.0.0
  flutter_localizations:
    sdk: flutter
  flutter_secure_storage: ^4.2.0
  flutter_svg: ^0.19.1
  fluttertoast: ^8.0.7
  get_it: ^5.0.6
  intl: any
  moor: ^3.4.0
  moor_ffi: ^0.8.0
  package_info: ^2.0.2
  path_provider: any
  permission_handler: ^5.1.0+2
  persian_date: ^0.1.5
  persian_number_utility: ^0.3.2
  provider: ^5.0.0
  pub_semver: ^1.4.4
  quick_actions: ^0.4.0+10
  share: ^0.6.5+4
  shared_preferences: ^0.5.12+4
  smooth_page_indicator: ^0.2.3
  sms_receiver: ^0.3.1+1
  universal_html: ^1.2.4
  universal_platform: ^0.1.3
  url_launcher: any
  url_strategy: ^0.1.1
  webview_flutter: ^2.0.8
  ext_storage: any
  open_file: any
  pushe_flutter: ^2.5.0
  sliding_sheet: any

dev_dependencies:
  build_runner: any
  build_resolvers: any
  built_value_generator: any
  flutter_launcher_icons: any
  flutter_test:
    sdk: flutter
  import_sorter: any
  mockito: any
  moor_generator: any

flutter_icons:
  android: true
  ios: true
  image_path: "dev_assets/donak.png"
  adaptive_icon_foreground: "dev_assets/donak_adaptive.png"
  adaptive_icon_background: "#ffffff"

import_sorter:
  comments: false

flutter:
  assets:
    - assets/fonts/
    - assets/images/
    - assets/lang/
    - assets/operators/
    - assets/svg/
  fonts:
    - family: IRANSansFaNum
      fonts:
        - asset: assets/fonts/IRANSansMobileFaNum.ttf
          weight: 400
        - asset: assets/fonts/IRANSansMobileFaNum-Bold.ttf
          weight: 700
        - asset: assets/fonts/IRANSansMobileFaNum-Light.ttf
          weight: 300
        - asset: assets/fonts/IRANSansMobileFaNum-Medium.ttf
          weight: 500
        - asset: assets/fonts/IRANSansMobileFaNum-UltraLight.ttf
          weight: 200
  uses-material-design: true

flutter doctor -v
[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
    • Flutter version 2.2.1 at C:\src\flutter
    • Framework revision 02c026b03c (3 days ago), 2021-05-27 12:24:44 -0700
    • Engine revision 0fdb562ac8
    • Dart version 2.13.1

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Mahdi\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.56.0)
    • VS Code at C:\Users\Mahdi\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 8.1.0 (API 27) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 90.0.818.51

• No issues found!

You need path_provider_windows 0.0.5 or later; 0.0.4 is not compatible with current versions of Flutter.

You need path_provider_windows 0.0.5 or later; 0.0.4 is not compatible with current versions of Flutter.

@stuartmorgan
well, I added path_provider_windows: any to pubspec.yaml and It failed resolving packages:
Because no versions of moor_ffi match >0.8.0 <0.9.0 and moor_ffi 0.8.0 depends on ffi ^0.1.3, moor_ffi ^0.8.0 requires ffi ^0.1.3.
And because path_provider >=2.0.0 depends on path_provider_windows ^2.0.0 which depends on ffi ^1.0.0, moor_ffi ^0.8.0 is incompatible with path_provider >=2.0.0.
So, because donak depends on both moor_ffi ^0.8.0 and path_provider ^2.0.2, version solving failed.
pub get failed (1; So, because donak depends on both moor_ffi ^0.8.0 and path_provider ^2.0.2, version solving failed.)

moor_ffi 0.8.0 depends on ffi ^0.1.3

Any package you have that uses ffi need to updated. Old versions of ffi do not work with Flutter 2.2 (which is why path_provider_windows 0.0.4 didn't work).


add environment variables

Hi, great repo!
Is it possible to add environment variables to nginx config?
For host name etc?
Thanks in advance!

Hi Mathias,
Thank you.
It's a Good idea, but I haven't time to do it right now :(
If someone wants to make a PR...

All right, I figured it out - mind if I make a PR?

Good idea!

By the way, here is the documentation.
The combo docker-compose.env / docker-compose.env.dist file seems to be a good idea (also need to ignore the .env file)
Feel free to assign yourself :)


Passing enclosing dataviews context object to Bootstrap input text box

How to pass enclosing dataviews context object to this input text box.
I have a microflow which accepts a input parameter and i want to call that microflow by configuring it in the "onChangeEvent" of this "bootstrapInputAddon". This input parameter which i want to pass is of the "dataview" where i have embedded the "MendixBootstrapInputAddon".
can you please help in,  configuring this input box to pass the parameter

What you are describing is possible with this widget. I think it's best you put your question on the Mendix forum.

Thanks, will communicate same in Mendix forum.
Regards,
Harish
On 05-Feb-2018 3:15 pm, "Martijn Raats"<EMAIL_ADDRESS>wrote:

What you are describing is possible with this widget. I think it's best
you put your question on the Mendix forum.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/JAM-IT-NL/MendixBootstrapInputAddons/issues/4#issuecomment-363031863,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGmE4Z3mRIWK92BJCXR25sY8L48RvpT6ks5tRs2ogaJpZM4R5JWV
.

In our case or normal mendix input text box accepts "multi level data view" (one data view inside another). But in this bootstrap input text box it accepts "data view at only one level", if we have 2 levels it throws an error as stated earlier.
To resolve this problem, we created a new microflow which merged 2 dataview into a single one.
It would be helpful if you create a multi level data view structure instead of current one, so that it is helpful for others which will avoid creation of new microflow.

Unfortunately what you ask is not possible incustom widget developing. I asked this before in this thread: https://forum.mendixcloud.com/link/questions/88544


[metrics] Introduce metrics to measure CPU cost of Realtime consumption

I am interested in introducing metrics that will convey an idea of realtime consumption cost and throughput:
Some of the metrics I have originally thought of are the following:

Time to consume an event batch and events per batch consumed and avg event size or batch size.
Time to consume an individual event and avg size of events.
Event Consumption throughput (bytes/sec)

My ultimate goal is to be able to estimate the CPU resources to consume a given topic.

I think it would be useful if we could measure thread CPU time and memory required for consumption on a per segment/partition basis (similar to what we do for query execution statistics on the broker in ExecutionStatsAggregator by leveraging ThreadResourceUsageProvider). It might also be beneficial to further break up these metrics by "phase". For example, it may be useful to publish fine-grained CPU time/memory metrics for the various phases of ingestion:

when the consumer fetches a batch of messages (call to partitionGroupConsumer.fetchMessages),
the messages are decoded (call to streamDataDecoder.decode),
the rows are processed by the transform pipeline (call to transformPipeline.processRow) and
the rows are indexed (call to realtimeSegment.index).

In addition, it would also be useful to have an end-to-end metric that combines all of the above.


AGDROID-686 - Add Token Verification [Do No Merge]

Description
[Do Not Merge]
Function to Verify JWT Tokens (Access, Identity, Refresh) using a Keycloak Realm Public Key before they are used as part of client side access control decisions.
Tested successfully with both valid & tampered Access/Identity tokens. Identity Brokering originated tokens can also be validated.
To Do

[ ] Get the Public Key from the Mobile Core Config (when available)
[ ] Get the Audience from the Mobile Core Config (when available)
[ ]  Construct the Issuer using properties in the Mobile Core Config (when available)
[x]  Add Unit tests - Test Wrong issues, audiences, tampered signature, payload, algorithm info sections etc

@TommyJ1994 is this PR replaced by #21

@wei-lee Yes, I had to jump off this last week. Closing now.


Store full build state in configuration cache if it has build services

In 8.0 only included builds that contribute tasks to the work graph are stored in full, others have most of the state discarded, including registered build services. This caused problems if such a service is used as a build operation listeners, as Gradle restores all listeners when running from cache (except for listeners added in the buildSrc build).
This commit restores the behavior we had in 7.6 by saving builds with registered listeners in full.
It is also possible to discard the build listeners of work-free builds, like we do for buildSrc, but this would be a breaking change. Instead, we may want to reconsider our decision to discard buildSrc listeners.
Fixes #23700

@bot-gradle test this

I've triggered the following builds for you:

PullRequestFeedback build

FTR: Listeners from buildSrc are currently discarded (see https://github.com/gradle/gradle/pull/20114).

@bot-gradle AST

@bot-gradle test AST

I've triggered the following builds for you:

AllSmokeTestsPullRequestFeedback build

We've decided to go in the opposite direction in #23846


feature request:  Support STDIN / STDOUT workflow.

I would like to create a Linux/wayland workflow where I take a screenshot, annotate, optimize it, copy it and paste it into my blog... all without any temp file being left on my local hard disk.
The rest of the pipeline has been solved:

grimshot takes the screenshot an pipes to STDOUT
swappy receives on STDIN, annotates and can pipe to STDOUT
❓ squoosh receives on STDIN, processes, prints to STDOUT ❓
wl-copy receives on STDIN
✨ Paste into blog. ✨

Describe the solution you'd like

If input filename passed is -, read file from STDIN
a. This may require using a default output file name if --stdout is not used, as none is provided.
If --stdout is passed and  there is more than one input file, throw an error.
If --stdout is provided and there is one input file, print resulting file to STDOUT instead of a file.

Does other service/app have this feature?
It's possible to use ImageMagick/GraphicsMagic to do file type conversions and then other format-specific tools to do optimizations, but Squoosh seems to the best and can usefully convert formats and optimize in one step.

I think this is a great idea and can see it bringing a lot of value to my own projects as well.
Currently, I'm at my time budget limit because I have contract work that needs to be completed by the end of December, so I won't be able to look at this myself for a while. If someone else wants to give it a shot, I'd be happy to review and test it. Otherwise, I'll get to it when I need a break from my other work.


Should not use latest Auth0 Nuget package

The .ashx file in the Auth0-ASPNET NuGet package is using the old Auth0 API (the Auth0 NuGet package). What happens is that users update to the V2 of that NuGet package which breaks the code in the .ashx file.
We should either:

Set the dependency on that NuGet package to < 2.0
Update the .ashx file to use the new V2 API methods. Be careful with this though as some users use this package for .NET 4.0, and it should probably only be using the V2 package for .NET 4.5 and upwards because it is async.

Hiding the original Auth0 package seems to have resolved this, as users are no longer offered to upgrade to 2.0


[NameLookup, ASTScope] Eagerly expand function bodies before type-checking them

TypeChecking calls ApplySolutions which does lookups into closures which have been temporarily removed from the AST. So eagerly expand function body scopes before doing that type-checking.
Address rdar://56808275.
Thanks to @slavapestov , for suggesting the remedy.

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 37841a471a5e7dbe61dd6fe181212032a6c67c26

Build failed
Swift Test Linux Platform
Git Sha - 37841a471a5e7dbe61dd6fe181212032a6c67c26

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - 37841a471a5e7dbe61dd6fe181212032a6c67c26

Build failed
Swift Test OS X Platform
Git Sha - 37841a471a5e7dbe61dd6fe181212032a6c67c26

@swift-ci please smoke test

@swift-ci please smoke test


Improve runtime performance - lazy stringification, more inlining, no statics on the hot path, move semantics for classes such as doctest::String which are used by value, etc.

The following code:
TEST_CASE("") {
    for(int i = 0; i < 10000000; ++i)
        CHECK(i == i);
}

used to run for 9.0 seconds built with MinGW-w64 g++ 7.1 in Release.
Now it runs for 0.27 seconds.
There were 3 changes that I introduced:

a new implementation of the String class - now with a small buffer optimization - sizeof(String) is 24 and it can hold strings of length up to 23 characters (24 with the null terminator) in itself! The trick used for this maximum length on the stack is explained in this cppcon talk about how fbstring (from facebook/folly) is implemented.
This got down the runtime to 4.1 seconds for that piece of code
made the asserts to stringify the expressions lazily - only if they fail.
This got down the runtime to 0.275 seconds for that code.
reworked the access to the current context state to access a global instead of a local static - tiny improvement - perhaps 2-3%

So this all amounts to a x33 faster runtime execution of asserts!
All asserts benefit from these optimizations including the binary ones and the fast ones (they are the fastest not only for compile times but also for runtime).


add support for backtest end date

This change adds backend support for specifying a custom end date when running backtests, while not breaking the notebooks that have yet to implement this feature.

we should add this to the notebook too.


Authentication schemes for HTTP/Websockets

This adds to RFC 1001 at #4
Overview
Features supported by HTTP:

Authorization header
Cookie
Basic and digest auth by browser (unusable)

Features suported by browser-based WebSockets:

Cookie
Authentication protocol packets
Basic and digest auth by browser (unusable)

Authentication schemes:

OAuth2 -- the most popular one
OAuth1 -- deprecated by OAuth2
SAML -- we probably want in commercial version
LDAP -- doesn't map to the web by itself. Often used to validate username/password (not something we want to do) or to assign permissions by group (currently we're going to implement ACL in edgedb itself)
Kerberos -- usually relies on system libraries providing authentication and not widely used outside of large enterprises and academia

Related protocols:

SCIM -- identity management. Basically a way to create and manage accounts with unified (REST) API. Could potentially replace our CREATE ROLE/ALTER ROLE statements, but out of scope of this research.
WS-Federation -- does look like ecosystem of its own, with lots of standards including authorization

Commercial providers:

Auth0 -- basically provide JWT+OpenID-Connect (OIDC) identity after authentication
Authentiq -- is also a similar OIDC provider
Atlassian Crowd -- looks like uses cookie for the actual authorization
Okta SSO -- supports OIDC, SAML, and whatever they call "Secure Web Authentication"

Related tools:
`. JAAS, Pac4J, Apache Shiro -- java scpecific, not researched closely (but look like just Java interfaces for all other protocols)
Requirements

Same or similar authentication for both HTTP and WebSockets
Scheme should work both in browser and using custom clients
Don't accept login/password or anything directly derived from it, so client doesn't need to keep password in memory for reconnects. And also to avoid handling 2FA. Use external application to verify passwords and multi-factor authentication and only authorize connection in edgedb.

Proposal
Generally authentication should work by providing a Bearer token which is either:

An opaque token, in this case such token should be inserted into the edgedb database by the application beforehand
A Self-Encoded access token, that implements OpenID Connect (OIDC) specification

The downside of (2) is that it's harder to revoke already created token, while the downside of (1) is that edgedb needs to keep track of all the tokens that are active now. Upside of (1) is that it's possible to integrate with more systems (in particular ones doesn't support OIDC, or that support OIDC in the way that is incompatible to edgedb).
The token can be transmitted in the one of three ways (all can be used interchangeably):

Authorization: Bearer <token> -- works for HTTP as well as non-browser websockets
Cookie: <cookie_name>=<token> -- works everywhere, but can be problematic to set a cookie for a domain that is devoted solely to edgedb (we may add a mechanism for that later)
As a param in ClientHandshake, this works on WebSockets only and is needed for browser-based websockets where using Cookie is not apropriate.

We could use AuthenticationSASL with appropriate mechanism to provide token, but we don't need extra security here (i.e. passing token in the ClientHandshake is at least as good as passing it in the Authorization header, which is an accepted security practice). Keeping less round-trips for authentication is useful.

RFC6750 allows passing access_token as form-encoded body parameter and as URI query parameter. We don't allow that now, but we may consider adding them in future if compelling use cases arise.
Configuration:

Configure cookie_name in the "port" configuration
Any things needed to configure to make ACLs work (to be determined when ACLs implemented)

It's unclear whether we want to allow configuring JWT parameters in particular encryption schema. Also I expect secret keys to be generated and replicated within the edgedb itself, but we can have a mechanism to provide users' keys.
Structure of the Self-Encoded Token
TO DO: research OpenID Connect
Future Extensions
In the future, we should consider at least following ways of authentication:

SAML
TLS Client ceritificates
Kerberos

All of them might only be supported in commercial version.
Update: Note on RFC6750 of access_token usage

I'm going to postpone self-encoded token support. The reasons are below. But first let's take a look how opaque tokens work.
Opaque Tokens
To authorize token, you insert it into a database with appropriate properties. Something along the lines of:
WITH MODULE auth
  MyToken := INSERT Token {
    token_id := make_token_id(),
    expires := datetime_current() + to_duration(hours := 24),
    database := 'my_database',
    role := 'my_role',
    # any other needed settings
  }
SELECT MyToken { token_id }

Then, you can use the token_id as Bearer token or any equivalent method described above.
Self-Encoded Tokens
The main issue with self-encoding tokens is that currently they are structures like this:

JWT provides a layer to encrypt, sign and verify arbitrary key-value pairs (named Claims)
OpenID Connect provides a set of claims that allow to discover user identity and some other authentication parameters
Additionally OpenID Connect has a way to discover various links to other metadata of user profile. Relying party (edgedb in our case) is then expected to fetch various chunks of additional metadata from external resources.

So generally even at the layer (3) there is not much data relevant for edgedb is fetched. And (2) only provides user name (which is generally an external user name, not edgedb's one when using OAuth).
Postponing Self-Encoded Tokens
So the reasons to only support opaque tokens for now is:

There are too much options on how to do self-encoded tokens, and most current standards are mostly irrelevant
Because of (1) we can't guarantee interoperability with existing systems on the level of using their JWT tokens intact
Auth based on self-encoded tokens have to have much more compatibility guarantees than one based on opaque tokens.
Token checks are not in the hot path for WebSockets. While they are in HTTP implementation various caching approaches can be implemented to alleviate the performance issue.

So the current proposal is to implement opaque tokens only, and postpone self-encoding tokens to the time when both will be true:

ACLs are implemented
We have more experience with how token-based authentication is general

Great summary, thanks @tailhook!
The issue with a non-self-encoded token, as you pointed out, is that we will have to store token metadata somewhere.  Storing it in a database begs a question: which database?  We currently avoid having a "special" database to store global metadata and instead rely on metadata in Postgres shared catalogs (pg_database and pg_roles).  This arrangement makes maintaining large quantities of user-associated metadata, such as a list of valid tokens, quite cumbersome, especially where expiring tokens are considered.
I think we should take a closer look at using JWT as the token protocol from the get-go using EdgeDB-specific claims (probably just the name of the database role for now).  This would make it easier to add support for OIDC later as well.

Okay, if we don't care about compatibility with anything, we can use JWT for encoding our own things, but...
To revoke a token we have to store some token metadata. This is generally a lot less actual storage, but structurally it's the same. I don't believe we can get to production without any way of revoking tokens.

We currently avoid having a "special" database to store global metadata and instead rely on metadata in Postgres

Do you think this will continue to be true when we have ACLs?

To revoke a token we have to store some token metadata.

You only need to keep a set of revoked token ids. Revocation is also a relatively rare event, so the set will not be large, which makes shared catalog storage feasible.

Do you think this will continue to be true when we have ACLs?

Yes. The authorization scopes will be encoded as claims in JWT.

Yes. The authorization scopes will be encoded as claims in JWT.

I'm not asking about scopes. I'm about the actual access control lists, rules, whatever. I expect quite a bit of metadata about relations between users and data. I expect them to be stored somewhere.

Oh. The actual access rules will be defined in the schema with DDL/SDL: https://edgedb.com/roadmap/#access_control.  The scopes in the token will effectively populate globals in a session, which, in turn, will trigger relevant access rules.

Well, so ACLs will depend on the  database. We can do the same with tokens, since the current spec declares a database in the URL wss://host.name/ws/database_name, we can look for the tokens in the database itself, rather than using a "special" database.

To Do: take a look at PASETO: https://developer.okta.com/blog/2019/10/17/a-thorough-introduction-to-paseto / https://devops.com/okta-offers-paseto-as-alternative-to-json-tokens/

To Do: take a look at PASETO:

That's a good one, thanks for sharing


Added Allegany College of Maryland

Trying this again, without the student part of the domain.
If you decline this one aswell, can you please give me further instructions. I am following the instructions to the best of my ability.
My actual email is<EMAIL_ADDRESS>and jetbrains gave me the file and it was declined saying that domain doesn't exist. I am now trying to add just @allegany.edu
Please let me know if this is still incorrect and how I can fix this.

Here is the link to my last pull request that was rejected for reference. If this one is also incorrect then something is wrong and I need more help.
https://github.com/JetBrains/swot/pull/25643

@MagicManMe Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.

Awesome thank you so much!


check if tint & fillColor are changed

if tint & fillColor are not changed, won't recompute sprite.tint

@finscn could you provide an example?

An example for what ? for performance comparing ?

Sorry, I should have been more specific.
In the absence of any unit-testing, we need to see an example of this functionality to ensure that nothing broke.


Sets the token to a full day.  Used in conjunction with UI timout update

In progress - support for UI session management changes.

@DanielJMaher This is good to go!


Support the ability for users to run fides without a .fides dir or file-based config

Is your feature request related to a specific problem?
Currently fides will always try to write out a config file if it can't find one. This doesn't really make sense in the context of deploying an application via a container.
Describe the solution you'd like
A lot of UX thought will need to be put in here, but generally the CLI should be able to run by itself unless maybe a command gets called that requires further configuration?
Additional context
Suggesting that users run the init command if no config file is found also seems helpful, and figuring out a way for user analytics prompt to maybe not run unless they run init?
We shouldn't need to run the create_config function every single time, as it also outputs logging that is noisy on every command

@NevilleS now that I'm revisiting this...does it actually hurt anything to write out the configuration file? We've fixed the configuration issues now, so I don't think this is a problem?

It's still surprising behavior to have that happen and I'd prefer it not to. In some extreme cases it can get pretty messy- imagine for example you pipx install the CLI so it's generally available, and then start running seemingly innocent fides status, fides generate commands in a variety of subdirectories in your project... you might end up creating a dozen different TOMLs littered around without realizing, etc. Another example is running the CLI on a container that has a strict read-only volume. I'm pretty sure that could be a common problem we run into where an unnecessary write to disk might trigger warnings or errors.
If we truly fix the config setup such that we have sane defaults for all values and only enforce required values for certain commands that need them (eg fides webserver requires several), what in the codebase would still require it to exist?

All good points, and to address your last question, there is no reason for it to exist!
Let's relegate it to fides init and call it a day? That seems like the only place that it really really makes sense to create a dir and write out a file. I see now after your explanation how that could be quite surprising behaviour and not optimal from a UX perspective 🙂 thanks for walking me through the thought process!

Yes- fides init is the place that makes sense for it. Thanks


Installed web3.py but still get: 'ModuleNotFoundError: No module named 'web3''

Using pip install web3 I installed web3 with no issues. But when I try to import it into deploy.py with from web3 import Web3 I get:
Traceback (most recent call last):   File "c:\Users\tronl\demos\web3_py_simple_storage\deploy.py", line 8, in <module>     from web3 import Web3 ModuleNotFoundError: No module named 'web3'
I've successfully downloaded this before but after resetting my device and trying to setup the environment again I'm lost on what to do I know web3.py is installed so I don't get why vs code can't find the module I've tried everything I've seen online. I have the latest python version (3.10.4), use vscode, installed the vs build tools and have the latest windows. If anyone knows a solution I would highly appreciate it.

found this issue


proposal: support multiple providers on a single site

The current codebase likely supports this. A working example would provide validation.

The code looks like it supports multiple providers right now, what specifically were you thinking about when referring to this?

This has been validated via the previous GitHub and Discord client setup.


Unit and integration test coverage for CCP (routing table propagation)

Go through code in routing-api/impl and make sure test coverage is sufficient.

For more context around routing, see this post here: https://forum.interledger.org/t/proposals-for-secure-interledger-routing/612


wm => AP, updating reply should deliver to in-reply-to, not followers

I updated a reply just now and surprisingly BF delivered to my followers, not to the in-reply-to actor's inbox. Should fix that.
https://fed.brid.gy/log?start_time=1684862040&key=https://snarfed.org/2023-05-23_dave-winer-☕-tchambers-johnspurlock-acti-mastodon-2

Fixed a while ago!


HTML in the text field?

Thanks very much for this component!
I would like to add font-icons for different levels, but the HTML tags show as values.  Is there a way around this?  The code is currently doing something like this:
new TreeviewItem({text: '<i class="fa fa-cog"></i> ' + subTree.text, value: subTree.value, collapsed: true, children: children});
Is there a templating mechanism for each item, by any chance?
Thanks again,
-dqj

Reading through the code, maybe wrapping line 61 in treeview.component.ts in a div and using an [innerHTML] attribute there would be the solution?

@queejie  This is exactly the feature I've being hoping and searching for, to be able to prepend/append html, images and text to each (item) node in the tree. I was able to extend zTree  for JavaScript. For example:
   - Miramar Associates LLC (#185-784-957)
     - Quality Assurance Docket (#45768509) (#457685)
     - Special Education Calendar (#90815201) (#908152)

Parents and children will have different/custom images. The #s above are unique to each item/node.
ztree is pure JavaScript, not written for Angular.

@vanchisel In the absence of help here I've switched over to using angular2-tree.  That module has extensive templating that allows for complex node displays.

@queejie Thank you for the heads up. I couldn't get ngx-treeview to work either (something about cannot resolve due to source-map-loader) so I switched over to using zTree with jQuery. Yeah, I know, in Angular. It's working beautifully. I will check out Angular2-tree later. Thanks.

@queejie I really implemented item template. You can check demo here: https://leovo2708.github.io/ngx-treeview/

@vanchisel I added more functions in this component but maybe my demo didn't show up these. I will try to update my demo in next time.

Thanks, it works.
ps note: When source code is opened in that top of demo page, wrong code is shown (https://github.com/leovo2708/ngx-treeview/tree/master/src/demo/city).
But https://github.com/leovo2708/ngx-treeview/tree/master/src/demo/product codes should be shown

@botumsu Yes, this is my mistake. Thank for your notice. I will update demo right now.


Update from original - main

Merging latest changes from the original repository.

@CodiumAI-Agent /review


Drop select-dom in favor of extending the prototype

It's not April 1st yet, but I wondered what the code would look like if:

we used $()/$$() (like the console API) instead of select()/select.all()
we used parent.$(str) instead of select(str, parent)

Advantages

More linear DOM traversing:
- select('.child', parent.closest('body'))
+ parent.closest('body').$('.child')

select.all always converts NodeList to Array, but that's rarely needed thanks to for-of, so it can be skipped

More code can be copied from/to the console when testing selectors

No more imports

Drawbacks

Magic globals (however TypeScript still recognizes them and shows its types)
tab.$('.btn') might appear strange at first

Alternative
Would it be better if the method was .query() instead of .$()? query/queryAll were supposed to be DOM4 extensions but were lost along the way. The reason why we used select-dom was because "document.querySelectorAll()" was too long, but query/queryAll is actually shorter than select/select.all. The globals could still be $/$$

It's not April 1st yet, but I wondered what the code would look like if:

What's April 1st?

tab.$('.btn') might appear strange at first

It does but if that is the only trade off 👍

Another drawback: $ looks like jQuery, so I expect $(selector) to return a jQuery object instead of a DOM element. I'd be fine with select/selectAll though.

Another drawback: $ looks like jQuery

True, but it also looks like the console API. If it’s annoying to others we can just use query/all everywhere

Closing this as it was a proof of concept only. The intent still exists

Closing this as it was a proof of concept only. The intent still exists

Reopening to test the update-pr-from-base-branch issue

Reopening to test the update-pr-from-base-branch issue


⚠ ClamAV has degraded performance

In f4b64fd, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 214 ms

Resolved: ClamAV performance has improved in c4c073b.


How CART algorithms are substantial in speech emotion recognition

This closes #4674

Plagiarism check done

Hello @slynn22. Welcome to EngEd! As a new contributor, I encourage you to add a brief Author Bio (index.md file) and Headshot image (avatar file). Include these files in the authors folder within the GitHub repo via your forked repo similar to the article files so as to be credited for your hard work.

@collins-a , i have revised as requested

@collins-a , i have revised as requested

Hey @slynn22, thank you for adding the files. Please edit the index.md author file as per the format outlined at the end of this page, to reflect the required fields.

@collins-a , i have updated as requested

@collins-a

@collins-a
If any more edits are needed lets consider closing the PR to allow the author the proper time to make any needed changes.
👍

@collins-a
If any more edits are needed lets consider closing the PR to allow the author the proper time to make any needed changes.
👍

@slynn22 upon going through your article again, I've noted a few grammatical errors, showing you failed to carry out the Grammarly check as advised. As such, due to the increasing rounds of revision, we'll be closing this PR to allow you to submit the article once more when it's publish-ready.
Make sure to ping me once you submit the PR to expedite the revision before the final review. Good luck.

@collins-a, this is the new PR of the order which you asked me to revise (#4887)


Add a removeListener method to DeviceEventEmitter for Framework consi…

The Framework is inconsistent in how listeners are removed in certain classes. This issue has been discussed in https://github.com/facebook/react-native/issues/6493.
For example,
DeviceEventEmitter
/* Current */
this.keyboardHideObserver = DeviceEventEmitter.addListener('keyboardWillHide', this.keyboardWillHide);
this.keyboardHideObserver.remove();

/* Expected (maybe in addition to the current API) */
DeviceEventEmitter.addListener('keyboardWillHide', this.keyboardWillHide);
DeviceEventEmitter.removeListener('keyboardWillHide', this.keyboardWillHide);

AppStateIOS
AppStateIOS.addEventListener('change', this.handleAppStateChange);
AppStateIOS.removeEventListener('change', this.handleAppStateChange);

The API should be consistent, and preferably should allow both ways of removing the listeners.
Currently, developers who tried to use the second way of removing the listeners get an error for function not found. Due to the lack of documentation on DeviceEventEmitter, they are likely to use the next available option DeviceEventEmitter.removeAllListeners(eventType), which causes bugs by removing all the listeners for that type. We need a method to remove a certain listener for a given event type.

cc @ide

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed.

@rahuljiresal updated the pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. I am pinging you based on the blame information for the files affected by this pull request.

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request I identified fkgozali as a potential reviewer. Would you mind taking a look or mentioning someone with more context?

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request I identified @fkgozali as a potential reviewer. Would you mind taking a look or mentioning someone with more context?

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request I identified @fkgozali as a potential reviewer.

hey @rahuljiresal, sorry for the delayed response. I actually don't have much context on this file specifically. The code change seems fine at glance, but from #6493 - looks like we'd like to move towards subscribe() + remove() pattern eventually? So perhaps this commit is just a stop-gap?
cc @mkonicek to find reviewer who have more knowledge than me

@fkgozali Yes, till we have a consistent pattern, I think we should support both. Primarily so a user of the API doesn't use it incorrectly because of this inconsistency.

@rahuljiresal updated the pull request.

@rahuljiresal yeah that makes sense.
@mkonicek I'll defer to you to merge this - seems like I don't have access to do so

@fkgozali would you mind taking a look at this pull request? It's been a while since the last commit was reviewed.

@dmmiller What do you think about this one? Do you know a reviewer?

@nicklockwood You've been making changes here recently.  Does this make sense still considering your changes?

@dmmiller it will need some rebasing in light of my changes.
Other than that, I think the new function itself is fine, as it calls through to subscription.remove(), which is still the canonical way to remove subscriptions.

@rahuljiresal updated the pull request.

@nicklockwood Changes are in. Please take a look. Thanks!

@rahuljiresal updated the pull request.

@facebook-github-bot shipit


Chordrest accidental layout is sub-par

Chordrest currently uses a very basic algorithm for laying out accidentals - it works through the accidentals from top to bottom, and if a bounding rect collision with the previous accidental is found (and that previous accidental is not shifted), it shifts the accidental to the left edge of the previous accidental's bounding rect. This works for many cases, but causes bad results for some common cases like these:

Users can currently work around this by manually adjusting X positions of accidental glyphs with something like:
staff = Staff(ORIGIN, None, Mm(100))
Clef(ZERO, staff, "treble")
c = Chordrest(Mm(10), staff, ["gb", "an", "bb"], (1, 8))
c.accidentals[0].x -= ...

But this is very tedious and modifications don't survive chord rebuilds (which can be triggered by things like beaming). We should implement an accidental layout algorithm according to standard notation conventions. From what I've seen the rules are pretty complicated, so it may be an involved fix. A proper solution should also take into account glyph cutouts provided by SMuFL for this purpose.

We might want to consider checking out Musescore's accidental layout algorithm since they also use SMuFL

See MuseScore's implementation here - https://github.com/musescore/MuseScore/blob/751c0866abbceb011d2747d9992a584f0675a562/src/engraving/layout/layoutchords.cpp#L621 - it is indeed pretty complicated

I've improved the situation considerably with fdbd1c3d461299311 but it still leaves much to be desired. Issue summary has been updated accordingly

Just noticed that naturals are too close to noteheads in chordrests - I know it doesn't look like it, but this actually is a chordrest with a special table:
table = NoteheadTable(double_whole='noteheadBlack', whole='noteheadBlack',                           half='noteheadBlack', short='noteheadBlack')