-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
13,841 additions
and
9,350 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,6 @@ | ||
[bumpversion] | ||
current_version = 1.2.0 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:dateparser/__init__.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
|
||
max-line-length = 119 | ||
ignore = W503, E203, E501, E722, F401, E701, E704 | ||
|
||
exclude = | ||
docs/conf.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Apply the auto-formatter black | ||
24c1637dcc77aac006db8ebcfbf5199fa7abac5d |
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,35 @@ | ||
name: CIFuzz | ||
on: [pull_request] | ||
permissions: {} | ||
jobs: | ||
Fuzzing: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Build Fuzzers | ||
id: build | ||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master | ||
with: | ||
oss-fuzz-project-name: 'dateparser' | ||
language: python | ||
- name: Run Fuzzers | ||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master | ||
with: | ||
oss-fuzz-project-name: 'dateparser' | ||
language: python | ||
fuzz-seconds: 600 | ||
output-sarif: true | ||
- name: Upload Crash | ||
uses: actions/upload-artifact@v3 | ||
if: failure() && steps.build.outcome == 'success' | ||
with: | ||
name: artifacts | ||
path: ./out/artifacts | ||
- name: Upload Sarif | ||
if: always() && steps.build.outcome == 'success' | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
# Path to SARIF file relative to the root of the repository | ||
sarif_file: cifuzz-sarif/results.sarif | ||
checkout_path: cifuzz-sarif |
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 |
---|---|---|
|
@@ -14,15 +14,9 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: 3.8 | ||
- python-version: 3.9 | ||
env: | ||
TOXENV: flake8 | ||
- python-version: 3.7 | ||
env: | ||
TOXENV: py | ||
- python-version: 3.8 | ||
env: | ||
TOXENV: py | ||
- python-version: 3.9 | ||
env: | ||
TOXENV: py | ||
|
@@ -38,18 +32,44 @@ jobs: | |
- python-version: "3.11" | ||
env: | ||
TOXENV: latest | ||
- python-version: "3.12" | ||
env: | ||
TOXENV: py | ||
- python-version: "3.12" | ||
env: | ||
TOXENV: latest | ||
- python-version: "3.13" | ||
env: | ||
TOXENV: py | ||
- python-version: "3.13" | ||
env: | ||
TOXENV: latest | ||
- python-version: "3.13" | ||
env: | ||
TOXENV: twinecheck | ||
- python-version: "3.12" # Keep in sync with tox.ini | ||
env: | ||
TOXENV: docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Set up Python ${{ matrix.python-version }}' | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '${{ matrix.python-version }}' | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install language-pack-fr | ||
run: sudo apt-get update && sudo apt-get install language-pack-fr | ||
- name: Install python dependencies | ||
run: pip install tox | ||
- name: tox | ||
run: tox -e py | ||
run: sudo apt-get update && sudo apt-get install -y language-pack-fr build-essential | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run tests | ||
run: tox -e ${{ matrix.env.TOXENV }} | ||
- name: Upload coverage.xml to codecov | ||
if: ${{ matrix.python-version == '3.9' && matrix.env.TOXENV == 'latest'}} | ||
if: ${{ matrix.env.python-version == '3.9' && matrix.env.TOXENV == 'latest' }} | ||
uses: codecov/codecov-action@v3 | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pre-commit/[email protected] |
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,2 @@ | ||
[settings] | ||
profile = black |
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,15 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 # 6.0.0 drops Python 3.7 support | ||
hooks: | ||
- id: flake8 | ||
args: ['--config=.flake8'] | ||
- repo: https://github.com/psf/black.git | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
exclude: ^dateparser/data/date_translation_data/ | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 # 5.12 drops Python 3.7 support | ||
hooks: | ||
- id: isort |
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,17 @@ | ||
version: 2 | ||
formats: all | ||
sphinx: | ||
configuration: docs/conf.py | ||
fail_on_warning: true | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
# For available versions, see: | ||
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python | ||
python: "3.11" # Keep in sync with .github/workflows/checks.yml | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- path: . |
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
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.