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

Updates python versions and trove classifiers #254

Merged
merged 10 commits into from
Feb 26, 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If applicable, add screenshots to help explain your problem.

**System (please complete the following information):**
- OS: [e.g. Mac (with version), Ubuntu 18.04]
- Python version [e.g. 3.7]
- Python version [e.g. 3.12]
- Pytorch version [e.g., 1.4]
- Plenoptic version [e.g. 0.1]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
name: Execute notebooks
steps:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
name: Run pytest scripts
steps:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ We try to keep all our communication on Github, and we use several channels:
of discussions first. We'll discuss it there and, if we decide to pursue it,
open an issue to track progress.

## Supported versions

`plenoptic` tries to follow
[SPEC-0](https://scientific-python.org/specs/spec-0000/): we support python
versions are supported for 3 years following initial release. This means that we
support three python feature versions (e.g., 3.10, 3.11, and 3.12) at any one
time and that we'll transition between versions during the fourth quarter of
each year. We run our CPU tests on all three versions, and the GPU tests and
readthedocs build use the middle version.

## Contributing to the code

### Contribution workflow
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI Version](https://img.shields.io/pypi/v/plenoptic.svg)](https://pypi.org/project/plenoptic/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LabForComputationalVision/plenoptic/blob/main/LICENSE)
![Python version](https://img.shields.io/badge/python-3.7|3.8|3.9|3.10-blue.svg)
![Python version](https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg)
[![Build Status](https://github.com/LabForComputationalVision/plenoptic/workflows/build/badge.svg)](https://github.com/LabForComputationalVision/plenoptic/actions?query=workflow%3Abuild)
[![Documentation Status](https://readthedocs.org/projects/plenoptic/badge/?version=latest)](https://plenoptic.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10151131.svg)](https://doi.org/10.5281/zenodo.10151131)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. |license-shield| image:: https://img.shields.io/badge/license-MIT-yellow.svg
:target: https://github.com/LabForComputationalVision/plenoptic/blob/main/LICENSE

.. |python-version-shield| image:: https://img.shields.io/badge/python-3.7%7C3.8%7C3.9%7C3.10-blue.svg
.. |python-version-shield| image:: https://img.shields.io/badge/python-3.10%7C3.11%7C3.12-blue.svg

.. |build| image:: https://github.com/LabForComputationalVision/plenoptic/workflows/build/badge.svg
:target: https://github.com/LabForComputationalVision/plenoptic/actions?query=workflow%3Abuild
Expand Down
10 changes: 3 additions & 7 deletions jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM nvidia/cuda:12.2.0-devel-ubuntu20.04
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-numpy \
python3-pip \
python3-pytest \
python3-pytest-cov \
python3-venv \
python3-yaml \
'python3.11' \
'python3.11-venv' \
ffmpeg \
git \
&& \
Expand Down
12 changes: 6 additions & 6 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ pipeline {
OMP_NUM_THREADS = 4
}
steps {
sh 'python3 -m venv --system-site-packages $HOME'
sh 'python3.11 -m venv --system-site-packages $HOME'
sh '''#!/bin/bash -ex
source $HOME/bin/activate
pip install -U pip
pip install -U .[dev] --verbose
python3 -c "import torch; print(torch.cuda.current_device())"
python3 -m pytest
python3.11 -c "import torch; print(torch.cuda.current_device())"
python3.11 -m pytest
'''
}
}
Expand All @@ -52,13 +52,13 @@ pipeline {
OMP_NUM_THREADS = 4
}
steps {
sh 'python3 -m venv --system-site-packages $HOME'
sh 'python3.11 -m venv --system-site-packages $HOME'
sh '''#!/bin/bash -ex
source $HOME/bin/activate
pip install -U pip
pip install .[dev]
python3 -c "import torch; print(torch.cuda.current_device())"
python3 -m pytest
python3.11 -c "import torch; print(torch.cuda.current_device())"
python3.11 -m pytest
'''
}
}
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ dynamic = ["version"]
authors = [{name="Plenoptic authors"}]
description = "Python library for model-based stimulus synthesis."
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Science/Research",
]
Expand Down