Skip to content

Commit

Permalink
Rename utils to process
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Aug 4, 2023
1 parent 43fbd96 commit adb08e3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
38 changes: 19 additions & 19 deletions docs/examples/ts2img.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 9,
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/wpreimes/shares/home/code/repurpose/src/repurpose/utils.py:6: UserWarning: Numpy is already imported. Environment variables set in repurpose.utils wont have any effect!\n",
"/home/wpreimes/shares/home/code/repurpose/src/repurpose/process.py:6: UserWarning: Numpy is already imported. Environment variables set in repurpose.utils wont have any effect!\n",
" warnings.warn(\"Numpy is already imported. Environment variables set in \"\n"
]
},
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x7f0ee33e7c10>"
"text/plain": "<matplotlib.legend.Legend at 0x7f0ed5420250>"
},
"execution_count": 1,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -61,7 +61,7 @@
"import matplotlib.pyplot as plt\n",
"from matplotlib.lines import Line2D\n",
"import numpy as np\n",
"from repurpose.utils import rootdir\n",
"from repurpose.process import rootdir\n",
"\n",
"source_grid = load_grid(os.path.join(rootdir(), \"docs\", \"examples\", \"assets\", \"warp_subgrid_AUT.nc\"))\n",
"y = np.arange(46.3, 49.2, 0.1)\n",
Expand Down Expand Up @@ -101,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 10,
"id": "406f83ff-7725-4710-8048-1a2311b23963",
"metadata": {
"tags": []
Expand Down Expand Up @@ -139,13 +139,13 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 11,
"outputs": [
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x7f0ee3176110>"
"text/plain": "<matplotlib.legend.Legend at 0x7f0ed559f580>"
},
"execution_count": 3,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -198,7 +198,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 12,
"outputs": [],
"source": [
"from repurpose.ts2img import Ts2Img\n",
Expand Down Expand Up @@ -240,21 +240,21 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 13,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Images are stored in /tmp/tmps22ozjzr\n"
"Images are stored in /tmp/tmp72x9hsa2\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Processed: 100%|██████████| 3/3 [00:06<00:00, 2.04s/it]\n",
"Processed: 100%|██████████| 14/14 [00:00<00:00, 112.06it/s]\n"
"Processed: 100%|██████████| 3/3 [00:10<00:00, 3.52s/it]\n",
"Processed: 100%|██████████| 14/14 [00:00<00:00, 109.31it/s]\n"
]
}
],
Expand Down Expand Up @@ -291,13 +291,13 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 14,
"outputs": [
{
"data": {
"text/plain": "<matplotlib.collections.QuadMesh at 0x7f0ed5683f70>"
"text/plain": "<matplotlib.collections.QuadMesh at 0x7f0ed5772c80>"
},
"execution_count": 6,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -355,7 +355,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 15,
"outputs": [
{
"name": "stdout",
Expand All @@ -382,7 +382,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 16,
"outputs": [
{
"name": "stdout",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/repurpose/ts2img.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from repurpose.utils import parallel_process_async, idx_chunks
from repurpose.process import parallel_process_async, idx_chunks
import logging
import numpy as np
import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion tests/test_docs/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from nbconvert.preprocessors import ExecutePreprocessor
import nbformat
import pytest
from repurpose.utils import rootdir
from repurpose.process import rootdir


examples_path = os.path.join(rootdir(), 'docs', 'examples')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py → tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import tempfile
import logging

from repurpose.utils import parallel_process_async, idx_chunks
from repurpose.process import parallel_process_async, idx_chunks

def test_index_chunks():
timestamps = pd.date_range('2020-07-01', '2020-07-09', freq='1D')
Expand Down

0 comments on commit adb08e3

Please sign in to comment.