Driver Locks itself out

Describe the bug
So, i have two Daly BMS connected via USB-TTL to a Cebro (v3.11) and Running the Newest version of dbus-serialbattery to this time.
Problem i found is: My System is discharged right now (BatteryLive cuts at 45%, ESS#1 ESS#2) and no Charge or Discharge happening. BMS going to Sleep after roughly 2 hours. When it Happens, i get

2023-11-01 04:09:01.055014500 INFO:SerialBattery:Testing Daly
2023-11-01 04:09:01.195127500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:01.696791500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0

when this happens its Blocking Charging and Discharging from the whole System, MPPT, Multiplus etc.
So it cannot start anymore until there is some Current on the BMS. It Locks itself out.
In config.ini i set
BLOCK_ON_DISCONNECT = False
wich should prevent this or am i wrong?
How to reproduce
Have A empty Battery
ESS blocks Discharge
BMS goes to Sleep
dbus-serialbattery can't read any Data from BMS
Cebro makes constant Alarm
dbus-serialbattery blocks charge and discharge
System Locked out
Expected behavior
no Blockage because i set BLOCK_ON_DISCONNECT to False
Driver version
1.0.20230531
Venus OS device type
Cerbo GX
Venus OS version
v3.11
BMS type
Daly Smart BMS
Cell count
4
Connection type
Serial USB adapter to TTL
Config file
[DEFAULT]

; --------- Battery Current limits ---------
MAX_BATTERY_CHARGE_CURRENT    = 100.0
MAX_BATTERY_DISCHARGE_CURRENT = 200.0

; --------- Cell Voltages ---------
; Description: Cell min/max voltages which are used to calculate the min/max battery voltage
; Example: 16 cells * 3.45V/cell = 55.2V max charge voltage. 16 cells * 2.90V = 46.4V min discharge voltage
MIN_CELL_VOLTAGE   = 2.900
; Max voltage can seen as absorption voltage
MAX_CELL_VOLTAGE   = 3.500
FLOAT_CELL_VOLTAGE = 3.375

; --------- BMS disconnect behaviour ---------
; Description: Block charge and discharge when the communication to the BMS is lost. If you are removing the
;              BMS on purpose, then you have to restart the driver/system to reset the block.
; False: Charge and discharge is not blocked on BMS communication loss
; True: Charge and discharge is blocked on BMS communication loss, it's unblocked when connection is established
;       again or the driver/system is restarted
BLOCK_ON_DISCONNECT = False

; --------- Charge mode ---------
; Choose the mode for voltage / current limitations (True / False)
; False is a step mode: This is the default with limitations on hard boundary steps
; True is a linear mode:
;     For CCL and DCL the values between the steps are calculated for smoother values (by WaldemarFech)
;     For CVL max battery voltage is calculated dynamically in order that the max cell voltage is not exceeded
LINEAR_LIMITATION_ENABLE = True

; Specify in seconds how often the linear values should be recalculated
LINEAR_RECALCULATION_EVERY = 30

; Specify in percent when the linear values should be recalculated immediately
; Example: 5 for a immediate change, when the value changes by more than 5%
LINEAR_RECALCULATION_ON_PERC_CHANGE = 5

; --------- Charge Voltage limitation (affecting CVL) ---------
; Description: Limit max charging voltage (MAX_CELL_VOLTAGE * cell count), switch from max voltage to float
;              voltage (FLOAT_CELL_VOLTAGE * cell count) and back
;     False: Max charging voltage is always kept
;     True: Max charging voltage is reduced based on charge mode
;         Step mode: After max voltage is reached for MAX_VOLTAGE_TIME_SEC it switches to float voltage. After
;                    SoC is below SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT it switches back to max voltage.
;         Linear mode: After max voltage is reachend and cell voltage difference is smaller or equal to
;                      CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL it switches to float voltage after 300 (fixed)
;                      additional seconds.
;                      After cell voltage difference is greater or equal to CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT
;                      OR
;                      SoC is below SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT
;                      it switches back to max voltage.
; Example: The battery reached max voltage of 55.2V and hold it for 900 seconds, the the CVL is switched to
;          float voltage of 53.6V to don't stress the batteries. Allow max voltage of 55.2V again, if SoC is
;          once below 90%
;          OR
;          The battery reached max voltage of 55.2V and the max cell difference is 0.010V, then switch to float
;          voltage of 53.6V after 300 additional seconds to don't stress the batteries. Allow max voltage of
;          55.2V again if max cell difference is above 0.080V or SoC below 90%.
; Charge voltage control management enable (True/False).
CVCM_ENABLE = True

; -- CVL reset based on cell voltage diff (linear mode)
; Specify cell voltage diff where CVL limit is kept until diff is equal or lower
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = 0.010

; Specify cell voltage diff where CVL limit is reset to max voltage, if value get above
; the cells are considered as imbalanced, if the cell diff exceeds 5% of the nominal cell voltage
; e.g. 3.2 V * 5 / 100 = 0.160 V
CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT = 0.080

; -- CVL reset based on SoC option (step mode)
; Specify how long the max voltage should be kept, if reached then switch to float voltage
MAX_VOLTAGE_TIME_SEC = 7200

; Specify SoC where CVL limit is reset to max voltage, if value gets below
SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT = 90

; Charge current control management referring to cell-voltage enable (True/False).
CCCM_CV_ENABLE = True
; Discharge current control management referring to cell-voltage enable (True/False).
DCCM_CV_ENABLE = True

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
CELL_VOLTAGES_WHILE_CHARGING   = 3.55, 3.50, 3.45, 3.30
MAX_CHARGE_CURRENT_CV_FRACTION =    0, 0.05,  0.5,    1

CELL_VOLTAGES_WHILE_DISCHARGING   = 2.70, 2.80, 2.90, 3.10
MAX_DISCHARGE_CURRENT_CV_FRACTION =    0,  0.1,  0.5,    1

; --------- Temperature limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be in-/decreased depending on temperature
; Example: The temperature limit will be monitored to control the currents. If there are two temperature senors,
;          then the worst case will be calculated and the more secure lower current will be set.
; Charge current control management referring to temperature enable (True/False).
CCCM_T_ENABLE = True
; Charge current control management referring to temperature enable (True/False).
DCCM_T_ENABLE = True

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
TEMPERATURE_LIMITS_WHILE_CHARGING = 0,   2,   5,  10,  15, 20, 35,  40, 55
MAX_CHARGE_CURRENT_T_FRACTION     = 0, 0.1, 0.2, 0.4, 0.8,  1,  1, 0.4,  0

TEMPERATURE_LIMITS_WHILE_DISCHARGING = -20,   0,   5,  10, 15, 45, 55
MAX_DISCHARGE_CURRENT_T_FRACTION     =   0, 0.2, 0.3, 0.4,  1,  1,  0

; --------- SOC limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be increased / decreased depending on State of Charge,
;              see CC_SOC_LIMIT1 etc.
; Example: The SoC limit will be monitored to control the currents.
; Charge current control management enable (True/False).
CCCM_SOC_ENABLE = False
; Discharge current control management enable (True/False).
DCCM_SOC_ENABLE = False

; Charge current soc limits
CC_SOC_LIMIT1 = 98
CC_SOC_LIMIT2 = 95
CC_SOC_LIMIT3 = 91

; Charge current limits
CC_CURRENT_LIMIT1_FRACTION = 0.1
CC_CURRENT_LIMIT2_FRACTION = 0.3
CC_CURRENT_LIMIT3_FRACTION = 0.5

; Discharge current soc limits
DC_SOC_LIMIT1 = 10
DC_SOC_LIMIT2 = 20
DC_SOC_LIMIT3 = 30

; Discharge current limits
DC_CURRENT_LIMIT1_FRACTION = 0.1
DC_CURRENT_LIMIT2_FRACTION = 0.3
DC_CURRENT_LIMIT3_FRACTION = 0.5

TIME_TO_GO_ENABLE = False

; --------- Time-To-Soc ---------
; Description: Calculates the time to a specific SoC
; Example: TIME_TO_SOC_POINTS = 50, 25, 15, 0
;          6h 24m remaining until 50% SoC
;          17h 36m remaining until 25% SoC
;          22h 5m remaining until 15% SoC
;          28h 48m remaining until 0% SoC
; Set of SoC percentages to report on dbus and MQTT. The more you specify the more it will impact system performance.
; [Valid values 0-100, comma separated list. More that 20 intervals are not recommended]
; Example: TIME_TO_SOC_POINTS = 100, 95, 90, 85, 75, 50, 25, 20, 10, 0
; Leave empty to disable
TIME_TO_SOC_POINTS =
; Specify TimeToSoc value type [Valid values 1, 2, 3]
; 1 Seconds
; 2 Time string <days>d <hours>h <minutes>m <seconds>s
; 3 Both seconds and time string "<seconds> [<days>d <hours>h <minutes>m <seconds>s]"
TIME_TO_SOC_VALUE_TYPE = 1
; Specify in seconds how often the TimeToSoc should be recalculated
; Minimum are 5 seconds to prevent CPU overload
TIME_TO_SOC_RECALCULATE_EVERY = 60
; Include TimeToSoC points when moving away from the SoC point [Valid values True, False]
; These will be as negative time. Disabling this improves performance slightly
TIME_TO_SOC_INC_FROM = False

; --------- Additional settings ---------
; Specify only one BMS type to load else leave empty to try to load all available
; -- Available BMS:
; Daly, Ecs, HeltecModbus, HLPdataBMS4S, Jkbms, Lifepower, LltJbd, Renogy, Seplos
; -- Available BMS, but disabled by default:
; https://louisvdw.github.io/dbus-serialbattery/general/install#how-to-enable-a-disabled-bms
; Ant, MNB, Sinowealth
BMS_TYPE =

; Publish the config settings to the dbus path "/Info/Config/"
PUBLISH_CONFIG_VALUES = 1

; Select the format of cell data presented on dbus [Valid values 0,1,2,3]
; 0 Do not publish all the cells (only the min/max cell data as used by the default GX)
; 1 Format: /Voltages/Cell (also available for display on Remote Console)
; 2 Format: /Cell/#/Volts
; 3 Both formats 1 and 2
BATTERY_CELL_DATA_FORMAT = 1

; Simulate Midpoint graph (True/False).
MIDPOINT_ENABLE = False

; Battery temperature
; Specify how the battery temperature is assembled
; 0 Get mean of temperature sensor 1 to sensor 4
; 1 Get only temperature from temperature sensor 1
; 2 Get only temperature from temperature sensor 2
; 3 Get only temperature from temperature sensor 3
; 4 Get only temperature from temperature sensor 4
TEMP_BATTERY = 0

; Temperature sensor 1 name
TEMP_1_NAME = Temp 1

; Temperature sensor 2 name
TEMP_2_NAME = Temp 2

; Temperature sensor 2 name
TEMP_3_NAME = Temp 3

; Temperature sensor 2 name
TEMP_4_NAME = Temp 4

; --------- BMS specific settings ---------

; -- LltJbd settings
; SoC low levels
; NOTE: SOC_LOW_WARNING is also used to calculate the Time-To-Go even if you are not using a LltJbd BMS
SOC_LOW_WARNING = 20
SOC_LOW_ALARM   = 10

; -- Daly settings
; Battery capacity (amps), if the BMS does not support reading it
BATTERY_CAPACITY = 180
; Invert Battery Current. Default non-inverted. Set to -1 to invert
INVERT_CURRENT_MEASUREMENT = -1

; -- ESC GreenMeter and Lipro device settings
;GREENMETER_ADDRESS  = 1
;LIPRO_START_ADDRESS = 2
;LIPRO_END_ADDRESS   = 4
;LIPRO_CELL_COUNT = 15

; -- HeltecModbus (Heltec SmartBMS/YYBMS) settings
; Set the Modbus addresses from the adapters
; Separate each address to check by a comma like: 1, 2, 3, ...
; factory default address will be 1
;HELTEC_MODBUS_ADDR = 1

; --------- Battery monitor specific settings ---------
; If you are using a SmartShunt or something else as a battery monitor, the battery voltage reported
; from the BMS and SmartShunt could differ. This causes, that the driver never goapplies the float voltage,
; since max voltage is never reached.
; Example:
;     cell count: 16
;     MAX_CELL_VOLTAGE = 3.45
;     max voltage calculated = 16 * 3.45 = 55.20
;     CVL is set to 55.20 and the battery is now charged until the SmartShunt measures 55.20 V. The BMS
;     now measures 55.05 V since there is a voltage drop of 0.15 V. Since the dbus-serialbattery measures
;     55.05 V the max voltage is never reached for the driver and max voltage is kept forever.
;     Set VOLTAGE_DROP to 0.15
VOLTAGE_DROP = 0.15

Relevant log output
2023-11-02 15:42:48.951594500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-02 15:42:48.953165500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-11-02 15:42:48.953926500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:49.140213500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:49.141072500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:49.325289500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:49.826930500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:50.010344500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:50.011132500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:50.199247500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:50.701492500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:50.891926500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:50.892721500 INFO:SerialBattery:Testing Daly
2023-11-02 15:42:51.077598500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:42:51.579313500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2023-11-02 15:42:51.579573500

2023-10-29 16:37:52.524776500 *** CCGX booted (0) ***
2023-11-01 03:54:48.492646500 *** CCGX booted (0) ***
2023-11-01 04:08:59.332642500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-01 04:08:59.334046500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-11-01 04:08:59.335082500 INFO:SerialBattery:Testing Daly
2023-11-01 04:08:59.479289500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:08:59.480330500 INFO:SerialBattery:Testing Daly
2023-11-01 04:08:59.621751500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:00.123469500 INFO:SerialBattery:Testing Daly
2023-11-01 04:09:00.265162500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:00.265942500 INFO:SerialBattery:Testing Daly
2023-11-01 04:09:00.411302500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:00.913090500 INFO:SerialBattery:Testing Daly
2023-11-01 04:09:01.054251500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:01.055014500 INFO:SerialBattery:Testing Daly
2023-11-01 04:09:01.195127500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-01 04:09:01.696791500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0
2023-11-01 04:09:01.697054500
2023-11-01 04:11:44.474796500 *** CCGX booted (0) ***
2023-11-01 08:55:22.409839500 *** CCGX booted (0) ***
2023-11-01 09:02:36.509128500 *** CCGX booted (0) ***
2023-11-01 09:26:03.470561500 *** CCGX booted (0) ***

2023-11-02 15:43:21.608785500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-02 15:43:21.610194500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-11-02 15:43:21.610854500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:21.796706500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:21.797921500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:21.981310500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:22.482962500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:22.675065500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:22.675815500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:22.859502500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:23.361110500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:23.545174500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:23.546010500 INFO:SerialBattery:Testing Daly
2023-11-02 15:43:23.730345500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-02 15:43:24.231817500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB2
2023-11-02 15:43:24.232065500

2023-11-02 15:40:07.439686500 INFO: Start service vedirect-interface.ttyUSB2 once
2023-11-02 15:40:12.715888500 INFO: Start service gps-dbus.ttyUSB1 once
2023-11-02 15:40:13.931690500 INFO: Start service dbus-serialbattery.ttyUSB2 once
2023-11-02 15:40:19.250256500 INFO: Start service dbus-cgwacs.ttyUSB2 once
2023-11-02 15:40:22.492558500 INFO: Start service vedirect-interface.ttyUSB1 once
2023-11-02 15:40:27.811062500 INFO: Start service dbus-serialbattery.ttyUSB1 once
2023-11-02 15:40:33.113705500 INFO: Start service dbus-cgwacs.ttyUSB1 once
2023-11-02 15:40:44.688612500 INFO: Start service gps-dbus.ttyUSB2 once
2023-11-02 15:40:54.037263500 INFO: Start service vedirect-interface.ttyUSB2 once
2023-11-02 15:40:59.342184500 INFO: Start service gps-dbus.ttyUSB1 once
2023-11-02 15:41:00.573912500 INFO: Start service dbus-serialbattery.ttyUSB2 once
2023-11-02 15:41:05.887997500 INFO: Start service dbus-cgwacs.ttyUSB2 once
2023-11-02 15:41:09.164008500 INFO: Start service vedirect-interface.ttyUSB1 once
2023-11-02 15:41:14.457211500 INFO: Start service dbus-serialbattery.ttyUSB1 once
2023-11-02 15:41:19.799648500 INFO: Start service dbus-cgwacs.ttyUSB1 once
2023-11-02 15:41:31.302098500 INFO: Start service gps-dbus.ttyUSB2 once
2023-11-02 15:41:40.683701500 INFO: Start service vedirect-interface.ttyUSB2 once
2023-11-02 15:41:45.954184500 INFO: Start service gps-dbus.ttyUSB1 once
2023-11-02 15:41:47.223655500 INFO: Start service dbus-serialbattery.ttyUSB2 once
2023-11-02 15:41:52.491059500 INFO: Start service dbus-cgwacs.ttyUSB2 once
2023-11-02 15:41:55.750414500 INFO: Start service vedirect-interface.ttyUSB1 once
2023-11-02 15:42:01.034988500 INFO: Start service dbus-serialbattery.ttyUSB1 once
2023-11-02 15:42:06.348616500 INFO: Start service dbus-cgwacs.ttyUSB1 once
2023-11-02 15:42:17.762081500 INFO: Start service gps-dbus.ttyUSB2 once
2023-11-02 15:42:27.109699500 INFO: Start service vedirect-interface.ttyUSB2 once
2023-11-02 15:42:32.401768500 INFO: Start service gps-dbus.ttyUSB1 once
2023-11-02 15:42:33.609673500 INFO: Start service dbus-serialbattery.ttyUSB2 once
2023-11-02 15:42:38.923130500 INFO: Start service dbus-cgwacs.ttyUSB2 once
2023-11-02 15:42:42.267878500 INFO: Start service vedirect-interface.ttyUSB1 once
2023-11-02 15:42:47.571962500 INFO: Start service dbus-serialbattery.ttyUSB1 once

Any other information that may be helpful
No response

Did you try the latest nightly from the dev branch?

Search a bit in the issues and discussions. For Daly you have to set in the Daly BMS settings a specific value very high.

Search a bit in the issues and discussions. For Daly you have to set in the Daly BMS settings a specific value very high.

I tried this. I looked through the Issues and found something.
https://github.com/Louisvdw/dbus-serialbattery/issues/731
I tried to set it to this number, but it won't write the value on either of the Daly BMS (I don't even know what BMS version this is. I can't even find pictures online)
I can write 60000 in the sleep value, and it writes; however, if I read the reported parameter, it only shows 13920, and that's around 4 Hours. I tried it with two different versions of the PC Master Software, but it's the same story.
I bought the batteries with BMS from a guy in Austria who used them. I even considered buying a new BMS like the JK BMS B2A8S20P and replacing the Dalys. As far as I have seen (I already have 2 for Testing purposes, and one is in my smaller Portable battery Bank), they only sleep once the Battery is empty and hits the shutdown voltage.

Maybe you can upgrade the firmware.

Maybe you can upgrade the firmware.

I considered this around a year ago because i got Bluetooth Modules for the Daly BMS but couldn't get it to work. Tried so much and even asked Daly support wich was hard to find.
Yesterday i ordered the B2A8S20P from JK and i will replace the Daly with them. I hope everything works then.


Add More typing and fix linter

Some assorted changes that should make contributing a bit easier:

I improved typing for most often-used functions, like the XPaths ones, context-related etcetera with js-doc. This improves autocomplete a lot.
I also refactored the mixin ForeElementMixin to just use inheritance from HTMLElement. This makes it easier to type. I'm now getting autocompletes with the visual-studio code language server (through emacs) on the this.* fields of Fore components that inherit from ForeElement.
The linter is upgraded to eslint 9, the newest. This required moving the config to its own file (eslint.config.mjs) and some adapting of the open-wc eslint-config.
Merge eslint and prettier together by using the correct plugins

seems cypress tests are not liking it


Allow duplicate update requests

What was changed

These may be duplicated due to upstream retry behavior.
Why?

If the specified update has already scheduled the request down toward the user workflow code, just drop any additional requests - they are by definition the same value or the client is being naughty.
Checklist

Closes

How was this tested:

Unit test modifications

Any docs updates needed?

No

Per @bergundy prefer to fail here


[release] exception on mac packaging release builder

Mac packaging_release_builder encountered an uncaught exception during the 3.10.1 stable hotfix release. Seems like an assertion error was reported.
example recipe exception

This is caused by duplicated dimensions coming from dimensions and drone_dimensions. Drone dimensions need to replace top level dimensions on duplicates.

Fix: https://flutter-review.googlesource.com/c/recipes/+/44741


Added pre-commit configuration for linting

Added configuration for pre-commit, using black, isort, and autoflake for linting.

@johnny423 added to readme


feat: support filter in count rows

Codecov Report
Attention: Patch coverage is 27.50000% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 80.98%. Comparing base (3c235de) to head (47bdf4d).

Files
Patch %
Lines

rust/lance/src/dataset.rs
61.11%
0 Missing and 7 partials :warning:

rust/lance/src/dataset/fragment.rs
0.00%
0 Missing and 7 partials :warning:

rust/lance/src/io/commit/external_manifest.rs
0.00%
0 Missing and 5 partials :warning:

java/core/lance-jni/src/blocking_dataset.rs
0.00%
2 Missing :warning:

rust/lance/src/dataset/write/merge_insert.rs
0.00%
0 Missing and 2 partials :warning:

java/core/lance-jni/src/lib.rs
0.00%
1 Missing :warning:

rust/lance/src/bin/lq.rs
0.00%
1 Missing :warning:

rust/lance/src/dataset/cleanup.rs
0.00%
0 Missing and 1 partial :warning:

rust/lance/src/index.rs
0.00%
0 Missing and 1 partial :warning:

rust/lance/src/index/vector/ivf.rs
0.00%
1 Missing :warning:

... and 1 more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2146      +/-   ##
==========================================
- Coverage   80.99%   80.98%   -0.01%
==========================================
  Files         167      167
  Lines       48775    48782       +7
  Branches    48775    48782       +7
==========================================
+ Hits        39503    39505       +2
+ Misses       6963     6962       -1
- Partials     2309     2315       +6

Flag
Coverage Δ

unittests
80.98% <27.50%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Index dt properties

Two changes

Add hour, minute, etc. properties to dd.Index
Clean up the DatetimeAccessor and StringAccessor classes

Merging soon if no comments


Quantization seems to be doesn't produce good accuracy ? Are there additional settings I missed?

So I tried running your code on my dataset with a pre-trained ResNet50 model. I got these results
Full precision model i got accuracy of : MobileNetV2 (58.19)
Quantized model (W8A8) i got accuracy of : MobileNetV2 (12.02)
Quantized model (W6A6) i got accuracy of : MobileNetV2 (10.12)
Full precision model i got accuracy of : ResNet-50 (65.16)
Quantized model (W8A8) i got accuracy of : ResNet-50 (13.22)
Quantized model (W6A6) i got accuracy of : ResNet-50 (11.02)

https://github.com/yhhhli/BRECQ/blob/main/main_imagenet.py#L201C1-L229C87
My accuracy however does not come nearly as close to the float model which is around 58.19% and 65.16% but after quantization
Are there additional settings I missed?

Hi, @mj0219 sorry, for later reply ! Could you share you model after quantization? The potentially issue can be related to batch-normal quantization process! Therefore, could share your model after quantization? I want to see batch-normal quantization  result!


BLE communication

Hello all, I am doing a project of using BLE to transmitter audio between two ESP32, I tried the examples in ESP32_BLE_Arduino. I use one board as a server and another as a client. The server connects with a microphone and the client connects with a speaker .
I have tried to read value of microphone and write the value to a speaker in a same ESP32 board, and it works very well, but when I tried to  separate mic and speaker and connect them with bluetooth, problem occurs. The speaker can react to the mic, but can't make smooth voice, so I tried to find the problems.
I find the BLE server can read the value of mic and send it to BLE client about 10000 times in  a second, that is to say, the sample frequency is about 10KHz, which can basically meet the needs, but in BLE client, 1000 times of reading the data received from server will take about 30s, the frequency is about 30Hz, this caused a huge data lose, so the voice is very strange.
ps: I use the official example of ESP32, when I  delete the read-value code of BLE client, it will run very fast, so I am sure this is the problem.
Can anyone help me to solve this problem? Any suggestion is admired.
this is the code, just changed a little.
the server
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <driver/adc.h>

BLECharacteristic *pCharacteristic;

// See the following for generating UUIDs:
// https://www.uuidgenerator.net/

#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

void setup() {

  Serial.begin(115200);
  Serial.println("Starting BLE work!");

  BLEDevice::init("ESP");
  BLEServer *pServer = BLEDevice::createServer();
  BLEService *pService = pServer->createService(SERVICE_UUID);
  pCharacteristic = pService->createCharacteristic(
                                         CHARACTERISTIC_UUID,
                                         BLECharacteristic::PROPERTY_READ |
                                         BLECharacteristic::PROPERTY_WRITE
                                       );

  //pCharacteristic->setValue("Hello World says Neil");
  pService->start();
  BLEAdvertising *pAdvertising = pServer->getAdvertising();
  pAdvertising->addServiceUUID(pService->getUUID());
  pAdvertising->start();
  //Serial.println("Characteristic defined! Now you can read it in your phone!");
}

void loop() {
  //ADC, ADC1_CHANNEL_5 is GPIO33, 12bits, 0db->full 1.1V
  adc1_config_width(ADC_WIDTH_12Bit);
  adc1_config_channel_atten(ADC1_CHANNEL_5,ADC_ATTEN_0db);
  int val = adc1_get_voltage(ADC1_CHANNEL_5);
  //Serial.println(val);

  char txString0[10];
  dtostrf(val, 1, 2, txString0);
  pCharacteristic->setValue(txString0);

  //to calculate the speed of sample
  /*
   static int time1 = millis();
    static int i = 0;
    i++;
    if (i == 10000)
      Serial.println(millis()-time1);
  */

}

the client
#include <cstdlib>
#include <string>
//#include <driver/dac.h>
#include "BLEDevice.h"
//#include "BLEScan.h"

// The remote service we wish to connect to.
static BLEUUID serviceUUID("4fafc201-1fb5-459e-8fcc-c5c9c331914b");
// The characteristic of the remote service we are interested in.
static BLEUUID    charUUID("beb5483e-36e1-4688-b7f5-ea07361b26a8");

static BLEAddress *pServerAddress;
static boolean doConnect = false;
static boolean connected = false;

static BLERemoteCharacteristic* pRemoteCharacteristic;

static void notifyCallback(
  BLERemoteCharacteristic* pBLERemoteCharacteristic,
  uint8_t* pData,
  size_t length,
  bool isNotify) {
    Serial.print("Notify callback for characteristic ");
    Serial.print(pBLERemoteCharacteristic->getUUID().toString().c_str());
    Serial.print(" of data length ");
    Serial.println(length);
}

bool connectToServer(BLEAddress pAddress) {
    Serial.print("Forming a connection to ");
    Serial.println(pAddress.toString().c_str());

    BLEClient*  pClient  = BLEDevice::createClient();
    Serial.println(" - Created client");

    // Connect to the remove BLE Server.
    pClient->connect(pAddress);
    Serial.println(" - Connected to server");

    // Obtain a reference to the service we are after in the remote BLE server.
    BLERemoteService* pRemoteService = pClient->getService(serviceUUID);
    if (pRemoteService == nullptr) {
      Serial.print("Failed to find our service UUID: ");
      Serial.println(serviceUUID.toString().c_str());
      return false;
    }
    Serial.println(" - Found our service");

    // Obtain a reference to the characteristic in the service of the remote BLE server.
    pRemoteCharacteristic = pRemoteService->getCharacteristic(charUUID);
    if (pRemoteCharacteristic == nullptr) {
      Serial.print("Failed to find our characteristic UUID: ");
      Serial.println(charUUID.toString().c_str());
      return false;
    }
    Serial.println(" - Found our characteristic");

    // Read the value of the characteristic.
    //std::string value = pRemoteCharacteristic->readValue();
    //Serial.print("The characteristic value was: ");
    //Serial.println(value.c_str());

    pRemoteCharacteristic->registerForNotify(notifyCallback);
}
/**
 * Scan for BLE servers and find the first one that advertises the service we are looking for.
 */
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
 /**
   * Called for each advertising BLE server.
   */
  void onResult(BLEAdvertisedDevice advertisedDevice) {
    Serial.print("BLE Advertised Device found: ");
    Serial.println(advertisedDevice.toString().c_str());

    // We have found a device, let us now see if it contains the service we are looking for.
    if (advertisedDevice.haveServiceUUID() && advertisedDevice.getServiceUUID().equals(serviceUUID)) {

      //
      Serial.print("Found our device!  address: ");
      advertisedDevice.getScan()->stop();

      pServerAddress = new BLEAddress(advertisedDevice.getAddress());
      doConnect = true;

    } // Found our server
  } // onResult
}; // MyAdvertisedDeviceCallbacks

