-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Black formatting of existing code and inclusion of formatting check in workflow #78
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
64f967c
Merge pull request #71 from climate-processes/dev
fsenf 77693f9
added yml file for formatting check in workflow
4317920
reformatted all existing files using black
743891a
add formatting check on pushs
5cf1c8f
corrected yml file; all files in tobac/ are now checked for black for…
b064d7a
undo formatting of non-python files
4b94317
Merge branch 'dev'
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: check_formatting | ||
on: [push, pull_request] | ||
jobs: | ||
formatting_job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- run: pip install . | ||
- run: pip install black | ||
- run: black tobac --check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Python dependencies | ||
numpy | ||
scipy | ||
scikit-image | ||
scikit - image | ||
pandas | ||
pytables | ||
matplotlib | ||
matplotlib | ||
iris | ||
cf-units | ||
xarray | ||
cf - units | ||
xarray | ||
cartopy | ||
trackpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from setuptools import setup | ||
|
||
setup(name='tobac', | ||
version='1.2', | ||
description='Tracking and object-based analysis of clouds', | ||
url='http://github.com/climate-processes/tobac', | ||
author='Max Heikenfeld', | ||
author_email='[email protected]', | ||
license='GNU', | ||
packages=['tobac'], | ||
install_requires=[], | ||
zip_safe=False) | ||
setup( | ||
name="tobac", | ||
version="1.2", | ||
description="Tracking and object-based analysis of clouds", | ||
url="http://github.com/climate-processes/tobac", | ||
author="Max Heikenfeld", | ||
author_email="[email protected]", | ||
license="GNU", | ||
packages=["tobac"], | ||
install_requires=[], | ||
zip_safe=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,63 @@ | ||
#from .tracking import maketrack | ||
from .segmentation import segmentation_3D, segmentation_2D,watershedding_3D,watershedding_2D | ||
from .centerofgravity import calculate_cog,calculate_cog_untracked,calculate_cog_domain | ||
from .plotting import plot_tracks_mask_field,plot_tracks_mask_field_loop,plot_mask_cell_track_follow,plot_mask_cell_track_static,plot_mask_cell_track_static_timeseries | ||
from .plotting import plot_lifetime_histogram,plot_lifetime_histogram_bar,plot_histogram_cellwise,plot_histogram_featurewise | ||
from .plotting import plot_mask_cell_track_3Dstatic,plot_mask_cell_track_2D3Dstatic | ||
from .plotting import plot_mask_cell_individual_static,plot_mask_cell_individual_3Dstatic | ||
# from .tracking import maketrack | ||
from .segmentation import ( | ||
segmentation_3D, | ||
segmentation_2D, | ||
watershedding_3D, | ||
watershedding_2D, | ||
) | ||
from .centerofgravity import ( | ||
calculate_cog, | ||
calculate_cog_untracked, | ||
calculate_cog_domain, | ||
) | ||
from .plotting import ( | ||
plot_tracks_mask_field, | ||
plot_tracks_mask_field_loop, | ||
plot_mask_cell_track_follow, | ||
plot_mask_cell_track_static, | ||
plot_mask_cell_track_static_timeseries, | ||
) | ||
from .plotting import ( | ||
plot_lifetime_histogram, | ||
plot_lifetime_histogram_bar, | ||
plot_histogram_cellwise, | ||
plot_histogram_featurewise, | ||
) | ||
from .plotting import plot_mask_cell_track_3Dstatic, plot_mask_cell_track_2D3Dstatic | ||
from .plotting import ( | ||
plot_mask_cell_individual_static, | ||
plot_mask_cell_individual_3Dstatic, | ||
) | ||
from .plotting import animation_mask_field | ||
from .plotting import make_map, map_tracks | ||
from .analysis import cell_statistics,cog_cell,lifetime_histogram,histogram_featurewise,histogram_cellwise | ||
from .analysis import calculate_velocity,calculate_distance,calculate_area | ||
from .analysis import ( | ||
cell_statistics, | ||
cog_cell, | ||
lifetime_histogram, | ||
histogram_featurewise, | ||
histogram_cellwise, | ||
) | ||
from .analysis import calculate_velocity, calculate_distance, calculate_area | ||
from .analysis import calculate_nearestneighbordistance | ||
from .analysis import velocity_histogram,nearestneighbordistance_histogram,area_histogram | ||
from .analysis import ( | ||
velocity_histogram, | ||
nearestneighbordistance_histogram, | ||
area_histogram, | ||
) | ||
from .analysis import calculate_overlap | ||
from .utils import mask_cell,mask_cell_surface,mask_cube_cell,mask_cube_untracked,mask_cube,column_mask_from2D,get_bounding_box | ||
from .utils import mask_features,mask_features_surface,mask_cube_features | ||
from .utils import ( | ||
mask_cell, | ||
mask_cell_surface, | ||
mask_cube_cell, | ||
mask_cube_untracked, | ||
mask_cube, | ||
column_mask_from2D, | ||
get_bounding_box, | ||
) | ||
from .utils import mask_features, mask_features_surface, mask_cube_features | ||
|
||
from .utils import add_coordinates,get_spacings | ||
from .utils import add_coordinates, get_spacings | ||
from .feature_detection import feature_detection_multithreshold | ||
from .tracking import linking_trackpy | ||
from .wrapper import maketrack | ||
from .wrapper import tracking_wrapper | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the autoformatting making these changes? Might have to restrict it from these files (i.e. non-python files) as I think this would break them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I fixed this!