From 2a902ac3592b5985fd8ddf00557f5a52db45e77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Tue, 29 Oct 2019 13:00:00 +0100 Subject: [PATCH] Add GitHub Actions (#2) --- .github/workflows/pythonapp.yml | 22 ++++++++++++++++++++++ .pylintrc | 8 ++++++-- dumper.py | 16 ++++++++++++++++ ephemeris.py | 16 ++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pythonapp.yml diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml new file mode 100644 index 0000000..eaf5313 --- /dev/null +++ b/.github/workflows/pythonapp.yml @@ -0,0 +1,22 @@ +name: Python application + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip pipenv pylint-fail-under pylintfileheader + pipenv sync -d + - name: Lint + run: | + pylint-fail-under --fail_under 7.5 *.py diff --git a/.pylintrc b/.pylintrc index b7568b6..2096239 100644 --- a/.pylintrc +++ b/.pylintrc @@ -140,7 +140,11 @@ disable=print-statement, xreadlines-attribute, deprecated-sys-function, exception-escape, - comprehension-escape + comprehension-escape, + missing-docstring, + too-many-locals, + too-many-branches, + too-few-public-methods # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -311,7 +315,7 @@ indent-after-paren=4 indent-string=' ' # Maximum number of characters on a single line. -max-line-length=100 +max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 diff --git a/dumper.py b/dumper.py index e92c193..d414829 100644 --- a/dumper.py +++ b/dumper.py @@ -1,3 +1,19 @@ +# Kosmorro - Compute The Next Ephemeris +# Copyright (C) 2019 Jérôme Deuchnord +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + from abc import ABC, abstractmethod from tabulate import tabulate from skyfield import almanac diff --git a/ephemeris.py b/ephemeris.py index e2cb754..0b437ca 100644 --- a/ephemeris.py +++ b/ephemeris.py @@ -1,3 +1,19 @@ +# Kosmorro - Compute The Next Ephemeris +# Copyright (C) 2019 Jérôme Deuchnord +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + from multiprocessing import Pool as ThreadPool from skyfield.api import Loader, Topos from skyfield import almanac