void setup() {
  Serial.begin(115200);
  Serial.println("Starting Arduino BLE Client application...");
  BLEDevice::init("");

  // Retrieve a Scanner and set the callback we want to use to be informed when we
  // have detected a new device.  Specify that we want active scanning and start the
  // scan to run for 30 seconds.
  BLEScan* pBLEScan = BLEDevice::getScan();
  pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
  pBLEScan->setActiveScan(true);
  pBLEScan->start(30);

} // End of setup.

// This is the Arduino main loop function.
void loop() {

  // If the flag "doConnect" is true then we have scanned for and found the desired
  // BLE Server with which we wish to connect.  Now we connect to it.  Once we are
  // connected we set the connected flag to be true.
  if (doConnect == true) {
    if (connectToServer(*pServerAddress)) {
      Serial.println("We are now connected to the BLE Server.");
      connected = true;
    } else {
      Serial.println("We have failed to connect to the server; there is nothing more we will do.");
    }
    doConnect = false;
  }

  // If we are connected to a peer BLE Server, update the characteristic each time we are reached
  // with the current time since boot.
 /* if (connected) {
    String newValue = "Time since boot: " + String(millis()/1000);
    Serial.println("Setting new characteristic value to \"" + newValue + "\"");

    // Set the characteristic's value to be the array of bytes that is actually a string.
    //pRemoteCharacteristic->writeValue(newValue.c_str(), newValue.length());

  }*/
  if (connected) {

    std::string str = pRemoteCharacteristic->readValue();
    //int number = std::atoi( str.c_str() );
    //int output = map(number, 0, 4095, 0, 255);
    //Serial.println(output);
    //dacWrite(25, output);

    /*static int time1 = millis();
    static int i = 0;
    i++;
    if (i == 10000)
      Serial.println(millis()-time1);*/
  }

  //delay(50); // Delay a second between loops.
}

