Merge pull request #199 from JessicaTegner/ci

Improvement to workflow, test fixes and new basis
This commit is contained in:
Timo Furrer
2022-10-17 15:12:36 +02:00
committed by GitHub
3 changed files with 15 additions and 18 deletions
+10 -13
View File
@@ -1,6 +1,6 @@
name: Continuous Integration and Deployment
on: [push]
on: [push, pull_request]
jobs:
build:
@@ -8,15 +8,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
os: [ubuntu-latest, macOS-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup build and test environment
@@ -46,9 +45,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v1
uses: actions/setup-python@v4.2.0
with:
python-version: 3.7
- name: Setup docs environment
@@ -62,20 +61,18 @@ jobs:
needs: [build, docs]
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags') && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python 3.7
if: startsWith(github.event.ref, 'refs/tags')
uses: actions/setup-python@v1
uses: actions/setup-python@v4.2.0
with:
python-version: 3.7
- name: Build Package
if: startsWith(github.event.ref, 'refs/tags')
run: |
python -m pip install --upgrade pip setuptools wheel
python setup.py sdist bdist_wheel --universal
- name: Publish Package on PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
+1 -1
View File
@@ -73,7 +73,7 @@ release = maya.__version__
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
+4 -4
View File
@@ -294,15 +294,15 @@ class MayaDT(object):
"""Returns a Mayan Long Count representation of the Maya DT."""
# Creation (0.0.0.0.0) occurred on -3114-08-11
# 1856305 is distance (in days) between Creation and UNIX epoch
days_since_creation = int(1856305 + self._epoch / (3600*24))
days_since_creation = int(1856305 + self._epoch / (3600 * 24))
caps = (0, 20, 20, 18, 20)
lc_date = [0, 0, 0, 0, days_since_creation]
for i in range(4, 0, -1):
if lc_date[i] >= caps[i]:
lc_date[i-1] += int(lc_date[i]/caps[i])
lc_date[i - 1] += int(lc_date[i] / caps[i])
lc_date[i] %= caps[i]
elif lc_date[i] < 0:
lc_date[i-1] += int(lc_date[i]/caps[i])
lc_date[i - 1] += int(lc_date[i] / caps[i])
lc_date[i] = 0
return '.'.join(str(i) for i in lc_date)
@@ -372,7 +372,7 @@ class MayaDT(object):
except KeyError:
pass
delta = humanize.time.abs_timedelta(
delta = humanize.time._abs_timedelta(
timedelta(seconds=(self.epoch - now().epoch))
)