Skip to content

Commit

Permalink
version management
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Apr 22, 2024
1 parent ef0fa25 commit 4e36c23
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
8 changes: 4 additions & 4 deletions corkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from corkit._version import __version__
from ._version import __version__

__author__ = "Jorgedavyd"
__email__ = "jorged.encyso@gmail.com"

from corkit.lasco import *
from corkit.reconstruction import *
from .lasco import *
from .reconstruction import *

# from corkit.secchi import *
from corkit.dataset import *
from .dataset import *
10 changes: 3 additions & 7 deletions corkit/dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from corkit.utils import DEFAULT_SAVE_DIR, datetime_interval
from .utils import DEFAULT_SAVE_DIR, datetime_interval
from dateutil.relativedelta import relativedelta
from datetime import datetime, timedelta
from collections import defaultdict
Expand All @@ -13,7 +13,7 @@
import os
from dataclasses import dataclass

from corkit import __version__
from . import __version__

__all__ = ["update", "CorKitDatasets"]

Expand Down Expand Up @@ -251,7 +251,7 @@ async def medv_update():
from torchvision.transforms import Compose, Resize, ToTensor, Lambda
from astropy.visualization import ImageNormalize, HistEqStretch
from torch import Tensor
from corkit.lasco import CME
from .lasco import CME
from astropy.io import fits


Expand Down Expand Up @@ -319,7 +319,3 @@ def __getitem__(self, idx) -> Tensor:
out = self._forward(idx)
out = self.transforms(out)
return out


if __name__ == "__main__":
asyncio.run(update())
4 changes: 2 additions & 2 deletions corkit/lasco.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Utils dependencies"""

from corkit.utils import (
from .utils import (
FITS,
fixwrap,
c2_warp,
Expand Down Expand Up @@ -45,7 +45,7 @@
import glob
import os

from corkit import __version__
from . import __version__

__all__ = ["level_1", "CME", "LASCOplot", "downloader", "c3_calibrate", "c2_calibrate"]

Expand Down
5 changes: 2 additions & 3 deletions corkit/reconstruction.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from skimage.restoration import inpaint
from scipy.fft import fft, ifft
import numpy as np
from torch import nn
from corkit.utils import deprecation
from .utils import deprecation

from corkit import __version__
from . import __version__


def image_reconstruction(img: np.array):
Expand Down
4 changes: 2 additions & 2 deletions corkit/secchi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""COR 2 & COR 1"""

import numpy as np
from corkit.utils import FITS
from .utils import FITS

from corkit import __version__
from . import __version__

# class downloader():

Expand Down
2 changes: 1 addition & 1 deletion corkit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import glob
import os

from corkit import __version__
from . import __version__

radeg = 180 / np.pi

Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from setuptools import setup, find_packages
from setuptools.command.install import install
import subprocess
import sys
import os

from corkit import __version__
from corkit.dataset import update

from pathlib import Path
import asyncio

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
Expand All @@ -14,7 +15,7 @@
class InstallDataset(install):
def run(self):
install.run(self)
subprocess.check_call([sys.executable, "corkit/dataset.py"])
asyncio.run(update())


def find_calibration_files():
Expand Down Expand Up @@ -51,6 +52,8 @@ def find_calibration_files():
"matplotlib",
"pillow",
"pandas",
"torch",
"torchvision",
],
cmdclass={"install": InstallDataset},
classifiers=[
Expand Down

0 comments on commit 4e36c23

Please sign in to comment.