Closed DarwinAwardWinner closed 7 years ago
Thanks. Never used type annotations in Python before. Look forward to reading PEP484.
There are some typos in your code (typimg), which I guess is why the continuous integration fails?
It seems like type annotations do not work for 2.7 though. Perhaps they can be added in a way compatible with 2.7 like shown here: http://mypy.readthedocs.io/en/latest/python2.html
If you fix that and type annotations does not break anything major, I'll merge the PR.
Endre
On Sunday, November 13, 2016, Ryan C. Thompson notifications@github.com wrote:
I've written type annotations for every function in the epic module. This allows you to run mypy and type-check the entire codebase. I also fixed a
few minor bugs that were revealed by the type checker.
You can view, comment on, or merge this pull request online at:
https://github.com/endrebak/epic/pull/47 Commit Summary
- Add mypy type annotations
- Add missing argument to get_island_bins
File Changes
- M epic/bigwig/create_bigwigs.py https://github.com/endrebak/epic/pull/47/files#diff-0 (14)
- M epic/config/genomes.py https://github.com/endrebak/epic/pull/47/files#diff-1 (13)
- M epic/matrixes/matrixes.py https://github.com/endrebak/epic/pull/47/files#diff-2 (42)
- M epic/run/run_epic.py https://github.com/endrebak/epic/pull/47/files#diff-3 (17)
- M epic/scripts/effective_genome_size.py https://github.com/endrebak/epic/pull/47/files#diff-4 (3)
- M epic/scripts/overlaps/files_to_chromosome_coverage.py https://github.com/endrebak/epic/pull/47/files#diff-5 (13)
- M epic/scripts/overlaps/nucleotide_bargraph.py https://github.com/endrebak/epic/pull/47/files#diff-6 (23)
- M epic/scripts/overlaps/nucleotides_heatmap.py https://github.com/endrebak/epic/pull/47/files#diff-7 (10)
- M epic/scripts/overlaps/overlaps.py https://github.com/endrebak/epic/pull/47/files#diff-8 (9)
- M epic/statistics/add_to_island_expectations.py https://github.com/endrebak/epic/pull/47/files#diff-9 (10)
- M epic/statistics/compute_background_probabilites.py https://github.com/endrebak/epic/pull/47/files#diff-10 (3)
- M epic/statistics/compute_poisson.py https://github.com/endrebak/epic/pull/47/files#diff-11 (4)
- M epic/statistics/compute_score_threshold.py https://github.com/endrebak/epic/pull/47/files#diff-12 (13)
- M epic/statistics/compute_values_needed_for_recurrence.py https://github.com/endrebak/epic/pull/47/files#diff-13 (21)
- M epic/statistics/compute_window_score.py https://github.com/endrebak/epic/pull/47/files#diff-14 (2)
- M epic/statistics/count_to_pvalue.py https://github.com/endrebak/epic/pull/47/files#diff-15 (17)
- M epic/statistics/fdr.py https://github.com/endrebak/epic/pull/47/files#diff-16 (7)
- M epic/statistics/generate_cumulative_distribution.py https://github.com/endrebak/epic/pull/47/files#diff-17 (7)
- M epic/utils/find_readlength.py https://github.com/endrebak/epic/pull/47/files#diff-18 (5)
- M epic/utils/helper_functions.py https://github.com/endrebak/epic/pull/47/files#diff-19 (44)
- M epic/utils/separate_input_and_chip_infiles.py https://github.com/endrebak/epic/pull/47/files#diff-20 (6)
- M epic/windows/cluster/find_islands.py https://github.com/endrebak/epic/pull/47/files#diff-21 (11)
- M epic/windows/count/count_reads_in_windows.py https://github.com/endrebak/epic/pull/47/files#diff-22 (21)
- M epic/windows/count/merge_chromosome_dfs.py https://github.com/endrebak/epic/pull/47/files#diff-23 (6)
- M epic/windows/count/remove_out_of_bounds_bins.py https://github.com/endrebak/epic/pull/47/files#diff-24 (8)
- A mypy.ini https://github.com/endrebak/epic/pull/47/files#diff-25 (7)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/endrebak/epic/pull/47, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0j_FUojhQ5jGJM8-CHgmrPiIxig_ks5q9t5ZgaJpZM4KwpzU .
OK, I think I've got everything in order. Let me know if you want me to squash some of the fixup commits before you merge.
Will look closer at this within a few days and before making a new commit to the project. I am a bit swamped in the beginning of the week. Thanks btw!
On Sun, Nov 13, 2016 at 7:17 PM, Ryan C. Thompson notifications@github.com wrote:
OK, I think I've got everything in order. Let me know if you want me to squash some of the fixup commits before you merge.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/endrebak/epic/pull/47#issuecomment-260202280, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0iHOUxM7C2EJJ4rAgpbT8xAB1Jfvks5q91RCgaJpZM4KwpzU .
Since the tests passed, and the 2.7 version of annotations is really just comments, I merged your PR. Thanks. Added you to the contrib list.
I've written type annotations for every function in the epic module. This allows you to run mypy and type-check the entire codebase. I also fixed a few minor bugs that were revealed by the type checker.