Skip to content

Commit

Permalink
release.py dependencies, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Feb 10, 2025
1 parent 6462e55 commit 58e1c88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- name: Basic installation to check euphonic.__version__
shell: bash -l {0}
run: |
python -m pip install requests pyyaml
python -m pip install .
- name: Check version consistency, generate Github release page
Expand Down
9 changes: 5 additions & 4 deletions build_utils/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import json
import os
import re

import requests
import subprocess
import yaml

from euphonic import __version__


Expand All @@ -18,9 +19,9 @@ def main():


def release_github(test=True):
with open('CHANGELOG.rst') as f:
with open('CHANGELOG.rst', "rt", encoding="utf8") as f:
changelog = f.read()
with open('CITATION.cff') as f:
with open('CITATION.cff', "rt", encoding="utf8") as f:
citation = yaml.safe_load(f)

euphonic_ver = __version__
Expand All @@ -30,7 +31,7 @@ def release_github(test=True):
version_dict['CITATION.cff'] = 'v' + citation['version']
for ver_name, ver in version_dict.items():
if euphonic_ver != ver:
raise Exception((
raise ValueError((
f'euphonic.__version__/{ver_name} version mismatch! '
f'euphonic.__version__: {euphonic_ver} {ver_name}: '
f'{ver}'))
Expand Down

0 comments on commit 58e1c88

Please sign in to comment.