Skip to content

Commit

Permalink
Clean up scr/ directory (#1634)
Browse files Browse the repository at this point in the history
* remove scr/abjad-log
* remove scr/fix-tests
* remove scr/make-packaging-transcript
* remove scr/trash

OLD: scr/abjad
NEW: scr/abjad.py

OLD: scr/prime-parser-tables
NEW: scr/prime_parser_tables.py

OLD: scr/timer
NEW: scr/timer.py

OLD: scr/write-parser-syntax-skeleton
NEW: scr/write_parser_syntax_skeleton.py
  • Loading branch information
trevorbaca authored Jan 25, 2025
1 parent 6796c66 commit 0e4b47d
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 371 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
run: |
python -m pip install .[dev]
python -c "import abjad; print(abjad.Configuration().configuration_file_path)"
python scr/prime-parser-tables
python scr/prime_parser_tables.py
- name: Run checks
run: |
Expand Down
2 changes: 1 addition & 1 deletion abjad/contextmanagers.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def __enter__(self) -> "Timer":
self._stop_time = None
self._start_time = time.time()
if self.print_continuously_from_background:
path = configuration.abjad_directory.parent / "scr" / "timer"
path = configuration.abjad_directory.parent / "scr" / "timer.py"
interval = str(int(self.print_continuously_from_background))
process = subprocess.Popen([path, interval], shell=False)
self._process = process
Expand Down
32 changes: 0 additions & 32 deletions scr/abjad

This file was deleted.

4 changes: 0 additions & 4 deletions scr/abjad-log

This file was deleted.

166 changes: 0 additions & 166 deletions scr/fix-tests

This file was deleted.

130 changes: 0 additions & 130 deletions scr/make-packaging-transcript

This file was deleted.

File renamed without changes.
19 changes: 19 additions & 0 deletions scr/start_abjad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /usr/bin/env python
import sys

import abjad


def main():
try:
file_name = sys.argv[1]
except IndexError:
file_name = ""
startup_string = f"Abjad {abjad.__version__}"
commands = f"import abjad; print({startup_string!r});"
string = rf'''python -i {file_name} -c "{commands}"'''
abjad.io.spawn_subprocess(string)


if __name__ == "__main__":
main()
5 changes: 5 additions & 0 deletions scr/timer → scr/timer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#! /usr/bin/env python

"""
Called by abjad.contextmanager.Timer on __enter__().
"""

import sys
import time

Expand Down
Loading

0 comments on commit 0e4b47d

Please sign in to comment.