Skip to content

Start running validate_solutions script for Travis CI #3215

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 2 commits into from
Oct 12, 2020

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Oct 12, 2020

Removed print error_msgs at the end of the test:

This was done only to reduce the message clutter produced by 60
failing tests. As that is fixed, we can produce the traceback in
short form and allow pytest to print the captured error message
output at the end of the test.

Start validate_solutions script for Travis CI

I am separating out the solution testing and doctest as validating
the solutions for the current number of solutions present is
taking 2 minutes to run which is purely due to the solutions provided.

Describe your change:

  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.

This was done only to reduce the message clutter produced by 60
failing tests. As that is fixed, we can produce the traceback in
short form and allow pytest to print the captured error message
output at the end of test.
I am separating out the solution testing and doctest as validating
the solutions for the current number of solutions present is
taking 2 minutes to run.
@dhruvmanila dhruvmanila requested a review from cclauss as a code owner October 12, 2020 03:10
@dhruvmanila
Copy link
Member Author

I'm also planning to write down guidelines regarding Project Euler solutions. There are more than 700 of them and people are starting to submit a lot of them now so we need some consistency to maintain throughout the directory. Some of the points I have in my mind are as follows:

  • Consistency in directory names: problem_001, problem_002, ..., problem_120, ..., problem_450, .... This way the directories will be sorted and not be jumbled as it is now.
  • solution() function should be present and it should contain one or many positional arguments whose default values are the question input. This is proposed because the doctest should test the function and not check for the answer as that will be done by us using validate_solutions.py.
  • doctest provided by the user should not check for the answer as that will increase the load on Travis. We are already validating the answer and so the user should test only for the function by providing values for the positional argument different from the question input, preferably small values.
  • The problem link should be present in the module-level docstring and reference link to the topic used in the solution if any.

@dhruvmanila dhruvmanila merged commit 69f9283 into TheAlgorithms:master Oct 12, 2020
@dhruvmanila dhruvmanila deleted the start-pe-script branch October 12, 2020 10:21
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
…3215)

* Removed print error_msgs at the end of test:

This was done only to reduce the message clutter produced by 60
failing tests. As that is fixed, we can produce the traceback in
short form and allow pytest to print the captured error message
output at the end of test.

* Start validate_solutions script for Travis CI

I am separating out the solution testing and doctest as validating
the solutions for the current number of solutions present is
taking 2 minutes to run.
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
…3215)

* Removed print error_msgs at the end of test:

This was done only to reduce the message clutter produced by 60
failing tests. As that is fixed, we can produce the traceback in
short form and allow pytest to print the captured error message
output at the end of test.

* Start validate_solutions script for Travis CI

I am separating out the solution testing and doctest as validating
the solutions for the current number of solutions present is
taking 2 minutes to run.
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