Skip to content

Commit

Permalink
replaces MS3_VERSION constant with the version from _version.py
Browse files Browse the repository at this point in the history
  • Loading branch information
johentsch committed Jul 17, 2023
1 parent 8f40b16 commit 0c90771
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/ms3/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.2.11"
5 changes: 3 additions & 2 deletions src/ms3/bs4_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@
from .utils import adjacency_groups, color_params2rgba, column_order, compute_mn_playthrough, decode_harmonies, fifths2name, \
DCML_DOUBLE_REGEX, FORM_DETECTION_REGEX, \
make_continuous_offset_series, make_offset_dict_from_measures, make_playthrough_info, \
make_playthrough2mc, midi2octave, MS3_VERSION, ordinal_suffix, resolve_dir, rgba2attrs, \
make_playthrough2mc, midi2octave, ordinal_suffix, resolve_dir, rgba2attrs, \
rgb_tuple2format, sort_note_list, tpc2name, unfold_measures_table, unfold_repeats
from ._version import __version__

NOTE_SYMBOL_MAP = {
'metNoteHalfUp': '𝅗𝅥',
Expand Down Expand Up @@ -1238,7 +1239,7 @@ def _get_metadata(self):
data['annotated_key'] = annotated_key

data['musescore'] = self.version
data['ms3_version'] = MS3_VERSION
data['ms3_version'] = __version__

# notes
notes = self.nl()
Expand Down
5 changes: 3 additions & 2 deletions src/ms3/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

from ms3 import Parse, make_coloring_reports_and_warnings
from ms3.operations import extract, check, compare, update, store_scores, insert_labels_into_score
from ms3.utils import convert_folder, resolve_dir, write_tsv, MS3_VERSION, compute_path_from_file, capture_parse_logs
from ms3.utils import convert_folder, resolve_dir, write_tsv, compute_path_from_file, capture_parse_logs
from ms3.logger import get_logger, inspect_loggers
from ._version import __version__

__author__ = "johentsch"
__copyright__ = "École Polytechnique Fédérale de Lausanne"
Expand Down Expand Up @@ -571,7 +572,7 @@ def get_arg_parser():
The library offers you the following commands. Add the flag -h to one of them to learn about its parameters.
''')
parser.add_argument('--version', action='version', version=MS3_VERSION)
parser.add_argument('--version', action='version', version=__version__)
subparsers = parser.add_subparsers(help='The action that you want to perform.', dest='action')


Expand Down
4 changes: 2 additions & 2 deletions src/ms3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

from .logger import function_logger, update_cfg, LogCapturer
from ._typing import FileDict, Facet, ViewDict, FileDataframeTupleMaybe
from ._version import __version__

MS3_VERSION = '1.2.10'
LATEST_MUSESCORE_VERSION = '3.6.2'
COMPUTED_METADATA_COLUMNS = ['TimeSig', 'KeySig', 'last_mc', 'last_mn', 'length_qb', 'last_mc_unfolded', 'last_mn_unfolded', 'length_qb_unfolded',
'volta_mcs', 'all_notes_qb', 'n_onsets', 'n_onset_positions',
Expand Down Expand Up @@ -2150,7 +2150,7 @@ def make_csvw_jsonld(title: str,
"author": {"name": "Johannes Hentschel",
"@id": "https://orcid.org/0000-0002-1986-9545",
},
"softwareVersion": MS3_VERSION,
"softwareVersion": __version__,
}]
if isinstance(urls, str):
result["url"] = urls,
Expand Down

0 comments on commit 0c90771

Please sign in to comment.