Hi,
first suggestion is to set mtu value to about 500 (512 max). Second suggestion is to use classic bluetooth instead. Bluetooth LE is designed to transfer small amount of data, so sending audio data can be hard or even impossible to achieve.

Yeah, that is the problem. I find that BLE can't transfer large data such as audio, but there is not enough example in esp32 arduino of classic bluetooth, just an example of BluetoothSerial. Do you know other examples of classic bluetooth? Thanks.

https://github.com/kodera2t/ESP32_OLED_webradio
https://github.com/MrBuddyCasino/ESP32_MP3_Decoder

@mingshima is this still an issue? If it is solved, could you please close it to keep the issue list clean?
cc @chegewara


can this work with hooks? And if so, what would i change?

I have an app that is built with context and hooks, and i am curious wether i could used the progress slider with hooks, and useState, and if so, what would need to change...not quite sure how it works, really.

Have you run into any troubles, or are you wondering about hooks in general?

well, i have a music player for a Gatsby site, with everything built and working fine, except the progress slider and volume control...the player is based upon this article:
https://upmostly.com/tutorials/how-to-use-the-usecontext-hook-in-react
I have even managed how to figure out how to add the currentTime and duration as well, and I am now stuck on how to add a progress bar/ slider, which updates based on the progress of the current song, and then also allows the user to jump to any point in the song and the playback updates to that point.
The example is using context and hooks, with a custom useMusicPlayer hook, like so:
const useMusicPlayer = () => {
  const [state, setState] = useContext(MusicPlayerContext)

  // query all mp3 and jpg files from /content/music/
  const assets = useStaticQuery(graphql`
    query Assets {
      allFile(
        filter: {
          extension: { in: ["mp3", "jpg"] }
          absolutePath: { regex: "/content/music/" }
        }
      ) {
        edges {
          node {
            publicURL
            relativePath
          }
        }
      }
    }
  `)
  // convert to obj for fast lookup
  const assetObj = useMemo(
    () =>
      assets.allFile.edges.reduce((obj, file) => {
        const { publicURL, relativePath } = file.node

        obj[relativePath] = publicURL

        return obj
      }, {}),
    [assets]
  )

  // Play a specific track
  function playTrack(index) {
    if (index === state.currentTrackIndex) {
      togglePlay()
    } else {
      state.audioPlayer.pause()

      const base = state.tracks[index].audio.base // frost.mp3
      const baseName = basename(base) // frost

      // new Audio() does not support relative path
      // hence the need for window.location.origin
      const audioPlayer = new Audio(
        `${window.location.origin}${assetObj[`${baseName}/${base}`]}`
      ) // new Audio('http://www.domain.com/static/frost-[hash].mp3')

      audioPlayer.play()
      setState(state => ({
        ...state,
        currentTrackIndex: index,
        isPlaying: true,
        audioPlayer,
      }))
    }
  }

  // Toggle play or pause
  function togglePlay() {
    if (state.isPlaying) {
      state.audioPlayer.pause()
    } else {
      state.audioPlayer.play()
    }
    setState(state => ({ ...state, isPlaying: !state.isPlaying }))
  }

  // Play the previous track in the tracks array
  function playPreviousTrack() {
    const newIndex =
      (((state.currentTrackIndex + -1) % state.tracks.length) +
        state.tracks.length) %
      state.tracks.length
    playTrack(newIndex)
  }

  // Play the next track in the tracks array
  function playNextTrack() {
    const newIndex = (state.currentTrackIndex + 1) % state.tracks.length
    playTrack(newIndex)
  }

  // Transform the currentTime info into minutes and seconds
  function getTime(time) {
    if(!isNaN(time)) {
      return Math.floor(time / 60) + ':' + ('0' + Math.floor(time % 60)).slice(-2)
    }
  }

  const [currentTime, setCurrentTime] = useState(state.audioPlayer.currentTime)

  // both formattedTime and progress are states derived from audioPlayer.currentTime
  // so no need another useState
  const formattedTime = getTime(currentTime)
  const progress = currentTime / state.audioPlayer.duration

  useEffect(() => {
    const timeoutId= setInterval(() => {
      setCurrentTime(getTime(state.audioPlayer.currentTime))
      // setCurrentTime(formattedTime)
    }, 1000)
    return () => {
      // clean up function run when state.audioPlayer changes
      // reset currentTime to 0
      setCurrentTime(0)
      clearInterval(timeoutId)
    }
  }, [state.audioPlayer]);

  // get and display the duration of the track, in minutes and seconds

  // let currentDuration = state.audioPlayer.duration
  // let currentDuration = formatSecondsAsTime(Math.floor(state.audioPlayer.duration).toString())
  const duration = getTime(state.audioPlayer.duration)

  // jump to anywhere on the track using a progress bar style interface

  // adjust the volume of the track
  const volume = state.audioPlayer.duration.volume

  let currentTrackArtwork, currentTrackAudio

  if (state.currentTrackIndex !== null) {
    const base = state.tracks[state.currentTrackIndex].audio.base // frost.mp3
    const baseName = basename(base) // frost

    currentTrackArtwork =
      assetObj[
        `${baseName}/${state.tracks[state.currentTrackIndex].artwork.base}`
      ] // assetObj['frost/frost.jpg']
    currentTrackAudio =
      assetObj[
        `${baseName}/${state.tracks[state.currentTrackIndex].audio.base}`
      ] // assetObj['frost/frost.mp3']
  }

  return {
    playTrack,
    togglePlay,
    currentTrackName:
      state.currentTrackIndex !== null &&
      state.tracks[state.currentTrackIndex].name,
    currentTrackArtist:
      state.currentTrackIndex !== null &&
      state.tracks[state.currentTrackIndex].artist,
    currentTrackArtwork,
    currentTrackAudio,
    currentTime,
    duration,
    formattedTime,
    progress,
    volume,
    trackList: state.tracks,
    isPlaying: state.isPlaying,
    playPreviousTrack,
    playNextTrack,
  }
}

