From 5c8daefc18ecf25e3e742797817bcf12991a3ae8 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Mon, 5 Feb 2024 19:30:10 +0100 Subject: [PATCH 01/11] Adding scikit-image dependency to setup file --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 00823b5..c0509b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,7 @@ all = numpy scipy astropy + scikit-image test = pytest pytest-doctestplus From 584057c562252d0aa26f11b437a68507f45007d0 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Mon, 5 Feb 2024 20:17:51 +0100 Subject: [PATCH 02/11] scikit-image dependancy --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c0509b9..39ced03 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = pipe +name = pipe-cheops author = Alexis Brandeker author_email = alexis@astro.su.se license = GNU GPL v3+ From 8098ac88b461ad8ec27e1d5af1f3195d0b9748c8 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Mon, 5 Feb 2024 22:14:59 +0100 Subject: [PATCH 03/11] changing name --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 39ced03..a3afc6a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = pipe-cheops +name = pipe_cheops author = Alexis Brandeker author_email = alexis@astro.su.se license = GNU GPL v3+ From 931dfe8700423d05d715ac78cbf09438c4aaab29 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Mon, 5 Feb 2024 22:18:04 +0100 Subject: [PATCH 04/11] up --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a3afc6a..39ced03 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = pipe_cheops +name = pipe-cheops author = Alexis Brandeker author_email = alexis@astro.su.se license = GNU GPL v3+ From 7ee890801f63ded748d0652496a162b2b12a548e Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 12:45:12 +0100 Subject: [PATCH 05/11] adding installation requirements --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 39ced03..9dba9f8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,10 @@ packages = find: python_requires = >=3.5 setup_requires = setuptools_scm install_requires = + numpy + scipy + astropy + scikit-image [options.extras_require] all = From f0ac5666e2ad71899997ab3f9fec660fab6e29dd Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 12:53:34 +0100 Subject: [PATCH 06/11] creating a proper json file for Windows system --- pipe/config/pipeconf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipe/config/pipeconf.py b/pipe/config/pipeconf.py index 76d78dd..66bb8aa 100644 --- a/pipe/config/pipeconf.py +++ b/pipe/config/pipeconf.py @@ -1,6 +1,7 @@ import json import os import astropy.config as astropyconfig +import platform def cache_dir(): return astropyconfig.get_cache_dir() @@ -15,9 +16,12 @@ def get_conf_paths(overwrite=False): data_path = input('Please enter a path to the data files\nThe default path is ~/cheops-pipe/Data (press ENTER to use this): ') ref_path = input('Please enter a path to the calibration files\nThe default path is ~/cheops-pipe/Ref (press ENTER to use this): ') if data_path == '': - data_path = os.path.expanduser('~') + '/cheops-pipe/Data' + data_path = os.path.join(os.path.expanduser('~'), '/cheops-pipe/Data') if ref_path == '': - ref_path = os.path.expanduser('~') + '/cheops-pipe/Ref' + ref_path = os.path.join(os.path.expanduser('~'), '/cheops-pipe/Ref') + if platform.platform().split('-')[0] == 'Windows': + data_path = data_path.replace('/','\\') + ref_path = ref_path.replace('/', '\\') fconf = open(os.path.dirname(__file__) + '/conf.json', 'w') fconf.write('{\n') fconf.write('\t"data_root" : "' + data_path + '",\n') From fa0ba7e40f6b66fa9232fd832ee8b784fe22e8c9 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 13:59:33 +0100 Subject: [PATCH 07/11] system independent way of writing json files --- pipe/config/pipeconf.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pipe/config/pipeconf.py b/pipe/config/pipeconf.py index 66bb8aa..c738b12 100644 --- a/pipe/config/pipeconf.py +++ b/pipe/config/pipeconf.py @@ -1,7 +1,6 @@ import json import os -import astropy.config as astropyconfig -import platform +import astropy.config as astropyconfig def cache_dir(): return astropyconfig.get_cache_dir() @@ -16,18 +15,13 @@ def get_conf_paths(overwrite=False): data_path = input('Please enter a path to the data files\nThe default path is ~/cheops-pipe/Data (press ENTER to use this): ') ref_path = input('Please enter a path to the calibration files\nThe default path is ~/cheops-pipe/Ref (press ENTER to use this): ') if data_path == '': - data_path = os.path.join(os.path.expanduser('~'), '/cheops-pipe/Data') + data_path = os.path.join(os.path.expanduser('~'), 'cheops-pipe', 'Data') if ref_path == '': - ref_path = os.path.join(os.path.expanduser('~'), '/cheops-pipe/Ref') - if platform.platform().split('-')[0] == 'Windows': - data_path = data_path.replace('/','\\') - ref_path = ref_path.replace('/', '\\') - fconf = open(os.path.dirname(__file__) + '/conf.json', 'w') - fconf.write('{\n') - fconf.write('\t"data_root" : "' + data_path + '",\n') - fconf.write('\t"ref_lib_data" : "' + ref_path + '"\n') - fconf.write('}') - fconf.close() + ref_path = os.path.join(os.path.expanduser('~'), 'cheops-pipe', 'Ref') + all_paths = {} + all_paths['data_root'], all_paths['ref_lib_data'] = data_path, ref_path + with open(os.path.dirname(__file__) + '/conf.json', 'w') as fconf: + json.dump(all_paths, fconf) # And loading it conf_path = os.path.join(os.path.dirname(__file__), 'conf.json') From 7422eb8e5464487128ca7e708ca17e630f7e396c Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 16:05:57 +0100 Subject: [PATCH 08/11] changing astropy dependency --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 9dba9f8..1ba4f60 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ install_requires = all = numpy scipy - astropy + astropy>=5.2 scikit-image test = pytest From e0ded0cc4619ef6042aef4814469252b1a9af6fc Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 16:06:03 +0100 Subject: [PATCH 09/11] wording --- pipe/config/pipeconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipe/config/pipeconf.py b/pipe/config/pipeconf.py index c738b12..75f26c9 100644 --- a/pipe/config/pipeconf.py +++ b/pipe/config/pipeconf.py @@ -12,8 +12,8 @@ def get_conf_paths(overwrite=False): if (not os.path.isfile(conf_path))|(overwrite): # First creating a file - data_path = input('Please enter a path to the data files\nThe default path is ~/cheops-pipe/Data (press ENTER to use this): ') - ref_path = input('Please enter a path to the calibration files\nThe default path is ~/cheops-pipe/Ref (press ENTER to use this): ') + data_path = input('Please enter a path to the data files\nPress ENTER to use the default path (' + os.path.join(os.path.expanduser('~'), 'cheops-pipe','Data') + '): ') + ref_path = input('Please enter a path to the calibration files\nPress ENTER to use the default path (' + os.path.join(os.path.expanduser('~'), 'cheops-pipe','Ref') + '): ') if data_path == '': data_path = os.path.join(os.path.expanduser('~'), 'cheops-pipe', 'Data') if ref_path == '': From b9796116c9919cf20f2a717baab71d0e386e2a0d Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 16:11:03 +0100 Subject: [PATCH 10/11] Added changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4e8046c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2024-02-06 + +### Added + +- Initial release +- CHANGELOG.md created \ No newline at end of file From fb4bb17705818f796f800c8e640bd0a02138c383 Mon Sep 17 00:00:00 2001 From: Jayshil Date: Tue, 6 Feb 2024 16:21:28 +0100 Subject: [PATCH 11/11] astropy dependency update --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1ba4f60..901e63d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ setup_requires = setuptools_scm install_requires = numpy scipy - astropy + astropy>=5.2 scikit-image [options.extras_require]