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 diff --git a/pipe/config/pipeconf.py b/pipe/config/pipeconf.py index 76d78dd..75f26c9 100644 --- a/pipe/config/pipeconf.py +++ b/pipe/config/pipeconf.py @@ -1,6 +1,6 @@ import json import os -import astropy.config as astropyconfig +import astropy.config as astropyconfig def cache_dir(): return astropyconfig.get_cache_dir() @@ -12,18 +12,16 @@ 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.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' - 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') diff --git a/setup.cfg b/setup.cfg index 00823b5..901e63d 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+ @@ -14,12 +14,17 @@ packages = find: python_requires = >=3.5 setup_requires = setuptools_scm install_requires = + numpy + scipy + astropy>=5.2 + scikit-image [options.extras_require] all = numpy scipy - astropy + astropy>=5.2 + scikit-image test = pytest pytest-doctestplus