diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 444845d..a77e430 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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__ diff --git a/docs/source/conf.py b/docs/source/conf.py index 3d3a6a3..6ac4ada 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -73,7 +73,7 @@ # # 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. diff --git a/src/maya/core.py b/src/maya/core.py index 1b5eb8d..efcd61f 100644 --- a/src/maya/core.py +++ b/src/maya/core.py @@ -294,15 +294,15 @@ def long_count(self): """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 @@ def slang_date(self, locale="en"): except KeyError: pass - delta = humanize.time.abs_timedelta( + delta = humanize.time._abs_timedelta( timedelta(seconds=(self.epoch - now().epoch)) )