Skip to content

Commit

Permalink
Merge pull request #83 from IRNAS/release/v0.14.0
Browse files Browse the repository at this point in the history
Release v0.14.0
  • Loading branch information
MarkoSagadin authored Aug 24, 2023
2 parents 001d281 + 4d2a4f3 commit 9507d9f
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 114 deletions.
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [0.14.0] - 2023-08-24

### Added

- Add `--shell` flag to the `east bypass` command. It launches a sub-shell within the
current terminal inside the isolated environment provided by the Nordic's nRF
Toolchain Manager.
- `east twister` command. This command is just a wrapper for the `west twister`
command which runs Twister, a test runner tool.
- `east attach` command. This command is just a wrapper for the `west attach`
command, which is similiar to the `west debug`.

### Changed

- `east bypass` now passes arbitrary commands into directly into the Nordic's nRF
Toolchain Manager instead into just West that is in the Manager. That way user can
user use other executables and python programs provided by the toolchains in the
Manager.
- `east build`, `east flash` and `east debug` are now just wrappers for their
west counterparts. Due to this the internals and externals of the East could
be simplified. User experience did not change, the commands behave just like
they did before, they just do not directly provide help for possible
options and arguments, but instead instruct users to use `--extra-help`
option to learn more about west command counterparts. Due to this change the
`attach` command was moved from `debug` command to its own place.

## [0.13.0] - 2023-07-26

### Removed
Expand Down Expand Up @@ -259,7 +285,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Docker scripts for building and running docker containers, for development
purposes.

[Unreleased]: https://github.com/IRNAS/irnas-east-software/compare/v0.13.0...HEAD
[Unreleased]: https://github.com/IRNAS/irnas-east-software/compare/v0.14.0...HEAD

[0.14.0]: https://github.com/IRNAS/irnas-east-software/compare/v0.13.0...v0.14.0

[0.13.0]: https://github.com/IRNAS/irnas-east-software/compare/v0.12.3...v0.13.0

Expand Down
16 changes: 15 additions & 1 deletion src/east/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@

from .east_context import EastContext, east_group_settings
from .system_commands import sys_setup, util
from .workspace_commands import build, bypass, clean, debug, flash, release, update
from .workspace_commands import (
attach,
build,
bypass,
clean,
debug,
flash,
release,
twister,
update,
)

rich_click.rich_click.MAX_WIDTH = 80
rich_click.rich_click.USE_RICH_MARKUP = True
Expand All @@ -18,9 +28,11 @@
"flash",
"clean",
"debug",
"attach",
"update",
"bypass",
"release",
"twister",
],
},
{
Expand Down Expand Up @@ -77,6 +89,8 @@ def cli(ctx, echo):
cli.add_command(util)
cli.add_command(release)
cli.add_command(debug)
cli.add_command(attach)
cli.add_command(twister)


def main():
Expand Down
16 changes: 13 additions & 3 deletions src/east/east_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,25 @@ def run_west(self, west_command: str, **kwargs) -> str:

if self.use_toolchain_manager:
# Run west command as arbitrary command through manager
return self._run_arbi_manager(cmd, **kwargs)
return self.run_cmd_in_manager(cmd, **kwargs)
else:
return self.run(cmd, **kwargs)

def enter_manager_shell(self):
"""Enters Nordic's Toolchain Manager shell using detected NCS version."""

cmd = (
f"{self.consts['nrf_toolchain_manager_path']} launch --ncs-version"
f" {self.detected_ncs_version} --shell"
)

return self.run(cmd)

def run_manager(self, command, **kwargs):
"""Executes a command with Nordic's Toolchain manager executable.
This is not suitable to be used with a type of a 'launch -- <command>' command.
For that _run_arbi_manager should be used.
For that run_cmd_in_manager should be used.
Args:
manager_command (str): Manager command to execute
Expand All @@ -278,7 +288,7 @@ def run_manager(self, command, **kwargs):

return self.run(cmd, **kwargs)

def _run_arbi_manager(
def run_cmd_in_manager(
self, arbitrary_command: str, exit_on_error: bool = True, **kwargs
):
"""Run an arbitrary command through Nordic's Toolchain Manager
Expand Down
2 changes: 1 addition & 1 deletion src/east/workspace_commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .basic_commands import build, bypass, clean, debug, flash
from .basic_commands import attach, build, bypass, clean, debug, flash, twister
from .release_commands import release
from .update_commands import update
Loading

0 comments on commit 9507d9f

Please sign in to comment.