diff --git a/.github/workflows/merge_PR.yml b/.github/workflows/merge_PR.yml index 9c3f360..9b660e4 100644 --- a/.github/workflows/merge_PR.yml +++ b/.github/workflows/merge_PR.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.12' - - name: Install dependencies + python-version: '3.13' + - name: Perform PR auto-action run: | - python -c "import eos; print(eos.__version__)" + python PR_merged.py diff --git a/PR_merged.py b/PR_merged.py new file mode 100644 index 0000000..3fb751d --- /dev/null +++ b/PR_merged.py @@ -0,0 +1,30 @@ +""" +Actions performed automatically on pull request merged. Update changed date and minor revision number. +""" + +import os +from eos import __version__ +from datetime import datetime + +INIT_HEADER = '''""" +Package to handle data redction at AMOR instrument to be used by __main__.py script. +""" + +''' + +def main(): + print("Running PR_merged.py") + print(f" Previous version: {__version__}") + version = __version__.split('.') + version[2] = str(int(version[2])+1) + version = '.'.join(version) + print(f" New version: {version}") + now=datetime.now() + with open(os.path.join('eos','__init__.py'), 'w') as f: + f.write(INIT_HEADER) + f.write(f"__version__ = '{version}'\n") + f.write(f"__date__ = '{now.strftime('%Y-%m-%d')}'\n") + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/eos/__init__.py b/eos/__init__.py index 6cd02b8..4eb6399 100644 --- a/eos/__init__.py +++ b/eos/__init__.py @@ -1,6 +1,6 @@ -""" -Package to handle data redction at AMOR instrument to be used by __main__.py script. -""" - -__version__ = '3.2.4' -__date__ = '2026-02-27' +""" +Package to handle data redction at AMOR instrument to be used by __main__.py script. +""" + +__version__ = '3.2.3' +__date__ = '2026-03-02'