JYU-IBA / potku

Potku is analysis and simulation software for ToF-ERD measurements
https://www.jyu.fi/science/en/physics/research/infrastructures/accelerator-laboratory/pelletron/potku/
GNU General Public License v2.0
7 stars 7 forks source link

Version bump script + automatic packaging of Potku #292

Closed samivout closed 1 year ago

samivout commented 1 year ago

Additions

New scripts and features that together enable quick release of a new Potku version on GitHub. From running bump_version.py on a terminal to having a new release on GitHub takes somewhere between 5 to 10 minutes depending on whether C apps need to be recompiled or not.

bump_version.py

A Python script that can be run on a terminal to bump Potku's version. Requires Git and GitHub CLI to be installed and configured. Basically creates a branch for a version bump and creates a pull request for said branch.

external_file_manager.py and external_manifest.txt

external_manifest.txt acts as a list of external files that the external_file_manager.py script uses to manage the files and is the only thing committed to the repository in terms of external data. The text file contains their relative paths to Potku's root, the files' SHA256 hashes, date of said hash and a file ID portion of the link to Drop Box. The script has various simple commands to edit the manifest file. Only manual element in this is that if a link of a file changes or a new file is added, the new links must be edited in manually. These should change rarely, so this shouldn't be an issue.

JYU_Potku_Devs@gmail.com and associated Drop Box account

A new Gmail account for Potku dev's and an associated Drop Box account. Drop Box is used as cloud storage for Potku's external data files as it provides direct permanent links to files. The credentials to these accounts will be stored in Potku's Teams server.

.yml files

version.txt

Text file that contains the version number and date of said version. File must be in Potku's root. Version number is matched with a regex both in the bump_version.py script upon input and in the version_bump.yml file.

Changes

Finishing touches required in repository settings

The pull request can be accepted even before this, but there are some settings that need to be enabled for the automatic version bumping and packaging to finally work.

Finally I recommend squash merging this PR as there are a lot of commits that were made in the process of writing and testing these scripts, but which don't in the grand scheme of things contain any useful information individually.