Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add first set of profile commands #2917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
Loading
from

Conversation

MatteoPologruto
Copy link
Contributor

@MatteoPologruto MatteoPologruto commented May 21, 2025

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Code enhancement

What is the current behavior?

Operations on the sketch.yaml project file must be done manually.

What is the new behavior?

First set of profile commands:

  1. profile init [<PATH>] [-m <PROFILE_NAME -b <FQBN>] creates a sketch.yaml file at the provided path. By default it creates the file in the current directory. A new profile can be added to the file by providing a profile name and FQBN (mandatory). The platform is detected automatically. It fails in the following cases:
    • the path does not exist or the main sketch file is missing
    • the FQBN is wrong or the platform related to it is not installed locally

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@MatteoPologruto MatteoPologruto self-assigned this May 21, 2025
@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: code Related to content of the project itself labels May 21, 2025
@MatteoPologruto MatteoPologruto linked an issue May 21, 2025 that may be closed by this pull request
3 tasks
@MatteoPologruto MatteoPologruto changed the title Add first set of profile command Add first set of profile commands May 21, 2025
Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 88 lines in your changes missing coverage. Please review.

Project coverage is 67.95%. Comparing base (dd621ee) to head (a2c86ef).

Files with missing lines Patch % Lines
commands/service_profile_lib_add.go 54.34% 14 Missing and 7 partials ⚠️
commands/service_profile_init.go 74.60% 11 Missing and 5 partials ⚠️
internal/cli/profile/lib.go 84.31% 14 Missing and 2 partials ⚠️
commands/service_profile_lib_remove.go 50.00% 10 Missing and 5 partials ⚠️
commands/service_profile_set_default.go 45.45% 8 Missing and 4 partials ⚠️
commands/cmderrors/cmderrors.go 25.00% 6 Missing ⚠️
internal/cli/profile/init.go 94.44% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2917      +/-   ##
==========================================
+ Coverage   67.83%   67.95%   +0.12%     
==========================================
  Files         238      246       +8     
  Lines       22442    22794     +352     
==========================================
+ Hits        15223    15490     +267     
- Misses       6016     6079      +63     
- Partials     1203     1225      +22     
Flag Coverage Δ
unit 67.95% <75.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

It creates a `sketch.yaml` file at the provided path. A new profile can be added to the file by providing a profile name and FQBN.
@MatteoPologruto MatteoPologruto force-pushed the add-profiles-command-support branch 2 times, most recently from ab96ed6 to 8a41c13 Compare May 22, 2025 12:25
It adds one or multiple libraries to the specified profile.
@MatteoPologruto MatteoPologruto force-pushed the add-profiles-command-support branch from 8a41c13 to d3d7a59 Compare May 22, 2025 13:32
It removes a library from the specified profile.
@MatteoPologruto MatteoPologruto force-pushed the add-profiles-command-support branch from 67c9a2c to f98bf7d Compare May 22, 2025 14:46
If the project file contains only one profile, it is automatically set as default, otherwise the `--default` flag can be used.
Library operations are automatically executed on the default profile.
Sets the default profile to the provided existing profile.
@MatteoPologruto MatteoPologruto force-pushed the add-profiles-command-support branch from 896841b to a2c86ef Compare May 23, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add first set of profile commands
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.