common-workflow-lab / wdl-cwl-translator

A translator from WDL to CWL v1.2
Apache License 2.0
26 stars 8 forks source link

Use pyproject.toml, remove extra files. #196

Closed kinow closed 5 months ago

kinow commented 2 years ago

closes #111

The setup.py file can be simplified down to just a setup() call (as long as we use a recent pip module). We can use the installation groups, so instead of test-requirements.txt, mypy-requirements.txt, etc, we can group the dependencies in a single file, within groups, and then call pip install wdl2cwl[test], pip install wdl2cwl[mypy], etc.

codecov[bot] commented 2 years ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.97%. Comparing base (a2188de) to head (1f46474).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #196 +/- ## ========================================== + Coverage 94.78% 94.97% +0.19% ========================================== Files 3 7 +4 Lines 728 816 +88 Branches 213 223 +10 ========================================== + Hits 690 775 +85 - Misses 14 16 +2 - Partials 24 25 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kinow commented 2 years ago

TIL², I believe we can remove the mypy.ini file as well, and use pyproject.toml: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file

[[tool.mypy.overrides]]
module = 'wdl2cwl'
show_error_context = true
show_column_numbers = true
show_error_codes = true
pretty = true
strict = True

[[tool.mypy.overrides]]
module = "ruamel.*"
ignore_errors = True

[[tool.mypy.overrides]]
module = "lark.*"
ignore_missing_imports = True

Will try it later today and see what else would need to be updated too.

kinow commented 2 years ago

Will try it later today and see what else would need to be updated too.

Syntax was a little different, but appears to have worked. make mypy passing locally for me.