Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
398 commits
Select commit Hold shift + click to select a range
b15560d
DM-65,DM-55,DM-57 A first pass at progress bars and modkit error hand…
Feb 12, 2024
4874259
DM-65 Fixed slowdown issue by updating progress bars less often. Kept…
Feb 12, 2024
1404eeb
Merge pull request #81 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
1de7a72
Merge pull request #82 from streetslab/modkit_parsing_beta
OberonDixon Feb 12, 2024
1184341
DM-65 Switching Colab tqdm back to just standard, rather than tqdm.no…
Feb 12, 2024
f0c05ea
Merge remote-tracking branch 'origin/modkit_parsing_oberon' into modk…
Feb 12, 2024
9e460ea
Merge pull request #83 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
7646794
DM-65 Fixed mistake in utils.import_tqdm that made Colab import the J…
Feb 12, 2024
e7fbd6f
Merge pull request #84 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
40da2a5
DM-65 Simplified tqdm importing.
Feb 12, 2024
9e72527
Merge pull request #85 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
bf40c23
DM-65 Tweaks to Colab setup in tutorial that should make progress bar…
Feb 12, 2024
b443f7e
Merge pull request #86 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
7523349
Fixed regions=None bug. Clarified setup.py package version info.
Feb 12, 2024
a5b98d6
Merge pull request #87 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
9c60e0a
DM-65 Cleaned up outputs, added new h5 saving progress bars, expanded…
Feb 12, 2024
99fff7a
DM-13 Implemented and tested .bam reference genome checking with Mega…
Feb 12, 2024
73a9203
DM-48 Implemented regions.processed.bed return in pileup, extract, an…
Feb 12, 2024
6322959
DM-64,DM-65 Added pileup.bed.gz.tbi to the prep_outputs call for pars…
Feb 12, 2024
323a33e
Documentation updates.
Feb 12, 2024
2f7abc6
Merge pull request #88 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
86ba76e
Changed ipywidgets version from 7.7.1 to 7.6.5 because 7.6.5 works on…
Feb 12, 2024
2846165
Merge pull request #89 from streetslab/modkit_parsing_oberon
OberonDixon Feb 12, 2024
21c57ab
Clarifications regarding Windows compatibility.
Feb 13, 2024
a3fcd56
Merge pull request #90 from streetslab/modkit_parsing_oberon
OberonDixon Feb 13, 2024
63034f6
Update README.md
OberonDixon Feb 15, 2024
c5750b5
Update README.md
OberonDixon Feb 15, 2024
d691e91
Update README.md
OberonDixon Feb 15, 2024
4bb6e9f
Update README.md
OberonDixon Feb 15, 2024
a006163
Update README.md
OberonDixon Feb 15, 2024
5ac6517
Update README.md
OberonDixon Feb 15, 2024
7d1e499
Update README.md
OberonDixon Feb 15, 2024
e887550
Update README.md
OberonDixon Feb 15, 2024
bd918bf
Update README.md
OberonDixon Feb 15, 2024
077039a
Update README.md
OberonDixon Feb 15, 2024
840969f
Update README.md
OberonDixon Feb 15, 2024
43b25a1
Update README.md
thekugelmeister Feb 15, 2024
04348d4
tutorial cleanup
Feb 15, 2024
239dd49
Merge pull request #91 from streetslab/modkit_parsing_beta
OberonDixon Feb 15, 2024
08b85d8
Merge pull request #92 from streetslab/modkit_parsing_oberon
OberonDixon Feb 15, 2024
cad37c8
Updated dependencies to make progress bars work better on standard/lo…
Feb 15, 2024
ea4f08f
Reconciling.
Feb 15, 2024
436b1bf
Readme updates for ipywidgets versioning.
Feb 15, 2024
e5b9000
Small updates
Feb 15, 2024
150cfa5
Merge pull request #93 from streetslab/modkit_parsing_oberon
OberonDixon Feb 15, 2024
6f6086a
Added Colab ipywidgets version specifier in tutorial code and README …
Feb 15, 2024
3ca3000
small readme tweak for progress bars
Feb 15, 2024
619ee12
Merge pull request #94 from streetslab/modkit_parsing_oberon
OberonDixon Feb 15, 2024
bc9effa
tweak colab install typo
Feb 15, 2024
afb5062
Readme updates to reflect difficulties with early modkit termination …
Feb 16, 2024
78c9f92
Update README.md
thekugelmeister Feb 17, 2024
948b80c
Small README clarifications
Feb 17, 2024
0937b96
Added design objectives
Feb 17, 2024
6158e13
Merge pull request #95 from streetslab/modkit_parsing_beta
OberonDixon Feb 19, 2024
019673c
New comments on cores=1 parameter to resolve memory issues.
Feb 22, 2024
19572e1
Merge pull request #96 from streetslab/modkit_parsing_beta
OberonDixon Feb 23, 2024
b3eed78
DM-99 Fixed synthetic data testing in advance of building out test wo…
Feb 23, 2024
6cf3033
DM-99,DM-100 Build out pytest test cases, all 24 pass on my machine. …
Mar 2, 2024
9c9e741
DM-99, DM-100 Deleted the old test notebook as it is not longer relev…
Mar 2, 2024
9aef1d3
DM-100 Created a more extensible tast matrix infrastructure in the ge…
Mar 2, 2024
966534d
DM-100 Moved test folder into core package to make it easier to impor…
Mar 3, 2024
6878b10
DM-100 Made it possible to instantiate RelativePath with an absolute …
Mar 4, 2024
dfa16d2
DM-100 smaller set of tests from Savio to run on local mac.
Mar 4, 2024
f5def17
DM-100 Changed pileup.bed.gz output test to first decompress the file…
Mar 4, 2024
826e41b
DM-100 Added a test.yaml file that should allow us to run pytest on G…
Mar 4, 2024
8d3ab6e
DM-100 Changed to yml for consistency with main.
Mar 4, 2024
a5cf261
DM-100 Adjusted test.yml to run on dispatch OR when pushing to main o…
Mar 4, 2024
e09f2e2
Small tweak
Mar 4, 2024
4aa0754
DM-100 Changed the activate command back to conda activate. source wa…
Mar 4, 2024
31398f1
Troubleshooting conda package list - why won't pytest run?
Mar 4, 2024
14ff6df
Added conda activate commands for the different run sections, because…
Mar 4, 2024
3c1ea80
Merged all into one run to see if that helps.
Mar 4, 2024
8d3bd11
DM-100 Working ubuntu tests via .github/workflows/test.yml. Adding ma…
Mar 4, 2024
2a7bfc7
DM-49 Macos and Linux tests work, rolling back Macos tests because 30…
Mar 4, 2024
67293bb
Merge pull request #97 from streetslab/modkit_parsing_run_tests
OberonDixon Mar 4, 2024
249e014
DM-117 Built the core framework but something still isn't lining up w…
Mar 5, 2024
54f0ef1
DM-117, DM-100 Fixed pipeline issues for recapitulating exact outputs…
Mar 5, 2024
7274328
Merge pull request #98 from streetslab/modkit_parsing_single_read_com…
OberonDixon Mar 5, 2024
0f2cf99
DM-100 Adjust test data so that single read checking is looking at a …
Mar 5, 2024
fc0b0fe
Merge pull request #99 from streetslab/modkit_parsing_oberon
OberonDixon Mar 5, 2024
d6920ef
DM-117, DM-100 further updates to test matrix to cover high methylati…
Mar 5, 2024
59672bd
Merge pull request #100 from streetslab/modkit_parsing_oberon
OberonDixon Mar 5, 2024
030d427
DM-117,DM-100 Further adjusted test load reads. Fixed dimelo_test Tes…
Mar 6, 2024
1f746e2
Merge pull request #101 from streetslab/modkit_parsing_single_read_co…
OberonDixon Mar 6, 2024
01f28ab
Merge pull request #102 from streetslab/modkit_parsing_run_tests
OberonDixon Mar 6, 2024
4645774
DM-49 Brought back macos tests because actually our repo is public an…
Mar 6, 2024
c10a91a
Merge branch 'modkit_parsing_run_tests' of https://github.com/streets…
Mar 6, 2024
4eda6b2
DM-49 Tests should now run 1.5-2x faster because I've consolidated du…
Mar 6, 2024
aed18ae
DM-49 Now that single read files are no longer huge, we can include s…
Mar 6, 2024
386e592
Merge pull request #103 from streetslab/modkit_parsing_run_tests
OberonDixon Mar 7, 2024
9b8774c
DM-119 Made h5 loading parallel for mod and val vectors in each regio…
Mar 7, 2024
7b38d5b
DM-120,DM-49 Implemented chunked single read h5 writing for a greater…
Mar 7, 2024
c53caaa
Merge pull request #104 from streetslab/modkit_parsing_single_read_co…
OberonDixon Mar 7, 2024
6398acd
Merge pull request #105 from streetslab/modkit_parsing_run_tests
OberonDixon Mar 7, 2024
3d0154a
Merge pull request #1 from streetslab/modkit_parsing_oberon
thekugelmeister Mar 22, 2024
45835f5
testing matrix test definition
thekugelmeister Mar 28, 2024
0cf025e
fixed typo
thekugelmeister Mar 28, 2024
7a7a945
fixing typo
thekugelmeister Mar 28, 2024
a5339e6
Enable test running
thekugelmeister Mar 28, 2024
fdaf10e
Cleaned up test workflow file
thekugelmeister Mar 28, 2024
74ea61d
Fixing errors from ruff check
thekugelmeister Apr 8, 2024
b263d8d
Adding __all__ to more explicitly expose submodules
thekugelmeister Apr 9, 2024
7d5a022
ruff format
thekugelmeister Apr 9, 2024
13dcb0b
Fixing tuple return types
thekugelmeister Apr 9, 2024
f72095d
Adding isort checking
thekugelmeister Apr 10, 2024
24487fd
extend defaults rather than redefine them
thekugelmeister Apr 10, 2024
dd3a3ca
Adding and running more specific linting options
thekugelmeister Apr 10, 2024
f1a5039
enabling and running ruff format hook
thekugelmeister Apr 10, 2024
f464348
enabling ruff github action
thekugelmeister Apr 10, 2024
cd19155
attempt to add format check to action
thekugelmeister Apr 10, 2024
524f87f
adding separate format check action
thekugelmeister Apr 10, 2024
3534cd9
developer install instructions added to readme
thekugelmeister Apr 10, 2024
b1fbb9c
Preliminary mypy fixes
thekugelmeister Apr 10, 2024
ff6b031
Adding missing type annotations
thekugelmeister Apr 10, 2024
317c1b2
more mypy changes
thekugelmeister Apr 13, 2024
4c60d22
more mypy changes
thekugelmeister Apr 14, 2024
dc7a63c
Merge pull request #2 from streetslab/github_actions
thekugelmeister Apr 14, 2024
a25bf65
Update README.md
thekugelmeister Apr 14, 2024
15aed7a
update colab instructions
thekugelmeister Apr 14, 2024
bd82a48
fixing path changes
thekugelmeister Apr 14, 2024
d3337ac
Merge pull request #4 from streetslab/update_colab_tutorial
thekugelmeister Apr 14, 2024
0663d7d
DM-108 Added h to list of valid cytosine modifications in utils BASEM…
May 8, 2024
81ce59d
DM-142,DM-143 Adjusted parse_bam.extract, parse_bam.check_bam_format,…
May 8, 2024
05ec32a
DM-144,DM-145,DM-149 Added load_processed.pileup mod code filtering. …
May 9, 2024
4d2426b
DM-104 parse_bam.check_bam_format now looks for the specified mod cod…
May 9, 2024
ceb190e
DM-150 Introduced utils.ParsedMotif class to centralize motif parsing…
May 9, 2024
f6e325f
DM-159 Pileup counts windows, because this makes some basic checks/te…
May 12, 2024
59ac2db
DM-159 Rolling back pileup counts window for now, because it breaks t…
May 12, 2024
72100d1
Merge pull request #5 from streetslab/feature/DM-114-mod-names-C+h-vs…
OberonDixon May 12, 2024
7d23445
DM-155,DM-156 Added load_processed parameters single_strand for pulli…
May 13, 2024
9f25079
DM-161 Add improved strand handling to plotting functions.
May 13, 2024
7091eb9
DM-150 Removed warning from the ParsedMotif class for now; it is real…
May 13, 2024
aa45543
Merge pull request #6 from streetslab/feature/DM-114-mod-names-C+h-vs…
OberonDixon May 13, 2024
2e6e70d
DM-162,DM-163 Added mod codes and improved strand handling to the tut…
May 13, 2024
b3d011b
DM-160 Fixed bug in (-) strand case for region strings.
May 13, 2024
3f6e2dd
Merge pull request #7 from streetslab/feature/DM-154-Improved-region-…
OberonDixon May 13, 2024
684c0d9
DM-155,DM-156 Fixed a mistake regarding the bed format. Some of my te…
May 13, 2024
a29af54
DM-164 Now regions.processed.bed never specifies strand. Updated test…
May 14, 2024
75fe4de
browser notebook demo
thekugelmeister May 15, 2024
d73808c
some checkpoints
May 15, 2024
56941df
Responding to comment for https://github.com/streetslab/dimelo_v2/pull/8
May 15, 2024
1ee81c0
Merge pull request #8 from streetslab/feature/DM-114-mod-names-C+h-vs…
OberonDixon May 15, 2024
a9ec510
DM-152 Code review with @thekugelmeister. Updated docstrings and comm…
May 17, 2024
530bc4e
Attempt to future-proof matplotlib legend handling for plot_reads
May 17, 2024
2f8ec23
A few more tiny tweaks to plot_reads legend stuff
May 17, 2024
56591cd
Merge remote-tracking branch 'origin/main' into plot_browser_port
thekugelmeister May 17, 2024
3e0c260
Merge pull request #9 from streetslab/feature/DM-152-code-review
OberonDixon May 23, 2024
86d33d6
Merge remote-tracking branch 'origin/main' into plot_browser_port
thekugelmeister May 23, 2024
71b5185
browser method take 1
thekugelmeister May 23, 2024
11300f4
initial PR commit
thekugelmeister May 23, 2024
9c6db1c
Fixed downcasting warning
thekugelmeister May 30, 2024
1a26b15
row collapse
thekugelmeister May 31, 2024
3ba4171
Prototype read name on hover
thekugelmeister May 31, 2024
b64f4e7
Removing todo
thekugelmeister Jun 5, 2024
3201889
split top-level method into parts
thekugelmeister Jun 6, 2024
0e37d1b
Update README.md
OberonDixon Jun 8, 2024
274379c
Update README.md
OberonDixon Jun 8, 2024
4ee34fe
Update README.md
OberonDixon Jun 10, 2024
770fc0f
collapse option kwargs; improved hover text
thekugelmeister Jun 10, 2024
3d80282
hover option; sane minimum gap default
thekugelmeister Jun 10, 2024
05219ac
DM-31 Added plot_browser to the tutorial, along with single read extr…
Jun 10, 2024
fbb7fc5
Added example error message for plot_browser with binarized .h5 file
Jun 10, 2024
e98d961
Merge pull request #10 from streetslab/plot_browser_port
OberonDixon Jun 13, 2024
3a4df38
DM-188 Fixed Dorado and PacBio plot_read_browser index mapping error …
Jun 29, 2024
2271a17
DM-109 Return code and signal catching for modkit subprocess
Jun 29, 2024
494d01d
DM-165,DM-169,DM-193,DM-194 Substantial run_modkit structure changes …
Jun 29, 2024
b8e65c9
DM-194 Added reset for step 2 pbars once step 1 is complete, to get a…
Jun 29, 2024
120de45
DM-194 If statement consolidation
Jun 29, 2024
8e3788c
DM-195 Ignore reads without sequence when checking sequence. Gives re…
Jun 29, 2024
251be4f
DM-194 Move pbars into a separate function, improve comments
Jun 30, 2024
dce4d64
DM-190,DM-197 Clarifying message with return code -9 and quick check …
Jul 1, 2024
3ea302b
DM-189 Check read contents for booleanized mod data before processing…
Jul 1, 2024
0584e70
Added a comment describing empty query_sequence in some files.
Jul 11, 2024
551e406
Merge pull request #11 from streetslab/feature/DM-186,DM-187-modkit-m…
OberonDixon Jul 11, 2024
770275b
split enrichment plotting for prototyping
thekugelmeister Sep 15, 2024
a74e808
Clarifying documentation
thekugelmeister Sep 15, 2024
69e1c31
Revert to excluding ipynb files
thekugelmeister Sep 28, 2024
545b34d
updating ruff-pre-commit
thekugelmeister Sep 28, 2024
99773b5
fixing ipynb exclude
thekugelmeister Sep 28, 2024
1a03863
Merge pull request #13 from streetslab/DM-209-Split-plotting-methods-…
thekugelmeister Sep 29, 2024
ff1bdcf
DM-216 Added basic bigiwig export, and adjusted TODOs for load_proces…
Jan 5, 2025
cce26b0
DM-217 Added tests for export. Fixed some small problems in the expor…
Jan 5, 2025
de004ae
Removed checkpoint files
Jan 6, 2025
6c9f496
DM-218 Add test coverage for plot_read_browser, including some error …
Jan 6, 2025
23c90c4
DM-218 Added a new test case to cover plot_read_browser error throwin…
Jan 6, 2025
8430821
DM-226 Pileup counts window_size logic for loading and plotting.
Jan 6, 2025
bd6a5bf
DM-221 Adjust test targets pickle with new counts values given windowing
Jan 6, 2025
a704977
DM-220 Updates to test target generator structure and test README. Te…
Jan 7, 2025
bed5caa
Adjusted generate_targets to run from any directory by tweaking path …
Jan 7, 2025
c52acc5
DM-227 Bigwig export cell in Advanced Use Cases section of tutorial
Jan 7, 2025
6a2450b
ruff format adjustments
Jan 7, 2025
91dcba4
DM-93 Depth profile plots, including tutorial example to show that it…
Jan 7, 2025
97bab8a
DM-230 Test coverage for plot_depth_profile; same tests as plot_enric…
Jan 7, 2025
502be34
DM-222,DM-225 Added coverage histogram module with corresponding new …
Jan 7, 2025
7358ad4
DM-222,DM-225 Added progress bars for region-by-region loading. Added…
Jan 7, 2025
3d4e128
DM-222,DM-225 Parallelization for a very substantial speedup in load_…
Jan 7, 2025
42935f9
DM-225,DM-192 Stubs to support future parallelization of load_process…
Jan 7, 2025
1e39d74
DM-230 Adding tests for plot_depth_histogram and load_processed.regio…
Jan 7, 2025
3aced55
DM-93 Enable non-windowed profiles
Jan 8, 2025
b2b7689
DM-229 Consolidating parsing logic for load_processed functions. Stil…
Jan 8, 2025
3f3ec85
DM-231 Removed regions=None case for pileup_counts_from_bedmethyl bec…
Jan 8, 2025
91fb5e4
DM-229 Adjusted export.pileup_to_bigwig to use new load_processed.pro…
Jan 8, 2025
53d039b
DM-192 Implemented parallelization core including shared memory and c…
Jan 9, 2025
caf9dcd
DM-232 Added strand information to regions .bed files. Re-generated r…
Jan 9, 2025
64a9f65
DM-232 Added single_strand and regions_5to3prime to cases.py. Adjuste…
Jan 9, 2025
bb526bf
Merge pull request #16 from streetslab/feature/DM-191-refactor-load-p…
OberonDixon Jan 9, 2025
caa3e59
DM-192 Fixed logic to properly handle single_strand case within proce…
Jan 9, 2025
ac3657e
DM-192 Further refactor to simplify process_pileup_row and keep regio…
Jan 9, 2025
a9648df
DM-192 Added chunk_size for load_processes parallelization to cases.p…
Jan 9, 2025
c830abf
Merge pull request #17 from streetslab/feature/DM-191-refactor-load-p…
OberonDixon Jan 9, 2025
7301d3d
DM-192,DM-236,DM-233,DM-235 Parallelized pileup_counts_from_bedmethyl…
Jan 9, 2025
56e6333
DM-192,DM-236 Properly close and delink shared memory when appropriat…
Jan 10, 2025
97efec1
DM-191 Re-arrange contents of load_processed for better clarity. Adde…
Jan 10, 2025
a8ed1ae
DM-238 Add quiet and cores parameters and corresponding documentation…
Jan 17, 2025
f1b0758
DM-239 Added test case coverage for 1-4 cores. GitHub jobs for Ubuntu…
Jan 17, 2025
0b68892
DM-239 Added cases.py support for cores=None. Tweaked dimelo_test.py …
Jan 17, 2025
1da3d3c
DM-239 Adjusted generate_targets module to properly handle cores argu…
Jan 18, 2025
fcf116f
Ruff format fixes
Jan 18, 2025
5c3a3a3
Added ref_genome fasta option for export contig definition. Passes te…
Jan 24, 2025
bc41313
Adjusted Path conversion for filepaths and added some comments.
Jan 24, 2025
cdf9a56
Fixed typo
Jan 24, 2025
864d61d
Improved docstrings and streamlined code for regions_to_list
Jan 25, 2025
802f160
Documented more stuff for depth histograms.
Jan 25, 2025
40c7d28
Added some words
Jan 25, 2025
9126acc
A bunch of little documentation fixes for test infra
Jan 25, 2025
a6a36f9
Further depth tweaks per PR comments
Jan 25, 2025
5dad63b
Merge pull request #18 from streetslab/feature/DM-191-refactor-load-p…
OberonDixon Jan 27, 2025
c19c5ea
Update utils.py
thekugelmeister Jan 27, 2025
1c2a85b
Move path arg sanitation to utils
thekugelmeister Jan 29, 2025
da30804
Refactored path sanitization
thekugelmeister Jan 29, 2025
e441564
Fixed plotly error preventing testing
thekugelmeister Jan 29, 2025
821a2c2
Merge pull request #15 from streetslab/feature/DM-90-read-depth-qc
thekugelmeister Jan 29, 2025
f0f027b
Merge branch 'main' into feature/DM-191-refactor-load-processed
OberonDixon Feb 21, 2025
bd94e78
Fixed small mistakes from merge
Feb 21, 2025
5184bdf
All randomness references the same random generator
thekugelmeister Feb 26, 2025
428c8a5
Initial implementation of read vector subsampling
thekugelmeister Feb 26, 2025
0958c9f
Clarifying documentation
thekugelmeister Feb 27, 2025
bdd00ad
Removing debug code
thekugelmeister Feb 27, 2025
b4e3074
Added subsetting tutorial
thekugelmeister Feb 27, 2025
56516f0
Adding subsetting to binary modification arrays
thekugelmeister Feb 27, 2025
6be060d
Merge pull request #23 from streetslab/DM-38-Subset-reads-for-single-…
OberonDixon Mar 12, 2025
0a9feb0
Merge branch 'main' into feature/DM-191-refactor-load-processed
OberonDixon Mar 13, 2025
4454f67
Added check for chrom in tabixfile.
Mar 18, 2025
bfdbff6
DM-191 Adjustments in response to PR comments from thekugelmeister
Mar 23, 2025
d3cc71c
Merge branch 'feature/DM-191-refactor-load-processed' of https://gith…
Mar 23, 2025
7f50782
Adjust naming for regions_to_list region-splitting parallelization pa…
May 30, 2025
3ce0e8f
attempting to fix ruff versioning
thekugelmeister May 31, 2025
2972c34
ruff version fix attempt 2
thekugelmeister May 31, 2025
ffce0f6
Merge pull request #21 from streetslab/feature/DM-191-refactor-load-p…
thekugelmeister May 31, 2025
430fcfc
Merge branch 'main' into main
OberonDixon Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions .flake8

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: dimelo-formatting
on: [ pull_request ]
jobs:
ruff-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: 0.6.8
# TODO: Is it really necessary for these to be separate jobs? This seems redundant.
ruff-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: 0.6.8
args: 'format --check'
91 changes: 34 additions & 57 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,42 @@
name: dimelo
name: dimelo-test

