GithubHelp home page GithubHelp logo

Comments (5)

truongc2 avatar truongc2 commented on July 2, 2024

Are these checks added to the unit test or the source code?

from data-describe.

terrytangyuan avatar terrytangyuan commented on July 2, 2024

At least should be added to sanity checks prior to unit tests using tools like mypy. Adding types to source code may not be necessary yet.

from data-describe.

truongc2 avatar truongc2 commented on July 2, 2024

I'm new to static typing so I'm having trouble understanding where the checks should be located. If not in the source code, then would it be added to the unit testing code? Or is this an entirely new file?

from data-describe.

terrytangyuan avatar terrytangyuan commented on July 2, 2024

@truongc2 mypy has CLI and you can use it together with flake8: https://github.com/ambv/flake8-mypy.

https://github.com/python/mypy#ide-linter-integrations-and-pre-commit

from data-describe.

dvdjlaw avatar dvdjlaw commented on July 2, 2024

More info for @truongc2:
Make sure you have installed pre-commit in your local dev environment

  1. Update .pre-commit-config.yaml to include mypy checks in addition to flake8 (which is already added).
  2. Decide how mypy should be configured (args), See https://github.com/pre-commit/mirrors-mypy
  3. Test/run locally to ensure the mypy checks run and resolve any possible issues
  4. Merge to integrate with CI (Github Actions). Pre-commit is already implemented so there shouldn't be any additional change to activate

from data-describe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.