export default useMusicPlayer

and then I import these things into a PlayerControls.js file, like so:
const Controls = () => {

  const {
    isPlaying,
    currentTrackName,
    currentTrackArtwork,
    currentTime,
    duration,
    formattedTime,
    progress,
    volume,
    togglePlay,
    playPreviousTrack,
    playNextTrack
  } = useMusicPlayer()

  return (
    <>
      <FlexStart>
        <TrackArtwork src={currentTrackArtwork} alt="Album Artwork." />
        <TrackName>{currentTrackName}</TrackName>
      </FlexStart>
      <FlexCenter>
        <Button onClick={playPreviousTrack} disabled={!currentTrackName}>
          <Image src={previousButton} alt="Previous Button"/>
        </Button>
        <Button onClick={togglePlay} disabled={!currentTrackName}>
          {
            isPlaying ?
              <Image src={pauseButton} alt="Pause Button"/>
            :
              <Image src={playButton} alt="Play Button"/>
          }
        </Button>
        <Button onClick={playNextTrack} disabled={!currentTrackName}>
          <Image src={nextButton} alt="Next Button"/>
        </Button>
      </FlexCenter>
      <FlexCenter>

        <TrackDuration>{currentTime}</TrackDuration>

        // Progress Slider would go here...

        <TrackDuration>{duration}</TrackDuration>

       // Volume Slider would go here

      </FlexCenter>
    </>
  )
}

export default Controls

...so I'm looking at all the props with this in them and I don't really know what to do, or how to integrate your slider with what I have so far...

If you are curious to look at the repo:
https://github.com/rchrdnsh/RYKR
I hope this makes sense, what I am stuck on. I just see a bunch of this.something, and I am wondering what I would need to do to adopt this component to what I have already (with much help from very smart people!) have built :-)

Well, generally what you need to do is manage your state somehow and then pass this state on as props to the <Slider /> or whichever component you need. Have you looked at the Progress bar with buffer recipe in the README? The <Slider /> is really just an invisible wrapper that provides mouse interaction helpers. What you want to render inside it is really up to you.
It sounds like you're fighting with hooks, and if you're new to them I would strongly recommend building something easier to begin with!


[Bug] Incorect calculation of function duration - years, months

var start = moment('2018-01-01');
var end = moment('2019-01-01');
var duration = moment.duration(end.diff(start));
console.log(duration.years()); // = 0, but correct result should be 1
console.log(duration.months()); // = 11, but correct result should be 0, because year = 1

I use moment.js v2.22.2, hope you fix soon

Please read the intro to Duration in the docs, and see if you get better results using end.diff(start, 'years') and end.diff(start, 'months')

end.diff(start, 'months') = 12, but i want the result = 0, i want to calculate period time, not the time difference

I think you've stumbled on the most difficult area to agree on.
You're removing context from two dates, and getting a time difference in milliseconds.  You then want to convert milliseconds to some human-readable interpretation like "3 months 2 days".
The problem is that days, months and years aren't of fixed duration.
Take a period of 60 days.   That could be:
"2 months" - Jan 1st to March 1st 2020.
"1 month 30 days" - April 1st to May 31st 2020 (or July 1st to August 30th 2020)
"2 months 1 day" - Jan 1st to March 2nd 2019

I agree with you.
But there is a mistake in these two days when using function moment.duration (I was asked in the problem description section)
"0 year 11 months": 2018-01-01 -> 2019-01-01, // correct result: 1 year 0 months

I haven't explained myself very well.
You calculated the difference - in milliseconds - between two dates:
var start = moment('2018-01-01');
var end = moment('2019-01-01');
console.log(end.diff(start)); // result:<PHONE_NUMBER>0

You're then calling moment.duration(31536000000), which you then want to be converted to years and months.
How many milliseconds are there in a year?  Well, it could be<PHONE_NUMBER>0, but it could also be<PHONE_NUMBER>0 (leap year.)  On average, it'll be<PHONE_NUMBER>0, and you've passed it a number less than that - so your duration is shorter than the average year.
I don't think anyone likes the way duration handles conversion from milliseconds to months or years, but it's hard to argue that it'd be 'better' to standardise on 30 day months and 365 day years.
Please reconsider using end.diff(start, 'months'), with a little more work:
end.diff(start, 'years'); // 1
end.diff(start, 'months') % 12; // 0

@giangsoda you're doing it wrong :)
var start = moment('2018-01-01');
var end = moment('2019-01-01');
var duration = moment.duration({from: start, to: end});
duration.years() // 1
duration.months() // 0

This is the best way to construct duration from start and end. Otherwise a year is actually 365.25 days. Go ask google. So your duration in milliseconds is just 365 days, which is clearly less than a year.

