Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 #201

Merged
merged 19 commits into from
Jun 22, 2022
Merged

v4 #201

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -e .[dev] -c etc/requirements_locked.txt
pip install -e .[dev] -c etc/requirements_dev.txt
- name: Run benchmark
run: |
pytest etc/bench.py --benchmark-json output.json
- name: Download previous benchmark data
uses: actions/cache@v3.0.3
uses: actions/cache@v3.0.4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
Expand Down
35 changes: 10 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10"]
python-version: ["3.8", "3.10"]
include:
- os: ubuntu-latest
python-version: "3.7"
requirements_file: requirements_locked_old.txt
- python-version: "3.9"
requirements_file: requirements_locked.txt
- python-version: "3.8"
requirements_file: requirements_minpandas.txt
- python-version: "3.10"
requirements_file: requirements_locked.txt
requirements_file: requirements_dev.txt

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set Lockfile
run: |
echo "PIP_CONSTRAINT=etc/${{matrix.requirements_file}}" >> $GITHUB_ENV
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v3.0.3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-py${{matrix.python-version}}-${{ hashFiles(env.PIP_CONSTRAINT) }}
restore-keys: |
${{ runner.os }}-pip-py${{matrix.python-version}}-
cache: 'pip'
cache-dependency-path: 'etc/${{matrix.requirements_file}}'
- name: Install dependencies
env:
PYTHONWARNINGS: ignore:DEPRECATION::pip._internal.cli.base_command
run: |
pip install -e .[dev]
python -m pip install --upgrade pip
pip install -r etc/${{matrix.requirements_file}}
pip install -e .
- name: Lint with flake8
run: |
flake8
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,40 @@ on:
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Build sdist
run: python setup.py sdist
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Install from test and test running
run: |
python -m pip install --upgrade pip
pip install --extra-index-url https://test.pypi.org/simple exchange_calendars
python -c 'import exchange_calendars;print(exchange_calendars.__version__)'
pip uninstall -y exchange_calendars

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

- name: Install and test running
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 3.9.1
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 21.4b2
rev: 22.3.0
hooks:
- id: black
language_version: python
Loading