text:
2.5.3 appear to breaks ZigBee on Raspina, looks like zigbee herdsman updated serialport package and then reversed that update

Just pulled the latest  sources and ZigBee bears to be partially broken:-
[13/09/2021, 18:49:40] Homebridge v1.3.4 (Homebridge 1062) is running on port 51870.
[13/09/2021, 18:49:40] [ZigBee] Configured port for ZigBee dongle is /dev/ttyACM0
[13/09/2021, 18:49:40] [ZigBee] Initializing ZigBee controller on port /dev/ttyACM0 and channels 11, 25 (pan ID 6754)
[13/09/2021, 18:50:45] [ZigBee] Error: AREQ - ZDO - stateChangeInd after 60000ms
at Timeout._onTimeout (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
[13/09/2021, 18:50:45] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:50:45] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:50:51] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:50:51] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:50:51] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:50:56] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:50:56] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:50:56] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:01] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:01] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:01] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:07] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:07] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:07] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:12] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:12] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:12] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:17] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:17] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:17] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:22] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:22] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:22] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:28] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:28] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:28] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:33] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:33] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:33] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:38] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:38] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:38] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:43] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:43] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:43] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:49] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:49] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:49] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:54] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:54] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:54] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:51:59] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:51:59] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:51:59] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:04] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:04] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:04] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:10] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:10] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:10] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:15] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:15] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:15] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:20] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:20] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:20] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:25] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:25] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:25] [ZigBee] Retrying connect to hardware
[13/09/2021, 18:52:31] [ZigBee] Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
at SerialPort. (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[13/09/2021, 18:52:31] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:31] [ZigBee] error: TypeError: Cannot read property 'permitJoin' of undefined
at Controller.permitJoinInternal (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/controller/controller.ts:252:35)
at Controller.permitJoin (/usr/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman/src/controller/controller.ts:207:9)
[13/09/2021, 18:52:31] [ZigBee] ZigBee platform initialized @ 0x00124b001cdc5f5d
[13/09/2021, 18:52:31] [ZigBee] Reuse accessory from cache with uuid 6895c160-ba25-497f-b805-38071c751c56 and name zigbee:permit-join
[13/09/2021, 18:52:31] [ZigBee] Zigbee: disabling joining new devices.
[13/09/2021, 18:52:31] [ZigBee] PermitJoin accessory successfully registered
[13/09/2021, 18:52:31] [ZigBee] Reuse accessory from cache with uuid 4994893c-ea77-4292-a4ad-09e1f36f7099 and name zigbee:touchlink
[13/09/2021, 18:52:31] [ZigBee] TouchLink accessory successfully registered
[13/09/2021, 18:52:31] [ZigBee] Initializing ZigBee device: Conservatory Radiator - TS0601 - _TZE200_ckud7u2l
[13/09/2021, 18:52:31] [ZigBee] Reuse accessory from cache with uuid e4824cbc-2b0d-42e4-9fd5-c286bc45203f and name 0x5c0272fffec8901f
[13/09/2021, 18:52:31] [ZigBee] Found class for device with key _TZE200_ckud7u2l:TS0601
[13/09/2021, 18:52:31] [ZigBee] Registered device: Conservatory Radiator _TZE200_ckud7u2l TS0601
[13/09/2021, 18:52:31] [ZigBee] Mounting device Conservatory Radiator...
[13/09/2021, 18:52:31] [ZigBee] Initializing ZigBee device: Office Radiator - TS0601 - _TZE200_ckud7u2l
[13/09/2021, 18:52:31] [ZigBee] Reuse accessory from cache with uuid 2425c332-e4af-4386-a704-c35cbe5eb920 and name 0x847127fffe1dbcc5
[13/09/2021, 18:52:31] [ZigBee] Found class for device with key _TZE200_ckud7u2l:TS0601
[13/09/2021, 18:52:31] [ZigBee] Registered device: Office Radiator _TZE200_ckud7u2l TS0601
[13/09/2021, 18:52:31] [ZigBee] Mounting device Office Radiator...
[13/09/2021, 18:52:31] [ZigBee] Initializing ZigBee device: 0x00124b002265c361 - DS01 - eWeLink
[13/09/2021, 18:52:31] [ZigBee] Reuse accessory from cache with uuid 44294822-4e26-4567-afa2-bc13415c633b and name 0x00124b002265c361
[13/09/2021, 18:52:31] [ZigBee] Found class for device with key eWeLink:DS01
[13/09/2021, 18:52:31] [ZigBee] Registered device: 0x00124b002265c361 eWeLink DS01
[13/09/2021, 18:52:31] [ZigBee] Mounting device 0x00124b002265c361...
[13/09/2021, 18:52:31] [ZigBee] Initializing ZigBee device: 0x00124b0019387898 - lumi.router - LUMI

https://github.com/Koenkk/zigbee-herdsman/commit/18fbd5dd4689969a9a3e2e6bce2ab808af5d630f

After downgrading to 2.5.2 still did't work until I re-flashed  my Zigbee adapter.

Thanks for reporting this @maccoylton, I just released a new version and forced the downgrade of the serialport package

authors: maccoylton madchicken

repo: madchicken/homebridge-zigbee-nt


text:
Add support for custom http.Client

In appengine you cant use the default http.Client. I needed a custom urlfetch.Client (wich maches the http.Client interface).
However there was no way to submit a custom client.
My simple code change allows this. Its backwards compatible.
The log file from Appengine logs:

Post https://fcm.googleapis.com/fcm/send: http.DefaultTransport and http.DefaultClient are not available in App Engine. See https://cloud.google.com/appengine/docs/go/urlfetch/

Coverage increased (+2.8%) to 74.194% when pulling 648050d2dd79f9557651edf892c96cfebf324b5d on tjerkw:master into e0ec689372257e2607f615ee597014e0fb74fb31 on maddevsio:master.

Coverage increased (+2.8%) to 74.194% when pulling 648050d2dd79f9557651edf892c96cfebf324b5d on tjerkw:master into e0ec689372257e2607f615ee597014e0fb74fb31 on maddevsio:master.

Coverage increased (+2.8%) to 74.194% when pulling 648050d2dd79f9557651edf892c96cfebf324b5d on tjerkw:master into e0ec689372257e2607f615ee597014e0fb74fb31 on maddevsio:master.

LGTM. Thanks

source: gharchive/pull-request

authors: coveralls gen1us2k tjerkw

repo: maddevsio/fcm

license: MIT

license_type: permissive

license_source: github-api


text:
Some guidelines to improve code quality

Hello!
I've checked out your project and I want to suggest you some refactoring tips

Make a MainWindow class and simply avoid using global variables

class MainWindow(Tk):
  styler = ttk.Style()
  storage = ...
  current_left = ...

  ....

and you can configure styles and other gui things in init method, for ex.:
  ...
  def __init__(self):
    super().__init__()
    self.title("PyCalc")
    ...
    styler.theme_use("calm")
    ...

and next you can use storage or temporary operand variables in any method here or directly pass it in other objects, for ex.:
  def put_in_storage(): # cout
    storage[-1] = ...
    ...

This step needs to separate the gui functionality and the core program logic so you can independently change them.

Define a class with all control elements

class Controls:
  operators = [....]
  special = [...]
  ...

and make an instance of this class a field of your MainWindow class. Using this approach you can easily bind control elements like:
  def control_binding():
    for control_element in [str(x) for x in range(10)]: # or your controls list
      some_button= ttk.Button(keypad, text=control_element, command=lambda: cout(control_element))
      # or append this buttons to button list and like button_list.append(some_button)

instead of:
nine = ttk.Button(keypad, text='9', command=lambda: cout('9'))
eight = ttk.Button(keypad, text='8', command=lambda: cout('8'))
seven = ttk.Button(keypad, text='7', command=lambda: cout('7'))
six = ttk.Button(keypad, text='6', command=lambda: cout('6'))
five = ttk.Button(keypad, text='5', command=lambda: cout('5'))
four = ttk.Button(keypad, text='4', command=lambda: cout('4'))
three = ttk.Button(keypad, text='3', command=lambda: cout('3'))
two = ttk.Button(keypad, text='2', command=lambda: cout('2'))
one = ttk.Button(keypad, text='1', command=lambda: cout('1'))
zero = ttk.Button(keypad, text='0', command=lambda: cout('0'))

I think you would got a point.

Make a class with calc methods
This is another step to separate your program components. Also you can make an instanse of this class as a field of MainWindow to have a direct access.

Elimenate nested "if" instructions
For ex.:

if cond1:
  if cond2:
    if cond3:
     ...
    else:
  ..elses..

can be written as:
if not cond1:
   ...
   return
if not cond2:
  ...
  return

I think you would got a point.
I recommend you to read "Clean code" by Robert Martin. There are a lot of guidelines to improve your code quality with perfect argumentation.
Good luck!

This is a lot of very useful tips you have provided. The code badly needed a clean-up, but I did not know where to start. I was thinking about making it modular a.k.a separating the code into many sub-files and importing them when necessary. Your approach seems promising :+1: .
Defining a function to replace the repetition of code should be the first priority. It greatly help readability. Sparse is better than dense should be taken into account.
Thanks a bunch for this detailed Issue. I will get back to you, if I land up in any trouble while re-writing the code. I also would like to know about your views on breaking the code to many sub-files instead of one long source.py. Will it be a better approach?

Definetely, it will be.
You can make a folder (package) for graphical things like windows (for ex. SimpleMainInterface and AdvancedMainInterface) and for styling purposes (for ex. make your own buttons by inheriting from tk buttons with future customizations). Also make a core package with a class for calculation. The idea is to separate gui and core functionality for independent testing and development.
It is a part of weak connection concept.
I see the file hierachy as
__init__.py
main.py
gui
  windows
    abstractwindow.py
    simpleinterfacewindow.py
    advancedinterfacewindow.py
  buttons
    custombuttons.py
core
  calculation
    expressionparser.py
    calculator.py
  controls
    operations.py
    functions.py
    ...
tests
  ....