@ichernev Awesome!
But why is this constructor not mentioned in the docs at all?
Docs popularize construction based on diff which is clearly the wrong way to do this (it's going through milliseconds, which loses all information about units).

...I figured that even:
const duration = moment.duration({from: start, to: end});

does not account correctly for DST. It will return a duration which only has months and milliseconds. Pretty frustrating.


Derive Clone for StateMachine and OpcodesIter

r? @jonhoo

I assume we don't have @bors running?
In any case, r+, LGTM

Coverage remained the same at 93.791% when pulling 9cafdb1e187d8632a9a8ffd65d1ea58ab6a7bd54 on fitzgen:clone-state-machine into 28ae3465227c3477bb8b5923f5ee6113b6581cb1 on gimli-rs:master.


Add a check to ensure diff.PrintWantGot is used

Can we have a presubmit check to ensure I don't add a new cmp.Diff call that bypasses the helper? Otherwise I'm going to make sure we're going to need one of these PRs every few quarters sweat_smile.

In https://github.com/tektoncd/pipeline/pull/2580, we migrated cmp.Diff to better functions (simpler to use, using diff.PrintWantGot()). To make sure we don't have to do #2580 again in the future, we should add a presubmit check to check for this.
This can be done as in a pre_build_tests (https://github.com/tektoncd/plumbing/blob/master/scripts/presubmit-tests.sh#L114)
/kind cleanup
/area testing

Also worth keeping in mind that in future we might not be using cmp.Diff at all, and replace it with a helper that does the diffing and formatting together.


Relations with external entities can only be established by administrators

Describe the bug
Using the sample openaire configuration provided with DSpace in the publication collection is possible to link the publication to person. The system allows to search external sources, like ORCID but the import will succeed only if

there is at least one collection where the person item can be deposited
the submitter / workflow user is an administrator
if the submitter hasn't special permission the import would fail without visible feedback for the user

To Reproduce
Steps to reproduce the behavior:

create a DSpace user and put it in the submitter group of a publication collection and a person collection
start a publication submission and search for a name in ORCID
try to import one of the returned result, the system will prompt for the collection but once selected will stuck

Expected behavior
The import should succeed or the option should be hidden to unauthorized users.

This does sound like a bug, so I'll pull it over to the 7.6.x maintenance board.  Needs a volunteer.
I wonder if the issue here is that the Submitter doesn't have submit permissions in the Person entity Collection?  Technically, when you submit a Publication and use the ORCID lookup to import a relate Person, you are submitting two objects at once:

Publication entity (currently in progress submission)
Person entity (imported via ORCID)

So, it could be possible that a Submitter only has permissions to submit to the Collection where they are adding the Publication entity.  The Person entity might require submit permissions on a separate Collection.
That said, I agree this ideally "should work" as that would be more user friendly and it would be complex to sync permissions across two Collections (one for Publication and one for Person).
I just wanted to point out that we should test whether full Administrator privileges are required, or if the issue is that a user must have submit privileges on multiple Collections to allow relationships to work for external entities.

I have encountered this in DSpace 7.5, although it is also probably an issue in DSpace 7.6. The code that checks for administrator rights can be found in ExternalSourceEntryArchivedItemUriListHandler.java. In my testing, the non-admin account has submit rights to the Person entity collection but the import never succeeds due to the org.dspace.authorize.AuthorizeException.

Hi @tdonohue
I tested this 7.6.1 and 8.0 and found, that it doesn't work either if the submitter has submit privileges on multiple collections. Administrator privileges are required here. I fixed this locally for us, so now the submitter can import directly from external source during the submission workflow. The only thing is: even if the submitter has only submit privileges on the Persons Collection and there is a curation workflow defined, the new entity gets published immediately in order to be displayed and connected correctly to the publication. But if the submitter manually submits a person into the person collection it of course still follows the submission  workflow. We figured, it is good like this, we can trust the externally imported information from ORCID or Pubmed and we wanted a less complex and easier submission and curation workflow, but we still wanted a restriction on submitters having submit privileges on the person collection: we just use the same epersongroup for both collections.


The newest kindest node may have the OCI containerd bits

kind version https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0 does not have the correct containerd version.  I would suspect there would be containerd version bump before the do another release.


search_fields attribute / property

Hello. I was looking trough the source code and the tutorial / documentation.
Here's the code from documentation, when it comes to registering an autocomplete view:
class CountryAutocomplete(autocomplete.Select2QuerySetView):
    def get_queryset(self):
        # Don't forget to filter out results depending on the visitor !
        if not self.request.user.is_authenticated():
            return Country.objects.none()

        qs = Country.objects.all()

        if self.q:
            qs = qs.filter(name__istartswith=self.q)

        return qs

However, I was wondering whether we could keep simple things simple. Namely, when we register the autocomplete view, like so:
urlpatterns = [
    url(
        r'^country-autocomplete/$',
        CountryAutocomplete.as_view(),
        name='country-autocomplete',
    ),
]

could we have a simpler syntax, something like..
urlpatterns = [
    url(
        r'^country-autocomplete/$',
        name='country-autocomplete',
        model=Country,
        search_fields=('foo', 'bar__baz'),
    ),
]

then of course the underlying logic would construct a Q() object:
qs = super( something, self).get_queryset()
if self.q:
    filters = Q()
    for field in self.search_fields:
        filters |= Q(**{'%s__icontains' % field: self.q})
    qs = qs.filter(filters)

What I mean is that I totally get the point of doing a generic view when there is complex logic involved (like creating objects, complex / custom filtering, etc, etc, etc). However dal can also be used to very simple tasks and this whole block of code (extending a class) contains a single method to handle simple filtering - seems to be an overkill.
If you would agree to such changeset, I would be more than happy to provide a PR
my kindest regards,

Hi Mateusz !
Did you mean to show an example like this ?
urlpatterns = [
    url(
        r'^country-autocomplete/$',
        name='country-autocomplete',
        dal.ModelSelect2Autocomplete(
            model=Country,
            search_fields=('foo', 'bar__baz'),
        )
    ),
]

I really like this, but I think any kind of search_fields logic should be maintained in a search app rather than in django-autocomplete-light, is there any way we could reuse django-search-views ? Here's an example in their README which shows they already have some kind of query building logic:
from search_views.search import SearchListView
from search_views.filters import BaseFilter

class ActorsFilter(BaseFilter):
    search_fields = {
        'search_text' : ['name', 'surname'],
        'search_age_exact' : { 'operator' : '__exact', 'fields' : ['age'] },
        'search_age_min' : { 'operator' : '__gte', 'fields' : ['age'] },
        'search_age_max' : { 'operator' : '__lte', 'fields' : ['age'] },

    }

class ActorsSearchList(SearchListView):
    model = Actor
    paginate_by = 30
    template_name = "actors/actors_list.html"
    form_class = ActorSearchForm
    filter_class = ActorsFilter

Also note that the whole point of making the user extend the class is security. I don't want any newcomer to have private data leaked because they forgot to secure an autocomplete.
An example measure we can take against this would be to allow only staff users by default, and require users to pass an arg like "insecure=True" to as_view().

well, I suppose it depends on where you concider the software bloat to be ;) My whole point was that, if I have to extend a class in order to do a simple search, and the code would be a 99% copy of the one from the documentation, then for me this would be a definition of a software bloat.
I have absolutely nothing against securing the request by default (As it is secured in the documentation-provided code), I am merely trying to think of a compromise so that one wouldn't have to extend (and do a carbon copy of) the provided code in order to do a simple search.
If you inspect line no. 69 of the dal/views.py you will find that the default search_fields is already there. I just started thinking about it when I was using dal in a following scenario:
class Parent( ... ):
    first_name =
    last_name =

class Child( ... ):
    first_name =

so I wanted to filter by child first_name or by first or last name of a Parent. The default behaviour of dal is a perfect match for my solution, I merely would need to tweak it a bit, and I don't want to do monkey patching, so I thought that I'd share my insights with thee, o Sire!
kind regards and Merry Christmas! :christmas_tree: :santa:

I fully agree with the fact that we shouldn't need to extend the class, and highly appreciate your future contribution, which I'm sure the community will love as well B)
I've just checked our v2 code as well. It's the one that has the best features ... And the community has put a lot of hard work into it, I mean, generating an SQL query to support all databases versions, was indeed a lot of work, but it has the "split_words" option which the users like a lot. If that's indeed the best, forget about my consideration for software bloat, and let's do this.
Your contribution is welcome ! I've been working my ass of the last days to get the tests to pass again, and here I am with only 5 failures left locally hehehe I hope to finish this soonish
My best regards to you and your loved ones dear Mateusz

wow, I just looked at the link you pointed and it indeed has all that is required. it seems that I was simply looking in a wrong place. I'll try to dig this some more to see how one can combine the model with a generic view. Then the least I could do would be to document this :D

Wait, the code is not in v3 yet, so you'll have the opportunity to be the hero and add this from v2 to v3 !

then dal would be the next greatest thing after sliced bread! I'll try to tackle this

Thanks for the kind words and for your efforts ! always appreciated !
Looking forward to read more about it ;)

I'm just seeing that tests fail with postgresql because of duplicate key, probably at some point the sequence goes foobar.
However, tests on sqlite have been fixed already.

well, I'd say that is one of multiple ways of spending your Christmas morning :D

Travis is better available at this time of the year xD

sorry, I had a bit of things on my mind but I have just started to work on this feature. So I hope I should be able to finish this in the current decade :calendar:

Just managed to find some free time to code today, this feature is not dead yet. So terribly sorry for the delay :(

I guess it's worth the look to be identical to django.admin, so I just leave the link
https://github.com/django/django/blob/c19b56f633e172b3c02094cbe12d28865ee57772/django/contrib/admin/options.py#L887-L918


time indicator

Hello, its a great great work!!
The my question; in your example you provided the ISCurrentTimeIndicatorView class, but how to use it?
thanks for your work.

You need to register it as decorator view of kind INSEPGLayoutElementKindCurrentTimeIndicator.
[self.collectionViewEPGLayout registerClass:ISCurrentTimeIndicatorView.class forDecorationViewOfKind: INSEPGLayoutElementKindCurrentTimeIndicator];

sorry, but also by adding this line in the example I still do not see it.

*registerNib insted of class and you will see it


loosing ctx.match data in 'hide' function of submenu

Hi there, first of all thanks for your great work,
I have a dynamic menu which has a submenu in it, I'm using some data based on content of ctx.match to show/hide this submenu. something like this:
A
|__ B
|__ C
|__ D
in which both button 'B' and submenu 'C' have exact same 'hide' function.
'B' is ok and  showing/hiding of 'C' button is works fine as well, but when I tap on it to open it, the 'hide' function runs again and this time ctx.match is 'undefined' so I end up with a fatal error.
P.S: I temporary disabled the ctx.match related codes in that function to open the menu and ctx.match is correctly available in button 'D'; so it's only related to that second (unneccery) run of 'hide' function!
P.P.S: I'm using V4.0.1

I was checking things and find out 'It' (hide function of C menu in above example) is running when I tap at 'D' button, whether 'setParentMenuAfter' of it is true or false!

When checking the hide function on displaying buttons it happened based on button clicks. Then the ctx.callbackQuery is available which is used to generate the ctx.match. When the hide menu is called for a potential submenu the problem with version 4 was that it could be any middleware, not just a callbackQuery. As only callbackQueries have the data (and thus the ctx.match) it could not be said generally there. (menu.question for example used a general middleware)
Once you end up in a button its a callbackQuery related thing again, not a general middleware so ctx.match is available again there.
Version 5 removed this "could be a general middleware" case as everything is now a callbackQuery. Due to this the hide function always has also a ctx.match in version 5.
Im not sure regarding the setParentMenuAfter and calls of a different hide function. But as this was reworked with version 5 it is differently anyway now.

I'll just close this due to inactivity. If you have any questions feel free to ask ahead!


Cargo.toml:migrate to edition 2021

We're not using any features from 2021 yet so this doesn't need to be done afaik


Photo & Video Quality Drops when selecting from Library

@userdar
"As soon as i choose image from library the quality goes from 100 to 10, why do you think it's happening i'm developing some kind of social media app so image quality is important"

@userdar,
Are you using the default crop to square or filters?

I am checking the outputted image.size like so
picker.didSelectImage = { [unowned picker] img in
  print(img.size)
}

and have the same as the original  (3024.0 x 4032.0) in iPhone X :/

@s4cha @badoux
Any followup on this? Seems like setting every occurrence of sessionPreset and deliveryMode to highest quality solves this problem partially.
It's still very evident in videos though, specially for portrait videos. In this case cropping reduces the video quality.

@om-ha Thanks for the details, I'm going to take a look at it today then. Last time I tried to find the issue, I only checked for photos. l I will keep you posted :)

@s4cha thanks man! :D

Pretty much here are the changes:

setting videoCompression to AVAssetExportPresetHighestQuality
setting deliveryMode of every exportSession to AVAssetExportPresetHighestQuality
setting every sessionPreset to AVCaptureSessionPresetHigh

By the way @om-ha are you experiencing the issue with photos as well? or only videos?

@om-ha

videoCompression is already set to AVAssetExportPresetHighestQuality in the project
Concerning deliveryMode it is applied  toPHVideoRequestOptions or PHImageRequestOptions , I don't see it on AVAssetExportSession objects.
sessionPreset is already set to AVCaptureSession.Preset.high

I continue my research :)

