Commit Graph

15 Commits (master)

Author SHA1 Message Date
Willem Melching ed23177898
thermald: remove panda disconnect logic (#23526)
* thermald: remove panda disconnect logic

* keep that
2022-01-14 14:13:18 +01:00
Ewout ter Hoeven 55390d273f
Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Mayfield 1aebe6ff6e
ui: render markdown in release notes (#22754)
* convert release notes from markdown to html

* fall back to previous behavior if utf8 decoding or markdown parsing throws

* make simple markdown parser to avoid needing a library

* add unit test

* move markdown parser to common. add unit test

use `markdown-it-py` instead of `markdown` dependency for test comparison since it's already in Pipfile.lock

* test (almost) all release notes and add some extra html encoding

* update lock

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-04 16:12:39 +01:00
Willem Melching dddab597bc
Less open file permissions (#21922)
* Less open file permissions

* add test back

* remove params test for permissions

* remove umask

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-28 18:25:05 -07:00
Dean Lee 3b752a307f
params: remove persistent params (#21975)
* cleanup constructors

* remove persistent_param

* remove test_persist_params_put_and_get
2021-08-20 16:57:45 -07:00
Adeeb Shihadeh b4447993c1
add CLEAR_ON_IGNITION param type (#20810) 2021-05-04 11:32:40 -07:00
Willem Melching ae094042ad
add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
Jon Ander Oribe 887d67eb8d
Simple improvements for quality gate (#2517)
* Improvements for quality gate

* Update test_xattr.py

* Update test_mpc_wobble.py

* python

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-12 14:48:45 -08:00
Willem Melching 3dd9448981
Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
2020-10-15 13:15:22 +02:00
Willem Melching 2e182e5c57
Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-13 16:23:23 +02:00
Adeeb Shihadeh 2ad9c50e36 add test for params permissions 2020-07-18 18:30:29 -07:00
Willem Melching 29aaa44740
flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Andy Haden 538ca733c7 Remove legacy AccessToken param 2020-03-23 00:22:41 -07:00
Greg Hogan f21d0f325e
uploader: do not delete files after uploading (#1253)
* cffi xattr function wrapper

* xattr wrapper error handling

* xattr tests

* use xattr for tracking files uploaded

* uploader xattr exception handling

* update uploader tests

* remove unused import

* update release build

* xattrs.py -> xattr.py
2020-03-19 18:09:26 -07:00
George Hotz e8d888c45b common folder 2020-01-17 10:28:44 -08:00