Skip to content

Added project management commands #1418

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

Merged
merged 65 commits into from
May 5, 2021

Conversation

e4coder
Copy link
Contributor

@e4coder e4coder commented Apr 28, 2021

Changelog / Overview

  • manim init - quickly sets up default files for a manim project.
  • manim new project - lets the user set project settings. It also creates the project inside a new folder of name <project_name>
  • manim new scene - used to quickly insert new scenes into files. If file name is not provided main.py is used as default.

Added 3 commands in the "manim/cli/project/commands.py" file. Added 2 tests in "tests/test_commands.py"

Update:

directories have been restructured.
init command resides in manim/cli/init/command.py.
new command group resides in manim/cli/init/group.py

I also have changed the name of manim/cli/cfg/commands.py to manim/cli/cfg/group.py

Motivation

I want new users to quickly be able to create example scenes and edit those scenes to their liking. Some of my friends don't want to use manim only because they found it very hard

Explanation for Changes

New users of manim will be able to quickly set up projects and scenes from templates. The number of templates is very few at the moment but we can add more.

Commands

1 - manim init : this command quickly sets up default files for a manim project

manim init

2 - manim new project : this command lets the user set project settings. it also creates the project inside a new folder of name <project_name>. this command can be used in 3 different ways

manim new project
manim new project <project_name>

3 - manim new scene : this command is used for inserting new scenes in files. if file name is not provided main.py is used as default. if file name is provided but file name does not exist. new file is created with name file name

manim new scene <scene name>
manim new scene <scene name> <file name>

Testing Status

My PC specs:
Processor:............. core I 5 2400
RAM:..................... 8 GB ddr3 ram
GPU:..................... AMD rx 470
Operating System: Ubuntu 20.04

I have tested these commands extensively in ubuntu. I have not tested them in Windows. however i believe they will work fine

Further Comments

Checklist

  • I have read the Contributing Guidelines
  • I have written a descriptive PR title (see top of PR template for examples)
  • I have written a changelog entry for the PR or deem it unnecessary
  • My new functions/classes either have a docstring or are private
  • My new functions/classes have tests added and (optional) examples in the docs
  • My new documentation builds, looks correctly formatted, and adds no additional build warnings

Reviewer Checklist

  • The PR title is descriptive enough
  • The PR is labeled correctly
  • The changelog entry is completed if necessary
  • Newly added functions/classes either have a docstring or are private
  • Newly added functions/classes have tests added and (optional) examples in the docs
  • Newly added documentation builds, looks correctly formatted, and adds no additional build warnings

@behackl behackl linked an issue Apr 28, 2021 that may be closed by this pull request
@e4coder
Copy link
Contributor Author

e4coder commented Apr 28, 2021

checks are failing for template scenes.

@e4coder
Copy link
Contributor Author

e4coder commented Apr 29, 2021

I think I touched everything mentioned in the comments. let me know if I missed anything. thx

@e4coder e4coder requested a review from jsonvillanueva April 29, 2021 16:02
Copy link
Member

@jsonvillanueva jsonvillanueva left a comment

Choose a reason for hiding this comment

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

I think these are the last tidbits for making the CLI display help pages properly. Other than this, I think the subcommands work as intended. It may be worth adding documentation for these subcommands somewhere in the tutorials section, but I think this can be done in a future PR.

e4coder and others added 2 commits April 30, 2021 14:00
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
@e4coder e4coder requested a review from jsonvillanueva April 30, 2021 09:02
@jsonvillanueva jsonvillanueva changed the title Manim Project management commads, [ manim init ], [ manim new project ] and [ manim new scene ] Added project management commands May 1, 2021
@e4coder
Copy link
Contributor Author

e4coder commented May 3, 2021

@kilacoda Sir it's been 4 days since you requested changes. could you possibly review them? thx

@kilacoda-old
Copy link
Contributor

Sorry, got caught up in some other stuff! Reviewing rn.

Co-authored-by: Raghav Goel <kilacoda@gmail.com>
@e4coder e4coder requested a review from kilacoda-old May 3, 2021 06:54
Copy link
Contributor

@kilacoda-old kilacoda-old left a comment

Choose a reason for hiding this comment

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

LGTM!

@e4coder e4coder requested a review from behackl May 3, 2021 07:34
@huguesdevimeux huguesdevimeux merged commit 4c6b6b6 into ManimCommunity:master May 5, 2021
@behackl behackl added the highlight For contributions that should be highlighted explicitly in the next changelog label May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
highlight For contributions that should be highlighted explicitly in the next changelog new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Manim Project Creating Subcommand
5 participants