diff --git a/CHANGELOG.md b/CHANGELOG.md index b67b16b..38406da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - [eve] + [jbsq] - Custom hakus were not taken into account when computing the time of the last event, not anymore ! +- [jubeat-analyser] Update the repository URL dumped in the comment at the top + of the file # v1.4.0 ## Added diff --git a/jubeatools/formats/jubeat_analyser/memo/dump.py b/jubeatools/formats/jubeat_analyser/memo/dump.py index c375d22..2b51ad9 100644 --- a/jubeatools/formats/jubeat_analyser/memo/dump.py +++ b/jubeatools/formats/jubeat_analyser/memo/dump.py @@ -8,6 +8,7 @@ from typing import Dict, Iterator, List, Union from more_itertools import chunked, collapse, intersperse, mark_ends, windowed +from jubeatools.info import __repository_url__, __version__ from jubeatools.song import ( BeatsTime, Chart, @@ -17,7 +18,6 @@ from jubeatools.song import ( TapNote, Timing, ) -from jubeatools.version import __version__ from ..dump_tools import ( DEFAULT_EXTRA_SYMBOLS, @@ -248,7 +248,7 @@ def _dump_memo_chart( # Actual output to file file = StringIO() file.write(f"// Converted using jubeatools {__version__}\n") - file.write(f"// https://github.com/Stepland/jubeatools\n\n") + file.write(f"// {__repository_url__}\n\n") file.write( "\n\n".join(section.render(circle_free) for _, section in sections.items()) ) diff --git a/jubeatools/formats/jubeat_analyser/memo1/dump.py b/jubeatools/formats/jubeat_analyser/memo1/dump.py index 9b3ddfd..3c7934d 100644 --- a/jubeatools/formats/jubeat_analyser/memo1/dump.py +++ b/jubeatools/formats/jubeat_analyser/memo1/dump.py @@ -8,6 +8,7 @@ from typing import Dict, Iterator, List, Union from more_itertools import collapse, intersperse, mark_ends, windowed +from jubeatools.info import __repository_url__, __version__ from jubeatools.song import ( BeatsTime, Chart, @@ -18,7 +19,6 @@ from jubeatools.song import ( Timing, ) from jubeatools.utils import lcm -from jubeatools.version import __version__ from ..dump_tools import ( DIRECTION_TO_ARROW, @@ -228,7 +228,7 @@ def _dump_memo1_chart( # Actual output to file file = StringIO() file.write(f"// Converted using jubeatools {__version__}\n") - file.write(f"// https://github.com/Stepland/jubeatools\n\n") + file.write(f"// {__repository_url__}\n\n") file.write( "\n\n".join(section.render(circle_free) for _, section in sections.items()) ) diff --git a/jubeatools/formats/jubeat_analyser/memo2/dump.py b/jubeatools/formats/jubeat_analyser/memo2/dump.py index 03eef67..ef392e0 100644 --- a/jubeatools/formats/jubeat_analyser/memo2/dump.py +++ b/jubeatools/formats/jubeat_analyser/memo2/dump.py @@ -9,6 +9,7 @@ from typing import Dict, Iterator, List, Optional, Union from more_itertools import collapse, intersperse, mark_ends, windowed from sortedcontainers import SortedKeyList +from jubeatools.info import __repository_url__, __version__ from jubeatools.song import ( BeatsTime, BPMEvent, @@ -21,7 +22,6 @@ from jubeatools.song import ( Timing, ) from jubeatools.utils import lcm -from jubeatools.version import __version__ from ..command import dump_command from ..dump_tools import ( @@ -296,7 +296,7 @@ def _dump_memo2_chart( # Actual output to file file = StringIO() file.write(f"// Converted using jubeatools {__version__}\n") - file.write(f"// https://github.com/Stepland/jubeatools\n\n") + file.write(f"// {__repository_url__}\n\n") # Header if chart.level is not None: diff --git a/jubeatools/formats/jubeat_analyser/mono_column/dump.py b/jubeatools/formats/jubeat_analyser/mono_column/dump.py index b3d01c4..52b41ed 100644 --- a/jubeatools/formats/jubeat_analyser/mono_column/dump.py +++ b/jubeatools/formats/jubeat_analyser/mono_column/dump.py @@ -4,6 +4,7 @@ from typing import Dict, Iterator, List from more_itertools import collapse, intersperse, mark_ends +from jubeatools.info import __repository_url__, __version__ from jubeatools.song import ( BeatsTime, Chart, @@ -13,7 +14,6 @@ from jubeatools.song import ( TapNote, Timing, ) -from jubeatools.version import __version__ from ..dump_tools import ( BEATS_TIME_TO_SYMBOL, @@ -143,7 +143,7 @@ def _dump_mono_column_chart( # Actual output to file file = StringIO() file.write(f"// Converted using jubeatools {__version__}\n") - file.write("// https://github.com/Stepland/jubeatools\n\n") + file.write(f"// {__repository_url__}\n\n") for _, section in sections.items(): file.write(section.render(circle_free) + "\n") diff --git a/jubeatools/info.py b/jubeatools/info.py new file mode 100644 index 0000000..7b1ff6c --- /dev/null +++ b/jubeatools/info.py @@ -0,0 +1,2 @@ +__version__ = "1.4.0" +__repository_url__ = "https://gitlab.com/Buggyroom/jubeatools" diff --git a/jubeatools/version.py b/jubeatools/version.py deleted file mode 100644 index 3e8d9f9..0000000 --- a/jubeatools/version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "1.4.0" diff --git a/utils/bump_version.py b/utils/bump_version.py index fa628e7..9877365 100644 --- a/utils/bump_version.py +++ b/utils/bump_version.py @@ -17,9 +17,11 @@ with open("pyproject.toml") as f: pyproject = toml.load(f) version = pyproject["tool"]["poetry"]["version"] +repo_url = pyproject["tool"]["poetry"]["repository"] with open("jubeatools/version.py", mode="w") as f: f.write(f'__version__ = "{version}"\n') + f.write(f'__repository_url__ = "{repo_url}"\n') if args.commit: subprocess.run(["git", "reset"])