瀏覽代碼

Add GitHub Actions (#2)

tags/v0.1.0
Jérôme Deuchnord 4 年之前
committed by GitHub
父節點
當前提交
2a902ac359
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 4 個檔案被更改,包括 60 行新增2 行删除
  1. +22
    -0
      .github/workflows/pythonapp.yml
  2. +6
    -2
      .pylintrc
  3. +16
    -0
      dumper.py
  4. +16
    -0
      ephemeris.py

+ 22
- 0
.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

+ 6
- 2
.pylintrc 查看文件

@@ -140,7 +140,11 @@ disable=print-statement,
xreadlines-attribute, xreadlines-attribute,
deprecated-sys-function, deprecated-sys-function,
exception-escape, 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 # 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 # either give multiple identifier separated by comma (,) or put this option
@@ -311,7 +315,7 @@ indent-after-paren=4
indent-string=' ' indent-string=' '


# Maximum number of characters on a single line. # Maximum number of characters on a single line.
max-line-length=100
max-line-length=120


# Maximum number of lines in a module. # Maximum number of lines in a module.
max-module-lines=1000 max-module-lines=1000


+ 16
- 0
dumper.py 查看文件

@@ -1,3 +1,19 @@
# Kosmorro - Compute The Next Ephemeris
# Copyright (C) 2019 Jérôme Deuchnord <jerome@deuchnord.fr>
#
# 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 <https://www.gnu.org/licenses/>.

from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from tabulate import tabulate from tabulate import tabulate
from skyfield import almanac from skyfield import almanac


+ 16
- 0
ephemeris.py 查看文件

@@ -1,3 +1,19 @@
# Kosmorro - Compute The Next Ephemeris
# Copyright (C) 2019 Jérôme Deuchnord <jerome@deuchnord.fr>
#
# 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 <https://www.gnu.org/licenses/>.

from multiprocessing import Pool as ThreadPool from multiprocessing import Pool as ThreadPool
from skyfield.api import Loader, Topos from skyfield.api import Loader, Topos
from skyfield import almanac from skyfield import almanac


Loading…
取消
儲存