Skip to content
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 7 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/check_formatting.yml
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

22 changes: 12 additions & 10 deletions setup.py
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='max.heikenfeld@physics.ox.ac.uk',
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="max.heikenfeld@physics.ox.ac.uk",
license="GNU",
packages=["tobac"],
install_requires=[],
zip_safe=False,
)
68 changes: 54 additions & 14 deletions tobac/__init__.py
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

Loading