on: [push]
on:
workflow_dispatch: # Allows manual trigger of the workflow
pull_request: # Trigger by default on PR opened, reopened, or synchronized (commits pushed to PR)

jobs:
build-conda:
runs-on: ubuntu-latest
platform_matrix: # Run the tests on each supported platform
strategy:
matrix:
python-version: ["3.7"]

platform: # Define the platform tag and the file name of the appropriate miniconda install script
- os: ubuntu-latest
miniconda: Miniconda3-latest-Linux-x86_64.sh
- os: macos-latest
miniconda: Miniconda3-latest-MacOSX-x86_64.sh
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# TODO: If we change the name of the dimelo subdirectory, conda install as written here should break.
# Installing format dependencies with pip for full compatibility
- name: Install dependencies
run: |
$CONDA/bin/conda env update --file environment_linux.yml --name base
pip install flake8 black isort
$CONDA/bin/conda install pytest
- name: Lint with flake8
run: |
flake8
- name: Check format with black
run: |
black --config pyproject.toml --diff --check .
- name: Clean up and sort imports
run: |
isort --check-only .
- name: Test with pytest
run: |
$CONDA/bin/pytest

build-pip:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort pytest
- uses: actions/checkout@v4
- name: Setup conda and run pytest
run: |
# Install Miniconda if not available on the runner
wget https://repo.anaconda.com/miniconda/${{ matrix.platform.miniconda }} -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh

