Skip to content

Add packaging setup#29

Merged
lorc merged 2 commits intoxen-troops:mainfrom
Mishytca:pip3-set-up
Jul 7, 2025
Merged

Add packaging setup#29
lorc merged 2 commits intoxen-troops:mainfrom
Mishytca:pip3-set-up

Conversation

@Mishytca
Copy link
Copy Markdown

No description provided.

@Mishytca
Copy link
Copy Markdown
Author

Hi, @lorc could you please take a look?

@lorc
Copy link
Copy Markdown
Collaborator

lorc commented May 7, 2025

Hi @Mishytca,

could you please read and follow https://xen-troops.github.io/process/process.html ? Especially "Make your commits atomic" section in this case. But please read the whole document.

I am asking because your last patch "Handle udev-based serial symlinks and avoid unconditional pyftdi import" does two completely unrelated things.

Also, please follow one style in the commit message headers. Why 2 commits start with a capital letter, but other one - with a lowercase letter?

@Mishytca Mishytca force-pushed the pip3-set-up branch 2 times, most recently from 8e01609 to 7320d00 Compare May 11, 2025 12:28
@Mishytca
Copy link
Copy Markdown
Author

Hi @lorc, thank you so much for your comment. Done.
A small addition:
I tested installing rcar_flash using pipx — it's a very convenient method, especially on Ubuntu 24.04.
pipx automatically creates an isolated virtual environment for the tool and ensures that other Python packages on your system remain unaffected.

@Mishytca Mishytca force-pushed the pip3-set-up branch 3 times, most recently from 8f716e2 to 827607c Compare May 12, 2025 12:26
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
@Mishytca
Copy link
Copy Markdown
Author

Hi @lorc , hi @rshym . I adapted the code considering that CI had been previously added.
I removed the commit that was previously related to #31.
This task will be submitted as a separate pull request.
The changes were successfully tested on defrans.kf1. Everything works correctly both when installing rcar_flash via pipx, when running without installation.

Copy link
Copy Markdown
Contributor

@rshym rshym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made by this commit to the README.md need to be reworked:

  • the pyftdi-related part should not be removed
  • should be minimized
  • the reformatting is needed, to align with already used width of the text

Comment thread rcar_flash/__init__.py Outdated
Comment thread setup.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread README.md Outdated
@Mishytca Mishytca force-pushed the pip3-set-up branch 2 times, most recently from 23b347d to 78dc834 Compare June 3, 2025 13:13
@Mishytca Mishytca force-pushed the pip3-set-up branch 2 times, most recently from da837bd to 7676446 Compare June 4, 2025 08:09
@Mishytca Mishytca force-pushed the pip3-set-up branch 2 times, most recently from 99dcc45 to 304c8c2 Compare July 3, 2025 10:32
@Mishytca
Copy link
Copy Markdown
Author

Mishytca commented Jul 3, 2025

Hi @lorc. Please take a look at the latest version of the changes when you have time

Comment thread README.md Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
Comment thread rcar_flash/rcar_flash.py Outdated
@Mishytca
Copy link
Copy Markdown
Author

Mishytca commented Jul 6, 2025

I tested these changes on defrans.kf0.
Everything works correctly both when installing via pipx and when running from a cloned repository.
I also verified that the raise Exception works correctly.

Copy link
Copy Markdown
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks much better. Thanks.

Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

Mykhailo Androsiuk added 2 commits July 8, 2025 00:13
Wrapped the `rcar_flash` tool into a pip-installable Python package.

- Added `setup.py` with metadata and dependency definitions.
- Restructured source code into a proper package layout.
- Configured a console script entry point for `rcar_flash`.
- Updated `README.md` with `pipx` installation instructions.
- Adapted CI configuration to reflect the new project structure.

Signed-off-by: Mykhailo Androsiuk <mykhailo_androsiuk@epam.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Added a log message to show the path of the configuration file being
used.
This improves visibility and helps users understand which config is
applied during flashing.

Signed-off-by: Mykhailo Androsiuk <mykhailo_androsiuk@epam.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
@Mishytca
Copy link
Copy Markdown
Author

Mishytca commented Jul 7, 2025

R-b is added. Ready to be merged.

@lorc lorc merged commit ddcd582 into xen-troops:main Jul 7, 2025
1 check passed
@Mishytca Mishytca deleted the pip3-set-up branch July 8, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants