-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from nickmaccarthy/issue_25
Issue 25
- Loading branch information
Showing
10 changed files
with
91 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release Packages | ||
on: | ||
release: | ||
types: | ||
- released | ||
jobs: | ||
release-python2: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- build-python2 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install python2 for ubuntu | ||
run: sudo apt install python2 | ||
- name: get pip script for python2 | ||
run: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
- name: install pip for python2 | ||
run: sudo python2 get-pip.py | ||
- name: install requirements for python2 | ||
run: pip2 install -r requirements-2.txt | ||
- name: package and upload python2 | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
PYTHON_DATEMATH_VERSION: ${{ github.event.release.tag_name }} | ||
run: | | ||
python2.7 setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
release-python3: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- build-python3 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install requirements for python3 | ||
run: pip3 install -r requirements-3.txt | ||
- name: package and upload python3 | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
PYTHON_DATEMATH_VERSION: ${{ github.event.release.tag_name }} | ||
run: | | ||
python3 setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
tests-python2: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt install python2 | ||
- run: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
- run: sudo python2 get-pip.py | ||
- run: pip2 install -r requirements-2.txt | ||
- run: python2 tests.py | ||
tests-python3: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install requirements | ||
run: pip3 install -r requirements-3.txt | ||
- name: run the tests | ||
run: python3 tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
*.pyc | ||
env | ||
venv | ||
arrow_test.py | ||
dm_pretty.py | ||
ranges.py | ||
tztest.py | ||
env* | ||
venv* | ||
|
||
# general things to ignore | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.5.2 | ||
1.5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from .helpers import parse | ||
from .helpers import parse, DateMathException | ||
|
||
def dm(expr, **kwargs): | ||
''' does our datemath and returns an arrow object ''' | ||
return parse(expr, **kwargs) | ||
|
||
def datemath(expr, **kwargs): | ||
''' does our datemath and returns a datetime object ''' | ||
return parse(expr, **kwargs).datetime | ||
return parse(expr, **kwargs) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nickmaccarthy
Author
Owner
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I believe this change means
datemath()
now returns anarrow
object instead of adatetime
?