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

Update CI/CD pip caching #1866

Merged
merged 3 commits into from
Jul 19, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --requirement requirements/tests.txt
python -m pip install .

- name: Run tests
Expand Down Expand Up @@ -113,8 +113,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build polib
pip install .
python -m pip install build polib
python -m pip install .

- name: Build distribution
run: |
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
shell: bash
run: |
rm -rf holidays
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --requirement requirements/tests.txt
python -m pip install `ls dist/*.whl`
pytest --dist loadscope --numprocesses auto tests/countries tests/financial
python -m pip uninstall -y holidays python-dateutil six
Expand Down
25 changes: 10 additions & 15 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# Test environments.
pre-commit
ruff
tox
# Dev requirements.

# Localization.
lingva

# Holidays pre-calculation.
convertdate
hijridate

# Deployment.
build
gitpython
pygithub
build==1.2.1
convertdate==2.4.0
gitpython==3.1.43
hijridate==2.5.0
lingva==5.0.3
pre-commit==3.7.1
pygithub==2.3.0
ruff==0.5.2
tox==4.16.0
urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability
10 changes: 5 additions & 5 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pip requirements for building docs.
# Must include package `install_requires` entries.
python-dateutil
sphinx
sphinx_rtd_theme
# Documentaion requirements.

python-dateutil==2.9.0.post0
sphinx_rtd_theme==2.0.0
sphinx==7.2.6
5 changes: 3 additions & 2 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Package runtime requirements.
python-dateutil
# Runtime requirements.

python-dateutil==2.9.0.post0
20 changes: 13 additions & 7 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Test requirements.
coverage
importlib-metadata
numpy
polib
pytest
pytest-cov
pytest-xdist

coverage==7.5.0; implementation_name == 'pypy'
coverage==7.6.0; implementation_name != 'pypy'
importlib-metadata==7.1.0; implementation_name == 'pypy'
importlib-metadata==8.0.0; implementation_name != 'pypy'
numpy<2.0.0; implementation_name == 'pypy' or python_version < '3.9'
numpy==2.0.0; implementation_name != 'pypy' and python_version >= '3.9'
polib==1.2.0
pytest-cov==5.0.0
pytest-xdist==3.5.0; implementation_name == 'pypy'
pytest-xdist==3.6.1; implementation_name != 'pypy'
pytest==8.1.1; implementation_name == 'pypy'
pytest==8.2.2; implementation_name != 'pypy'
2 changes: 2 additions & 0 deletions tests/test_holiday_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def test_years(self):
HolidayBase(years=range(2010, 2016)).years, {2010, 2011, 2012, 2013, 2014, 2015}
)
self.assertSetEqual(HolidayBase(years=(2013, 2015, 2015)).years, {2013, 2015})
self.assertSetEqual(HolidayBase(years=(2013.0, 2015.0, 2015.0)).years, {2013, 2015})
self.assertSetEqual(HolidayBase(years=2015).years, {2015})
self.assertSetEqual(HolidayBase(years=2015.0).years, {2015})


class TestCategories(unittest.TestCase):
Expand Down