Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
EhsanGharibNezhad committed Nov 28, 2023
1 parent 99e3197 commit 037d4b3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
15 changes: 11 additions & 4 deletions TelescopeML/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@

from os.path import dirname, basename, isfile, join
import glob
from .__version__ import __version__

modules = glob.glob(join(dirname(__file__), "*.py"))

__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]


# Read the __version__.py file
with open('__version__.txt', 'r') as f:
ver = f.read()
# with open('__version__.txt', 'r') as f:
# ver = f.read()
# ver = ('__version__.txt', 'r').read_text()
#
# __version__ = '0.0.3'

__version__ = '0.0.3'
print(__version__)
# with open("__version__.txt", 'r') as fh:
# ver = fh.read().strip()
#
# __version__ = '0.0.3'
print(__version__)
4 changes: 3 additions & 1 deletion TelescopeML/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
0.0.2
# %% VERSIONS
# Default/Latest/Current version
__version__ = '0.0.3'
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = TelescopeML
version = 0.0.2
version = 0.0.3
summary = Deep Convolutional Neural Networks and Machine Learning Models for Analyzing Stellar and Exoplanetary Telescope Spectra
description_file = README.md
keywords = Astronomy, Stars, Telescope, CNN, Deep Learning, Machine Learning
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

from setuptools import setup, find_packages
import re

# read the contents of your README file
from pathlib import Path
Expand All @@ -10,13 +11,19 @@
with open("requirements.txt", 'r') as fh:
requirements = fh.read().splitlines()

print(requirements)

# Read the __version__.py file
with open('TelescopeML/__version__.txt', 'r') as f:
ver = f.read()
with open('TelescopeML/__version__.py', 'r') as f:
vf = f.read()

# Obtain version from read-in __version__.py file
version = re.search(r"^_*version_* = ['\"]([^'\"]*)['\"]", vf, re.M).group(1)


setup(
name='TelescopeML',
version = ver, # MAJOR.MINOR.PATCH
version = version, # MAJOR.MINOR.PATCH
description = 'An End-to-End Python Package for Interpreting Telescope Datasets through Training Machine Learning Models, Generating Statistical Reports, and Visualizing Results',
long_description = long_description,
long_description_content_type='text/markdown',
Expand Down
1 change: 0 additions & 1 deletion version.txt

This file was deleted.

0 comments on commit 037d4b3

Please sign in to comment.