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

Create a test to certify a clean install #11

Closed
leotrs opened this issue May 19, 2020 · 14 comments
Closed

Create a test to certify a clean install #11

leotrs opened this issue May 19, 2020 · 14 comments
Assignees
Labels
enhancement Additions and improvements in general
Projects

Comments

@leotrs
Copy link
Contributor

leotrs commented May 19, 2020

Originally posted by @eulertour in #9 (comment)

Basically something to dry-run a Scene, ensure that the bare minimum to render successfully is actually installed, and give a helpful error like LaTeX/FFmpeg isn't installed, media directory isn't writable, etc.

Having done this, the correct way to install manim would be pip install manim, and then pytest test_install.py. (Or the equivalent in the testing library that we end up using.)

This would flag issues about system dependencies such as latex, ffmpeg, etc.

@PgBiel
Copy link
Member

PgBiel commented May 20, 2020

Could probably be automated with travis or something as well

@huguesdevimeux
Copy link
Member

As @leotrs pointed out, we will have to be aware in the tests that Latex is optional. See #11

@leotrs leotrs self-assigned this May 20, 2020
@PgBiel PgBiel added the enhancement Additions and improvements in general label May 20, 2020
@huguesdevimeux
Copy link
Member

Closed since #28 #97 are on this (and more up-to-date)

@leotrs
Copy link
Contributor Author

leotrs commented Jun 1, 2020

@huguesdevimeux While this can be done with what we currently have, I don't think this has been implemented. To clarify, I meant a "test to certify a clean install" that a user could run after installation, and it would be part of the installation instructions. So the installation instructions would have this as the last instruction: "Finally, run some_command on your terminal. If it finishes without error, then your install of manim is complete. If it shows an error, then please refer to the FAQ/Troubleshooting section".

So I guess all that's missing in order to get that is documentation.

@huguesdevimeux
Copy link
Member

@leotrs Oh ok I see, this is a good idea.
But is your idea to do it with pytest ? If yes I think this will be implemented soon.
If not, I think that just telling the user to run SquareToCircle might be enough.
But you're totally right, at least a mention of a such command (potentially with SquareToCircle, I don't know) is missing in the Readme.

@eulertour
Copy link
Member

I have to agree with @leotrs that this isn't finished yet, and it would ideally be something done through pytest. It'd be much better to have a command which gives clear error messages and covers as many potential pitfalls as it can than to run SquareToCircle. As an example, the latter wouldn't test latex.

@eulertour eulertour reopened this Jun 1, 2020
@eulertour eulertour mentioned this issue Jul 11, 2020
15 tasks
@naveen521kk
Copy link
Member

Will a batch/shell script do? Or it should be done with purest?

@leotrs
Copy link
Contributor Author

leotrs commented Aug 4, 2020

@naveen521kk all tests should be done via pytest, as much as possible.

@huguesdevimeux
Copy link
Member

@naveen521kk all tests should be done via pytest, as much as possible.

Hmm are you sure about that ? I mean, this test is meant to be run by a standard user, not a contributor.
I think a shell script is better as there is much more trouble to set up.

What do you think ?

@leotrs
Copy link
Contributor Author

leotrs commented Aug 20, 2020

So in the PR I just requested (#324), there are instructions embedded in the installation instructions to certify the installation is clean. For example, after installing latex, it instructs the reader to try it out by executing latex on the console. Would this be a poor man's fix for this issue?

@Aathish04
Copy link
Member

Why can't we ask them to use pytest, like you suggested?

Heck, we could have a script in /scripts/ install pytest for them, run the tests, make sure they're fine, and uninstall pytest on the way out.

@leotrs
Copy link
Contributor Author

leotrs commented Aug 20, 2020

I mean, we can 🤷‍♂️

@huguesdevimeux huguesdevimeux added this to To sort : in Tests Aug 26, 2020
@huguesdevimeux huguesdevimeux moved this from To sort : to New tests request : in Tests Aug 26, 2020
@leotrs
Copy link
Contributor Author

leotrs commented Sep 1, 2020

I think this issue went off the rails a little bit. The original idea is to provide a way for end users to test whether or not their installation is clean. They usually don't have pytest installed. I think having a script that ships with the library, or even a subcommand manim certify-install is the way to go.

OTOH, the documentation already includes instructions on how to certify the installation of each dependency. I think it's safe to close this issue for now. @Aathish04 ?

@leotrs
Copy link
Contributor Author

leotrs commented Oct 8, 2020

I think the current documentation does a good job at guiding the user through the whole installation process.

I think this issue has ran its course.

@leotrs leotrs closed this as completed Oct 8, 2020
Tests automation moved this from New tests request : to Done Oct 8, 2020
RickyC0626 pushed a commit to RickyC0626-forks/manim-community that referenced this issue May 1, 2021
…tion-sys

TEST: Expected warning messages for deprecated parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general
Projects
Tests
  
Done
Development

No branches or pull requests

6 participants