# Create conda environment from environment.yml
conda env create -f environment.yml

# Activate the environment
conda activate $(head -n 1 environment.yml | cut -d' ' -f2)

# Install pip dependencies and the package itself
pip install .
- name: Lint with flake8
run: |
flake8
- name: Check format with black
run: |
black --diff --check .
- name: Clean up and sort imports
run: |
isort --check-only .
- name: Test with pytest
run: |

# Additional testing dependencies not covered in environment.yml
conda install pytest

# Make sure everything is installed correctly
conda list

# Run pytest
pytest
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,12 @@ coverage.xml
.pytest_cache/

# Sphinx documentation
docs/_build/
docs/_build/


# Ignore tutorial output files
dimelo/test/output

# Checkpoint files
.ipynb_checkpoints/

29 changes: 15 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.9.3
hooks:
- id: isort
name: isort (python)
additional_dependencies: [toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.9.0
# hooks:
# - id: mypy
# These are things I'm considering including in the ignore list, but should think about...
# Ignore missing import errors caused by pre-commit being run in an isolated environment
# Allow conflicting assignment to existing variables in reasonable circumstances; mainly for coersion of path strings
# args: [--ignore-missing-imports, --allow-redefinition]
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

57 changes: 0 additions & 57 deletions Makefile

This file was deleted.

Loading