Skip to content

Commit 260456b

Browse files
committed
Improved script for bulk testing of projects
1 parent 98ee42f commit 260456b

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

utilities/test_all_osb_projects.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
if '-q' in sys.argv:
4040
ignores.append('pospischiletal2008') # Slow...
4141
ignores.append('blue-brain-project-showcase') # Slow...
42-
ignores.append('acnet2') # Slow...
42+
#ignores.append('acnet2') # Slow...
4343
ignores.append('granulecell') # Slow...
4444
ignores.append('thalamocortical') # Slow...
4545
ignores.append('cerebellum--cerebellar-golgi-cell--solinasetal-golgicell') # Slow...
4646
ignores.append('potjansdiesmann2014')
4747
ignores.append('nc_ca1')
48-
ignores.append('miglioreetal14_olfactorybulb3d')
48+
#ignores.append('miglioreetal14_olfactorybulb3d')
4949
ignores.append('sadehetal2017-inhibitionstabilizednetworks')
50-
ignores.append('brianshowcase') # Slow...
50+
#ignores.append('brianshowcase') # Slow...
5151

5252
ignores.append('c302') # problem downloading images?...
5353
ignores.append('celegans') # ditto..
@@ -84,12 +84,7 @@
8484
if __name__ == "__main__":
8585
start = datetime.datetime.now()
8686

87-
project_num = 1000
88-
if len(sys.argv) == 2:
89-
try:
90-
project_num = int(sys.argv[1])
91-
except:
92-
print("ignoring...")
87+
project_num = 30000
9388

9489
all_projs = osb.get_projects(min_curation_level="None",
9590
limit=project_num)
@@ -122,20 +117,30 @@
122117
print(" Possible .travis.yml with OMV tests found!")
123118
all_repos[project.identifier] = project.github_repo
124119

120+
elif github_repo.check_file_in_repository(".github/workflows/omv-ci.yml"):
121+
122+
raw_url = github_repo.link_to_raw_file_in_repo(".github/workflows/omv-ci.yml")
123+
print(" .github/workflows/omv-ci.yml found at %s\n" % raw_url)
124+
#contents = osb.utils.get_page(raw_url)
125+
126+
print(" omv-ci.yml with OMV tests found!")
127+
all_repos[project.identifier] = project.github_repo
128+
125129
else:
126-
error = " (No .travis.yml)"
130+
error = " (No .travis.yml or omv-ci.yml...)"
127131
print(error)
128132

129133
bad_projects_found[project.identifier] = error
134+
130135
except Exception as e:
131136
error = " (Error accessing GitHub repository)"
132137
print(e)
133138
bad_projects_found[project.identifier] = error
134139

135-
else:
136-
error = " (No GitHub repository)"
137-
print(error)
138-
bad_projects_found[project.identifier] = error
140+
#else:
141+
#error = " (No GitHub repository)"
142+
#print(error)
143+
#bad_projects_found[project.identifier] = error
139144
else:
140145
error = " (Ignoring...)"
141146
print(error)
@@ -173,6 +178,10 @@
173178
testable_projects += 1
174179
test_it = True
175180

181+
elif github_repo.check_file_in_repository(".github/workflows/omv-ci.yml"):
182+
testable_projects += 1
183+
test_it = True
184+
176185
else:
177186
print(" (No .travis.yml)")
178187

0 commit comments

Comments
 (0)