Skip to content

Commit

Permalink
CLN: Run black and isort on codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
JB Lovland authored and janbjorge committed Nov 13, 2023
1 parent 077ec8a commit ab71f89
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bin/xtgls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""xtgls: a small script for listing xtg formatted files."""
import pathlib
import json
import argparse
import json
import pathlib

# import yaml
from collections import OrderedDict
Expand Down
3 changes: 2 additions & 1 deletion examples/grid3d_compute_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"""

from os.path import join as ojn

import numpy.ma as npma

import xtgeo

# from memory_profiler import profile
Expand Down Expand Up @@ -105,7 +107,6 @@ def sum_running_stats():


if __name__ == "__main__":

AVG1 = sum_stats()
AVG2 = sum_running_stats()

Expand Down
3 changes: 1 addition & 2 deletions examples/grid3d_crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Crop a 3D grid.
"""

import tempfile
import pathlib
import tempfile

import xtgeo

Expand Down Expand Up @@ -43,7 +43,6 @@ def cropper():
for ncr in ncolranges:
nc1, nc2 = ncr
for nrr in nrowranges:

nr1, nr2 = nrr

fname = "_{}-{}_{}-{}".format(nc1, nc2, nr1, nr2)
Expand Down
3 changes: 2 additions & 1 deletion examples/grid3d_print_init_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import pathlib
import tempfile

import numpy as np

import xtgeo

EXPATH = pathlib.Path("../../xtgeo-testdata/3dgrids/reek")
Expand Down Expand Up @@ -32,5 +34,4 @@ def all_init_as_csv():


if __name__ == "__main__":

all_init_as_csv()
2 changes: 1 addition & 1 deletion examples/grid3d_prop_as_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
By JRIV
"""
import os

import xtgeo

GNAMEROOT = "../../xtgeo-testdata/3dgrids/reek/REEK"
Expand Down Expand Up @@ -43,5 +44,4 @@ def make_map():


if __name__ == "__main__":

make_map()
2 changes: 1 addition & 1 deletion examples/grid3d_properties_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Compute statistics within one realisation, using ROFF or RMS internal."""

from os.path import join as ojn

import xtgeo

EXPATH1 = "../../xtgeo-testdata/3dgrids/reek2"
Expand Down Expand Up @@ -91,6 +92,5 @@ def show_stats_inside_rms():


if __name__ == "__main__":

show_stats()
# show_stats_inside_rms()
5 changes: 1 addition & 4 deletions examples/multiprocess_surfs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import io
import concurrent.futures
import io
import logging

import xtgeo
Expand All @@ -16,7 +16,6 @@ def _get_files_as_regularsurfaces_thread(option=1):
surfs = []

with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREAD) as executor:

if option == 1:
futures = {executor.submit(_get_regsurff, i): i for i in range(NTHREAD)}
else:
Expand All @@ -38,7 +37,6 @@ def _get_files_as_regularsurfaces_multiprocess(option=1):
surfs = []

with concurrent.futures.ProcessPoolExecutor(max_workers=NTHREAD) as executor:

if option == 1:
futures = {executor.submit(_get_regsurff, i): i for i in range(NTHREAD)}
else:
Expand Down Expand Up @@ -82,7 +80,6 @@ def _get_regsurfi(i):


if __name__ == "__main__":

SURFS1 = _get_files_as_regularsurfaces_thread(option=1)
for srf in SURFS1.surfaces:
logger.info("1 %s", srf.values.mean())
Expand Down
3 changes: 2 additions & 1 deletion examples/regsurf_compute_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

import io
from os.path import join as ojn

import numpy.ma as npma

import xtgeo

# from memory_profiler import profile
Expand Down Expand Up @@ -83,7 +85,6 @@ def sum_running_stats_bytestream():


if __name__ == "__main__":

AVG1 = sum_running_stats()

print(AVG1)
Expand Down
1 change: 1 addition & 0 deletions examples/surf_threading.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
import threading

import xtgeo


Expand Down
1 change: 0 additions & 1 deletion examples/surface_slice_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def attribute_around_constant_cube_slices():


if __name__ == "__main__":

slice_a_cube_with_surface()
attribute_around_surface_symmetric()
attribute_around_surface_asymmetric()
Expand Down
1 change: 0 additions & 1 deletion examples/surface_slice_grid3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def slice_a_grid():
slices = [1700, 1720, 1740]

for myslice in slices:

print("Slice is {}".format(myslice))

for prp in grd.props:
Expand Down
2 changes: 2 additions & 0 deletions examples/wellpath_fence_sample.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
from pathlib import Path

import matplotlib.pyplot as plt

import xtgeo

TPATH = Path("../xtgeo-testdata")
Expand Down

0 comments on commit ab71f89

Please sign in to comment.