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

refactor: use init command from craft-application #5129

Merged
merged 8 commits into from
Nov 8, 2024

Conversation

mr-cal
Copy link
Collaborator

@mr-cal mr-cal commented Oct 23, 2024

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox run -m lint?
  • Have you successfully run tox run -e test-py310? (supported versions: py39, py310, py311, py312)

Replace Snapcraft's init implementation with craft-application's implementation. Somehow I added more lines of code 🙃

There are no behavioral changes with just snapcraft init. However, the command now accepts additional parameters added in craft-application: name, profile, and project-dir.

Fixes #5098
(CRAFT-3543)

@mr-cal mr-cal force-pushed the work/CRAFT-3543/init-command branch 4 times, most recently from c11a314 to d235c56 Compare October 23, 2024 19:26
snapcraft/commands/init.py Outdated Show resolved Hide resolved
requirements-devel.txt Outdated Show resolved Hide resolved
snapcraft/commands/init.py Outdated Show resolved Hide resolved
snapcraft/commands/init.py Outdated Show resolved Hide resolved
snapcraft/commands/init.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dariuszd21 dariuszd21 left a comment

Choose a reason for hiding this comment

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

Looks good!

snapcraft/commands/init.py Outdated Show resolved Hide resolved
tests/spread/general/init/task.yaml Show resolved Hide resolved
tests/spread/general/init/task.yaml Outdated Show resolved Hide resolved
@mr-cal mr-cal marked this pull request as draft October 28, 2024 11:08
@mr-cal mr-cal marked this pull request as ready for review November 7, 2024 19:31
Copy link
Contributor

@dariuszd21 dariuszd21 left a comment

Choose a reason for hiding this comment

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

Thanks, I really like it!

snapcraft/services/init.py Show resolved Hide resolved
snapcraft/services/init.py Show resolved Hide resolved
tests/unit/commands/test_init.py Outdated Show resolved Hide resolved
snapcraft/services/init.py Outdated Show resolved Hide resolved
requirements-docs.txt Outdated Show resolved Hide resolved
@mr-cal mr-cal merged commit de05a73 into main Nov 8, 2024
13 checks passed
@mr-cal mr-cal deleted the work/CRAFT-3543/init-command branch November 8, 2024 23:21
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.

Use upstream init command from craft-application
3 participants