Skip to content

Dev sprint ideas: More tests, type hints and less complexity #2128

Description

@itsvinayak

currently, some of the programs use static type checking like this program but some of the programs did not use static typing.

it's a good practice to use static typing as it makes code more clear and readable, should we make it a standard for this repository.we can use mypy for testing code

more on static typing

thank you

Dev sprint ideas:

Activity

  1. cclauss commented on Jun 17, 2020

    @cclauss
    Member

    We push all new contributions to use type hints as discussed in CONTRIBUTING.md.
    All efforts to add type hints to existing algorithms would be warmly received.

    We can use mypy for testing code

    We do this already https://github.com/TheAlgorithms/Python/blob/master/.travis.yml#L17

  2. onlinejudge95 commented on Jun 17, 2020

    @onlinejudge95
    Collaborator

    @cclauss How about a dev sprint kind of thing where we go about adding all such improvements?

  3. cclauss commented on Jun 17, 2020

    @cclauss
    Member

    Cool idea! Another thing (a sprint topic?) that is bugging me is code complexity which we currently set to 25 but I would be much happier to see it at 15. We would need to ensure that the files have strong type hints and tests before modifying them to reduce their cyclomatic complexity.

  4. cclauss commented on Jun 17, 2020

    @cclauss
    Member

    Another cool sprint topic would be to add doctests to Python files that have <10% test coverage. Some files like file_transfer/send_file.py and the web programming files are difficult to write tests for but others should be fair game.

  5. changed the title [-]Static typing standard for repository[/-] [+]Dev sprint ideas: More tests, type hints and less cyclomatic complexity[/+] on Jun 17, 2020
  6. changed the title [-]Dev sprint ideas: More tests, type hints and less cyclomatic complexity[/-] [+]Dev sprint ideas: More tests, type hints and less code complexity[/+] on Jun 17, 2020
  7. changed the title [-]Dev sprint ideas: More tests, type hints and less code complexity[/-] [+]Dev sprint ideas: More tests, type hints and less complexity[/+] on Jun 17, 2020
  8. cclauss commented on Jun 20, 2020

    @cclauss
    Member

    Should we have a short sprint or a long one? One idea would be 24 hour sprint — given that tomorrow is summer solstice (longest day of the year) — the sprint could start at midnight tonight (in whatever timezone the contributer is in) and last for 24 hours. #2128 could be our tracking issue for keeping track of tasks and accomplishments. Thoughts on this Summer Solstice Special Sprint idea.

  9. onlinejudge95 commented on Jun 20, 2020

    @onlinejudge95
    Collaborator

    Seems awesome, we can gain some attention by Summer Solstice Special Sprint, I am up on gitter if you want to discuss

  10. 23 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions