summaryrefslogtreecommitdiffstats
path: root/testing/gen-languages-all
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtesting/gen-languages-all28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/gen-languages-all b/testing/gen-languages-all
new file mode 100755
index 0000000..6d0b26f
--- /dev/null
+++ b/testing/gen-languages-all
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+import sys
+
+LANGUAGES = [
+ 'conda', 'docker', 'docker_image', 'fail', 'golang', 'node', 'perl',
+ 'pygrep', 'python', 'python_venv', 'ruby', 'rust', 'script', 'swift',
+ 'system',
+]
+FIELDS = [
+ 'ENVIRONMENT_DIR', 'get_default_version', 'healthy', 'install_environment',
+ 'run_hook',
+]
+
+
+def main() -> int:
+ print(f' # BEGIN GENERATED ({sys.argv[0]})')
+ for lang in LANGUAGES:
+ parts = [f' {lang!r}: Language(name={lang!r}']
+ for k in FIELDS:
+ parts.append(f', {k}={lang}.{k}')
+ parts.append('), # noqa: E501')
+ print(''.join(parts))
+ print(' # END GENERATED')
+ return 0
+
+
+if __name__ == '__main__':
+ exit(main())