Carefully remove almost all files from the top-level scripts/ directory #736
Open
rileyjmurray wants to merge 33 commits into
Open
Carefully remove almost all files from the top-level scripts/ directory #736rileyjmurray wants to merge 33 commits into
scripts/ directory #736rileyjmurray wants to merge 33 commits into
Conversation
```
(pgdev313) Rileys-MacBook-Air:pygsti-repo riley$ python /Users/riley/quantum/pygsti-repo/scripts/advanced_report/advanced_report.py
Traceback (most recent call last):
File "/Users/riley/quantum/pygsti-repo/scripts/advanced_report/advanced_report.py", line 23, in <module>
main()
~~~~^^
File "/Users/riley/quantum/pygsti-repo/scripts/advanced_report/advanced_report.py", line 10, in main
nb.add_code_file('templates/setup.py')
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Users/riley/quantum/pygsti-repo/pygsti/report/notebook.py", line 196, in add_code_file
self.add_file(filename, 'code')
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/Users/riley/quantum/pygsti-repo/pygsti/report/notebook.py", line 149, in add_file
with open(str(filename), 'r', encoding='utf-8') as infile:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'templates/setup.py'
```
```
(pgdev313) Rileys-MacBook-Air:pygsti-repo riley$ python /Users/riley/quantum/pygsti-repo/scripts/advanced_report/build_tutorial_20.py
Traceback (most recent call last):
File "/Users/riley/quantum/pygsti-repo/scripts/advanced_report/build_tutorial_20.py", line 25, in <module>
main()
~~~~^^
File "/Users/riley/quantum/pygsti-repo/scripts/advanced_report/build_tutorial_20.py", line 7, in main
nb.add_code_file('templates/setup.py')
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Users/riley/quantum/pygsti-repo/pygsti/report/notebook.py", line 196, in add_code_file
self.add_file(filename, 'code')
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/Users/riley/quantum/pygsti-repo/pygsti/report/notebook.py", line 149, in add_file
with open(str(filename), 'r', encoding='utf-8') as infile:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'templates/setup.py'
```
… subpackage pygsti.construction. Remove scripts/advanced_report/AdvancedReport.ipynb, which depends on a pickled file written by the aforementioned create.py. Remove scripts/advanced_report/templates/setup.py, which depends on a pickled file written by the aforementioned create.py.
```
nb.add_notebook_text_files([
'templates/summary.txt',
'templates/goodness.txt',
'templates/gauge_invariant.txt',
'templates/gauge_variant.txt',
'templates/data_comparison.txt',
'templates/input.txt',
'templates/meta.txt'])
```
reference non-existent files.
…blank file, where the string "compare" was not referenced anywhere in "scripts/profiling"
…on-existent pygsti.construction subpackage
```
(pgdev313) Rileys-MacBook-Air:pygsti-repo riley$ python /Users/riley/quantum/pygsti-repo/scripts/profiling/report/native_hashing.py
Traceback (most recent call last):
File "/Users/riley/quantum/pygsti-repo/scripts/profiling/report/native_hashing.py", line 27, in <module>
main()
~~~~^^
File "/Users/riley/quantum/pygsti-repo/scripts/profiling/report/native_hashing.py", line 8, in main
digest = pygsti.tools.smartcache.digest
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pygsti.tools' has no attribute 'smartcache'. Did you mean: 'smart_cached'?
```
when run
…now-legacy modelpacks to the current modelpacks (6 years ago)
…ly from scripts/mpi/run_parallel_apply_with_mpiexec.py; remove that file and the remaining (trivial) file in scripts/mpi.
… helper function; add a test for this helper. This should address common failures when running pytest with parallelism enabled.
…qbit_results.pkl; the only occurances of the string "2qbit_results" in scripts/profiling were to read from a pickled file with this name. Since no files write something with this name, the file genuinely does not exist.
…ti1QGST.pkl;
the only occurance of the string "rigetti1QGST" in scripts/profiling was to read
from a pickled file with this name. Since no files write something with this name,
the file genuinely does not exist.
… example_report_results.pkl file;
the only occurance of the string "example_report_results" in scripts/profiling was to read
from a pickled file with this name. Since no files write something with this name,
the file genuinely does not exist.
…thin it. Each of these files references a non-existent file named full_report_results.pkl. The only hits for the string "full_report_results" in scripts/ is in these files, so there aren't other files in the scripts/ folder that generate the apparently-required full_report_results.pkl file. That means these scripts are definitively broken.
…tant (recently removed) file scripts/profiling/gaugeopt/load.py
…t and distribute_for_dot) with incorrect arguments
… was removed in the last commit (due to being broken)
…hin it. One file just held environment variables (trivial) and the other referenced a non-existant (recently removed) file scripts/profiling/gaugeopt/load.py
…ched for the past 10 years. The contents strongly suggest they were CI infrastructure, abandoned since we moved to GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR's diff will make it look like I blindly deleted a huge number of files. That's not what happened. I applied a general rule to remove files that couldn't run successfully because they referenced files that don't exist (and couldn't be generated by other files elsewhere in the repo). Applying this removal rule recursively led me to delete almost the entirety of the
scripts/directory.My individual commit comments justify each removal.
This removal was important because coding agents insisted on exploring ~8000 lines of text within this directory, even though the contents of this directory had basically no value.
I made a couple of additive changes throughout this process.
Test*name pattern in addition to the*Testerpattern. We need to support the former pattern because it's what coding agents will default to, and it's not worth trying to fight them on that.