-
Notifications
You must be signed in to change notification settings - Fork 24
Added a Linear TS search job adapter
#695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7ecd736
0779fb2
0d96b66
c83457d
346c24f
e44166b
5a50586
d46ce8e
0555981
55c8c8d
3b79874
14c2549
60b1837
e106e3a
bc0a32b
8360979
2ac0032
302f24b
c029ca8
6c21b0c
975bc8b
69856bd
f0fcc8b
63fb641
3260ee4
15751a4
ac49eb4
c9258a4
d290687
971d9c2
2d058ba
ac53159
63c1f82
bfc3a9c
035d6f3
ad4dab2
14b2ea3
5877052
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,10 @@ timer.dat | |
| # .vscode | ||
| .vscode | ||
|
|
||
| # Claude | ||
| CLAUDE.md | ||
| .claude/* | ||
|
|
||
| # .trunk folder | ||
| .trunk | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -30,11 +30,33 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| Contains unit tests for ARC's common module | |||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| @classmethod | |||||||||||||||||||||||||||||||||||||||||||||||
| def _clean_globalized_restart_artifact(cls): | |||||||||||||||||||||||||||||||||||||||||||||||
| """Remove the globalized restart-paths artifact written by | |||||||||||||||||||||||||||||||||||||||||||||||
| :meth:`test_globalize_paths`. | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Called from BOTH ``setUpClass`` (defensive: wipes a stale | |||||||||||||||||||||||||||||||||||||||||||||||
| artifact left behind by a previously interrupted run) and | |||||||||||||||||||||||||||||||||||||||||||||||
| ``tearDownClass`` (the normal cleanup path). This makes the | |||||||||||||||||||||||||||||||||||||||||||||||
| cleanup self-healing: a Ctrl+C, ``kill``, or hard error during | |||||||||||||||||||||||||||||||||||||||||||||||
| a previous run cannot leave the next run inheriting the prior | |||||||||||||||||||||||||||||||||||||||||||||||
| ``restart_paths_globalized.yml``. | |||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| globalized_restart_path = os.path.join( | |||||||||||||||||||||||||||||||||||||||||||||||
| common.ARC_TESTING_PATH, 'restart', '4_globalized_paths', | |||||||||||||||||||||||||||||||||||||||||||||||
| 'restart_paths_globalized.yml') | |||||||||||||||||||||||||||||||||||||||||||||||
| if os.path.isfile(globalized_restart_path): | |||||||||||||||||||||||||||||||||||||||||||||||
| try: | |||||||||||||||||||||||||||||||||||||||||||||||
| os.remove(path=globalized_restart_path) | |||||||||||||||||||||||||||||||||||||||||||||||
| except OSError: | |||||||||||||||||||||||||||||||||||||||||||||||
Check noticeCode scanning / CodeQL Empty except Note
'except' clause does nothing but pass and there is no explanatory comment.
Copilot AutofixAI 21 minutes ago To fix this without changing functionality, keep the cleanup best-effort but make the exception handling explicit and self-documenting. Best single fix in
No new imports or dependencies are required.
Suggested changeset
1
arc/common_test.py
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||
| pass | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| @classmethod | |||||||||||||||||||||||||||||||||||||||||||||||
| def setUpClass(cls): | |||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| A method that is run before all unit tests in this class. | |||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| cls._clean_globalized_restart_artifact() | |||||||||||||||||||||||||||||||||||||||||||||||
| cls.maxDiff = None | |||||||||||||||||||||||||||||||||||||||||||||||
| cls.default_job_types = {'conf_opt': True, | |||||||||||||||||||||||||||||||||||||||||||||||
| 'opt': True, | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1077,8 +1099,8 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| """Test the getting a corresponding angle in the -180 to +180 range""" | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertEqual(common.get_angle_in_180_range(0), 0) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertEqual(common.get_angle_in_180_range(10), 10) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(-5.364589), -5.364589) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(-5.364589), -5.364589) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(-5.364589, round_to=None), -5.364589) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(-5.364589, round_to=None), -5.364589) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertEqual(common.get_angle_in_180_range(-120), -120) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(179.999), 180, 2) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertEqual(common.get_angle_in_180_range(180), -180) | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1098,6 +1120,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| self.assertEqual(common.get_angle_in_180_range(-270), 90) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(45.5), 45.5, places=7) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(719.9), -0.1, places=7) | |||||||||||||||||||||||||||||||||||||||||||||||
| self.assertAlmostEqual(common.get_angle_in_180_range(-5.364589, round_to=2), -5.36) | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| def test_signed_angular_diff(self): | |||||||||||||||||||||||||||||||||||||||||||||||
| """Test the signed angular difference between two angles""" | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1396,10 +1419,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| A function that is run ONCE after all unit tests in this class. | |||||||||||||||||||||||||||||||||||||||||||||||
| """ | |||||||||||||||||||||||||||||||||||||||||||||||
| globalized_restart_path = os.path.join(common.ARC_TESTING_PATH, 'restart', '4_globalized_paths', | |||||||||||||||||||||||||||||||||||||||||||||||
| 'restart_paths_globalized.yml') | |||||||||||||||||||||||||||||||||||||||||||||||
| if os.path.isfile(globalized_restart_path): | |||||||||||||||||||||||||||||||||||||||||||||||
| os.remove(path=globalized_restart_path) | |||||||||||||||||||||||||||||||||||||||||||||||
| cls._clean_globalized_restart_artifact() | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| if __name__ == '__main__': | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
Copilot Autofix
AI 20 minutes ago
To break the reported module-level cycle without changing runtime behavior, replace the
TYPE_CHECKINGimport ofAtom/Moleculewith forward-reference type aliases that are only strings at analysis time. This preserves type annotation usability while removing the explicit import edge fromarc.commontoarc.molecule.molecule.Best single change in
arc/common.py:TYPE_CHECKINGimported fromtyping(already present).if TYPE_CHECKING:from arc.molecule.molecule import Atom, Moleculeif TYPE_CHECKING: Atom = Any; Molecule = Anyelse: Atom = Any; Molecule = AnyThis ensures names exist for annotations and avoids importing ARC molecule module from common.