You need to make your windows implementing singleton pattern for some reasons. You can read about it here: singleton. It would help you to store the state of your window.
Ask me if you have any questions and keep developing!

In the process of binding control elements,
  def control_binding():
    for control_element in [str(x) for x in range(10)]: # or your controls list
      some_button= ttk.Button(keypad, text=control_element, command=lambda: cout(control_element))
      # or append this buttons to button list and like button_list.append(some_button)

To grid all the buttons in columns of three, some_button is appended to button_list and then in def gridding the buttons are accessed using indices, am I right?
# earlier code (code to be refactored)
nine.grid(row=2, column=0)
eight.grid(row=2, column=1)
seven.grid(row=2, column=2)
six.grid(row=3, column=0)
five.grid(row=3, column=1)
four.grid(row=3, column=2)
three.grid(row=4, column=0)
two.grid(row=4, column=1)
one.grid(row=4, column=2)

# refactored code
...
    def control_binding(self):
        for control_element in [str(number) for number in range(10)]:
                    some_button = ttk.Button(keypad, text=control_element, command=lambda: self.cout(control_element))
                    self.NUM_BUTTONS.append(some_button)

    def gridding(self):
        ROW = 1
        for button_place in range(len(NUM_BUTTONS):
            MOD =   button_place%3
            if MOD == 0:
                ROW += 1
            NUM_BUTTONS[button_place].grid(row=ROW, column = mod)
...

Is this the correct approach to do it?

Exactly!
In the case of number buttons your can shorten gridding code as
def gridding(self):
    for button_index in range(len(num_buttons)):
         num_buttons[button_index].grid(row=button_index//3, column=button_index%3) # or row=button_index//3 + 2 if you need to start from 2

Most programming languages have own code style guides/naming conventions. In python the most considered style guide is PEP-8. According to this all uppercase variable names should refer to constant objects, for ex.: DAYS_PER_WEEK = 7 or GPU_CORES = 4 etc. Try to avoid using uppercase names when its not a constant object (like num_button or row/mod).

Nested if-else is a real mess to clear. Unfortunately, there is a bunch of those in core logic part of code. To make the* nested* statements flat, usage of and and or operators the correct approach?
Following is one of many nested blocks:
...
    if char in OPERATORS:
        if STORAGE[-1] == None:
            if char in OPERATORS[:2]:
                ''' Case when first input is '/' or '*' '''
                STORAGE += ['1']+list(char)
            else:
                ''' Case when first input is '+' or '-' '''
                STORAGE += ['0']+list(char)
        elif STORAGE[-1] in OPERATORS:
            ''' Switching to latest operator, example: '3+-' evalutes to '3-' '''
            STORAGE[-1] = char
        else:
            STORAGE += list(char)
    else:
        ...
...

The next following code is an attempt to make the nested block flat:
...
# if block
if char in OPERATORS and STORAGE[-1] is None and char in OPERATORS[:2]:
	''' Case when first input is '/' or '*' '''
	STORAGE += ['1']+list(char)

if char in OPERATORS and STORAGE[-1] is None and char not in OPERATORS[:2]:
	''' Case when first input is '+' or '-' '''
	STORAGE += ['0']+list(char)

if char in OPERATORS and STORAGE[-1] in OPERATORS:
	''' Switching to latest operator, example: '3+-' evalutes to '3-' '''
	STORAGE[-1] = char

if char in OPERATORS and STORAGE[-1] not in OPERATORS:
	STORAGE += list(char)

# else block
if char not in OPERATORS and ...
...

Logic operators are good to use in conditions, but the idea of flattening is to make represented conditionals more readable.
Your eyes should flow by your code (? english is not my native, idk how to shape it). All conditional logic should be easy to understand.
Some ideas are below. It is not a perfect solution, but compare it to your version. Is it easier to understand?
class Storage:
    __operators: list = ["*", "/", "-", "+"]
    __special: list = ["C", "AC", "P/M"]
    __storage: list

    def __init__(self):
        self.__storage = []

    def get_storage(self) -> list:
        """ get storage as a list """
        return self.__storage

    def get_storage_as_string(self) -> str:
        """ get string representation """
        return "".join(
            map(
                lambda element: " " + element + " " if element in self.__operators else element,
                self.__storage
            )
        )

    def __repr__(self) -> str:
        return self.get_storage_as_string()

    def put_in_storage(self, character: str) -> None:
        """ puts a character to storage """
        if character in self.__operators:
            return self.__put_operator(character)
        if character in self.__special:
            return self.__apply_special(character)
        if not character.isnumeric() and character != ".":
            raise Exception("Given symbol is invalid")  # todo: check if there is only one dot in number
        return self.__put_digit(character)

    def __put_operator(self, character: str) -> None:
        if len(self.__storage) > 0:  # is not empty
            if self.__storage[-1] in self.__operators:
                self.__storage[-1] = character
            else:
                self.__storage.append(character)
        else:
            """ put "1" + ("/" or "*") or "0" + ("+" or "-") """
            self.__storage.extend([["1", "0"][self.__operators.index(character)//2], character])

    def __apply_special(self, character: str) -> None:
        if character == "AC":
            self.__storage.clear()
        if character == "C":
            pass
        if character == "P/M":
            pass

    def __put_digit(self, character: str) -> None:
        if len(self.__storage) == 0 or self.__storage[-1] in self.__operators:
            """ is empty or previous chunk is an operator """
            self.__storage.append(character)
        else:
            self.__storage[-1] += character

def test1(storage_instance: Storage) -> tuple:
    storage_instance.put_in_storage("1")
    storage_instance.put_in_storage("+")
    storage_instance.put_in_storage("2")
    storage_instance.put_in_storage("4")
    storage_instance.put_in_storage("/")
    storage_instance.put_in_storage("5")
    result_str = storage_instance.get_storage_as_string()
    return result_str, 1 if result_str == "1 + 24 / 5" else 0

def test2(storage_instance: Storage) -> tuple:
    storage_instance.put_in_storage("/")
    storage_instance.put_in_storage("5")
    result_str = storage_instance.get_storage_as_string()
    return result_str, 1 if result_str == "1 / 5" else 0

def test3(storage_instance: Storage) -> tuple:
    storage_instance.put_in_storage("+")
    storage_instance.put_in_storage("1")
    result_str = storage_instance.get_storage_as_string()
    return result_str, 1 if result_str == "0 + 1" else 0

if __name__ == "__main__":
    # make unit tests using unittest?
    for test in [test1, test2, test3]:
        storage_instance = Storage()
        test_result = test(storage_instance)
        print("{}: got {}, valid? {}"
              .format(test.__name__, test_result[0], ["not", "yes"][test_result[1]]))

I know that it might be a bit complicated code for beginner, so if you have any questions feel free to ask me here.

@nechepurenkoN, to be honest, the concepts of tests and using of class is something I have never implemented myself. They remain solely in tutorial examples. All of your suggestions are forcing me to learn concepts which I either ignored or which I have never encountered myself. I do foresee a lot more queries to be posted by me here.
Thanks a lot for lending a helping hand. Your help and suggestions means a lot to me. You will be bothered many more times before the completion of this refactoring project :smile: .

The truth is if you want to become a software developer, one day you will have to face up classes, tests and other boring stuff.
Why these classes, refactoring, decomposition etc. are important?
If you want to build a good house you need a solid foundation. Even if you want to build a hut of branches.
A good code architecture and styling make new features or changes easier to implement. It provides you an opportunity to update some functionality without affecting stable code what is a very important thing if your program grows.
It might be like a steep trampoline, but any difficulties your overcome make you more experienced and professional.
As you develop this habit to map out what kind of architecture should have been implemented, what components of your program should be packaged as classes etc., you elaborate your professional vision of problem. And this pet-project can become like a training camp where you can practice and apply new knowledge, why not?
I'm not bothered to help you because I answer in my spare time and I don't need something in return. Don't be ashemed to ask questions that seems "fool" or something like that, because it's normal when you learn something new. Programming concepts like object-oriented paradigm are not easy to understand on your own, but I can help you with examples related to your project.
Like in the code above, I haven't changed the main logic itself, but I've reorganized code to make it like an indepent component, so it could be reused and modified without affecting other "components".
I don't insist to do this refactoring things, but if you want to, mention me at this thread with any question you have.

I don't insist to do this refactoring things, but if you want to, mention me at this thread with any question you have.

I have been refactoring this code, right from the day this thread was opened. I made little progress due to lack of experience and clarity. Your previous snippet of refactored code is just what I needed. I will update my progress regularly is a separate gist.

Some ideas are below. It is not a perfect solution, but compare it to your version. Is it easier to understand?

It is way easier to understand the code now. It is very clear to me now that architecture of the code is very important for readability.

I'm not bothered to help you because I answer in my spare time and I don't need something in return.

This is so nice of you. :smile:

I know that it might be a bit complicated code for beginner, so if you have any questions feel free to ask me here.

TBH, it looked complicated at first sight. I sat down yesterday and started exploring all the unknowns concepts in your example code. End result, I was able to see the beauty of your refactored chunk of code after learning function annotation, variable annotation, difference between class variable and instance variable.
I believe continuing to keep this thread as descriptive as possible will help other new-devs in future in some or the other way. :nerd_face:

Update from WIP refactor source gist.
I made a class for calculation, calculate. To link both the classes Storage and Calculate,  I first made an instance obj in go_for_calc. In class Calculate expression holds string representation of __storage:
class Storage:
    ...

    def go_for_calc(self):
        obj = Calculate(self.__storage)
        self.__answer = obj.__calculate
    ...

class Calculate:
    ans: str

    def __init__(self, expr_as_list):
        self.expression = ''.join(i for i in expr_as_list)

    def __calculate(self) -> str:
        self.ans = str(eval(self.expression)
        return self.ans

Unfortunately, this throws AttributeError: 'Calculate' object has no attribute '_Storage__calculate'. I don't understand why this does not work. I did a workaround like this:
class Storage:
    ...

    def go_for_calc(self):
        obj = Calculate(self.__storage)
        self.__answer = obj.ans
    ...

class Calculate:
    ans: str

    def __init__(self, expr_as_list):
        self.expression = ''.join(i for i in expr_as_list)
        self.__calculate()

    def __calculate(self) -> str:
        self.ans = str(eval(self.expression)

This does give the desired answer but I am pretty sure there is a better way to do this.
Note: I have used eval() to parse the equation as a temporary use. Calculation logic is to be added later in class Calculate.

In the line 56 there is a typo:
self.__storage.extend(['0', '1'][self.__operator.index(operator)//2, operator])

instead of
self.__storage.extend([['1', '0'][self.__operator.index(operator)//2], operator])

It needs ']' after '//2', "1" before "0" and "[" in the beginning. How does it works?
Extend method make something like a concatenation but operating with lists, so in this line we are trying to concatenate our storage and a list of 2 values. The second value is the operator, but what is the first? Here is some magic:
# we define a temporary list ["1", "0"]; for simplicity, let it be:
a = ["1", "0"]
# how can we get 1 if operators are "*" or "/" and 0 if operators are "+", "-" ?
# we know, that this character IS in our operators list, so lets find its position:
index = self.__operators.index(character)
# we will get index in [0..3] range, and 0-1 should be mapped to 0th index in a, 2-3 to 1th index in a
# so we divide index by 2
index_in_a = index // 2
# and get the number
result = a[index_in_a]
# hence, we can shorten this expression, by defining list "a" in place and not assigning it to a variable
# [create a][get index_in_a]
  ["1", "0"][self.__operators.index(character)//2] == ("1" if character in ["/", "*"]) or ("0" if character in ["+","-"])

This is not a good practice make things like that, but I wanted to show you some language sugar :)

Two underscores mark a class field or method as private. It means that you can access it only in class definition, for ex.:
class A:
  __a = 10

class B:
  def __init__(self):
    a_instance = A()
    print(a_instance.__a) # is incorrect, because the field __a is private
                   # it cannot be accessed outside class A.

Private functions also are not accessible outside class definition. There is a way to access it, but it is some kinda hacking.
If you want to function or field being visible outside then don't use two underscores in the name prefix. For ex.:
class A:
  def calculate(self):
    pass
  def __calculate1(self):
    pass

class B:
  def foo(self):
    a = A()
    a.calculate() # all good
    a.__calculate1() # error

Why should you use private functions then? Let's look up in put_in_storage. It is public function, we can call it outside a class definition. We can create an object (instance) and call this method to put character in storage. But why __put_operand is private? What will happen if we make it public? You could call storage_instance.put_operand("1") or storage_instance.put_operand("&") and it is a bad news. It will break a core logic, because we secure this function and call it if only character is a valid operand, in other words "+", "-", "*" or "/".
If it is not clear ask me for another examples.

Two underscores mark a class field or method as private. It means that you can access it only in class definition

Ok,
I tried out and found that inherited class does not come under the base class definition.  I need the __operators defined in class Storage to be included in class Calculate. To do this I found two ways to do it:
class Calculate(Storage):
    operators = Storage.__operators

    def __init__(self, expr_as_list):
        self.expression = ''.join(i for i in expr_as_list)
    ...

In this second approach I made the following changes in Storage and Calculate:
class Storage:
    ...
    def go_for_calc(self):
        obj = Calculate(self.__storage, self.__operators)
        ...
    ...

class Calculate:
    ...
    def __init__(self, expr_as_list, operators):
        self.expression = ''.join(i for i in expr_as_list)
        self.operators = operators
    ...

@nechepurenkoN, can you please point out which is safer way, or if there is a better way to do it?

IMHO, the second way is better. Inheritance is used when you want to extend existing class with new fields/methods or redefine methods. For example, there is Hero class and its objects have attack() method. You can make knight and archer class and redefine attack method.
class Hero:
  def __init__(self, base_damage):
    self.base_damage = base_damage
  def attack(self):
    pass

class Knight(Hero):
  def __init__(self, base_damage):
    super().__init__(base_damage)
  def attack(self):
    print(f"Melee attack with {self.base_damage} damage")

class Archer(Hero):
  def __init__(self, base_damage):
    super().__init__(base_damage)
  def attack(self):
    print(f"Range attack with {self.base_damage} damage")

Knight and archer are heroes, so it is logical to use inheritance. But Storage and Calculator are not so connected.
Usually, all the class fields are made private. As I said, if we make self.__storage of Storage as self.storage, then you (or other developers) could make some bad things:
storage_instance = Storage()
storage_instance.put_in_storage("&") # will not have a bad consequences
storage_instance.storage.append("&") # some problems here

So we have to protect storage list -> make it private (__storage). And the question itself: how to access this field?
Let's introduce getters and setters methods:
class A:
  def __init__(self):
    self.__a = 10
    self.__b = 5
  def get_a(self):
    return self.__a
  def get_b(self):
    return self.__b
  def set_a(self, new_a):
    self.__a = new_a
  def set_b(self, new_b):
    self.__b = new_b

obj = A()
print(obj.get_a)
obj.set_a(42)
print(obj.get_a)

But in our case, we cannot just make def get_storage(self): return self.__storage, because it is a list object and we could break it again:
storage_list = storage_instance.get_storage()
storage_list.append("&") # would affect __storage (see how does python store lists)

Solution:
...
def get_storage(self):
  return self.__storage.copy()
...

We return a copy of storage list which we can read and manipulate with. Make a method in Calculator
...
def calculate(self, storage: Storage) -> float:
  storage_list = storage.get_storage()
  # or use storage.get_storage_as_string
  ...

Usage:
storage_instance = Storage()
calculator_instance = Calculator()
result = calculator_instance.calculate(storage_instance)

There is a way to shorten calculation code. I adapt it to your method.
operators = ["*", "/", "+", "-"]
expression_list = ["1", "+", "2"]

functional_mapping = {
    "+": lambda x,y: x+y,
    "-": lambda x,y: x-y,
    "*": lambda x,y: x*y,
    "/": lambda x,y: x/y
}

left_operand = float(expression_list[0])
right_operand = float(expression_list[2])
operator = expression_list[1]

result = functional_mapping[operator](left_operand, right_operand)
print(result)

When we call funtional_mapper[operator], for example: functional_mapper["+"], we get an assigned lambda function (function without name and with only omitted return statement) and we can pass our operands in this function. Try to test this code. And to add new operation just add in functional_mapper new line like: "@": lambda x,y: (return) ...

When we call funtional_mapper[operator], for example: functional_mapper["+"], we get an assigned lambda function (function without name and with only omitted return statement) and we can pass our operands in this function. Try to test this code. And to add new operation just add in functional_mapper new line like: "@": lambda x,y: (retur

This is absolute beauty. I really like this logic to shorten the code :+1:.

        if not character.isnumeric() and character != ".":
            raise Exception("Given symbol is invalid")  # todo: check if there is only one dot in number

Update from gist, when multiple decimal(dot) entry, logic updated to consider only first entry (ln: 79).
    def __put_dot(self, dot):
        if self.__storage[-1] not in self.__operators:
            index_of_dot = self.__storage[-1].find(dot)
            if index_of_dot != -1:
                ''' Multiple decimal inputs ex! (3.2.).
                Replacing '''
                self.__storage[-1].replace(dot, '')
            else:
                self.__storage[-1] += dot

It is still disturbing to see the need of using nested if-else here. I don't see a workaround to solve this without a nested block.

If there was a dot before, why don't just ignore next number dots? This is how Windows calculator works. Test out, what happens if you are trying to add another dot to a number (in Linux for ex.)?
To ignore other dots simply add a condition
def __put_dot(self):
  if len(self.__storage) == 0:
    self.__storage.append("0.")
    return
  if self.__storage[-1] not in self.__operators and not "." in self.__storage[-1]:
    self.__storage[-1] += "."

Test out, what happens if you are trying to add another dot to a number (in Linux for ex.)?

Linux points out where the malformed expression is:

I think that ignoring is not a bad decision at all

Today's update:

Function __put_dot updated.
New class for GUI added.
Fatal errors in GUI:

Every button entry (excluding '=') results in display of character '0'

I came to a conclusion that ttk.Button with same name rebinds the command to latest definition. Hence this code chunk rebinds every button command to '0' (last entry):
...
    __layout = ['*', '/', 'C', 'AC',
                '9', '8', '7', '-',
                '6', '5', '4', '+',
                '3', '2', '1', '+/-',
                '.', '0', '=']
    ...
# ln: 170
        ''' Control Binding '''
        buttons = []
        for bt_text in self.__layout[:-1]:
            bt = ttk.Button(master=keypad)
            bt['text'] = bt_text
            bt['command'] = lambda: (self.bt_cmd.into_storage(bt_text),
                                     self.bt_cmd.show_storage(self.DISPLAY))
            buttons.append(bt)
...

Is this conclusion relevant or am I getting it wrong?

Why do we refactor a code? To make the code shorted or to make it more readable?
If the answer is to achieve best of both worlds; if a case arises where a certain code chunk can either be made made readable-compromising the code length- or can be made shorter -compromising the readability- which option should one choose?

I really have no idea why doesn't buttons binding work :(. I haven't used python gui libraries so I can't help you with previous question.
If you can make your code more readable, then make it, but keep in mind that some programmers are more experienced than we are. They don't use, for example, range loops, generally speaking - common approaches. The way they shorten the code is using some language technics, sugar etc. without making it more difficult to read for people who knows the language as intermediate user. For example:
a = [1,2,3,4]
for i in range(len(a)):
  print(f"index: {i}, element: {a[i]}")

for index, element in enumerate(a):
  print(f"index: {index}, element: {element}")

a = []
for i in range(5):
  if i % 2 == 0
   a.append(i*i)

a = [i*i for i in range(5) if i % 2 == 0]

# consider a, b are int variables
temp = a
a = b
b = temp

a, b = b, a

We make our code more readable by using built-in function enumerate. The first approach is more general, it might be user in any programming language with arrays and for-loops. The second one is using a generator - some useful pythonic feature. Readability is the most important thing, but if if you can shorten the code without losing readability then make it.

Presently there seems no better workaround for button binding problem. Anyhow, source.py is refactored and broken down to separate files.
@nechepurenkoN many thanks for bringing up this issue :tada: . The code now looks way cleaner and readable than before, I believe. To sum up all the changes done:

All usage of global scrapped,
seperate classes for calculation, gui, storage,
deeply nested if-else flattened.

I have thinking about this for a while: using a Entry widget in place of Label -(display_label)- widget to display the input/result seems more appropriate. By switching to a Entry field:

there is no need for key-bindings,
no need to explicitly trim the display to specified characters.

Moreover it morally doesn't seem right. Here are some words from tkdocs:

A label is a widget that displays text or images, typically that the user will just view but not otherwise interact with. Labels are used for such things as identifying controls or other parts of the user interface, providing textual feedback or results, etc.

Entry widget:

An entry presents the user with a single line text field that they can use to type in a string value.

Allowing users to directly enter input (ex: copy/paste) can be achieved by using ttk.Entry widget too. Is this switch-over worthy, maybe a good time to start a separate issue to address this subject?

source: gharchive/issue

authors: maddypie nechepurenkoN

repo: maddypie/PyCalc


text:
HW_3

Поднимите airflow локально, используя docker compose.

Реализуйте dag, который генерирует данные для обучения модели (5/5).

Реализуйте dag, который обучает модель еженедельно, используя данные за текущий день (10/10).

Реализуйте dag, который использует модель ежедневно (5/5).
Скриншот_1
Скриншот_2

Все даги реализованы только с помощью DockerOperator (10/10).

Реализуйте сенсоры на то, что данные готовы для дагов тренировки и обучения (3/3).

Протестируйте ваши даги (5/5).

Cамооценка (1/1).

Итого: 39 баллов

В задании указано: "Чтобы получить баллы, сделайте скриншоты списка всех дагов и каждого графа по отдельности (в исполненном без ошибок виде) и прикрепите их в описание пулл реквеста". У Вас нет скриншотов каждого отдельного дага в исполненном виде. Без этого баллы не будут начислены

authors: Totenkaf bulaevvi


text:
Reflect #8 in docs

Change https://madesane.github.io/wyvern-docs/plugins.html according to newest change in #8

Better description for plugin support added in 7ec8015525dea90b742237e01b38aba4cc1d5bc1

repo: madesane/wyvern

license: mit

license_source: bigquery


text:
Tokio retry2

Replaces unmaintained tokio-retry with tokio-retry2
Removes unnecessary clone on copy type (UUID).

Ok, please add a small comment to that effect. Otherwise I'll always be
tempted to rewrite it :)
Le mar. 17 sept. 2024, 21 h 49, Julia Naomi @.***> a
écrit :

@.**** commented on this pull request.
In rust/telemetry-sink/src/http_event_sink.rs
https://github.com/madesroches/micromegas/pull/216#discussion_r1764282367
:

@@ -135,7 +144,7 @@ impl HttpEventSink {
if let Err(e) = &result {
debug!("insert_stream error: {e}");
}

       result

       Ok(result?)

Implicit error conversion.
I need that or map_transient to return the same Result type
—
Reply to this email directly, view it on GitHub
https://github.com/madesroches/micromegas/pull/216#discussion_r1764282367,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACCJB4OFGI43ULKZ3EP4LYDZXDL35AVCNFSM6AAAAABOKMXKGCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJRGQ2TEOBXGQ
.
You are receiving this because you commented.Message ID:
@.***>

Thank you very much!

authors: madesroches naomijub

repo: madesroches/micromegas


text:
mevn deploy to heroku issues

Describe the bug
I'm attempting to deploy a fairly fresh set of changes to heroku.  However, after I make the change, I get the message --> NO CHANGES DETECTED.  I am definitely making changes and git is detecting them.  But for some reason, the deploy script won't detect them.
To Reproduce
Using this public repo for now --> https://github.com/avdrav/imfcharts
Expected behavior
Expected change to appear in heroku
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Info
System:
OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Binaries:
Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
Browsers:
Firefox: 78.0.1
npmGlobalPackages:
mevn-cli: 1.7.5
Additional context
Add any other context about the problem here.

I assume things went well when you ran mevn deploy for the very first time. Can you please elaborate the changes you made prior to firing in mevn deploy for the second time?
I did gave it a try on your repo and things were working fine.

correct it happens on the second try.  it worked great on the initial push.
i made some very simple changes adding a connector to a mongodb atlas instance.  i also made a call to the reddit api.  thats it.

https://github.com/avdrav/imfcharts/commits/master

That's strange. Can you please give it a try on the beta release and confirm if things remain the same - mevn-cli@beta

whats the cleanest way to switch to the beta?  uninstall and re-install using npm?

ok tried that.  upgraded to v1.7.5 of mevn-cli and still getting the same error.  No changes detected

hmm looks like i was already on the beta?

are you able to reproduce on your end after making a simple change to the codebase?

whats the cleanest way to switch to the beta?  uninstall and re-install using npm?

npm i -g mevn-cli@beta

are you able to reproduce on your end after making a simple change to the codebase?

Nope, I made a slight change to one of the components firing in mevn deploy did the job.

https://github.com/avdrav/imfcharts/commits/master

Your latest commit targets the server directory. As of v1.7.5 there isn't the provision to deploy the server. It is just the client directory which is being watched.

so how to deploy the server piece now?

yes it works when i touch the client.  but im confused as to how to deploy the server/api piece now.  my assumption was that mevn deploy does both.  bad assumption?

thanks for all your help btw!

yes it works when i touch the client.  but im confused as to how to deploy the server/api piece now.  my assumption was that mevn deploy does both.  bad assumption?

As I said v1.7.5 doesn't include the provision to deploy the server. It is gonna come up with the next minor release: v1.8.0 which is in beta right now.

@avdrav if you feel your issue has been resolved, feel free to close this issue :)
And if you're liking the project don't forget to leave a ⭐
Looking forward to having your very first contribution to the project 🙌

Awesome -- will the beta version create Procfile?  How will it run the server on Heroku?

Nope, both of em are deployed as seperate apps to Heroku.

I'm gonna close it for now. Feel free to shoot your queries here :)

So i tried to deploy the server using 1.8.0-beta.5
Here is the error I get.  I works locally.
2020-07-06T17:15:43.539338+00:00 app[web.1]: SyntaxError: Cannot use import statement outside a module 2020-07-06T17:15:43.539339+00:00 app[web.1]: at wrapSafe (internal/modules/cjs/loader.js:1054:16) 2020-07-06T17:15:43.539339+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1102:27) 2020-07-06T17:15:43.539359+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) 2020-07-06T17:15:43.539360+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:986:32) 2020-07-06T17:15:43.539360+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:879:14) 2020-07-06T17:15:43.539371+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) 2020-07-06T17:15:43.539371+00:00 app[web.1]: at internal/main/run_main_module.js:17:47 2020-07-06T17:15:43.550207+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2020-07-06T17:15:43.550591+00:00 app[web.1]: npm ERR! errno 1 2020-07-06T17:15:43.552157+00:00 app[web.1]: npm ERR! server@1.0.0 start: node server.js2020-07-06T17:15:43.552352+00:00 app[web.1]: npm ERR! Exit status 1 2020-07-06T17:15:43.552582+00:00 app[web.1]: npm ERR! 2020-07-06T17:15:43.552758+00:00 app[web.1]: npm ERR! Failed at the server@1.0.0 start script. 2020-07-06T17:15:43.552920+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@jamesgeorge007 any thoughts on this?  still stuck at this error when I try the heroku server deploy

Apologies for the delay in response. I can see that your codebase consumes ES6 syntax (import statements).
https://github.com/avdrav/imfcharts/blob/437257b03d99e5d20db15bab97613e0e3c0b4c35/server/server.js#L2
const express = require('express')

You can get it working by converting them to the es5 equivalent. Or if you prefer to have modern syntax, make use of a transpiler like babel or something like esm.

@avdrav I had sent you a connection request in LinkedIn, let's connect 👍

But shouldn't the build/deploy process take this into account?  I haven't written any custom code yet -- just trying to deploy the Hello World example basically.

@jamesgeorge007

Also why does it work locally but not on the deploy?

The latest release (v1.7.5) seems to be using ES6 syntax for the server side template.

repo: madlabsinc/mevn-cli


text:
Use CONSTs whenever possible

Recently, all code was migrated to use LET only (instead of VAR).
The next step is to mark variables that are only assigned only once as CONST.
From the report, that is the majority of the assignments.
Report with "prefer-const": 2:
SaltGUI/saltgui/static/scripts/api.js
   14:9   error  'cmdbox' is never reassigned. Use 'const' instead           prefer-const
   59:9   error  'button' is never reassigned. Use 'const' instead           prefer-const
   61:9   error  'output' is never reassigned. Use 'const' instead           prefer-const
   63:9   error  'target' is never reassigned. Use 'const' instead           prefer-const
   64:9   error  'command' is never reassigned. Use 'const' instead          prefer-const
   66:9   error  'func' is never reassigned. Use 'const' instead             prefer-const
   79:9   error  'response' is never reassigned. Use 'const' instead         prefer-const
   81:9   error  'outputContainer' is never reassigned. Use 'const' instead  prefer-const
   85:9   error  'button' is never reassigned. Use 'const' instead           prefer-const
   90:9   error  'manualRun' is never reassigned. Use 'const' instead        prefer-const
  102:9   error  'manualRun' is never reassigned. Use 'const' instead        prefer-const
  109:9   error  'command' is never reassigned. Use 'const' instead          prefer-const
  110:9   error  'output' is never reassigned. Use 'const' instead           prefer-const
  123:9   error  'params' is never reassigned. Use 'const' instead           prefer-const
  135:9   error  'api' is never reassigned. Use 'const' instead              prefer-const
  137:9   error  'params' is never reassigned. Use 'const' instead           prefer-const
  144:9   error  'type' is never reassigned. Use 'const' instead             prefer-const
  176:9   error  'errLabel' is never reassigned. Use 'const' instead         prefer-const
  194:9   error  'args' is never reassigned. Use 'const' instead             prefer-const
  197:9   error  'params' is never reassigned. Use 'const' instead           prefer-const
  199:9   error  'ret' is never reassigned. Use 'const' instead              prefer-const
  211:9   error  'functionToRun' is never reassigned. Use 'const' instead    prefer-const
  251:9   error  'location' is never reassigned. Use 'const' instead         prefer-const
  252:9   error  'token' is never reassigned. Use 'const' instead            prefer-const
  254:9   error  'headers' is never reassigned. Use 'const' instead          prefer-const
  264:9   error  'onFetchResponse' is never reassigned. Use 'const' instead  prefer-const
  267:11  error  'options' is never reassigned. Use 'const' instead          prefer-const
SaltGUI/saltgui/static/scripts/documentation.js
  52:9  error  'button' is never reassigned. Use 'const' instead  prefer-const
  54:9  error  'output' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/saltgui/static/scripts/dropdown.js
  41:13  error  'chld' is never reassigned. Use 'const' instead            prefer-const
  42:11  error  'verifyCallback' is never reassigned. Use 'const' instead  prefer-const
  57:9   error  'button' is never reassigned. Use 'const' instead          prefer-const
SaltGUI/saltgui/static/scripts/output.js
   92:13  error  'hostname' is never reassigned. Use 'const' instead               prefer-const
   94:11  error  'output' is never reassigned. Use 'const' instead                 prefer-const
  107:15  error  'key' is never reassigned. Use 'const' instead                    prefer-const
  153:13  error  'hostname' is never reassigned. Use 'const' instead               prefer-const
  171:11  error  'hostResponse' is never reassigned. Use 'const' instead           prefer-const
  172:15  error  'key' is never reassigned. Use 'const' instead                    prefer-const
  195:11  error  'savedDocumentation' is never reassigned. Use 'const' instead     prefer-const
  211:13  error  'hostname' is never reassigned. Use 'const' instead               prefer-const
  213:11  error  'hostResponse' is never reassigned. Use 'const' instead           prefer-const
  215:15  error  'key' is never reassigned. Use 'const' instead                    prefer-const
  265:13  error  'hostname' is never reassigned. Use 'const' instead               prefer-const
  306:9   error  'commandArg' is never reassigned. Use 'const' instead             prefer-const
  307:9   error  'isDocumentationOutput' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/saltgui/static/scripts/parsecmdline.js
  44:9   error  'firstEqualSign' is never reassigned. Use 'const' instead  prefer-const
  84:13  error  's' is never reassigned. Use 'const' instead               prefer-const
SaltGUI/saltgui/static/scripts/router.js
  19:9   error  'router' is never reassigned. Use 'const' instead     prefer-const
  35:11  error  'route' is never reassigned. Use 'const' instead      prefer-const
  45:9   error  'router' is never reassigned. Use 'const' instead     prefer-const
  52:9   error  'elem' is never reassigned. Use 'const' instead       prefer-const
  56:9   error  'afterLoad' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/saltgui/static/scripts/routes/job.js
  11:9   error  'job' is never reassigned. Use 'const' instead        prefer-const
  20:9   error  'job' is never reassigned. Use 'const' instead        prefer-const
  21:9   error  'info' is never reassigned. Use 'const' instead       prefer-const
  28:9   error  'container' is never reassigned. Use 'const' instead  prefer-const
  32:9   error  'hostnames' is never reassigned. Use 'const' instead  prefer-const
  49:9   error  'host' is never reassigned. Use 'const' instead       prefer-const
  53:11  error  'task' is never reassigned. Use 'const' instead       prefer-const
  63:11  error  'data' is never reassigned. Use 'const' instead       prefer-const
  64:11  error  'task' is never reassigned. Use 'const' instead       prefer-const
SaltGUI/saltgui/static/scripts/routes/keys.js
   19:9  error  'keys' is never reassigned. Use 'const' instead      prefer-const
   30:9  error  'keys' is never reassigned. Use 'const' instead      prefer-const
   89:9  error  'element' is never reassigned. Use 'const' instead   prefer-const
   94:9  error  'menu' is never reassigned. Use 'const' instead      prefer-const
  102:9  error  'element' is never reassigned. Use 'const' instead   prefer-const
  104:9  error  'menu' is never reassigned. Use 'const' instead      prefer-const
  110:9  error  'element' is never reassigned. Use 'const' instead   prefer-const
  114:9  error  'rejected' is never reassigned. Use 'const' instead  prefer-const
  121:9  error  'menu' is never reassigned. Use 'const' instead      prefer-const
  129:9  error  'element' is never reassigned. Use 'const' instead   prefer-const
  133:9  error  'denied' is never reassigned. Use 'const' instead    prefer-const
  140:9  error  'menu' is never reassigned. Use 'const' instead      prefer-const
  149:9  error  'element' is never reassigned. Use 'const' instead   prefer-const
  153:9  error  'pre' is never reassigned. Use 'const' instead       prefer-const
  160:9  error  'menu' is never reassigned. Use 'const' instead      prefer-const
SaltGUI/saltgui/static/scripts/routes/login.js
  16:9  error  'typeItem' is never reassigned. Use 'const' instead    prefer-const
  26:9  error  'typeItem' is never reassigned. Use 'const' instead    prefer-const
  39:9  error  'submit' is never reassigned. Use 'const' instead      prefer-const
  47:9  error  'username' is never reassigned. Use 'const' instead    prefer-const
  48:9  error  'password' is never reassigned. Use 'const' instead    prefer-const
  58:9  error  'notice' is never reassigned. Use 'const' instead      prefer-const
  60:9  error  'success' is never reassigned. Use 'const' instead     prefer-const
  78:9  error  'notice' is never reassigned. Use 'const' instead      prefer-const
  80:9  error  'authFailed' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/saltgui/static/scripts/routes/minions.js
  17:9  error  'minions' is never reassigned. Use 'const' instead    prefer-const
  28:9  error  'keys' is never reassigned. Use 'const' instead       prefer-const
  30:9  error  'list' is never reassigned. Use 'const' instead       prefer-const
  32:9  error  'hostnames' is never reassigned. Use 'const' instead  prefer-const
  50:9  error  'element' is never reassigned. Use 'const' instead    prefer-const
  51:9  error  'menu' is never reassigned. Use 'const' instead       prefer-const
SaltGUI/saltgui/static/scripts/routes/page.js
    7:11  error  'header' is never reassigned. Use 'const' instead        prefer-const
    8:11  error  'menu' is never reassigned. Use 'const' instead          prefer-const
   16:13  error  'api' is never reassigned. Use 'const' instead           prefer-const
   24:9   error  'minions' is never reassigned. Use 'const' instead       prefer-const
   26:9   error  'list' is never reassigned. Use 'const' instead          prefer-const
   27:9   error  'hostnames' is never reassigned. Use 'const' instead     prefer-const
   30:11  error  'minion_info' is never reassigned. Use 'const' instead   prefer-const
   36:13  error  'minion' is never reassigned. Use 'const' instead        prefer-const
   69:9   error  'element' is never reassigned. Use 'const' instead       prefer-const
   73:9   error  'offline' is never reassigned. Use 'const' instead       prefer-const
   79:9   error  'ip' is never reassigned. Use 'const' instead            prefer-const
   81:9   error  'element' is never reassigned. Use 'const' instead       prefer-const
   85:9   error  'address' is never reassigned. Use 'const' instead       prefer-const
  107:9   error  'minion' is never reassigned. Use 'const' instead        prefer-const
  118:9   error  'element' is never reassigned. Use 'const' instead       prefer-const
  126:9   error  'jobContainer' is never reassigned. Use 'const' instead  prefer-const
  128:9   error  'jobs' is never reassigned. Use 'const' instead          prefer-const
  135:11  error  'job' is never reassigned. Use 'const' instead           prefer-const
  152:9   error  'element' is never reassigned. Use 'const' instead       prefer-const
  163:9   error  'router' is never reassigned. Use 'const' instead        prefer-const
  170:9   error  'keys' is never reassigned. Use 'const' instead          prefer-const
  171:9   error  'newArray' is never reassigned. Use 'const' instead      prefer-const
  174:11  error  'key' is never reassigned. Use 'const' instead           prefer-const
  175:11  error  'job' is never reassigned. Use 'const' instead           prefer-const
  194:9   error  'target' is never reassigned. Use 'const' instead        prefer-const
  195:9   error  'selection' is never reassigned. Use 'const' instead     prefer-const
  196:9   error  'range' is never reassigned. Use 'const' instead         prefer-const
  206:9   error  'target' is never reassigned. Use 'const' instead        prefer-const
  207:9   error  'command' is never reassigned. Use 'const' instead       prefer-const
SaltGUI/saltgui/static/scripts/routes/route.js
  28:9  error  'div' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/saltgui/static/scripts/utils.js
   3:9   error  'secondsPassed' is never reassigned. Use 'const' instead  prefer-const
  10:11  error  'minutes' is never reassigned. Use 'const' instead        prefer-const
  15:11  error  'hours' is never reassigned. Use 'const' instead          prefer-const
  24:11  error  'days' is never reassigned. Use 'const' instead           prefer-const
  37:7   error  'element' is never reassigned. Use 'const' instead        prefer-const
  44:7   error  'vars' is never reassigned. Use 'const' instead           prefer-const
  45:7   error  'hashes' is never reassigned. Use 'const' instead         prefer-const
  55:7   error  'div' is never reassigned. Use 'const' instead            prefer-const
SaltGUI/tests/functional/login.js
  15:9   error  'options' is never reassigned. Use 'const' instead    prefer-const
  49:11  error  'selector' is never reassigned. Use 'const' instead   prefer-const
  73:15  error  'loginpage' is never reassigned. Use 'const' instead  prefer-const
  92:15  error  'loginpage' is never reassigned. Use 'const' instead  prefer-const
  98:15  error  'loginpage' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/tests/unit/output.js
  3:5  error  'Output' is never reassigned. Use 'const' instead  prefer-const
SaltGUI/tests/unit/utils.js
  13:9  error  'now' is never reassigned. Use 'const' instead  prefer-const
  51:9  error  'now' is never reassigned. Use 'const' instead  prefer-const

You already let jslint do the work :)

authors: erwindon maerteijn

repo: maerteijn/SaltGUI


text:
For some reason I got this error when importing a VRCA file of one of my older avatars that I wanted to recover

Game name: VRChat
Engine version: N/A (not sure)
Platform: Windows
Error message: Some data left
Stack trace:    at uTinyRipper.Lz4.Lz4DecodeStream.ReadBuffer(Stream stream, Int64 count)
at uTinyRipper.BundleFiles.BundleFileBlockReader.ReadEntry(Node entry)
at uTinyRipper.BundleFileScheme.ReadFileStreamData(Stream stream, Int64 basePosition, Int64 headerSize)
at uTinyRipper.BundleFileScheme.ReadScheme(Stream stream)
at uTinyRipper.GameCollection.ReadScheme(SmartStream stream, String filePath, String fileName)
at uTinyRipper.GameCollection.LoadScheme(String filePath, String fileName)
at uTinyRipper.GameStructure.ProcessPlatformStructure(GameStructureProcessor processor, PlatformGameStructure structure)
at uTinyRipper.GameStructure.Load(List1 pathes, LayoutInfo layinfo)    at uTinyRipper.GameStructure.Load(IEnumerable1 pathes, LayoutInfo layinfo)
at uTinyRipperGUI.MainWindow.LoadFiles(Object data)

doesnt work for unity 2019, use this: https://github.com/ds5678/AssetRipper

doesnt work for unity 2019, use this: https://github.com/ds5678/AssetRipper

That doesn't seem to work for this

repo: mafaca/UtinyRipper


text:
Include 'node' on 'reject' events.

This brings the code in line with the API, which says that node ought to be
included in the 'reject' event callback.
Does this feel weird? Technically the node doesn't exist in the hyperlog, so
returning it back to the user might not really make sense. I'm also happy to
just edit the API to explicitly say that no params are included in the 'reject'
event.
cc @mafintosh

i think it's good to have in the event. might be useful is you are debugging why something is being rejected

4.11.1

authors: mafintosh noffle

repo: mafintosh/hyperlog


text:
Fix typo in Tutorial

Hey,
there is a typo in your tutorial over at http://wiki.ros.org/pylon_camera it says
/etc/ros/rosdep/sources.list.d/15-plyon_camera.list
instead of
/etc/ros/rosdep/sources.list.d/15-pylon_camera.list
it does not break anything so this does not have a high priority. Also, the distribution names do not necessarily need to be changed for e.g. kinetic as the branch kinetic-devel does not exist.

Hey!
Thanks for the hint, but It's a wiki page, so could can change typos yourself :)

authors: NikolasE StudentCV


text:
Strategies Support (Gradual Activation)

Current Behavior
Actually toggle-first have not support for activation strategies the flow works as bellow

What is expected
After retrieve metadata from the repository the Feature Manager check available Activation Strategies to determine if feature is active or not

The first proposed strategy is the GradualActivation where it randomly returns active or not for the features based on the GradualActivation parameter probability

repo: mageddo/toggle-first


text:
parallelization to speed up processes

the README mentions that "Speed-ups are possible with parallelization and installing libraries such as MRAN ". Would you be able to help me with that? I have a large dataset to perform metaneighbor on (300,000 cells, multiple experimental design) - I have tried subsetting but would prefer a reference complete set. Any suggestions how to parallelize and/or decrease memory to fit within limits? Thanks

A faster version of MetaNeighbor is available at its permanent home - https://github.com/gillislab/MetaNeighbor/
Details can be found in section 5.3 of the updated vignette. We've been able to get it work with ~300K cells and 600 genes, but let us know if you have any problems.

authors: maggiecrow nmalwinka

repo: maggiecrow/MetaNeighbor


text:
overwrite existing file when --output-file= is provided

A suggestion by @teufen on twitter: allow some way for the receiving user to allow an existing target file to be overwritten. This is especially useful if you're running the same wormhole send multiple times (with a newer version of the file).
It's not safe, in general, to overwrite existing files, especially because the filename is being selected by the sender. But we could give the receiver a way to opt-in to the overwrite, if it's happening predictably. And the existing --output-file= option is a pretty clear and predictable signal: any overwriting is going to affect a single user-specified path.
So the rule would be that if the recipient receives a file that already exists, but the filename came from --output-file=, then print a overwriting FILENAME message and overwrite it.
TBD: what to do when --output-file= is a directory: do we rm -rf the old directory and replace it entirely? (also, maybe this suggests that --output-file= is misnamed, if it could refer to directories)

So if I understand this thread correctly, wormhole send --output-file <directory name> is not at this point supported?

authors: horak warner

repo: magic-wormhole/magic-wormhole


text:
Disallow empty password in SessionWallet

Status
Type
⚠ Core Change
Issue

Ready
Hotfix
No
N/A

LGTM! Thanks


text:
Fixed broken docs link in README

📦 Pull Request
The documentation link was broken in the README file. It's now updated to correctly point to the Admin SDK's API Reference.
✅ Fixed Issues
None
🚨 Test instructions
None

:rocket: PR was released in v1.3.4 :rocket:

authors: lukecarr smithki

repo: magiclabs/magic-admin-js


text:
Change Magic Patterns logo on README file

It is hard to read (not enough contrast) on dark mode.

hey can you tell me the position where should  i placed this logo in the readme file? I want to work on this issue.

repo: magicpatterns/catalog


text:
Dynamic Column Names with Totalling isn't showing correct changes in wrong key

Combining these two features
https://github.com/magnusvk/counter_culture#handling-dynamic-column-names
https://github.com/magnusvk/counter_culture#handling-dynamic-column-names
into something that looks like
  counter_culture [:person],
    :column_name => proc {|model| model.earns_money? ? 'total_money_earned' : 'total_money_spent' },
    :column_names => {
          ["transaction.monetary_value > 0"] => 'total_money_earned',
          ["transaction.monetary_value <= 0"] => 'total_money_spent'
      },
    :delta_column => 'monetary_value'

Lets say we have an incorrect value for total_money_earned of 100 when it should be 200. Running
Transaction.culture_counter_fix_counts

I would expect to return
=> [{:entity=>"Person",
  :id=>1,
  :what=>"total_money_earned",
  :wrong=>100,
  :right=>200}]

However we actually get
=> [{:entity=>"Person",
  :id=>1,
  :what=>"total_money_earned",
  :wrong=>nil,
  :right=><BigDecimal:7fa5802ce7f0,'0.0',9(18)>}]

I believe the :wrong key here should be 100.
Also if the previous value was 0 and the correct value should be 0, and entry still exists with wrong=nil, and a BigDecimal of 0

It's quite possible this is broken. There isn't a specific test for this. It's kind of hard for me to reproduce this, though, without access to your data / codebase. Could you create a pull request with a failing test, though? That way I can reproduce or fix. (Or if you just want to pull-request the fix that'd be even better. ;) )

authors: kmcgaire magnusvk


text:
Custom Button Text and fontStyle fix

add buttonText as prop to FBLogin to customise own text
fix fontStyle where props was missing

This change is

+1

+1

repo: magus/react-native-facebook-login


text:
Fix for the pragma and variable scope warning

I was receiving the message Use of the encoding pragma is deprecated at when running lenv so i fixed it with the binmode line.
Also, with use warnings i found a really minor "issue" with a variable declaration and also fixed it :)

thanks! :)


text:
Добавить в АПИ в выдачу рейтингов игроков место в предыдущем релизе

сюда: https://rating.maii.li/api/v1/b/players/2.json
аналогично тому, как это сделано с previous_place в https://rating.maii.li/api/v1/b/teams/2.json

Сделано в https://github.com/maii-chgk/rating-ui/commit/45365d56031535b9aba8985e4d4a91c4719fa14a

authors: fjqtp razumau

repo: maii-chgk/rating-ui


text:
Allow a whitelist of regexes

Inspired from Dropbox (https://www.dropbox.com/static/javascript/mailcheck.js), who was inspired by Github (evidently).
Sorry if these ideas have already been pull requests, I just don't see them now, and figured it would be worth a shot.

Which problem is that going to solve?

oh jeeze i totally forget, i did this for a previous job 4 years ago... i guess we can just close this

authors: pke samuelcole

repo: mailcheck/mailcheck


text:
Docs

Closes #890

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@cdf9347). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #904   +/-   ##
=========================================
  Coverage          ?   83.67%
=========================================
  Files             ?       75
  Lines             ?     5083
  Branches          ?        0
=========================================
  Hits              ?     4253
  Misses            ?      582
  Partials          ?      248

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 cdf9347...39af785. Read the comment docs.

authors: codecov-io manuio

repo: mainflux/mainflux


text:
Error("data did not match any variant of untagged enum QuoteResponse",

hello, i'm getting this error when trying to run yur code. i have tried to solve it myself, but all i manage to do is pinpoint that the funtion quotes() in ekubo::lib.rs failed to return Resultmodels::Quotes. i might be wrong in this thought.
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s
     Running `target\debug\ekubo-atomic-arbitrage.exe simple`
2024-10-05T19:27:26.748543Z  INFO ekubo_atomic_arbitrage: starting bot with Ekubo API https://sepolia-api.ekubo.org and RPC https://free-rpc.nethermind.io/sepolia-juno/v0_7, strategy: Simple
2024-10-05T19:27:27.510000Z  INFO ekubo_atomic_arbitrage: Account balance: 25000000000000000 WEI
2024-10-05T19:27:30.942377Z ERROR ekubo_atomic_arbitrage: quotes err: Serde(
    Error("data did not match any variant of untagged enum QuoteResponse", line: 0, column: 0),
)
2024-10-05T19:27:31.046781Z ERROR ekubo_atomic_arbitrage: quotes err: Serde(
    Error("data did not match any variant of untagged enum QuoteResponse", line: 0, column: 0),
)
error: process didn't exit successfully: `target\debug\ekubo-atomic-arbitrage.exe simple` (exit code: 0xc000013a, STATUS_CONTROL_C_EXIT)

Hey! :) Thanks for reading and reaching out! You're right. The issue is that Ekubo API has changed (and be ready that many things in Starknet are under active developments so some code and procedures will require updates).
I've pushed the necessary change https://github.com/maksimryndin/ekubo-atomic-arbitrage/commit/26251d81d8add9805b600382ac2ac235da5bbdae#diff-7f92d7e6d5b180d7d4c070ff32d74024cc680fa27e937008e28e201d9c8a116a

thanks for fixing the bug. i appreciate it. the code works now.

authors: maksimryndin mugncuphelp

repo: maksimryndin/ekubo-atomic-arbitrage


text:
Make Swift 3 main branch

Not sure why Swift 3 is not the master / dev branch currently?  We are well past Swift 3 release and pre-swift 3 won't even compile in Xcode 8.  Pulling from the latest on Swift 3 branch I am at version 3.0.9 while the latest version is 4.0.4.  If main branch is already Swift 3 moving forward please delete the Swift 3 branch to avoid confusion.
thanks

@abunur master is already Swift 3 / Xcode 8 compatible, so I guess you're asking for the maintainers to remove the branch feature/swift-3.0 to avoid confusion?

Yes exactly - was not sure if master was Swift 3 or not, b/c of the existence of separate Swift 3 branch still.  So please remove the branch.

I can't get the current master to work with Swift 3. I get the same error reported in https://github.com/malcommac/SwiftDate/issues/222#issuecomment-245939262
Only branch feature/swift-3.0 works for me with Carthage.

@Damnum this sounds like a different issue. Could you open a new issue with and supply the output of the following commands:
carthage version
xcode-build -version
cat Cartfile
And the command you're using to build with Carthage ie carthage update?
FYI I got both 4.0.4 and master building using carthage 0.18 and Xcode 8.0

@raven sorry my bad, it works now.
My mistake was I declared the dependency in the Cartfile like this:
github "malcommac/SwiftDate"
Because there is an old tag named "v3.0.0" in the repository, Carthage thought this was the newest tag and downloaded it.
github "malcommac/SwiftDate" ~> 4.0.4
works. But it would be helpful to rename this tag to prevent this from happening.

Ok I've removed the branch. It should now work fine.

authors: Damnum abunur malcommac raven

repo: malcommac/SwiftDate


text:
How to convert DateInRegion into Date object

How to convert DateInRegion into Date object

you can use .absoluteDate which return the Date representation of the DateInRegion instance.

The .absoluteDate is a representation of the DateInRegion that is outside the region.
I.e:
Date() prints 2017-11-23 12:33:41 +0000
Date().inLocalRegion() prints 23 Nov 2017 10:33:41 GMT-2
Date().inLocalRegion().absoluteDate prints 2017-11-23 12:33:41 +0000
The absoluteDate var says: "Absolute date represented outside the region"

authors: iOSUser110 malcommac matuella


text:
Fix #306

let today = Date()
let tomorrow = Date() + 1.days
print(tomorrow - today)

Make minus operation between two dates work

I've fixed #306 in feature/4.0.7 branch. Did it work for you?
I've reverted it because I've made it on master instead of inside the new release.

Oh! I didn't know it was in the 4.0.7 branch, sorry about this. Feel free to close this pull request :)


text:
Deprecate version.init

This action is bloating the available actions and it also the requires too much documentation text for a distracting implementation detail.
The $(SEMVER_FILE) initialization could be inlined in the body of the Makefile using a short-circuited combination of $or, $wsildcard and $file.

Remove implementation
Create file transparently
Update documentation

Implemented in 0.1.0-rc.2

repo: malcos/makefile-semver


text:
How to handle appending divs

I have a container with the scrollbar-plugin working fine.  Then, based on user actions, additional divs are appended to the current content.  I utilize the scrollbar plugin to "scrollTo" "last".  Works great.  The only issue I have is that the handle jumps up to the original end point and then scrolls down.  It is weird from an end user point-of-view.   I tried using 'updateOnContentResize' but that had no effect. Any suggestions?

I can't really say... Can you send me a link? This could probably be solved easily but I'd have to see exactly what happens.

authors: malihu pzolla

repo: malihu/malihu-custom-scrollbar-plugin


text:
Translation update

Norwegian translation update

Thanks. I rebased your branch onto dev but it seems GitHub doesn't acknowledge it. But it has been merged.

authors: FTno maltaisn

repo: maltaisn/another-notes-app


text:
Failed jobs never time out making it impossible to create new jobs when limit is reached

Currently, if the job fails to finish, no matter what reason is, it will stay in "VM Running" status forever and never terminates.
We need better reconciliation and also a way for user to manually kill the job when they believe the job is in a bad status.
We need to figure out if the jobs are in a bad state by implementing a reconciler.

Resolved by #16, with a new reconciler that will bail out any job that is not completed for over 6 hours.

repo: manatee-project/manatee


text:
CORS issue to IdentityServer4

Hello,
I setup the IdentityServer4 correctly because I have it works with Aurelia application.
XMLHttpRequest cannot load https://xxxxxxx(identityserver)/.well-known/openid-configuration. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.

never mind, I figured it out. On my IdentityServer, I have to set app.UseCors before app.UseIdenityServer

Thanks for this info.

@pnguyen535 I'm having the same problem, what did you do to solve this?

You can configure it on server side. You have to switch on CORS.

@CallumBrankin Cors has to set before UseIdentityServer()
app.UseCors(options =>
{
        });

        app.UseIdentity();
        app.UseIdentityServer();

Hope it helps.

glad it works for you

never mind, I figured it out. On my IdentityServer, I have to set app.UseCors before app.UseIdenityServer

You are the best of the best!

authors: CallumBrankin emantzoros manfredsteyer pnguyen535


text:
How best to support patching objects with Schema Extensions

This SDK supports creating schema extensions, however it does not yet support for example adding an extensions data to an allowed object, for example a user.
Reading the documentation/examples it looks like we need to perform a patch call against the target object, however our update functions for users/groups etc requires a user/group object which has no concept of the schema extension (as in theory it could be anything).
I'd like to extend the SDK to support these kind of updates, however i'm looking to get some opinions on the best way to achieve this.
I can get myself around the problem by writing my own function that expects the schema extension i want to use, but i want to make this generic and add to the SDK.
Im still new to writing go so i'll welcome the most simple options  :-)

Capability merged in #81

authors: MarkDordoy manicminer

repo: manicminer/hamilton


text:
Vanilla project generation not working on android

This seems to be a recent thing, I've done this tonnes of times in the past without issue.
To recreate

Make sure you're using the latest manifoldjs generator tool.
Generate a new project for android:

manifoldjs http://bbc.co.uk -s bbcMobile
cd bbcMobile\cordova
cordova build android
cordova run anroid --device

Result: App quits with 'There was a network error (http://bbc.co.uk)'
Tried with a bunch of different URLs, and verified that the network connection on the phone is working fine

There's definately something amiss here.
I tested with some of the old projects generated a few weeks ago. They all work fine, both using crosswalk and not using crosswalk.
Now, using the latest bits, if you attempt to generate and run an android project without using crosswalk, you get the error reported above and the app quits.
If you attempt to use the crosswalk plugin, you don't get that error, but you just get a white page with no content, and a spew of warnings.
Looks like it's something that's changed in the ManifoldCordova plugin, let me know if you need more info

Hi Matt, we'll look into this right away.  Your on Windows 10 correct?

Fernando, I am getting this same issue on a mac.  using latest version and URL https://www.noradsanta.org with no other changes.  White page, times out, shows offline message

@boyofgreen
I ran a quick test on a Mac against the site you mention (NoradSanta) and did not see the same problem.  The site seems to be working, music included :). I cannot test Android at the moment. I can probably do that later today, or more probably tomorrow.
This may be unrelated but I noticed that upgrading ManifoldJS (and Cordova) in the Mac to the latest version gave me a lot of NPM errors when I upgraded over the previous version. I had to uninstall ManifoldJS and then install it again. Did your installation complete without any errors?

yes you are right, it is working for me.  It turns out that my Mac was just truly offline.  Sorry I jumped the gun.
@mattwoberts   can you give me some details on your system.  When you type in cordova -v what do you get for the version?

I'm on windows 10 (build 10586 although I don't think that's relevant). I uninstalled manifoldjs and re-installed without any errors.
Cordova: 5.3.1 - I haven't updated that for a few weeks now I think.
I think that it's something to do with the new api whitelisting in the ManifoldCordova project, although I've not looked into it any more.
Is OSX (I'm running on a mac), everything works fine for me.

Just trying re-installing all the manifoldjs bits, here's a log if it's useful:
C:\dev>npm uninstall -g manifoldjs
unbuild manifoldjs@0.4.3

C:\dev>npm install -g manifoldjs
npm WARN deprecated lodash@2.4.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
C:\Users\Matt\AppData\Roaming\npm\manifoldjs -> C:\Users\Matt\AppData\Roaming\npm\node_modules\manifoldjs\manifoldjs.js
manifoldjs@0.4.3 C:\Users\Matt\AppData\Roaming\npm\node_modules\manifoldjs
├── ncp@2.0.0
├── q@1.4.1
├── tv4@1.2.7
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── semver@4.3.6
├── loglevel@1.4.0
├── mkdirp@0.5.1 (minimist@0.0.8)
├── request@2.67.0 (is-typedarray@1.0.0, forever-agent@0.6.1, aws-sign2@0.6.0, caseless@0.11.0, stringstream@0.0.5, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.7, combined-stream@1.0.5, qs@5.2.0, tough-cookie@2.2.1, form-data@1.0.0-rc3, mime-types@2.1.8, bl@1.0.0, har-validator@2.0.3, http-signature@1.1.0, hawk@3.1.2)
├── hwa@0.0.4 (yargs@3.30.0)
├── cheerio@0.18.0 (dom-serializer@0.0.1, entities@1.1.1, htmlparser2@3.8.3, CSSselect@0.4.1, lodash@2.4.2)
├── cloudappx-server@0.0.4 (cors@2.7.1, rimraf@2.4.4, express@4.13.3, unzip@0.1.11, unzip2@0.2.5, multer@0.1.8)
├── archiver@0.14.4 (buffer-crc32@0.2.5, lazystream@0.1.0, async@0.9.2, readable-stream@1.0.33, tar-stream@1.1.5, zip-stream@0.5.2, glob@4.3.5, lodash@3.2.0)
└── cordova@5.4.1 (ansi@0.3.0, underscore@1.7.0, q@1.0.1, nopt@3.0.1, update-notifier@0.5.0, cordova-lib@5.4.1)

And now creating a new app:
C:\dev>manifoldjs http://bbc.co.uk -s bbcMobilenew
WARNING: No manifest found. A new manifest will be created.
WARNING: Manifest validation  (Windows) - A small square logo of any of the following sizes is required for Windows: 24x24, 30x30, 42x42, 54x54[icons]
WARNING: Manifest validation  (Windows) - A splash screen logo of any of the following sizes is required for Windows: 620x300, 868x420, 1116x540[icons]
WARNING: Manifest validation  (Windows) - A square logo of any of the following sizes is required for Windows: 120x120, 150x150, 210x210, 270x270[icons]
WARNING: Manifest validation  (Windows) - A store logo of any of the following sizes is required for Windows: size 50x50, 70x70, 90x90[icons]
WARNING: Manifest validation  (Windows) - An app icon of any of the following sizes is required for Windows Phone: 44x44, 62x62, 106x106[icons]
WARNING: Manifest validation  (Windows) - A medium tile logo of any of the following sizes is required for Windows Phone: 150x150, 210x210, 360x360[icons]
WARNING: Manifest validation  (Windows) - A small tile logo of any of the following sizes is required for Windows Phone: 71x71, 99x99, 170x170[icons]
WARNING: Manifest validation  (Windows) - A store logo of any of the following sizes is required for Windows Phone: 50x50, 70x70, 120x120[icons]
WARNING: Manifest validation  (Android) - Launcher icons of the following sizes are required: 48x48, 72x72, 96x96, 144x144, 192x192, 512x512[icons]
WARNING: Manifest validation  (iOS) - An app icon of the following sizes is required: 76x76, 120x120, 152x152 and 180x180[icons]
WARNING: Manifest validation  (iOS) - An 1024x1024 app icon for the App Store is required[icons]
WARNING: Manifest validation  (iOS) - A launch image of the following sizes is required: 750x1334, 1334x750, 1242x2208, 2208x1242, 640x1136, 640x960, 1536x2048, 2048x1536, 768x1024 and 1024x768[icons]
SUGGESTION: Manifest validation  (Chrome) - A 48x48 icon should be provided for the extensions management page (chrome://extensions)[icons]
SUGGESTION: Manifest validation  (Chrome) - It is recommended to have a 16x16 favicon[icons]
WARNING: Manifest validation  (Chrome) - A 128x128 icon is required for the installation process and the Chrome Web Store[icons]
SUGGESTION: Manifest validation  (Firefox) - Firefox 2.0 onwards, an 512x512 icon is recommended for Firefox Marketplace and devices[icons]
WARNING: Manifest validation  (Firefox) - A 128x128 icon is required for the Firefox Marketplace and the devices[icons]
SUGGESTION: Manifest validation  (Firefox) - It is recommended to provide icon sizes for multiple platforms, including: 16x16, 32x32, 48x48, 64x64, 90x90, 128x128 and 256x256[icons]
SUGGESTION: Manifest validation  (All Platforms) - It is recommended to specify a set of rules that represent the navigation scope of the application[mjs_extended_scope]

C:\dev\bbcMobilenew\cordova>cordova -v
5.3.1

C:\dev\bbcMobilenew\cordova>cordova plugins list
cordova-plugin-hostedwebapp 0.2.1 "HostedWebApp"
cordova-plugin-network-information 1.1.0 "Network Information"
cordova-plugin-whitelist 1.0.0 "Whitelist"

Finally, running the app:
BUILD SUCCESSFUL

Total time: 5.03 secs
Built the following apk(s):
    C:\dev\bbcMobilenew\cordova\platforms\android\build\outputs\apk\android-debug.apk
Using apk: C:\dev\bbcMobilenew\cordova\platforms\android\build\outputs\apk\android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS

And the result:

This one was tough and had me really confused. The steps to reproduce the problem are:
manifoldjs http://bbc.co.uk -s bbcMobilenew -l debug
cd bbcMobilenew\cordova
cordova run android

Depending on the version of Cordova that you have installed globally you might see a "There was a network error" message.
It seems that the problem is mixing Cordova versions. ManifoldJS uses a private copy of Cordova to ensure that it uses a version that has been tested. Typically, you also have Cordova installed globally, and it might be a different version than the one used by ManifoldJS.
When you run Cordova commands from the command line against a ManifoldJS generated project, it will use the global version of Cordova instead of the version that was used to generate the app. In the latest Cordova release(s), they must have changed the way they handle the configuration data and mixing versions results in the config.xml file being corrupted.
We've always wanted to create a wrapper for the Cordova commands so that you could execute manifoldjs cordova <xxx> (or some other variant) and that would delegate the execution of the command to the private copy of Cordova . We've talked about this many times and never addressed the problem because it didn’t have any negative side effects. That is, until now.
For the time being, you have a couple of options:

Update the global version of Cordova to match the version used by ManifoldJS (currently v5.4.1)

Use the private version to run the commands. For example:
C:\Users\<YOUR-USER>\AppData\Roaming\npm\node_modules\manifoldjs\node_modules\cordova\bin\cordova run android

Or, to simplify it, create a batch file that wraps the above and place it in C:\Users<YOUR-USER>\AppData\Roaming\npm or some other location in your path.

@f2bo Thanks for that! I've been without power (!) for a while so unable to check this, I'll have a look now :)

All good now - I've just simply updated my cordova to match.
I presume this could be an issue though if you update manifoldjs again to use a different version - so using the private version does make sense.

authors: boyofgreen f2bo mattwoberts

repo: manifoldjs/ManifoldJS


text:
Nicer MVP badge tooltip text

Change tooltip text for MVP badge to "Thanks for helping Manifold!"

I don't think this is any clearer. Also this badge is short lived anyways

authors: Bohaska sipec

repo: manifoldmarkets/manifold


text:
模拟器运行出错Unable to get provider com.maning.updatelibrary.MNUpdateApkFileProvider:

模拟器运行时候出现这种错误，clean了会变正常，多运行几次又会出现
Process: com.gntech.develop.gninfomationsys, PID: 11296
java.lang.RuntimeException: Unable to get provider com.maning.updatelibrary.MNUpdateApkFileProvider: java.lang.ClassNotFoundException: Didn't find class "com.maning.updatelibrary.MNUpdateApkFileProvider" on path: DexPathList[zip file "/data/app/com.gntech.develop.gninfomationsys-2/base.apk", zip file "/data/app/com.gntech.develop.gninfomationsys-2/split_lib_slice_3_apk.apk"],nativeLibraryDirectories=[/vendor/lib, [/system/lib]])

请问下，真机有没有碰到过这种情况呢

你这个库我今天才集成， 我用自己的手机测试，没发现 就是模拟器出现这种情况

是不是应用方法数超64K，没有处理呢！

我把64K处理方法加上了，在测试测试，thanks

@shuaiDevelop 还报错吗 ？

@maning0303 目前正常了，应该就是64K方法数造成的


text:
🛑 Mesa Freeworld is down

In d7d9471, Mesa Freeworld (https://nonfree.eu) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mesa Freeworld is back up in 4969df7 after 32 minutes.

repo: manjaro-contrib/upptime


text:
Fix infinite loop in light-dark mixin

Problem
The value.includes('light-dark') check was catching the string highlight-dark in Monaco Editor, causing postcss to run in an infinite loop.

Solution
Change the check to a regex testing against the string light-dark
Test

Thanks!

repo: mantinedev/postcss-preset-mantine


text:
Why do polygon coords need to be in correct order?

Hello.
First, this lib is just awesome and i wanna thank you for creating and sharing it!
Now my question, why do coords of the polygon in isPointInside do need to be in the correct order? The reason why i ask is because if i make some points on a piece of paper, there is only one way i can connect the points without a line crossing an other line.
Do they have to be in correct order because the way you wrote the function or do i oversee something and it is technically not possible? I completly understand that it might be much more work and you don`t want or have no time to do it, i am just curious.
Thanks!

Hi,
thank you for your feedback!
Maybe you can understand it better when you have a look at the following image:

The red dot (your "position") and all other spots are exactly at the same position in both images. Only the order of the coordinates differs. In version 1 your spot is not inside the polygon, in version 2 it is.

Ok i see it now, hm i have a feeling that there is some solution for this. I will post it if i figure it out! ;O
Thanks

Save your time. You're trying to find a solution for a problem which does not exist. It of course always matters in which order your spots are. In case 1 your position is just not within the polygon and that's totally fine.

You are right about that but my problem is that i will always know which dot is my position, that would be my current position.
And then i have all the dots from a certain area where i want to know if i am in that area. I don`t feel like it is necessary to have the dots from that area in the right order because if there is a combination where you can connect the dots and to surround my position then that means that i am in that area.
At the moment i am not sure about that i really think it`s like that, what do you think?

repo: manuelbieh/Geolib


text:
Switch from notebooks to scripts

This is more convenient for version control as we mentioned during the call. Also, you can also use them in interactive mode, like in Jupyter:
https://youtu.be/lwN4-W1WR84?t=130

closed with PR #10