-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
9 changed files
with
130 additions
and
8 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 |
---|---|---|
|
@@ -134,3 +134,54 @@ jobs: | |
files: ./coverage.xml | ||
flags: ui-tests | ||
fail_ci_if_error: false # optional (default = false) | ||
core_test: | ||
name: Core test on ${{ matrix.python-version }}, ${{ matrix.os }} | ||
needs: [pre_commit] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest'] | ||
python-version: ['3.11'] | ||
timeout-minutes: 120 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
env: | ||
DESC: "Python ${{ matrix.python-version }} tests" | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" | ||
DISPLAY: ":99.0" | ||
PYTHONIOENCODING: "utf-8" | ||
MPLBACKEND: "Agg" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OMP_NUM_THREADS: 1 | ||
OPENBLAS_NUM_THREADS: 1 | ||
MKL_NUM_THREADS: 1 | ||
VECLIB_MAXIMUM_THREADS: 1 | ||
NUMEXPR_NUM_THREADS: 1 | ||
NUMBA_NUM_THREADS: 1 | ||
PYDEVD_DISABLE_FILE_VALIDATION: 1 | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/[email protected] | ||
with: | ||
name: core_test_suite | ||
python-version: ${{ matrix.python-version }} | ||
channel-priority: strict | ||
channels: pyviz/label/dev,conda-forge,nodefaults | ||
envs: "-o tests_core" | ||
cache: true | ||
conda-update: true | ||
id: install | ||
- name: bokeh sampledata | ||
run: | | ||
conda activate test-environment | ||
bokeh sampledata | ||
- name: Check packages latest version | ||
run: | | ||
conda activate test-environment | ||
python scripts/check_latest_packages.py | ||
- name: doit test_unit | ||
run: | | ||
conda activate test-environment | ||
pytest holoviews |
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
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,37 @@ | ||
import sys | ||
import requests | ||
from datetime import datetime, date, timedelta | ||
|
||
from packaging.version import Version | ||
|
||
|
||
def main(*packages): | ||
allowed_date = date.today() - timedelta(days=2) | ||
is_latest = True | ||
for package in sorted(packages): | ||
url = f"https://pypi.org/pypi/{package}/json" | ||
resp = requests.get(url).json() | ||
latest = resp["info"]["version"] | ||
current = __import__(package).__version__ | ||
|
||
latest_release_date = datetime.fromisoformat( | ||
resp["releases"][latest][0]["upload_time_iso_8601"] | ||
).date() | ||
current_release_date = datetime.fromisoformat( | ||
resp["releases"][current][0]["upload_time_iso_8601"] | ||
).date() | ||
|
||
version_check = Version(current) >= Version(latest) | ||
date_check = allowed_date >= latest_release_date | ||
is_latest &= version_check and date_check | ||
|
||
print( | ||
f"Package: {package:<10} Current: {current:<7} ({current_release_date})\tLatest: {latest:<7} ({latest_release_date})" | ||
) | ||
|
||
if not is_latest: | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == "__main__": | ||
main("numpy", "pandas") |
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