Skip to content
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

feat: adding new packages to workspace Cargo.toml automatically #277

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

tsenovilla
Copy link
Contributor

Related to:

While working in the PR #261 I've been thinking that the feature described in the issue is a must. I took the time to work on a potential solution, hope you find it useful :)

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

Nice work!!
Left few comments, most of it regarding consistency with the rest of the code.
Only thing to fix is the functionality for contracts.

crates/pop-cli/src/commands/new/contract.rs Show resolved Hide resolved
crates/pop-cli/src/common/helpers.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/common/helpers.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/common/helpers.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/common/helpers.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 89.95816% with 24 lines in your changes missing coverage. Please review.

Project coverage is 70.12%. Comparing base (74418ed) to head (35e2bfc).

Files Patch % Lines
crates/pop-common/src/manifest.rs 93.36% 12 Missing and 3 partials ⚠️
crates/pop-cli/src/commands/new/pallet.rs 0.00% 7 Missing ⚠️
crates/pop-cli/src/commands/new/contract.rs 33.33% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   69.54%   70.12%   +0.57%     
==========================================
  Files          51       51              
  Lines        8344     8581     +237     
  Branches     8344     8581     +237     
==========================================
+ Hits         5803     6017     +214     
- Misses       1591     1610      +19     
- Partials      950      954       +4     
Files Coverage Δ
crates/pop-parachains/src/generator/pallet.rs 36.36% <ø> (ø)
crates/pop-parachains/src/new_pallet.rs 77.17% <100.00%> (+0.76%) ⬆️
crates/pop-cli/src/commands/new/contract.rs 48.05% <33.33%> (-0.30%) ⬇️
crates/pop-cli/src/commands/new/pallet.rs 0.00% <0.00%> (ø)
crates/pop-common/src/manifest.rs 91.20% <93.36%> (+19.20%) ⬆️

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

Great job! Thanks again for contributing to pop-cli.

@AlexD10S AlexD10S merged commit 7cbfc36 into r0gue-io:main Aug 8, 2024
18 checks passed
@tsenovilla tsenovilla deleted the workspace-auto-update branch August 8, 2024 12:04
tsenovilla added a commit to tsenovilla/pop-cli that referenced this pull request Aug 15, 2024
… that's already in the workspace doesn't include it again
AlexD10S pushed a commit that referenced this pull request Aug 30, 2024
* Interactive interface added

* Update pick_options_and_give_name macro to handle an arbitrary amount of cases, allowing pick several options for the same object

* New macro for multiselect from an enum. Improve the CLI to support more options

* Adding the possibility of using custom origins

* Adding Cargo.toml generation

* Template lib.rs. Pending of review

* Finishing lib (and related) templates

* New mock config

* Finishing templates

* Adding some tests for the folder structure

* Formatting repo

* Solving mock implementation of common types when no default config issue

* Adding more links to Polkadot-SDK-docs

* Formatting lib.rs.templ

* Solving small issues

* Solving doc test issue, the struct used in that test was modified by this PR

* Apply suggestions from code review

Comment corrections by Bruno

Co-authored-by: Bruno Galvao <[email protected]>

* Adding simple/advanced modes

* Adding advanced mode

* Adding advanced mode

* Formatting and solving conflicts

* Solving small template issues

* Formatting the template after generation

* Formatting pallet

* Updating template generation

* Improving manifest test suite

* Allowing storage/common_types from CLI + template improvement

* Solving bug related to PR #277: Regenerating a crate with POP that's already in the workspace doesn't include it again

* Finishing templates with examples; solving some small bugs produced when a pallet is generated from a workspace

* Finishing templates with examples; solving some small bugs produced when a pallet is generated from a workspace

* Deleting legacy file

* Improving UX

* Applying suggested changes

* Applying suggested changes

* Adding a whiteline to lib.rs.templ for formatting, not so important

* Not including default config if config trait empty

* Improve advanced help examples

* Improve advanced help examples

* Improve advanced help examples

* Applying suggestions

---------

Co-authored-by: Bruno Galvao <[email protected]>
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.

2 participants