@om-ha silly question but are you using the latest version (2.7.x) ? I have a hard time reproducing the issue.

@s4cha  thank you so much for the followup and research, hugely appreciated.

Each object occurrence of AVAssetExportSession could have its presetName set to the highest i.e. AVAssetExportPresetHighestQuality
Each object occurrence of AVCaptureSession could have its sessionPreset to the highest i.e. AVCaptureSessionPresetHigh
Each object occurrence of PHImageRequestOptions and PHVideoRequestOptions could have its deliveryMode set to highQualityFormat

My apologies. I hastily stated inaccurate information, as I was grasping at straws trying to solve the video cropping quality issue.
As for cropping issue, since YPImagePicker did not have cropping for videos, we are using VideoCropView from PryntTrimmerView to achieve that. So the problem is not even from YPImagePicker, I'm continuing someone else's efforts so that fact missed me.
But YPImagePicker (in the version we used) had some presets set to Medium quality, and some deliveryMode set to fastFormat. This affected quality of course.
I hope this comment was helpful for the original issue of degrading quality when selecting an image from gallery.

Same problem for me :)

@cikpis  check out this commit @s4cha

@om-ha
No problem! Every bit of info you provided was very useful to pinpoint the origin of the issue. Indeed previous versions of the picker were not using the highest quality settings by default.
Actually, even though the fix works, I am still puzzled as to why requestImage api doesn't return the highest quality image :/
Are you now able to use the latest version in the project you talked about?
Concerning cropping videos, thanks for sharing VideoCropView from PryntTrimmerView, this is something we'll address it here : https://github.com/Yummypets/YPImagePicker/issues/50
Thank you so much for your help on this !

@om-ha when is it going to be merged?

@om-ha @cikpis you should be good starting in 2.8.0
https://github.com/Yummypets/YPImagePicker/releases/tag/2.8.0
:)

@s4cha awesome! thanks!

@s4cha Cheers for fixing the bug!

@om-ha You're welcome :)


Site returns a 404 by default

Thank you for creating and sharing this!
Describe the bug
Site returns a 404 by default
To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/issaafalkattan/react-landing-page-template-2021.git
cd react-landing-page-template-2021
yarn
yarn dev
Visit http://localhost:3000/

Expected behavior
Returns a 200
Screenshots

Desktop (please complete the following information):

OS: [e.g. iOS] OSX
Browser [e.g. chrome, safari] Chrome
Version [e.g. 22] Version 97.0.4692.71 (Official Build) (x86_64)

Additional context
This is happening both locally and when I deploy my site to AWS Amplify
Thank you for creating this template!

This should be fixed now! Thanks for reporting!

Thank you! This fix works for me


favicon

I'm submitting a ...
[ ] question

how can i change the favicon ico?
Thanks

just change the icons under src/assets/icon

I just want to know where is the code written for favicon. please provide the path


How to start code optimization

I want to know how to start avx2 if my CPU supports avx2 instruction set. I have searched many places in VS, but I have not found the corresponding location to set it.

project properties->C/C++->code generation->enable enhanced instruction set

fine！thanks bro~


Add tests

Some kind of snapshot testing should be enough, but I don't like that storybook addon.

I don't like that storybook addon.

beacuse it's for snaphots for stories not components


Banned room IDs/aliases (moderation)

General issue for me to not forget implementing banning room IDs and aliases: https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#block-room-api
For the admin commands: Exact same way the disable incoming federation command works, except it will serve as a way to ban or "block" local users from joining (e.g. a bad remote room).
It might also be worth considering dropping or automatically rejecting room invites for the banned room so if a user is being invite spammed, the room can be banned and all invites will be silently dropped or automatically rejected.
Also add support for importing a list of room IDs/aliases to ban with this command (e.g. a known list of bad Matrix rooms that we don't want our).
If the user supplies a room alias, we'll first see if we know this room alias locally in our database to correlate it to a room ID and then ban both the full room alias and room ID.
If we failed to resolve it to a room ID remotely, we'll ban the room alias only with a warning that this can be bypassed if the room alias ever becomes resolveable again remotely or a new room alias is created for that room.

Implemented everything here except for banning room aliases (we only resolve room aliases to room IDs instead) and dropping invites to blocked rooms, I'm not sure how I feel about it when we already have the forbidden room alias feature and messing with /sync might be too complex. This is good enough as is to be useful for moderation.
https://github.com/girlbossceo/conduwuit/pull/165


Implemented: timeZone switcher component from dxp package(dxp/262)

Related Issues

https://github.com/hotwax/dxp-components/issues/262
Short Description and Why It's Useful

Screenshots of Visual Changes before/after (If There Are Any)

Contribution and Currently Important Rules Acceptance

[x] I read and followed contribution rules

@R-Sourabh Resolve conflicts and mark it ready for review, if its completed at your end.


TabRouter requires a "/" path for one of the tabs

The TabRouter will fail If you don't set at least one path to "/" in the Tab routes.
I don't think that is desirable since not all apps have a "home" tab. Also it relies on the implicit assumption that devs will make the "home" page route "/".
Mobile TabsViews are a bit weird in their UX since there isn't a clear hierarchy of views like in a StackView where a root view makes sense.
My suggestion would be to remove the "/" requirement.

Indeed, it is not intentional. I probably just forgot to fix this line because the TabNavigator allows any path as the root path. It has been fixed in the latest release.
Thanks for reporting!


Gift Entry - Batch Import Status "Failed" but Contact, Opportunity, Payment still created

Issue
When entering a gift into Gift Entry, if a GAU is entered into the field mapping (not the custom GAU bundle), but the allocation amount or percentage is not populated; upon import the record shows Status: Failed and Errors: GAU Allocation 1: Import Status: Enter a value in either the Amount field or the Percent field. This is the same error thrown when attempting to create a GAU Allocation manually and not providing these values and therefore the creation is blocked. The difference is that when this error is encountered in Gift Entry, a Contact, Opportunity, and Payment record are still created, despite the error when creating it through a batch, not Single Gift Entry.
Steps to Reproduce

Enable Gift Entry in an NPSP installed Org
Create a General Accounting Unit record
Edit the Default Gift Entry Template and remove the GAU bundle
Add these fields to the template:
a.  GAU Allocation 1: General Accounting Unit
b.  GAU Allocation 1: Percent
c.  GAU Allocation 1: Amount
Save the Template
Create a batch using the Default Gift Entry Template that you have edited
Add all necessary fields to create a Contact and a Gift, but in the 3 fields you added to the template, add only the GAU Allocation1: General Accounting Unit via the lookup, do not populate the GAU Allocation 1: Percent or GAU Allocation 1: Amount
Click the "Process Batch" button and attempt to import the Gift
Notice that an error appears and that back in the Batch the Status is Failed and the Errors is GAU Allocation 1: Import Status: Enter a value in either the Amount field or the Percent field.
Notice that the Contact, Opportunity, and Payment have all been created, despite the Status and Error, but no Allocation record*

Single Gift Entry
If the same steps above are taken from Step 5, but using Single Gift Entry instead, the creation of the Contact, Opportunity, Payment are blocked by the error.
*Optional: In Step 9, it states that no Allocation record was created; however if you set a Default GAU in NPSP Settings will, at the first step, despite the error and creation of an Opportunity, Payment, and Contact, also create a GAU Allocation based on the Default GAU. The same error will still appear, and correcting the Gift by adding the Amount or Percentage through editing in Gift Entry will show a successful import in Gift Entry, but will not change the GAU Allocation on the Gift.
Workaround
Ensure that the Percentage or Amount fields are populated at the time of the batch import.

W-9032097

Please follow this Known Issue in the Trailblazer Community for updates.


Link to the Disclose logos is broken

Hi!
I'm reading through https://github.com/disclose/terms and the link to https://github.com/disclose/disclose/logos is broken.
Cheers,
Adam

Link to https://github.com/disclose/terms/blob/master/github.com/disclose/disclose/program-list is also broken.


Decimal SQL type

Doesn't seem to be supported? It's rounding to the nearest whole number.

In what context? Reading or writing? It is supported, so if you're not getting it that's a bug somewhere. Could you post some code to reproduce the problem?
Thanks,
Mark

Hi Chris,
Can you confirm the schema for the table?
I've added a bunch of tests for Decimal data types and it inserts and retrieves correctly. I'll commit them later.
Thanks,
Richard

Hi,
Thanks for looking into this, however I can confirm that it is our error. Someone has set up the decimal type to have 0 right hand digits, I have set this accordingly and it it works as expected.
Thanks
Chris


Version 4: Typescript, ESM, glob removal, drop node <18

[ ] Release readdirp v4
[ ] Changelog
[ ] Release chokidar v4

@paulmillr is this alpha release blocked ?
Is there any plan to release it? Maybe some contribution needed.
Thanks a lot for your great work.

Nah -- someone just needs to find some time to debug it.

@43081j there are a few issues:

we are using mocha which depends on old chokidar. Maybe we should replace it with something else? For the record, I have made micro-should, but it does not have beforeEach / afterEach. perhaps worth manually adding "beforeEach" code into functions and seeing if it works
there are some warnings after npm install that need to be fixed
eslint seems to be outdated

@benmccann how flexible are you in terms of ESM-onliness?

we are using mocha which depends on old chokidar. Maybe we should replace it with something else? For the record, I have made micro-should, but it does not have beforeEach / afterEach. perhaps worth manually adding "beforeEach" code into functions and seeing if it works

we should be able to use node's test runner now (since 18.x at least, maybe even 16.x)

there are some warnings after npm install that need to be fixed
eslint seems to be outdated

these are probably both solved by us updating and cleaning up some dependencies. ill take a look

I have made many hybrid packages manually and it's nothing hard. It's just launching tsc two times with different configs. See https://github.com/paulmillr/jsbt
tshy seems like too much deps. They even use chokidar -- wtf? why?

as a dev dependency. the important thing tshy does is create the package exports map for you
i don't mind either way as long as things like arethetypeswrong say our package is setup correctly (if it doesn't, its likely ts consumers will get build errors in some configurations)

