-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(massive thx+kudos to s-weigand) * added coverage.xml to .gitignore * Basic rewrite of the travis tests, with github actions * removed now obsolete travis config * Added bump2version and its config * moved flake8 config to setup.cfg * Formatted requirements with comments * Created test file for each country and moved corresponding tests there * Added pre-commit and a basic config containing black+its config * Added flake8 to pre-commit config and set flake8 to ignore E203 E203 needs to be ignore due to a false positive alert for slicing. See. PyCQA/pycodestyle#373 (comment) * Replaced flake8 tests with pre-commit ones, since flake8 is included * Updated workflow to use tests folder, upload coverage to coveralls.io and some minor fixes * Added pre-commit hook that adds encoding shebang to all files py27 compat * Added coverage config * Added tox+pytest config and added .tox to .gitignore * Added rst checking tools to pre-commit and fixed rst issues * Added workflow dispatch as an option to run the workflow * Removed py35 as was done in https://github.com/dr-prodigy/python-holidays/pull/402 * Added dependabot config to receive automatics update PR's for python runtime dependencies and used github-actions * Fixed pytest config quoting the addopts made them not being recognized properly * Replaced travis with github actions badge * Changed contributing guide to reflect changed tooling * Formatted setup.py again with black * Auto-format, Israel to_jd_gregorianyear fix * requirements_dev.txt review, Israel fixes, CHANGES+README.rst reviews * precommit tasks run * removed python 2.7 checks from github CI/CD scripts * flake8 config fixes * travis build toml dependency fix * removed duplicated flake8 tests from coverage config * old tests.py using new test classes * tests tree reviewed * tests cleanup (warn: coverage report -m needs fixing) * Fixed usage of coveralls with gh-action after 3.0.0 release * more recent tests re-applied - #404 * copyright 2021 * test tree refactoring, pytest running thru tests.py * Flake8 test removed, pyproject.toml cleanup * Added .gitaddtributes file to ensure consistent '\n' line ending for future commits * Added pre-commit hook to enforce '\n' lineending and applied it on all files * Copied files from 'holiday' and 'tests' over and ran 'pre-commit run -a' This should catch all changes on beta which were missing. I left changes which were added in the cleanup of 'unstable' e.g. 'holidays.utils.is_leap_year' 'test/countries/test_saudiarabia.py' was renamed to 'test/countries/test_saudi_arabia.py' to be consistent with 'holidays/countries/saudi_arabia.py' * is_leap_year removal Co-authored-by: s-weigand <[email protected]>
- Loading branch information
1 parent
ff1a39c
commit d65a8eb
Showing
160 changed files
with
12,949 additions
and
8,315 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,2 @@ | ||
* text=lf | ||
*.bat text eol=crlf |
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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
day: friday | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
day: friday |
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,81 @@ | ||
name: "Tests" | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run Quality Assurance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
test: | ||
name: "Test: python=${{ matrix.python-version }} on ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
needs: [pre-commit] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9, pypy3] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip wheel 'coveralls>=3' | ||
python -m pip install -U -r requirements_dev.txt | ||
python -m pip install -e . | ||
- name: Run tests | ||
run: | | ||
py.test | ||
- name: Upload Coverage | ||
run: coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: tests-${{ matrix.python-version }}-${{ matrix.os }} | ||
COVERALLS_PARALLEL: true | ||
|
||
coveralls: | ||
name: Finish Coveralls | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
container: python:3-slim | ||
steps: | ||
- name: Finished | ||
run: | | ||
pip3 install -U 'coveralls>=3' | ||
coveralls --finish --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip wheel | ||
pip install -U . | ||
- name: Build dist | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: fix-encoding-pragma | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
|
||
- repo: https://github.com/python/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.7.0 | ||
hooks: | ||
- id: rst-backticks | ||
|
||
- repo: https://github.com/myint/rstcheck | ||
rev: 3f92957478422df87bd730abde66f089cc1ee19b | ||
hooks: | ||
- id: rstcheck | ||
additional_dependencies: [rstcheck] |
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
Empty file.
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
Oops, something went wrong.