1
0
mirror of synced 2024-11-14 10:27:45 +01:00

[jubeat-analyser] Update the repository URL dumped in the comment

Rename version.py to info.py and add the repository url in it

Modify the version bump script so it also updates the repo url in info.py
This commit is contained in:
Stepland 2022-04-16 01:10:09 +02:00
parent 4da68a6915
commit f76bc2aa88
8 changed files with 14 additions and 9 deletions

View File

@ -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

View File

@ -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())
)

View File

@ -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())
)

View File

@ -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:

View File

@ -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")

2
jubeatools/info.py Normal file
View File

@ -0,0 +1,2 @@
__version__ = "1.4.0"
__repository_url__ = "https://gitlab.com/Buggyroom/jubeatools"

View File

@ -1 +0,0 @@
__version__ = "1.4.0"

View File

@ -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"])