create the package exports map for you

Exports map can be written by hand in a few minutes, or using a small shell script that lists directory files: https://github.com/paulmillr/noble-hashes/blob/b930aa959dfb95a936096b5ac79a3dcfbdab2332/package.json#L46-L70
I have been writing that by hand, however, since we're going full-esm, I don't think it's necessary. We only have one export. Even for hybrid, it's very easy to write.
Overall exports are mess and not all envs support them properly. Ideally they'll just be removed in place of absolute paths e.g. noble-hashes/sha2.js instead of noble-hashes/sha2

typescript, node and many bundlers will now assert that the imported path is in the export map so we should set it up
but im fine with us doing it by hand too, whatever we can all agree on 👍  i wouldn't export extensionless paths etc, i'd pretty much export the on-disk files (aliasing for cjs if we dual-package, and exporting them directly)

We also need to make this ESM and upgrade https://github.com/paulmillr/readdirp/

We also need to make this ESM and upgrade https://github.com/paulmillr/readdirp/

i have a branch where i've tried to remove readdirp since node itself should be capable by now (with recursive: true)
though it has a few test failures so i was planning on trying to fix those
what do you think?
unrelated - the same failure as my last few PRs happened again here. seems to be windows specific 🤔 i'd like to solve that one somehow

ideally we'll just use node built-ins, ofc.
Try readdirp-ing 400K-file directory and seeing how's the speed with both solutions.  Keep in mind that readdirp uses streams etc.

thats true, i'll try it out on a larger project if i can find one some place 👍

i did some benchmarking, and it seems like readdirp recursively visits some symlinked directories, whereas node won't
in a test repo:

readdirp - Found 122112 items
node - Found 32967 items

it seems the missing items are already part of the 32967 (symlinked by pnpm in this case)
in a directory that doesn't hit that problem, node seems faster:
┌─────────┬────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name  │ ops/sec │ Average Time (ns)  │ Margin   │ Samples │
├─────────┼────────────┼─────────┼────────────────────┼──────────┼─────────┤
│ 0       │ 'readdirp' │ '9'     │ 105280229.69999999 │ '±9.32%' │ 10      │
│ 1       │ 'node'     │ '41'    │ 23874190.62790698  │ '±3.59%' │ 43      │
└─────────┴────────────┴─────────┴────────────────────┴──────────┴─────────┘

Symlinks are definitely important.

Symlinks are definitely important.

im not saying node is ignoring them. readdirp is duplicating them from what i can tell

readdirp - Found 122112 items
node - Found 32967 items

the extra 89,145 entries seem to be files in node_modules we already visited (already accounted for in the 32,967).
symlinks certainly are traversed via node

@benmccann how flexible are you in terms of ESM-onliness?

Sorry I missed this question, but don't worry about me. I'm fine with whatever you decide either way

@paulmillr if you didn't see, it looks like the windows failures fail in master too
it does seem like it could be a bug but we could at least release a pre-release for now. that would be nice i think (4.0.0-pre.0 or something, in a next tag on npm)
the functionality seems pretty sound and i've been through the diff with master, which shows our only changes really are:

removal of globs
ignore logic

so should be good, and any problems we see are likely already problems (that we should fix)

I would still prefer to fix tests for v4. They have been broken for many years.
Do you think we can do it?

i agree
its a busy couple of days coming up but ill take a look again when i can and see if i can figure it out

@paulmillr it is a bug, i've figured it out roughly but not how to fix it
when we add a node to the watcher, we stat the node here:
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L622
when we write a file (add.txt), we cause a rename fs event
this results in us calling the handleDir watcher here:
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L587-L592
that starts readdirp going on the directory:
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L483-L488
which finds add.txt and adds the node:
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L518
we then reach this stat call (which is async):
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L622
meanwhile, a change event fires - nothing really comes of this because we haven't finished our stat of the file, so haven't added a listener yet
when the test passes - a second change event fires at this point, and there's still no file listener so we do not fire a CHANGE event
now the stat finishes and adds the file listener to the set of listeners
when the test fails - the second change event fires at this point, and there is a file listener so we fire a CHANGE event

🤔
is it possible this is just wrong:
https://github.com/paulmillr/chokidar/blob/c8c3ff2dc2b47d206225b93ced71e4004aabefdb/src/nodefs-handler.ts#L385
specifically at <= mt:

if the access time is before the modified time, it means we haven't accessed it since it was modified, so this is a change
if the access time is the same as the modified time, surely it implies it hasn't changed?

if i change this to at < mt, the tests pass

Related: #1336

Will this release address #1225, or will another issue have to be created?

New release drops support for globs. So, it would address it by setting it "out of scope". As in: all glob patterns would become unsupported. You will need to write regexps, or filtering functions.


[MRG] Make events files fetched via dataset fetchers BIDS compliant

issue #234
First-level localizer fMRI dataset events file is now BIDS compliant

Please also consider the other diowloaded files (spm_auditory, spm_multimodal_faces).
Thx.

Yeah, I figured I'll work first on https://github.com/nistats/nistats/issues/223#issuecomment-426573423
. You want to wrap this up first?

To me these things go together. You can handle them in the same PR if it's easier.

From now on, and in all examples, while reading events files, we'll either have to use pandas.read_csv(sep='\t') or pandas.read_table() .
We should check and modify the examples accordingly.

@bthirion 2nd fetcher landed. Ready for review.

Let me know when this is ready for review.

Absolutely.
Currently investigating a weird glitch where the tests are failing because the .mat files are empty during nosetests, but are fine when I run the fetch_spm_multimodal_fmri() .

It seems the failure is due to the way the test is written. Dummy .mat files are created (which are empty) during the tests and this was fine because those .mat files were not being loaded during testing.
However, when the events file are being generated in the fetcher itself, that requires the .mat files to be loaded using loadmat(). Since they are empty, the tests are failing.

@bthirion
For now I have programmed it to generate a warning during nosetests about the inability to generate events files when the Mat files are empty.
A solution would be to download the dataset from the server when this happens, instead of the mock data currently used. However that will add 2 minutes of download time everytime the tests are run locally.
I haven't written a unit test for this yet, other than that, this is ready for review.

I can't write the missing unit test withut bundling a 1.2KB .mat file, hence that will keep.
One final review and this is done AFAIK.

Make sure to update the nilearn_data using the new fetchers for the tutorial. Else the new code will not work.

It's fine to ship a 1.2K mat file with the library.

Turns out it is more complex than that. I don't think we need to focus on this right away, post release, I will add tests.

Can you rebase on master ?

Great ! I'll look at that tomorrow.

Great job, merging.

Cool, I'll get started on the events not paradigms PR.


Update README.md

added a common gotcha for users on newer versions of python.

thanks, that solved my problem! 🙏


Fix cloud events

Description
Sets a header when publishing a cloud event.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #31
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[ ] Code compiles correctly
[ ] Created/updated tests
[ ] Extended the documentation

Codecov Report

Merging #32 (751aac0) into main (e93b535) will decrease coverage by 0.33%.
The diff coverage is 46.15%.

@@             Coverage Diff              @@
##               main      #32      +/-   ##
============================================
- Coverage     68.35%   68.02%   -0.34%
- Complexity      397      402       +5
============================================
  Files            45       45
  Lines          1403     1426      +23
============================================
+ Hits            959      970      +11
- Misses          444      456      +12

Impacted Files
Coverage Δ
Complexity Δ

src/index.php
0.00% <0.00%> (ø)
12.00 <0.00> (ø)

src/lib/DaprClient.php
0.00% <0.00%> (ø)
22.00 <0.00> (ø)

src/lib/PubSub/CloudEvent.php
89.13% <ø> (+1.63%)
18.00 <0.00> (-2.00)
:arrow_up:

src/lib/PubSub/Topic.php
84.61% <100.00%> (+6.83%)
4.00 <3.00> (ø)

src/lib/Secret.php
52.17% <0.00%> (-47.83%)
8.00% <0.00%> (+7.00%)
:arrow_down:

src/lib/State/State.php
100.00% <0.00%> (+2.17%)
12.00% <0.00%> (ø%)

src/lib/PubSub/Subscribe.php
66.66% <0.00%> (+4.76%)
5.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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

Codecov Report

Merging #32 (751aac0) into main (e93b535) will decrease coverage by 0.33%.
The diff coverage is 46.15%.

@@             Coverage Diff              @@
##               main      #32      +/-   ##
============================================
- Coverage     68.35%   68.02%   -0.34%
- Complexity      397      402       +5
============================================
  Files            45       45
  Lines          1403     1426      +23
============================================
+ Hits            959      970      +11
- Misses          444      456      +12

Impacted Files
Coverage Δ
Complexity Δ

src/index.php
0.00% <0.00%> (ø)
12.00 <0.00> (ø)

src/lib/DaprClient.php
0.00% <0.00%> (ø)
22.00 <0.00> (ø)

src/lib/PubSub/CloudEvent.php
89.13% <ø> (+1.63%)
18.00 <0.00> (-2.00)
:arrow_up:

src/lib/PubSub/Topic.php
84.61% <100.00%> (+6.83%)
4.00 <3.00> (ø)

src/lib/Secret.php
52.17% <0.00%> (-47.83%)
8.00% <0.00%> (+7.00%)
:arrow_down:

src/lib/State/State.php
100.00% <0.00%> (+2.17%)
12.00% <0.00%> (ø%)

src/lib/PubSub/Subscribe.php
66.66% <0.00%> (+4.76%)
5.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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


private/publicSSLKeys not generated

Looks like SSL Keys are not generated in every case. The function 'getPublicKey' should generate the keys if not found.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22274163-private-publicsslkeys-not-generated?utm_campaign=plugin&utm_content=tracker%2F308690&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F308690&utm_medium=issues&utm_source=github).

seem same problem in my las log in the isue #338

