duplicate symbol 'folly::exception_wrapper::from_exception_ptr(std::exception_ptr&&)' React Native 0.66 with hermes enabled

Description
I was on 0.65.1 (with Hermes enabled) and tried to perform an upgrade to 0.66 today and after performing all necessary changes as mentioned in upgrade helper, I finally performed a clean install and tried to run the app and now it is not working anymore, It is throwing duplicate symbol errors related to flipper between RCT-folly and Flipper-folly.
Also, I faced a similar issue when I upgraded to 0.65.1 but at that time this fix worked: https://github.com/react-native-community/releases/issues/235#issuecomment-863308604
I tried this here but doesn't seems working
Here is the error from Xcode:
duplicate symbol 'folly::detail::str_to_bool(folly::Range<char const*>*)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(Conv.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(Conv.o)
duplicate symbol 'folly::makeConversionError(folly::ConversionCode, folly::Range<char const*>)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(Conv.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(Conv.o)
duplicate symbol 'folly::exception_wrapper::from_exception_ptr(std::exception_ptr&&)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exception_wrapper::from_exception_ptr(std::exception_ptr const&)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exception_wrapper::onNoExceptionError(char const*)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exceptionStr(folly::exception_wrapper const&)' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exception_wrapper::uninit_' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exception_wrapper::ExceptionPtr::ops_' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
duplicate symbol 'folly::exception_wrapper::SharedPtr::ops_' in:
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(ExceptionWrapper.o)
    /Users/umangloriya/Library/Developer/Xcode/DerivedData/App-gafjkayoxqdgqvdjhytxqqiubosa/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(ExceptionWrapper.o)
ld: 9 duplicate symbols for architecture arm64

React Native version:
Run react-native info in your terminal and copy the results here.
System:
    OS: macOS 11.6
    CPU: (8) arm64 Apple M1
    Memory: 157.19 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 6.14.13 - /opt/homebrew/bin/npm
    Watchman: 4.9.0 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 23, 29, 30
      Build Tools: 29.0.2, 30.0.0, 30.0.2, 30.0.3
      System Images: android-30 | Google APIs ARM 64 v8a, android-S | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7678000
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.0 => 0.66.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

Upgrade to 0.66.0 with hermes enable for iOS
2.Build/Run the project

Expected Results
It should build/run just fine without throwing error
Snack, code example, screenshot, or link to a repository:
Here is my podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Override Firebase SDK Version

platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false

target 'NotificationServiceExt' do
  pod 'Firebase/Messaging'
end

target 'App' do
  # Pods for App
  pod 'libwebp', :modular_headers => true
  # Add the pod for Firebase Cloud Messaging
  pod 'Firebase/Messaging'
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true
  )
  # Enables Flipper.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

I got the same error even in v0.65

I got the same error even in v0.65

For 0.65 try this fix: https://github.com/react-native-community/releases/issues/235#issuecomment-863308604
It worked for me. but it is not working for 0.66

@mikehardy Any suggestion or insights for this issue? It would be really helpful. I am now used to flipper haha

@umang-simform no issues here. I use Flipper and Hermes. I use Intel macs and M1 macs. This works for me compiling it in all sorts of ways https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh as does https://github.com/mikehardy/rnfbdemo/blob/master/notifee-demo.sh
Maybe you have some unsupported configuration of flipper modules. Please don't tag me again, I have nothing to add.

@umang-simform Could you elaborate?

We ended up recreating the ios project using a fresh react-native init, then readded everything to the iOS project (we also wrote a script like the one linked previously to automate this in case we need it: https://github.com/facebook/react-native/issues/32333#issuecomment-939939970) and it is set as YES by default:

I confirm this is also not present in the pbxproj anymore file.
This is a change that occured in RN 0.62.0, this commit in particular : https://github.com/facebook/react-native/commit/e3218a0d965f6ec69cc31cd7c536678e165b96c1#diff-5e5f05dcdf7a14aea292c3172649e6a220923662fdb41d409997c37da721d27eL505, so I'm not sure it would cause debugging issues if this was a change related to Flipper. Even if I find it weird to activate this setting in a debug configuration, but whatever. XCode and pbxproj is a mess.
Switching it to NO on a new project bring back the problem. Just wanted to provide context as to why only some people encoutered this issue, and why it works on a new project.

Removing DEAD_CODE_STRIPPING = NO; in debug makes the app crash in debug for me.

@umang-simform enabling dead code deletions would cause debugging issues IMO

Yes, I forgot to mention that one, But the main thing is we need to analyse the pbxproj file from fresh project.

@umang-simform enabling dead code deletions would cause debugging issues IMO

Yes, I forgot to mention that one, But the main thing is we need to analyse the pbxproj file from fresh project.

I also ended up updated to Xcode 13 to get this working on my machine.

I am already using xcode 13, Liking it so far :)

