Commit graph

114 commits

Author SHA1 Message Date
Todd Gamblin
b5d2c30d26 style: Move isort configuration to pyproject.toml
- [x] Remove flake8-import-order checks, as we only need isort for this
- [x] Clean up configuration and requirements
2021-07-07 17:27:31 -07:00
Danny McClanahan
7a9fe189e1 style: add support for isort and --fix 2021-07-07 17:27:31 -07:00
Massimiliano Culpo
2b65c53d2b
vermin: show line numbers of violations (#24580)
This commit runs vermin with the --violations option
that shows details of the violations to target requirements.
2021-06-29 19:41:22 +02:00
Adam J. Stewart
2284007db9
Use flake8-import-order to enforce PEP-8 compliance (#23947) 2021-06-28 08:03:20 -05:00
Massimiliano Culpo
1bccd866ae
Fix broken CI for package only PRs, make dateutil not strictly required (#24484)
* Force the Python interpreter with an env variable

This commit forces the Python interpreter with an
environment variable, to ensure that the Python set
by the "setup-python" action is the one being used.

Due to the policy adopted by Spack to prefer python3
over python we may end up picking a Python 3.X
interpreter where Python 2.7 was meant to be used.

* Revert "Update conftest.py (#24473)"

This reverts commit 477c8ce820.

* Make python-dateutil a soft dependency for unit tests

Before #23212 people could clone spack and run
```
spack unit-tests
```
while now this is not possible, since python-dateutil is
a required but not vendored dependency. This change makes
it not a hard requirement, i.e. it will be used if found
in the current interpreter.

* Workaround mypy complaint
2021-06-23 07:56:07 -04:00
Erik Schnetter
e3b220f699
Implement CVS fetcher (#23212)
Spack packages can now fetch versions from CVS repositories. Note
this fetch mechanism is unsafe unless using :extssh:. Most public
CVS repositories use an insecure protocol implemented as part of CVS.
2021-06-22 09:51:31 -07:00
Massimiliano Culpo
fd03d539cc
mypy: add types-six to the list of installed packages (#24207)
See https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
for a broader explanation.
2021-06-08 20:46:25 +00:00
Todd Gamblin
d45674c1cb
Spack can Use RHEL8's platform-python if nothing else is available. (#23857)
This adds RHEL8's `/usr/libexec/platform-python` to Spack's list of preferred
pythons. It will only be used if no other `python` is available in the `PATH`.

We have been testing with this python for a while now, and it seems to do all
that we need. If Spack one day isn't able to work with it, we'll take it out,
but for now it is useful to allow Spack to be used on RHEL8 without a dedicated
`python` installation.
2021-05-22 15:35:07 -07:00
Massimiliano Culpo
46088aa5da
qa: install clingo-cffi from pip (#23163)
Clingo has been released on PyPI, so there
are no more concerns on our CI depending
on pypy.test for installing the wheel.

Apparently we have parts of Spack which
are not compatible with kcov > 3.4
2021-04-22 09:35:17 +02:00
Massimiliano Culpo
03e10b3cde
QA: reduce number of unit tests for jobs not in the matrix (#22426)
* QA: reduce number of unit tests for jobs not in the matrix

* Fixup for CentOS6 dependencies

* Put correct conditions back in place

* Add dependency on changes
2021-03-20 07:16:52 -07:00
Massimiliano Culpo
0209d15ffd
CI: treat push to develop in the same way as PRs (#22421) 2021-03-19 15:08:32 -07:00
Massimiliano Culpo
629f94b4e1
CI: drastically reduce the number of tests for package only PRs (#22410)
PRs that change only package recipes will only run tests under "package_sanity.py" and without coverage. This should result in a huge drop the cpu-time spent in CI for most PRs.
2021-03-19 11:04:53 -07:00
Massimiliano Culpo
2aab415f3d
The action to detect changes needs a repository to be checked out on push event (#22324) 2021-03-16 17:27:41 +00:00
Massimiliano Culpo
b304b4bdb0
Speed-up CI by reorganizing tests (#22247)
* unit tests: mark slow tests as "maybeslow"

This commit also removes the "network" marker and
marks every "network" test as "maybeslow". Tests
marked as db are maintained, but they're not slow
anymore.

* GA: require style tests to pass before running unit-tests

* GA: make MacOS unit tests fail fast

* GA: move all unit tests into the same workflow, run style tests as a prerequisite

All the unit tests have been moved into the same workflow so that a single
run of the dorny/paths-filter action can be used to ask for coverage based
on the files that have been changed in a PR. The basic idea is that for PRs
that introduce only changes to packages coverage is not necessary, this
resulting in a faster execution of the tests.

Also, for package only PRs slow unit tests are skipped.

Finally, MacOS and linux unit tests are now conditional on style tests passing
meaning that e.g. we won't waste a MacOS worker if we know that the PR has
flake8 issues.

* Addressed review comments

* Skipping slow tests on MacOS for package only recipes

* QA: make tests on changes correct before merging
2021-03-16 08:16:31 -07:00