nanograv / enterprise

ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE) is a pulsar timing analysis code, aimed at noise analysis, gravitational-wave searches, and timing model analysis.
https://enterprise.readthedocs.io
MIT License
65 stars 67 forks source link

make test fails on a clean install #333

Closed aarchiba closed 1 year ago

aarchiba commented 1 year ago

When I try to run make test on a clean install, I get an error out of flake8:

flake8 .
Traceback (most recent call last):
  File "/home/peridot/.local/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/main/application.py", line 186, in _run
    self.initialize(argv)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/main/application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/options/parse_args.py", line 53, in parse_args
    opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/options/aggregator.py", line 30, in aggregate_options
    parsed_config = config.parse_config(manager, cfg, cfg_dir)
  File "/home/peridot/.local/lib/python3.10/site-packages/flake8/options/config.py", line 131, in parse_config
    raise ValueError(
ValueError: Error code '#' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
make: *** [Makefile:44: lint] Error 1

I don't know whether this is a misconfiguration or what, but all I did was install enterprise from conda (for the dependencies), then pip install -e . so I could work on the code, then make test.

aarchiba commented 1 year ago

I am using flake8 version 6.0.0.

This particular error arises because .flake8 has comments on the same lines as ignore arguments; comments are only allowed on separate lines.

Once this is fixed, flake8 . still fails:

./tests/test_gp_coefficients.py:303:13: E741 ambiguous variable name 'l'
./tests/test_gp_coefficients.py:321:13: E741 ambiguous variable name 'l'
./tests/test_gp_coefficients.py:363:13: E741 ambiguous variable name 'l'
./tests/test_gp_coefficients.py:378:13: E741 ambiguous variable name 'l'