-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from tbenthompson/linting_ci
CI pipeline and linting
- Loading branch information
Showing
15 changed files
with
322 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
conda env update --file environment.yml --name base | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . | ||
- name: Check formatting with black | ||
run: | | ||
black . | ||
- name: Test with pytest | ||
run: | | ||
pip install --no-use-pep517 --no-deps --disable-pip-version-check -e . | ||
py.test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from cppimport.config import set_quiet, force_rebuild, file_exts,\ | ||
turn_off_strict_prototypes, set_rtld_flags | ||
from cppimport.config import ( | ||
set_quiet, | ||
force_rebuild, | ||
file_exts, | ||
turn_off_strict_prototypes, | ||
set_rtld_flags, | ||
) | ||
from cppimport.importer import imp, imp_from_filepath, build | ||
from cppimport.templating import setup_pybind11 | ||
from cppimport.importer import imp as cppimport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import os | ||
|
||
|
||
def make_absolute(this_dir, s): | ||
if os.path.isabs(s): | ||
return s | ||
|
Oops, something went wrong.