We ended up recreating the ios project using a fresh react-native init, then readded everything to the iOS project (we also wrote a script like the one linked previously to automate this in case we need it: #32333 (comment)) and it is set as YES by default:
I confirm this is also not present in the pbxproj file anymore.
This is a change that occured in RN 0.62.0, this commit in particular : e3218a0#diff-5e5f05dcdf7a14aea292c3172649e6a220923662fdb41d409997c37da721d27eL505, so I'm not sure it would cause debugging issues if this was a change related to Flipper. Even if I find it weird to activate this setting in a debug configuration, but whatever. XCode and pbxproj are a mess.
Switching it to NO on a new project bring back the problem with 9 duplicate symbols for architecture x86_64. Just wanted to provide context as to why only some people encoutered this issue, and why it works on a new project.

This is exactly it! Great experiments to find out the reasons behind this weird behaviour that wasted so much of my time to debug it.

I am remove DEAD_CODE_STRIPPING = NO, is resolved problem


safe removable required

does windows ncm driver let the ncm device in safe removeble required?

WIndows NCM driver assumes the NCM device does not require safe removal


V2 - Not able to identify CLA Manager or contact admin through cla-manager/requests endpoint

Observed that always 500 is returned by cla-manager/requests endpoint. Tried both through UI and API endpoint
Scenarios tried for Project Level CLA Group

CLA Manager for another project in the organization

user without LFID

Contact Admin

UI

@nirupamav Tested and endpoint is working as expected. Run against different cases

User with LFID
User with No LFID
ContactAdmin

Issue is still reproducible
API

UI

@nirupamav I tested and was getting a success for each use case.

@wanyaland
I am still facing the issue in both UI and API

Verified that the issue is fixed


feat: allow pressing tab to move focus

Codecov Report

Merging #7 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage   91.66%   91.72%   +0.05%
==========================================
  Files           4        4
  Lines         144      145       +1
  Branches       18       19       +1
==========================================
+ Hits          132      133       +1
  Misses         12       12

Impacted Files
Coverage Δ

src/EventHandlers.bs.js
82.60% <100.00%> (+0.38%)
:arrow_up:


Roll engine 5aff31194809..6cfa7fcad64e (2 commits)

https://github.com/flutter/engine/compare/5aff31194809...6cfa7fcad64e
git log 5aff31194809..6cfa7fcad64e --first-parent --oneline
2020-03-06<EMAIL_ADDRESS>fix shadows and mask filter blurs (flutter/engine#16963)
2020-03-06<EMAIL_ADDRESS>Roll fuchsia/sdk/core/linux-amd64 from cXgMr... to cTw2C... (flutter/engine#16970)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Gold has detected one or more untriaged digests on patchset 2.
Please triage them at https://flutter-gold.skia.org/search?issue=52089.

Commit queue failed; closing this roll.


fix: cli/transfer/artefacts examples

Related to: https://github.com/open-component-model/ocm/issues/183

Note: I only corrected the commands in this PR. The "artifact vs artefact" resolution will be in a different PR.


[Penetration Test] API - Excessive Data Exposure

Description:
The API returns sensitive data to the client by design. This data is filtered on the client side before being presented to the user. An attacker can easily sniff the traffic and see the sensitive data.
Excessive data exposure occurs when the API retrieves more data than what seems to be required by the GUI or when an unusual amount of data is retrieved beyond what appears to be required.
Endpoint: /api/projects
The above endpoint retrieves and lists all the projects on the front end rather than listing only the relevant projects for which the user has any role bindings.
Is there a way to restrict the data and provide only the relevant projects_id to the front end based on the user-eligible role for the projects?
Code investigation:
@Override
public SortedSet listProjects(
UserId user
) throws AccessException, IOException {
if (Strings.isNullOrEmpty(this.options.availableProjectsQuery)) {
//
// Find projects for which the user has any role bindings (eligible
// or regular bindings). This method is slow, but accurate.
//
return this.repository.findProjectsWithEntitlements(user);
}
else {
//
// List all projects that the application's service account
// can enumerate. This method is fast, but almost certainly
// returns some projects that the user doesn't have any
// entitlements for. Depending on the nature of the projects,
// this might be acceptable or considered information disclosure.
//
return this.resourceManagerClient.searchProjectIds(
this.options.availableProjectsQuery);
}
}
//---------------------------------------------------------------------------
// ProjectRoleRepository.
//---------------------------------------------------------------------------
@Override
public @NotNull SortedSet findProjectsWithEntitlements(
@NotNull UserId user
) {
//
// Not supported.
//
throw new IllegalStateException(
"Feature is not supported. Use search to determine available projects");

The behvior difffers based on which catalog you're using.

If you use the PolicyAnalyzer catalog, the project picker (and underlying listProjects endpoint) defaults to only returning projects that the user actually has access to.
As the comment in the code suggests, quering the Policy Analyzer API to determine those projects is accurate, but slow. That's why you can opt out of that behavior by configuring the AVAILABLE_PROJECTS_QUERY option.
One caveat of using the PolicyAnalyzer catalog is that it requires an SCC subscription.

If you use the AssetInventory catalog, then the behavior is equivalent to using the PolicyAnalyzer catalog with  the AVAILABLE_PROJECTS_QUERY option.

There's a trade-off, but you do have the option to restrict output to relevant projects for which the user has the necessary role bindings.

Thanks for the information. Let us configure this and test.
We will get back to you in case we need any further support.
On Tue, 23 Jul 2024, 04:37 Johannes Passing, @.***>
wrote:

The behvior difffers based on which catalog you're using
https://googlecloudplatform.github.io/jit-access/configure-catalogs/.

If you use the PolicyAnalyzer catalog, the project picker (and
underlying listProjects endpoint) defaults to only returning projects
that the user actually has access to.
As the comment in the code suggests, quering the Policy Analyzer API
to determine those projects is accurate, but slow. That's why you can opt
out of that behavior by configuring the AVAILABLE_PROJECTS_QUERY option
https://googlecloudplatform.github.io/jit-access/configuration-options/#:~:text=AVAILABLE_PROJECTS_QUERY
.
One caveat of using the PolicyAnalyzer catalog is that it requires an
SCC subscription.
If you use the AssetInventory catalog, then the behavior is equivalent
to using the PolicyAnalyzer catalog with the AVAILABLE_PROJECTS_QUERY
option.
There's a trade-off, but you do have the option to restrict output to
relevant projects for which the user has the necessary role bindings.
—
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/jit-access/issues/443#issuecomment-2243958720,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APUA5IMSNE7BYPE6OPROIT3ZNWGCHAVCNFSM6AAAAABLID3KMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTHE2TQNZSGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi @jpassing
If we configure RESOURCE_CATALOG: "PolicyAnalyzer" then listing projects is looking in the policy analyzer repository(jit-access/sources/src/main/java/com/google/solutions/jitaccess/core/catalog/project/PolicyAnalyzerRepository.java)
I have a question. We have been using 1.6 and setup was done with AssetInventory catalog. I just changed to PolicyAnalyzer without changing any service account bindings(roles/resourcemanager.projectIamAdmin and roles/cloudasset.viewer). Will it give any impact on the listing project and other functionalities?

You don't need to change any role bindings when switching catalogs.
The only significant functional difference between the two is that the PolicyAnalyzer catalog supports nested group memberships, while the AssetInventory catalog ignores nested groups. So the PolicyAnalyzer catalog is actually slightly more capable. The only reason the PolicyAnalyzer catalog isn't the default anymore is the SCC dependency.

I guess this is resolved? Otherwise please reopen the issue.


Adding HtmxResponse to easily set Htmx Response Headers

Hello,
would you mind if I create a PR implementing something like HtmxResponse in a builder-like pattern to easily set the response headers described in https://htmx.org/docs/#response-headers?

I've thought about this a bit as well, so I'm definitely open to a PR.


formatting / linting of solidity contracts

we should consider adding solium checks around our contracts, along with potentially style passes per https://solidity.readthedocs.io/en/latest/style-guide.html

There is zero solidity in the repo these days.  Thank god.


lib_common中引入aar

我尝试在lib_common中引入aar包，报错如下：
Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :lib_common project caused this error: /Users/dongfang/Documents/wms-develop-project/wms_pda/lib_common/libs/UHFJar_V1.4.0.aar
只有打release包的时候会报错，其他时候正常，包也引入成功 了。
尝试多种配置都没成功，大佬有解决的方案么？谢谢

https://blog.csdn.net/qq1342753906/article/details/122546336 亲测有用


broken link

in https://github.com/jipsen/AlgebraicCategories/blob/main/files/acknowledgements.md

Here is the text of a talk about the database, given at the Annual Meeting of the Association for Symbolic Logic, Chicago, June 1-4, 2003: An online database of classes of algebraic structures

the link does not point to a PDF of the talk

Thanks, this should now be fixed.


Blob fields

Can anybody show me an example about how to handle blob type? I need to query / update a blob field type in order to save an image in the database.

Solved using byte[] data type instead of blob.


Upgrade MCAD and Controller-Runtime dependencies

Issue link

What changes have been made

Verification steps

Checks

[ ] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[ ] Manual tests
[ ] Testing is not required for this change

/lgtm

/approve


rename prompt from "deploy path" to "publish directory"

netlify deploy currently prompts for "deploy path"
https://github.com/netlify/cli/blob/b373eecdeab44ee913148666e25cf693a25730d7/src/commands/deploy.js#L89
this is non standard terminology. as i've agreed with @verythorough, we should use the same terminology everywhere to limit confusion.

also if we read from netlify.toml we should say so but thats another issue..


0026 - Updating the MP parameter sets

status: proposed
date: 2024-05-08
Updating the MP parameter sets
Context and Problem Statement
The last systematic audits of parameters used in the Materials Project workflows occurred in 2011 for PBE, and in 2020-2021 for r2SCAN. Over those years, various parameters in those workflows have been updated as need arose.
This work aims to systematically update a few critical parameters used in the workflows that need updating: ISMEAR, LREAL,  LMAXMIX, KSPACING, and POTCARs.
Link to relevant issue with early discussion..
This document is a summary of a longer document which includes, for each parameter recommendation, a background and motivation section which explains physically what a parameter controls. These sections can safely be skipped if one is already familiar with the parameter. The method and discussion sections present all required descriptions of how tests were conceived, executed, and interpreted.
At present, this longer document is a living document. After a community discussion and foundation vote, it will be frozen with a specific set of recommended parameter changes.

Decision Drivers

MP is a global leader in data reliability; periodically updating our computational parameters ensures consistent data quality.

Considered Options
Current data-driven recommendation
For INCAR settings:

ALGO = "NORMAL", as this is robust enough and "ALL" can be quite slow.

For relaxations in any solid, ISMEAR= 0 (Gaussian smearing) with
smearing width (SIGMA) 0.05 eV

For statics in any solid, ISMEAR= -5 (unchanged from prior works)

LMAXMIX = 6 in all solids and for plain DFT without Hubbard $U$

LREAL = False always

Bringing the PBE workflow parameters (ENCUT, EDIFF, EDIFFG, etc.) in
line with the r2SCAN workflow

For KPOINTS updates: Use $\Gamma$-centered meshes with the following
formula for KSPACING, based on bandgap
$$
\begin{aligned}
\mathrm{KSPACING} &= \frac{1}{2} \left( \Delta k_\text{min} + \Delta k_\text{max} + (\Delta k_\text{max} - \Delta k_\text{min})\frac{\delta}{[1 + \delta^c]^{1/c}} \right), \
\delta &= a(E_g - b), \
\Delta k_\text{min} &= 0.2, \
\Delta k_\text{max} &= 0.45, \
a &= 0.9,\
b &= 2.35,\
c &= 8. \
\end{aligned}
$$
For POTCAR updates:

The current actinide series of POTCARs used by MP is inconsistent
with all-electron data and must be updated.

Some issues are also noted for Ba and Xe

Recommendations for new POTCARs are given in Ref. 1,
which results in GW-derived pseudopotentials being recommended for
Ba and Xe. We have also benchmarked these for higher accuracy, and
present them in Table 1{reference-type="ref"
reference="tab:potcar_changes"}

Two sets of POTCAR updates are proposed: a minimal update of only 12 POTCARs, which yields essentially identical accuracy to the full set of 58-updated POTCARs

For Hubbard $U$ updates:

PBE $+U$ is demonstrably worse for describing formation enthalpies

An attempt to determine optimal $U$'s for PBE (and later r2SCAN)
using experimental formation enthalpies for the whole $d$-block was
unsuccessful

Fitting redox enthalpies may represent one path to expanding the
$U$'s used by MP

We do not present data for PBE $+U$, as this may go into a separate
publication (this can be shared privately).
 1  E. Bosoni  et al. , Nature Rev. Phys.  6 , 45 (2024). DOI: 10.1038/s42254-023-00655-3
Alternatives
A few other alternatives are listed in the longer document.
Decision Outcome
N/A right now.

Implementation Plan
The updated parameters currently in this fork of atomate2, but will be migrated to a pymatgen PR pending a change in atomate2 to move input sets there. (Hence the ~)

[~] pymatgen: ...
[~] atomate2: ...
[N/A] emmet: ...
[N/A] crystal-toolkit: ...
[N/A] jobflow: ...
[N/A] maggma: ...

More Information
See the longer document for extensive validation of these recommendations by a large set of VASP calculations.
This work was prepared with valuable suggestions and contributions by (alphabetical): Matthew Horton, Patrick Huck, Anubhav Jain, Ryan Kingsbury, Matthew Kuner, Jason Munro, Kristin Persson, Janosh Riebesell, Andrew Rosen, and Ruoxi Yang.

@esoteric-ephemera will update the PR/document to also discuss the  reasoning behind the +U parameters.
We voted on accepting  the new default parameters for the first time. Everyone is  invited to think further about the parameters and then raise issues  until our next meeting where we hope to do the final vote on this PR.

Hi all, updated the POTCAR test results. Crucial points:

Minimizing the MAPEs in EOS properties would update 58 POTCARs that MP currently uses. Their replacements are taken from VASP's recommendations
Updating only the 12 worst-performing POTCARs from MP yields essentially the same accuracy as both the optimal set and the VASP-recommended set

Does this raise a question, if performance is similar for the remaining non-worst-performing pseudopotentials, how were they updated and for what reason by the VASP developers? Presumably they would not have been changed at all if there was not some benefit, perhaps some benefit not captured by the metrics such as ghost states?On May 8, 2024, at 11:26, Aaron Kaplan @.***> wrote:
Hi all, updated the POTCAR test results. Crucial points:
Minimizing the MAPEs in EOS properties would update 58 POTCARs that MP currently uses. Their replacements are taken from VASP's recommendations
Updating only the 12 worst-performing POTCARs from MP yields essentially the same accuracy as both the optimal set and the VASP-recommended set
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

@mkhorton: Yes it does, sorry I missed this. That might be better directed towards the VASP staff tho, as there's no description in that reference (Bosoni et al.) which describes how they were chosen

@esoteric-ephemera: I would like to make another recommendation -- that we remove ENAUG. As noted in the VASP manual, it is deprecated and also has no effect if PREC = "Accurate" (as is the case here).

Do we also want to consider setting EFERMI = "MIDGAP" as recommended in the VASP manual. In practice, this should not impact us since we have a "smart" way of determining the Fermi level in pymatgen. This would, however, restrict the calculations to only run on VASP 6.4+ by default (perhaps not a bad thing?).

We made the final vote on this decision. As soon as Aron updates the implementation strategy, this will get merged.

@esoteric-ephemera a late suggestion, but can we set GGA_COMPAT to False? See here for discussion.

What in the world... 😅😭

Hi @mkhorton  and @Andrew-S-Rosen  - sorry for the general silence on this. @BryantLi-BLI and I are working through recomputing all of MP with the new input sets. Was going to merge this as soon as we have a large enough space of materials to do sanity checks on (how much has the hull changed, are these too expensive, are any of the new pseudos unstable)
So for now, suggestions are still on time! Will take a look at this but don't expect much to change given that MP mostly runs ferromagnetic initialization on materials. Then again, there are always surprises...

Excellent! I don't expect there to be much difference either way (certainly not to the degree that you would need to re-compute), but I do think it looks sensible to change this default for future calculations. For example, this might have downstream consequences for the MagneticOrderings workflow which inherits from MP standard settings. In this workflow the energy differences can be of the order of meV, and this might change the result.


Add PHP 8.2 \SensitiveParameter throughout the code base

Summary
I just saw a PR in another project and was reminded of this, see https://www.php.net/manual/en/class.sensitiveparameter.php

This attribute is used to mark a parameter that is sensitive and should have its value redacted if present in a stack trace.

It's 8.2+ but due the being a comment, it's entirely backwards compatible.

We can add it since it'll not make any difference for backwards versions.


feat(char): add auto-jump/auto-motion option when using labels, closes #183

A naive solution for https://github.com/folke/flash.nvim/issues/183 I've been using locally.
Currently can be enabled by setting autojump to true
modes = {
    char = {
        jump_labels = true,
        jump = {
            autojump = true,
        },
    },
}

Tested this and it works quite well. The backdrop highlight disappears after the auto jump. Can you please consider merge this PR?

any updates on this PR?

Any chance to getting it finally merged?

Done, sorry for the delay!

This doesn't work for pending operator mode when there is only one hit. It still displays the label and you have to press the label to execute.

This doesn't work for operator pending mode when there is only one hit. It still displays the label and you have to press the label to execute.

Unless I am missing something, it works for me for char mode. For example, using running df.. If it isn't related to f/t motions it is just a different issue.
   -- options used when flash is activated through
   -- `f`, `F`, `t`, `T`, `;` and `,` motions


deepin.dde-session-ui: 4.6.2 -> 4.7.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/dde-session-ui/versions.
meta.description for deepin.dde-session-ui is: '"Deepin desktop-environment - Session UI module"'.
Compare changes on GitHub

Checks done (click to expand)

built on NixOS
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/deepin-greeter had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/dde-shutdown had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/dde-lock had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/lightdm-deepin-greeter had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/dde-switchtogreeter had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/dde-wm-chooser had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin/dmemory-warning-dialog had a zero exit code or showed the expected version
0 of 7 passed binary check by having a zero exit code.
0 of 7 passed binary check by having the new version present in output.
found 4.7.0 with grep in /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0
directory tree listing: https://gist.github.com/86137e3723513bf8e921377902868a95
du listing: https://gist.github.com/62dfe878c8772816c8ea8f3a9e5e3e47

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)
1 package rebuild(s)
1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
deepin.dde-session-ui

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A deepin.dde-session-ui https://github.com/r-ryantm/nixpkgs/archive/1002cbd0677bcdd022923de3055bc8992ca20e39.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0
ls -la /nix/store/gjrbrc3ch3nzjqbq77d5y9p12vra7pn8-dde-session-ui-4.7.0/bin

cc @romildo for testing.

I am preparing updates, new packages and fixes for deepin. So I would like to not have this update merged.

@romildo Let me know if you want me to blacklist deepin from r-ryantm's updates. It is not a problem for me if you just want to close them like this.

@ryantm I think they can be blacklisted.


Weird Lines when map is generated

When looking at the maps that are generated you can see segmented/ lines appearing, I'm hoping there is a way to remove them.

Hey @RinVindor,
The lines are an unfortunate artifact of the using html2canvas library for scene capture.
I will make an effort to see if there are ways to mitigate the issue, but as of right now I don't know of a reliable solution to remove them.

No worries, I just wanted to check and see if it was something that could be worked out


--tensor-parallel-size vs device_map?

I have two 32G V100 gpus, and need to run a 13B float16 model. I have tried below paths:

python -m vllm.entrypoints.openai.api_server --dtype float16 --trust-remote-code --model /app/model --port 8000 --host <IP_ADDRESS> --tensor-parallel-size 1,  OOM
python -m vllm.entrypoints.openai.api_server --dtype float16 --trust-remote-code --model /app/model --port 8000 --host <IP_ADDRESS> --tensor-parallel-size 2,  both GPU usage is about 27G and can inference very fast with long tokens
use fastchat to start with 1 GPU,the GPU usage is about 27G, The inference speed is fast but will stuck on long tokens.
use fastchat to start with 2 GPUs, both GPU usage is about 14G, it use the device_map. The inference speed is too slow with long tokens but won't stuck.

Questions:

Why --tensor-parallel-size 1 will cause OOM, the 1 GPU resource should be enough.
Does vllm support device_map? If there are only two 24G GPUs，how can I run such model with vllm?
How to speed up the inference when use device_map? (Maybe not specific with vllm, for discussion)

hi, could you please share me how to set device_map?


[Bug]: Error when building from release archive without git repo

Impacted Library name
@ledgerhq/live-desktop
Describe the bug
Original issue: https://github.com/LedgerHQ/ledger-live-desktop/issues/3918
For ArchLinux AUR ledger-live we download archive from tag:

It cannot be build without .git folder. You have direct git call from your code:
https://github.com/LedgerHQ/ledger-live/blob/bf9e7a242c349d565a0fdcd6823059295920fb58/apps/ledger-live-desktop/tools/utils/index.js#L14-L17
Can you not call git during build?
Expected behavior
No implicit build dependency on git repository. Removed git call.

Not critical for now but will take a look whenever I can

bump to keep this ticket open

@phnx47 we will take a look at it when we get some bandwidth ;)

I suggest this solution
let GIT_REVISION = process.env?.GIT_REVISION;

if (!GIT_REVISION) {
  GIT_REVISION = childProcess
    .execSync("git rev-parse --short HEAD")
    .toString("utf8")
    .trim();
}

When I will build code without .git folder I can set GIT_REVISION by env. I can raise PR for this fix and test it.

Sorry for the delay, your code seems more than alright, implementing it in a PR right now

@phnx47 I'm testing that it doesn't break our build system, and if it's good, it will be merged to develop and be shipped with the next LLD release ;)

@valpinkman Thanks!


Consistent names for ECMWF base grids

rdy2cpl handles grid point grids and the ECMWF convention is:

FXXX - full (regular) Gaussian grid with XXX latitude lines between the pole and equator
NXXX - original ECMWF reduced Gaussian grid with XXX latitude lines between the pole and equator
OXXX - octahedral ECMWF reduced Gaussian grid with XXX latitude lines between the pole and equator

However, rdy2cpl uses grid names referring to the spectral truncation (Tlxxx, Tcoxxx), which is irrelevant in this context.
Furthermore, rdy2cpl implements a regular Gaussian grid with the name N128. According to the convention above, NXXX is a reduced Gaussian grid, hence the rdy2cpl name for this grid is wrong.

Looks very good. Does it make sense to create aliases for Tco/Tl grid to keep a sort of backward compatibility?

Looks very good. Does it make sense to create aliases for Tco/Tl grid to keep a sort of backward compatibility?

Is it really needed? The only place where this is used is our ECE4 scripts and we have control over this. So I think we can update the scripts (in particular only one file, ece_coupling_grids.yml) at the same time and would not have any issues. For me it would not be worth the effort (and maintenance). Is that okay?

The only "minor" risk I see is that someone currently using ECE4 updates its environment so that it ends with a version of rdy2cpl not compatible with his/her own "older" version of ECE4.
But it is true that this should be a small hiccup which can be easily fixed...

True. We can leave this PR open and therefore in i branch and then simultaneously we merge !56 and this PR. This way, we can at least say that one needs to update both the ECE4 code and the environment at the same time. We can even point the environment.yml file in !56 to this branch for the time being, so there would be no manual downloading of the branch.
In the longer run, we need to make proper versions for rdy2cpl to handle this situation better.


feat: ibis_ml.metrics

Explore adding a metrics module to support computing classification metrics such as accuracy, precision, recall, and f1_score, as well as regression metrics such as MSE, RMSE, MAE, and MAPE.
This was brought up in https://github.com/ibis-project/ibis/pull/10501.
A challenge with this implementation, at least for classification, is that calculating these metrics individually may be less performant, as it likely requires reshaping the data first for each one. Even with this being the case, we would likely still get pretty good performance, and if the backend supports result caching, it would be even better in those instances.

To add: torchmetrics.functional has a lot of metrics implemented for PyTorch tensors in functional form. The typical input is metric(predicted, true, **kwargs), which maps to table columns.

A challenge with this implementation, at least for classification, is that calculating these metrics individually may be less performant, as it likely requires reshaping the data first for each one

Some metrics are implemented modularly with an _update() and a _compute() function. update derives relevant values from the predicted and true inputs and compute produces the metric. (example)
Notes

ibis-ml.metrics implementations could be tested against torchmetrics (or scikit-learn) itself
some metrics can be "accumulated", which means that we can update the metric value for a single new pair (predicted, true)

To add: torchmetrics.functional has a lot of metrics implemented for PyTorch tensors in functional form.

@zilto Sorry I didn't get back to you on this! If any of these would be useful for your work, or if you're more generally interested in contributing them, more than happy to add to the module @IndexSeek created! I'd also of course love to see some use in the wild—validating that this is a real challenge a number of people are facing—before going and implementing all of the metrics. :D

ibis-ml.metrics implementations could be tested against torchmetrics (or scikit-learn) itself

Yep! @IndexSeek's initial set of implementations are all tested against their scikit-learn equivalents, and I find it quite clean.


Export ReactQuill namespace

Importing the ReactQuill namespaced types do not work in Typescript. This PR exports the namespace, which allows for the following usage:
import ReactQuill from 'react-quill'; // Import the React component
import { ReactQuill as rq } from 'react-quill'; // Import the namespace

Once the namespace is imported, it can be used like so:
function(editor: rq.UnprivilegedEditor): void { ... }

This fixes https://github.com/zenoamaro/react-quill/issues/350

Bump,
Can this be merged?

I've also had this problem and have had to edit my local copy of types.d.ts to get this to work. It's a simple change - can it be merged? Ta.

FYI reopened the PR here: https://github.com/zenoamaro/react-quill/pull/490


Unstable return reference of generated hook when using a custom mutator hook.

What are the steps to reproduce this issue?
First of all, thanks for building Orval. We use it for quite a few projects :+1: .
One can generate endpoints with a custom mutator hook, for example:
https://github.com/anymaniax/orval/blob/4cfb246ce5f1816a9c809f96d9d2f2c5a80eac4a/samples/react-query/hook-mutator/endpoints.ts#L36-L38
export const useListPetsHook = () => {
  const listPets = useCustomInstance<Pets>();

  return (params?: ListPetsParams, signal?: AbortSignal) => {
    return listPets({ url: `/pets`, method: 'GET', params, signal });
  };
};

What happens?
The reference returned by the generated useListPetsHook isn't stable: it changes on every render cycle.
What were you expecting to happen?
I would have expected the following:
export const useListPetsHook = () => {
  const listPets = useCustomInstance<Pets>();

  return useCallback((params?: ListPetsParams, signal?: AbortSignal) => {
    return listPets({ url: `/pets`, method: 'GET', params, signal });
  }, [listPets]);
};

Now, the useListPetsHook will return the same reference on subsequent calls (given that your useCustomInstance doesn't change of course).
A stable reference is useful when one uses memoization downstream, and the result of the useListPetsHook is part of a useMemo or useCallback call in user-land code.

Hi guys, I think this merge broke something, as the useCallback is not imported into the generated files which are affected by a custom axios instance.
src/generated/xxx/xxx.ts106:16- error TS2304: Cannot find name 'useCallback'.

Here is my orval.config.ts:
import { defineConfig } from "orval";

export default defineConfig({
  petstore: {
    input: "./openapi/openapi.yaml",
    output: {
      mode: "tags-split",
      target: "./src/generated/api.ts",
      client: "react-query",
      override: {
        tags: {
          someTag: {
            mutator: {
              path: "./src/features/xxx/xxx/orval/useCustomInstance",
              name: "useCustomInstance",
            },
          },
        },
      },
    },
    hooks: {
      afterAllFilesWrite: "prettier --write",
    },
  },
});

If you want to, I could also add another issue, but I guess it is hardly related to this one. It is working with version 6.25.0

Hmmm I am not having that issue with 7.1.0?    You can see my generated code here and it has useCallback
https://github.com/melloware/quarkus-primereact/blob/main/src/main/webui/src/service/CarService.ts

I updated to 7.1.0 and the error is still there. I will try to recreate a minimal example with our usecase to provide you more information.

So here is my minimal example to reproduce this. I guess it has something todo with the tag dependent instance. I need a custom instance in my project for some tags to set some headers but only for this specific request. So I don't want to use an interceptor for this one.
api.yaml:
openapi: '3.0.0'
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: http://petstore.swagger.io/v1
paths:
  /pets:
    get:
      summary: List all pets
      operationId: listPets
      tags:
        - pets
        - my-tag
      parameters:
        - name: limit
          in: query
          description: How many items to return at one time (max 100)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A paged array of pets
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PetsArray'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Create a pet
      operationId: createPets
      tags:
        - pets
        - my-tag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - 'name'
                - 'tag'
              properties:
                name:
                  type: string
                tag:
                  type: string
      responses:
        '201':
          description: Null response
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pets-nested-array:
    get:
      summary: List all pets as nested array
      operationId: listPetsNestedArray
      tags:
        - pets
      parameters:
        - name: limit
          in: query
          description: How many items to return at one time (max 100)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A paged array of pets
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PetsNestedArray'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pets/{petId}:
    get:
      summary: Info for a specific pet
      operationId: showPetById
      tags:
        - pets
      parameters:
        - name: petId
          in: path
          required: true
          description: The id of the pet to retrieve
          schema:
            type: string
        - name: testId
          in: path
          required: true
          description: The id of the pet to retrieve
          schema:
            type: string
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pet'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          description: 'Name of pet'
          maxLength: 0
          minLength: 40
        age:
          type: integer
          format: int32
          minimum: 0
          maximum: 30
          exclusiveMinimum: true
          exclusiveMaximum: true
        tag:
          type: string
          pattern: '^\\d{3}-\\d{2}-\\d{4}$'
          nullable: true
        email:
          type: string
          format: email
        callingCode:
          type: string
          enum: ['+33', '+420', '+33'] # intentional duplicated value
        country:
          type: string
          enum: ["People's Republic of China", 'Uruguay']
    PetsNestedArray:
      type: object
      required:
        - pets
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Pet'
    PetsArray:
      type: array
      minItems: 1
      maxItems: 20
      items:
        $ref: '#/components/schemas/Pet'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string

orval.config.ts
import { defineConfig } from "orval";

export default defineConfig({
  petstore: {
    input: "./petstore.yaml",
    output: {
      mode: "tags-split",
      target: "./src/generated/my_api.ts",
      client: "react-query",
      override: {
        tags: {
          "my-tag": {
            mutator: {
              path: "./src/instance/useCustomInstance.ts",
              name: "useCustomInstance",
            },
          },
        },
      },
    },
  },
});

The custom instance:
import {AxiosRequestConfig, AxiosResponse} from "axios";
import axios from "axios";

export const useCustomInstance = <T>(): ((
    config: AxiosRequestConfig,
    options?: AxiosRequestConfig,
) => Promise<AxiosResponse<T>>) => {
    const someHeaders = {
        "Header-A": "someString"
    }
    return (config: AxiosRequestConfig, options?: AxiosRequestConfig) => {
        const promise = axios
            .request({
                ...config,
                headers: {
                    ...someHeaders
                },
                ...options,
            })
            .then(({data}) => data);
        return promise;
    };
};


Add intermediate outputs to QueryPipeline

Description
Add option to print and access intermediate outputs from query pipeline.
intermediate_outputs is a dictionary with the key:value = module_key:output
If self.show_intermediate_outputs is set to True, return a Tuple: output, [get_single_result_output(output object), output object itself]
Type of Change

[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update

@xpbowler let me know if you need a hand with the unit tests!
Best way is to test locally (install pytest, cd to the package, and run tests)
# install pytest crap
pip install pytest pytest-asyncio pytest-mock

# cd to dir
cd llama-index-core

# make sure you have it installed
pip install -e .

# run tests
pytest tests

@xpbowler let me know if you need a hand with the unit tests!
Best way is to test locally (install pytest, cd to the package, and run tests) (One or two unrelated tests might fail locally, no worries there)
# install pytest crap
pip install pytest pytest-asyncio pytest-mock

# cd to dir
cd llama-index-core

# make sure you have it installed
pip install -e .

# run tests
pytest tests

yep, i was just working on this!

Thanks a ton @xpbowler 🚀


Emails: The Create Request Rejection email comes empty

The Create Request Rejection email is not rendered.
"The email is being sent, but it is not being rendered at all".

works as expected


FedCM get() rejects with AbortError: signal is aborted without reason

how to fix this problem? When I call the googleOneTap function, and then I close the popup，it will happen.  It looks like the Google ApI will limit login status, need wait sometimes like ApI saying or clear browsing of data, the popup will only awaken it again，but more than customers do not this operate

how to fix this problem

good question

Same issue here

@NurTuam
check this, make sure it is enabled

@SaidAlSouti  @NurTuam Sorry for the late reply, are you are referring to cooldown period? If the user closes the One Tap prompt manually, the One Tap prompt will be suppressed, see here, I guess the error is from google library which I don't have any control of, as this NPM package is a wrapper over Google 3P Authorization JavaScript Library


Argument naming - Error during testing file analysis

Dear ClusterV dev, first of all, thank you for this nice tool.
During my installation (using conda) and testing of your tool (following the well-written README and using your test files), I encounter the following error in the 3rd step:
-----------------------------
[ ** STEP 3 ** ]get consensus and HIVDB report

Traceback (most recent call last):
  File "/home/user/app/ClusterV/cv.py", line 68, in <module>
    main()
  File "/home/user/app/ClusterV/cv.py", line 64, in main
    submodule.main()
  File "/home/user/app/ClusterV/cv/ClusterV.py", line 110, in main
    run_get_consensus(args)
  File "/home/user/app/ClusterV/cv/get_consensus.py", line 235, in run_get_consensus
    _n_of_read_for_consensus = args.n_of_read_for_consensus
AttributeError: 'Namespace' object has no attribute 'n_of_read_for_consensus'

I managed to fix it by changing the original line 66 in your script ClusterV.py from
parser.add_argument('--number_of_read_for_consense', type=int, default=1000,
to
parser.add_argument('--n_of_read_for_consensus', type=int, default=1000,
I'm not a Python expert but this modification makes this argument be called in the same way in the different scripts (eg. get_consensus.py), and at least solved the issue for me.
As additional info, even if I don't think this has any impact, I also removed an extra space at the end of line 235 in the script get_consensus.py:
_n_of_read_for_consensus = args.n_of_read_for_consensus
to
_n_of_read_for_consensus = args.n_of_read_for_consensus

Thank you so much for the report. Fixed accordingly in the main branch.


Test1 - Fail

Test plan creation.

Created by TestQuality - Linked to TestQuality.com defect D4. Do not remove or edit. [D4|http://app.testquality.com/defect/1756]


Error loading image - 401 Unauthorized

Similar to #19 I keep getting the "Error loading image" messages when I try to open studies from OHIF Viewer, even though I can see Orthanc is up and running via localhost:8042 and viewable using the orthanc viewer. Shows (401 Unauthorized) in console when username and password are "orthanc:orthanc" like in default
It was working fine initially after just cloning the repo and adding a DICOM series, but after adding accounts-ui and accounts-password and editing a few config settings, the images would no longer load. Reverting to previous working commits also don't help...

The series names seems to be showing though:

Dicom server:

I am running orthanc-plugins using docker and persistent database, and running OHIF Viewer using the default orthancDICOMWeb.json file.
Any help would be appreciated. Thanks

If you click on the request in the network tab, do you see anything inside the 'preview' pane?
I noticed something similar recently. The WADO proxy is setup to require some user ID if your database has a non-zero number of users in it. Does your MongoDB have users?
e.g. What is Meteor.users().find().count() ?

That's quite bizarre. Orthanc users don't matter in this context, I'm only asking about Meteor users.
So OHIF includes a proxy on the Meteor server which sits between the web client and the PACS you are communicating with. It only affects WADO requests for image data. It's optional, you can disable it with proxy: disabled in Meteor settings, but unless you have CORS enabled on your PACS, you'll end up with CORS issues.
The reason I ask about users is because of this section of the WADO Proxy:
https://github.com/OHIF/Viewers/blob/master/Packages/ohif-wadoproxy/server/routes.js#L37
doAuth is only true if you have a > 0 number of users when the server is started. If it's true, it will expect to receive x-user-id and x-auth-token for each WADO image request it proxies.
So for some reason, your system is expecting those pieces in the header, but not receiving them. Could you restart the Meteor or node server process? It's possible at startup you had Users, but now you don't....
Are you performing the Meteor.users.find().count() query on the client or the server? Could you do it on the server, or via MongoDB (db.users.....).

Oh sorry! I do indeed have two users on MongoDB -- I added Meteor accounts for privacy purposes. I realised when I ran the db.users.find().count() in a mongo shell.
In that case, where can I add the x-user-id and x-auth-token for the WADO image requests?

In LesionTracker we have this piece of code:
https://github.com/OHIF/Viewers/blob/21054f17efc7a6ff30a57a7f2d46a0e6319227e4/LesionTracker/client/config.js#L24
We will merge this PR soon: https://github.com/OHIF/Viewers/pull/227 which will provide the same logic in the OHIF Viewer

Thank you! The images load now 🎉
The thumbnails however are still not loading, but the images still load when dragged into the main viewer. Console and network show a 400: Bad Request
{    "HttpError" : "Bad Request",    "HttpStatus" : 400,    "Message" : "Bad request",    "Method" : "GET",    "OrthancError" : "Bad request",    "OrthancStatus" : 8,    "Uri" : "/dicom-web/studies/1.2.840.113619.6.374.3652432603507851196662433166906758457/series/1.2.840.113619.2.374.2807.1588532.17317.1469023605.595/instances/1.2.840.113619.2.374.2807.1588532.13345.1469023612.895/frames/1" }

Yes I am seeing the same for WADO-RS requests. It appears that Orthanc doesn't like the quotes used when we specify content type in our WADO-RS requests.

What version of Orthanc are you using?
What version of the DICOMWeb plugin?

I'm running the latest orthanc-plugins docker image. So it looks like 1.4.0?

It seems like it's an Orthanc issue: https://bitbucket.org/sjodogne/orthanc/issues/96/dicomweb-plugin-wado-rs-retrieveframes
I would suggest just switching imageRender and thumbnailRendering to 'wadouri'.

Thank you very much!!


Advent of Code - 2024 - Day 2 (Part 1 & Part 2 complete)

Summary
This PR introduces solutions for Day 2: Red-Nosed Reports, addressing both parts of the challenge:

Part 1: Determine the number of reports where the levels are either strictly increasing or decreasing, with each adjacent level differing by at least 1 and at most 3.
Part 2: Extend the analysis by considering reports safe if removing a single level results in a sequence that meets the criteria from Part 1.

Implementation Details
Part 1: Identifying Safe Reports

Data Parsing:

Implement and leverage InputFileLoader.get_parsed_lines/1 to read and parse the input data into lists of integers.

Safety Evaluation:

Implement safe_report?/3 to assess if a report's levels are strictly increasing or decreasing.

Ensure adjacent levels differ by at least 1 and at most 3.
Counting Safe Reports:

Filter reports that meet the safety criteria and count them to obtain the result for Part 1.

Part 2: Considering the Problem Dampener

Enhanced Safety Evaluation:

Develop safe_report_with_tolerance?/3 to check if removing a single level from an unsafe report renders it safe.
Iterate through each level, remove it, and re-evaluate the modified report using safe_report?/3.

Counting Safe Reports with Tolerance:

Filter safe reports directly or after removing one level, then count them to obtain the result for Part 2.

Potential next steps

The current approach in safe_report_with_tolerance?/3 has a time complexity of O(N²) due to the use of List.delete_at/2 within a loop. It'd be great to refactor the approach with a linear approach instead of a quadratic one. (This more personal due to personal interest. The implementation ran quickly for part 2 input size.)
Adding a unit test suite for both parts.
Adding benchmarks for both parts.
Add a Livebook notebook with description, potential solutions considered, the associated script and test suite.

Similarly to https://github.com/Elixir-journey/advent-of-code/pull/1, I'll be just adding doctest for core functions that help me solve a daily challenge. More exhaustive unit tests would be a great addition in the future but not for now.
I'm taking time to go back to keep the implementation concise, readable and the intent clear with helpful refactoring. Along the way, I discovered that Elixir provides doc tests which is very useful to show how to use a function from the docs and have tests that I can run through mix test.
The goal for this repository is to have the space to solve daily challenges from the AoC efficiently which is why I'm also focusing on building tooling that I can leverage in the future to solve problems even quicker through reusable abstractions. It's not software that I am intending to deploy in production to users and therefore, some of the expectations that would come from building software 'the right way' doesn't need to apply here.
Anything other than straight scripts that solve a daily challenge with the inputs files is already pretty fantastic. I'm building tooling to ensure that the repository stays healthy and doesn't rot over time for no reason. Furthermore, it makes it easier to come back yearly to continue tackling on more challenges or from time to time, solving past challenges published on the AoC.
Final note, if anything that I do here inspires and/or helps someone with some work that they're doing with what I'm focusing on in the repository, that's a solid win for me 😊


Request info window in web ui not showing when record clicked

How to see record details in web interface? When i clicking a record row, nothing happens! Have tried different browsers, but nothing helped.

Ok, got news here, im trying to run anyproxy as module from my script, and no request info in webui appears, but when im running anyproxy from bin directory: node node_modules\anyproxy\bin\anyproxy --port 8888 request info window appears when clicking on the records. How to enable this when anyproxy used as a module?
Here is how im running it
const AnyProxy = require('anyproxy');
const options = {
  port: 8888,
  rule: require('./rule_1.js'),
  webInterface: {
    enable: true,
    webPort: 8002,
    wsPort: 8003,
  },
  throttle: 10000,
  forceProxyHttps: false,
  silent: false
};
const proxyServer = new AnyProxy.ProxyServer(options);

proxyServer.on('ready', () => { /* */ });
proxyServer.on('error', (e) => { /* */ });
proxyServer.start();

//when finished
proxyServer.close();


Feature Idea: Log results to some text file

Simple log to csv, json or similar. Think a csv table would be most easily useful, pasteable into any spreadsheet app.

Only ping interval? In single file?

I would like to be able to see the ping interval overtime, so a single file would be perfect. Maybe one file per session or per day.
I would also like to be able to capture when Pingo Meter thinks the connection was lost. It allows me to correlate connection errors on my PC with the logs in my router.

:thumbsup: for this feature, helps to show your internet provider that your connection sucks

This is actually a great idea. I constantly receive ping timeout every once in a while daily.
However, I cannot log when the ping timeout specifically happens. Since Pingometer pings actively. Might as well include the ability to log pings.


About some commands that are not included in the program code

Why can't admin create student account? Students can't see teacher profiles, class schedules, etc., can only Marksheet

Super Admins & Admins can create Student Accounts (Login as Admin > click Students > Click Admit Student).
Students can only see their profiles
Students/Teachers can only see schedules/timetables when it has been created by Admin/Super Admin. (Login as Admin/Super Admin) > Click Academics > Click Timetables.

**_Please note that the default features of this app, may not meet everyone's need, so you're free to clone the repo and modify **


Enhancement proposal: reduce code complexity, improve legends, allow non-incremental plots (for grouped bar)

Hi @piever,
When working on #91, #84 I found that the pipeline currently is too complex for me to fully grasp and also too complex to make progress on these two PRs. Since I want to use the Makie ecosystem for all my plots, I wrote a lighter version of this package (it's probably closer to StatsMakie) that fits in one Pluto notebook.
It improves on this package in the following ways

code becomes clearer: generation of plot and legend are completely disentangled
legends are created manually, solving #57, #82, #88, #83
there are two modes for plot generation: AllAtOnce and Incremental. Each plot type can specify it's own mode (but I guess Incremental will be the default). With this and  https://github.com/JuliaPlots/AbstractPlotting.jl/pull/580 we can cover grouped bar plots.
we return the main plot, legend and colorbar separately, so that the user can adjust their attributes (including position) after the fact.

What it doesn't handle

only supports data frames (no slicing context)
doesn't deal with analyses
it doesn't handle labelling of x and y axes and categorical ticks

(While 1. and 2. need some thought, 3. will be really easy to address)
Here is the notebook https://gist.github.com/greimel/7bef42c2b41dec22650f8c0262bd8b5f
here is a static preview http://htmlpreview.github.io/?https://gist.githubusercontent.com/greimel/7bef42c2b41dec22650f8c0262bd8b5f/raw/15fa97618e34a991379a47e810f3a9b39366f9b4/illustration.jl.html
and at the bottom there are some plots from the notebook.
Let me know if you like this approach then we can discuss how it can be possible to integrate this either in StatsMakie or AlgebraOfGraphics.
Please also let me know if you immediately see why this approach cannot work with the slicing approach or the composability of your AlgebraicDict.
lplot(Lines, ts_df, :t, :v; color = :g_co, layout_x = :g_la, linestyle = :g_ls, linewidth = 2)

lplot(BarPlot, bar_df, :grp_x, :y; dodge = :grp_dodge, stack =
		:grp_stack, color = :grp_stack, layout_x = :g_la)

lplot(Scatter, cs_df, :xxx, :yyy; color = :s_c, marker = :g_m,  markersize = :s_m, layout_y = :g_lx)

Really nice work! I think it's great to simplify the underlying mechanisms of AlgebraOfGraphics. It also could use some decoupling between syntax, data manipulations, and rendering (IMO, rendering is the one that should be factored out).
I would propose the following way to move forward:

your rewrite could live in its own experimental package (let's call it AoGBackend for now)
AlgebraOfGraphics could switch to using that as a backend (but users who don't like the syntax can still use AoGBackend directly)

I believe that things like grouping should not really be in AoGBackend, which should receive the data already grouped (that is, as a list of tables, each with their own key), so that other grouping strategies become possible (multidimensional slices for instance).
Analysis are not really a problem, because that's done before plotting by AlgebraOfGraphics, so you shouldn't worry about those.
The other thing is the + to combine different plots. For example, to do something like
geom = visual(Scatter) + linear
data(df) * style(x, y; kwargs...) * geom

using AoGBackend, we would need to have some sort of "incremental mode" for geometries (not within a single geometry). In particular, it needs to be able to plot! the second series on top of the first one, which may not be completely trivial in the presence of a layout. Do you think that's feasible in your implementation?

Really nice work! I think it's great to simplify the underlying mechanisms of AlgebraOfGraphics. It also could use some decoupling between syntax, data manipulations, and rendering (IMO, rendering is the one that should be factored out).
I would propose the following way to move forward:

your rewrite could live in its own experimental package (let's call it AoGBackend for now)
AlgebraOfGraphics could switch to using that as a backend (but users who don't like the syntax can still use AoGBackend directly)

I believe that things like grouping should not really be in AoGBackend, which should receive the data already grouped (that is, as a list of tables, each with their own key), so that other grouping strategies become possible (multidimensional slices for instance).
Analysis are not really a problem, because that's done before plotting by AlgebraOfGraphics, so you shouldn't worry about those.
The other thing is the + to combine different plots. For example, to do something like
geom = visual(Scatter) + linear
data(df) * style(x, y; kwargs...) * geom

using AoGBackend, we would need to have some sort of "incremental mode" for geometries (not within a single geometry). In particular, it needs to be able to plot! the second series on top of the first one, which may not be completely trivial in the presence of a layout. Do you think that's feasible in your implementation?

Thanks for your feedback!
I'll think about the +. I think what it'll boil down to is to add the layout positions to group_dict and figure out a way to merge group_dict and style_dict.
I'll comment here once I've created the package. Are there any other ideas for such a package? If we want to make it usable without AlgebraOfGraphics syntax then we probably don't want to have its abbreviation in the name, do we?
Probably TabularMakie.jl or DataMakie.jl, or so?
Any ideas @SimonDanisch, @jkrumbiegel, @mkborregaard (tagging you as my perceived spokesperson for JuliaPlots)?

Thanks for your feedback!
I'll think about the +. I think what it'll boil down to is to add the layout positions to group_dict and figure out a way to merge group_dict and style_dict.
I'll comment here once I've created the package. Are there any other ideas for such a package? If we want to make it usable without AlgebraOfGraphics syntax then we probably don't want to have its abbreviation in the name, do we?
Probably TabularMakie.jl or DataMakie.jl, or so?
Any ideas @SimonDanisch, @jkrumbiegel, @mkborregaard (tagging you as my perceived spokesperson for JuliaPlots)?

I went for  https://github.com/greimel/TabularMakie.jl

Cool! My plan is as follow. I will try to work on a simplified AlgebraOfGraphicsLight that only does the conversion from the AoG language to the TracesScalesLabels format, which consists of three things:

A list of traces (in "data coordinates")
A set of scales (discrete and continuous, I assume a unique scale across all traces for now, already "fitted" with the unique values and ranges)
A set of labels

Then there should be somewhere an implementation on plot for the TracesScalesLabels that does something sensible, and an easy way to get the legend from it (the "fitted scales" and labels should be enough to generate it).
I suspect the TabularMakie package could come very handy to render the TracesScalesLabels object and could potentially have its own way of generating that object.

Cool! My plan is as follow. I will try to work on a simplified AlgebraOfGraphicsLight that only does the conversion from the AoG language to the TracesScalesLabels format, which consists of three things:

A list of traces (in "data coordinates")
A set of scales (discrete and continuous, I assume a unique scale across all traces for now, already "fitted" with the unique values and ranges)
A set of labels

Then there should be somewhere an implementation on plot for the TracesScalesLabels that does something sensible, and an easy way to get the legend from it (the "fitted scales" and labels should be enough to generate it).
I suspect the TabularMakie package could come very handy to render the TracesScalesLabels object and could potentially have its own way of generating that object.

Sounds good!

Sounds good!

Is it possible to use the Tables.jl interface instead of full blown DataFrames? If yes, I wouldn't oppose to have this directly in AbstractPlotting ;)

Is it possible to use the Tables.jl interface instead of full blown DataFrames? If yes, I wouldn't oppose to have this directly in AbstractPlotting ;)

It might be possible yes.
I think I only need DataFrames-specific stuff twice (operation on grouped data). I could try to make it work with SplitApplyCombine.jl instead.
What's your objection to DataFrames.jl? It's almost 1.0 and it makes things really convenient.

It might be possible yes.
I think I only need DataFrames-specific stuff twice (operation on grouped data). I could try to make it work with SplitApplyCombine.jl instead.
What's your objection to DataFrames.jl? It's almost 1.0 and it makes things really convenient.

The whole purpose of the Tables interface is not having to restrict people to Dataframes, though, right?

The whole purpose of the Tables interface is not having to restrict people to Dataframes, though, right?

Is it about the restriction of inputs (I could just transform it internally) or taking the dependency?

Is it about the restriction of inputs (I could just transform it internally) or taking the dependency?

It's about the dependency, and making the same things work with any arbitrary other datatype that satisfies the table interface.
Especially since I usually avoid Dataframes in my projects... Not because I dislike it, but just because it's quite a lot to learn and my data wrangling is usually super simple :D
I just dislike learning & loading the Dataframes package, just to do a simple stacked barplot :D
But I can understand, that this may make the implementation harder, especially since it becomes much harder to dispatch on a type.  But I'd definitely try to make all recipes inside AbstractPlotting Dataframes free...And if there are strong reasons to use it, it should likely go into a package for now ;)

It's about the dependency, and making the same things work with any arbitrary other datatype that satisfies the table interface.
Especially since I usually avoid Dataframes in my projects... Not because I dislike it, but just because it's quite a lot to learn and my data wrangling is usually super simple :D
I just dislike learning & loading the Dataframes package, just to do a simple stacked barplot :D
But I can understand, that this may make the implementation harder, especially since it becomes much harder to dispatch on a type.  But I'd definitely try to make all recipes inside AbstractPlotting Dataframes free...And if there are strong reasons to use it, it should likely go into a package for now ;)

Wouldn't transforming internally also lead to copying input data in many cases?

Wouldn't transforming internally also lead to copying input data in many cases?

I think this should have its own function and not sit in the same recipe pipeline as everything else. First because table-like is not a type and Simon is right that dispatching would be hard. Second because certain recipes might want to define methods for table-like types and that would conflict. Third because the default plotting commands all return FigureAxisPlot, AxisPlot or Plot and returning a Figure with many plots and legend and colorbar breaks that default interface.

I think this should have its own function and not sit in the same recipe pipeline as everything else. First because table-like is not a type and Simon is right that dispatching would be hard. Second because certain recipes might want to define methods for table-like types and that would conflict. Third because the default plotting commands all return FigureAxisPlot, AxisPlot or Plot and returning a Figure with many plots and legend and colorbar breaks that default interface.

@SimonDanisch I would probably leave it outside AbstractPlotting for now, because developing is simpler using DataFrames. When we've made some progress we can still get rid of the dependency and port it to AbstractPlotting.
@mkborregaard that's probably true.
@jkrumbiegel Concerning return type: I agree. I think there should be two interfaces. One which looks like standard Makie and returns something that looks like standard Makie. And a second that returns legends, colorbars, etc for easy customization. (In fact there are already two different plotting functions in TabularMakie for this reason.)
Concerning input type: What about the StatsMakie approach of having a custom type Data that wraps a table object that we can dispatch on?
Thanks a lot for this discussion.

@SimonDanisch I would probably leave it outside AbstractPlotting for now, because developing is simpler using DataFrames. When we've made some progress we can still get rid of the dependency and port it to AbstractPlotting.
@mkborregaard that's probably true.
@jkrumbiegel Concerning return type: I agree. I think there should be two interfaces. One which looks like standard Makie and returns something that looks like standard Makie. And a second that returns legends, colorbars, etc for easy customization. (In fact there are already two different plotting functions in TabularMakie for this reason.)
Concerning input type: What about the StatsMakie approach of having a custom type Data that wraps a table object that we can dispatch on?
Thanks a lot for this discussion.

It's about the dependency, and making the same things work with any arbitrary other datatype that satisfies the table interface.

I have secretly hidden inside StructArrays enough table manipulations machinery as to not need DataFrames. In particular, grouping can be done using just StructArrays, which is a dependency already. There is a StructArrays.finduniquesorted that iterates unique values and their indices of a StructArray, and it can be used for groupby.

If yes, I wouldn't oppose to have this directly in AbstractPlotting ;)

IMO, there are four distinct things:

A descriptive format (kind of like the TracesScalesLabels discussed above) for these types of plot, where the data is already grouped
A sensible way to render this format (allowing to tweaks the layout and what not)
A way to generate this format from a table using StatsMakie-like or TabularMakie-like syntax
A way to generate this format from a table using AoG syntax

I guess 1 and 2 can happily live in AbstractPlotting. 3. is probably simple enough to implement using the "data wrapper" (I'm happy to help switch from DataFrames.groupby to StructArrays.finduniquesorted if we go in that direction). 4. could probably stay in AlgebraOfGraphics, which would become a purely "syntactical" package (which would help me a lot with maintenance).

It's about the dependency, and making the same things work with any arbitrary other datatype that satisfies the table interface.

I have secretly hidden inside StructArrays enough table manipulations machinery as to not need DataFrames. In particular, grouping can be done using just StructArrays, which is a dependency already. There is a StructArrays.finduniquesorted that iterates unique values and their indices of a StructArray, and it can be used for groupby.

If yes, I wouldn't oppose to have this directly in AbstractPlotting ;)

IMO, there are four distinct things:

A descriptive format (kind of like the TracesScalesLabels discussed above) for these types of plot, where the data is already grouped
A sensible way to render this format (allowing to tweaks the layout and what not)
A way to generate this format from a table using StatsMakie-like or TabularMakie-like syntax
A way to generate this format from a table using AoG syntax

I guess 1 and 2 can happily live in AbstractPlotting. 3. is probably simple enough to implement using the "data wrapper" (I'm happy to help switch from DataFrames.groupby to StructArrays.finduniquesorted if we go in that direction). 4. could probably stay in AlgebraOfGraphics, which would become a purely "syntactical" package (which would help me a lot with maintenance).

Closed by #155


FrameWidth for textures

So I tried out the texture change for the default button. I have a 300x100 texture with a 3pixel wide edge. So in the xml form I put 0.01 for FrameWidth and 0.03 for FrameHeight. But its making the edge much bigger than that. Am I doing this right?

Yes you did it right, there was a x3 factor that slipped his way in from older code version, I fixed that in the dev branch.
Feel free to grab latest from branch, also update the theme files because I made some changes there (regardless to the fix itself note that after update the frames in the HD theme will be a bit thinner - it looks much nicer this way).
I'm closing this ticket, if problem persist after update from dev branch let me know (it should be pretty stable to use atm, or you can wait for me to merge it with master).
Thanks!


[v0.12.0] List block settings

Block-level elements like lists, grids, and stacks now show themselves as blocks and are thus affected by all block properties (e.g. stroke) rather than just spacing (Breaking change)

Using
#show list: set block(height: 0pt)

solves the issue of linebreak, but list items are too close to each other. Raising the height breaks the checkmarks.

[1] Changelog

Thanks for this issue.


Snapshots: If a test fails why recompile and all tests rerun?

New Issue Checklist

[+] Updated fastlane to the latest version
[-] I have read the Contribution Guidelines

Issue Description
When just one test fails retry parameter causes to recompile the whole project and rerun all the tests.
Is it possible to rerun just the failed ones? If there would be a parameter for this it would be great.

It could be better in my opinion at least to have a flag for not to recompiling

I'd have to look into this, but I'm pretty sure that the compiling happens as part of running the tests. It should be using the build cache


Updated some docs about the asset model

Changed the wording from "digital asset model" to just "asset model" because BigchainDB can be used to track non-digital assets.
Clarified what keys are required inside the "asset" and their allowed values (see PR #1518).
Gave some concrete examples of "asset" contents for the CREATE and TRANSFER cases.
Added a link to the page about the asset model, from the page about the transaction model.
Did some general tidying up.

Codecov Report

Merging #1519 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1519   +/-   ##
=======================================
  Coverage   98.41%   98.41%
=======================================
  Files          58       58
  Lines        2779     2779
=======================================
  Hits         2735     2735
  Misses         44       44

Looks good


option: Fix merge conflict in test expectations

Commit 369e927307 ("daemon: Check that DaemonConfig is not changed after being published") added a new test case that needs to be updated when adding new configs.
Commit b7a26eb8a2 ("Add rate limiting on BPF events map") added new configs but the pull request branch didn't include commit 369e927307, thus tests passed in the pull request CI and started failing once the pull request was merged.
This pull request fixes it by updating the test expected output.
cc @siwiutki

/test


Separate $dateFormat per attribute for toJSON()

Laravel Version: 5.4.0
PHP Version: 7.0
Database Driver & Version: MySQL 5.7

Description:
I have a model which contains both dates and datetimes in the database. I access this model primarily through a REST API, using VueJS on the front-end. Therefore it's extremely convenient to, in my controller, simply return the model like so:
public function show($id)
{
    return Model::find($id);
}

The issue I run into is that the returned JSON looks something like this:
{"id": 123, "datetime_field": "2017-08-06 01:23:45", "date_field": "2017-08-06 00:00:00"}

I then try to use this in VueJS like so:
<input type="date" name="date_field" v-model="date_field" />

But the field doesn't get filled in. This is because VueJS expects a string of the form "Y-m-d" for date fields, and expects "Y-m-d H:i:s" for datetime fields.
I cannot use Laravel's protected $dateFormat property to fix this, as it similarly breaks the datetime_field
Feature Recommendation:
Extend the $dateFormat to allow a map from attribute to format. For instance:
protected $dateFormat = [
    "datetime_field" => "Y-m-d H:i:s",
    "date_field" => "Y-m-d"
];

Looking through the Eloquent code briefly, it looks like this would require extending the getDateFormat() method to take a parameter (the field for which we want the format), then any calls to getDateFormat() would need to be updated to pass this parameter.

@stevendesu answer would be the best way to incorporate this into the framework. A workaround for your current issue would be adding the following code to your model
public function getDateFieldAttribute()
{
    return (new Carbon($this->attributes['date_field']))->format('Y-m-d');
}

or even using some of the native php string functions. Make sure you also check for null values if your field is nullable.

For suggestions and feature requests please use the https://github.com/laravel/internals repo.

@Douglasdc3 Using an accessor to cast to a string actually doesn't fully solve my issue, as it hides the underlying Carbon entity. So then I'm unable to perform any logic in my controllers:
public function doSomething($model)
{
    if ($model->date_field->isToday())
    {
        // do stuff...
    }
}

This will throw an error because "string" has no method "isToday".
Of course this can be further worked around by using Carbon::parse() literally everywhere I want to perform logic on the field, but that just feels... gross.

For reference, the new issue opened in laravel/internals: https://github.com/laravel/internals/issues/719

Here's a suggested PR https://github.com/laravel/framework/pull/20463


Add support for secret-operator volumes to pod volume builder

Description
Review Checklist

[x] Code contains useful comments
[x] (Integration-)Test cases added (or not applicable)
[x] Documentation added (or not applicable)
[x] Changelog updated (or not applicable)

Thanks a lot!
In the AuthenticationClass we get a user-provided scope from the user (see below). My understanding is, that the attribute spec.protocol.ldap.bindCredentials.scope is a string and is just passed to the Pod volume, is that correct?
In that case we would need a way to just pass in the secrets.stackable.tech/scope string and skip creating Rust vectors.
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
  name: myldap
spec:
  protocol:
    ldap:
      hostname: ldap.server
      port: 389
      domain: domain.local
      bindCredentials:
        secretClass: superset-with-ldap-ldap-bind
        scope: Service

My understanding is, that the attribute spec.protocol.ldap.bindCredentials.scope is a string and is just passed to the Pod volume, is that correct?

Sort of.. the question there would be how much we want to validate in the operator vs just passing it through. We might also want to force certain scopes when we know that a service will require them.. not sure there.

Alright, i will think of a solution

I will also add some unit test as I'm working on new features for SecretOperatorVolumeSourceBuilder.
So I'm going to check that in the Review Checklist

Kinda getting mixed signals here... :P

I'm happy to merge this as is. I'm working on the "passing a scope string to SecretOperatorVolumeSourceBuilder" but will open a separate PR for that.

Alright.
bors r+


Configure required components to include in definition

I would like to configure a set of components that are required/restricted from being removed a form definition.
We will be using the form builder in our application to allow our users to add/modify a default form we've defined. Our default form will include components we require to be present, as well as fields the user may opt to remove from their form.
Required component use cases we're solving for:

A required component can be moved around on the form
A required component's properties can be edited, except for the API field as that is how we map the value during submission
A required component cannot be deleted from the form

Are there any updates or feedback I can provide on this?


Add example command to render graph as PNG

I updated the example to make it more explicit how to use the generated .dot output to render a graph as a PNG using GraphViz. I think this will help users who are not familiar with GraphViz get the examples working.

contribution welcomed. https://github.com/taoqf/javascript-state-machine

@taoqf 难道说这个项目凉了？你要自己开坑维护？我要把我的PR也提交到你那吗？

I hope not. I will merge if you commit a pr.


Please document how to import  js into a 'create-react-app' project

I'm starting usign create-react-app to create a new project.
I understand I need both
npm install semantic-ui-react --save

and
npm install semantic-ui-css --save

For the csss I can
import '../semantic/dist/semantic.min.css';

But how to import the javascript?
Also: are them dependecies or dev-dependencies ?

I'm using this in CRA, and it's quite simple. You're almost there. You just need to import the components you want to use from the semantic-ui-react module, using the ES6 import syntax.
import React, { Component } from 'react';
import { Button, Icon, Grid } from 'semantic-ui-react';

class Overview extends Component {

    render() {
        return (
            <Grid>
                <Grid.Column width={15}>

                    <p>
                        Lorem ipsum...
                    </p>
                </Grid.Column>
                <Grid.Column width={1}>

                    <Button basic circular icon="photo" floated="right" />
                    <Button basic circular icon="video" floated="right" style={{marginTop: 5}}/>
                </Grid.Column>

            </Grid>

        )
    }

}

export default ExampleComponent;

Optionally you can use the CommonJS require syntax if you're not using ES6:
var Button = require('semantic-ui-react').Button;

@andrewhl Just realized the Usage page may not be obvious to newcomers. Your comment should be included in the docs under the JavaScript section.

I will submit a PR.

Every example for every component includes fully functional import statements.  I chose to do include import statements in the browser hoping to clarify exactly this issue.   I wanted the examples to fully functional so that newcomers could copy the full example to their project and it would work exactly as is.
I can see how these could be missed during first time setup as you'd have to click the code icon on one of the examples to see them.   Can anyone comment on whether or not they saw these code examples and how they might be more helpful?
http://react.semantic-ui.com/elements/button

@levithomason I think the pattern for code examples being completely literal is great. The UI pattern to see a code example upon clicking the icon to see it expanded is also something people should be familiar with from other UI kit docs. Basically I think the current examples are great, especially for those very new to React.
I don't think there's a way to make it simpler for those new to React or ES6 syntax for using imports other than maybe a paragraph and a screenshot in the setup docs that points out the two buttons showing the React component usage and the rendered HTML.

Yes, I agree.
Every single examples is simply greatly documented.
As newbie, I thinked that with a rot for importing the css there will be a row about import a module.
The compromise could be to simply add a row explaining that we will not import  a module, but single pieces when needed (see the docs, for example [add a link to Button] ).

IS is possible to import individual components from this lib using create react app without ejecting?

@jasan-s yes, see https://github.com/Semantic-Org/Semantic-UI-React/issues/1522#issuecomment-289872383.  We support using any bundler or no bundler.
tl;dr
Probably this path would work:
import Button 'semantic-ui-react/dist/commonjs/elements/Button'

@levithomason I did try that already and got the following error:

Your import isn't correct, there is missing from keyword.

I can't get the css import to work in a new create-react-app project. Has something changed?
./src/App.js
Module not found: You attempted to import ../semantic/dist/semantic.min.css which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.

I ran into this issue today. It looks like everyone resolved this issue by just using the semantic-ui-css npm library for the import.
What about for people who want to use the whole package?
I installed the full package because I want the theming capabilities:
yarn add semantic-ui --dev

Using this generates a lot of files and directories which happens after resolving a bug regarding Semantic UI's install script and yarn. Among these generated stuff is a configuration that tells gulp to compile SUI into the dist/ folder.
The index.js file in my create-react-app looks like this:
import '../dist/semantic.min.css';

This won't work because the compiled file is outside src/. Is there another solution for this aside from moving the output directory into src/? It kind of feels silly since dist/ is supposed to be on the same level as src/, not inside of it.

@terenceponce I run my current project with a full install of SUI core because I also use the theming capabilities. When you install the core SUI project, you can pick where the output files go. Don't run the default install. Instead go through the custom install. You can also select the components you need too and get a smaller CSS package if you are not using everything.
Just change the dist folder to be in your src folder somewhere and you're good.

@brianespinosa How do you run the custom installation through Yarn? As for the location, it looks like there really is no way around putting the dist folder inside src.

@terenceponce when you FIRST install semantic-ui and you select the custom install from the options you are presented, it will create a semantic.json file based on your selections. This file will control where everything gets output when you run your gulp build. It is located in your project root. You can also create your own if you want. There's an example of this file in the core documentation here: https://semantic-ui.com/introduction/build-tools.html
These attributes control where your build files go: "output": {       // packaged source (both compressed/uncompressed)       "packaged"     : "dist/",        // uncompressed source       "uncompressed" : "dist/components/",        // compressed source       "compressed"   : "dist/components/",        // output directory for theme assets       "themes"       : "dist/themes/"     },
Setting packaged to .../src/ I assume should get you into your src folder, provided it's a sibling of dist.
There's also a root attribute called autoInstall that you can set as true (it's boolean) that will run through the installation automatically once you have everything installing and outputting where you want it. That way anyone else working on your project will never see the install process screens on a fresh install and they can't accidentally install SUI into the wrong location.
None of the above has anything to do with how SUIR works by the way. If you require additional help with customizing the build location of your SUI core package, you'll receive better help in the core repository... but hopefully this gets you what you need.


Add tags to questions. Add ability to choose questions set by selection of tags

Need to design, how it should looks like


Updating not happening on init_plugin function

Hi guys,
I am writing a plugin and I will like to launch the timed_function update to be triggered at the initialization of the Entity class, e.g.
class TestPlugin(Entity):

    """Test plugin"""

    def __init__(self):
        # Initializing parent class bluesky.core Entity
        super().__init__()
        self.update()

   @timed_function(name="TESTPLUGIN", dt=1)
   def update(self):
        """Updating function"""
       print("Updating ...")

This is a snippet of the plugin but the instruction print("Updating ...") is only executed when a command is sent, e.g. creating an aircraft or else and not in the initialization of the plugin. So I was wondering if you can provide an alternative to kickoff the updating process at object initilization.
I appreciate your help. Thank you

@leonardocfor I came across this and thought I'd have a look at it. I can get updating to run with the following code. The text appears before the Successfully loaded plugin TEST.  This also sits in a file ./plugins/test.py. Hope this helps.
""" BlueSky plugin template. The text you put here will be visible
    in BlueSky as the description of your plugin. """
from bluesky import core, stack, traf  #, settings, navdb, sim, scr, tools

### Initialization function of your plugin. Do not change the name of this
### function, as it is the way BlueSky recognises this file as a plugin.
def init_plugin():
    ''' Plugin initialisation function. '''
    # Instantiate our example entity
    test = Test()

    # Configuration parameters
    config = {
        # The name of your plugin
        'plugin_name':     'TEST',

        # The type of this plugin. For now, only simulation plugins are possible.
        'plugin_type':     'sim',
        }

    # init_plugin() should always return a configuration dict.
    return config

class Test(core.Entity):
    ''' Example new entity object for BlueSky. '''
    def __init__(self):
        super().__init__()
        self.update()

    # Functions that need to be called periodically can be indicated to BlueSky
    # with the timed_function decorator
    @core.timed_function(name='test', dt=5)
    def update(self):
        """Updating function"""
        print("Updating ...")

Hi @leonardocfor,
To add to @Ellislee1 's answer: Don't forget to instantiate your Test class (typically in the init_plugin function), and note that periodic functions are only triggered when the simulation is in Operate mode (so not in Hold, which is what you have when you start up BlueSky).

Hi @Ellislee1 and @jooste,
Thank you for your prompt reply. I confirm that the update function is executed upon the class initialization. However, to your comment @jooste, how can I force the simulation to go to Operate mode? i.e. without having to send a command or else to kick off the simulation. I ask this because we need to allow constant checking of a remote API in the update function.

You could do the following:
from bluesky import sim

def init_plugin():
    ...
    sim.op()


I made the 2nd round of EDA, descriptive and relational statistics pl…

…us risk ratios for cancer positives, I used chi2 contingency instead of correlation matrix due to categorical scaling.
Of course, the plotting can always be more beautiful.

Is there a way to link this commit with the right issue on the kanban  board, still?


support es6.x with rest high level client？

es6.x later ,officeal suggest use rest hign level client to replace other client

After 6.0.0-alpha releases, you will have this. In 5.x, I don't know anyone is working on this.