I have the same issue. I tracked the problem back to file RoundCubeApp.class.php in function generateKeyPair. Error occurs in line 104 when openssl_pkey_new() function is called. This function needs a proper openssl setup on the machine, which i don't have. I've added an openssl_error_string() call right after the openssl_pkey_new(); and it outputs:
error:02001002:system library:fopen:No such file or directory
error:2006D080:BIO routines:BIO_new_file:no such file
error:0E064002:configuration file routines:CONF_load:system lib
error:02001002:system library:fopen:No such file or directory
error:2006D080:BIO routines:BIO_new_file:no such file","level
error:0E064002:configuration file routines:CONF_load:system lib
Suggestion ... code can be altered to be self-supporting by passing the required arguments in an array to the function (see http://php.net/manual/en/function.openssl-pkey-new.php).
Hope to hear from you soon ... best regards

Your error indicate that you're openssl setup is not correct. So to use encryption features (like encrypted password for the roundcube app) fix this config error. The app cannot fix this issues for you

umm if are a problem of configuration of proper openssl, what should be do for config the openssl? i never hear fo that beyoung of generating my ssh keys and configuring my openssl lib!


Missing License

Hi!
This projects looks great so far. It's great that you're able to self-host it and that the free version is more than capable.
Is there a plan to add a License to the image and the Helm Charts? This is currently the only thing blocking us from using it.
Thanks!

Hi @WDaan, thanks for your message. We've added an Apache 2 license to this Helm repo.
Don't hesitate if you have any question


tag created timestamp is a negative value in some cases

Description
related: #28843
mirror https://github.com/torvalds/linux go to the last page of tags:

Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None

Checking GitHub, they don't render a <relative-time> at all:
https://github.com/torvalds/linux/releases/tag/v2.6.13-rc1


Signal optimization not working properly

I made a little test how a Preact component behaves if you use both signal count and count.value in the same component.
Then I tried the same with Reflex and saw that Reflex has a bug in the signal optimization.
Please have a look at the following demo - both buttons should behave the same, but the Reflex button is not working properly:
https://codesandbox.io/s/rough-meadow-5piocu?file=/src/index.ts

It's patched. Thanks !
https://codesandbox.io/s/focused-goldstine-h1s6dw?file=/src/index.ts


No link to mergify.io in the Contribution guideline documentation

No link to mergify.io in the Contribution guideline documentation whereas the other two highlighted projects are.

Fixed in #1426


Inline Intent helper methods

Inline Intent.get___Extra(String) methods as:

Logic needs to be duplicated between BaseFragment and BaseActivity to continue using this approach, reducing code maintainability.
The helper methods in BaseFragment always uses the null permissible getActivity() when the logical flow may require the use of the non-null assertive requireActivity().
Calling getIntent().get___Extra(String) is a pretty standard practice, and makes it known that the get___Extra(String) is being obtained by the intent that the started the activity.
BaseActivity#getIntExtra(name: String) returns -1 if the extra name is absent. By covering this up in a layer of abstraction is a potential source of difficult to find bugs.

Why do we use activity?.intent? in app/src/main/java/com/github/pockethub/android/ui/gist/GistFileFragment.kt but activity.intent in app/src/main/java/com/github/pockethub/android/ui/commit/CommitCompareListFragment.kt?

In the original app/src/main/java/com/github/pockethub/android/ui/gist/GistFileFragment.kt we don't assert that the activity should be non-nullable, so I have kept the logic the same by using activity?. In the original app/src/main/java/com/github/pockethub/android/ui/commit/CommitCompareListFragment.kt we assert that activity should never be null, so in the later lines activity is never null.

Alright, that makes sense. I'll check this in a bit.


Add 3Scale to fips-assessments tasks

Add Ansible tasks that can perform the following checks: https://github.com/opdev/fips-assessments/blob/main/3scale/check.txt
Note: It will require https://github.com/opdev/fips-assessments/blob/main/3scale/setup.txt

Closing.


Check and log species distribution typos

Typos in the species distribution CV annotations need to be logged.
We'll need to configure a list of the valid term names.  Here's a list of the current number of terms each term name is used in an annotation:
                  name                  | count
----------------------------------------+-------
 conserved in archaea                   |   300
 conserved in bacteria                  |  1121
 conserved in eukaryotes                |  4547
 conserved in eukaryotes only           |  2587
 conserved in eukaryoties only          |     1
 conserved in fungi                     |  4640
 conserved in fungi only                |   548
 conserved in metazoa                   |  3549
 conserved in metozoa                   |     4
 conserved in vertebrates               |  3531
 conserved in vertebtates               |     1
 faster evolving duplicate              |    22
 human CETN2 ortholog                   |     1
 no apparent S. cerevisiae ortholog     |   604
 orthologs cannot be distinguished      |   109
 predominantly single copy (one to one) |  3118
 Schizosaccharomyces pombe specific     |   148
 Schizosaccharomyces specific           |   219

fixed except
human CETN2 ortholog
looking into this anyway becasue
chromosome1.contig:FT                   CETN2 ortholog; date=20170902"
chromosome3.contig:FT                   /controlled_curation="term=human CETN1 and CETN2 and CETN3

Culd you re-run this query for me so I can check that no errors crept in...

Could you re-run this query for me so I can check that no errors crept in...

Looking good:
                  name                  | count
----------------------------------------+-------
 conserved in archaea                   |   300
 conserved in bacteria                  |  1119
 conserved in eukaryotes                |  4545
 conserved in eukaryotes only           |  2590
 conserved in fungi                     |  4639
 conserved in fungi only                |   545
 conserved in metazoa                   |  3557
 conserved in vertebrates               |  3537
 faster evolving duplicate              |    22
 no apparent S. cerevisiae ortholog     |   610
 orthologs cannot be distinguished      |   104
 predominantly single copy (one to one) |  3118
 Schizosaccharomyces pombe specific     |   152
 Schizosaccharomyces specific           |   224
(14 rows)

Probably because I hardly hanged anything....
ok, this can remain on back-burner

@kmr could you rerun this for me to see if I need to do any fixes?

                  name                  | count
----------------------------------------+-------
 conserved in archaea                   |   299
 conserved in bacteria                  |  1119
 conserved in eukaryotes                |  4544
 conserved in eukaryotes only           |  2592
 conserved in fungi                     |  4640
 conserved in fungi only                |   542
 conserved in metazoa                   |  3560
 conserved in vertebrates               |  3540
 faster evolving duplicate              |    22
 no apparent S. cerevisiae ortholog     |   608
 orthologs cannot be distinguished      |   104
 predominantly single copy (one to one) |  3122
 Schizosaccharomyces pombe specific     |   153
 Schizosaccharomyces specific           |   224
(14 rows)

Note to self:
SELECT t.name,
       count(fc.feature_cvterm_id)
FROM cvterm t
JOIN feature_cvterm fc ON fc.cvterm_id = t.cvterm_id
JOIN cv ON t.cv_id = cv.cv_id
WHERE cv.name = 'species_dist'
GROUP BY t.name;

great, I'll put this to future. I should usually spot anomolies and these hardly change.

I've added a check for this in the logs.  Look out for a log file ending in .species_dist_term_name_typos.


Add useCreateMappingMutation and useMappingsQuery hooks, refactor mapping object types to match API, clean up mapping pages

Resolves #73
Creating and viewing mappings is now working end-to-end with real data!

Refactors the mapping-related TS types to match the API structure (this involved a lot of cleanup)
Adds a useCreateMappingMutation hook modeled after the useCreateProviderMutation implementation
Calls the new mutation in the AddEditMappingModal
Adds a new MutationStatus component for rendering the loading/error state of any mutation (might abstract this later to work with regular queries too, or create an equivalent. the error message structures are more based on whether it's a response from the inventory API or the kube client, not whether it's a query or mutation).
Adds a static "Target namesspace pod network" option to the top of the target network selections, which results in a { type: 'pod' } mapping target with no name/namespace.
Adds a useMappingsQuery hook to list the mappings using the kube-client. Mostly based on our other queries, but integrating the kube client here required some new TS types (e.g. IKubeList<T>).
Fixes the way we were importing the queryCache from react-query, so it invalidates properly. Creating a mapping will immediately refresh the list including your new mapping!
Changes our queryKey template strings to arrays. This is just so it's simpler to invalidate queries with looser matching in the future, but it's also cleaner and I just wanted it all to be consistent with my new keys.
Because it was annoying me and it's... sort of related, refactors the StorageMappingsPage and NetworkMappingsPage components to use one generic MappingsPage component (they were 99% identical already).

This doesn't add the create mapping calls to the plan wizard (for when the user selects to save a mapping for reuse), I figure we can handle that at the same time as creating plans. I did double check that my changes to the MappingBuilder here didn't break the usage in the wizard, though.

@ibolton336 I noticed after merging https://github.com/konveyor/virt-ui/pull/144 that the checkExpiry function was expecting an error with a response.status object, which is only there if it's an axios error (the Fetch API error handling passes the Response object instead, which just has status at the top level). So as part of my rebase here I updated it to handle both.

Rebased and should be ready for final review.


Release cobigen-openapiplugin-v7.1.0

This issue has been automatically created. It serves as a container for all release related commits

Automatically processed.
The decisions taken by the developer and the context of the decisions throughout the script:

User confirmed that tests are running on CI and the build is not failing.


Add 'create-service-key' command in cli [#87057732, #87157018]

Add a new command named "create-service-key" to create a service key
for a specified service instance.
@maximilien
ref: cc PR of https://github.com/cloudfoundry/cloud_controller_ng/pull/339
Signed-off-by: zhang-hua<EMAIL_ADDRESS>

For the CLA issue, it looks like I'm using IBM China email address<EMAIL_ADDRESS>which might not be recognized by the cfdreddbot. I confirmed I have already signed the CLI as the member of cfibmers organization.

Ok, this looks good. Merged.


Clippy's suggestions are not left-aligned

System32? No, I use it straight in the Downloads folder. Is Winpilot not portable anymore?

Winpilot shouldn't depend on install location, should it?

Of course, completely portable. But in the error message, the file is being searched for in the sys32 directory. It looks like you might have extracted it there.

The important thing is to extract the archive, where you extract it doesn't really matter, but please avoid system directories. After extracting, you should see a folder named 'app.' In there, you'll find the staticAIData.json file among other things. If this file is missing, then the archive isn't complete or is corrupted. In that case, please download it again.

I didn't put anything in a system directory; I downloaded and extracted just recently and distinctly remember that that's all I did. Downloading and extracting again worked, though.
But the suggestions still aren't left-aligned.

Please check if the file staticAIData.json exists in the app directory!

It does, but I emphasize: I didn't mess with the files. If there is a problem with the extracted files, then either something messed with them without my knowledge--which I don't think I have anything set up to do--or there's a bug in the bit of Winpilot that handles those files.

Thanks, can you search for Titus (Tool) or perform other static search queries? If yes, then it's working now without any reason. There have been no complaints until today, but I will optimize the file transfer process a bit more

I am receiving the same message, but the app folder path in the error message is a different path than the app folder's location. The app folder path is: ""C:\Users\XXXXX\Github\winpilot\app". The message notes that Winpilot is looking for the file in the app folder at: ""C:\Windows\System32\app" However, there is no app folder in the System directory.

Could you please test with this build?
Winpilot_dev.zip

Fixed in 3.5.0.