-
Notifications
You must be signed in to change notification settings - Fork 25
Legacy changelog
ussserrr edited this page Aug 9, 2021
·
1 revision
- Initial version
- New: this changelog and more comments :)
- Fixed: compatible with new filename politics (see PlatformIO issue #1107)
(
incnow must beincludeso we add option toplatformio.ini) - Changed: use os.path.normpath() instead of manually removing trailing
/
- New: checking board name before PlatformIO start
- New: hide CubeMX and PlatformIO stdout output
- New: shebang
- New: choose your favourite editor with
--start-editoroption (replaces--with-atom) - New: logging module
- New: more checks
- New:
settings.pyfile - New: cross-platform running
- New: debug output (verbose
-vmode) - New:
README.mdand more comments - Fixed: remove unnecessary imports
- Fixed: command to initialize PlatformIO project (remove double quotation marks)
- Changed: many architectural improvements
- Changed: documentation improvements
- New: introducing unit-tests for the app
- New: clean-up feature
- New: more comments
- New: screenshots for the usage example
- Fixed: many small fixes and improvements
- Changed: test now is more isolated and uses
./stm32pio-test/stm32pio-test.iocfile
- New: Windows support!
- New: new editors support (Sublime Text)
- New: more comments and docstrings
- New: more checks to improve robustness
- New: if
__name__ == '__main__'block - New: new test: build generated project
- New: new test: run editors
- New: new test: user's code preservation after the code regeneration
- New: clean run for test cases (implemented using decorator)
- Fixed: compatible with latest PlatformIO project structure (ver 3.6.1)
- Fixed: many small fixes and improvements
- Changed:
java_cmdparameter insettings.py(simplejavaby default) - Changed: move to double-quoted strings
- Changed: remove
_getProjectNameByPath()function (replaced byos.path.basename()) - Changed: vast f-strings usage
- Changed: test
.iocfile is updated to the latest STM32CubeMX version (4.27.0 at the moment) - Changed: use
os.path.join()instead of manually composing of paths - Changed: use
with ... as ...construction for opening files - Changed: 120 chars line width
- Changed: PEP 8 conformity: variables and functions naming conventions
- Changed: PEP 8 conformity: multi-line imports
- Changed:
miscs.pymodule is renamed toutil.py
- New: use more convenient Python project structure
- New: package can be install using setuptools
- New: TODO list
- New:
--directoryoption is now optional if the program gets called from the project directory - Fixed: license copyright
- Fixed: 'dot' path will be handle successfully now
- Fixed: bug on case insensitive machines
- Fixed: bug in tests that allowing to pass the test even in failure situation
- Changed: test
.iocfile is updated to the latest STM32CubeMX version (5.0.1 at the moment) - Changed: documentation improvements
- New: new internal
_get_project_path()function (more clean main script) - New: optional
--with-buildoption fornewmode allowing to make an initial build to save a time - Changed:
util.pyfunctions now raising the exceptions instead of forcing the exit - Changed: test
.iocfile is updated to the latest STM32CubeMX version (5.1.0 at the moment) - Changed: documentation improvements
- New:
setup.pycan now install executable script to runstm32piofrom any location - New: stm32pio logo/schematic
- New: add PyCharm to
.gitignore - New: add clear TODOs for the next release (some sort of a roadmap)
- New: single
__version__reference - New: extended shebang
- New: add some new tests (
test_build_should_raise,test_file_not_found) - Fixed: options
--start-editorand--with-buildcan now be used both fornewandgeneratecommands - Fixed: import scheme is now as it should be
- Changed: migrate from
os.pathtopathlibas much as possible for paths management (as a more high-level module) - Changed:
start editorfeature is now starting an arbitrary editor (in the same way as you do it from the terminal) - Changed: take outside
platformiocommand (tosettings.py) - Changed: screenshots were actualized for recent CubeMX versions
- Changed: logging output in standard (non-verbose) mode is simpler
- Changed: move tests in new location
- Changed: revised and improved tests
- Changed: actualized
.iocfile and clean-up the code according to the latest STM32CubeMX version (5.3.0 at the moment) - Changed: revised and improved util module
- New: tested with Python3 version of PlatformIO
- New:
__main__.pyfile (to run the app as module (python -m stm32pio)) - New: 'init' subcommand (initialize the project only, useful for the preliminary tweaking)
- New: introducing the OOP pattern: we have now a Stm32pio class representing a single project (project path as a main identifier)
- New: projects now have a config file stm32pio.ini where the user can set the variety of parameters
- New:
stateproperty calculating the estimated project state on every request to itself (beta). It is the concept for future releases - New: STM32CubeMX is now started more silently (without a splash screen)
- New: add integration and CLI tests (sort of)
- New: testing with different Python versions using pyenv (3.6+ target)
- New:
test_start_editoris now preliminary automatically checks whether an editor is installed on the machine - New: more typing annotations
- Fixed: the app has been failed to start as
python app.py(modifysys.pathto fix) - Changed:
main()function is now fully modular: can be run from anywhere with given CLI arguments (will be piped forward to be parsed viaargparse) - Changed: rename
stm32pio.py->app.py(stm32pio is the name of the package as a whole) - Changed: rename
util.py->lib.py(means core library) - Changed: logging is now more modular: we do not set global
basicConfigand specify separated loggers for each module instead - Changed: more clear description of steps to do for each user subcommand by the code
- Changed: get rid of
print()calls leaving only logging messages (easy to turn on/off the console output in the outer code) - Changed: reimagined API behavior: where to raise exceptions, where to return values and so on
- Changed: more clean API, e.g. move out the board resolving procedure from the
pio_init()method and so on - Changed: test fixture is now moved out from the repo and is deployed temporarily on every test run
- Changed: set-up and tear-down stages are now done using
unittestAPI - Changed: actualized
.iocfile for the latest STM32CubeMX version (5.4.0 at the moment) - Changed: improved help, docs, comments
- New: re-made
patch()method: it can intelligently parseplatformio.iniand substitute necessary options. Patch can now be a general .INI-format config - New:
test_get_state() - New: upload to PyPI
- New: use regular expressions to test logging output format for both verbose and normal modes
- Fix: return
-das an optional argument to be able to execute a short form of the app - Changed: subclass
ConfigParserto addsave()method (removeStm32pio.save_config()) - Changed: resolve more TO-DOs (some cannot be achieved actually)
- Changed: improve
setup.py - Changed: replace traceback.print to
loggingfunctionality - Changed: no more mutable default arguments
- Changed: use
inspect.cleandocto place long multi-line strings in code - Changed: rename
_load_config_file(),ProjectState.PATCHED - Changed: use
interpolation=NoneonConfigParser - Changed: check whether there is already a
platformio.inifile and warn in this case on PlatformIO init stage - Changed: sort imports in the alphabetic order
- Changed: use
configparserto test project patching
- Fix:
generate_code()doesn't destroy the temp folder after execution - Fix: improved and actualized docs, comments, annotations
- Changed: print Python interpreter information on testing
- Changed: move some asserts inside subTest context managers
- Changed: rename
pio_build()=>build() - Changed: take out to the
settings.pythe width of field in a log format string - Changed: use file statistic to check its size instead of reading the whole content
- Changed: more logging output
- Changed: change some methods signatures to return result value
- New: introduce GUI version of the app (beta)
- New: redesigned stage-state machinery - integrates seamlessly into both CLI and GUI worlds. Python
Enumrepresents a single stage of the project (e.g. "code generated" or "project built") while the special dictionary unfolds the full information about the project i.e. combination of all stages (True/False). Implemented in 2 classes -ProjectStageandProjectState, though theStm32pio.stateproperty is intended to be a user's getter. Both classes have human-readable string representations - New: related to previous -
statusCLI command - New:
util.pymodule (yes, now the name matches the functionality it provides) - New: logging machinery - adapting for more painless embedding the lib in another code.
logging.Loggerobjects are now individual unique attributes of everyStm32pioinstance so it is possible to distinguish which project is actually produced a message (not so useful for a current CLI version but for other applications, including GUI, is).LogPipecontext manager is used to redirectsubprocessoutput to theloggingmodule.DispatchingFormatterallows to specify differentlogging' formatters depending on the origin of the log record. SubstitutedLogRecordFactoryhandles custom flags to.log()functions family - Changed: imporoved README
- Changed:
platformiopackage is added as a requirement and is used for retrieving the boards names (util.py->get_platformio_boards()). Expected to become the replacement for all PlatformIO CLI calls - Changed: Markdown markup for this changelog
- Changed: bump up
.iocfile version - Changed: removed final "exit..." log message
- Changed: removed
Configsubclass and move itssave()method back to the mainStm32pioclass. This change serves 2 goals: ensures consistency in the possible operations list (i.e.init,generate, etc.) and makes possible to register the function at the object destruction stage viaweakref.finilize() - Changed: removed
_resolve_board()method as it is not needed anymore - Changed: renamed
_load_config_file()->_load_config()(hide implementation details) - Changed: use
logger.isEnabledFor()instead of manually comparing logging levels - Changed: slightly tuned exceptions (more specific ones where it make sense)
- Changed: rename
project_path->path - Changed: actualized tests, more broad usage of the
app.main()function versussubprocess.run()
- New: table of contents for the README
- New: GitHub project wiki
- New:
-q/--quietoption for thecleanCLI command. The command now by default warns the user about the content deletion - New: embedding example (minimal reproducible code snippet, easier than the full CLI or GUI versions)
- New: show the exception name too when the global error has been caught (
stm32pio/app.py) - New: sanitize
--start-editoroption value usingshlex.quote() - New: parse
platformio.inito establish its correctness when checking for project states (ProjectStage.PIO_INITIALIZED,ProjectStage.PATCHED) - New: projects are now portable. The user specifying paths relatively to the project folder and using variables (we still don't use
configparserinterpolation but there is no need in it). The backwards compatibility with the old-style config format has been preserved though those projects still will be non-portable unless you manually edit a config - New: analyze STM32CubeMX output to detect errors on execution. This utility does not necessarily returns non-zero code when some error was happened (e.g.
.iocand app versions mismatch and so on), and just shows a dialog - New:
platformio_ini_configStm32pioinstance property returning currentplatformio.iniparsedConfigParservalue. Used in some internal routines such as correctness determination and doesn't have to be used by the library user - New:
LogPipenow returns "remote control"LogPipeRC- small utility class holding the writable stream and the reference to the string accumulating all incoming messages. It can be accessed later, in the end of the context manager, to store and analyze all the output - New: some new tests, I think, but I do not remember as all the tests are now moved to the new files :)
- Fixed: warnings appearing during the
pio_build()execution were suppressed - Changed: tests are moved out to the root of the repo and excluded from the distribution bundle
- Changed: went back to the PlatformIO CLI as a single point to interact with PlatformIO (remove
platformiopackage imports and dependencies) (the reason is crushes when the pio is not isolated in a separated subprocess). Use PlatformIO JSON format output to get and filter boards - Changed: remove
required=Falsefromargparsecommands as it is a default (and even recommended) value anyway - Changed: remove the unnecessary logging setup when no arguments were given to the program (CLI version)
- Changed: separate
Stm32pioarguments onto 2 categories: project parameters and instance options and use dictionaries for them. First one has now the same form as the project configconfigparser.ConfigParserand merging into the default and file settings on the project creation. Instance options are more related to the programmatic instance itself and contains currently 2 options -loggerandsave_on_destruction - Changed: use
append()instead ofinsert()to modifysys.path - Changed: when raising the exceptions use more elegant expressions (e.g.
raise FileNotFoundError(file)instead ofraise FileNotFoundError("file FILE was not found")). Usepathlib.Path().resolve(strict=True)where appropriate to shorten the code
- New: GUI. System tray notifications when the main window is not in the foreground (can be turned off in the settings)
- New: GUI. Drag-and-drop folder(s) to add
- New: GUI. README, screenshots, diagrams
- New: GUI. Catch projects duplication on appending
- New: GUI. Mark the list item when the action is done and it is not a current item
- New: GUI. Highlight the actions that were picked for the series
- New: GUI. setuptools
extrasoption to install the GUI version via pip - New: GUI. Wrap imports into
try...catch - New: GUI. Reset settings feature
- New: GUI. New
ProjectListItemmembers:_from_startupflag,_current_actionstring with corresponding properties and signals - New: GUI. More extensive use of the
typingannotations - New: GUI. Allow to pass extra setter functions to the
Settingswhich will be called on the value change - New: allow to specify the
.iocfile instead of the directory. Check that.iocis a non-empty text file - Fixed: GUI. Projects are not destructed until the app shutdown
- Fixed: GUI. Settings dialog doesn't correctly represents the parameters
- Fixed: GUI. Settings on Windows (case-sensitive vs insensitive situation)
- Fixed: GUI. List item loader
- Fixed: GUI. Flaws when index changes
- Changed: GUI. Clean the logs too when invoking the 'Clean' action
- Changed: GUI. Stop the chain of commands if someone drops -1 or an exception
- Changed: GUI. Use Qt StateMachine to control the visual appearance of the project action button
- Changed: GUI. Rename the module
stm32pio-gui->stm32pio_gui - Changed: GUI. Better printing of exception messages
- Changed: GUI. Revised finalizer (similar to core version)
- Changed: GUI. Cache
stateandstate.current_stageboth for back- and frontend to reduce IO operations - Changed: GUI. rename
ProjectActionWorker->Worker(as it is used for the variety of tasks) and some of its internals - Changed: GUI. Pass
Settingsprefix as an argument for the constructor - Changed: GUI. Move more stuff inside the
main()function, less global variables - Changed: exclude screenshots from the setuptools bundle
- Changed: restructure TODO.md into sections
- Changed: remove
from __future__ import annotationsstatements
- Fixed: GUI. All resorce paths are now reliably treated both for QML and Python
- Changed: README installation process actualized
- New:
examplesfolder (currently, only an embedding one (updated and moved from the wiki page)) - New:
docsfolder with some useful internal descriptions (currently, only a logging schematic (with sources)) - New: issues guide for GitHub (OS, content of the config, project tree, enable verbose, etc.)
- New: GUI. Show the app version in "About" dialog
- New: GUI. Handle a theoretical app loading error
- New: GUI. Notify a user that the "board" parameter is empty
- New: GUI. The app can be started from CLI
- New: GUI.
ProjectListItem.fromStartupproperty - New: GUI. Expose projects'
configto QML - New: Tests. Preserving user files and folders on regeneration
- New: Tests. 'verbose' and 'non-verbose' tests as
subTest(alsoshould_log_error_...) - New: Inform a user that given parameters have overridden the config ones
- Fixed: GUI.
TypeError: Cannot read property 'actionRunning' of null(deconstruction order) (on project deletion only) - Fixed: GUI. The app now can handle as many projects as needed (use QML
DelegateModelto store state in theListViewdelegate) - Fixed: #13 (new parsing algo to analyze the CubeMX output)
- Changed: improved
typingannotations - Changed: wrap imports into
try...except - Changed: new README logo, add sources (draw.io)
- Changed: GUI. Icons instead of a text for "Clean", "Open editor"
- Changed: GUI. Gray out "stage" line in all projects except current
- Changed: GUI. 2 types of logging formatters for 2 verbosity levels
- Changed: GUI. More general
goToProjectsignal instead ofduplicateFound - Changed: GUI. Projects list is now saves to
Settingsin a separate thread usingQThreadPoolandsaveInSettings()method - Changed: GUI.
ProjectsList.each_project_is_duplicate_ofgenerator - Changed: GUI. Optimized project'
statehandling - Changed: GUI. Insert board ID from config, if there is one, focus on that input field by default
- Changed: logging mechanics is remade from scratch:
- add
stm32pio.app.setup_logging(),should_setup_loggingargument fostm32pio.app.setup_main(). This also fixes annoying logging errors on testing because the loggers interfere with each other -
stm32pio.util.ProjectLoggerAdapter()subclass as an individual logger for every project - add
stm32pio.util.log_current_exception() - get rid of
log_record_factorysubstitution - add
stm32pio.util.Verbosityentity (enum). Acts like an additional degree of freedom for the logging setup - rewritten
stm32pio.util.DispatchingFormatter - GUI. New
BuffersDispatchingHandler()class - and some others (see block schema)
- add
- Changed: better parameters and configs merging
- Changed: make
platformio_ini_is_patcheda property instead of function - Changed: improved in-code docs
- New: introducing CI/CD via Azure Pipelines. I tried to make as "general" system as possible with isolated environments, reproducible builds, etc. Due to a number of such a different tools in use and scattered infrastructure around them this task is very complex and the current configuration is far from ideal though
- New: new project structure. All packages (core, CLI, GUI) are consolidated under the common
stm32pioPython namespace - New: app version is completely removed from the repo and is "computed" at build-time from the VCS (GIT) current tag (using setuptools_scm). At run-time the version obtaining process depends: for newer Python it can be retrieved from a package metadata, for older one there is an auto-generated
version.pyfile with a value stored in it - New: support multiple test fixtures to test against a different targets (e.g. lightweight
nucleo_f031k6project + real-lifef103and so on) - New: new build system. Use modern tools such as
pyproject.toml, declarativesetup.cfg, PEP-517 and so on. However in the middle of the development process it became evident that such a workflow is still early and not so common and there are simply not enough tools to implement it gracefully (e.g. no official tool to build bothdistsource tarball andwheel) - New: CLI.
patchcommand. With this function now all meaningful (for end-user) methods of theStm32pioclass are mapped by CLI commands and match corresponding buttons from the GUI version so the similar workflow can be applied:- Initialize -
stm32pio init - Generate -
stm32pio generate - Init PlatformIO -
platformio project init - Patch -
stm32pio patch - Build -
platformio run
- Initialize -
- New: CubeMX now can be invoked directly, without Java command need to be specified
- New: add dedicated
initializedsignal toProjectListItem - New: basic GUI tests (just make sure all imports are fine and the app at least starts)
- Fixed: revise config handling: more robust and straightforward procedure to merge the final runtime config from different sources (fix the reported problem). Adjust corresponding test
- Fixed: GUI. Add
project.lastActionSucceedproperty to fix some visual behavior (bold borders remains after an error) - Changed: migrate to Semantic Versioning (2.0.0). The next version (i.e. this one) was supposed to be 1.40 so with semver – 1.4.0. This can be confusing for some automatic tools in the future to correctly find out which version is latter though so this version will be marked with 2.0.0 tag to start things over
- Changed: remove board absence warning in
Stm32pioconstructor (this should be done outside) - Changed: take out to the
settings.pya strings that we looked for to determine successful CubeMX code generation - Changed: use newer
platformio project initcommand, use verbose versions of CLI arguments
- New: "validate environment" API. Allows to quickly verify tools specified in the config (+ corresponding test). Currently, implemented only for the CLI version
- New: store the most recent exception in the
last_errorconfig file parameter (currently CLI-only) (+ corresponding test) - New: add shorthands for all CLI options (single-letters, e.g.
-c/--with-build) - New: ignore list settings API: specify files/folders/patterns to ignore during the cleanup (hence, new
clean()method, tests) - New: alternatively, use
git cleanas a removal tool - New: API to store the current project folder' content as ignore list in the config file
- New: CONTRIBUTING.md guide (more like developing notes actually)
- New: COMMANDS.md reference
- New: CONFIG.md reference
- New: project config reference (a little too many parameters now)
- New: Python 3.9 CI runner
- New: log when the config is merging with another one (DEBUG verbosity level)
- New: handle filenames with whitespaces (both tools/project files) (#21)
- Fixed:
clean()method doesn't look for the determined.iocfile but does it by itself which can cause some unwanted behavior (potential data loss) - Fixed: remove done/forgotten TODOs
- Fixed: update embedding example to match the current API
- Fixed:
setup.cfg: specify supported PySide2 version - Fixed:
setup.cfg: PyPA parsing issues - Fixed: revert default CubeMX paths that seems more widespread among users
- Fixed: GUI. Recursive layout warning in Settings window
- Fixed: GUI. Remove the
ProjectIDparameter for theinitializedsignal to get rid of the annoying Shiboken overflow error - Changed: bump up CubeMX, packages, test
.iocfile, PlatformIO versions (both for local and CI builds) - Changed: a completely revised documentation/examples/TODOs structure
- Changed: spawn project-state-related code to the
state.pymodule - Changed: spawn logging-related code to the
logging.pymodule - Changed: separate config from the main class (new
config.pymodule) - Changed: rename
lib.py->project.pymodule - Changed: move available config "None" options to the
settingsmodule (none_options) - Changed: separate CubeMX invoking code (new project's private
_cubemx_execute_script()method) - Changed: edit output behavior in case of occurred error in the
generate_code()function - Changed: do not cast strings where we can use path-like objects
- Changed: pretty config printer (
__str__()implementation, justprint(project.config), that's all) - Changed: remove
util.configparser_to_dict()function (ConfigParseris already conforms with mapping protocol) - Changed: takeout valid user response options to
settings.py(yes_options/no_options) - Changed: group and move CI-related code in the
settings.py - Changed: remove
f"{STAGE_PATH.name}.ioc"occurrences in tests - Changed: move
test_clean()to unit tests - Changed: GUI. Remove
go_to_thisoption for theaddListItemmethod (instead invoke on the list model) - Changed: GUI. Implicitly pass the parent to the project constructor in
addListItemmethod