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: enable pop up without project type specification #403

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

AlexD10S
Copy link
Collaborator

@AlexD10S AlexD10S commented Feb 6, 2025

  • Enables pop up command to run without specifying contract or parachain, automatically detecting the project type.

  • Handles the deprecation of pop up contract and pop up parachain, keeping them functional for now but marking them for future removal (Reference feat: enable building without project type specification #222).

  • Refactors pop up to distinguish between deploying a parachain and launching a local network.

    • pop up parachain is now migrated to pop up network.
    • pop up in a parachain template will deploy a parachain instead of launching a network.
      Note:: Currently, running pop up inside a parachain project does nothing. The deployment logic for parachains has been removed in this commit 38a19a8 and will be implemented separately in an upcoming PR feat: deploy parachain #404.

Commands for testing

# Deploy a contract passing path
pop up ../flipper --args false
# Deploy a contract using flag --path
pop up --path ../flipper --args false
# Deploy a contract, inside the contract folder.
pop up --args false
# Deploy a contract with deprecated command. (Should display an warning message).
pop up contract --args false
# Launch a local network
pop up network -f ./network.toml
# Launch a local network  with deprecated command. (Should display an warning message).
pop up parachain -f ./network.toml

# This will be used to deploy a parachain; currently, not implemented, only shows a warning.
pop up

[sc-2506]

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 63.63636% with 40 lines in your changes missing coverage. Please review.

Project coverage is 75.30%. Comparing base (2e03233) to head (8093764).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/commands/up/mod.rs 78.26% 3 Missing and 12 partials ⚠️
crates/pop-cli/src/commands/up/contract.rs 40.00% 11 Missing and 1 partial ⚠️
crates/pop-cli/src/commands/mod.rs 47.05% 9 Missing ⚠️
crates/pop-cli/src/commands/up/network.rs 0.00% 4 Missing ⚠️
@@            Coverage Diff             @@
##             main     #403      +/-   ##
==========================================
+ Coverage   75.11%   75.30%   +0.18%     
==========================================
  Files          63       64       +1     
  Lines       13842    13927      +85     
  Branches    13842    13927      +85     
==========================================
+ Hits        10398    10488      +90     
+ Misses       2118     2095      -23     
- Partials     1326     1344      +18     
Files with missing lines Coverage Δ
crates/pop-cli/src/commands/up/network.rs 6.88% <0.00%> (ø)
crates/pop-cli/src/commands/mod.rs 25.00% <47.05%> (+8.67%) ⬆️
crates/pop-cli/src/commands/up/contract.rs 40.95% <40.00%> (+6.87%) ⬆️
crates/pop-cli/src/commands/up/mod.rs 78.26% <78.26%> (ø)

... and 2 files with indirect coverage changes

@AlexD10S AlexD10S changed the base branch from feat/deploy-parachain to main February 9, 2025 10:56
@AlexD10S AlexD10S changed the title refactor: pop up command feat: enable pop up without project type specification Feb 9, 2025
@AlexD10S AlexD10S marked this pull request as ready for review February 9, 2025 11:18
Copy link
Collaborator

@chungquantin chungquantin left a comment

Choose a reason for hiding this comment

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

PR looks great! I left some comments mainly for the code improvement. Some based on my personal preferences. Not a blocker though.

crates/pop-cli/src/commands/mod.rs Show resolved Hide resolved
crates/pop-cli/src/commands/mod.rs Show resolved Hide resolved
crates/pop-cli/src/commands/up/mod.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/up/contract.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/up/contract.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/up/mod.rs Show resolved Hide resolved
crates/pop-cli/src/commands/mod.rs Show resolved Hide resolved
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