{"id":16031873,"url":"https://github.com/dckc/py2scala","last_synced_at":"2026-03-08T06:31:43.801Z","repository":{"id":12804962,"uuid":"15479774","full_name":"dckc/py2scala","owner":"dckc","description":"Use scala compiler to typecheck python programs.","archived":false,"fork":false,"pushed_at":"2013-12-27T18:56:44.000Z","size":1508,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T10:50:35.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dckc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-27T18:46:54.000Z","updated_at":"2019-02-03T16:32:15.000Z","dependencies_parsed_at":"2022-09-16T16:14:01.828Z","dependency_job_id":null,"html_url":"https://github.com/dckc/py2scala","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dckc/py2scala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fpy2scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fpy2scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fpy2scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fpy2scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dckc","download_url":"https://codeload.github.com/dckc/py2scala/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fpy2scala/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30247339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T05:41:50.788Z","status":"ssl_error","status_checked_at":"2026-03-08T05:41:39.075Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T21:06:38.323Z","updated_at":"2026-03-08T06:31:43.773Z","avatar_url":"https://github.com/dckc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"py2scala -- Use scala compiler for static analysis of well-typed python\n=======================================================================\n\n:author: Dan Connolly\n:copyright: Dan Connolly and the University of Kansas Medical Center\n:license: MIT\n\n\nUsage\n-----\n\nConvert one module::\n\n  $ python py2scala/p2s.py my_module.py \u003emy_module.scala\n\n:TODO: Test, document --package option.\n\n\nTesting\n-------\n\nTests are set up to run under nose__, assuming `fsc`, the fast scala__\ncompiler, is installed::\n\n  py2scala$ nosetests\n  ..................\n  ../src/test/scala-err/distant_types.scala:23: error: value % is not a member of Any\n    if ((x % 2) == 0) { 1 } else { \"abc\" }\n           ^\n  ./src/test/scala-err/distant_types.scala:31: error: type mismatch;\n   found   : Any\n   required: Seq[?]\n      len(f1(x))\n          ^\n  two errors found\n  .\n  ----------------------------------------------------------------------\n  Ran 20 tests in 5.243s\n\n  OK\n\n__ https://pypi.python.org/pypi/nose/\n__ http://www.scala-lang.org/\n\nAlternatively, to test that the conversion works (i.e. doesn't crash):\n\n  py2scala$ python -m py2scala.test.test_convert\n\nAnd to test compilation output with `fsc`:\n\n  py2scala$ python -m py2scala.test.test_well_typed\n\n\n\nObject Capability Discipline\n----------------------------\n\nThis code follows* a `security and testing discipline`__ where\nmodule-level code uses only authority passed to it by callers. Only\nthe top level script environment is trusted with the full authority\nof the python standard library.\n\n*mostly. There's an apparent conflict between object capability\ndiscipine and test discovery that I haven't worked out.\n\n__ http://www.madmode.com/2013/python-capability-idioms-part-1.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckc%2Fpy2scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdckc%2Fpy2scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckc%2Fpy2scala/lists"}