Skip to content

Commit

Permalink
Merge pull request #332 from dswah/new-ci
Browse files Browse the repository at this point in the history
new build
  • Loading branch information
dswah authored Mar 17, 2023
2 parents b57b4cf + 4b0396d commit bb47c94
Show file tree
Hide file tree
Showing 32 changed files with 4,211 additions and 1,704 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export --with dev > requirements.txt
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: codecov/codecov-action@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export --with dev > requirements.txt
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest --cov=pygam
codecov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
######################
*.log
.coverage
coverage.xml

# OS generated files #
######################
Expand Down
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

26 changes: 13 additions & 13 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#
import os
import sys

sys.path.insert(0, os.path.abspath('../../'))


Expand Down Expand Up @@ -49,7 +50,7 @@
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'nbsphinx'
'nbsphinx',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -137,15 +138,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -155,19 +153,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'pyGAM.tex', 'pyGAM Documentation',
'Daniel Servén', 'manual'),
(master_doc, 'pyGAM.tex', 'pyGAM Documentation', 'Daniel Servén', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pygam', 'pyGAM Documentation',
[author], 1)
]
man_pages = [(master_doc, 'pygam', 'pyGAM Documentation', [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -176,9 +170,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'pyGAM', 'pyGAM Documentation',
author, 'pyGAM', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
'pyGAM',
'pyGAM Documentation',
author,
'pyGAM',
'One line description of project.',
'Miscellaneous',
),
]


Expand Down
Loading

0 comments on commit bb47c94

Please sign in to comment.