Commit Graph
10 Commits
Author SHA1 Message Date
Nicola Soranzo dcb6f061f6 Don't install Galaxy packages in editable mode when testing them
When enabling the `warn_unused_ignores = True` option of mypy, this
was making the `test_galaxy_packages` tests fail with:

```
mypy .
Traceback (most recent call last):
  File "/tmp/gxpkgtestenvu3fgDr/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
  File "/tmp/gxpkgtestenvu3fgDr/lib/python3.10/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
  File "mypy/main.py", line 100, in main
  File "mypy/main.py", line 182, in run_build
  File "mypy/build.py", line 192, in build
  File "mypy/build.py", line 266, in _build
  File "mypy/build.py", line 2942, in dispatch
  File "mypy/build.py", line 3333, in process_graph
  File "mypy/build.py", line 3414, in process_fresh_modules
  File "mypy/build.py", line 2110, in fix_cross_refs
  File "mypy/fixup.py", line 52, in fixup_module
  File "mypy/fixup.py", line 127, in visit_symbol_table
  File "mypy/lookup.py", line 49, in lookup_fully_qualified
AssertionError: Cannot find component 'util' for 'galaxy.util'
make: *** [Makefile:96: mypy] Error 1
```

Moreover, installing packages in editable mode was hiding some issues
with how files from other packages were accessed.
2024-04-16 01:12:57 +01:00
Nicola Soranzo a2018a5e60 Enable flake8-comprehensions ruff rules
but allow `dict()` calls that make use of keyword arguments (e.g.,
`dict(a=1, b=2)`).
2024-03-09 19:11:20 +00:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
John Davis 12e1c8128e Fix bug in unit test: don't call downgrade w/o revision id 2023-04-26 08:53:35 -04:00
John Davis 84743c4786 Add --repair argument to upgrade/downgrade commands on db_dev script 2023-04-26 08:53:35 -04:00
John Davis b4060ff592 Factor our common testing code into model testing utils 2023-02-08 11:20:38 -05:00
Nicola Soranzo b4c1119f00 Code cleanups from pyupgrade
Found by running:

```
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|^tools/' | xargs pyupgrade --py37-plus
```
2023-01-16 14:34:55 +00:00
John Davis b2d6b8d40d Skip dbscript tests if running from packages; refactor util function 2022-11-21 18:12:04 -05:00
John Davis 116682a59f Do not call split on cmd: there may be spaces in path 2022-11-21 18:12:04 -05:00
John Davis 29053fa9e4 Move test_dbscript into app
JUSTIFICATION:
As per @jmchilton:
The package tests should pretend they don't have galaxy_directory()
available because they're meant to be installed into a Python env.
This test is fundamentally not testing anything about the Galaxy data
package - it is testing scripts placed in Galaxy root directory and that
would not be available in an installed Galaxy environment.
2022-11-21 18:12:04 -05:00